*** empty log message ***
[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"
c906108c
SS
45ac_help="$ac_help
46 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
47ac_help="$ac_help
48 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
49ac_help="$ac_help
50 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
51ac_help="$ac_help
52 --with-tclinclude=DIR Directory where tcl private headers are"
53ac_help="$ac_help
54 --with-tkinclude=DIR Directory where tk private headers are"
55ac_help="$ac_help
56 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
57ac_help="$ac_help
58 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
59ac_help="$ac_help
60 --with-x use the X Window System"
7a292a7a
SS
61ac_help="$ac_help
62 --enable-sim Link gdb with simulator"
8dcde887
MK
63ac_help="$ac_help
64 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
65ac_help="$ac_help
66 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
67
68# Initialize some variables set by options.
69# The variables have the same names as the options, with
70# dashes changed to underlines.
71build=NONE
72cache_file=./config.cache
73exec_prefix=NONE
74host=NONE
75no_create=
76nonopt=NONE
77no_recursion=
78prefix=NONE
79program_prefix=NONE
80program_suffix=NONE
81program_transform_name=s,x,x,
82silent=
83site=
d3e0a5bf 84sitefile=
c906108c
SS
85srcdir=
86target=NONE
87verbose=
88x_includes=NONE
89x_libraries=NONE
90bindir='${exec_prefix}/bin'
91sbindir='${exec_prefix}/sbin'
92libexecdir='${exec_prefix}/libexec'
93datadir='${prefix}/share'
94sysconfdir='${prefix}/etc'
95sharedstatedir='${prefix}/com'
96localstatedir='${prefix}/var'
97libdir='${exec_prefix}/lib'
98includedir='${prefix}/include'
99oldincludedir='/usr/include'
100infodir='${prefix}/info'
101mandir='${prefix}/man'
102
103# Initialize some other variables.
104subdirs=
105MFLAGS= MAKEFLAGS=
106SHELL=${CONFIG_SHELL-/bin/sh}
107# Maximum number of lines to put in a shell here document.
108ac_max_here_lines=12
109
110ac_prev=
111for ac_option
112do
113
114 # If the previous option needs an argument, assign it.
115 if test -n "$ac_prev"; then
116 eval "$ac_prev=\$ac_option"
117 ac_prev=
118 continue
119 fi
120
121 case "$ac_option" in
122 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
123 *) ac_optarg= ;;
124 esac
125
126 # Accept the important Cygnus configure options, so we can diagnose typos.
127
128 case "$ac_option" in
129
130 -bindir | --bindir | --bindi | --bind | --bin | --bi)
131 ac_prev=bindir ;;
132 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
133 bindir="$ac_optarg" ;;
134
135 -build | --build | --buil | --bui | --bu)
136 ac_prev=build ;;
137 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
138 build="$ac_optarg" ;;
139
140 -cache-file | --cache-file | --cache-fil | --cache-fi \
141 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
142 ac_prev=cache_file ;;
143 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
144 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
145 cache_file="$ac_optarg" ;;
146
147 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
148 ac_prev=datadir ;;
149 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
150 | --da=*)
151 datadir="$ac_optarg" ;;
152
153 -disable-* | --disable-*)
154 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
155 # Reject names that are not valid shell variable names.
156 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
157 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
158 fi
159 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
160 eval "enable_${ac_feature}=no" ;;
161
162 -enable-* | --enable-*)
163 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
164 # Reject names that are not valid shell variable names.
165 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
166 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167 fi
168 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169 case "$ac_option" in
170 *=*) ;;
171 *) ac_optarg=yes ;;
172 esac
173 eval "enable_${ac_feature}='$ac_optarg'" ;;
174
175 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
176 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
177 | --exec | --exe | --ex)
178 ac_prev=exec_prefix ;;
179 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
180 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
181 | --exec=* | --exe=* | --ex=*)
182 exec_prefix="$ac_optarg" ;;
183
184 -gas | --gas | --ga | --g)
185 # Obsolete; use --with-gas.
186 with_gas=yes ;;
187
188 -help | --help | --hel | --he)
189 # Omit some internal or obsolete options to make the list less imposing.
190 # This message is too long to be a string in the A/UX 3.1 sh.
191 cat << EOF
192Usage: configure [options] [host]
193Options: [defaults in brackets after descriptions]
194Configuration:
195 --cache-file=FILE cache test results in FILE
196 --help print this message
197 --no-create do not create output files
198 --quiet, --silent do not print \`checking...' messages
d3e0a5bf 199 --site-file=FILE use FILE as the site file
c906108c
SS
200 --version print the version of autoconf that created configure
201Directory and file names:
202 --prefix=PREFIX install architecture-independent files in PREFIX
203 [$ac_default_prefix]
204 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
205 [same as prefix]
206 --bindir=DIR user executables in DIR [EPREFIX/bin]
207 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
208 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
209 --datadir=DIR read-only architecture-independent data in DIR
210 [PREFIX/share]
211 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
212 --sharedstatedir=DIR modifiable architecture-independent data in DIR
213 [PREFIX/com]
214 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
215 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
216 --includedir=DIR C header files in DIR [PREFIX/include]
217 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
218 --infodir=DIR info documentation in DIR [PREFIX/info]
219 --mandir=DIR man documentation in DIR [PREFIX/man]
220 --srcdir=DIR find the sources in DIR [configure dir or ..]
221 --program-prefix=PREFIX prepend PREFIX to installed program names
222 --program-suffix=SUFFIX append SUFFIX to installed program names
223 --program-transform-name=PROGRAM
224 run sed PROGRAM on installed program names
225EOF
226 cat << EOF
227Host type:
228 --build=BUILD configure for building on BUILD [BUILD=HOST]
229 --host=HOST configure for HOST [guessed]
230 --target=TARGET configure for TARGET [TARGET=HOST]
231Features and packages:
232 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
233 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
234 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
235 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
236 --x-includes=DIR X include files are in DIR
237 --x-libraries=DIR X library files are in DIR
238EOF
239 if test -n "$ac_help"; then
240 echo "--enable and --with options recognized:$ac_help"
241 fi
242 exit 0 ;;
243
244 -host | --host | --hos | --ho)
245 ac_prev=host ;;
246 -host=* | --host=* | --hos=* | --ho=*)
247 host="$ac_optarg" ;;
248
249 -includedir | --includedir | --includedi | --included | --include \
250 | --includ | --inclu | --incl | --inc)
251 ac_prev=includedir ;;
252 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
253 | --includ=* | --inclu=* | --incl=* | --inc=*)
254 includedir="$ac_optarg" ;;
255
256 -infodir | --infodir | --infodi | --infod | --info | --inf)
257 ac_prev=infodir ;;
258 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
259 infodir="$ac_optarg" ;;
260
261 -libdir | --libdir | --libdi | --libd)
262 ac_prev=libdir ;;
263 -libdir=* | --libdir=* | --libdi=* | --libd=*)
264 libdir="$ac_optarg" ;;
265
266 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
267 | --libexe | --libex | --libe)
268 ac_prev=libexecdir ;;
269 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
270 | --libexe=* | --libex=* | --libe=*)
271 libexecdir="$ac_optarg" ;;
272
273 -localstatedir | --localstatedir | --localstatedi | --localstated \
274 | --localstate | --localstat | --localsta | --localst \
275 | --locals | --local | --loca | --loc | --lo)
276 ac_prev=localstatedir ;;
277 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
278 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
279 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
280 localstatedir="$ac_optarg" ;;
281
282 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
283 ac_prev=mandir ;;
284 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
285 mandir="$ac_optarg" ;;
286
287 -nfp | --nfp | --nf)
288 # Obsolete; use --without-fp.
289 with_fp=no ;;
290
291 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
292 | --no-cr | --no-c)
293 no_create=yes ;;
294
295 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
296 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
297 no_recursion=yes ;;
298
299 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
300 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
301 | --oldin | --oldi | --old | --ol | --o)
302 ac_prev=oldincludedir ;;
303 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
304 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
305 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
306 oldincludedir="$ac_optarg" ;;
307
308 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
309 ac_prev=prefix ;;
310 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
311 prefix="$ac_optarg" ;;
312
313 -program-prefix | --program-prefix | --program-prefi | --program-pref \
314 | --program-pre | --program-pr | --program-p)
315 ac_prev=program_prefix ;;
316 -program-prefix=* | --program-prefix=* | --program-prefi=* \
317 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
318 program_prefix="$ac_optarg" ;;
319
320 -program-suffix | --program-suffix | --program-suffi | --program-suff \
321 | --program-suf | --program-su | --program-s)
322 ac_prev=program_suffix ;;
323 -program-suffix=* | --program-suffix=* | --program-suffi=* \
324 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
325 program_suffix="$ac_optarg" ;;
326
327 -program-transform-name | --program-transform-name \
328 | --program-transform-nam | --program-transform-na \
329 | --program-transform-n | --program-transform- \
330 | --program-transform | --program-transfor \
331 | --program-transfo | --program-transf \
332 | --program-trans | --program-tran \
333 | --progr-tra | --program-tr | --program-t)
334 ac_prev=program_transform_name ;;
335 -program-transform-name=* | --program-transform-name=* \
336 | --program-transform-nam=* | --program-transform-na=* \
337 | --program-transform-n=* | --program-transform-=* \
338 | --program-transform=* | --program-transfor=* \
339 | --program-transfo=* | --program-transf=* \
340 | --program-trans=* | --program-tran=* \
341 | --progr-tra=* | --program-tr=* | --program-t=*)
342 program_transform_name="$ac_optarg" ;;
343
344 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
345 | -silent | --silent | --silen | --sile | --sil)
346 silent=yes ;;
347
348 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
349 ac_prev=sbindir ;;
350 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
351 | --sbi=* | --sb=*)
352 sbindir="$ac_optarg" ;;
353
354 -sharedstatedir | --sharedstatedir | --sharedstatedi \
355 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
356 | --sharedst | --shareds | --shared | --share | --shar \
357 | --sha | --sh)
358 ac_prev=sharedstatedir ;;
359 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
360 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
361 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
362 | --sha=* | --sh=*)
363 sharedstatedir="$ac_optarg" ;;
364
365 -site | --site | --sit)
366 ac_prev=site ;;
367 -site=* | --site=* | --sit=*)
368 site="$ac_optarg" ;;
369
d3e0a5bf
MC
370 -site-file | --site-file | --site-fil | --site-fi | --site-f)
371 ac_prev=sitefile ;;
372 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
373 sitefile="$ac_optarg" ;;
374
c906108c
SS
375 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
376 ac_prev=srcdir ;;
377 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
378 srcdir="$ac_optarg" ;;
379
380 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
381 | --syscon | --sysco | --sysc | --sys | --sy)
382 ac_prev=sysconfdir ;;
383 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
384 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
385 sysconfdir="$ac_optarg" ;;
386
387 -target | --target | --targe | --targ | --tar | --ta | --t)
388 ac_prev=target ;;
389 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
390 target="$ac_optarg" ;;
391
392 -v | -verbose | --verbose | --verbos | --verbo | --verb)
393 verbose=yes ;;
394
395 -version | --version | --versio | --versi | --vers)
396 echo "configure generated by autoconf version 2.13"
397 exit 0 ;;
398
399 -with-* | --with-*)
400 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
401 # Reject names that are not valid shell variable names.
402 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 case "$ac_option" in
407 *=*) ;;
408 *) ac_optarg=yes ;;
409 esac
410 eval "with_${ac_package}='$ac_optarg'" ;;
411
412 -without-* | --without-*)
413 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
414 # Reject names that are not valid shell variable names.
415 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
416 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
417 fi
418 ac_package=`echo $ac_package| sed 's/-/_/g'`
419 eval "with_${ac_package}=no" ;;
420
421 --x)
422 # Obsolete; use --with-x.
423 with_x=yes ;;
424
425 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
426 | --x-incl | --x-inc | --x-in | --x-i)
427 ac_prev=x_includes ;;
428 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
429 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
430 x_includes="$ac_optarg" ;;
431
432 -x-libraries | --x-libraries | --x-librarie | --x-librari \
433 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
434 ac_prev=x_libraries ;;
435 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
436 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
437 x_libraries="$ac_optarg" ;;
438
439 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
440 ;;
441
442 *)
443 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
444 echo "configure: warning: $ac_option: invalid host type" 1>&2
445 fi
446 if test "x$nonopt" != xNONE; then
447 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
448 fi
449 nonopt="$ac_option"
450 ;;
451
452 esac
453done
454
455if test -n "$ac_prev"; then
456 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
457fi
458
459trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
460
461# File descriptor usage:
462# 0 standard input
463# 1 file creation
464# 2 errors and warnings
465# 3 some systems may open it to /dev/tty
466# 4 used on the Kubota Titan
467# 6 checking for... messages and results
468# 5 compiler messages saved in config.log
469if test "$silent" = yes; then
470 exec 6>/dev/null
471else
472 exec 6>&1
473fi
474exec 5>./config.log
475
476echo "\
477This file contains any messages produced by compilers while
478running configure, to aid debugging if configure makes a mistake.
479" 1>&5
480
481# Strip out --no-create and --no-recursion so they do not pile up.
482# Also quote any args containing shell metacharacters.
483ac_configure_args=
484for ac_arg
485do
486 case "$ac_arg" in
487 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
488 | --no-cr | --no-c) ;;
489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
491 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
492 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
493 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
494 esac
495done
496
497# NLS nuisances.
498# Only set these to C if already set. These must not be set unconditionally
499# because not all systems understand e.g. LANG=C (notably SCO).
500# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
501# Non-C LC_CTYPE values break the ctype check.
502if test "${LANG+set}" = set; then LANG=C; export LANG; fi
503if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
504if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
505if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
506
507# confdefs.h avoids OS command line length limits that DEFS can exceed.
508rm -rf conftest* confdefs.h
509# AIX cpp loses on an empty file, so make sure it contains at least a newline.
510echo > confdefs.h
511
512# A filename unique to this package, relative to the directory that
513# configure is in, which we can look for to find out if srcdir is correct.
514ac_unique_file=main.c
515
516# Find the source files, if location was not specified.
517if test -z "$srcdir"; then
518 ac_srcdir_defaulted=yes
519 # Try the directory containing this script, then its parent.
520 ac_prog=$0
521 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
522 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
523 srcdir=$ac_confdir
524 if test ! -r $srcdir/$ac_unique_file; then
525 srcdir=..
526 fi
527else
528 ac_srcdir_defaulted=no
529fi
530if test ! -r $srcdir/$ac_unique_file; then
531 if test "$ac_srcdir_defaulted" = yes; then
532 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
533 else
534 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
535 fi
536fi
537srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
538
539# Prefer explicitly selected file to automatically selected ones.
d3e0a5bf
MC
540if test -z "$sitefile"; then
541 if test -z "$CONFIG_SITE"; then
542 if test "x$prefix" != xNONE; then
543 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
544 else
545 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
546 fi
c906108c 547 fi
d3e0a5bf
MC
548else
549 CONFIG_SITE="$sitefile"
c906108c
SS
550fi
551for ac_site_file in $CONFIG_SITE; do
552 if test -r "$ac_site_file"; then
553 echo "loading site script $ac_site_file"
554 . "$ac_site_file"
555 fi
556done
557
558if test -r "$cache_file"; then
559 echo "loading cache $cache_file"
560 . $cache_file
561else
562 echo "creating cache $cache_file"
563 > $cache_file
564fi
565
566ac_ext=c
567# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
568ac_cpp='$CPP $CPPFLAGS'
569ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
570ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
571cross_compiling=$ac_cv_prog_cc_cross
572
573ac_exeext=
574ac_objext=o
575if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
576 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
577 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
578 ac_n= ac_c='
579' ac_t=' '
580 else
581 ac_n=-n ac_c= ac_t=
582 fi
583else
584 ac_n= ac_c='\c' ac_t=
585fi
586
587
588
413ccac7 589echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
0e5d83e3 590echo "configure:591: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
591 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
592if test "${enable_maintainer_mode+set}" = set; then
593 enableval="$enable_maintainer_mode"
594 USE_MAINTAINER_MODE=$enableval
595else
596 USE_MAINTAINER_MODE=no
597fi
598
599 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
600
601
602if test $USE_MAINTAINER_MODE = yes; then
603 MAINTAINER_MODE_TRUE=
604 MAINTAINER_MODE_FALSE='#'
605else
606 MAINTAINER_MODE_TRUE='#'
607 MAINTAINER_MODE_FALSE=
608fi
609 MAINT=$MAINTAINER_MODE_TRUE
610
611
c906108c
SS
612
613# Extract the first word of "gcc", so it can be a program name with args.
614set dummy gcc; ac_word=$2
615echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 616echo "configure:617: checking for $ac_word" >&5
c906108c
SS
617if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
618 echo $ac_n "(cached) $ac_c" 1>&6
619else
620 if test -n "$CC"; then
621 ac_cv_prog_CC="$CC" # Let the user override the test.
622else
623 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
624 ac_dummy="$PATH"
625 for ac_dir in $ac_dummy; do
626 test -z "$ac_dir" && ac_dir=.
627 if test -f $ac_dir/$ac_word; then
628 ac_cv_prog_CC="gcc"
629 break
630 fi
631 done
632 IFS="$ac_save_ifs"
633fi
634fi
635CC="$ac_cv_prog_CC"
636if test -n "$CC"; then
637 echo "$ac_t""$CC" 1>&6
638else
639 echo "$ac_t""no" 1>&6
640fi
641
642if test -z "$CC"; then
643 # Extract the first word of "cc", so it can be a program name with args.
644set dummy cc; ac_word=$2
645echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 646echo "configure:647: checking for $ac_word" >&5
c906108c
SS
647if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
648 echo $ac_n "(cached) $ac_c" 1>&6
649else
650 if test -n "$CC"; then
651 ac_cv_prog_CC="$CC" # Let the user override the test.
652else
653 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
654 ac_prog_rejected=no
655 ac_dummy="$PATH"
656 for ac_dir in $ac_dummy; do
657 test -z "$ac_dir" && ac_dir=.
658 if test -f $ac_dir/$ac_word; then
659 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
660 ac_prog_rejected=yes
661 continue
662 fi
663 ac_cv_prog_CC="cc"
664 break
665 fi
666 done
667 IFS="$ac_save_ifs"
668if test $ac_prog_rejected = yes; then
669 # We found a bogon in the path, so make sure we never use it.
670 set dummy $ac_cv_prog_CC
671 shift
672 if test $# -gt 0; then
673 # We chose a different compiler from the bogus one.
674 # However, it has the same basename, so the bogon will be chosen
675 # first if we set CC to just the basename; use the full file name.
676 shift
677 set dummy "$ac_dir/$ac_word" "$@"
678 shift
679 ac_cv_prog_CC="$@"
680 fi
681fi
682fi
683fi
684CC="$ac_cv_prog_CC"
685if test -n "$CC"; then
686 echo "$ac_t""$CC" 1>&6
687else
688 echo "$ac_t""no" 1>&6
689fi
690
691 if test -z "$CC"; then
692 case "`uname -s`" in
693 *win32* | *WIN32*)
694 # Extract the first word of "cl", so it can be a program name with args.
695set dummy cl; ac_word=$2
696echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 697echo "configure:698: checking for $ac_word" >&5
c906108c
SS
698if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
699 echo $ac_n "(cached) $ac_c" 1>&6
700else
701 if test -n "$CC"; then
702 ac_cv_prog_CC="$CC" # Let the user override the test.
703else
704 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
705 ac_dummy="$PATH"
706 for ac_dir in $ac_dummy; do
707 test -z "$ac_dir" && ac_dir=.
708 if test -f $ac_dir/$ac_word; then
709 ac_cv_prog_CC="cl"
710 break
711 fi
712 done
713 IFS="$ac_save_ifs"
714fi
715fi
716CC="$ac_cv_prog_CC"
717if test -n "$CC"; then
718 echo "$ac_t""$CC" 1>&6
719else
720 echo "$ac_t""no" 1>&6
721fi
722 ;;
723 esac
724 fi
725 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
726fi
727
728echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
0e5d83e3 729echo "configure:730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
730
731ac_ext=c
732# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
733ac_cpp='$CPP $CPPFLAGS'
734ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
735ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
736cross_compiling=$ac_cv_prog_cc_cross
737
738cat > conftest.$ac_ext << EOF
739
0e5d83e3 740#line 741 "configure"
c906108c
SS
741#include "confdefs.h"
742
743main(){return(0);}
744EOF
0e5d83e3 745if { (eval echo configure:746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
746 ac_cv_prog_cc_works=yes
747 # If we can't run a trivial program, we are probably using a cross compiler.
748 if (./conftest; exit) 2>/dev/null; then
749 ac_cv_prog_cc_cross=no
750 else
751 ac_cv_prog_cc_cross=yes
752 fi
753else
754 echo "configure: failed program was:" >&5
755 cat conftest.$ac_ext >&5
756 ac_cv_prog_cc_works=no
757fi
758rm -fr conftest*
759ac_ext=c
760# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
761ac_cpp='$CPP $CPPFLAGS'
762ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
763ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
764cross_compiling=$ac_cv_prog_cc_cross
765
766echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
767if test $ac_cv_prog_cc_works = no; then
768 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
769fi
770echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
0e5d83e3 771echo "configure:772: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
772echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
773cross_compiling=$ac_cv_prog_cc_cross
774
775echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
0e5d83e3 776echo "configure:777: checking whether we are using GNU C" >&5
c906108c
SS
777if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
778 echo $ac_n "(cached) $ac_c" 1>&6
779else
780 cat > conftest.c <<EOF
781#ifdef __GNUC__
782 yes;
783#endif
784EOF
0e5d83e3 785if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
786 ac_cv_prog_gcc=yes
787else
788 ac_cv_prog_gcc=no
789fi
790fi
791
792echo "$ac_t""$ac_cv_prog_gcc" 1>&6
793
794if test $ac_cv_prog_gcc = yes; then
795 GCC=yes
796else
797 GCC=
798fi
799
800ac_test_CFLAGS="${CFLAGS+set}"
801ac_save_CFLAGS="$CFLAGS"
802CFLAGS=
803echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
0e5d83e3 804echo "configure:805: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
805if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
806 echo $ac_n "(cached) $ac_c" 1>&6
807else
808 echo 'void f(){}' > conftest.c
809if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
810 ac_cv_prog_cc_g=yes
811else
812 ac_cv_prog_cc_g=no
813fi
814rm -f conftest*
815
816fi
817
818echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
819if test "$ac_test_CFLAGS" = set; then
820 CFLAGS="$ac_save_CFLAGS"
821elif test $ac_cv_prog_cc_g = yes; then
822 if test "$GCC" = yes; then
823 CFLAGS="-g -O2"
824 else
825 CFLAGS="-g"
826 fi
827else
828 if test "$GCC" = yes; then
829 CFLAGS="-O2"
830 else
831 CFLAGS=
832 fi
833fi
834
14abd0fb
MK
835cat >> confdefs.h <<\EOF
836#define _GNU_SOURCE 1
837EOF
838
839
c906108c 840echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
0e5d83e3 841echo "configure:842: checking how to run the C preprocessor" >&5
c906108c
SS
842# On Suns, sometimes $CPP names a directory.
843if test -n "$CPP" && test -d "$CPP"; then
844 CPP=
845fi
846if test -z "$CPP"; then
847if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
848 echo $ac_n "(cached) $ac_c" 1>&6
849else
850 # This must be in double quotes, not single quotes, because CPP may get
851 # substituted into the Makefile and "${CC-cc}" will confuse make.
852 CPP="${CC-cc} -E"
853 # On the NeXT, cc -E runs the code through the compiler's parser,
854 # not just through cpp.
855 cat > conftest.$ac_ext <<EOF
0e5d83e3 856#line 857 "configure"
c906108c
SS
857#include "confdefs.h"
858#include <assert.h>
859Syntax Error
860EOF
861ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 862{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
863ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
864if test -z "$ac_err"; then
865 :
866else
867 echo "$ac_err" >&5
868 echo "configure: failed program was:" >&5
869 cat conftest.$ac_ext >&5
870 rm -rf conftest*
871 CPP="${CC-cc} -E -traditional-cpp"
872 cat > conftest.$ac_ext <<EOF
0e5d83e3 873#line 874 "configure"
c906108c
SS
874#include "confdefs.h"
875#include <assert.h>
876Syntax Error
877EOF
878ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 879{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
880ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
881if test -z "$ac_err"; then
882 :
883else
884 echo "$ac_err" >&5
885 echo "configure: failed program was:" >&5
886 cat conftest.$ac_ext >&5
887 rm -rf conftest*
888 CPP="${CC-cc} -nologo -E"
889 cat > conftest.$ac_ext <<EOF
0e5d83e3 890#line 891 "configure"
c906108c
SS
891#include "confdefs.h"
892#include <assert.h>
893Syntax Error
894EOF
895ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 896{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
897ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
898if test -z "$ac_err"; then
899 :
900else
901 echo "$ac_err" >&5
902 echo "configure: failed program was:" >&5
903 cat conftest.$ac_ext >&5
904 rm -rf conftest*
905 CPP=/lib/cpp
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910fi
911rm -f conftest*
912 ac_cv_prog_CPP="$CPP"
913fi
914 CPP="$ac_cv_prog_CPP"
915else
916 ac_cv_prog_CPP="$CPP"
917fi
918echo "$ac_t""$CPP" 1>&6
919
920echo $ac_n "checking for AIX""... $ac_c" 1>&6
0e5d83e3 921echo "configure:922: checking for AIX" >&5
c906108c 922cat > conftest.$ac_ext <<EOF
0e5d83e3 923#line 924 "configure"
c906108c
SS
924#include "confdefs.h"
925#ifdef _AIX
926 yes
927#endif
928
929EOF
930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
931 egrep "yes" >/dev/null 2>&1; then
932 rm -rf conftest*
933 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
934#define _ALL_SOURCE 1
935EOF
936
937else
938 rm -rf conftest*
939 echo "$ac_t""no" 1>&6
940fi
941rm -f conftest*
942
943
56157b4a 944echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
0e5d83e3 945echo "configure:946: checking for POSIXized ISC" >&5
56157b4a
AC
946if test -d /etc/conf/kconfig.d &&
947 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
948then
949 echo "$ac_t""yes" 1>&6
950 ISC=yes # If later tests want to check for ISC.
951 cat >> confdefs.h <<\EOF
952#define _POSIX_SOURCE 1
c906108c
SS
953EOF
954
56157b4a
AC
955 if test "$GCC" = yes; then
956 CC="$CC -posix"
957 else
958 CC="$CC -Xp"
959 fi
c906108c
SS
960else
961 echo "$ac_t""no" 1>&6
56157b4a 962 ISC=
c906108c
SS
963fi
964
965
966
967
968echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
0e5d83e3 969echo "configure:970: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
970if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
971 echo $ac_n "(cached) $ac_c" 1>&6
972else
973 am_cv_prog_cc_stdc=no
974ac_save_CC="$CC"
975# Don't try gcc -ansi; that turns off useful extensions and
976# breaks some systems' header files.
977# AIX -qlanglvl=ansi
978# Ultrix and OSF/1 -std1
56157b4a
AC
979# HP-UX 10.20 and later -Ae
980# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 981# SVR4 -Xc -D__EXTENSIONS__
56157b4a 982for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
983do
984 CC="$ac_save_CC $ac_arg"
985 cat > conftest.$ac_ext <<EOF
0e5d83e3 986#line 987 "configure"
c906108c
SS
987#include "confdefs.h"
988#include <stdarg.h>
989#include <stdio.h>
990#include <sys/types.h>
991#include <sys/stat.h>
992/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
993struct buf { int x; };
994FILE * (*rcsopen) (struct buf *, struct stat *, int);
995static char *e (p, i)
996 char **p;
997 int i;
998{
999 return p[i];
1000}
1001static char *f (char * (*g) (char **, int), char **p, ...)
1002{
1003 char *s;
1004 va_list v;
1005 va_start (v,p);
1006 s = g (p, va_arg (v,int));
1007 va_end (v);
1008 return s;
1009}
1010int test (int i, double x);
1011struct s1 {int (*f) (int a);};
1012struct s2 {int (*f) (double a);};
1013int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1014int argc;
1015char **argv;
1016
1017int main() {
1018
1019return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1020
1021; return 0; }
1022EOF
0e5d83e3 1023if { (eval echo configure:1024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1024 rm -rf conftest*
1025 am_cv_prog_cc_stdc="$ac_arg"; break
1026else
1027 echo "configure: failed program was:" >&5
1028 cat conftest.$ac_ext >&5
1029fi
1030rm -f conftest*
1031done
1032CC="$ac_save_CC"
1033
1034fi
1035
1036if test -z "$am_cv_prog_cc_stdc"; then
1037 echo "$ac_t""none needed" 1>&6
1038else
1039 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1040fi
1041case "x$am_cv_prog_cc_stdc" in
1042 x|xno) ;;
1043 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1044esac
1045
1046
1047ac_aux_dir=
1048for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1049 if test -f $ac_dir/install-sh; then
1050 ac_aux_dir=$ac_dir
1051 ac_install_sh="$ac_aux_dir/install-sh -c"
1052 break
1053 elif test -f $ac_dir/install.sh; then
1054 ac_aux_dir=$ac_dir
1055 ac_install_sh="$ac_aux_dir/install.sh -c"
1056 break
1057 fi
1058done
1059if test -z "$ac_aux_dir"; then
1060 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1061fi
1062ac_config_guess=$ac_aux_dir/config.guess
1063ac_config_sub=$ac_aux_dir/config.sub
1064ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1065
1066
1067# Do some error checking and defaulting for the host and target type.
1068# The inputs are:
1069# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1070#
1071# The rules are:
1072# 1. You are not allowed to specify --host, --target, and nonopt at the
1073# same time.
1074# 2. Host defaults to nonopt.
1075# 3. If nonopt is not specified, then host defaults to the current host,
1076# as determined by config.guess.
1077# 4. Target and build default to nonopt.
1078# 5. If nonopt is not specified, then target and build default to host.
1079
1080# The aliases save the names the user supplied, while $host etc.
1081# will get canonicalized.
1082case $host---$target---$nonopt in
1083NONE---*---* | *---NONE---* | *---*---NONE) ;;
1084*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1085esac
1086
1087
1088# Make sure we can run config.sub.
1089if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1090else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1091fi
1092
1093echo $ac_n "checking host system type""... $ac_c" 1>&6
0e5d83e3 1094echo "configure:1095: checking host system type" >&5
c906108c
SS
1095
1096host_alias=$host
1097case "$host_alias" in
1098NONE)
1099 case $nonopt in
1100 NONE)
1101 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1102 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1103 fi ;;
1104 *) host_alias=$nonopt ;;
1105 esac ;;
1106esac
1107
1108host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1109host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1110host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1111host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1112echo "$ac_t""$host" 1>&6
1113
1114echo $ac_n "checking target system type""... $ac_c" 1>&6
0e5d83e3 1115echo "configure:1116: checking target system type" >&5
c906108c
SS
1116
1117target_alias=$target
1118case "$target_alias" in
1119NONE)
1120 case $nonopt in
1121 NONE) target_alias=$host_alias ;;
1122 *) target_alias=$nonopt ;;
1123 esac ;;
1124esac
1125
1126target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1127target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1128target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1129target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130echo "$ac_t""$target" 1>&6
1131
1132echo $ac_n "checking build system type""... $ac_c" 1>&6
0e5d83e3 1133echo "configure:1134: checking build system type" >&5
c906108c
SS
1134
1135build_alias=$build
1136case "$build_alias" in
1137NONE)
1138 case $nonopt in
1139 NONE) build_alias=$host_alias ;;
1140 *) build_alias=$nonopt ;;
1141 esac ;;
1142esac
1143
1144build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1145build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1146build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1147build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1148echo "$ac_t""$build" 1>&6
1149
1150test "$host_alias" != "$target_alias" &&
1151 test "$program_prefix$program_suffix$program_transform_name" = \
1152 NONENONEs,x,x, &&
1153 program_prefix=${target_alias}-
1154
1155
8bb2c122
MK
1156# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1157# doesn't support cross-compilation, but the one from Autoconf 2.5x
1158# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1159# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1160# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1161# 2.5x.
1162if test $host != $build; then
1163 ac_tool_prefix=${host_alias}-
1164else
1165 ac_tool_prefix=
1166fi
1167
1168# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1169set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1170echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 1171echo "configure:1172: checking for $ac_word" >&5
8bb2c122
MK
1172if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1173 echo $ac_n "(cached) $ac_c" 1>&6
1174else
1175 if test -n "$RANLIB"; then
1176 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1177else
1178 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1179 ac_dummy="$PATH"
1180 for ac_dir in $ac_dummy; do
1181 test -z "$ac_dir" && ac_dir=.
1182 if test -f $ac_dir/$ac_word; then
1183 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1184 break
1185 fi
1186 done
1187 IFS="$ac_save_ifs"
1188fi
1189fi
1190RANLIB="$ac_cv_prog_RANLIB"
1191if test -n "$RANLIB"; then
1192 echo "$ac_t""$RANLIB" 1>&6
1193else
1194 echo "$ac_t""no" 1>&6
1195fi
1196
1197
1198if test -z "$ac_cv_prog_RANLIB"; then
1199if test -n "$ac_tool_prefix"; then
1200 # Extract the first word of "ranlib", so it can be a program name with args.
1201set dummy ranlib; ac_word=$2
1202echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 1203echo "configure:1204: checking for $ac_word" >&5
8bb2c122
MK
1204if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1205 echo $ac_n "(cached) $ac_c" 1>&6
1206else
1207 if test -n "$RANLIB"; then
1208 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1209else
1210 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1211 ac_dummy="$PATH"
1212 for ac_dir in $ac_dummy; do
1213 test -z "$ac_dir" && ac_dir=.
1214 if test -f $ac_dir/$ac_word; then
1215 ac_cv_prog_RANLIB="ranlib"
1216 break
1217 fi
1218 done
1219 IFS="$ac_save_ifs"
1220 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1221fi
1222fi
1223RANLIB="$ac_cv_prog_RANLIB"
1224if test -n "$RANLIB"; then
1225 echo "$ac_t""$RANLIB" 1>&6
1226else
1227 echo "$ac_t""no" 1>&6
1228fi
1229
1230else
1231 RANLIB=":"
1232fi
1233fi
1234
1235
c906108c
SS
1236ALL_LINGUAS=
1237echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
0e5d83e3 1238echo "configure:1239: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1239set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1240if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1241 echo $ac_n "(cached) $ac_c" 1>&6
1242else
1243 cat > conftestmake <<\EOF
1244all:
1245 @echo 'ac_maketemp="${MAKE}"'
1246EOF
1247# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1248eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1249if test -n "$ac_maketemp"; then
1250 eval ac_cv_prog_make_${ac_make}_set=yes
1251else
1252 eval ac_cv_prog_make_${ac_make}_set=no
1253fi
1254rm -f conftestmake
1255fi
1256if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1257 echo "$ac_t""yes" 1>&6
1258 SET_MAKE=
1259else
1260 echo "$ac_t""no" 1>&6
1261 SET_MAKE="MAKE=${MAKE-make}"
1262fi
1263
1264# Extract the first word of "ranlib", so it can be a program name with args.
1265set dummy ranlib; ac_word=$2
1266echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 1267echo "configure:1268: checking for $ac_word" >&5
c906108c
SS
1268if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1269 echo $ac_n "(cached) $ac_c" 1>&6
1270else
1271 if test -n "$RANLIB"; then
1272 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1273else
1274 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1275 ac_dummy="$PATH"
1276 for ac_dir in $ac_dummy; do
1277 test -z "$ac_dir" && ac_dir=.
1278 if test -f $ac_dir/$ac_word; then
1279 ac_cv_prog_RANLIB="ranlib"
1280 break
1281 fi
1282 done
1283 IFS="$ac_save_ifs"
1284 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1285fi
1286fi
1287RANLIB="$ac_cv_prog_RANLIB"
1288if test -n "$RANLIB"; then
1289 echo "$ac_t""$RANLIB" 1>&6
1290else
1291 echo "$ac_t""no" 1>&6
1292fi
1293
1294echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
0e5d83e3 1295echo "configure:1296: checking for ANSI C header files" >&5
c906108c
SS
1296if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1297 echo $ac_n "(cached) $ac_c" 1>&6
1298else
1299 cat > conftest.$ac_ext <<EOF
0e5d83e3 1300#line 1301 "configure"
c906108c
SS
1301#include "confdefs.h"
1302#include <stdlib.h>
1303#include <stdarg.h>
1304#include <string.h>
1305#include <float.h>
1306EOF
1307ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 1308{ (eval echo configure:1309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1309ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1310if test -z "$ac_err"; then
1311 rm -rf conftest*
1312 ac_cv_header_stdc=yes
1313else
1314 echo "$ac_err" >&5
1315 echo "configure: failed program was:" >&5
1316 cat conftest.$ac_ext >&5
1317 rm -rf conftest*
1318 ac_cv_header_stdc=no
1319fi
1320rm -f conftest*
1321
1322if test $ac_cv_header_stdc = yes; then
1323 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1324cat > conftest.$ac_ext <<EOF
0e5d83e3 1325#line 1326 "configure"
c906108c
SS
1326#include "confdefs.h"
1327#include <string.h>
1328EOF
1329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1330 egrep "memchr" >/dev/null 2>&1; then
1331 :
1332else
1333 rm -rf conftest*
1334 ac_cv_header_stdc=no
1335fi
1336rm -f conftest*
1337
1338fi
1339
1340if test $ac_cv_header_stdc = yes; then
1341 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1342cat > conftest.$ac_ext <<EOF
0e5d83e3 1343#line 1344 "configure"
c906108c
SS
1344#include "confdefs.h"
1345#include <stdlib.h>
1346EOF
1347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1348 egrep "free" >/dev/null 2>&1; then
1349 :
1350else
1351 rm -rf conftest*
1352 ac_cv_header_stdc=no
1353fi
1354rm -f conftest*
1355
1356fi
1357
1358if test $ac_cv_header_stdc = yes; then
1359 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1360if test "$cross_compiling" = yes; then
1361 :
1362else
1363 cat > conftest.$ac_ext <<EOF
0e5d83e3 1364#line 1365 "configure"
c906108c
SS
1365#include "confdefs.h"
1366#include <ctype.h>
1367#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1368#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1369#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1370int main () { int i; for (i = 0; i < 256; i++)
1371if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1372exit (0); }
1373
1374EOF
0e5d83e3 1375if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1376then
1377 :
1378else
1379 echo "configure: failed program was:" >&5
1380 cat conftest.$ac_ext >&5
1381 rm -fr conftest*
1382 ac_cv_header_stdc=no
1383fi
1384rm -fr conftest*
1385fi
1386
1387fi
1388fi
1389
1390echo "$ac_t""$ac_cv_header_stdc" 1>&6
1391if test $ac_cv_header_stdc = yes; then
1392 cat >> confdefs.h <<\EOF
1393#define STDC_HEADERS 1
1394EOF
1395
1396fi
1397
1398echo $ac_n "checking for working const""... $ac_c" 1>&6
0e5d83e3 1399echo "configure:1400: checking for working const" >&5
c906108c
SS
1400if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1401 echo $ac_n "(cached) $ac_c" 1>&6
1402else
1403 cat > conftest.$ac_ext <<EOF
0e5d83e3 1404#line 1405 "configure"
c906108c
SS
1405#include "confdefs.h"
1406
1407int main() {
1408
1409/* Ultrix mips cc rejects this. */
1410typedef int charset[2]; const charset x;
1411/* SunOS 4.1.1 cc rejects this. */
1412char const *const *ccp;
1413char **p;
1414/* NEC SVR4.0.2 mips cc rejects this. */
1415struct point {int x, y;};
1416static struct point const zero = {0,0};
1417/* AIX XL C 1.02.0.0 rejects this.
1418 It does not let you subtract one const X* pointer from another in an arm
1419 of an if-expression whose if-part is not a constant expression */
1420const char *g = "string";
1421ccp = &g + (g ? g-g : 0);
1422/* HPUX 7.0 cc rejects these. */
1423++ccp;
1424p = (char**) ccp;
1425ccp = (char const *const *) p;
1426{ /* SCO 3.2v4 cc rejects this. */
1427 char *t;
1428 char const *s = 0 ? (char *) 0 : (char const *) 0;
1429
1430 *t++ = 0;
1431}
1432{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1433 int x[] = {25, 17};
1434 const int *foo = &x[0];
1435 ++foo;
1436}
1437{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1438 typedef const int *iptr;
1439 iptr p = 0;
1440 ++p;
1441}
1442{ /* AIX XL C 1.02.0.0 rejects this saying
1443 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1444 struct s { int j; const int *ap[3]; };
1445 struct s *b; b->j = 5;
1446}
1447{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1448 const int foo = 10;
1449}
1450
1451; return 0; }
1452EOF
0e5d83e3 1453if { (eval echo configure:1454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1454 rm -rf conftest*
1455 ac_cv_c_const=yes
1456else
1457 echo "configure: failed program was:" >&5
1458 cat conftest.$ac_ext >&5
1459 rm -rf conftest*
1460 ac_cv_c_const=no
1461fi
1462rm -f conftest*
1463fi
1464
1465echo "$ac_t""$ac_cv_c_const" 1>&6
1466if test $ac_cv_c_const = no; then
1467 cat >> confdefs.h <<\EOF
1468#define const
1469EOF
1470
1471fi
1472
1473echo $ac_n "checking for inline""... $ac_c" 1>&6
0e5d83e3 1474echo "configure:1475: checking for inline" >&5
c906108c
SS
1475if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1476 echo $ac_n "(cached) $ac_c" 1>&6
1477else
1478 ac_cv_c_inline=no
1479for ac_kw in inline __inline__ __inline; do
1480 cat > conftest.$ac_ext <<EOF
0e5d83e3 1481#line 1482 "configure"
c906108c
SS
1482#include "confdefs.h"
1483
1484int main() {
1485} $ac_kw foo() {
1486; return 0; }
1487EOF
0e5d83e3 1488if { (eval echo configure:1489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1489 rm -rf conftest*
1490 ac_cv_c_inline=$ac_kw; break
1491else
1492 echo "configure: failed program was:" >&5
1493 cat conftest.$ac_ext >&5
1494fi
1495rm -f conftest*
1496done
1497
1498fi
1499
1500echo "$ac_t""$ac_cv_c_inline" 1>&6
1501case "$ac_cv_c_inline" in
1502 inline | yes) ;;
1503 no) cat >> confdefs.h <<\EOF
1504#define inline
1505EOF
1506 ;;
1507 *) cat >> confdefs.h <<EOF
1508#define inline $ac_cv_c_inline
1509EOF
1510 ;;
1511esac
1512
1513echo $ac_n "checking for off_t""... $ac_c" 1>&6
0e5d83e3 1514echo "configure:1515: checking for off_t" >&5
c906108c
SS
1515if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1516 echo $ac_n "(cached) $ac_c" 1>&6
1517else
1518 cat > conftest.$ac_ext <<EOF
0e5d83e3 1519#line 1520 "configure"
c906108c
SS
1520#include "confdefs.h"
1521#include <sys/types.h>
1522#if STDC_HEADERS
1523#include <stdlib.h>
1524#include <stddef.h>
1525#endif
1526EOF
1527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1528 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1529 rm -rf conftest*
1530 ac_cv_type_off_t=yes
1531else
1532 rm -rf conftest*
1533 ac_cv_type_off_t=no
1534fi
1535rm -f conftest*
1536
1537fi
1538echo "$ac_t""$ac_cv_type_off_t" 1>&6
1539if test $ac_cv_type_off_t = no; then
1540 cat >> confdefs.h <<\EOF
1541#define off_t long
1542EOF
1543
1544fi
1545
1546echo $ac_n "checking for size_t""... $ac_c" 1>&6
0e5d83e3 1547echo "configure:1548: checking for size_t" >&5
c906108c
SS
1548if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1549 echo $ac_n "(cached) $ac_c" 1>&6
1550else
1551 cat > conftest.$ac_ext <<EOF
0e5d83e3 1552#line 1553 "configure"
c906108c
SS
1553#include "confdefs.h"
1554#include <sys/types.h>
1555#if STDC_HEADERS
1556#include <stdlib.h>
1557#include <stddef.h>
1558#endif
1559EOF
1560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1561 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1562 rm -rf conftest*
1563 ac_cv_type_size_t=yes
1564else
1565 rm -rf conftest*
1566 ac_cv_type_size_t=no
1567fi
1568rm -f conftest*
1569
1570fi
1571echo "$ac_t""$ac_cv_type_size_t" 1>&6
1572if test $ac_cv_type_size_t = no; then
1573 cat >> confdefs.h <<\EOF
1574#define size_t unsigned
1575EOF
1576
1577fi
1578
1579# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1580# for constant arguments. Useless!
1581echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
0e5d83e3 1582echo "configure:1583: checking for working alloca.h" >&5
c906108c
SS
1583if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
1585else
1586 cat > conftest.$ac_ext <<EOF
0e5d83e3 1587#line 1588 "configure"
c906108c
SS
1588#include "confdefs.h"
1589#include <alloca.h>
1590int main() {
1591char *p = alloca(2 * sizeof(int));
1592; return 0; }
1593EOF
0e5d83e3 1594if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1595 rm -rf conftest*
1596 ac_cv_header_alloca_h=yes
1597else
1598 echo "configure: failed program was:" >&5
1599 cat conftest.$ac_ext >&5
1600 rm -rf conftest*
1601 ac_cv_header_alloca_h=no
1602fi
1603rm -f conftest*
1604fi
1605
1606echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1607if test $ac_cv_header_alloca_h = yes; then
1608 cat >> confdefs.h <<\EOF
1609#define HAVE_ALLOCA_H 1
1610EOF
1611
1612fi
1613
1614echo $ac_n "checking for alloca""... $ac_c" 1>&6
0e5d83e3 1615echo "configure:1616: checking for alloca" >&5
c906108c
SS
1616if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1617 echo $ac_n "(cached) $ac_c" 1>&6
1618else
1619 cat > conftest.$ac_ext <<EOF
0e5d83e3 1620#line 1621 "configure"
c906108c
SS
1621#include "confdefs.h"
1622
1623#ifdef __GNUC__
1624# define alloca __builtin_alloca
1625#else
1626# ifdef _MSC_VER
1627# include <malloc.h>
1628# define alloca _alloca
1629# else
1630# if HAVE_ALLOCA_H
1631# include <alloca.h>
1632# else
1633# ifdef _AIX
1634 #pragma alloca
1635# else
1636# ifndef alloca /* predefined by HP cc +Olibcalls */
1637char *alloca ();
1638# endif
1639# endif
1640# endif
1641# endif
1642#endif
1643
1644int main() {
1645char *p = (char *) alloca(1);
1646; return 0; }
1647EOF
0e5d83e3 1648if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1649 rm -rf conftest*
1650 ac_cv_func_alloca_works=yes
1651else
1652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1654 rm -rf conftest*
1655 ac_cv_func_alloca_works=no
1656fi
1657rm -f conftest*
1658fi
1659
1660echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1661if test $ac_cv_func_alloca_works = yes; then
1662 cat >> confdefs.h <<\EOF
1663#define HAVE_ALLOCA 1
1664EOF
1665
1666fi
1667
1668if test $ac_cv_func_alloca_works = no; then
1669 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1670 # that cause trouble. Some versions do not even contain alloca or
1671 # contain a buggy version. If you still want to use their alloca,
1672 # use ar to extract alloca.o from them instead of compiling alloca.c.
1673 ALLOCA=alloca.${ac_objext}
1674 cat >> confdefs.h <<\EOF
1675#define C_ALLOCA 1
1676EOF
1677
1678
1679echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
0e5d83e3 1680echo "configure:1681: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1681if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1682 echo $ac_n "(cached) $ac_c" 1>&6
1683else
1684 cat > conftest.$ac_ext <<EOF
0e5d83e3 1685#line 1686 "configure"
c906108c
SS
1686#include "confdefs.h"
1687#if defined(CRAY) && ! defined(CRAY2)
1688webecray
1689#else
1690wenotbecray
1691#endif
1692
1693EOF
1694if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1695 egrep "webecray" >/dev/null 2>&1; then
1696 rm -rf conftest*
1697 ac_cv_os_cray=yes
1698else
1699 rm -rf conftest*
1700 ac_cv_os_cray=no
1701fi
1702rm -f conftest*
1703
1704fi
1705
1706echo "$ac_t""$ac_cv_os_cray" 1>&6
1707if test $ac_cv_os_cray = yes; then
1708for ac_func in _getb67 GETB67 getb67; do
1709 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 1710echo "configure:1711: checking for $ac_func" >&5
c906108c
SS
1711if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1712 echo $ac_n "(cached) $ac_c" 1>&6
1713else
1714 cat > conftest.$ac_ext <<EOF
0e5d83e3 1715#line 1716 "configure"
c906108c
SS
1716#include "confdefs.h"
1717/* System header to define __stub macros and hopefully few prototypes,
1718 which can conflict with char $ac_func(); below. */
1719#include <assert.h>
1720/* Override any gcc2 internal prototype to avoid an error. */
1721/* We use char because int might match the return type of a gcc2
1722 builtin and then its argument prototype would still apply. */
1723char $ac_func();
1724
1725int main() {
1726
1727/* The GNU C library defines this for functions which it implements
1728 to always fail with ENOSYS. Some functions are actually named
1729 something starting with __ and the normal name is an alias. */
1730#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1731choke me
1732#else
1733$ac_func();
1734#endif
1735
1736; return 0; }
1737EOF
0e5d83e3 1738if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1739 rm -rf conftest*
1740 eval "ac_cv_func_$ac_func=yes"
1741else
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1744 rm -rf conftest*
1745 eval "ac_cv_func_$ac_func=no"
1746fi
1747rm -f conftest*
1748fi
1749
1750if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1751 echo "$ac_t""yes" 1>&6
1752 cat >> confdefs.h <<EOF
1753#define CRAY_STACKSEG_END $ac_func
1754EOF
1755
1756 break
1757else
1758 echo "$ac_t""no" 1>&6
1759fi
1760
1761done
1762fi
1763
1764echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
0e5d83e3 1765echo "configure:1766: checking stack direction for C alloca" >&5
c906108c
SS
1766if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768else
1769 if test "$cross_compiling" = yes; then
1770 ac_cv_c_stack_direction=0
1771else
1772 cat > conftest.$ac_ext <<EOF
0e5d83e3 1773#line 1774 "configure"
c906108c
SS
1774#include "confdefs.h"
1775find_stack_direction ()
1776{
1777 static char *addr = 0;
1778 auto char dummy;
1779 if (addr == 0)
1780 {
1781 addr = &dummy;
1782 return find_stack_direction ();
1783 }
1784 else
1785 return (&dummy > addr) ? 1 : -1;
1786}
1787main ()
1788{
1789 exit (find_stack_direction() < 0);
1790}
1791EOF
0e5d83e3 1792if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1793then
1794 ac_cv_c_stack_direction=1
1795else
1796 echo "configure: failed program was:" >&5
1797 cat conftest.$ac_ext >&5
1798 rm -fr conftest*
1799 ac_cv_c_stack_direction=-1
1800fi
1801rm -fr conftest*
1802fi
1803
1804fi
1805
1806echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1807cat >> confdefs.h <<EOF
1808#define STACK_DIRECTION $ac_cv_c_stack_direction
1809EOF
1810
1811fi
1812
27ca5dad 1813for ac_hdr in unistd.h
c906108c
SS
1814do
1815ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1816echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
0e5d83e3 1817echo "configure:1818: checking for $ac_hdr" >&5
c906108c
SS
1818if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1819 echo $ac_n "(cached) $ac_c" 1>&6
1820else
1821 cat > conftest.$ac_ext <<EOF
0e5d83e3 1822#line 1823 "configure"
c906108c
SS
1823#include "confdefs.h"
1824#include <$ac_hdr>
1825EOF
1826ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 1827{ (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1828ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1829if test -z "$ac_err"; then
1830 rm -rf conftest*
1831 eval "ac_cv_header_$ac_safe=yes"
1832else
1833 echo "$ac_err" >&5
1834 echo "configure: failed program was:" >&5
1835 cat conftest.$ac_ext >&5
1836 rm -rf conftest*
1837 eval "ac_cv_header_$ac_safe=no"
1838fi
1839rm -f conftest*
1840fi
1841if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1842 echo "$ac_t""yes" 1>&6
1843 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1844 cat >> confdefs.h <<EOF
1845#define $ac_tr_hdr 1
1846EOF
1847
1848else
1849 echo "$ac_t""no" 1>&6
1850fi
1851done
1852
1853for ac_func in getpagesize
1854do
1855echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 1856echo "configure:1857: checking for $ac_func" >&5
c906108c
SS
1857if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1858 echo $ac_n "(cached) $ac_c" 1>&6
1859else
1860 cat > conftest.$ac_ext <<EOF
0e5d83e3 1861#line 1862 "configure"
c906108c
SS
1862#include "confdefs.h"
1863/* System header to define __stub macros and hopefully few prototypes,
1864 which can conflict with char $ac_func(); below. */
1865#include <assert.h>
1866/* Override any gcc2 internal prototype to avoid an error. */
1867/* We use char because int might match the return type of a gcc2
1868 builtin and then its argument prototype would still apply. */
1869char $ac_func();
1870
1871int main() {
1872
1873/* The GNU C library defines this for functions which it implements
1874 to always fail with ENOSYS. Some functions are actually named
1875 something starting with __ and the normal name is an alias. */
1876#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1877choke me
1878#else
1879$ac_func();
1880#endif
1881
1882; return 0; }
1883EOF
0e5d83e3 1884if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1885 rm -rf conftest*
1886 eval "ac_cv_func_$ac_func=yes"
1887else
1888 echo "configure: failed program was:" >&5
1889 cat conftest.$ac_ext >&5
1890 rm -rf conftest*
1891 eval "ac_cv_func_$ac_func=no"
1892fi
1893rm -f conftest*
1894fi
1895
1896if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1897 echo "$ac_t""yes" 1>&6
1898 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1899 cat >> confdefs.h <<EOF
1900#define $ac_tr_func 1
1901EOF
1902
1903else
1904 echo "$ac_t""no" 1>&6
1905fi
1906done
1907
1908echo $ac_n "checking for working mmap""... $ac_c" 1>&6
0e5d83e3 1909echo "configure:1910: checking for working mmap" >&5
c906108c
SS
1910if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1911 echo $ac_n "(cached) $ac_c" 1>&6
1912else
1913 if test "$cross_compiling" = yes; then
1914 ac_cv_func_mmap_fixed_mapped=no
1915else
1916 cat > conftest.$ac_ext <<EOF
0e5d83e3 1917#line 1918 "configure"
c906108c
SS
1918#include "confdefs.h"
1919
1920/* Thanks to Mike Haertel and Jim Avera for this test.
1921 Here is a matrix of mmap possibilities:
1922 mmap private not fixed
1923 mmap private fixed at somewhere currently unmapped
1924 mmap private fixed at somewhere already mapped
1925 mmap shared not fixed
1926 mmap shared fixed at somewhere currently unmapped
1927 mmap shared fixed at somewhere already mapped
1928 For private mappings, we should verify that changes cannot be read()
1929 back from the file, nor mmap's back from the file at a different
1930 address. (There have been systems where private was not correctly
1931 implemented like the infamous i386 svr4.0, and systems where the
1932 VM page cache was not coherent with the filesystem buffer cache
1933 like early versions of FreeBSD and possibly contemporary NetBSD.)
1934 For shared mappings, we should conversely verify that changes get
1935 propogated back to all the places they're supposed to be.
1936
1937 Grep wants private fixed already mapped.
1938 The main things grep needs to know about mmap are:
1939 * does it exist and is it safe to write into the mmap'd area
1940 * how to use it (BSD variants) */
1941#include <sys/types.h>
1942#include <fcntl.h>
1943#include <sys/mman.h>
1944
1945/* This mess was copied from the GNU getpagesize.h. */
1946#ifndef HAVE_GETPAGESIZE
27ca5dad
MC
1947# ifdef HAVE_UNISTD_H
1948# include <unistd.h>
1949# endif
c906108c
SS
1950
1951/* Assume that all systems that can run configure have sys/param.h. */
1952# ifndef HAVE_SYS_PARAM_H
1953# define HAVE_SYS_PARAM_H 1
1954# endif
1955
1956# ifdef _SC_PAGESIZE
1957# define getpagesize() sysconf(_SC_PAGESIZE)
1958# else /* no _SC_PAGESIZE */
1959# ifdef HAVE_SYS_PARAM_H
1960# include <sys/param.h>
1961# ifdef EXEC_PAGESIZE
1962# define getpagesize() EXEC_PAGESIZE
1963# else /* no EXEC_PAGESIZE */
1964# ifdef NBPG
1965# define getpagesize() NBPG * CLSIZE
1966# ifndef CLSIZE
1967# define CLSIZE 1
1968# endif /* no CLSIZE */
1969# else /* no NBPG */
1970# ifdef NBPC
1971# define getpagesize() NBPC
1972# else /* no NBPC */
1973# ifdef PAGESIZE
1974# define getpagesize() PAGESIZE
1975# endif /* PAGESIZE */
1976# endif /* no NBPC */
1977# endif /* no NBPG */
1978# endif /* no EXEC_PAGESIZE */
1979# else /* no HAVE_SYS_PARAM_H */
1980# define getpagesize() 8192 /* punt totally */
1981# endif /* no HAVE_SYS_PARAM_H */
1982# endif /* no _SC_PAGESIZE */
1983
1984#endif /* no HAVE_GETPAGESIZE */
1985
1986#ifdef __cplusplus
1987extern "C" { void *malloc(unsigned); }
1988#else
1989char *malloc();
1990#endif
1991
1992int
1993main()
1994{
1995 char *data, *data2, *data3;
1996 int i, pagesize;
1997 int fd;
1998
1999 pagesize = getpagesize();
2000
2001 /*
2002 * First, make a file with some known garbage in it.
2003 */
2004 data = malloc(pagesize);
2005 if (!data)
2006 exit(1);
2007 for (i = 0; i < pagesize; ++i)
2008 *(data + i) = rand();
2009 umask(0);
2010 fd = creat("conftestmmap", 0600);
2011 if (fd < 0)
2012 exit(1);
2013 if (write(fd, data, pagesize) != pagesize)
2014 exit(1);
2015 close(fd);
2016
2017 /*
2018 * Next, try to mmap the file at a fixed address which
2019 * already has something else allocated at it. If we can,
2020 * also make sure that we see the same garbage.
2021 */
2022 fd = open("conftestmmap", O_RDWR);
2023 if (fd < 0)
2024 exit(1);
2025 data2 = malloc(2 * pagesize);
2026 if (!data2)
2027 exit(1);
2028 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2029 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2030 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2031 exit(1);
2032 for (i = 0; i < pagesize; ++i)
2033 if (*(data + i) != *(data2 + i))
2034 exit(1);
2035
2036 /*
2037 * Finally, make sure that changes to the mapped area
2038 * do not percolate back to the file as seen by read().
2039 * (This is a bug on some variants of i386 svr4.0.)
2040 */
2041 for (i = 0; i < pagesize; ++i)
2042 *(data2 + i) = *(data2 + i) + 1;
2043 data3 = malloc(pagesize);
2044 if (!data3)
2045 exit(1);
2046 if (read(fd, data3, pagesize) != pagesize)
2047 exit(1);
2048 for (i = 0; i < pagesize; ++i)
2049 if (*(data + i) != *(data3 + i))
2050 exit(1);
2051 close(fd);
2052 unlink("conftestmmap");
2053 exit(0);
2054}
2055
2056EOF
0e5d83e3 2057if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2058then
2059 ac_cv_func_mmap_fixed_mapped=yes
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -fr conftest*
2064 ac_cv_func_mmap_fixed_mapped=no
2065fi
2066rm -fr conftest*
2067fi
2068
2069fi
2070
2071echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2072if test $ac_cv_func_mmap_fixed_mapped = yes; then
2073 cat >> confdefs.h <<\EOF
2074#define HAVE_MMAP 1
2075EOF
2076
2077fi
2078
2079
2080 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2081unistd.h values.h sys/param.h
2082do
2083ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2084echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
0e5d83e3 2085echo "configure:2086: checking for $ac_hdr" >&5
c906108c
SS
2086if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
2088else
2089 cat > conftest.$ac_ext <<EOF
0e5d83e3 2090#line 2091 "configure"
c906108c
SS
2091#include "confdefs.h"
2092#include <$ac_hdr>
2093EOF
2094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 2095{ (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2097if test -z "$ac_err"; then
2098 rm -rf conftest*
2099 eval "ac_cv_header_$ac_safe=yes"
2100else
2101 echo "$ac_err" >&5
2102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
2104 rm -rf conftest*
2105 eval "ac_cv_header_$ac_safe=no"
2106fi
2107rm -f conftest*
2108fi
2109if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2110 echo "$ac_t""yes" 1>&6
2111 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2112 cat >> confdefs.h <<EOF
2113#define $ac_tr_hdr 1
2114EOF
2115
2116else
2117 echo "$ac_t""no" 1>&6
2118fi
2119done
2120
2121 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2122__argz_count __argz_stringify __argz_next
2123do
2124echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 2125echo "configure:2126: checking for $ac_func" >&5
c906108c
SS
2126if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128else
2129 cat > conftest.$ac_ext <<EOF
0e5d83e3 2130#line 2131 "configure"
c906108c
SS
2131#include "confdefs.h"
2132/* System header to define __stub macros and hopefully few prototypes,
2133 which can conflict with char $ac_func(); below. */
2134#include <assert.h>
2135/* Override any gcc2 internal prototype to avoid an error. */
2136/* We use char because int might match the return type of a gcc2
2137 builtin and then its argument prototype would still apply. */
2138char $ac_func();
2139
2140int main() {
2141
2142/* The GNU C library defines this for functions which it implements
2143 to always fail with ENOSYS. Some functions are actually named
2144 something starting with __ and the normal name is an alias. */
2145#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2146choke me
2147#else
2148$ac_func();
2149#endif
2150
2151; return 0; }
2152EOF
0e5d83e3 2153if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2154 rm -rf conftest*
2155 eval "ac_cv_func_$ac_func=yes"
2156else
2157 echo "configure: failed program was:" >&5
2158 cat conftest.$ac_ext >&5
2159 rm -rf conftest*
2160 eval "ac_cv_func_$ac_func=no"
2161fi
2162rm -f conftest*
2163fi
2164
2165if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2166 echo "$ac_t""yes" 1>&6
2167 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2168 cat >> confdefs.h <<EOF
2169#define $ac_tr_func 1
2170EOF
2171
2172else
2173 echo "$ac_t""no" 1>&6
2174fi
2175done
2176
2177
2178 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2179 for ac_func in stpcpy
2180do
2181echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 2182echo "configure:2183: checking for $ac_func" >&5
c906108c
SS
2183if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 cat > conftest.$ac_ext <<EOF
0e5d83e3 2187#line 2188 "configure"
c906108c
SS
2188#include "confdefs.h"
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $ac_func(); below. */
2191#include <assert.h>
2192/* Override any gcc2 internal prototype to avoid an error. */
2193/* We use char because int might match the return type of a gcc2
2194 builtin and then its argument prototype would still apply. */
2195char $ac_func();
2196
2197int main() {
2198
2199/* The GNU C library defines this for functions which it implements
2200 to always fail with ENOSYS. Some functions are actually named
2201 something starting with __ and the normal name is an alias. */
2202#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2203choke me
2204#else
2205$ac_func();
2206#endif
2207
2208; return 0; }
2209EOF
0e5d83e3 2210if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2211 rm -rf conftest*
2212 eval "ac_cv_func_$ac_func=yes"
2213else
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 rm -rf conftest*
2217 eval "ac_cv_func_$ac_func=no"
2218fi
2219rm -f conftest*
2220fi
2221
2222if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2223 echo "$ac_t""yes" 1>&6
2224 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2225 cat >> confdefs.h <<EOF
2226#define $ac_tr_func 1
2227EOF
2228
2229else
2230 echo "$ac_t""no" 1>&6
2231fi
2232done
2233
2234 fi
2235 if test "${ac_cv_func_stpcpy}" = "yes"; then
2236 cat >> confdefs.h <<\EOF
2237#define HAVE_STPCPY 1
2238EOF
2239
2240 fi
2241
2242 if test $ac_cv_header_locale_h = yes; then
2243 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
0e5d83e3 2244echo "configure:2245: checking for LC_MESSAGES" >&5
c906108c
SS
2245if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2246 echo $ac_n "(cached) $ac_c" 1>&6
2247else
2248 cat > conftest.$ac_ext <<EOF
0e5d83e3 2249#line 2250 "configure"
c906108c
SS
2250#include "confdefs.h"
2251#include <locale.h>
2252int main() {
2253return LC_MESSAGES
2254; return 0; }
2255EOF
0e5d83e3 2256if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2257 rm -rf conftest*
2258 am_cv_val_LC_MESSAGES=yes
2259else
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2262 rm -rf conftest*
2263 am_cv_val_LC_MESSAGES=no
2264fi
2265rm -f conftest*
2266fi
2267
2268echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2269 if test $am_cv_val_LC_MESSAGES = yes; then
2270 cat >> confdefs.h <<\EOF
2271#define HAVE_LC_MESSAGES 1
2272EOF
2273
2274 fi
2275 fi
2276 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
0e5d83e3 2277echo "configure:2278: checking whether NLS is requested" >&5
c906108c
SS
2278 # Check whether --enable-nls or --disable-nls was given.
2279if test "${enable_nls+set}" = set; then
2280 enableval="$enable_nls"
2281 USE_NLS=$enableval
2282else
2283 USE_NLS=yes
2284fi
2285
2286 echo "$ac_t""$USE_NLS" 1>&6
2287
2288
2289 USE_INCLUDED_LIBINTL=no
2290
2291 if test "$USE_NLS" = "yes"; then
2292 cat >> confdefs.h <<\EOF
2293#define ENABLE_NLS 1
2294EOF
2295
2296 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
0e5d83e3 2297echo "configure:2298: checking whether included gettext is requested" >&5
c906108c
SS
2298 # Check whether --with-included-gettext or --without-included-gettext was given.
2299if test "${with_included_gettext+set}" = set; then
2300 withval="$with_included_gettext"
2301 nls_cv_force_use_gnu_gettext=$withval
2302else
2303 nls_cv_force_use_gnu_gettext=no
2304fi
2305
2306 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2307
2308 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2309 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2310 nls_cv_header_intl=
2311 nls_cv_header_libgt=
2312 CATOBJEXT=NONE
2313
2314 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2315echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
0e5d83e3 2316echo "configure:2317: checking for libintl.h" >&5
c906108c
SS
2317if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 cat > conftest.$ac_ext <<EOF
0e5d83e3 2321#line 2322 "configure"
c906108c
SS
2322#include "confdefs.h"
2323#include <libintl.h>
2324EOF
2325ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 2326{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2327ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328if test -z "$ac_err"; then
2329 rm -rf conftest*
2330 eval "ac_cv_header_$ac_safe=yes"
2331else
2332 echo "$ac_err" >&5
2333 echo "configure: failed program was:" >&5
2334 cat conftest.$ac_ext >&5
2335 rm -rf conftest*
2336 eval "ac_cv_header_$ac_safe=no"
2337fi
2338rm -f conftest*
2339fi
2340if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2341 echo "$ac_t""yes" 1>&6
2342 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
0e5d83e3 2343echo "configure:2344: checking for gettext in libc" >&5
c906108c
SS
2344if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2346else
2347 cat > conftest.$ac_ext <<EOF
0e5d83e3 2348#line 2349 "configure"
c906108c
SS
2349#include "confdefs.h"
2350#include <libintl.h>
2351int main() {
2352return (int) gettext ("")
2353; return 0; }
2354EOF
0e5d83e3 2355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2356 rm -rf conftest*
2357 gt_cv_func_gettext_libc=yes
2358else
2359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -rf conftest*
2362 gt_cv_func_gettext_libc=no
2363fi
2364rm -f conftest*
2365fi
2366
2367echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2368
2369 if test "$gt_cv_func_gettext_libc" != "yes"; then
2370 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
0e5d83e3 2371echo "configure:2372: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2372ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2373if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2374 echo $ac_n "(cached) $ac_c" 1>&6
2375else
2376 ac_save_LIBS="$LIBS"
2377LIBS="-lintl $LIBS"
2378cat > conftest.$ac_ext <<EOF
0e5d83e3 2379#line 2380 "configure"
c906108c
SS
2380#include "confdefs.h"
2381/* Override any gcc2 internal prototype to avoid an error. */
2382/* We use char because int might match the return type of a gcc2
2383 builtin and then its argument prototype would still apply. */
2384char bindtextdomain();
2385
2386int main() {
2387bindtextdomain()
2388; return 0; }
2389EOF
0e5d83e3 2390if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2391 rm -rf conftest*
2392 eval "ac_cv_lib_$ac_lib_var=yes"
2393else
2394 echo "configure: failed program was:" >&5
2395 cat conftest.$ac_ext >&5
2396 rm -rf conftest*
2397 eval "ac_cv_lib_$ac_lib_var=no"
2398fi
2399rm -f conftest*
2400LIBS="$ac_save_LIBS"
2401
2402fi
2403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2404 echo "$ac_t""yes" 1>&6
2405 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
0e5d83e3 2406echo "configure:2407: checking for gettext in libintl" >&5
c906108c
SS
2407if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2408 echo $ac_n "(cached) $ac_c" 1>&6
2409else
2410 cat > conftest.$ac_ext <<EOF
0e5d83e3 2411#line 2412 "configure"
c906108c
SS
2412#include "confdefs.h"
2413
2414int main() {
2415return (int) gettext ("")
2416; return 0; }
2417EOF
0e5d83e3 2418if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2419 rm -rf conftest*
2420 gt_cv_func_gettext_libintl=yes
2421else
2422 echo "configure: failed program was:" >&5
2423 cat conftest.$ac_ext >&5
2424 rm -rf conftest*
2425 gt_cv_func_gettext_libintl=no
2426fi
2427rm -f conftest*
2428fi
2429
2430echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2431else
2432 echo "$ac_t""no" 1>&6
2433fi
2434
2435 fi
2436
2437 if test "$gt_cv_func_gettext_libc" = "yes" \
2438 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2439 cat >> confdefs.h <<\EOF
2440#define HAVE_GETTEXT 1
2441EOF
2442
2443 # Extract the first word of "msgfmt", so it can be a program name with args.
2444set dummy msgfmt; ac_word=$2
2445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2446echo "configure:2447: checking for $ac_word" >&5
c906108c
SS
2447if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449else
2450 case "$MSGFMT" in
2451 /*)
2452 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2453 ;;
2454 *)
2455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2456 for ac_dir in $PATH; do
2457 test -z "$ac_dir" && ac_dir=.
2458 if test -f $ac_dir/$ac_word; then
2459 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2460 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2461 break
2462 fi
2463 fi
2464 done
2465 IFS="$ac_save_ifs"
2466 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2467 ;;
2468esac
2469fi
2470MSGFMT="$ac_cv_path_MSGFMT"
2471if test -n "$MSGFMT"; then
2472 echo "$ac_t""$MSGFMT" 1>&6
2473else
2474 echo "$ac_t""no" 1>&6
2475fi
2476 if test "$MSGFMT" != "no"; then
2477 for ac_func in dcgettext
2478do
2479echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 2480echo "configure:2481: checking for $ac_func" >&5
c906108c
SS
2481if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483else
2484 cat > conftest.$ac_ext <<EOF
0e5d83e3 2485#line 2486 "configure"
c906108c
SS
2486#include "confdefs.h"
2487/* System header to define __stub macros and hopefully few prototypes,
2488 which can conflict with char $ac_func(); below. */
2489#include <assert.h>
2490/* Override any gcc2 internal prototype to avoid an error. */
2491/* We use char because int might match the return type of a gcc2
2492 builtin and then its argument prototype would still apply. */
2493char $ac_func();
2494
2495int main() {
2496
2497/* The GNU C library defines this for functions which it implements
2498 to always fail with ENOSYS. Some functions are actually named
2499 something starting with __ and the normal name is an alias. */
2500#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2501choke me
2502#else
2503$ac_func();
2504#endif
2505
2506; return 0; }
2507EOF
0e5d83e3 2508if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2509 rm -rf conftest*
2510 eval "ac_cv_func_$ac_func=yes"
2511else
2512 echo "configure: failed program was:" >&5
2513 cat conftest.$ac_ext >&5
2514 rm -rf conftest*
2515 eval "ac_cv_func_$ac_func=no"
2516fi
2517rm -f conftest*
2518fi
2519
2520if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2521 echo "$ac_t""yes" 1>&6
2522 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2523 cat >> confdefs.h <<EOF
2524#define $ac_tr_func 1
2525EOF
2526
2527else
2528 echo "$ac_t""no" 1>&6
2529fi
2530done
2531
2532 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2533set dummy gmsgfmt; ac_word=$2
2534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2535echo "configure:2536: checking for $ac_word" >&5
c906108c
SS
2536if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538else
2539 case "$GMSGFMT" in
2540 /*)
2541 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2542 ;;
2543 ?:/*)
2544 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2545 ;;
2546 *)
2547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2548 ac_dummy="$PATH"
2549 for ac_dir in $ac_dummy; do
2550 test -z "$ac_dir" && ac_dir=.
2551 if test -f $ac_dir/$ac_word; then
2552 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2553 break
2554 fi
2555 done
2556 IFS="$ac_save_ifs"
2557 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2558 ;;
2559esac
2560fi
2561GMSGFMT="$ac_cv_path_GMSGFMT"
2562if test -n "$GMSGFMT"; then
2563 echo "$ac_t""$GMSGFMT" 1>&6
2564else
2565 echo "$ac_t""no" 1>&6
2566fi
2567
2568 # Extract the first word of "xgettext", so it can be a program name with args.
2569set dummy xgettext; ac_word=$2
2570echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2571echo "configure:2572: checking for $ac_word" >&5
c906108c
SS
2572if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574else
2575 case "$XGETTEXT" in
2576 /*)
2577 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2578 ;;
2579 *)
2580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2581 for ac_dir in $PATH; do
2582 test -z "$ac_dir" && ac_dir=.
2583 if test -f $ac_dir/$ac_word; then
2584 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2585 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2586 break
2587 fi
2588 fi
2589 done
2590 IFS="$ac_save_ifs"
2591 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2592 ;;
2593esac
2594fi
2595XGETTEXT="$ac_cv_path_XGETTEXT"
2596if test -n "$XGETTEXT"; then
2597 echo "$ac_t""$XGETTEXT" 1>&6
2598else
2599 echo "$ac_t""no" 1>&6
2600fi
2601
2602 cat > conftest.$ac_ext <<EOF
0e5d83e3 2603#line 2604 "configure"
c906108c
SS
2604#include "confdefs.h"
2605
2606int main() {
2607extern int _nl_msg_cat_cntr;
2608 return _nl_msg_cat_cntr
2609; return 0; }
2610EOF
0e5d83e3 2611if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2612 rm -rf conftest*
2613 CATOBJEXT=.gmo
2614 DATADIRNAME=share
2615else
2616 echo "configure: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2618 rm -rf conftest*
2619 CATOBJEXT=.mo
2620 DATADIRNAME=lib
2621fi
2622rm -f conftest*
2623 INSTOBJEXT=.mo
2624 fi
2625 fi
2626
2627else
2628 echo "$ac_t""no" 1>&6
2629fi
2630
2631
2632
2633 if test "$CATOBJEXT" = "NONE"; then
2634 nls_cv_use_gnu_gettext=yes
2635 fi
2636 fi
2637
2638 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2639 INTLOBJS="\$(GETTOBJS)"
2640 # Extract the first word of "msgfmt", so it can be a program name with args.
2641set dummy msgfmt; ac_word=$2
2642echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2643echo "configure:2644: checking for $ac_word" >&5
c906108c
SS
2644if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2645 echo $ac_n "(cached) $ac_c" 1>&6
2646else
2647 case "$MSGFMT" in
2648 /*)
2649 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2650 ;;
2651 *)
2652 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2653 for ac_dir in $PATH; do
2654 test -z "$ac_dir" && ac_dir=.
2655 if test -f $ac_dir/$ac_word; then
2656 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2657 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2658 break
2659 fi
2660 fi
2661 done
2662 IFS="$ac_save_ifs"
2663 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2664 ;;
2665esac
2666fi
2667MSGFMT="$ac_cv_path_MSGFMT"
2668if test -n "$MSGFMT"; then
2669 echo "$ac_t""$MSGFMT" 1>&6
2670else
2671 echo "$ac_t""no" 1>&6
2672fi
2673
2674 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2675set dummy gmsgfmt; ac_word=$2
2676echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2677echo "configure:2678: checking for $ac_word" >&5
c906108c
SS
2678if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2679 echo $ac_n "(cached) $ac_c" 1>&6
2680else
2681 case "$GMSGFMT" in
2682 /*)
2683 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2684 ;;
2685 ?:/*)
2686 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2687 ;;
2688 *)
2689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2690 ac_dummy="$PATH"
2691 for ac_dir in $ac_dummy; do
2692 test -z "$ac_dir" && ac_dir=.
2693 if test -f $ac_dir/$ac_word; then
2694 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2695 break
2696 fi
2697 done
2698 IFS="$ac_save_ifs"
2699 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2700 ;;
2701esac
2702fi
2703GMSGFMT="$ac_cv_path_GMSGFMT"
2704if test -n "$GMSGFMT"; then
2705 echo "$ac_t""$GMSGFMT" 1>&6
2706else
2707 echo "$ac_t""no" 1>&6
2708fi
2709
2710 # Extract the first word of "xgettext", so it can be a program name with args.
2711set dummy xgettext; ac_word=$2
2712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 2713echo "configure:2714: checking for $ac_word" >&5
c906108c
SS
2714if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716else
2717 case "$XGETTEXT" in
2718 /*)
2719 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2720 ;;
2721 *)
2722 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2723 for ac_dir in $PATH; do
2724 test -z "$ac_dir" && ac_dir=.
2725 if test -f $ac_dir/$ac_word; then
2726 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2727 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2728 break
2729 fi
2730 fi
2731 done
2732 IFS="$ac_save_ifs"
2733 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2734 ;;
2735esac
2736fi
2737XGETTEXT="$ac_cv_path_XGETTEXT"
2738if test -n "$XGETTEXT"; then
2739 echo "$ac_t""$XGETTEXT" 1>&6
2740else
2741 echo "$ac_t""no" 1>&6
2742fi
2743
2744
2745 USE_INCLUDED_LIBINTL=yes
2746 CATOBJEXT=.gmo
2747 INSTOBJEXT=.mo
2748 DATADIRNAME=share
2749 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2750 INTLLIBS=$INTLDEPS
2751 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2752 nls_cv_header_intl=libintl.h
2753 nls_cv_header_libgt=libgettext.h
2754 fi
2755
2756 if test "$XGETTEXT" != ":"; then
2757 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2758 : ;
2759 else
2760 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2761 XGETTEXT=":"
2762 fi
2763 fi
2764
2765 # We need to process the po/ directory.
2766 POSUB=po
2767 else
2768 DATADIRNAME=share
2769 nls_cv_header_intl=libintl.h
2770 nls_cv_header_libgt=libgettext.h
2771 fi
2772
2773 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2774 # because some of the sources are only built for this goal.
2775 if test "$PACKAGE" = gettext; then
2776 USE_NLS=yes
2777 USE_INCLUDED_LIBINTL=yes
2778 fi
2779
2780 for lang in $ALL_LINGUAS; do
2781 GMOFILES="$GMOFILES $lang.gmo"
2782 POFILES="$POFILES $lang.po"
2783 done
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798 if test "x$CATOBJEXT" != "x"; then
2799 if test "x$ALL_LINGUAS" = "x"; then
2800 LINGUAS=
2801 else
2802 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
0e5d83e3 2803echo "configure:2804: checking for catalogs to be installed" >&5
c906108c
SS
2804 NEW_LINGUAS=
2805 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2806 case "$ALL_LINGUAS" in
2807 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2808 esac
2809 done
2810 LINGUAS=$NEW_LINGUAS
2811 echo "$ac_t""$LINGUAS" 1>&6
2812 fi
2813
2814 if test -n "$LINGUAS"; then
2815 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2816 fi
2817 fi
2818
2819 if test $ac_cv_header_locale_h = yes; then
2820 INCLUDE_LOCALE_H="#include <locale.h>"
2821 else
2822 INCLUDE_LOCALE_H="\
2823/* The system does not provide the header <locale.h>. Take care yourself. */"
2824 fi
2825
2826
2827 if test -f $srcdir/po2tbl.sed.in; then
2828 if test "$CATOBJEXT" = ".cat"; then
2829 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2830echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
0e5d83e3 2831echo "configure:2832: checking for linux/version.h" >&5
c906108c
SS
2832if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2833 echo $ac_n "(cached) $ac_c" 1>&6
2834else
2835 cat > conftest.$ac_ext <<EOF
0e5d83e3 2836#line 2837 "configure"
c906108c
SS
2837#include "confdefs.h"
2838#include <linux/version.h>
2839EOF
2840ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
0e5d83e3 2841{ (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2842ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2843if test -z "$ac_err"; then
2844 rm -rf conftest*
2845 eval "ac_cv_header_$ac_safe=yes"
2846else
2847 echo "$ac_err" >&5
2848 echo "configure: failed program was:" >&5
2849 cat conftest.$ac_ext >&5
2850 rm -rf conftest*
2851 eval "ac_cv_header_$ac_safe=no"
2852fi
2853rm -f conftest*
2854fi
2855if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2856 echo "$ac_t""yes" 1>&6
2857 msgformat=linux
2858else
2859 echo "$ac_t""no" 1>&6
2860msgformat=xopen
2861fi
2862
2863
2864 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2865 fi
2866 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2867 $srcdir/po2tbl.sed.in > po2tbl.sed
2868 fi
2869
2870 if test "$PACKAGE" = "gettext"; then
2871 GT_NO="#NO#"
2872 GT_YES=
2873 else
2874 GT_NO=
2875 GT_YES="#YES#"
2876 fi
2877
2878
2879
2880 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2881
2882
2883 l=
2884
2885
4536bbc6 2886 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2887 test -d po || mkdir po
2888 if test "x$srcdir" != "x."; then
2889 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2890 posrcprefix="$srcdir/"
2891 else
2892 posrcprefix="../$srcdir/"
2893 fi
2894 else
2895 posrcprefix="../"
2896 fi
2897 rm -f po/POTFILES
2898 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2899 < $srcdir/po/POTFILES.in > po/POTFILES
2900 fi
2901
0fbb3da7
TT
2902cat >> confdefs.h <<\EOF
2903#define PACKAGE "gdb"
2904EOF
2905
2906
5b5d99cf
JB
2907debugdir=${libdir}/debug
2908
2909# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2910if test "${with_separate_debug_dir+set}" = set; then
2911 withval="$with_separate_debug_dir"
2912 debugdir="${withval}"
2913fi
2914
2915
2916
2917 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2918 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2919 ac_define_dir=`eval echo $debugdir`
2920 ac_define_dir=`eval echo $ac_define_dir`
2921 cat >> confdefs.h <<EOF
2922#define DEBUGDIR "$ac_define_dir"
2923EOF
2924
2925
2926#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2927
2928
2929CONFIG_OBS=
66b965bb 2930CONFIG_LIB_OBS=
c906108c
SS
2931CONFIG_DEPS=
2932CONFIG_SRCS=
fb40c209
AC
2933CONFIG_INITS=
2934ENABLE_CFLAGS=
b3a90332
AC
2935CONFIG_ALL=
2936CONFIG_CLEAN=
e56ac5c3
AC
2937CONFIG_INSTALL=
2938CONFIG_UNINSTALL=
c906108c 2939
8dcde887 2940subdirs="doc testsuite"
96baa820 2941
8dcde887 2942configdirs=
96baa820 2943
27e9bf90 2944. $srcdir/configure.host
c906108c 2945
27e9bf90 2946. $srcdir/configure.tgt
c906108c 2947
27e9bf90
MK
2948# Fetch the default architecture and default target vector from BFD.
2949targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2950
27e9bf90
MK
2951# We only want the first architecture, so strip off the others if
2952# there is more than one.
2953targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2954
27e9bf90
MK
2955if test "x$targ_archs" != x; then
2956 cat >> confdefs.h <<EOF
2957#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2958EOF
2959
2960fi
27e9bf90
MK
2961if test "x$targ_defvec" != x; then
2962 cat >> confdefs.h <<EOF
2963#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2964EOF
2965
2966fi
c906108c 2967
8bb2c122
MK
2968if test "$program_transform_name" = s,x,x,; then
2969 program_transform_name=
2970else
2971 # Double any \ or $. echo might interpret backslashes.
2972 cat <<\EOF_SED > conftestsed
2973s,\\,\\\\,g; s,\$,$$,g
2974EOF_SED
2975 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2976 rm -f conftestsed
2977fi
2978test "$program_prefix" != NONE &&
2979 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2980# Use a double $ so make ignores it.
2981test "$program_suffix" != NONE &&
2982 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2983
2984# sed with no file args requires a program.
2985test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2986
2987
627af7ea
MK
2988# The CLI cannot be disabled yet, but may be in the future.
2989
2990# Enable CLI.
2991# Check whether --enable-gdbcli or --disable-gdbcli was given.
2992if test "${enable_gdbcli+set}" = set; then
2993 enableval="$enable_gdbcli"
2994 case $enableval in
2995 yes)
2996 ;;
2997 no)
2998 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2999 *)
3000 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3001 esac
3002else
3003 enable_gdbcli=yes
3004fi
3005
3006if test x"$enable_gdbcli" = xyes; then
3007 if test -d $srcdir/cli; then
3008 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3009 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3010 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3011 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3012 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3013 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3014 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3015 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3016 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3017 fi
3018fi
3019
3020# Enable MI.
3021# Check whether --enable-gdbmi or --disable-gdbmi was given.
3022if test "${enable_gdbmi+set}" = set; then
3023 enableval="$enable_gdbmi"
3024 case $enableval in
3025 yes | no)
3026 ;;
3027 *)
3028 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3029 esac
3030else
3031 enable_gdbmi=yes
3032fi
3033
3034if test x"$enable_gdbmi" = xyes; then
3035 if test -d $srcdir/mi; then
3036 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3037 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3038 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3039 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3040 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3041 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3042 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3043 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3044 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3045 fi
3046fi
3047
06825bd1
MK
3048# Enable TUI.
3049# Check whether --enable-tui or --disable-tui was given.
3050if test "${enable_tui+set}" = set; then
3051 enableval="$enable_tui"
3052 case $enableval in
3053 yes | no)
3054 ;;
3055 *)
3056 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3057 esac
3058fi
3059
3060if test x"$enable_tui" = xyes; then
3061 if test -d $srcdir/tui; then
3062 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3063 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3064 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3065 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3066 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3067 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3068 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3069 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3070 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3071 need_curses=yes
3072 fi
3073fi
3074
8ee53726
MK
3075# Enable gdbtk.
3076# Check whether --enable-gdbtk or --disable-gdbtk was given.
3077if test "${enable_gdbtk+set}" = set; then
3078 enableval="$enable_gdbtk"
3079 case $enableval in
3080 yes | no)
3081 ;;
3082 *)
3083 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3084 esac
3085else
3086 if test -d $srcdir/gdbtk; then
3087 enable_gdbtk=yes
3088 else
3089 enable_gdbtk=no
3090 fi
3091fi
3092
3093# We unconditionally disable gdbtk tests on selected platforms.
3094case $host_os in
3095 go32* | windows*)
3096 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3097 enable_gdbtk=no ;;
3098esac
3099
0e5d83e3
JJ
3100# Libunwind support.
3101# Check whether --with-libunwind or --without-libunwind was given.
3102if test "${with_libunwind+set}" = set; then
3103 withval="$with_libunwind"
3104 case "${withval}" in
3105 yes) enable_libunwind=yes ;;
3106 no) enable_libunwind=no ;;
3107 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3108esac
3109else
3110
3111 for ac_hdr in libunwind.h
3112do
3113ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3114echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3115echo "configure:3116: checking for $ac_hdr" >&5
3116if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3117 echo $ac_n "(cached) $ac_c" 1>&6
3118else
3119 cat > conftest.$ac_ext <<EOF
3120#line 3121 "configure"
3121#include "confdefs.h"
3122#include <$ac_hdr>
3123EOF
3124ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3125{ (eval echo configure:3126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3126ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3127if test -z "$ac_err"; then
3128 rm -rf conftest*
3129 eval "ac_cv_header_$ac_safe=yes"
3130else
3131 echo "$ac_err" >&5
3132 echo "configure: failed program was:" >&5
3133 cat conftest.$ac_ext >&5
3134 rm -rf conftest*
3135 eval "ac_cv_header_$ac_safe=no"
3136fi
3137rm -f conftest*
3138fi
3139if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3140 echo "$ac_t""yes" 1>&6
3141 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3142 cat >> confdefs.h <<EOF
3143#define $ac_tr_hdr 1
3144EOF
3145
3146else
3147 echo "$ac_t""no" 1>&6
3148fi
3149done
3150
3151 for ac_hdr in libunwind-ia64.h
3152do
3153ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3154echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3155echo "configure:3156: checking for $ac_hdr" >&5
3156if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3157 echo $ac_n "(cached) $ac_c" 1>&6
3158else
3159 cat > conftest.$ac_ext <<EOF
3160#line 3161 "configure"
3161#include "confdefs.h"
3162#include <$ac_hdr>
3163EOF
3164ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3165{ (eval echo configure:3166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3166ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3167if test -z "$ac_err"; then
3168 rm -rf conftest*
3169 eval "ac_cv_header_$ac_safe=yes"
3170else
3171 echo "$ac_err" >&5
3172 echo "configure: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 rm -rf conftest*
3175 eval "ac_cv_header_$ac_safe=no"
3176fi
3177rm -f conftest*
3178fi
3179if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3180 echo "$ac_t""yes" 1>&6
3181 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3182 cat >> confdefs.h <<EOF
3183#define $ac_tr_hdr 1
3184EOF
3185
3186else
3187 echo "$ac_t""no" 1>&6
3188fi
3189done
3190
3191 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3192 enable_libunwind=yes;
3193 fi
3194
3195fi
3196
3197
3198if test x"$enable_libunwind" = xyes; then
3199 for ac_hdr in libunwind.h
3200do
3201ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3202echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3203echo "configure:3204: checking for $ac_hdr" >&5
3204if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3205 echo $ac_n "(cached) $ac_c" 1>&6
3206else
3207 cat > conftest.$ac_ext <<EOF
3208#line 3209 "configure"
3209#include "confdefs.h"
3210#include <$ac_hdr>
3211EOF
3212ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3213{ (eval echo configure:3214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3214ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3215if test -z "$ac_err"; then
3216 rm -rf conftest*
3217 eval "ac_cv_header_$ac_safe=yes"
3218else
3219 echo "$ac_err" >&5
3220 echo "configure: failed program was:" >&5
3221 cat conftest.$ac_ext >&5
3222 rm -rf conftest*
3223 eval "ac_cv_header_$ac_safe=no"
3224fi
3225rm -f conftest*
3226fi
3227if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3228 echo "$ac_t""yes" 1>&6
3229 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3230 cat >> confdefs.h <<EOF
3231#define $ac_tr_hdr 1
3232EOF
3233
3234else
3235 echo "$ac_t""no" 1>&6
3236fi
3237done
3238
3239 for ac_hdr in libunwind-ia64.h
3240do
3241ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3242echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3243echo "configure:3244: checking for $ac_hdr" >&5
3244if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3245 echo $ac_n "(cached) $ac_c" 1>&6
3246else
3247 cat > conftest.$ac_ext <<EOF
3248#line 3249 "configure"
3249#include "confdefs.h"
3250#include <$ac_hdr>
3251EOF
3252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3253{ (eval echo configure:3254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3254ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3255if test -z "$ac_err"; then
3256 rm -rf conftest*
3257 eval "ac_cv_header_$ac_safe=yes"
3258else
3259 echo "$ac_err" >&5
3260 echo "configure: failed program was:" >&5
3261 cat conftest.$ac_ext >&5
3262 rm -rf conftest*
3263 eval "ac_cv_header_$ac_safe=no"
3264fi
3265rm -f conftest*
3266fi
3267if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3268 echo "$ac_t""yes" 1>&6
3269 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3270 cat >> confdefs.h <<EOF
3271#define $ac_tr_hdr 1
3272EOF
3273
3274else
3275 echo "$ac_t""no" 1>&6
3276fi
3277done
3278
3279 cat >> confdefs.h <<\EOF
3280#define HAVE_LIBUNWIND 1
3281EOF
3282
3283 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3284 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3285 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3286fi
3287
d28f9cdf
DJ
3288# Profiling support.
3289# Check whether --enable-profiling or --disable-profiling was given.
3290if test "${enable_profiling+set}" = set; then
3291 enableval="$enable_profiling"
3292 case $enableval in
3293 yes | no)
3294 ;;
3295 *)
3296 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3297 esac
3298else
3299 enable_profiling=no
3300fi
3301
3302
d9feb4e7
DJ
3303for ac_func in monstartup _mcleanup
3304do
3305echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
0e5d83e3 3306echo "configure:3307: checking for $ac_func" >&5
d9feb4e7 3307if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3308 echo $ac_n "(cached) $ac_c" 1>&6
3309else
3310 cat > conftest.$ac_ext <<EOF
0e5d83e3 3311#line 3312 "configure"
d28f9cdf
DJ
3312#include "confdefs.h"
3313/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3314 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3315#include <assert.h>
3316/* Override any gcc2 internal prototype to avoid an error. */
3317/* We use char because int might match the return type of a gcc2
3318 builtin and then its argument prototype would still apply. */
d9feb4e7 3319char $ac_func();
d28f9cdf
DJ
3320
3321int main() {
3322
3323/* The GNU C library defines this for functions which it implements
3324 to always fail with ENOSYS. Some functions are actually named
3325 something starting with __ and the normal name is an alias. */
d9feb4e7 3326#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3327choke me
3328#else
d9feb4e7 3329$ac_func();
d28f9cdf
DJ
3330#endif
3331
3332; return 0; }
3333EOF
0e5d83e3 3334if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3335 rm -rf conftest*
d9feb4e7 3336 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3337else
3338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3340 rm -rf conftest*
d9feb4e7 3341 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3342fi
3343rm -f conftest*
3344fi
3345
d9feb4e7 3346if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3347 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3348 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3349 cat >> confdefs.h <<EOF
3350#define $ac_tr_func 1
3351EOF
3352
d28f9cdf
DJ
3353else
3354 echo "$ac_t""no" 1>&6
d28f9cdf 3355fi
d9feb4e7 3356done
d28f9cdf 3357
b0b1c2c0 3358echo $ac_n "checking for _etext""... $ac_c" 1>&6
0e5d83e3 3359echo "configure:3360: checking for _etext" >&5
b0b1c2c0
MK
3360if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3361 echo $ac_n "(cached) $ac_c" 1>&6
3362else
3363 cat > conftest.$ac_ext <<EOF
0e5d83e3 3364#line 3365 "configure"
b0b1c2c0
MK
3365#include "confdefs.h"
3366#include <stdlib.h>
3367extern char _etext;
3368
3369int main() {
3370free (&_etext);
3371; return 0; }
3372EOF
0e5d83e3 3373if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3374 rm -rf conftest*
3375 ac_cv_var__etext=yes
3376else
3377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 ac_cv_var__etext=no
3381fi
3382rm -f conftest*
3383fi
3384
3385echo "$ac_t""$ac_cv_var__etext" 1>&6
3386if test $ac_cv_var__etext = yes; then
3387 cat >> confdefs.h <<\EOF
3388#define HAVE__ETEXT 1
3389EOF
3390
3391fi
d9feb4e7
DJ
3392if test "$enable_profiling" = yes ; then
3393 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3394 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3395 fi
3396 PROFILE_CFLAGS=-pg
3397 OLD_CFLAGS="$CFLAGS"
3398 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3399
d9feb4e7 3400 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
0e5d83e3 3401echo "configure:3402: checking whether $CC supports -pg" >&5
d9feb4e7 3402if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 cat > conftest.$ac_ext <<EOF
0e5d83e3 3406#line 3407 "configure"
d28f9cdf 3407#include "confdefs.h"
d28f9cdf
DJ
3408
3409int main() {
d9feb4e7 3410int x;
d28f9cdf
DJ
3411; return 0; }
3412EOF
0e5d83e3 3413if { (eval echo configure:3414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3414 rm -rf conftest*
d9feb4e7 3415 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3416else
3417 echo "configure: failed program was:" >&5
3418 cat conftest.$ac_ext >&5
3419 rm -rf conftest*
d9feb4e7 3420 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3421fi
3422rm -f conftest*
3423fi
3424
d9feb4e7 3425echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3426
d9feb4e7
DJ
3427 if test $ac_cv_cc_supports_pg = no; then
3428 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3429 fi
d28f9cdf
DJ
3430
3431 CFLAGS="$OLD_CFLAGS"
3432fi
3433
8bb2c122
MK
3434# --------------------- #
3435# Checks for programs. #
3436# --------------------- #
3437
27ca5dad 3438for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3439do
3440# Extract the first word of "$ac_prog", so it can be a program name with args.
3441set dummy $ac_prog; ac_word=$2
3442echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3443echo "configure:3444: checking for $ac_word" >&5
7a292a7a
SS
3444if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3445 echo $ac_n "(cached) $ac_c" 1>&6
3446else
3447 if test -n "$AWK"; then
3448 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3449else
3450 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3451 ac_dummy="$PATH"
3452 for ac_dir in $ac_dummy; do
3453 test -z "$ac_dir" && ac_dir=.
3454 if test -f $ac_dir/$ac_word; then
3455 ac_cv_prog_AWK="$ac_prog"
3456 break
3457 fi
3458 done
3459 IFS="$ac_save_ifs"
3460fi
3461fi
3462AWK="$ac_cv_prog_AWK"
3463if test -n "$AWK"; then
3464 echo "$ac_t""$AWK" 1>&6
3465else
3466 echo "$ac_t""no" 1>&6
3467fi
3468
3469test -n "$AWK" && break
3470done
3471
c906108c
SS
3472# Find a good install program. We prefer a C program (faster),
3473# so one script is as good as another. But avoid the broken or
3474# incompatible versions:
3475# SysV /etc/install, /usr/sbin/install
3476# SunOS /usr/etc/install
3477# IRIX /sbin/install
3478# AIX /bin/install
3479# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3480# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3481# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3482# ./install, which can be erroneously created by make from ./install.sh.
3483echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
0e5d83e3 3484echo "configure:3485: checking for a BSD compatible install" >&5
c906108c
SS
3485if test -z "$INSTALL"; then
3486if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
3488else
3489 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3490 for ac_dir in $PATH; do
3491 # Account for people who put trailing slashes in PATH elements.
3492 case "$ac_dir/" in
3493 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3494 *)
3495 # OSF1 and SCO ODT 3.0 have their own names for install.
3496 # Don't use installbsd from OSF since it installs stuff as root
3497 # by default.
3498 for ac_prog in ginstall scoinst install; do
3499 if test -f $ac_dir/$ac_prog; then
3500 if test $ac_prog = install &&
3501 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3502 # AIX install. It has an incompatible calling convention.
3503 :
3504 else
3505 ac_cv_path_install="$ac_dir/$ac_prog -c"
3506 break 2
3507 fi
3508 fi
3509 done
3510 ;;
3511 esac
3512 done
3513 IFS="$ac_save_IFS"
3514
3515fi
3516 if test "${ac_cv_path_install+set}" = set; then
3517 INSTALL="$ac_cv_path_install"
3518 else
3519 # As a last resort, use the slow shell script. We don't cache a
3520 # path for INSTALL within a source directory, because that will
3521 # break other packages using the cache if that directory is
3522 # removed, or if the path is relative.
3523 INSTALL="$ac_install_sh"
3524 fi
3525fi
3526echo "$ac_t""$INSTALL" 1>&6
3527
3528# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3529# It thinks the first close brace ends the variable substitution.
3530test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3531
3532test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3533
3534test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3535
8bb2c122 3536echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
0e5d83e3 3537echo "configure:3538: checking whether ln -s works" >&5
8bb2c122
MK
3538if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3539 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3540else
8bb2c122
MK
3541 rm -f conftestdata
3542if ln -s X conftestdata 2>/dev/null
3543then
3544 rm -f conftestdata
3545 ac_cv_prog_LN_S="ln -s"
3546else
3547 ac_cv_prog_LN_S=ln
3548fi
3549fi
3550LN_S="$ac_cv_prog_LN_S"
3551if test "$ac_cv_prog_LN_S" = "ln -s"; then
3552 echo "$ac_t""yes" 1>&6
3553else
3554 echo "$ac_t""no" 1>&6
c906108c
SS
3555fi
3556
8bb2c122
MK
3557# Extract the first word of "ranlib", so it can be a program name with args.
3558set dummy ranlib; ac_word=$2
c906108c 3559echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3560echo "configure:3561: checking for $ac_word" >&5
8bb2c122 3561if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3562 echo $ac_n "(cached) $ac_c" 1>&6
3563else
8bb2c122
MK
3564 if test -n "$RANLIB"; then
3565 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3566else
3567 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3568 ac_dummy="$PATH"
3569 for ac_dir in $ac_dummy; do
3570 test -z "$ac_dir" && ac_dir=.
3571 if test -f $ac_dir/$ac_word; then
8bb2c122 3572 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3573 break
3574 fi
3575 done
3576 IFS="$ac_save_ifs"
8bb2c122 3577 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3578fi
3579fi
8bb2c122
MK
3580RANLIB="$ac_cv_prog_RANLIB"
3581if test -n "$RANLIB"; then
3582 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3583else
3584 echo "$ac_t""no" 1>&6
3585fi
3586
8bb2c122
MK
3587for ac_prog in 'bison -y' byacc
3588do
3589# Extract the first word of "$ac_prog", so it can be a program name with args.
3590set dummy $ac_prog; ac_word=$2
c906108c 3591echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3592echo "configure:3593: checking for $ac_word" >&5
8bb2c122 3593if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3594 echo $ac_n "(cached) $ac_c" 1>&6
3595else
8bb2c122
MK
3596 if test -n "$YACC"; then
3597 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3598else
3599 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3600 ac_dummy="$PATH"
3601 for ac_dir in $ac_dummy; do
3602 test -z "$ac_dir" && ac_dir=.
3603 if test -f $ac_dir/$ac_word; then
8bb2c122 3604 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3605 break
3606 fi
3607 done
3608 IFS="$ac_save_ifs"
3609fi
3610fi
8bb2c122
MK
3611YACC="$ac_cv_prog_YACC"
3612if test -n "$YACC"; then
3613 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3614else
3615 echo "$ac_t""no" 1>&6
3616fi
3617
8bb2c122
MK
3618test -n "$YACC" && break
3619done
3620test -n "$YACC" || YACC="yacc"
c906108c 3621
8bb2c122
MK
3622
3623# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3624set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3625echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3626echo "configure:3627: checking for $ac_word" >&5
8bb2c122 3627if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3628 echo $ac_n "(cached) $ac_c" 1>&6
3629else
8bb2c122
MK
3630 if test -n "$AR"; then
3631 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3632else
3633 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3634 ac_dummy="$PATH"
3635 for ac_dir in $ac_dummy; do
3636 test -z "$ac_dir" && ac_dir=.
3637 if test -f $ac_dir/$ac_word; then
8bb2c122 3638 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3639 break
3640 fi
3641 done
3642 IFS="$ac_save_ifs"
8bb2c122 3643 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3644fi
3645fi
8bb2c122
MK
3646AR="$ac_cv_prog_AR"
3647if test -n "$AR"; then
3648 echo "$ac_t""$AR" 1>&6
c906108c
SS
3649else
3650 echo "$ac_t""no" 1>&6
3651fi
3652
8bb2c122 3653
c906108c 3654
95ca63c4
CF
3655# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3656set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3657echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3658echo "configure:3659: checking for $ac_word" >&5
95ca63c4
CF
3659if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3660 echo $ac_n "(cached) $ac_c" 1>&6
3661else
3662 if test -n "$DLLTOOL"; then
3663 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3664else
3665 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668 test -z "$ac_dir" && ac_dir=.
3669 if test -f $ac_dir/$ac_word; then
3670 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3671 break
3672 fi
3673 done
3674 IFS="$ac_save_ifs"
3675 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3676fi
3677fi
3678DLLTOOL="$ac_cv_prog_DLLTOOL"
3679if test -n "$DLLTOOL"; then
3680 echo "$ac_t""$DLLTOOL" 1>&6
3681else
3682 echo "$ac_t""no" 1>&6
3683fi
3684
3685
3686
3687# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3688set dummy ${ac_tool_prefix}windres; ac_word=$2
3689echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3690echo "configure:3691: checking for $ac_word" >&5
95ca63c4
CF
3691if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3692 echo $ac_n "(cached) $ac_c" 1>&6
3693else
3694 if test -n "$WINDRES"; then
3695 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3696else
3697 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3698 ac_dummy="$PATH"
3699 for ac_dir in $ac_dummy; do
3700 test -z "$ac_dir" && ac_dir=.
3701 if test -f $ac_dir/$ac_word; then
3702 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3703 break
3704 fi
3705 done
3706 IFS="$ac_save_ifs"
3707 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3708fi
3709fi
3710WINDRES="$ac_cv_prog_WINDRES"
3711if test -n "$WINDRES"; then
3712 echo "$ac_t""$WINDRES" 1>&6
3713else
3714 echo "$ac_t""no" 1>&6
3715fi
3716
3717
3718
c906108c 3719
8bb2c122 3720# Needed for GNU/Hurd.
75c6e08a
MK
3721# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3722set dummy ${ac_tool_prefix}mig; ac_word=$2
3723echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
0e5d83e3 3724echo "configure:3725: checking for $ac_word" >&5
75c6e08a
MK
3725if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3726 echo $ac_n "(cached) $ac_c" 1>&6
3727else
3728 if test -n "$MIG"; then
3729 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3730else
3731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3732 ac_dummy="$PATH"
3733 for ac_dir in $ac_dummy; do
3734 test -z "$ac_dir" && ac_dir=.
3735 if test -f $ac_dir/$ac_word; then
3736 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3737 break
3738 fi
3739 done
3740 IFS="$ac_save_ifs"
3741 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3742fi
3743fi
3744MIG="$ac_cv_prog_MIG"
3745if test -n "$MIG"; then
3746 echo "$ac_t""$MIG" 1>&6
3747else
3748 echo "$ac_t""no" 1>&6
3749fi
3750
3751
3752
3753
9a156167
MK
3754# ---------------------- #
3755# Checks for libraries. #
3756# ---------------------- #
3757
3758# We might need to link with -lm; most simulators need it.
3759echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
0e5d83e3 3760echo "configure:3761: checking for main in -lm" >&5
9a156167
MK
3761ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3762if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3763 echo $ac_n "(cached) $ac_c" 1>&6
3764else
3765 ac_save_LIBS="$LIBS"
3766LIBS="-lm $LIBS"
3767cat > conftest.$ac_ext <<EOF
0e5d83e3 3768#line 3769 "configure"
9a156167
MK
3769#include "confdefs.h"
3770
3771int main() {
3772main()
3773; return 0; }
3774EOF
0e5d83e3 3775if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3776 rm -rf conftest*
3777 eval "ac_cv_lib_$ac_lib_var=yes"
3778else
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781 rm -rf conftest*
3782 eval "ac_cv_lib_$ac_lib_var=no"
3783fi
3784rm -f conftest*
3785LIBS="$ac_save_LIBS"
3786
3787fi
3788if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3789 echo "$ac_t""yes" 1>&6
3790 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3791 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3792 cat >> confdefs.h <<EOF
3793#define $ac_tr_lib 1
3794EOF
3795
3796 LIBS="-lm $LIBS"
3797
3798else
3799 echo "$ac_t""no" 1>&6
3800fi
3801
3802
3803# We need to link with -lw to get `wctype' on Solaris before Solaris
3804# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3805# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3806# is known to have this problem). Therefore we avoid libw if we can.
3807echo $ac_n "checking for wctype""... $ac_c" 1>&6
0e5d83e3 3808echo "configure:3809: checking for wctype" >&5
9a156167
MK
3809if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3810 echo $ac_n "(cached) $ac_c" 1>&6
3811else
3812 cat > conftest.$ac_ext <<EOF
0e5d83e3 3813#line 3814 "configure"
9a156167
MK
3814#include "confdefs.h"
3815/* System header to define __stub macros and hopefully few prototypes,
3816 which can conflict with char wctype(); below. */
3817#include <assert.h>
3818/* Override any gcc2 internal prototype to avoid an error. */
3819/* We use char because int might match the return type of a gcc2
3820 builtin and then its argument prototype would still apply. */
3821char wctype();
3822
3823int main() {
3824
3825/* The GNU C library defines this for functions which it implements
3826 to always fail with ENOSYS. Some functions are actually named
3827 something starting with __ and the normal name is an alias. */
3828#if defined (__stub_wctype) || defined (__stub___wctype)
3829choke me
3830#else
3831wctype();
3832#endif
3833
3834; return 0; }
3835EOF
0e5d83e3 3836if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3837 rm -rf conftest*
3838 eval "ac_cv_func_wctype=yes"
3839else
3840 echo "configure: failed program was:" >&5
3841 cat conftest.$ac_ext >&5
3842 rm -rf conftest*
3843 eval "ac_cv_func_wctype=no"
3844fi
3845rm -f conftest*
3846fi
3847
3848if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3849 echo "$ac_t""yes" 1>&6
3850 :
3851else
3852 echo "$ac_t""no" 1>&6
3853echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
0e5d83e3 3854echo "configure:3855: checking for wctype in -lw" >&5
9a156167
MK
3855ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3856if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3857 echo $ac_n "(cached) $ac_c" 1>&6
3858else
3859 ac_save_LIBS="$LIBS"
3860LIBS="-lw $LIBS"
3861cat > conftest.$ac_ext <<EOF
0e5d83e3 3862#line 3863 "configure"
9a156167
MK
3863#include "confdefs.h"
3864/* Override any gcc2 internal prototype to avoid an error. */
3865/* We use char because int might match the return type of a gcc2
3866 builtin and then its argument prototype would still apply. */
3867char wctype();
3868
3869int main() {
3870wctype()
3871; return 0; }
3872EOF
0e5d83e3 3873if { (eval echo configure:3874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3874 rm -rf conftest*
3875 eval "ac_cv_lib_$ac_lib_var=yes"
3876else
3877 echo "configure: failed program was:" >&5
3878 cat conftest.$ac_ext >&5
3879 rm -rf conftest*
3880 eval "ac_cv_lib_$ac_lib_var=no"
3881fi
3882rm -f conftest*
3883LIBS="$ac_save_LIBS"
3884
3885fi
3886if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3887 echo "$ac_t""yes" 1>&6
3888 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3889 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3890 cat >> confdefs.h <<EOF
3891#define $ac_tr_lib 1
3892EOF
3893
3894 LIBS="-lw $LIBS"
3895
3896else
3897 echo "$ac_t""no" 1>&6
3898fi
3899
3900fi
3901
3902
c890192f
MK
3903# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3904
3905echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
0e5d83e3 3906echo "configure:3907: checking for library containing gethostbyname" >&5
c890192f
MK
3907if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
3909else
3910 ac_func_search_save_LIBS="$LIBS"
3911ac_cv_search_gethostbyname="no"
3912cat > conftest.$ac_ext <<EOF
0e5d83e3 3913#line 3914 "configure"
c890192f
MK
3914#include "confdefs.h"
3915/* Override any gcc2 internal prototype to avoid an error. */
3916/* We use char because int might match the return type of a gcc2
3917 builtin and then its argument prototype would still apply. */
3918char gethostbyname();
3919
3920int main() {
3921gethostbyname()
3922; return 0; }
3923EOF
0e5d83e3 3924if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3925 rm -rf conftest*
3926 ac_cv_search_gethostbyname="none required"
3927else
3928 echo "configure: failed program was:" >&5
3929 cat conftest.$ac_ext >&5
3930fi
3931rm -f conftest*
3932test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3933LIBS="-l$i $ac_func_search_save_LIBS"
3934cat > conftest.$ac_ext <<EOF
0e5d83e3 3935#line 3936 "configure"
c890192f
MK
3936#include "confdefs.h"
3937/* Override any gcc2 internal prototype to avoid an error. */
3938/* We use char because int might match the return type of a gcc2
3939 builtin and then its argument prototype would still apply. */
3940char gethostbyname();
3941
3942int main() {
3943gethostbyname()
3944; return 0; }
3945EOF
0e5d83e3 3946if { (eval echo configure:3947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3947 rm -rf conftest*
3948 ac_cv_search_gethostbyname="-l$i"
3949break
3950else
3951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953fi
3954rm -f conftest*
3955done
3956LIBS="$ac_func_search_save_LIBS"
3957fi
3958
3959echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3960if test "$ac_cv_search_gethostbyname" != "no"; then
3961 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3962
3963else :
3964
3965fi
3966
9a156167
MK
3967# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3968
3969echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
0e5d83e3 3970echo "configure:3971: checking for library containing socketpair" >&5
9a156167
MK
3971if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3972 echo $ac_n "(cached) $ac_c" 1>&6
3973else
3974 ac_func_search_save_LIBS="$LIBS"
3975ac_cv_search_socketpair="no"
3976cat > conftest.$ac_ext <<EOF
0e5d83e3 3977#line 3978 "configure"
9a156167
MK
3978#include "confdefs.h"
3979/* Override any gcc2 internal prototype to avoid an error. */
3980/* We use char because int might match the return type of a gcc2
3981 builtin and then its argument prototype would still apply. */
3982char socketpair();
3983
3984int main() {
3985socketpair()
3986; return 0; }
3987EOF
0e5d83e3 3988if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3989 rm -rf conftest*
3990 ac_cv_search_socketpair="none required"
3991else
3992 echo "configure: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3994fi
3995rm -f conftest*
3996test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3997LIBS="-l$i $ac_func_search_save_LIBS"
3998cat > conftest.$ac_ext <<EOF
0e5d83e3 3999#line 4000 "configure"
9a156167
MK
4000#include "confdefs.h"
4001/* Override any gcc2 internal prototype to avoid an error. */
4002/* We use char because int might match the return type of a gcc2
4003 builtin and then its argument prototype would still apply. */
4004char socketpair();
4005
4006int main() {
4007socketpair()
4008; return 0; }
4009EOF
0e5d83e3 4010if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4011 rm -rf conftest*
4012 ac_cv_search_socketpair="-l$i"
4013break
4014else
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017fi
4018rm -f conftest*
4019done
4020LIBS="$ac_func_search_save_LIBS"
4021fi
4022
4023echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4024if test "$ac_cv_search_socketpair" != "no"; then
4025 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4026
4027else :
4028
4029fi
4030
06825bd1
MK
4031# Since GDB uses Readline, we need termcap functionality, so we need
4032# to find a library that provides that. When GDB is configured with
4033# --enable-tui, we need full curses functionality.
4034#
4035# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4036# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4037# Makefile fragments. That's why we need to have `Hcurses' before
4038# `curses'. I don't see why we should use HP curses if a more
4039# standard curses is available, except that according to HP's
4040# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4041# HP-UX 10.10 and 10.20.
4042
4043if test "$need_curses" = yes; then
4044
4045echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
0e5d83e3 4046echo "configure:4047: checking for library containing initscr" >&5
06825bd1
MK
4047if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4048 echo $ac_n "(cached) $ac_c" 1>&6
4049else
4050 ac_func_search_save_LIBS="$LIBS"
4051ac_cv_search_initscr="no"
4052cat > conftest.$ac_ext <<EOF
0e5d83e3 4053#line 4054 "configure"
06825bd1
MK
4054#include "confdefs.h"
4055/* Override any gcc2 internal prototype to avoid an error. */
4056/* We use char because int might match the return type of a gcc2
4057 builtin and then its argument prototype would still apply. */
4058char initscr();
4059
4060int main() {
4061initscr()
4062; return 0; }
4063EOF
0e5d83e3 4064if { (eval echo configure:4065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4065 rm -rf conftest*
4066 ac_cv_search_initscr="none required"
4067else
4068 echo "configure: failed program was:" >&5
4069 cat conftest.$ac_ext >&5
4070fi
4071rm -f conftest*
4072test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
4073LIBS="-l$i $ac_func_search_save_LIBS"
4074cat > conftest.$ac_ext <<EOF
0e5d83e3 4075#line 4076 "configure"
06825bd1
MK
4076#include "confdefs.h"
4077/* Override any gcc2 internal prototype to avoid an error. */
4078/* We use char because int might match the return type of a gcc2
4079 builtin and then its argument prototype would still apply. */
4080char initscr();
4081
4082int main() {
4083initscr()
4084; return 0; }
4085EOF
0e5d83e3 4086if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4087 rm -rf conftest*
4088 ac_cv_search_initscr="-l$i"
4089break
4090else
4091 echo "configure: failed program was:" >&5
4092 cat conftest.$ac_ext >&5
4093fi
4094rm -f conftest*
4095done
4096LIBS="$ac_func_search_save_LIBS"
4097fi
4098
4099echo "$ac_t""$ac_cv_search_initscr" 1>&6
4100if test "$ac_cv_search_initscr" != "no"; then
4101 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4102
4103else :
4104 { echo "configure: error: no curses library found" 1>&2; exit 1; }
4105fi
4106fi
4107
4108case $host_os in
4109 cygwin*)
4110 if test -d $srcdir/libtermcap; then
4111 LIBS="../libtermcap/libtermcap.a $LIBS"
4112 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4113 fi ;;
40a7debc 4114 go32* | *djgpp*)
06825bd1
MK
4115 ac_cv_search_tgetent="none required"
4116 ;;
4117 aix*)
4118 # Readline prefers curses over termcap on AIX.
4119 # ??? Why?
4120
4121echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
40a7debc 4122echo "configure:4123: checking for library containing tgetent" >&5
06825bd1
MK
4123if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125else
4126 ac_func_search_save_LIBS="$LIBS"
4127ac_cv_search_tgetent="no"
4128cat > conftest.$ac_ext <<EOF
40a7debc 4129#line 4130 "configure"
06825bd1
MK
4130#include "confdefs.h"
4131/* Override any gcc2 internal prototype to avoid an error. */
4132/* We use char because int might match the return type of a gcc2
4133 builtin and then its argument prototype would still apply. */
4134char tgetent();
4135
4136int main() {
4137tgetent()
4138; return 0; }
4139EOF
40a7debc 4140if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4141 rm -rf conftest*
4142 ac_cv_search_tgetent="none required"
4143else
4144 echo "configure: failed program was:" >&5
4145 cat conftest.$ac_ext >&5
4146fi
4147rm -f conftest*
4148test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4149LIBS="-l$i $ac_func_search_save_LIBS"
4150cat > conftest.$ac_ext <<EOF
40a7debc 4151#line 4152 "configure"
06825bd1
MK
4152#include "confdefs.h"
4153/* Override any gcc2 internal prototype to avoid an error. */
4154/* We use char because int might match the return type of a gcc2
4155 builtin and then its argument prototype would still apply. */
4156char tgetent();
4157
4158int main() {
4159tgetent()
4160; return 0; }
4161EOF
40a7debc 4162if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4163 rm -rf conftest*
4164 ac_cv_search_tgetent="-l$i"
4165break
4166else
4167 echo "configure: failed program was:" >&5
4168 cat conftest.$ac_ext >&5
4169fi
4170rm -f conftest*
4171done
4172LIBS="$ac_func_search_save_LIBS"
4173fi
4174
4175echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4176if test "$ac_cv_search_tgetent" != "no"; then
4177 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4178
4179else :
4180
4181fi
4182 ;;
4183esac
4184
4185# Note: We used to check for libtermlib and libterminfo too, but
4186# Readline doesn't, so I think we're safe with leaving them out.
4187
4188echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
40a7debc 4189echo "configure:4190: checking for library containing tgetent" >&5
06825bd1
MK
4190if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4191 echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193 ac_func_search_save_LIBS="$LIBS"
4194ac_cv_search_tgetent="no"
4195cat > conftest.$ac_ext <<EOF
40a7debc 4196#line 4197 "configure"
06825bd1
MK
4197#include "confdefs.h"
4198/* Override any gcc2 internal prototype to avoid an error. */
4199/* We use char because int might match the return type of a gcc2
4200 builtin and then its argument prototype would still apply. */
4201char tgetent();
4202
4203int main() {
4204tgetent()
4205; return 0; }
4206EOF
40a7debc 4207if { (eval echo configure:4208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4208 rm -rf conftest*
4209 ac_cv_search_tgetent="none required"
4210else
4211 echo "configure: failed program was:" >&5
4212 cat conftest.$ac_ext >&5
4213fi
4214rm -f conftest*
4215test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4216LIBS="-l$i $ac_func_search_save_LIBS"
4217cat > conftest.$ac_ext <<EOF
40a7debc 4218#line 4219 "configure"
06825bd1
MK
4219#include "confdefs.h"
4220/* Override any gcc2 internal prototype to avoid an error. */
4221/* We use char because int might match the return type of a gcc2
4222 builtin and then its argument prototype would still apply. */
4223char tgetent();
4224
4225int main() {
4226tgetent()
4227; return 0; }
4228EOF
40a7debc 4229if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4230 rm -rf conftest*
4231 ac_cv_search_tgetent="-l$i"
4232break
4233else
4234 echo "configure: failed program was:" >&5
4235 cat conftest.$ac_ext >&5
4236fi
4237rm -f conftest*
4238done
4239LIBS="$ac_func_search_save_LIBS"
4240fi
4241
4242echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4243if test "$ac_cv_search_tgetent" != "no"; then
4244 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4245
4246else :
4247
4248fi
4249
4250if test "$ac_cv_search_tgetent" = no; then
4251 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4252fi
4253
5ee754fc
MK
4254# ------------------------- #
4255# Checks for header files. #
4256# ------------------------- #
4257
4258ac_header_dirent=no
4259for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4260do
4261ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4262echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
40a7debc 4263echo "configure:4264: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4264if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4265 echo $ac_n "(cached) $ac_c" 1>&6
4266else
4267 cat > conftest.$ac_ext <<EOF
40a7debc 4268#line 4269 "configure"
c906108c
SS
4269#include "confdefs.h"
4270#include <sys/types.h>
5ee754fc
MK
4271#include <$ac_hdr>
4272int main() {
4273DIR *dirp = 0;
4274; return 0; }
4275EOF
40a7debc 4276if { (eval echo configure:4277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4277 rm -rf conftest*
4278 eval "ac_cv_header_dirent_$ac_safe=yes"
4279else
4280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4282 rm -rf conftest*
4283 eval "ac_cv_header_dirent_$ac_safe=no"
4284fi
4285rm -f conftest*
4286fi
4287if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4288 echo "$ac_t""yes" 1>&6
4289 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4290 cat >> confdefs.h <<EOF
4291#define $ac_tr_hdr 1
4292EOF
4293 ac_header_dirent=$ac_hdr; break
4294else
4295 echo "$ac_t""no" 1>&6
4296fi
4297done
4298# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4299if test $ac_header_dirent = dirent.h; then
4300echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
40a7debc 4301echo "configure:4302: checking for opendir in -ldir" >&5
5ee754fc
MK
4302ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4303if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4304 echo $ac_n "(cached) $ac_c" 1>&6
4305else
4306 ac_save_LIBS="$LIBS"
4307LIBS="-ldir $LIBS"
4308cat > conftest.$ac_ext <<EOF
40a7debc 4309#line 4310 "configure"
5ee754fc
MK
4310#include "confdefs.h"
4311/* Override any gcc2 internal prototype to avoid an error. */
4312/* We use char because int might match the return type of a gcc2
4313 builtin and then its argument prototype would still apply. */
4314char opendir();
c906108c
SS
4315
4316int main() {
5ee754fc 4317opendir()
c906108c
SS
4318; return 0; }
4319EOF
40a7debc 4320if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4321 rm -rf conftest*
5ee754fc 4322 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4323else
4324 echo "configure: failed program was:" >&5
4325 cat conftest.$ac_ext >&5
4326 rm -rf conftest*
5ee754fc 4327 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4328fi
4329rm -f conftest*
5ee754fc
MK
4330LIBS="$ac_save_LIBS"
4331
4332fi
4333if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4334 echo "$ac_t""yes" 1>&6
4335 LIBS="$LIBS -ldir"
4336else
4337 echo "$ac_t""no" 1>&6
c906108c
SS
4338fi
4339
5ee754fc
MK
4340else
4341echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
40a7debc 4342echo "configure:4343: checking for opendir in -lx" >&5
5ee754fc
MK
4343ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4344if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4345 echo $ac_n "(cached) $ac_c" 1>&6
4346else
4347 ac_save_LIBS="$LIBS"
4348LIBS="-lx $LIBS"
4349cat > conftest.$ac_ext <<EOF
40a7debc 4350#line 4351 "configure"
5ee754fc
MK
4351#include "confdefs.h"
4352/* Override any gcc2 internal prototype to avoid an error. */
4353/* We use char because int might match the return type of a gcc2
4354 builtin and then its argument prototype would still apply. */
4355char opendir();
4356
4357int main() {
4358opendir()
4359; return 0; }
c906108c 4360EOF
40a7debc 4361if { (eval echo configure:4362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4362 rm -rf conftest*
4363 eval "ac_cv_lib_$ac_lib_var=yes"
4364else
4365 echo "configure: failed program was:" >&5
4366 cat conftest.$ac_ext >&5
4367 rm -rf conftest*
4368 eval "ac_cv_lib_$ac_lib_var=no"
4369fi
4370rm -f conftest*
4371LIBS="$ac_save_LIBS"
c906108c 4372
5ee754fc
MK
4373fi
4374if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4375 echo "$ac_t""yes" 1>&6
4376 LIBS="$LIBS -lx"
4377else
4378 echo "$ac_t""no" 1>&6
4379fi
c906108c 4380
5ee754fc 4381fi
c906108c 4382
5ee754fc 4383echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
40a7debc 4384echo "configure:4385: checking whether stat file-mode macros are broken" >&5
5ee754fc 4385if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4386 echo $ac_n "(cached) $ac_c" 1>&6
4387else
4388 cat > conftest.$ac_ext <<EOF
40a7debc 4389#line 4390 "configure"
9608ab8b
MK
4390#include "confdefs.h"
4391#include <sys/types.h>
5ee754fc
MK
4392#include <sys/stat.h>
4393
4394#if defined(S_ISBLK) && defined(S_IFDIR)
4395# if S_ISBLK (S_IFDIR)
4396You lose.
4397# endif
4398#endif
4399
4400#if defined(S_ISBLK) && defined(S_IFCHR)
4401# if S_ISBLK (S_IFCHR)
4402You lose.
4403# endif
4404#endif
4405
4406#if defined(S_ISLNK) && defined(S_IFREG)
4407# if S_ISLNK (S_IFREG)
4408You lose.
4409# endif
4410#endif
4411
4412#if defined(S_ISSOCK) && defined(S_IFREG)
4413# if S_ISSOCK (S_IFREG)
4414You lose.
4415# endif
4416#endif
4417
9608ab8b 4418EOF
5ee754fc
MK
4419if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4420 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4421 rm -rf conftest*
5ee754fc
MK
4422 ac_cv_header_stat_broken=yes
4423else
4424 rm -rf conftest*
4425 ac_cv_header_stat_broken=no
4426fi
4427rm -f conftest*
4428
4429fi
4430
4431echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4432if test $ac_cv_header_stat_broken = yes; then
4433 cat >> confdefs.h <<\EOF
4434#define STAT_MACROS_BROKEN 1
4435EOF
4436
4437fi
4438
4439echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
40a7debc 4440echo "configure:4441: checking for ANSI C header files" >&5
5ee754fc
MK
4441if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4442 echo $ac_n "(cached) $ac_c" 1>&6
4443else
4444 cat > conftest.$ac_ext <<EOF
40a7debc 4445#line 4446 "configure"
5ee754fc
MK
4446#include "confdefs.h"
4447#include <stdlib.h>
4448#include <stdarg.h>
4449#include <string.h>
4450#include <float.h>
4451EOF
4452ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4453{ (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4454ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4455if test -z "$ac_err"; then
4456 rm -rf conftest*
4457 ac_cv_header_stdc=yes
4458else
4459 echo "$ac_err" >&5
4460 echo "configure: failed program was:" >&5
4461 cat conftest.$ac_ext >&5
4462 rm -rf conftest*
4463 ac_cv_header_stdc=no
4464fi
4465rm -f conftest*
4466
4467if test $ac_cv_header_stdc = yes; then
4468 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4469cat > conftest.$ac_ext <<EOF
40a7debc 4470#line 4471 "configure"
5ee754fc
MK
4471#include "confdefs.h"
4472#include <string.h>
4473EOF
4474if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4475 egrep "memchr" >/dev/null 2>&1; then
4476 :
4477else
4478 rm -rf conftest*
4479 ac_cv_header_stdc=no
4480fi
4481rm -f conftest*
4482
4483fi
4484
4485if test $ac_cv_header_stdc = yes; then
4486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4487cat > conftest.$ac_ext <<EOF
40a7debc 4488#line 4489 "configure"
5ee754fc
MK
4489#include "confdefs.h"
4490#include <stdlib.h>
4491EOF
4492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4493 egrep "free" >/dev/null 2>&1; then
4494 :
4495else
4496 rm -rf conftest*
4497 ac_cv_header_stdc=no
4498fi
4499rm -f conftest*
4500
4501fi
4502
4503if test $ac_cv_header_stdc = yes; then
4504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4505if test "$cross_compiling" = yes; then
4506 :
4507else
4508 cat > conftest.$ac_ext <<EOF
40a7debc 4509#line 4510 "configure"
5ee754fc
MK
4510#include "confdefs.h"
4511#include <ctype.h>
4512#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4513#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4514#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4515int main () { int i; for (i = 0; i < 256; i++)
4516if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4517exit (0); }
4518
4519EOF
40a7debc 4520if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4521then
4522 :
9608ab8b 4523else
5ee754fc
MK
4524 echo "configure: failed program was:" >&5
4525 cat conftest.$ac_ext >&5
4526 rm -fr conftest*
4527 ac_cv_header_stdc=no
4528fi
4529rm -fr conftest*
4530fi
4531
4532fi
4533fi
4534
4535echo "$ac_t""$ac_cv_header_stdc" 1>&6
4536if test $ac_cv_header_stdc = yes; then
4537 cat >> confdefs.h <<\EOF
4538#define STDC_HEADERS 1
4539EOF
4540
4541fi
4542
4543for ac_hdr in link.h
4544do
4545ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4546echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4547echo "configure:4548: checking for $ac_hdr" >&5
5ee754fc
MK
4548if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4549 echo $ac_n "(cached) $ac_c" 1>&6
4550else
4551 cat > conftest.$ac_ext <<EOF
40a7debc 4552#line 4553 "configure"
5ee754fc
MK
4553#include "confdefs.h"
4554#include <$ac_hdr>
4555EOF
4556ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4557{ (eval echo configure:4558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4558ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4559if test -z "$ac_err"; then
4560 rm -rf conftest*
4561 eval "ac_cv_header_$ac_safe=yes"
4562else
4563 echo "$ac_err" >&5
4564 echo "configure: failed program was:" >&5
4565 cat conftest.$ac_ext >&5
4566 rm -rf conftest*
4567 eval "ac_cv_header_$ac_safe=no"
4568fi
4569rm -f conftest*
4570fi
4571if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4572 echo "$ac_t""yes" 1>&6
4573 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4574 cat >> confdefs.h <<EOF
4575#define $ac_tr_hdr 1
4576EOF
4577
4578else
4579 echo "$ac_t""no" 1>&6
4580fi
4581done
4582
4583for ac_hdr in nlist.h
4584do
4585ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4586echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4587echo "configure:4588: checking for $ac_hdr" >&5
5ee754fc
MK
4588if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4590else
4591 cat > conftest.$ac_ext <<EOF
40a7debc 4592#line 4593 "configure"
5ee754fc
MK
4593#include "confdefs.h"
4594#include <$ac_hdr>
4595EOF
4596ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4597{ (eval echo configure:4598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4598ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4599if test -z "$ac_err"; then
4600 rm -rf conftest*
4601 eval "ac_cv_header_$ac_safe=yes"
4602else
4603 echo "$ac_err" >&5
4604 echo "configure: failed program was:" >&5
4605 cat conftest.$ac_ext >&5
4606 rm -rf conftest*
4607 eval "ac_cv_header_$ac_safe=no"
4608fi
4609rm -f conftest*
4610fi
4611if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4612 echo "$ac_t""yes" 1>&6
4613 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4614 cat >> confdefs.h <<EOF
4615#define $ac_tr_hdr 1
4616EOF
4617
4618else
4619 echo "$ac_t""no" 1>&6
4620fi
4621done
4622
4623for ac_hdr in poll.h sys/poll.h
4624do
4625ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4626echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4627echo "configure:4628: checking for $ac_hdr" >&5
5ee754fc
MK
4628if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4629 echo $ac_n "(cached) $ac_c" 1>&6
4630else
4631 cat > conftest.$ac_ext <<EOF
40a7debc 4632#line 4633 "configure"
5ee754fc
MK
4633#include "confdefs.h"
4634#include <$ac_hdr>
4635EOF
4636ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4637{ (eval echo configure:4638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4638ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4639if test -z "$ac_err"; then
4640 rm -rf conftest*
4641 eval "ac_cv_header_$ac_safe=yes"
4642else
4643 echo "$ac_err" >&5
4644 echo "configure: failed program was:" >&5
4645 cat conftest.$ac_ext >&5
4646 rm -rf conftest*
4647 eval "ac_cv_header_$ac_safe=no"
4648fi
4649rm -f conftest*
4650fi
4651if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4652 echo "$ac_t""yes" 1>&6
4653 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4654 cat >> confdefs.h <<EOF
4655#define $ac_tr_hdr 1
4656EOF
4657
4658else
4659 echo "$ac_t""no" 1>&6
4660fi
4661done
4662
4663for ac_hdr in proc_service.h thread_db.h
4664do
4665ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4666echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4667echo "configure:4668: checking for $ac_hdr" >&5
5ee754fc
MK
4668if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4669 echo $ac_n "(cached) $ac_c" 1>&6
4670else
4671 cat > conftest.$ac_ext <<EOF
40a7debc 4672#line 4673 "configure"
5ee754fc
MK
4673#include "confdefs.h"
4674#include <$ac_hdr>
4675EOF
4676ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4677{ (eval echo configure:4678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4678ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4679if test -z "$ac_err"; then
4680 rm -rf conftest*
4681 eval "ac_cv_header_$ac_safe=yes"
4682else
4683 echo "$ac_err" >&5
4684 echo "configure: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4686 rm -rf conftest*
4687 eval "ac_cv_header_$ac_safe=no"
4688fi
4689rm -f conftest*
4690fi
4691if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4692 echo "$ac_t""yes" 1>&6
4693 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4694 cat >> confdefs.h <<EOF
4695#define $ac_tr_hdr 1
4696EOF
4697
4698else
4699 echo "$ac_t""no" 1>&6
4700fi
4701done
4702
4703for ac_hdr in stddef.h
4704do
4705ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4706echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4707echo "configure:4708: checking for $ac_hdr" >&5
5ee754fc
MK
4708if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4709 echo $ac_n "(cached) $ac_c" 1>&6
4710else
4711 cat > conftest.$ac_ext <<EOF
40a7debc 4712#line 4713 "configure"
5ee754fc
MK
4713#include "confdefs.h"
4714#include <$ac_hdr>
4715EOF
4716ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4717{ (eval echo configure:4718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4718ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4719if test -z "$ac_err"; then
4720 rm -rf conftest*
4721 eval "ac_cv_header_$ac_safe=yes"
4722else
4723 echo "$ac_err" >&5
4724 echo "configure: failed program was:" >&5
4725 cat conftest.$ac_ext >&5
4726 rm -rf conftest*
4727 eval "ac_cv_header_$ac_safe=no"
4728fi
4729rm -f conftest*
4730fi
4731if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4732 echo "$ac_t""yes" 1>&6
4733 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4734 cat >> confdefs.h <<EOF
4735#define $ac_tr_hdr 1
4736EOF
4737
4738else
4739 echo "$ac_t""no" 1>&6
4740fi
4741done
4742
4743for ac_hdr in stdlib.h
4744do
4745ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4746echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4747echo "configure:4748: checking for $ac_hdr" >&5
5ee754fc
MK
4748if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4749 echo $ac_n "(cached) $ac_c" 1>&6
4750else
4751 cat > conftest.$ac_ext <<EOF
40a7debc 4752#line 4753 "configure"
5ee754fc
MK
4753#include "confdefs.h"
4754#include <$ac_hdr>
4755EOF
4756ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4757{ (eval echo configure:4758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4758ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4759if test -z "$ac_err"; then
4760 rm -rf conftest*
4761 eval "ac_cv_header_$ac_safe=yes"
4762else
4763 echo "$ac_err" >&5
4764 echo "configure: failed program was:" >&5
4765 cat conftest.$ac_ext >&5
4766 rm -rf conftest*
4767 eval "ac_cv_header_$ac_safe=no"
4768fi
4769rm -f conftest*
4770fi
4771if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4772 echo "$ac_t""yes" 1>&6
4773 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4774 cat >> confdefs.h <<EOF
4775#define $ac_tr_hdr 1
4776EOF
4777
4778else
4779 echo "$ac_t""no" 1>&6
4780fi
4781done
4782
4783for ac_hdr in stdint.h
4784do
4785ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4786echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4787echo "configure:4788: checking for $ac_hdr" >&5
5ee754fc
MK
4788if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4789 echo $ac_n "(cached) $ac_c" 1>&6
4790else
4791 cat > conftest.$ac_ext <<EOF
40a7debc 4792#line 4793 "configure"
5ee754fc
MK
4793#include "confdefs.h"
4794#include <$ac_hdr>
4795EOF
4796ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4797{ (eval echo configure:4798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4798ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4799if test -z "$ac_err"; then
4800 rm -rf conftest*
4801 eval "ac_cv_header_$ac_safe=yes"
4802else
4803 echo "$ac_err" >&5
4804 echo "configure: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
4806 rm -rf conftest*
4807 eval "ac_cv_header_$ac_safe=no"
4808fi
4809rm -f conftest*
4810fi
4811if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4812 echo "$ac_t""yes" 1>&6
4813 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4814 cat >> confdefs.h <<EOF
4815#define $ac_tr_hdr 1
4816EOF
4817
4818else
4819 echo "$ac_t""no" 1>&6
4820fi
4821done
4822
4823for ac_hdr in string.h memory.h strings.h
4824do
4825ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4826echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4827echo "configure:4828: checking for $ac_hdr" >&5
5ee754fc
MK
4828if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4829 echo $ac_n "(cached) $ac_c" 1>&6
4830else
4831 cat > conftest.$ac_ext <<EOF
40a7debc 4832#line 4833 "configure"
5ee754fc
MK
4833#include "confdefs.h"
4834#include <$ac_hdr>
4835EOF
4836ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4837{ (eval echo configure:4838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4838ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4839if test -z "$ac_err"; then
4840 rm -rf conftest*
4841 eval "ac_cv_header_$ac_safe=yes"
4842else
4843 echo "$ac_err" >&5
4844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
4846 rm -rf conftest*
4847 eval "ac_cv_header_$ac_safe=no"
4848fi
4849rm -f conftest*
4850fi
4851if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4852 echo "$ac_t""yes" 1>&6
4853 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4854 cat >> confdefs.h <<EOF
4855#define $ac_tr_hdr 1
4856EOF
4857
4858else
4859 echo "$ac_t""no" 1>&6
4860fi
4861done
4862
4863for ac_hdr in sys/fault.h
4864do
4865ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4866echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4867echo "configure:4868: checking for $ac_hdr" >&5
5ee754fc
MK
4868if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4869 echo $ac_n "(cached) $ac_c" 1>&6
4870else
4871 cat > conftest.$ac_ext <<EOF
40a7debc 4872#line 4873 "configure"
5ee754fc
MK
4873#include "confdefs.h"
4874#include <$ac_hdr>
4875EOF
4876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4877{ (eval echo configure:4878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4879if test -z "$ac_err"; then
4880 rm -rf conftest*
4881 eval "ac_cv_header_$ac_safe=yes"
4882else
4883 echo "$ac_err" >&5
4884 echo "configure: failed program was:" >&5
4885 cat conftest.$ac_ext >&5
4886 rm -rf conftest*
4887 eval "ac_cv_header_$ac_safe=no"
4888fi
4889rm -f conftest*
4890fi
4891if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4892 echo "$ac_t""yes" 1>&6
4893 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4894 cat >> confdefs.h <<EOF
4895#define $ac_tr_hdr 1
4896EOF
4897
4898else
4899 echo "$ac_t""no" 1>&6
4900fi
4901done
4902
4903for ac_hdr in sys/file.h
4904do
4905ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4906echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4907echo "configure:4908: checking for $ac_hdr" >&5
5ee754fc
MK
4908if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4909 echo $ac_n "(cached) $ac_c" 1>&6
4910else
4911 cat > conftest.$ac_ext <<EOF
40a7debc 4912#line 4913 "configure"
5ee754fc
MK
4913#include "confdefs.h"
4914#include <$ac_hdr>
4915EOF
4916ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4917{ (eval echo configure:4918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4918ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4919if test -z "$ac_err"; then
4920 rm -rf conftest*
4921 eval "ac_cv_header_$ac_safe=yes"
4922else
4923 echo "$ac_err" >&5
4924 echo "configure: failed program was:" >&5
4925 cat conftest.$ac_ext >&5
4926 rm -rf conftest*
4927 eval "ac_cv_header_$ac_safe=no"
4928fi
4929rm -f conftest*
4930fi
4931if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4932 echo "$ac_t""yes" 1>&6
4933 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4934 cat >> confdefs.h <<EOF
4935#define $ac_tr_hdr 1
4936EOF
4937
4938else
4939 echo "$ac_t""no" 1>&6
4940fi
4941done
4942
4943for ac_hdr in sys/filio.h
4944do
4945ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4946echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4947echo "configure:4948: checking for $ac_hdr" >&5
5ee754fc
MK
4948if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4949 echo $ac_n "(cached) $ac_c" 1>&6
4950else
4951 cat > conftest.$ac_ext <<EOF
40a7debc 4952#line 4953 "configure"
5ee754fc
MK
4953#include "confdefs.h"
4954#include <$ac_hdr>
4955EOF
4956ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4957{ (eval echo configure:4958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4958ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4959if test -z "$ac_err"; then
4960 rm -rf conftest*
4961 eval "ac_cv_header_$ac_safe=yes"
4962else
4963 echo "$ac_err" >&5
4964 echo "configure: failed program was:" >&5
4965 cat conftest.$ac_ext >&5
4966 rm -rf conftest*
4967 eval "ac_cv_header_$ac_safe=no"
4968fi
4969rm -f conftest*
4970fi
4971if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4972 echo "$ac_t""yes" 1>&6
4973 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4974 cat >> confdefs.h <<EOF
4975#define $ac_tr_hdr 1
4976EOF
4977
4978else
4979 echo "$ac_t""no" 1>&6
4980fi
4981done
4982
4983for ac_hdr in sys/ioctl.h
4984do
4985ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4986echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 4987echo "configure:4988: checking for $ac_hdr" >&5
5ee754fc
MK
4988if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4989 echo $ac_n "(cached) $ac_c" 1>&6
4990else
4991 cat > conftest.$ac_ext <<EOF
40a7debc 4992#line 4993 "configure"
5ee754fc
MK
4993#include "confdefs.h"
4994#include <$ac_hdr>
4995EOF
4996ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 4997{ (eval echo configure:4998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4998ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4999if test -z "$ac_err"; then
5000 rm -rf conftest*
5001 eval "ac_cv_header_$ac_safe=yes"
5002else
5003 echo "$ac_err" >&5
5004 echo "configure: failed program was:" >&5
5005 cat conftest.$ac_ext >&5
5006 rm -rf conftest*
5007 eval "ac_cv_header_$ac_safe=no"
5008fi
5009rm -f conftest*
5010fi
5011if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5012 echo "$ac_t""yes" 1>&6
5013 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5014 cat >> confdefs.h <<EOF
5015#define $ac_tr_hdr 1
5016EOF
5017
5018else
5019 echo "$ac_t""no" 1>&6
5020fi
5021done
5022
5023for ac_hdr in sys/param.h
5024do
5025ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5026echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5027echo "configure:5028: checking for $ac_hdr" >&5
5ee754fc
MK
5028if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5029 echo $ac_n "(cached) $ac_c" 1>&6
5030else
5031 cat > conftest.$ac_ext <<EOF
40a7debc 5032#line 5033 "configure"
5ee754fc
MK
5033#include "confdefs.h"
5034#include <$ac_hdr>
5035EOF
5036ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5037{ (eval echo configure:5038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5038ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5039if test -z "$ac_err"; then
5040 rm -rf conftest*
5041 eval "ac_cv_header_$ac_safe=yes"
5042else
5043 echo "$ac_err" >&5
5044 echo "configure: failed program was:" >&5
5045 cat conftest.$ac_ext >&5
5046 rm -rf conftest*
5047 eval "ac_cv_header_$ac_safe=no"
5048fi
5049rm -f conftest*
5050fi
5051if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5052 echo "$ac_t""yes" 1>&6
5053 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5054 cat >> confdefs.h <<EOF
5055#define $ac_tr_hdr 1
5056EOF
5057
5058else
5059 echo "$ac_t""no" 1>&6
5060fi
5061done
5062
5063for ac_hdr in sys/proc.h
5064do
5065ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5066echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5067echo "configure:5068: checking for $ac_hdr" >&5
5ee754fc
MK
5068if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5069 echo $ac_n "(cached) $ac_c" 1>&6
5070else
5071 cat > conftest.$ac_ext <<EOF
40a7debc 5072#line 5073 "configure"
5ee754fc
MK
5073#include "confdefs.h"
5074#include <$ac_hdr>
5075EOF
5076ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5077{ (eval echo configure:5078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5078ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5079if test -z "$ac_err"; then
5080 rm -rf conftest*
5081 eval "ac_cv_header_$ac_safe=yes"
5082else
5083 echo "$ac_err" >&5
5084 echo "configure: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5086 rm -rf conftest*
5087 eval "ac_cv_header_$ac_safe=no"
5088fi
5089rm -f conftest*
5090fi
5091if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5092 echo "$ac_t""yes" 1>&6
5093 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5094 cat >> confdefs.h <<EOF
5095#define $ac_tr_hdr 1
5096EOF
5097
5098else
5099 echo "$ac_t""no" 1>&6
5100fi
5101done
5102
5103for ac_hdr in sys/procfs.h
5104do
5105ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5106echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5107echo "configure:5108: checking for $ac_hdr" >&5
5ee754fc
MK
5108if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5109 echo $ac_n "(cached) $ac_c" 1>&6
5110else
5111 cat > conftest.$ac_ext <<EOF
40a7debc 5112#line 5113 "configure"
5ee754fc
MK
5113#include "confdefs.h"
5114#include <$ac_hdr>
5115EOF
5116ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5117{ (eval echo configure:5118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5118ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5119if test -z "$ac_err"; then
5120 rm -rf conftest*
5121 eval "ac_cv_header_$ac_safe=yes"
5122else
5123 echo "$ac_err" >&5
5124 echo "configure: failed program was:" >&5
5125 cat conftest.$ac_ext >&5
5126 rm -rf conftest*
5127 eval "ac_cv_header_$ac_safe=no"
5128fi
5129rm -f conftest*
5130fi
5131if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5132 echo "$ac_t""yes" 1>&6
5133 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5134 cat >> confdefs.h <<EOF
5135#define $ac_tr_hdr 1
5136EOF
5137
5138else
5139 echo "$ac_t""no" 1>&6
5140fi
5141done
5142
5143for ac_hdr in sys/ptrace.h ptrace.h
5144do
5145ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5146echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5147echo "configure:5148: checking for $ac_hdr" >&5
5ee754fc
MK
5148if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5149 echo $ac_n "(cached) $ac_c" 1>&6
5150else
5151 cat > conftest.$ac_ext <<EOF
40a7debc 5152#line 5153 "configure"
5ee754fc
MK
5153#include "confdefs.h"
5154#include <$ac_hdr>
5155EOF
5156ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5157{ (eval echo configure:5158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5158ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5159if test -z "$ac_err"; then
5160 rm -rf conftest*
5161 eval "ac_cv_header_$ac_safe=yes"
5162else
5163 echo "$ac_err" >&5
5164 echo "configure: failed program was:" >&5
5165 cat conftest.$ac_ext >&5
5166 rm -rf conftest*
5167 eval "ac_cv_header_$ac_safe=no"
5168fi
5169rm -f conftest*
5170fi
5171if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5172 echo "$ac_t""yes" 1>&6
5173 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5174 cat >> confdefs.h <<EOF
5175#define $ac_tr_hdr 1
5176EOF
5177
5178else
5179 echo "$ac_t""no" 1>&6
5180fi
5181done
5182
5183for ac_hdr in sys/reg.h sys/debugreg.h
5184do
5185ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5186echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5187echo "configure:5188: checking for $ac_hdr" >&5
5ee754fc
MK
5188if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5189 echo $ac_n "(cached) $ac_c" 1>&6
5190else
5191 cat > conftest.$ac_ext <<EOF
40a7debc 5192#line 5193 "configure"
5ee754fc
MK
5193#include "confdefs.h"
5194#include <$ac_hdr>
5195EOF
5196ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5197{ (eval echo configure:5198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5198ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5199if test -z "$ac_err"; then
5200 rm -rf conftest*
5201 eval "ac_cv_header_$ac_safe=yes"
5202else
5203 echo "$ac_err" >&5
5204 echo "configure: failed program was:" >&5
5205 cat conftest.$ac_ext >&5
5206 rm -rf conftest*
5207 eval "ac_cv_header_$ac_safe=no"
5208fi
5209rm -f conftest*
5210fi
5211if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5212 echo "$ac_t""yes" 1>&6
5213 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5214 cat >> confdefs.h <<EOF
5215#define $ac_tr_hdr 1
5216EOF
5217
5218else
5219 echo "$ac_t""no" 1>&6
5220fi
5221done
5222
5223for ac_hdr in sys/select.h
5224do
5225ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5226echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5227echo "configure:5228: checking for $ac_hdr" >&5
5ee754fc
MK
5228if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5229 echo $ac_n "(cached) $ac_c" 1>&6
5230else
5231 cat > conftest.$ac_ext <<EOF
40a7debc 5232#line 5233 "configure"
5ee754fc
MK
5233#include "confdefs.h"
5234#include <$ac_hdr>
5235EOF
5236ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5237{ (eval echo configure:5238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5238ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5239if test -z "$ac_err"; then
5240 rm -rf conftest*
5241 eval "ac_cv_header_$ac_safe=yes"
5242else
5243 echo "$ac_err" >&5
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 rm -rf conftest*
5247 eval "ac_cv_header_$ac_safe=no"
5248fi
5249rm -f conftest*
5250fi
5251if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5252 echo "$ac_t""yes" 1>&6
5253 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5254 cat >> confdefs.h <<EOF
5255#define $ac_tr_hdr 1
5256EOF
5257
5258else
5259 echo "$ac_t""no" 1>&6
5260fi
5261done
5262
5263for ac_hdr in sys/syscall.h
5264do
5265ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5266echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5267echo "configure:5268: checking for $ac_hdr" >&5
5ee754fc
MK
5268if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5269 echo $ac_n "(cached) $ac_c" 1>&6
5270else
5271 cat > conftest.$ac_ext <<EOF
40a7debc 5272#line 5273 "configure"
5ee754fc
MK
5273#include "confdefs.h"
5274#include <$ac_hdr>
5275EOF
5276ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5277{ (eval echo configure:5278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5278ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5279if test -z "$ac_err"; then
5280 rm -rf conftest*
5281 eval "ac_cv_header_$ac_safe=yes"
5282else
5283 echo "$ac_err" >&5
5284 echo "configure: failed program was:" >&5
5285 cat conftest.$ac_ext >&5
5286 rm -rf conftest*
5287 eval "ac_cv_header_$ac_safe=no"
5288fi
5289rm -f conftest*
5290fi
5291if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5292 echo "$ac_t""yes" 1>&6
5293 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5294 cat >> confdefs.h <<EOF
5295#define $ac_tr_hdr 1
5296EOF
5297
5298else
5299 echo "$ac_t""no" 1>&6
5300fi
5301done
5302
5303for ac_hdr in sys/user.h
5304do
5305ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5306echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5307echo "configure:5308: checking for $ac_hdr" >&5
5ee754fc
MK
5308if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5309 echo $ac_n "(cached) $ac_c" 1>&6
5310else
5311 cat > conftest.$ac_ext <<EOF
40a7debc 5312#line 5313 "configure"
5ee754fc
MK
5313#include "confdefs.h"
5314#include <$ac_hdr>
5315EOF
5316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5317{ (eval echo configure:5318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5319if test -z "$ac_err"; then
5320 rm -rf conftest*
5321 eval "ac_cv_header_$ac_safe=yes"
5322else
5323 echo "$ac_err" >&5
5324 echo "configure: failed program was:" >&5
5325 cat conftest.$ac_ext >&5
5326 rm -rf conftest*
5327 eval "ac_cv_header_$ac_safe=no"
5328fi
5329rm -f conftest*
5330fi
5331if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5332 echo "$ac_t""yes" 1>&6
5333 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5334 cat >> confdefs.h <<EOF
5335#define $ac_tr_hdr 1
5336EOF
5337
5338else
5339 echo "$ac_t""no" 1>&6
5340fi
5341done
5342
5343for ac_hdr in sys/wait.h wait.h
5344do
5345ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5346echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5347echo "configure:5348: checking for $ac_hdr" >&5
5ee754fc
MK
5348if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5349 echo $ac_n "(cached) $ac_c" 1>&6
5350else
5351 cat > conftest.$ac_ext <<EOF
40a7debc 5352#line 5353 "configure"
5ee754fc
MK
5353#include "confdefs.h"
5354#include <$ac_hdr>
5355EOF
5356ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5357{ (eval echo configure:5358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5358ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5359if test -z "$ac_err"; then
5360 rm -rf conftest*
5361 eval "ac_cv_header_$ac_safe=yes"
5362else
5363 echo "$ac_err" >&5
9608ab8b
MK
5364 echo "configure: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 rm -rf conftest*
5ee754fc 5367 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5368fi
5369rm -f conftest*
5370fi
5ee754fc 5371if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5372 echo "$ac_t""yes" 1>&6
5373 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5374 cat >> confdefs.h <<EOF
5375#define $ac_tr_hdr 1
5376EOF
5ee754fc 5377
9608ab8b
MK
5378else
5379 echo "$ac_t""no" 1>&6
5380fi
5381done
5ee754fc
MK
5382
5383for ac_hdr in termios.h termio.h sgtty.h
5384do
5385ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5386echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5387echo "configure:5388: checking for $ac_hdr" >&5
5ee754fc 5388if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5389 echo $ac_n "(cached) $ac_c" 1>&6
5390else
5ee754fc 5391 cat > conftest.$ac_ext <<EOF
40a7debc 5392#line 5393 "configure"
9608ab8b 5393#include "confdefs.h"
5ee754fc 5394#include <$ac_hdr>
9608ab8b 5395EOF
5ee754fc 5396ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5397{ (eval echo configure:5398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5398ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5399if test -z "$ac_err"; then
9608ab8b 5400 rm -rf conftest*
5ee754fc 5401 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5402else
5ee754fc 5403 echo "$ac_err" >&5
9608ab8b
MK
5404 echo "configure: failed program was:" >&5
5405 cat conftest.$ac_ext >&5
5406 rm -rf conftest*
5ee754fc 5407 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5408fi
5409rm -f conftest*
9608ab8b 5410fi
5ee754fc 5411if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5412 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5413 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5414 cat >> confdefs.h <<EOF
5415#define $ac_tr_hdr 1
5416EOF
5417
9608ab8b
MK
5418else
5419 echo "$ac_t""no" 1>&6
5420fi
5ee754fc 5421done
9608ab8b 5422
5ee754fc
MK
5423for ac_hdr in unistd.h
5424do
5425ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5426echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5427echo "configure:5428: checking for $ac_hdr" >&5
5ee754fc 5428if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5429 echo $ac_n "(cached) $ac_c" 1>&6
5430else
5ee754fc 5431 cat > conftest.$ac_ext <<EOF
40a7debc 5432#line 5433 "configure"
9608ab8b 5433#include "confdefs.h"
5ee754fc 5434#include <$ac_hdr>
9608ab8b 5435EOF
5ee754fc 5436ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5437{ (eval echo configure:5438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5438ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5439if test -z "$ac_err"; then
9608ab8b 5440 rm -rf conftest*
5ee754fc 5441 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5442else
5ee754fc 5443 echo "$ac_err" >&5
9608ab8b
MK
5444 echo "configure: failed program was:" >&5
5445 cat conftest.$ac_ext >&5
5446 rm -rf conftest*
5ee754fc 5447 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5448fi
5449rm -f conftest*
9608ab8b 5450fi
5ee754fc 5451if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5452 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5453 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5454 cat >> confdefs.h <<EOF
5455#define $ac_tr_hdr 1
5456EOF
5457
9608ab8b
MK
5458else
5459 echo "$ac_t""no" 1>&6
5460fi
5ee754fc 5461done
9608ab8b 5462
9608ab8b 5463
5ee754fc
MK
5464# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5465# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5466# think that we don't have <curses.h> if we're using GCC.
5467case $host_os in
5468 solaris2.[78])
5469 if test "$GCC" = yes; then
5470 cat >> confdefs.h <<\EOF
5471#define _MSE_INT_H 1
5472EOF
5473
5474 fi ;;
5475esac
5476for ac_hdr in curses.h ncurses.h term.h
5477do
5478ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5479echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5480echo "configure:5481: checking for $ac_hdr" >&5
5ee754fc 5481if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5482 echo $ac_n "(cached) $ac_c" 1>&6
5483else
5484 cat > conftest.$ac_ext <<EOF
40a7debc 5485#line 5486 "configure"
c906108c 5486#include "confdefs.h"
5ee754fc 5487#include <$ac_hdr>
c906108c
SS
5488EOF
5489ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5490{ (eval echo configure:5491: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5491ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5492if test -z "$ac_err"; then
5493 rm -rf conftest*
5ee754fc 5494 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5495else
5496 echo "$ac_err" >&5
5497 echo "configure: failed program was:" >&5
5498 cat conftest.$ac_ext >&5
5499 rm -rf conftest*
5ee754fc 5500 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5501fi
5502rm -f conftest*
c906108c 5503fi
5ee754fc
MK
5504if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5505 echo "$ac_t""yes" 1>&6
5506 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5507 cat >> confdefs.h <<EOF
5508#define $ac_tr_hdr 1
c906108c 5509EOF
5ee754fc 5510
c906108c 5511else
5ee754fc 5512 echo "$ac_t""no" 1>&6
c906108c 5513fi
5ee754fc 5514done
c906108c
SS
5515
5516
5ee754fc
MK
5517# FIXME: kettenis/20030102: In most cases we include these
5518# unconditionally, so what's the point in checking these?
5519for ac_hdr in ctype.h time.h
c906108c
SS
5520do
5521ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5522echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 5523echo "configure:5524: checking for $ac_hdr" >&5
c906108c
SS
5524if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5525 echo $ac_n "(cached) $ac_c" 1>&6
5526else
5527 cat > conftest.$ac_ext <<EOF
40a7debc 5528#line 5529 "configure"
c906108c
SS
5529#include "confdefs.h"
5530#include <$ac_hdr>
5531EOF
5532ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 5533{ (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5534ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5535if test -z "$ac_err"; then
5536 rm -rf conftest*
5537 eval "ac_cv_header_$ac_safe=yes"
5538else
5539 echo "$ac_err" >&5
5540 echo "configure: failed program was:" >&5
5541 cat conftest.$ac_ext >&5
5542 rm -rf conftest*
5543 eval "ac_cv_header_$ac_safe=no"
5544fi
5545rm -f conftest*
5546fi
5547if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5548 echo "$ac_t""yes" 1>&6
5549 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5550 cat >> confdefs.h <<EOF
5551#define $ac_tr_hdr 1
5552EOF
5553
5554else
5555 echo "$ac_t""no" 1>&6
5556fi
5557done
5558
5ee754fc 5559
40a7debc
EZ
5560echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5561echo "configure:5562: checking for member st_blocks in struct stat" >&5
5562if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5563 echo $ac_n "(cached) $ac_c" 1>&6
5564else
5565 cat > conftest.$ac_ext <<EOF
5566#line 5567 "configure"
5567#include "confdefs.h"
5568#include <sys/types.h>
5569#include <sys/stat.h>
5570int main() {
5571struct stat st; (void) st.st_blocks;
5572; return 0; }
5573EOF
5574if { (eval echo configure:5575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5575 rm -rf conftest*
5576 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5577else
5578 echo "configure: failed program was:" >&5
5579 cat conftest.$ac_ext >&5
5580 rm -rf conftest*
5581 gdb_cv_have_struct_stat_with_st_blocks_member=no
5582fi
5583rm -f conftest*
5584fi
5585
5586echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5587if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5588 cat >> confdefs.h <<\EOF
5589#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5590EOF
5591
5592fi
b9362cc7
AC
5593# ------------------------- #
5594# Checks for declarations. #
5595# ------------------------- #
5596
5597for ac_func in getopt
5598do
5599 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5600echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
40a7debc 5601echo "configure:5602: checking whether $ac_func is declared" >&5
b9362cc7
AC
5602if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5603 echo $ac_n "(cached) $ac_c" 1>&6
5604else
5605 cat > conftest.$ac_ext <<EOF
40a7debc 5606#line 5607 "configure"
b9362cc7
AC
5607#include "confdefs.h"
5608#undef $ac_tr_decl
5609#define $ac_tr_decl 1
5610
5611
5612int main() {
5613#ifndef $ac_func
5614char *(*pfn) = (char *(*)) $ac_func ;
5615#endif
5616; return 0; }
5617EOF
40a7debc 5618if { (eval echo configure:5619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5619 rm -rf conftest*
5620 eval "gcc_cv_have_decl_$ac_func=yes"
5621else
5622 echo "configure: failed program was:" >&5
5623 cat conftest.$ac_ext >&5
5624 rm -rf conftest*
5625 eval "gcc_cv_have_decl_$ac_func=no"
5626fi
5627rm -f conftest*
5628fi
5629
5630if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5631 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5632#define $ac_tr_decl 1
5633EOF
5634
5635else
5636 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5637#define $ac_tr_decl 0
5638EOF
5639
5640fi
5641
5642done
5643if test x = y ; then
5644 cat >> confdefs.h <<\EOF
5645#define HAVE_DECL_GETOPT 1
5646EOF
5647fi
5648
5649
5ee754fc
MK
5650# ------------------ #
5651# Checks for types. #
5652# ------------------ #
5653
5654echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
40a7debc 5655echo "configure:5656: checking return type of signal handlers" >&5
5ee754fc 5656if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5657 echo $ac_n "(cached) $ac_c" 1>&6
5658else
5659 cat > conftest.$ac_ext <<EOF
40a7debc 5660#line 5661 "configure"
c906108c
SS
5661#include "confdefs.h"
5662#include <sys/types.h>
5ee754fc
MK
5663#include <signal.h>
5664#ifdef signal
5665#undef signal
c906108c 5666#endif
5ee754fc
MK
5667#ifdef __cplusplus
5668extern "C" void (*signal (int, void (*)(int)))(int);
5669#else
5670void (*signal ()) ();
c906108c
SS
5671#endif
5672
5ee754fc
MK
5673int main() {
5674int i;
5675; return 0; }
c906108c 5676EOF
40a7debc 5677if { (eval echo configure:5678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5678 rm -rf conftest*
5ee754fc 5679 ac_cv_type_signal=void
c906108c 5680else
5ee754fc
MK
5681 echo "configure: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
c906108c 5683 rm -rf conftest*
5ee754fc 5684 ac_cv_type_signal=int
c906108c
SS
5685fi
5686rm -f conftest*
c906108c
SS
5687fi
5688
5ee754fc
MK
5689echo "$ac_t""$ac_cv_type_signal" 1>&6
5690cat >> confdefs.h <<EOF
5691#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5692EOF
5693
c906108c
SS
5694
5695
5ee754fc
MK
5696# ------------------------------------- #
5697# Checks for compiler characteristics. #
5698# ------------------------------------- #
5699
c906108c 5700echo $ac_n "checking for working const""... $ac_c" 1>&6
40a7debc 5701echo "configure:5702: checking for working const" >&5
c906108c
SS
5702if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5703 echo $ac_n "(cached) $ac_c" 1>&6
5704else
5705 cat > conftest.$ac_ext <<EOF
40a7debc 5706#line 5707 "configure"
c906108c
SS
5707#include "confdefs.h"
5708
5709int main() {
5710
5711/* Ultrix mips cc rejects this. */
5712typedef int charset[2]; const charset x;
5713/* SunOS 4.1.1 cc rejects this. */
5714char const *const *ccp;
5715char **p;
5716/* NEC SVR4.0.2 mips cc rejects this. */
5717struct point {int x, y;};
5718static struct point const zero = {0,0};
5719/* AIX XL C 1.02.0.0 rejects this.
5720 It does not let you subtract one const X* pointer from another in an arm
5721 of an if-expression whose if-part is not a constant expression */
5722const char *g = "string";
5723ccp = &g + (g ? g-g : 0);
5724/* HPUX 7.0 cc rejects these. */
5725++ccp;
5726p = (char**) ccp;
5727ccp = (char const *const *) p;
5728{ /* SCO 3.2v4 cc rejects this. */
5729 char *t;
5730 char const *s = 0 ? (char *) 0 : (char const *) 0;
5731
5732 *t++ = 0;
5733}
5734{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5735 int x[] = {25, 17};
5736 const int *foo = &x[0];
5737 ++foo;
5738}
5739{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5740 typedef const int *iptr;
5741 iptr p = 0;
5742 ++p;
5743}
5744{ /* AIX XL C 1.02.0.0 rejects this saying
5745 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5746 struct s { int j; const int *ap[3]; };
5747 struct s *b; b->j = 5;
5748}
5749{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5750 const int foo = 10;
5751}
5752
5753; return 0; }
5754EOF
40a7debc 5755if { (eval echo configure:5756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5756 rm -rf conftest*
5757 ac_cv_c_const=yes
5758else
5759 echo "configure: failed program was:" >&5
5760 cat conftest.$ac_ext >&5
5761 rm -rf conftest*
5762 ac_cv_c_const=no
5763fi
5764rm -f conftest*
5765fi
5766
5767echo "$ac_t""$ac_cv_c_const" 1>&6
5768if test $ac_cv_c_const = no; then
5769 cat >> confdefs.h <<\EOF
5770#define const
5771EOF
5772
5773fi
5774
bce58c09 5775echo $ac_n "checking for inline""... $ac_c" 1>&6
40a7debc 5776echo "configure:5777: checking for inline" >&5
bce58c09
JB
5777if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
5779else
5780 ac_cv_c_inline=no
5781for ac_kw in inline __inline__ __inline; do
5782 cat > conftest.$ac_ext <<EOF
40a7debc 5783#line 5784 "configure"
bce58c09
JB
5784#include "confdefs.h"
5785
5786int main() {
5787} $ac_kw foo() {
5788; return 0; }
5789EOF
40a7debc 5790if { (eval echo configure:5791: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5791 rm -rf conftest*
5792 ac_cv_c_inline=$ac_kw; break
5793else
5794 echo "configure: failed program was:" >&5
5795 cat conftest.$ac_ext >&5
5796fi
5797rm -f conftest*
5798done
5799
5800fi
5801
5802echo "$ac_t""$ac_cv_c_inline" 1>&6
5803case "$ac_cv_c_inline" in
5804 inline | yes) ;;
5805 no) cat >> confdefs.h <<\EOF
5806#define inline
5807EOF
5808 ;;
5809 *) cat >> confdefs.h <<EOF
5810#define inline $ac_cv_c_inline
5811EOF
5812 ;;
5813esac
5814
c906108c 5815
5ee754fc
MK
5816# ------------------------------ #
5817# Checks for library functions. #
5818# ------------------------------ #
5819
46711df8
MK
5820# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5821# for constant arguments. Useless!
5822echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
40a7debc 5823echo "configure:5824: checking for working alloca.h" >&5
46711df8
MK
5824if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5825 echo $ac_n "(cached) $ac_c" 1>&6
5826else
5827 cat > conftest.$ac_ext <<EOF
40a7debc 5828#line 5829 "configure"
46711df8
MK
5829#include "confdefs.h"
5830#include <alloca.h>
5831int main() {
5832char *p = alloca(2 * sizeof(int));
5833; return 0; }
5834EOF
40a7debc 5835if { (eval echo configure:5836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5836 rm -rf conftest*
5837 ac_cv_header_alloca_h=yes
5838else
5839 echo "configure: failed program was:" >&5
5840 cat conftest.$ac_ext >&5
5841 rm -rf conftest*
5842 ac_cv_header_alloca_h=no
5843fi
5844rm -f conftest*
5845fi
5846
5847echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5848if test $ac_cv_header_alloca_h = yes; then
5849 cat >> confdefs.h <<\EOF
5850#define HAVE_ALLOCA_H 1
5851EOF
5852
5853fi
5854
5855echo $ac_n "checking for alloca""... $ac_c" 1>&6
40a7debc 5856echo "configure:5857: checking for alloca" >&5
46711df8
MK
5857if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5858 echo $ac_n "(cached) $ac_c" 1>&6
5859else
5860 cat > conftest.$ac_ext <<EOF
40a7debc 5861#line 5862 "configure"
46711df8
MK
5862#include "confdefs.h"
5863
5864#ifdef __GNUC__
5865# define alloca __builtin_alloca
5866#else
5867# ifdef _MSC_VER
5868# include <malloc.h>
5869# define alloca _alloca
5870# else
5871# if HAVE_ALLOCA_H
5872# include <alloca.h>
5873# else
5874# ifdef _AIX
5875 #pragma alloca
5876# else
5877# ifndef alloca /* predefined by HP cc +Olibcalls */
5878char *alloca ();
5879# endif
5880# endif
5881# endif
5882# endif
5883#endif
5884
5885int main() {
5886char *p = (char *) alloca(1);
5887; return 0; }
5888EOF
40a7debc 5889if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5890 rm -rf conftest*
5891 ac_cv_func_alloca_works=yes
5892else
5893 echo "configure: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 rm -rf conftest*
5896 ac_cv_func_alloca_works=no
5897fi
5898rm -f conftest*
5899fi
5900
5901echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5902if test $ac_cv_func_alloca_works = yes; then
5903 cat >> confdefs.h <<\EOF
5904#define HAVE_ALLOCA 1
5905EOF
5906
5907fi
5908
5909if test $ac_cv_func_alloca_works = no; then
5910 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5911 # that cause trouble. Some versions do not even contain alloca or
5912 # contain a buggy version. If you still want to use their alloca,
5913 # use ar to extract alloca.o from them instead of compiling alloca.c.
5914 ALLOCA=alloca.${ac_objext}
5915 cat >> confdefs.h <<\EOF
5916#define C_ALLOCA 1
5917EOF
5918
5919
5920echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
40a7debc 5921echo "configure:5922: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5922if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5923 echo $ac_n "(cached) $ac_c" 1>&6
5924else
5925 cat > conftest.$ac_ext <<EOF
40a7debc 5926#line 5927 "configure"
46711df8
MK
5927#include "confdefs.h"
5928#if defined(CRAY) && ! defined(CRAY2)
5929webecray
5930#else
5931wenotbecray
5932#endif
5933
5934EOF
5935if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5936 egrep "webecray" >/dev/null 2>&1; then
5937 rm -rf conftest*
5938 ac_cv_os_cray=yes
5939else
5940 rm -rf conftest*
5941 ac_cv_os_cray=no
5942fi
5943rm -f conftest*
5944
5945fi
5946
5947echo "$ac_t""$ac_cv_os_cray" 1>&6
5948if test $ac_cv_os_cray = yes; then
5949for ac_func in _getb67 GETB67 getb67; do
5950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 5951echo "configure:5952: checking for $ac_func" >&5
46711df8
MK
5952if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5953 echo $ac_n "(cached) $ac_c" 1>&6
5954else
5955 cat > conftest.$ac_ext <<EOF
40a7debc 5956#line 5957 "configure"
46711df8
MK
5957#include "confdefs.h"
5958/* System header to define __stub macros and hopefully few prototypes,
5959 which can conflict with char $ac_func(); below. */
5960#include <assert.h>
5961/* Override any gcc2 internal prototype to avoid an error. */
5962/* We use char because int might match the return type of a gcc2
5963 builtin and then its argument prototype would still apply. */
5964char $ac_func();
5965
5966int main() {
5967
5968/* The GNU C library defines this for functions which it implements
5969 to always fail with ENOSYS. Some functions are actually named
5970 something starting with __ and the normal name is an alias. */
5971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5972choke me
5973#else
5974$ac_func();
5975#endif
5976
5977; return 0; }
5978EOF
40a7debc 5979if { (eval echo configure:5980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5980 rm -rf conftest*
5981 eval "ac_cv_func_$ac_func=yes"
5982else
5983 echo "configure: failed program was:" >&5
5984 cat conftest.$ac_ext >&5
5985 rm -rf conftest*
5986 eval "ac_cv_func_$ac_func=no"
5987fi
5988rm -f conftest*
5989fi
5990
5991if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5992 echo "$ac_t""yes" 1>&6
5993 cat >> confdefs.h <<EOF
5994#define CRAY_STACKSEG_END $ac_func
5995EOF
5996
5997 break
5998else
5999 echo "$ac_t""no" 1>&6
6000fi
6001
6002done
6003fi
6004
6005echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
40a7debc 6006echo "configure:6007: checking stack direction for C alloca" >&5
46711df8
MK
6007if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6008 echo $ac_n "(cached) $ac_c" 1>&6
6009else
6010 if test "$cross_compiling" = yes; then
6011 ac_cv_c_stack_direction=0
6012else
6013 cat > conftest.$ac_ext <<EOF
40a7debc 6014#line 6015 "configure"
46711df8
MK
6015#include "confdefs.h"
6016find_stack_direction ()
6017{
6018 static char *addr = 0;
6019 auto char dummy;
6020 if (addr == 0)
6021 {
6022 addr = &dummy;
6023 return find_stack_direction ();
6024 }
6025 else
6026 return (&dummy > addr) ? 1 : -1;
6027}
6028main ()
6029{
6030 exit (find_stack_direction() < 0);
6031}
6032EOF
40a7debc 6033if { (eval echo configure:6034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6034then
6035 ac_cv_c_stack_direction=1
6036else
6037 echo "configure: failed program was:" >&5
6038 cat conftest.$ac_ext >&5
6039 rm -fr conftest*
6040 ac_cv_c_stack_direction=-1
6041fi
6042rm -fr conftest*
6043fi
6044
6045fi
6046
6047echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6048cat >> confdefs.h <<EOF
6049#define STACK_DIRECTION $ac_cv_c_stack_direction
6050EOF
6051
6052fi
6053
27ca5dad 6054for ac_hdr in unistd.h
97bf5e38
MK
6055do
6056ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6057echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
40a7debc 6058echo "configure:6059: checking for $ac_hdr" >&5
74c1b268
AC
6059if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6060 echo $ac_n "(cached) $ac_c" 1>&6
6061else
6062 cat > conftest.$ac_ext <<EOF
40a7debc 6063#line 6064 "configure"
74c1b268 6064#include "confdefs.h"
97bf5e38 6065#include <$ac_hdr>
74c1b268
AC
6066EOF
6067ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 6068{ (eval echo configure:6069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6069ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6070if test -z "$ac_err"; then
6071 rm -rf conftest*
6072 eval "ac_cv_header_$ac_safe=yes"
6073else
6074 echo "$ac_err" >&5
6075 echo "configure: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 rm -rf conftest*
6078 eval "ac_cv_header_$ac_safe=no"
6079fi
6080rm -f conftest*
6081fi
6082if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6083 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6084 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6085 cat >> confdefs.h <<EOF
6086#define $ac_tr_hdr 1
74c1b268 6087EOF
97bf5e38 6088
74c1b268
AC
6089else
6090 echo "$ac_t""no" 1>&6
6091fi
97bf5e38 6092done
74c1b268 6093
97bf5e38
MK
6094for ac_func in getpagesize
6095do
6096echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6097echo "configure:6098: checking for $ac_func" >&5
97bf5e38 6098if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6099 echo $ac_n "(cached) $ac_c" 1>&6
6100else
6101 cat > conftest.$ac_ext <<EOF
40a7debc 6102#line 6103 "configure"
74c1b268
AC
6103#include "confdefs.h"
6104/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6105 which can conflict with char $ac_func(); below. */
74c1b268
AC
6106#include <assert.h>
6107/* Override any gcc2 internal prototype to avoid an error. */
6108/* We use char because int might match the return type of a gcc2
6109 builtin and then its argument prototype would still apply. */
97bf5e38 6110char $ac_func();
74c1b268
AC
6111
6112int main() {
6113
6114/* The GNU C library defines this for functions which it implements
6115 to always fail with ENOSYS. Some functions are actually named
6116 something starting with __ and the normal name is an alias. */
97bf5e38 6117#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6118choke me
6119#else
97bf5e38 6120$ac_func();
74c1b268
AC
6121#endif
6122
6123; return 0; }
6124EOF
40a7debc 6125if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6126 rm -rf conftest*
97bf5e38 6127 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6128else
6129 echo "configure: failed program was:" >&5
6130 cat conftest.$ac_ext >&5
6131 rm -rf conftest*
97bf5e38 6132 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6133fi
6134rm -f conftest*
6135fi
6136
97bf5e38 6137if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6138 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6139 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6140 cat >> confdefs.h <<EOF
6141#define $ac_tr_func 1
6142EOF
6143
74c1b268
AC
6144else
6145 echo "$ac_t""no" 1>&6
6146fi
97bf5e38 6147done
74c1b268 6148
97bf5e38 6149echo $ac_n "checking for working mmap""... $ac_c" 1>&6
40a7debc 6150echo "configure:6151: checking for working mmap" >&5
97bf5e38
MK
6151if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6152 echo $ac_n "(cached) $ac_c" 1>&6
6153else
6154 if test "$cross_compiling" = yes; then
6155 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6156else
6157 cat > conftest.$ac_ext <<EOF
40a7debc 6158#line 6159 "configure"
74c1b268 6159#include "confdefs.h"
97bf5e38
MK
6160
6161/* Thanks to Mike Haertel and Jim Avera for this test.
6162 Here is a matrix of mmap possibilities:
6163 mmap private not fixed
6164 mmap private fixed at somewhere currently unmapped
6165 mmap private fixed at somewhere already mapped
6166 mmap shared not fixed
6167 mmap shared fixed at somewhere currently unmapped
6168 mmap shared fixed at somewhere already mapped
6169 For private mappings, we should verify that changes cannot be read()
6170 back from the file, nor mmap's back from the file at a different
6171 address. (There have been systems where private was not correctly
6172 implemented like the infamous i386 svr4.0, and systems where the
6173 VM page cache was not coherent with the filesystem buffer cache
6174 like early versions of FreeBSD and possibly contemporary NetBSD.)
6175 For shared mappings, we should conversely verify that changes get
6176 propogated back to all the places they're supposed to be.
6177
6178 Grep wants private fixed already mapped.
6179 The main things grep needs to know about mmap are:
6180 * does it exist and is it safe to write into the mmap'd area
6181 * how to use it (BSD variants) */
74c1b268 6182#include <sys/types.h>
97bf5e38
MK
6183#include <fcntl.h>
6184#include <sys/mman.h>
6185
6186/* This mess was copied from the GNU getpagesize.h. */
6187#ifndef HAVE_GETPAGESIZE
27ca5dad
MC
6188# ifdef HAVE_UNISTD_H
6189# include <unistd.h>
6190# endif
97bf5e38
MK
6191
6192/* Assume that all systems that can run configure have sys/param.h. */
6193# ifndef HAVE_SYS_PARAM_H
6194# define HAVE_SYS_PARAM_H 1
6195# endif
6196
6197# ifdef _SC_PAGESIZE
6198# define getpagesize() sysconf(_SC_PAGESIZE)
6199# else /* no _SC_PAGESIZE */
6200# ifdef HAVE_SYS_PARAM_H
6201# include <sys/param.h>
6202# ifdef EXEC_PAGESIZE
6203# define getpagesize() EXEC_PAGESIZE
6204# else /* no EXEC_PAGESIZE */
6205# ifdef NBPG
6206# define getpagesize() NBPG * CLSIZE
6207# ifndef CLSIZE
6208# define CLSIZE 1
6209# endif /* no CLSIZE */
6210# else /* no NBPG */
6211# ifdef NBPC
6212# define getpagesize() NBPC
6213# else /* no NBPC */
6214# ifdef PAGESIZE
6215# define getpagesize() PAGESIZE
6216# endif /* PAGESIZE */
6217# endif /* no NBPC */
6218# endif /* no NBPG */
6219# endif /* no EXEC_PAGESIZE */
6220# else /* no HAVE_SYS_PARAM_H */
6221# define getpagesize() 8192 /* punt totally */
6222# endif /* no HAVE_SYS_PARAM_H */
6223# endif /* no _SC_PAGESIZE */
6224
6225#endif /* no HAVE_GETPAGESIZE */
6226
74c1b268 6227#ifdef __cplusplus
97bf5e38 6228extern "C" { void *malloc(unsigned); }
74c1b268 6229#else
97bf5e38 6230char *malloc();
74c1b268 6231#endif
74c1b268 6232
97bf5e38
MK
6233int
6234main()
6235{
6236 char *data, *data2, *data3;
6237 int i, pagesize;
6238 int fd;
74c1b268 6239
97bf5e38 6240 pagesize = getpagesize();
74c1b268 6241
97bf5e38
MK
6242 /*
6243 * First, make a file with some known garbage in it.
6244 */
6245 data = malloc(pagesize);
6246 if (!data)
6247 exit(1);
6248 for (i = 0; i < pagesize; ++i)
6249 *(data + i) = rand();
6250 umask(0);
6251 fd = creat("conftestmmap", 0600);
6252 if (fd < 0)
6253 exit(1);
6254 if (write(fd, data, pagesize) != pagesize)
6255 exit(1);
6256 close(fd);
74c1b268 6257
97bf5e38
MK
6258 /*
6259 * Next, try to mmap the file at a fixed address which
6260 * already has something else allocated at it. If we can,
6261 * also make sure that we see the same garbage.
6262 */
6263 fd = open("conftestmmap", O_RDWR);
6264 if (fd < 0)
6265 exit(1);
6266 data2 = malloc(2 * pagesize);
6267 if (!data2)
6268 exit(1);
6269 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6270 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6271 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6272 exit(1);
6273 for (i = 0; i < pagesize; ++i)
6274 if (*(data + i) != *(data2 + i))
6275 exit(1);
74c1b268 6276
97bf5e38
MK
6277 /*
6278 * Finally, make sure that changes to the mapped area
6279 * do not percolate back to the file as seen by read().
6280 * (This is a bug on some variants of i386 svr4.0.)
6281 */
6282 for (i = 0; i < pagesize; ++i)
6283 *(data2 + i) = *(data2 + i) + 1;
6284 data3 = malloc(pagesize);
6285 if (!data3)
6286 exit(1);
6287 if (read(fd, data3, pagesize) != pagesize)
6288 exit(1);
6289 for (i = 0; i < pagesize; ++i)
6290 if (*(data + i) != *(data3 + i))
6291 exit(1);
6292 close(fd);
6293 unlink("conftestmmap");
6294 exit(0);
74c1b268 6295}
97bf5e38 6296
74c1b268 6297EOF
40a7debc 6298if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6299then
97bf5e38 6300 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6301else
6302 echo "configure: failed program was:" >&5
6303 cat conftest.$ac_ext >&5
6304 rm -fr conftest*
97bf5e38 6305 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6306fi
6307rm -fr conftest*
6308fi
6309
6310fi
6311
97bf5e38
MK
6312echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6313if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6314 cat >> confdefs.h <<\EOF
97bf5e38 6315#define HAVE_MMAP 1
74c1b268
AC
6316EOF
6317
6318fi
6319
97bf5e38 6320echo $ac_n "checking for pid_t""... $ac_c" 1>&6
40a7debc 6321echo "configure:6322: checking for pid_t" >&5
97bf5e38 6322if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6323 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6324else
6325 cat > conftest.$ac_ext <<EOF
40a7debc 6326#line 6327 "configure"
0200359f 6327#include "confdefs.h"
97bf5e38
MK
6328#include <sys/types.h>
6329#if STDC_HEADERS
6330#include <stdlib.h>
6331#include <stddef.h>
0200359f 6332#endif
0200359f 6333EOF
97bf5e38
MK
6334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6335 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6336 rm -rf conftest*
6337 ac_cv_type_pid_t=yes
0200359f 6338else
97bf5e38
MK
6339 rm -rf conftest*
6340 ac_cv_type_pid_t=no
0200359f 6341fi
97bf5e38 6342rm -f conftest*
0200359f
MK
6343
6344fi
97bf5e38
MK
6345echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6346if test $ac_cv_type_pid_t = no; then
0200359f 6347 cat >> confdefs.h <<\EOF
97bf5e38 6348#define pid_t int
0200359f
MK
6349EOF
6350
6351fi
6352
97bf5e38
MK
6353ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6354echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
40a7debc 6355echo "configure:6356: checking for vfork.h" >&5
97bf5e38 6356if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6357 echo $ac_n "(cached) $ac_c" 1>&6
6358else
6359 cat > conftest.$ac_ext <<EOF
40a7debc 6360#line 6361 "configure"
72473524 6361#include "confdefs.h"
97bf5e38 6362#include <vfork.h>
72473524 6363EOF
97bf5e38 6364ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 6365{ (eval echo configure:6366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6366ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6367if test -z "$ac_err"; then
72473524 6368 rm -rf conftest*
97bf5e38 6369 eval "ac_cv_header_$ac_safe=yes"
72473524 6370else
97bf5e38 6371 echo "$ac_err" >&5
72473524
DJ
6372 echo "configure: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 rm -rf conftest*
97bf5e38 6375 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6376fi
6377rm -f conftest*
6378fi
97bf5e38
MK
6379if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6380 echo "$ac_t""yes" 1>&6
72473524 6381 cat >> confdefs.h <<\EOF
97bf5e38 6382#define HAVE_VFORK_H 1
72473524
DJ
6383EOF
6384
97bf5e38
MK
6385else
6386 echo "$ac_t""no" 1>&6
72473524 6387fi
c906108c 6388
97bf5e38 6389echo $ac_n "checking for working vfork""... $ac_c" 1>&6
40a7debc 6390echo "configure:6391: checking for working vfork" >&5
97bf5e38
MK
6391if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6392 echo $ac_n "(cached) $ac_c" 1>&6
6393else
6394 if test "$cross_compiling" = yes; then
6395 echo $ac_n "checking for vfork""... $ac_c" 1>&6
40a7debc 6396echo "configure:6397: checking for vfork" >&5
97bf5e38 6397if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6398 echo $ac_n "(cached) $ac_c" 1>&6
6399else
6400 cat > conftest.$ac_ext <<EOF
40a7debc 6401#line 6402 "configure"
2b2d558c 6402#include "confdefs.h"
97bf5e38
MK
6403/* System header to define __stub macros and hopefully few prototypes,
6404 which can conflict with char vfork(); below. */
6405#include <assert.h>
6406/* Override any gcc2 internal prototype to avoid an error. */
6407/* We use char because int might match the return type of a gcc2
6408 builtin and then its argument prototype would still apply. */
6409char vfork();
2b2d558c
MK
6410
6411int main() {
97bf5e38
MK
6412
6413/* The GNU C library defines this for functions which it implements
6414 to always fail with ENOSYS. Some functions are actually named
6415 something starting with __ and the normal name is an alias. */
6416#if defined (__stub_vfork) || defined (__stub___vfork)
6417choke me
6418#else
6419vfork();
6420#endif
6421
2b2d558c
MK
6422; return 0; }
6423EOF
40a7debc 6424if { (eval echo configure:6425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6425 rm -rf conftest*
97bf5e38 6426 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6427else
6428 echo "configure: failed program was:" >&5
6429 cat conftest.$ac_ext >&5
6430 rm -rf conftest*
97bf5e38 6431 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6432fi
6433rm -f conftest*
6434fi
6435
97bf5e38
MK
6436if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6437 echo "$ac_t""yes" 1>&6
6438 :
6439else
6440 echo "$ac_t""no" 1>&6
2b2d558c
MK
6441fi
6442
97bf5e38 6443ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6444else
6445 cat > conftest.$ac_ext <<EOF
40a7debc 6446#line 6447 "configure"
7dfa765c 6447#include "confdefs.h"
97bf5e38
MK
6448/* Thanks to Paul Eggert for this test. */
6449#include <stdio.h>
6450#include <sys/types.h>
6451#include <sys/stat.h>
6452#ifdef HAVE_UNISTD_H
6453#include <unistd.h>
6454#endif
6455#ifdef HAVE_VFORK_H
6456#include <vfork.h>
6457#endif
6458/* On some sparc systems, changes by the child to local and incoming
6459 argument registers are propagated back to the parent.
6460 The compiler is told about this with #include <vfork.h>,
6461 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6462 Test for this by using a static variable whose address
6463 is put into a register that is clobbered by the vfork. */
6464static
6465#ifdef __cplusplus
6466sparc_address_test (int arg)
6467#else
6468sparc_address_test (arg) int arg;
6469#endif
6470{
6471 static pid_t child;
6472 if (!child) {
6473 child = vfork ();
6474 if (child < 0) {
6475 perror ("vfork");
6476 _exit(2);
6477 }
6478 if (!child) {
6479 arg = getpid();
6480 write(-1, "", 0);
6481 _exit (arg);
6482 }
6483 }
6484}
6485main() {
6486 pid_t parent = getpid ();
6487 pid_t child;
7dfa765c 6488
97bf5e38 6489 sparc_address_test ();
7dfa765c 6490
97bf5e38 6491 child = vfork ();
7dfa765c 6492
97bf5e38
MK
6493 if (child == 0) {
6494 /* Here is another test for sparc vfork register problems.
6495 This test uses lots of local variables, at least
6496 as many local variables as main has allocated so far
6497 including compiler temporaries. 4 locals are enough for
6498 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6499 A buggy compiler should reuse the register of parent
6500 for one of the local variables, since it will think that
6501 parent can't possibly be used any more in this routine.
6502 Assigning to the local variable will thus munge parent
6503 in the parent process. */
6504 pid_t
6505 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6506 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6507 /* Convince the compiler that p..p7 are live; otherwise, it might
6508 use the same hardware register for all 8 local variables. */
6509 if (p != p1 || p != p2 || p != p3 || p != p4
6510 || p != p5 || p != p6 || p != p7)
6511 _exit(1);
7dfa765c 6512
97bf5e38
MK
6513 /* On some systems (e.g. IRIX 3.3),
6514 vfork doesn't separate parent from child file descriptors.
6515 If the child closes a descriptor before it execs or exits,
6516 this munges the parent's descriptor as well.
6517 Test for this by closing stdout in the child. */
6518 _exit(close(fileno(stdout)) != 0);
6519 } else {
6520 int status;
6521 struct stat st;
64bb1671 6522
97bf5e38
MK
6523 while (wait(&status) != child)
6524 ;
6525 exit(
6526 /* Was there some problem with vforking? */
6527 child < 0
64bb1671 6528
97bf5e38
MK
6529 /* Did the child fail? (This shouldn't happen.) */
6530 || status
64bb1671 6531
97bf5e38
MK
6532 /* Did the vfork/compiler bug occur? */
6533 || parent != getpid()
6534
6535 /* Did the file descriptor bug occur? */
6536 || fstat(fileno(stdout), &st) != 0
6537 );
6538 }
6539}
5c44784c 6540EOF
40a7debc 6541if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6542then
6543 ac_cv_func_vfork_works=yes
5c44784c
JM
6544else
6545 echo "configure: failed program was:" >&5
6546 cat conftest.$ac_ext >&5
97bf5e38
MK
6547 rm -fr conftest*
6548 ac_cv_func_vfork_works=no
5c44784c 6549fi
97bf5e38 6550rm -fr conftest*
5c44784c
JM
6551fi
6552
0afdd437
MK
6553fi
6554
97bf5e38
MK
6555echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6556if test $ac_cv_func_vfork_works = no; then
0afdd437 6557 cat >> confdefs.h <<\EOF
97bf5e38 6558#define vfork fork
0afdd437
MK
6559EOF
6560
6561fi
6562
97bf5e38
MK
6563for ac_func in canonicalize_file_name realpath
6564do
6565echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6566echo "configure:6567: checking for $ac_func" >&5
97bf5e38 6567if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6568 echo $ac_n "(cached) $ac_c" 1>&6
6569else
6570 cat > conftest.$ac_ext <<EOF
40a7debc 6571#line 6572 "configure"
7e89e357 6572#include "confdefs.h"
97bf5e38
MK
6573/* System header to define __stub macros and hopefully few prototypes,
6574 which can conflict with char $ac_func(); below. */
6575#include <assert.h>
6576/* Override any gcc2 internal prototype to avoid an error. */
6577/* We use char because int might match the return type of a gcc2
6578 builtin and then its argument prototype would still apply. */
6579char $ac_func();
6580
7e89e357 6581int main() {
97bf5e38
MK
6582
6583/* The GNU C library defines this for functions which it implements
6584 to always fail with ENOSYS. Some functions are actually named
6585 something starting with __ and the normal name is an alias. */
6586#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6587choke me
6588#else
6589$ac_func();
6590#endif
6591
7e89e357
JT
6592; return 0; }
6593EOF
40a7debc 6594if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6595 rm -rf conftest*
97bf5e38 6596 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6597else
6598 echo "configure: failed program was:" >&5
6599 cat conftest.$ac_ext >&5
6600 rm -rf conftest*
97bf5e38 6601 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6602fi
6603rm -f conftest*
6604fi
6605
97bf5e38
MK
6606if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6607 echo "$ac_t""yes" 1>&6
6608 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6609 cat >> confdefs.h <<EOF
6610#define $ac_tr_func 1
7e89e357 6611EOF
97bf5e38
MK
6612
6613else
6614 echo "$ac_t""no" 1>&6
7e89e357 6615fi
97bf5e38 6616done
7e89e357 6617
97bf5e38 6618for ac_func in poll
7be570e7
JM
6619do
6620echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6621echo "configure:6622: checking for $ac_func" >&5
7be570e7
JM
6622if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6623 echo $ac_n "(cached) $ac_c" 1>&6
6624else
6625 cat > conftest.$ac_ext <<EOF
40a7debc 6626#line 6627 "configure"
7be570e7
JM
6627#include "confdefs.h"
6628/* System header to define __stub macros and hopefully few prototypes,
6629 which can conflict with char $ac_func(); below. */
6630#include <assert.h>
6631/* Override any gcc2 internal prototype to avoid an error. */
6632/* We use char because int might match the return type of a gcc2
6633 builtin and then its argument prototype would still apply. */
6634char $ac_func();
6635
6636int main() {
6637
6638/* The GNU C library defines this for functions which it implements
6639 to always fail with ENOSYS. Some functions are actually named
6640 something starting with __ and the normal name is an alias. */
6641#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6642choke me
6643#else
6644$ac_func();
6645#endif
6646
6647; return 0; }
6648EOF
40a7debc 6649if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6650 rm -rf conftest*
6651 eval "ac_cv_func_$ac_func=yes"
6652else
6653 echo "configure: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 rm -rf conftest*
6656 eval "ac_cv_func_$ac_func=no"
6657fi
6658rm -f conftest*
6659fi
6660
6661if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6662 echo "$ac_t""yes" 1>&6
6663 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6664 cat >> confdefs.h <<EOF
6665#define $ac_tr_func 1
6666EOF
6667
6668else
6669 echo "$ac_t""no" 1>&6
6670fi
6671done
6672
6673for ac_func in pread64
6674do
6675echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6676echo "configure:6677: checking for $ac_func" >&5
14abd0fb
MK
6677if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6678 echo $ac_n "(cached) $ac_c" 1>&6
6679else
6680 cat > conftest.$ac_ext <<EOF
40a7debc 6681#line 6682 "configure"
14abd0fb
MK
6682#include "confdefs.h"
6683/* System header to define __stub macros and hopefully few prototypes,
6684 which can conflict with char $ac_func(); below. */
6685#include <assert.h>
6686/* Override any gcc2 internal prototype to avoid an error. */
6687/* We use char because int might match the return type of a gcc2
6688 builtin and then its argument prototype would still apply. */
6689char $ac_func();
6690
6691int main() {
6692
6693/* The GNU C library defines this for functions which it implements
6694 to always fail with ENOSYS. Some functions are actually named
6695 something starting with __ and the normal name is an alias. */
6696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6697choke me
6698#else
6699$ac_func();
6700#endif
6701
6702; return 0; }
6703EOF
40a7debc 6704if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6705 rm -rf conftest*
6706 eval "ac_cv_func_$ac_func=yes"
6707else
6708 echo "configure: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
6710 rm -rf conftest*
6711 eval "ac_cv_func_$ac_func=no"
6712fi
6713rm -f conftest*
6714fi
6715
6716if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6717 echo "$ac_t""yes" 1>&6
6718 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6719 cat >> confdefs.h <<EOF
6720#define $ac_tr_func 1
6721EOF
6722
6723else
6724 echo "$ac_t""no" 1>&6
6725fi
6726done
6727
97bf5e38
MK
6728for ac_func in sbrk
6729do
6730echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6731echo "configure:6732: checking for $ac_func" >&5
97bf5e38 6732if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6733 echo $ac_n "(cached) $ac_c" 1>&6
6734else
6735 cat > conftest.$ac_ext <<EOF
40a7debc 6736#line 6737 "configure"
c906108c 6737#include "confdefs.h"
97bf5e38
MK
6738/* System header to define __stub macros and hopefully few prototypes,
6739 which can conflict with char $ac_func(); below. */
6740#include <assert.h>
6741/* Override any gcc2 internal prototype to avoid an error. */
6742/* We use char because int might match the return type of a gcc2
6743 builtin and then its argument prototype would still apply. */
6744char $ac_func();
c906108c 6745
97bf5e38
MK
6746int main() {
6747
6748/* The GNU C library defines this for functions which it implements
6749 to always fail with ENOSYS. Some functions are actually named
6750 something starting with __ and the normal name is an alias. */
6751#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6752choke me
c906108c 6753#else
97bf5e38 6754$ac_func();
c906108c 6755#endif
97bf5e38 6756
c906108c
SS
6757; return 0; }
6758EOF
40a7debc 6759if { (eval echo configure:6760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6760 rm -rf conftest*
97bf5e38 6761 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6762else
6763 echo "configure: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 rm -rf conftest*
97bf5e38 6766 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6767fi
6768rm -f conftest*
6769fi
6770
97bf5e38
MK
6771if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6772 echo "$ac_t""yes" 1>&6
6773 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6774 cat >> confdefs.h <<EOF
6775#define $ac_tr_func 1
c906108c 6776EOF
97bf5e38
MK
6777
6778else
6779 echo "$ac_t""no" 1>&6
c906108c 6780fi
97bf5e38 6781done
c906108c 6782
97bf5e38
MK
6783for ac_func in setpgid setpgrp
6784do
6785echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6786echo "configure:6787: checking for $ac_func" >&5
97bf5e38 6787if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6788 echo $ac_n "(cached) $ac_c" 1>&6
6789else
6790 cat > conftest.$ac_ext <<EOF
40a7debc 6791#line 6792 "configure"
c906108c 6792#include "confdefs.h"
97bf5e38
MK
6793/* System header to define __stub macros and hopefully few prototypes,
6794 which can conflict with char $ac_func(); below. */
6795#include <assert.h>
6796/* Override any gcc2 internal prototype to avoid an error. */
6797/* We use char because int might match the return type of a gcc2
6798 builtin and then its argument prototype would still apply. */
6799char $ac_func();
c906108c 6800
97bf5e38
MK
6801int main() {
6802
6803/* The GNU C library defines this for functions which it implements
6804 to always fail with ENOSYS. Some functions are actually named
6805 something starting with __ and the normal name is an alias. */
6806#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6807choke me
c906108c 6808#else
97bf5e38 6809$ac_func();
c906108c 6810#endif
97bf5e38 6811
c906108c
SS
6812; return 0; }
6813EOF
40a7debc 6814if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6815 rm -rf conftest*
97bf5e38 6816 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6817else
6818 echo "configure: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6820 rm -rf conftest*
97bf5e38 6821 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6822fi
6823rm -f conftest*
6824fi
6825
97bf5e38
MK
6826if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6827 echo "$ac_t""yes" 1>&6
6828 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6829 cat >> confdefs.h <<EOF
6830#define $ac_tr_func 1
c906108c 6831EOF
97bf5e38
MK
6832
6833else
6834 echo "$ac_t""no" 1>&6
c906108c 6835fi
97bf5e38 6836done
c906108c 6837
e1ea1d75 6838for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6839do
6840echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6841echo "configure:6842: checking for $ac_func" >&5
97bf5e38 6842if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6843 echo $ac_n "(cached) $ac_c" 1>&6
6844else
6845 cat > conftest.$ac_ext <<EOF
40a7debc 6846#line 6847 "configure"
c906108c 6847#include "confdefs.h"
97bf5e38
MK
6848/* System header to define __stub macros and hopefully few prototypes,
6849 which can conflict with char $ac_func(); below. */
6850#include <assert.h>
6851/* Override any gcc2 internal prototype to avoid an error. */
6852/* We use char because int might match the return type of a gcc2
6853 builtin and then its argument prototype would still apply. */
6854char $ac_func();
c906108c 6855
97bf5e38
MK
6856int main() {
6857
6858/* The GNU C library defines this for functions which it implements
6859 to always fail with ENOSYS. Some functions are actually named
6860 something starting with __ and the normal name is an alias. */
6861#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6862choke me
c906108c 6863#else
97bf5e38 6864$ac_func();
c906108c 6865#endif
97bf5e38 6866
c906108c
SS
6867; return 0; }
6868EOF
40a7debc 6869if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6870 rm -rf conftest*
97bf5e38 6871 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6872else
6873 echo "configure: failed program was:" >&5
6874 cat conftest.$ac_ext >&5
6875 rm -rf conftest*
97bf5e38 6876 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6877fi
6878rm -f conftest*
6879fi
6880
97bf5e38
MK
6881if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6882 echo "$ac_t""yes" 1>&6
6883 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6884 cat >> confdefs.h <<EOF
6885#define $ac_tr_func 1
c906108c 6886EOF
e1ea1d75 6887
97bf5e38
MK
6888else
6889 echo "$ac_t""no" 1>&6
c906108c 6890fi
97bf5e38 6891done
c906108c 6892
97bf5e38
MK
6893for ac_func in socketpair
6894do
6895echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6896echo "configure:6897: checking for $ac_func" >&5
97bf5e38 6897if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6898 echo $ac_n "(cached) $ac_c" 1>&6
6899else
6900 cat > conftest.$ac_ext <<EOF
40a7debc 6901#line 6902 "configure"
c906108c 6902#include "confdefs.h"
97bf5e38
MK
6903/* System header to define __stub macros and hopefully few prototypes,
6904 which can conflict with char $ac_func(); below. */
6905#include <assert.h>
6906/* Override any gcc2 internal prototype to avoid an error. */
6907/* We use char because int might match the return type of a gcc2
6908 builtin and then its argument prototype would still apply. */
6909char $ac_func();
c906108c 6910
97bf5e38
MK
6911int main() {
6912
6913/* The GNU C library defines this for functions which it implements
6914 to always fail with ENOSYS. Some functions are actually named
6915 something starting with __ and the normal name is an alias. */
6916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6917choke me
c906108c 6918#else
97bf5e38 6919$ac_func();
c906108c 6920#endif
97bf5e38 6921
c906108c
SS
6922; return 0; }
6923EOF
40a7debc 6924if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6925 rm -rf conftest*
97bf5e38 6926 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6927else
6928 echo "configure: failed program was:" >&5
6929 cat conftest.$ac_ext >&5
6930 rm -rf conftest*
97bf5e38 6931 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6932fi
6933rm -f conftest*
6934fi
6935
97bf5e38
MK
6936if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6937 echo "$ac_t""yes" 1>&6
6938 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6939 cat >> confdefs.h <<EOF
6940#define $ac_tr_func 1
c906108c 6941EOF
97bf5e38
MK
6942
6943else
6944 echo "$ac_t""no" 1>&6
c906108c 6945fi
97bf5e38 6946done
c906108c 6947
b757528f
JJ
6948for ac_func in syscall
6949do
6950echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
40a7debc 6951echo "configure:6952: checking for $ac_func" >&5
b757528f
JJ
6952if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6953 echo $ac_n "(cached) $ac_c" 1>&6
6954else
6955 cat > conftest.$ac_ext <<EOF
40a7debc 6956#line 6957 "configure"
b757528f
JJ
6957#include "confdefs.h"
6958/* System header to define __stub macros and hopefully few prototypes,
6959 which can conflict with char $ac_func(); below. */
6960#include <assert.h>
6961/* Override any gcc2 internal prototype to avoid an error. */
6962/* We use char because int might match the return type of a gcc2
6963 builtin and then its argument prototype would still apply. */
6964char $ac_func();
6965
6966int main() {
6967
6968/* The GNU C library defines this for functions which it implements
6969 to always fail with ENOSYS. Some functions are actually named
6970 something starting with __ and the normal name is an alias. */
6971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6972choke me
6973#else
6974$ac_func();
6975#endif
6976
6977; return 0; }
6978EOF
40a7debc 6979if { (eval echo configure:6980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
6980 rm -rf conftest*
6981 eval "ac_cv_func_$ac_func=yes"
6982else
6983 echo "configure: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 rm -rf conftest*
6986 eval "ac_cv_func_$ac_func=no"
6987fi
6988rm -f conftest*
6989fi
6990
6991if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6992 echo "$ac_t""yes" 1>&6
6993 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6994 cat >> confdefs.h <<EOF
6995#define $ac_tr_func 1
6996EOF
6997
6998else
6999 echo "$ac_t""no" 1>&6
7000fi
7001done
7002
97bf5e38
MK
7003
7004if test "$cross_compiling" = no; then
7005 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
40a7debc 7006echo "configure:7007: checking whether setpgrp takes no argument" >&5
97bf5e38 7007if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7008 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7009else
7010 if test "$cross_compiling" = yes; then
7011 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7012else
7013 cat > conftest.$ac_ext <<EOF
40a7debc 7014#line 7015 "configure"
c906108c
SS
7015#include "confdefs.h"
7016
c906108c
SS
7017#ifdef HAVE_UNISTD_H
7018#include <unistd.h>
7019#endif
97bf5e38
MK
7020
7021/*
7022 * If this system has a BSD-style setpgrp, which takes arguments, exit
7023 * successfully.
7024 */
7025main()
7026{
7027 if (setpgrp(1,1) == -1)
7028 exit(0);
7029 else
7030 exit(1);
7031}
7032
c906108c 7033EOF
40a7debc 7034if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7035then
7036 ac_cv_func_setpgrp_void=no
c906108c
SS
7037else
7038 echo "configure: failed program was:" >&5
7039 cat conftest.$ac_ext >&5
97bf5e38
MK
7040 rm -fr conftest*
7041 ac_cv_func_setpgrp_void=yes
c906108c 7042fi
97bf5e38 7043rm -fr conftest*
c906108c
SS
7044fi
7045
97bf5e38
MK
7046
7047fi
7048
7049echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7050if test $ac_cv_func_setpgrp_void = yes; then
7051 cat >> confdefs.h <<\EOF
7052#define SETPGRP_VOID 1
c906108c
SS
7053EOF
7054
7055fi
7056
97bf5e38
MK
7057else
7058 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
40a7debc 7059echo "configure:7060: checking whether setpgrp takes no argument" >&5
97bf5e38 7060if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7061 echo $ac_n "(cached) $ac_c" 1>&6
7062else
7063 cat > conftest.$ac_ext <<EOF
40a7debc 7064#line 7065 "configure"
b83266a0
SS
7065#include "confdefs.h"
7066
b83266a0 7067#include <unistd.h>
97bf5e38 7068
b83266a0 7069int main() {
97bf5e38
MK
7070
7071 if (setpgrp(1,1) == -1)
7072 exit (0);
7073 else
7074 exit (1);
7075
b83266a0
SS
7076; return 0; }
7077EOF
40a7debc 7078if { (eval echo configure:7079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7079 rm -rf conftest*
97bf5e38 7080 ac_cv_func_setpgrp_void=no
b83266a0
SS
7081else
7082 echo "configure: failed program was:" >&5
7083 cat conftest.$ac_ext >&5
7084 rm -rf conftest*
97bf5e38 7085 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7086fi
7087rm -f conftest*
7088fi
7089
97bf5e38
MK
7090echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7091if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7092 cat >> confdefs.h <<\EOF
97bf5e38 7093#define SETPGRP_VOID 1
b83266a0
SS
7094EOF
7095
97bf5e38 7096fi
b83266a0
SS
7097fi
7098
97bf5e38
MK
7099# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7100# since sigsetjmp might only be defined as a macro.
7101echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
40a7debc 7102echo "configure:7103: checking for sigsetjmp" >&5
97bf5e38 7103if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7104 echo $ac_n "(cached) $ac_c" 1>&6
7105else
7106 cat > conftest.$ac_ext <<EOF
40a7debc 7107#line 7108 "configure"
a4db0f07
RH
7108#include "confdefs.h"
7109
97bf5e38
MK
7110#include <setjmp.h>
7111
a4db0f07 7112int main() {
97bf5e38 7113sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7114; return 0; }
7115EOF
40a7debc 7116if { (eval echo configure:7117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7117 rm -rf conftest*
97bf5e38 7118 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7119else
7120 echo "configure: failed program was:" >&5
7121 cat conftest.$ac_ext >&5
7122 rm -rf conftest*
97bf5e38 7123 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7124fi
7125rm -f conftest*
7126fi
7127
97bf5e38
MK
7128echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7129if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7130 cat >> confdefs.h <<\EOF
97bf5e38 7131#define HAVE_SIGSETJMP 1
a4db0f07
RH
7132EOF
7133
7134fi
c906108c 7135
06825bd1
MK
7136# Assume we'll default to using the included libiberty regex.
7137gdb_use_included_regex=yes
7138
7139# However, if the system regex is GNU regex, then default to *not*
7140# using the included regex.
7141echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
40a7debc 7142echo "configure:7143: checking for GNU regex" >&5
06825bd1
MK
7143if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7144 echo $ac_n "(cached) $ac_c" 1>&6
7145else
7146 cat > conftest.$ac_ext <<EOF
40a7debc 7147#line 7148 "configure"
06825bd1
MK
7148#include "confdefs.h"
7149#include <gnu-versions.h>
7150int main() {
7151#define REGEX_INTERFACE_VERSION 1
7152#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7153# error "Version mismatch"
7154#endif
7155; return 0; }
7156EOF
40a7debc 7157if { (eval echo configure:7158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7158 rm -rf conftest*
7159 gdb_cv_have_gnu_regex=yes
7160else
7161 echo "configure: failed program was:" >&5
7162 cat conftest.$ac_ext >&5
7163 rm -rf conftest*
7164 gdb_cv_have_gnu_regex=no
7165fi
7166rm -f conftest*
7167fi
7168
7169echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7170if test $gdb_cv_have_gnu_regex = yes; then
7171 gdb_use_included_regex=no
7172fi
7173
7174# Check whether --with-included-regex or --without-included-regex was given.
7175if test "${with_included_regex+set}" = set; then
7176 withval="$with_included_regex"
7177 gdb_with_regex=$withval
7178else
7179 gdb_with_regex=$gdb_use_included_regex
7180fi
7181
7182if test "$gdb_with_regex" = yes; then
7183 cat >> confdefs.h <<\EOF
7184#define USE_INCLUDED_REGEX 1
7185EOF
7186
7187fi
7188
97bf5e38
MK
7189# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7190# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7191echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
40a7debc 7192echo "configure:7193: checking for r_fs in struct reg" >&5
97bf5e38
MK
7193if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7194 echo $ac_n "(cached) $ac_c" 1>&6
7195else
7196 cat > conftest.$ac_ext <<EOF
40a7debc 7197#line 7198 "configure"
c906108c 7198#include "confdefs.h"
97bf5e38
MK
7199#include <machine/reg.h>
7200int main() {
7201struct reg r; r.r_fs;
7202; return 0; }
c906108c 7203EOF
40a7debc 7204if { (eval echo configure:7205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7205 rm -rf conftest*
97bf5e38 7206 gdb_cv_struct_reg_r_fs=yes
c906108c 7207else
97bf5e38
MK
7208 echo "configure: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
c906108c 7210 rm -rf conftest*
97bf5e38 7211 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7212fi
7213rm -f conftest*
97bf5e38 7214fi
c906108c 7215
97bf5e38
MK
7216echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7217if test $gdb_cv_struct_reg_r_fs = yes; then
7218 cat >> confdefs.h <<\EOF
7219#define HAVE_STRUCT_REG_R_FS 1
7220EOF
7221
7222fi
7223echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
40a7debc 7224echo "configure:7225: checking for r_gs in struct reg" >&5
97bf5e38
MK
7225if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7226 echo $ac_n "(cached) $ac_c" 1>&6
7227else
7228 cat > conftest.$ac_ext <<EOF
40a7debc 7229#line 7230 "configure"
c906108c 7230#include "confdefs.h"
97bf5e38
MK
7231#include <machine/reg.h>
7232int main() {
7233struct reg r; r.r_gs;
7234; return 0; }
c906108c 7235EOF
40a7debc 7236if { (eval echo configure:7237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7237 rm -rf conftest*
97bf5e38 7238 gdb_cv_struct_reg_r_gs=yes
c906108c 7239else
97bf5e38
MK
7240 echo "configure: failed program was:" >&5
7241 cat conftest.$ac_ext >&5
c906108c 7242 rm -rf conftest*
97bf5e38 7243 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7244fi
7245rm -f conftest*
c906108c 7246fi
c906108c 7247
97bf5e38
MK
7248echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7249if test $gdb_cv_struct_reg_r_gs = yes; then
7250 cat >> confdefs.h <<\EOF
7251#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7252EOF
7253
c906108c
SS
7254fi
7255
97bf5e38
MK
7256# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7257echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
40a7debc 7258echo "configure:7259: checking for PTRACE_GETREGS" >&5
97bf5e38 7259if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7260 echo $ac_n "(cached) $ac_c" 1>&6
7261else
7262 cat > conftest.$ac_ext <<EOF
40a7debc 7263#line 7264 "configure"
c906108c 7264#include "confdefs.h"
97bf5e38 7265#include <sys/ptrace.h>
c906108c 7266int main() {
97bf5e38 7267PTRACE_GETREGS;
c906108c
SS
7268; return 0; }
7269EOF
40a7debc 7270if { (eval echo configure:7271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7271 rm -rf conftest*
97bf5e38 7272 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7273else
7274 echo "configure: failed program was:" >&5
7275 cat conftest.$ac_ext >&5
7276 rm -rf conftest*
97bf5e38 7277 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7278fi
7279rm -f conftest*
7280fi
7281
97bf5e38
MK
7282echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7283if test $gdb_cv_have_ptrace_getregs = yes; then
7284 cat >> confdefs.h <<\EOF
7285#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7286EOF
7287
97bf5e38 7288fi
c906108c 7289
97bf5e38
MK
7290# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7291echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
40a7debc 7292echo "configure:7293: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7293if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7294 echo $ac_n "(cached) $ac_c" 1>&6
7295else
7296 cat > conftest.$ac_ext <<EOF
40a7debc 7297#line 7298 "configure"
c906108c 7298#include "confdefs.h"
97bf5e38 7299#include <sys/ptrace.h>
c906108c 7300int main() {
97bf5e38 7301PTRACE_GETFPXREGS;
c906108c
SS
7302; return 0; }
7303EOF
40a7debc 7304if { (eval echo configure:7305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7305 rm -rf conftest*
97bf5e38 7306 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7307else
7308 echo "configure: failed program was:" >&5
7309 cat conftest.$ac_ext >&5
7310 rm -rf conftest*
97bf5e38 7311 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7312fi
7313rm -f conftest*
7314fi
7315
97bf5e38
MK
7316echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7317if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7318 cat >> confdefs.h <<\EOF
7319#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7320EOF
7321
97bf5e38 7322fi
c906108c 7323
97bf5e38
MK
7324# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7325echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
40a7debc 7326echo "configure:7327: checking for PT_GETDBREGS" >&5
97bf5e38 7327if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7328 echo $ac_n "(cached) $ac_c" 1>&6
7329else
7330 cat > conftest.$ac_ext <<EOF
40a7debc 7331#line 7332 "configure"
c906108c 7332#include "confdefs.h"
97bf5e38
MK
7333#include <sys/types.h>
7334#include <sys/ptrace.h>
c906108c 7335int main() {
97bf5e38 7336PT_GETDBREGS;
c906108c
SS
7337; return 0; }
7338EOF
40a7debc 7339if { (eval echo configure:7340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7340 rm -rf conftest*
97bf5e38 7341 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7342else
7343 echo "configure: failed program was:" >&5
7344 cat conftest.$ac_ext >&5
7345 rm -rf conftest*
97bf5e38 7346 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7347fi
7348rm -f conftest*
7349fi
7350
97bf5e38
MK
7351echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7352if test $gdb_cv_have_pt_getdbregs = yes; then
7353 cat >> confdefs.h <<\EOF
7354#define HAVE_PT_GETDBREGS 1
c906108c
SS
7355EOF
7356
97bf5e38 7357fi
c906108c 7358
97bf5e38
MK
7359# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7360echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
40a7debc 7361echo "configure:7362: checking for PT_GETXMMREGS" >&5
97bf5e38 7362if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7363 echo $ac_n "(cached) $ac_c" 1>&6
7364else
7365 cat > conftest.$ac_ext <<EOF
40a7debc 7366#line 7367 "configure"
c906108c 7367#include "confdefs.h"
97bf5e38
MK
7368#include <sys/types.h>
7369#include <sys/ptrace.h>
c906108c 7370int main() {
97bf5e38 7371PT_GETXMMREGS;
c906108c
SS
7372; return 0; }
7373EOF
40a7debc 7374if { (eval echo configure:7375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7375 rm -rf conftest*
97bf5e38 7376 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7377else
7378 echo "configure: failed program was:" >&5
7379 cat conftest.$ac_ext >&5
7380 rm -rf conftest*
97bf5e38 7381 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7382fi
7383rm -f conftest*
7384fi
7385
97bf5e38
MK
7386echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7387if test $gdb_cv_have_pt_getxmmregs = yes; then
7388 cat >> confdefs.h <<\EOF
7389#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7390EOF
7391
97bf5e38 7392fi
c906108c 7393
27ca5dad 7394# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7395# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7396echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
40a7debc 7397echo "configure:7398: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7398if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7399 echo $ac_n "(cached) $ac_c" 1>&6
7400else
7401 cat > conftest.$ac_ext <<EOF
40a7debc 7402#line 7403 "configure"
27ca5dad
MC
7403#include "confdefs.h"
7404#include <stdint.h>
7405int main() {
7406uintptr_t foo = 0;
7407; return 0; }
7408EOF
40a7debc 7409if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7410 rm -rf conftest*
7411 gdb_cv_have_uintptr_t=yes
7412else
7413 echo "configure: failed program was:" >&5
7414 cat conftest.$ac_ext >&5
7415 rm -rf conftest*
7416 gdb_cv_have_uintptr_t=no
7417fi
7418rm -f conftest*
7419fi
7420
7421echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7422if test $gdb_cv_have_uintptr_t = yes; then
7423 cat >> confdefs.h <<\EOF
7424#define HAVE_UINTPTR_T 1
7425EOF
7426
7427fi
97bf5e38
MK
7428
7429echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
40a7debc 7430echo "configure:7431: checking whether malloc must be declared" >&5
97bf5e38 7431if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7432 echo $ac_n "(cached) $ac_c" 1>&6
7433else
7434 cat > conftest.$ac_ext <<EOF
40a7debc 7435#line 7436 "configure"
3862412b 7436#include "confdefs.h"
e17bf198 7437
97bf5e38
MK
7438#include <stdio.h>
7439#ifdef HAVE_STRING_H
7440#include <string.h>
7441#else
7442#ifdef HAVE_STRINGS_H
7443#include <strings.h>
7444#endif
7445#endif
7446#ifdef HAVE_STDLIB_H
7447#include <stdlib.h>
7448#endif
7449#ifdef HAVE_UNISTD_H
7450#include <unistd.h>
7451#endif
3862412b 7452int main() {
97bf5e38 7453char *(*pfn) = (char *(*)) malloc
3862412b
MK
7454; return 0; }
7455EOF
40a7debc 7456if { (eval echo configure:7457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7457 rm -rf conftest*
97bf5e38 7458 bfd_cv_decl_needed_malloc=no
3862412b
MK
7459else
7460 echo "configure: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7462 rm -rf conftest*
97bf5e38 7463 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7464fi
7465rm -f conftest*
7466fi
7467
97bf5e38
MK
7468echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7469if test $bfd_cv_decl_needed_malloc = yes; then
7470 cat >> confdefs.h <<\EOF
7471#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7472EOF
7473
97bf5e38 7474fi
3862412b 7475
97bf5e38 7476echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
40a7debc 7477echo "configure:7478: checking whether realloc must be declared" >&5
97bf5e38 7478if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7479 echo $ac_n "(cached) $ac_c" 1>&6
7480else
7481 cat > conftest.$ac_ext <<EOF
40a7debc 7482#line 7483 "configure"
3862412b 7483#include "confdefs.h"
e17bf198 7484
97bf5e38
MK
7485#include <stdio.h>
7486#ifdef HAVE_STRING_H
7487#include <string.h>
7488#else
7489#ifdef HAVE_STRINGS_H
7490#include <strings.h>
7491#endif
7492#endif
7493#ifdef HAVE_STDLIB_H
7494#include <stdlib.h>
7495#endif
7496#ifdef HAVE_UNISTD_H
7497#include <unistd.h>
7498#endif
3862412b 7499int main() {
97bf5e38 7500char *(*pfn) = (char *(*)) realloc
3862412b
MK
7501; return 0; }
7502EOF
40a7debc 7503if { (eval echo configure:7504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7504 rm -rf conftest*
97bf5e38 7505 bfd_cv_decl_needed_realloc=no
3862412b
MK
7506else
7507 echo "configure: failed program was:" >&5
7508 cat conftest.$ac_ext >&5
7509 rm -rf conftest*
97bf5e38 7510 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7511fi
7512rm -f conftest*
7513fi
7514
97bf5e38
MK
7515echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7516if test $bfd_cv_decl_needed_realloc = yes; then
7517 cat >> confdefs.h <<\EOF
7518#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7519EOF
7520
97bf5e38 7521fi
3862412b 7522
97bf5e38 7523echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
40a7debc 7524echo "configure:7525: checking whether free must be declared" >&5
97bf5e38 7525if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7526 echo $ac_n "(cached) $ac_c" 1>&6
7527else
7528 cat > conftest.$ac_ext <<EOF
40a7debc 7529#line 7530 "configure"
451928c5 7530#include "confdefs.h"
e17bf198 7531
97bf5e38
MK
7532#include <stdio.h>
7533#ifdef HAVE_STRING_H
7534#include <string.h>
7535#else
7536#ifdef HAVE_STRINGS_H
7537#include <strings.h>
7538#endif
7539#endif
7540#ifdef HAVE_STDLIB_H
7541#include <stdlib.h>
7542#endif
7543#ifdef HAVE_UNISTD_H
7544#include <unistd.h>
7545#endif
451928c5 7546int main() {
97bf5e38 7547char *(*pfn) = (char *(*)) free
451928c5
AC
7548; return 0; }
7549EOF
40a7debc 7550if { (eval echo configure:7551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7551 rm -rf conftest*
97bf5e38 7552 bfd_cv_decl_needed_free=no
451928c5
AC
7553else
7554 echo "configure: failed program was:" >&5
7555 cat conftest.$ac_ext >&5
7556 rm -rf conftest*
97bf5e38 7557 bfd_cv_decl_needed_free=yes
451928c5
AC
7558fi
7559rm -f conftest*
7560fi
7561
97bf5e38
MK
7562echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7563if test $bfd_cv_decl_needed_free = yes; then
7564 cat >> confdefs.h <<\EOF
7565#define NEED_DECLARATION_FREE 1
451928c5
AC
7566EOF
7567
97bf5e38 7568fi
451928c5 7569
97bf5e38 7570echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
40a7debc 7571echo "configure:7572: checking whether strerror must be declared" >&5
97bf5e38 7572if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7573 echo $ac_n "(cached) $ac_c" 1>&6
7574else
7575 cat > conftest.$ac_ext <<EOF
40a7debc 7576#line 7577 "configure"
451928c5 7577#include "confdefs.h"
e17bf198 7578
97bf5e38
MK
7579#include <stdio.h>
7580#ifdef HAVE_STRING_H
7581#include <string.h>
7582#else
7583#ifdef HAVE_STRINGS_H
7584#include <strings.h>
7585#endif
7586#endif
7587#ifdef HAVE_STDLIB_H
7588#include <stdlib.h>
7589#endif
7590#ifdef HAVE_UNISTD_H
7591#include <unistd.h>
7592#endif
451928c5 7593int main() {
97bf5e38 7594char *(*pfn) = (char *(*)) strerror
451928c5
AC
7595; return 0; }
7596EOF
40a7debc 7597if { (eval echo configure:7598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7598 rm -rf conftest*
97bf5e38 7599 bfd_cv_decl_needed_strerror=no
451928c5
AC
7600else
7601 echo "configure: failed program was:" >&5
7602 cat conftest.$ac_ext >&5
7603 rm -rf conftest*
97bf5e38 7604 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7605fi
7606rm -f conftest*
7607fi
7608
97bf5e38
MK
7609echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7610if test $bfd_cv_decl_needed_strerror = yes; then
7611 cat >> confdefs.h <<\EOF
7612#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7613EOF
7614
97bf5e38 7615fi
451928c5 7616
97bf5e38 7617echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
40a7debc 7618echo "configure:7619: checking whether strdup must be declared" >&5
97bf5e38 7619if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7620 echo $ac_n "(cached) $ac_c" 1>&6
7621else
7622 cat > conftest.$ac_ext <<EOF
40a7debc 7623#line 7624 "configure"
3862412b 7624#include "confdefs.h"
e17bf198 7625
97bf5e38
MK
7626#include <stdio.h>
7627#ifdef HAVE_STRING_H
7628#include <string.h>
7629#else
7630#ifdef HAVE_STRINGS_H
7631#include <strings.h>
7632#endif
7633#endif
7634#ifdef HAVE_STDLIB_H
7635#include <stdlib.h>
7636#endif
7637#ifdef HAVE_UNISTD_H
7638#include <unistd.h>
7639#endif
3862412b 7640int main() {
97bf5e38 7641char *(*pfn) = (char *(*)) strdup
3862412b
MK
7642; return 0; }
7643EOF
40a7debc 7644if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7645 rm -rf conftest*
97bf5e38 7646 bfd_cv_decl_needed_strdup=no
3862412b
MK
7647else
7648 echo "configure: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7650 rm -rf conftest*
97bf5e38 7651 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7652fi
7653rm -f conftest*
7654fi
7655
97bf5e38
MK
7656echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7657if test $bfd_cv_decl_needed_strdup = yes; then
7658 cat >> confdefs.h <<\EOF
7659#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7660EOF
7661
97bf5e38 7662fi
3862412b 7663
97bf5e38 7664echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
40a7debc 7665echo "configure:7666: checking whether strstr must be declared" >&5
97bf5e38 7666if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7667 echo $ac_n "(cached) $ac_c" 1>&6
7668else
7669 cat > conftest.$ac_ext <<EOF
40a7debc 7670#line 7671 "configure"
3862412b 7671#include "confdefs.h"
e17bf198 7672
97bf5e38
MK
7673#include <stdio.h>
7674#ifdef HAVE_STRING_H
7675#include <string.h>
7676#else
7677#ifdef HAVE_STRINGS_H
7678#include <strings.h>
7679#endif
7680#endif
7681#ifdef HAVE_STDLIB_H
7682#include <stdlib.h>
7683#endif
7684#ifdef HAVE_UNISTD_H
7685#include <unistd.h>
7686#endif
3862412b 7687int main() {
97bf5e38 7688char *(*pfn) = (char *(*)) strstr
3862412b
MK
7689; return 0; }
7690EOF
40a7debc 7691if { (eval echo configure:7692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7692 rm -rf conftest*
97bf5e38 7693 bfd_cv_decl_needed_strstr=no
3862412b
MK
7694else
7695 echo "configure: failed program was:" >&5
7696 cat conftest.$ac_ext >&5
7697 rm -rf conftest*
97bf5e38 7698 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7699fi
7700rm -f conftest*
7701fi
7702
97bf5e38
MK
7703echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7704if test $bfd_cv_decl_needed_strstr = yes; then
7705 cat >> confdefs.h <<\EOF
7706#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7707EOF
7708
97bf5e38 7709fi
3862412b 7710
97bf5e38 7711echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
40a7debc 7712echo "configure:7713: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7713if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7714 echo $ac_n "(cached) $ac_c" 1>&6
7715else
7716 cat > conftest.$ac_ext <<EOF
40a7debc 7717#line 7718 "configure"
596c9d4b
KB
7718#include "confdefs.h"
7719
97bf5e38
MK
7720#include <stdio.h>
7721#ifdef HAVE_STRING_H
7722#include <string.h>
7723#else
7724#ifdef HAVE_STRINGS_H
7725#include <strings.h>
7726#endif
7727#endif
7728#ifdef HAVE_STDLIB_H
7729#include <stdlib.h>
7730#endif
7731#ifdef HAVE_UNISTD_H
7732#include <unistd.h>
7733#endif
596c9d4b 7734int main() {
97bf5e38 7735char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7736; return 0; }
7737EOF
40a7debc 7738if { (eval echo configure:7739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7739 rm -rf conftest*
97bf5e38 7740 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7741else
7742 echo "configure: failed program was:" >&5
7743 cat conftest.$ac_ext >&5
7744 rm -rf conftest*
97bf5e38 7745 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7746fi
7747rm -f conftest*
7748fi
7749
97bf5e38
MK
7750echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7751if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7752 cat >> confdefs.h <<\EOF
7753#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7754EOF
7755
97bf5e38 7756fi
596c9d4b 7757
97bf5e38
MK
7758
7759# The following save_state_t checkery is only necessary for HPUX
7760# versions earlier than 10.20. When those fade from memory, this
7761# could be expunged. --jsm 1999-03-22
7762
7763echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
40a7debc 7764echo "configure:7765: checking for HPUX save_state structure" >&5
97bf5e38 7765cat > conftest.$ac_ext <<EOF
40a7debc 7766#line 7767 "configure"
97bf5e38
MK
7767#include "confdefs.h"
7768#include <machine/save_state.h>
7769EOF
7770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7771 egrep "save_state_t" >/dev/null 2>&1; then
7772 rm -rf conftest*
7773 gdb_cv_hpux_savestate=yes
7774else
7775 rm -rf conftest*
7776 gdb_cv_hpux_savestate=no
7777fi
7778rm -f conftest*
7779
7780cat > conftest.$ac_ext <<EOF
40a7debc 7781#line 7782 "configure"
97bf5e38
MK
7782#include "confdefs.h"
7783#include <machine/save_state.h>
7784EOF
7785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7786 egrep "ss_wide" >/dev/null 2>&1; then
7787 rm -rf conftest*
7788 gdb_cv_hpux_sswide=yes
7789else
7790 rm -rf conftest*
7791 gdb_cv_hpux_sswide=no
7792fi
7793rm -f conftest*
7794
7795if test $gdb_cv_hpux_savestate = yes
7796then
7797 cat >> confdefs.h <<\EOF
7798#define HAVE_STRUCT_SAVE_STATE_T 1
7799EOF
7800
7801fi
7802if test $gdb_cv_hpux_sswide = yes
7803then
7804 cat >> confdefs.h <<\EOF
7805#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7806EOF
7807
7808fi
7809echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7810
7811
7812# If we are configured native on GNU/Linux, work around problems with
7813# sys/procfs.h
7814# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7815
7816if test "${target}" = "${host}"; then
7817 case "${host}" in
7818 i[3456]86-*-linux*)
7819 cat >> confdefs.h <<\EOF
7820#define START_INFERIOR_TRAPS_EXPECTED 2
7821EOF
7822
7823 cat >> confdefs.h <<\EOF
7824#define sys_quotactl 1
7825EOF
7826
7827 ;;
7828 ia64-*-aix*)
7829 cat >> confdefs.h <<\EOF
7830#define NEW_PROC_API 1
7831EOF
7832
7833 ;;
7834 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7835 cat >> confdefs.h <<\EOF
7836#define NEW_PROC_API 1
7837EOF
7838
7839 ;;
7840 *-*-solaris2.[678])
7841 cat >> confdefs.h <<\EOF
7842#define NEW_PROC_API 1
7843EOF
7844
7845 ;;
7846 esac
7847fi
7848
7849if test "$ac_cv_header_sys_procfs_h" = yes; then
7850 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 7851echo "configure:7852: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7852 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7853 echo $ac_n "(cached) $ac_c" 1>&6
7854else
7855 cat > conftest.$ac_ext <<EOF
40a7debc 7856#line 7857 "configure"
596c9d4b
KB
7857#include "confdefs.h"
7858
7859#define _SYSCALL32
7860#include <sys/procfs.h>
7861int main() {
97bf5e38 7862pstatus_t avar
596c9d4b
KB
7863; return 0; }
7864EOF
40a7debc 7865if { (eval echo configure:7866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7866 rm -rf conftest*
97bf5e38 7867 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7868else
7869 echo "configure: failed program was:" >&5
7870 cat conftest.$ac_ext >&5
7871 rm -rf conftest*
97bf5e38 7872 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7873
7874fi
7875rm -f conftest*
7876fi
7877
97bf5e38 7878 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7879 cat >> confdefs.h <<\EOF
97bf5e38 7880#define HAVE_PSTATUS_T 1
596c9d4b
KB
7881EOF
7882
7883 fi
97bf5e38 7884 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7885
97bf5e38 7886 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 7887echo "configure:7888: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7888 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7889 echo $ac_n "(cached) $ac_c" 1>&6
7890else
7891 cat > conftest.$ac_ext <<EOF
40a7debc 7892#line 7893 "configure"
596c9d4b
KB
7893#include "confdefs.h"
7894
7895#define _SYSCALL32
7896#include <sys/procfs.h>
7897int main() {
97bf5e38 7898prrun_t avar
596c9d4b
KB
7899; return 0; }
7900EOF
40a7debc 7901if { (eval echo configure:7902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7902 rm -rf conftest*
97bf5e38 7903 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7904else
7905 echo "configure: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 rm -rf conftest*
97bf5e38 7908 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7909
7910fi
7911rm -f conftest*
7912fi
7913
97bf5e38 7914 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7915 cat >> confdefs.h <<\EOF
97bf5e38 7916#define HAVE_PRRUN_T 1
596c9d4b
KB
7917EOF
7918
7919 fi
97bf5e38 7920 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7921
97bf5e38 7922 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 7923echo "configure:7924: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7924 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7925 echo $ac_n "(cached) $ac_c" 1>&6
7926else
7927 cat > conftest.$ac_ext <<EOF
40a7debc 7928#line 7929 "configure"
596c9d4b
KB
7929#include "confdefs.h"
7930
7931#define _SYSCALL32
7932#include <sys/procfs.h>
7933int main() {
97bf5e38 7934gregset_t avar
596c9d4b
KB
7935; return 0; }
7936EOF
40a7debc 7937if { (eval echo configure:7938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7938 rm -rf conftest*
97bf5e38 7939 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7940else
7941 echo "configure: failed program was:" >&5
7942 cat conftest.$ac_ext >&5
7943 rm -rf conftest*
97bf5e38 7944 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7945
7946fi
7947rm -f conftest*
7948fi
7949
97bf5e38 7950 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7951 cat >> confdefs.h <<\EOF
97bf5e38 7952#define HAVE_GREGSET_T 1
596c9d4b
KB
7953EOF
7954
7955 fi
97bf5e38 7956 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7957
97bf5e38 7958 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 7959echo "configure:7960: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7960 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7961 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7962else
7963 cat > conftest.$ac_ext <<EOF
40a7debc 7964#line 7965 "configure"
d84dd0c5 7965#include "confdefs.h"
97bf5e38
MK
7966
7967#define _SYSCALL32
d84dd0c5 7968#include <sys/procfs.h>
97bf5e38
MK
7969int main() {
7970fpregset_t avar
7971; return 0; }
d84dd0c5 7972EOF
40a7debc 7973if { (eval echo configure:7974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7974 rm -rf conftest*
7975 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7976else
7977 echo "configure: failed program was:" >&5
7978 cat conftest.$ac_ext >&5
97bf5e38
MK
7979 rm -rf conftest*
7980 bfd_cv_have_sys_procfs_type_fpregset_t=no
7981
d84dd0c5 7982fi
97bf5e38 7983rm -f conftest*
d84dd0c5
MK
7984fi
7985
97bf5e38
MK
7986 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7987 cat >> confdefs.h <<\EOF
7988#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7989EOF
7990
97bf5e38
MK
7991 fi
7992 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7993
97bf5e38 7994 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 7995echo "configure:7996: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7996 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7997 echo $ac_n "(cached) $ac_c" 1>&6
7998else
7999 cat > conftest.$ac_ext <<EOF
40a7debc 8000#line 8001 "configure"
c906108c 8001#include "confdefs.h"
c906108c 8002
97bf5e38
MK
8003#define _SYSCALL32
8004#include <sys/procfs.h>
c906108c 8005int main() {
97bf5e38 8006prgregset_t avar
c906108c
SS
8007; return 0; }
8008EOF
40a7debc 8009if { (eval echo configure:8010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8010 rm -rf conftest*
97bf5e38 8011 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8012else
8013 echo "configure: failed program was:" >&5
8014 cat conftest.$ac_ext >&5
8015 rm -rf conftest*
97bf5e38
MK
8016 bfd_cv_have_sys_procfs_type_prgregset_t=no
8017
c906108c
SS
8018fi
8019rm -f conftest*
8020fi
8021
97bf5e38
MK
8022 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8023 cat >> confdefs.h <<\EOF
8024#define HAVE_PRGREGSET_T 1
c906108c
SS
8025EOF
8026
97bf5e38
MK
8027 fi
8028 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8029
97bf5e38 8030 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8031echo "configure:8032: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8032 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8033 echo $ac_n "(cached) $ac_c" 1>&6
8034else
8035 cat > conftest.$ac_ext <<EOF
40a7debc 8036#line 8037 "configure"
d45fe813 8037#include "confdefs.h"
97bf5e38
MK
8038
8039#define _SYSCALL32
8040#include <sys/procfs.h>
d45fe813 8041int main() {
97bf5e38 8042prfpregset_t avar
d45fe813
KB
8043; return 0; }
8044EOF
40a7debc 8045if { (eval echo configure:8046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8046 rm -rf conftest*
97bf5e38 8047 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8048else
8049 echo "configure: failed program was:" >&5
8050 cat conftest.$ac_ext >&5
8051 rm -rf conftest*
97bf5e38
MK
8052 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8053
d45fe813
KB
8054fi
8055rm -f conftest*
8056fi
8057
97bf5e38
MK
8058 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8059 cat >> confdefs.h <<\EOF
8060#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8061EOF
8062
97bf5e38
MK
8063 fi
8064 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8065
97bf5e38 8066 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8067echo "configure:8068: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8068 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8069 echo $ac_n "(cached) $ac_c" 1>&6
8070else
8071 cat > conftest.$ac_ext <<EOF
40a7debc 8072#line 8073 "configure"
d45fe813 8073#include "confdefs.h"
97bf5e38
MK
8074
8075#define _SYSCALL32
8076#include <sys/procfs.h>
d45fe813 8077int main() {
97bf5e38 8078prgregset32_t avar
d45fe813
KB
8079; return 0; }
8080EOF
40a7debc 8081if { (eval echo configure:8082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8082 rm -rf conftest*
97bf5e38 8083 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8084else
8085 echo "configure: failed program was:" >&5
8086 cat conftest.$ac_ext >&5
8087 rm -rf conftest*
97bf5e38
MK
8088 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8089
d45fe813
KB
8090fi
8091rm -f conftest*
8092fi
8093
97bf5e38
MK
8094 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8095 cat >> confdefs.h <<\EOF
8096#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8097EOF
8098
97bf5e38
MK
8099 fi
8100 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8101
97bf5e38 8102 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8103echo "configure:8104: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8104 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8105 echo $ac_n "(cached) $ac_c" 1>&6
8106else
8107 cat > conftest.$ac_ext <<EOF
40a7debc 8108#line 8109 "configure"
d45fe813 8109#include "confdefs.h"
97bf5e38
MK
8110
8111#define _SYSCALL32
8112#include <sys/procfs.h>
d45fe813 8113int main() {
97bf5e38 8114prfpregset32_t avar
d45fe813
KB
8115; return 0; }
8116EOF
40a7debc 8117if { (eval echo configure:8118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8118 rm -rf conftest*
97bf5e38 8119 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8120else
8121 echo "configure: failed program was:" >&5
8122 cat conftest.$ac_ext >&5
8123 rm -rf conftest*
97bf5e38
MK
8124 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8125
d45fe813
KB
8126fi
8127rm -f conftest*
8128fi
8129
97bf5e38
MK
8130 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8131 cat >> confdefs.h <<\EOF
8132#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8133EOF
8134
97bf5e38
MK
8135 fi
8136 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8137
97bf5e38 8138 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8139echo "configure:8140: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8140 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8141 echo $ac_n "(cached) $ac_c" 1>&6
8142else
8143 cat > conftest.$ac_ext <<EOF
40a7debc 8144#line 8145 "configure"
d45fe813 8145#include "confdefs.h"
97bf5e38 8146
d45fe813 8147#define _SYSCALL32
97bf5e38 8148#include <sys/procfs.h>
d45fe813 8149int main() {
97bf5e38 8150lwpid_t avar
d45fe813
KB
8151; return 0; }
8152EOF
40a7debc 8153if { (eval echo configure:8154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8154 rm -rf conftest*
97bf5e38 8155 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8156else
8157 echo "configure: failed program was:" >&5
8158 cat conftest.$ac_ext >&5
8159 rm -rf conftest*
97bf5e38
MK
8160 bfd_cv_have_sys_procfs_type_lwpid_t=no
8161
d45fe813
KB
8162fi
8163rm -f conftest*
8164fi
8165
97bf5e38
MK
8166 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8167 cat >> confdefs.h <<\EOF
8168#define HAVE_LWPID_T 1
d45fe813
KB
8169EOF
8170
97bf5e38
MK
8171 fi
8172 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8173
97bf5e38 8174 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8175echo "configure:8176: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8176 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8177 echo $ac_n "(cached) $ac_c" 1>&6
8178else
8179 cat > conftest.$ac_ext <<EOF
40a7debc 8180#line 8181 "configure"
c906108c
SS
8181#include "confdefs.h"
8182
97bf5e38
MK
8183#define _SYSCALL32
8184#include <sys/procfs.h>
c906108c 8185int main() {
97bf5e38 8186psaddr_t avar
c906108c
SS
8187; return 0; }
8188EOF
40a7debc 8189if { (eval echo configure:8190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8190 rm -rf conftest*
97bf5e38 8191 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8192else
8193 echo "configure: failed program was:" >&5
8194 cat conftest.$ac_ext >&5
8195 rm -rf conftest*
97bf5e38
MK
8196 bfd_cv_have_sys_procfs_type_psaddr_t=no
8197
c906108c
SS
8198fi
8199rm -f conftest*
8200fi
8201
97bf5e38
MK
8202 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8203 cat >> confdefs.h <<\EOF
8204#define HAVE_PSADDR_T 1
c906108c
SS
8205EOF
8206
97bf5e38
MK
8207 fi
8208 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8209
97bf5e38 8210 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8211echo "configure:8212: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8212 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8213 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8214else
8215 cat > conftest.$ac_ext <<EOF
40a7debc 8216#line 8217 "configure"
c906108c
SS
8217#include "confdefs.h"
8218
97bf5e38
MK
8219#define _SYSCALL32
8220#include <sys/procfs.h>
8221int main() {
8222prsysent_t avar
8223; return 0; }
c906108c 8224EOF
40a7debc 8225if { (eval echo configure:8226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8226 rm -rf conftest*
8227 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8228else
8229 echo "configure: failed program was:" >&5
8230 cat conftest.$ac_ext >&5
97bf5e38
MK
8231 rm -rf conftest*
8232 bfd_cv_have_sys_procfs_type_prsysent_t=no
8233
c906108c 8234fi
97bf5e38 8235rm -f conftest*
c906108c
SS
8236fi
8237
97bf5e38
MK
8238 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8239 cat >> confdefs.h <<\EOF
8240#define HAVE_PRSYSENT_T 1
c906108c
SS
8241EOF
8242
97bf5e38
MK
8243 fi
8244 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8245
97bf5e38 8246 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8247echo "configure:8248: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8248 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8249 echo $ac_n "(cached) $ac_c" 1>&6
8250else
8251 cat > conftest.$ac_ext <<EOF
40a7debc 8252#line 8253 "configure"
c906108c
SS
8253#include "confdefs.h"
8254
97bf5e38
MK
8255#define _SYSCALL32
8256#include <sys/procfs.h>
c906108c 8257int main() {
97bf5e38 8258pr_sigset_t avar
c906108c
SS
8259; return 0; }
8260EOF
40a7debc 8261if { (eval echo configure:8262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8262 rm -rf conftest*
97bf5e38 8263 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8264else
8265 echo "configure: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 rm -rf conftest*
97bf5e38
MK
8268 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8269
c906108c
SS
8270fi
8271rm -f conftest*
8272fi
8273
97bf5e38
MK
8274 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8275 cat >> confdefs.h <<\EOF
8276#define HAVE_PR_SIGSET_T 1
c906108c
SS
8277EOF
8278
97bf5e38
MK
8279 fi
8280 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8281
97bf5e38 8282 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8283echo "configure:8284: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8284 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8285 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8286else
8287 cat > conftest.$ac_ext <<EOF
40a7debc 8288#line 8289 "configure"
c906108c
SS
8289#include "confdefs.h"
8290
97bf5e38
MK
8291#define _SYSCALL32
8292#include <sys/procfs.h>
8293int main() {
8294pr_sigaction64_t avar
8295; return 0; }
c906108c 8296EOF
40a7debc 8297if { (eval echo configure:8298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8298 rm -rf conftest*
8299 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8300else
8301 echo "configure: failed program was:" >&5
8302 cat conftest.$ac_ext >&5
97bf5e38
MK
8303 rm -rf conftest*
8304 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8305
c906108c 8306fi
97bf5e38 8307rm -f conftest*
c906108c
SS
8308fi
8309
97bf5e38
MK
8310 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8311 cat >> confdefs.h <<\EOF
8312#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8313EOF
8314
97bf5e38
MK
8315 fi
8316 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8317
8318 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8319echo "configure:8320: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8320 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8321 echo $ac_n "(cached) $ac_c" 1>&6
8322else
8323 cat > conftest.$ac_ext <<EOF
40a7debc 8324#line 8325 "configure"
97bf5e38
MK
8325#include "confdefs.h"
8326
8327#define _SYSCALL32
8328#include <sys/procfs.h>
8329int main() {
8330pr_siginfo64_t avar
8331; return 0; }
8332EOF
40a7debc 8333if { (eval echo configure:8334: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8334 rm -rf conftest*
8335 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8336else
8337 echo "configure: failed program was:" >&5
8338 cat conftest.$ac_ext >&5
8339 rm -rf conftest*
8340 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8341
8342fi
8343rm -f conftest*
c906108c 8344fi
c906108c 8345
97bf5e38
MK
8346 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8347 cat >> confdefs.h <<\EOF
8348#define HAVE_PR_SIGINFO64_T 1
8349EOF
c906108c 8350
97bf5e38
MK
8351 fi
8352 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8353
8354
8355
8356
8357
8358 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8359 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
40a7debc 8360echo "configure:8361: checking whether prfpregset_t type is broken" >&5
97bf5e38 8361 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8362 echo $ac_n "(cached) $ac_c" 1>&6
8363else
8364 if test "$cross_compiling" = yes; then
97bf5e38 8365 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8366else
8367 cat > conftest.$ac_ext <<EOF
40a7debc 8368#line 8369 "configure"
c906108c 8369#include "confdefs.h"
97bf5e38
MK
8370#include <sys/procfs.h>
8371 int main ()
8372 {
8373 if (sizeof (prfpregset_t) == sizeof (void *))
8374 return 1;
8375 return 0;
8376 }
c906108c 8377EOF
40a7debc 8378if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8379then
97bf5e38 8380 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8381else
8382 echo "configure: failed program was:" >&5
8383 cat conftest.$ac_ext >&5
8384 rm -fr conftest*
97bf5e38 8385 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8386fi
8387rm -fr conftest*
8388fi
8389
8390fi
8391
97bf5e38
MK
8392 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8393 if test $gdb_cv_prfpregset_t_broken = yes; then
8394 cat >> confdefs.h <<\EOF
8395#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8396EOF
8397
97bf5e38
MK
8398 fi
8399 fi
c906108c 8400
97bf5e38
MK
8401
8402 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
40a7debc 8403echo "configure:8404: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8404 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8405 echo $ac_n "(cached) $ac_c" 1>&6
8406else
8407 cat > conftest.$ac_ext <<EOF
40a7debc 8408#line 8409 "configure"
c906108c 8409#include "confdefs.h"
97bf5e38
MK
8410#include <unistd.h>
8411#include <sys/types.h>
8412#include <sys/procfs.h>
8413
8414int main() {
8415
8416 int dummy;;
8417 dummy = ioctl(0, PIOCSET, &dummy);
8418
8419; return 0; }
c906108c 8420EOF
40a7debc 8421if { (eval echo configure:8422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8422 rm -rf conftest*
97bf5e38 8423 gdb_cv_have_procfs_piocset=yes
c906108c 8424else
c906108c
SS
8425 echo "configure: failed program was:" >&5
8426 cat conftest.$ac_ext >&5
8427 rm -rf conftest*
97bf5e38 8428 gdb_cv_have_procfs_piocset=no
c906108c
SS
8429fi
8430rm -f conftest*
8431fi
97bf5e38
MK
8432
8433 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8434 if test $gdb_cv_have_procfs_piocset = yes; then
8435 cat >> confdefs.h <<\EOF
8436#define HAVE_PROCFS_PIOCSET 1
c906108c 8437EOF
97bf5e38
MK
8438
8439 fi
c906108c 8440fi
c906108c 8441
97bf5e38
MK
8442if test ${host} = ${target} ; then
8443
8444 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
40a7debc 8445echo "configure:8446: checking for member l_addr in struct link_map" >&5
97bf5e38 8446 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8447 echo $ac_n "(cached) $ac_c" 1>&6
8448else
8449 cat > conftest.$ac_ext <<EOF
40a7debc 8450#line 8451 "configure"
c906108c 8451#include "confdefs.h"
97bf5e38 8452#include <link.h>
c906108c 8453int main() {
97bf5e38 8454struct link_map lm; (void) lm.l_addr;
c906108c
SS
8455; return 0; }
8456EOF
40a7debc 8457if { (eval echo configure:8458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8458 rm -rf conftest*
97bf5e38 8459 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8460else
8461 echo "configure: failed program was:" >&5
8462 cat conftest.$ac_ext >&5
8463 rm -rf conftest*
97bf5e38 8464 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8465fi
8466rm -f conftest*
8467fi
8468
97bf5e38
MK
8469 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8470 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8471 cat >> confdefs.h <<\EOF
8472#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8473EOF
97bf5e38
MK
8474
8475 fi
8476
8477
8478 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
40a7debc 8479echo "configure:8480: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8480 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8481 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8482else
97bf5e38 8483 cat > conftest.$ac_ext <<EOF
40a7debc 8484#line 8485 "configure"
97bf5e38
MK
8485#include "confdefs.h"
8486#include <sys/types.h>
8487#include <link.h>
8488int main() {
8489struct link_map lm; (void) lm.lm_addr;
8490; return 0; }
8491EOF
40a7debc 8492if { (eval echo configure:8493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8493 rm -rf conftest*
8494 gdb_cv_have_struct_link_map_with_lm_members=yes
8495else
8496 echo "configure: failed program was:" >&5
8497 cat conftest.$ac_ext >&5
8498 rm -rf conftest*
8499 gdb_cv_have_struct_link_map_with_lm_members=no
8500fi
8501rm -f conftest*
c906108c 8502fi
c906108c 8503
97bf5e38
MK
8504 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8505 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8506 cat >> confdefs.h <<\EOF
8507#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8508EOF
8509
8510 fi
8511
8512
8513 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
40a7debc 8514echo "configure:8515: checking for member som_addr in struct so_map" >&5
97bf5e38 8515 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8516 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8517else
8518 cat > conftest.$ac_ext <<EOF
40a7debc 8519#line 8520 "configure"
c906108c 8520#include "confdefs.h"
97bf5e38
MK
8521#include <sys/types.h>
8522#ifdef HAVE_NLIST_H
8523#include <nlist.h>
8524#endif
8525#include <link.h>
8526int main() {
8527struct so_map lm; (void) lm.som_addr;
8528; return 0; }
8529EOF
40a7debc 8530if { (eval echo configure:8531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8531 rm -rf conftest*
8532 gdb_cv_have_struct_so_map_with_som_members=yes
8533else
8534 echo "configure: failed program was:" >&5
8535 cat conftest.$ac_ext >&5
8536 rm -rf conftest*
8537 gdb_cv_have_struct_so_map_with_som_members=no
8538fi
8539rm -f conftest*
8540fi
c906108c 8541
97bf5e38
MK
8542 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8543 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8544 cat >> confdefs.h <<\EOF
8545#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8546EOF
c906108c 8547
97bf5e38 8548 fi
c906108c 8549
97bf5e38
MK
8550
8551 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
40a7debc 8552echo "configure:8553: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8553 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8554 echo $ac_n "(cached) $ac_c" 1>&6
8555else
8556 cat > conftest.$ac_ext <<EOF
40a7debc 8557#line 8558 "configure"
97bf5e38
MK
8558#include "confdefs.h"
8559#define _SYSCALL32
8560#include <sys/link.h>
8561int main() {
8562struct link_map32 l;
8563; return 0; }
8564EOF
40a7debc 8565if { (eval echo configure:8566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8566 rm -rf conftest*
8567 gdb_cv_have_struct_link_map32=yes
8568else
8569 echo "configure: failed program was:" >&5
8570 cat conftest.$ac_ext >&5
8571 rm -rf conftest*
8572 gdb_cv_have_struct_link_map32=no
8573fi
8574rm -f conftest*
8575fi
c906108c 8576
97bf5e38
MK
8577 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8578 if test $gdb_cv_have_struct_link_map32 = yes; then
8579 cat >> confdefs.h <<\EOF
8580#define HAVE_STRUCT_LINK_MAP32 1
8581EOF
c906108c 8582
97bf5e38
MK
8583 cat >> confdefs.h <<\EOF
8584#define _SYSCALL32 1
8585EOF
c906108c 8586
97bf5e38
MK
8587 fi
8588fi
c906108c 8589
c906108c 8590
97bf5e38 8591echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
40a7debc 8592echo "configure:8593: checking for long long support in compiler" >&5
97bf5e38
MK
8593if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8594 echo $ac_n "(cached) $ac_c" 1>&6
8595else
8596 cat > conftest.$ac_ext <<EOF
40a7debc 8597#line 8598 "configure"
97bf5e38 8598#include "confdefs.h"
c906108c 8599
97bf5e38 8600int main() {
c906108c 8601
97bf5e38
MK
8602 extern long long foo;
8603 switch (foo & 2) { case 0: return 1; }
c906108c 8604
97bf5e38
MK
8605; return 0; }
8606EOF
40a7debc 8607if { (eval echo configure:8608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8608 rm -rf conftest*
8609 gdb_cv_c_long_long=yes
8610else
8611 echo "configure: failed program was:" >&5
8612 cat conftest.$ac_ext >&5
8613 rm -rf conftest*
8614 gdb_cv_c_long_long=no
8615fi
8616rm -f conftest*
8617fi
c906108c 8618
97bf5e38
MK
8619echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8620if test $gdb_cv_c_long_long = yes; then
8621 cat >> confdefs.h <<\EOF
8622#define CC_HAS_LONG_LONG 1
8623EOF
8624
8625fi
8626
8627
8628echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
40a7debc 8629echo "configure:8630: checking for long long support in printf" >&5
97bf5e38
MK
8630if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8631 echo $ac_n "(cached) $ac_c" 1>&6
8632else
8633 if test "$cross_compiling" = yes; then
8634 gdb_cv_printf_has_long_long=no
8635else
8636 cat > conftest.$ac_ext <<EOF
40a7debc 8637#line 8638 "configure"
97bf5e38
MK
8638#include "confdefs.h"
8639
8640int main () {
8641 char buf[32];
8642 long long l = 0;
8643 l = (l << 16) + 0x0123;
8644 l = (l << 16) + 0x4567;
8645 l = (l << 16) + 0x89ab;
8646 l = (l << 16) + 0xcdef;
8647 sprintf (buf, "0x%016llx", l);
8648 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8649}
97bf5e38 8650EOF
40a7debc 8651if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8652then
8653 gdb_cv_printf_has_long_long=yes
8654else
8655 echo "configure: failed program was:" >&5
8656 cat conftest.$ac_ext >&5
8657 rm -fr conftest*
8658 gdb_cv_printf_has_long_long=no
8659fi
8660rm -fr conftest*
8661fi
8662
8663fi
8664
8665if test $gdb_cv_printf_has_long_long = yes; then
8666 cat >> confdefs.h <<\EOF
8667#define PRINTF_HAS_LONG_LONG 1
8668EOF
8669
8670fi
8671echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8672
8673
8674echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
40a7debc 8675echo "configure:8676: checking for long double support in compiler" >&5
97bf5e38
MK
8676if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8677 echo $ac_n "(cached) $ac_c" 1>&6
8678else
8679 cat > conftest.$ac_ext <<EOF
40a7debc 8680#line 8681 "configure"
97bf5e38
MK
8681#include "confdefs.h"
8682
8683int main() {
8684long double foo;
8685; return 0; }
8686EOF
40a7debc 8687if { (eval echo configure:8688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8688 rm -rf conftest*
8689 ac_cv_c_long_double=yes
8690else
8691 echo "configure: failed program was:" >&5
8692 cat conftest.$ac_ext >&5
8693 rm -rf conftest*
8694 ac_cv_c_long_double=no
8695fi
8696rm -f conftest*
8697fi
c906108c 8698
97bf5e38
MK
8699echo "$ac_t""$ac_cv_c_long_double" 1>&6
8700if test $ac_cv_c_long_double = yes; then
8701 cat >> confdefs.h <<\EOF
8702#define HAVE_LONG_DOUBLE 1
c906108c 8703EOF
97bf5e38
MK
8704
8705fi
8706
8707
8708echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
40a7debc 8709echo "configure:8710: checking for long double support in printf" >&5
97bf5e38
MK
8710if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8711 echo $ac_n "(cached) $ac_c" 1>&6
8712else
8713 if test "$cross_compiling" = yes; then
8714 gdb_cv_printf_has_long_double=no
8715else
8716 cat > conftest.$ac_ext <<EOF
40a7debc 8717#line 8718 "configure"
97bf5e38
MK
8718#include "confdefs.h"
8719
8720int main () {
8721 char buf[16];
8722 long double f = 3.141592653;
8723 sprintf (buf, "%Lg", f);
8724 return (strncmp ("3.14159", buf, 7));
8725}
8726EOF
40a7debc 8727if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8728then
97bf5e38 8729 gdb_cv_printf_has_long_double=yes
c906108c
SS
8730else
8731 echo "configure: failed program was:" >&5
8732 cat conftest.$ac_ext >&5
8733 rm -fr conftest*
97bf5e38 8734 gdb_cv_printf_has_long_double=no
c906108c
SS
8735fi
8736rm -fr conftest*
8737fi
8738
8739fi
8740
97bf5e38 8741if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8742 cat >> confdefs.h <<\EOF
97bf5e38
MK
8743#define PRINTF_HAS_LONG_DOUBLE 1
8744EOF
8745
8746fi
8747echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8748
8749
8750echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
40a7debc 8751echo "configure:8752: checking for long double support in scanf" >&5
97bf5e38
MK
8752if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8753 echo $ac_n "(cached) $ac_c" 1>&6
8754else
8755 if test "$cross_compiling" = yes; then
8756 gdb_cv_scanf_has_long_double=no
8757else
8758 cat > conftest.$ac_ext <<EOF
40a7debc 8759#line 8760 "configure"
97bf5e38
MK
8760#include "confdefs.h"
8761
8762int main () {
8763 char *buf = "3.141592653";
8764 long double f = 0;
8765 sscanf (buf, "%Lg", &f);
8766 return !(f > 3.14159 && f < 3.14160);
8767}
c906108c 8768EOF
40a7debc 8769if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8770then
8771 gdb_cv_scanf_has_long_double=yes
8772else
8773 echo "configure: failed program was:" >&5
8774 cat conftest.$ac_ext >&5
8775 rm -fr conftest*
8776 gdb_cv_scanf_has_long_double=no
8777fi
8778rm -fr conftest*
8779fi
c906108c
SS
8780
8781fi
8782
97bf5e38
MK
8783if test $gdb_cv_scanf_has_long_double = yes; then
8784 cat >> confdefs.h <<\EOF
8785#define SCANF_HAS_LONG_DOUBLE 1
8786EOF
8787
8788fi
8789echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8790
438013df
AO
8791case ${host_os} in
8792aix*)
8793 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
40a7debc 8794echo "configure:8795: checking for -bbigtoc option" >&5
438013df
AO
8795if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8796 echo $ac_n "(cached) $ac_c" 1>&6
8797else
8798
8799 SAVE_LDFLAGS=$LDFLAGS
8800
8801 case $GCC in
8802 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8803 *) gdb_cv_bigtoc=-bbigtoc ;;
8804 esac
8805
8806 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8807 cat > conftest.$ac_ext <<EOF
40a7debc 8808#line 8809 "configure"
438013df
AO
8809#include "confdefs.h"
8810
8811int main() {
8812int i;
8813; return 0; }
8814EOF
40a7debc 8815if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8816 :
8817else
8818 echo "configure: failed program was:" >&5
8819 cat conftest.$ac_ext >&5
8820 rm -rf conftest*
8821 gdb_cv_bigtoc=
8822fi
8823rm -f conftest*
8824
8825fi
8826
8827echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8828 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8829 ;;
8830esac
8831
c906108c
SS
8832
8833
8834if test ${build} = ${host} -a ${host} = ${target} ; then
8835 case ${host_os} in
8836 hpux*)
8837 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
40a7debc 8838echo "configure:8839: checking for HPUX/OSF thread support" >&5
c906108c
SS
8839 if test -f /usr/include/dce/cma_config.h ; then
8840 if test "$GCC" = "yes" ; then
8841 echo "$ac_t""yes" 1>&6
8842 cat >> confdefs.h <<\EOF
8843#define HAVE_HPUX_THREAD_SUPPORT 1
8844EOF
8845
66b965bb 8846 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8847 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8848 else
8849 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8850 fi
8851 else
8852 echo "$ac_t""no" 1>&6
8853 fi
8854 ;;
8855 solaris*)
d92419e5
JB
8856 # See if thread_db library is around for Solaris thread debugging.
8857 # Note that we must explicitly test for version 1 of the library
8858 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8859 # the same API.
c906108c 8860 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
40a7debc 8861echo "configure:8862: checking for Solaris thread debugging library" >&5
c906108c
SS
8862 if test -f /usr/lib/libthread_db.so.1 ; then
8863 echo "$ac_t""yes" 1>&6
8864 cat >> confdefs.h <<\EOF
8865#define HAVE_THREAD_DB_LIB 1
8866EOF
8867
66b965bb 8868 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8869 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8870 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
40a7debc 8871echo "configure:8872: checking for dlopen in -ldl" >&5
c906108c
SS
8872ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8873if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8874 echo $ac_n "(cached) $ac_c" 1>&6
8875else
8876 ac_save_LIBS="$LIBS"
8877LIBS="-ldl $LIBS"
8878cat > conftest.$ac_ext <<EOF
40a7debc 8879#line 8880 "configure"
c906108c
SS
8880#include "confdefs.h"
8881/* Override any gcc2 internal prototype to avoid an error. */
8882/* We use char because int might match the return type of a gcc2
8883 builtin and then its argument prototype would still apply. */
8884char dlopen();
8885
8886int main() {
8887dlopen()
8888; return 0; }
8889EOF
40a7debc 8890if { (eval echo configure:8891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8891 rm -rf conftest*
8892 eval "ac_cv_lib_$ac_lib_var=yes"
8893else
8894 echo "configure: failed program was:" >&5
8895 cat conftest.$ac_ext >&5
8896 rm -rf conftest*
8897 eval "ac_cv_lib_$ac_lib_var=no"
8898fi
8899rm -f conftest*
8900LIBS="$ac_save_LIBS"
8901
8902fi
8903if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8904 echo "$ac_t""yes" 1>&6
8905 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8906 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8907 cat >> confdefs.h <<EOF
8908#define $ac_tr_lib 1
8909EOF
8910
8911 LIBS="-ldl $LIBS"
8912
8913else
8914 echo "$ac_t""no" 1>&6
8915fi
8916
8917 if test "$GCC" = "yes" ; then
8918 # The GNU linker requires the -export-dynamic option to make
8919 # all symbols visible in the dynamic symbol table.
8920 hold_ldflags=$LDFLAGS
8921 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
40a7debc 8922echo "configure:8923: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8923 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8924 cat > conftest.$ac_ext <<EOF
40a7debc 8925#line 8926 "configure"
c906108c
SS
8926#include "confdefs.h"
8927
8928int main() {
8929int i;
8930; return 0; }
8931EOF
40a7debc 8932if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8933 rm -rf conftest*
8934 found=yes
8935else
8936 echo "configure: failed program was:" >&5
8937 cat conftest.$ac_ext >&5
8938 rm -rf conftest*
8939 found=no
8940fi
8941rm -f conftest*
8942 LDFLAGS=$hold_ldflags
8943 echo "$ac_t""$found" 1>&6
8944 if test $found = yes; then
8945 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8946 fi
8947 fi
8948 # Sun randomly tweaked the prototypes in <proc_service.h>
8949 # at one point.
8950 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
40a7debc 8951echo "configure:8952: checking if <proc_service.h> is old" >&5
c906108c
SS
8952 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8953 echo $ac_n "(cached) $ac_c" 1>&6
8954else
8955
8956 cat > conftest.$ac_ext <<EOF
40a7debc 8957#line 8958 "configure"
c906108c
SS
8958#include "confdefs.h"
8959
8960 #include <proc_service.h>
8961 ps_err_e ps_pdwrite
8962 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8963
8964int main() {
8965
8966; return 0; }
8967EOF
40a7debc 8968if { (eval echo configure:8969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8969 rm -rf conftest*
8970 gdb_cv_proc_service_is_old=no
8971else
8972 echo "configure: failed program was:" >&5
8973 cat conftest.$ac_ext >&5
8974 rm -rf conftest*
8975 gdb_cv_proc_service_is_old=yes
8976fi
8977rm -f conftest*
8978
8979fi
8980
8981 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8982 if test $gdb_cv_proc_service_is_old = yes; then
8983 cat >> confdefs.h <<\EOF
8984#define PROC_SERVICE_IS_OLD 1
8985EOF
8986
8987 fi
8988 else
8989 echo "$ac_t""no" 1>&6
8990 fi
8991 ;;
d92419e5
JB
8992 aix*)
8993 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
40a7debc 8994echo "configure:8995: checking for AiX thread debugging library" >&5
d92419e5
JB
8995 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8996 echo $ac_n "(cached) $ac_c" 1>&6
8997else
8998 cat > conftest.$ac_ext <<EOF
40a7debc 8999#line 9000 "configure"
d92419e5
JB
9000#include "confdefs.h"
9001#include <sys/pthdebug.h>
9002int main() {
9003#ifndef PTHDB_VERSION_3
9004 #error
9005 #endif
9006; return 0; }
9007EOF
40a7debc 9008if { (eval echo configure:9009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9009 rm -rf conftest*
9010 gdb_cv_have_aix_thread_debug=yes
9011else
9012 echo "configure: failed program was:" >&5
9013 cat conftest.$ac_ext >&5
9014 rm -rf conftest*
9015 gdb_cv_have_aix_thread_debug=no
9016fi
9017rm -f conftest*
9018fi
9019
9020 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9021 if test $gdb_cv_have_aix_thread_debug = yes; then
9022 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9023 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
9024 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9025 fi
9026 ;;
c906108c
SS
9027 esac
9028
9029fi
9030
3f47be5c
EZ
9031if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9032 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
40a7debc 9033echo "configure:9034: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9034if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9035 echo $ac_n "(cached) $ac_c" 1>&6
9036else
9037 cat > conftest.$ac_ext <<EOF
40a7debc 9038#line 9039 "configure"
3f47be5c
EZ
9039#include "confdefs.h"
9040#include <thread_db.h>
9041int main() {
9042int i = TD_NOTALLOC;
9043; return 0; }
9044EOF
40a7debc 9045if { (eval echo configure:9046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9046 rm -rf conftest*
9047 gdb_cv_thread_db_h_has_td_notalloc=yes
9048else
9049 echo "configure: failed program was:" >&5
9050 cat conftest.$ac_ext >&5
9051 rm -rf conftest*
9052 gdb_cv_thread_db_h_has_td_notalloc=no
9053
9054fi
9055rm -f conftest*
9056
9057fi
9058
9059echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9060fi
9061if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9062 cat >> confdefs.h <<\EOF
9063#define THREAD_DB_HAS_TD_NOTALLOC 1
9064EOF
9065
9066fi
9067
b757528f
JJ
9068if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9069 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
40a7debc 9070echo "configure:9071: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9071if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9072 echo $ac_n "(cached) $ac_c" 1>&6
9073else
9074 cat > conftest.$ac_ext <<EOF
40a7debc 9075#line 9076 "configure"
b757528f
JJ
9076#include "confdefs.h"
9077#include <sys/syscall.h>
9078int main() {
9079int i = __NR_tkill;
9080; return 0; }
9081EOF
40a7debc 9082if { (eval echo configure:9083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9083 rm -rf conftest*
9084 gdb_cv_sys_syscall_h_has_tkill=yes
9085else
9086 echo "configure: failed program was:" >&5
9087 cat conftest.$ac_ext >&5
9088 rm -rf conftest*
9089 gdb_cv_sys_syscall_h_has_tkill=no
9090
9091fi
9092rm -f conftest*
9093
9094fi
9095
9096echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9097fi
9098if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9099 cat >> confdefs.h <<\EOF
9100#define HAVE_TKILL_SYSCALL 1
9101EOF
9102
9103fi
9104
fb40c209 9105
030292b7
DJ
9106# Check whether --with-sysroot or --without-sysroot was given.
9107if test "${with_sysroot+set}" = set; then
9108 withval="$with_sysroot"
9109
9110 case ${with_sysroot} in
715d1656 9111 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9112 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9113 esac
9114
9115 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9116
9117 if test "x$exec_prefix" = xNONE; then
9118 if test "x$prefix" = xNONE; then
9119 test_prefix=/usr/local
9120 else
9121 test_prefix=$prefix
9122 fi
9123 else
9124 test_prefix=$exec_prefix
9125 fi
9126 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9127 "${test_prefix}"|"${test_prefix}/"*|\
9128 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9129 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9130 TARGET_SYSTEM_ROOT_DEFINE="$t"
9131 ;;
9132 esac
9133
9134else
9135
9136 TARGET_SYSTEM_ROOT=
9137 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9138
9139fi
9140
9141
9142
9143
3b851bce
AC
9144# NOTE: Don't add -Wall or -Wunused, they both include
9145# -Wunused-parameter which reports bogus warnings.
9146# NOTE: If you add to this list, remember to update
9147# gdb/doc/gdbint.texinfo.
1decb323 9148build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
153721e6 9149-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral"
d8038014
AC
9150# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9151# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 9152# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9153# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9154# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9155# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9156# Check whether --enable-build-warnings or --disable-build-warnings was given.
9157if test "${enable_build_warnings+set}" = set; then
9158 enableval="$enable_build_warnings"
1decb323 9159 case "${enableval}" in
c906108c
SS
9160 yes) ;;
9161 no) build_warnings="-w";;
9162 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9163 build_warnings="${build_warnings} ${t}";;
9164 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9165 build_warnings="${t} ${build_warnings}";;
9166 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9167esac
d4f3574e 9168if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9169 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9170fi
1decb323 9171fi
3b851bce
AC
9172# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9173if test "${enable_gdb_build_warnings+set}" = set; then
9174 enableval="$enable_gdb_build_warnings"
9175 case "${enableval}" in
9176 yes) ;;
9177 no) build_warnings="-w";;
9178 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9179 build_warnings="${build_warnings} ${t}";;
9180 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9181 build_warnings="${t} ${build_warnings}";;
9182 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9183esac
9184if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9185 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9186fi
9187fi
104c1213
JM
9188WARN_CFLAGS=""
9189WERROR_CFLAGS=""
c906108c
SS
9190if test "x${build_warnings}" != x -a "x$GCC" = xyes
9191then
746a987d 9192 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
40a7debc 9193echo "configure:9194: checking compiler warning flags" >&5
746a987d
AC
9194 # Separate out the -Werror flag as some files just cannot be
9195 # compiled with it enabled.
9196 for w in ${build_warnings}; do
9197 case $w in
9198 -Werr*) WERROR_CFLAGS=-Werror ;;
9199 *) # Check that GCC accepts it
4536bbc6
AC
9200 saved_CFLAGS="$CFLAGS"
9201 CFLAGS="$CFLAGS $w"
9202 cat > conftest.$ac_ext <<EOF
40a7debc 9203#line 9204 "configure"
4536bbc6
AC
9204#include "confdefs.h"
9205
9206int main() {
9207
9208; return 0; }
9209EOF
40a7debc 9210if { (eval echo configure:9211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9211 rm -rf conftest*
9212 WARN_CFLAGS="${WARN_CFLAGS} $w"
9213else
9214 echo "configure: failed program was:" >&5
9215 cat conftest.$ac_ext >&5
9216fi
9217rm -f conftest*
9218 CFLAGS="$saved_CFLAGS"
746a987d
AC
9219 esac
9220 done
9221 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9222fi
9223
9224
104c1213 9225
c906108c
SS
9226MMALLOC_CFLAGS=
9227MMALLOC=
9228
9229
9230
9231# Check whether --with-mmalloc or --without-mmalloc was given.
9232if test "${with_mmalloc+set}" = set; then
9233 withval="$with_mmalloc"
9234 case "${withval}" in
9235 yes) want_mmalloc=true ;;
9236 no) want_mmalloc=false;;
9237 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
9238esac
9239else
9240 want_mmalloc=false
9241fi
9242
9243if test x$want_mmalloc = xtrue; then
9244 cat >> confdefs.h <<\EOF
9245#define USE_MMALLOC 1
9246EOF
9247
9248 cat >> confdefs.h <<\EOF
9249#define MMCHECK_FORCE 1
9250EOF
9251
9252 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
9253 MMALLOC='../mmalloc/libmmalloc.a'
9254fi
9255
7a292a7a
SS
9256# In the Cygwin environment, we need some additional flags.
9257echo $ac_n "checking for cygwin""... $ac_c" 1>&6
40a7debc 9258echo "configure:9259: checking for cygwin" >&5
7a292a7a
SS
9259if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9260 echo $ac_n "(cached) $ac_c" 1>&6
9261else
9262 cat > conftest.$ac_ext <<EOF
40a7debc 9263#line 9264 "configure"
7a292a7a
SS
9264#include "confdefs.h"
9265
9266#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9267lose
9268#endif
9269EOF
9270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9271 egrep "lose" >/dev/null 2>&1; then
9272 rm -rf conftest*
9273 gdb_cv_os_cygwin=yes
9274else
9275 rm -rf conftest*
9276 gdb_cv_os_cygwin=no
9277fi
9278rm -f conftest*
9279
9280fi
9281
9282echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9283
aff38e61
AC
9284
9285SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9286case ${host} in
95cbc983
AC
9287 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9288 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9289esac
9290
9291
cd0fc7c3
SS
9292# libreadline needs libuser32.a in a cygwin environment
9293WIN32LIBS=
9294if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9295 WIN32LIBS="-luser32"
9296 case "${target}" in
9297 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9298 ;;
9299 esac
cd0fc7c3 9300fi
c906108c 9301
7a292a7a 9302
3fc11d3e
JM
9303LIBGUI="../libgui/src/libgui.a"
9304GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9305
9306
7a292a7a 9307
3fc11d3e
JM
9308WIN32LDAPP=
9309
9310
9311
9312configdir="unix"
9313
9314GDBTKLIBS=
9315if test "${enable_gdbtk}" = "yes"; then
9316
d1c3b63a
KS
9317 # Gdbtk must have an absolute path to srcdir in order to run
9318 # properly when not installed.
9319 here=`pwd`
9320 cd ${srcdir}
9321 GDBTK_SRC_DIR=`pwd`
9322 cd $here
9323
3fc11d3e
JM
9324
9325#
9326# Ok, lets find the tcl configuration
9327# First, look for one uninstalled.
9328# the alternative search directory is invoked by --with-tclconfig
9329#
9330
9331if test x"${no_tcl}" = x ; then
9332 # we reset no_tcl in case something fails here
9333 no_tcl=true
9334 # Check whether --with-tclconfig or --without-tclconfig was given.
9335if test "${with_tclconfig+set}" = set; then
9336 withval="$with_tclconfig"
9337 with_tclconfig=${withval}
9338fi
9339
9340 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
40a7debc 9341echo "configure:9342: checking for Tcl configuration" >&5
3fc11d3e
JM
9342 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9343 echo $ac_n "(cached) $ac_c" 1>&6
9344else
9345
9346
9347 # First check to see if --with-tclconfig was specified.
9348 if test x"${with_tclconfig}" != x ; then
9349 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9350 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9351 else
9352 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9353 fi
9354 fi
9355
9356 # then check for a private Tcl installation
9357 if test x"${ac_cv_c_tclconfig}" = x ; then
9358 for i in \
9359 ../tcl \
9360 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9361 ../../tcl \
9362 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9363 ../../../tcl \
9364 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9365 if test -f "$i/${configdir}/tclConfig.sh" ; then
9366 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9367 break
9368 fi
9369 done
9370 fi
9371 # check in a few common install locations
9372 if test x"${ac_cv_c_tclconfig}" = x ; then
9373 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9374 if test -f "$i/tclConfig.sh" ; then
9375 ac_cv_c_tclconfig=`(cd $i; pwd)`
9376 break
9377 fi
9378 done
9379 fi
9380 # check in a few other private locations
9381 if test x"${ac_cv_c_tclconfig}" = x ; then
9382 for i in \
9383 ${srcdir}/../tcl \
9384 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9385 if test -f "$i/${configdir}/tclConfig.sh" ; then
9386 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9387 break
9388 fi
9389 done
9390 fi
9391
9392fi
9393
9394 if test x"${ac_cv_c_tclconfig}" = x ; then
9395 TCLCONFIG="# no Tcl configs found"
9396 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9397 else
9398 no_tcl=
9399 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9400 echo "$ac_t""found $TCLCONFIG" 1>&6
9401 fi
9402fi
9403
9404 if test -z "${no_tcl}"; then
9405
9406 . $TCLCONFIG
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
033afc63 9427
3fc11d3e
JM
9428
9429
9430
9431
9432
9433
9434#
9435# Ok, lets find the tk configuration
9436# First, look for one uninstalled.
9437# the alternative search directory is invoked by --with-tkconfig
9438#
9439
9440if test x"${no_tk}" = x ; then
9441 # we reset no_tk in case something fails here
9442 no_tk=true
9443 # Check whether --with-tkconfig or --without-tkconfig was given.
9444if test "${with_tkconfig+set}" = set; then
9445 withval="$with_tkconfig"
9446 with_tkconfig=${withval}
9447fi
9448
9449 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
40a7debc 9450echo "configure:9451: checking for Tk configuration" >&5
3fc11d3e
JM
9451 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9452 echo $ac_n "(cached) $ac_c" 1>&6
9453else
9454
9455
9456 # First check to see if --with-tkconfig was specified.
9457 if test x"${with_tkconfig}" != x ; then
9458 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9459 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9460 else
9461 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9462 fi
9463 fi
9464
9465 # then check for a private Tk library
9466 if test x"${ac_cv_c_tkconfig}" = x ; then
9467 for i in \
9468 ../tk \
9469 `ls -dr ../tk[4-9]* 2>/dev/null` \
9470 ../../tk \
9471 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9472 ../../../tk \
9473 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9474 if test -f "$i/${configdir}/tkConfig.sh" ; then
9475 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9476 break
9477 fi
9478 done
9479 fi
9480 # check in a few common install locations
9481 if test x"${ac_cv_c_tkconfig}" = x ; then
9482 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9483 if test -f "$i/tkConfig.sh" ; then
9484 ac_cv_c_tkconfig=`(cd $i; pwd)`
9485 break
9486 fi
9487 done
9488 fi
9489 # check in a few other private locations
9490 if test x"${ac_cv_c_tkconfig}" = x ; then
9491 for i in \
9492 ${srcdir}/../tk \
9493 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9494 if test -f "$i/${configdir}/tkConfig.sh" ; then
9495 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9496 break
9497 fi
9498 done
9499 fi
9500
9501fi
9502
9503 if test x"${ac_cv_c_tkconfig}" = x ; then
9504 TKCONFIG="# no Tk configs found"
9505 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9506 else
9507 no_tk=
9508 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9509 echo "$ac_t""found $TKCONFIG" 1>&6
9510 fi
9511fi
9512
9513
9514
dd2504ab
JM
9515 # now look for Tcl library stuff
9516
9517 case "${host}" in
9518 *-*-cygwin*)
9519 tcldir=../tcl/win/
9520 ;;
9521 *)
9522 tcldir=../tcl/unix/
9523 ;;
9524 esac
9525
9526 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9527
3fc11d3e
JM
9528 # If $no_tk is nonempty, then we can't do Tk, and there is no
9529 # point to doing Tcl.
9530 if test -z "${no_tk}"; then
9531
9532 if test -f "$TKCONFIG" ; then
9533 . $TKCONFIG
9534 fi
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549#
9550# Ok, lets find the tcl source trees so we can use the headers
9551# Warning: transition of version 9 to 10 will break this algorithm
9552# because 10 sorts before 9. We also look for just tcl. We have to
9553# be careful that we don't match stuff like tclX by accident.
9554# the alternative search directory is involked by --with-tclinclude
9555#
9556
9557no_tcl=true
9558echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
40a7debc 9559echo "configure:9560: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9560# Check whether --with-tclinclude or --without-tclinclude was given.
9561if test "${with_tclinclude+set}" = set; then
9562 withval="$with_tclinclude"
9563 with_tclinclude=${withval}
9564fi
9565
9566if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9567 echo $ac_n "(cached) $ac_c" 1>&6
9568else
9569
9570# first check to see if --with-tclinclude was specified
9571if test x"${with_tclinclude}" != x ; then
9572 if test -f ${with_tclinclude}/tclInt.h ; then
9573 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9574 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9575 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9576 else
9577 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9578 fi
9579fi
9580
9581# next check if it came with Tcl configuration file
9582if test x"${ac_cv_c_tclconfig}" = x ; then
9583 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9584 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9585 fi
9586fi
9587
9588# next check in private source directory
9589#
9590# since ls returns lowest version numbers first, reverse its output
9591if test x"${ac_cv_c_tclh}" = x ; then
9592 for i in \
9593 ${srcdir}/../tcl \
9594 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9595 ${srcdir}/../../tcl \
9596 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9597 ${srcdir}/../../../tcl \
9598 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9599 if test -f $i/generic/tclInt.h ; then
9600 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9601 break
9602 fi
9603 done
9604fi
9605# finally check in a few common install locations
9606#
9607# since ls returns lowest version numbers first, reverse its output
9608if test x"${ac_cv_c_tclh}" = x ; then
9609 for i in \
9610 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9611 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9612 /usr/local/src/tcl \
9613 /usr/local/lib/tcl \
9614 ${prefix}/include ; do
9615 if test -f $i/generic/tclInt.h ; then
9616 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9617 break
9618 fi
9619 done
9620fi
9621# see if one is installed
9622if test x"${ac_cv_c_tclh}" = x ; then
9623 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9624echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
40a7debc 9625echo "configure:9626: checking for tclInt.h" >&5
3fc11d3e
JM
9626if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9627 echo $ac_n "(cached) $ac_c" 1>&6
9628else
9629 cat > conftest.$ac_ext <<EOF
40a7debc 9630#line 9631 "configure"
3fc11d3e
JM
9631#include "confdefs.h"
9632#include <tclInt.h>
9633EOF
9634ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 9635{ (eval echo configure:9636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9636ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9637if test -z "$ac_err"; then
9638 rm -rf conftest*
9639 eval "ac_cv_header_$ac_safe=yes"
9640else
9641 echo "$ac_err" >&5
9642 echo "configure: failed program was:" >&5
9643 cat conftest.$ac_ext >&5
9644 rm -rf conftest*
9645 eval "ac_cv_header_$ac_safe=no"
9646fi
9647rm -f conftest*
9648fi
9649if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9650 echo "$ac_t""yes" 1>&6
9651 ac_cv_c_tclh=installed
9652else
9653 echo "$ac_t""no" 1>&6
9654ac_cv_c_tclh=""
9655fi
9656
9657fi
9658
9659fi
9660
9661if test x"${ac_cv_c_tclh}" = x ; then
9662 TCLHDIR="# no Tcl private headers found"
9663 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9664fi
9665if test x"${ac_cv_c_tclh}" != x ; then
9666 no_tcl=""
9667 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9668 echo "$ac_t""is installed" 1>&6
9669 TCLHDIR=""
9670 else
9671 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9672 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9673 TCLHDIR="-I${ac_cv_c_tclh}"
9674 fi
9675fi
9676
9677
9678
9679
9680#
9681# Ok, lets find the tk source trees so we can use the headers
9682# If the directory (presumably symlink) named "tk" exists, use that one
9683# in preference to any others. Same logic is used when choosing library
9684# and again with Tcl. The search order is the best place to look first, then in
9685# decreasing significance. The loop breaks if the trigger file is found.
9686# Note the gross little conversion here of srcdir by cd'ing to the found
9687# directory. This converts the path from a relative to an absolute, so
9688# recursive cache variables for the path will work right. We check all
9689# the possible paths in one loop rather than many seperate loops to speed
9690# things up.
9691# the alternative search directory is involked by --with-tkinclude
9692#
9693no_tk=true
9694echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
40a7debc 9695echo "configure:9696: checking for Tk private headers" >&5
3fc11d3e
JM
9696# Check whether --with-tkinclude or --without-tkinclude was given.
9697if test "${with_tkinclude+set}" = set; then
9698 withval="$with_tkinclude"
9699 with_tkinclude=${withval}
9700fi
9701
9702if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9703 echo $ac_n "(cached) $ac_c" 1>&6
9704else
9705
9706# first check to see if --with-tkinclude was specified
9707if test x"${with_tkinclude}" != x ; then
9708 if test -f ${with_tkinclude}/tk.h ; then
9709 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9710 elif test -f ${with_tkinclude}/generic/tk.h ; then
9711 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9712 else
9713 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9714 fi
9715fi
9716
9717# next check if it came with Tk configuration file
9718if test x"${ac_cv_c_tkconfig}" = x ; then
9719 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9720 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9721 fi
9722fi
9723
9724# next check in private source directory
9725#
9726# since ls returns lowest version numbers first, reverse its output
9727if test x"${ac_cv_c_tkh}" = x ; then
9728 for i in \
9729 ${srcdir}/../tk \
9730 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9731 ${srcdir}/../../tk \
9732 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9733 ${srcdir}/../../../tk \
9734 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9735 if test -f $i/generic/tk.h ; then
9736 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9737 break
9738 fi
9739 done
9740fi
9741# finally check in a few common install locations
9742#
9743# since ls returns lowest version numbers first, reverse its output
9744if test x"${ac_cv_c_tkh}" = x ; then
9745 for i in \
9746 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9747 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9748 /usr/local/src/tk \
9749 /usr/local/lib/tk \
9750 ${prefix}/include ; do
9751 if test -f $i/generic/tk.h ; then
9752 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9753 break
9754 fi
9755 done
9756fi
9757# see if one is installed
9758if test x"${ac_cv_c_tkh}" = x ; then
9759 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9760echo $ac_n "checking for tk.h""... $ac_c" 1>&6
40a7debc 9761echo "configure:9762: checking for tk.h" >&5
3fc11d3e
JM
9762if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9763 echo $ac_n "(cached) $ac_c" 1>&6
9764else
9765 cat > conftest.$ac_ext <<EOF
40a7debc 9766#line 9767 "configure"
3fc11d3e
JM
9767#include "confdefs.h"
9768#include <tk.h>
9769EOF
9770ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 9771{ (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9772ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9773if test -z "$ac_err"; then
9774 rm -rf conftest*
9775 eval "ac_cv_header_$ac_safe=yes"
9776else
9777 echo "$ac_err" >&5
9778 echo "configure: failed program was:" >&5
9779 cat conftest.$ac_ext >&5
9780 rm -rf conftest*
9781 eval "ac_cv_header_$ac_safe=no"
9782fi
9783rm -f conftest*
9784fi
9785if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9786 echo "$ac_t""yes" 1>&6
9787 ac_cv_c_tkh=installed
9788else
9789 echo "$ac_t""no" 1>&6
9790ac_cv_c_tkh=""
9791fi
9792
9793fi
9794
9795fi
9796
9797if test x"${ac_cv_c_tkh}" != x ; then
9798 no_tk=""
9799 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9800 echo "$ac_t""is installed" 1>&6
9801 TKHDIR=""
9802 else
9803 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9804 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9805 TKHDIR="-I${ac_cv_c_tkh}"
9806 fi
9807else
9808 TKHDIR="# no Tk directory found"
9809 echo "configure: warning: Can't find Tk private headers" 1>&2
9810 no_tk=true
9811fi
9812
9813
9814
9815
9816echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
40a7debc 9817echo "configure:9818: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9818if test x"${ac_cv_c_itclh}" = x ; then
9819 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9820 if test -f $i/generic/itcl.h ; then
9821 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9822 break
9823 fi
9824 done
9825fi
9826if test x"${ac_cv_c_itclh}" = x ; then
9827 ITCLHDIR="# no Itcl private headers found"
9828 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9829fi
9830if test x"${ac_cv_c_itclh}" != x ; then
9831 ITCLHDIR="-I${ac_cv_c_itclh}"
9832fi
9833# should always be here
9834# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9835
9836#AC_SUBST(ITCLLIB)
9837
9838
9839echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
40a7debc 9840echo "configure:9841: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9841if test x"${ac_cv_c_itkh}" = x ; then
9842 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9843 if test -f $i/generic/itk.h ; then
9844 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9845 break
9846 fi
9847 done
9848fi
9849if test x"${ac_cv_c_itkh}" = x ; then
9850 ITKHDIR="# no Itk private headers found"
9851 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9852fi
9853if test x"${ac_cv_c_itkh}" != x ; then
9854 ITKHDIR="-I${ac_cv_c_itkh}"
9855fi
9856# should always be here
9857# ITKLIB="../itcl/itk/unix/libitk.a"
9858
9859#AC_SUBST(ITKLIB)
9860
3fc11d3e 9861
dd2504ab
JM
9862
9863 # now look for Tk library stuff
9864
9865 case "${host}" in
9866 *-*-cygwin*)
9867 tkdir=../tk/win/
9868 ;;
9869 *)
9870 tkdir=../tk/unix/
9871 ;;
9872 esac
9873
9874 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9875
3fc11d3e
JM
9876 # now look for Itcl library stuff
9877
9878
9879#
9880# Ok, lets find the itcl configuration
9881# First, look for one uninstalled.
9882# the alternative search directory is invoked by --with-itclconfig
9883#
9884
9885if test x"${no_itcl}" = x ; then
9886 # we reset no_itcl in case something fails here
9887 no_itcl=true
9888 # Check whether --with-itclconfig or --without-itclconfig was given.
9889if test "${with_itclconfig+set}" = set; then
9890 withval="$with_itclconfig"
9891 with_itclconfig=${withval}
9892fi
9893
9894 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
40a7debc 9895echo "configure:9896: checking for Itcl configuration" >&5
3fc11d3e
JM
9896 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9897 echo $ac_n "(cached) $ac_c" 1>&6
9898else
9899
9900
9901 # First check to see if --with-itclconfig was specified.
9902 if test x"${with_itclconfig}" != x ; then
9903 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9904 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9905 else
9906 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9907 fi
9908 fi
9909
9910 # then check for a private Itcl library
9911 if test x"${ac_cv_c_itclconfig}" = x ; then
9912 for i in \
9913 ../itcl/itcl \
9914 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9915 ../../itcl \
9916 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9917 ../../../itcl \
9918 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9919 if test -f "$i/itclConfig.sh" ; then
9920 ac_cv_c_itclconfig=`(cd $i; pwd)`
9921 break
9922 fi
9923 done
9924 fi
9925 # check in a few common install locations
9926 if test x"${ac_cv_c_itclconfig}" = x ; then
9927 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9928 if test -f "$i/itclConfig.sh" ; then
9929 ac_cv_c_itclconfig=`(cd $i; pwd)`
9930 break
9931 fi
9932 done
9933 fi
9934 # check in a few other private locations
9935 if test x"${ac_cv_c_itclconfig}" = x ; then
9936 for i in \
9937 ${srcdir}/../itcl/itcl \
9938 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9939 if test -f "$i/itclConfig.sh" ; then
9940 ac_cv_c_itclconfig=`(cd $i; pwd)`
9941 break
9942 fi
9943 done
9944 fi
9945
9946fi
9947
9948 if test x"${ac_cv_c_itclconfig}" = x ; then
9949 ITCLCONFIG="# no Itcl configs found"
9950 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9951 else
9952 no_itcl=
9953 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9954 echo "$ac_t""found $ITCLCONFIG" 1>&6
9955 fi
9956fi
9957
9958 if test -z "${no_itcl}"; then
9959
9960 if test -f "$ITCLCONFIG" ; then
9961 . $ITCLCONFIG
9962 fi
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
3fc11d3e
JM
9973
9974
9975 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9976 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9977 fi
9978
9979
9980 # now look for Itk library stuff
9981
9982#
9983# Ok, lets find the itk configuration
9984# First, look for one uninstalled.
9985# the alternative search directory is invoked by --with-itkconfig
9986#
9987
9988if test x"${no_itk}" = x ; then
9989 # we reset no_itk in case something fails here
9990 no_itk=true
9991 # Check whether --with-itkconfig or --without-itkconfig was given.
9992if test "${with_itkconfig+set}" = set; then
9993 withval="$with_itkconfig"
9994 with_itkconfig=${withval}
9995fi
9996
9997 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
40a7debc 9998echo "configure:9999: checking for Itk configuration" >&5
3fc11d3e
JM
9999 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10000 echo $ac_n "(cached) $ac_c" 1>&6
10001else
10002
10003
10004 # First check to see if --with-itkconfig was specified.
10005 if test x"${with_itkconfig}" != x ; then
10006 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10007 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10008 else
10009 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10010 fi
10011 fi
10012
10013 # then check for a private Itk library
10014 if test x"${ac_cv_c_itkconfig}" = x ; then
10015 for i in \
10016 ../itcl/itk \
10017 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10018 ../../itk \
10019 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10020 ../../../itk \
10021 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10022 if test -f "$i/itkConfig.sh" ; then
10023 ac_cv_c_itkconfig=`(cd $i; pwd)`
10024 break
10025 fi
10026 done
10027 fi
10028 # check in a few common install locations
10029 if test x"${ac_cv_c_itkconfig}" = x ; then
10030 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10031 if test -f "$i/itkConfig.sh" ; then
10032 ac_cv_c_itkconfig=`(cd $i; pwd)`
10033 break
10034 fi
10035 done
10036 fi
10037 # check in a few other private locations
10038 if test x"${ac_cv_c_itkconfig}" = x ; then
10039 for i in \
10040 ${srcdir}/../itcl/itk \
10041 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10042 if test -f "$i/itkConfig.sh" ; then
10043 ac_cv_c_itkconfig=`(cd $i; pwd)`
10044 break
10045 fi
10046 done
10047 fi
10048
10049fi
10050
10051 if test x"${ac_cv_c_itkconfig}" = x ; then
10052 ITKCONFIG="# no Itk configs found"
10053 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10054 else
10055 no_itk=
10056 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10057 echo "$ac_t""found $ITKCONFIG" 1>&6
10058 fi
10059fi
10060
10061
10062 if test -z "${no_itcl}"; then
10063
10064 if test -f "$ITKCONFIG" ; then
10065 . $ITKCONFIG
10066 fi
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
3fc11d3e 10079 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10080 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10081 fi
10082
4226a5a5 10083 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10084 # Tcl/Tk 8.1 require -fwritable strings. I don't
10085 # know whether 8.2 will or not, but I bet it will.
10086 # I don't have to worry about 7.x since we don't support it.
10087 GDBTK_CFLAGS=""
10088 if test "$GCC" = "yes"; then
10089 if test "$TCL_VERSION" != "8.0" ; then
10090 GDBTK_CFLAGS="-fwritable-strings"
10091 fi
10092 fi
10093
10094 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10095 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10096 # Yes, the ordering seems wrong here. But it isn't.
10097 # TK_LIBS is the list of libraries that need to be linked
10098 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10099 # were in LIBS then any link tests after this point would
10100 # try to include things like `$(LIBGUI)', which wouldn't work.
10101 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10102
10103 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10104 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10105 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10106 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 10107 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 10108 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
10109 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
10110 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
10111
10112 if test x$gdb_cv_os_cygwin = xyes; then
10113 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10114 WIN32LDAPP="-Wl,--subsystem,console"
10115 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10116 fi
10117 fi
10118 fi
ffc6a242 10119
ffc6a242 10120 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10121fi
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
dd2504ab 10135
c906108c
SS
10136# If we find X, set shell vars x_includes and x_libraries to the
10137# paths, otherwise set no_x=yes.
10138# Uses ac_ vars as temps to allow command line to override cache and checks.
10139# --without-x overrides everything else, but does not touch the cache.
10140echo $ac_n "checking for X""... $ac_c" 1>&6
40a7debc 10141echo "configure:10142: checking for X" >&5
c906108c
SS
10142
10143# Check whether --with-x or --without-x was given.
10144if test "${with_x+set}" = set; then
10145 withval="$with_x"
10146 :
10147fi
10148
10149# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10150if test "x$with_x" = xno; then
10151 # The user explicitly disabled X.
10152 have_x=disabled
10153else
10154 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10155 # Both variables are already set.
10156 have_x=yes
10157 else
10158if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10159 echo $ac_n "(cached) $ac_c" 1>&6
10160else
10161 # One or both of the vars are not set, and there is no cached value.
10162ac_x_includes=NO ac_x_libraries=NO
10163rm -fr conftestdir
10164if mkdir conftestdir; then
10165 cd conftestdir
10166 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10167 cat > Imakefile <<'EOF'
10168acfindx:
10169 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10170EOF
10171 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10172 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10173 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10174 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10175 for ac_extension in a so sl; do
10176 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10177 test -f $ac_im_libdir/libX11.$ac_extension; then
10178 ac_im_usrlibdir=$ac_im_libdir; break
10179 fi
10180 done
10181 # Screen out bogus values from the imake configuration. They are
10182 # bogus both because they are the default anyway, and because
10183 # using them would break gcc on systems where it needs fixed includes.
10184 case "$ac_im_incroot" in
10185 /usr/include) ;;
10186 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10187 esac
10188 case "$ac_im_usrlibdir" in
10189 /usr/lib | /lib) ;;
10190 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10191 esac
10192 fi
10193 cd ..
10194 rm -fr conftestdir
10195fi
10196
10197if test "$ac_x_includes" = NO; then
10198 # Guess where to find include files, by looking for this one X11 .h file.
10199 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10200
10201 # First, try using that file with no special directory specified.
10202cat > conftest.$ac_ext <<EOF
40a7debc 10203#line 10204 "configure"
c906108c
SS
10204#include "confdefs.h"
10205#include <$x_direct_test_include>
10206EOF
10207ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
40a7debc 10208{ (eval echo configure:10209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10209ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10210if test -z "$ac_err"; then
10211 rm -rf conftest*
10212 # We can compile using X headers with no special include directory.
10213ac_x_includes=
10214else
10215 echo "$ac_err" >&5
10216 echo "configure: failed program was:" >&5
10217 cat conftest.$ac_ext >&5
10218 rm -rf conftest*
10219 # Look for the header file in a standard set of common directories.
10220# Check X11 before X11Rn because it is often a symlink to the current release.
10221 for ac_dir in \
10222 /usr/X11/include \
10223 /usr/X11R6/include \
10224 /usr/X11R5/include \
10225 /usr/X11R4/include \
10226 \
10227 /usr/include/X11 \
10228 /usr/include/X11R6 \
10229 /usr/include/X11R5 \
10230 /usr/include/X11R4 \
10231 \
10232 /usr/local/X11/include \
10233 /usr/local/X11R6/include \
10234 /usr/local/X11R5/include \
10235 /usr/local/X11R4/include \
10236 \
10237 /usr/local/include/X11 \
10238 /usr/local/include/X11R6 \
10239 /usr/local/include/X11R5 \
10240 /usr/local/include/X11R4 \
10241 \
10242 /usr/X386/include \
10243 /usr/x386/include \
10244 /usr/XFree86/include/X11 \
10245 \
10246 /usr/include \
10247 /usr/local/include \
10248 /usr/unsupported/include \
10249 /usr/athena/include \
10250 /usr/local/x11r5/include \
10251 /usr/lpp/Xamples/include \
10252 \
10253 /usr/openwin/include \
10254 /usr/openwin/share/include \
10255 ; \
10256 do
10257 if test -r "$ac_dir/$x_direct_test_include"; then
10258 ac_x_includes=$ac_dir
10259 break
10260 fi
10261 done
10262fi
10263rm -f conftest*
10264fi # $ac_x_includes = NO
10265
10266if test "$ac_x_libraries" = NO; then
10267 # Check for the libraries.
10268
10269 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10270 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10271
10272 # See if we find them without any special options.
10273 # Don't add to $LIBS permanently.
10274 ac_save_LIBS="$LIBS"
10275 LIBS="-l$x_direct_test_library $LIBS"
10276cat > conftest.$ac_ext <<EOF
40a7debc 10277#line 10278 "configure"
c906108c
SS
10278#include "confdefs.h"
10279
10280int main() {
10281${x_direct_test_function}()
10282; return 0; }
10283EOF
40a7debc 10284if { (eval echo configure:10285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10285 rm -rf conftest*
10286 LIBS="$ac_save_LIBS"
10287# We can link X programs with no special library path.
10288ac_x_libraries=
10289else
10290 echo "configure: failed program was:" >&5
10291 cat conftest.$ac_ext >&5
10292 rm -rf conftest*
10293 LIBS="$ac_save_LIBS"
10294# First see if replacing the include by lib works.
10295# Check X11 before X11Rn because it is often a symlink to the current release.
10296for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10297 /usr/X11/lib \
10298 /usr/X11R6/lib \
10299 /usr/X11R5/lib \
10300 /usr/X11R4/lib \
10301 \
10302 /usr/lib/X11 \
10303 /usr/lib/X11R6 \
10304 /usr/lib/X11R5 \
10305 /usr/lib/X11R4 \
10306 \
10307 /usr/local/X11/lib \
10308 /usr/local/X11R6/lib \
10309 /usr/local/X11R5/lib \
10310 /usr/local/X11R4/lib \
10311 \
10312 /usr/local/lib/X11 \
10313 /usr/local/lib/X11R6 \
10314 /usr/local/lib/X11R5 \
10315 /usr/local/lib/X11R4 \
10316 \
10317 /usr/X386/lib \
10318 /usr/x386/lib \
10319 /usr/XFree86/lib/X11 \
10320 \
10321 /usr/lib \
10322 /usr/local/lib \
10323 /usr/unsupported/lib \
10324 /usr/athena/lib \
10325 /usr/local/x11r5/lib \
10326 /usr/lpp/Xamples/lib \
10327 /lib/usr/lib/X11 \
10328 \
10329 /usr/openwin/lib \
10330 /usr/openwin/share/lib \
10331 ; \
10332do
10333 for ac_extension in a so sl; do
10334 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10335 ac_x_libraries=$ac_dir
10336 break 2
10337 fi
10338 done
10339done
10340fi
10341rm -f conftest*
10342fi # $ac_x_libraries = NO
10343
10344if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10345 # Didn't find X anywhere. Cache the known absence of X.
10346 ac_cv_have_x="have_x=no"
10347else
10348 # Record where we found X for the cache.
10349 ac_cv_have_x="have_x=yes \
10350 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10351fi
10352fi
10353 fi
10354 eval "$ac_cv_have_x"
10355fi # $with_x != no
10356
10357if test "$have_x" != yes; then
10358 echo "$ac_t""$have_x" 1>&6
10359 no_x=yes
10360else
10361 # If each of the values was on the command line, it overrides each guess.
10362 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10363 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10364 # Update the cache value to reflect the command line values.
10365 ac_cv_have_x="have_x=yes \
10366 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10367 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10368fi
10369
10370
7a292a7a
SS
10371
10372# Unlike the sim directory, whether a simulator is linked is controlled by
10373# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10374# This code just checks for a few cases where we'd like to ignore those
10375# definitions, even when they're present in the '.mt' file. These cases
10376# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10377# not part of the source tree.
7a292a7a
SS
10378#
10379# Check whether --enable-sim or --disable-sim was given.
10380if test "${enable_sim+set}" = set; then
10381 enableval="$enable_sim"
10382 echo "enable_sim = $enable_sim";
10383 echo "enableval = ${enableval}";
10384 case "${enableval}" in
10385 yes) ignore_sim=false ;;
10386 no) ignore_sim=true ;;
10387 *) ignore_sim=false ;;
10388 esac
10389else
10390 ignore_sim=false
10391fi
10392
10393
10394if test ! -d "${srcdir}/../sim"; then
10395 ignore_sim=true
10396fi
10397
10398if test "${ignore_sim}" = "true"; then
10399 IGNORE_SIM="SIM="
10400 IGNORE_SIM_OBS="SIM_OBS="
10401else
10402 IGNORE_SIM=""
10403 IGNORE_SIM_OBS=""
10404 cat >> confdefs.h <<\EOF
10405#define WITH_SIM 1
10406EOF
10407
10408fi
10409
10410
10411
c906108c
SS
10412
10413
10414
10415
10416
10417
dfcd3bfb 10418
e56ac5c3
AC
10419
10420
b3a90332
AC
10421
10422
b46cd165 10423
d28f9cdf 10424
c906108c
SS
10425# target_subdir is used by the testsuite to find the target libraries.
10426target_subdir=
10427if test "${host}" != "${target}"; then
10428 target_subdir="${target_alias}/"
10429fi
10430
10431
10432frags=
10433host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10434if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10435 # When building a native debuger the .mh file containing things
10436 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10437 # since it no longer contains anything useful.
10438 if test "${target}" = "${host}"; then
10439 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10440 else
10441 host_makefile_frag=/dev/null
10442 fi
c906108c
SS
10443fi
10444frags="$frags $host_makefile_frag"
10445
10446target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10447if test ! -f ${target_makefile_frag}; then
10448{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10449fi
10450frags="$frags $target_makefile_frag"
10451
10452
10453
10454
10455
10456hostfile=`sed -n '
10457s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10458' ${host_makefile_frag}`
10459
10460targetfile=`sed -n '
10461s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10462' ${target_makefile_frag}`
10463
c906108c 10464if test "${target}" = "${host}"; then
a85f51e7
DJ
10465# We pick this up from the host configuration file (.mh) because we
10466# do not have a native configuration Makefile fragment.
c906108c
SS
10467nativefile=`sed -n '
10468s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10469' ${host_makefile_frag}`
c906108c
SS
10470fi
10471
10472
b00a8037
DJ
10473if test x"${gdb_osabi}" != x ; then
10474 cat >> confdefs.h <<EOF
10475#define GDB_OSABI_DEFAULT $gdb_osabi
10476EOF
10477
10478fi
10479
8dcde887
MK
10480# Enable multi-ice-gdb-server.
10481# Check whether --enable-multi-ice or --disable-multi-ice was given.
10482if test "${enable_multi_ice+set}" = set; then
10483 enableval="$enable_multi_ice"
10484 case $enableval in
10485 yes | no)
10486 ;;
10487 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10488 esac
96baa820
JM
10489fi
10490
8dcde887
MK
10491if test "x$enable_multi_ice" = xyes; then
10492 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10493fi
10494
8dcde887
MK
10495# We only build gdbserver automatically if host and target are the same.
10496if test "x$target" = "x$host"; then
10497 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
40a7debc 10498echo "configure:10499: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10499 if test "x$build_gdbserver" = xyes; then
10500 configdirs="$configdirs gdbserver"
10501 echo "$ac_t""yes" 1>&6
10502 else
10503 echo "$ac_t""no" 1>&6
10504 fi
10505fi
10506
10507subdirs="doc testsuite $configdirs"
10508
96baa820 10509
c906108c 10510# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10511# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10512# version.
c906108c
SS
10513
10514files=
10515links=
5a2402b8 10516
c906108c 10517rm -f xm.h
5a2402b8 10518xm_h=""
c906108c 10519if test "${hostfile}" != ""; then
5a2402b8
AC
10520 xm_h=xm.h
10521 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10522 files="${files} ${GDB_XM_FILE}"
10523 links="${links} xm.h"
10524 cat >> confdefs.h <<EOF
10525#define GDB_XM_FILE ${GDB_XM_FILE}
10526EOF
10527
c906108c 10528fi
5a2402b8
AC
10529
10530
c906108c 10531rm -f tm.h
5a2402b8 10532tm_h=""
c906108c 10533if test "${targetfile}" != ""; then
5a2402b8
AC
10534 tm_h=tm.h
10535 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10536 files="${files} ${GDB_TM_FILE}"
10537 links="${links} tm.h"
10538 cat >> confdefs.h <<EOF
10539#define GDB_TM_FILE ${GDB_TM_FILE}
10540EOF
10541
c906108c 10542fi
5a2402b8
AC
10543
10544
c906108c 10545rm -f nm.h
5a2402b8 10546nm_h=""
c906108c 10547if test "${nativefile}" != ""; then
5a2402b8
AC
10548 nm_h=nm.h
10549 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10550 files="${files} ${GDB_NM_FILE}"
10551 links="${links} nm.h"
10552 cat >> confdefs.h <<EOF
10553#define GDB_NM_FILE ${GDB_NM_FILE}
10554EOF
10555
c906108c 10556fi
5a2402b8
AC
10557
10558
c906108c
SS
10559
10560
10561echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
40a7debc 10562echo "configure:10563: checking for Cygwin environment" >&5
c906108c
SS
10563if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10564 echo $ac_n "(cached) $ac_c" 1>&6
10565else
10566 cat > conftest.$ac_ext <<EOF
40a7debc 10567#line 10568 "configure"
c906108c
SS
10568#include "confdefs.h"
10569
10570int main() {
10571
10572#ifndef __CYGWIN__
10573#define __CYGWIN__ __CYGWIN32__
10574#endif
10575return __CYGWIN__;
10576; return 0; }
10577EOF
40a7debc 10578if { (eval echo configure:10579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10579 rm -rf conftest*
10580 ac_cv_cygwin=yes
10581else
10582 echo "configure: failed program was:" >&5
10583 cat conftest.$ac_ext >&5
10584 rm -rf conftest*
10585 ac_cv_cygwin=no
10586fi
10587rm -f conftest*
10588rm -f conftest*
10589fi
10590
10591echo "$ac_t""$ac_cv_cygwin" 1>&6
10592CYGWIN=
10593test "$ac_cv_cygwin" = yes && CYGWIN=yes
10594echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
40a7debc 10595echo "configure:10596: checking for mingw32 environment" >&5
c906108c
SS
10596if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10597 echo $ac_n "(cached) $ac_c" 1>&6
10598else
10599 cat > conftest.$ac_ext <<EOF
40a7debc 10600#line 10601 "configure"
c906108c
SS
10601#include "confdefs.h"
10602
10603int main() {
10604return __MINGW32__;
10605; return 0; }
10606EOF
40a7debc 10607if { (eval echo configure:10608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10608 rm -rf conftest*
10609 ac_cv_mingw32=yes
10610else
10611 echo "configure: failed program was:" >&5
10612 cat conftest.$ac_ext >&5
10613 rm -rf conftest*
10614 ac_cv_mingw32=no
10615fi
10616rm -f conftest*
10617rm -f conftest*
10618fi
10619
10620echo "$ac_t""$ac_cv_mingw32" 1>&6
10621MINGW32=
10622test "$ac_cv_mingw32" = yes && MINGW32=yes
10623
10624
10625echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
40a7debc 10626echo "configure:10627: checking for executable suffix" >&5
c906108c
SS
10627if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10628 echo $ac_n "(cached) $ac_c" 1>&6
10629else
10630 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10631 ac_cv_exeext=.exe
10632else
10633 rm -f conftest*
10634 echo 'int main () { return 0; }' > conftest.$ac_ext
10635 ac_cv_exeext=
40a7debc 10636 if { (eval echo configure:10637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10637 for file in conftest.*; do
10638 case $file in
57b29be7 10639 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10640 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10641 esac
10642 done
10643 else
10644 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10645 fi
10646 rm -f conftest*
10647 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10648fi
10649fi
10650
10651EXEEXT=""
10652test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10653echo "$ac_t""${ac_cv_exeext}" 1>&6
10654ac_exeext=$EXEEXT
10655
10656
234b45d4
KB
10657
10658cat >> confdefs.h <<\EOF
10659#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10660EOF
10661
10662
10663
10664
10665 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10666if test "${with_libiconv_prefix+set}" = set; then
10667 withval="$with_libiconv_prefix"
10668
10669 for dir in `echo "$withval" | tr : ' '`; do
10670 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10671 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10672 done
10673
10674fi
10675
10676
10677 echo $ac_n "checking for iconv""... $ac_c" 1>&6
40a7debc 10678echo "configure:10679: checking for iconv" >&5
234b45d4
KB
10679if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10680 echo $ac_n "(cached) $ac_c" 1>&6
10681else
10682
10683 am_cv_func_iconv="no, consider installing GNU libiconv"
10684 am_cv_lib_iconv=no
10685 cat > conftest.$ac_ext <<EOF
40a7debc 10686#line 10687 "configure"
234b45d4
KB
10687#include "confdefs.h"
10688#include <stdlib.h>
10689#include <iconv.h>
10690int main() {
10691iconv_t cd = iconv_open("","");
10692 iconv(cd,NULL,NULL,NULL,NULL);
10693 iconv_close(cd);
10694; return 0; }
10695EOF
40a7debc 10696if { (eval echo configure:10697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10697 rm -rf conftest*
10698 am_cv_func_iconv=yes
10699else
10700 echo "configure: failed program was:" >&5
10701 cat conftest.$ac_ext >&5
10702fi
10703rm -f conftest*
10704 if test "$am_cv_func_iconv" != yes; then
10705 am_save_LIBS="$LIBS"
10706 LIBS="$LIBS -liconv"
10707 cat > conftest.$ac_ext <<EOF
40a7debc 10708#line 10709 "configure"
234b45d4
KB
10709#include "confdefs.h"
10710#include <stdlib.h>
10711#include <iconv.h>
10712int main() {
10713iconv_t cd = iconv_open("","");
10714 iconv(cd,NULL,NULL,NULL,NULL);
10715 iconv_close(cd);
10716; return 0; }
10717EOF
40a7debc 10718if { (eval echo configure:10719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10719 rm -rf conftest*
10720 am_cv_lib_iconv=yes
10721 am_cv_func_iconv=yes
10722else
10723 echo "configure: failed program was:" >&5
10724 cat conftest.$ac_ext >&5
10725fi
10726rm -f conftest*
10727 LIBS="$am_save_LIBS"
10728 fi
10729
10730fi
10731
10732echo "$ac_t""$am_cv_func_iconv" 1>&6
10733 if test "$am_cv_func_iconv" = yes; then
10734 cat >> confdefs.h <<\EOF
10735#define HAVE_ICONV 1
10736EOF
10737
10738 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
40a7debc 10739echo "configure:10740: checking for iconv declaration" >&5
234b45d4
KB
10740 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10741 echo $ac_n "(cached) $ac_c" 1>&6
10742else
10743
10744 cat > conftest.$ac_ext <<EOF
40a7debc 10745#line 10746 "configure"
234b45d4
KB
10746#include "confdefs.h"
10747
10748#include <stdlib.h>
10749#include <iconv.h>
10750extern
10751#ifdef __cplusplus
10752"C"
10753#endif
10754#if defined(__STDC__) || defined(__cplusplus)
10755size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10756#else
10757size_t iconv();
10758#endif
10759
10760int main() {
10761
10762; return 0; }
10763EOF
40a7debc 10764if { (eval echo configure:10765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10765 rm -rf conftest*
10766 am_cv_proto_iconv_arg1=""
10767else
10768 echo "configure: failed program was:" >&5
10769 cat conftest.$ac_ext >&5
10770 rm -rf conftest*
10771 am_cv_proto_iconv_arg1="const"
10772fi
10773rm -f conftest*
10774 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);"
10775fi
10776
10777 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10778 echo "$ac_t""${ac_t:-
10779 }$am_cv_proto_iconv" 1>&6
10780 cat >> confdefs.h <<EOF
10781#define ICONV_CONST $am_cv_proto_iconv_arg1
10782EOF
10783
10784 fi
10785 LIBICONV=
10786 if test "$am_cv_lib_iconv" = yes; then
10787 LIBICONV="-liconv"
10788 fi
10789
10790
10791
c906108c
SS
10792trap '' 1 2 15
10793cat > confcache <<\EOF
10794# This file is a shell script that caches the results of configure
10795# tests run on this system so they can be shared between configure
10796# scripts and configure runs. It is not useful on other systems.
10797# If it contains results you don't want to keep, you may remove or edit it.
10798#
10799# By default, configure uses ./config.cache as the cache file,
10800# creating it if it does not exist already. You can give configure
10801# the --cache-file=FILE option to use a different cache file; that is
10802# what configure does when it calls configure scripts in
10803# subdirectories, so they share the cache.
10804# Giving --cache-file=/dev/null disables caching, for debugging configure.
10805# config.status only pays attention to the cache file if you give it the
10806# --recheck option to rerun configure.
10807#
10808EOF
10809# The following way of writing the cache mishandles newlines in values,
10810# but we know of no workaround that is simple, portable, and efficient.
10811# So, don't put newlines in cache variables' values.
10812# Ultrix sh set writes to stderr and can't be redirected directly,
10813# and sets the high bit in the cache file unless we assign to the vars.
10814(set) 2>&1 |
10815 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10816 *ac_space=\ *)
10817 # `set' does not quote correctly, so add quotes (double-quote substitution
10818 # turns \\\\ into \\, and sed turns \\ into \).
10819 sed -n \
10820 -e "s/'/'\\\\''/g" \
10821 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10822 ;;
10823 *)
10824 # `set' quotes correctly as required by POSIX, so do not add quotes.
10825 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10826 ;;
10827 esac >> confcache
10828if cmp -s $cache_file confcache; then
10829 :
10830else
10831 if test -w $cache_file; then
10832 echo "updating cache $cache_file"
10833 cat confcache > $cache_file
10834 else
10835 echo "not updating unwritable cache $cache_file"
10836 fi
10837fi
10838rm -f confcache
10839
10840trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10841
10842test "x$prefix" = xNONE && prefix=$ac_default_prefix
10843# Let make expand exec_prefix.
10844test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10845
10846# Any assignment to VPATH causes Sun make to only execute
10847# the first set of double-colon rules, so remove it if not needed.
10848# If there is a colon in the path, we need to keep it.
10849if test "x$srcdir" = x.; then
10850 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10851fi
10852
10853trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10854
10855DEFS=-DHAVE_CONFIG_H
10856
10857# Without the "./", some shells look in PATH for config.status.
10858: ${CONFIG_STATUS=./config.status}
10859
10860echo creating $CONFIG_STATUS
10861rm -f $CONFIG_STATUS
10862cat > $CONFIG_STATUS <<EOF
10863#! /bin/sh
10864# Generated automatically by configure.
10865# Run this file to recreate the current configuration.
10866# This directory was configured as follows,
10867# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10868#
10869# $0 $ac_configure_args
10870#
10871# Compiler output produced by configure, useful for debugging
10872# configure, is in ./config.log if it exists.
10873
10874ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10875for ac_option
10876do
10877 case "\$ac_option" in
10878 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10879 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10880 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10881 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10882 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10883 exit 0 ;;
10884 -help | --help | --hel | --he | --h)
10885 echo "\$ac_cs_usage"; exit 0 ;;
10886 *) echo "\$ac_cs_usage"; exit 1 ;;
10887 esac
10888done
10889
10890ac_given_srcdir=$srcdir
10891ac_given_INSTALL="$INSTALL"
10892
ed952ac5 10893trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10894EOF
10895cat >> $CONFIG_STATUS <<EOF
10896
10897# Protect against being on the right side of a sed subst in config.status.
10898sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10899 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10900$ac_vpsub
10901$extrasub
10902s%@SHELL@%$SHELL%g
10903s%@CFLAGS@%$CFLAGS%g
10904s%@CPPFLAGS@%$CPPFLAGS%g
10905s%@CXXFLAGS@%$CXXFLAGS%g
10906s%@FFLAGS@%$FFLAGS%g
10907s%@DEFS@%$DEFS%g
10908s%@LDFLAGS@%$LDFLAGS%g
10909s%@LIBS@%$LIBS%g
10910s%@exec_prefix@%$exec_prefix%g
10911s%@prefix@%$prefix%g
10912s%@program_transform_name@%$program_transform_name%g
10913s%@bindir@%$bindir%g
10914s%@sbindir@%$sbindir%g
10915s%@libexecdir@%$libexecdir%g
10916s%@datadir@%$datadir%g
10917s%@sysconfdir@%$sysconfdir%g
10918s%@sharedstatedir@%$sharedstatedir%g
10919s%@localstatedir@%$localstatedir%g
10920s%@libdir@%$libdir%g
10921s%@includedir@%$includedir%g
10922s%@oldincludedir@%$oldincludedir%g
10923s%@infodir@%$infodir%g
10924s%@mandir@%$mandir%g
413ccac7
AC
10925s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10926s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10927s%@MAINT@%$MAINT%g
c906108c
SS
10928s%@CC@%$CC%g
10929s%@CPP@%$CPP%g
10930s%@host@%$host%g
10931s%@host_alias@%$host_alias%g
10932s%@host_cpu@%$host_cpu%g
10933s%@host_vendor@%$host_vendor%g
10934s%@host_os@%$host_os%g
10935s%@target@%$target%g
10936s%@target_alias@%$target_alias%g
10937s%@target_cpu@%$target_cpu%g
10938s%@target_vendor@%$target_vendor%g
10939s%@target_os@%$target_os%g
10940s%@build@%$build%g
10941s%@build_alias@%$build_alias%g
10942s%@build_cpu@%$build_cpu%g
10943s%@build_vendor@%$build_vendor%g
10944s%@build_os@%$build_os%g
c906108c 10945s%@RANLIB@%$RANLIB%g
8bb2c122 10946s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10947s%@ALLOCA@%$ALLOCA%g
10948s%@USE_NLS@%$USE_NLS%g
10949s%@MSGFMT@%$MSGFMT%g
10950s%@GMSGFMT@%$GMSGFMT%g
10951s%@XGETTEXT@%$XGETTEXT%g
10952s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10953s%@CATALOGS@%$CATALOGS%g
10954s%@CATOBJEXT@%$CATOBJEXT%g
10955s%@DATADIRNAME@%$DATADIRNAME%g
10956s%@GMOFILES@%$GMOFILES%g
10957s%@INSTOBJEXT@%$INSTOBJEXT%g
10958s%@INTLDEPS@%$INTLDEPS%g
10959s%@INTLLIBS@%$INTLLIBS%g
10960s%@INTLOBJS@%$INTLOBJS%g
10961s%@POFILES@%$POFILES%g
10962s%@POSUB@%$POSUB%g
10963s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10964s%@GT_NO@%$GT_NO%g
10965s%@GT_YES@%$GT_YES%g
10966s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10967s%@l@%$l%g
8dcde887 10968s%@subdirs@%$subdirs%g
7a292a7a 10969s%@AWK@%$AWK%g
c906108c
SS
10970s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10971s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10972s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10973s%@LN_S@%$LN_S%g
10974s%@YACC@%$YACC%g
c906108c 10975s%@AR@%$AR%g
95ca63c4
CF
10976s%@DLLTOOL@%$DLLTOOL%g
10977s%@WINDRES@%$WINDRES%g
75c6e08a 10978s%@MIG@%$MIG%g
c906108c 10979s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10980s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10981s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10982s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10983s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10984s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10985s%@MMALLOC@%$MMALLOC%g
aff38e61 10986s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10987s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10988s%@LIBGUI@%$LIBGUI%g
10989s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10990s%@WIN32LDAPP@%$WIN32LDAPP%g
10991s%@TCL_VERSION@%$TCL_VERSION%g
10992s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10993s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10994s%@TCL_CC@%$TCL_CC%g
10995s%@TCL_DEFS@%$TCL_DEFS%g
10996s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10997s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10998s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10999s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11000s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11001s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11002s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11003s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11004s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11005s%@TCL_RANLIB@%$TCL_RANLIB%g
11006s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11007s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11008s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11009s%@TK_VERSION@%$TK_VERSION%g
11010s%@TK_DEFS@%$TK_DEFS%g
11011s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11012s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11013s%@TK_XLIBSW@%$TK_XLIBSW%g
11014s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11015s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11016s%@TCLHDIR@%$TCLHDIR%g
11017s%@TKHDIR@%$TKHDIR%g
11018s%@ITCLHDIR@%$ITCLHDIR%g
11019s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11020s%@ITCL_VERSION@%$ITCL_VERSION%g
11021s%@ITCL_DEFS@%$ITCL_DEFS%g
11022s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11023s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11024s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11025s%@ITK_VERSION@%$ITK_VERSION%g
11026s%@ITK_DEFS@%$ITK_DEFS%g
11027s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11028s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11029s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11030s%@X_CFLAGS@%$X_CFLAGS%g
11031s%@X_LDFLAGS@%$X_LDFLAGS%g
11032s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11033s%@TCL_DEPS@%$TCL_DEPS%g
11034s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11035s%@ITCLLIB@%$ITCLLIB%g
11036s%@ITCL_DEPS@%$ITCL_DEPS%g
11037s%@ITKLIB@%$ITKLIB%g
11038s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11039s%@GDBTKLIBS@%$GDBTKLIBS%g
11040s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11041s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11042s%@IGNORE_SIM@%$IGNORE_SIM%g
11043s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11044s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11045s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 11046s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 11047s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
11048s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11049s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 11050s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
11051s%@CONFIG_ALL@%$CONFIG_ALL%g
11052s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11053s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11054s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11055s%@target_subdir@%$target_subdir%g
11056/@host_makefile_frag@/r $host_makefile_frag
11057s%@host_makefile_frag@%%g
11058/@target_makefile_frag@/r $target_makefile_frag
11059s%@target_makefile_frag@%%g
11060s%@frags@%$frags%g
5a2402b8
AC
11061s%@xm_h@%$xm_h%g
11062s%@tm_h@%$tm_h%g
11063s%@nm_h@%$nm_h%g
c906108c 11064s%@EXEEXT@%$EXEEXT%g
234b45d4 11065s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11066
11067CEOF
11068EOF
11069
11070cat >> $CONFIG_STATUS <<\EOF
11071
11072# Split the substitutions into bite-sized pieces for seds with
11073# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11074ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11075ac_file=1 # Number of current file.
11076ac_beg=1 # First line for current file.
11077ac_end=$ac_max_sed_cmds # Line after last line for current file.
11078ac_more_lines=:
11079ac_sed_cmds=""
11080while $ac_more_lines; do
11081 if test $ac_beg -gt 1; then
11082 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11083 else
11084 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11085 fi
11086 if test ! -s conftest.s$ac_file; then
11087 ac_more_lines=false
11088 rm -f conftest.s$ac_file
11089 else
11090 if test -z "$ac_sed_cmds"; then
11091 ac_sed_cmds="sed -f conftest.s$ac_file"
11092 else
11093 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11094 fi
11095 ac_file=`expr $ac_file + 1`
11096 ac_beg=$ac_end
11097 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11098 fi
11099done
11100if test -z "$ac_sed_cmds"; then
11101 ac_sed_cmds=cat
11102fi
11103EOF
11104
11105cat >> $CONFIG_STATUS <<EOF
11106
ed952ac5 11107CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11108EOF
11109cat >> $CONFIG_STATUS <<\EOF
11110for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11111 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11112 case "$ac_file" in
11113 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11114 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11115 *) ac_file_in="${ac_file}.in" ;;
11116 esac
11117
11118 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11119
11120 # Remove last slash and all that follows it. Not all systems have dirname.
11121 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11122 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11123 # The file is in a subdirectory.
11124 test ! -d "$ac_dir" && mkdir "$ac_dir"
11125 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11126 # A "../" for each directory in $ac_dir_suffix.
11127 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11128 else
11129 ac_dir_suffix= ac_dots=
11130 fi
11131
11132 case "$ac_given_srcdir" in
11133 .) srcdir=.
11134 if test -z "$ac_dots"; then top_srcdir=.
11135 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11136 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11137 *) # Relative path.
11138 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11139 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11140 esac
11141
11142 case "$ac_given_INSTALL" in
11143 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11144 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11145 esac
11146
11147 echo creating "$ac_file"
11148 rm -f "$ac_file"
11149 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11150 case "$ac_file" in
11151 *Makefile*) ac_comsub="1i\\
11152# $configure_input" ;;
11153 *) ac_comsub= ;;
11154 esac
11155
11156 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11157 sed -e "$ac_comsub
11158s%@configure_input@%$configure_input%g
11159s%@srcdir@%$srcdir%g
11160s%@top_srcdir@%$top_srcdir%g
11161s%@INSTALL@%$INSTALL%g
11162" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11163fi; done
11164rm -f conftest.s*
11165
11166# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11167# NAME is the cpp macro being defined and VALUE is the value it is being given.
11168#
11169# ac_d sets the value in "#define NAME VALUE" lines.
11170ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11171ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11172ac_dC='\3'
11173ac_dD='%g'
11174# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11175ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11176ac_uB='\([ ]\)%\1#\2define\3'
11177ac_uC=' '
11178ac_uD='\4%g'
11179# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11180ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11181ac_eB='$%\1#\2define\3'
11182ac_eC=' '
11183ac_eD='%g'
11184
11185if test "${CONFIG_HEADERS+set}" != set; then
11186EOF
11187cat >> $CONFIG_STATUS <<EOF
11188 CONFIG_HEADERS="config.h:config.in"
11189EOF
11190cat >> $CONFIG_STATUS <<\EOF
11191fi
11192for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11193 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11194 case "$ac_file" in
11195 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11196 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11197 *) ac_file_in="${ac_file}.in" ;;
11198 esac
11199
11200 echo creating $ac_file
11201
11202 rm -f conftest.frag conftest.in conftest.out
11203 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11204 cat $ac_file_inputs > conftest.in
11205
11206EOF
11207
11208# Transform confdefs.h into a sed script conftest.vals that substitutes
11209# the proper values into config.h.in to produce config.h. And first:
11210# Protect against being on the right side of a sed subst in config.status.
11211# Protect against being in an unquoted here document in config.status.
11212rm -f conftest.vals
11213cat > conftest.hdr <<\EOF
11214s/[\\&%]/\\&/g
11215s%[\\$`]%\\&%g
11216s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11217s%ac_d%ac_u%gp
11218s%ac_u%ac_e%gp
11219EOF
11220sed -n -f conftest.hdr confdefs.h > conftest.vals
11221rm -f conftest.hdr
11222
11223# This sed command replaces #undef with comments. This is necessary, for
11224# example, in the case of _POSIX_SOURCE, which is predefined and required
11225# on some systems where configure will not decide to define it.
11226cat >> conftest.vals <<\EOF
11227s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11228EOF
11229
11230# Break up conftest.vals because some shells have a limit on
11231# the size of here documents, and old seds have small limits too.
11232
11233rm -f conftest.tail
11234while :
11235do
11236 ac_lines=`grep -c . conftest.vals`
11237 # grep -c gives empty output for an empty file on some AIX systems.
11238 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11239 # Write a limited-size here document to conftest.frag.
11240 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11241 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11242 echo 'CEOF
11243 sed -f conftest.frag conftest.in > conftest.out
11244 rm -f conftest.in
11245 mv conftest.out conftest.in
11246' >> $CONFIG_STATUS
11247 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11248 rm -f conftest.vals
11249 mv conftest.tail conftest.vals
11250done
11251rm -f conftest.vals
11252
11253cat >> $CONFIG_STATUS <<\EOF
11254 rm -f conftest.frag conftest.h
11255 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11256 cat conftest.in >> conftest.h
11257 rm -f conftest.in
11258 if cmp -s $ac_file conftest.h 2>/dev/null; then
11259 echo "$ac_file is unchanged"
11260 rm -f conftest.h
11261 else
11262 # Remove last slash and all that follows it. Not all systems have dirname.
11263 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11264 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11265 # The file is in a subdirectory.
11266 test ! -d "$ac_dir" && mkdir "$ac_dir"
11267 fi
11268 rm -f $ac_file
11269 mv conftest.h $ac_file
11270 fi
11271fi; done
11272
11273EOF
11274
11275cat >> $CONFIG_STATUS <<EOF
11276ac_sources="$files"
11277ac_dests="$links"
11278EOF
11279
11280cat >> $CONFIG_STATUS <<\EOF
11281srcdir=$ac_given_srcdir
11282while test -n "$ac_sources"; do
11283 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11284 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11285
11286 echo "linking $srcdir/$ac_source to $ac_dest"
11287
11288 if test ! -r $srcdir/$ac_source; then
11289 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11290 fi
11291 rm -f $ac_dest
11292
11293 # Make relative symlinks.
11294 # Remove last slash and all that follows it. Not all systems have dirname.
11295 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11296 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11297 # The dest file is in a subdirectory.
11298 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11299 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11300 # A "../" for each directory in $ac_dest_dir_suffix.
11301 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11302 else
11303 ac_dest_dir_suffix= ac_dots=
11304 fi
11305
11306 case "$srcdir" in
11307 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11308 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11309 esac
11310
11311 # Make a symlink if possible; otherwise try a hard link.
11312 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11313 ln $srcdir/$ac_source $ac_dest; then :
11314 else
11315 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11316 fi
11317done
11318EOF
11319cat >> $CONFIG_STATUS <<EOF
11320
11321gdb_host_cpu=$gdb_host_cpu
11322gdb_target_cpu=$gdb_target_cpu
11323nativefile=$nativefile
11324
11325EOF
11326cat >> $CONFIG_STATUS <<\EOF
11327
7ee6d7eb 11328if test "${nativefile}" = ""; then
c4620205 11329 < Makefile \
e27da16d
JT
11330 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11331 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11332 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11333 > Makefile.tem
c906108c
SS
11334mv -f Makefile.tem Makefile
11335fi
11336
11337sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11338/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11339/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11340mv -f Makefile.tmp Makefile
11341
2acceee2 11342
c906108c
SS
11343case x$CONFIG_HEADERS in
11344xconfig.h:config.in)
11345echo > stamp-h ;;
11346esac
11347
11348exit 0
11349EOF
11350chmod +x $CONFIG_STATUS
11351rm -fr confdefs* $ac_clean_files
11352test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11353
11354if test "$no_recursion" != yes; then
11355
11356 # Remove --cache-file and --srcdir arguments so they do not pile up.
11357 ac_sub_configure_args=
11358 ac_prev=
11359 for ac_arg in $ac_configure_args; do
11360 if test -n "$ac_prev"; then
11361 ac_prev=
11362 continue
11363 fi
11364 case "$ac_arg" in
11365 -cache-file | --cache-file | --cache-fil | --cache-fi \
11366 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11367 ac_prev=cache_file ;;
11368 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11369 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11370 ;;
11371 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11372 ac_prev=srcdir ;;
11373 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11374 ;;
11375 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11376 esac
11377 done
11378
8dcde887 11379 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11380
11381 # Do not complain, so a configure script can configure whichever
11382 # parts of a large source tree are present.
11383 if test ! -d $srcdir/$ac_config_dir; then
11384 continue
11385 fi
11386
11387 echo configuring in $ac_config_dir
11388
11389 case "$srcdir" in
11390 .) ;;
11391 *)
11392 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11393 else
11394 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11395 fi
11396 ;;
11397 esac
11398
11399 ac_popdir=`pwd`
11400 cd $ac_config_dir
11401
11402 # A "../" for each directory in /$ac_config_dir.
11403 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11404
11405 case "$srcdir" in
11406 .) # No --srcdir option. We are building in place.
11407 ac_sub_srcdir=$srcdir ;;
11408 /*) # Absolute path.
11409 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11410 *) # Relative path.
11411 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11412 esac
11413
11414 # Check for guested configure; otherwise get Cygnus style configure.
11415 if test -f $ac_sub_srcdir/configure; then
11416 ac_sub_configure=$ac_sub_srcdir/configure
11417 elif test -f $ac_sub_srcdir/configure.in; then
11418 ac_sub_configure=$ac_configure
11419 else
11420 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11421 ac_sub_configure=
11422 fi
11423
11424 # The recursion is here.
11425 if test -n "$ac_sub_configure"; then
11426
11427 # Make the cache file name correct relative to the subdirectory.
11428 case "$cache_file" in
11429 /*) ac_sub_cache_file=$cache_file ;;
11430 *) # Relative path.
11431 ac_sub_cache_file="$ac_dots$cache_file" ;;
11432 esac
11433 case "$ac_given_INSTALL" in
11434 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11435 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11436 esac
11437
11438 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11439 # The eval makes quoting arguments work.
11440 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11441 then :
11442 else
11443 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11444 fi
11445 fi
11446
11447 cd $ac_popdir
11448 done
11449fi
11450
11451
11452exit 0
This page took 0.975301 seconds and 4 git commands to generate.