Add and handle new --alternate command line option.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
d15be926 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
d15be926 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
d15be926
MK
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.
d15be926
MK
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
d15be926
MK
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
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d15be926 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
d15be926 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
d15be926 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
d15be926 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
d15be926 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d15be926 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d15be926 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d15be926 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d15be926 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d15be926 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d15be926 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d15be926 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d15be926 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d15be926 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d15be926 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d15be926 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d15be926 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d15be926 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d15be926 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d15be926 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
ddc9cd0f
AC
1234
1235CONFIG_OBS=
1236CONFIG_DEPS=
1237CONFIG_SRCS=
1238ENABLE_CFLAGS=
1239
1240CONFIG_ALL=
1241CONFIG_CLEAN=
1242CONFIG_INSTALL=
1243CONFIG_UNINSTALL=
1244
1245
c906108c 1246echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
ddc9cd0f 1247echo "configure:1248: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1248set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1249if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251else
1252 cat > conftestmake <<\EOF
1253all:
1254 @echo 'ac_maketemp="${MAKE}"'
1255EOF
1256# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1257eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1258if test -n "$ac_maketemp"; then
1259 eval ac_cv_prog_make_${ac_make}_set=yes
1260else
1261 eval ac_cv_prog_make_${ac_make}_set=no
1262fi
1263rm -f conftestmake
1264fi
1265if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1266 echo "$ac_t""yes" 1>&6
1267 SET_MAKE=
1268else
1269 echo "$ac_t""no" 1>&6
1270 SET_MAKE="MAKE=${MAKE-make}"
1271fi
1272
1273# Extract the first word of "ranlib", so it can be a program name with args.
1274set dummy ranlib; ac_word=$2
1275echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 1276echo "configure:1277: checking for $ac_word" >&5
c906108c
SS
1277if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279else
1280 if test -n "$RANLIB"; then
1281 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1282else
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286 test -z "$ac_dir" && ac_dir=.
1287 if test -f $ac_dir/$ac_word; then
1288 ac_cv_prog_RANLIB="ranlib"
1289 break
1290 fi
1291 done
1292 IFS="$ac_save_ifs"
1293 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1294fi
1295fi
1296RANLIB="$ac_cv_prog_RANLIB"
1297if test -n "$RANLIB"; then
1298 echo "$ac_t""$RANLIB" 1>&6
1299else
1300 echo "$ac_t""no" 1>&6
1301fi
1302
1303echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
ddc9cd0f 1304echo "configure:1305: checking for ANSI C header files" >&5
c906108c
SS
1305if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1307else
1308 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1309#line 1310 "configure"
c906108c
SS
1310#include "confdefs.h"
1311#include <stdlib.h>
1312#include <stdarg.h>
1313#include <string.h>
1314#include <float.h>
1315EOF
1316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 1317{ (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319if test -z "$ac_err"; then
1320 rm -rf conftest*
1321 ac_cv_header_stdc=yes
1322else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 ac_cv_header_stdc=no
1328fi
1329rm -f conftest*
1330
1331if test $ac_cv_header_stdc = yes; then
1332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1333cat > conftest.$ac_ext <<EOF
ddc9cd0f 1334#line 1335 "configure"
c906108c
SS
1335#include "confdefs.h"
1336#include <string.h>
1337EOF
1338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "memchr" >/dev/null 2>&1; then
1340 :
1341else
1342 rm -rf conftest*
1343 ac_cv_header_stdc=no
1344fi
1345rm -f conftest*
1346
1347fi
1348
1349if test $ac_cv_header_stdc = yes; then
1350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1351cat > conftest.$ac_ext <<EOF
ddc9cd0f 1352#line 1353 "configure"
c906108c
SS
1353#include "confdefs.h"
1354#include <stdlib.h>
1355EOF
1356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357 egrep "free" >/dev/null 2>&1; then
1358 :
1359else
1360 rm -rf conftest*
1361 ac_cv_header_stdc=no
1362fi
1363rm -f conftest*
1364
1365fi
1366
1367if test $ac_cv_header_stdc = yes; then
1368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1369if test "$cross_compiling" = yes; then
1370 :
1371else
1372 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1373#line 1374 "configure"
c906108c
SS
1374#include "confdefs.h"
1375#include <ctype.h>
1376#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1377#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1378#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1379int main () { int i; for (i = 0; i < 256; i++)
1380if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1381exit (0); }
1382
1383EOF
ddc9cd0f 1384if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1385then
1386 :
1387else
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1390 rm -fr conftest*
1391 ac_cv_header_stdc=no
1392fi
1393rm -fr conftest*
1394fi
1395
1396fi
1397fi
1398
1399echo "$ac_t""$ac_cv_header_stdc" 1>&6
1400if test $ac_cv_header_stdc = yes; then
1401 cat >> confdefs.h <<\EOF
1402#define STDC_HEADERS 1
1403EOF
1404
1405fi
1406
1407echo $ac_n "checking for working const""... $ac_c" 1>&6
ddc9cd0f 1408echo "configure:1409: checking for working const" >&5
c906108c
SS
1409if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411else
1412 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1413#line 1414 "configure"
c906108c
SS
1414#include "confdefs.h"
1415
1416int main() {
1417
1418/* Ultrix mips cc rejects this. */
1419typedef int charset[2]; const charset x;
1420/* SunOS 4.1.1 cc rejects this. */
1421char const *const *ccp;
1422char **p;
1423/* NEC SVR4.0.2 mips cc rejects this. */
1424struct point {int x, y;};
1425static struct point const zero = {0,0};
1426/* AIX XL C 1.02.0.0 rejects this.
1427 It does not let you subtract one const X* pointer from another in an arm
1428 of an if-expression whose if-part is not a constant expression */
1429const char *g = "string";
1430ccp = &g + (g ? g-g : 0);
1431/* HPUX 7.0 cc rejects these. */
1432++ccp;
1433p = (char**) ccp;
1434ccp = (char const *const *) p;
1435{ /* SCO 3.2v4 cc rejects this. */
1436 char *t;
1437 char const *s = 0 ? (char *) 0 : (char const *) 0;
1438
1439 *t++ = 0;
1440}
1441{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1442 int x[] = {25, 17};
1443 const int *foo = &x[0];
1444 ++foo;
1445}
1446{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1447 typedef const int *iptr;
1448 iptr p = 0;
1449 ++p;
1450}
1451{ /* AIX XL C 1.02.0.0 rejects this saying
1452 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1453 struct s { int j; const int *ap[3]; };
1454 struct s *b; b->j = 5;
1455}
1456{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1457 const int foo = 10;
1458}
1459
1460; return 0; }
1461EOF
ddc9cd0f 1462if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1463 rm -rf conftest*
1464 ac_cv_c_const=yes
1465else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 ac_cv_c_const=no
1470fi
1471rm -f conftest*
1472fi
1473
1474echo "$ac_t""$ac_cv_c_const" 1>&6
1475if test $ac_cv_c_const = no; then
1476 cat >> confdefs.h <<\EOF
1477#define const
1478EOF
1479
1480fi
1481
1482echo $ac_n "checking for inline""... $ac_c" 1>&6
ddc9cd0f 1483echo "configure:1484: checking for inline" >&5
c906108c
SS
1484if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486else
1487 ac_cv_c_inline=no
1488for ac_kw in inline __inline__ __inline; do
1489 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1490#line 1491 "configure"
c906108c
SS
1491#include "confdefs.h"
1492
1493int main() {
1494} $ac_kw foo() {
1495; return 0; }
1496EOF
ddc9cd0f 1497if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1498 rm -rf conftest*
1499 ac_cv_c_inline=$ac_kw; break
1500else
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1503fi
1504rm -f conftest*
1505done
1506
1507fi
1508
1509echo "$ac_t""$ac_cv_c_inline" 1>&6
1510case "$ac_cv_c_inline" in
1511 inline | yes) ;;
1512 no) cat >> confdefs.h <<\EOF
1513#define inline
1514EOF
1515 ;;
1516 *) cat >> confdefs.h <<EOF
1517#define inline $ac_cv_c_inline
1518EOF
1519 ;;
1520esac
1521
1522echo $ac_n "checking for off_t""... $ac_c" 1>&6
ddc9cd0f 1523echo "configure:1524: checking for off_t" >&5
c906108c
SS
1524if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526else
1527 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1528#line 1529 "configure"
c906108c
SS
1529#include "confdefs.h"
1530#include <sys/types.h>
1531#if STDC_HEADERS
1532#include <stdlib.h>
1533#include <stddef.h>
1534#endif
1535EOF
1536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1537 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1538 rm -rf conftest*
1539 ac_cv_type_off_t=yes
1540else
1541 rm -rf conftest*
1542 ac_cv_type_off_t=no
1543fi
1544rm -f conftest*
1545
1546fi
1547echo "$ac_t""$ac_cv_type_off_t" 1>&6
1548if test $ac_cv_type_off_t = no; then
1549 cat >> confdefs.h <<\EOF
1550#define off_t long
1551EOF
1552
1553fi
1554
1555echo $ac_n "checking for size_t""... $ac_c" 1>&6
ddc9cd0f 1556echo "configure:1557: checking for size_t" >&5
c906108c
SS
1557if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559else
1560 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1561#line 1562 "configure"
c906108c
SS
1562#include "confdefs.h"
1563#include <sys/types.h>
1564#if STDC_HEADERS
1565#include <stdlib.h>
1566#include <stddef.h>
1567#endif
1568EOF
1569if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1571 rm -rf conftest*
1572 ac_cv_type_size_t=yes
1573else
1574 rm -rf conftest*
1575 ac_cv_type_size_t=no
1576fi
1577rm -f conftest*
1578
1579fi
1580echo "$ac_t""$ac_cv_type_size_t" 1>&6
1581if test $ac_cv_type_size_t = no; then
1582 cat >> confdefs.h <<\EOF
1583#define size_t unsigned
1584EOF
1585
1586fi
1587
1588# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1589# for constant arguments. Useless!
1590echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
ddc9cd0f 1591echo "configure:1592: checking for working alloca.h" >&5
c906108c
SS
1592if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594else
1595 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1596#line 1597 "configure"
c906108c
SS
1597#include "confdefs.h"
1598#include <alloca.h>
1599int main() {
1600char *p = alloca(2 * sizeof(int));
1601; return 0; }
1602EOF
ddc9cd0f 1603if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1604 rm -rf conftest*
1605 ac_cv_header_alloca_h=yes
1606else
1607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1609 rm -rf conftest*
1610 ac_cv_header_alloca_h=no
1611fi
1612rm -f conftest*
1613fi
1614
1615echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1616if test $ac_cv_header_alloca_h = yes; then
1617 cat >> confdefs.h <<\EOF
1618#define HAVE_ALLOCA_H 1
1619EOF
1620
1621fi
1622
1623echo $ac_n "checking for alloca""... $ac_c" 1>&6
ddc9cd0f 1624echo "configure:1625: checking for alloca" >&5
c906108c
SS
1625if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627else
1628 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1629#line 1630 "configure"
c906108c
SS
1630#include "confdefs.h"
1631
1632#ifdef __GNUC__
1633# define alloca __builtin_alloca
1634#else
1635# ifdef _MSC_VER
1636# include <malloc.h>
1637# define alloca _alloca
1638# else
1639# if HAVE_ALLOCA_H
1640# include <alloca.h>
1641# else
1642# ifdef _AIX
1643 #pragma alloca
1644# else
1645# ifndef alloca /* predefined by HP cc +Olibcalls */
1646char *alloca ();
1647# endif
1648# endif
1649# endif
1650# endif
1651#endif
1652
1653int main() {
1654char *p = (char *) alloca(1);
1655; return 0; }
1656EOF
ddc9cd0f 1657if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1658 rm -rf conftest*
1659 ac_cv_func_alloca_works=yes
1660else
1661 echo "configure: failed program was:" >&5
1662 cat conftest.$ac_ext >&5
1663 rm -rf conftest*
1664 ac_cv_func_alloca_works=no
1665fi
1666rm -f conftest*
1667fi
1668
1669echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1670if test $ac_cv_func_alloca_works = yes; then
1671 cat >> confdefs.h <<\EOF
1672#define HAVE_ALLOCA 1
1673EOF
1674
1675fi
1676
1677if test $ac_cv_func_alloca_works = no; then
1678 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1679 # that cause trouble. Some versions do not even contain alloca or
1680 # contain a buggy version. If you still want to use their alloca,
1681 # use ar to extract alloca.o from them instead of compiling alloca.c.
1682 ALLOCA=alloca.${ac_objext}
1683 cat >> confdefs.h <<\EOF
1684#define C_ALLOCA 1
1685EOF
1686
1687
1688echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
ddc9cd0f 1689echo "configure:1690: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1690if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1691 echo $ac_n "(cached) $ac_c" 1>&6
1692else
1693 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1694#line 1695 "configure"
c906108c
SS
1695#include "confdefs.h"
1696#if defined(CRAY) && ! defined(CRAY2)
1697webecray
1698#else
1699wenotbecray
1700#endif
1701
1702EOF
1703if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1704 egrep "webecray" >/dev/null 2>&1; then
1705 rm -rf conftest*
1706 ac_cv_os_cray=yes
1707else
1708 rm -rf conftest*
1709 ac_cv_os_cray=no
1710fi
1711rm -f conftest*
1712
1713fi
1714
1715echo "$ac_t""$ac_cv_os_cray" 1>&6
1716if test $ac_cv_os_cray = yes; then
1717for ac_func in _getb67 GETB67 getb67; do
1718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 1719echo "configure:1720: checking for $ac_func" >&5
c906108c
SS
1720if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722else
1723 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1724#line 1725 "configure"
c906108c
SS
1725#include "confdefs.h"
1726/* System header to define __stub macros and hopefully few prototypes,
1727 which can conflict with char $ac_func(); below. */
1728#include <assert.h>
1729/* Override any gcc2 internal prototype to avoid an error. */
1730/* We use char because int might match the return type of a gcc2
1731 builtin and then its argument prototype would still apply. */
1732char $ac_func();
1733
1734int main() {
1735
1736/* The GNU C library defines this for functions which it implements
1737 to always fail with ENOSYS. Some functions are actually named
1738 something starting with __ and the normal name is an alias. */
1739#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1740choke me
1741#else
1742$ac_func();
1743#endif
1744
1745; return 0; }
1746EOF
ddc9cd0f 1747if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1748 rm -rf conftest*
1749 eval "ac_cv_func_$ac_func=yes"
1750else
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 rm -rf conftest*
1754 eval "ac_cv_func_$ac_func=no"
1755fi
1756rm -f conftest*
1757fi
1758
1759if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1760 echo "$ac_t""yes" 1>&6
1761 cat >> confdefs.h <<EOF
1762#define CRAY_STACKSEG_END $ac_func
1763EOF
1764
1765 break
1766else
1767 echo "$ac_t""no" 1>&6
1768fi
1769
1770done
1771fi
1772
1773echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
ddc9cd0f 1774echo "configure:1775: checking stack direction for C alloca" >&5
c906108c
SS
1775if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777else
1778 if test "$cross_compiling" = yes; then
1779 ac_cv_c_stack_direction=0
1780else
1781 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1782#line 1783 "configure"
c906108c
SS
1783#include "confdefs.h"
1784find_stack_direction ()
1785{
1786 static char *addr = 0;
1787 auto char dummy;
1788 if (addr == 0)
1789 {
1790 addr = &dummy;
1791 return find_stack_direction ();
1792 }
1793 else
1794 return (&dummy > addr) ? 1 : -1;
1795}
1796main ()
1797{
1798 exit (find_stack_direction() < 0);
1799}
1800EOF
ddc9cd0f 1801if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1802then
1803 ac_cv_c_stack_direction=1
1804else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -fr conftest*
1808 ac_cv_c_stack_direction=-1
1809fi
1810rm -fr conftest*
1811fi
1812
1813fi
1814
1815echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1816cat >> confdefs.h <<EOF
1817#define STACK_DIRECTION $ac_cv_c_stack_direction
1818EOF
1819
1820fi
1821
d836ee13 1822for ac_hdr in unistd.h
c906108c
SS
1823do
1824ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1825echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 1826echo "configure:1827: checking for $ac_hdr" >&5
c906108c
SS
1827if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1828 echo $ac_n "(cached) $ac_c" 1>&6
1829else
1830 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1831#line 1832 "configure"
c906108c
SS
1832#include "confdefs.h"
1833#include <$ac_hdr>
1834EOF
1835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 1836{ (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1837ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1838if test -z "$ac_err"; then
1839 rm -rf conftest*
1840 eval "ac_cv_header_$ac_safe=yes"
1841else
1842 echo "$ac_err" >&5
1843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 rm -rf conftest*
1846 eval "ac_cv_header_$ac_safe=no"
1847fi
1848rm -f conftest*
1849fi
1850if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1851 echo "$ac_t""yes" 1>&6
1852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1853 cat >> confdefs.h <<EOF
1854#define $ac_tr_hdr 1
1855EOF
1856
1857else
1858 echo "$ac_t""no" 1>&6
1859fi
1860done
1861
1862for ac_func in getpagesize
1863do
1864echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 1865echo "configure:1866: checking for $ac_func" >&5
c906108c
SS
1866if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868else
1869 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1870#line 1871 "configure"
c906108c
SS
1871#include "confdefs.h"
1872/* System header to define __stub macros and hopefully few prototypes,
1873 which can conflict with char $ac_func(); below. */
1874#include <assert.h>
1875/* Override any gcc2 internal prototype to avoid an error. */
1876/* We use char because int might match the return type of a gcc2
1877 builtin and then its argument prototype would still apply. */
1878char $ac_func();
1879
1880int main() {
1881
1882/* The GNU C library defines this for functions which it implements
1883 to always fail with ENOSYS. Some functions are actually named
1884 something starting with __ and the normal name is an alias. */
1885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886choke me
1887#else
1888$ac_func();
1889#endif
1890
1891; return 0; }
1892EOF
ddc9cd0f 1893if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=yes"
1896else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_func_$ac_func=no"
1901fi
1902rm -f conftest*
1903fi
1904
1905if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906 echo "$ac_t""yes" 1>&6
1907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908 cat >> confdefs.h <<EOF
1909#define $ac_tr_func 1
1910EOF
1911
1912else
1913 echo "$ac_t""no" 1>&6
1914fi
1915done
1916
1917echo $ac_n "checking for working mmap""... $ac_c" 1>&6
ddc9cd0f 1918echo "configure:1919: checking for working mmap" >&5
c906108c
SS
1919if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921else
1922 if test "$cross_compiling" = yes; then
1923 ac_cv_func_mmap_fixed_mapped=no
1924else
1925 cat > conftest.$ac_ext <<EOF
ddc9cd0f 1926#line 1927 "configure"
c906108c
SS
1927#include "confdefs.h"
1928
1929/* Thanks to Mike Haertel and Jim Avera for this test.
1930 Here is a matrix of mmap possibilities:
1931 mmap private not fixed
1932 mmap private fixed at somewhere currently unmapped
1933 mmap private fixed at somewhere already mapped
1934 mmap shared not fixed
1935 mmap shared fixed at somewhere currently unmapped
1936 mmap shared fixed at somewhere already mapped
1937 For private mappings, we should verify that changes cannot be read()
1938 back from the file, nor mmap's back from the file at a different
1939 address. (There have been systems where private was not correctly
1940 implemented like the infamous i386 svr4.0, and systems where the
1941 VM page cache was not coherent with the filesystem buffer cache
1942 like early versions of FreeBSD and possibly contemporary NetBSD.)
1943 For shared mappings, we should conversely verify that changes get
1944 propogated back to all the places they're supposed to be.
1945
1946 Grep wants private fixed already mapped.
1947 The main things grep needs to know about mmap are:
1948 * does it exist and is it safe to write into the mmap'd area
1949 * how to use it (BSD variants) */
1950#include <sys/types.h>
1951#include <fcntl.h>
1952#include <sys/mman.h>
1953
1954/* This mess was copied from the GNU getpagesize.h. */
1955#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1956# ifdef HAVE_UNISTD_H
1957# include <unistd.h>
1958# endif
c906108c
SS
1959
1960/* Assume that all systems that can run configure have sys/param.h. */
1961# ifndef HAVE_SYS_PARAM_H
1962# define HAVE_SYS_PARAM_H 1
1963# endif
1964
1965# ifdef _SC_PAGESIZE
1966# define getpagesize() sysconf(_SC_PAGESIZE)
1967# else /* no _SC_PAGESIZE */
1968# ifdef HAVE_SYS_PARAM_H
1969# include <sys/param.h>
1970# ifdef EXEC_PAGESIZE
1971# define getpagesize() EXEC_PAGESIZE
1972# else /* no EXEC_PAGESIZE */
1973# ifdef NBPG
1974# define getpagesize() NBPG * CLSIZE
1975# ifndef CLSIZE
1976# define CLSIZE 1
1977# endif /* no CLSIZE */
1978# else /* no NBPG */
1979# ifdef NBPC
1980# define getpagesize() NBPC
1981# else /* no NBPC */
1982# ifdef PAGESIZE
1983# define getpagesize() PAGESIZE
1984# endif /* PAGESIZE */
1985# endif /* no NBPC */
1986# endif /* no NBPG */
1987# endif /* no EXEC_PAGESIZE */
1988# else /* no HAVE_SYS_PARAM_H */
1989# define getpagesize() 8192 /* punt totally */
1990# endif /* no HAVE_SYS_PARAM_H */
1991# endif /* no _SC_PAGESIZE */
1992
1993#endif /* no HAVE_GETPAGESIZE */
1994
1995#ifdef __cplusplus
1996extern "C" { void *malloc(unsigned); }
1997#else
1998char *malloc();
1999#endif
2000
2001int
2002main()
2003{
2004 char *data, *data2, *data3;
2005 int i, pagesize;
2006 int fd;
2007
2008 pagesize = getpagesize();
2009
2010 /*
2011 * First, make a file with some known garbage in it.
2012 */
2013 data = malloc(pagesize);
2014 if (!data)
2015 exit(1);
2016 for (i = 0; i < pagesize; ++i)
2017 *(data + i) = rand();
2018 umask(0);
2019 fd = creat("conftestmmap", 0600);
2020 if (fd < 0)
2021 exit(1);
2022 if (write(fd, data, pagesize) != pagesize)
2023 exit(1);
2024 close(fd);
2025
2026 /*
2027 * Next, try to mmap the file at a fixed address which
2028 * already has something else allocated at it. If we can,
2029 * also make sure that we see the same garbage.
2030 */
2031 fd = open("conftestmmap", O_RDWR);
2032 if (fd < 0)
2033 exit(1);
2034 data2 = malloc(2 * pagesize);
2035 if (!data2)
2036 exit(1);
2037 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2038 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2039 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2040 exit(1);
2041 for (i = 0; i < pagesize; ++i)
2042 if (*(data + i) != *(data2 + i))
2043 exit(1);
2044
2045 /*
2046 * Finally, make sure that changes to the mapped area
2047 * do not percolate back to the file as seen by read().
2048 * (This is a bug on some variants of i386 svr4.0.)
2049 */
2050 for (i = 0; i < pagesize; ++i)
2051 *(data2 + i) = *(data2 + i) + 1;
2052 data3 = malloc(pagesize);
2053 if (!data3)
2054 exit(1);
2055 if (read(fd, data3, pagesize) != pagesize)
2056 exit(1);
2057 for (i = 0; i < pagesize; ++i)
2058 if (*(data + i) != *(data3 + i))
2059 exit(1);
2060 close(fd);
2061 unlink("conftestmmap");
2062 exit(0);
2063}
2064
2065EOF
ddc9cd0f 2066if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2067then
2068 ac_cv_func_mmap_fixed_mapped=yes
2069else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -fr conftest*
2073 ac_cv_func_mmap_fixed_mapped=no
2074fi
2075rm -fr conftest*
2076fi
2077
2078fi
2079
2080echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2081if test $ac_cv_func_mmap_fixed_mapped = yes; then
2082 cat >> confdefs.h <<\EOF
2083#define HAVE_MMAP 1
2084EOF
2085
2086fi
2087
2088
2089 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2090unistd.h values.h sys/param.h
2091do
2092ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2093echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 2094echo "configure:2095: checking for $ac_hdr" >&5
c906108c
SS
2095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2096 echo $ac_n "(cached) $ac_c" 1>&6
2097else
2098 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2099#line 2100 "configure"
c906108c
SS
2100#include "confdefs.h"
2101#include <$ac_hdr>
2102EOF
2103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2104{ (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2106if test -z "$ac_err"; then
2107 rm -rf conftest*
2108 eval "ac_cv_header_$ac_safe=yes"
2109else
2110 echo "$ac_err" >&5
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -rf conftest*
2114 eval "ac_cv_header_$ac_safe=no"
2115fi
2116rm -f conftest*
2117fi
2118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2119 echo "$ac_t""yes" 1>&6
2120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2121 cat >> confdefs.h <<EOF
2122#define $ac_tr_hdr 1
2123EOF
2124
2125else
2126 echo "$ac_t""no" 1>&6
2127fi
2128done
2129
2130 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2131__argz_count __argz_stringify __argz_next
2132do
2133echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2134echo "configure:2135: checking for $ac_func" >&5
c906108c
SS
2135if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137else
2138 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2139#line 2140 "configure"
c906108c
SS
2140#include "confdefs.h"
2141/* System header to define __stub macros and hopefully few prototypes,
2142 which can conflict with char $ac_func(); below. */
2143#include <assert.h>
2144/* Override any gcc2 internal prototype to avoid an error. */
2145/* We use char because int might match the return type of a gcc2
2146 builtin and then its argument prototype would still apply. */
2147char $ac_func();
2148
2149int main() {
2150
2151/* The GNU C library defines this for functions which it implements
2152 to always fail with ENOSYS. Some functions are actually named
2153 something starting with __ and the normal name is an alias. */
2154#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2155choke me
2156#else
2157$ac_func();
2158#endif
2159
2160; return 0; }
2161EOF
ddc9cd0f 2162if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2163 rm -rf conftest*
2164 eval "ac_cv_func_$ac_func=yes"
2165else
2166 echo "configure: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 rm -rf conftest*
2169 eval "ac_cv_func_$ac_func=no"
2170fi
2171rm -f conftest*
2172fi
2173
2174if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2175 echo "$ac_t""yes" 1>&6
2176 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2177 cat >> confdefs.h <<EOF
2178#define $ac_tr_func 1
2179EOF
2180
2181else
2182 echo "$ac_t""no" 1>&6
2183fi
2184done
2185
2186
2187 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2188 for ac_func in stpcpy
2189do
2190echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2191echo "configure:2192: checking for $ac_func" >&5
c906108c
SS
2192if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194else
2195 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2196#line 2197 "configure"
c906108c
SS
2197#include "confdefs.h"
2198/* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $ac_func(); below. */
2200#include <assert.h>
2201/* Override any gcc2 internal prototype to avoid an error. */
2202/* We use char because int might match the return type of a gcc2
2203 builtin and then its argument prototype would still apply. */
2204char $ac_func();
2205
2206int main() {
2207
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2212choke me
2213#else
2214$ac_func();
2215#endif
2216
2217; return 0; }
2218EOF
ddc9cd0f 2219if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2220 rm -rf conftest*
2221 eval "ac_cv_func_$ac_func=yes"
2222else
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2225 rm -rf conftest*
2226 eval "ac_cv_func_$ac_func=no"
2227fi
2228rm -f conftest*
2229fi
2230
2231if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2232 echo "$ac_t""yes" 1>&6
2233 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2234 cat >> confdefs.h <<EOF
2235#define $ac_tr_func 1
2236EOF
2237
2238else
2239 echo "$ac_t""no" 1>&6
2240fi
2241done
2242
2243 fi
2244 if test "${ac_cv_func_stpcpy}" = "yes"; then
2245 cat >> confdefs.h <<\EOF
2246#define HAVE_STPCPY 1
2247EOF
2248
2249 fi
2250
2251 if test $ac_cv_header_locale_h = yes; then
2252 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
ddc9cd0f 2253echo "configure:2254: checking for LC_MESSAGES" >&5
c906108c
SS
2254if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256else
2257 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2258#line 2259 "configure"
c906108c
SS
2259#include "confdefs.h"
2260#include <locale.h>
2261int main() {
2262return LC_MESSAGES
2263; return 0; }
2264EOF
ddc9cd0f 2265if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2266 rm -rf conftest*
2267 am_cv_val_LC_MESSAGES=yes
2268else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 am_cv_val_LC_MESSAGES=no
2273fi
2274rm -f conftest*
2275fi
2276
2277echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2278 if test $am_cv_val_LC_MESSAGES = yes; then
2279 cat >> confdefs.h <<\EOF
2280#define HAVE_LC_MESSAGES 1
2281EOF
2282
2283 fi
2284 fi
2285 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
ddc9cd0f 2286echo "configure:2287: checking whether NLS is requested" >&5
c906108c
SS
2287 # Check whether --enable-nls or --disable-nls was given.
2288if test "${enable_nls+set}" = set; then
2289 enableval="$enable_nls"
2290 USE_NLS=$enableval
2291else
2292 USE_NLS=yes
2293fi
2294
2295 echo "$ac_t""$USE_NLS" 1>&6
2296
2297
2298 USE_INCLUDED_LIBINTL=no
2299
2300 if test "$USE_NLS" = "yes"; then
2301 cat >> confdefs.h <<\EOF
2302#define ENABLE_NLS 1
2303EOF
2304
2305 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
ddc9cd0f 2306echo "configure:2307: checking whether included gettext is requested" >&5
c906108c
SS
2307 # Check whether --with-included-gettext or --without-included-gettext was given.
2308if test "${with_included_gettext+set}" = set; then
2309 withval="$with_included_gettext"
2310 nls_cv_force_use_gnu_gettext=$withval
2311else
2312 nls_cv_force_use_gnu_gettext=no
2313fi
2314
2315 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2316
2317 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2318 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2319 nls_cv_header_intl=
2320 nls_cv_header_libgt=
2321 CATOBJEXT=NONE
2322
2323 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2324echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
ddc9cd0f 2325echo "configure:2326: checking for libintl.h" >&5
c906108c
SS
2326if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328else
2329 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2330#line 2331 "configure"
c906108c
SS
2331#include "confdefs.h"
2332#include <libintl.h>
2333EOF
2334ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2335{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2336ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2337if test -z "$ac_err"; then
2338 rm -rf conftest*
2339 eval "ac_cv_header_$ac_safe=yes"
2340else
2341 echo "$ac_err" >&5
2342 echo "configure: failed program was:" >&5
2343 cat conftest.$ac_ext >&5
2344 rm -rf conftest*
2345 eval "ac_cv_header_$ac_safe=no"
2346fi
2347rm -f conftest*
2348fi
2349if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350 echo "$ac_t""yes" 1>&6
2351 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
ddc9cd0f 2352echo "configure:2353: checking for gettext in libc" >&5
c906108c
SS
2353if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355else
2356 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2357#line 2358 "configure"
c906108c
SS
2358#include "confdefs.h"
2359#include <libintl.h>
2360int main() {
2361return (int) gettext ("")
2362; return 0; }
2363EOF
ddc9cd0f 2364if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2365 rm -rf conftest*
2366 gt_cv_func_gettext_libc=yes
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -rf conftest*
2371 gt_cv_func_gettext_libc=no
2372fi
2373rm -f conftest*
2374fi
2375
2376echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2377
2378 if test "$gt_cv_func_gettext_libc" != "yes"; then
2379 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
ddc9cd0f 2380echo "configure:2381: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2381ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2382if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384else
2385 ac_save_LIBS="$LIBS"
2386LIBS="-lintl $LIBS"
2387cat > conftest.$ac_ext <<EOF
ddc9cd0f 2388#line 2389 "configure"
c906108c
SS
2389#include "confdefs.h"
2390/* Override any gcc2 internal prototype to avoid an error. */
2391/* We use char because int might match the return type of a gcc2
2392 builtin and then its argument prototype would still apply. */
2393char bindtextdomain();
2394
2395int main() {
2396bindtextdomain()
2397; return 0; }
2398EOF
ddc9cd0f 2399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2400 rm -rf conftest*
2401 eval "ac_cv_lib_$ac_lib_var=yes"
2402else
2403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -rf conftest*
2406 eval "ac_cv_lib_$ac_lib_var=no"
2407fi
2408rm -f conftest*
2409LIBS="$ac_save_LIBS"
2410
2411fi
2412if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2413 echo "$ac_t""yes" 1>&6
2414 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
ddc9cd0f 2415echo "configure:2416: checking for gettext in libintl" >&5
c906108c
SS
2416if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418else
2419 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2420#line 2421 "configure"
c906108c
SS
2421#include "confdefs.h"
2422
2423int main() {
2424return (int) gettext ("")
2425; return 0; }
2426EOF
ddc9cd0f 2427if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2428 rm -rf conftest*
2429 gt_cv_func_gettext_libintl=yes
2430else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 gt_cv_func_gettext_libintl=no
2435fi
2436rm -f conftest*
2437fi
2438
2439echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2440else
2441 echo "$ac_t""no" 1>&6
2442fi
2443
2444 fi
2445
2446 if test "$gt_cv_func_gettext_libc" = "yes" \
2447 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2448 cat >> confdefs.h <<\EOF
2449#define HAVE_GETTEXT 1
2450EOF
2451
2452 # Extract the first word of "msgfmt", so it can be a program name with args.
2453set dummy msgfmt; ac_word=$2
2454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2455echo "configure:2456: checking for $ac_word" >&5
c906108c
SS
2456if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2458else
2459 case "$MSGFMT" in
2460 /*)
2461 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2462 ;;
2463 *)
2464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2465 for ac_dir in $PATH; do
2466 test -z "$ac_dir" && ac_dir=.
2467 if test -f $ac_dir/$ac_word; then
2468 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2469 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2470 break
2471 fi
2472 fi
2473 done
2474 IFS="$ac_save_ifs"
2475 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2476 ;;
2477esac
2478fi
2479MSGFMT="$ac_cv_path_MSGFMT"
2480if test -n "$MSGFMT"; then
2481 echo "$ac_t""$MSGFMT" 1>&6
2482else
2483 echo "$ac_t""no" 1>&6
2484fi
2485 if test "$MSGFMT" != "no"; then
2486 for ac_func in dcgettext
2487do
2488echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 2489echo "configure:2490: checking for $ac_func" >&5
c906108c
SS
2490if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492else
2493 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2494#line 2495 "configure"
c906108c
SS
2495#include "confdefs.h"
2496/* System header to define __stub macros and hopefully few prototypes,
2497 which can conflict with char $ac_func(); below. */
2498#include <assert.h>
2499/* Override any gcc2 internal prototype to avoid an error. */
2500/* We use char because int might match the return type of a gcc2
2501 builtin and then its argument prototype would still apply. */
2502char $ac_func();
2503
2504int main() {
2505
2506/* The GNU C library defines this for functions which it implements
2507 to always fail with ENOSYS. Some functions are actually named
2508 something starting with __ and the normal name is an alias. */
2509#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2510choke me
2511#else
2512$ac_func();
2513#endif
2514
2515; return 0; }
2516EOF
ddc9cd0f 2517if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2518 rm -rf conftest*
2519 eval "ac_cv_func_$ac_func=yes"
2520else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -rf conftest*
2524 eval "ac_cv_func_$ac_func=no"
2525fi
2526rm -f conftest*
2527fi
2528
2529if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2530 echo "$ac_t""yes" 1>&6
2531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2532 cat >> confdefs.h <<EOF
2533#define $ac_tr_func 1
2534EOF
2535
2536else
2537 echo "$ac_t""no" 1>&6
2538fi
2539done
2540
2541 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2542set dummy gmsgfmt; ac_word=$2
2543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2544echo "configure:2545: checking for $ac_word" >&5
c906108c
SS
2545if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547else
2548 case "$GMSGFMT" in
2549 /*)
2550 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2551 ;;
2552 ?:/*)
2553 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2554 ;;
2555 *)
2556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2557 ac_dummy="$PATH"
2558 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 if test -f $ac_dir/$ac_word; then
2561 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2562 break
2563 fi
2564 done
2565 IFS="$ac_save_ifs"
2566 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2567 ;;
2568esac
2569fi
2570GMSGFMT="$ac_cv_path_GMSGFMT"
2571if test -n "$GMSGFMT"; then
2572 echo "$ac_t""$GMSGFMT" 1>&6
2573else
2574 echo "$ac_t""no" 1>&6
2575fi
2576
2577 # Extract the first word of "xgettext", so it can be a program name with args.
2578set dummy xgettext; ac_word=$2
2579echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2580echo "configure:2581: checking for $ac_word" >&5
c906108c
SS
2581if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2583else
2584 case "$XGETTEXT" in
2585 /*)
2586 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2587 ;;
2588 *)
2589 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2590 for ac_dir in $PATH; do
2591 test -z "$ac_dir" && ac_dir=.
2592 if test -f $ac_dir/$ac_word; then
2593 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2594 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2595 break
2596 fi
2597 fi
2598 done
2599 IFS="$ac_save_ifs"
2600 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2601 ;;
2602esac
2603fi
2604XGETTEXT="$ac_cv_path_XGETTEXT"
2605if test -n "$XGETTEXT"; then
2606 echo "$ac_t""$XGETTEXT" 1>&6
2607else
2608 echo "$ac_t""no" 1>&6
2609fi
2610
2611 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2612#line 2613 "configure"
c906108c
SS
2613#include "confdefs.h"
2614
2615int main() {
2616extern int _nl_msg_cat_cntr;
2617 return _nl_msg_cat_cntr
2618; return 0; }
2619EOF
ddc9cd0f 2620if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2621 rm -rf conftest*
2622 CATOBJEXT=.gmo
2623 DATADIRNAME=share
2624else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 CATOBJEXT=.mo
2629 DATADIRNAME=lib
2630fi
2631rm -f conftest*
2632 INSTOBJEXT=.mo
2633 fi
2634 fi
2635
2636else
2637 echo "$ac_t""no" 1>&6
2638fi
2639
2640
2641
2642 if test "$CATOBJEXT" = "NONE"; then
2643 nls_cv_use_gnu_gettext=yes
2644 fi
2645 fi
2646
2647 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2648 INTLOBJS="\$(GETTOBJS)"
2649 # Extract the first word of "msgfmt", so it can be a program name with args.
2650set dummy msgfmt; ac_word=$2
2651echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2652echo "configure:2653: checking for $ac_word" >&5
c906108c
SS
2653if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655else
2656 case "$MSGFMT" in
2657 /*)
2658 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2659 ;;
2660 *)
2661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2662 for ac_dir in $PATH; do
2663 test -z "$ac_dir" && ac_dir=.
2664 if test -f $ac_dir/$ac_word; then
2665 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2666 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2667 break
2668 fi
2669 fi
2670 done
2671 IFS="$ac_save_ifs"
2672 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2673 ;;
2674esac
2675fi
2676MSGFMT="$ac_cv_path_MSGFMT"
2677if test -n "$MSGFMT"; then
2678 echo "$ac_t""$MSGFMT" 1>&6
2679else
2680 echo "$ac_t""no" 1>&6
2681fi
2682
2683 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2684set dummy gmsgfmt; ac_word=$2
2685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2686echo "configure:2687: checking for $ac_word" >&5
c906108c
SS
2687if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2688 echo $ac_n "(cached) $ac_c" 1>&6
2689else
2690 case "$GMSGFMT" in
2691 /*)
2692 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2693 ;;
2694 ?:/*)
2695 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2696 ;;
2697 *)
2698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2699 ac_dummy="$PATH"
2700 for ac_dir in $ac_dummy; do
2701 test -z "$ac_dir" && ac_dir=.
2702 if test -f $ac_dir/$ac_word; then
2703 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2704 break
2705 fi
2706 done
2707 IFS="$ac_save_ifs"
2708 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2709 ;;
2710esac
2711fi
2712GMSGFMT="$ac_cv_path_GMSGFMT"
2713if test -n "$GMSGFMT"; then
2714 echo "$ac_t""$GMSGFMT" 1>&6
2715else
2716 echo "$ac_t""no" 1>&6
2717fi
2718
2719 # Extract the first word of "xgettext", so it can be a program name with args.
2720set dummy xgettext; ac_word=$2
2721echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 2722echo "configure:2723: checking for $ac_word" >&5
c906108c
SS
2723if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
2725else
2726 case "$XGETTEXT" in
2727 /*)
2728 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2729 ;;
2730 *)
2731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2732 for ac_dir in $PATH; do
2733 test -z "$ac_dir" && ac_dir=.
2734 if test -f $ac_dir/$ac_word; then
2735 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2736 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2737 break
2738 fi
2739 fi
2740 done
2741 IFS="$ac_save_ifs"
2742 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2743 ;;
2744esac
2745fi
2746XGETTEXT="$ac_cv_path_XGETTEXT"
2747if test -n "$XGETTEXT"; then
2748 echo "$ac_t""$XGETTEXT" 1>&6
2749else
2750 echo "$ac_t""no" 1>&6
2751fi
2752
2753
2754 USE_INCLUDED_LIBINTL=yes
2755 CATOBJEXT=.gmo
2756 INSTOBJEXT=.mo
2757 DATADIRNAME=share
2758 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2759 INTLLIBS=$INTLDEPS
2760 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2761 nls_cv_header_intl=libintl.h
2762 nls_cv_header_libgt=libgettext.h
2763 fi
2764
2765 if test "$XGETTEXT" != ":"; then
2766 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2767 : ;
2768 else
2769 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2770 XGETTEXT=":"
2771 fi
2772 fi
2773
2774 # We need to process the po/ directory.
2775 POSUB=po
2776 else
2777 DATADIRNAME=share
2778 nls_cv_header_intl=libintl.h
2779 nls_cv_header_libgt=libgettext.h
2780 fi
2781
2782 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2783 # because some of the sources are only built for this goal.
2784 if test "$PACKAGE" = gettext; then
2785 USE_NLS=yes
2786 USE_INCLUDED_LIBINTL=yes
2787 fi
2788
2789 for lang in $ALL_LINGUAS; do
2790 GMOFILES="$GMOFILES $lang.gmo"
2791 POFILES="$POFILES $lang.po"
2792 done
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807 if test "x$CATOBJEXT" != "x"; then
2808 if test "x$ALL_LINGUAS" = "x"; then
2809 LINGUAS=
2810 else
2811 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
ddc9cd0f 2812echo "configure:2813: checking for catalogs to be installed" >&5
c906108c
SS
2813 NEW_LINGUAS=
2814 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2815 case "$ALL_LINGUAS" in
2816 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2817 esac
2818 done
2819 LINGUAS=$NEW_LINGUAS
2820 echo "$ac_t""$LINGUAS" 1>&6
2821 fi
2822
2823 if test -n "$LINGUAS"; then
2824 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2825 fi
2826 fi
2827
2828 if test $ac_cv_header_locale_h = yes; then
2829 INCLUDE_LOCALE_H="#include <locale.h>"
2830 else
2831 INCLUDE_LOCALE_H="\
2832/* The system does not provide the header <locale.h>. Take care yourself. */"
2833 fi
2834
2835
2836 if test -f $srcdir/po2tbl.sed.in; then
2837 if test "$CATOBJEXT" = ".cat"; then
2838 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2839echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
ddc9cd0f 2840echo "configure:2841: checking for linux/version.h" >&5
c906108c
SS
2841if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843else
2844 cat > conftest.$ac_ext <<EOF
ddc9cd0f 2845#line 2846 "configure"
c906108c
SS
2846#include "confdefs.h"
2847#include <linux/version.h>
2848EOF
2849ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 2850{ (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2851ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2852if test -z "$ac_err"; then
2853 rm -rf conftest*
2854 eval "ac_cv_header_$ac_safe=yes"
2855else
2856 echo "$ac_err" >&5
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 eval "ac_cv_header_$ac_safe=no"
2861fi
2862rm -f conftest*
2863fi
2864if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2865 echo "$ac_t""yes" 1>&6
2866 msgformat=linux
2867else
2868 echo "$ac_t""no" 1>&6
2869msgformat=xopen
2870fi
2871
2872
2873 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2874 fi
2875 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2876 $srcdir/po2tbl.sed.in > po2tbl.sed
2877 fi
2878
2879 if test "$PACKAGE" = "gettext"; then
2880 GT_NO="#NO#"
2881 GT_YES=
2882 else
2883 GT_NO=
2884 GT_YES="#YES#"
2885 fi
2886
2887
2888
2889 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2890
2891
2892 l=
2893
2894
4536bbc6 2895 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2896 test -d po || mkdir po
2897 if test "x$srcdir" != "x."; then
2898 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2899 posrcprefix="$srcdir/"
2900 else
2901 posrcprefix="../$srcdir/"
2902 fi
2903 else
2904 posrcprefix="../"
2905 fi
2906 rm -f po/POTFILES
2907 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2908 < $srcdir/po/POTFILES.in > po/POTFILES
2909 fi
2910
ddc9cd0f
AC
2911
2912localedir='${datadir}/locale'
2913
2914
2915if test "x$POSUB" != x; then
2916
2917 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2918echo "configure:2919: checking for catalogs to be installed" >&5
2919 # Look for .po and .gmo files in the source directory.
2920 CATALOGS=
2921 XLINGUAS=
2922 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
2923 # If there aren't any .gmo files the shell will give us the
2924 # literal string "../path/to/srcdir/po/*.gmo" which has to be
2925 # weeded out.
2926 case "$cat" in *\**)
2927 continue;;
2928 esac
2929 # The quadruple backslash is collapsed to a double backslash
2930 # by the backticks, then collapsed again by the double quotes,
2931 # leaving us with one backslash in the sed expression (right
2932 # before the dot that mustn't act as a wildcard).
2933 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
2934 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
2935 # The user is allowed to set LINGUAS to a list of languages to
2936 # install catalogs for. If it's empty that means "all of them."
2937 if test "x$LINGUAS" = x; then
2938 CATALOGS="$CATALOGS $cat"
2939 XLINGUAS="$XLINGUAS $lang"
2940 else
2941 case "$LINGUAS" in *$lang*)
2942 CATALOGS="$CATALOGS $cat"
2943 XLINGUAS="$XLINGUAS $lang"
2944 ;;
2945 esac
2946 fi
2947 done
2948 LINGUAS="$XLINGUAS"
2949 echo "$ac_t""$LINGUAS" 1>&6
2950
2951 CONFIG_ALL="$CONFIG_ALL all-po"
2952 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
2953 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
2954 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
2955fi
2956
2957PACKAGE=gdb
2958cat >> confdefs.h <<EOF
2959#define PACKAGE "$PACKAGE"
0fbb3da7
TT
2960EOF
2961
2962
ddc9cd0f 2963
5b5d99cf
JB
2964debugdir=${libdir}/debug
2965
2966# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2967if test "${with_separate_debug_dir+set}" = set; then
2968 withval="$with_separate_debug_dir"
2969 debugdir="${withval}"
2970fi
2971
2972
2973
2974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2976 ac_define_dir=`eval echo $debugdir`
2977 ac_define_dir=`eval echo $ac_define_dir`
2978 cat >> confdefs.h <<EOF
2979#define DEBUGDIR "$ac_define_dir"
2980EOF
2981
2982
2983#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c 2984
8dcde887 2985subdirs="doc testsuite"
96baa820 2986
8dcde887 2987configdirs=
96baa820 2988
27e9bf90 2989. $srcdir/configure.host
c906108c 2990
27e9bf90 2991. $srcdir/configure.tgt
c906108c 2992
27e9bf90
MK
2993# Fetch the default architecture and default target vector from BFD.
2994targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2995
27e9bf90
MK
2996# We only want the first architecture, so strip off the others if
2997# there is more than one.
2998targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2999
27e9bf90
MK
3000if test "x$targ_archs" != x; then
3001 cat >> confdefs.h <<EOF
3002#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
3003EOF
3004
3005fi
27e9bf90
MK
3006if test "x$targ_defvec" != x; then
3007 cat >> confdefs.h <<EOF
3008#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
3009EOF
3010
3011fi
c906108c 3012
8bb2c122
MK
3013if test "$program_transform_name" = s,x,x,; then
3014 program_transform_name=
3015else
3016 # Double any \ or $. echo might interpret backslashes.
3017 cat <<\EOF_SED > conftestsed
3018s,\\,\\\\,g; s,\$,$$,g
3019EOF_SED
3020 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3021 rm -f conftestsed
3022fi
3023test "$program_prefix" != NONE &&
3024 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3025# Use a double $ so make ignores it.
3026test "$program_suffix" != NONE &&
3027 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3028
3029# sed with no file args requires a program.
3030test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3031
3032
627af7ea
MK
3033# The CLI cannot be disabled yet, but may be in the future.
3034
3035# Enable CLI.
3036# Check whether --enable-gdbcli or --disable-gdbcli was given.
3037if test "${enable_gdbcli+set}" = set; then
3038 enableval="$enable_gdbcli"
3039 case $enableval in
3040 yes)
3041 ;;
3042 no)
3043 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
3044 *)
3045 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3046 esac
3047else
3048 enable_gdbcli=yes
3049fi
3050
3051if test x"$enable_gdbcli" = xyes; then
3052 if test -d $srcdir/cli; then
3053 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3054 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3055 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3056 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3057 fi
3058fi
3059
3060# Enable MI.
3061# Check whether --enable-gdbmi or --disable-gdbmi was given.
3062if test "${enable_gdbmi+set}" = set; then
3063 enableval="$enable_gdbmi"
3064 case $enableval in
3065 yes | no)
3066 ;;
3067 *)
3068 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3069 esac
3070else
3071 enable_gdbmi=yes
3072fi
3073
3074if test x"$enable_gdbmi" = xyes; then
3075 if test -d $srcdir/mi; then
3076 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3077 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3078 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3079 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3080 fi
3081fi
3082
06825bd1
MK
3083# Enable TUI.
3084# Check whether --enable-tui or --disable-tui was given.
3085if test "${enable_tui+set}" = set; then
3086 enableval="$enable_tui"
3087 case $enableval in
3088 yes | no)
3089 ;;
3090 *)
3091 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3092 esac
c324d747
AC
3093else
3094 enable_tui=yes
06825bd1
MK
3095fi
3096
3097if test x"$enable_tui" = xyes; then
3098 if test -d $srcdir/tui; then
7613d933 3099 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
c324d747
AC
3100 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3101 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3102 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3103 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3104 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3105 CONFIG_ALL="${CONFIG_ALL} all-tui"
3106 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3107 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3108 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3109 fi
06825bd1
MK
3110 fi
3111fi
3112
8ee53726
MK
3113# Enable gdbtk.
3114# Check whether --enable-gdbtk or --disable-gdbtk was given.
3115if test "${enable_gdbtk+set}" = set; then
3116 enableval="$enable_gdbtk"
3117 case $enableval in
3118 yes | no)
3119 ;;
3120 *)
3121 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3122 esac
3123else
3124 if test -d $srcdir/gdbtk; then
3125 enable_gdbtk=yes
3126 else
3127 enable_gdbtk=no
3128 fi
3129fi
3130
3131# We unconditionally disable gdbtk tests on selected platforms.
3132case $host_os in
3133 go32* | windows*)
3134 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3135 enable_gdbtk=no ;;
3136esac
3137
0e5d83e3
JJ
3138# Libunwind support.
3139# Check whether --with-libunwind or --without-libunwind was given.
3140if test "${with_libunwind+set}" = set; then
3141 withval="$with_libunwind"
3142 case "${withval}" in
3143 yes) enable_libunwind=yes ;;
3144 no) enable_libunwind=no ;;
3145 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3146esac
3147else
3148
3149 for ac_hdr in libunwind.h
3150do
3151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3153echo "configure:3154: checking for $ac_hdr" >&5
0e5d83e3
JJ
3154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156else
3157 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3158#line 3159 "configure"
0e5d83e3
JJ
3159#include "confdefs.h"
3160#include <$ac_hdr>
3161EOF
3162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3163{ (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165if test -z "$ac_err"; then
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=yes"
3168else
3169 echo "$ac_err" >&5
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -rf conftest*
3173 eval "ac_cv_header_$ac_safe=no"
3174fi
3175rm -f conftest*
3176fi
3177if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3180 cat >> confdefs.h <<EOF
3181#define $ac_tr_hdr 1
3182EOF
3183
3184else
3185 echo "$ac_t""no" 1>&6
3186fi
3187done
3188
3189 for ac_hdr in libunwind-ia64.h
3190do
3191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3193echo "configure:3194: checking for $ac_hdr" >&5
0e5d83e3
JJ
3194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3196else
3197 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3198#line 3199 "configure"
0e5d83e3
JJ
3199#include "confdefs.h"
3200#include <$ac_hdr>
3201EOF
3202ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3203{ (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205if test -z "$ac_err"; then
3206 rm -rf conftest*
3207 eval "ac_cv_header_$ac_safe=yes"
3208else
3209 echo "$ac_err" >&5
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 rm -rf conftest*
3213 eval "ac_cv_header_$ac_safe=no"
3214fi
3215rm -f conftest*
3216fi
3217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218 echo "$ac_t""yes" 1>&6
3219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3220 cat >> confdefs.h <<EOF
3221#define $ac_tr_hdr 1
3222EOF
3223
3224else
3225 echo "$ac_t""no" 1>&6
3226fi
3227done
3228
3229 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3230 enable_libunwind=yes;
3231 fi
3232
3233fi
3234
3235
3236if test x"$enable_libunwind" = xyes; then
3237 for ac_hdr in libunwind.h
3238do
3239ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3240echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3241echo "configure:3242: checking for $ac_hdr" >&5
0e5d83e3
JJ
3242if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244else
3245 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3246#line 3247 "configure"
0e5d83e3
JJ
3247#include "confdefs.h"
3248#include <$ac_hdr>
3249EOF
3250ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3251{ (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3252ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253if test -z "$ac_err"; then
3254 rm -rf conftest*
3255 eval "ac_cv_header_$ac_safe=yes"
3256else
3257 echo "$ac_err" >&5
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 rm -rf conftest*
3261 eval "ac_cv_header_$ac_safe=no"
3262fi
3263rm -f conftest*
3264fi
3265if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3268 cat >> confdefs.h <<EOF
3269#define $ac_tr_hdr 1
3270EOF
3271
3272else
3273 echo "$ac_t""no" 1>&6
3274fi
3275done
3276
3277 for ac_hdr in libunwind-ia64.h
3278do
3279ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3280echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 3281echo "configure:3282: checking for $ac_hdr" >&5
0e5d83e3
JJ
3282if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284else
3285 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3286#line 3287 "configure"
0e5d83e3
JJ
3287#include "confdefs.h"
3288#include <$ac_hdr>
3289EOF
3290ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 3291{ (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3292ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3293if test -z "$ac_err"; then
3294 rm -rf conftest*
3295 eval "ac_cv_header_$ac_safe=yes"
3296else
3297 echo "$ac_err" >&5
3298 echo "configure: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 rm -rf conftest*
3301 eval "ac_cv_header_$ac_safe=no"
3302fi
3303rm -f conftest*
3304fi
3305if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3306 echo "$ac_t""yes" 1>&6
3307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3308 cat >> confdefs.h <<EOF
3309#define $ac_tr_hdr 1
3310EOF
3311
3312else
3313 echo "$ac_t""no" 1>&6
3314fi
3315done
3316
3317 cat >> confdefs.h <<\EOF
3318#define HAVE_LIBUNWIND 1
3319EOF
3320
3321 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3322 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3323 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3324fi
3325
d28f9cdf
DJ
3326# Profiling support.
3327# Check whether --enable-profiling or --disable-profiling was given.
3328if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 case $enableval in
3331 yes | no)
3332 ;;
3333 *)
3334 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3335 esac
3336else
3337 enable_profiling=no
3338fi
3339
3340
d9feb4e7
DJ
3341for ac_func in monstartup _mcleanup
3342do
3343echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ddc9cd0f 3344echo "configure:3345: checking for $ac_func" >&5
d9feb4e7 3345if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3346 echo $ac_n "(cached) $ac_c" 1>&6
3347else
3348 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3349#line 3350 "configure"
d28f9cdf
DJ
3350#include "confdefs.h"
3351/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3352 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3353#include <assert.h>
3354/* Override any gcc2 internal prototype to avoid an error. */
3355/* We use char because int might match the return type of a gcc2
3356 builtin and then its argument prototype would still apply. */
d9feb4e7 3357char $ac_func();
d28f9cdf
DJ
3358
3359int main() {
3360
3361/* The GNU C library defines this for functions which it implements
3362 to always fail with ENOSYS. Some functions are actually named
3363 something starting with __ and the normal name is an alias. */
d9feb4e7 3364#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3365choke me
3366#else
d9feb4e7 3367$ac_func();
d28f9cdf
DJ
3368#endif
3369
3370; return 0; }
3371EOF
ddc9cd0f 3372if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3373 rm -rf conftest*
d9feb4e7 3374 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3375else
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -rf conftest*
d9feb4e7 3379 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3380fi
3381rm -f conftest*
3382fi
3383
d9feb4e7 3384if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3385 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3386 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3387 cat >> confdefs.h <<EOF
3388#define $ac_tr_func 1
3389EOF
3390
d28f9cdf
DJ
3391else
3392 echo "$ac_t""no" 1>&6
d28f9cdf 3393fi
d9feb4e7 3394done
d28f9cdf 3395
b0b1c2c0 3396echo $ac_n "checking for _etext""... $ac_c" 1>&6
ddc9cd0f 3397echo "configure:3398: checking for _etext" >&5
b0b1c2c0
MK
3398if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3399 echo $ac_n "(cached) $ac_c" 1>&6
3400else
3401 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3402#line 3403 "configure"
b0b1c2c0
MK
3403#include "confdefs.h"
3404#include <stdlib.h>
3405extern char _etext;
3406
3407int main() {
3408free (&_etext);
3409; return 0; }
3410EOF
ddc9cd0f 3411if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3412 rm -rf conftest*
3413 ac_cv_var__etext=yes
3414else
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -rf conftest*
3418 ac_cv_var__etext=no
3419fi
3420rm -f conftest*
3421fi
3422
3423echo "$ac_t""$ac_cv_var__etext" 1>&6
3424if test $ac_cv_var__etext = yes; then
3425 cat >> confdefs.h <<\EOF
3426#define HAVE__ETEXT 1
3427EOF
3428
3429fi
d9feb4e7
DJ
3430if test "$enable_profiling" = yes ; then
3431 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3432 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3433 fi
3434 PROFILE_CFLAGS=-pg
3435 OLD_CFLAGS="$CFLAGS"
3436 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3437
d9feb4e7 3438 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
ddc9cd0f 3439echo "configure:3440: checking whether $CC supports -pg" >&5
d9feb4e7 3440if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3444#line 3445 "configure"
d28f9cdf 3445#include "confdefs.h"
d28f9cdf
DJ
3446
3447int main() {
d9feb4e7 3448int x;
d28f9cdf
DJ
3449; return 0; }
3450EOF
ddc9cd0f 3451if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3452 rm -rf conftest*
d9feb4e7 3453 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3454else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
d9feb4e7 3458 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3459fi
3460rm -f conftest*
3461fi
3462
d9feb4e7 3463echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3464
d9feb4e7
DJ
3465 if test $ac_cv_cc_supports_pg = no; then
3466 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3467 fi
d28f9cdf
DJ
3468
3469 CFLAGS="$OLD_CFLAGS"
3470fi
3471
8bb2c122
MK
3472# --------------------- #
3473# Checks for programs. #
3474# --------------------- #
3475
d836ee13 3476for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3477do
3478# Extract the first word of "$ac_prog", so it can be a program name with args.
3479set dummy $ac_prog; ac_word=$2
3480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3481echo "configure:3482: checking for $ac_word" >&5
7a292a7a
SS
3482if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3483 echo $ac_n "(cached) $ac_c" 1>&6
3484else
3485 if test -n "$AWK"; then
3486 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3487else
3488 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3489 ac_dummy="$PATH"
3490 for ac_dir in $ac_dummy; do
3491 test -z "$ac_dir" && ac_dir=.
3492 if test -f $ac_dir/$ac_word; then
3493 ac_cv_prog_AWK="$ac_prog"
3494 break
3495 fi
3496 done
3497 IFS="$ac_save_ifs"
3498fi
3499fi
3500AWK="$ac_cv_prog_AWK"
3501if test -n "$AWK"; then
3502 echo "$ac_t""$AWK" 1>&6
3503else
3504 echo "$ac_t""no" 1>&6
3505fi
3506
3507test -n "$AWK" && break
3508done
3509
c906108c
SS
3510# Find a good install program. We prefer a C program (faster),
3511# so one script is as good as another. But avoid the broken or
3512# incompatible versions:
3513# SysV /etc/install, /usr/sbin/install
3514# SunOS /usr/etc/install
3515# IRIX /sbin/install
3516# AIX /bin/install
3517# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3518# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3519# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3520# ./install, which can be erroneously created by make from ./install.sh.
3521echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
ddc9cd0f 3522echo "configure:3523: checking for a BSD compatible install" >&5
c906108c
SS
3523if test -z "$INSTALL"; then
3524if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526else
3527 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3528 for ac_dir in $PATH; do
3529 # Account for people who put trailing slashes in PATH elements.
3530 case "$ac_dir/" in
3531 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3532 *)
3533 # OSF1 and SCO ODT 3.0 have their own names for install.
3534 # Don't use installbsd from OSF since it installs stuff as root
3535 # by default.
3536 for ac_prog in ginstall scoinst install; do
3537 if test -f $ac_dir/$ac_prog; then
3538 if test $ac_prog = install &&
3539 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3540 # AIX install. It has an incompatible calling convention.
3541 :
3542 else
3543 ac_cv_path_install="$ac_dir/$ac_prog -c"
3544 break 2
3545 fi
3546 fi
3547 done
3548 ;;
3549 esac
3550 done
3551 IFS="$ac_save_IFS"
3552
3553fi
3554 if test "${ac_cv_path_install+set}" = set; then
3555 INSTALL="$ac_cv_path_install"
3556 else
3557 # As a last resort, use the slow shell script. We don't cache a
3558 # path for INSTALL within a source directory, because that will
3559 # break other packages using the cache if that directory is
3560 # removed, or if the path is relative.
3561 INSTALL="$ac_install_sh"
3562 fi
3563fi
3564echo "$ac_t""$INSTALL" 1>&6
3565
3566# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3567# It thinks the first close brace ends the variable substitution.
3568test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3569
3570test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3571
3572test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3573
8bb2c122 3574echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
ddc9cd0f 3575echo "configure:3576: checking whether ln -s works" >&5
8bb2c122
MK
3576if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3577 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3578else
8bb2c122
MK
3579 rm -f conftestdata
3580if ln -s X conftestdata 2>/dev/null
3581then
3582 rm -f conftestdata
3583 ac_cv_prog_LN_S="ln -s"
3584else
3585 ac_cv_prog_LN_S=ln
3586fi
3587fi
3588LN_S="$ac_cv_prog_LN_S"
3589if test "$ac_cv_prog_LN_S" = "ln -s"; then
3590 echo "$ac_t""yes" 1>&6
3591else
3592 echo "$ac_t""no" 1>&6
c906108c
SS
3593fi
3594
8bb2c122
MK
3595# Extract the first word of "ranlib", so it can be a program name with args.
3596set dummy ranlib; ac_word=$2
c906108c 3597echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3598echo "configure:3599: checking for $ac_word" >&5
8bb2c122 3599if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3600 echo $ac_n "(cached) $ac_c" 1>&6
3601else
8bb2c122
MK
3602 if test -n "$RANLIB"; then
3603 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3604else
3605 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608 test -z "$ac_dir" && ac_dir=.
3609 if test -f $ac_dir/$ac_word; then
8bb2c122 3610 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3611 break
3612 fi
3613 done
3614 IFS="$ac_save_ifs"
8bb2c122 3615 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3616fi
3617fi
8bb2c122
MK
3618RANLIB="$ac_cv_prog_RANLIB"
3619if test -n "$RANLIB"; then
3620 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3621else
3622 echo "$ac_t""no" 1>&6
3623fi
3624
8bb2c122
MK
3625for ac_prog in 'bison -y' byacc
3626do
3627# Extract the first word of "$ac_prog", so it can be a program name with args.
3628set dummy $ac_prog; ac_word=$2
c906108c 3629echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3630echo "configure:3631: checking for $ac_word" >&5
8bb2c122 3631if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3632 echo $ac_n "(cached) $ac_c" 1>&6
3633else
8bb2c122
MK
3634 if test -n "$YACC"; then
3635 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3636else
3637 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3638 ac_dummy="$PATH"
3639 for ac_dir in $ac_dummy; do
3640 test -z "$ac_dir" && ac_dir=.
3641 if test -f $ac_dir/$ac_word; then
8bb2c122 3642 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3643 break
3644 fi
3645 done
3646 IFS="$ac_save_ifs"
3647fi
3648fi
8bb2c122
MK
3649YACC="$ac_cv_prog_YACC"
3650if test -n "$YACC"; then
3651 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3652else
3653 echo "$ac_t""no" 1>&6
3654fi
3655
8bb2c122
MK
3656test -n "$YACC" && break
3657done
3658test -n "$YACC" || YACC="yacc"
c906108c 3659
8bb2c122
MK
3660
3661# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3662set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3663echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3664echo "configure:3665: checking for $ac_word" >&5
8bb2c122 3665if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667else
8bb2c122
MK
3668 if test -n "$AR"; then
3669 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3670else
3671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3672 ac_dummy="$PATH"
3673 for ac_dir in $ac_dummy; do
3674 test -z "$ac_dir" && ac_dir=.
3675 if test -f $ac_dir/$ac_word; then
8bb2c122 3676 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3677 break
3678 fi
3679 done
3680 IFS="$ac_save_ifs"
8bb2c122 3681 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3682fi
3683fi
8bb2c122
MK
3684AR="$ac_cv_prog_AR"
3685if test -n "$AR"; then
3686 echo "$ac_t""$AR" 1>&6
c906108c
SS
3687else
3688 echo "$ac_t""no" 1>&6
3689fi
3690
8bb2c122 3691
c906108c 3692
95ca63c4
CF
3693# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3694set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3695echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3696echo "configure:3697: checking for $ac_word" >&5
95ca63c4
CF
3697if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3698 echo $ac_n "(cached) $ac_c" 1>&6
3699else
3700 if test -n "$DLLTOOL"; then
3701 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3702else
3703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3704 ac_dummy="$PATH"
3705 for ac_dir in $ac_dummy; do
3706 test -z "$ac_dir" && ac_dir=.
3707 if test -f $ac_dir/$ac_word; then
3708 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3709 break
3710 fi
3711 done
3712 IFS="$ac_save_ifs"
3713 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3714fi
3715fi
3716DLLTOOL="$ac_cv_prog_DLLTOOL"
3717if test -n "$DLLTOOL"; then
3718 echo "$ac_t""$DLLTOOL" 1>&6
3719else
3720 echo "$ac_t""no" 1>&6
3721fi
3722
3723
3724
3725# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3726set dummy ${ac_tool_prefix}windres; ac_word=$2
3727echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3728echo "configure:3729: checking for $ac_word" >&5
95ca63c4
CF
3729if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3731else
3732 if test -n "$WINDRES"; then
3733 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3734else
3735 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3736 ac_dummy="$PATH"
3737 for ac_dir in $ac_dummy; do
3738 test -z "$ac_dir" && ac_dir=.
3739 if test -f $ac_dir/$ac_word; then
3740 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3741 break
3742 fi
3743 done
3744 IFS="$ac_save_ifs"
3745 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3746fi
3747fi
3748WINDRES="$ac_cv_prog_WINDRES"
3749if test -n "$WINDRES"; then
3750 echo "$ac_t""$WINDRES" 1>&6
3751else
3752 echo "$ac_t""no" 1>&6
3753fi
3754
3755
3756
c906108c 3757
8bb2c122 3758# Needed for GNU/Hurd.
75c6e08a
MK
3759# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3760set dummy ${ac_tool_prefix}mig; ac_word=$2
3761echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ddc9cd0f 3762echo "configure:3763: checking for $ac_word" >&5
75c6e08a
MK
3763if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766 if test -n "$MIG"; then
3767 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3768else
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3770 ac_dummy="$PATH"
3771 for ac_dir in $ac_dummy; do
3772 test -z "$ac_dir" && ac_dir=.
3773 if test -f $ac_dir/$ac_word; then
3774 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3775 break
3776 fi
3777 done
3778 IFS="$ac_save_ifs"
3779 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3780fi
3781fi
3782MIG="$ac_cv_prog_MIG"
3783if test -n "$MIG"; then
3784 echo "$ac_t""$MIG" 1>&6
3785else
3786 echo "$ac_t""no" 1>&6
3787fi
3788
3789
3790
3791
9a156167
MK
3792# ---------------------- #
3793# Checks for libraries. #
3794# ---------------------- #
3795
3796# We might need to link with -lm; most simulators need it.
3797echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
ddc9cd0f 3798echo "configure:3799: checking for main in -lm" >&5
9a156167
MK
3799ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3800if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802else
3803 ac_save_LIBS="$LIBS"
3804LIBS="-lm $LIBS"
3805cat > conftest.$ac_ext <<EOF
ddc9cd0f 3806#line 3807 "configure"
9a156167
MK
3807#include "confdefs.h"
3808
3809int main() {
3810main()
3811; return 0; }
3812EOF
ddc9cd0f 3813if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3814 rm -rf conftest*
3815 eval "ac_cv_lib_$ac_lib_var=yes"
3816else
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 rm -rf conftest*
3820 eval "ac_cv_lib_$ac_lib_var=no"
3821fi
3822rm -f conftest*
3823LIBS="$ac_save_LIBS"
3824
3825fi
3826if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3829 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3830 cat >> confdefs.h <<EOF
3831#define $ac_tr_lib 1
3832EOF
3833
3834 LIBS="-lm $LIBS"
3835
3836else
3837 echo "$ac_t""no" 1>&6
3838fi
3839
3840
3841# We need to link with -lw to get `wctype' on Solaris before Solaris
3842# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3843# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3844# is known to have this problem). Therefore we avoid libw if we can.
3845echo $ac_n "checking for wctype""... $ac_c" 1>&6
ddc9cd0f 3846echo "configure:3847: checking for wctype" >&5
9a156167
MK
3847if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849else
3850 cat > conftest.$ac_ext <<EOF
ddc9cd0f 3851#line 3852 "configure"
9a156167
MK
3852#include "confdefs.h"
3853/* System header to define __stub macros and hopefully few prototypes,
3854 which can conflict with char wctype(); below. */
3855#include <assert.h>
3856/* Override any gcc2 internal prototype to avoid an error. */
3857/* We use char because int might match the return type of a gcc2
3858 builtin and then its argument prototype would still apply. */
3859char wctype();
3860
3861int main() {
3862
3863/* The GNU C library defines this for functions which it implements
3864 to always fail with ENOSYS. Some functions are actually named
3865 something starting with __ and the normal name is an alias. */
3866#if defined (__stub_wctype) || defined (__stub___wctype)
3867choke me
3868#else
3869wctype();
3870#endif
3871
3872; return 0; }
3873EOF
ddc9cd0f 3874if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3875 rm -rf conftest*
3876 eval "ac_cv_func_wctype=yes"
3877else
3878 echo "configure: failed program was:" >&5
3879 cat conftest.$ac_ext >&5
3880 rm -rf conftest*
3881 eval "ac_cv_func_wctype=no"
3882fi
3883rm -f conftest*
3884fi
3885
3886if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3887 echo "$ac_t""yes" 1>&6
3888 :
3889else
3890 echo "$ac_t""no" 1>&6
3891echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
ddc9cd0f 3892echo "configure:3893: checking for wctype in -lw" >&5
9a156167
MK
3893ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3894if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896else
3897 ac_save_LIBS="$LIBS"
3898LIBS="-lw $LIBS"
3899cat > conftest.$ac_ext <<EOF
ddc9cd0f 3900#line 3901 "configure"
9a156167
MK
3901#include "confdefs.h"
3902/* Override any gcc2 internal prototype to avoid an error. */
3903/* We use char because int might match the return type of a gcc2
3904 builtin and then its argument prototype would still apply. */
3905char wctype();
3906
3907int main() {
3908wctype()
3909; return 0; }
3910EOF
ddc9cd0f 3911if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3912 rm -rf conftest*
3913 eval "ac_cv_lib_$ac_lib_var=yes"
3914else
3915 echo "configure: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 rm -rf conftest*
3918 eval "ac_cv_lib_$ac_lib_var=no"
3919fi
3920rm -f conftest*
3921LIBS="$ac_save_LIBS"
3922
3923fi
3924if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3925 echo "$ac_t""yes" 1>&6
3926 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3927 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3928 cat >> confdefs.h <<EOF
3929#define $ac_tr_lib 1
3930EOF
3931
3932 LIBS="-lw $LIBS"
3933
3934else
3935 echo "$ac_t""no" 1>&6
3936fi
3937
3938fi
3939
3940
c890192f
MK
3941# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3942
3943echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
ddc9cd0f 3944echo "configure:3945: checking for library containing gethostbyname" >&5
c890192f
MK
3945if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3946 echo $ac_n "(cached) $ac_c" 1>&6
3947else
3948 ac_func_search_save_LIBS="$LIBS"
3949ac_cv_search_gethostbyname="no"
3950cat > conftest.$ac_ext <<EOF
ddc9cd0f 3951#line 3952 "configure"
c890192f
MK
3952#include "confdefs.h"
3953/* Override any gcc2 internal prototype to avoid an error. */
3954/* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956char gethostbyname();
3957
3958int main() {
3959gethostbyname()
3960; return 0; }
3961EOF
ddc9cd0f 3962if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3963 rm -rf conftest*
3964 ac_cv_search_gethostbyname="none required"
3965else
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3968fi
3969rm -f conftest*
3970test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3971LIBS="-l$i $ac_func_search_save_LIBS"
3972cat > conftest.$ac_ext <<EOF
ddc9cd0f 3973#line 3974 "configure"
c890192f
MK
3974#include "confdefs.h"
3975/* Override any gcc2 internal prototype to avoid an error. */
3976/* We use char because int might match the return type of a gcc2
3977 builtin and then its argument prototype would still apply. */
3978char gethostbyname();
3979
3980int main() {
3981gethostbyname()
3982; return 0; }
3983EOF
ddc9cd0f 3984if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3985 rm -rf conftest*
3986 ac_cv_search_gethostbyname="-l$i"
3987break
3988else
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3991fi
3992rm -f conftest*
3993done
3994LIBS="$ac_func_search_save_LIBS"
3995fi
3996
3997echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3998if test "$ac_cv_search_gethostbyname" != "no"; then
3999 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4000
4001else :
4002
4003fi
4004
9a156167
MK
4005# Some systems (e.g. Solaris) have `socketpair' in libsocket.
4006
4007echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
ddc9cd0f 4008echo "configure:4009: checking for library containing socketpair" >&5
9a156167
MK
4009if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011else
4012 ac_func_search_save_LIBS="$LIBS"
4013ac_cv_search_socketpair="no"
4014cat > conftest.$ac_ext <<EOF
ddc9cd0f 4015#line 4016 "configure"
9a156167
MK
4016#include "confdefs.h"
4017/* Override any gcc2 internal prototype to avoid an error. */
4018/* We use char because int might match the return type of a gcc2
4019 builtin and then its argument prototype would still apply. */
4020char socketpair();
4021
4022int main() {
4023socketpair()
4024; return 0; }
4025EOF
ddc9cd0f 4026if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4027 rm -rf conftest*
4028 ac_cv_search_socketpair="none required"
4029else
4030 echo "configure: failed program was:" >&5
4031 cat conftest.$ac_ext >&5
4032fi
4033rm -f conftest*
4034test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4035LIBS="-l$i $ac_func_search_save_LIBS"
4036cat > conftest.$ac_ext <<EOF
ddc9cd0f 4037#line 4038 "configure"
9a156167
MK
4038#include "confdefs.h"
4039/* Override any gcc2 internal prototype to avoid an error. */
4040/* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042char socketpair();
4043
4044int main() {
4045socketpair()
4046; return 0; }
4047EOF
ddc9cd0f 4048if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4049 rm -rf conftest*
4050 ac_cv_search_socketpair="-l$i"
4051break
4052else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055fi
4056rm -f conftest*
4057done
4058LIBS="$ac_func_search_save_LIBS"
4059fi
4060
4061echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4062if test "$ac_cv_search_socketpair" != "no"; then
4063 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4064
4065else :
4066
4067fi
4068
06825bd1
MK
4069# Since GDB uses Readline, we need termcap functionality, so we need
4070# to find a library that provides that. When GDB is configured with
c324d747 4071# the TUI, we need full curses functionality.
06825bd1
MK
4072
4073case $host_os in
4074 cygwin*)
4075 if test -d $srcdir/libtermcap; then
4076 LIBS="../libtermcap/libtermcap.a $LIBS"
4077 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4078 fi ;;
40a7debc 4079 go32* | *djgpp*)
06825bd1
MK
4080 ac_cv_search_tgetent="none required"
4081 ;;
4082 aix*)
4083 # Readline prefers curses over termcap on AIX.
4084 # ??? Why?
4085
4086echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
ddc9cd0f 4087echo "configure:4088: checking for library containing tgetent" >&5
06825bd1
MK
4088if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4089 echo $ac_n "(cached) $ac_c" 1>&6
4090else
4091 ac_func_search_save_LIBS="$LIBS"
4092ac_cv_search_tgetent="no"
4093cat > conftest.$ac_ext <<EOF
ddc9cd0f 4094#line 4095 "configure"
06825bd1
MK
4095#include "confdefs.h"
4096/* Override any gcc2 internal prototype to avoid an error. */
4097/* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
4099char tgetent();
4100
4101int main() {
4102tgetent()
4103; return 0; }
4104EOF
ddc9cd0f 4105if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4106 rm -rf conftest*
4107 ac_cv_search_tgetent="none required"
4108else
4109 echo "configure: failed program was:" >&5
4110 cat conftest.$ac_ext >&5
4111fi
4112rm -f conftest*
4113test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4114LIBS="-l$i $ac_func_search_save_LIBS"
4115cat > conftest.$ac_ext <<EOF
ddc9cd0f 4116#line 4117 "configure"
06825bd1
MK
4117#include "confdefs.h"
4118/* Override any gcc2 internal prototype to avoid an error. */
4119/* We use char because int might match the return type of a gcc2
4120 builtin and then its argument prototype would still apply. */
4121char tgetent();
4122
4123int main() {
4124tgetent()
4125; return 0; }
4126EOF
ddc9cd0f 4127if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4128 rm -rf conftest*
4129 ac_cv_search_tgetent="-l$i"
4130break
4131else
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4134fi
4135rm -f conftest*
4136done
4137LIBS="$ac_func_search_save_LIBS"
4138fi
4139
4140echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4141if test "$ac_cv_search_tgetent" != "no"; then
4142 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4143
4144else :
4145
4146fi
4147 ;;
4148esac
4149
4150# Note: We used to check for libtermlib and libterminfo too, but
4151# Readline doesn't, so I think we're safe with leaving them out.
4152
4153echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
ddc9cd0f 4154echo "configure:4155: checking for library containing tgetent" >&5
06825bd1
MK
4155if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4156 echo $ac_n "(cached) $ac_c" 1>&6
4157else
4158 ac_func_search_save_LIBS="$LIBS"
4159ac_cv_search_tgetent="no"
4160cat > conftest.$ac_ext <<EOF
ddc9cd0f 4161#line 4162 "configure"
06825bd1
MK
4162#include "confdefs.h"
4163/* Override any gcc2 internal prototype to avoid an error. */
4164/* We use char because int might match the return type of a gcc2
4165 builtin and then its argument prototype would still apply. */
4166char tgetent();
4167
4168int main() {
4169tgetent()
4170; return 0; }
4171EOF
ddc9cd0f 4172if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4173 rm -rf conftest*
4174 ac_cv_search_tgetent="none required"
4175else
4176 echo "configure: failed program was:" >&5
4177 cat conftest.$ac_ext >&5
4178fi
4179rm -f conftest*
4180test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4181LIBS="-l$i $ac_func_search_save_LIBS"
4182cat > conftest.$ac_ext <<EOF
ddc9cd0f 4183#line 4184 "configure"
06825bd1
MK
4184#include "confdefs.h"
4185/* Override any gcc2 internal prototype to avoid an error. */
4186/* We use char because int might match the return type of a gcc2
4187 builtin and then its argument prototype would still apply. */
4188char tgetent();
4189
4190int main() {
4191tgetent()
4192; return 0; }
4193EOF
ddc9cd0f 4194if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4195 rm -rf conftest*
4196 ac_cv_search_tgetent="-l$i"
4197break
4198else
4199 echo "configure: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
4201fi
4202rm -f conftest*
4203done
4204LIBS="$ac_func_search_save_LIBS"
4205fi
4206
4207echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4208if test "$ac_cv_search_tgetent" != "no"; then
4209 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4210
4211else :
4212
4213fi
4214
4215if test "$ac_cv_search_tgetent" = no; then
4216 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4217fi
4218
02d62932
MC
4219# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4220# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4221# Makefile fragments. That's why we need to have `Hcurses' before
4222# `curses'. I don't see why we should use HP curses if a more
4223# standard curses is available, except that according to HP's
4224# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4225# HP-UX 10.10 and 10.20.
4226
c848556f
MC
4227# FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
4228# and probably other platforms. AC_SEARCH_LIBS finds the library
4229# in a place such as /usr/local/lib/libncurses.a, but does not
4230# do anything to look for the matching include files.
4231# -- chastain 2004-05-01
02d62932 4232
02d62932 4233
02d62932 4234echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
ddc9cd0f 4235echo "configure:4236: checking for library containing initscr" >&5
02d62932
MC
4236if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4237 echo $ac_n "(cached) $ac_c" 1>&6
4238else
4239 ac_func_search_save_LIBS="$LIBS"
4240ac_cv_search_initscr="no"
4241cat > conftest.$ac_ext <<EOF
ddc9cd0f 4242#line 4243 "configure"
02d62932
MC
4243#include "confdefs.h"
4244/* Override any gcc2 internal prototype to avoid an error. */
4245/* We use char because int might match the return type of a gcc2
4246 builtin and then its argument prototype would still apply. */
4247char initscr();
4248
4249int main() {
4250initscr()
4251; return 0; }
4252EOF
ddc9cd0f 4253if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4254 rm -rf conftest*
4255 ac_cv_search_initscr="none required"
4256else
4257 echo "configure: failed program was:" >&5
4258 cat conftest.$ac_ext >&5
4259fi
4260rm -f conftest*
5c7f2947 4261test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses cursesX curses pdcurses; do
02d62932
MC
4262LIBS="-l$i $ac_func_search_save_LIBS"
4263cat > conftest.$ac_ext <<EOF
ddc9cd0f 4264#line 4265 "configure"
02d62932
MC
4265#include "confdefs.h"
4266/* Override any gcc2 internal prototype to avoid an error. */
4267/* We use char because int might match the return type of a gcc2
4268 builtin and then its argument prototype would still apply. */
4269char initscr();
4270
4271int main() {
4272initscr()
4273; return 0; }
4274EOF
ddc9cd0f 4275if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4276 rm -rf conftest*
4277 ac_cv_search_initscr="-l$i"
4278break
4279else
4280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4282fi
4283rm -f conftest*
4284done
4285LIBS="$ac_func_search_save_LIBS"
4286fi
4287
4288echo "$ac_t""$ac_cv_search_initscr" 1>&6
4289if test "$ac_cv_search_initscr" != "no"; then
4290 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4291
4292else :
4293 echo "configure: warning: no curses library found" 1>&2
4294fi
02d62932
MC
4295
4296# Check whether the wborder function is provided by the curses
4297# library detected above. In certain implementations such as
4298# the HP/UX Hcurses for instance, this function is provided by an
4299# additional library. So if we did not find this function inside
4300# the curses library, try some alternate libraries we know might
4301# provide it.
4302
4303echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
ddc9cd0f 4304echo "configure:4305: checking for library containing wborder" >&5
02d62932
MC
4305if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307else
4308 ac_func_search_save_LIBS="$LIBS"
4309ac_cv_search_wborder="no"
4310cat > conftest.$ac_ext <<EOF
ddc9cd0f 4311#line 4312 "configure"
02d62932
MC
4312#include "confdefs.h"
4313/* Override any gcc2 internal prototype to avoid an error. */
4314/* We use char because int might match the return type of a gcc2
4315 builtin and then its argument prototype would still apply. */
4316char wborder();
4317
4318int main() {
4319wborder()
4320; return 0; }
4321EOF
ddc9cd0f 4322if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4323 rm -rf conftest*
4324 ac_cv_search_wborder="none required"
4325else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328fi
4329rm -f conftest*
4330test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4331LIBS="-l$i $ac_func_search_save_LIBS"
4332cat > conftest.$ac_ext <<EOF
ddc9cd0f 4333#line 4334 "configure"
02d62932
MC
4334#include "confdefs.h"
4335/* Override any gcc2 internal prototype to avoid an error. */
4336/* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
4338char wborder();
4339
4340int main() {
4341wborder()
4342; return 0; }
4343EOF
ddc9cd0f 4344if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
02d62932
MC
4345 rm -rf conftest*
4346 ac_cv_search_wborder="-l$i"
4347break
4348else
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4351fi
4352rm -f conftest*
4353done
4354LIBS="$ac_func_search_save_LIBS"
4355fi
4356
4357echo "$ac_t""$ac_cv_search_wborder" 1>&6
4358if test "$ac_cv_search_wborder" != "no"; then
4359 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4360
4361else :
4362 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4363fi
4364
5ee754fc
MK
4365# ------------------------- #
4366# Checks for header files. #
4367# ------------------------- #
4368
4369ac_header_dirent=no
4370for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4371do
4372ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4373echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
ddc9cd0f 4374echo "configure:4375: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4375if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377else
4378 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4379#line 4380 "configure"
c906108c
SS
4380#include "confdefs.h"
4381#include <sys/types.h>
5ee754fc
MK
4382#include <$ac_hdr>
4383int main() {
4384DIR *dirp = 0;
4385; return 0; }
4386EOF
ddc9cd0f 4387if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4388 rm -rf conftest*
4389 eval "ac_cv_header_dirent_$ac_safe=yes"
4390else
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 eval "ac_cv_header_dirent_$ac_safe=no"
4395fi
4396rm -f conftest*
4397fi
4398if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4399 echo "$ac_t""yes" 1>&6
4400 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4401 cat >> confdefs.h <<EOF
4402#define $ac_tr_hdr 1
4403EOF
4404 ac_header_dirent=$ac_hdr; break
4405else
4406 echo "$ac_t""no" 1>&6
4407fi
4408done
4409# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4410if test $ac_header_dirent = dirent.h; then
4411echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
ddc9cd0f 4412echo "configure:4413: checking for opendir in -ldir" >&5
5ee754fc
MK
4413ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4414if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416else
4417 ac_save_LIBS="$LIBS"
4418LIBS="-ldir $LIBS"
4419cat > conftest.$ac_ext <<EOF
ddc9cd0f 4420#line 4421 "configure"
5ee754fc
MK
4421#include "confdefs.h"
4422/* Override any gcc2 internal prototype to avoid an error. */
4423/* We use char because int might match the return type of a gcc2
4424 builtin and then its argument prototype would still apply. */
4425char opendir();
c906108c
SS
4426
4427int main() {
5ee754fc 4428opendir()
c906108c
SS
4429; return 0; }
4430EOF
ddc9cd0f 4431if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4432 rm -rf conftest*
5ee754fc 4433 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4434else
4435 echo "configure: failed program was:" >&5
4436 cat conftest.$ac_ext >&5
4437 rm -rf conftest*
5ee754fc 4438 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4439fi
4440rm -f conftest*
5ee754fc
MK
4441LIBS="$ac_save_LIBS"
4442
4443fi
4444if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4445 echo "$ac_t""yes" 1>&6
4446 LIBS="$LIBS -ldir"
4447else
4448 echo "$ac_t""no" 1>&6
c906108c
SS
4449fi
4450
5ee754fc
MK
4451else
4452echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
ddc9cd0f 4453echo "configure:4454: checking for opendir in -lx" >&5
5ee754fc
MK
4454ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4455if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4456 echo $ac_n "(cached) $ac_c" 1>&6
4457else
4458 ac_save_LIBS="$LIBS"
4459LIBS="-lx $LIBS"
4460cat > conftest.$ac_ext <<EOF
ddc9cd0f 4461#line 4462 "configure"
5ee754fc
MK
4462#include "confdefs.h"
4463/* Override any gcc2 internal prototype to avoid an error. */
4464/* We use char because int might match the return type of a gcc2
4465 builtin and then its argument prototype would still apply. */
4466char opendir();
4467
4468int main() {
4469opendir()
4470; return 0; }
c906108c 4471EOF
ddc9cd0f 4472if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4473 rm -rf conftest*
4474 eval "ac_cv_lib_$ac_lib_var=yes"
4475else
4476 echo "configure: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 rm -rf conftest*
4479 eval "ac_cv_lib_$ac_lib_var=no"
4480fi
4481rm -f conftest*
4482LIBS="$ac_save_LIBS"
c906108c 4483
5ee754fc
MK
4484fi
4485if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4486 echo "$ac_t""yes" 1>&6
4487 LIBS="$LIBS -lx"
4488else
4489 echo "$ac_t""no" 1>&6
4490fi
c906108c 4491
5ee754fc 4492fi
c906108c 4493
5ee754fc 4494echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
ddc9cd0f 4495echo "configure:4496: checking whether stat file-mode macros are broken" >&5
5ee754fc 4496if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4497 echo $ac_n "(cached) $ac_c" 1>&6
4498else
4499 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4500#line 4501 "configure"
9608ab8b
MK
4501#include "confdefs.h"
4502#include <sys/types.h>
5ee754fc
MK
4503#include <sys/stat.h>
4504
4505#if defined(S_ISBLK) && defined(S_IFDIR)
4506# if S_ISBLK (S_IFDIR)
4507You lose.
4508# endif
4509#endif
4510
4511#if defined(S_ISBLK) && defined(S_IFCHR)
4512# if S_ISBLK (S_IFCHR)
4513You lose.
4514# endif
4515#endif
4516
4517#if defined(S_ISLNK) && defined(S_IFREG)
4518# if S_ISLNK (S_IFREG)
4519You lose.
4520# endif
4521#endif
4522
4523#if defined(S_ISSOCK) && defined(S_IFREG)
4524# if S_ISSOCK (S_IFREG)
4525You lose.
4526# endif
4527#endif
4528
9608ab8b 4529EOF
5ee754fc
MK
4530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4531 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4532 rm -rf conftest*
5ee754fc
MK
4533 ac_cv_header_stat_broken=yes
4534else
4535 rm -rf conftest*
4536 ac_cv_header_stat_broken=no
4537fi
4538rm -f conftest*
4539
4540fi
4541
4542echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4543if test $ac_cv_header_stat_broken = yes; then
4544 cat >> confdefs.h <<\EOF
4545#define STAT_MACROS_BROKEN 1
4546EOF
4547
4548fi
4549
4550echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
ddc9cd0f 4551echo "configure:4552: checking for ANSI C header files" >&5
5ee754fc
MK
4552if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4553 echo $ac_n "(cached) $ac_c" 1>&6
4554else
4555 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4556#line 4557 "configure"
5ee754fc
MK
4557#include "confdefs.h"
4558#include <stdlib.h>
4559#include <stdarg.h>
4560#include <string.h>
4561#include <float.h>
4562EOF
4563ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4564{ (eval echo configure:4565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4565ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4566if test -z "$ac_err"; then
4567 rm -rf conftest*
4568 ac_cv_header_stdc=yes
4569else
4570 echo "$ac_err" >&5
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 rm -rf conftest*
4574 ac_cv_header_stdc=no
4575fi
4576rm -f conftest*
4577
4578if test $ac_cv_header_stdc = yes; then
4579 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4580cat > conftest.$ac_ext <<EOF
ddc9cd0f 4581#line 4582 "configure"
5ee754fc
MK
4582#include "confdefs.h"
4583#include <string.h>
4584EOF
4585if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4586 egrep "memchr" >/dev/null 2>&1; then
4587 :
4588else
4589 rm -rf conftest*
4590 ac_cv_header_stdc=no
4591fi
4592rm -f conftest*
4593
4594fi
4595
4596if test $ac_cv_header_stdc = yes; then
4597 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4598cat > conftest.$ac_ext <<EOF
ddc9cd0f 4599#line 4600 "configure"
5ee754fc
MK
4600#include "confdefs.h"
4601#include <stdlib.h>
4602EOF
4603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4604 egrep "free" >/dev/null 2>&1; then
4605 :
4606else
4607 rm -rf conftest*
4608 ac_cv_header_stdc=no
4609fi
4610rm -f conftest*
4611
4612fi
4613
4614if test $ac_cv_header_stdc = yes; then
4615 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4616if test "$cross_compiling" = yes; then
4617 :
4618else
4619 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4620#line 4621 "configure"
5ee754fc
MK
4621#include "confdefs.h"
4622#include <ctype.h>
4623#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4624#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4625#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4626int main () { int i; for (i = 0; i < 256; i++)
4627if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4628exit (0); }
4629
4630EOF
ddc9cd0f 4631if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4632then
4633 :
9608ab8b 4634else
5ee754fc
MK
4635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
4637 rm -fr conftest*
4638 ac_cv_header_stdc=no
4639fi
4640rm -fr conftest*
4641fi
4642
4643fi
4644fi
4645
4646echo "$ac_t""$ac_cv_header_stdc" 1>&6
4647if test $ac_cv_header_stdc = yes; then
4648 cat >> confdefs.h <<\EOF
4649#define STDC_HEADERS 1
4650EOF
4651
4652fi
4653
4654for ac_hdr in link.h
4655do
4656ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4657echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4658echo "configure:4659: checking for $ac_hdr" >&5
5ee754fc
MK
4659if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4660 echo $ac_n "(cached) $ac_c" 1>&6
4661else
4662 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4663#line 4664 "configure"
5ee754fc
MK
4664#include "confdefs.h"
4665#include <$ac_hdr>
4666EOF
4667ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4668{ (eval echo configure:4669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4669ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4670if test -z "$ac_err"; then
4671 rm -rf conftest*
4672 eval "ac_cv_header_$ac_safe=yes"
4673else
4674 echo "$ac_err" >&5
4675 echo "configure: failed program was:" >&5
4676 cat conftest.$ac_ext >&5
4677 rm -rf conftest*
4678 eval "ac_cv_header_$ac_safe=no"
4679fi
4680rm -f conftest*
4681fi
4682if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4683 echo "$ac_t""yes" 1>&6
4684 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4685 cat >> confdefs.h <<EOF
4686#define $ac_tr_hdr 1
4687EOF
4688
4689else
4690 echo "$ac_t""no" 1>&6
4691fi
4692done
4693
78434e59 4694for ac_hdr in machine/reg.h
5ee754fc
MK
4695do
4696ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4697echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4698echo "configure:4699: checking for $ac_hdr" >&5
5ee754fc
MK
4699if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4700 echo $ac_n "(cached) $ac_c" 1>&6
4701else
4702 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4703#line 4704 "configure"
5ee754fc
MK
4704#include "confdefs.h"
4705#include <$ac_hdr>
4706EOF
4707ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4708{ (eval echo configure:4709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4709ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4710if test -z "$ac_err"; then
4711 rm -rf conftest*
4712 eval "ac_cv_header_$ac_safe=yes"
4713else
4714 echo "$ac_err" >&5
4715 echo "configure: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 rm -rf conftest*
4718 eval "ac_cv_header_$ac_safe=no"
4719fi
4720rm -f conftest*
4721fi
4722if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4723 echo "$ac_t""yes" 1>&6
4724 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4725 cat >> confdefs.h <<EOF
4726#define $ac_tr_hdr 1
4727EOF
4728
4729else
4730 echo "$ac_t""no" 1>&6
4731fi
4732done
4733
78434e59 4734for ac_hdr in nlist.h
5ee754fc
MK
4735do
4736ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4737echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4738echo "configure:4739: checking for $ac_hdr" >&5
5ee754fc
MK
4739if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4740 echo $ac_n "(cached) $ac_c" 1>&6
4741else
4742 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4743#line 4744 "configure"
5ee754fc
MK
4744#include "confdefs.h"
4745#include <$ac_hdr>
4746EOF
4747ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4748{ (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4749ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750if test -z "$ac_err"; then
4751 rm -rf conftest*
4752 eval "ac_cv_header_$ac_safe=yes"
4753else
4754 echo "$ac_err" >&5
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -rf conftest*
4758 eval "ac_cv_header_$ac_safe=no"
4759fi
4760rm -f conftest*
4761fi
4762if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4763 echo "$ac_t""yes" 1>&6
4764 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4765 cat >> confdefs.h <<EOF
4766#define $ac_tr_hdr 1
4767EOF
4768
4769else
4770 echo "$ac_t""no" 1>&6
4771fi
4772done
4773
78434e59 4774for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4775do
4776ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4777echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4778echo "configure:4779: checking for $ac_hdr" >&5
5ee754fc
MK
4779if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4780 echo $ac_n "(cached) $ac_c" 1>&6
4781else
4782 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4783#line 4784 "configure"
5ee754fc
MK
4784#include "confdefs.h"
4785#include <$ac_hdr>
4786EOF
4787ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4788{ (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4789ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4790if test -z "$ac_err"; then
4791 rm -rf conftest*
4792 eval "ac_cv_header_$ac_safe=yes"
4793else
4794 echo "$ac_err" >&5
4795 echo "configure: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 rm -rf conftest*
4798 eval "ac_cv_header_$ac_safe=no"
4799fi
4800rm -f conftest*
4801fi
4802if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4803 echo "$ac_t""yes" 1>&6
4804 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4805 cat >> confdefs.h <<EOF
4806#define $ac_tr_hdr 1
4807EOF
4808
4809else
4810 echo "$ac_t""no" 1>&6
4811fi
4812done
4813
a2f23071 4814for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4815do
4816ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4817echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4818echo "configure:4819: checking for $ac_hdr" >&5
5ee754fc
MK
4819if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4820 echo $ac_n "(cached) $ac_c" 1>&6
4821else
4822 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4823#line 4824 "configure"
5ee754fc
MK
4824#include "confdefs.h"
4825#include <$ac_hdr>
4826EOF
4827ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4828{ (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4829ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4830if test -z "$ac_err"; then
4831 rm -rf conftest*
4832 eval "ac_cv_header_$ac_safe=yes"
4833else
4834 echo "$ac_err" >&5
4835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 rm -rf conftest*
4838 eval "ac_cv_header_$ac_safe=no"
4839fi
4840rm -f conftest*
4841fi
4842if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4843 echo "$ac_t""yes" 1>&6
4844 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4845 cat >> confdefs.h <<EOF
4846#define $ac_tr_hdr 1
4847EOF
4848
4849else
4850 echo "$ac_t""no" 1>&6
4851fi
4852done
4853
78434e59 4854for ac_hdr in stddef.h
5ee754fc
MK
4855do
4856ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4857echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4858echo "configure:4859: checking for $ac_hdr" >&5
5ee754fc
MK
4859if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4860 echo $ac_n "(cached) $ac_c" 1>&6
4861else
4862 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4863#line 4864 "configure"
5ee754fc
MK
4864#include "confdefs.h"
4865#include <$ac_hdr>
4866EOF
4867ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4868{ (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4870if test -z "$ac_err"; then
4871 rm -rf conftest*
4872 eval "ac_cv_header_$ac_safe=yes"
4873else
4874 echo "$ac_err" >&5
4875 echo "configure: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4877 rm -rf conftest*
4878 eval "ac_cv_header_$ac_safe=no"
4879fi
4880rm -f conftest*
4881fi
4882if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4883 echo "$ac_t""yes" 1>&6
4884 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4885 cat >> confdefs.h <<EOF
4886#define $ac_tr_hdr 1
4887EOF
4888
4889else
4890 echo "$ac_t""no" 1>&6
4891fi
4892done
4893
78434e59 4894for ac_hdr in stdlib.h
5ee754fc
MK
4895do
4896ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4897echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4898echo "configure:4899: checking for $ac_hdr" >&5
5ee754fc
MK
4899if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4900 echo $ac_n "(cached) $ac_c" 1>&6
4901else
4902 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4903#line 4904 "configure"
5ee754fc
MK
4904#include "confdefs.h"
4905#include <$ac_hdr>
4906EOF
4907ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4908{ (eval echo configure:4909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4909ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4910if test -z "$ac_err"; then
4911 rm -rf conftest*
4912 eval "ac_cv_header_$ac_safe=yes"
4913else
4914 echo "$ac_err" >&5
4915 echo "configure: failed program was:" >&5
4916 cat conftest.$ac_ext >&5
4917 rm -rf conftest*
4918 eval "ac_cv_header_$ac_safe=no"
4919fi
4920rm -f conftest*
4921fi
4922if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4923 echo "$ac_t""yes" 1>&6
4924 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4925 cat >> confdefs.h <<EOF
4926#define $ac_tr_hdr 1
4927EOF
4928
4929else
4930 echo "$ac_t""no" 1>&6
4931fi
4932done
4933
78434e59 4934for ac_hdr in stdint.h
5ee754fc
MK
4935do
4936ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4937echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4938echo "configure:4939: checking for $ac_hdr" >&5
5ee754fc
MK
4939if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4940 echo $ac_n "(cached) $ac_c" 1>&6
4941else
4942 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4943#line 4944 "configure"
5ee754fc
MK
4944#include "confdefs.h"
4945#include <$ac_hdr>
4946EOF
4947ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4948{ (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4949ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4950if test -z "$ac_err"; then
4951 rm -rf conftest*
4952 eval "ac_cv_header_$ac_safe=yes"
4953else
4954 echo "$ac_err" >&5
4955 echo "configure: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 rm -rf conftest*
4958 eval "ac_cv_header_$ac_safe=no"
4959fi
4960rm -f conftest*
4961fi
4962if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4963 echo "$ac_t""yes" 1>&6
4964 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4965 cat >> confdefs.h <<EOF
4966#define $ac_tr_hdr 1
4967EOF
4968
4969else
4970 echo "$ac_t""no" 1>&6
4971fi
4972done
4973
78434e59 4974for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4975do
4976ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4977echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 4978echo "configure:4979: checking for $ac_hdr" >&5
5ee754fc
MK
4979if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4980 echo $ac_n "(cached) $ac_c" 1>&6
4981else
4982 cat > conftest.$ac_ext <<EOF
ddc9cd0f 4983#line 4984 "configure"
5ee754fc
MK
4984#include "confdefs.h"
4985#include <$ac_hdr>
4986EOF
4987ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 4988{ (eval echo configure:4989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4989ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4990if test -z "$ac_err"; then
4991 rm -rf conftest*
4992 eval "ac_cv_header_$ac_safe=yes"
4993else
4994 echo "$ac_err" >&5
4995 echo "configure: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 rm -rf conftest*
4998 eval "ac_cv_header_$ac_safe=no"
4999fi
5000rm -f conftest*
5001fi
5002if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5003 echo "$ac_t""yes" 1>&6
5004 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5005 cat >> confdefs.h <<EOF
5006#define $ac_tr_hdr 1
5007EOF
5008
5009else
5010 echo "$ac_t""no" 1>&6
5011fi
5012done
5013
78434e59 5014for ac_hdr in sys/fault.h
5ee754fc
MK
5015do
5016ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5017echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5018echo "configure:5019: checking for $ac_hdr" >&5
5ee754fc
MK
5019if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5020 echo $ac_n "(cached) $ac_c" 1>&6
5021else
5022 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5023#line 5024 "configure"
5ee754fc
MK
5024#include "confdefs.h"
5025#include <$ac_hdr>
5026EOF
5027ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5028{ (eval echo configure:5029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5029ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5030if test -z "$ac_err"; then
5031 rm -rf conftest*
5032 eval "ac_cv_header_$ac_safe=yes"
5033else
5034 echo "$ac_err" >&5
5035 echo "configure: failed program was:" >&5
5036 cat conftest.$ac_ext >&5
5037 rm -rf conftest*
5038 eval "ac_cv_header_$ac_safe=no"
5039fi
5040rm -f conftest*
5041fi
5042if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5043 echo "$ac_t""yes" 1>&6
5044 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5045 cat >> confdefs.h <<EOF
5046#define $ac_tr_hdr 1
5047EOF
5048
5049else
5050 echo "$ac_t""no" 1>&6
5051fi
5052done
5053
78434e59 5054for ac_hdr in sys/file.h
5ee754fc
MK
5055do
5056ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5057echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5058echo "configure:5059: checking for $ac_hdr" >&5
5ee754fc
MK
5059if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5060 echo $ac_n "(cached) $ac_c" 1>&6
5061else
5062 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5063#line 5064 "configure"
5ee754fc
MK
5064#include "confdefs.h"
5065#include <$ac_hdr>
5066EOF
5067ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5068{ (eval echo configure:5069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5069ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5070if test -z "$ac_err"; then
5071 rm -rf conftest*
5072 eval "ac_cv_header_$ac_safe=yes"
5073else
5074 echo "$ac_err" >&5
5075 echo "configure: failed program was:" >&5
5076 cat conftest.$ac_ext >&5
5077 rm -rf conftest*
5078 eval "ac_cv_header_$ac_safe=no"
5079fi
5080rm -f conftest*
5081fi
5082if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5083 echo "$ac_t""yes" 1>&6
5084 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5085 cat >> confdefs.h <<EOF
5086#define $ac_tr_hdr 1
5087EOF
5088
5089else
5090 echo "$ac_t""no" 1>&6
5091fi
5092done
5093
78434e59 5094for ac_hdr in sys/filio.h
5ee754fc
MK
5095do
5096ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5097echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5098echo "configure:5099: checking for $ac_hdr" >&5
5ee754fc
MK
5099if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5100 echo $ac_n "(cached) $ac_c" 1>&6
5101else
5102 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5103#line 5104 "configure"
5ee754fc
MK
5104#include "confdefs.h"
5105#include <$ac_hdr>
5106EOF
5107ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5108{ (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5109ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5110if test -z "$ac_err"; then
5111 rm -rf conftest*
5112 eval "ac_cv_header_$ac_safe=yes"
5113else
5114 echo "$ac_err" >&5
5115 echo "configure: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 rm -rf conftest*
5118 eval "ac_cv_header_$ac_safe=no"
5119fi
5120rm -f conftest*
5121fi
5122if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5123 echo "$ac_t""yes" 1>&6
5124 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5125 cat >> confdefs.h <<EOF
5126#define $ac_tr_hdr 1
5127EOF
5128
5129else
5130 echo "$ac_t""no" 1>&6
5131fi
5132done
5133
78434e59 5134for ac_hdr in sys/ioctl.h
5ee754fc
MK
5135do
5136ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5137echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5138echo "configure:5139: checking for $ac_hdr" >&5
5ee754fc
MK
5139if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5140 echo $ac_n "(cached) $ac_c" 1>&6
5141else
5142 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5143#line 5144 "configure"
5ee754fc
MK
5144#include "confdefs.h"
5145#include <$ac_hdr>
5146EOF
5147ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5148{ (eval echo configure:5149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5149ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5150if test -z "$ac_err"; then
5151 rm -rf conftest*
5152 eval "ac_cv_header_$ac_safe=yes"
5153else
5154 echo "$ac_err" >&5
5155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5157 rm -rf conftest*
5158 eval "ac_cv_header_$ac_safe=no"
5159fi
5160rm -f conftest*
5161fi
5162if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5163 echo "$ac_t""yes" 1>&6
5164 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5165 cat >> confdefs.h <<EOF
5166#define $ac_tr_hdr 1
5167EOF
5168
5169else
5170 echo "$ac_t""no" 1>&6
5171fi
5172done
5173
78434e59 5174for ac_hdr in sys/param.h
5ee754fc
MK
5175do
5176ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5177echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5178echo "configure:5179: checking for $ac_hdr" >&5
5ee754fc
MK
5179if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5180 echo $ac_n "(cached) $ac_c" 1>&6
5181else
5182 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5183#line 5184 "configure"
5ee754fc
MK
5184#include "confdefs.h"
5185#include <$ac_hdr>
5186EOF
5187ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5188{ (eval echo configure:5189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5189ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5190if test -z "$ac_err"; then
5191 rm -rf conftest*
5192 eval "ac_cv_header_$ac_safe=yes"
5193else
5194 echo "$ac_err" >&5
5195 echo "configure: failed program was:" >&5
5196 cat conftest.$ac_ext >&5
5197 rm -rf conftest*
5198 eval "ac_cv_header_$ac_safe=no"
5199fi
5200rm -f conftest*
5201fi
5202if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5203 echo "$ac_t""yes" 1>&6
5204 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5205 cat >> confdefs.h <<EOF
5206#define $ac_tr_hdr 1
5207EOF
5208
5209else
5210 echo "$ac_t""no" 1>&6
5211fi
5212done
5213
78434e59 5214for ac_hdr in sys/proc.h
5ee754fc
MK
5215do
5216ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5217echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5218echo "configure:5219: checking for $ac_hdr" >&5
5ee754fc
MK
5219if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5220 echo $ac_n "(cached) $ac_c" 1>&6
5221else
5222 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5223#line 5224 "configure"
5ee754fc
MK
5224#include "confdefs.h"
5225#include <$ac_hdr>
5226EOF
5227ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5228{ (eval echo configure:5229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5229ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5230if test -z "$ac_err"; then
5231 rm -rf conftest*
5232 eval "ac_cv_header_$ac_safe=yes"
5233else
5234 echo "$ac_err" >&5
5235 echo "configure: failed program was:" >&5
5236 cat conftest.$ac_ext >&5
5237 rm -rf conftest*
5238 eval "ac_cv_header_$ac_safe=no"
5239fi
5240rm -f conftest*
5241fi
5242if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5243 echo "$ac_t""yes" 1>&6
5244 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5245 cat >> confdefs.h <<EOF
5246#define $ac_tr_hdr 1
5247EOF
5248
5249else
5250 echo "$ac_t""no" 1>&6
5251fi
5252done
5253
78434e59 5254for ac_hdr in sys/procfs.h
5ee754fc
MK
5255do
5256ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5257echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5258echo "configure:5259: checking for $ac_hdr" >&5
5ee754fc
MK
5259if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5260 echo $ac_n "(cached) $ac_c" 1>&6
5261else
5262 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5263#line 5264 "configure"
5ee754fc
MK
5264#include "confdefs.h"
5265#include <$ac_hdr>
5266EOF
5267ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5268{ (eval echo configure:5269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5269ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5270if test -z "$ac_err"; then
5271 rm -rf conftest*
5272 eval "ac_cv_header_$ac_safe=yes"
5273else
5274 echo "$ac_err" >&5
5275 echo "configure: failed program was:" >&5
5276 cat conftest.$ac_ext >&5
5277 rm -rf conftest*
5278 eval "ac_cv_header_$ac_safe=no"
5279fi
5280rm -f conftest*
5281fi
5282if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5283 echo "$ac_t""yes" 1>&6
5284 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5285 cat >> confdefs.h <<EOF
5286#define $ac_tr_hdr 1
5287EOF
5288
5289else
5290 echo "$ac_t""no" 1>&6
5291fi
5292done
5293
78434e59 5294for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5295do
5296ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5297echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5298echo "configure:5299: checking for $ac_hdr" >&5
5ee754fc
MK
5299if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5300 echo $ac_n "(cached) $ac_c" 1>&6
5301else
5302 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5303#line 5304 "configure"
5ee754fc
MK
5304#include "confdefs.h"
5305#include <$ac_hdr>
5306EOF
5307ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5308{ (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5309ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5310if test -z "$ac_err"; then
5311 rm -rf conftest*
5312 eval "ac_cv_header_$ac_safe=yes"
5313else
5314 echo "$ac_err" >&5
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
5318 eval "ac_cv_header_$ac_safe=no"
5319fi
5320rm -f conftest*
5321fi
5322if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5323 echo "$ac_t""yes" 1>&6
5324 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5325 cat >> confdefs.h <<EOF
5326#define $ac_tr_hdr 1
5327EOF
5328
5329else
5330 echo "$ac_t""no" 1>&6
5331fi
5332done
5333
78434e59 5334for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5335do
5336ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5337echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5338echo "configure:5339: checking for $ac_hdr" >&5
5ee754fc
MK
5339if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
5341else
5342 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5343#line 5344 "configure"
5ee754fc
MK
5344#include "confdefs.h"
5345#include <$ac_hdr>
5346EOF
5347ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5348{ (eval echo configure:5349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5349ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5350if test -z "$ac_err"; then
5351 rm -rf conftest*
5352 eval "ac_cv_header_$ac_safe=yes"
5353else
5354 echo "$ac_err" >&5
5355 echo "configure: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 rm -rf conftest*
5358 eval "ac_cv_header_$ac_safe=no"
5359fi
5360rm -f conftest*
5361fi
5362if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5363 echo "$ac_t""yes" 1>&6
5364 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5365 cat >> confdefs.h <<EOF
5366#define $ac_tr_hdr 1
5367EOF
5368
5369else
5370 echo "$ac_t""no" 1>&6
5371fi
5372done
5373
78434e59 5374for ac_hdr in sys/select.h
5ee754fc
MK
5375do
5376ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5377echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5378echo "configure:5379: checking for $ac_hdr" >&5
5ee754fc
MK
5379if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5380 echo $ac_n "(cached) $ac_c" 1>&6
5381else
5382 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5383#line 5384 "configure"
5ee754fc
MK
5384#include "confdefs.h"
5385#include <$ac_hdr>
5386EOF
5387ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5388{ (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5389ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5390if test -z "$ac_err"; then
5391 rm -rf conftest*
5392 eval "ac_cv_header_$ac_safe=yes"
5393else
5394 echo "$ac_err" >&5
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_header_$ac_safe=no"
5399fi
5400rm -f conftest*
5401fi
5402if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5403 echo "$ac_t""yes" 1>&6
5404 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5405 cat >> confdefs.h <<EOF
5406#define $ac_tr_hdr 1
5407EOF
5408
5409else
5410 echo "$ac_t""no" 1>&6
5411fi
5412done
5413
78434e59 5414for ac_hdr in sys/syscall.h
5ee754fc
MK
5415do
5416ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5417echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5418echo "configure:5419: checking for $ac_hdr" >&5
5ee754fc
MK
5419if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5420 echo $ac_n "(cached) $ac_c" 1>&6
5421else
5422 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5423#line 5424 "configure"
5ee754fc
MK
5424#include "confdefs.h"
5425#include <$ac_hdr>
5426EOF
5427ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5428{ (eval echo configure:5429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5429ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5430if test -z "$ac_err"; then
5431 rm -rf conftest*
5432 eval "ac_cv_header_$ac_safe=yes"
5433else
5434 echo "$ac_err" >&5
5435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 rm -rf conftest*
5438 eval "ac_cv_header_$ac_safe=no"
5439fi
5440rm -f conftest*
5441fi
5442if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5443 echo "$ac_t""yes" 1>&6
5444 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5445 cat >> confdefs.h <<EOF
5446#define $ac_tr_hdr 1
5447EOF
5448
5449else
5450 echo "$ac_t""no" 1>&6
5451fi
5452done
5453
086ec9eb 5454for ac_hdr in sys/types.h
5ee754fc
MK
5455do
5456ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5457echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5458echo "configure:5459: checking for $ac_hdr" >&5
5ee754fc
MK
5459if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5460 echo $ac_n "(cached) $ac_c" 1>&6
5461else
5462 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5463#line 5464 "configure"
5ee754fc
MK
5464#include "confdefs.h"
5465#include <$ac_hdr>
5466EOF
5467ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5468{ (eval echo configure:5469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5469ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5470if test -z "$ac_err"; then
5471 rm -rf conftest*
5472 eval "ac_cv_header_$ac_safe=yes"
5473else
5474 echo "$ac_err" >&5
9608ab8b
MK
5475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 rm -rf conftest*
5ee754fc 5478 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5479fi
5480rm -f conftest*
5481fi
5ee754fc 5482if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5483 echo "$ac_t""yes" 1>&6
5484 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5485 cat >> confdefs.h <<EOF
5486#define $ac_tr_hdr 1
5487EOF
5ee754fc 5488
9608ab8b
MK
5489else
5490 echo "$ac_t""no" 1>&6
5491fi
5492done
5ee754fc 5493
086ec9eb 5494for ac_hdr in sys/user.h
5ee754fc
MK
5495do
5496ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5497echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5498echo "configure:5499: checking for $ac_hdr" >&5
5ee754fc 5499if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501else
5ee754fc 5502 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5503#line 5504 "configure"
9608ab8b 5504#include "confdefs.h"
5ee754fc 5505#include <$ac_hdr>
9608ab8b 5506EOF
5ee754fc 5507ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5508{ (eval echo configure:5509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5509ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5510if test -z "$ac_err"; then
9608ab8b 5511 rm -rf conftest*
5ee754fc 5512 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5513else
5ee754fc 5514 echo "$ac_err" >&5
9608ab8b
MK
5515 echo "configure: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517 rm -rf conftest*
5ee754fc 5518 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5519fi
5520rm -f conftest*
9608ab8b 5521fi
5ee754fc 5522if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5523 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5524 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5525 cat >> confdefs.h <<EOF
5526#define $ac_tr_hdr 1
5527EOF
5528
9608ab8b
MK
5529else
5530 echo "$ac_t""no" 1>&6
5531fi
5ee754fc 5532done
9608ab8b 5533
086ec9eb 5534for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5535do
5536ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5537echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5538echo "configure:5539: checking for $ac_hdr" >&5
5ee754fc 5539if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5540 echo $ac_n "(cached) $ac_c" 1>&6
5541else
5ee754fc 5542 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5543#line 5544 "configure"
9608ab8b 5544#include "confdefs.h"
5ee754fc 5545#include <$ac_hdr>
9608ab8b 5546EOF
5ee754fc 5547ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5548{ (eval echo configure:5549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5549ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5550if test -z "$ac_err"; then
9608ab8b 5551 rm -rf conftest*
5ee754fc 5552 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5553else
5ee754fc 5554 echo "$ac_err" >&5
9608ab8b
MK
5555 echo "configure: failed program was:" >&5
5556 cat conftest.$ac_ext >&5
5557 rm -rf conftest*
5ee754fc 5558 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5559fi
5560rm -f conftest*
9608ab8b 5561fi
5ee754fc 5562if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5563 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5564 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5565 cat >> confdefs.h <<EOF
5566#define $ac_tr_hdr 1
5567EOF
5568
9608ab8b
MK
5569else
5570 echo "$ac_t""no" 1>&6
5571fi
5ee754fc 5572done
9608ab8b 5573
086ec9eb 5574for ac_hdr in termios.h termio.h sgtty.h
78434e59
MK
5575do
5576ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5577echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ddc9cd0f 5578echo "configure:5579: checking for $ac_hdr" >&5
78434e59
MK
5579if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581else
5582 cat > conftest.$ac_ext <<EOF
ddc9cd0f 5583#line 5584 "configure"
78434e59
MK
5584#include "confdefs.h"
5585#include <$ac_hdr>
5586EOF
5587ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ddc9cd0f 5588{ (eval echo configure:5589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5589ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5590if test -z "$ac_err"; then
5591 rm -rf conftest*
5592 eval "ac_cv_header_$ac_safe=yes"
5593else
5594 echo "$ac_err" >&5
5595 echo "configure: failed program was:" >&5
5596 cat conftest.$ac_ext >&5
5597 rm -rf conftest*
5598 eval "ac_cv_header_$ac_safe=no"
5599fi
5600rm -f conftest*
5601fi
5602if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5603 echo "$ac_t""yes" 1>&6
5604 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5605 cat >> confdefs.h <<EOF
5606#define $ac_tr_hdr 1
5607EOF
5608
5609else
5610 echo "$ac_t""no" 1>&6
5611fi
5612done
5613
086ec9eb
MK
5614for ac_hdr in unistd.h
5615do
5616ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5617echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5618echo "configure:5619: checking for $ac_hdr" >&5
5619if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5620 echo $ac_n "(cached) $ac_c" 1>&6
5621else
5622 cat > conftest.$ac_ext <<EOF
5623#line 5624 "configure"
5624#include "confdefs.h"
5625#include <$ac_hdr>
5626EOF
5627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5628{ (eval echo configure:5629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5630if test -z "$ac_err"; then
5631 rm -rf conftest*
5632 eval "ac_cv_header_$ac_safe=yes"
5633else
5634 echo "$ac_err" >&5
5635 echo "configure: failed program was:" >&5
5636 cat conftest.$ac_ext >&5
5637 rm -rf conftest*
5638 eval "ac_cv_header_$ac_safe=no"
5639fi
5640rm -f conftest*
5641fi
5642if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5643 echo "$ac_t""yes" 1>&6
5644 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5645 cat >> confdefs.h <<EOF
5646#define $ac_tr_hdr 1
5647EOF
5648
5649else
5650 echo "$ac_t""no" 1>&6
5651fi
5652done
5653
9608ab8b 5654
b1d19a62 5655# On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5ee754fc
MK
5656# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5657# think that we don't have <curses.h> if we're using GCC.
5658case $host_os in
b1d19a62 5659 solaris2.[789])
5ee754fc
MK
5660 if test "$GCC" = yes; then
5661 cat >> confdefs.h <<\EOF
5662#define _MSE_INT_H 1
5663EOF
5664
5665 fi ;;
5666esac
5c7f2947 5667for ac_hdr in curses.h cursesX.h ncurses.h term.h
5ee754fc
MK
5668do
5669ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5670echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
086ec9eb 5671echo "configure:5672: checking for $ac_hdr" >&5
5ee754fc 5672if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5673 echo $ac_n "(cached) $ac_c" 1>&6
5674else
5675 cat > conftest.$ac_ext <<EOF
086ec9eb 5676#line 5677 "configure"
c906108c 5677#include "confdefs.h"
5ee754fc 5678#include <$ac_hdr>
c906108c
SS
5679EOF
5680ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 5681{ (eval echo configure:5682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5682ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5683if test -z "$ac_err"; then
5684 rm -rf conftest*
5ee754fc 5685 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5686else
5687 echo "$ac_err" >&5
5688 echo "configure: failed program was:" >&5
5689 cat conftest.$ac_ext >&5
5690 rm -rf conftest*
5ee754fc 5691 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5692fi
5693rm -f conftest*
c906108c 5694fi
5ee754fc
MK
5695if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5696 echo "$ac_t""yes" 1>&6
5697 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5698 cat >> confdefs.h <<EOF
5699#define $ac_tr_hdr 1
c906108c 5700EOF
5ee754fc 5701
c906108c 5702else
5ee754fc 5703 echo "$ac_t""no" 1>&6
c906108c 5704fi
5ee754fc 5705done
c906108c
SS
5706
5707
5ee754fc
MK
5708# FIXME: kettenis/20030102: In most cases we include these
5709# unconditionally, so what's the point in checking these?
5710for ac_hdr in ctype.h time.h
c906108c
SS
5711do
5712ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5713echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
086ec9eb 5714echo "configure:5715: checking for $ac_hdr" >&5
c906108c
SS
5715if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5716 echo $ac_n "(cached) $ac_c" 1>&6
5717else
5718 cat > conftest.$ac_ext <<EOF
086ec9eb 5719#line 5720 "configure"
c906108c
SS
5720#include "confdefs.h"
5721#include <$ac_hdr>
5722EOF
5723ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 5724{ (eval echo configure:5725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5725ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5726if test -z "$ac_err"; then
5727 rm -rf conftest*
5728 eval "ac_cv_header_$ac_safe=yes"
5729else
5730 echo "$ac_err" >&5
5731 echo "configure: failed program was:" >&5
5732 cat conftest.$ac_ext >&5
5733 rm -rf conftest*
5734 eval "ac_cv_header_$ac_safe=no"
5735fi
5736rm -f conftest*
5737fi
5738if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5739 echo "$ac_t""yes" 1>&6
5740 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5741 cat >> confdefs.h <<EOF
5742#define $ac_tr_hdr 1
5743EOF
5744
5745else
5746 echo "$ac_t""no" 1>&6
5747fi
5748done
5749
5ee754fc 5750
40a7debc 5751echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
086ec9eb 5752echo "configure:5753: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5753if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755else
5756 cat > conftest.$ac_ext <<EOF
086ec9eb 5757#line 5758 "configure"
40a7debc
EZ
5758#include "confdefs.h"
5759#include <sys/types.h>
5760#include <sys/stat.h>
5761int main() {
5762struct stat st; (void) st.st_blocks;
5763; return 0; }
5764EOF
086ec9eb 5765if { (eval echo configure:5766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5766 rm -rf conftest*
5767 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5768else
5769 echo "configure: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 rm -rf conftest*
5772 gdb_cv_have_struct_stat_with_st_blocks_member=no
5773fi
5774rm -f conftest*
5775fi
5776
5777echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5778if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5779 cat >> confdefs.h <<\EOF
5780#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5781EOF
5782
5783fi
086ec9eb 5784
b9362cc7
AC
5785# ------------------------- #
5786# Checks for declarations. #
5787# ------------------------- #
5788
5789for ac_func in getopt
5790do
5791 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5792echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
086ec9eb 5793echo "configure:5794: checking whether $ac_func is declared" >&5
b9362cc7
AC
5794if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5795 echo $ac_n "(cached) $ac_c" 1>&6
5796else
5797 cat > conftest.$ac_ext <<EOF
086ec9eb 5798#line 5799 "configure"
b9362cc7
AC
5799#include "confdefs.h"
5800#undef $ac_tr_decl
5801#define $ac_tr_decl 1
5802
5803
5804int main() {
5805#ifndef $ac_func
5806char *(*pfn) = (char *(*)) $ac_func ;
5807#endif
5808; return 0; }
5809EOF
086ec9eb 5810if { (eval echo configure:5811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5811 rm -rf conftest*
5812 eval "gcc_cv_have_decl_$ac_func=yes"
5813else
5814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
5816 rm -rf conftest*
5817 eval "gcc_cv_have_decl_$ac_func=no"
5818fi
5819rm -f conftest*
5820fi
5821
5822if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5823 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5824#define $ac_tr_decl 1
5825EOF
5826
5827else
5828 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5829#define $ac_tr_decl 0
5830EOF
5831
5832fi
5833
5834done
5835if test x = y ; then
5836 cat >> confdefs.h <<\EOF
5837#define HAVE_DECL_GETOPT 1
5838EOF
5839fi
5840
5841
5ee754fc
MK
5842# ------------------ #
5843# Checks for types. #
5844# ------------------ #
5845
5846echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
086ec9eb 5847echo "configure:5848: checking return type of signal handlers" >&5
5ee754fc 5848if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5849 echo $ac_n "(cached) $ac_c" 1>&6
5850else
5851 cat > conftest.$ac_ext <<EOF
086ec9eb 5852#line 5853 "configure"
c906108c
SS
5853#include "confdefs.h"
5854#include <sys/types.h>
5ee754fc
MK
5855#include <signal.h>
5856#ifdef signal
5857#undef signal
c906108c 5858#endif
5ee754fc
MK
5859#ifdef __cplusplus
5860extern "C" void (*signal (int, void (*)(int)))(int);
5861#else
5862void (*signal ()) ();
c906108c
SS
5863#endif
5864
5ee754fc
MK
5865int main() {
5866int i;
5867; return 0; }
c906108c 5868EOF
086ec9eb 5869if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5870 rm -rf conftest*
5ee754fc 5871 ac_cv_type_signal=void
c906108c 5872else
5ee754fc
MK
5873 echo "configure: failed program was:" >&5
5874 cat conftest.$ac_ext >&5
c906108c 5875 rm -rf conftest*
5ee754fc 5876 ac_cv_type_signal=int
c906108c
SS
5877fi
5878rm -f conftest*
c906108c
SS
5879fi
5880
5ee754fc
MK
5881echo "$ac_t""$ac_cv_type_signal" 1>&6
5882cat >> confdefs.h <<EOF
5883#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5884EOF
5885
c906108c
SS
5886
5887
5ee754fc
MK
5888# ------------------------------------- #
5889# Checks for compiler characteristics. #
5890# ------------------------------------- #
5891
c906108c 5892echo $ac_n "checking for working const""... $ac_c" 1>&6
086ec9eb 5893echo "configure:5894: checking for working const" >&5
c906108c
SS
5894if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5895 echo $ac_n "(cached) $ac_c" 1>&6
5896else
5897 cat > conftest.$ac_ext <<EOF
086ec9eb 5898#line 5899 "configure"
c906108c
SS
5899#include "confdefs.h"
5900
5901int main() {
5902
5903/* Ultrix mips cc rejects this. */
5904typedef int charset[2]; const charset x;
5905/* SunOS 4.1.1 cc rejects this. */
5906char const *const *ccp;
5907char **p;
5908/* NEC SVR4.0.2 mips cc rejects this. */
5909struct point {int x, y;};
5910static struct point const zero = {0,0};
5911/* AIX XL C 1.02.0.0 rejects this.
5912 It does not let you subtract one const X* pointer from another in an arm
5913 of an if-expression whose if-part is not a constant expression */
5914const char *g = "string";
5915ccp = &g + (g ? g-g : 0);
5916/* HPUX 7.0 cc rejects these. */
5917++ccp;
5918p = (char**) ccp;
5919ccp = (char const *const *) p;
5920{ /* SCO 3.2v4 cc rejects this. */
5921 char *t;
5922 char const *s = 0 ? (char *) 0 : (char const *) 0;
5923
5924 *t++ = 0;
5925}
5926{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5927 int x[] = {25, 17};
5928 const int *foo = &x[0];
5929 ++foo;
5930}
5931{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5932 typedef const int *iptr;
5933 iptr p = 0;
5934 ++p;
5935}
5936{ /* AIX XL C 1.02.0.0 rejects this saying
5937 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5938 struct s { int j; const int *ap[3]; };
5939 struct s *b; b->j = 5;
5940}
5941{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5942 const int foo = 10;
5943}
5944
5945; return 0; }
5946EOF
086ec9eb 5947if { (eval echo configure:5948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5948 rm -rf conftest*
5949 ac_cv_c_const=yes
5950else
5951 echo "configure: failed program was:" >&5
5952 cat conftest.$ac_ext >&5
5953 rm -rf conftest*
5954 ac_cv_c_const=no
5955fi
5956rm -f conftest*
5957fi
5958
5959echo "$ac_t""$ac_cv_c_const" 1>&6
5960if test $ac_cv_c_const = no; then
5961 cat >> confdefs.h <<\EOF
5962#define const
5963EOF
5964
5965fi
5966
bce58c09 5967echo $ac_n "checking for inline""... $ac_c" 1>&6
086ec9eb 5968echo "configure:5969: checking for inline" >&5
bce58c09
JB
5969if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5970 echo $ac_n "(cached) $ac_c" 1>&6
5971else
5972 ac_cv_c_inline=no
5973for ac_kw in inline __inline__ __inline; do
5974 cat > conftest.$ac_ext <<EOF
086ec9eb 5975#line 5976 "configure"
bce58c09
JB
5976#include "confdefs.h"
5977
5978int main() {
5979} $ac_kw foo() {
5980; return 0; }
5981EOF
086ec9eb 5982if { (eval echo configure:5983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5983 rm -rf conftest*
5984 ac_cv_c_inline=$ac_kw; break
5985else
5986 echo "configure: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5988fi
5989rm -f conftest*
5990done
5991
5992fi
5993
5994echo "$ac_t""$ac_cv_c_inline" 1>&6
5995case "$ac_cv_c_inline" in
5996 inline | yes) ;;
5997 no) cat >> confdefs.h <<\EOF
5998#define inline
5999EOF
6000 ;;
6001 *) cat >> confdefs.h <<EOF
6002#define inline $ac_cv_c_inline
6003EOF
6004 ;;
6005esac
6006
c906108c 6007
5ee754fc
MK
6008# ------------------------------ #
6009# Checks for library functions. #
6010# ------------------------------ #
6011
46711df8
MK
6012# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6013# for constant arguments. Useless!
6014echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
086ec9eb 6015echo "configure:6016: checking for working alloca.h" >&5
46711df8
MK
6016if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
6017 echo $ac_n "(cached) $ac_c" 1>&6
6018else
6019 cat > conftest.$ac_ext <<EOF
086ec9eb 6020#line 6021 "configure"
46711df8
MK
6021#include "confdefs.h"
6022#include <alloca.h>
6023int main() {
6024char *p = alloca(2 * sizeof(int));
6025; return 0; }
6026EOF
086ec9eb 6027if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6028 rm -rf conftest*
6029 ac_cv_header_alloca_h=yes
6030else
6031 echo "configure: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
6033 rm -rf conftest*
6034 ac_cv_header_alloca_h=no
6035fi
6036rm -f conftest*
6037fi
6038
6039echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6040if test $ac_cv_header_alloca_h = yes; then
6041 cat >> confdefs.h <<\EOF
6042#define HAVE_ALLOCA_H 1
6043EOF
6044
6045fi
6046
6047echo $ac_n "checking for alloca""... $ac_c" 1>&6
086ec9eb 6048echo "configure:6049: checking for alloca" >&5
46711df8
MK
6049if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6050 echo $ac_n "(cached) $ac_c" 1>&6
6051else
6052 cat > conftest.$ac_ext <<EOF
086ec9eb 6053#line 6054 "configure"
46711df8
MK
6054#include "confdefs.h"
6055
6056#ifdef __GNUC__
6057# define alloca __builtin_alloca
6058#else
6059# ifdef _MSC_VER
6060# include <malloc.h>
6061# define alloca _alloca
6062# else
6063# if HAVE_ALLOCA_H
6064# include <alloca.h>
6065# else
6066# ifdef _AIX
6067 #pragma alloca
6068# else
6069# ifndef alloca /* predefined by HP cc +Olibcalls */
6070char *alloca ();
6071# endif
6072# endif
6073# endif
6074# endif
6075#endif
6076
6077int main() {
6078char *p = (char *) alloca(1);
6079; return 0; }
6080EOF
086ec9eb 6081if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6082 rm -rf conftest*
6083 ac_cv_func_alloca_works=yes
6084else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6087 rm -rf conftest*
6088 ac_cv_func_alloca_works=no
6089fi
6090rm -f conftest*
6091fi
6092
6093echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6094if test $ac_cv_func_alloca_works = yes; then
6095 cat >> confdefs.h <<\EOF
6096#define HAVE_ALLOCA 1
6097EOF
6098
6099fi
6100
6101if test $ac_cv_func_alloca_works = no; then
6102 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6103 # that cause trouble. Some versions do not even contain alloca or
6104 # contain a buggy version. If you still want to use their alloca,
6105 # use ar to extract alloca.o from them instead of compiling alloca.c.
6106 ALLOCA=alloca.${ac_objext}
6107 cat >> confdefs.h <<\EOF
6108#define C_ALLOCA 1
6109EOF
6110
6111
6112echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
086ec9eb 6113echo "configure:6114: checking whether alloca needs Cray hooks" >&5
46711df8
MK
6114if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6115 echo $ac_n "(cached) $ac_c" 1>&6
6116else
6117 cat > conftest.$ac_ext <<EOF
086ec9eb 6118#line 6119 "configure"
46711df8
MK
6119#include "confdefs.h"
6120#if defined(CRAY) && ! defined(CRAY2)
6121webecray
6122#else
6123wenotbecray
6124#endif
6125
6126EOF
6127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6128 egrep "webecray" >/dev/null 2>&1; then
6129 rm -rf conftest*
6130 ac_cv_os_cray=yes
6131else
6132 rm -rf conftest*
6133 ac_cv_os_cray=no
6134fi
6135rm -f conftest*
6136
6137fi
6138
6139echo "$ac_t""$ac_cv_os_cray" 1>&6
6140if test $ac_cv_os_cray = yes; then
6141for ac_func in _getb67 GETB67 getb67; do
6142 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6143echo "configure:6144: checking for $ac_func" >&5
46711df8
MK
6144if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6145 echo $ac_n "(cached) $ac_c" 1>&6
6146else
6147 cat > conftest.$ac_ext <<EOF
086ec9eb 6148#line 6149 "configure"
46711df8
MK
6149#include "confdefs.h"
6150/* System header to define __stub macros and hopefully few prototypes,
6151 which can conflict with char $ac_func(); below. */
6152#include <assert.h>
6153/* Override any gcc2 internal prototype to avoid an error. */
6154/* We use char because int might match the return type of a gcc2
6155 builtin and then its argument prototype would still apply. */
6156char $ac_func();
6157
6158int main() {
6159
6160/* The GNU C library defines this for functions which it implements
6161 to always fail with ENOSYS. Some functions are actually named
6162 something starting with __ and the normal name is an alias. */
6163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6164choke me
6165#else
6166$ac_func();
6167#endif
6168
6169; return 0; }
6170EOF
086ec9eb 6171if { (eval echo configure:6172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6172 rm -rf conftest*
6173 eval "ac_cv_func_$ac_func=yes"
6174else
6175 echo "configure: failed program was:" >&5
6176 cat conftest.$ac_ext >&5
6177 rm -rf conftest*
6178 eval "ac_cv_func_$ac_func=no"
6179fi
6180rm -f conftest*
6181fi
6182
6183if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6184 echo "$ac_t""yes" 1>&6
6185 cat >> confdefs.h <<EOF
6186#define CRAY_STACKSEG_END $ac_func
6187EOF
6188
6189 break
6190else
6191 echo "$ac_t""no" 1>&6
6192fi
6193
6194done
6195fi
6196
6197echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
086ec9eb 6198echo "configure:6199: checking stack direction for C alloca" >&5
46711df8
MK
6199if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6200 echo $ac_n "(cached) $ac_c" 1>&6
6201else
6202 if test "$cross_compiling" = yes; then
6203 ac_cv_c_stack_direction=0
6204else
6205 cat > conftest.$ac_ext <<EOF
086ec9eb 6206#line 6207 "configure"
46711df8
MK
6207#include "confdefs.h"
6208find_stack_direction ()
6209{
6210 static char *addr = 0;
6211 auto char dummy;
6212 if (addr == 0)
6213 {
6214 addr = &dummy;
6215 return find_stack_direction ();
6216 }
6217 else
6218 return (&dummy > addr) ? 1 : -1;
6219}
6220main ()
6221{
6222 exit (find_stack_direction() < 0);
6223}
6224EOF
086ec9eb 6225if { (eval echo configure:6226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6226then
6227 ac_cv_c_stack_direction=1
6228else
6229 echo "configure: failed program was:" >&5
6230 cat conftest.$ac_ext >&5
6231 rm -fr conftest*
6232 ac_cv_c_stack_direction=-1
6233fi
6234rm -fr conftest*
6235fi
6236
6237fi
6238
6239echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6240cat >> confdefs.h <<EOF
6241#define STACK_DIRECTION $ac_cv_c_stack_direction
6242EOF
6243
6244fi
6245
d836ee13 6246for ac_hdr in unistd.h
97bf5e38
MK
6247do
6248ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6249echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
086ec9eb 6250echo "configure:6251: checking for $ac_hdr" >&5
74c1b268
AC
6251if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6252 echo $ac_n "(cached) $ac_c" 1>&6
6253else
6254 cat > conftest.$ac_ext <<EOF
086ec9eb 6255#line 6256 "configure"
74c1b268 6256#include "confdefs.h"
97bf5e38 6257#include <$ac_hdr>
74c1b268
AC
6258EOF
6259ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 6260{ (eval echo configure:6261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6261ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6262if test -z "$ac_err"; then
6263 rm -rf conftest*
6264 eval "ac_cv_header_$ac_safe=yes"
6265else
6266 echo "$ac_err" >&5
6267 echo "configure: failed program was:" >&5
6268 cat conftest.$ac_ext >&5
6269 rm -rf conftest*
6270 eval "ac_cv_header_$ac_safe=no"
6271fi
6272rm -f conftest*
6273fi
6274if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6275 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6276 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6277 cat >> confdefs.h <<EOF
6278#define $ac_tr_hdr 1
74c1b268 6279EOF
97bf5e38 6280
74c1b268
AC
6281else
6282 echo "$ac_t""no" 1>&6
6283fi
97bf5e38 6284done
74c1b268 6285
97bf5e38
MK
6286for ac_func in getpagesize
6287do
6288echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6289echo "configure:6290: checking for $ac_func" >&5
97bf5e38 6290if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6291 echo $ac_n "(cached) $ac_c" 1>&6
6292else
6293 cat > conftest.$ac_ext <<EOF
086ec9eb 6294#line 6295 "configure"
74c1b268
AC
6295#include "confdefs.h"
6296/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6297 which can conflict with char $ac_func(); below. */
74c1b268
AC
6298#include <assert.h>
6299/* Override any gcc2 internal prototype to avoid an error. */
6300/* We use char because int might match the return type of a gcc2
6301 builtin and then its argument prototype would still apply. */
97bf5e38 6302char $ac_func();
74c1b268
AC
6303
6304int main() {
6305
6306/* The GNU C library defines this for functions which it implements
6307 to always fail with ENOSYS. Some functions are actually named
6308 something starting with __ and the normal name is an alias. */
97bf5e38 6309#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6310choke me
6311#else
97bf5e38 6312$ac_func();
74c1b268
AC
6313#endif
6314
6315; return 0; }
6316EOF
086ec9eb 6317if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6318 rm -rf conftest*
97bf5e38 6319 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6320else
6321 echo "configure: failed program was:" >&5
6322 cat conftest.$ac_ext >&5
6323 rm -rf conftest*
97bf5e38 6324 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6325fi
6326rm -f conftest*
6327fi
6328
97bf5e38 6329if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6330 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6331 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6332 cat >> confdefs.h <<EOF
6333#define $ac_tr_func 1
6334EOF
6335
74c1b268
AC
6336else
6337 echo "$ac_t""no" 1>&6
6338fi
97bf5e38 6339done
74c1b268 6340
97bf5e38 6341echo $ac_n "checking for working mmap""... $ac_c" 1>&6
086ec9eb 6342echo "configure:6343: checking for working mmap" >&5
97bf5e38
MK
6343if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6344 echo $ac_n "(cached) $ac_c" 1>&6
6345else
6346 if test "$cross_compiling" = yes; then
6347 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6348else
6349 cat > conftest.$ac_ext <<EOF
086ec9eb 6350#line 6351 "configure"
74c1b268 6351#include "confdefs.h"
97bf5e38
MK
6352
6353/* Thanks to Mike Haertel and Jim Avera for this test.
6354 Here is a matrix of mmap possibilities:
6355 mmap private not fixed
6356 mmap private fixed at somewhere currently unmapped
6357 mmap private fixed at somewhere already mapped
6358 mmap shared not fixed
6359 mmap shared fixed at somewhere currently unmapped
6360 mmap shared fixed at somewhere already mapped
6361 For private mappings, we should verify that changes cannot be read()
6362 back from the file, nor mmap's back from the file at a different
6363 address. (There have been systems where private was not correctly
6364 implemented like the infamous i386 svr4.0, and systems where the
6365 VM page cache was not coherent with the filesystem buffer cache
6366 like early versions of FreeBSD and possibly contemporary NetBSD.)
6367 For shared mappings, we should conversely verify that changes get
6368 propogated back to all the places they're supposed to be.
6369
6370 Grep wants private fixed already mapped.
6371 The main things grep needs to know about mmap are:
6372 * does it exist and is it safe to write into the mmap'd area
6373 * how to use it (BSD variants) */
74c1b268 6374#include <sys/types.h>
97bf5e38
MK
6375#include <fcntl.h>
6376#include <sys/mman.h>
6377
6378/* This mess was copied from the GNU getpagesize.h. */
6379#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6380# ifdef HAVE_UNISTD_H
6381# include <unistd.h>
6382# endif
97bf5e38
MK
6383
6384/* Assume that all systems that can run configure have sys/param.h. */
6385# ifndef HAVE_SYS_PARAM_H
6386# define HAVE_SYS_PARAM_H 1
6387# endif
6388
6389# ifdef _SC_PAGESIZE
6390# define getpagesize() sysconf(_SC_PAGESIZE)
6391# else /* no _SC_PAGESIZE */
6392# ifdef HAVE_SYS_PARAM_H
6393# include <sys/param.h>
6394# ifdef EXEC_PAGESIZE
6395# define getpagesize() EXEC_PAGESIZE
6396# else /* no EXEC_PAGESIZE */
6397# ifdef NBPG
6398# define getpagesize() NBPG * CLSIZE
6399# ifndef CLSIZE
6400# define CLSIZE 1
6401# endif /* no CLSIZE */
6402# else /* no NBPG */
6403# ifdef NBPC
6404# define getpagesize() NBPC
6405# else /* no NBPC */
6406# ifdef PAGESIZE
6407# define getpagesize() PAGESIZE
6408# endif /* PAGESIZE */
6409# endif /* no NBPC */
6410# endif /* no NBPG */
6411# endif /* no EXEC_PAGESIZE */
6412# else /* no HAVE_SYS_PARAM_H */
6413# define getpagesize() 8192 /* punt totally */
6414# endif /* no HAVE_SYS_PARAM_H */
6415# endif /* no _SC_PAGESIZE */
6416
6417#endif /* no HAVE_GETPAGESIZE */
6418
74c1b268 6419#ifdef __cplusplus
97bf5e38 6420extern "C" { void *malloc(unsigned); }
74c1b268 6421#else
97bf5e38 6422char *malloc();
74c1b268 6423#endif
74c1b268 6424
97bf5e38
MK
6425int
6426main()
6427{
6428 char *data, *data2, *data3;
6429 int i, pagesize;
6430 int fd;
74c1b268 6431
97bf5e38 6432 pagesize = getpagesize();
74c1b268 6433
97bf5e38
MK
6434 /*
6435 * First, make a file with some known garbage in it.
6436 */
6437 data = malloc(pagesize);
6438 if (!data)
6439 exit(1);
6440 for (i = 0; i < pagesize; ++i)
6441 *(data + i) = rand();
6442 umask(0);
6443 fd = creat("conftestmmap", 0600);
6444 if (fd < 0)
6445 exit(1);
6446 if (write(fd, data, pagesize) != pagesize)
6447 exit(1);
6448 close(fd);
74c1b268 6449
97bf5e38
MK
6450 /*
6451 * Next, try to mmap the file at a fixed address which
6452 * already has something else allocated at it. If we can,
6453 * also make sure that we see the same garbage.
6454 */
6455 fd = open("conftestmmap", O_RDWR);
6456 if (fd < 0)
6457 exit(1);
6458 data2 = malloc(2 * pagesize);
6459 if (!data2)
6460 exit(1);
6461 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6462 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6463 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6464 exit(1);
6465 for (i = 0; i < pagesize; ++i)
6466 if (*(data + i) != *(data2 + i))
6467 exit(1);
74c1b268 6468
97bf5e38
MK
6469 /*
6470 * Finally, make sure that changes to the mapped area
6471 * do not percolate back to the file as seen by read().
6472 * (This is a bug on some variants of i386 svr4.0.)
6473 */
6474 for (i = 0; i < pagesize; ++i)
6475 *(data2 + i) = *(data2 + i) + 1;
6476 data3 = malloc(pagesize);
6477 if (!data3)
6478 exit(1);
6479 if (read(fd, data3, pagesize) != pagesize)
6480 exit(1);
6481 for (i = 0; i < pagesize; ++i)
6482 if (*(data + i) != *(data3 + i))
6483 exit(1);
6484 close(fd);
6485 unlink("conftestmmap");
6486 exit(0);
74c1b268 6487}
97bf5e38 6488
74c1b268 6489EOF
086ec9eb 6490if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6491then
97bf5e38 6492 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6493else
6494 echo "configure: failed program was:" >&5
6495 cat conftest.$ac_ext >&5
6496 rm -fr conftest*
97bf5e38 6497 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6498fi
6499rm -fr conftest*
6500fi
6501
6502fi
6503
97bf5e38
MK
6504echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6505if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6506 cat >> confdefs.h <<\EOF
97bf5e38 6507#define HAVE_MMAP 1
74c1b268
AC
6508EOF
6509
6510fi
6511
97bf5e38 6512echo $ac_n "checking for pid_t""... $ac_c" 1>&6
086ec9eb 6513echo "configure:6514: checking for pid_t" >&5
97bf5e38 6514if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6515 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6516else
6517 cat > conftest.$ac_ext <<EOF
086ec9eb 6518#line 6519 "configure"
0200359f 6519#include "confdefs.h"
97bf5e38
MK
6520#include <sys/types.h>
6521#if STDC_HEADERS
6522#include <stdlib.h>
6523#include <stddef.h>
0200359f 6524#endif
0200359f 6525EOF
97bf5e38
MK
6526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6527 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6528 rm -rf conftest*
6529 ac_cv_type_pid_t=yes
0200359f 6530else
97bf5e38
MK
6531 rm -rf conftest*
6532 ac_cv_type_pid_t=no
0200359f 6533fi
97bf5e38 6534rm -f conftest*
0200359f
MK
6535
6536fi
97bf5e38
MK
6537echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6538if test $ac_cv_type_pid_t = no; then
0200359f 6539 cat >> confdefs.h <<\EOF
97bf5e38 6540#define pid_t int
0200359f
MK
6541EOF
6542
6543fi
6544
97bf5e38
MK
6545ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6546echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
086ec9eb 6547echo "configure:6548: checking for vfork.h" >&5
97bf5e38 6548if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6549 echo $ac_n "(cached) $ac_c" 1>&6
6550else
6551 cat > conftest.$ac_ext <<EOF
086ec9eb 6552#line 6553 "configure"
72473524 6553#include "confdefs.h"
97bf5e38 6554#include <vfork.h>
72473524 6555EOF
97bf5e38 6556ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 6557{ (eval echo configure:6558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6558ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6559if test -z "$ac_err"; then
72473524 6560 rm -rf conftest*
97bf5e38 6561 eval "ac_cv_header_$ac_safe=yes"
72473524 6562else
97bf5e38 6563 echo "$ac_err" >&5
72473524
DJ
6564 echo "configure: failed program was:" >&5
6565 cat conftest.$ac_ext >&5
6566 rm -rf conftest*
97bf5e38 6567 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6568fi
6569rm -f conftest*
6570fi
97bf5e38
MK
6571if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6572 echo "$ac_t""yes" 1>&6
72473524 6573 cat >> confdefs.h <<\EOF
97bf5e38 6574#define HAVE_VFORK_H 1
72473524
DJ
6575EOF
6576
97bf5e38
MK
6577else
6578 echo "$ac_t""no" 1>&6
72473524 6579fi
c906108c 6580
97bf5e38 6581echo $ac_n "checking for working vfork""... $ac_c" 1>&6
086ec9eb 6582echo "configure:6583: checking for working vfork" >&5
97bf5e38
MK
6583if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6584 echo $ac_n "(cached) $ac_c" 1>&6
6585else
6586 if test "$cross_compiling" = yes; then
6587 echo $ac_n "checking for vfork""... $ac_c" 1>&6
086ec9eb 6588echo "configure:6589: checking for vfork" >&5
97bf5e38 6589if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6590 echo $ac_n "(cached) $ac_c" 1>&6
6591else
6592 cat > conftest.$ac_ext <<EOF
086ec9eb 6593#line 6594 "configure"
2b2d558c 6594#include "confdefs.h"
97bf5e38
MK
6595/* System header to define __stub macros and hopefully few prototypes,
6596 which can conflict with char vfork(); below. */
6597#include <assert.h>
6598/* Override any gcc2 internal prototype to avoid an error. */
6599/* We use char because int might match the return type of a gcc2
6600 builtin and then its argument prototype would still apply. */
6601char vfork();
2b2d558c
MK
6602
6603int main() {
97bf5e38
MK
6604
6605/* The GNU C library defines this for functions which it implements
6606 to always fail with ENOSYS. Some functions are actually named
6607 something starting with __ and the normal name is an alias. */
6608#if defined (__stub_vfork) || defined (__stub___vfork)
6609choke me
6610#else
6611vfork();
6612#endif
6613
2b2d558c
MK
6614; return 0; }
6615EOF
086ec9eb 6616if { (eval echo configure:6617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6617 rm -rf conftest*
97bf5e38 6618 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6619else
6620 echo "configure: failed program was:" >&5
6621 cat conftest.$ac_ext >&5
6622 rm -rf conftest*
97bf5e38 6623 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6624fi
6625rm -f conftest*
6626fi
6627
97bf5e38
MK
6628if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6629 echo "$ac_t""yes" 1>&6
6630 :
6631else
6632 echo "$ac_t""no" 1>&6
2b2d558c
MK
6633fi
6634
97bf5e38 6635ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6636else
6637 cat > conftest.$ac_ext <<EOF
086ec9eb 6638#line 6639 "configure"
7dfa765c 6639#include "confdefs.h"
97bf5e38
MK
6640/* Thanks to Paul Eggert for this test. */
6641#include <stdio.h>
6642#include <sys/types.h>
6643#include <sys/stat.h>
6644#ifdef HAVE_UNISTD_H
6645#include <unistd.h>
6646#endif
6647#ifdef HAVE_VFORK_H
6648#include <vfork.h>
6649#endif
6650/* On some sparc systems, changes by the child to local and incoming
6651 argument registers are propagated back to the parent.
6652 The compiler is told about this with #include <vfork.h>,
6653 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6654 Test for this by using a static variable whose address
6655 is put into a register that is clobbered by the vfork. */
6656static
6657#ifdef __cplusplus
6658sparc_address_test (int arg)
6659#else
6660sparc_address_test (arg) int arg;
6661#endif
6662{
6663 static pid_t child;
6664 if (!child) {
6665 child = vfork ();
6666 if (child < 0) {
6667 perror ("vfork");
6668 _exit(2);
6669 }
6670 if (!child) {
6671 arg = getpid();
6672 write(-1, "", 0);
6673 _exit (arg);
6674 }
6675 }
6676}
6677main() {
6678 pid_t parent = getpid ();
6679 pid_t child;
7dfa765c 6680
97bf5e38 6681 sparc_address_test ();
7dfa765c 6682
97bf5e38 6683 child = vfork ();
7dfa765c 6684
97bf5e38
MK
6685 if (child == 0) {
6686 /* Here is another test for sparc vfork register problems.
6687 This test uses lots of local variables, at least
6688 as many local variables as main has allocated so far
6689 including compiler temporaries. 4 locals are enough for
6690 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6691 A buggy compiler should reuse the register of parent
6692 for one of the local variables, since it will think that
6693 parent can't possibly be used any more in this routine.
6694 Assigning to the local variable will thus munge parent
6695 in the parent process. */
6696 pid_t
6697 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6698 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6699 /* Convince the compiler that p..p7 are live; otherwise, it might
6700 use the same hardware register for all 8 local variables. */
6701 if (p != p1 || p != p2 || p != p3 || p != p4
6702 || p != p5 || p != p6 || p != p7)
6703 _exit(1);
7dfa765c 6704
97bf5e38
MK
6705 /* On some systems (e.g. IRIX 3.3),
6706 vfork doesn't separate parent from child file descriptors.
6707 If the child closes a descriptor before it execs or exits,
6708 this munges the parent's descriptor as well.
6709 Test for this by closing stdout in the child. */
6710 _exit(close(fileno(stdout)) != 0);
6711 } else {
6712 int status;
6713 struct stat st;
64bb1671 6714
97bf5e38
MK
6715 while (wait(&status) != child)
6716 ;
6717 exit(
6718 /* Was there some problem with vforking? */
6719 child < 0
64bb1671 6720
97bf5e38
MK
6721 /* Did the child fail? (This shouldn't happen.) */
6722 || status
64bb1671 6723
97bf5e38
MK
6724 /* Did the vfork/compiler bug occur? */
6725 || parent != getpid()
6726
6727 /* Did the file descriptor bug occur? */
6728 || fstat(fileno(stdout), &st) != 0
6729 );
6730 }
6731}
5c44784c 6732EOF
086ec9eb 6733if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6734then
6735 ac_cv_func_vfork_works=yes
5c44784c
JM
6736else
6737 echo "configure: failed program was:" >&5
6738 cat conftest.$ac_ext >&5
97bf5e38
MK
6739 rm -fr conftest*
6740 ac_cv_func_vfork_works=no
5c44784c 6741fi
97bf5e38 6742rm -fr conftest*
5c44784c
JM
6743fi
6744
0afdd437
MK
6745fi
6746
97bf5e38
MK
6747echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6748if test $ac_cv_func_vfork_works = no; then
0afdd437 6749 cat >> confdefs.h <<\EOF
97bf5e38 6750#define vfork fork
0afdd437
MK
6751EOF
6752
6753fi
6754
97bf5e38
MK
6755for ac_func in canonicalize_file_name realpath
6756do
6757echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6758echo "configure:6759: checking for $ac_func" >&5
97bf5e38 6759if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6760 echo $ac_n "(cached) $ac_c" 1>&6
6761else
6762 cat > conftest.$ac_ext <<EOF
086ec9eb 6763#line 6764 "configure"
7e89e357 6764#include "confdefs.h"
97bf5e38
MK
6765/* System header to define __stub macros and hopefully few prototypes,
6766 which can conflict with char $ac_func(); below. */
6767#include <assert.h>
6768/* Override any gcc2 internal prototype to avoid an error. */
6769/* We use char because int might match the return type of a gcc2
6770 builtin and then its argument prototype would still apply. */
6771char $ac_func();
6772
7e89e357 6773int main() {
97bf5e38
MK
6774
6775/* The GNU C library defines this for functions which it implements
6776 to always fail with ENOSYS. Some functions are actually named
6777 something starting with __ and the normal name is an alias. */
6778#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6779choke me
6780#else
6781$ac_func();
6782#endif
6783
7e89e357
JT
6784; return 0; }
6785EOF
086ec9eb 6786if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6787 rm -rf conftest*
97bf5e38 6788 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6789else
6790 echo "configure: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 rm -rf conftest*
97bf5e38 6793 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6794fi
6795rm -f conftest*
6796fi
6797
97bf5e38
MK
6798if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6799 echo "$ac_t""yes" 1>&6
6800 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6801 cat >> confdefs.h <<EOF
6802#define $ac_tr_func 1
7e89e357 6803EOF
97bf5e38
MK
6804
6805else
6806 echo "$ac_t""no" 1>&6
7e89e357 6807fi
97bf5e38 6808done
7e89e357 6809
97bf5e38 6810for ac_func in poll
7be570e7
JM
6811do
6812echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6813echo "configure:6814: checking for $ac_func" >&5
7be570e7
JM
6814if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6815 echo $ac_n "(cached) $ac_c" 1>&6
6816else
6817 cat > conftest.$ac_ext <<EOF
086ec9eb 6818#line 6819 "configure"
7be570e7
JM
6819#include "confdefs.h"
6820/* System header to define __stub macros and hopefully few prototypes,
6821 which can conflict with char $ac_func(); below. */
6822#include <assert.h>
6823/* Override any gcc2 internal prototype to avoid an error. */
6824/* We use char because int might match the return type of a gcc2
6825 builtin and then its argument prototype would still apply. */
6826char $ac_func();
6827
6828int main() {
6829
6830/* The GNU C library defines this for functions which it implements
6831 to always fail with ENOSYS. Some functions are actually named
6832 something starting with __ and the normal name is an alias. */
6833#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6834choke me
6835#else
6836$ac_func();
6837#endif
6838
6839; return 0; }
6840EOF
086ec9eb 6841if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6842 rm -rf conftest*
6843 eval "ac_cv_func_$ac_func=yes"
6844else
6845 echo "configure: failed program was:" >&5
6846 cat conftest.$ac_ext >&5
6847 rm -rf conftest*
6848 eval "ac_cv_func_$ac_func=no"
6849fi
6850rm -f conftest*
6851fi
6852
6853if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6854 echo "$ac_t""yes" 1>&6
6855 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6856 cat >> confdefs.h <<EOF
6857#define $ac_tr_func 1
6858EOF
6859
6860else
6861 echo "$ac_t""no" 1>&6
6862fi
6863done
6864
6865for ac_func in pread64
6866do
6867echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6868echo "configure:6869: checking for $ac_func" >&5
14abd0fb
MK
6869if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6870 echo $ac_n "(cached) $ac_c" 1>&6
6871else
6872 cat > conftest.$ac_ext <<EOF
086ec9eb 6873#line 6874 "configure"
14abd0fb
MK
6874#include "confdefs.h"
6875/* System header to define __stub macros and hopefully few prototypes,
6876 which can conflict with char $ac_func(); below. */
6877#include <assert.h>
6878/* Override any gcc2 internal prototype to avoid an error. */
6879/* We use char because int might match the return type of a gcc2
6880 builtin and then its argument prototype would still apply. */
6881char $ac_func();
6882
6883int main() {
6884
6885/* The GNU C library defines this for functions which it implements
6886 to always fail with ENOSYS. Some functions are actually named
6887 something starting with __ and the normal name is an alias. */
6888#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6889choke me
6890#else
6891$ac_func();
6892#endif
6893
6894; return 0; }
6895EOF
086ec9eb 6896if { (eval echo configure:6897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6897 rm -rf conftest*
6898 eval "ac_cv_func_$ac_func=yes"
6899else
6900 echo "configure: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 rm -rf conftest*
6903 eval "ac_cv_func_$ac_func=no"
6904fi
6905rm -f conftest*
6906fi
6907
6908if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6909 echo "$ac_t""yes" 1>&6
6910 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6911 cat >> confdefs.h <<EOF
6912#define $ac_tr_func 1
6913EOF
6914
6915else
6916 echo "$ac_t""no" 1>&6
6917fi
6918done
6919
97bf5e38
MK
6920for ac_func in sbrk
6921do
6922echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6923echo "configure:6924: checking for $ac_func" >&5
97bf5e38 6924if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6925 echo $ac_n "(cached) $ac_c" 1>&6
6926else
6927 cat > conftest.$ac_ext <<EOF
086ec9eb 6928#line 6929 "configure"
c906108c 6929#include "confdefs.h"
97bf5e38
MK
6930/* System header to define __stub macros and hopefully few prototypes,
6931 which can conflict with char $ac_func(); below. */
6932#include <assert.h>
6933/* Override any gcc2 internal prototype to avoid an error. */
6934/* We use char because int might match the return type of a gcc2
6935 builtin and then its argument prototype would still apply. */
6936char $ac_func();
c906108c 6937
97bf5e38
MK
6938int main() {
6939
6940/* The GNU C library defines this for functions which it implements
6941 to always fail with ENOSYS. Some functions are actually named
6942 something starting with __ and the normal name is an alias. */
6943#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6944choke me
c906108c 6945#else
97bf5e38 6946$ac_func();
c906108c 6947#endif
97bf5e38 6948
c906108c
SS
6949; return 0; }
6950EOF
086ec9eb 6951if { (eval echo configure:6952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6952 rm -rf conftest*
97bf5e38 6953 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6954else
6955 echo "configure: failed program was:" >&5
6956 cat conftest.$ac_ext >&5
6957 rm -rf conftest*
97bf5e38 6958 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6959fi
6960rm -f conftest*
6961fi
6962
97bf5e38
MK
6963if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6964 echo "$ac_t""yes" 1>&6
6965 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6966 cat >> confdefs.h <<EOF
6967#define $ac_tr_func 1
c906108c 6968EOF
97bf5e38
MK
6969
6970else
6971 echo "$ac_t""no" 1>&6
c906108c 6972fi
97bf5e38 6973done
c906108c 6974
97bf5e38
MK
6975for ac_func in setpgid setpgrp
6976do
6977echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 6978echo "configure:6979: checking for $ac_func" >&5
97bf5e38 6979if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6980 echo $ac_n "(cached) $ac_c" 1>&6
6981else
6982 cat > conftest.$ac_ext <<EOF
086ec9eb 6983#line 6984 "configure"
c906108c 6984#include "confdefs.h"
97bf5e38
MK
6985/* System header to define __stub macros and hopefully few prototypes,
6986 which can conflict with char $ac_func(); below. */
6987#include <assert.h>
6988/* Override any gcc2 internal prototype to avoid an error. */
6989/* We use char because int might match the return type of a gcc2
6990 builtin and then its argument prototype would still apply. */
6991char $ac_func();
c906108c 6992
97bf5e38
MK
6993int main() {
6994
6995/* The GNU C library defines this for functions which it implements
6996 to always fail with ENOSYS. Some functions are actually named
6997 something starting with __ and the normal name is an alias. */
6998#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6999choke me
c906108c 7000#else
97bf5e38 7001$ac_func();
c906108c 7002#endif
97bf5e38 7003
c906108c
SS
7004; return 0; }
7005EOF
086ec9eb 7006if { (eval echo configure:7007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7007 rm -rf conftest*
97bf5e38 7008 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7009else
7010 echo "configure: failed program was:" >&5
7011 cat conftest.$ac_ext >&5
7012 rm -rf conftest*
97bf5e38 7013 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7014fi
7015rm -f conftest*
7016fi
7017
97bf5e38
MK
7018if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7019 echo "$ac_t""yes" 1>&6
7020 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7021 cat >> confdefs.h <<EOF
7022#define $ac_tr_func 1
c906108c 7023EOF
97bf5e38
MK
7024
7025else
7026 echo "$ac_t""no" 1>&6
c906108c 7027fi
97bf5e38 7028done
c906108c 7029
e1ea1d75 7030for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
7031do
7032echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 7033echo "configure:7034: checking for $ac_func" >&5
97bf5e38 7034if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7035 echo $ac_n "(cached) $ac_c" 1>&6
7036else
7037 cat > conftest.$ac_ext <<EOF
086ec9eb 7038#line 7039 "configure"
c906108c 7039#include "confdefs.h"
97bf5e38
MK
7040/* System header to define __stub macros and hopefully few prototypes,
7041 which can conflict with char $ac_func(); below. */
7042#include <assert.h>
7043/* Override any gcc2 internal prototype to avoid an error. */
7044/* We use char because int might match the return type of a gcc2
7045 builtin and then its argument prototype would still apply. */
7046char $ac_func();
c906108c 7047
97bf5e38
MK
7048int main() {
7049
7050/* The GNU C library defines this for functions which it implements
7051 to always fail with ENOSYS. Some functions are actually named
7052 something starting with __ and the normal name is an alias. */
7053#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7054choke me
c906108c 7055#else
97bf5e38 7056$ac_func();
c906108c 7057#endif
97bf5e38 7058
c906108c
SS
7059; return 0; }
7060EOF
086ec9eb 7061if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7062 rm -rf conftest*
97bf5e38 7063 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7064else
7065 echo "configure: failed program was:" >&5
7066 cat conftest.$ac_ext >&5
7067 rm -rf conftest*
97bf5e38 7068 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7069fi
7070rm -f conftest*
7071fi
7072
97bf5e38
MK
7073if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7074 echo "$ac_t""yes" 1>&6
7075 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7076 cat >> confdefs.h <<EOF
7077#define $ac_tr_func 1
c906108c 7078EOF
e1ea1d75 7079
97bf5e38
MK
7080else
7081 echo "$ac_t""no" 1>&6
c906108c 7082fi
97bf5e38 7083done
c906108c 7084
97bf5e38
MK
7085for ac_func in socketpair
7086do
7087echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 7088echo "configure:7089: checking for $ac_func" >&5
97bf5e38 7089if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7090 echo $ac_n "(cached) $ac_c" 1>&6
7091else
7092 cat > conftest.$ac_ext <<EOF
086ec9eb 7093#line 7094 "configure"
c906108c 7094#include "confdefs.h"
97bf5e38
MK
7095/* System header to define __stub macros and hopefully few prototypes,
7096 which can conflict with char $ac_func(); below. */
7097#include <assert.h>
7098/* Override any gcc2 internal prototype to avoid an error. */
7099/* We use char because int might match the return type of a gcc2
7100 builtin and then its argument prototype would still apply. */
7101char $ac_func();
c906108c 7102
97bf5e38
MK
7103int main() {
7104
7105/* The GNU C library defines this for functions which it implements
7106 to always fail with ENOSYS. Some functions are actually named
7107 something starting with __ and the normal name is an alias. */
7108#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7109choke me
c906108c 7110#else
97bf5e38 7111$ac_func();
c906108c 7112#endif
97bf5e38 7113
c906108c
SS
7114; return 0; }
7115EOF
086ec9eb 7116if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7117 rm -rf conftest*
97bf5e38 7118 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7119else
7120 echo "configure: failed program was:" >&5
7121 cat conftest.$ac_ext >&5
7122 rm -rf conftest*
97bf5e38 7123 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7124fi
7125rm -f conftest*
7126fi
7127
97bf5e38
MK
7128if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7129 echo "$ac_t""yes" 1>&6
7130 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7131 cat >> confdefs.h <<EOF
7132#define $ac_tr_func 1
c906108c 7133EOF
97bf5e38
MK
7134
7135else
7136 echo "$ac_t""no" 1>&6
c906108c 7137fi
97bf5e38 7138done
c906108c 7139
b757528f
JJ
7140for ac_func in syscall
7141do
7142echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
086ec9eb 7143echo "configure:7144: checking for $ac_func" >&5
b757528f
JJ
7144if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7145 echo $ac_n "(cached) $ac_c" 1>&6
7146else
7147 cat > conftest.$ac_ext <<EOF
086ec9eb 7148#line 7149 "configure"
b757528f
JJ
7149#include "confdefs.h"
7150/* System header to define __stub macros and hopefully few prototypes,
7151 which can conflict with char $ac_func(); below. */
7152#include <assert.h>
7153/* Override any gcc2 internal prototype to avoid an error. */
7154/* We use char because int might match the return type of a gcc2
7155 builtin and then its argument prototype would still apply. */
7156char $ac_func();
7157
7158int main() {
7159
7160/* The GNU C library defines this for functions which it implements
7161 to always fail with ENOSYS. Some functions are actually named
7162 something starting with __ and the normal name is an alias. */
7163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7164choke me
7165#else
7166$ac_func();
7167#endif
7168
7169; return 0; }
7170EOF
086ec9eb 7171if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7172 rm -rf conftest*
7173 eval "ac_cv_func_$ac_func=yes"
7174else
7175 echo "configure: failed program was:" >&5
7176 cat conftest.$ac_ext >&5
7177 rm -rf conftest*
7178 eval "ac_cv_func_$ac_func=no"
7179fi
7180rm -f conftest*
7181fi
7182
7183if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7184 echo "$ac_t""yes" 1>&6
7185 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7186 cat >> confdefs.h <<EOF
7187#define $ac_tr_func 1
7188EOF
7189
7190else
7191 echo "$ac_t""no" 1>&6
7192fi
7193done
7194
97bf5e38 7195
086ec9eb
MK
7196# Check the return and argument types of ptrace. No canned test for
7197# this, so roll our own.
7198gdb_ptrace_headers='
7199#if HAVE_SYS_TYPES_H
7200# include <sys/types.h>
7201#endif
7202#if HAVE_SYS_PTRACE_H
7203# include <sys/ptrace.h>
7204#endif
7205#if HAVE_UNISTD_H
7206# include <unistd.h>
7207#endif
7208'
7209# There is no point in checking if we don't have a prototype.
7210for ac_func in ptrace
7211do
7212 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7213echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
7214echo "configure:7215: checking whether $ac_func is declared" >&5
7215if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
7216 echo $ac_n "(cached) $ac_c" 1>&6
7217else
7218 cat > conftest.$ac_ext <<EOF
7219#line 7220 "configure"
7220#include "confdefs.h"
7221#undef $ac_tr_decl
7222#define $ac_tr_decl 1
7223 $gdb_ptrace_headers
7224
7225int main() {
7226#ifndef $ac_func
7227char *(*pfn) = (char *(*)) $ac_func ;
7228#endif
7229; return 0; }
7230EOF
7231if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7232 rm -rf conftest*
7233 eval "gcc_cv_have_decl_$ac_func=yes"
7234else
7235 echo "configure: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7237 rm -rf conftest*
7238 eval "gcc_cv_have_decl_$ac_func=no"
7239fi
7240rm -f conftest*
7241fi
7242
7243if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
7244 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
7245#define $ac_tr_decl 1
7246EOF
7247
7248else
7249 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
7250#define $ac_tr_decl 0
7251EOF
7252
7253 : ${gdb_cv_func_ptrace_ret='int'}
7254 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7255
7256fi
7257
7258done
7259if test x = y ; then
7260 cat >> confdefs.h <<\EOF
7261#define HAVE_DECL_PTRACE 1
7262EOF
7263fi
7264
7265# Check return type.
7266echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
7267echo "configure:7268: checking return type of ptrace" >&5
7268if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
7269 echo $ac_n "(cached) $ac_c" 1>&6
7270else
7271 cat > conftest.$ac_ext <<EOF
7272#line 7273 "configure"
7273#include "confdefs.h"
7274$gdb_ptrace_headers
7275int main() {
7276extern long ptrace ();
7277; return 0; }
7278EOF
7279if { (eval echo configure:7280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7280 rm -rf conftest*
7281 gdb_cv_func_ptrace_ret='long'
7282else
7283 echo "configure: failed program was:" >&5
7284 cat conftest.$ac_ext >&5
7285 rm -rf conftest*
7286 gdb_cv_func_ptrace_ret='int'
7287fi
7288rm -f conftest*
7289fi
7290
7291echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
7292cat >> confdefs.h <<EOF
7293#define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7294EOF
7295
7296# Check argument types.
7297echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
7298echo "configure:7299: checking types of arguments for ptrace" >&5
7299if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
7300 echo $ac_n "(cached) $ac_c" 1>&6
7301else
7302
7303for gdb_arg1 in 'int' 'long'; do
7304 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7305 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
7306 for gdb_arg4 in 'int' 'long'; do
7307 cat > conftest.$ac_ext <<EOF
7308#line 7309 "configure"
7309#include "confdefs.h"
7310$gdb_ptrace_headers
7311int main() {
7312
7313extern $gdb_cv_func_ptrace_ret
7314 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7315
7316; return 0; }
7317EOF
7318if { (eval echo configure:7319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7319 rm -rf conftest*
7320 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7321 break 4;
7322else
7323 echo "configure: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325fi
7326rm -f conftest*
7327 for gdb_arg5 in 'int *' 'int' 'long'; do
7328 cat > conftest.$ac_ext <<EOF
7329#line 7330 "configure"
7330#include "confdefs.h"
7331$gdb_ptrace_headers
7332int main() {
7333
7334extern $gdb_cv_func_ptrace_ret
7335 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7336
7337; return 0; }
7338EOF
7339if { (eval echo configure:7340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7340 rm -rf conftest*
7341
7342gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7343 break 5;
7344else
7345 echo "configure: failed program was:" >&5
7346 cat conftest.$ac_ext >&5
7347fi
7348rm -f conftest*
7349 done
7350 done
7351 done
7352 done
7353done
7354# Provide a safe default value.
7355: ${gdb_cv_func_ptrace_args='int,int,long,long'}
7356
7357fi
7358
7359echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6
7360ac_save_IFS=$IFS; IFS=','
7361set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7362IFS=$ac_save_IFS
7363shift
7364cat >> confdefs.h <<EOF
7365#define PTRACE_TYPE_ARG3 ($3)
7366EOF
7367
7368if test -n "$5"; then
7369 cat >> confdefs.h <<EOF
7370#define PTRACE_TYPE_ARG5 ($5)
7371EOF
7372
7373fi
7374
97bf5e38
MK
7375if test "$cross_compiling" = no; then
7376 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
086ec9eb 7377echo "configure:7378: checking whether setpgrp takes no argument" >&5
97bf5e38 7378if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7379 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7380else
7381 if test "$cross_compiling" = yes; then
7382 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7383else
7384 cat > conftest.$ac_ext <<EOF
086ec9eb 7385#line 7386 "configure"
c906108c
SS
7386#include "confdefs.h"
7387
c906108c
SS
7388#ifdef HAVE_UNISTD_H
7389#include <unistd.h>
7390#endif
97bf5e38
MK
7391
7392/*
7393 * If this system has a BSD-style setpgrp, which takes arguments, exit
7394 * successfully.
7395 */
7396main()
7397{
7398 if (setpgrp(1,1) == -1)
7399 exit(0);
7400 else
7401 exit(1);
7402}
7403
c906108c 7404EOF
086ec9eb 7405if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7406then
7407 ac_cv_func_setpgrp_void=no
c906108c
SS
7408else
7409 echo "configure: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
97bf5e38
MK
7411 rm -fr conftest*
7412 ac_cv_func_setpgrp_void=yes
c906108c 7413fi
97bf5e38 7414rm -fr conftest*
c906108c
SS
7415fi
7416
97bf5e38
MK
7417
7418fi
7419
7420echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7421if test $ac_cv_func_setpgrp_void = yes; then
7422 cat >> confdefs.h <<\EOF
7423#define SETPGRP_VOID 1
c906108c
SS
7424EOF
7425
7426fi
7427
97bf5e38
MK
7428else
7429 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
086ec9eb 7430echo "configure:7431: checking whether setpgrp takes no argument" >&5
97bf5e38 7431if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7432 echo $ac_n "(cached) $ac_c" 1>&6
7433else
7434 cat > conftest.$ac_ext <<EOF
086ec9eb 7435#line 7436 "configure"
b83266a0
SS
7436#include "confdefs.h"
7437
b83266a0 7438#include <unistd.h>
97bf5e38 7439
b83266a0 7440int main() {
97bf5e38
MK
7441
7442 if (setpgrp(1,1) == -1)
7443 exit (0);
7444 else
7445 exit (1);
7446
b83266a0
SS
7447; return 0; }
7448EOF
086ec9eb 7449if { (eval echo configure:7450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7450 rm -rf conftest*
97bf5e38 7451 ac_cv_func_setpgrp_void=no
b83266a0
SS
7452else
7453 echo "configure: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7455 rm -rf conftest*
97bf5e38 7456 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7457fi
7458rm -f conftest*
7459fi
7460
97bf5e38
MK
7461echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7462if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7463 cat >> confdefs.h <<\EOF
97bf5e38 7464#define SETPGRP_VOID 1
b83266a0
SS
7465EOF
7466
97bf5e38 7467fi
b83266a0
SS
7468fi
7469
97bf5e38
MK
7470# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7471# since sigsetjmp might only be defined as a macro.
7472echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
086ec9eb 7473echo "configure:7474: checking for sigsetjmp" >&5
97bf5e38 7474if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7475 echo $ac_n "(cached) $ac_c" 1>&6
7476else
7477 cat > conftest.$ac_ext <<EOF
086ec9eb 7478#line 7479 "configure"
a4db0f07
RH
7479#include "confdefs.h"
7480
97bf5e38
MK
7481#include <setjmp.h>
7482
a4db0f07 7483int main() {
97bf5e38 7484sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7485; return 0; }
7486EOF
086ec9eb 7487if { (eval echo configure:7488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7488 rm -rf conftest*
97bf5e38 7489 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7490else
7491 echo "configure: failed program was:" >&5
7492 cat conftest.$ac_ext >&5
7493 rm -rf conftest*
97bf5e38 7494 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7495fi
7496rm -f conftest*
7497fi
7498
97bf5e38
MK
7499echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7500if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7501 cat >> confdefs.h <<\EOF
97bf5e38 7502#define HAVE_SIGSETJMP 1
a4db0f07
RH
7503EOF
7504
7505fi
c906108c 7506
06825bd1
MK
7507# Assume we'll default to using the included libiberty regex.
7508gdb_use_included_regex=yes
7509
7510# However, if the system regex is GNU regex, then default to *not*
7511# using the included regex.
7512echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
086ec9eb 7513echo "configure:7514: checking for GNU regex" >&5
06825bd1
MK
7514if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7515 echo $ac_n "(cached) $ac_c" 1>&6
7516else
7517 cat > conftest.$ac_ext <<EOF
086ec9eb 7518#line 7519 "configure"
06825bd1
MK
7519#include "confdefs.h"
7520#include <gnu-versions.h>
7521int main() {
7522#define REGEX_INTERFACE_VERSION 1
7523#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7524# error "Version mismatch"
7525#endif
7526; return 0; }
7527EOF
086ec9eb 7528if { (eval echo configure:7529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7529 rm -rf conftest*
7530 gdb_cv_have_gnu_regex=yes
7531else
7532 echo "configure: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534 rm -rf conftest*
7535 gdb_cv_have_gnu_regex=no
7536fi
7537rm -f conftest*
7538fi
7539
7540echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7541if test $gdb_cv_have_gnu_regex = yes; then
7542 gdb_use_included_regex=no
7543fi
7544
7545# Check whether --with-included-regex or --without-included-regex was given.
7546if test "${with_included_regex+set}" = set; then
7547 withval="$with_included_regex"
7548 gdb_with_regex=$withval
7549else
7550 gdb_with_regex=$gdb_use_included_regex
7551fi
7552
7553if test "$gdb_with_regex" = yes; then
7554 cat >> confdefs.h <<\EOF
7555#define USE_INCLUDED_REGEX 1
7556EOF
7557
7558fi
7559
70f9f479
MK
7560# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7561echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
086ec9eb 7562echo "configure:7563: checking for td_pcb in struct thread" >&5
70f9f479
MK
7563if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7564 echo $ac_n "(cached) $ac_c" 1>&6
7565else
7566 cat > conftest.$ac_ext <<EOF
086ec9eb 7567#line 7568 "configure"
70f9f479 7568#include "confdefs.h"
d15be926 7569#include <sys/param.h>
70f9f479
MK
7570#include <sys/proc.h>
7571int main() {
7572struct thread td; td.td_pcb;
7573; return 0; }
7574EOF
086ec9eb 7575if { (eval echo configure:7576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
70f9f479
MK
7576 rm -rf conftest*
7577 gdb_cv_struct_thread_td_pcb=yes
7578else
7579 echo "configure: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 rm -rf conftest*
7582 gdb_cv_struct_thread_td_pcb=no
7583fi
7584rm -f conftest*
7585fi
7586
7587echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7588if test $gdb_cv_struct_thread_td_pcb = yes; then
7589 cat >> confdefs.h <<\EOF
7590#define HAVE_STRUCT_THREAD_TD_PCB 1
7591EOF
7592
7593fi
7594
5c7f2947
MK
7595# See if <sys/lwp.h> defines `struct lwp`.
7596echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
086ec9eb 7597echo "configure:7598: checking for struct lwp" >&5
5c7f2947
MK
7598if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
7599 echo $ac_n "(cached) $ac_c" 1>&6
7600else
7601 cat > conftest.$ac_ext <<EOF
086ec9eb 7602#line 7603 "configure"
5c7f2947
MK
7603#include "confdefs.h"
7604#include <sys/param.h>
7605#include <sys/lwp.h>
7606int main() {
7607struct lwp l;
7608; return 0; }
7609EOF
086ec9eb 7610if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c7f2947
MK
7611 rm -rf conftest*
7612 gdb_cv_struct_lwp=yes
7613else
7614 echo "configure: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 rm -rf conftest*
7617 gdb_cv_struct_lwp=no
7618fi
7619rm -f conftest*
7620fi
7621
7622echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
7623if test $gdb_cv_struct_lwp = yes; then
7624 cat >> confdefs.h <<\EOF
7625#define HAVE_STRUCT_LWP 1
7626EOF
7627
7628fi
7629
78434e59
MK
7630# See if <machine/reg.h> degines `struct reg'.
7631echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
086ec9eb 7632echo "configure:7633: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7633if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7634 echo $ac_n "(cached) $ac_c" 1>&6
7635else
7636 cat > conftest.$ac_ext <<EOF
086ec9eb 7637#line 7638 "configure"
78434e59
MK
7638#include "confdefs.h"
7639#include <sys/types.h>
7640#include <machine/reg.h>
7641int main() {
7642struct reg r;
7643; return 0; }
7644EOF
086ec9eb 7645if { (eval echo configure:7646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7646 rm -rf conftest*
7647 gdb_cv_struct_reg=yes
7648else
7649 echo "configure: failed program was:" >&5
7650 cat conftest.$ac_ext >&5
7651 rm -rf conftest*
7652 gdb_cv_struct_reg=no
7653fi
7654rm -f conftest*
7655fi
7656
7657echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7658if test $gdb_cv_struct_reg = yes; then
7659 cat >> confdefs.h <<\EOF
7660#define HAVE_STRUCT_REG 1
7661EOF
7662
7663fi
7664
97bf5e38
MK
7665# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7666# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7667echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
086ec9eb 7668echo "configure:7669: checking for r_fs in struct reg" >&5
97bf5e38
MK
7669if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7670 echo $ac_n "(cached) $ac_c" 1>&6
7671else
7672 cat > conftest.$ac_ext <<EOF
086ec9eb 7673#line 7674 "configure"
c906108c 7674#include "confdefs.h"
97bf5e38
MK
7675#include <machine/reg.h>
7676int main() {
7677struct reg r; r.r_fs;
7678; return 0; }
c906108c 7679EOF
086ec9eb 7680if { (eval echo configure:7681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7681 rm -rf conftest*
97bf5e38 7682 gdb_cv_struct_reg_r_fs=yes
c906108c 7683else
97bf5e38
MK
7684 echo "configure: failed program was:" >&5
7685 cat conftest.$ac_ext >&5
c906108c 7686 rm -rf conftest*
97bf5e38 7687 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7688fi
7689rm -f conftest*
97bf5e38 7690fi
c906108c 7691
97bf5e38
MK
7692echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7693if test $gdb_cv_struct_reg_r_fs = yes; then
7694 cat >> confdefs.h <<\EOF
7695#define HAVE_STRUCT_REG_R_FS 1
7696EOF
7697
7698fi
7699echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
086ec9eb 7700echo "configure:7701: checking for r_gs in struct reg" >&5
97bf5e38
MK
7701if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7702 echo $ac_n "(cached) $ac_c" 1>&6
7703else
7704 cat > conftest.$ac_ext <<EOF
086ec9eb 7705#line 7706 "configure"
c906108c 7706#include "confdefs.h"
97bf5e38
MK
7707#include <machine/reg.h>
7708int main() {
7709struct reg r; r.r_gs;
7710; return 0; }
c906108c 7711EOF
086ec9eb 7712if { (eval echo configure:7713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7713 rm -rf conftest*
97bf5e38 7714 gdb_cv_struct_reg_r_gs=yes
c906108c 7715else
97bf5e38
MK
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
c906108c 7718 rm -rf conftest*
97bf5e38 7719 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7720fi
7721rm -f conftest*
c906108c 7722fi
c906108c 7723
97bf5e38
MK
7724echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7725if test $gdb_cv_struct_reg_r_gs = yes; then
7726 cat >> confdefs.h <<\EOF
7727#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7728EOF
7729
c906108c
SS
7730fi
7731
97bf5e38
MK
7732# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7733echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
086ec9eb 7734echo "configure:7735: checking for PTRACE_GETREGS" >&5
97bf5e38 7735if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7736 echo $ac_n "(cached) $ac_c" 1>&6
7737else
7738 cat > conftest.$ac_ext <<EOF
086ec9eb 7739#line 7740 "configure"
c906108c 7740#include "confdefs.h"
97bf5e38 7741#include <sys/ptrace.h>
c906108c 7742int main() {
97bf5e38 7743PTRACE_GETREGS;
c906108c
SS
7744; return 0; }
7745EOF
086ec9eb 7746if { (eval echo configure:7747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7747 rm -rf conftest*
97bf5e38 7748 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7749else
7750 echo "configure: failed program was:" >&5
7751 cat conftest.$ac_ext >&5
7752 rm -rf conftest*
97bf5e38 7753 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7754fi
7755rm -f conftest*
7756fi
7757
97bf5e38
MK
7758echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7759if test $gdb_cv_have_ptrace_getregs = yes; then
7760 cat >> confdefs.h <<\EOF
7761#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7762EOF
7763
97bf5e38 7764fi
c906108c 7765
97bf5e38
MK
7766# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7767echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
086ec9eb 7768echo "configure:7769: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7769if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7770 echo $ac_n "(cached) $ac_c" 1>&6
7771else
7772 cat > conftest.$ac_ext <<EOF
086ec9eb 7773#line 7774 "configure"
c906108c 7774#include "confdefs.h"
97bf5e38 7775#include <sys/ptrace.h>
c906108c 7776int main() {
97bf5e38 7777PTRACE_GETFPXREGS;
c906108c
SS
7778; return 0; }
7779EOF
086ec9eb 7780if { (eval echo configure:7781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7781 rm -rf conftest*
97bf5e38 7782 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7783else
7784 echo "configure: failed program was:" >&5
7785 cat conftest.$ac_ext >&5
7786 rm -rf conftest*
97bf5e38 7787 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7788fi
7789rm -f conftest*
7790fi
7791
97bf5e38
MK
7792echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7793if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7794 cat >> confdefs.h <<\EOF
7795#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7796EOF
7797
97bf5e38 7798fi
c906108c 7799
97bf5e38
MK
7800# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7801echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
086ec9eb 7802echo "configure:7803: checking for PT_GETDBREGS" >&5
97bf5e38 7803if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7804 echo $ac_n "(cached) $ac_c" 1>&6
7805else
7806 cat > conftest.$ac_ext <<EOF
086ec9eb 7807#line 7808 "configure"
c906108c 7808#include "confdefs.h"
97bf5e38
MK
7809#include <sys/types.h>
7810#include <sys/ptrace.h>
c906108c 7811int main() {
97bf5e38 7812PT_GETDBREGS;
c906108c
SS
7813; return 0; }
7814EOF
086ec9eb 7815if { (eval echo configure:7816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7816 rm -rf conftest*
97bf5e38 7817 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7818else
7819 echo "configure: failed program was:" >&5
7820 cat conftest.$ac_ext >&5
7821 rm -rf conftest*
97bf5e38 7822 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7823fi
7824rm -f conftest*
7825fi
7826
97bf5e38
MK
7827echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7828if test $gdb_cv_have_pt_getdbregs = yes; then
7829 cat >> confdefs.h <<\EOF
7830#define HAVE_PT_GETDBREGS 1
c906108c
SS
7831EOF
7832
97bf5e38 7833fi
c906108c 7834
97bf5e38
MK
7835# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7836echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
086ec9eb 7837echo "configure:7838: checking for PT_GETXMMREGS" >&5
97bf5e38 7838if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7839 echo $ac_n "(cached) $ac_c" 1>&6
7840else
7841 cat > conftest.$ac_ext <<EOF
086ec9eb 7842#line 7843 "configure"
c906108c 7843#include "confdefs.h"
97bf5e38
MK
7844#include <sys/types.h>
7845#include <sys/ptrace.h>
c906108c 7846int main() {
97bf5e38 7847PT_GETXMMREGS;
c906108c
SS
7848; return 0; }
7849EOF
086ec9eb 7850if { (eval echo configure:7851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7851 rm -rf conftest*
97bf5e38 7852 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7853else
7854 echo "configure: failed program was:" >&5
7855 cat conftest.$ac_ext >&5
7856 rm -rf conftest*
97bf5e38 7857 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7858fi
7859rm -f conftest*
7860fi
7861
97bf5e38
MK
7862echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7863if test $gdb_cv_have_pt_getxmmregs = yes; then
7864 cat >> confdefs.h <<\EOF
7865#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7866EOF
7867
97bf5e38 7868fi
c906108c 7869
27ca5dad 7870# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7871# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7872echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
086ec9eb 7873echo "configure:7874: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7874if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7875 echo $ac_n "(cached) $ac_c" 1>&6
7876else
7877 cat > conftest.$ac_ext <<EOF
086ec9eb 7878#line 7879 "configure"
27ca5dad
MC
7879#include "confdefs.h"
7880#include <stdint.h>
7881int main() {
7882uintptr_t foo = 0;
7883; return 0; }
7884EOF
086ec9eb 7885if { (eval echo configure:7886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7886 rm -rf conftest*
7887 gdb_cv_have_uintptr_t=yes
7888else
7889 echo "configure: failed program was:" >&5
7890 cat conftest.$ac_ext >&5
7891 rm -rf conftest*
7892 gdb_cv_have_uintptr_t=no
7893fi
7894rm -f conftest*
7895fi
7896
7897echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7898if test $gdb_cv_have_uintptr_t = yes; then
7899 cat >> confdefs.h <<\EOF
7900#define HAVE_UINTPTR_T 1
7901EOF
7902
7903fi
97bf5e38
MK
7904
7905echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
086ec9eb 7906echo "configure:7907: checking whether malloc must be declared" >&5
97bf5e38 7907if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7908 echo $ac_n "(cached) $ac_c" 1>&6
7909else
7910 cat > conftest.$ac_ext <<EOF
086ec9eb 7911#line 7912 "configure"
3862412b 7912#include "confdefs.h"
e17bf198 7913
97bf5e38
MK
7914#include <stdio.h>
7915#ifdef HAVE_STRING_H
7916#include <string.h>
7917#else
7918#ifdef HAVE_STRINGS_H
7919#include <strings.h>
7920#endif
7921#endif
7922#ifdef HAVE_STDLIB_H
7923#include <stdlib.h>
7924#endif
7925#ifdef HAVE_UNISTD_H
7926#include <unistd.h>
7927#endif
3862412b 7928int main() {
97bf5e38 7929char *(*pfn) = (char *(*)) malloc
3862412b
MK
7930; return 0; }
7931EOF
086ec9eb 7932if { (eval echo configure:7933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7933 rm -rf conftest*
97bf5e38 7934 bfd_cv_decl_needed_malloc=no
3862412b
MK
7935else
7936 echo "configure: failed program was:" >&5
7937 cat conftest.$ac_ext >&5
7938 rm -rf conftest*
97bf5e38 7939 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7940fi
7941rm -f conftest*
7942fi
7943
97bf5e38
MK
7944echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7945if test $bfd_cv_decl_needed_malloc = yes; then
7946 cat >> confdefs.h <<\EOF
7947#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7948EOF
7949
97bf5e38 7950fi
3862412b 7951
97bf5e38 7952echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
086ec9eb 7953echo "configure:7954: checking whether realloc must be declared" >&5
97bf5e38 7954if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7955 echo $ac_n "(cached) $ac_c" 1>&6
7956else
7957 cat > conftest.$ac_ext <<EOF
086ec9eb 7958#line 7959 "configure"
3862412b 7959#include "confdefs.h"
e17bf198 7960
97bf5e38
MK
7961#include <stdio.h>
7962#ifdef HAVE_STRING_H
7963#include <string.h>
7964#else
7965#ifdef HAVE_STRINGS_H
7966#include <strings.h>
7967#endif
7968#endif
7969#ifdef HAVE_STDLIB_H
7970#include <stdlib.h>
7971#endif
7972#ifdef HAVE_UNISTD_H
7973#include <unistd.h>
7974#endif
3862412b 7975int main() {
97bf5e38 7976char *(*pfn) = (char *(*)) realloc
3862412b
MK
7977; return 0; }
7978EOF
086ec9eb 7979if { (eval echo configure:7980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7980 rm -rf conftest*
97bf5e38 7981 bfd_cv_decl_needed_realloc=no
3862412b
MK
7982else
7983 echo "configure: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 rm -rf conftest*
97bf5e38 7986 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7987fi
7988rm -f conftest*
7989fi
7990
97bf5e38
MK
7991echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7992if test $bfd_cv_decl_needed_realloc = yes; then
7993 cat >> confdefs.h <<\EOF
7994#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7995EOF
7996
97bf5e38 7997fi
3862412b 7998
97bf5e38 7999echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
086ec9eb 8000echo "configure:8001: checking whether free must be declared" >&5
97bf5e38 8001if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
8002 echo $ac_n "(cached) $ac_c" 1>&6
8003else
8004 cat > conftest.$ac_ext <<EOF
086ec9eb 8005#line 8006 "configure"
451928c5 8006#include "confdefs.h"
e17bf198 8007
97bf5e38
MK
8008#include <stdio.h>
8009#ifdef HAVE_STRING_H
8010#include <string.h>
8011#else
8012#ifdef HAVE_STRINGS_H
8013#include <strings.h>
8014#endif
8015#endif
8016#ifdef HAVE_STDLIB_H
8017#include <stdlib.h>
8018#endif
8019#ifdef HAVE_UNISTD_H
8020#include <unistd.h>
8021#endif
451928c5 8022int main() {
97bf5e38 8023char *(*pfn) = (char *(*)) free
451928c5
AC
8024; return 0; }
8025EOF
086ec9eb 8026if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 8027 rm -rf conftest*
97bf5e38 8028 bfd_cv_decl_needed_free=no
451928c5
AC
8029else
8030 echo "configure: failed program was:" >&5
8031 cat conftest.$ac_ext >&5
8032 rm -rf conftest*
97bf5e38 8033 bfd_cv_decl_needed_free=yes
451928c5
AC
8034fi
8035rm -f conftest*
8036fi
8037
97bf5e38
MK
8038echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
8039if test $bfd_cv_decl_needed_free = yes; then
8040 cat >> confdefs.h <<\EOF
8041#define NEED_DECLARATION_FREE 1
451928c5
AC
8042EOF
8043
97bf5e38 8044fi
451928c5 8045
97bf5e38 8046echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
086ec9eb 8047echo "configure:8048: checking whether strerror must be declared" >&5
97bf5e38 8048if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
8049 echo $ac_n "(cached) $ac_c" 1>&6
8050else
8051 cat > conftest.$ac_ext <<EOF
086ec9eb 8052#line 8053 "configure"
451928c5 8053#include "confdefs.h"
e17bf198 8054
97bf5e38
MK
8055#include <stdio.h>
8056#ifdef HAVE_STRING_H
8057#include <string.h>
8058#else
8059#ifdef HAVE_STRINGS_H
8060#include <strings.h>
8061#endif
8062#endif
8063#ifdef HAVE_STDLIB_H
8064#include <stdlib.h>
8065#endif
8066#ifdef HAVE_UNISTD_H
8067#include <unistd.h>
8068#endif
451928c5 8069int main() {
97bf5e38 8070char *(*pfn) = (char *(*)) strerror
451928c5
AC
8071; return 0; }
8072EOF
086ec9eb 8073if { (eval echo configure:8074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 8074 rm -rf conftest*
97bf5e38 8075 bfd_cv_decl_needed_strerror=no
451928c5
AC
8076else
8077 echo "configure: failed program was:" >&5
8078 cat conftest.$ac_ext >&5
8079 rm -rf conftest*
97bf5e38 8080 bfd_cv_decl_needed_strerror=yes
451928c5
AC
8081fi
8082rm -f conftest*
8083fi
8084
97bf5e38
MK
8085echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
8086if test $bfd_cv_decl_needed_strerror = yes; then
8087 cat >> confdefs.h <<\EOF
8088#define NEED_DECLARATION_STRERROR 1
451928c5
AC
8089EOF
8090
97bf5e38 8091fi
451928c5 8092
97bf5e38 8093echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
086ec9eb 8094echo "configure:8095: checking whether strdup must be declared" >&5
97bf5e38 8095if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
8096 echo $ac_n "(cached) $ac_c" 1>&6
8097else
8098 cat > conftest.$ac_ext <<EOF
086ec9eb 8099#line 8100 "configure"
3862412b 8100#include "confdefs.h"
e17bf198 8101
97bf5e38
MK
8102#include <stdio.h>
8103#ifdef HAVE_STRING_H
8104#include <string.h>
8105#else
8106#ifdef HAVE_STRINGS_H
8107#include <strings.h>
8108#endif
8109#endif
8110#ifdef HAVE_STDLIB_H
8111#include <stdlib.h>
8112#endif
8113#ifdef HAVE_UNISTD_H
8114#include <unistd.h>
8115#endif
3862412b 8116int main() {
97bf5e38 8117char *(*pfn) = (char *(*)) strdup
3862412b
MK
8118; return 0; }
8119EOF
086ec9eb 8120if { (eval echo configure:8121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8121 rm -rf conftest*
97bf5e38 8122 bfd_cv_decl_needed_strdup=no
3862412b
MK
8123else
8124 echo "configure: failed program was:" >&5
8125 cat conftest.$ac_ext >&5
8126 rm -rf conftest*
97bf5e38 8127 bfd_cv_decl_needed_strdup=yes
3862412b
MK
8128fi
8129rm -f conftest*
8130fi
8131
97bf5e38
MK
8132echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
8133if test $bfd_cv_decl_needed_strdup = yes; then
8134 cat >> confdefs.h <<\EOF
8135#define NEED_DECLARATION_STRDUP 1
3862412b
MK
8136EOF
8137
97bf5e38 8138fi
3862412b 8139
97bf5e38 8140echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
086ec9eb 8141echo "configure:8142: checking whether strstr must be declared" >&5
97bf5e38 8142if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
8143 echo $ac_n "(cached) $ac_c" 1>&6
8144else
8145 cat > conftest.$ac_ext <<EOF
086ec9eb 8146#line 8147 "configure"
3862412b 8147#include "confdefs.h"
e17bf198 8148
97bf5e38
MK
8149#include <stdio.h>
8150#ifdef HAVE_STRING_H
8151#include <string.h>
8152#else
8153#ifdef HAVE_STRINGS_H
8154#include <strings.h>
8155#endif
8156#endif
8157#ifdef HAVE_STDLIB_H
8158#include <stdlib.h>
8159#endif
8160#ifdef HAVE_UNISTD_H
8161#include <unistd.h>
8162#endif
3862412b 8163int main() {
97bf5e38 8164char *(*pfn) = (char *(*)) strstr
3862412b
MK
8165; return 0; }
8166EOF
086ec9eb 8167if { (eval echo configure:8168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 8168 rm -rf conftest*
97bf5e38 8169 bfd_cv_decl_needed_strstr=no
3862412b
MK
8170else
8171 echo "configure: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8173 rm -rf conftest*
97bf5e38 8174 bfd_cv_decl_needed_strstr=yes
3862412b
MK
8175fi
8176rm -f conftest*
8177fi
8178
97bf5e38
MK
8179echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
8180if test $bfd_cv_decl_needed_strstr = yes; then
8181 cat >> confdefs.h <<\EOF
8182#define NEED_DECLARATION_STRSTR 1
3862412b
MK
8183EOF
8184
97bf5e38 8185fi
3862412b 8186
97bf5e38 8187echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
086ec9eb 8188echo "configure:8189: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 8189if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
8190 echo $ac_n "(cached) $ac_c" 1>&6
8191else
8192 cat > conftest.$ac_ext <<EOF
086ec9eb 8193#line 8194 "configure"
596c9d4b
KB
8194#include "confdefs.h"
8195
97bf5e38
MK
8196#include <stdio.h>
8197#ifdef HAVE_STRING_H
8198#include <string.h>
8199#else
8200#ifdef HAVE_STRINGS_H
8201#include <strings.h>
8202#endif
8203#endif
8204#ifdef HAVE_STDLIB_H
8205#include <stdlib.h>
8206#endif
8207#ifdef HAVE_UNISTD_H
8208#include <unistd.h>
8209#endif
596c9d4b 8210int main() {
97bf5e38 8211char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
8212; return 0; }
8213EOF
086ec9eb 8214if { (eval echo configure:8215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8215 rm -rf conftest*
97bf5e38 8216 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
8217else
8218 echo "configure: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220 rm -rf conftest*
97bf5e38 8221 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
8222fi
8223rm -f conftest*
8224fi
8225
97bf5e38
MK
8226echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
8227if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
8228 cat >> confdefs.h <<\EOF
8229#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
8230EOF
8231
97bf5e38 8232fi
596c9d4b 8233
97bf5e38
MK
8234
8235# The following save_state_t checkery is only necessary for HPUX
8236# versions earlier than 10.20. When those fade from memory, this
8237# could be expunged. --jsm 1999-03-22
8238
8239echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
086ec9eb 8240echo "configure:8241: checking for HPUX save_state structure" >&5
97bf5e38 8241cat > conftest.$ac_ext <<EOF
086ec9eb 8242#line 8243 "configure"
97bf5e38
MK
8243#include "confdefs.h"
8244#include <machine/save_state.h>
8245EOF
8246if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8247 egrep "save_state_t" >/dev/null 2>&1; then
8248 rm -rf conftest*
8249 gdb_cv_hpux_savestate=yes
8250else
8251 rm -rf conftest*
8252 gdb_cv_hpux_savestate=no
8253fi
8254rm -f conftest*
8255
8256cat > conftest.$ac_ext <<EOF
086ec9eb 8257#line 8258 "configure"
97bf5e38
MK
8258#include "confdefs.h"
8259#include <machine/save_state.h>
8260EOF
8261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8262 egrep "ss_wide" >/dev/null 2>&1; then
8263 rm -rf conftest*
8264 gdb_cv_hpux_sswide=yes
8265else
8266 rm -rf conftest*
8267 gdb_cv_hpux_sswide=no
8268fi
8269rm -f conftest*
8270
8271if test $gdb_cv_hpux_savestate = yes
8272then
8273 cat >> confdefs.h <<\EOF
8274#define HAVE_STRUCT_SAVE_STATE_T 1
8275EOF
8276
8277fi
8278if test $gdb_cv_hpux_sswide = yes
8279then
8280 cat >> confdefs.h <<\EOF
8281#define HAVE_STRUCT_MEMBER_SS_WIDE 1
8282EOF
8283
8284fi
8285echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8286
8287
8288# If we are configured native on GNU/Linux, work around problems with
8289# sys/procfs.h
8290# Also detect which type of /proc is in use, such as for Unixware or Solaris.
8291
8292if test "${target}" = "${host}"; then
8293 case "${host}" in
8294 i[3456]86-*-linux*)
8295 cat >> confdefs.h <<\EOF
8296#define START_INFERIOR_TRAPS_EXPECTED 2
8297EOF
8298
8299 cat >> confdefs.h <<\EOF
8300#define sys_quotactl 1
8301EOF
8302
8303 ;;
8304 ia64-*-aix*)
8305 cat >> confdefs.h <<\EOF
8306#define NEW_PROC_API 1
8307EOF
8308
8309 ;;
8310 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8311 cat >> confdefs.h <<\EOF
8312#define NEW_PROC_API 1
8313EOF
8314
8315 ;;
e7c61be3 8316 *-*-solaris2.[6789])
97bf5e38
MK
8317 cat >> confdefs.h <<\EOF
8318#define NEW_PROC_API 1
c960c18f
AC
8319EOF
8320
8321 ;;
8322 mips-sgi-irix5*)
8323 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8324 cat >> confdefs.h <<\EOF
8325#define _KMEMUSER 1
97bf5e38
MK
8326EOF
8327
8328 ;;
8329 esac
8330fi
8331
8332if test "$ac_cv_header_sys_procfs_h" = yes; then
8333 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8334echo "configure:8335: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8335 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8336 echo $ac_n "(cached) $ac_c" 1>&6
8337else
8338 cat > conftest.$ac_ext <<EOF
086ec9eb 8339#line 8340 "configure"
596c9d4b
KB
8340#include "confdefs.h"
8341
8342#define _SYSCALL32
8343#include <sys/procfs.h>
8344int main() {
97bf5e38 8345pstatus_t avar
596c9d4b
KB
8346; return 0; }
8347EOF
086ec9eb 8348if { (eval echo configure:8349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8349 rm -rf conftest*
97bf5e38 8350 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8351else
8352 echo "configure: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8354 rm -rf conftest*
97bf5e38 8355 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8356
8357fi
8358rm -f conftest*
8359fi
8360
97bf5e38 8361 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8362 cat >> confdefs.h <<\EOF
97bf5e38 8363#define HAVE_PSTATUS_T 1
596c9d4b
KB
8364EOF
8365
8366 fi
97bf5e38 8367 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8368
97bf5e38 8369 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8370echo "configure:8371: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8371 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8372 echo $ac_n "(cached) $ac_c" 1>&6
8373else
8374 cat > conftest.$ac_ext <<EOF
086ec9eb 8375#line 8376 "configure"
596c9d4b
KB
8376#include "confdefs.h"
8377
8378#define _SYSCALL32
8379#include <sys/procfs.h>
8380int main() {
97bf5e38 8381prrun_t avar
596c9d4b
KB
8382; return 0; }
8383EOF
086ec9eb 8384if { (eval echo configure:8385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8385 rm -rf conftest*
97bf5e38 8386 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8387else
8388 echo "configure: failed program was:" >&5
8389 cat conftest.$ac_ext >&5
8390 rm -rf conftest*
97bf5e38 8391 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8392
8393fi
8394rm -f conftest*
8395fi
8396
97bf5e38 8397 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8398 cat >> confdefs.h <<\EOF
97bf5e38 8399#define HAVE_PRRUN_T 1
596c9d4b
KB
8400EOF
8401
8402 fi
97bf5e38 8403 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8404
97bf5e38 8405 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8406echo "configure:8407: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8407 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8408 echo $ac_n "(cached) $ac_c" 1>&6
8409else
8410 cat > conftest.$ac_ext <<EOF
086ec9eb 8411#line 8412 "configure"
596c9d4b
KB
8412#include "confdefs.h"
8413
8414#define _SYSCALL32
8415#include <sys/procfs.h>
8416int main() {
97bf5e38 8417gregset_t avar
596c9d4b
KB
8418; return 0; }
8419EOF
086ec9eb 8420if { (eval echo configure:8421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8421 rm -rf conftest*
97bf5e38 8422 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8423else
8424 echo "configure: failed program was:" >&5
8425 cat conftest.$ac_ext >&5
8426 rm -rf conftest*
97bf5e38 8427 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8428
8429fi
8430rm -f conftest*
8431fi
8432
97bf5e38 8433 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8434 cat >> confdefs.h <<\EOF
97bf5e38 8435#define HAVE_GREGSET_T 1
596c9d4b
KB
8436EOF
8437
8438 fi
97bf5e38 8439 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8440
97bf5e38 8441 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8442echo "configure:8443: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8443 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8444 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8445else
8446 cat > conftest.$ac_ext <<EOF
086ec9eb 8447#line 8448 "configure"
d84dd0c5 8448#include "confdefs.h"
97bf5e38
MK
8449
8450#define _SYSCALL32
d84dd0c5 8451#include <sys/procfs.h>
97bf5e38
MK
8452int main() {
8453fpregset_t avar
8454; return 0; }
d84dd0c5 8455EOF
086ec9eb 8456if { (eval echo configure:8457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8457 rm -rf conftest*
8458 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8459else
8460 echo "configure: failed program was:" >&5
8461 cat conftest.$ac_ext >&5
97bf5e38
MK
8462 rm -rf conftest*
8463 bfd_cv_have_sys_procfs_type_fpregset_t=no
8464
d84dd0c5 8465fi
97bf5e38 8466rm -f conftest*
d84dd0c5
MK
8467fi
8468
97bf5e38
MK
8469 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8470 cat >> confdefs.h <<\EOF
8471#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8472EOF
8473
97bf5e38
MK
8474 fi
8475 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8476
97bf5e38 8477 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8478echo "configure:8479: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8479 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8480 echo $ac_n "(cached) $ac_c" 1>&6
8481else
8482 cat > conftest.$ac_ext <<EOF
086ec9eb 8483#line 8484 "configure"
c906108c 8484#include "confdefs.h"
c906108c 8485
97bf5e38
MK
8486#define _SYSCALL32
8487#include <sys/procfs.h>
c906108c 8488int main() {
97bf5e38 8489prgregset_t avar
c906108c
SS
8490; return 0; }
8491EOF
086ec9eb 8492if { (eval echo configure:8493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8493 rm -rf conftest*
97bf5e38 8494 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8495else
8496 echo "configure: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
8498 rm -rf conftest*
97bf5e38
MK
8499 bfd_cv_have_sys_procfs_type_prgregset_t=no
8500
c906108c
SS
8501fi
8502rm -f conftest*
8503fi
8504
97bf5e38
MK
8505 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8506 cat >> confdefs.h <<\EOF
8507#define HAVE_PRGREGSET_T 1
c906108c
SS
8508EOF
8509
97bf5e38
MK
8510 fi
8511 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8512
97bf5e38 8513 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8514echo "configure:8515: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8515 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8516 echo $ac_n "(cached) $ac_c" 1>&6
8517else
8518 cat > conftest.$ac_ext <<EOF
086ec9eb 8519#line 8520 "configure"
d45fe813 8520#include "confdefs.h"
97bf5e38
MK
8521
8522#define _SYSCALL32
8523#include <sys/procfs.h>
d45fe813 8524int main() {
97bf5e38 8525prfpregset_t avar
d45fe813
KB
8526; return 0; }
8527EOF
086ec9eb 8528if { (eval echo configure:8529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8529 rm -rf conftest*
97bf5e38 8530 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8531else
8532 echo "configure: failed program was:" >&5
8533 cat conftest.$ac_ext >&5
8534 rm -rf conftest*
97bf5e38
MK
8535 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8536
d45fe813
KB
8537fi
8538rm -f conftest*
8539fi
8540
97bf5e38
MK
8541 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8542 cat >> confdefs.h <<\EOF
8543#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8544EOF
8545
97bf5e38
MK
8546 fi
8547 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8548
97bf5e38 8549 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8550echo "configure:8551: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8551 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8552 echo $ac_n "(cached) $ac_c" 1>&6
8553else
8554 cat > conftest.$ac_ext <<EOF
086ec9eb 8555#line 8556 "configure"
d45fe813 8556#include "confdefs.h"
97bf5e38
MK
8557
8558#define _SYSCALL32
8559#include <sys/procfs.h>
d45fe813 8560int main() {
97bf5e38 8561prgregset32_t avar
d45fe813
KB
8562; return 0; }
8563EOF
086ec9eb 8564if { (eval echo configure:8565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8565 rm -rf conftest*
97bf5e38 8566 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8567else
8568 echo "configure: failed program was:" >&5
8569 cat conftest.$ac_ext >&5
8570 rm -rf conftest*
97bf5e38
MK
8571 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8572
d45fe813
KB
8573fi
8574rm -f conftest*
8575fi
8576
97bf5e38
MK
8577 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8578 cat >> confdefs.h <<\EOF
8579#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8580EOF
8581
97bf5e38
MK
8582 fi
8583 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8584
97bf5e38 8585 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8586echo "configure:8587: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8587 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8588 echo $ac_n "(cached) $ac_c" 1>&6
8589else
8590 cat > conftest.$ac_ext <<EOF
086ec9eb 8591#line 8592 "configure"
d45fe813 8592#include "confdefs.h"
97bf5e38
MK
8593
8594#define _SYSCALL32
8595#include <sys/procfs.h>
d45fe813 8596int main() {
97bf5e38 8597prfpregset32_t avar
d45fe813
KB
8598; return 0; }
8599EOF
086ec9eb 8600if { (eval echo configure:8601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8601 rm -rf conftest*
97bf5e38 8602 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8603else
8604 echo "configure: failed program was:" >&5
8605 cat conftest.$ac_ext >&5
8606 rm -rf conftest*
97bf5e38
MK
8607 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8608
d45fe813
KB
8609fi
8610rm -f conftest*
8611fi
8612
97bf5e38
MK
8613 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8614 cat >> confdefs.h <<\EOF
8615#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8616EOF
8617
97bf5e38
MK
8618 fi
8619 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8620
97bf5e38 8621 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8622echo "configure:8623: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8623 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8624 echo $ac_n "(cached) $ac_c" 1>&6
8625else
8626 cat > conftest.$ac_ext <<EOF
086ec9eb 8627#line 8628 "configure"
d45fe813 8628#include "confdefs.h"
97bf5e38 8629
d45fe813 8630#define _SYSCALL32
97bf5e38 8631#include <sys/procfs.h>
d45fe813 8632int main() {
97bf5e38 8633lwpid_t avar
d45fe813
KB
8634; return 0; }
8635EOF
086ec9eb 8636if { (eval echo configure:8637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8637 rm -rf conftest*
97bf5e38 8638 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8639else
8640 echo "configure: failed program was:" >&5
8641 cat conftest.$ac_ext >&5
8642 rm -rf conftest*
97bf5e38
MK
8643 bfd_cv_have_sys_procfs_type_lwpid_t=no
8644
d45fe813
KB
8645fi
8646rm -f conftest*
8647fi
8648
97bf5e38
MK
8649 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8650 cat >> confdefs.h <<\EOF
8651#define HAVE_LWPID_T 1
d45fe813
KB
8652EOF
8653
97bf5e38
MK
8654 fi
8655 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8656
97bf5e38 8657 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8658echo "configure:8659: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8659 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8660 echo $ac_n "(cached) $ac_c" 1>&6
8661else
8662 cat > conftest.$ac_ext <<EOF
086ec9eb 8663#line 8664 "configure"
c906108c
SS
8664#include "confdefs.h"
8665
97bf5e38
MK
8666#define _SYSCALL32
8667#include <sys/procfs.h>
c906108c 8668int main() {
97bf5e38 8669psaddr_t avar
c906108c
SS
8670; return 0; }
8671EOF
086ec9eb 8672if { (eval echo configure:8673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8673 rm -rf conftest*
97bf5e38 8674 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8675else
8676 echo "configure: failed program was:" >&5
8677 cat conftest.$ac_ext >&5
8678 rm -rf conftest*
97bf5e38
MK
8679 bfd_cv_have_sys_procfs_type_psaddr_t=no
8680
c906108c
SS
8681fi
8682rm -f conftest*
8683fi
8684
97bf5e38
MK
8685 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8686 cat >> confdefs.h <<\EOF
8687#define HAVE_PSADDR_T 1
c906108c
SS
8688EOF
8689
97bf5e38
MK
8690 fi
8691 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8692
97bf5e38 8693 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8694echo "configure:8695: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8695 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8696 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8697else
8698 cat > conftest.$ac_ext <<EOF
086ec9eb 8699#line 8700 "configure"
c906108c
SS
8700#include "confdefs.h"
8701
97bf5e38
MK
8702#define _SYSCALL32
8703#include <sys/procfs.h>
8704int main() {
8705prsysent_t avar
8706; return 0; }
c906108c 8707EOF
086ec9eb 8708if { (eval echo configure:8709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8709 rm -rf conftest*
8710 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8711else
8712 echo "configure: failed program was:" >&5
8713 cat conftest.$ac_ext >&5
97bf5e38
MK
8714 rm -rf conftest*
8715 bfd_cv_have_sys_procfs_type_prsysent_t=no
8716
c906108c 8717fi
97bf5e38 8718rm -f conftest*
c906108c
SS
8719fi
8720
97bf5e38
MK
8721 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8722 cat >> confdefs.h <<\EOF
8723#define HAVE_PRSYSENT_T 1
c906108c
SS
8724EOF
8725
97bf5e38
MK
8726 fi
8727 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8728
97bf5e38 8729 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8730echo "configure:8731: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8731 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8732 echo $ac_n "(cached) $ac_c" 1>&6
8733else
8734 cat > conftest.$ac_ext <<EOF
086ec9eb 8735#line 8736 "configure"
c906108c
SS
8736#include "confdefs.h"
8737
97bf5e38
MK
8738#define _SYSCALL32
8739#include <sys/procfs.h>
c906108c 8740int main() {
97bf5e38 8741pr_sigset_t avar
c906108c
SS
8742; return 0; }
8743EOF
086ec9eb 8744if { (eval echo configure:8745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8745 rm -rf conftest*
97bf5e38 8746 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8747else
8748 echo "configure: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 rm -rf conftest*
97bf5e38
MK
8751 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8752
c906108c
SS
8753fi
8754rm -f conftest*
8755fi
8756
97bf5e38
MK
8757 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8758 cat >> confdefs.h <<\EOF
8759#define HAVE_PR_SIGSET_T 1
c906108c
SS
8760EOF
8761
97bf5e38
MK
8762 fi
8763 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8764
97bf5e38 8765 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8766echo "configure:8767: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8767 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8768 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8769else
8770 cat > conftest.$ac_ext <<EOF
086ec9eb 8771#line 8772 "configure"
c906108c
SS
8772#include "confdefs.h"
8773
97bf5e38
MK
8774#define _SYSCALL32
8775#include <sys/procfs.h>
8776int main() {
8777pr_sigaction64_t avar
8778; return 0; }
c906108c 8779EOF
086ec9eb 8780if { (eval echo configure:8781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8781 rm -rf conftest*
8782 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8783else
8784 echo "configure: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
97bf5e38
MK
8786 rm -rf conftest*
8787 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8788
c906108c 8789fi
97bf5e38 8790rm -f conftest*
c906108c
SS
8791fi
8792
97bf5e38
MK
8793 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8794 cat >> confdefs.h <<\EOF
8795#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8796EOF
8797
97bf5e38
MK
8798 fi
8799 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8800
8801 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8802echo "configure:8803: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8803 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8804 echo $ac_n "(cached) $ac_c" 1>&6
8805else
8806 cat > conftest.$ac_ext <<EOF
086ec9eb 8807#line 8808 "configure"
97bf5e38
MK
8808#include "confdefs.h"
8809
8810#define _SYSCALL32
8811#include <sys/procfs.h>
8812int main() {
8813pr_siginfo64_t avar
8814; return 0; }
8815EOF
086ec9eb 8816if { (eval echo configure:8817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8817 rm -rf conftest*
8818 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8819else
8820 echo "configure: failed program was:" >&5
8821 cat conftest.$ac_ext >&5
8822 rm -rf conftest*
8823 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8824
8825fi
8826rm -f conftest*
c906108c 8827fi
c906108c 8828
97bf5e38
MK
8829 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8830 cat >> confdefs.h <<\EOF
8831#define HAVE_PR_SIGINFO64_T 1
8832EOF
c906108c 8833
97bf5e38
MK
8834 fi
8835 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8836
8837
8838
8839
8840
8841 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8842 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
086ec9eb 8843echo "configure:8844: checking whether prfpregset_t type is broken" >&5
97bf5e38 8844 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8845 echo $ac_n "(cached) $ac_c" 1>&6
8846else
8847 if test "$cross_compiling" = yes; then
97bf5e38 8848 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8849else
8850 cat > conftest.$ac_ext <<EOF
086ec9eb 8851#line 8852 "configure"
c906108c 8852#include "confdefs.h"
97bf5e38
MK
8853#include <sys/procfs.h>
8854 int main ()
8855 {
8856 if (sizeof (prfpregset_t) == sizeof (void *))
8857 return 1;
8858 return 0;
8859 }
c906108c 8860EOF
086ec9eb 8861if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8862then
97bf5e38 8863 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8864else
8865 echo "configure: failed program was:" >&5
8866 cat conftest.$ac_ext >&5
8867 rm -fr conftest*
97bf5e38 8868 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8869fi
8870rm -fr conftest*
8871fi
8872
8873fi
8874
97bf5e38
MK
8875 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8876 if test $gdb_cv_prfpregset_t_broken = yes; then
8877 cat >> confdefs.h <<\EOF
8878#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8879EOF
8880
97bf5e38
MK
8881 fi
8882 fi
c906108c 8883
97bf5e38
MK
8884
8885 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
086ec9eb 8886echo "configure:8887: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8887 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8888 echo $ac_n "(cached) $ac_c" 1>&6
8889else
8890 cat > conftest.$ac_ext <<EOF
086ec9eb 8891#line 8892 "configure"
c906108c 8892#include "confdefs.h"
97bf5e38
MK
8893#include <unistd.h>
8894#include <sys/types.h>
8895#include <sys/procfs.h>
8896
8897int main() {
8898
8899 int dummy;;
8900 dummy = ioctl(0, PIOCSET, &dummy);
8901
8902; return 0; }
c906108c 8903EOF
086ec9eb 8904if { (eval echo configure:8905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8905 rm -rf conftest*
97bf5e38 8906 gdb_cv_have_procfs_piocset=yes
c906108c 8907else
c906108c
SS
8908 echo "configure: failed program was:" >&5
8909 cat conftest.$ac_ext >&5
8910 rm -rf conftest*
97bf5e38 8911 gdb_cv_have_procfs_piocset=no
c906108c
SS
8912fi
8913rm -f conftest*
8914fi
97bf5e38
MK
8915
8916 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8917 if test $gdb_cv_have_procfs_piocset = yes; then
8918 cat >> confdefs.h <<\EOF
8919#define HAVE_PROCFS_PIOCSET 1
c906108c 8920EOF
97bf5e38
MK
8921
8922 fi
c906108c 8923fi
c906108c 8924
97bf5e38
MK
8925if test ${host} = ${target} ; then
8926
8927 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
086ec9eb 8928echo "configure:8929: checking for member l_addr in struct link_map" >&5
97bf5e38 8929 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8930 echo $ac_n "(cached) $ac_c" 1>&6
8931else
8932 cat > conftest.$ac_ext <<EOF
086ec9eb 8933#line 8934 "configure"
c906108c 8934#include "confdefs.h"
97bf5e38 8935#include <link.h>
c906108c 8936int main() {
97bf5e38 8937struct link_map lm; (void) lm.l_addr;
c906108c
SS
8938; return 0; }
8939EOF
086ec9eb 8940if { (eval echo configure:8941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8941 rm -rf conftest*
97bf5e38 8942 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8943else
8944 echo "configure: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8946 rm -rf conftest*
97bf5e38 8947 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8948fi
8949rm -f conftest*
8950fi
8951
97bf5e38
MK
8952 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8953 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8954 cat >> confdefs.h <<\EOF
8955#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8956EOF
97bf5e38
MK
8957
8958 fi
8959
8960
8961 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
086ec9eb 8962echo "configure:8963: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8963 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8964 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8965else
97bf5e38 8966 cat > conftest.$ac_ext <<EOF
086ec9eb 8967#line 8968 "configure"
97bf5e38
MK
8968#include "confdefs.h"
8969#include <sys/types.h>
8970#include <link.h>
8971int main() {
8972struct link_map lm; (void) lm.lm_addr;
8973; return 0; }
8974EOF
086ec9eb 8975if { (eval echo configure:8976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8976 rm -rf conftest*
8977 gdb_cv_have_struct_link_map_with_lm_members=yes
8978else
8979 echo "configure: failed program was:" >&5
8980 cat conftest.$ac_ext >&5
8981 rm -rf conftest*
8982 gdb_cv_have_struct_link_map_with_lm_members=no
8983fi
8984rm -f conftest*
c906108c 8985fi
c906108c 8986
97bf5e38
MK
8987 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8988 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8989 cat >> confdefs.h <<\EOF
8990#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8991EOF
8992
8993 fi
8994
8995
8996 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
086ec9eb 8997echo "configure:8998: checking for member som_addr in struct so_map" >&5
97bf5e38 8998 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8999 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
9000else
9001 cat > conftest.$ac_ext <<EOF
086ec9eb 9002#line 9003 "configure"
c906108c 9003#include "confdefs.h"
97bf5e38
MK
9004#include <sys/types.h>
9005#ifdef HAVE_NLIST_H
9006#include <nlist.h>
9007#endif
9008#include <link.h>
9009int main() {
9010struct so_map lm; (void) lm.som_addr;
9011; return 0; }
9012EOF
086ec9eb 9013if { (eval echo configure:9014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9014 rm -rf conftest*
9015 gdb_cv_have_struct_so_map_with_som_members=yes
9016else
9017 echo "configure: failed program was:" >&5
9018 cat conftest.$ac_ext >&5
9019 rm -rf conftest*
9020 gdb_cv_have_struct_so_map_with_som_members=no
9021fi
9022rm -f conftest*
9023fi
c906108c 9024
97bf5e38
MK
9025 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
9026 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
9027 cat >> confdefs.h <<\EOF
9028#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
9029EOF
c906108c 9030
97bf5e38 9031 fi
c906108c 9032
97bf5e38
MK
9033
9034 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
086ec9eb 9035echo "configure:9036: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
9036 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
9037 echo $ac_n "(cached) $ac_c" 1>&6
9038else
9039 cat > conftest.$ac_ext <<EOF
086ec9eb 9040#line 9041 "configure"
97bf5e38
MK
9041#include "confdefs.h"
9042#define _SYSCALL32
9043#include <sys/link.h>
9044int main() {
9045struct link_map32 l;
9046; return 0; }
9047EOF
086ec9eb 9048if { (eval echo configure:9049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9049 rm -rf conftest*
9050 gdb_cv_have_struct_link_map32=yes
9051else
9052 echo "configure: failed program was:" >&5
9053 cat conftest.$ac_ext >&5
9054 rm -rf conftest*
9055 gdb_cv_have_struct_link_map32=no
9056fi
9057rm -f conftest*
9058fi
c906108c 9059
97bf5e38
MK
9060 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
9061 if test $gdb_cv_have_struct_link_map32 = yes; then
9062 cat >> confdefs.h <<\EOF
9063#define HAVE_STRUCT_LINK_MAP32 1
9064EOF
c906108c 9065
97bf5e38
MK
9066 cat >> confdefs.h <<\EOF
9067#define _SYSCALL32 1
9068EOF
c906108c 9069
97bf5e38
MK
9070 fi
9071fi
c906108c 9072
c906108c 9073
97bf5e38 9074echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
086ec9eb 9075echo "configure:9076: checking for long long support in compiler" >&5
97bf5e38
MK
9076if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
9077 echo $ac_n "(cached) $ac_c" 1>&6
9078else
9079 cat > conftest.$ac_ext <<EOF
086ec9eb 9080#line 9081 "configure"
97bf5e38 9081#include "confdefs.h"
c906108c 9082
97bf5e38 9083int main() {
c906108c 9084
97bf5e38
MK
9085 extern long long foo;
9086 switch (foo & 2) { case 0: return 1; }
c906108c 9087
97bf5e38
MK
9088; return 0; }
9089EOF
086ec9eb 9090if { (eval echo configure:9091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9091 rm -rf conftest*
9092 gdb_cv_c_long_long=yes
9093else
9094 echo "configure: failed program was:" >&5
9095 cat conftest.$ac_ext >&5
9096 rm -rf conftest*
9097 gdb_cv_c_long_long=no
9098fi
9099rm -f conftest*
9100fi
c906108c 9101
97bf5e38
MK
9102echo "$ac_t""$gdb_cv_c_long_long" 1>&6
9103if test $gdb_cv_c_long_long = yes; then
9104 cat >> confdefs.h <<\EOF
9105#define CC_HAS_LONG_LONG 1
9106EOF
9107
9108fi
9109
9110
9111echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
086ec9eb 9112echo "configure:9113: checking for long long support in printf" >&5
97bf5e38
MK
9113if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
9114 echo $ac_n "(cached) $ac_c" 1>&6
9115else
9116 if test "$cross_compiling" = yes; then
9117 gdb_cv_printf_has_long_long=no
9118else
9119 cat > conftest.$ac_ext <<EOF
086ec9eb 9120#line 9121 "configure"
97bf5e38
MK
9121#include "confdefs.h"
9122
9123int main () {
9124 char buf[32];
9125 long long l = 0;
9126 l = (l << 16) + 0x0123;
9127 l = (l << 16) + 0x4567;
9128 l = (l << 16) + 0x89ab;
9129 l = (l << 16) + 0xcdef;
9130 sprintf (buf, "0x%016llx", l);
9131 return (strcmp ("0x0123456789abcdef", buf));
c906108c 9132}
97bf5e38 9133EOF
086ec9eb 9134if { (eval echo configure:9135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9135then
9136 gdb_cv_printf_has_long_long=yes
9137else
9138 echo "configure: failed program was:" >&5
9139 cat conftest.$ac_ext >&5
9140 rm -fr conftest*
9141 gdb_cv_printf_has_long_long=no
9142fi
9143rm -fr conftest*
9144fi
9145
9146fi
9147
9148if test $gdb_cv_printf_has_long_long = yes; then
9149 cat >> confdefs.h <<\EOF
9150#define PRINTF_HAS_LONG_LONG 1
9151EOF
9152
9153fi
9154echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
9155
9156
9157echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
086ec9eb 9158echo "configure:9159: checking for long double support in compiler" >&5
97bf5e38
MK
9159if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
9160 echo $ac_n "(cached) $ac_c" 1>&6
9161else
9162 cat > conftest.$ac_ext <<EOF
086ec9eb 9163#line 9164 "configure"
97bf5e38
MK
9164#include "confdefs.h"
9165
9166int main() {
9167long double foo;
9168; return 0; }
9169EOF
086ec9eb 9170if { (eval echo configure:9171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
9171 rm -rf conftest*
9172 ac_cv_c_long_double=yes
9173else
9174 echo "configure: failed program was:" >&5
9175 cat conftest.$ac_ext >&5
9176 rm -rf conftest*
9177 ac_cv_c_long_double=no
9178fi
9179rm -f conftest*
9180fi
c906108c 9181
97bf5e38
MK
9182echo "$ac_t""$ac_cv_c_long_double" 1>&6
9183if test $ac_cv_c_long_double = yes; then
9184 cat >> confdefs.h <<\EOF
9185#define HAVE_LONG_DOUBLE 1
c906108c 9186EOF
97bf5e38
MK
9187
9188fi
9189
9190
9191echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
086ec9eb 9192echo "configure:9193: checking for long double support in printf" >&5
97bf5e38
MK
9193if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
9194 echo $ac_n "(cached) $ac_c" 1>&6
9195else
9196 if test "$cross_compiling" = yes; then
9197 gdb_cv_printf_has_long_double=no
9198else
9199 cat > conftest.$ac_ext <<EOF
086ec9eb 9200#line 9201 "configure"
97bf5e38
MK
9201#include "confdefs.h"
9202
9203int main () {
9204 char buf[16];
9205 long double f = 3.141592653;
9206 sprintf (buf, "%Lg", f);
9207 return (strncmp ("3.14159", buf, 7));
9208}
9209EOF
086ec9eb 9210if { (eval echo configure:9211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 9211then
97bf5e38 9212 gdb_cv_printf_has_long_double=yes
c906108c
SS
9213else
9214 echo "configure: failed program was:" >&5
9215 cat conftest.$ac_ext >&5
9216 rm -fr conftest*
97bf5e38 9217 gdb_cv_printf_has_long_double=no
c906108c
SS
9218fi
9219rm -fr conftest*
9220fi
9221
9222fi
9223
97bf5e38 9224if test $gdb_cv_printf_has_long_double = yes; then
c906108c 9225 cat >> confdefs.h <<\EOF
97bf5e38
MK
9226#define PRINTF_HAS_LONG_DOUBLE 1
9227EOF
9228
9229fi
9230echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
9231
9232
9233echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
086ec9eb 9234echo "configure:9235: checking for long double support in scanf" >&5
97bf5e38
MK
9235if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
9236 echo $ac_n "(cached) $ac_c" 1>&6
9237else
9238 if test "$cross_compiling" = yes; then
9239 gdb_cv_scanf_has_long_double=no
9240else
9241 cat > conftest.$ac_ext <<EOF
086ec9eb 9242#line 9243 "configure"
97bf5e38
MK
9243#include "confdefs.h"
9244
9245int main () {
9246 char *buf = "3.141592653";
9247 long double f = 0;
9248 sscanf (buf, "%Lg", &f);
9249 return !(f > 3.14159 && f < 3.14160);
9250}
c906108c 9251EOF
086ec9eb 9252if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
9253then
9254 gdb_cv_scanf_has_long_double=yes
9255else
9256 echo "configure: failed program was:" >&5
9257 cat conftest.$ac_ext >&5
9258 rm -fr conftest*
9259 gdb_cv_scanf_has_long_double=no
9260fi
9261rm -fr conftest*
9262fi
c906108c
SS
9263
9264fi
9265
97bf5e38
MK
9266if test $gdb_cv_scanf_has_long_double = yes; then
9267 cat >> confdefs.h <<\EOF
9268#define SCANF_HAS_LONG_DOUBLE 1
9269EOF
9270
9271fi
9272echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 9273
438013df
AO
9274case ${host_os} in
9275aix*)
9276 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
086ec9eb 9277echo "configure:9278: checking for -bbigtoc option" >&5
438013df
AO
9278if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9279 echo $ac_n "(cached) $ac_c" 1>&6
9280else
9281
9282 SAVE_LDFLAGS=$LDFLAGS
9283
9284 case $GCC in
9285 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9286 *) gdb_cv_bigtoc=-bbigtoc ;;
9287 esac
9288
9289 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9290 cat > conftest.$ac_ext <<EOF
086ec9eb 9291#line 9292 "configure"
438013df
AO
9292#include "confdefs.h"
9293
9294int main() {
9295int i;
9296; return 0; }
9297EOF
086ec9eb 9298if { (eval echo configure:9299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
9299 :
9300else
9301 echo "configure: failed program was:" >&5
9302 cat conftest.$ac_ext >&5
9303 rm -rf conftest*
9304 gdb_cv_bigtoc=
9305fi
9306rm -f conftest*
ec76baa5 9307 LDFLAGS="${SAVE_LDFLAGS}"
438013df
AO
9308
9309fi
9310
9311echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9312 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9313 ;;
9314esac
9315
c906108c
SS
9316
9317
9318if test ${build} = ${host} -a ${host} = ${target} ; then
9319 case ${host_os} in
9320 hpux*)
9321 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
086ec9eb 9322echo "configure:9323: checking for HPUX/OSF thread support" >&5
c906108c
SS
9323 if test -f /usr/include/dce/cma_config.h ; then
9324 if test "$GCC" = "yes" ; then
9325 echo "$ac_t""yes" 1>&6
9326 cat >> confdefs.h <<\EOF
9327#define HAVE_HPUX_THREAD_SUPPORT 1
9328EOF
9329
3483b318 9330 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9331 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9332 else
9333 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9334 fi
9335 else
9336 echo "$ac_t""no" 1>&6
9337 fi
9338 ;;
9339 solaris*)
d92419e5
JB
9340 # See if thread_db library is around for Solaris thread debugging.
9341 # Note that we must explicitly test for version 1 of the library
9342 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9343 # the same API.
c906108c 9344 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
086ec9eb 9345echo "configure:9346: checking for Solaris thread debugging library" >&5
c906108c
SS
9346 if test -f /usr/lib/libthread_db.so.1 ; then
9347 echo "$ac_t""yes" 1>&6
9348 cat >> confdefs.h <<\EOF
9349#define HAVE_THREAD_DB_LIB 1
9350EOF
9351
3483b318 9352 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9353 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9354 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
086ec9eb 9355echo "configure:9356: checking for dlopen in -ldl" >&5
c906108c
SS
9356ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9357if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9358 echo $ac_n "(cached) $ac_c" 1>&6
9359else
9360 ac_save_LIBS="$LIBS"
9361LIBS="-ldl $LIBS"
9362cat > conftest.$ac_ext <<EOF
086ec9eb 9363#line 9364 "configure"
c906108c
SS
9364#include "confdefs.h"
9365/* Override any gcc2 internal prototype to avoid an error. */
9366/* We use char because int might match the return type of a gcc2
9367 builtin and then its argument prototype would still apply. */
9368char dlopen();
9369
9370int main() {
9371dlopen()
9372; return 0; }
9373EOF
086ec9eb 9374if { (eval echo configure:9375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9375 rm -rf conftest*
9376 eval "ac_cv_lib_$ac_lib_var=yes"
9377else
9378 echo "configure: failed program was:" >&5
9379 cat conftest.$ac_ext >&5
9380 rm -rf conftest*
9381 eval "ac_cv_lib_$ac_lib_var=no"
9382fi
9383rm -f conftest*
9384LIBS="$ac_save_LIBS"
9385
9386fi
9387if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9388 echo "$ac_t""yes" 1>&6
9389 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9390 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9391 cat >> confdefs.h <<EOF
9392#define $ac_tr_lib 1
9393EOF
9394
9395 LIBS="-ldl $LIBS"
9396
9397else
9398 echo "$ac_t""no" 1>&6
9399fi
9400
9401 if test "$GCC" = "yes" ; then
9402 # The GNU linker requires the -export-dynamic option to make
9403 # all symbols visible in the dynamic symbol table.
9404 hold_ldflags=$LDFLAGS
9405 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
086ec9eb 9406echo "configure:9407: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9407 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9408 cat > conftest.$ac_ext <<EOF
086ec9eb 9409#line 9410 "configure"
c906108c
SS
9410#include "confdefs.h"
9411
9412int main() {
9413int i;
9414; return 0; }
9415EOF
086ec9eb 9416if { (eval echo configure:9417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9417 rm -rf conftest*
9418 found=yes
9419else
9420 echo "configure: failed program was:" >&5
9421 cat conftest.$ac_ext >&5
9422 rm -rf conftest*
9423 found=no
9424fi
9425rm -f conftest*
9426 LDFLAGS=$hold_ldflags
9427 echo "$ac_t""$found" 1>&6
9428 if test $found = yes; then
9429 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9430 fi
9431 fi
9432 # Sun randomly tweaked the prototypes in <proc_service.h>
9433 # at one point.
9434 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
086ec9eb 9435echo "configure:9436: checking if <proc_service.h> is old" >&5
c906108c
SS
9436 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9437 echo $ac_n "(cached) $ac_c" 1>&6
9438else
9439
9440 cat > conftest.$ac_ext <<EOF
086ec9eb 9441#line 9442 "configure"
c906108c
SS
9442#include "confdefs.h"
9443
9444 #include <proc_service.h>
9445 ps_err_e ps_pdwrite
9446 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9447
9448int main() {
9449
9450; return 0; }
9451EOF
086ec9eb 9452if { (eval echo configure:9453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9453 rm -rf conftest*
9454 gdb_cv_proc_service_is_old=no
9455else
9456 echo "configure: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458 rm -rf conftest*
9459 gdb_cv_proc_service_is_old=yes
9460fi
9461rm -f conftest*
9462
9463fi
9464
9465 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9466 if test $gdb_cv_proc_service_is_old = yes; then
9467 cat >> confdefs.h <<\EOF
9468#define PROC_SERVICE_IS_OLD 1
9469EOF
9470
9471 fi
9472 else
9473 echo "$ac_t""no" 1>&6
9474 fi
9475 ;;
d92419e5
JB
9476 aix*)
9477 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
086ec9eb 9478echo "configure:9479: checking for AiX thread debugging library" >&5
d92419e5
JB
9479 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9480 echo $ac_n "(cached) $ac_c" 1>&6
9481else
9482 cat > conftest.$ac_ext <<EOF
086ec9eb 9483#line 9484 "configure"
d92419e5
JB
9484#include "confdefs.h"
9485#include <sys/pthdebug.h>
9486int main() {
9487#ifndef PTHDB_VERSION_3
9488 #error
9489 #endif
9490; return 0; }
9491EOF
086ec9eb 9492if { (eval echo configure:9493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9493 rm -rf conftest*
9494 gdb_cv_have_aix_thread_debug=yes
9495else
9496 echo "configure: failed program was:" >&5
9497 cat conftest.$ac_ext >&5
9498 rm -rf conftest*
9499 gdb_cv_have_aix_thread_debug=no
9500fi
9501rm -f conftest*
9502fi
9503
9504 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9505 if test $gdb_cv_have_aix_thread_debug = yes; then
9506 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9507 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9508 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9509 fi
9510 ;;
c906108c
SS
9511 esac
9512
9513fi
9514
3f47be5c
EZ
9515if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9516 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
086ec9eb 9517echo "configure:9518: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9518if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9519 echo $ac_n "(cached) $ac_c" 1>&6
9520else
9521 cat > conftest.$ac_ext <<EOF
086ec9eb 9522#line 9523 "configure"
3f47be5c
EZ
9523#include "confdefs.h"
9524#include <thread_db.h>
9525int main() {
9526int i = TD_NOTALLOC;
9527; return 0; }
9528EOF
086ec9eb 9529if { (eval echo configure:9530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9530 rm -rf conftest*
9531 gdb_cv_thread_db_h_has_td_notalloc=yes
9532else
9533 echo "configure: failed program was:" >&5
9534 cat conftest.$ac_ext >&5
9535 rm -rf conftest*
9536 gdb_cv_thread_db_h_has_td_notalloc=no
9537
9538fi
9539rm -f conftest*
9540
9541fi
9542
9543echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9544fi
9545if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9546 cat >> confdefs.h <<\EOF
9547#define THREAD_DB_HAS_TD_NOTALLOC 1
9548EOF
9549
9550fi
9551
b757528f
JJ
9552if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9553 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
086ec9eb 9554echo "configure:9555: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9555if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9556 echo $ac_n "(cached) $ac_c" 1>&6
9557else
9558 cat > conftest.$ac_ext <<EOF
086ec9eb 9559#line 9560 "configure"
b757528f
JJ
9560#include "confdefs.h"
9561#include <sys/syscall.h>
9562int main() {
9563int i = __NR_tkill;
9564; return 0; }
9565EOF
086ec9eb 9566if { (eval echo configure:9567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9567 rm -rf conftest*
9568 gdb_cv_sys_syscall_h_has_tkill=yes
9569else
9570 echo "configure: failed program was:" >&5
9571 cat conftest.$ac_ext >&5
9572 rm -rf conftest*
9573 gdb_cv_sys_syscall_h_has_tkill=no
9574
9575fi
9576rm -f conftest*
9577
9578fi
9579
9580echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9581fi
9582if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9583 cat >> confdefs.h <<\EOF
9584#define HAVE_TKILL_SYSCALL 1
9585EOF
9586
9587fi
9588
fb40c209 9589
030292b7
DJ
9590# Check whether --with-sysroot or --without-sysroot was given.
9591if test "${with_sysroot+set}" = set; then
9592 withval="$with_sysroot"
9593
9594 case ${with_sysroot} in
715d1656 9595 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9596 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9597 esac
9598
9599 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9600
9601 if test "x$exec_prefix" = xNONE; then
9602 if test "x$prefix" = xNONE; then
9603 test_prefix=/usr/local
9604 else
9605 test_prefix=$prefix
9606 fi
9607 else
9608 test_prefix=$exec_prefix
9609 fi
9610 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9611 "${test_prefix}"|"${test_prefix}/"*|\
9612 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9613 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9614 TARGET_SYSTEM_ROOT_DEFINE="$t"
9615 ;;
9616 esac
9617
9618else
9619
9620 TARGET_SYSTEM_ROOT=
9621 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9622
9623fi
9624
9625
9626
9627
3b851bce
AC
9628# NOTE: Don't add -Wall or -Wunused, they both include
9629# -Wunused-parameter which reports bogus warnings.
9630# NOTE: If you add to this list, remember to update
9631# gdb/doc/gdbint.texinfo.
1decb323 9632build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9633-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9634-Wunused-label -Wunused-function"
d8038014 9635# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9636# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9637# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9638# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9639# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9640# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9641# Check whether --enable-build-warnings or --disable-build-warnings was given.
9642if test "${enable_build_warnings+set}" = set; then
9643 enableval="$enable_build_warnings"
1decb323 9644 case "${enableval}" in
c906108c
SS
9645 yes) ;;
9646 no) build_warnings="-w";;
9647 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9648 build_warnings="${build_warnings} ${t}";;
9649 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9650 build_warnings="${t} ${build_warnings}";;
9651 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9652esac
d4f3574e 9653if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9654 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9655fi
1decb323 9656fi
3b851bce
AC
9657# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9658if test "${enable_gdb_build_warnings+set}" = set; then
9659 enableval="$enable_gdb_build_warnings"
9660 case "${enableval}" in
9661 yes) ;;
9662 no) build_warnings="-w";;
9663 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9664 build_warnings="${build_warnings} ${t}";;
9665 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9666 build_warnings="${t} ${build_warnings}";;
9667 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9668esac
9669if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9670 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9671fi
9672fi
104c1213
JM
9673WARN_CFLAGS=""
9674WERROR_CFLAGS=""
c906108c
SS
9675if test "x${build_warnings}" != x -a "x$GCC" = xyes
9676then
746a987d 9677 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
086ec9eb 9678echo "configure:9679: checking compiler warning flags" >&5
746a987d
AC
9679 # Separate out the -Werror flag as some files just cannot be
9680 # compiled with it enabled.
9681 for w in ${build_warnings}; do
9682 case $w in
9683 -Werr*) WERROR_CFLAGS=-Werror ;;
9684 *) # Check that GCC accepts it
4536bbc6
AC
9685 saved_CFLAGS="$CFLAGS"
9686 CFLAGS="$CFLAGS $w"
9687 cat > conftest.$ac_ext <<EOF
086ec9eb 9688#line 9689 "configure"
4536bbc6
AC
9689#include "confdefs.h"
9690
9691int main() {
9692
9693; return 0; }
9694EOF
086ec9eb 9695if { (eval echo configure:9696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9696 rm -rf conftest*
9697 WARN_CFLAGS="${WARN_CFLAGS} $w"
9698else
9699 echo "configure: failed program was:" >&5
9700 cat conftest.$ac_ext >&5
9701fi
9702rm -f conftest*
9703 CFLAGS="$saved_CFLAGS"
746a987d
AC
9704 esac
9705 done
9706 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9707fi
9708
9709
104c1213 9710
7a292a7a
SS
9711# In the Cygwin environment, we need some additional flags.
9712echo $ac_n "checking for cygwin""... $ac_c" 1>&6
086ec9eb 9713echo "configure:9714: checking for cygwin" >&5
7a292a7a
SS
9714if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9715 echo $ac_n "(cached) $ac_c" 1>&6
9716else
9717 cat > conftest.$ac_ext <<EOF
086ec9eb 9718#line 9719 "configure"
7a292a7a
SS
9719#include "confdefs.h"
9720
9721#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9722lose
9723#endif
9724EOF
9725if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9726 egrep "lose" >/dev/null 2>&1; then
9727 rm -rf conftest*
9728 gdb_cv_os_cygwin=yes
9729else
9730 rm -rf conftest*
9731 gdb_cv_os_cygwin=no
9732fi
9733rm -f conftest*
9734
9735fi
9736
9737echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9738
aff38e61
AC
9739
9740SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9741case ${host} in
95cbc983
AC
9742 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9743 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9744esac
9745
9746
cd0fc7c3
SS
9747# libreadline needs libuser32.a in a cygwin environment
9748WIN32LIBS=
9749if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9750 WIN32LIBS="-luser32"
9751 case "${target}" in
9752 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9753 ;;
9754 esac
cd0fc7c3 9755fi
c906108c 9756
7a292a7a 9757
3fc11d3e
JM
9758LIBGUI="../libgui/src/libgui.a"
9759GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9760
9761
7a292a7a 9762
3fc11d3e
JM
9763WIN32LDAPP=
9764
9765
9766
d91670b9
CV
9767case "${host}" in
9768*-*-cygwin*)
9769 configdir="win"
9770 ;;
9771*)
9772 configdir="unix"
9773 ;;
9774esac
3fc11d3e
JM
9775
9776GDBTKLIBS=
9777if test "${enable_gdbtk}" = "yes"; then
9778
d1c3b63a
KS
9779 # Gdbtk must have an absolute path to srcdir in order to run
9780 # properly when not installed.
9781 here=`pwd`
9782 cd ${srcdir}
9783 GDBTK_SRC_DIR=`pwd`
9784 cd $here
9785
3fc11d3e
JM
9786
9787#
9788# Ok, lets find the tcl configuration
9789# First, look for one uninstalled.
9790# the alternative search directory is invoked by --with-tclconfig
9791#
9792
9793if test x"${no_tcl}" = x ; then
9794 # we reset no_tcl in case something fails here
9795 no_tcl=true
9796 # Check whether --with-tclconfig or --without-tclconfig was given.
9797if test "${with_tclconfig+set}" = set; then
9798 withval="$with_tclconfig"
9799 with_tclconfig=${withval}
9800fi
9801
9802 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
086ec9eb 9803echo "configure:9804: checking for Tcl configuration" >&5
3fc11d3e
JM
9804 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9805 echo $ac_n "(cached) $ac_c" 1>&6
9806else
9807
9808
9809 # First check to see if --with-tclconfig was specified.
9810 if test x"${with_tclconfig}" != x ; then
9811 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9812 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9813 else
9814 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9815 fi
9816 fi
9817
9818 # then check for a private Tcl installation
9819 if test x"${ac_cv_c_tclconfig}" = x ; then
9820 for i in \
9821 ../tcl \
9822 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9823 ../../tcl \
9824 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9825 ../../../tcl \
9826 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9827 if test -f "$i/${configdir}/tclConfig.sh" ; then
9828 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9829 break
9830 fi
9831 done
9832 fi
9833 # check in a few common install locations
9834 if test x"${ac_cv_c_tclconfig}" = x ; then
9835 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9836 if test -f "$i/tclConfig.sh" ; then
9837 ac_cv_c_tclconfig=`(cd $i; pwd)`
9838 break
9839 fi
9840 done
9841 fi
9842 # check in a few other private locations
9843 if test x"${ac_cv_c_tclconfig}" = x ; then
9844 for i in \
9845 ${srcdir}/../tcl \
9846 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9847 if test -f "$i/${configdir}/tclConfig.sh" ; then
9848 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9849 break
9850 fi
9851 done
9852 fi
9853
9854fi
9855
9856 if test x"${ac_cv_c_tclconfig}" = x ; then
9857 TCLCONFIG="# no Tcl configs found"
9858 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9859 else
9860 no_tcl=
9861 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9862 echo "$ac_t""found $TCLCONFIG" 1>&6
9863 fi
9864fi
9865
9866 if test -z "${no_tcl}"; then
9867
9868 . $TCLCONFIG
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
033afc63 9889
3fc11d3e
JM
9890
9891
9892
9893
9894
9895
9896#
9897# Ok, lets find the tk configuration
9898# First, look for one uninstalled.
9899# the alternative search directory is invoked by --with-tkconfig
9900#
9901
9902if test x"${no_tk}" = x ; then
9903 # we reset no_tk in case something fails here
9904 no_tk=true
9905 # Check whether --with-tkconfig or --without-tkconfig was given.
9906if test "${with_tkconfig+set}" = set; then
9907 withval="$with_tkconfig"
9908 with_tkconfig=${withval}
9909fi
9910
9911 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
086ec9eb 9912echo "configure:9913: checking for Tk configuration" >&5
3fc11d3e
JM
9913 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9914 echo $ac_n "(cached) $ac_c" 1>&6
9915else
9916
9917
9918 # First check to see if --with-tkconfig was specified.
9919 if test x"${with_tkconfig}" != x ; then
9920 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9921 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9922 else
9923 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9924 fi
9925 fi
9926
9927 # then check for a private Tk library
9928 if test x"${ac_cv_c_tkconfig}" = x ; then
9929 for i in \
9930 ../tk \
9931 `ls -dr ../tk[4-9]* 2>/dev/null` \
9932 ../../tk \
9933 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9934 ../../../tk \
9935 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9936 if test -f "$i/${configdir}/tkConfig.sh" ; then
9937 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9938 break
9939 fi
9940 done
9941 fi
9942 # check in a few common install locations
9943 if test x"${ac_cv_c_tkconfig}" = x ; then
9944 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9945 if test -f "$i/tkConfig.sh" ; then
9946 ac_cv_c_tkconfig=`(cd $i; pwd)`
9947 break
9948 fi
9949 done
9950 fi
9951 # check in a few other private locations
9952 if test x"${ac_cv_c_tkconfig}" = x ; then
9953 for i in \
9954 ${srcdir}/../tk \
9955 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9956 if test -f "$i/${configdir}/tkConfig.sh" ; then
9957 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9958 break
9959 fi
9960 done
9961 fi
9962
9963fi
9964
9965 if test x"${ac_cv_c_tkconfig}" = x ; then
9966 TKCONFIG="# no Tk configs found"
9967 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9968 else
9969 no_tk=
9970 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9971 echo "$ac_t""found $TKCONFIG" 1>&6
9972 fi
9973fi
9974
9975
9976
dd2504ab
JM
9977 # now look for Tcl library stuff
9978
d91670b9 9979 tcldir="../tcl/${configdir}/"
dd2504ab
JM
9980
9981 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9982
3fc11d3e
JM
9983 # If $no_tk is nonempty, then we can't do Tk, and there is no
9984 # point to doing Tcl.
9985 if test -z "${no_tk}"; then
9986
9987 if test -f "$TKCONFIG" ; then
9988 . $TKCONFIG
9989 fi
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004#
10005# Ok, lets find the tcl source trees so we can use the headers
10006# Warning: transition of version 9 to 10 will break this algorithm
10007# because 10 sorts before 9. We also look for just tcl. We have to
10008# be careful that we don't match stuff like tclX by accident.
10009# the alternative search directory is involked by --with-tclinclude
10010#
10011
10012no_tcl=true
10013echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
086ec9eb 10014echo "configure:10015: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
10015# Check whether --with-tclinclude or --without-tclinclude was given.
10016if test "${with_tclinclude+set}" = set; then
10017 withval="$with_tclinclude"
10018 with_tclinclude=${withval}
10019fi
10020
10021if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
10022 echo $ac_n "(cached) $ac_c" 1>&6
10023else
10024
10025# first check to see if --with-tclinclude was specified
10026if test x"${with_tclinclude}" != x ; then
10027 if test -f ${with_tclinclude}/tclInt.h ; then
10028 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
10029 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
10030 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
10031 else
10032 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
10033 fi
10034fi
10035
10036# next check if it came with Tcl configuration file
10037if test x"${ac_cv_c_tclconfig}" = x ; then
10038 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
10039 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
10040 fi
10041fi
10042
10043# next check in private source directory
10044#
10045# since ls returns lowest version numbers first, reverse its output
10046if test x"${ac_cv_c_tclh}" = x ; then
10047 for i in \
10048 ${srcdir}/../tcl \
10049 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
10050 ${srcdir}/../../tcl \
10051 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
10052 ${srcdir}/../../../tcl \
10053 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
10054 if test -f $i/generic/tclInt.h ; then
10055 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10056 break
10057 fi
10058 done
10059fi
10060# finally check in a few common install locations
10061#
10062# since ls returns lowest version numbers first, reverse its output
10063if test x"${ac_cv_c_tclh}" = x ; then
10064 for i in \
10065 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
10066 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
10067 /usr/local/src/tcl \
10068 /usr/local/lib/tcl \
10069 ${prefix}/include ; do
10070 if test -f $i/generic/tclInt.h ; then
10071 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10072 break
10073 fi
10074 done
10075fi
10076# see if one is installed
10077if test x"${ac_cv_c_tclh}" = x ; then
10078 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
10079echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
086ec9eb 10080echo "configure:10081: checking for tclInt.h" >&5
3fc11d3e
JM
10081if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10082 echo $ac_n "(cached) $ac_c" 1>&6
10083else
10084 cat > conftest.$ac_ext <<EOF
086ec9eb 10085#line 10086 "configure"
3fc11d3e
JM
10086#include "confdefs.h"
10087#include <tclInt.h>
10088EOF
10089ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 10090{ (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10091ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10092if test -z "$ac_err"; then
10093 rm -rf conftest*
10094 eval "ac_cv_header_$ac_safe=yes"
10095else
10096 echo "$ac_err" >&5
10097 echo "configure: failed program was:" >&5
10098 cat conftest.$ac_ext >&5
10099 rm -rf conftest*
10100 eval "ac_cv_header_$ac_safe=no"
10101fi
10102rm -f conftest*
10103fi
10104if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10105 echo "$ac_t""yes" 1>&6
10106 ac_cv_c_tclh=installed
10107else
10108 echo "$ac_t""no" 1>&6
10109ac_cv_c_tclh=""
10110fi
10111
10112fi
10113
10114fi
10115
10116if test x"${ac_cv_c_tclh}" = x ; then
10117 TCLHDIR="# no Tcl private headers found"
10118 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
10119fi
10120if test x"${ac_cv_c_tclh}" != x ; then
10121 no_tcl=""
10122 if test x"${ac_cv_c_tclh}" = x"installed" ; then
10123 echo "$ac_t""is installed" 1>&6
10124 TCLHDIR=""
10125 else
10126 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
10127 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
10128 TCLHDIR="-I${ac_cv_c_tclh}"
10129 fi
10130fi
10131
10132
10133
10134
10135#
10136# Ok, lets find the tk source trees so we can use the headers
10137# If the directory (presumably symlink) named "tk" exists, use that one
10138# in preference to any others. Same logic is used when choosing library
10139# and again with Tcl. The search order is the best place to look first, then in
10140# decreasing significance. The loop breaks if the trigger file is found.
10141# Note the gross little conversion here of srcdir by cd'ing to the found
10142# directory. This converts the path from a relative to an absolute, so
10143# recursive cache variables for the path will work right. We check all
10144# the possible paths in one loop rather than many seperate loops to speed
10145# things up.
10146# the alternative search directory is involked by --with-tkinclude
10147#
10148no_tk=true
10149echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
086ec9eb 10150echo "configure:10151: checking for Tk private headers" >&5
3fc11d3e
JM
10151# Check whether --with-tkinclude or --without-tkinclude was given.
10152if test "${with_tkinclude+set}" = set; then
10153 withval="$with_tkinclude"
10154 with_tkinclude=${withval}
10155fi
10156
10157if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
10158 echo $ac_n "(cached) $ac_c" 1>&6
10159else
10160
10161# first check to see if --with-tkinclude was specified
10162if test x"${with_tkinclude}" != x ; then
10163 if test -f ${with_tkinclude}/tk.h ; then
10164 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
10165 elif test -f ${with_tkinclude}/generic/tk.h ; then
10166 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
10167 else
10168 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
10169 fi
10170fi
10171
10172# next check if it came with Tk configuration file
10173if test x"${ac_cv_c_tkconfig}" = x ; then
10174 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
10175 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
10176 fi
10177fi
10178
10179# next check in private source directory
10180#
10181# since ls returns lowest version numbers first, reverse its output
10182if test x"${ac_cv_c_tkh}" = x ; then
10183 for i in \
10184 ${srcdir}/../tk \
10185 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
10186 ${srcdir}/../../tk \
10187 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
10188 ${srcdir}/../../../tk \
10189 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
10190 if test -f $i/generic/tk.h ; then
10191 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10192 break
10193 fi
10194 done
10195fi
10196# finally check in a few common install locations
10197#
10198# since ls returns lowest version numbers first, reverse its output
10199if test x"${ac_cv_c_tkh}" = x ; then
10200 for i in \
10201 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
10202 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
10203 /usr/local/src/tk \
10204 /usr/local/lib/tk \
10205 ${prefix}/include ; do
10206 if test -f $i/generic/tk.h ; then
10207 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10208 break
10209 fi
10210 done
10211fi
10212# see if one is installed
10213if test x"${ac_cv_c_tkh}" = x ; then
10214 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
10215echo $ac_n "checking for tk.h""... $ac_c" 1>&6
086ec9eb 10216echo "configure:10217: checking for tk.h" >&5
3fc11d3e
JM
10217if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10218 echo $ac_n "(cached) $ac_c" 1>&6
10219else
10220 cat > conftest.$ac_ext <<EOF
086ec9eb 10221#line 10222 "configure"
3fc11d3e
JM
10222#include "confdefs.h"
10223#include <tk.h>
10224EOF
10225ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 10226{ (eval echo configure:10227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
10227ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10228if test -z "$ac_err"; then
10229 rm -rf conftest*
10230 eval "ac_cv_header_$ac_safe=yes"
10231else
10232 echo "$ac_err" >&5
10233 echo "configure: failed program was:" >&5
10234 cat conftest.$ac_ext >&5
10235 rm -rf conftest*
10236 eval "ac_cv_header_$ac_safe=no"
10237fi
10238rm -f conftest*
10239fi
10240if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10241 echo "$ac_t""yes" 1>&6
10242 ac_cv_c_tkh=installed
10243else
10244 echo "$ac_t""no" 1>&6
10245ac_cv_c_tkh=""
10246fi
10247
10248fi
10249
10250fi
10251
10252if test x"${ac_cv_c_tkh}" != x ; then
10253 no_tk=""
10254 if test x"${ac_cv_c_tkh}" = x"installed" ; then
10255 echo "$ac_t""is installed" 1>&6
10256 TKHDIR=""
10257 else
10258 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
10259 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
10260 TKHDIR="-I${ac_cv_c_tkh}"
10261 fi
10262else
10263 TKHDIR="# no Tk directory found"
10264 echo "configure: warning: Can't find Tk private headers" 1>&2
10265 no_tk=true
10266fi
10267
10268
10269
10270
10271echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
086ec9eb 10272echo "configure:10273: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10273if test x"${ac_cv_c_itclh}" = x ; then
10274 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
10275 if test -f $i/generic/itcl.h ; then
10276 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10277 break
10278 fi
10279 done
10280fi
10281if test x"${ac_cv_c_itclh}" = x ; then
10282 ITCLHDIR="# no Itcl private headers found"
10283 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10284fi
10285if test x"${ac_cv_c_itclh}" != x ; then
10286 ITCLHDIR="-I${ac_cv_c_itclh}"
10287fi
10288# should always be here
10289# ITCLLIB="../itcl/itcl/unix/libitcl.a"
10290
10291#AC_SUBST(ITCLLIB)
10292
10293
10294echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
086ec9eb 10295echo "configure:10296: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10296if test x"${ac_cv_c_itkh}" = x ; then
10297 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10298 if test -f $i/generic/itk.h ; then
10299 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10300 break
10301 fi
10302 done
10303fi
10304if test x"${ac_cv_c_itkh}" = x ; then
10305 ITKHDIR="# no Itk private headers found"
10306 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10307fi
10308if test x"${ac_cv_c_itkh}" != x ; then
10309 ITKHDIR="-I${ac_cv_c_itkh}"
10310fi
10311# should always be here
10312# ITKLIB="../itcl/itk/unix/libitk.a"
10313
10314#AC_SUBST(ITKLIB)
10315
3fc11d3e 10316
dd2504ab
JM
10317
10318 # now look for Tk library stuff
10319
d91670b9 10320 tkdir="../tk/${configdir}/"
dd2504ab
JM
10321
10322 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10323
3fc11d3e
JM
10324 # now look for Itcl library stuff
10325
10326
10327#
10328# Ok, lets find the itcl configuration
10329# First, look for one uninstalled.
10330# the alternative search directory is invoked by --with-itclconfig
10331#
10332
10333if test x"${no_itcl}" = x ; then
10334 # we reset no_itcl in case something fails here
10335 no_itcl=true
10336 # Check whether --with-itclconfig or --without-itclconfig was given.
10337if test "${with_itclconfig+set}" = set; then
10338 withval="$with_itclconfig"
10339 with_itclconfig=${withval}
10340fi
10341
10342 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
086ec9eb 10343echo "configure:10344: checking for Itcl configuration" >&5
3fc11d3e
JM
10344 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10345 echo $ac_n "(cached) $ac_c" 1>&6
10346else
10347
10348
10349 # First check to see if --with-itclconfig was specified.
10350 if test x"${with_itclconfig}" != x ; then
10351 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10352 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10353 else
10354 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10355 fi
10356 fi
10357
10358 # then check for a private Itcl library
10359 if test x"${ac_cv_c_itclconfig}" = x ; then
10360 for i in \
10361 ../itcl/itcl \
10362 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10363 ../../itcl \
10364 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10365 ../../../itcl \
10366 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10367 if test -f "$i/itclConfig.sh" ; then
10368 ac_cv_c_itclconfig=`(cd $i; pwd)`
10369 break
10370 fi
10371 done
10372 fi
10373 # check in a few common install locations
10374 if test x"${ac_cv_c_itclconfig}" = x ; then
10375 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10376 if test -f "$i/itclConfig.sh" ; then
10377 ac_cv_c_itclconfig=`(cd $i; pwd)`
10378 break
10379 fi
10380 done
10381 fi
10382 # check in a few other private locations
10383 if test x"${ac_cv_c_itclconfig}" = x ; then
10384 for i in \
10385 ${srcdir}/../itcl/itcl \
10386 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10387 if test -f "$i/itclConfig.sh" ; then
10388 ac_cv_c_itclconfig=`(cd $i; pwd)`
10389 break
10390 fi
10391 done
10392 fi
10393
10394fi
10395
10396 if test x"${ac_cv_c_itclconfig}" = x ; then
10397 ITCLCONFIG="# no Itcl configs found"
10398 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10399 else
10400 no_itcl=
10401 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10402 echo "$ac_t""found $ITCLCONFIG" 1>&6
10403 fi
10404fi
10405
10406 if test -z "${no_itcl}"; then
10407
10408 if test -f "$ITCLCONFIG" ; then
10409 . $ITCLCONFIG
10410 fi
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
3fc11d3e
JM
10421
10422
10423 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10424 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10425 fi
10426
10427
10428 # now look for Itk library stuff
10429
10430#
10431# Ok, lets find the itk configuration
10432# First, look for one uninstalled.
10433# the alternative search directory is invoked by --with-itkconfig
10434#
10435
10436if test x"${no_itk}" = x ; then
10437 # we reset no_itk in case something fails here
10438 no_itk=true
10439 # Check whether --with-itkconfig or --without-itkconfig was given.
10440if test "${with_itkconfig+set}" = set; then
10441 withval="$with_itkconfig"
10442 with_itkconfig=${withval}
10443fi
10444
10445 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
086ec9eb 10446echo "configure:10447: checking for Itk configuration" >&5
3fc11d3e
JM
10447 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10448 echo $ac_n "(cached) $ac_c" 1>&6
10449else
10450
10451
10452 # First check to see if --with-itkconfig was specified.
10453 if test x"${with_itkconfig}" != x ; then
10454 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10455 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10456 else
10457 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10458 fi
10459 fi
10460
10461 # then check for a private Itk library
10462 if test x"${ac_cv_c_itkconfig}" = x ; then
10463 for i in \
10464 ../itcl/itk \
10465 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10466 ../../itk \
10467 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10468 ../../../itk \
10469 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10470 if test -f "$i/itkConfig.sh" ; then
10471 ac_cv_c_itkconfig=`(cd $i; pwd)`
10472 break
10473 fi
10474 done
10475 fi
10476 # check in a few common install locations
10477 if test x"${ac_cv_c_itkconfig}" = x ; then
10478 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10479 if test -f "$i/itkConfig.sh" ; then
10480 ac_cv_c_itkconfig=`(cd $i; pwd)`
10481 break
10482 fi
10483 done
10484 fi
10485 # check in a few other private locations
10486 if test x"${ac_cv_c_itkconfig}" = x ; then
10487 for i in \
10488 ${srcdir}/../itcl/itk \
10489 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10490 if test -f "$i/itkConfig.sh" ; then
10491 ac_cv_c_itkconfig=`(cd $i; pwd)`
10492 break
10493 fi
10494 done
10495 fi
10496
10497fi
10498
10499 if test x"${ac_cv_c_itkconfig}" = x ; then
10500 ITKCONFIG="# no Itk configs found"
10501 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10502 else
10503 no_itk=
10504 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10505 echo "$ac_t""found $ITKCONFIG" 1>&6
10506 fi
10507fi
10508
10509
10510 if test -z "${no_itcl}"; then
10511
10512 if test -f "$ITKCONFIG" ; then
10513 . $ITKCONFIG
10514 fi
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
3fc11d3e 10527 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10528 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10529 fi
10530
4226a5a5 10531 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10532 # Tcl/Tk 8.1 require -fwritable strings. I don't
10533 # know whether 8.2 will or not, but I bet it will.
10534 # I don't have to worry about 7.x since we don't support it.
10535 GDBTK_CFLAGS=""
10536 if test "$GCC" = "yes"; then
10537 if test "$TCL_VERSION" != "8.0" ; then
10538 GDBTK_CFLAGS="-fwritable-strings"
10539 fi
10540 fi
10541
10542 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10543 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10544 # Yes, the ordering seems wrong here. But it isn't.
10545 # TK_LIBS is the list of libraries that need to be linked
10546 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10547 # were in LIBS then any link tests after this point would
10548 # try to include things like `$(LIBGUI)', which wouldn't work.
10549 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10550
10551 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10552 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10553 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10554 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10555 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10556 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10557 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10558
10559 if test x$gdb_cv_os_cygwin = xyes; then
10560 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10561 WIN32LDAPP="-Wl,--subsystem,console"
10562 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10563 fi
10564 fi
10565 fi
ffc6a242 10566
ffc6a242 10567 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10568fi
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
dd2504ab 10582
c906108c
SS
10583# If we find X, set shell vars x_includes and x_libraries to the
10584# paths, otherwise set no_x=yes.
10585# Uses ac_ vars as temps to allow command line to override cache and checks.
10586# --without-x overrides everything else, but does not touch the cache.
10587echo $ac_n "checking for X""... $ac_c" 1>&6
086ec9eb 10588echo "configure:10589: checking for X" >&5
c906108c
SS
10589
10590# Check whether --with-x or --without-x was given.
10591if test "${with_x+set}" = set; then
10592 withval="$with_x"
10593 :
10594fi
10595
10596# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10597if test "x$with_x" = xno; then
10598 # The user explicitly disabled X.
10599 have_x=disabled
10600else
10601 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10602 # Both variables are already set.
10603 have_x=yes
10604 else
10605if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10606 echo $ac_n "(cached) $ac_c" 1>&6
10607else
10608 # One or both of the vars are not set, and there is no cached value.
10609ac_x_includes=NO ac_x_libraries=NO
10610rm -fr conftestdir
10611if mkdir conftestdir; then
10612 cd conftestdir
10613 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10614 cat > Imakefile <<'EOF'
10615acfindx:
10616 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10617EOF
10618 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10619 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10620 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10621 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10622 for ac_extension in a so sl; do
10623 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10624 test -f $ac_im_libdir/libX11.$ac_extension; then
10625 ac_im_usrlibdir=$ac_im_libdir; break
10626 fi
10627 done
10628 # Screen out bogus values from the imake configuration. They are
10629 # bogus both because they are the default anyway, and because
10630 # using them would break gcc on systems where it needs fixed includes.
10631 case "$ac_im_incroot" in
10632 /usr/include) ;;
10633 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10634 esac
10635 case "$ac_im_usrlibdir" in
10636 /usr/lib | /lib) ;;
10637 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10638 esac
10639 fi
10640 cd ..
10641 rm -fr conftestdir
10642fi
10643
10644if test "$ac_x_includes" = NO; then
10645 # Guess where to find include files, by looking for this one X11 .h file.
10646 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10647
10648 # First, try using that file with no special directory specified.
10649cat > conftest.$ac_ext <<EOF
086ec9eb 10650#line 10651 "configure"
c906108c
SS
10651#include "confdefs.h"
10652#include <$x_direct_test_include>
10653EOF
10654ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
086ec9eb 10655{ (eval echo configure:10656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10656ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10657if test -z "$ac_err"; then
10658 rm -rf conftest*
10659 # We can compile using X headers with no special include directory.
10660ac_x_includes=
10661else
10662 echo "$ac_err" >&5
10663 echo "configure: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10665 rm -rf conftest*
10666 # Look for the header file in a standard set of common directories.
10667# Check X11 before X11Rn because it is often a symlink to the current release.
10668 for ac_dir in \
10669 /usr/X11/include \
10670 /usr/X11R6/include \
10671 /usr/X11R5/include \
10672 /usr/X11R4/include \
10673 \
10674 /usr/include/X11 \
10675 /usr/include/X11R6 \
10676 /usr/include/X11R5 \
10677 /usr/include/X11R4 \
10678 \
10679 /usr/local/X11/include \
10680 /usr/local/X11R6/include \
10681 /usr/local/X11R5/include \
10682 /usr/local/X11R4/include \
10683 \
10684 /usr/local/include/X11 \
10685 /usr/local/include/X11R6 \
10686 /usr/local/include/X11R5 \
10687 /usr/local/include/X11R4 \
10688 \
10689 /usr/X386/include \
10690 /usr/x386/include \
10691 /usr/XFree86/include/X11 \
10692 \
10693 /usr/include \
10694 /usr/local/include \
10695 /usr/unsupported/include \
10696 /usr/athena/include \
10697 /usr/local/x11r5/include \
10698 /usr/lpp/Xamples/include \
10699 \
10700 /usr/openwin/include \
10701 /usr/openwin/share/include \
10702 ; \
10703 do
10704 if test -r "$ac_dir/$x_direct_test_include"; then
10705 ac_x_includes=$ac_dir
10706 break
10707 fi
10708 done
10709fi
10710rm -f conftest*
10711fi # $ac_x_includes = NO
10712
10713if test "$ac_x_libraries" = NO; then
10714 # Check for the libraries.
10715
10716 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10717 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10718
10719 # See if we find them without any special options.
10720 # Don't add to $LIBS permanently.
10721 ac_save_LIBS="$LIBS"
10722 LIBS="-l$x_direct_test_library $LIBS"
10723cat > conftest.$ac_ext <<EOF
086ec9eb 10724#line 10725 "configure"
c906108c
SS
10725#include "confdefs.h"
10726
10727int main() {
10728${x_direct_test_function}()
10729; return 0; }
10730EOF
086ec9eb 10731if { (eval echo configure:10732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10732 rm -rf conftest*
10733 LIBS="$ac_save_LIBS"
10734# We can link X programs with no special library path.
10735ac_x_libraries=
10736else
10737 echo "configure: failed program was:" >&5
10738 cat conftest.$ac_ext >&5
10739 rm -rf conftest*
10740 LIBS="$ac_save_LIBS"
10741# First see if replacing the include by lib works.
10742# Check X11 before X11Rn because it is often a symlink to the current release.
10743for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10744 /usr/X11/lib \
10745 /usr/X11R6/lib \
10746 /usr/X11R5/lib \
10747 /usr/X11R4/lib \
10748 \
10749 /usr/lib/X11 \
10750 /usr/lib/X11R6 \
10751 /usr/lib/X11R5 \
10752 /usr/lib/X11R4 \
10753 \
10754 /usr/local/X11/lib \
10755 /usr/local/X11R6/lib \
10756 /usr/local/X11R5/lib \
10757 /usr/local/X11R4/lib \
10758 \
10759 /usr/local/lib/X11 \
10760 /usr/local/lib/X11R6 \
10761 /usr/local/lib/X11R5 \
10762 /usr/local/lib/X11R4 \
10763 \
10764 /usr/X386/lib \
10765 /usr/x386/lib \
10766 /usr/XFree86/lib/X11 \
10767 \
10768 /usr/lib \
10769 /usr/local/lib \
10770 /usr/unsupported/lib \
10771 /usr/athena/lib \
10772 /usr/local/x11r5/lib \
10773 /usr/lpp/Xamples/lib \
10774 /lib/usr/lib/X11 \
10775 \
10776 /usr/openwin/lib \
10777 /usr/openwin/share/lib \
10778 ; \
10779do
10780 for ac_extension in a so sl; do
10781 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10782 ac_x_libraries=$ac_dir
10783 break 2
10784 fi
10785 done
10786done
10787fi
10788rm -f conftest*
10789fi # $ac_x_libraries = NO
10790
10791if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10792 # Didn't find X anywhere. Cache the known absence of X.
10793 ac_cv_have_x="have_x=no"
10794else
10795 # Record where we found X for the cache.
10796 ac_cv_have_x="have_x=yes \
10797 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10798fi
10799fi
10800 fi
10801 eval "$ac_cv_have_x"
10802fi # $with_x != no
10803
10804if test "$have_x" != yes; then
10805 echo "$ac_t""$have_x" 1>&6
10806 no_x=yes
10807else
10808 # If each of the values was on the command line, it overrides each guess.
10809 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10810 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10811 # Update the cache value to reflect the command line values.
10812 ac_cv_have_x="have_x=yes \
10813 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10814 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10815fi
10816
10817
7a292a7a
SS
10818
10819# Unlike the sim directory, whether a simulator is linked is controlled by
10820# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10821# This code just checks for a few cases where we'd like to ignore those
10822# definitions, even when they're present in the '.mt' file. These cases
10823# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10824# not part of the source tree.
7a292a7a
SS
10825#
10826# Check whether --enable-sim or --disable-sim was given.
10827if test "${enable_sim+set}" = set; then
10828 enableval="$enable_sim"
10829 echo "enable_sim = $enable_sim";
10830 echo "enableval = ${enableval}";
10831 case "${enableval}" in
10832 yes) ignore_sim=false ;;
10833 no) ignore_sim=true ;;
10834 *) ignore_sim=false ;;
10835 esac
10836else
10837 ignore_sim=false
10838fi
10839
10840
10841if test ! -d "${srcdir}/../sim"; then
10842 ignore_sim=true
10843fi
10844
10845if test "${ignore_sim}" = "true"; then
10846 IGNORE_SIM="SIM="
10847 IGNORE_SIM_OBS="SIM_OBS="
10848else
10849 IGNORE_SIM=""
10850 IGNORE_SIM_OBS=""
10851 cat >> confdefs.h <<\EOF
10852#define WITH_SIM 1
10853EOF
10854
10855fi
10856
10857
10858
c906108c
SS
10859
10860
10861
10862
10863
10864
dfcd3bfb 10865
e56ac5c3
AC
10866
10867
b3a90332
AC
10868
10869
c35f4ffc
AC
10870# List of host floatformats.
10871cat >> confdefs.h <<EOF
10872#define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10873EOF
10874
10875cat >> confdefs.h <<EOF
10876#define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10877EOF
10878
10879cat >> confdefs.h <<EOF
10880#define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10881EOF
10882
10883
c906108c
SS
10884# target_subdir is used by the testsuite to find the target libraries.
10885target_subdir=
10886if test "${host}" != "${target}"; then
10887 target_subdir="${target_alias}/"
10888fi
10889
10890
10891frags=
10892host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10893if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10894 # When building a native debuger the .mh file containing things
10895 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10896 # since it no longer contains anything useful.
10897 if test "${target}" = "${host}"; then
10898 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10899 else
10900 host_makefile_frag=/dev/null
10901 fi
c906108c
SS
10902fi
10903frags="$frags $host_makefile_frag"
10904
10905target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10906if test ! -f ${target_makefile_frag}; then
10907{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10908fi
10909frags="$frags $target_makefile_frag"
10910
10911
10912
10913
10914
10915hostfile=`sed -n '
10916s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10917' ${host_makefile_frag}`
10918
10919targetfile=`sed -n '
10920s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10921' ${target_makefile_frag}`
10922
c906108c 10923if test "${target}" = "${host}"; then
a85f51e7
DJ
10924# We pick this up from the host configuration file (.mh) because we
10925# do not have a native configuration Makefile fragment.
c906108c
SS
10926nativefile=`sed -n '
10927s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10928' ${host_makefile_frag}`
c906108c
SS
10929fi
10930
10931
b00a8037
DJ
10932if test x"${gdb_osabi}" != x ; then
10933 cat >> confdefs.h <<EOF
10934#define GDB_OSABI_DEFAULT $gdb_osabi
10935EOF
10936
10937fi
10938
8dcde887
MK
10939# Enable multi-ice-gdb-server.
10940# Check whether --enable-multi-ice or --disable-multi-ice was given.
10941if test "${enable_multi_ice+set}" = set; then
10942 enableval="$enable_multi_ice"
10943 case $enableval in
10944 yes | no)
10945 ;;
10946 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10947 esac
96baa820
JM
10948fi
10949
8dcde887
MK
10950if test "x$enable_multi_ice" = xyes; then
10951 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10952fi
10953
8dcde887
MK
10954# We only build gdbserver automatically if host and target are the same.
10955if test "x$target" = "x$host"; then
10956 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
086ec9eb 10957echo "configure:10958: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10958 if test "x$build_gdbserver" = xyes; then
10959 configdirs="$configdirs gdbserver"
10960 echo "$ac_t""yes" 1>&6
10961 else
10962 echo "$ac_t""no" 1>&6
10963 fi
10964fi
10965
10966subdirs="doc testsuite $configdirs"
10967
96baa820 10968
c906108c 10969# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10970# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10971# version.
c906108c
SS
10972
10973files=
10974links=
5a2402b8 10975
c906108c 10976rm -f xm.h
5a2402b8 10977xm_h=""
c906108c 10978if test "${hostfile}" != ""; then
5a2402b8
AC
10979 xm_h=xm.h
10980 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10981 files="${files} ${GDB_XM_FILE}"
10982 links="${links} xm.h"
10983 cat >> confdefs.h <<EOF
10984#define GDB_XM_FILE ${GDB_XM_FILE}
10985EOF
10986
c906108c 10987fi
5a2402b8
AC
10988
10989
c906108c 10990rm -f tm.h
5a2402b8 10991tm_h=""
c906108c 10992if test "${targetfile}" != ""; then
5a2402b8
AC
10993 tm_h=tm.h
10994 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10995 files="${files} ${GDB_TM_FILE}"
10996 links="${links} tm.h"
10997 cat >> confdefs.h <<EOF
10998#define GDB_TM_FILE ${GDB_TM_FILE}
10999EOF
11000
c906108c 11001fi
5a2402b8
AC
11002
11003
c906108c 11004rm -f nm.h
5a2402b8 11005nm_h=""
c906108c 11006if test "${nativefile}" != ""; then
5a2402b8
AC
11007 nm_h=nm.h
11008 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
11009 files="${files} ${GDB_NM_FILE}"
11010 links="${links} nm.h"
11011 cat >> confdefs.h <<EOF
11012#define GDB_NM_FILE ${GDB_NM_FILE}
11013EOF
11014
c906108c 11015fi
5a2402b8
AC
11016
11017
c906108c
SS
11018
11019
11020echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
086ec9eb 11021echo "configure:11022: checking for Cygwin environment" >&5
c906108c
SS
11022if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
11023 echo $ac_n "(cached) $ac_c" 1>&6
11024else
11025 cat > conftest.$ac_ext <<EOF
086ec9eb 11026#line 11027 "configure"
c906108c
SS
11027#include "confdefs.h"
11028
11029int main() {
11030
11031#ifndef __CYGWIN__
11032#define __CYGWIN__ __CYGWIN32__
11033#endif
11034return __CYGWIN__;
11035; return 0; }
11036EOF
086ec9eb 11037if { (eval echo configure:11038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
11038 rm -rf conftest*
11039 ac_cv_cygwin=yes
11040else
11041 echo "configure: failed program was:" >&5
11042 cat conftest.$ac_ext >&5
11043 rm -rf conftest*
11044 ac_cv_cygwin=no
11045fi
11046rm -f conftest*
11047rm -f conftest*
11048fi
11049
11050echo "$ac_t""$ac_cv_cygwin" 1>&6
11051CYGWIN=
11052test "$ac_cv_cygwin" = yes && CYGWIN=yes
11053echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
086ec9eb 11054echo "configure:11055: checking for mingw32 environment" >&5
c906108c
SS
11055if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
11056 echo $ac_n "(cached) $ac_c" 1>&6
11057else
11058 cat > conftest.$ac_ext <<EOF
086ec9eb 11059#line 11060 "configure"
c906108c
SS
11060#include "confdefs.h"
11061
11062int main() {
11063return __MINGW32__;
11064; return 0; }
11065EOF
086ec9eb 11066if { (eval echo configure:11067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
11067 rm -rf conftest*
11068 ac_cv_mingw32=yes
11069else
11070 echo "configure: failed program was:" >&5
11071 cat conftest.$ac_ext >&5
11072 rm -rf conftest*
11073 ac_cv_mingw32=no
11074fi
11075rm -f conftest*
11076rm -f conftest*
11077fi
11078
11079echo "$ac_t""$ac_cv_mingw32" 1>&6
11080MINGW32=
11081test "$ac_cv_mingw32" = yes && MINGW32=yes
11082
11083
11084echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
086ec9eb 11085echo "configure:11086: checking for executable suffix" >&5
c906108c
SS
11086if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
11087 echo $ac_n "(cached) $ac_c" 1>&6
11088else
11089 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
11090 ac_cv_exeext=.exe
11091else
11092 rm -f conftest*
11093 echo 'int main () { return 0; }' > conftest.$ac_ext
11094 ac_cv_exeext=
086ec9eb 11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
11096 for file in conftest.*; do
11097 case $file in
5c7f2947 11098 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
11099 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
11100 esac
11101 done
11102 else
11103 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
11104 fi
11105 rm -f conftest*
11106 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
11107fi
11108fi
11109
11110EXEEXT=""
11111test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
11112echo "$ac_t""${ac_cv_exeext}" 1>&6
11113ac_exeext=$EXEEXT
11114
11115
234b45d4
KB
11116
11117cat >> confdefs.h <<\EOF
11118#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
11119EOF
11120
11121
11122
11123
11124 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
11125if test "${with_libiconv_prefix+set}" = set; then
11126 withval="$with_libiconv_prefix"
11127
11128 for dir in `echo "$withval" | tr : ' '`; do
11129 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
11130 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
11131 done
11132
11133fi
11134
11135
11136 echo $ac_n "checking for iconv""... $ac_c" 1>&6
086ec9eb 11137echo "configure:11138: checking for iconv" >&5
234b45d4
KB
11138if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
11139 echo $ac_n "(cached) $ac_c" 1>&6
11140else
11141
11142 am_cv_func_iconv="no, consider installing GNU libiconv"
11143 am_cv_lib_iconv=no
11144 cat > conftest.$ac_ext <<EOF
086ec9eb 11145#line 11146 "configure"
234b45d4
KB
11146#include "confdefs.h"
11147#include <stdlib.h>
11148#include <iconv.h>
11149int main() {
11150iconv_t cd = iconv_open("","");
11151 iconv(cd,NULL,NULL,NULL,NULL);
11152 iconv_close(cd);
11153; return 0; }
11154EOF
086ec9eb 11155if { (eval echo configure:11156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11156 rm -rf conftest*
11157 am_cv_func_iconv=yes
11158else
11159 echo "configure: failed program was:" >&5
11160 cat conftest.$ac_ext >&5
11161fi
11162rm -f conftest*
11163 if test "$am_cv_func_iconv" != yes; then
11164 am_save_LIBS="$LIBS"
11165 LIBS="$LIBS -liconv"
11166 cat > conftest.$ac_ext <<EOF
086ec9eb 11167#line 11168 "configure"
234b45d4
KB
11168#include "confdefs.h"
11169#include <stdlib.h>
11170#include <iconv.h>
11171int main() {
11172iconv_t cd = iconv_open("","");
11173 iconv(cd,NULL,NULL,NULL,NULL);
11174 iconv_close(cd);
11175; return 0; }
11176EOF
086ec9eb 11177if { (eval echo configure:11178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
11178 rm -rf conftest*
11179 am_cv_lib_iconv=yes
11180 am_cv_func_iconv=yes
11181else
11182 echo "configure: failed program was:" >&5
11183 cat conftest.$ac_ext >&5
11184fi
11185rm -f conftest*
11186 LIBS="$am_save_LIBS"
11187 fi
11188
11189fi
11190
11191echo "$ac_t""$am_cv_func_iconv" 1>&6
11192 if test "$am_cv_func_iconv" = yes; then
11193 cat >> confdefs.h <<\EOF
11194#define HAVE_ICONV 1
11195EOF
11196
11197 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
086ec9eb 11198echo "configure:11199: checking for iconv declaration" >&5
234b45d4
KB
11199 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
11200 echo $ac_n "(cached) $ac_c" 1>&6
11201else
11202
11203 cat > conftest.$ac_ext <<EOF
086ec9eb 11204#line 11205 "configure"
234b45d4
KB
11205#include "confdefs.h"
11206
11207#include <stdlib.h>
11208#include <iconv.h>
11209extern
11210#ifdef __cplusplus
11211"C"
11212#endif
11213#if defined(__STDC__) || defined(__cplusplus)
11214size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11215#else
11216size_t iconv();
11217#endif
11218
11219int main() {
11220
11221; return 0; }
11222EOF
086ec9eb 11223if { (eval echo configure:11224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
11224 rm -rf conftest*
11225 am_cv_proto_iconv_arg1=""
11226else
11227 echo "configure: failed program was:" >&5
11228 cat conftest.$ac_ext >&5
11229 rm -rf conftest*
11230 am_cv_proto_iconv_arg1="const"
11231fi
11232rm -f conftest*
11233 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);"
11234fi
11235
11236 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11237 echo "$ac_t""${ac_t:-
11238 }$am_cv_proto_iconv" 1>&6
11239 cat >> confdefs.h <<EOF
11240#define ICONV_CONST $am_cv_proto_iconv_arg1
11241EOF
11242
11243 fi
11244 LIBICONV=
11245 if test "$am_cv_lib_iconv" = yes; then
11246 LIBICONV="-liconv"
11247 fi
11248
11249
11250
c906108c
SS
11251trap '' 1 2 15
11252cat > confcache <<\EOF
11253# This file is a shell script that caches the results of configure
11254# tests run on this system so they can be shared between configure
11255# scripts and configure runs. It is not useful on other systems.
11256# If it contains results you don't want to keep, you may remove or edit it.
11257#
11258# By default, configure uses ./config.cache as the cache file,
11259# creating it if it does not exist already. You can give configure
11260# the --cache-file=FILE option to use a different cache file; that is
11261# what configure does when it calls configure scripts in
11262# subdirectories, so they share the cache.
11263# Giving --cache-file=/dev/null disables caching, for debugging configure.
11264# config.status only pays attention to the cache file if you give it the
11265# --recheck option to rerun configure.
11266#
11267EOF
11268# The following way of writing the cache mishandles newlines in values,
11269# but we know of no workaround that is simple, portable, and efficient.
11270# So, don't put newlines in cache variables' values.
11271# Ultrix sh set writes to stderr and can't be redirected directly,
11272# and sets the high bit in the cache file unless we assign to the vars.
11273(set) 2>&1 |
11274 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11275 *ac_space=\ *)
11276 # `set' does not quote correctly, so add quotes (double-quote substitution
11277 # turns \\\\ into \\, and sed turns \\ into \).
11278 sed -n \
11279 -e "s/'/'\\\\''/g" \
11280 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11281 ;;
11282 *)
11283 # `set' quotes correctly as required by POSIX, so do not add quotes.
11284 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11285 ;;
11286 esac >> confcache
11287if cmp -s $cache_file confcache; then
11288 :
11289else
11290 if test -w $cache_file; then
11291 echo "updating cache $cache_file"
11292 cat confcache > $cache_file
11293 else
11294 echo "not updating unwritable cache $cache_file"
11295 fi
11296fi
11297rm -f confcache
11298
11299trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11300
11301test "x$prefix" = xNONE && prefix=$ac_default_prefix
11302# Let make expand exec_prefix.
11303test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11304
11305# Any assignment to VPATH causes Sun make to only execute
11306# the first set of double-colon rules, so remove it if not needed.
11307# If there is a colon in the path, we need to keep it.
11308if test "x$srcdir" = x.; then
11309 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11310fi
11311
11312trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11313
11314DEFS=-DHAVE_CONFIG_H
11315
11316# Without the "./", some shells look in PATH for config.status.
11317: ${CONFIG_STATUS=./config.status}
11318
11319echo creating $CONFIG_STATUS
11320rm -f $CONFIG_STATUS
11321cat > $CONFIG_STATUS <<EOF
11322#! /bin/sh
11323# Generated automatically by configure.
11324# Run this file to recreate the current configuration.
11325# This directory was configured as follows,
11326# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11327#
11328# $0 $ac_configure_args
11329#
11330# Compiler output produced by configure, useful for debugging
11331# configure, is in ./config.log if it exists.
11332
11333ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11334for ac_option
11335do
11336 case "\$ac_option" in
11337 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11338 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11339 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11340 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11341 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11342 exit 0 ;;
11343 -help | --help | --hel | --he | --h)
11344 echo "\$ac_cs_usage"; exit 0 ;;
11345 *) echo "\$ac_cs_usage"; exit 1 ;;
11346 esac
11347done
11348
11349ac_given_srcdir=$srcdir
11350ac_given_INSTALL="$INSTALL"
11351
ed952ac5 11352trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11353EOF
11354cat >> $CONFIG_STATUS <<EOF
11355
11356# Protect against being on the right side of a sed subst in config.status.
11357sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11358 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11359$ac_vpsub
11360$extrasub
11361s%@SHELL@%$SHELL%g
11362s%@CFLAGS@%$CFLAGS%g
11363s%@CPPFLAGS@%$CPPFLAGS%g
11364s%@CXXFLAGS@%$CXXFLAGS%g
11365s%@FFLAGS@%$FFLAGS%g
11366s%@DEFS@%$DEFS%g
11367s%@LDFLAGS@%$LDFLAGS%g
11368s%@LIBS@%$LIBS%g
11369s%@exec_prefix@%$exec_prefix%g
11370s%@prefix@%$prefix%g
11371s%@program_transform_name@%$program_transform_name%g
11372s%@bindir@%$bindir%g
11373s%@sbindir@%$sbindir%g
11374s%@libexecdir@%$libexecdir%g
11375s%@datadir@%$datadir%g
11376s%@sysconfdir@%$sysconfdir%g
11377s%@sharedstatedir@%$sharedstatedir%g
11378s%@localstatedir@%$localstatedir%g
11379s%@libdir@%$libdir%g
11380s%@includedir@%$includedir%g
11381s%@oldincludedir@%$oldincludedir%g
11382s%@infodir@%$infodir%g
11383s%@mandir@%$mandir%g
413ccac7
AC
11384s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11385s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11386s%@MAINT@%$MAINT%g
c906108c
SS
11387s%@CC@%$CC%g
11388s%@CPP@%$CPP%g
11389s%@host@%$host%g
11390s%@host_alias@%$host_alias%g
11391s%@host_cpu@%$host_cpu%g
11392s%@host_vendor@%$host_vendor%g
11393s%@host_os@%$host_os%g
11394s%@target@%$target%g
11395s%@target_alias@%$target_alias%g
11396s%@target_cpu@%$target_cpu%g
11397s%@target_vendor@%$target_vendor%g
11398s%@target_os@%$target_os%g
11399s%@build@%$build%g
11400s%@build_alias@%$build_alias%g
11401s%@build_cpu@%$build_cpu%g
11402s%@build_vendor@%$build_vendor%g
11403s%@build_os@%$build_os%g
c906108c 11404s%@RANLIB@%$RANLIB%g
8bb2c122 11405s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11406s%@ALLOCA@%$ALLOCA%g
11407s%@USE_NLS@%$USE_NLS%g
11408s%@MSGFMT@%$MSGFMT%g
11409s%@GMSGFMT@%$GMSGFMT%g
11410s%@XGETTEXT@%$XGETTEXT%g
11411s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11412s%@CATALOGS@%$CATALOGS%g
11413s%@CATOBJEXT@%$CATOBJEXT%g
11414s%@DATADIRNAME@%$DATADIRNAME%g
11415s%@GMOFILES@%$GMOFILES%g
11416s%@INSTOBJEXT@%$INSTOBJEXT%g
11417s%@INTLDEPS@%$INTLDEPS%g
11418s%@INTLLIBS@%$INTLLIBS%g
11419s%@INTLOBJS@%$INTLOBJS%g
11420s%@POFILES@%$POFILES%g
11421s%@POSUB@%$POSUB%g
11422s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11423s%@GT_NO@%$GT_NO%g
11424s%@GT_YES@%$GT_YES%g
11425s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11426s%@l@%$l%g
ddc9cd0f
AC
11427s%@localedir@%$localedir%g
11428s%@PACKAGE@%$PACKAGE%g
8dcde887 11429s%@subdirs@%$subdirs%g
7a292a7a 11430s%@AWK@%$AWK%g
c906108c
SS
11431s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11432s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11433s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11434s%@LN_S@%$LN_S%g
11435s%@YACC@%$YACC%g
c906108c 11436s%@AR@%$AR%g
95ca63c4
CF
11437s%@DLLTOOL@%$DLLTOOL%g
11438s%@WINDRES@%$WINDRES%g
75c6e08a 11439s%@MIG@%$MIG%g
c906108c 11440s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11441s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11442s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11443s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11444s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11445s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11446s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11447s%@LIBGUI@%$LIBGUI%g
11448s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11449s%@WIN32LDAPP@%$WIN32LDAPP%g
11450s%@TCL_VERSION@%$TCL_VERSION%g
11451s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11452s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11453s%@TCL_CC@%$TCL_CC%g
11454s%@TCL_DEFS@%$TCL_DEFS%g
11455s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11456s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11457s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11458s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11459s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11460s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11461s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11462s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11463s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11464s%@TCL_RANLIB@%$TCL_RANLIB%g
11465s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11466s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11467s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11468s%@TK_VERSION@%$TK_VERSION%g
11469s%@TK_DEFS@%$TK_DEFS%g
11470s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11471s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11472s%@TK_XLIBSW@%$TK_XLIBSW%g
11473s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11474s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11475s%@TCLHDIR@%$TCLHDIR%g
11476s%@TKHDIR@%$TKHDIR%g
11477s%@ITCLHDIR@%$ITCLHDIR%g
11478s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11479s%@ITCL_VERSION@%$ITCL_VERSION%g
11480s%@ITCL_DEFS@%$ITCL_DEFS%g
11481s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11482s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11483s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11484s%@ITK_VERSION@%$ITK_VERSION%g
11485s%@ITK_DEFS@%$ITK_DEFS%g
11486s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11487s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11488s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11489s%@X_CFLAGS@%$X_CFLAGS%g
11490s%@X_LDFLAGS@%$X_LDFLAGS%g
11491s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11492s%@TCL_DEPS@%$TCL_DEPS%g
11493s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11494s%@ITCLLIB@%$ITCLLIB%g
11495s%@ITCL_DEPS@%$ITCL_DEPS%g
11496s%@ITKLIB@%$ITKLIB%g
11497s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11498s%@GDBTKLIBS@%$GDBTKLIBS%g
11499s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11500s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11501s%@IGNORE_SIM@%$IGNORE_SIM%g
11502s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11503s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11504s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11505s%@CONFIG_OBS@%$CONFIG_OBS%g
11506s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11507s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11508s%@CONFIG_ALL@%$CONFIG_ALL%g
11509s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11510s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11511s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11512s%@target_subdir@%$target_subdir%g
11513/@host_makefile_frag@/r $host_makefile_frag
11514s%@host_makefile_frag@%%g
11515/@target_makefile_frag@/r $target_makefile_frag
11516s%@target_makefile_frag@%%g
11517s%@frags@%$frags%g
5a2402b8
AC
11518s%@xm_h@%$xm_h%g
11519s%@tm_h@%$tm_h%g
11520s%@nm_h@%$nm_h%g
c906108c 11521s%@EXEEXT@%$EXEEXT%g
234b45d4 11522s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11523
11524CEOF
11525EOF
11526
11527cat >> $CONFIG_STATUS <<\EOF
11528
11529# Split the substitutions into bite-sized pieces for seds with
11530# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11531ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11532ac_file=1 # Number of current file.
11533ac_beg=1 # First line for current file.
11534ac_end=$ac_max_sed_cmds # Line after last line for current file.
11535ac_more_lines=:
11536ac_sed_cmds=""
11537while $ac_more_lines; do
11538 if test $ac_beg -gt 1; then
11539 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11540 else
11541 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11542 fi
11543 if test ! -s conftest.s$ac_file; then
11544 ac_more_lines=false
11545 rm -f conftest.s$ac_file
11546 else
11547 if test -z "$ac_sed_cmds"; then
11548 ac_sed_cmds="sed -f conftest.s$ac_file"
11549 else
11550 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11551 fi
11552 ac_file=`expr $ac_file + 1`
11553 ac_beg=$ac_end
11554 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11555 fi
11556done
11557if test -z "$ac_sed_cmds"; then
11558 ac_sed_cmds=cat
11559fi
11560EOF
11561
11562cat >> $CONFIG_STATUS <<EOF
11563
ed952ac5 11564CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11565EOF
11566cat >> $CONFIG_STATUS <<\EOF
11567for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11568 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11569 case "$ac_file" in
11570 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11571 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11572 *) ac_file_in="${ac_file}.in" ;;
11573 esac
11574
11575 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11576
11577 # Remove last slash and all that follows it. Not all systems have dirname.
11578 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11579 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11580 # The file is in a subdirectory.
11581 test ! -d "$ac_dir" && mkdir "$ac_dir"
11582 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11583 # A "../" for each directory in $ac_dir_suffix.
11584 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11585 else
11586 ac_dir_suffix= ac_dots=
11587 fi
11588
11589 case "$ac_given_srcdir" in
11590 .) srcdir=.
11591 if test -z "$ac_dots"; then top_srcdir=.
11592 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11593 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11594 *) # Relative path.
11595 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11596 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11597 esac
11598
11599 case "$ac_given_INSTALL" in
11600 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11601 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11602 esac
11603
11604 echo creating "$ac_file"
11605 rm -f "$ac_file"
11606 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11607 case "$ac_file" in
11608 *Makefile*) ac_comsub="1i\\
11609# $configure_input" ;;
11610 *) ac_comsub= ;;
11611 esac
11612
11613 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11614 sed -e "$ac_comsub
11615s%@configure_input@%$configure_input%g
11616s%@srcdir@%$srcdir%g
11617s%@top_srcdir@%$top_srcdir%g
11618s%@INSTALL@%$INSTALL%g
11619" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11620fi; done
11621rm -f conftest.s*
11622
11623# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11624# NAME is the cpp macro being defined and VALUE is the value it is being given.
11625#
11626# ac_d sets the value in "#define NAME VALUE" lines.
11627ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11628ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11629ac_dC='\3'
11630ac_dD='%g'
11631# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11632ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11633ac_uB='\([ ]\)%\1#\2define\3'
11634ac_uC=' '
11635ac_uD='\4%g'
11636# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11637ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11638ac_eB='$%\1#\2define\3'
11639ac_eC=' '
11640ac_eD='%g'
11641
11642if test "${CONFIG_HEADERS+set}" != set; then
11643EOF
11644cat >> $CONFIG_STATUS <<EOF
11645 CONFIG_HEADERS="config.h:config.in"
11646EOF
11647cat >> $CONFIG_STATUS <<\EOF
11648fi
11649for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11650 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11651 case "$ac_file" in
11652 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11653 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11654 *) ac_file_in="${ac_file}.in" ;;
11655 esac
11656
11657 echo creating $ac_file
11658
11659 rm -f conftest.frag conftest.in conftest.out
11660 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11661 cat $ac_file_inputs > conftest.in
11662
11663EOF
11664
11665# Transform confdefs.h into a sed script conftest.vals that substitutes
11666# the proper values into config.h.in to produce config.h. And first:
11667# Protect against being on the right side of a sed subst in config.status.
11668# Protect against being in an unquoted here document in config.status.
11669rm -f conftest.vals
11670cat > conftest.hdr <<\EOF
11671s/[\\&%]/\\&/g
11672s%[\\$`]%\\&%g
11673s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11674s%ac_d%ac_u%gp
11675s%ac_u%ac_e%gp
11676EOF
11677sed -n -f conftest.hdr confdefs.h > conftest.vals
11678rm -f conftest.hdr
11679
11680# This sed command replaces #undef with comments. This is necessary, for
11681# example, in the case of _POSIX_SOURCE, which is predefined and required
11682# on some systems where configure will not decide to define it.
11683cat >> conftest.vals <<\EOF
11684s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11685EOF
11686
11687# Break up conftest.vals because some shells have a limit on
11688# the size of here documents, and old seds have small limits too.
11689
11690rm -f conftest.tail
11691while :
11692do
11693 ac_lines=`grep -c . conftest.vals`
11694 # grep -c gives empty output for an empty file on some AIX systems.
11695 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11696 # Write a limited-size here document to conftest.frag.
11697 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11698 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11699 echo 'CEOF
11700 sed -f conftest.frag conftest.in > conftest.out
11701 rm -f conftest.in
11702 mv conftest.out conftest.in
11703' >> $CONFIG_STATUS
11704 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11705 rm -f conftest.vals
11706 mv conftest.tail conftest.vals
11707done
11708rm -f conftest.vals
11709
11710cat >> $CONFIG_STATUS <<\EOF
11711 rm -f conftest.frag conftest.h
11712 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11713 cat conftest.in >> conftest.h
11714 rm -f conftest.in
11715 if cmp -s $ac_file conftest.h 2>/dev/null; then
11716 echo "$ac_file is unchanged"
11717 rm -f conftest.h
11718 else
11719 # Remove last slash and all that follows it. Not all systems have dirname.
11720 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11721 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11722 # The file is in a subdirectory.
11723 test ! -d "$ac_dir" && mkdir "$ac_dir"
11724 fi
11725 rm -f $ac_file
11726 mv conftest.h $ac_file
11727 fi
11728fi; done
11729
11730EOF
11731
11732cat >> $CONFIG_STATUS <<EOF
11733ac_sources="$files"
11734ac_dests="$links"
11735EOF
11736
11737cat >> $CONFIG_STATUS <<\EOF
11738srcdir=$ac_given_srcdir
11739while test -n "$ac_sources"; do
11740 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11741 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11742
11743 echo "linking $srcdir/$ac_source to $ac_dest"
11744
11745 if test ! -r $srcdir/$ac_source; then
11746 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11747 fi
11748 rm -f $ac_dest
11749
11750 # Make relative symlinks.
11751 # Remove last slash and all that follows it. Not all systems have dirname.
11752 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11753 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11754 # The dest file is in a subdirectory.
11755 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11756 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11757 # A "../" for each directory in $ac_dest_dir_suffix.
11758 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11759 else
11760 ac_dest_dir_suffix= ac_dots=
11761 fi
11762
11763 case "$srcdir" in
11764 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11765 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11766 esac
11767
11768 # Make a symlink if possible; otherwise try a hard link.
11769 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11770 ln $srcdir/$ac_source $ac_dest; then :
11771 else
11772 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11773 fi
11774done
11775EOF
11776cat >> $CONFIG_STATUS <<EOF
11777
11778gdb_host_cpu=$gdb_host_cpu
11779gdb_target_cpu=$gdb_target_cpu
11780nativefile=$nativefile
11781
11782EOF
11783cat >> $CONFIG_STATUS <<\EOF
11784
7ee6d7eb 11785if test "${nativefile}" = ""; then
c4620205 11786 < Makefile \
e27da16d
JT
11787 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11788 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11789 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11790 > Makefile.tem
c906108c
SS
11791mv -f Makefile.tem Makefile
11792fi
11793
11794sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11795/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11796/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11797mv -f Makefile.tmp Makefile
11798
2acceee2 11799
c906108c
SS
11800case x$CONFIG_HEADERS in
11801xconfig.h:config.in)
11802echo > stamp-h ;;
11803esac
11804
11805exit 0
11806EOF
11807chmod +x $CONFIG_STATUS
11808rm -fr confdefs* $ac_clean_files
11809test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11810
11811if test "$no_recursion" != yes; then
11812
11813 # Remove --cache-file and --srcdir arguments so they do not pile up.
11814 ac_sub_configure_args=
11815 ac_prev=
11816 for ac_arg in $ac_configure_args; do
11817 if test -n "$ac_prev"; then
11818 ac_prev=
11819 continue
11820 fi
11821 case "$ac_arg" in
11822 -cache-file | --cache-file | --cache-fil | --cache-fi \
11823 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11824 ac_prev=cache_file ;;
11825 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11826 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11827 ;;
11828 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11829 ac_prev=srcdir ;;
11830 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11831 ;;
11832 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11833 esac
11834 done
11835
8dcde887 11836 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11837
11838 # Do not complain, so a configure script can configure whichever
11839 # parts of a large source tree are present.
11840 if test ! -d $srcdir/$ac_config_dir; then
11841 continue
11842 fi
11843
11844 echo configuring in $ac_config_dir
11845
11846 case "$srcdir" in
11847 .) ;;
11848 *)
11849 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11850 else
11851 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11852 fi
11853 ;;
11854 esac
11855
11856 ac_popdir=`pwd`
11857 cd $ac_config_dir
11858
11859 # A "../" for each directory in /$ac_config_dir.
11860 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11861
11862 case "$srcdir" in
11863 .) # No --srcdir option. We are building in place.
11864 ac_sub_srcdir=$srcdir ;;
11865 /*) # Absolute path.
11866 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11867 *) # Relative path.
11868 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11869 esac
11870
11871 # Check for guested configure; otherwise get Cygnus style configure.
11872 if test -f $ac_sub_srcdir/configure; then
11873 ac_sub_configure=$ac_sub_srcdir/configure
11874 elif test -f $ac_sub_srcdir/configure.in; then
11875 ac_sub_configure=$ac_configure
11876 else
11877 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11878 ac_sub_configure=
11879 fi
11880
11881 # The recursion is here.
11882 if test -n "$ac_sub_configure"; then
11883
11884 # Make the cache file name correct relative to the subdirectory.
11885 case "$cache_file" in
11886 /*) ac_sub_cache_file=$cache_file ;;
11887 *) # Relative path.
11888 ac_sub_cache_file="$ac_dots$cache_file" ;;
11889 esac
11890 case "$ac_given_INSTALL" in
11891 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11892 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11893 esac
11894
11895 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11896 # The eval makes quoting arguments work.
11897 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11898 then :
11899 else
11900 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11901 fi
11902 fi
11903
11904 cd $ac_popdir
11905 done
11906fi
11907
11908
11909exit 0
This page took 1.074334 seconds and 4 git commands to generate.