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