* configure.in: Rewrite.
[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"
627af7ea
MK
21ac_help="$ac_help
22 --disable-gdbcli disable command-line interface (CLI)"
23ac_help="$ac_help
24 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
25ac_help="$ac_help
26 --enable-tui enable full-screen terminal user interface (TUI)"
27ac_help="$ac_help
28 --without-included-regex don't use included regex; this is the default
29 on systems with version 2 of the GNU C library
30 (use with caution on other system)"
c906108c
SS
31ac_help="$ac_help
32 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
33ac_help="$ac_help
34 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
35ac_help="$ac_help
36 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
37ac_help="$ac_help
38 --enable-gdbtk Enable GDBTK GUI front end"
39ac_help="$ac_help
40 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
41ac_help="$ac_help
42 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
43ac_help="$ac_help
44 --with-tclinclude=DIR Directory where tcl private headers are"
45ac_help="$ac_help
46 --with-tkinclude=DIR Directory where tk private headers are"
47ac_help="$ac_help
48 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
49ac_help="$ac_help
50 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
51ac_help="$ac_help
52 --with-x use the X Window System"
7a292a7a
SS
53ac_help="$ac_help
54 --enable-sim Link gdb with simulator"
c906108c
SS
55ac_help="$ac_help
56 --enable-shared Use shared libraries"
8dcde887
MK
57ac_help="$ac_help
58 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
59ac_help="$ac_help
60 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
61
62# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
66cache_file=./config.cache
67exec_prefix=NONE
68host=NONE
69no_create=
70nonopt=NONE
71no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
76silent=
77site=
c41b7eb1 78sitefile=
c906108c
SS
79srcdir=
80target=NONE
81verbose=
82x_includes=NONE
83x_libraries=NONE
84bindir='${exec_prefix}/bin'
85sbindir='${exec_prefix}/sbin'
86libexecdir='${exec_prefix}/libexec'
87datadir='${prefix}/share'
88sysconfdir='${prefix}/etc'
89sharedstatedir='${prefix}/com'
90localstatedir='${prefix}/var'
91libdir='${exec_prefix}/lib'
92includedir='${prefix}/include'
93oldincludedir='/usr/include'
94infodir='${prefix}/info'
95mandir='${prefix}/man'
96
97# Initialize some other variables.
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101# Maximum number of lines to put in a shell here document.
102ac_max_here_lines=12
103
104ac_prev=
105for ac_option
106do
107
108 # If the previous option needs an argument, assign it.
109 if test -n "$ac_prev"; then
110 eval "$ac_prev=\$ac_option"
111 ac_prev=
112 continue
113 fi
114
115 case "$ac_option" in
116 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117 *) ac_optarg= ;;
118 esac
119
120 # Accept the important Cygnus configure options, so we can diagnose typos.
121
122 case "$ac_option" in
123
124 -bindir | --bindir | --bindi | --bind | --bin | --bi)
125 ac_prev=bindir ;;
126 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127 bindir="$ac_optarg" ;;
128
129 -build | --build | --buil | --bui | --bu)
130 ac_prev=build ;;
131 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132 build="$ac_optarg" ;;
133
134 -cache-file | --cache-file | --cache-fil | --cache-fi \
135 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136 ac_prev=cache_file ;;
137 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139 cache_file="$ac_optarg" ;;
140
141 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142 ac_prev=datadir ;;
143 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144 | --da=*)
145 datadir="$ac_optarg" ;;
146
147 -disable-* | --disable-*)
148 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149 # Reject names that are not valid shell variable names.
150 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 fi
153 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154 eval "enable_${ac_feature}=no" ;;
155
156 -enable-* | --enable-*)
157 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158 # Reject names that are not valid shell variable names.
159 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 fi
162 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163 case "$ac_option" in
164 *=*) ;;
165 *) ac_optarg=yes ;;
166 esac
167 eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171 | --exec | --exe | --ex)
172 ac_prev=exec_prefix ;;
173 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175 | --exec=* | --exe=* | --ex=*)
176 exec_prefix="$ac_optarg" ;;
177
178 -gas | --gas | --ga | --g)
179 # Obsolete; use --with-gas.
180 with_gas=yes ;;
181
182 -help | --help | --hel | --he)
183 # Omit some internal or obsolete options to make the list less imposing.
184 # This message is too long to be a string in the A/UX 3.1 sh.
185 cat << EOF
186Usage: configure [options] [host]
187Options: [defaults in brackets after descriptions]
188Configuration:
189 --cache-file=FILE cache test results in FILE
190 --help print this message
191 --no-create do not create output files
192 --quiet, --silent do not print \`checking...' messages
c41b7eb1 193 --site-file=FILE use FILE as the site file
c906108c
SS
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
199 [same as prefix]
200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
232EOF
233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
281 -nfp | --nfp | --nf)
282 # Obsolete; use --without-fp.
283 with_fp=no ;;
284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
292
293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
c41b7eb1
JB
364 -site-file | --site-file | --site-fil | --site-fi | --site-f)
365 ac_prev=sitefile ;;
366 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
367 sitefile="$ac_optarg" ;;
368
c906108c
SS
369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370 ac_prev=srcdir ;;
371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372 srcdir="$ac_optarg" ;;
373
374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375 | --syscon | --sysco | --sysc | --sys | --sy)
376 ac_prev=sysconfdir ;;
377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379 sysconfdir="$ac_optarg" ;;
380
381 -target | --target | --targe | --targ | --tar | --ta | --t)
382 ac_prev=target ;;
383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384 target="$ac_optarg" ;;
385
386 -v | -verbose | --verbose | --verbos | --verbo | --verb)
387 verbose=yes ;;
388
389 -version | --version | --versio | --versi | --vers)
390 echo "configure generated by autoconf version 2.13"
391 exit 0 ;;
392
393 -with-* | --with-*)
394 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395 # Reject names that are not valid shell variable names.
396 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398 fi
399 ac_package=`echo $ac_package| sed 's/-/_/g'`
400 case "$ac_option" in
401 *=*) ;;
402 *) ac_optarg=yes ;;
403 esac
404 eval "with_${ac_package}='$ac_optarg'" ;;
405
406 -without-* | --without-*)
407 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411 fi
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 eval "with_${ac_package}=no" ;;
414
415 --x)
416 # Obsolete; use --with-x.
417 with_x=yes ;;
418
419 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420 | --x-incl | --x-inc | --x-in | --x-i)
421 ac_prev=x_includes ;;
422 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424 x_includes="$ac_optarg" ;;
425
426 -x-libraries | --x-libraries | --x-librarie | --x-librari \
427 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428 ac_prev=x_libraries ;;
429 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431 x_libraries="$ac_optarg" ;;
432
433 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
434 ;;
435
436 *)
437 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438 echo "configure: warning: $ac_option: invalid host type" 1>&2
439 fi
440 if test "x$nonopt" != xNONE; then
441 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442 fi
443 nonopt="$ac_option"
444 ;;
445
446 esac
447done
448
449if test -n "$ac_prev"; then
450 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
451fi
452
453trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455# File descriptor usage:
456# 0 standard input
457# 1 file creation
458# 2 errors and warnings
459# 3 some systems may open it to /dev/tty
460# 4 used on the Kubota Titan
461# 6 checking for... messages and results
462# 5 compiler messages saved in config.log
463if test "$silent" = yes; then
464 exec 6>/dev/null
465else
466 exec 6>&1
467fi
468exec 5>./config.log
469
470echo "\
471This file contains any messages produced by compilers while
472running configure, to aid debugging if configure makes a mistake.
473" 1>&5
474
475# Strip out --no-create and --no-recursion so they do not pile up.
476# Also quote any args containing shell metacharacters.
477ac_configure_args=
478for ac_arg
479do
480 case "$ac_arg" in
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482 | --no-cr | --no-c) ;;
483 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488 esac
489done
490
491# NLS nuisances.
492# Only set these to C if already set. These must not be set unconditionally
493# because not all systems understand e.g. LANG=C (notably SCO).
494# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495# Non-C LC_CTYPE values break the ctype check.
496if test "${LANG+set}" = set; then LANG=C; export LANG; fi
497if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
500
501# confdefs.h avoids OS command line length limits that DEFS can exceed.
502rm -rf conftest* confdefs.h
503# AIX cpp loses on an empty file, so make sure it contains at least a newline.
504echo > confdefs.h
505
506# A filename unique to this package, relative to the directory that
507# configure is in, which we can look for to find out if srcdir is correct.
508ac_unique_file=main.c
509
510# Find the source files, if location was not specified.
511if test -z "$srcdir"; then
512 ac_srcdir_defaulted=yes
513 # Try the directory containing this script, then its parent.
514 ac_prog=$0
515 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517 srcdir=$ac_confdir
518 if test ! -r $srcdir/$ac_unique_file; then
519 srcdir=..
520 fi
521else
522 ac_srcdir_defaulted=no
523fi
524if test ! -r $srcdir/$ac_unique_file; then
525 if test "$ac_srcdir_defaulted" = yes; then
526 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527 else
528 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
529 fi
530fi
531srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532
533# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
534if test -z "$sitefile"; then
535 if test -z "$CONFIG_SITE"; then
536 if test "x$prefix" != xNONE; then
537 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
538 else
539 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
540 fi
c906108c 541 fi
c41b7eb1
JB
542else
543 CONFIG_SITE="$sitefile"
c906108c
SS
544fi
545for ac_site_file in $CONFIG_SITE; do
546 if test -r "$ac_site_file"; then
547 echo "loading site script $ac_site_file"
548 . "$ac_site_file"
549 fi
550done
551
552if test -r "$cache_file"; then
553 echo "loading cache $cache_file"
554 . $cache_file
555else
556 echo "creating cache $cache_file"
557 > $cache_file
558fi
559
560ac_ext=c
561# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
562ac_cpp='$CPP $CPPFLAGS'
563ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
564ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
565cross_compiling=$ac_cv_prog_cc_cross
566
567ac_exeext=
568ac_objext=o
569if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
570 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
571 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
572 ac_n= ac_c='
573' ac_t=' '
574 else
575 ac_n=-n ac_c= ac_t=
576 fi
577else
578 ac_n= ac_c='\c' ac_t=
579fi
580
581
582
413ccac7 583echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
91151a06 584echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
585 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
586if test "${enable_maintainer_mode+set}" = set; then
587 enableval="$enable_maintainer_mode"
588 USE_MAINTAINER_MODE=$enableval
589else
590 USE_MAINTAINER_MODE=no
591fi
592
593 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
594
595
596if test $USE_MAINTAINER_MODE = yes; then
597 MAINTAINER_MODE_TRUE=
598 MAINTAINER_MODE_FALSE='#'
599else
600 MAINTAINER_MODE_TRUE='#'
601 MAINTAINER_MODE_FALSE=
602fi
603 MAINT=$MAINTAINER_MODE_TRUE
604
605
c906108c
SS
606
607# Extract the first word of "gcc", so it can be a program name with args.
608set dummy gcc; ac_word=$2
609echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 610echo "configure:611: checking for $ac_word" >&5
c906108c
SS
611if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613else
614 if test -n "$CC"; then
615 ac_cv_prog_CC="$CC" # Let the user override the test.
616else
617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
618 ac_dummy="$PATH"
619 for ac_dir in $ac_dummy; do
620 test -z "$ac_dir" && ac_dir=.
621 if test -f $ac_dir/$ac_word; then
622 ac_cv_prog_CC="gcc"
623 break
624 fi
625 done
626 IFS="$ac_save_ifs"
627fi
628fi
629CC="$ac_cv_prog_CC"
630if test -n "$CC"; then
631 echo "$ac_t""$CC" 1>&6
632else
633 echo "$ac_t""no" 1>&6
634fi
635
636if test -z "$CC"; then
637 # Extract the first word of "cc", so it can be a program name with args.
638set dummy cc; ac_word=$2
639echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 640echo "configure:641: checking for $ac_word" >&5
c906108c
SS
641if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642 echo $ac_n "(cached) $ac_c" 1>&6
643else
644 if test -n "$CC"; then
645 ac_cv_prog_CC="$CC" # Let the user override the test.
646else
647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
648 ac_prog_rejected=no
649 ac_dummy="$PATH"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
653 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
654 ac_prog_rejected=yes
655 continue
656 fi
657 ac_cv_prog_CC="cc"
658 break
659 fi
660 done
661 IFS="$ac_save_ifs"
662if test $ac_prog_rejected = yes; then
663 # We found a bogon in the path, so make sure we never use it.
664 set dummy $ac_cv_prog_CC
665 shift
666 if test $# -gt 0; then
667 # We chose a different compiler from the bogus one.
668 # However, it has the same basename, so the bogon will be chosen
669 # first if we set CC to just the basename; use the full file name.
670 shift
671 set dummy "$ac_dir/$ac_word" "$@"
672 shift
673 ac_cv_prog_CC="$@"
674 fi
675fi
676fi
677fi
678CC="$ac_cv_prog_CC"
679if test -n "$CC"; then
680 echo "$ac_t""$CC" 1>&6
681else
682 echo "$ac_t""no" 1>&6
683fi
684
685 if test -z "$CC"; then
686 case "`uname -s`" in
687 *win32* | *WIN32*)
688 # Extract the first word of "cl", so it can be a program name with args.
689set dummy cl; ac_word=$2
690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 691echo "configure:692: checking for $ac_word" >&5
c906108c
SS
692if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697else
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
699 ac_dummy="$PATH"
700 for ac_dir in $ac_dummy; do
701 test -z "$ac_dir" && ac_dir=.
702 if test -f $ac_dir/$ac_word; then
703 ac_cv_prog_CC="cl"
704 break
705 fi
706 done
707 IFS="$ac_save_ifs"
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713else
714 echo "$ac_t""no" 1>&6
715fi
716 ;;
717 esac
718 fi
719 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
720fi
721
722echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
91151a06 723echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
724
725ac_ext=c
726# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
727ac_cpp='$CPP $CPPFLAGS'
728ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
729ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
730cross_compiling=$ac_cv_prog_cc_cross
731
732cat > conftest.$ac_ext << EOF
733
91151a06 734#line 735 "configure"
c906108c
SS
735#include "confdefs.h"
736
737main(){return(0);}
738EOF
91151a06 739if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
740 ac_cv_prog_cc_works=yes
741 # If we can't run a trivial program, we are probably using a cross compiler.
742 if (./conftest; exit) 2>/dev/null; then
743 ac_cv_prog_cc_cross=no
744 else
745 ac_cv_prog_cc_cross=yes
746 fi
747else
748 echo "configure: failed program was:" >&5
749 cat conftest.$ac_ext >&5
750 ac_cv_prog_cc_works=no
751fi
752rm -fr conftest*
753ac_ext=c
754# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
755ac_cpp='$CPP $CPPFLAGS'
756ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
757ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
758cross_compiling=$ac_cv_prog_cc_cross
759
760echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
761if test $ac_cv_prog_cc_works = no; then
762 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
763fi
764echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
91151a06 765echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
766echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
767cross_compiling=$ac_cv_prog_cc_cross
768
769echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
91151a06 770echo "configure:771: checking whether we are using GNU C" >&5
c906108c
SS
771if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 cat > conftest.c <<EOF
775#ifdef __GNUC__
776 yes;
777#endif
778EOF
91151a06 779if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
780 ac_cv_prog_gcc=yes
781else
782 ac_cv_prog_gcc=no
783fi
784fi
785
786echo "$ac_t""$ac_cv_prog_gcc" 1>&6
787
788if test $ac_cv_prog_gcc = yes; then
789 GCC=yes
790else
791 GCC=
792fi
793
794ac_test_CFLAGS="${CFLAGS+set}"
795ac_save_CFLAGS="$CFLAGS"
796CFLAGS=
797echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
91151a06 798echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
799if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801else
802 echo 'void f(){}' > conftest.c
803if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
804 ac_cv_prog_cc_g=yes
805else
806 ac_cv_prog_cc_g=no
807fi
808rm -f conftest*
809
810fi
811
812echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
813if test "$ac_test_CFLAGS" = set; then
814 CFLAGS="$ac_save_CFLAGS"
815elif test $ac_cv_prog_cc_g = yes; then
816 if test "$GCC" = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-g"
820 fi
821else
822 if test "$GCC" = yes; then
823 CFLAGS="-O2"
824 else
825 CFLAGS=
826 fi
827fi
828
14abd0fb
MK
829cat >> confdefs.h <<\EOF
830#define _GNU_SOURCE 1
831EOF
832
833
c906108c 834echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
14abd0fb 835echo "configure:836: checking how to run the C preprocessor" >&5
c906108c
SS
836# On Suns, sometimes $CPP names a directory.
837if test -n "$CPP" && test -d "$CPP"; then
838 CPP=
839fi
840if test -z "$CPP"; then
841if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843else
844 # This must be in double quotes, not single quotes, because CPP may get
845 # substituted into the Makefile and "${CC-cc}" will confuse make.
846 CPP="${CC-cc} -E"
847 # On the NeXT, cc -E runs the code through the compiler's parser,
848 # not just through cpp.
849 cat > conftest.$ac_ext <<EOF
14abd0fb 850#line 851 "configure"
c906108c
SS
851#include "confdefs.h"
852#include <assert.h>
853Syntax Error
854EOF
855ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 856{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
857ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
858if test -z "$ac_err"; then
859 :
860else
861 echo "$ac_err" >&5
862 echo "configure: failed program was:" >&5
863 cat conftest.$ac_ext >&5
864 rm -rf conftest*
865 CPP="${CC-cc} -E -traditional-cpp"
866 cat > conftest.$ac_ext <<EOF
14abd0fb 867#line 868 "configure"
c906108c
SS
868#include "confdefs.h"
869#include <assert.h>
870Syntax Error
871EOF
872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 873{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
874ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
875if test -z "$ac_err"; then
876 :
877else
878 echo "$ac_err" >&5
879 echo "configure: failed program was:" >&5
880 cat conftest.$ac_ext >&5
881 rm -rf conftest*
882 CPP="${CC-cc} -nologo -E"
883 cat > conftest.$ac_ext <<EOF
14abd0fb 884#line 885 "configure"
c906108c
SS
885#include "confdefs.h"
886#include <assert.h>
887Syntax Error
888EOF
889ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 890{ (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
891ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
892if test -z "$ac_err"; then
893 :
894else
895 echo "$ac_err" >&5
896 echo "configure: failed program was:" >&5
897 cat conftest.$ac_ext >&5
898 rm -rf conftest*
899 CPP=/lib/cpp
900fi
901rm -f conftest*
902fi
903rm -f conftest*
904fi
905rm -f conftest*
906 ac_cv_prog_CPP="$CPP"
907fi
908 CPP="$ac_cv_prog_CPP"
909else
910 ac_cv_prog_CPP="$CPP"
911fi
912echo "$ac_t""$CPP" 1>&6
913
914echo $ac_n "checking for AIX""... $ac_c" 1>&6
14abd0fb 915echo "configure:916: checking for AIX" >&5
c906108c 916cat > conftest.$ac_ext <<EOF
14abd0fb 917#line 918 "configure"
c906108c
SS
918#include "confdefs.h"
919#ifdef _AIX
920 yes
921#endif
922
923EOF
924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
925 egrep "yes" >/dev/null 2>&1; then
926 rm -rf conftest*
927 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
928#define _ALL_SOURCE 1
929EOF
930
931else
932 rm -rf conftest*
933 echo "$ac_t""no" 1>&6
934fi
935rm -f conftest*
936
937
56157b4a 938echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
14abd0fb 939echo "configure:940: checking for POSIXized ISC" >&5
56157b4a
AC
940if test -d /etc/conf/kconfig.d &&
941 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
942then
943 echo "$ac_t""yes" 1>&6
944 ISC=yes # If later tests want to check for ISC.
945 cat >> confdefs.h <<\EOF
946#define _POSIX_SOURCE 1
c906108c
SS
947EOF
948
56157b4a
AC
949 if test "$GCC" = yes; then
950 CC="$CC -posix"
951 else
952 CC="$CC -Xp"
953 fi
c906108c
SS
954else
955 echo "$ac_t""no" 1>&6
56157b4a 956 ISC=
c906108c
SS
957fi
958
959
960
961
962echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
14abd0fb 963echo "configure:964: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
964if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
965 echo $ac_n "(cached) $ac_c" 1>&6
966else
967 am_cv_prog_cc_stdc=no
968ac_save_CC="$CC"
969# Don't try gcc -ansi; that turns off useful extensions and
970# breaks some systems' header files.
971# AIX -qlanglvl=ansi
972# Ultrix and OSF/1 -std1
56157b4a
AC
973# HP-UX 10.20 and later -Ae
974# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 975# SVR4 -Xc -D__EXTENSIONS__
56157b4a 976for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
977do
978 CC="$ac_save_CC $ac_arg"
979 cat > conftest.$ac_ext <<EOF
14abd0fb 980#line 981 "configure"
c906108c
SS
981#include "confdefs.h"
982#include <stdarg.h>
983#include <stdio.h>
984#include <sys/types.h>
985#include <sys/stat.h>
986/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
987struct buf { int x; };
988FILE * (*rcsopen) (struct buf *, struct stat *, int);
989static char *e (p, i)
990 char **p;
991 int i;
992{
993 return p[i];
994}
995static char *f (char * (*g) (char **, int), char **p, ...)
996{
997 char *s;
998 va_list v;
999 va_start (v,p);
1000 s = g (p, va_arg (v,int));
1001 va_end (v);
1002 return s;
1003}
1004int test (int i, double x);
1005struct s1 {int (*f) (int a);};
1006struct s2 {int (*f) (double a);};
1007int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1008int argc;
1009char **argv;
1010
1011int main() {
1012
1013return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1014
1015; return 0; }
1016EOF
14abd0fb 1017if { (eval echo configure:1018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1018 rm -rf conftest*
1019 am_cv_prog_cc_stdc="$ac_arg"; break
1020else
1021 echo "configure: failed program was:" >&5
1022 cat conftest.$ac_ext >&5
1023fi
1024rm -f conftest*
1025done
1026CC="$ac_save_CC"
1027
1028fi
1029
1030if test -z "$am_cv_prog_cc_stdc"; then
1031 echo "$ac_t""none needed" 1>&6
1032else
1033 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1034fi
1035case "x$am_cv_prog_cc_stdc" in
1036 x|xno) ;;
1037 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1038esac
1039
1040
1041ac_aux_dir=
1042for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1043 if test -f $ac_dir/install-sh; then
1044 ac_aux_dir=$ac_dir
1045 ac_install_sh="$ac_aux_dir/install-sh -c"
1046 break
1047 elif test -f $ac_dir/install.sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install.sh -c"
1050 break
1051 fi
1052done
1053if test -z "$ac_aux_dir"; then
1054 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1055fi
1056ac_config_guess=$ac_aux_dir/config.guess
1057ac_config_sub=$ac_aux_dir/config.sub
1058ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1059
1060
1061# Do some error checking and defaulting for the host and target type.
1062# The inputs are:
1063# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1064#
1065# The rules are:
1066# 1. You are not allowed to specify --host, --target, and nonopt at the
1067# same time.
1068# 2. Host defaults to nonopt.
1069# 3. If nonopt is not specified, then host defaults to the current host,
1070# as determined by config.guess.
1071# 4. Target and build default to nonopt.
1072# 5. If nonopt is not specified, then target and build default to host.
1073
1074# The aliases save the names the user supplied, while $host etc.
1075# will get canonicalized.
1076case $host---$target---$nonopt in
1077NONE---*---* | *---NONE---* | *---*---NONE) ;;
1078*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1079esac
1080
1081
1082# Make sure we can run config.sub.
1083if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1084else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1085fi
1086
1087echo $ac_n "checking host system type""... $ac_c" 1>&6
14abd0fb 1088echo "configure:1089: checking host system type" >&5
c906108c
SS
1089
1090host_alias=$host
1091case "$host_alias" in
1092NONE)
1093 case $nonopt in
1094 NONE)
1095 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1096 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1097 fi ;;
1098 *) host_alias=$nonopt ;;
1099 esac ;;
1100esac
1101
1102host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1103host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1104host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1105host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1106echo "$ac_t""$host" 1>&6
1107
1108echo $ac_n "checking target system type""... $ac_c" 1>&6
14abd0fb 1109echo "configure:1110: checking target system type" >&5
c906108c
SS
1110
1111target_alias=$target
1112case "$target_alias" in
1113NONE)
1114 case $nonopt in
1115 NONE) target_alias=$host_alias ;;
1116 *) target_alias=$nonopt ;;
1117 esac ;;
1118esac
1119
1120target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1121target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1122target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1123target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1124echo "$ac_t""$target" 1>&6
1125
1126echo $ac_n "checking build system type""... $ac_c" 1>&6
14abd0fb 1127echo "configure:1128: checking build system type" >&5
c906108c
SS
1128
1129build_alias=$build
1130case "$build_alias" in
1131NONE)
1132 case $nonopt in
1133 NONE) build_alias=$host_alias ;;
1134 *) build_alias=$nonopt ;;
1135 esac ;;
1136esac
1137
1138build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1139build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1142echo "$ac_t""$build" 1>&6
1143
1144test "$host_alias" != "$target_alias" &&
1145 test "$program_prefix$program_suffix$program_transform_name" = \
1146 NONENONEs,x,x, &&
1147 program_prefix=${target_alias}-
1148
1149
8bb2c122
MK
1150# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1151# doesn't support cross-compilation, but the one from Autoconf 2.5x
1152# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1153# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1154# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1155# 2.5x.
1156if test $host != $build; then
1157 ac_tool_prefix=${host_alias}-
1158else
1159 ac_tool_prefix=
1160fi
1161
1162# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1163set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1164echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 1165echo "configure:1166: checking for $ac_word" >&5
8bb2c122
MK
1166if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1167 echo $ac_n "(cached) $ac_c" 1>&6
1168else
1169 if test -n "$RANLIB"; then
1170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1171else
1172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1173 ac_dummy="$PATH"
1174 for ac_dir in $ac_dummy; do
1175 test -z "$ac_dir" && ac_dir=.
1176 if test -f $ac_dir/$ac_word; then
1177 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1178 break
1179 fi
1180 done
1181 IFS="$ac_save_ifs"
1182fi
1183fi
1184RANLIB="$ac_cv_prog_RANLIB"
1185if test -n "$RANLIB"; then
1186 echo "$ac_t""$RANLIB" 1>&6
1187else
1188 echo "$ac_t""no" 1>&6
1189fi
1190
1191
1192if test -z "$ac_cv_prog_RANLIB"; then
1193if test -n "$ac_tool_prefix"; then
1194 # Extract the first word of "ranlib", so it can be a program name with args.
1195set dummy ranlib; ac_word=$2
1196echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 1197echo "configure:1198: checking for $ac_word" >&5
8bb2c122
MK
1198if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200else
1201 if test -n "$RANLIB"; then
1202 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1203else
1204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1205 ac_dummy="$PATH"
1206 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 if test -f $ac_dir/$ac_word; then
1209 ac_cv_prog_RANLIB="ranlib"
1210 break
1211 fi
1212 done
1213 IFS="$ac_save_ifs"
1214 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1215fi
1216fi
1217RANLIB="$ac_cv_prog_RANLIB"
1218if test -n "$RANLIB"; then
1219 echo "$ac_t""$RANLIB" 1>&6
1220else
1221 echo "$ac_t""no" 1>&6
1222fi
1223
1224else
1225 RANLIB=":"
1226fi
1227fi
1228
1229
c906108c
SS
1230ALL_LINGUAS=
1231echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
14abd0fb 1232echo "configure:1233: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1233set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1234if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1235 echo $ac_n "(cached) $ac_c" 1>&6
1236else
1237 cat > conftestmake <<\EOF
1238all:
1239 @echo 'ac_maketemp="${MAKE}"'
1240EOF
1241# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1242eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1243if test -n "$ac_maketemp"; then
1244 eval ac_cv_prog_make_${ac_make}_set=yes
1245else
1246 eval ac_cv_prog_make_${ac_make}_set=no
1247fi
1248rm -f conftestmake
1249fi
1250if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1251 echo "$ac_t""yes" 1>&6
1252 SET_MAKE=
1253else
1254 echo "$ac_t""no" 1>&6
1255 SET_MAKE="MAKE=${MAKE-make}"
1256fi
1257
1258# Extract the first word of "ranlib", so it can be a program name with args.
1259set dummy ranlib; ac_word=$2
1260echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 1261echo "configure:1262: checking for $ac_word" >&5
c906108c
SS
1262if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264else
1265 if test -n "$RANLIB"; then
1266 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1267else
1268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1269 ac_dummy="$PATH"
1270 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 if test -f $ac_dir/$ac_word; then
1273 ac_cv_prog_RANLIB="ranlib"
1274 break
1275 fi
1276 done
1277 IFS="$ac_save_ifs"
1278 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1279fi
1280fi
1281RANLIB="$ac_cv_prog_RANLIB"
1282if test -n "$RANLIB"; then
1283 echo "$ac_t""$RANLIB" 1>&6
1284else
1285 echo "$ac_t""no" 1>&6
1286fi
1287
1288echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14abd0fb 1289echo "configure:1290: checking for ANSI C header files" >&5
c906108c
SS
1290if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1291 echo $ac_n "(cached) $ac_c" 1>&6
1292else
1293 cat > conftest.$ac_ext <<EOF
14abd0fb 1294#line 1295 "configure"
c906108c
SS
1295#include "confdefs.h"
1296#include <stdlib.h>
1297#include <stdarg.h>
1298#include <string.h>
1299#include <float.h>
1300EOF
1301ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 1302{ (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1303ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1304if test -z "$ac_err"; then
1305 rm -rf conftest*
1306 ac_cv_header_stdc=yes
1307else
1308 echo "$ac_err" >&5
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 rm -rf conftest*
1312 ac_cv_header_stdc=no
1313fi
1314rm -f conftest*
1315
1316if test $ac_cv_header_stdc = yes; then
1317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1318cat > conftest.$ac_ext <<EOF
14abd0fb 1319#line 1320 "configure"
c906108c
SS
1320#include "confdefs.h"
1321#include <string.h>
1322EOF
1323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1324 egrep "memchr" >/dev/null 2>&1; then
1325 :
1326else
1327 rm -rf conftest*
1328 ac_cv_header_stdc=no
1329fi
1330rm -f conftest*
1331
1332fi
1333
1334if test $ac_cv_header_stdc = yes; then
1335 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1336cat > conftest.$ac_ext <<EOF
14abd0fb 1337#line 1338 "configure"
c906108c
SS
1338#include "confdefs.h"
1339#include <stdlib.h>
1340EOF
1341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1342 egrep "free" >/dev/null 2>&1; then
1343 :
1344else
1345 rm -rf conftest*
1346 ac_cv_header_stdc=no
1347fi
1348rm -f conftest*
1349
1350fi
1351
1352if test $ac_cv_header_stdc = yes; then
1353 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1354if test "$cross_compiling" = yes; then
1355 :
1356else
1357 cat > conftest.$ac_ext <<EOF
14abd0fb 1358#line 1359 "configure"
c906108c
SS
1359#include "confdefs.h"
1360#include <ctype.h>
1361#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1362#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1363#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1364int main () { int i; for (i = 0; i < 256; i++)
1365if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1366exit (0); }
1367
1368EOF
14abd0fb 1369if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1370then
1371 :
1372else
1373 echo "configure: failed program was:" >&5
1374 cat conftest.$ac_ext >&5
1375 rm -fr conftest*
1376 ac_cv_header_stdc=no
1377fi
1378rm -fr conftest*
1379fi
1380
1381fi
1382fi
1383
1384echo "$ac_t""$ac_cv_header_stdc" 1>&6
1385if test $ac_cv_header_stdc = yes; then
1386 cat >> confdefs.h <<\EOF
1387#define STDC_HEADERS 1
1388EOF
1389
1390fi
1391
1392echo $ac_n "checking for working const""... $ac_c" 1>&6
14abd0fb 1393echo "configure:1394: checking for working const" >&5
c906108c
SS
1394if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1396else
1397 cat > conftest.$ac_ext <<EOF
14abd0fb 1398#line 1399 "configure"
c906108c
SS
1399#include "confdefs.h"
1400
1401int main() {
1402
1403/* Ultrix mips cc rejects this. */
1404typedef int charset[2]; const charset x;
1405/* SunOS 4.1.1 cc rejects this. */
1406char const *const *ccp;
1407char **p;
1408/* NEC SVR4.0.2 mips cc rejects this. */
1409struct point {int x, y;};
1410static struct point const zero = {0,0};
1411/* AIX XL C 1.02.0.0 rejects this.
1412 It does not let you subtract one const X* pointer from another in an arm
1413 of an if-expression whose if-part is not a constant expression */
1414const char *g = "string";
1415ccp = &g + (g ? g-g : 0);
1416/* HPUX 7.0 cc rejects these. */
1417++ccp;
1418p = (char**) ccp;
1419ccp = (char const *const *) p;
1420{ /* SCO 3.2v4 cc rejects this. */
1421 char *t;
1422 char const *s = 0 ? (char *) 0 : (char const *) 0;
1423
1424 *t++ = 0;
1425}
1426{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1427 int x[] = {25, 17};
1428 const int *foo = &x[0];
1429 ++foo;
1430}
1431{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1432 typedef const int *iptr;
1433 iptr p = 0;
1434 ++p;
1435}
1436{ /* AIX XL C 1.02.0.0 rejects this saying
1437 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1438 struct s { int j; const int *ap[3]; };
1439 struct s *b; b->j = 5;
1440}
1441{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1442 const int foo = 10;
1443}
1444
1445; return 0; }
1446EOF
14abd0fb 1447if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1448 rm -rf conftest*
1449 ac_cv_c_const=yes
1450else
1451 echo "configure: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
1453 rm -rf conftest*
1454 ac_cv_c_const=no
1455fi
1456rm -f conftest*
1457fi
1458
1459echo "$ac_t""$ac_cv_c_const" 1>&6
1460if test $ac_cv_c_const = no; then
1461 cat >> confdefs.h <<\EOF
1462#define const
1463EOF
1464
1465fi
1466
1467echo $ac_n "checking for inline""... $ac_c" 1>&6
14abd0fb 1468echo "configure:1469: checking for inline" >&5
c906108c
SS
1469if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1471else
1472 ac_cv_c_inline=no
1473for ac_kw in inline __inline__ __inline; do
1474 cat > conftest.$ac_ext <<EOF
14abd0fb 1475#line 1476 "configure"
c906108c
SS
1476#include "confdefs.h"
1477
1478int main() {
1479} $ac_kw foo() {
1480; return 0; }
1481EOF
14abd0fb 1482if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1483 rm -rf conftest*
1484 ac_cv_c_inline=$ac_kw; break
1485else
1486 echo "configure: failed program was:" >&5
1487 cat conftest.$ac_ext >&5
1488fi
1489rm -f conftest*
1490done
1491
1492fi
1493
1494echo "$ac_t""$ac_cv_c_inline" 1>&6
1495case "$ac_cv_c_inline" in
1496 inline | yes) ;;
1497 no) cat >> confdefs.h <<\EOF
1498#define inline
1499EOF
1500 ;;
1501 *) cat >> confdefs.h <<EOF
1502#define inline $ac_cv_c_inline
1503EOF
1504 ;;
1505esac
1506
1507echo $ac_n "checking for off_t""... $ac_c" 1>&6
14abd0fb 1508echo "configure:1509: checking for off_t" >&5
c906108c
SS
1509if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1510 echo $ac_n "(cached) $ac_c" 1>&6
1511else
1512 cat > conftest.$ac_ext <<EOF
14abd0fb 1513#line 1514 "configure"
c906108c
SS
1514#include "confdefs.h"
1515#include <sys/types.h>
1516#if STDC_HEADERS
1517#include <stdlib.h>
1518#include <stddef.h>
1519#endif
1520EOF
1521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1522 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1523 rm -rf conftest*
1524 ac_cv_type_off_t=yes
1525else
1526 rm -rf conftest*
1527 ac_cv_type_off_t=no
1528fi
1529rm -f conftest*
1530
1531fi
1532echo "$ac_t""$ac_cv_type_off_t" 1>&6
1533if test $ac_cv_type_off_t = no; then
1534 cat >> confdefs.h <<\EOF
1535#define off_t long
1536EOF
1537
1538fi
1539
1540echo $ac_n "checking for size_t""... $ac_c" 1>&6
14abd0fb 1541echo "configure:1542: checking for size_t" >&5
c906108c
SS
1542if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1543 echo $ac_n "(cached) $ac_c" 1>&6
1544else
1545 cat > conftest.$ac_ext <<EOF
14abd0fb 1546#line 1547 "configure"
c906108c
SS
1547#include "confdefs.h"
1548#include <sys/types.h>
1549#if STDC_HEADERS
1550#include <stdlib.h>
1551#include <stddef.h>
1552#endif
1553EOF
1554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1555 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1556 rm -rf conftest*
1557 ac_cv_type_size_t=yes
1558else
1559 rm -rf conftest*
1560 ac_cv_type_size_t=no
1561fi
1562rm -f conftest*
1563
1564fi
1565echo "$ac_t""$ac_cv_type_size_t" 1>&6
1566if test $ac_cv_type_size_t = no; then
1567 cat >> confdefs.h <<\EOF
1568#define size_t unsigned
1569EOF
1570
1571fi
1572
1573# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1574# for constant arguments. Useless!
1575echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
14abd0fb 1576echo "configure:1577: checking for working alloca.h" >&5
c906108c
SS
1577if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1578 echo $ac_n "(cached) $ac_c" 1>&6
1579else
1580 cat > conftest.$ac_ext <<EOF
14abd0fb 1581#line 1582 "configure"
c906108c
SS
1582#include "confdefs.h"
1583#include <alloca.h>
1584int main() {
1585char *p = alloca(2 * sizeof(int));
1586; return 0; }
1587EOF
14abd0fb 1588if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1589 rm -rf conftest*
1590 ac_cv_header_alloca_h=yes
1591else
1592 echo "configure: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1594 rm -rf conftest*
1595 ac_cv_header_alloca_h=no
1596fi
1597rm -f conftest*
1598fi
1599
1600echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1601if test $ac_cv_header_alloca_h = yes; then
1602 cat >> confdefs.h <<\EOF
1603#define HAVE_ALLOCA_H 1
1604EOF
1605
1606fi
1607
1608echo $ac_n "checking for alloca""... $ac_c" 1>&6
14abd0fb 1609echo "configure:1610: checking for alloca" >&5
c906108c
SS
1610if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1612else
1613 cat > conftest.$ac_ext <<EOF
14abd0fb 1614#line 1615 "configure"
c906108c
SS
1615#include "confdefs.h"
1616
1617#ifdef __GNUC__
1618# define alloca __builtin_alloca
1619#else
1620# ifdef _MSC_VER
1621# include <malloc.h>
1622# define alloca _alloca
1623# else
1624# if HAVE_ALLOCA_H
1625# include <alloca.h>
1626# else
1627# ifdef _AIX
1628 #pragma alloca
1629# else
1630# ifndef alloca /* predefined by HP cc +Olibcalls */
1631char *alloca ();
1632# endif
1633# endif
1634# endif
1635# endif
1636#endif
1637
1638int main() {
1639char *p = (char *) alloca(1);
1640; return 0; }
1641EOF
14abd0fb 1642if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1643 rm -rf conftest*
1644 ac_cv_func_alloca_works=yes
1645else
1646 echo "configure: failed program was:" >&5
1647 cat conftest.$ac_ext >&5
1648 rm -rf conftest*
1649 ac_cv_func_alloca_works=no
1650fi
1651rm -f conftest*
1652fi
1653
1654echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1655if test $ac_cv_func_alloca_works = yes; then
1656 cat >> confdefs.h <<\EOF
1657#define HAVE_ALLOCA 1
1658EOF
1659
1660fi
1661
1662if test $ac_cv_func_alloca_works = no; then
1663 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1664 # that cause trouble. Some versions do not even contain alloca or
1665 # contain a buggy version. If you still want to use their alloca,
1666 # use ar to extract alloca.o from them instead of compiling alloca.c.
1667 ALLOCA=alloca.${ac_objext}
1668 cat >> confdefs.h <<\EOF
1669#define C_ALLOCA 1
1670EOF
1671
1672
1673echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
14abd0fb 1674echo "configure:1675: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1675if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1676 echo $ac_n "(cached) $ac_c" 1>&6
1677else
1678 cat > conftest.$ac_ext <<EOF
14abd0fb 1679#line 1680 "configure"
c906108c
SS
1680#include "confdefs.h"
1681#if defined(CRAY) && ! defined(CRAY2)
1682webecray
1683#else
1684wenotbecray
1685#endif
1686
1687EOF
1688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1689 egrep "webecray" >/dev/null 2>&1; then
1690 rm -rf conftest*
1691 ac_cv_os_cray=yes
1692else
1693 rm -rf conftest*
1694 ac_cv_os_cray=no
1695fi
1696rm -f conftest*
1697
1698fi
1699
1700echo "$ac_t""$ac_cv_os_cray" 1>&6
1701if test $ac_cv_os_cray = yes; then
1702for ac_func in _getb67 GETB67 getb67; do
1703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 1704echo "configure:1705: checking for $ac_func" >&5
c906108c
SS
1705if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1706 echo $ac_n "(cached) $ac_c" 1>&6
1707else
1708 cat > conftest.$ac_ext <<EOF
14abd0fb 1709#line 1710 "configure"
c906108c
SS
1710#include "confdefs.h"
1711/* System header to define __stub macros and hopefully few prototypes,
1712 which can conflict with char $ac_func(); below. */
1713#include <assert.h>
1714/* Override any gcc2 internal prototype to avoid an error. */
1715/* We use char because int might match the return type of a gcc2
1716 builtin and then its argument prototype would still apply. */
1717char $ac_func();
1718
1719int main() {
1720
1721/* The GNU C library defines this for functions which it implements
1722 to always fail with ENOSYS. Some functions are actually named
1723 something starting with __ and the normal name is an alias. */
1724#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1725choke me
1726#else
1727$ac_func();
1728#endif
1729
1730; return 0; }
1731EOF
14abd0fb 1732if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1733 rm -rf conftest*
1734 eval "ac_cv_func_$ac_func=yes"
1735else
1736 echo "configure: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1738 rm -rf conftest*
1739 eval "ac_cv_func_$ac_func=no"
1740fi
1741rm -f conftest*
1742fi
1743
1744if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1745 echo "$ac_t""yes" 1>&6
1746 cat >> confdefs.h <<EOF
1747#define CRAY_STACKSEG_END $ac_func
1748EOF
1749
1750 break
1751else
1752 echo "$ac_t""no" 1>&6
1753fi
1754
1755done
1756fi
1757
1758echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
14abd0fb 1759echo "configure:1760: checking stack direction for C alloca" >&5
c906108c
SS
1760if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1761 echo $ac_n "(cached) $ac_c" 1>&6
1762else
1763 if test "$cross_compiling" = yes; then
1764 ac_cv_c_stack_direction=0
1765else
1766 cat > conftest.$ac_ext <<EOF
14abd0fb 1767#line 1768 "configure"
c906108c
SS
1768#include "confdefs.h"
1769find_stack_direction ()
1770{
1771 static char *addr = 0;
1772 auto char dummy;
1773 if (addr == 0)
1774 {
1775 addr = &dummy;
1776 return find_stack_direction ();
1777 }
1778 else
1779 return (&dummy > addr) ? 1 : -1;
1780}
1781main ()
1782{
1783 exit (find_stack_direction() < 0);
1784}
1785EOF
14abd0fb 1786if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1787then
1788 ac_cv_c_stack_direction=1
1789else
1790 echo "configure: failed program was:" >&5
1791 cat conftest.$ac_ext >&5
1792 rm -fr conftest*
1793 ac_cv_c_stack_direction=-1
1794fi
1795rm -fr conftest*
1796fi
1797
1798fi
1799
1800echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1801cat >> confdefs.h <<EOF
1802#define STACK_DIRECTION $ac_cv_c_stack_direction
1803EOF
1804
1805fi
1806
c41b7eb1 1807for ac_hdr in unistd.h
c906108c
SS
1808do
1809ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1810echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 1811echo "configure:1812: checking for $ac_hdr" >&5
c906108c
SS
1812if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1813 echo $ac_n "(cached) $ac_c" 1>&6
1814else
1815 cat > conftest.$ac_ext <<EOF
14abd0fb 1816#line 1817 "configure"
c906108c
SS
1817#include "confdefs.h"
1818#include <$ac_hdr>
1819EOF
1820ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 1821{ (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1822ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1823if test -z "$ac_err"; then
1824 rm -rf conftest*
1825 eval "ac_cv_header_$ac_safe=yes"
1826else
1827 echo "$ac_err" >&5
1828 echo "configure: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1830 rm -rf conftest*
1831 eval "ac_cv_header_$ac_safe=no"
1832fi
1833rm -f conftest*
1834fi
1835if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1836 echo "$ac_t""yes" 1>&6
1837 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1838 cat >> confdefs.h <<EOF
1839#define $ac_tr_hdr 1
1840EOF
1841
1842else
1843 echo "$ac_t""no" 1>&6
1844fi
1845done
1846
1847for ac_func in getpagesize
1848do
1849echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 1850echo "configure:1851: checking for $ac_func" >&5
c906108c
SS
1851if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1853else
1854 cat > conftest.$ac_ext <<EOF
14abd0fb 1855#line 1856 "configure"
c906108c
SS
1856#include "confdefs.h"
1857/* System header to define __stub macros and hopefully few prototypes,
1858 which can conflict with char $ac_func(); below. */
1859#include <assert.h>
1860/* Override any gcc2 internal prototype to avoid an error. */
1861/* We use char because int might match the return type of a gcc2
1862 builtin and then its argument prototype would still apply. */
1863char $ac_func();
1864
1865int main() {
1866
1867/* The GNU C library defines this for functions which it implements
1868 to always fail with ENOSYS. Some functions are actually named
1869 something starting with __ and the normal name is an alias. */
1870#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1871choke me
1872#else
1873$ac_func();
1874#endif
1875
1876; return 0; }
1877EOF
14abd0fb 1878if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1879 rm -rf conftest*
1880 eval "ac_cv_func_$ac_func=yes"
1881else
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 rm -rf conftest*
1885 eval "ac_cv_func_$ac_func=no"
1886fi
1887rm -f conftest*
1888fi
1889
1890if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1891 echo "$ac_t""yes" 1>&6
1892 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1893 cat >> confdefs.h <<EOF
1894#define $ac_tr_func 1
1895EOF
1896
1897else
1898 echo "$ac_t""no" 1>&6
1899fi
1900done
1901
1902echo $ac_n "checking for working mmap""... $ac_c" 1>&6
14abd0fb 1903echo "configure:1904: checking for working mmap" >&5
c906108c
SS
1904if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1905 echo $ac_n "(cached) $ac_c" 1>&6
1906else
1907 if test "$cross_compiling" = yes; then
1908 ac_cv_func_mmap_fixed_mapped=no
1909else
1910 cat > conftest.$ac_ext <<EOF
14abd0fb 1911#line 1912 "configure"
c906108c
SS
1912#include "confdefs.h"
1913
1914/* Thanks to Mike Haertel and Jim Avera for this test.
1915 Here is a matrix of mmap possibilities:
1916 mmap private not fixed
1917 mmap private fixed at somewhere currently unmapped
1918 mmap private fixed at somewhere already mapped
1919 mmap shared not fixed
1920 mmap shared fixed at somewhere currently unmapped
1921 mmap shared fixed at somewhere already mapped
1922 For private mappings, we should verify that changes cannot be read()
1923 back from the file, nor mmap's back from the file at a different
1924 address. (There have been systems where private was not correctly
1925 implemented like the infamous i386 svr4.0, and systems where the
1926 VM page cache was not coherent with the filesystem buffer cache
1927 like early versions of FreeBSD and possibly contemporary NetBSD.)
1928 For shared mappings, we should conversely verify that changes get
1929 propogated back to all the places they're supposed to be.
1930
1931 Grep wants private fixed already mapped.
1932 The main things grep needs to know about mmap are:
1933 * does it exist and is it safe to write into the mmap'd area
1934 * how to use it (BSD variants) */
1935#include <sys/types.h>
1936#include <fcntl.h>
1937#include <sys/mman.h>
1938
1939/* This mess was copied from the GNU getpagesize.h. */
1940#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1941# ifdef HAVE_UNISTD_H
1942# include <unistd.h>
1943# endif
c906108c
SS
1944
1945/* Assume that all systems that can run configure have sys/param.h. */
1946# ifndef HAVE_SYS_PARAM_H
1947# define HAVE_SYS_PARAM_H 1
1948# endif
1949
1950# ifdef _SC_PAGESIZE
1951# define getpagesize() sysconf(_SC_PAGESIZE)
1952# else /* no _SC_PAGESIZE */
1953# ifdef HAVE_SYS_PARAM_H
1954# include <sys/param.h>
1955# ifdef EXEC_PAGESIZE
1956# define getpagesize() EXEC_PAGESIZE
1957# else /* no EXEC_PAGESIZE */
1958# ifdef NBPG
1959# define getpagesize() NBPG * CLSIZE
1960# ifndef CLSIZE
1961# define CLSIZE 1
1962# endif /* no CLSIZE */
1963# else /* no NBPG */
1964# ifdef NBPC
1965# define getpagesize() NBPC
1966# else /* no NBPC */
1967# ifdef PAGESIZE
1968# define getpagesize() PAGESIZE
1969# endif /* PAGESIZE */
1970# endif /* no NBPC */
1971# endif /* no NBPG */
1972# endif /* no EXEC_PAGESIZE */
1973# else /* no HAVE_SYS_PARAM_H */
1974# define getpagesize() 8192 /* punt totally */
1975# endif /* no HAVE_SYS_PARAM_H */
1976# endif /* no _SC_PAGESIZE */
1977
1978#endif /* no HAVE_GETPAGESIZE */
1979
1980#ifdef __cplusplus
1981extern "C" { void *malloc(unsigned); }
1982#else
1983char *malloc();
1984#endif
1985
1986int
1987main()
1988{
1989 char *data, *data2, *data3;
1990 int i, pagesize;
1991 int fd;
1992
1993 pagesize = getpagesize();
1994
1995 /*
1996 * First, make a file with some known garbage in it.
1997 */
1998 data = malloc(pagesize);
1999 if (!data)
2000 exit(1);
2001 for (i = 0; i < pagesize; ++i)
2002 *(data + i) = rand();
2003 umask(0);
2004 fd = creat("conftestmmap", 0600);
2005 if (fd < 0)
2006 exit(1);
2007 if (write(fd, data, pagesize) != pagesize)
2008 exit(1);
2009 close(fd);
2010
2011 /*
2012 * Next, try to mmap the file at a fixed address which
2013 * already has something else allocated at it. If we can,
2014 * also make sure that we see the same garbage.
2015 */
2016 fd = open("conftestmmap", O_RDWR);
2017 if (fd < 0)
2018 exit(1);
2019 data2 = malloc(2 * pagesize);
2020 if (!data2)
2021 exit(1);
2022 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2023 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2024 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2025 exit(1);
2026 for (i = 0; i < pagesize; ++i)
2027 if (*(data + i) != *(data2 + i))
2028 exit(1);
2029
2030 /*
2031 * Finally, make sure that changes to the mapped area
2032 * do not percolate back to the file as seen by read().
2033 * (This is a bug on some variants of i386 svr4.0.)
2034 */
2035 for (i = 0; i < pagesize; ++i)
2036 *(data2 + i) = *(data2 + i) + 1;
2037 data3 = malloc(pagesize);
2038 if (!data3)
2039 exit(1);
2040 if (read(fd, data3, pagesize) != pagesize)
2041 exit(1);
2042 for (i = 0; i < pagesize; ++i)
2043 if (*(data + i) != *(data3 + i))
2044 exit(1);
2045 close(fd);
2046 unlink("conftestmmap");
2047 exit(0);
2048}
2049
2050EOF
14abd0fb 2051if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2052then
2053 ac_cv_func_mmap_fixed_mapped=yes
2054else
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 rm -fr conftest*
2058 ac_cv_func_mmap_fixed_mapped=no
2059fi
2060rm -fr conftest*
2061fi
2062
2063fi
2064
2065echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2066if test $ac_cv_func_mmap_fixed_mapped = yes; then
2067 cat >> confdefs.h <<\EOF
2068#define HAVE_MMAP 1
2069EOF
2070
2071fi
2072
2073
2074 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2075unistd.h values.h sys/param.h
2076do
2077ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2078echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 2079echo "configure:2080: checking for $ac_hdr" >&5
c906108c
SS
2080if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2081 echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083 cat > conftest.$ac_ext <<EOF
14abd0fb 2084#line 2085 "configure"
c906108c
SS
2085#include "confdefs.h"
2086#include <$ac_hdr>
2087EOF
2088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 2089{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2090ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2091if test -z "$ac_err"; then
2092 rm -rf conftest*
2093 eval "ac_cv_header_$ac_safe=yes"
2094else
2095 echo "$ac_err" >&5
2096 echo "configure: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 rm -rf conftest*
2099 eval "ac_cv_header_$ac_safe=no"
2100fi
2101rm -f conftest*
2102fi
2103if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2104 echo "$ac_t""yes" 1>&6
2105 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2106 cat >> confdefs.h <<EOF
2107#define $ac_tr_hdr 1
2108EOF
2109
2110else
2111 echo "$ac_t""no" 1>&6
2112fi
2113done
2114
2115 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2116__argz_count __argz_stringify __argz_next
2117do
2118echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 2119echo "configure:2120: checking for $ac_func" >&5
c906108c
SS
2120if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2121 echo $ac_n "(cached) $ac_c" 1>&6
2122else
2123 cat > conftest.$ac_ext <<EOF
14abd0fb 2124#line 2125 "configure"
c906108c
SS
2125#include "confdefs.h"
2126/* System header to define __stub macros and hopefully few prototypes,
2127 which can conflict with char $ac_func(); below. */
2128#include <assert.h>
2129/* Override any gcc2 internal prototype to avoid an error. */
2130/* We use char because int might match the return type of a gcc2
2131 builtin and then its argument prototype would still apply. */
2132char $ac_func();
2133
2134int main() {
2135
2136/* The GNU C library defines this for functions which it implements
2137 to always fail with ENOSYS. Some functions are actually named
2138 something starting with __ and the normal name is an alias. */
2139#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2140choke me
2141#else
2142$ac_func();
2143#endif
2144
2145; return 0; }
2146EOF
14abd0fb 2147if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2148 rm -rf conftest*
2149 eval "ac_cv_func_$ac_func=yes"
2150else
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2153 rm -rf conftest*
2154 eval "ac_cv_func_$ac_func=no"
2155fi
2156rm -f conftest*
2157fi
2158
2159if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2160 echo "$ac_t""yes" 1>&6
2161 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2162 cat >> confdefs.h <<EOF
2163#define $ac_tr_func 1
2164EOF
2165
2166else
2167 echo "$ac_t""no" 1>&6
2168fi
2169done
2170
2171
2172 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2173 for ac_func in stpcpy
2174do
2175echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 2176echo "configure:2177: checking for $ac_func" >&5
c906108c
SS
2177if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2178 echo $ac_n "(cached) $ac_c" 1>&6
2179else
2180 cat > conftest.$ac_ext <<EOF
14abd0fb 2181#line 2182 "configure"
c906108c
SS
2182#include "confdefs.h"
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $ac_func(); below. */
2185#include <assert.h>
2186/* Override any gcc2 internal prototype to avoid an error. */
2187/* We use char because int might match the return type of a gcc2
2188 builtin and then its argument prototype would still apply. */
2189char $ac_func();
2190
2191int main() {
2192
2193/* The GNU C library defines this for functions which it implements
2194 to always fail with ENOSYS. Some functions are actually named
2195 something starting with __ and the normal name is an alias. */
2196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2197choke me
2198#else
2199$ac_func();
2200#endif
2201
2202; return 0; }
2203EOF
14abd0fb 2204if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2205 rm -rf conftest*
2206 eval "ac_cv_func_$ac_func=yes"
2207else
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_func_$ac_func=no"
2212fi
2213rm -f conftest*
2214fi
2215
2216if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2219 cat >> confdefs.h <<EOF
2220#define $ac_tr_func 1
2221EOF
2222
2223else
2224 echo "$ac_t""no" 1>&6
2225fi
2226done
2227
2228 fi
2229 if test "${ac_cv_func_stpcpy}" = "yes"; then
2230 cat >> confdefs.h <<\EOF
2231#define HAVE_STPCPY 1
2232EOF
2233
2234 fi
2235
2236 if test $ac_cv_header_locale_h = yes; then
2237 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
14abd0fb 2238echo "configure:2239: checking for LC_MESSAGES" >&5
c906108c
SS
2239if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241else
2242 cat > conftest.$ac_ext <<EOF
14abd0fb 2243#line 2244 "configure"
c906108c
SS
2244#include "confdefs.h"
2245#include <locale.h>
2246int main() {
2247return LC_MESSAGES
2248; return 0; }
2249EOF
14abd0fb 2250if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2251 rm -rf conftest*
2252 am_cv_val_LC_MESSAGES=yes
2253else
2254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
2256 rm -rf conftest*
2257 am_cv_val_LC_MESSAGES=no
2258fi
2259rm -f conftest*
2260fi
2261
2262echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2263 if test $am_cv_val_LC_MESSAGES = yes; then
2264 cat >> confdefs.h <<\EOF
2265#define HAVE_LC_MESSAGES 1
2266EOF
2267
2268 fi
2269 fi
2270 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
14abd0fb 2271echo "configure:2272: checking whether NLS is requested" >&5
c906108c
SS
2272 # Check whether --enable-nls or --disable-nls was given.
2273if test "${enable_nls+set}" = set; then
2274 enableval="$enable_nls"
2275 USE_NLS=$enableval
2276else
2277 USE_NLS=yes
2278fi
2279
2280 echo "$ac_t""$USE_NLS" 1>&6
2281
2282
2283 USE_INCLUDED_LIBINTL=no
2284
2285 if test "$USE_NLS" = "yes"; then
2286 cat >> confdefs.h <<\EOF
2287#define ENABLE_NLS 1
2288EOF
2289
2290 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
14abd0fb 2291echo "configure:2292: checking whether included gettext is requested" >&5
c906108c
SS
2292 # Check whether --with-included-gettext or --without-included-gettext was given.
2293if test "${with_included_gettext+set}" = set; then
2294 withval="$with_included_gettext"
2295 nls_cv_force_use_gnu_gettext=$withval
2296else
2297 nls_cv_force_use_gnu_gettext=no
2298fi
2299
2300 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2301
2302 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2303 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2304 nls_cv_header_intl=
2305 nls_cv_header_libgt=
2306 CATOBJEXT=NONE
2307
2308 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2309echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
14abd0fb 2310echo "configure:2311: checking for libintl.h" >&5
c906108c
SS
2311if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314 cat > conftest.$ac_ext <<EOF
14abd0fb 2315#line 2316 "configure"
c906108c
SS
2316#include "confdefs.h"
2317#include <libintl.h>
2318EOF
2319ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 2320{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2321ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2322if test -z "$ac_err"; then
2323 rm -rf conftest*
2324 eval "ac_cv_header_$ac_safe=yes"
2325else
2326 echo "$ac_err" >&5
2327 echo "configure: failed program was:" >&5
2328 cat conftest.$ac_ext >&5
2329 rm -rf conftest*
2330 eval "ac_cv_header_$ac_safe=no"
2331fi
2332rm -f conftest*
2333fi
2334if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2335 echo "$ac_t""yes" 1>&6
2336 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
14abd0fb 2337echo "configure:2338: checking for gettext in libc" >&5
c906108c
SS
2338if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2339 echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341 cat > conftest.$ac_ext <<EOF
14abd0fb 2342#line 2343 "configure"
c906108c
SS
2343#include "confdefs.h"
2344#include <libintl.h>
2345int main() {
2346return (int) gettext ("")
2347; return 0; }
2348EOF
14abd0fb 2349if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2350 rm -rf conftest*
2351 gt_cv_func_gettext_libc=yes
2352else
2353 echo "configure: failed program was:" >&5
2354 cat conftest.$ac_ext >&5
2355 rm -rf conftest*
2356 gt_cv_func_gettext_libc=no
2357fi
2358rm -f conftest*
2359fi
2360
2361echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2362
2363 if test "$gt_cv_func_gettext_libc" != "yes"; then
2364 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
14abd0fb 2365echo "configure:2366: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2366ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2367if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2368 echo $ac_n "(cached) $ac_c" 1>&6
2369else
2370 ac_save_LIBS="$LIBS"
2371LIBS="-lintl $LIBS"
2372cat > conftest.$ac_ext <<EOF
14abd0fb 2373#line 2374 "configure"
c906108c
SS
2374#include "confdefs.h"
2375/* Override any gcc2 internal prototype to avoid an error. */
2376/* We use char because int might match the return type of a gcc2
2377 builtin and then its argument prototype would still apply. */
2378char bindtextdomain();
2379
2380int main() {
2381bindtextdomain()
2382; return 0; }
2383EOF
14abd0fb 2384if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2385 rm -rf conftest*
2386 eval "ac_cv_lib_$ac_lib_var=yes"
2387else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -rf conftest*
2391 eval "ac_cv_lib_$ac_lib_var=no"
2392fi
2393rm -f conftest*
2394LIBS="$ac_save_LIBS"
2395
2396fi
2397if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2398 echo "$ac_t""yes" 1>&6
2399 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
14abd0fb 2400echo "configure:2401: checking for gettext in libintl" >&5
c906108c
SS
2401if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2402 echo $ac_n "(cached) $ac_c" 1>&6
2403else
2404 cat > conftest.$ac_ext <<EOF
14abd0fb 2405#line 2406 "configure"
c906108c
SS
2406#include "confdefs.h"
2407
2408int main() {
2409return (int) gettext ("")
2410; return 0; }
2411EOF
14abd0fb 2412if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2413 rm -rf conftest*
2414 gt_cv_func_gettext_libintl=yes
2415else
2416 echo "configure: failed program was:" >&5
2417 cat conftest.$ac_ext >&5
2418 rm -rf conftest*
2419 gt_cv_func_gettext_libintl=no
2420fi
2421rm -f conftest*
2422fi
2423
2424echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2425else
2426 echo "$ac_t""no" 1>&6
2427fi
2428
2429 fi
2430
2431 if test "$gt_cv_func_gettext_libc" = "yes" \
2432 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2433 cat >> confdefs.h <<\EOF
2434#define HAVE_GETTEXT 1
2435EOF
2436
2437 # Extract the first word of "msgfmt", so it can be a program name with args.
2438set dummy msgfmt; ac_word=$2
2439echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2440echo "configure:2441: checking for $ac_word" >&5
c906108c
SS
2441if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2442 echo $ac_n "(cached) $ac_c" 1>&6
2443else
2444 case "$MSGFMT" in
2445 /*)
2446 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2447 ;;
2448 *)
2449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2450 for ac_dir in $PATH; do
2451 test -z "$ac_dir" && ac_dir=.
2452 if test -f $ac_dir/$ac_word; then
2453 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2454 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2455 break
2456 fi
2457 fi
2458 done
2459 IFS="$ac_save_ifs"
2460 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2461 ;;
2462esac
2463fi
2464MSGFMT="$ac_cv_path_MSGFMT"
2465if test -n "$MSGFMT"; then
2466 echo "$ac_t""$MSGFMT" 1>&6
2467else
2468 echo "$ac_t""no" 1>&6
2469fi
2470 if test "$MSGFMT" != "no"; then
2471 for ac_func in dcgettext
2472do
2473echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 2474echo "configure:2475: checking for $ac_func" >&5
c906108c
SS
2475if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 cat > conftest.$ac_ext <<EOF
14abd0fb 2479#line 2480 "configure"
c906108c
SS
2480#include "confdefs.h"
2481/* System header to define __stub macros and hopefully few prototypes,
2482 which can conflict with char $ac_func(); below. */
2483#include <assert.h>
2484/* Override any gcc2 internal prototype to avoid an error. */
2485/* We use char because int might match the return type of a gcc2
2486 builtin and then its argument prototype would still apply. */
2487char $ac_func();
2488
2489int main() {
2490
2491/* The GNU C library defines this for functions which it implements
2492 to always fail with ENOSYS. Some functions are actually named
2493 something starting with __ and the normal name is an alias. */
2494#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2495choke me
2496#else
2497$ac_func();
2498#endif
2499
2500; return 0; }
2501EOF
14abd0fb 2502if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2503 rm -rf conftest*
2504 eval "ac_cv_func_$ac_func=yes"
2505else
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2508 rm -rf conftest*
2509 eval "ac_cv_func_$ac_func=no"
2510fi
2511rm -f conftest*
2512fi
2513
2514if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2515 echo "$ac_t""yes" 1>&6
2516 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2517 cat >> confdefs.h <<EOF
2518#define $ac_tr_func 1
2519EOF
2520
2521else
2522 echo "$ac_t""no" 1>&6
2523fi
2524done
2525
2526 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2527set dummy gmsgfmt; ac_word=$2
2528echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2529echo "configure:2530: checking for $ac_word" >&5
c906108c
SS
2530if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2531 echo $ac_n "(cached) $ac_c" 1>&6
2532else
2533 case "$GMSGFMT" in
2534 /*)
2535 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2536 ;;
2537 ?:/*)
2538 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2539 ;;
2540 *)
2541 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2542 ac_dummy="$PATH"
2543 for ac_dir in $ac_dummy; do
2544 test -z "$ac_dir" && ac_dir=.
2545 if test -f $ac_dir/$ac_word; then
2546 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2547 break
2548 fi
2549 done
2550 IFS="$ac_save_ifs"
2551 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2552 ;;
2553esac
2554fi
2555GMSGFMT="$ac_cv_path_GMSGFMT"
2556if test -n "$GMSGFMT"; then
2557 echo "$ac_t""$GMSGFMT" 1>&6
2558else
2559 echo "$ac_t""no" 1>&6
2560fi
2561
2562 # Extract the first word of "xgettext", so it can be a program name with args.
2563set dummy xgettext; ac_word=$2
2564echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2565echo "configure:2566: checking for $ac_word" >&5
c906108c
SS
2566if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2567 echo $ac_n "(cached) $ac_c" 1>&6
2568else
2569 case "$XGETTEXT" in
2570 /*)
2571 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2572 ;;
2573 *)
2574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2575 for ac_dir in $PATH; do
2576 test -z "$ac_dir" && ac_dir=.
2577 if test -f $ac_dir/$ac_word; then
2578 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2579 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2580 break
2581 fi
2582 fi
2583 done
2584 IFS="$ac_save_ifs"
2585 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2586 ;;
2587esac
2588fi
2589XGETTEXT="$ac_cv_path_XGETTEXT"
2590if test -n "$XGETTEXT"; then
2591 echo "$ac_t""$XGETTEXT" 1>&6
2592else
2593 echo "$ac_t""no" 1>&6
2594fi
2595
2596 cat > conftest.$ac_ext <<EOF
14abd0fb 2597#line 2598 "configure"
c906108c
SS
2598#include "confdefs.h"
2599
2600int main() {
2601extern int _nl_msg_cat_cntr;
2602 return _nl_msg_cat_cntr
2603; return 0; }
2604EOF
14abd0fb 2605if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2606 rm -rf conftest*
2607 CATOBJEXT=.gmo
2608 DATADIRNAME=share
2609else
2610 echo "configure: failed program was:" >&5
2611 cat conftest.$ac_ext >&5
2612 rm -rf conftest*
2613 CATOBJEXT=.mo
2614 DATADIRNAME=lib
2615fi
2616rm -f conftest*
2617 INSTOBJEXT=.mo
2618 fi
2619 fi
2620
2621else
2622 echo "$ac_t""no" 1>&6
2623fi
2624
2625
2626
2627 if test "$CATOBJEXT" = "NONE"; then
2628 nls_cv_use_gnu_gettext=yes
2629 fi
2630 fi
2631
2632 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2633 INTLOBJS="\$(GETTOBJS)"
2634 # Extract the first word of "msgfmt", so it can be a program name with args.
2635set dummy msgfmt; ac_word=$2
2636echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2637echo "configure:2638: checking for $ac_word" >&5
c906108c
SS
2638if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640else
2641 case "$MSGFMT" in
2642 /*)
2643 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2644 ;;
2645 *)
2646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2647 for ac_dir in $PATH; do
2648 test -z "$ac_dir" && ac_dir=.
2649 if test -f $ac_dir/$ac_word; then
2650 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2651 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2652 break
2653 fi
2654 fi
2655 done
2656 IFS="$ac_save_ifs"
2657 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2658 ;;
2659esac
2660fi
2661MSGFMT="$ac_cv_path_MSGFMT"
2662if test -n "$MSGFMT"; then
2663 echo "$ac_t""$MSGFMT" 1>&6
2664else
2665 echo "$ac_t""no" 1>&6
2666fi
2667
2668 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2669set dummy gmsgfmt; ac_word=$2
2670echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2671echo "configure:2672: checking for $ac_word" >&5
c906108c
SS
2672if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2673 echo $ac_n "(cached) $ac_c" 1>&6
2674else
2675 case "$GMSGFMT" in
2676 /*)
2677 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2678 ;;
2679 ?:/*)
2680 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2681 ;;
2682 *)
2683 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2684 ac_dummy="$PATH"
2685 for ac_dir in $ac_dummy; do
2686 test -z "$ac_dir" && ac_dir=.
2687 if test -f $ac_dir/$ac_word; then
2688 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2689 break
2690 fi
2691 done
2692 IFS="$ac_save_ifs"
2693 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2694 ;;
2695esac
2696fi
2697GMSGFMT="$ac_cv_path_GMSGFMT"
2698if test -n "$GMSGFMT"; then
2699 echo "$ac_t""$GMSGFMT" 1>&6
2700else
2701 echo "$ac_t""no" 1>&6
2702fi
2703
2704 # Extract the first word of "xgettext", so it can be a program name with args.
2705set dummy xgettext; ac_word=$2
2706echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 2707echo "configure:2708: checking for $ac_word" >&5
c906108c
SS
2708if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
2710else
2711 case "$XGETTEXT" in
2712 /*)
2713 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2714 ;;
2715 *)
2716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2717 for ac_dir in $PATH; do
2718 test -z "$ac_dir" && ac_dir=.
2719 if test -f $ac_dir/$ac_word; then
2720 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2721 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2722 break
2723 fi
2724 fi
2725 done
2726 IFS="$ac_save_ifs"
2727 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2728 ;;
2729esac
2730fi
2731XGETTEXT="$ac_cv_path_XGETTEXT"
2732if test -n "$XGETTEXT"; then
2733 echo "$ac_t""$XGETTEXT" 1>&6
2734else
2735 echo "$ac_t""no" 1>&6
2736fi
2737
2738
2739 USE_INCLUDED_LIBINTL=yes
2740 CATOBJEXT=.gmo
2741 INSTOBJEXT=.mo
2742 DATADIRNAME=share
2743 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2744 INTLLIBS=$INTLDEPS
2745 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2746 nls_cv_header_intl=libintl.h
2747 nls_cv_header_libgt=libgettext.h
2748 fi
2749
2750 if test "$XGETTEXT" != ":"; then
2751 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2752 : ;
2753 else
2754 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2755 XGETTEXT=":"
2756 fi
2757 fi
2758
2759 # We need to process the po/ directory.
2760 POSUB=po
2761 else
2762 DATADIRNAME=share
2763 nls_cv_header_intl=libintl.h
2764 nls_cv_header_libgt=libgettext.h
2765 fi
2766
2767 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2768 # because some of the sources are only built for this goal.
2769 if test "$PACKAGE" = gettext; then
2770 USE_NLS=yes
2771 USE_INCLUDED_LIBINTL=yes
2772 fi
2773
2774 for lang in $ALL_LINGUAS; do
2775 GMOFILES="$GMOFILES $lang.gmo"
2776 POFILES="$POFILES $lang.po"
2777 done
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792 if test "x$CATOBJEXT" != "x"; then
2793 if test "x$ALL_LINGUAS" = "x"; then
2794 LINGUAS=
2795 else
2796 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
14abd0fb 2797echo "configure:2798: checking for catalogs to be installed" >&5
c906108c
SS
2798 NEW_LINGUAS=
2799 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2800 case "$ALL_LINGUAS" in
2801 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2802 esac
2803 done
2804 LINGUAS=$NEW_LINGUAS
2805 echo "$ac_t""$LINGUAS" 1>&6
2806 fi
2807
2808 if test -n "$LINGUAS"; then
2809 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2810 fi
2811 fi
2812
2813 if test $ac_cv_header_locale_h = yes; then
2814 INCLUDE_LOCALE_H="#include <locale.h>"
2815 else
2816 INCLUDE_LOCALE_H="\
2817/* The system does not provide the header <locale.h>. Take care yourself. */"
2818 fi
2819
2820
2821 if test -f $srcdir/po2tbl.sed.in; then
2822 if test "$CATOBJEXT" = ".cat"; then
2823 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2824echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
14abd0fb 2825echo "configure:2826: checking for linux/version.h" >&5
c906108c
SS
2826if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2828else
2829 cat > conftest.$ac_ext <<EOF
14abd0fb 2830#line 2831 "configure"
c906108c
SS
2831#include "confdefs.h"
2832#include <linux/version.h>
2833EOF
2834ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 2835{ (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2836ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2837if test -z "$ac_err"; then
2838 rm -rf conftest*
2839 eval "ac_cv_header_$ac_safe=yes"
2840else
2841 echo "$ac_err" >&5
2842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
2844 rm -rf conftest*
2845 eval "ac_cv_header_$ac_safe=no"
2846fi
2847rm -f conftest*
2848fi
2849if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2850 echo "$ac_t""yes" 1>&6
2851 msgformat=linux
2852else
2853 echo "$ac_t""no" 1>&6
2854msgformat=xopen
2855fi
2856
2857
2858 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2859 fi
2860 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2861 $srcdir/po2tbl.sed.in > po2tbl.sed
2862 fi
2863
2864 if test "$PACKAGE" = "gettext"; then
2865 GT_NO="#NO#"
2866 GT_YES=
2867 else
2868 GT_NO=
2869 GT_YES="#YES#"
2870 fi
2871
2872
2873
2874 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2875
2876
2877 l=
2878
2879
4536bbc6 2880 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2881 test -d po || mkdir po
2882 if test "x$srcdir" != "x."; then
2883 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2884 posrcprefix="$srcdir/"
2885 else
2886 posrcprefix="../$srcdir/"
2887 fi
2888 else
2889 posrcprefix="../"
2890 fi
2891 rm -f po/POTFILES
2892 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2893 < $srcdir/po/POTFILES.in > po/POTFILES
2894 fi
2895
0fbb3da7
TT
2896cat >> confdefs.h <<\EOF
2897#define PACKAGE "gdb"
2898EOF
2899
2900
c906108c
SS
2901
2902
2903CONFIG_OBS=
66b965bb 2904CONFIG_LIB_OBS=
c906108c
SS
2905CONFIG_DEPS=
2906CONFIG_SRCS=
fb40c209
AC
2907CONFIG_INITS=
2908ENABLE_CFLAGS=
b3a90332
AC
2909CONFIG_ALL=
2910CONFIG_CLEAN=
e56ac5c3
AC
2911CONFIG_INSTALL=
2912CONFIG_UNINSTALL=
c906108c 2913
8dcde887 2914subdirs="doc testsuite"
96baa820 2915
8dcde887 2916configdirs=
96baa820 2917
27e9bf90 2918. $srcdir/configure.host
c906108c 2919
27e9bf90 2920. $srcdir/configure.tgt
c906108c 2921
27e9bf90
MK
2922# Fetch the default architecture and default target vector from BFD.
2923targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2924
27e9bf90
MK
2925# We only want the first architecture, so strip off the others if
2926# there is more than one.
2927targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2928
27e9bf90
MK
2929if test "x$targ_archs" != x; then
2930 cat >> confdefs.h <<EOF
2931#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2932EOF
2933
2934fi
27e9bf90
MK
2935if test "x$targ_defvec" != x; then
2936 cat >> confdefs.h <<EOF
2937#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2938EOF
2939
2940fi
c906108c 2941
8bb2c122
MK
2942if test "$program_transform_name" = s,x,x,; then
2943 program_transform_name=
2944else
2945 # Double any \ or $. echo might interpret backslashes.
2946 cat <<\EOF_SED > conftestsed
2947s,\\,\\\\,g; s,\$,$$,g
2948EOF_SED
2949 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2950 rm -f conftestsed
2951fi
2952test "$program_prefix" != NONE &&
2953 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2954# Use a double $ so make ignores it.
2955test "$program_suffix" != NONE &&
2956 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2957
2958# sed with no file args requires a program.
2959test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2960
2961
627af7ea
MK
2962# The CLI cannot be disabled yet, but may be in the future.
2963
2964# Enable CLI.
2965# Check whether --enable-gdbcli or --disable-gdbcli was given.
2966if test "${enable_gdbcli+set}" = set; then
2967 enableval="$enable_gdbcli"
2968 case $enableval in
2969 yes)
2970 ;;
2971 no)
2972 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2973 *)
2974 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2975 esac
2976else
2977 enable_gdbcli=yes
2978fi
2979
2980if test x"$enable_gdbcli" = xyes; then
2981 if test -d $srcdir/cli; then
2982 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2983 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2984 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2985 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2986 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2987 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
2988 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
2989 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
2990 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
2991 fi
2992fi
2993
2994# Enable MI.
2995# Check whether --enable-gdbmi or --disable-gdbmi was given.
2996if test "${enable_gdbmi+set}" = set; then
2997 enableval="$enable_gdbmi"
2998 case $enableval in
2999 yes | no)
3000 ;;
3001 *)
3002 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3003 esac
3004else
3005 enable_gdbmi=yes
3006fi
3007
3008if test x"$enable_gdbmi" = xyes; then
3009 if test -d $srcdir/mi; then
3010 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3011 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3012 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3013 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3014 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3015 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3016 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3017 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3018 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3019 fi
3020fi
3021
06825bd1
MK
3022# Enable TUI.
3023# Check whether --enable-tui or --disable-tui was given.
3024if test "${enable_tui+set}" = set; then
3025 enableval="$enable_tui"
3026 case $enableval in
3027 yes | no)
3028 ;;
3029 *)
3030 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3031 esac
3032fi
3033
3034if test x"$enable_tui" = xyes; then
3035 if test -d $srcdir/tui; then
3036 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3037 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3038 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3039 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3040 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3041 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3042 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3043 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3044 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3045 need_curses=yes
3046 fi
3047fi
3048
8bb2c122
MK
3049# --------------------- #
3050# Checks for programs. #
3051# --------------------- #
3052
c41b7eb1 3053for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3054do
3055# Extract the first word of "$ac_prog", so it can be a program name with args.
3056set dummy $ac_prog; ac_word=$2
3057echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3058echo "configure:3059: checking for $ac_word" >&5
7a292a7a
SS
3059if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3060 echo $ac_n "(cached) $ac_c" 1>&6
3061else
3062 if test -n "$AWK"; then
3063 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3064else
3065 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068 test -z "$ac_dir" && ac_dir=.
3069 if test -f $ac_dir/$ac_word; then
3070 ac_cv_prog_AWK="$ac_prog"
3071 break
3072 fi
3073 done
3074 IFS="$ac_save_ifs"
3075fi
3076fi
3077AWK="$ac_cv_prog_AWK"
3078if test -n "$AWK"; then
3079 echo "$ac_t""$AWK" 1>&6
3080else
3081 echo "$ac_t""no" 1>&6
3082fi
3083
3084test -n "$AWK" && break
3085done
3086
c906108c
SS
3087# Find a good install program. We prefer a C program (faster),
3088# so one script is as good as another. But avoid the broken or
3089# incompatible versions:
3090# SysV /etc/install, /usr/sbin/install
3091# SunOS /usr/etc/install
3092# IRIX /sbin/install
3093# AIX /bin/install
3094# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3095# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3096# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3097# ./install, which can be erroneously created by make from ./install.sh.
3098echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
14abd0fb 3099echo "configure:3100: checking for a BSD compatible install" >&5
c906108c
SS
3100if test -z "$INSTALL"; then
3101if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3102 echo $ac_n "(cached) $ac_c" 1>&6
3103else
3104 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3105 for ac_dir in $PATH; do
3106 # Account for people who put trailing slashes in PATH elements.
3107 case "$ac_dir/" in
3108 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3109 *)
3110 # OSF1 and SCO ODT 3.0 have their own names for install.
3111 # Don't use installbsd from OSF since it installs stuff as root
3112 # by default.
3113 for ac_prog in ginstall scoinst install; do
3114 if test -f $ac_dir/$ac_prog; then
3115 if test $ac_prog = install &&
3116 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3117 # AIX install. It has an incompatible calling convention.
3118 :
3119 else
3120 ac_cv_path_install="$ac_dir/$ac_prog -c"
3121 break 2
3122 fi
3123 fi
3124 done
3125 ;;
3126 esac
3127 done
3128 IFS="$ac_save_IFS"
3129
3130fi
3131 if test "${ac_cv_path_install+set}" = set; then
3132 INSTALL="$ac_cv_path_install"
3133 else
3134 # As a last resort, use the slow shell script. We don't cache a
3135 # path for INSTALL within a source directory, because that will
3136 # break other packages using the cache if that directory is
3137 # removed, or if the path is relative.
3138 INSTALL="$ac_install_sh"
3139 fi
3140fi
3141echo "$ac_t""$INSTALL" 1>&6
3142
3143# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3144# It thinks the first close brace ends the variable substitution.
3145test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3146
3147test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3148
3149test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3150
8bb2c122 3151echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
14abd0fb 3152echo "configure:3153: checking whether ln -s works" >&5
8bb2c122
MK
3153if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3154 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3155else
8bb2c122
MK
3156 rm -f conftestdata
3157if ln -s X conftestdata 2>/dev/null
3158then
3159 rm -f conftestdata
3160 ac_cv_prog_LN_S="ln -s"
3161else
3162 ac_cv_prog_LN_S=ln
3163fi
3164fi
3165LN_S="$ac_cv_prog_LN_S"
3166if test "$ac_cv_prog_LN_S" = "ln -s"; then
3167 echo "$ac_t""yes" 1>&6
3168else
3169 echo "$ac_t""no" 1>&6
c906108c
SS
3170fi
3171
8bb2c122
MK
3172# Extract the first word of "ranlib", so it can be a program name with args.
3173set dummy ranlib; ac_word=$2
c906108c 3174echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3175echo "configure:3176: checking for $ac_word" >&5
8bb2c122 3176if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3177 echo $ac_n "(cached) $ac_c" 1>&6
3178else
8bb2c122
MK
3179 if test -n "$RANLIB"; then
3180 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3181else
3182 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3183 ac_dummy="$PATH"
3184 for ac_dir in $ac_dummy; do
3185 test -z "$ac_dir" && ac_dir=.
3186 if test -f $ac_dir/$ac_word; then
8bb2c122 3187 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3188 break
3189 fi
3190 done
3191 IFS="$ac_save_ifs"
8bb2c122 3192 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3193fi
3194fi
8bb2c122
MK
3195RANLIB="$ac_cv_prog_RANLIB"
3196if test -n "$RANLIB"; then
3197 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3198else
3199 echo "$ac_t""no" 1>&6
3200fi
3201
8bb2c122
MK
3202for ac_prog in 'bison -y' byacc
3203do
3204# Extract the first word of "$ac_prog", so it can be a program name with args.
3205set dummy $ac_prog; ac_word=$2
c906108c 3206echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3207echo "configure:3208: checking for $ac_word" >&5
8bb2c122 3208if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3209 echo $ac_n "(cached) $ac_c" 1>&6
3210else
8bb2c122
MK
3211 if test -n "$YACC"; then
3212 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3213else
3214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3215 ac_dummy="$PATH"
3216 for ac_dir in $ac_dummy; do
3217 test -z "$ac_dir" && ac_dir=.
3218 if test -f $ac_dir/$ac_word; then
8bb2c122 3219 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3220 break
3221 fi
3222 done
3223 IFS="$ac_save_ifs"
3224fi
3225fi
8bb2c122
MK
3226YACC="$ac_cv_prog_YACC"
3227if test -n "$YACC"; then
3228 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3229else
3230 echo "$ac_t""no" 1>&6
3231fi
3232
8bb2c122
MK
3233test -n "$YACC" && break
3234done
3235test -n "$YACC" || YACC="yacc"
c906108c 3236
8bb2c122
MK
3237
3238# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3239set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3240echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3241echo "configure:3242: checking for $ac_word" >&5
8bb2c122 3242if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244else
8bb2c122
MK
3245 if test -n "$AR"; then
3246 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3247else
3248 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3249 ac_dummy="$PATH"
3250 for ac_dir in $ac_dummy; do
3251 test -z "$ac_dir" && ac_dir=.
3252 if test -f $ac_dir/$ac_word; then
8bb2c122 3253 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3254 break
3255 fi
3256 done
3257 IFS="$ac_save_ifs"
8bb2c122 3258 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3259fi
3260fi
8bb2c122
MK
3261AR="$ac_cv_prog_AR"
3262if test -n "$AR"; then
3263 echo "$ac_t""$AR" 1>&6
c906108c
SS
3264else
3265 echo "$ac_t""no" 1>&6
3266fi
3267
8bb2c122 3268
c906108c 3269
95ca63c4
CF
3270# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3271set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3272echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3273echo "configure:3274: checking for $ac_word" >&5
95ca63c4
CF
3274if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3276else
3277 if test -n "$DLLTOOL"; then
3278 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3279else
3280 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3281 ac_dummy="$PATH"
3282 for ac_dir in $ac_dummy; do
3283 test -z "$ac_dir" && ac_dir=.
3284 if test -f $ac_dir/$ac_word; then
3285 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3286 break
3287 fi
3288 done
3289 IFS="$ac_save_ifs"
3290 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3291fi
3292fi
3293DLLTOOL="$ac_cv_prog_DLLTOOL"
3294if test -n "$DLLTOOL"; then
3295 echo "$ac_t""$DLLTOOL" 1>&6
3296else
3297 echo "$ac_t""no" 1>&6
3298fi
3299
3300
3301
3302# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3303set dummy ${ac_tool_prefix}windres; ac_word=$2
3304echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3305echo "configure:3306: checking for $ac_word" >&5
95ca63c4
CF
3306if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3307 echo $ac_n "(cached) $ac_c" 1>&6
3308else
3309 if test -n "$WINDRES"; then
3310 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3311else
3312 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3313 ac_dummy="$PATH"
3314 for ac_dir in $ac_dummy; do
3315 test -z "$ac_dir" && ac_dir=.
3316 if test -f $ac_dir/$ac_word; then
3317 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3318 break
3319 fi
3320 done
3321 IFS="$ac_save_ifs"
3322 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3323fi
3324fi
3325WINDRES="$ac_cv_prog_WINDRES"
3326if test -n "$WINDRES"; then
3327 echo "$ac_t""$WINDRES" 1>&6
3328else
3329 echo "$ac_t""no" 1>&6
3330fi
3331
3332
3333
c906108c 3334
8bb2c122 3335# Needed for GNU/Hurd.
75c6e08a
MK
3336# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3337set dummy ${ac_tool_prefix}mig; ac_word=$2
3338echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14abd0fb 3339echo "configure:3340: checking for $ac_word" >&5
75c6e08a
MK
3340if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3341 echo $ac_n "(cached) $ac_c" 1>&6
3342else
3343 if test -n "$MIG"; then
3344 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3345else
3346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3347 ac_dummy="$PATH"
3348 for ac_dir in $ac_dummy; do
3349 test -z "$ac_dir" && ac_dir=.
3350 if test -f $ac_dir/$ac_word; then
3351 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3352 break
3353 fi
3354 done
3355 IFS="$ac_save_ifs"
3356 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3357fi
3358fi
3359MIG="$ac_cv_prog_MIG"
3360if test -n "$MIG"; then
3361 echo "$ac_t""$MIG" 1>&6
3362else
3363 echo "$ac_t""no" 1>&6
3364fi
3365
3366
3367
3368
9a156167
MK
3369# ---------------------- #
3370# Checks for libraries. #
3371# ---------------------- #
3372
3373# We might need to link with -lm; most simulators need it.
3374echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
14abd0fb 3375echo "configure:3376: checking for main in -lm" >&5
9a156167
MK
3376ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3377if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
3379else
3380 ac_save_LIBS="$LIBS"
3381LIBS="-lm $LIBS"
3382cat > conftest.$ac_ext <<EOF
14abd0fb 3383#line 3384 "configure"
9a156167
MK
3384#include "confdefs.h"
3385
3386int main() {
3387main()
3388; return 0; }
3389EOF
14abd0fb 3390if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3391 rm -rf conftest*
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3393else
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3396 rm -rf conftest*
3397 eval "ac_cv_lib_$ac_lib_var=no"
3398fi
3399rm -f conftest*
3400LIBS="$ac_save_LIBS"
3401
3402fi
3403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3405 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3406 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3407 cat >> confdefs.h <<EOF
3408#define $ac_tr_lib 1
3409EOF
3410
3411 LIBS="-lm $LIBS"
3412
3413else
3414 echo "$ac_t""no" 1>&6
3415fi
3416
3417
3418# We need to link with -lw to get `wctype' on Solaris before Solaris
3419# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3420# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3421# is known to have this problem). Therefore we avoid libw if we can.
3422echo $ac_n "checking for wctype""... $ac_c" 1>&6
14abd0fb 3423echo "configure:3424: checking for wctype" >&5
9a156167
MK
3424if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3425 echo $ac_n "(cached) $ac_c" 1>&6
3426else
3427 cat > conftest.$ac_ext <<EOF
14abd0fb 3428#line 3429 "configure"
9a156167
MK
3429#include "confdefs.h"
3430/* System header to define __stub macros and hopefully few prototypes,
3431 which can conflict with char wctype(); below. */
3432#include <assert.h>
3433/* Override any gcc2 internal prototype to avoid an error. */
3434/* We use char because int might match the return type of a gcc2
3435 builtin and then its argument prototype would still apply. */
3436char wctype();
3437
3438int main() {
3439
3440/* The GNU C library defines this for functions which it implements
3441 to always fail with ENOSYS. Some functions are actually named
3442 something starting with __ and the normal name is an alias. */
3443#if defined (__stub_wctype) || defined (__stub___wctype)
3444choke me
3445#else
3446wctype();
3447#endif
3448
3449; return 0; }
3450EOF
14abd0fb 3451if { (eval echo configure:3452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3452 rm -rf conftest*
3453 eval "ac_cv_func_wctype=yes"
3454else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
3458 eval "ac_cv_func_wctype=no"
3459fi
3460rm -f conftest*
3461fi
3462
3463if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3464 echo "$ac_t""yes" 1>&6
3465 :
3466else
3467 echo "$ac_t""no" 1>&6
3468echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
14abd0fb 3469echo "configure:3470: checking for wctype in -lw" >&5
9a156167
MK
3470ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3471if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3473else
3474 ac_save_LIBS="$LIBS"
3475LIBS="-lw $LIBS"
3476cat > conftest.$ac_ext <<EOF
14abd0fb 3477#line 3478 "configure"
9a156167
MK
3478#include "confdefs.h"
3479/* Override any gcc2 internal prototype to avoid an error. */
3480/* We use char because int might match the return type of a gcc2
3481 builtin and then its argument prototype would still apply. */
3482char wctype();
3483
3484int main() {
3485wctype()
3486; return 0; }
3487EOF
14abd0fb 3488if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3489 rm -rf conftest*
3490 eval "ac_cv_lib_$ac_lib_var=yes"
3491else
3492 echo "configure: failed program was:" >&5
3493 cat conftest.$ac_ext >&5
3494 rm -rf conftest*
3495 eval "ac_cv_lib_$ac_lib_var=no"
3496fi
3497rm -f conftest*
3498LIBS="$ac_save_LIBS"
3499
3500fi
3501if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3502 echo "$ac_t""yes" 1>&6
3503 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3504 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3505 cat >> confdefs.h <<EOF
3506#define $ac_tr_lib 1
3507EOF
3508
3509 LIBS="-lw $LIBS"
3510
3511else
3512 echo "$ac_t""no" 1>&6
3513fi
3514
3515fi
3516
3517
3518# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3519
3520echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
14abd0fb 3521echo "configure:3522: checking for library containing socketpair" >&5
9a156167
MK
3522if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3523 echo $ac_n "(cached) $ac_c" 1>&6
3524else
3525 ac_func_search_save_LIBS="$LIBS"
3526ac_cv_search_socketpair="no"
3527cat > conftest.$ac_ext <<EOF
14abd0fb 3528#line 3529 "configure"
9a156167
MK
3529#include "confdefs.h"
3530/* Override any gcc2 internal prototype to avoid an error. */
3531/* We use char because int might match the return type of a gcc2
3532 builtin and then its argument prototype would still apply. */
3533char socketpair();
3534
3535int main() {
3536socketpair()
3537; return 0; }
3538EOF
14abd0fb 3539if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3540 rm -rf conftest*
3541 ac_cv_search_socketpair="none required"
3542else
3543 echo "configure: failed program was:" >&5
3544 cat conftest.$ac_ext >&5
3545fi
3546rm -f conftest*
3547test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3548LIBS="-l$i $ac_func_search_save_LIBS"
3549cat > conftest.$ac_ext <<EOF
14abd0fb 3550#line 3551 "configure"
9a156167
MK
3551#include "confdefs.h"
3552/* Override any gcc2 internal prototype to avoid an error. */
3553/* We use char because int might match the return type of a gcc2
3554 builtin and then its argument prototype would still apply. */
3555char socketpair();
3556
3557int main() {
3558socketpair()
3559; return 0; }
3560EOF
14abd0fb 3561if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3562 rm -rf conftest*
3563 ac_cv_search_socketpair="-l$i"
3564break
3565else
3566 echo "configure: failed program was:" >&5
3567 cat conftest.$ac_ext >&5
3568fi
3569rm -f conftest*
3570done
3571LIBS="$ac_func_search_save_LIBS"
3572fi
3573
3574echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3575if test "$ac_cv_search_socketpair" != "no"; then
3576 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3577
3578else :
3579
3580fi
3581
06825bd1
MK
3582# Since GDB uses Readline, we need termcap functionality, so we need
3583# to find a library that provides that. When GDB is configured with
3584# --enable-tui, we need full curses functionality.
3585#
3586# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3587# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3588# Makefile fragments. That's why we need to have `Hcurses' before
3589# `curses'. I don't see why we should use HP curses if a more
3590# standard curses is available, except that according to HP's
3591# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3592# HP-UX 10.10 and 10.20.
3593
3594if test "$need_curses" = yes; then
3595
3596echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
14abd0fb 3597echo "configure:3598: checking for library containing initscr" >&5
06825bd1
MK
3598if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3599 echo $ac_n "(cached) $ac_c" 1>&6
3600else
3601 ac_func_search_save_LIBS="$LIBS"
3602ac_cv_search_initscr="no"
3603cat > conftest.$ac_ext <<EOF
14abd0fb 3604#line 3605 "configure"
06825bd1
MK
3605#include "confdefs.h"
3606/* Override any gcc2 internal prototype to avoid an error. */
3607/* We use char because int might match the return type of a gcc2
3608 builtin and then its argument prototype would still apply. */
3609char initscr();
3610
3611int main() {
3612initscr()
3613; return 0; }
3614EOF
14abd0fb 3615if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3616 rm -rf conftest*
3617 ac_cv_search_initscr="none required"
3618else
3619 echo "configure: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621fi
3622rm -f conftest*
3623test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3624LIBS="-l$i $ac_func_search_save_LIBS"
3625cat > conftest.$ac_ext <<EOF
14abd0fb 3626#line 3627 "configure"
06825bd1
MK
3627#include "confdefs.h"
3628/* Override any gcc2 internal prototype to avoid an error. */
3629/* We use char because int might match the return type of a gcc2
3630 builtin and then its argument prototype would still apply. */
3631char initscr();
3632
3633int main() {
3634initscr()
3635; return 0; }
3636EOF
14abd0fb 3637if { (eval echo configure:3638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3638 rm -rf conftest*
3639 ac_cv_search_initscr="-l$i"
3640break
3641else
3642 echo "configure: failed program was:" >&5
3643 cat conftest.$ac_ext >&5
3644fi
3645rm -f conftest*
3646done
3647LIBS="$ac_func_search_save_LIBS"
3648fi
3649
3650echo "$ac_t""$ac_cv_search_initscr" 1>&6
3651if test "$ac_cv_search_initscr" != "no"; then
3652 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3653
3654else :
3655 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3656fi
3657fi
3658
3659case $host_os in
3660 cygwin*)
3661 if test -d $srcdir/libtermcap; then
3662 LIBS="../libtermcap/libtermcap.a $LIBS"
3663 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3664 fi ;;
3665 go32*)
3666 # ??? Is this really true?
3667 ac_cv_search_tgetent="none required"
3668 ;;
3669 aix*)
3670 # Readline prefers curses over termcap on AIX.
3671 # ??? Why?
3672
3673echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
14abd0fb 3674echo "configure:3675: checking for library containing tgetent" >&5
06825bd1
MK
3675if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3676 echo $ac_n "(cached) $ac_c" 1>&6
3677else
3678 ac_func_search_save_LIBS="$LIBS"
3679ac_cv_search_tgetent="no"
3680cat > conftest.$ac_ext <<EOF
14abd0fb 3681#line 3682 "configure"
06825bd1
MK
3682#include "confdefs.h"
3683/* Override any gcc2 internal prototype to avoid an error. */
3684/* We use char because int might match the return type of a gcc2
3685 builtin and then its argument prototype would still apply. */
3686char tgetent();
3687
3688int main() {
3689tgetent()
3690; return 0; }
3691EOF
14abd0fb 3692if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3693 rm -rf conftest*
3694 ac_cv_search_tgetent="none required"
3695else
3696 echo "configure: failed program was:" >&5
3697 cat conftest.$ac_ext >&5
3698fi
3699rm -f conftest*
3700test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3701LIBS="-l$i $ac_func_search_save_LIBS"
3702cat > conftest.$ac_ext <<EOF
14abd0fb 3703#line 3704 "configure"
06825bd1
MK
3704#include "confdefs.h"
3705/* Override any gcc2 internal prototype to avoid an error. */
3706/* We use char because int might match the return type of a gcc2
3707 builtin and then its argument prototype would still apply. */
3708char tgetent();
3709
3710int main() {
3711tgetent()
3712; return 0; }
3713EOF
14abd0fb 3714if { (eval echo configure:3715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3715 rm -rf conftest*
3716 ac_cv_search_tgetent="-l$i"
3717break
3718else
3719 echo "configure: failed program was:" >&5
3720 cat conftest.$ac_ext >&5
3721fi
3722rm -f conftest*
3723done
3724LIBS="$ac_func_search_save_LIBS"
3725fi
3726
3727echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3728if test "$ac_cv_search_tgetent" != "no"; then
3729 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3730
3731else :
3732
3733fi
3734 ;;
3735esac
3736
3737# Note: We used to check for libtermlib and libterminfo too, but
3738# Readline doesn't, so I think we're safe with leaving them out.
3739
3740echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
14abd0fb 3741echo "configure:3742: checking for library containing tgetent" >&5
06825bd1
MK
3742if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3743 echo $ac_n "(cached) $ac_c" 1>&6
3744else
3745 ac_func_search_save_LIBS="$LIBS"
3746ac_cv_search_tgetent="no"
3747cat > conftest.$ac_ext <<EOF
14abd0fb 3748#line 3749 "configure"
06825bd1
MK
3749#include "confdefs.h"
3750/* Override any gcc2 internal prototype to avoid an error. */
3751/* We use char because int might match the return type of a gcc2
3752 builtin and then its argument prototype would still apply. */
3753char tgetent();
3754
3755int main() {
3756tgetent()
3757; return 0; }
3758EOF
14abd0fb 3759if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3760 rm -rf conftest*
3761 ac_cv_search_tgetent="none required"
3762else
3763 echo "configure: failed program was:" >&5
3764 cat conftest.$ac_ext >&5
3765fi
3766rm -f conftest*
3767test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3768LIBS="-l$i $ac_func_search_save_LIBS"
3769cat > conftest.$ac_ext <<EOF
14abd0fb 3770#line 3771 "configure"
06825bd1
MK
3771#include "confdefs.h"
3772/* Override any gcc2 internal prototype to avoid an error. */
3773/* We use char because int might match the return type of a gcc2
3774 builtin and then its argument prototype would still apply. */
3775char tgetent();
3776
3777int main() {
3778tgetent()
3779; return 0; }
3780EOF
14abd0fb 3781if { (eval echo configure:3782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3782 rm -rf conftest*
3783 ac_cv_search_tgetent="-l$i"
3784break
3785else
3786 echo "configure: failed program was:" >&5
3787 cat conftest.$ac_ext >&5
3788fi
3789rm -f conftest*
3790done
3791LIBS="$ac_func_search_save_LIBS"
3792fi
3793
3794echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3795if test "$ac_cv_search_tgetent" != "no"; then
3796 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3797
3798else :
3799
3800fi
3801
3802if test "$ac_cv_search_tgetent" = no; then
3803 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3804fi
3805
5ee754fc
MK
3806# ------------------------- #
3807# Checks for header files. #
3808# ------------------------- #
3809
3810ac_header_dirent=no
3811for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3812do
3813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3814echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
14abd0fb 3815echo "configure:3816: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3816if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3817 echo $ac_n "(cached) $ac_c" 1>&6
3818else
3819 cat > conftest.$ac_ext <<EOF
14abd0fb 3820#line 3821 "configure"
c906108c
SS
3821#include "confdefs.h"
3822#include <sys/types.h>
5ee754fc
MK
3823#include <$ac_hdr>
3824int main() {
3825DIR *dirp = 0;
3826; return 0; }
3827EOF
14abd0fb 3828if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3829 rm -rf conftest*
3830 eval "ac_cv_header_dirent_$ac_safe=yes"
3831else
3832 echo "configure: failed program was:" >&5
3833 cat conftest.$ac_ext >&5
3834 rm -rf conftest*
3835 eval "ac_cv_header_dirent_$ac_safe=no"
3836fi
3837rm -f conftest*
3838fi
3839if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3840 echo "$ac_t""yes" 1>&6
3841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3842 cat >> confdefs.h <<EOF
3843#define $ac_tr_hdr 1
3844EOF
3845 ac_header_dirent=$ac_hdr; break
3846else
3847 echo "$ac_t""no" 1>&6
3848fi
3849done
3850# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3851if test $ac_header_dirent = dirent.h; then
3852echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
14abd0fb 3853echo "configure:3854: checking for opendir in -ldir" >&5
5ee754fc
MK
3854ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3855if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3856 echo $ac_n "(cached) $ac_c" 1>&6
3857else
3858 ac_save_LIBS="$LIBS"
3859LIBS="-ldir $LIBS"
3860cat > conftest.$ac_ext <<EOF
14abd0fb 3861#line 3862 "configure"
5ee754fc
MK
3862#include "confdefs.h"
3863/* Override any gcc2 internal prototype to avoid an error. */
3864/* We use char because int might match the return type of a gcc2
3865 builtin and then its argument prototype would still apply. */
3866char opendir();
c906108c
SS
3867
3868int main() {
5ee754fc 3869opendir()
c906108c
SS
3870; return 0; }
3871EOF
14abd0fb 3872if { (eval echo configure:3873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3873 rm -rf conftest*
5ee754fc 3874 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3875else
3876 echo "configure: failed program was:" >&5
3877 cat conftest.$ac_ext >&5
3878 rm -rf conftest*
5ee754fc 3879 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3880fi
3881rm -f conftest*
5ee754fc
MK
3882LIBS="$ac_save_LIBS"
3883
3884fi
3885if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3886 echo "$ac_t""yes" 1>&6
3887 LIBS="$LIBS -ldir"
3888else
3889 echo "$ac_t""no" 1>&6
c906108c
SS
3890fi
3891
5ee754fc
MK
3892else
3893echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
14abd0fb 3894echo "configure:3895: checking for opendir in -lx" >&5
5ee754fc
MK
3895ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3896if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898else
3899 ac_save_LIBS="$LIBS"
3900LIBS="-lx $LIBS"
3901cat > conftest.$ac_ext <<EOF
14abd0fb 3902#line 3903 "configure"
5ee754fc
MK
3903#include "confdefs.h"
3904/* Override any gcc2 internal prototype to avoid an error. */
3905/* We use char because int might match the return type of a gcc2
3906 builtin and then its argument prototype would still apply. */
3907char opendir();
3908
3909int main() {
3910opendir()
3911; return 0; }
c906108c 3912EOF
14abd0fb 3913if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3914 rm -rf conftest*
3915 eval "ac_cv_lib_$ac_lib_var=yes"
3916else
3917 echo "configure: failed program was:" >&5
3918 cat conftest.$ac_ext >&5
3919 rm -rf conftest*
3920 eval "ac_cv_lib_$ac_lib_var=no"
3921fi
3922rm -f conftest*
3923LIBS="$ac_save_LIBS"
c906108c 3924
5ee754fc
MK
3925fi
3926if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3927 echo "$ac_t""yes" 1>&6
3928 LIBS="$LIBS -lx"
3929else
3930 echo "$ac_t""no" 1>&6
3931fi
c906108c 3932
5ee754fc 3933fi
c906108c 3934
5ee754fc 3935echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
14abd0fb 3936echo "configure:3937: checking whether stat file-mode macros are broken" >&5
5ee754fc 3937if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3938 echo $ac_n "(cached) $ac_c" 1>&6
3939else
3940 cat > conftest.$ac_ext <<EOF
14abd0fb 3941#line 3942 "configure"
9608ab8b
MK
3942#include "confdefs.h"
3943#include <sys/types.h>
5ee754fc
MK
3944#include <sys/stat.h>
3945
3946#if defined(S_ISBLK) && defined(S_IFDIR)
3947# if S_ISBLK (S_IFDIR)
3948You lose.
3949# endif
3950#endif
3951
3952#if defined(S_ISBLK) && defined(S_IFCHR)
3953# if S_ISBLK (S_IFCHR)
3954You lose.
3955# endif
3956#endif
3957
3958#if defined(S_ISLNK) && defined(S_IFREG)
3959# if S_ISLNK (S_IFREG)
3960You lose.
3961# endif
3962#endif
3963
3964#if defined(S_ISSOCK) && defined(S_IFREG)
3965# if S_ISSOCK (S_IFREG)
3966You lose.
3967# endif
3968#endif
3969
9608ab8b 3970EOF
5ee754fc
MK
3971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3972 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3973 rm -rf conftest*
5ee754fc
MK
3974 ac_cv_header_stat_broken=yes
3975else
3976 rm -rf conftest*
3977 ac_cv_header_stat_broken=no
3978fi
3979rm -f conftest*
3980
3981fi
3982
3983echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3984if test $ac_cv_header_stat_broken = yes; then
3985 cat >> confdefs.h <<\EOF
3986#define STAT_MACROS_BROKEN 1
3987EOF
3988
3989fi
3990
3991echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
14abd0fb 3992echo "configure:3993: checking for ANSI C header files" >&5
5ee754fc
MK
3993if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3994 echo $ac_n "(cached) $ac_c" 1>&6
3995else
3996 cat > conftest.$ac_ext <<EOF
14abd0fb 3997#line 3998 "configure"
5ee754fc
MK
3998#include "confdefs.h"
3999#include <stdlib.h>
4000#include <stdarg.h>
4001#include <string.h>
4002#include <float.h>
4003EOF
4004ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4005{ (eval echo configure:4006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4006ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4007if test -z "$ac_err"; then
4008 rm -rf conftest*
4009 ac_cv_header_stdc=yes
4010else
4011 echo "$ac_err" >&5
4012 echo "configure: failed program was:" >&5
4013 cat conftest.$ac_ext >&5
4014 rm -rf conftest*
4015 ac_cv_header_stdc=no
4016fi
4017rm -f conftest*
4018
4019if test $ac_cv_header_stdc = yes; then
4020 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4021cat > conftest.$ac_ext <<EOF
14abd0fb 4022#line 4023 "configure"
5ee754fc
MK
4023#include "confdefs.h"
4024#include <string.h>
4025EOF
4026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4027 egrep "memchr" >/dev/null 2>&1; then
4028 :
4029else
4030 rm -rf conftest*
4031 ac_cv_header_stdc=no
4032fi
4033rm -f conftest*
4034
4035fi
4036
4037if test $ac_cv_header_stdc = yes; then
4038 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4039cat > conftest.$ac_ext <<EOF
14abd0fb 4040#line 4041 "configure"
5ee754fc
MK
4041#include "confdefs.h"
4042#include <stdlib.h>
4043EOF
4044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4045 egrep "free" >/dev/null 2>&1; then
4046 :
4047else
4048 rm -rf conftest*
4049 ac_cv_header_stdc=no
4050fi
4051rm -f conftest*
4052
4053fi
4054
4055if test $ac_cv_header_stdc = yes; then
4056 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4057if test "$cross_compiling" = yes; then
4058 :
4059else
4060 cat > conftest.$ac_ext <<EOF
14abd0fb 4061#line 4062 "configure"
5ee754fc
MK
4062#include "confdefs.h"
4063#include <ctype.h>
4064#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4065#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4066#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4067int main () { int i; for (i = 0; i < 256; i++)
4068if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4069exit (0); }
4070
4071EOF
14abd0fb 4072if { (eval echo configure:4073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4073then
4074 :
9608ab8b 4075else
5ee754fc
MK
4076 echo "configure: failed program was:" >&5
4077 cat conftest.$ac_ext >&5
4078 rm -fr conftest*
4079 ac_cv_header_stdc=no
4080fi
4081rm -fr conftest*
4082fi
4083
4084fi
4085fi
4086
4087echo "$ac_t""$ac_cv_header_stdc" 1>&6
4088if test $ac_cv_header_stdc = yes; then
4089 cat >> confdefs.h <<\EOF
4090#define STDC_HEADERS 1
4091EOF
4092
4093fi
4094
4095for ac_hdr in link.h
4096do
4097ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4098echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4099echo "configure:4100: checking for $ac_hdr" >&5
5ee754fc
MK
4100if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4101 echo $ac_n "(cached) $ac_c" 1>&6
4102else
4103 cat > conftest.$ac_ext <<EOF
14abd0fb 4104#line 4105 "configure"
5ee754fc
MK
4105#include "confdefs.h"
4106#include <$ac_hdr>
4107EOF
4108ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4109{ (eval echo configure:4110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4110ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4111if test -z "$ac_err"; then
4112 rm -rf conftest*
4113 eval "ac_cv_header_$ac_safe=yes"
4114else
4115 echo "$ac_err" >&5
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4118 rm -rf conftest*
4119 eval "ac_cv_header_$ac_safe=no"
4120fi
4121rm -f conftest*
4122fi
4123if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4124 echo "$ac_t""yes" 1>&6
4125 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4126 cat >> confdefs.h <<EOF
4127#define $ac_tr_hdr 1
4128EOF
4129
4130else
4131 echo "$ac_t""no" 1>&6
4132fi
4133done
4134
4135for ac_hdr in nlist.h
4136do
4137ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4138echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4139echo "configure:4140: checking for $ac_hdr" >&5
5ee754fc
MK
4140if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4141 echo $ac_n "(cached) $ac_c" 1>&6
4142else
4143 cat > conftest.$ac_ext <<EOF
14abd0fb 4144#line 4145 "configure"
5ee754fc
MK
4145#include "confdefs.h"
4146#include <$ac_hdr>
4147EOF
4148ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4149{ (eval echo configure:4150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4150ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4151if test -z "$ac_err"; then
4152 rm -rf conftest*
4153 eval "ac_cv_header_$ac_safe=yes"
4154else
4155 echo "$ac_err" >&5
4156 echo "configure: failed program was:" >&5
4157 cat conftest.$ac_ext >&5
4158 rm -rf conftest*
4159 eval "ac_cv_header_$ac_safe=no"
4160fi
4161rm -f conftest*
4162fi
4163if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4164 echo "$ac_t""yes" 1>&6
4165 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4166 cat >> confdefs.h <<EOF
4167#define $ac_tr_hdr 1
4168EOF
4169
4170else
4171 echo "$ac_t""no" 1>&6
4172fi
4173done
4174
4175for ac_hdr in poll.h sys/poll.h
4176do
4177ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4178echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4179echo "configure:4180: checking for $ac_hdr" >&5
5ee754fc
MK
4180if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4181 echo $ac_n "(cached) $ac_c" 1>&6
4182else
4183 cat > conftest.$ac_ext <<EOF
14abd0fb 4184#line 4185 "configure"
5ee754fc
MK
4185#include "confdefs.h"
4186#include <$ac_hdr>
4187EOF
4188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4189{ (eval echo configure:4190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4191if test -z "$ac_err"; then
4192 rm -rf conftest*
4193 eval "ac_cv_header_$ac_safe=yes"
4194else
4195 echo "$ac_err" >&5
4196 echo "configure: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4198 rm -rf conftest*
4199 eval "ac_cv_header_$ac_safe=no"
4200fi
4201rm -f conftest*
4202fi
4203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4204 echo "$ac_t""yes" 1>&6
4205 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4206 cat >> confdefs.h <<EOF
4207#define $ac_tr_hdr 1
4208EOF
4209
4210else
4211 echo "$ac_t""no" 1>&6
4212fi
4213done
4214
4215for ac_hdr in proc_service.h thread_db.h
4216do
4217ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4218echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4219echo "configure:4220: checking for $ac_hdr" >&5
5ee754fc
MK
4220if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4221 echo $ac_n "(cached) $ac_c" 1>&6
4222else
4223 cat > conftest.$ac_ext <<EOF
14abd0fb 4224#line 4225 "configure"
5ee754fc
MK
4225#include "confdefs.h"
4226#include <$ac_hdr>
4227EOF
4228ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4229{ (eval echo configure:4230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4230ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4231if test -z "$ac_err"; then
4232 rm -rf conftest*
4233 eval "ac_cv_header_$ac_safe=yes"
4234else
4235 echo "$ac_err" >&5
4236 echo "configure: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4238 rm -rf conftest*
4239 eval "ac_cv_header_$ac_safe=no"
4240fi
4241rm -f conftest*
4242fi
4243if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4244 echo "$ac_t""yes" 1>&6
4245 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4246 cat >> confdefs.h <<EOF
4247#define $ac_tr_hdr 1
4248EOF
4249
4250else
4251 echo "$ac_t""no" 1>&6
4252fi
4253done
4254
4255for ac_hdr in stddef.h
4256do
4257ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4258echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4259echo "configure:4260: checking for $ac_hdr" >&5
5ee754fc
MK
4260if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4261 echo $ac_n "(cached) $ac_c" 1>&6
4262else
4263 cat > conftest.$ac_ext <<EOF
14abd0fb 4264#line 4265 "configure"
5ee754fc
MK
4265#include "confdefs.h"
4266#include <$ac_hdr>
4267EOF
4268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4269{ (eval echo configure:4270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4271if test -z "$ac_err"; then
4272 rm -rf conftest*
4273 eval "ac_cv_header_$ac_safe=yes"
4274else
4275 echo "$ac_err" >&5
4276 echo "configure: failed program was:" >&5
4277 cat conftest.$ac_ext >&5
4278 rm -rf conftest*
4279 eval "ac_cv_header_$ac_safe=no"
4280fi
4281rm -f conftest*
4282fi
4283if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4284 echo "$ac_t""yes" 1>&6
4285 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4286 cat >> confdefs.h <<EOF
4287#define $ac_tr_hdr 1
4288EOF
4289
4290else
4291 echo "$ac_t""no" 1>&6
4292fi
4293done
4294
4295for ac_hdr in stdlib.h
4296do
4297ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4298echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4299echo "configure:4300: checking for $ac_hdr" >&5
5ee754fc
MK
4300if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4301 echo $ac_n "(cached) $ac_c" 1>&6
4302else
4303 cat > conftest.$ac_ext <<EOF
14abd0fb 4304#line 4305 "configure"
5ee754fc
MK
4305#include "confdefs.h"
4306#include <$ac_hdr>
4307EOF
4308ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4309{ (eval echo configure:4310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4310ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4311if test -z "$ac_err"; then
4312 rm -rf conftest*
4313 eval "ac_cv_header_$ac_safe=yes"
4314else
4315 echo "$ac_err" >&5
4316 echo "configure: failed program was:" >&5
4317 cat conftest.$ac_ext >&5
4318 rm -rf conftest*
4319 eval "ac_cv_header_$ac_safe=no"
4320fi
4321rm -f conftest*
4322fi
4323if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4324 echo "$ac_t""yes" 1>&6
4325 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4326 cat >> confdefs.h <<EOF
4327#define $ac_tr_hdr 1
4328EOF
4329
4330else
4331 echo "$ac_t""no" 1>&6
4332fi
4333done
4334
4335for ac_hdr in stdint.h
4336do
4337ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4338echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4339echo "configure:4340: checking for $ac_hdr" >&5
5ee754fc
MK
4340if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4342else
4343 cat > conftest.$ac_ext <<EOF
14abd0fb 4344#line 4345 "configure"
5ee754fc
MK
4345#include "confdefs.h"
4346#include <$ac_hdr>
4347EOF
4348ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4349{ (eval echo configure:4350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4350ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4351if test -z "$ac_err"; then
4352 rm -rf conftest*
4353 eval "ac_cv_header_$ac_safe=yes"
4354else
4355 echo "$ac_err" >&5
4356 echo "configure: failed program was:" >&5
4357 cat conftest.$ac_ext >&5
4358 rm -rf conftest*
4359 eval "ac_cv_header_$ac_safe=no"
4360fi
4361rm -f conftest*
4362fi
4363if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4364 echo "$ac_t""yes" 1>&6
4365 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4366 cat >> confdefs.h <<EOF
4367#define $ac_tr_hdr 1
4368EOF
4369
4370else
4371 echo "$ac_t""no" 1>&6
4372fi
4373done
4374
4375for ac_hdr in string.h memory.h strings.h
4376do
4377ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4378echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4379echo "configure:4380: checking for $ac_hdr" >&5
5ee754fc
MK
4380if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4381 echo $ac_n "(cached) $ac_c" 1>&6
4382else
4383 cat > conftest.$ac_ext <<EOF
14abd0fb 4384#line 4385 "configure"
5ee754fc
MK
4385#include "confdefs.h"
4386#include <$ac_hdr>
4387EOF
4388ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4389{ (eval echo configure:4390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4390ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4391if test -z "$ac_err"; then
4392 rm -rf conftest*
4393 eval "ac_cv_header_$ac_safe=yes"
4394else
4395 echo "$ac_err" >&5
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4398 rm -rf conftest*
4399 eval "ac_cv_header_$ac_safe=no"
4400fi
4401rm -f conftest*
4402fi
4403if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4404 echo "$ac_t""yes" 1>&6
4405 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4406 cat >> confdefs.h <<EOF
4407#define $ac_tr_hdr 1
4408EOF
4409
4410else
4411 echo "$ac_t""no" 1>&6
4412fi
4413done
4414
4415for ac_hdr in sys/fault.h
4416do
4417ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4418echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4419echo "configure:4420: checking for $ac_hdr" >&5
5ee754fc
MK
4420if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4421 echo $ac_n "(cached) $ac_c" 1>&6
4422else
4423 cat > conftest.$ac_ext <<EOF
14abd0fb 4424#line 4425 "configure"
5ee754fc
MK
4425#include "confdefs.h"
4426#include <$ac_hdr>
4427EOF
4428ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4429{ (eval echo configure:4430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4430ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4431if test -z "$ac_err"; then
4432 rm -rf conftest*
4433 eval "ac_cv_header_$ac_safe=yes"
4434else
4435 echo "$ac_err" >&5
4436 echo "configure: failed program was:" >&5
4437 cat conftest.$ac_ext >&5
4438 rm -rf conftest*
4439 eval "ac_cv_header_$ac_safe=no"
4440fi
4441rm -f conftest*
4442fi
4443if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4444 echo "$ac_t""yes" 1>&6
4445 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4446 cat >> confdefs.h <<EOF
4447#define $ac_tr_hdr 1
4448EOF
4449
4450else
4451 echo "$ac_t""no" 1>&6
4452fi
4453done
4454
4455for ac_hdr in sys/file.h
4456do
4457ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4458echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4459echo "configure:4460: checking for $ac_hdr" >&5
5ee754fc
MK
4460if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4461 echo $ac_n "(cached) $ac_c" 1>&6
4462else
4463 cat > conftest.$ac_ext <<EOF
14abd0fb 4464#line 4465 "configure"
5ee754fc
MK
4465#include "confdefs.h"
4466#include <$ac_hdr>
4467EOF
4468ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4469{ (eval echo configure:4470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4470ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4471if test -z "$ac_err"; then
4472 rm -rf conftest*
4473 eval "ac_cv_header_$ac_safe=yes"
4474else
4475 echo "$ac_err" >&5
4476 echo "configure: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 rm -rf conftest*
4479 eval "ac_cv_header_$ac_safe=no"
4480fi
4481rm -f conftest*
4482fi
4483if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4484 echo "$ac_t""yes" 1>&6
4485 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4486 cat >> confdefs.h <<EOF
4487#define $ac_tr_hdr 1
4488EOF
4489
4490else
4491 echo "$ac_t""no" 1>&6
4492fi
4493done
4494
4495for ac_hdr in sys/filio.h
4496do
4497ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4498echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4499echo "configure:4500: checking for $ac_hdr" >&5
5ee754fc
MK
4500if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4501 echo $ac_n "(cached) $ac_c" 1>&6
4502else
4503 cat > conftest.$ac_ext <<EOF
14abd0fb 4504#line 4505 "configure"
5ee754fc
MK
4505#include "confdefs.h"
4506#include <$ac_hdr>
4507EOF
4508ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4509{ (eval echo configure:4510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4510ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4511if test -z "$ac_err"; then
4512 rm -rf conftest*
4513 eval "ac_cv_header_$ac_safe=yes"
4514else
4515 echo "$ac_err" >&5
4516 echo "configure: failed program was:" >&5
4517 cat conftest.$ac_ext >&5
4518 rm -rf conftest*
4519 eval "ac_cv_header_$ac_safe=no"
4520fi
4521rm -f conftest*
4522fi
4523if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4524 echo "$ac_t""yes" 1>&6
4525 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4526 cat >> confdefs.h <<EOF
4527#define $ac_tr_hdr 1
4528EOF
4529
4530else
4531 echo "$ac_t""no" 1>&6
4532fi
4533done
4534
4535for ac_hdr in sys/ioctl.h
4536do
4537ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4538echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4539echo "configure:4540: checking for $ac_hdr" >&5
5ee754fc
MK
4540if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4541 echo $ac_n "(cached) $ac_c" 1>&6
4542else
4543 cat > conftest.$ac_ext <<EOF
14abd0fb 4544#line 4545 "configure"
5ee754fc
MK
4545#include "confdefs.h"
4546#include <$ac_hdr>
4547EOF
4548ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4549{ (eval echo configure:4550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4550ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4551if test -z "$ac_err"; then
4552 rm -rf conftest*
4553 eval "ac_cv_header_$ac_safe=yes"
4554else
4555 echo "$ac_err" >&5
4556 echo "configure: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 rm -rf conftest*
4559 eval "ac_cv_header_$ac_safe=no"
4560fi
4561rm -f conftest*
4562fi
4563if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4564 echo "$ac_t""yes" 1>&6
4565 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4566 cat >> confdefs.h <<EOF
4567#define $ac_tr_hdr 1
4568EOF
4569
4570else
4571 echo "$ac_t""no" 1>&6
4572fi
4573done
4574
4575for ac_hdr in sys/param.h
4576do
4577ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4578echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4579echo "configure:4580: checking for $ac_hdr" >&5
5ee754fc
MK
4580if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4581 echo $ac_n "(cached) $ac_c" 1>&6
4582else
4583 cat > conftest.$ac_ext <<EOF
14abd0fb 4584#line 4585 "configure"
5ee754fc
MK
4585#include "confdefs.h"
4586#include <$ac_hdr>
4587EOF
4588ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4589{ (eval echo configure:4590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4590ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4591if test -z "$ac_err"; then
4592 rm -rf conftest*
4593 eval "ac_cv_header_$ac_safe=yes"
4594else
4595 echo "$ac_err" >&5
4596 echo "configure: failed program was:" >&5
4597 cat conftest.$ac_ext >&5
4598 rm -rf conftest*
4599 eval "ac_cv_header_$ac_safe=no"
4600fi
4601rm -f conftest*
4602fi
4603if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4604 echo "$ac_t""yes" 1>&6
4605 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4606 cat >> confdefs.h <<EOF
4607#define $ac_tr_hdr 1
4608EOF
4609
4610else
4611 echo "$ac_t""no" 1>&6
4612fi
4613done
4614
4615for ac_hdr in sys/proc.h
4616do
4617ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4618echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4619echo "configure:4620: checking for $ac_hdr" >&5
5ee754fc
MK
4620if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4621 echo $ac_n "(cached) $ac_c" 1>&6
4622else
4623 cat > conftest.$ac_ext <<EOF
14abd0fb 4624#line 4625 "configure"
5ee754fc
MK
4625#include "confdefs.h"
4626#include <$ac_hdr>
4627EOF
4628ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4629{ (eval echo configure:4630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4630ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4631if test -z "$ac_err"; then
4632 rm -rf conftest*
4633 eval "ac_cv_header_$ac_safe=yes"
4634else
4635 echo "$ac_err" >&5
4636 echo "configure: failed program was:" >&5
4637 cat conftest.$ac_ext >&5
4638 rm -rf conftest*
4639 eval "ac_cv_header_$ac_safe=no"
4640fi
4641rm -f conftest*
4642fi
4643if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4644 echo "$ac_t""yes" 1>&6
4645 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4646 cat >> confdefs.h <<EOF
4647#define $ac_tr_hdr 1
4648EOF
4649
4650else
4651 echo "$ac_t""no" 1>&6
4652fi
4653done
4654
4655for ac_hdr in sys/procfs.h
4656do
4657ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4658echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4659echo "configure:4660: checking for $ac_hdr" >&5
5ee754fc
MK
4660if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4661 echo $ac_n "(cached) $ac_c" 1>&6
4662else
4663 cat > conftest.$ac_ext <<EOF
14abd0fb 4664#line 4665 "configure"
5ee754fc
MK
4665#include "confdefs.h"
4666#include <$ac_hdr>
4667EOF
4668ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4669{ (eval echo configure:4670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4670ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4671if test -z "$ac_err"; then
4672 rm -rf conftest*
4673 eval "ac_cv_header_$ac_safe=yes"
4674else
4675 echo "$ac_err" >&5
4676 echo "configure: failed program was:" >&5
4677 cat conftest.$ac_ext >&5
4678 rm -rf conftest*
4679 eval "ac_cv_header_$ac_safe=no"
4680fi
4681rm -f conftest*
4682fi
4683if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4684 echo "$ac_t""yes" 1>&6
4685 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4686 cat >> confdefs.h <<EOF
4687#define $ac_tr_hdr 1
4688EOF
4689
4690else
4691 echo "$ac_t""no" 1>&6
4692fi
4693done
4694
4695for ac_hdr in sys/ptrace.h ptrace.h
4696do
4697ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4698echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4699echo "configure:4700: checking for $ac_hdr" >&5
5ee754fc
MK
4700if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4701 echo $ac_n "(cached) $ac_c" 1>&6
4702else
4703 cat > conftest.$ac_ext <<EOF
14abd0fb 4704#line 4705 "configure"
5ee754fc
MK
4705#include "confdefs.h"
4706#include <$ac_hdr>
4707EOF
4708ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4709{ (eval echo configure:4710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4710ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4711if test -z "$ac_err"; then
4712 rm -rf conftest*
4713 eval "ac_cv_header_$ac_safe=yes"
4714else
4715 echo "$ac_err" >&5
4716 echo "configure: failed program was:" >&5
4717 cat conftest.$ac_ext >&5
4718 rm -rf conftest*
4719 eval "ac_cv_header_$ac_safe=no"
4720fi
4721rm -f conftest*
4722fi
4723if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4724 echo "$ac_t""yes" 1>&6
4725 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4726 cat >> confdefs.h <<EOF
4727#define $ac_tr_hdr 1
4728EOF
4729
4730else
4731 echo "$ac_t""no" 1>&6
4732fi
4733done
4734
4735for ac_hdr in sys/reg.h sys/debugreg.h
4736do
4737ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4738echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4739echo "configure:4740: checking for $ac_hdr" >&5
5ee754fc
MK
4740if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4741 echo $ac_n "(cached) $ac_c" 1>&6
4742else
4743 cat > conftest.$ac_ext <<EOF
14abd0fb 4744#line 4745 "configure"
5ee754fc
MK
4745#include "confdefs.h"
4746#include <$ac_hdr>
4747EOF
4748ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4749{ (eval echo configure:4750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4750ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4751if test -z "$ac_err"; then
4752 rm -rf conftest*
4753 eval "ac_cv_header_$ac_safe=yes"
4754else
4755 echo "$ac_err" >&5
4756 echo "configure: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
4758 rm -rf conftest*
4759 eval "ac_cv_header_$ac_safe=no"
4760fi
4761rm -f conftest*
4762fi
4763if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4764 echo "$ac_t""yes" 1>&6
4765 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4766 cat >> confdefs.h <<EOF
4767#define $ac_tr_hdr 1
4768EOF
4769
4770else
4771 echo "$ac_t""no" 1>&6
4772fi
4773done
4774
4775for ac_hdr in sys/select.h
4776do
4777ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4778echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4779echo "configure:4780: checking for $ac_hdr" >&5
5ee754fc
MK
4780if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4781 echo $ac_n "(cached) $ac_c" 1>&6
4782else
4783 cat > conftest.$ac_ext <<EOF
14abd0fb 4784#line 4785 "configure"
5ee754fc
MK
4785#include "confdefs.h"
4786#include <$ac_hdr>
4787EOF
4788ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4789{ (eval echo configure:4790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4790ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4791if test -z "$ac_err"; then
4792 rm -rf conftest*
4793 eval "ac_cv_header_$ac_safe=yes"
4794else
4795 echo "$ac_err" >&5
4796 echo "configure: failed program was:" >&5
4797 cat conftest.$ac_ext >&5
4798 rm -rf conftest*
4799 eval "ac_cv_header_$ac_safe=no"
4800fi
4801rm -f conftest*
4802fi
4803if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4804 echo "$ac_t""yes" 1>&6
4805 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4806 cat >> confdefs.h <<EOF
4807#define $ac_tr_hdr 1
4808EOF
4809
4810else
4811 echo "$ac_t""no" 1>&6
4812fi
4813done
4814
4815for ac_hdr in sys/syscall.h
4816do
4817ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4818echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4819echo "configure:4820: checking for $ac_hdr" >&5
5ee754fc
MK
4820if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4821 echo $ac_n "(cached) $ac_c" 1>&6
4822else
4823 cat > conftest.$ac_ext <<EOF
14abd0fb 4824#line 4825 "configure"
5ee754fc
MK
4825#include "confdefs.h"
4826#include <$ac_hdr>
4827EOF
4828ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4829{ (eval echo configure:4830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4830ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4831if test -z "$ac_err"; then
4832 rm -rf conftest*
4833 eval "ac_cv_header_$ac_safe=yes"
4834else
4835 echo "$ac_err" >&5
4836 echo "configure: failed program was:" >&5
4837 cat conftest.$ac_ext >&5
4838 rm -rf conftest*
4839 eval "ac_cv_header_$ac_safe=no"
4840fi
4841rm -f conftest*
4842fi
4843if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4844 echo "$ac_t""yes" 1>&6
4845 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4846 cat >> confdefs.h <<EOF
4847#define $ac_tr_hdr 1
4848EOF
4849
4850else
4851 echo "$ac_t""no" 1>&6
4852fi
4853done
4854
4855for ac_hdr in sys/user.h
4856do
4857ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4858echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4859echo "configure:4860: checking for $ac_hdr" >&5
5ee754fc
MK
4860if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4861 echo $ac_n "(cached) $ac_c" 1>&6
4862else
4863 cat > conftest.$ac_ext <<EOF
14abd0fb 4864#line 4865 "configure"
5ee754fc
MK
4865#include "confdefs.h"
4866#include <$ac_hdr>
4867EOF
4868ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4869{ (eval echo configure:4870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4870ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4871if test -z "$ac_err"; then
4872 rm -rf conftest*
4873 eval "ac_cv_header_$ac_safe=yes"
4874else
4875 echo "$ac_err" >&5
4876 echo "configure: failed program was:" >&5
4877 cat conftest.$ac_ext >&5
4878 rm -rf conftest*
4879 eval "ac_cv_header_$ac_safe=no"
4880fi
4881rm -f conftest*
4882fi
4883if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4884 echo "$ac_t""yes" 1>&6
4885 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4886 cat >> confdefs.h <<EOF
4887#define $ac_tr_hdr 1
4888EOF
4889
4890else
4891 echo "$ac_t""no" 1>&6
4892fi
4893done
4894
4895for ac_hdr in sys/wait.h wait.h
4896do
4897ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4898echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4899echo "configure:4900: checking for $ac_hdr" >&5
5ee754fc
MK
4900if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4901 echo $ac_n "(cached) $ac_c" 1>&6
4902else
4903 cat > conftest.$ac_ext <<EOF
14abd0fb 4904#line 4905 "configure"
5ee754fc
MK
4905#include "confdefs.h"
4906#include <$ac_hdr>
4907EOF
4908ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4909{ (eval echo configure:4910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4910ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4911if test -z "$ac_err"; then
4912 rm -rf conftest*
4913 eval "ac_cv_header_$ac_safe=yes"
4914else
4915 echo "$ac_err" >&5
9608ab8b
MK
4916 echo "configure: failed program was:" >&5
4917 cat conftest.$ac_ext >&5
4918 rm -rf conftest*
5ee754fc 4919 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4920fi
4921rm -f conftest*
4922fi
5ee754fc 4923if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4924 echo "$ac_t""yes" 1>&6
4925 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4926 cat >> confdefs.h <<EOF
4927#define $ac_tr_hdr 1
4928EOF
5ee754fc 4929
9608ab8b
MK
4930else
4931 echo "$ac_t""no" 1>&6
4932fi
4933done
5ee754fc
MK
4934
4935for ac_hdr in termios.h termio.h sgtty.h
4936do
4937ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4938echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4939echo "configure:4940: checking for $ac_hdr" >&5
5ee754fc 4940if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4941 echo $ac_n "(cached) $ac_c" 1>&6
4942else
5ee754fc 4943 cat > conftest.$ac_ext <<EOF
14abd0fb 4944#line 4945 "configure"
9608ab8b 4945#include "confdefs.h"
5ee754fc 4946#include <$ac_hdr>
9608ab8b 4947EOF
5ee754fc 4948ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4949{ (eval echo configure:4950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4950ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4951if test -z "$ac_err"; then
9608ab8b 4952 rm -rf conftest*
5ee754fc 4953 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4954else
5ee754fc 4955 echo "$ac_err" >&5
9608ab8b
MK
4956 echo "configure: failed program was:" >&5
4957 cat conftest.$ac_ext >&5
4958 rm -rf conftest*
5ee754fc 4959 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4960fi
4961rm -f conftest*
9608ab8b 4962fi
5ee754fc 4963if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4964 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4965 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4966 cat >> confdefs.h <<EOF
4967#define $ac_tr_hdr 1
4968EOF
4969
9608ab8b
MK
4970else
4971 echo "$ac_t""no" 1>&6
4972fi
5ee754fc 4973done
9608ab8b 4974
5ee754fc
MK
4975for ac_hdr in unistd.h
4976do
4977ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4978echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 4979echo "configure:4980: checking for $ac_hdr" >&5
5ee754fc 4980if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4981 echo $ac_n "(cached) $ac_c" 1>&6
4982else
5ee754fc 4983 cat > conftest.$ac_ext <<EOF
14abd0fb 4984#line 4985 "configure"
9608ab8b 4985#include "confdefs.h"
5ee754fc 4986#include <$ac_hdr>
9608ab8b 4987EOF
5ee754fc 4988ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 4989{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4990ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4991if test -z "$ac_err"; then
9608ab8b 4992 rm -rf conftest*
5ee754fc 4993 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4994else
5ee754fc 4995 echo "$ac_err" >&5
9608ab8b
MK
4996 echo "configure: failed program was:" >&5
4997 cat conftest.$ac_ext >&5
4998 rm -rf conftest*
5ee754fc 4999 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5000fi
5001rm -f conftest*
9608ab8b 5002fi
5ee754fc 5003if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5004 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5005 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5006 cat >> confdefs.h <<EOF
5007#define $ac_tr_hdr 1
5008EOF
5009
9608ab8b
MK
5010else
5011 echo "$ac_t""no" 1>&6
5012fi
5ee754fc 5013done
9608ab8b 5014
9608ab8b 5015
5ee754fc
MK
5016# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5017# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5018# think that we don't have <curses.h> if we're using GCC.
5019case $host_os in
5020 solaris2.[78])
5021 if test "$GCC" = yes; then
5022 cat >> confdefs.h <<\EOF
5023#define _MSE_INT_H 1
5024EOF
5025
5026 fi ;;
5027esac
5028for ac_hdr in curses.h ncurses.h term.h
5029do
5030ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5031echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 5032echo "configure:5033: checking for $ac_hdr" >&5
5ee754fc 5033if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5034 echo $ac_n "(cached) $ac_c" 1>&6
5035else
5036 cat > conftest.$ac_ext <<EOF
14abd0fb 5037#line 5038 "configure"
c906108c 5038#include "confdefs.h"
5ee754fc 5039#include <$ac_hdr>
c906108c
SS
5040EOF
5041ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 5042{ (eval echo configure:5043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5043ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5044if test -z "$ac_err"; then
5045 rm -rf conftest*
5ee754fc 5046 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5047else
5048 echo "$ac_err" >&5
5049 echo "configure: failed program was:" >&5
5050 cat conftest.$ac_ext >&5
5051 rm -rf conftest*
5ee754fc 5052 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5053fi
5054rm -f conftest*
c906108c 5055fi
5ee754fc
MK
5056if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5057 echo "$ac_t""yes" 1>&6
5058 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5059 cat >> confdefs.h <<EOF
5060#define $ac_tr_hdr 1
c906108c 5061EOF
5ee754fc 5062
c906108c 5063else
5ee754fc 5064 echo "$ac_t""no" 1>&6
c906108c 5065fi
5ee754fc 5066done
c906108c
SS
5067
5068
5ee754fc
MK
5069# FIXME: kettenis/20030102: In most cases we include these
5070# unconditionally, so what's the point in checking these?
5071for ac_hdr in ctype.h time.h
c906108c
SS
5072do
5073ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5074echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 5075echo "configure:5076: checking for $ac_hdr" >&5
c906108c
SS
5076if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5077 echo $ac_n "(cached) $ac_c" 1>&6
5078else
5079 cat > conftest.$ac_ext <<EOF
14abd0fb 5080#line 5081 "configure"
c906108c
SS
5081#include "confdefs.h"
5082#include <$ac_hdr>
5083EOF
5084ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 5085{ (eval echo configure:5086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5086ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5087if test -z "$ac_err"; then
5088 rm -rf conftest*
5089 eval "ac_cv_header_$ac_safe=yes"
5090else
5091 echo "$ac_err" >&5
5092 echo "configure: failed program was:" >&5
5093 cat conftest.$ac_ext >&5
5094 rm -rf conftest*
5095 eval "ac_cv_header_$ac_safe=no"
5096fi
5097rm -f conftest*
5098fi
5099if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5100 echo "$ac_t""yes" 1>&6
5101 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5102 cat >> confdefs.h <<EOF
5103#define $ac_tr_hdr 1
5104EOF
5105
5106else
5107 echo "$ac_t""no" 1>&6
5108fi
5109done
5110
5ee754fc
MK
5111
5112# ------------------ #
5113# Checks for types. #
5114# ------------------ #
5115
5116echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
14abd0fb 5117echo "configure:5118: checking return type of signal handlers" >&5
5ee754fc 5118if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120else
5121 cat > conftest.$ac_ext <<EOF
14abd0fb 5122#line 5123 "configure"
c906108c
SS
5123#include "confdefs.h"
5124#include <sys/types.h>
5ee754fc
MK
5125#include <signal.h>
5126#ifdef signal
5127#undef signal
c906108c 5128#endif
5ee754fc
MK
5129#ifdef __cplusplus
5130extern "C" void (*signal (int, void (*)(int)))(int);
5131#else
5132void (*signal ()) ();
c906108c
SS
5133#endif
5134
5ee754fc
MK
5135int main() {
5136int i;
5137; return 0; }
c906108c 5138EOF
14abd0fb 5139if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5140 rm -rf conftest*
5ee754fc 5141 ac_cv_type_signal=void
c906108c 5142else
5ee754fc
MK
5143 echo "configure: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
c906108c 5145 rm -rf conftest*
5ee754fc 5146 ac_cv_type_signal=int
c906108c
SS
5147fi
5148rm -f conftest*
c906108c
SS
5149fi
5150
5ee754fc
MK
5151echo "$ac_t""$ac_cv_type_signal" 1>&6
5152cat >> confdefs.h <<EOF
5153#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5154EOF
5155
c906108c
SS
5156
5157
5ee754fc
MK
5158# ------------------------------------- #
5159# Checks for compiler characteristics. #
5160# ------------------------------------- #
5161
c906108c 5162echo $ac_n "checking for working const""... $ac_c" 1>&6
14abd0fb 5163echo "configure:5164: checking for working const" >&5
c906108c
SS
5164if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5165 echo $ac_n "(cached) $ac_c" 1>&6
5166else
5167 cat > conftest.$ac_ext <<EOF
14abd0fb 5168#line 5169 "configure"
c906108c
SS
5169#include "confdefs.h"
5170
5171int main() {
5172
5173/* Ultrix mips cc rejects this. */
5174typedef int charset[2]; const charset x;
5175/* SunOS 4.1.1 cc rejects this. */
5176char const *const *ccp;
5177char **p;
5178/* NEC SVR4.0.2 mips cc rejects this. */
5179struct point {int x, y;};
5180static struct point const zero = {0,0};
5181/* AIX XL C 1.02.0.0 rejects this.
5182 It does not let you subtract one const X* pointer from another in an arm
5183 of an if-expression whose if-part is not a constant expression */
5184const char *g = "string";
5185ccp = &g + (g ? g-g : 0);
5186/* HPUX 7.0 cc rejects these. */
5187++ccp;
5188p = (char**) ccp;
5189ccp = (char const *const *) p;
5190{ /* SCO 3.2v4 cc rejects this. */
5191 char *t;
5192 char const *s = 0 ? (char *) 0 : (char const *) 0;
5193
5194 *t++ = 0;
5195}
5196{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5197 int x[] = {25, 17};
5198 const int *foo = &x[0];
5199 ++foo;
5200}
5201{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5202 typedef const int *iptr;
5203 iptr p = 0;
5204 ++p;
5205}
5206{ /* AIX XL C 1.02.0.0 rejects this saying
5207 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5208 struct s { int j; const int *ap[3]; };
5209 struct s *b; b->j = 5;
5210}
5211{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5212 const int foo = 10;
5213}
5214
5215; return 0; }
5216EOF
14abd0fb 5217if { (eval echo configure:5218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5218 rm -rf conftest*
5219 ac_cv_c_const=yes
5220else
5221 echo "configure: failed program was:" >&5
5222 cat conftest.$ac_ext >&5
5223 rm -rf conftest*
5224 ac_cv_c_const=no
5225fi
5226rm -f conftest*
5227fi
5228
5229echo "$ac_t""$ac_cv_c_const" 1>&6
5230if test $ac_cv_c_const = no; then
5231 cat >> confdefs.h <<\EOF
5232#define const
5233EOF
5234
5235fi
5236
bce58c09 5237echo $ac_n "checking for inline""... $ac_c" 1>&6
14abd0fb 5238echo "configure:5239: checking for inline" >&5
bce58c09
JB
5239if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5240 echo $ac_n "(cached) $ac_c" 1>&6
5241else
5242 ac_cv_c_inline=no
5243for ac_kw in inline __inline__ __inline; do
5244 cat > conftest.$ac_ext <<EOF
14abd0fb 5245#line 5246 "configure"
bce58c09
JB
5246#include "confdefs.h"
5247
5248int main() {
5249} $ac_kw foo() {
5250; return 0; }
5251EOF
14abd0fb 5252if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5253 rm -rf conftest*
5254 ac_cv_c_inline=$ac_kw; break
5255else
5256 echo "configure: failed program was:" >&5
5257 cat conftest.$ac_ext >&5
5258fi
5259rm -f conftest*
5260done
5261
5262fi
5263
5264echo "$ac_t""$ac_cv_c_inline" 1>&6
5265case "$ac_cv_c_inline" in
5266 inline | yes) ;;
5267 no) cat >> confdefs.h <<\EOF
5268#define inline
5269EOF
5270 ;;
5271 *) cat >> confdefs.h <<EOF
5272#define inline $ac_cv_c_inline
5273EOF
5274 ;;
5275esac
5276
c906108c 5277
5ee754fc
MK
5278# ------------------------------ #
5279# Checks for library functions. #
5280# ------------------------------ #
5281
46711df8
MK
5282# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5283# for constant arguments. Useless!
5284echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
14abd0fb 5285echo "configure:5286: checking for working alloca.h" >&5
46711df8
MK
5286if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5287 echo $ac_n "(cached) $ac_c" 1>&6
5288else
5289 cat > conftest.$ac_ext <<EOF
14abd0fb 5290#line 5291 "configure"
46711df8
MK
5291#include "confdefs.h"
5292#include <alloca.h>
5293int main() {
5294char *p = alloca(2 * sizeof(int));
5295; return 0; }
5296EOF
14abd0fb 5297if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5298 rm -rf conftest*
5299 ac_cv_header_alloca_h=yes
5300else
5301 echo "configure: failed program was:" >&5
5302 cat conftest.$ac_ext >&5
5303 rm -rf conftest*
5304 ac_cv_header_alloca_h=no
5305fi
5306rm -f conftest*
5307fi
5308
5309echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5310if test $ac_cv_header_alloca_h = yes; then
5311 cat >> confdefs.h <<\EOF
5312#define HAVE_ALLOCA_H 1
5313EOF
5314
5315fi
5316
5317echo $ac_n "checking for alloca""... $ac_c" 1>&6
14abd0fb 5318echo "configure:5319: checking for alloca" >&5
46711df8
MK
5319if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5320 echo $ac_n "(cached) $ac_c" 1>&6
5321else
5322 cat > conftest.$ac_ext <<EOF
14abd0fb 5323#line 5324 "configure"
46711df8
MK
5324#include "confdefs.h"
5325
5326#ifdef __GNUC__
5327# define alloca __builtin_alloca
5328#else
5329# ifdef _MSC_VER
5330# include <malloc.h>
5331# define alloca _alloca
5332# else
5333# if HAVE_ALLOCA_H
5334# include <alloca.h>
5335# else
5336# ifdef _AIX
5337 #pragma alloca
5338# else
5339# ifndef alloca /* predefined by HP cc +Olibcalls */
5340char *alloca ();
5341# endif
5342# endif
5343# endif
5344# endif
5345#endif
5346
5347int main() {
5348char *p = (char *) alloca(1);
5349; return 0; }
5350EOF
14abd0fb 5351if { (eval echo configure:5352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5352 rm -rf conftest*
5353 ac_cv_func_alloca_works=yes
5354else
5355 echo "configure: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 rm -rf conftest*
5358 ac_cv_func_alloca_works=no
5359fi
5360rm -f conftest*
5361fi
5362
5363echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5364if test $ac_cv_func_alloca_works = yes; then
5365 cat >> confdefs.h <<\EOF
5366#define HAVE_ALLOCA 1
5367EOF
5368
5369fi
5370
5371if test $ac_cv_func_alloca_works = no; then
5372 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5373 # that cause trouble. Some versions do not even contain alloca or
5374 # contain a buggy version. If you still want to use their alloca,
5375 # use ar to extract alloca.o from them instead of compiling alloca.c.
5376 ALLOCA=alloca.${ac_objext}
5377 cat >> confdefs.h <<\EOF
5378#define C_ALLOCA 1
5379EOF
5380
5381
5382echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
14abd0fb 5383echo "configure:5384: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5384if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5385 echo $ac_n "(cached) $ac_c" 1>&6
5386else
5387 cat > conftest.$ac_ext <<EOF
14abd0fb 5388#line 5389 "configure"
46711df8
MK
5389#include "confdefs.h"
5390#if defined(CRAY) && ! defined(CRAY2)
5391webecray
5392#else
5393wenotbecray
5394#endif
5395
5396EOF
5397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5398 egrep "webecray" >/dev/null 2>&1; then
5399 rm -rf conftest*
5400 ac_cv_os_cray=yes
5401else
5402 rm -rf conftest*
5403 ac_cv_os_cray=no
5404fi
5405rm -f conftest*
5406
5407fi
5408
5409echo "$ac_t""$ac_cv_os_cray" 1>&6
5410if test $ac_cv_os_cray = yes; then
5411for ac_func in _getb67 GETB67 getb67; do
5412 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 5413echo "configure:5414: checking for $ac_func" >&5
46711df8
MK
5414if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5415 echo $ac_n "(cached) $ac_c" 1>&6
5416else
5417 cat > conftest.$ac_ext <<EOF
14abd0fb 5418#line 5419 "configure"
46711df8
MK
5419#include "confdefs.h"
5420/* System header to define __stub macros and hopefully few prototypes,
5421 which can conflict with char $ac_func(); below. */
5422#include <assert.h>
5423/* Override any gcc2 internal prototype to avoid an error. */
5424/* We use char because int might match the return type of a gcc2
5425 builtin and then its argument prototype would still apply. */
5426char $ac_func();
5427
5428int main() {
5429
5430/* The GNU C library defines this for functions which it implements
5431 to always fail with ENOSYS. Some functions are actually named
5432 something starting with __ and the normal name is an alias. */
5433#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5434choke me
5435#else
5436$ac_func();
5437#endif
5438
5439; return 0; }
5440EOF
14abd0fb 5441if { (eval echo configure:5442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5442 rm -rf conftest*
5443 eval "ac_cv_func_$ac_func=yes"
5444else
5445 echo "configure: failed program was:" >&5
5446 cat conftest.$ac_ext >&5
5447 rm -rf conftest*
5448 eval "ac_cv_func_$ac_func=no"
5449fi
5450rm -f conftest*
5451fi
5452
5453if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5454 echo "$ac_t""yes" 1>&6
5455 cat >> confdefs.h <<EOF
5456#define CRAY_STACKSEG_END $ac_func
5457EOF
5458
5459 break
5460else
5461 echo "$ac_t""no" 1>&6
5462fi
5463
5464done
5465fi
5466
5467echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
14abd0fb 5468echo "configure:5469: checking stack direction for C alloca" >&5
46711df8
MK
5469if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5470 echo $ac_n "(cached) $ac_c" 1>&6
5471else
5472 if test "$cross_compiling" = yes; then
5473 ac_cv_c_stack_direction=0
5474else
5475 cat > conftest.$ac_ext <<EOF
14abd0fb 5476#line 5477 "configure"
46711df8
MK
5477#include "confdefs.h"
5478find_stack_direction ()
5479{
5480 static char *addr = 0;
5481 auto char dummy;
5482 if (addr == 0)
5483 {
5484 addr = &dummy;
5485 return find_stack_direction ();
5486 }
5487 else
5488 return (&dummy > addr) ? 1 : -1;
5489}
5490main ()
5491{
5492 exit (find_stack_direction() < 0);
5493}
5494EOF
14abd0fb 5495if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5496then
5497 ac_cv_c_stack_direction=1
5498else
5499 echo "configure: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5501 rm -fr conftest*
5502 ac_cv_c_stack_direction=-1
5503fi
5504rm -fr conftest*
5505fi
5506
5507fi
5508
5509echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5510cat >> confdefs.h <<EOF
5511#define STACK_DIRECTION $ac_cv_c_stack_direction
5512EOF
5513
5514fi
5515
97bf5e38
MK
5516for ac_hdr in unistd.h
5517do
5518ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5519echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14abd0fb 5520echo "configure:5521: checking for $ac_hdr" >&5
74c1b268
AC
5521if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5522 echo $ac_n "(cached) $ac_c" 1>&6
5523else
5524 cat > conftest.$ac_ext <<EOF
14abd0fb 5525#line 5526 "configure"
74c1b268 5526#include "confdefs.h"
97bf5e38 5527#include <$ac_hdr>
74c1b268
AC
5528EOF
5529ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 5530{ (eval echo configure:5531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5531ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5532if test -z "$ac_err"; then
5533 rm -rf conftest*
5534 eval "ac_cv_header_$ac_safe=yes"
5535else
5536 echo "$ac_err" >&5
5537 echo "configure: failed program was:" >&5
5538 cat conftest.$ac_ext >&5
5539 rm -rf conftest*
5540 eval "ac_cv_header_$ac_safe=no"
5541fi
5542rm -f conftest*
5543fi
5544if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5545 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5546 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5547 cat >> confdefs.h <<EOF
5548#define $ac_tr_hdr 1
74c1b268 5549EOF
97bf5e38 5550
74c1b268
AC
5551else
5552 echo "$ac_t""no" 1>&6
5553fi
97bf5e38 5554done
74c1b268 5555
97bf5e38
MK
5556for ac_func in getpagesize
5557do
5558echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 5559echo "configure:5560: checking for $ac_func" >&5
97bf5e38 5560if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5561 echo $ac_n "(cached) $ac_c" 1>&6
5562else
5563 cat > conftest.$ac_ext <<EOF
14abd0fb 5564#line 5565 "configure"
74c1b268
AC
5565#include "confdefs.h"
5566/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5567 which can conflict with char $ac_func(); below. */
74c1b268
AC
5568#include <assert.h>
5569/* Override any gcc2 internal prototype to avoid an error. */
5570/* We use char because int might match the return type of a gcc2
5571 builtin and then its argument prototype would still apply. */
97bf5e38 5572char $ac_func();
74c1b268
AC
5573
5574int main() {
5575
5576/* The GNU C library defines this for functions which it implements
5577 to always fail with ENOSYS. Some functions are actually named
5578 something starting with __ and the normal name is an alias. */
97bf5e38 5579#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5580choke me
5581#else
97bf5e38 5582$ac_func();
74c1b268
AC
5583#endif
5584
5585; return 0; }
5586EOF
14abd0fb 5587if { (eval echo configure:5588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5588 rm -rf conftest*
97bf5e38 5589 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5590else
5591 echo "configure: failed program was:" >&5
5592 cat conftest.$ac_ext >&5
5593 rm -rf conftest*
97bf5e38 5594 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5595fi
5596rm -f conftest*
5597fi
5598
97bf5e38 5599if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5600 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5601 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5602 cat >> confdefs.h <<EOF
5603#define $ac_tr_func 1
5604EOF
5605
74c1b268
AC
5606else
5607 echo "$ac_t""no" 1>&6
5608fi
97bf5e38 5609done
74c1b268 5610
97bf5e38 5611echo $ac_n "checking for working mmap""... $ac_c" 1>&6
14abd0fb 5612echo "configure:5613: checking for working mmap" >&5
97bf5e38
MK
5613if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5614 echo $ac_n "(cached) $ac_c" 1>&6
5615else
5616 if test "$cross_compiling" = yes; then
5617 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5618else
5619 cat > conftest.$ac_ext <<EOF
14abd0fb 5620#line 5621 "configure"
74c1b268 5621#include "confdefs.h"
97bf5e38
MK
5622
5623/* Thanks to Mike Haertel and Jim Avera for this test.
5624 Here is a matrix of mmap possibilities:
5625 mmap private not fixed
5626 mmap private fixed at somewhere currently unmapped
5627 mmap private fixed at somewhere already mapped
5628 mmap shared not fixed
5629 mmap shared fixed at somewhere currently unmapped
5630 mmap shared fixed at somewhere already mapped
5631 For private mappings, we should verify that changes cannot be read()
5632 back from the file, nor mmap's back from the file at a different
5633 address. (There have been systems where private was not correctly
5634 implemented like the infamous i386 svr4.0, and systems where the
5635 VM page cache was not coherent with the filesystem buffer cache
5636 like early versions of FreeBSD and possibly contemporary NetBSD.)
5637 For shared mappings, we should conversely verify that changes get
5638 propogated back to all the places they're supposed to be.
5639
5640 Grep wants private fixed already mapped.
5641 The main things grep needs to know about mmap are:
5642 * does it exist and is it safe to write into the mmap'd area
5643 * how to use it (BSD variants) */
74c1b268 5644#include <sys/types.h>
97bf5e38
MK
5645#include <fcntl.h>
5646#include <sys/mman.h>
5647
5648/* This mess was copied from the GNU getpagesize.h. */
5649#ifndef HAVE_GETPAGESIZE
5650# ifdef HAVE_UNISTD_H
5651# include <unistd.h>
5652# endif
5653
5654/* Assume that all systems that can run configure have sys/param.h. */
5655# ifndef HAVE_SYS_PARAM_H
5656# define HAVE_SYS_PARAM_H 1
5657# endif
5658
5659# ifdef _SC_PAGESIZE
5660# define getpagesize() sysconf(_SC_PAGESIZE)
5661# else /* no _SC_PAGESIZE */
5662# ifdef HAVE_SYS_PARAM_H
5663# include <sys/param.h>
5664# ifdef EXEC_PAGESIZE
5665# define getpagesize() EXEC_PAGESIZE
5666# else /* no EXEC_PAGESIZE */
5667# ifdef NBPG
5668# define getpagesize() NBPG * CLSIZE
5669# ifndef CLSIZE
5670# define CLSIZE 1
5671# endif /* no CLSIZE */
5672# else /* no NBPG */
5673# ifdef NBPC
5674# define getpagesize() NBPC
5675# else /* no NBPC */
5676# ifdef PAGESIZE
5677# define getpagesize() PAGESIZE
5678# endif /* PAGESIZE */
5679# endif /* no NBPC */
5680# endif /* no NBPG */
5681# endif /* no EXEC_PAGESIZE */
5682# else /* no HAVE_SYS_PARAM_H */
5683# define getpagesize() 8192 /* punt totally */
5684# endif /* no HAVE_SYS_PARAM_H */
5685# endif /* no _SC_PAGESIZE */
5686
5687#endif /* no HAVE_GETPAGESIZE */
5688
74c1b268 5689#ifdef __cplusplus
97bf5e38 5690extern "C" { void *malloc(unsigned); }
74c1b268 5691#else
97bf5e38 5692char *malloc();
74c1b268 5693#endif
74c1b268 5694
97bf5e38
MK
5695int
5696main()
5697{
5698 char *data, *data2, *data3;
5699 int i, pagesize;
5700 int fd;
74c1b268 5701
97bf5e38 5702 pagesize = getpagesize();
74c1b268 5703
97bf5e38
MK
5704 /*
5705 * First, make a file with some known garbage in it.
5706 */
5707 data = malloc(pagesize);
5708 if (!data)
5709 exit(1);
5710 for (i = 0; i < pagesize; ++i)
5711 *(data + i) = rand();
5712 umask(0);
5713 fd = creat("conftestmmap", 0600);
5714 if (fd < 0)
5715 exit(1);
5716 if (write(fd, data, pagesize) != pagesize)
5717 exit(1);
5718 close(fd);
74c1b268 5719
97bf5e38
MK
5720 /*
5721 * Next, try to mmap the file at a fixed address which
5722 * already has something else allocated at it. If we can,
5723 * also make sure that we see the same garbage.
5724 */
5725 fd = open("conftestmmap", O_RDWR);
5726 if (fd < 0)
5727 exit(1);
5728 data2 = malloc(2 * pagesize);
5729 if (!data2)
5730 exit(1);
5731 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5732 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5733 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5734 exit(1);
5735 for (i = 0; i < pagesize; ++i)
5736 if (*(data + i) != *(data2 + i))
5737 exit(1);
74c1b268 5738
97bf5e38
MK
5739 /*
5740 * Finally, make sure that changes to the mapped area
5741 * do not percolate back to the file as seen by read().
5742 * (This is a bug on some variants of i386 svr4.0.)
5743 */
5744 for (i = 0; i < pagesize; ++i)
5745 *(data2 + i) = *(data2 + i) + 1;
5746 data3 = malloc(pagesize);
5747 if (!data3)
5748 exit(1);
5749 if (read(fd, data3, pagesize) != pagesize)
5750 exit(1);
5751 for (i = 0; i < pagesize; ++i)
5752 if (*(data + i) != *(data3 + i))
5753 exit(1);
5754 close(fd);
5755 unlink("conftestmmap");
5756 exit(0);
74c1b268 5757}
97bf5e38 5758
74c1b268 5759EOF
14abd0fb 5760if { (eval echo configure:5761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5761then
97bf5e38 5762 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5763else
5764 echo "configure: failed program was:" >&5
5765 cat conftest.$ac_ext >&5
5766 rm -fr conftest*
97bf5e38 5767 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5768fi
5769rm -fr conftest*
5770fi
5771
5772fi
5773
97bf5e38
MK
5774echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5775if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5776 cat >> confdefs.h <<\EOF
97bf5e38 5777#define HAVE_MMAP 1
74c1b268
AC
5778EOF
5779
5780fi
5781
97bf5e38 5782echo $ac_n "checking for pid_t""... $ac_c" 1>&6
14abd0fb 5783echo "configure:5784: checking for pid_t" >&5
97bf5e38 5784if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5785 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5786else
5787 cat > conftest.$ac_ext <<EOF
14abd0fb 5788#line 5789 "configure"
0200359f 5789#include "confdefs.h"
97bf5e38
MK
5790#include <sys/types.h>
5791#if STDC_HEADERS
5792#include <stdlib.h>
5793#include <stddef.h>
0200359f 5794#endif
0200359f 5795EOF
97bf5e38
MK
5796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5797 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5798 rm -rf conftest*
5799 ac_cv_type_pid_t=yes
0200359f 5800else
97bf5e38
MK
5801 rm -rf conftest*
5802 ac_cv_type_pid_t=no
0200359f 5803fi
97bf5e38 5804rm -f conftest*
0200359f
MK
5805
5806fi
97bf5e38
MK
5807echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5808if test $ac_cv_type_pid_t = no; then
0200359f 5809 cat >> confdefs.h <<\EOF
97bf5e38 5810#define pid_t int
0200359f
MK
5811EOF
5812
5813fi
5814
97bf5e38
MK
5815ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5816echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
14abd0fb 5817echo "configure:5818: checking for vfork.h" >&5
97bf5e38 5818if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5819 echo $ac_n "(cached) $ac_c" 1>&6
5820else
5821 cat > conftest.$ac_ext <<EOF
14abd0fb 5822#line 5823 "configure"
72473524 5823#include "confdefs.h"
97bf5e38 5824#include <vfork.h>
72473524 5825EOF
97bf5e38 5826ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 5827{ (eval echo configure:5828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5828ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5829if test -z "$ac_err"; then
72473524 5830 rm -rf conftest*
97bf5e38 5831 eval "ac_cv_header_$ac_safe=yes"
72473524 5832else
97bf5e38 5833 echo "$ac_err" >&5
72473524
DJ
5834 echo "configure: failed program was:" >&5
5835 cat conftest.$ac_ext >&5
5836 rm -rf conftest*
97bf5e38 5837 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5838fi
5839rm -f conftest*
5840fi
97bf5e38
MK
5841if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5842 echo "$ac_t""yes" 1>&6
72473524 5843 cat >> confdefs.h <<\EOF
97bf5e38 5844#define HAVE_VFORK_H 1
72473524
DJ
5845EOF
5846
97bf5e38
MK
5847else
5848 echo "$ac_t""no" 1>&6
72473524 5849fi
c906108c 5850
97bf5e38 5851echo $ac_n "checking for working vfork""... $ac_c" 1>&6
14abd0fb 5852echo "configure:5853: checking for working vfork" >&5
97bf5e38
MK
5853if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5854 echo $ac_n "(cached) $ac_c" 1>&6
5855else
5856 if test "$cross_compiling" = yes; then
5857 echo $ac_n "checking for vfork""... $ac_c" 1>&6
14abd0fb 5858echo "configure:5859: checking for vfork" >&5
97bf5e38 5859if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5860 echo $ac_n "(cached) $ac_c" 1>&6
5861else
5862 cat > conftest.$ac_ext <<EOF
14abd0fb 5863#line 5864 "configure"
2b2d558c 5864#include "confdefs.h"
97bf5e38
MK
5865/* System header to define __stub macros and hopefully few prototypes,
5866 which can conflict with char vfork(); below. */
5867#include <assert.h>
5868/* Override any gcc2 internal prototype to avoid an error. */
5869/* We use char because int might match the return type of a gcc2
5870 builtin and then its argument prototype would still apply. */
5871char vfork();
2b2d558c
MK
5872
5873int main() {
97bf5e38
MK
5874
5875/* The GNU C library defines this for functions which it implements
5876 to always fail with ENOSYS. Some functions are actually named
5877 something starting with __ and the normal name is an alias. */
5878#if defined (__stub_vfork) || defined (__stub___vfork)
5879choke me
5880#else
5881vfork();
5882#endif
5883
2b2d558c
MK
5884; return 0; }
5885EOF
14abd0fb 5886if { (eval echo configure:5887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5887 rm -rf conftest*
97bf5e38 5888 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5889else
5890 echo "configure: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892 rm -rf conftest*
97bf5e38 5893 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5894fi
5895rm -f conftest*
5896fi
5897
97bf5e38
MK
5898if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5899 echo "$ac_t""yes" 1>&6
5900 :
5901else
5902 echo "$ac_t""no" 1>&6
2b2d558c
MK
5903fi
5904
97bf5e38 5905ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5906else
5907 cat > conftest.$ac_ext <<EOF
14abd0fb 5908#line 5909 "configure"
7dfa765c 5909#include "confdefs.h"
97bf5e38
MK
5910/* Thanks to Paul Eggert for this test. */
5911#include <stdio.h>
5912#include <sys/types.h>
5913#include <sys/stat.h>
5914#ifdef HAVE_UNISTD_H
5915#include <unistd.h>
5916#endif
5917#ifdef HAVE_VFORK_H
5918#include <vfork.h>
5919#endif
5920/* On some sparc systems, changes by the child to local and incoming
5921 argument registers are propagated back to the parent.
5922 The compiler is told about this with #include <vfork.h>,
5923 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5924 Test for this by using a static variable whose address
5925 is put into a register that is clobbered by the vfork. */
5926static
5927#ifdef __cplusplus
5928sparc_address_test (int arg)
5929#else
5930sparc_address_test (arg) int arg;
5931#endif
5932{
5933 static pid_t child;
5934 if (!child) {
5935 child = vfork ();
5936 if (child < 0) {
5937 perror ("vfork");
5938 _exit(2);
5939 }
5940 if (!child) {
5941 arg = getpid();
5942 write(-1, "", 0);
5943 _exit (arg);
5944 }
5945 }
5946}
5947main() {
5948 pid_t parent = getpid ();
5949 pid_t child;
7dfa765c 5950
97bf5e38 5951 sparc_address_test ();
7dfa765c 5952
97bf5e38 5953 child = vfork ();
7dfa765c 5954
97bf5e38
MK
5955 if (child == 0) {
5956 /* Here is another test for sparc vfork register problems.
5957 This test uses lots of local variables, at least
5958 as many local variables as main has allocated so far
5959 including compiler temporaries. 4 locals are enough for
5960 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5961 A buggy compiler should reuse the register of parent
5962 for one of the local variables, since it will think that
5963 parent can't possibly be used any more in this routine.
5964 Assigning to the local variable will thus munge parent
5965 in the parent process. */
5966 pid_t
5967 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5968 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5969 /* Convince the compiler that p..p7 are live; otherwise, it might
5970 use the same hardware register for all 8 local variables. */
5971 if (p != p1 || p != p2 || p != p3 || p != p4
5972 || p != p5 || p != p6 || p != p7)
5973 _exit(1);
7dfa765c 5974
97bf5e38
MK
5975 /* On some systems (e.g. IRIX 3.3),
5976 vfork doesn't separate parent from child file descriptors.
5977 If the child closes a descriptor before it execs or exits,
5978 this munges the parent's descriptor as well.
5979 Test for this by closing stdout in the child. */
5980 _exit(close(fileno(stdout)) != 0);
5981 } else {
5982 int status;
5983 struct stat st;
64bb1671 5984
97bf5e38
MK
5985 while (wait(&status) != child)
5986 ;
5987 exit(
5988 /* Was there some problem with vforking? */
5989 child < 0
64bb1671 5990
97bf5e38
MK
5991 /* Did the child fail? (This shouldn't happen.) */
5992 || status
64bb1671 5993
97bf5e38
MK
5994 /* Did the vfork/compiler bug occur? */
5995 || parent != getpid()
5996
5997 /* Did the file descriptor bug occur? */
5998 || fstat(fileno(stdout), &st) != 0
5999 );
6000 }
6001}
5c44784c 6002EOF
14abd0fb 6003if { (eval echo configure:6004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6004then
6005 ac_cv_func_vfork_works=yes
5c44784c
JM
6006else
6007 echo "configure: failed program was:" >&5
6008 cat conftest.$ac_ext >&5
97bf5e38
MK
6009 rm -fr conftest*
6010 ac_cv_func_vfork_works=no
5c44784c 6011fi
97bf5e38 6012rm -fr conftest*
5c44784c
JM
6013fi
6014
0afdd437
MK
6015fi
6016
97bf5e38
MK
6017echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6018if test $ac_cv_func_vfork_works = no; then
0afdd437 6019 cat >> confdefs.h <<\EOF
97bf5e38 6020#define vfork fork
0afdd437
MK
6021EOF
6022
6023fi
6024
97bf5e38
MK
6025for ac_func in canonicalize_file_name realpath
6026do
6027echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6028echo "configure:6029: checking for $ac_func" >&5
97bf5e38 6029if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6030 echo $ac_n "(cached) $ac_c" 1>&6
6031else
6032 cat > conftest.$ac_ext <<EOF
14abd0fb 6033#line 6034 "configure"
7e89e357 6034#include "confdefs.h"
97bf5e38
MK
6035/* System header to define __stub macros and hopefully few prototypes,
6036 which can conflict with char $ac_func(); below. */
6037#include <assert.h>
6038/* Override any gcc2 internal prototype to avoid an error. */
6039/* We use char because int might match the return type of a gcc2
6040 builtin and then its argument prototype would still apply. */
6041char $ac_func();
6042
7e89e357 6043int main() {
97bf5e38
MK
6044
6045/* The GNU C library defines this for functions which it implements
6046 to always fail with ENOSYS. Some functions are actually named
6047 something starting with __ and the normal name is an alias. */
6048#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6049choke me
6050#else
6051$ac_func();
6052#endif
6053
7e89e357
JT
6054; return 0; }
6055EOF
14abd0fb 6056if { (eval echo configure:6057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6057 rm -rf conftest*
97bf5e38 6058 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6059else
6060 echo "configure: failed program was:" >&5
6061 cat conftest.$ac_ext >&5
6062 rm -rf conftest*
97bf5e38 6063 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6064fi
6065rm -f conftest*
6066fi
6067
97bf5e38
MK
6068if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6069 echo "$ac_t""yes" 1>&6
6070 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6071 cat >> confdefs.h <<EOF
6072#define $ac_tr_func 1
7e89e357 6073EOF
97bf5e38
MK
6074
6075else
6076 echo "$ac_t""no" 1>&6
7e89e357 6077fi
97bf5e38 6078done
7e89e357 6079
97bf5e38 6080for ac_func in poll
7be570e7
JM
6081do
6082echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6083echo "configure:6084: checking for $ac_func" >&5
7be570e7
JM
6084if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6086else
6087 cat > conftest.$ac_ext <<EOF
14abd0fb 6088#line 6089 "configure"
7be570e7
JM
6089#include "confdefs.h"
6090/* System header to define __stub macros and hopefully few prototypes,
6091 which can conflict with char $ac_func(); below. */
6092#include <assert.h>
6093/* Override any gcc2 internal prototype to avoid an error. */
6094/* We use char because int might match the return type of a gcc2
6095 builtin and then its argument prototype would still apply. */
6096char $ac_func();
6097
6098int main() {
6099
6100/* The GNU C library defines this for functions which it implements
6101 to always fail with ENOSYS. Some functions are actually named
6102 something starting with __ and the normal name is an alias. */
6103#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6104choke me
6105#else
6106$ac_func();
6107#endif
6108
6109; return 0; }
6110EOF
14abd0fb
MK
6111if { (eval echo configure:6112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6112 rm -rf conftest*
6113 eval "ac_cv_func_$ac_func=yes"
6114else
6115 echo "configure: failed program was:" >&5
6116 cat conftest.$ac_ext >&5
6117 rm -rf conftest*
6118 eval "ac_cv_func_$ac_func=no"
6119fi
6120rm -f conftest*
6121fi
6122
6123if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6124 echo "$ac_t""yes" 1>&6
6125 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6126 cat >> confdefs.h <<EOF
6127#define $ac_tr_func 1
6128EOF
6129
6130else
6131 echo "$ac_t""no" 1>&6
6132fi
6133done
6134
6135for ac_func in pread64
6136do
6137echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6138echo "configure:6139: checking for $ac_func" >&5
6139if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6140 echo $ac_n "(cached) $ac_c" 1>&6
6141else
6142 cat > conftest.$ac_ext <<EOF
6143#line 6144 "configure"
6144#include "confdefs.h"
6145/* System header to define __stub macros and hopefully few prototypes,
6146 which can conflict with char $ac_func(); below. */
6147#include <assert.h>
6148/* Override any gcc2 internal prototype to avoid an error. */
6149/* We use char because int might match the return type of a gcc2
6150 builtin and then its argument prototype would still apply. */
6151char $ac_func();
6152
6153int main() {
6154
6155/* The GNU C library defines this for functions which it implements
6156 to always fail with ENOSYS. Some functions are actually named
6157 something starting with __ and the normal name is an alias. */
6158#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6159choke me
6160#else
6161$ac_func();
6162#endif
6163
6164; return 0; }
6165EOF
6166if { (eval echo configure:6167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6167 rm -rf conftest*
6168 eval "ac_cv_func_$ac_func=yes"
6169else
6170 echo "configure: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 rm -rf conftest*
6173 eval "ac_cv_func_$ac_func=no"
6174fi
6175rm -f conftest*
6176fi
6177
6178if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6179 echo "$ac_t""yes" 1>&6
6180 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6181 cat >> confdefs.h <<EOF
6182#define $ac_tr_func 1
6183EOF
6184
6185else
6186 echo "$ac_t""no" 1>&6
6187fi
6188done
6189
97bf5e38
MK
6190for ac_func in sbrk
6191do
6192echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6193echo "configure:6194: checking for $ac_func" >&5
97bf5e38 6194if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6195 echo $ac_n "(cached) $ac_c" 1>&6
6196else
6197 cat > conftest.$ac_ext <<EOF
14abd0fb 6198#line 6199 "configure"
c906108c 6199#include "confdefs.h"
97bf5e38
MK
6200/* System header to define __stub macros and hopefully few prototypes,
6201 which can conflict with char $ac_func(); below. */
6202#include <assert.h>
6203/* Override any gcc2 internal prototype to avoid an error. */
6204/* We use char because int might match the return type of a gcc2
6205 builtin and then its argument prototype would still apply. */
6206char $ac_func();
c906108c 6207
97bf5e38
MK
6208int main() {
6209
6210/* The GNU C library defines this for functions which it implements
6211 to always fail with ENOSYS. Some functions are actually named
6212 something starting with __ and the normal name is an alias. */
6213#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6214choke me
c906108c 6215#else
97bf5e38 6216$ac_func();
c906108c 6217#endif
97bf5e38 6218
c906108c
SS
6219; return 0; }
6220EOF
14abd0fb 6221if { (eval echo configure:6222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6222 rm -rf conftest*
97bf5e38 6223 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6224else
6225 echo "configure: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6227 rm -rf conftest*
97bf5e38 6228 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6229fi
6230rm -f conftest*
6231fi
6232
97bf5e38
MK
6233if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6234 echo "$ac_t""yes" 1>&6
6235 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6236 cat >> confdefs.h <<EOF
6237#define $ac_tr_func 1
c906108c 6238EOF
97bf5e38
MK
6239
6240else
6241 echo "$ac_t""no" 1>&6
c906108c 6242fi
97bf5e38 6243done
c906108c 6244
97bf5e38
MK
6245for ac_func in setpgid setpgrp
6246do
6247echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6248echo "configure:6249: checking for $ac_func" >&5
97bf5e38 6249if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6250 echo $ac_n "(cached) $ac_c" 1>&6
6251else
6252 cat > conftest.$ac_ext <<EOF
14abd0fb 6253#line 6254 "configure"
c906108c 6254#include "confdefs.h"
97bf5e38
MK
6255/* System header to define __stub macros and hopefully few prototypes,
6256 which can conflict with char $ac_func(); below. */
6257#include <assert.h>
6258/* Override any gcc2 internal prototype to avoid an error. */
6259/* We use char because int might match the return type of a gcc2
6260 builtin and then its argument prototype would still apply. */
6261char $ac_func();
c906108c 6262
97bf5e38
MK
6263int main() {
6264
6265/* The GNU C library defines this for functions which it implements
6266 to always fail with ENOSYS. Some functions are actually named
6267 something starting with __ and the normal name is an alias. */
6268#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6269choke me
c906108c 6270#else
97bf5e38 6271$ac_func();
c906108c 6272#endif
97bf5e38 6273
c906108c
SS
6274; return 0; }
6275EOF
14abd0fb 6276if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6277 rm -rf conftest*
97bf5e38 6278 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6279else
6280 echo "configure: failed program was:" >&5
6281 cat conftest.$ac_ext >&5
6282 rm -rf conftest*
97bf5e38 6283 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6284fi
6285rm -f conftest*
6286fi
6287
97bf5e38
MK
6288if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6289 echo "$ac_t""yes" 1>&6
6290 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6291 cat >> confdefs.h <<EOF
6292#define $ac_tr_func 1
c906108c 6293EOF
97bf5e38
MK
6294
6295else
6296 echo "$ac_t""no" 1>&6
c906108c 6297fi
97bf5e38 6298done
c906108c 6299
e1ea1d75 6300for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6301do
6302echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6303echo "configure:6304: checking for $ac_func" >&5
97bf5e38 6304if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6305 echo $ac_n "(cached) $ac_c" 1>&6
6306else
6307 cat > conftest.$ac_ext <<EOF
14abd0fb 6308#line 6309 "configure"
c906108c 6309#include "confdefs.h"
97bf5e38
MK
6310/* System header to define __stub macros and hopefully few prototypes,
6311 which can conflict with char $ac_func(); below. */
6312#include <assert.h>
6313/* Override any gcc2 internal prototype to avoid an error. */
6314/* We use char because int might match the return type of a gcc2
6315 builtin and then its argument prototype would still apply. */
6316char $ac_func();
c906108c 6317
97bf5e38
MK
6318int main() {
6319
6320/* The GNU C library defines this for functions which it implements
6321 to always fail with ENOSYS. Some functions are actually named
6322 something starting with __ and the normal name is an alias. */
6323#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6324choke me
c906108c 6325#else
97bf5e38 6326$ac_func();
c906108c 6327#endif
97bf5e38 6328
c906108c
SS
6329; return 0; }
6330EOF
14abd0fb 6331if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6332 rm -rf conftest*
97bf5e38 6333 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6334else
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6337 rm -rf conftest*
97bf5e38 6338 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6339fi
6340rm -f conftest*
6341fi
6342
97bf5e38
MK
6343if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6344 echo "$ac_t""yes" 1>&6
6345 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6346 cat >> confdefs.h <<EOF
6347#define $ac_tr_func 1
c906108c 6348EOF
e1ea1d75 6349
97bf5e38
MK
6350else
6351 echo "$ac_t""no" 1>&6
c906108c 6352fi
97bf5e38 6353done
c906108c 6354
97bf5e38
MK
6355for ac_func in socketpair
6356do
6357echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14abd0fb 6358echo "configure:6359: checking for $ac_func" >&5
97bf5e38 6359if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6360 echo $ac_n "(cached) $ac_c" 1>&6
6361else
6362 cat > conftest.$ac_ext <<EOF
14abd0fb 6363#line 6364 "configure"
c906108c 6364#include "confdefs.h"
97bf5e38
MK
6365/* System header to define __stub macros and hopefully few prototypes,
6366 which can conflict with char $ac_func(); below. */
6367#include <assert.h>
6368/* Override any gcc2 internal prototype to avoid an error. */
6369/* We use char because int might match the return type of a gcc2
6370 builtin and then its argument prototype would still apply. */
6371char $ac_func();
c906108c 6372
97bf5e38
MK
6373int main() {
6374
6375/* The GNU C library defines this for functions which it implements
6376 to always fail with ENOSYS. Some functions are actually named
6377 something starting with __ and the normal name is an alias. */
6378#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6379choke me
c906108c 6380#else
97bf5e38 6381$ac_func();
c906108c 6382#endif
97bf5e38 6383
c906108c
SS
6384; return 0; }
6385EOF
14abd0fb 6386if { (eval echo configure:6387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6387 rm -rf conftest*
97bf5e38 6388 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6389else
6390 echo "configure: failed program was:" >&5
6391 cat conftest.$ac_ext >&5
6392 rm -rf conftest*
97bf5e38 6393 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6394fi
6395rm -f conftest*
6396fi
6397
97bf5e38
MK
6398if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6399 echo "$ac_t""yes" 1>&6
6400 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6401 cat >> confdefs.h <<EOF
6402#define $ac_tr_func 1
c906108c 6403EOF
97bf5e38
MK
6404
6405else
6406 echo "$ac_t""no" 1>&6
c906108c 6407fi
97bf5e38 6408done
c906108c 6409
97bf5e38
MK
6410
6411if test "$cross_compiling" = no; then
6412 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
14abd0fb 6413echo "configure:6414: checking whether setpgrp takes no argument" >&5
97bf5e38 6414if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6415 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6416else
6417 if test "$cross_compiling" = yes; then
6418 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6419else
6420 cat > conftest.$ac_ext <<EOF
14abd0fb 6421#line 6422 "configure"
c906108c
SS
6422#include "confdefs.h"
6423
c906108c
SS
6424#ifdef HAVE_UNISTD_H
6425#include <unistd.h>
6426#endif
97bf5e38
MK
6427
6428/*
6429 * If this system has a BSD-style setpgrp, which takes arguments, exit
6430 * successfully.
6431 */
6432main()
6433{
6434 if (setpgrp(1,1) == -1)
6435 exit(0);
6436 else
6437 exit(1);
6438}
6439
c906108c 6440EOF
14abd0fb 6441if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6442then
6443 ac_cv_func_setpgrp_void=no
c906108c
SS
6444else
6445 echo "configure: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
97bf5e38
MK
6447 rm -fr conftest*
6448 ac_cv_func_setpgrp_void=yes
c906108c 6449fi
97bf5e38 6450rm -fr conftest*
c906108c
SS
6451fi
6452
97bf5e38
MK
6453
6454fi
6455
6456echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6457if test $ac_cv_func_setpgrp_void = yes; then
6458 cat >> confdefs.h <<\EOF
6459#define SETPGRP_VOID 1
c906108c
SS
6460EOF
6461
6462fi
6463
97bf5e38
MK
6464else
6465 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
14abd0fb 6466echo "configure:6467: checking whether setpgrp takes no argument" >&5
97bf5e38 6467if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6468 echo $ac_n "(cached) $ac_c" 1>&6
6469else
6470 cat > conftest.$ac_ext <<EOF
14abd0fb 6471#line 6472 "configure"
b83266a0
SS
6472#include "confdefs.h"
6473
b83266a0 6474#include <unistd.h>
97bf5e38 6475
b83266a0 6476int main() {
97bf5e38
MK
6477
6478 if (setpgrp(1,1) == -1)
6479 exit (0);
6480 else
6481 exit (1);
6482
b83266a0
SS
6483; return 0; }
6484EOF
14abd0fb 6485if { (eval echo configure:6486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6486 rm -rf conftest*
97bf5e38 6487 ac_cv_func_setpgrp_void=no
b83266a0
SS
6488else
6489 echo "configure: failed program was:" >&5
6490 cat conftest.$ac_ext >&5
6491 rm -rf conftest*
97bf5e38 6492 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6493fi
6494rm -f conftest*
6495fi
6496
97bf5e38
MK
6497echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6498if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6499 cat >> confdefs.h <<\EOF
97bf5e38 6500#define SETPGRP_VOID 1
b83266a0
SS
6501EOF
6502
97bf5e38 6503fi
b83266a0
SS
6504fi
6505
97bf5e38
MK
6506# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6507# since sigsetjmp might only be defined as a macro.
6508echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
14abd0fb 6509echo "configure:6510: checking for sigsetjmp" >&5
97bf5e38 6510if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6511 echo $ac_n "(cached) $ac_c" 1>&6
6512else
6513 cat > conftest.$ac_ext <<EOF
14abd0fb 6514#line 6515 "configure"
a4db0f07
RH
6515#include "confdefs.h"
6516
97bf5e38
MK
6517#include <setjmp.h>
6518
a4db0f07 6519int main() {
97bf5e38 6520sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6521; return 0; }
6522EOF
14abd0fb 6523if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6524 rm -rf conftest*
97bf5e38 6525 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6526else
6527 echo "configure: failed program was:" >&5
6528 cat conftest.$ac_ext >&5
6529 rm -rf conftest*
97bf5e38 6530 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6531fi
6532rm -f conftest*
6533fi
6534
97bf5e38
MK
6535echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6536if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6537 cat >> confdefs.h <<\EOF
97bf5e38 6538#define HAVE_SIGSETJMP 1
a4db0f07
RH
6539EOF
6540
6541fi
c906108c 6542
06825bd1
MK
6543# Assume we'll default to using the included libiberty regex.
6544gdb_use_included_regex=yes
6545
6546# However, if the system regex is GNU regex, then default to *not*
6547# using the included regex.
6548echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
14abd0fb 6549echo "configure:6550: checking for GNU regex" >&5
06825bd1
MK
6550if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6551 echo $ac_n "(cached) $ac_c" 1>&6
6552else
6553 cat > conftest.$ac_ext <<EOF
14abd0fb 6554#line 6555 "configure"
06825bd1
MK
6555#include "confdefs.h"
6556#include <gnu-versions.h>
6557int main() {
6558#define REGEX_INTERFACE_VERSION 1
6559#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6560# error "Version mismatch"
6561#endif
6562; return 0; }
6563EOF
14abd0fb 6564if { (eval echo configure:6565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6565 rm -rf conftest*
6566 gdb_cv_have_gnu_regex=yes
6567else
6568 echo "configure: failed program was:" >&5
6569 cat conftest.$ac_ext >&5
6570 rm -rf conftest*
6571 gdb_cv_have_gnu_regex=no
6572fi
6573rm -f conftest*
6574fi
6575
6576echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6577if test $gdb_cv_have_gnu_regex = yes; then
6578 gdb_use_included_regex=no
6579fi
6580
6581# Check whether --with-included-regex or --without-included-regex was given.
6582if test "${with_included_regex+set}" = set; then
6583 withval="$with_included_regex"
6584 gdb_with_regex=$withval
6585else
6586 gdb_with_regex=$gdb_use_included_regex
6587fi
6588
6589if test "$gdb_with_regex" = yes; then
6590 cat >> confdefs.h <<\EOF
6591#define USE_INCLUDED_REGEX 1
6592EOF
6593
6594fi
6595
97bf5e38
MK
6596# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6597# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6598echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
14abd0fb 6599echo "configure:6600: checking for r_fs in struct reg" >&5
97bf5e38
MK
6600if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6601 echo $ac_n "(cached) $ac_c" 1>&6
6602else
6603 cat > conftest.$ac_ext <<EOF
14abd0fb 6604#line 6605 "configure"
c906108c 6605#include "confdefs.h"
97bf5e38
MK
6606#include <machine/reg.h>
6607int main() {
6608struct reg r; r.r_fs;
6609; return 0; }
c906108c 6610EOF
14abd0fb 6611if { (eval echo configure:6612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6612 rm -rf conftest*
97bf5e38 6613 gdb_cv_struct_reg_r_fs=yes
c906108c 6614else
97bf5e38
MK
6615 echo "configure: failed program was:" >&5
6616 cat conftest.$ac_ext >&5
c906108c 6617 rm -rf conftest*
97bf5e38 6618 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6619fi
6620rm -f conftest*
97bf5e38 6621fi
c906108c 6622
97bf5e38
MK
6623echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6624if test $gdb_cv_struct_reg_r_fs = yes; then
6625 cat >> confdefs.h <<\EOF
6626#define HAVE_STRUCT_REG_R_FS 1
6627EOF
6628
6629fi
6630echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
14abd0fb 6631echo "configure:6632: checking for r_gs in struct reg" >&5
97bf5e38
MK
6632if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6633 echo $ac_n "(cached) $ac_c" 1>&6
6634else
6635 cat > conftest.$ac_ext <<EOF
14abd0fb 6636#line 6637 "configure"
c906108c 6637#include "confdefs.h"
97bf5e38
MK
6638#include <machine/reg.h>
6639int main() {
6640struct reg r; r.r_gs;
6641; return 0; }
c906108c 6642EOF
14abd0fb 6643if { (eval echo configure:6644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6644 rm -rf conftest*
97bf5e38 6645 gdb_cv_struct_reg_r_gs=yes
c906108c 6646else
97bf5e38
MK
6647 echo "configure: failed program was:" >&5
6648 cat conftest.$ac_ext >&5
c906108c 6649 rm -rf conftest*
97bf5e38 6650 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6651fi
6652rm -f conftest*
c906108c 6653fi
c906108c 6654
97bf5e38
MK
6655echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6656if test $gdb_cv_struct_reg_r_gs = yes; then
6657 cat >> confdefs.h <<\EOF
6658#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6659EOF
6660
c906108c
SS
6661fi
6662
97bf5e38
MK
6663# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6664echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
14abd0fb 6665echo "configure:6666: checking for PTRACE_GETREGS" >&5
97bf5e38 6666if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6667 echo $ac_n "(cached) $ac_c" 1>&6
6668else
6669 cat > conftest.$ac_ext <<EOF
14abd0fb 6670#line 6671 "configure"
c906108c 6671#include "confdefs.h"
97bf5e38 6672#include <sys/ptrace.h>
c906108c 6673int main() {
97bf5e38 6674PTRACE_GETREGS;
c906108c
SS
6675; return 0; }
6676EOF
14abd0fb 6677if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6678 rm -rf conftest*
97bf5e38 6679 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6680else
6681 echo "configure: failed program was:" >&5
6682 cat conftest.$ac_ext >&5
6683 rm -rf conftest*
97bf5e38 6684 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6685fi
6686rm -f conftest*
6687fi
6688
97bf5e38
MK
6689echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6690if test $gdb_cv_have_ptrace_getregs = yes; then
6691 cat >> confdefs.h <<\EOF
6692#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6693EOF
6694
97bf5e38 6695fi
c906108c 6696
97bf5e38
MK
6697# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6698echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
14abd0fb 6699echo "configure:6700: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6700if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6701 echo $ac_n "(cached) $ac_c" 1>&6
6702else
6703 cat > conftest.$ac_ext <<EOF
14abd0fb 6704#line 6705 "configure"
c906108c 6705#include "confdefs.h"
97bf5e38 6706#include <sys/ptrace.h>
c906108c 6707int main() {
97bf5e38 6708PTRACE_GETFPXREGS;
c906108c
SS
6709; return 0; }
6710EOF
14abd0fb 6711if { (eval echo configure:6712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6712 rm -rf conftest*
97bf5e38 6713 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6714else
6715 echo "configure: failed program was:" >&5
6716 cat conftest.$ac_ext >&5
6717 rm -rf conftest*
97bf5e38 6718 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6719fi
6720rm -f conftest*
6721fi
6722
97bf5e38
MK
6723echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6724if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6725 cat >> confdefs.h <<\EOF
6726#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6727EOF
6728
97bf5e38 6729fi
c906108c 6730
97bf5e38
MK
6731# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6732echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
14abd0fb 6733echo "configure:6734: checking for PT_GETDBREGS" >&5
97bf5e38 6734if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6735 echo $ac_n "(cached) $ac_c" 1>&6
6736else
6737 cat > conftest.$ac_ext <<EOF
14abd0fb 6738#line 6739 "configure"
c906108c 6739#include "confdefs.h"
97bf5e38
MK
6740#include <sys/types.h>
6741#include <sys/ptrace.h>
c906108c 6742int main() {
97bf5e38 6743PT_GETDBREGS;
c906108c
SS
6744; return 0; }
6745EOF
14abd0fb 6746if { (eval echo configure:6747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6747 rm -rf conftest*
97bf5e38 6748 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6749else
6750 echo "configure: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6752 rm -rf conftest*
97bf5e38 6753 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6754fi
6755rm -f conftest*
6756fi
6757
97bf5e38
MK
6758echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6759if test $gdb_cv_have_pt_getdbregs = yes; then
6760 cat >> confdefs.h <<\EOF
6761#define HAVE_PT_GETDBREGS 1
c906108c
SS
6762EOF
6763
97bf5e38 6764fi
c906108c 6765
97bf5e38
MK
6766# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6767echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
14abd0fb 6768echo "configure:6769: checking for PT_GETXMMREGS" >&5
97bf5e38 6769if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6770 echo $ac_n "(cached) $ac_c" 1>&6
6771else
6772 cat > conftest.$ac_ext <<EOF
14abd0fb 6773#line 6774 "configure"
c906108c 6774#include "confdefs.h"
97bf5e38
MK
6775#include <sys/types.h>
6776#include <sys/ptrace.h>
c906108c 6777int main() {
97bf5e38 6778PT_GETXMMREGS;
c906108c
SS
6779; return 0; }
6780EOF
14abd0fb 6781if { (eval echo configure:6782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6782 rm -rf conftest*
97bf5e38 6783 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6784else
6785 echo "configure: failed program was:" >&5
6786 cat conftest.$ac_ext >&5
6787 rm -rf conftest*
97bf5e38 6788 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6789fi
6790rm -f conftest*
6791fi
6792
97bf5e38
MK
6793echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6794if test $gdb_cv_have_pt_getxmmregs = yes; then
6795 cat >> confdefs.h <<\EOF
6796#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6797EOF
6798
97bf5e38 6799fi
c906108c 6800
97bf5e38
MK
6801
6802echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
14abd0fb 6803echo "configure:6804: checking whether malloc must be declared" >&5
97bf5e38 6804if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6805 echo $ac_n "(cached) $ac_c" 1>&6
6806else
6807 cat > conftest.$ac_ext <<EOF
14abd0fb 6808#line 6809 "configure"
3862412b 6809#include "confdefs.h"
e17bf198 6810
97bf5e38
MK
6811#include <stdio.h>
6812#ifdef HAVE_STRING_H
6813#include <string.h>
6814#else
6815#ifdef HAVE_STRINGS_H
6816#include <strings.h>
6817#endif
6818#endif
6819#ifdef HAVE_STDLIB_H
6820#include <stdlib.h>
6821#endif
6822#ifdef HAVE_UNISTD_H
6823#include <unistd.h>
6824#endif
3862412b 6825int main() {
97bf5e38 6826char *(*pfn) = (char *(*)) malloc
3862412b
MK
6827; return 0; }
6828EOF
14abd0fb 6829if { (eval echo configure:6830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6830 rm -rf conftest*
97bf5e38 6831 bfd_cv_decl_needed_malloc=no
3862412b
MK
6832else
6833 echo "configure: failed program was:" >&5
6834 cat conftest.$ac_ext >&5
6835 rm -rf conftest*
97bf5e38 6836 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6837fi
6838rm -f conftest*
6839fi
6840
97bf5e38
MK
6841echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6842if test $bfd_cv_decl_needed_malloc = yes; then
6843 cat >> confdefs.h <<\EOF
6844#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6845EOF
6846
97bf5e38 6847fi
3862412b 6848
97bf5e38 6849echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
14abd0fb 6850echo "configure:6851: checking whether realloc must be declared" >&5
97bf5e38 6851if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6852 echo $ac_n "(cached) $ac_c" 1>&6
6853else
6854 cat > conftest.$ac_ext <<EOF
14abd0fb 6855#line 6856 "configure"
3862412b 6856#include "confdefs.h"
e17bf198 6857
97bf5e38
MK
6858#include <stdio.h>
6859#ifdef HAVE_STRING_H
6860#include <string.h>
6861#else
6862#ifdef HAVE_STRINGS_H
6863#include <strings.h>
6864#endif
6865#endif
6866#ifdef HAVE_STDLIB_H
6867#include <stdlib.h>
6868#endif
6869#ifdef HAVE_UNISTD_H
6870#include <unistd.h>
6871#endif
3862412b 6872int main() {
97bf5e38 6873char *(*pfn) = (char *(*)) realloc
3862412b
MK
6874; return 0; }
6875EOF
14abd0fb 6876if { (eval echo configure:6877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6877 rm -rf conftest*
97bf5e38 6878 bfd_cv_decl_needed_realloc=no
3862412b
MK
6879else
6880 echo "configure: failed program was:" >&5
6881 cat conftest.$ac_ext >&5
6882 rm -rf conftest*
97bf5e38 6883 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6884fi
6885rm -f conftest*
6886fi
6887
97bf5e38
MK
6888echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6889if test $bfd_cv_decl_needed_realloc = yes; then
6890 cat >> confdefs.h <<\EOF
6891#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6892EOF
6893
97bf5e38 6894fi
3862412b 6895
97bf5e38 6896echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
14abd0fb 6897echo "configure:6898: checking whether free must be declared" >&5
97bf5e38 6898if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6899 echo $ac_n "(cached) $ac_c" 1>&6
6900else
6901 cat > conftest.$ac_ext <<EOF
14abd0fb 6902#line 6903 "configure"
451928c5 6903#include "confdefs.h"
e17bf198 6904
97bf5e38
MK
6905#include <stdio.h>
6906#ifdef HAVE_STRING_H
6907#include <string.h>
6908#else
6909#ifdef HAVE_STRINGS_H
6910#include <strings.h>
6911#endif
6912#endif
6913#ifdef HAVE_STDLIB_H
6914#include <stdlib.h>
6915#endif
6916#ifdef HAVE_UNISTD_H
6917#include <unistd.h>
6918#endif
451928c5 6919int main() {
97bf5e38 6920char *(*pfn) = (char *(*)) free
451928c5
AC
6921; return 0; }
6922EOF
14abd0fb 6923if { (eval echo configure:6924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6924 rm -rf conftest*
97bf5e38 6925 bfd_cv_decl_needed_free=no
451928c5
AC
6926else
6927 echo "configure: failed program was:" >&5
6928 cat conftest.$ac_ext >&5
6929 rm -rf conftest*
97bf5e38 6930 bfd_cv_decl_needed_free=yes
451928c5
AC
6931fi
6932rm -f conftest*
6933fi
6934
97bf5e38
MK
6935echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6936if test $bfd_cv_decl_needed_free = yes; then
6937 cat >> confdefs.h <<\EOF
6938#define NEED_DECLARATION_FREE 1
451928c5
AC
6939EOF
6940
97bf5e38 6941fi
451928c5 6942
97bf5e38 6943echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
14abd0fb 6944echo "configure:6945: checking whether strerror must be declared" >&5
97bf5e38 6945if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6946 echo $ac_n "(cached) $ac_c" 1>&6
6947else
6948 cat > conftest.$ac_ext <<EOF
14abd0fb 6949#line 6950 "configure"
451928c5 6950#include "confdefs.h"
e17bf198 6951
97bf5e38
MK
6952#include <stdio.h>
6953#ifdef HAVE_STRING_H
6954#include <string.h>
6955#else
6956#ifdef HAVE_STRINGS_H
6957#include <strings.h>
6958#endif
6959#endif
6960#ifdef HAVE_STDLIB_H
6961#include <stdlib.h>
6962#endif
6963#ifdef HAVE_UNISTD_H
6964#include <unistd.h>
6965#endif
451928c5 6966int main() {
97bf5e38 6967char *(*pfn) = (char *(*)) strerror
451928c5
AC
6968; return 0; }
6969EOF
14abd0fb 6970if { (eval echo configure:6971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6971 rm -rf conftest*
97bf5e38 6972 bfd_cv_decl_needed_strerror=no
451928c5
AC
6973else
6974 echo "configure: failed program was:" >&5
6975 cat conftest.$ac_ext >&5
6976 rm -rf conftest*
97bf5e38 6977 bfd_cv_decl_needed_strerror=yes
451928c5
AC
6978fi
6979rm -f conftest*
6980fi
6981
97bf5e38
MK
6982echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6983if test $bfd_cv_decl_needed_strerror = yes; then
6984 cat >> confdefs.h <<\EOF
6985#define NEED_DECLARATION_STRERROR 1
451928c5
AC
6986EOF
6987
97bf5e38 6988fi
451928c5 6989
97bf5e38 6990echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
14abd0fb 6991echo "configure:6992: checking whether strdup must be declared" >&5
97bf5e38 6992if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
6993 echo $ac_n "(cached) $ac_c" 1>&6
6994else
6995 cat > conftest.$ac_ext <<EOF
14abd0fb 6996#line 6997 "configure"
3862412b 6997#include "confdefs.h"
e17bf198 6998
97bf5e38
MK
6999#include <stdio.h>
7000#ifdef HAVE_STRING_H
7001#include <string.h>
7002#else
7003#ifdef HAVE_STRINGS_H
7004#include <strings.h>
7005#endif
7006#endif
7007#ifdef HAVE_STDLIB_H
7008#include <stdlib.h>
7009#endif
7010#ifdef HAVE_UNISTD_H
7011#include <unistd.h>
7012#endif
3862412b 7013int main() {
97bf5e38 7014char *(*pfn) = (char *(*)) strdup
3862412b
MK
7015; return 0; }
7016EOF
14abd0fb 7017if { (eval echo configure:7018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7018 rm -rf conftest*
97bf5e38 7019 bfd_cv_decl_needed_strdup=no
3862412b
MK
7020else
7021 echo "configure: failed program was:" >&5
7022 cat conftest.$ac_ext >&5
7023 rm -rf conftest*
97bf5e38 7024 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7025fi
7026rm -f conftest*
7027fi
7028
97bf5e38
MK
7029echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7030if test $bfd_cv_decl_needed_strdup = yes; then
7031 cat >> confdefs.h <<\EOF
7032#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7033EOF
7034
97bf5e38 7035fi
3862412b 7036
97bf5e38 7037echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
14abd0fb 7038echo "configure:7039: checking whether strstr must be declared" >&5
97bf5e38 7039if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7040 echo $ac_n "(cached) $ac_c" 1>&6
7041else
7042 cat > conftest.$ac_ext <<EOF
14abd0fb 7043#line 7044 "configure"
3862412b 7044#include "confdefs.h"
e17bf198 7045
97bf5e38
MK
7046#include <stdio.h>
7047#ifdef HAVE_STRING_H
7048#include <string.h>
7049#else
7050#ifdef HAVE_STRINGS_H
7051#include <strings.h>
7052#endif
7053#endif
7054#ifdef HAVE_STDLIB_H
7055#include <stdlib.h>
7056#endif
7057#ifdef HAVE_UNISTD_H
7058#include <unistd.h>
7059#endif
3862412b 7060int main() {
97bf5e38 7061char *(*pfn) = (char *(*)) strstr
3862412b
MK
7062; return 0; }
7063EOF
14abd0fb 7064if { (eval echo configure:7065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7065 rm -rf conftest*
97bf5e38 7066 bfd_cv_decl_needed_strstr=no
3862412b
MK
7067else
7068 echo "configure: failed program was:" >&5
7069 cat conftest.$ac_ext >&5
7070 rm -rf conftest*
97bf5e38 7071 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7072fi
7073rm -f conftest*
7074fi
7075
97bf5e38
MK
7076echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7077if test $bfd_cv_decl_needed_strstr = yes; then
7078 cat >> confdefs.h <<\EOF
7079#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7080EOF
7081
97bf5e38 7082fi
3862412b 7083
97bf5e38 7084echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
14abd0fb 7085echo "configure:7086: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7086if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7087 echo $ac_n "(cached) $ac_c" 1>&6
7088else
7089 cat > conftest.$ac_ext <<EOF
14abd0fb 7090#line 7091 "configure"
596c9d4b
KB
7091#include "confdefs.h"
7092
97bf5e38
MK
7093#include <stdio.h>
7094#ifdef HAVE_STRING_H
7095#include <string.h>
7096#else
7097#ifdef HAVE_STRINGS_H
7098#include <strings.h>
7099#endif
7100#endif
7101#ifdef HAVE_STDLIB_H
7102#include <stdlib.h>
7103#endif
7104#ifdef HAVE_UNISTD_H
7105#include <unistd.h>
7106#endif
596c9d4b 7107int main() {
97bf5e38 7108char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7109; return 0; }
7110EOF
14abd0fb 7111if { (eval echo configure:7112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7112 rm -rf conftest*
97bf5e38 7113 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7114else
7115 echo "configure: failed program was:" >&5
7116 cat conftest.$ac_ext >&5
7117 rm -rf conftest*
97bf5e38 7118 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7119fi
7120rm -f conftest*
7121fi
7122
97bf5e38
MK
7123echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7124if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7125 cat >> confdefs.h <<\EOF
7126#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7127EOF
7128
97bf5e38 7129fi
596c9d4b 7130
97bf5e38
MK
7131
7132# The following save_state_t checkery is only necessary for HPUX
7133# versions earlier than 10.20. When those fade from memory, this
7134# could be expunged. --jsm 1999-03-22
7135
7136echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
14abd0fb 7137echo "configure:7138: checking for HPUX save_state structure" >&5
97bf5e38 7138cat > conftest.$ac_ext <<EOF
14abd0fb 7139#line 7140 "configure"
97bf5e38
MK
7140#include "confdefs.h"
7141#include <machine/save_state.h>
7142EOF
7143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7144 egrep "save_state_t" >/dev/null 2>&1; then
7145 rm -rf conftest*
7146 gdb_cv_hpux_savestate=yes
7147else
7148 rm -rf conftest*
7149 gdb_cv_hpux_savestate=no
7150fi
7151rm -f conftest*
7152
7153cat > conftest.$ac_ext <<EOF
14abd0fb 7154#line 7155 "configure"
97bf5e38
MK
7155#include "confdefs.h"
7156#include <machine/save_state.h>
7157EOF
7158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7159 egrep "ss_wide" >/dev/null 2>&1; then
7160 rm -rf conftest*
7161 gdb_cv_hpux_sswide=yes
7162else
7163 rm -rf conftest*
7164 gdb_cv_hpux_sswide=no
7165fi
7166rm -f conftest*
7167
7168if test $gdb_cv_hpux_savestate = yes
7169then
7170 cat >> confdefs.h <<\EOF
7171#define HAVE_STRUCT_SAVE_STATE_T 1
7172EOF
7173
7174fi
7175if test $gdb_cv_hpux_sswide = yes
7176then
7177 cat >> confdefs.h <<\EOF
7178#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7179EOF
7180
7181fi
7182echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7183
7184
7185# If we are configured native on GNU/Linux, work around problems with
7186# sys/procfs.h
7187# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7188
7189if test "${target}" = "${host}"; then
7190 case "${host}" in
7191 i[3456]86-*-linux*)
7192 cat >> confdefs.h <<\EOF
7193#define START_INFERIOR_TRAPS_EXPECTED 2
7194EOF
7195
7196 cat >> confdefs.h <<\EOF
7197#define sys_quotactl 1
7198EOF
7199
7200 ;;
7201 ia64-*-aix*)
7202 cat >> confdefs.h <<\EOF
7203#define NEW_PROC_API 1
7204EOF
7205
7206 ;;
7207 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7208 cat >> confdefs.h <<\EOF
7209#define NEW_PROC_API 1
7210EOF
7211
7212 ;;
7213 *-*-solaris2.[678])
7214 cat >> confdefs.h <<\EOF
7215#define NEW_PROC_API 1
7216EOF
7217
7218 ;;
7219 esac
7220fi
7221
7222if test "$ac_cv_header_sys_procfs_h" = yes; then
7223 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7224echo "configure:7225: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7225 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7226 echo $ac_n "(cached) $ac_c" 1>&6
7227else
7228 cat > conftest.$ac_ext <<EOF
14abd0fb 7229#line 7230 "configure"
596c9d4b
KB
7230#include "confdefs.h"
7231
7232#define _SYSCALL32
7233#include <sys/procfs.h>
7234int main() {
97bf5e38 7235pstatus_t avar
596c9d4b
KB
7236; return 0; }
7237EOF
14abd0fb 7238if { (eval echo configure:7239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7239 rm -rf conftest*
97bf5e38 7240 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7241else
7242 echo "configure: failed program was:" >&5
7243 cat conftest.$ac_ext >&5
7244 rm -rf conftest*
97bf5e38 7245 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7246
7247fi
7248rm -f conftest*
7249fi
7250
97bf5e38 7251 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7252 cat >> confdefs.h <<\EOF
97bf5e38 7253#define HAVE_PSTATUS_T 1
596c9d4b
KB
7254EOF
7255
7256 fi
97bf5e38 7257 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7258
97bf5e38 7259 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7260echo "configure:7261: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7261 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7262 echo $ac_n "(cached) $ac_c" 1>&6
7263else
7264 cat > conftest.$ac_ext <<EOF
14abd0fb 7265#line 7266 "configure"
596c9d4b
KB
7266#include "confdefs.h"
7267
7268#define _SYSCALL32
7269#include <sys/procfs.h>
7270int main() {
97bf5e38 7271prrun_t avar
596c9d4b
KB
7272; return 0; }
7273EOF
14abd0fb 7274if { (eval echo configure:7275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7275 rm -rf conftest*
97bf5e38 7276 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7277else
7278 echo "configure: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 rm -rf conftest*
97bf5e38 7281 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7282
7283fi
7284rm -f conftest*
7285fi
7286
97bf5e38 7287 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7288 cat >> confdefs.h <<\EOF
97bf5e38 7289#define HAVE_PRRUN_T 1
596c9d4b
KB
7290EOF
7291
7292 fi
97bf5e38 7293 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7294
97bf5e38 7295 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7296echo "configure:7297: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7297 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7298 echo $ac_n "(cached) $ac_c" 1>&6
7299else
7300 cat > conftest.$ac_ext <<EOF
14abd0fb 7301#line 7302 "configure"
596c9d4b
KB
7302#include "confdefs.h"
7303
7304#define _SYSCALL32
7305#include <sys/procfs.h>
7306int main() {
97bf5e38 7307gregset_t avar
596c9d4b
KB
7308; return 0; }
7309EOF
14abd0fb 7310if { (eval echo configure:7311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7311 rm -rf conftest*
97bf5e38 7312 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7313else
7314 echo "configure: failed program was:" >&5
7315 cat conftest.$ac_ext >&5
7316 rm -rf conftest*
97bf5e38 7317 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7318
7319fi
7320rm -f conftest*
7321fi
7322
97bf5e38 7323 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7324 cat >> confdefs.h <<\EOF
97bf5e38 7325#define HAVE_GREGSET_T 1
596c9d4b
KB
7326EOF
7327
7328 fi
97bf5e38 7329 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7330
97bf5e38 7331 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7332echo "configure:7333: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7333 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7334 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7335else
7336 cat > conftest.$ac_ext <<EOF
14abd0fb 7337#line 7338 "configure"
d84dd0c5 7338#include "confdefs.h"
97bf5e38
MK
7339
7340#define _SYSCALL32
d84dd0c5 7341#include <sys/procfs.h>
97bf5e38
MK
7342int main() {
7343fpregset_t avar
7344; return 0; }
d84dd0c5 7345EOF
14abd0fb 7346if { (eval echo configure:7347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7347 rm -rf conftest*
7348 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7349else
7350 echo "configure: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
97bf5e38
MK
7352 rm -rf conftest*
7353 bfd_cv_have_sys_procfs_type_fpregset_t=no
7354
d84dd0c5 7355fi
97bf5e38 7356rm -f conftest*
d84dd0c5
MK
7357fi
7358
97bf5e38
MK
7359 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7360 cat >> confdefs.h <<\EOF
7361#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7362EOF
7363
97bf5e38
MK
7364 fi
7365 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7366
97bf5e38 7367 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7368echo "configure:7369: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7369 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7370 echo $ac_n "(cached) $ac_c" 1>&6
7371else
7372 cat > conftest.$ac_ext <<EOF
14abd0fb 7373#line 7374 "configure"
c906108c 7374#include "confdefs.h"
c906108c 7375
97bf5e38
MK
7376#define _SYSCALL32
7377#include <sys/procfs.h>
c906108c 7378int main() {
97bf5e38 7379prgregset_t avar
c906108c
SS
7380; return 0; }
7381EOF
14abd0fb 7382if { (eval echo configure:7383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7383 rm -rf conftest*
97bf5e38 7384 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7385else
7386 echo "configure: failed program was:" >&5
7387 cat conftest.$ac_ext >&5
7388 rm -rf conftest*
97bf5e38
MK
7389 bfd_cv_have_sys_procfs_type_prgregset_t=no
7390
c906108c
SS
7391fi
7392rm -f conftest*
7393fi
7394
97bf5e38
MK
7395 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7396 cat >> confdefs.h <<\EOF
7397#define HAVE_PRGREGSET_T 1
c906108c
SS
7398EOF
7399
97bf5e38
MK
7400 fi
7401 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7402
97bf5e38 7403 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7404echo "configure:7405: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7405 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7406 echo $ac_n "(cached) $ac_c" 1>&6
7407else
7408 cat > conftest.$ac_ext <<EOF
14abd0fb 7409#line 7410 "configure"
d45fe813 7410#include "confdefs.h"
97bf5e38
MK
7411
7412#define _SYSCALL32
7413#include <sys/procfs.h>
d45fe813 7414int main() {
97bf5e38 7415prfpregset_t avar
d45fe813
KB
7416; return 0; }
7417EOF
14abd0fb 7418if { (eval echo configure:7419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7419 rm -rf conftest*
97bf5e38 7420 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7421else
7422 echo "configure: failed program was:" >&5
7423 cat conftest.$ac_ext >&5
7424 rm -rf conftest*
97bf5e38
MK
7425 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7426
d45fe813
KB
7427fi
7428rm -f conftest*
7429fi
7430
97bf5e38
MK
7431 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7432 cat >> confdefs.h <<\EOF
7433#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7434EOF
7435
97bf5e38
MK
7436 fi
7437 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7438
97bf5e38 7439 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7440echo "configure:7441: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7441 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7442 echo $ac_n "(cached) $ac_c" 1>&6
7443else
7444 cat > conftest.$ac_ext <<EOF
14abd0fb 7445#line 7446 "configure"
d45fe813 7446#include "confdefs.h"
97bf5e38
MK
7447
7448#define _SYSCALL32
7449#include <sys/procfs.h>
d45fe813 7450int main() {
97bf5e38 7451prgregset32_t avar
d45fe813
KB
7452; return 0; }
7453EOF
14abd0fb 7454if { (eval echo configure:7455: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7455 rm -rf conftest*
97bf5e38 7456 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7457else
7458 echo "configure: failed program was:" >&5
7459 cat conftest.$ac_ext >&5
7460 rm -rf conftest*
97bf5e38
MK
7461 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7462
d45fe813
KB
7463fi
7464rm -f conftest*
7465fi
7466
97bf5e38
MK
7467 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7468 cat >> confdefs.h <<\EOF
7469#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7470EOF
7471
97bf5e38
MK
7472 fi
7473 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7474
97bf5e38 7475 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7476echo "configure:7477: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7477 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7478 echo $ac_n "(cached) $ac_c" 1>&6
7479else
7480 cat > conftest.$ac_ext <<EOF
14abd0fb 7481#line 7482 "configure"
d45fe813 7482#include "confdefs.h"
97bf5e38
MK
7483
7484#define _SYSCALL32
7485#include <sys/procfs.h>
d45fe813 7486int main() {
97bf5e38 7487prfpregset32_t avar
d45fe813
KB
7488; return 0; }
7489EOF
14abd0fb 7490if { (eval echo configure:7491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7491 rm -rf conftest*
97bf5e38 7492 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7493else
7494 echo "configure: failed program was:" >&5
7495 cat conftest.$ac_ext >&5
7496 rm -rf conftest*
97bf5e38
MK
7497 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7498
d45fe813
KB
7499fi
7500rm -f conftest*
7501fi
7502
97bf5e38
MK
7503 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7504 cat >> confdefs.h <<\EOF
7505#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7506EOF
7507
97bf5e38
MK
7508 fi
7509 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7510
97bf5e38 7511 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7512echo "configure:7513: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7513 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7514 echo $ac_n "(cached) $ac_c" 1>&6
7515else
7516 cat > conftest.$ac_ext <<EOF
14abd0fb 7517#line 7518 "configure"
d45fe813 7518#include "confdefs.h"
97bf5e38 7519
d45fe813 7520#define _SYSCALL32
97bf5e38 7521#include <sys/procfs.h>
d45fe813 7522int main() {
97bf5e38 7523lwpid_t avar
d45fe813
KB
7524; return 0; }
7525EOF
14abd0fb 7526if { (eval echo configure:7527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7527 rm -rf conftest*
97bf5e38 7528 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7529else
7530 echo "configure: failed program was:" >&5
7531 cat conftest.$ac_ext >&5
7532 rm -rf conftest*
97bf5e38
MK
7533 bfd_cv_have_sys_procfs_type_lwpid_t=no
7534
d45fe813
KB
7535fi
7536rm -f conftest*
7537fi
7538
97bf5e38
MK
7539 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7540 cat >> confdefs.h <<\EOF
7541#define HAVE_LWPID_T 1
d45fe813
KB
7542EOF
7543
97bf5e38
MK
7544 fi
7545 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7546
97bf5e38 7547 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7548echo "configure:7549: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7549 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7550 echo $ac_n "(cached) $ac_c" 1>&6
7551else
7552 cat > conftest.$ac_ext <<EOF
14abd0fb 7553#line 7554 "configure"
c906108c
SS
7554#include "confdefs.h"
7555
97bf5e38
MK
7556#define _SYSCALL32
7557#include <sys/procfs.h>
c906108c 7558int main() {
97bf5e38 7559psaddr_t avar
c906108c
SS
7560; return 0; }
7561EOF
14abd0fb 7562if { (eval echo configure:7563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7563 rm -rf conftest*
97bf5e38 7564 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7565else
7566 echo "configure: failed program was:" >&5
7567 cat conftest.$ac_ext >&5
7568 rm -rf conftest*
97bf5e38
MK
7569 bfd_cv_have_sys_procfs_type_psaddr_t=no
7570
c906108c
SS
7571fi
7572rm -f conftest*
7573fi
7574
97bf5e38
MK
7575 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7576 cat >> confdefs.h <<\EOF
7577#define HAVE_PSADDR_T 1
c906108c
SS
7578EOF
7579
97bf5e38
MK
7580 fi
7581 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7582
97bf5e38 7583 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7584echo "configure:7585: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7585 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7586 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7587else
7588 cat > conftest.$ac_ext <<EOF
14abd0fb 7589#line 7590 "configure"
c906108c
SS
7590#include "confdefs.h"
7591
97bf5e38
MK
7592#define _SYSCALL32
7593#include <sys/procfs.h>
7594int main() {
7595prsysent_t avar
7596; return 0; }
c906108c 7597EOF
14abd0fb 7598if { (eval echo configure:7599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7599 rm -rf conftest*
7600 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7601else
7602 echo "configure: failed program was:" >&5
7603 cat conftest.$ac_ext >&5
97bf5e38
MK
7604 rm -rf conftest*
7605 bfd_cv_have_sys_procfs_type_prsysent_t=no
7606
c906108c 7607fi
97bf5e38 7608rm -f conftest*
c906108c
SS
7609fi
7610
97bf5e38
MK
7611 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7612 cat >> confdefs.h <<\EOF
7613#define HAVE_PRSYSENT_T 1
c906108c
SS
7614EOF
7615
97bf5e38
MK
7616 fi
7617 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7618
97bf5e38 7619 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7620echo "configure:7621: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7621 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7622 echo $ac_n "(cached) $ac_c" 1>&6
7623else
7624 cat > conftest.$ac_ext <<EOF
14abd0fb 7625#line 7626 "configure"
c906108c
SS
7626#include "confdefs.h"
7627
97bf5e38
MK
7628#define _SYSCALL32
7629#include <sys/procfs.h>
c906108c 7630int main() {
97bf5e38 7631pr_sigset_t avar
c906108c
SS
7632; return 0; }
7633EOF
14abd0fb 7634if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7635 rm -rf conftest*
97bf5e38 7636 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7637else
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 rm -rf conftest*
97bf5e38
MK
7641 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7642
c906108c
SS
7643fi
7644rm -f conftest*
7645fi
7646
97bf5e38
MK
7647 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7648 cat >> confdefs.h <<\EOF
7649#define HAVE_PR_SIGSET_T 1
c906108c
SS
7650EOF
7651
97bf5e38
MK
7652 fi
7653 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7654
97bf5e38 7655 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7656echo "configure:7657: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7657 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7658 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7659else
7660 cat > conftest.$ac_ext <<EOF
14abd0fb 7661#line 7662 "configure"
c906108c
SS
7662#include "confdefs.h"
7663
97bf5e38
MK
7664#define _SYSCALL32
7665#include <sys/procfs.h>
7666int main() {
7667pr_sigaction64_t avar
7668; return 0; }
c906108c 7669EOF
14abd0fb 7670if { (eval echo configure:7671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7671 rm -rf conftest*
7672 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7673else
7674 echo "configure: failed program was:" >&5
7675 cat conftest.$ac_ext >&5
97bf5e38
MK
7676 rm -rf conftest*
7677 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7678
c906108c 7679fi
97bf5e38 7680rm -f conftest*
c906108c
SS
7681fi
7682
97bf5e38
MK
7683 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7684 cat >> confdefs.h <<\EOF
7685#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7686EOF
7687
97bf5e38
MK
7688 fi
7689 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7690
7691 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7692echo "configure:7693: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7693 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7694 echo $ac_n "(cached) $ac_c" 1>&6
7695else
7696 cat > conftest.$ac_ext <<EOF
14abd0fb 7697#line 7698 "configure"
97bf5e38
MK
7698#include "confdefs.h"
7699
7700#define _SYSCALL32
7701#include <sys/procfs.h>
7702int main() {
7703pr_siginfo64_t avar
7704; return 0; }
7705EOF
14abd0fb 7706if { (eval echo configure:7707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7707 rm -rf conftest*
7708 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7709else
7710 echo "configure: failed program was:" >&5
7711 cat conftest.$ac_ext >&5
7712 rm -rf conftest*
7713 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7714
7715fi
7716rm -f conftest*
c906108c 7717fi
c906108c 7718
97bf5e38
MK
7719 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7720 cat >> confdefs.h <<\EOF
7721#define HAVE_PR_SIGINFO64_T 1
7722EOF
c906108c 7723
97bf5e38
MK
7724 fi
7725 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7726
7727
7728
7729
7730
7731 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7732 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
14abd0fb 7733echo "configure:7734: checking whether prfpregset_t type is broken" >&5
97bf5e38 7734 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7735 echo $ac_n "(cached) $ac_c" 1>&6
7736else
7737 if test "$cross_compiling" = yes; then
97bf5e38 7738 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7739else
7740 cat > conftest.$ac_ext <<EOF
14abd0fb 7741#line 7742 "configure"
c906108c 7742#include "confdefs.h"
97bf5e38
MK
7743#include <sys/procfs.h>
7744 int main ()
7745 {
7746 if (sizeof (prfpregset_t) == sizeof (void *))
7747 return 1;
7748 return 0;
7749 }
c906108c 7750EOF
14abd0fb 7751if { (eval echo configure:7752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7752then
97bf5e38 7753 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7754else
7755 echo "configure: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 rm -fr conftest*
97bf5e38 7758 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7759fi
7760rm -fr conftest*
7761fi
7762
7763fi
7764
97bf5e38
MK
7765 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7766 if test $gdb_cv_prfpregset_t_broken = yes; then
7767 cat >> confdefs.h <<\EOF
7768#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7769EOF
7770
97bf5e38
MK
7771 fi
7772 fi
c906108c 7773
97bf5e38
MK
7774
7775 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
14abd0fb 7776echo "configure:7777: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7777 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7778 echo $ac_n "(cached) $ac_c" 1>&6
7779else
7780 cat > conftest.$ac_ext <<EOF
14abd0fb 7781#line 7782 "configure"
c906108c 7782#include "confdefs.h"
97bf5e38
MK
7783#include <unistd.h>
7784#include <sys/types.h>
7785#include <sys/procfs.h>
7786
7787int main() {
7788
7789 int dummy;;
7790 dummy = ioctl(0, PIOCSET, &dummy);
7791
7792; return 0; }
c906108c 7793EOF
14abd0fb 7794if { (eval echo configure:7795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7795 rm -rf conftest*
97bf5e38 7796 gdb_cv_have_procfs_piocset=yes
c906108c 7797else
c906108c
SS
7798 echo "configure: failed program was:" >&5
7799 cat conftest.$ac_ext >&5
7800 rm -rf conftest*
97bf5e38 7801 gdb_cv_have_procfs_piocset=no
c906108c
SS
7802fi
7803rm -f conftest*
7804fi
97bf5e38
MK
7805
7806 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7807 if test $gdb_cv_have_procfs_piocset = yes; then
7808 cat >> confdefs.h <<\EOF
7809#define HAVE_PROCFS_PIOCSET 1
c906108c 7810EOF
97bf5e38
MK
7811
7812 fi
c906108c 7813fi
c906108c 7814
97bf5e38
MK
7815if test ${host} = ${target} ; then
7816
7817 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
14abd0fb 7818echo "configure:7819: checking for member l_addr in struct link_map" >&5
97bf5e38 7819 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7820 echo $ac_n "(cached) $ac_c" 1>&6
7821else
7822 cat > conftest.$ac_ext <<EOF
14abd0fb 7823#line 7824 "configure"
c906108c 7824#include "confdefs.h"
97bf5e38 7825#include <link.h>
c906108c 7826int main() {
97bf5e38 7827struct link_map lm; (void) lm.l_addr;
c906108c
SS
7828; return 0; }
7829EOF
14abd0fb 7830if { (eval echo configure:7831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7831 rm -rf conftest*
97bf5e38 7832 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7833else
7834 echo "configure: failed program was:" >&5
7835 cat conftest.$ac_ext >&5
7836 rm -rf conftest*
97bf5e38 7837 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7838fi
7839rm -f conftest*
7840fi
7841
97bf5e38
MK
7842 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7843 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7844 cat >> confdefs.h <<\EOF
7845#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7846EOF
97bf5e38
MK
7847
7848 fi
7849
7850
7851 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
14abd0fb 7852echo "configure:7853: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7853 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7854 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7855else
97bf5e38 7856 cat > conftest.$ac_ext <<EOF
14abd0fb 7857#line 7858 "configure"
97bf5e38
MK
7858#include "confdefs.h"
7859#include <sys/types.h>
7860#include <link.h>
7861int main() {
7862struct link_map lm; (void) lm.lm_addr;
7863; return 0; }
7864EOF
14abd0fb 7865if { (eval echo configure:7866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7866 rm -rf conftest*
7867 gdb_cv_have_struct_link_map_with_lm_members=yes
7868else
7869 echo "configure: failed program was:" >&5
7870 cat conftest.$ac_ext >&5
7871 rm -rf conftest*
7872 gdb_cv_have_struct_link_map_with_lm_members=no
7873fi
7874rm -f conftest*
c906108c 7875fi
c906108c 7876
97bf5e38
MK
7877 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7878 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7879 cat >> confdefs.h <<\EOF
7880#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7881EOF
7882
7883 fi
7884
7885
7886 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
14abd0fb 7887echo "configure:7888: checking for member som_addr in struct so_map" >&5
97bf5e38 7888 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7889 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7890else
7891 cat > conftest.$ac_ext <<EOF
14abd0fb 7892#line 7893 "configure"
c906108c 7893#include "confdefs.h"
97bf5e38
MK
7894#include <sys/types.h>
7895#ifdef HAVE_NLIST_H
7896#include <nlist.h>
7897#endif
7898#include <link.h>
7899int main() {
7900struct so_map lm; (void) lm.som_addr;
7901; return 0; }
7902EOF
14abd0fb 7903if { (eval echo configure:7904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7904 rm -rf conftest*
7905 gdb_cv_have_struct_so_map_with_som_members=yes
7906else
7907 echo "configure: failed program was:" >&5
7908 cat conftest.$ac_ext >&5
7909 rm -rf conftest*
7910 gdb_cv_have_struct_so_map_with_som_members=no
7911fi
7912rm -f conftest*
7913fi
c906108c 7914
97bf5e38
MK
7915 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7916 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7917 cat >> confdefs.h <<\EOF
7918#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7919EOF
c906108c 7920
97bf5e38 7921 fi
c906108c 7922
97bf5e38
MK
7923
7924 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
14abd0fb 7925echo "configure:7926: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7926 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7927 echo $ac_n "(cached) $ac_c" 1>&6
7928else
7929 cat > conftest.$ac_ext <<EOF
14abd0fb 7930#line 7931 "configure"
97bf5e38
MK
7931#include "confdefs.h"
7932#define _SYSCALL32
7933#include <sys/link.h>
7934int main() {
7935struct link_map32 l;
7936; return 0; }
7937EOF
14abd0fb 7938if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7939 rm -rf conftest*
7940 gdb_cv_have_struct_link_map32=yes
7941else
7942 echo "configure: failed program was:" >&5
7943 cat conftest.$ac_ext >&5
7944 rm -rf conftest*
7945 gdb_cv_have_struct_link_map32=no
7946fi
7947rm -f conftest*
7948fi
c906108c 7949
97bf5e38
MK
7950 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7951 if test $gdb_cv_have_struct_link_map32 = yes; then
7952 cat >> confdefs.h <<\EOF
7953#define HAVE_STRUCT_LINK_MAP32 1
7954EOF
c906108c 7955
97bf5e38
MK
7956 cat >> confdefs.h <<\EOF
7957#define _SYSCALL32 1
7958EOF
c906108c 7959
97bf5e38
MK
7960 fi
7961fi
c906108c 7962
c906108c 7963
97bf5e38 7964echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
14abd0fb 7965echo "configure:7966: checking for long long support in compiler" >&5
97bf5e38
MK
7966if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7967 echo $ac_n "(cached) $ac_c" 1>&6
7968else
7969 cat > conftest.$ac_ext <<EOF
14abd0fb 7970#line 7971 "configure"
97bf5e38 7971#include "confdefs.h"
c906108c 7972
97bf5e38 7973int main() {
c906108c 7974
97bf5e38
MK
7975 extern long long foo;
7976 switch (foo & 2) { case 0: return 1; }
c906108c 7977
97bf5e38
MK
7978; return 0; }
7979EOF
14abd0fb 7980if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7981 rm -rf conftest*
7982 gdb_cv_c_long_long=yes
7983else
7984 echo "configure: failed program was:" >&5
7985 cat conftest.$ac_ext >&5
7986 rm -rf conftest*
7987 gdb_cv_c_long_long=no
7988fi
7989rm -f conftest*
7990fi
c906108c 7991
97bf5e38
MK
7992echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7993if test $gdb_cv_c_long_long = yes; then
7994 cat >> confdefs.h <<\EOF
7995#define CC_HAS_LONG_LONG 1
7996EOF
7997
7998fi
7999
8000
8001echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
14abd0fb 8002echo "configure:8003: checking for long long support in printf" >&5
97bf5e38
MK
8003if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8004 echo $ac_n "(cached) $ac_c" 1>&6
8005else
8006 if test "$cross_compiling" = yes; then
8007 gdb_cv_printf_has_long_long=no
8008else
8009 cat > conftest.$ac_ext <<EOF
14abd0fb 8010#line 8011 "configure"
97bf5e38
MK
8011#include "confdefs.h"
8012
8013int main () {
8014 char buf[32];
8015 long long l = 0;
8016 l = (l << 16) + 0x0123;
8017 l = (l << 16) + 0x4567;
8018 l = (l << 16) + 0x89ab;
8019 l = (l << 16) + 0xcdef;
8020 sprintf (buf, "0x%016llx", l);
8021 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8022}
97bf5e38 8023EOF
14abd0fb 8024if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8025then
8026 gdb_cv_printf_has_long_long=yes
8027else
8028 echo "configure: failed program was:" >&5
8029 cat conftest.$ac_ext >&5
8030 rm -fr conftest*
8031 gdb_cv_printf_has_long_long=no
8032fi
8033rm -fr conftest*
8034fi
8035
8036fi
8037
8038if test $gdb_cv_printf_has_long_long = yes; then
8039 cat >> confdefs.h <<\EOF
8040#define PRINTF_HAS_LONG_LONG 1
8041EOF
8042
8043fi
8044echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8045
8046
8047echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
14abd0fb 8048echo "configure:8049: checking for long double support in compiler" >&5
97bf5e38
MK
8049if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8050 echo $ac_n "(cached) $ac_c" 1>&6
8051else
8052 cat > conftest.$ac_ext <<EOF
14abd0fb 8053#line 8054 "configure"
97bf5e38
MK
8054#include "confdefs.h"
8055
8056int main() {
8057long double foo;
8058; return 0; }
8059EOF
14abd0fb 8060if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8061 rm -rf conftest*
8062 ac_cv_c_long_double=yes
8063else
8064 echo "configure: failed program was:" >&5
8065 cat conftest.$ac_ext >&5
8066 rm -rf conftest*
8067 ac_cv_c_long_double=no
8068fi
8069rm -f conftest*
8070fi
c906108c 8071
97bf5e38
MK
8072echo "$ac_t""$ac_cv_c_long_double" 1>&6
8073if test $ac_cv_c_long_double = yes; then
8074 cat >> confdefs.h <<\EOF
8075#define HAVE_LONG_DOUBLE 1
c906108c 8076EOF
97bf5e38
MK
8077
8078fi
8079
8080
8081echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
14abd0fb 8082echo "configure:8083: checking for long double support in printf" >&5
97bf5e38
MK
8083if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8084 echo $ac_n "(cached) $ac_c" 1>&6
8085else
8086 if test "$cross_compiling" = yes; then
8087 gdb_cv_printf_has_long_double=no
8088else
8089 cat > conftest.$ac_ext <<EOF
14abd0fb 8090#line 8091 "configure"
97bf5e38
MK
8091#include "confdefs.h"
8092
8093int main () {
8094 char buf[16];
8095 long double f = 3.141592653;
8096 sprintf (buf, "%Lg", f);
8097 return (strncmp ("3.14159", buf, 7));
8098}
8099EOF
14abd0fb 8100if { (eval echo configure:8101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8101then
97bf5e38 8102 gdb_cv_printf_has_long_double=yes
c906108c
SS
8103else
8104 echo "configure: failed program was:" >&5
8105 cat conftest.$ac_ext >&5
8106 rm -fr conftest*
97bf5e38 8107 gdb_cv_printf_has_long_double=no
c906108c
SS
8108fi
8109rm -fr conftest*
8110fi
8111
8112fi
8113
97bf5e38 8114if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8115 cat >> confdefs.h <<\EOF
97bf5e38
MK
8116#define PRINTF_HAS_LONG_DOUBLE 1
8117EOF
8118
8119fi
8120echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8121
8122
8123echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
14abd0fb 8124echo "configure:8125: checking for long double support in scanf" >&5
97bf5e38
MK
8125if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8126 echo $ac_n "(cached) $ac_c" 1>&6
8127else
8128 if test "$cross_compiling" = yes; then
8129 gdb_cv_scanf_has_long_double=no
8130else
8131 cat > conftest.$ac_ext <<EOF
14abd0fb 8132#line 8133 "configure"
97bf5e38
MK
8133#include "confdefs.h"
8134
8135int main () {
8136 char *buf = "3.141592653";
8137 long double f = 0;
8138 sscanf (buf, "%Lg", &f);
8139 return !(f > 3.14159 && f < 3.14160);
8140}
c906108c 8141EOF
14abd0fb 8142if { (eval echo configure:8143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8143then
8144 gdb_cv_scanf_has_long_double=yes
8145else
8146 echo "configure: failed program was:" >&5
8147 cat conftest.$ac_ext >&5
8148 rm -fr conftest*
8149 gdb_cv_scanf_has_long_double=no
8150fi
8151rm -fr conftest*
8152fi
c906108c
SS
8153
8154fi
8155
97bf5e38
MK
8156if test $gdb_cv_scanf_has_long_double = yes; then
8157 cat >> confdefs.h <<\EOF
8158#define SCANF_HAS_LONG_DOUBLE 1
8159EOF
8160
8161fi
8162echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8163
438013df
AO
8164case ${host_os} in
8165aix*)
8166 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
14abd0fb 8167echo "configure:8168: checking for -bbigtoc option" >&5
438013df
AO
8168if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8169 echo $ac_n "(cached) $ac_c" 1>&6
8170else
8171
8172 SAVE_LDFLAGS=$LDFLAGS
8173
8174 case $GCC in
8175 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8176 *) gdb_cv_bigtoc=-bbigtoc ;;
8177 esac
8178
8179 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8180 cat > conftest.$ac_ext <<EOF
14abd0fb 8181#line 8182 "configure"
438013df
AO
8182#include "confdefs.h"
8183
8184int main() {
8185int i;
8186; return 0; }
8187EOF
14abd0fb 8188if { (eval echo configure:8189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8189 :
8190else
8191 echo "configure: failed program was:" >&5
8192 cat conftest.$ac_ext >&5
8193 rm -rf conftest*
8194 gdb_cv_bigtoc=
8195fi
8196rm -f conftest*
8197
8198fi
8199
8200echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8201 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8202 ;;
8203esac
8204
c906108c
SS
8205
8206
8207if test ${build} = ${host} -a ${host} = ${target} ; then
8208 case ${host_os} in
8209 hpux*)
8210 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
14abd0fb 8211echo "configure:8212: checking for HPUX/OSF thread support" >&5
c906108c
SS
8212 if test -f /usr/include/dce/cma_config.h ; then
8213 if test "$GCC" = "yes" ; then
8214 echo "$ac_t""yes" 1>&6
8215 cat >> confdefs.h <<\EOF
8216#define HAVE_HPUX_THREAD_SUPPORT 1
8217EOF
8218
66b965bb 8219 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8220 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8221 else
8222 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8223 fi
8224 else
8225 echo "$ac_t""no" 1>&6
8226 fi
8227 ;;
8228 solaris*)
d92419e5
JB
8229 # See if thread_db library is around for Solaris thread debugging.
8230 # Note that we must explicitly test for version 1 of the library
8231 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8232 # the same API.
c906108c 8233 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
14abd0fb 8234echo "configure:8235: checking for Solaris thread debugging library" >&5
c906108c
SS
8235 if test -f /usr/lib/libthread_db.so.1 ; then
8236 echo "$ac_t""yes" 1>&6
8237 cat >> confdefs.h <<\EOF
8238#define HAVE_THREAD_DB_LIB 1
8239EOF
8240
66b965bb 8241 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8242 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8243 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14abd0fb 8244echo "configure:8245: checking for dlopen in -ldl" >&5
c906108c
SS
8245ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8246if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8247 echo $ac_n "(cached) $ac_c" 1>&6
8248else
8249 ac_save_LIBS="$LIBS"
8250LIBS="-ldl $LIBS"
8251cat > conftest.$ac_ext <<EOF
14abd0fb 8252#line 8253 "configure"
c906108c
SS
8253#include "confdefs.h"
8254/* Override any gcc2 internal prototype to avoid an error. */
8255/* We use char because int might match the return type of a gcc2
8256 builtin and then its argument prototype would still apply. */
8257char dlopen();
8258
8259int main() {
8260dlopen()
8261; return 0; }
8262EOF
14abd0fb 8263if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8264 rm -rf conftest*
8265 eval "ac_cv_lib_$ac_lib_var=yes"
8266else
8267 echo "configure: failed program was:" >&5
8268 cat conftest.$ac_ext >&5
8269 rm -rf conftest*
8270 eval "ac_cv_lib_$ac_lib_var=no"
8271fi
8272rm -f conftest*
8273LIBS="$ac_save_LIBS"
8274
8275fi
8276if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8277 echo "$ac_t""yes" 1>&6
8278 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8279 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8280 cat >> confdefs.h <<EOF
8281#define $ac_tr_lib 1
8282EOF
8283
8284 LIBS="-ldl $LIBS"
8285
8286else
8287 echo "$ac_t""no" 1>&6
8288fi
8289
8290 if test "$GCC" = "yes" ; then
8291 # The GNU linker requires the -export-dynamic option to make
8292 # all symbols visible in the dynamic symbol table.
8293 hold_ldflags=$LDFLAGS
8294 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
14abd0fb 8295echo "configure:8296: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8296 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8297 cat > conftest.$ac_ext <<EOF
14abd0fb 8298#line 8299 "configure"
c906108c
SS
8299#include "confdefs.h"
8300
8301int main() {
8302int i;
8303; return 0; }
8304EOF
14abd0fb 8305if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8306 rm -rf conftest*
8307 found=yes
8308else
8309 echo "configure: failed program was:" >&5
8310 cat conftest.$ac_ext >&5
8311 rm -rf conftest*
8312 found=no
8313fi
8314rm -f conftest*
8315 LDFLAGS=$hold_ldflags
8316 echo "$ac_t""$found" 1>&6
8317 if test $found = yes; then
8318 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8319 fi
8320 fi
8321 # Sun randomly tweaked the prototypes in <proc_service.h>
8322 # at one point.
8323 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
14abd0fb 8324echo "configure:8325: checking if <proc_service.h> is old" >&5
c906108c
SS
8325 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8326 echo $ac_n "(cached) $ac_c" 1>&6
8327else
8328
8329 cat > conftest.$ac_ext <<EOF
14abd0fb 8330#line 8331 "configure"
c906108c
SS
8331#include "confdefs.h"
8332
8333 #include <proc_service.h>
8334 ps_err_e ps_pdwrite
8335 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8336
8337int main() {
8338
8339; return 0; }
8340EOF
14abd0fb 8341if { (eval echo configure:8342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8342 rm -rf conftest*
8343 gdb_cv_proc_service_is_old=no
8344else
8345 echo "configure: failed program was:" >&5
8346 cat conftest.$ac_ext >&5
8347 rm -rf conftest*
8348 gdb_cv_proc_service_is_old=yes
8349fi
8350rm -f conftest*
8351
8352fi
8353
8354 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8355 if test $gdb_cv_proc_service_is_old = yes; then
8356 cat >> confdefs.h <<\EOF
8357#define PROC_SERVICE_IS_OLD 1
8358EOF
8359
8360 fi
8361 else
8362 echo "$ac_t""no" 1>&6
8363 fi
8364 ;;
d92419e5
JB
8365 aix*)
8366 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
14abd0fb 8367echo "configure:8368: checking for AiX thread debugging library" >&5
d92419e5
JB
8368 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8369 echo $ac_n "(cached) $ac_c" 1>&6
8370else
8371 cat > conftest.$ac_ext <<EOF
14abd0fb 8372#line 8373 "configure"
d92419e5
JB
8373#include "confdefs.h"
8374#include <sys/pthdebug.h>
8375int main() {
8376#ifndef PTHDB_VERSION_3
8377 #error
8378 #endif
8379; return 0; }
8380EOF
14abd0fb 8381if { (eval echo configure:8382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8382 rm -rf conftest*
8383 gdb_cv_have_aix_thread_debug=yes
8384else
8385 echo "configure: failed program was:" >&5
8386 cat conftest.$ac_ext >&5
8387 rm -rf conftest*
8388 gdb_cv_have_aix_thread_debug=no
8389fi
8390rm -f conftest*
8391fi
8392
8393 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8394 if test $gdb_cv_have_aix_thread_debug = yes; then
8395 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8396 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8397 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8398 fi
8399 ;;
c906108c
SS
8400 esac
8401
8402fi
8403
3f47be5c
EZ
8404if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8405 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
14abd0fb 8406echo "configure:8407: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8407if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8408 echo $ac_n "(cached) $ac_c" 1>&6
8409else
8410 cat > conftest.$ac_ext <<EOF
14abd0fb 8411#line 8412 "configure"
3f47be5c
EZ
8412#include "confdefs.h"
8413#include <thread_db.h>
8414int main() {
8415int i = TD_NOTALLOC;
8416; return 0; }
8417EOF
14abd0fb 8418if { (eval echo configure:8419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8419 rm -rf conftest*
8420 gdb_cv_thread_db_h_has_td_notalloc=yes
8421else
8422 echo "configure: failed program was:" >&5
8423 cat conftest.$ac_ext >&5
8424 rm -rf conftest*
8425 gdb_cv_thread_db_h_has_td_notalloc=no
8426
8427fi
8428rm -f conftest*
8429
8430fi
8431
8432echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8433fi
8434if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8435 cat >> confdefs.h <<\EOF
8436#define THREAD_DB_HAS_TD_NOTALLOC 1
8437EOF
8438
8439fi
8440
fb40c209 8441
3b851bce
AC
8442# NOTE: Don't add -Wall or -Wunused, they both include
8443# -Wunused-parameter which reports bogus warnings.
8444# NOTE: If you add to this list, remember to update
8445# gdb/doc/gdbint.texinfo.
1decb323 8446build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8447-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8448# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8449# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8450# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8451# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8452# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8453# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8454# Check whether --enable-build-warnings or --disable-build-warnings was given.
8455if test "${enable_build_warnings+set}" = set; then
8456 enableval="$enable_build_warnings"
1decb323 8457 case "${enableval}" in
c906108c
SS
8458 yes) ;;
8459 no) build_warnings="-w";;
8460 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8461 build_warnings="${build_warnings} ${t}";;
8462 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8463 build_warnings="${t} ${build_warnings}";;
8464 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8465esac
d4f3574e 8466if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8467 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8468fi
1decb323 8469fi
3b851bce
AC
8470# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8471if test "${enable_gdb_build_warnings+set}" = set; then
8472 enableval="$enable_gdb_build_warnings"
8473 case "${enableval}" in
8474 yes) ;;
8475 no) build_warnings="-w";;
8476 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8477 build_warnings="${build_warnings} ${t}";;
8478 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8479 build_warnings="${t} ${build_warnings}";;
8480 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8481esac
8482if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8483 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8484fi
8485fi
104c1213
JM
8486WARN_CFLAGS=""
8487WERROR_CFLAGS=""
c906108c
SS
8488if test "x${build_warnings}" != x -a "x$GCC" = xyes
8489then
746a987d 8490 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
14abd0fb 8491echo "configure:8492: checking compiler warning flags" >&5
746a987d
AC
8492 # Separate out the -Werror flag as some files just cannot be
8493 # compiled with it enabled.
8494 for w in ${build_warnings}; do
8495 case $w in
8496 -Werr*) WERROR_CFLAGS=-Werror ;;
8497 *) # Check that GCC accepts it
4536bbc6
AC
8498 saved_CFLAGS="$CFLAGS"
8499 CFLAGS="$CFLAGS $w"
8500 cat > conftest.$ac_ext <<EOF
14abd0fb 8501#line 8502 "configure"
4536bbc6
AC
8502#include "confdefs.h"
8503
8504int main() {
8505
8506; return 0; }
8507EOF
14abd0fb 8508if { (eval echo configure:8509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8509 rm -rf conftest*
8510 WARN_CFLAGS="${WARN_CFLAGS} $w"
8511else
8512 echo "configure: failed program was:" >&5
8513 cat conftest.$ac_ext >&5
8514fi
8515rm -f conftest*
8516 CFLAGS="$saved_CFLAGS"
746a987d
AC
8517 esac
8518 done
8519 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8520fi
8521
8522
104c1213 8523
c906108c
SS
8524MMALLOC_CFLAGS=
8525MMALLOC=
8526
8527
8528
8529# Check whether --with-mmalloc or --without-mmalloc was given.
8530if test "${with_mmalloc+set}" = set; then
8531 withval="$with_mmalloc"
8532 case "${withval}" in
8533 yes) want_mmalloc=true ;;
8534 no) want_mmalloc=false;;
8535 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8536esac
8537else
8538 want_mmalloc=false
8539fi
8540
8541if test x$want_mmalloc = xtrue; then
8542 cat >> confdefs.h <<\EOF
8543#define USE_MMALLOC 1
8544EOF
8545
8546 cat >> confdefs.h <<\EOF
8547#define MMCHECK_FORCE 1
8548EOF
8549
8550 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8551 MMALLOC='../mmalloc/libmmalloc.a'
8552fi
8553
7a292a7a
SS
8554# In the Cygwin environment, we need some additional flags.
8555echo $ac_n "checking for cygwin""... $ac_c" 1>&6
14abd0fb 8556echo "configure:8557: checking for cygwin" >&5
7a292a7a
SS
8557if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8558 echo $ac_n "(cached) $ac_c" 1>&6
8559else
8560 cat > conftest.$ac_ext <<EOF
14abd0fb 8561#line 8562 "configure"
7a292a7a
SS
8562#include "confdefs.h"
8563
8564#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8565lose
8566#endif
8567EOF
8568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8569 egrep "lose" >/dev/null 2>&1; then
8570 rm -rf conftest*
8571 gdb_cv_os_cygwin=yes
8572else
8573 rm -rf conftest*
8574 gdb_cv_os_cygwin=no
8575fi
8576rm -f conftest*
8577
8578fi
8579
8580echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8581
aff38e61
AC
8582
8583SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8584case ${host} in
95cbc983
AC
8585 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8586 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8587esac
8588
8589
cd0fc7c3
SS
8590# libreadline needs libuser32.a in a cygwin environment
8591WIN32LIBS=
8592if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8593 WIN32LIBS="-luser32"
8594 case "${target}" in
8595 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8596 ;;
8597 esac
cd0fc7c3 8598fi
c906108c 8599
7a292a7a 8600
3fc11d3e
JM
8601LIBGUI="../libgui/src/libgui.a"
8602GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8603
8604
7a292a7a 8605
3fc11d3e
JM
8606# Check whether --enable-gdbtk or --disable-gdbtk was given.
8607if test "${enable_gdbtk+set}" = set; then
8608 enableval="$enable_gdbtk"
8609 case "${enableval}" in
8610 yes)
8611 case "$host" in
8612 *go32*)
8613 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8614 enable_gdbtk=no ;;
8615 *windows*)
8616 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8617 enable_gdbtk=no ;;
8618 *)
8619 enable_gdbtk=yes ;;
8620 esac ;;
8621 no)
8622 enable_gdbtk=no ;;
8623 *)
8624 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8625esac
8626else
8627
8628# Default is on for everything but go32 and Cygwin
8629case "$host" in
8630 *go32* | *windows*)
8631 ;;
8632 *)
379d6434
AC
8633 if test -d "${srcdir}/gdbtk" ; then
8634 enable_gdbtk=yes
8635 fi
8636 ;;
8637esac
3fc11d3e
JM
8638
8639fi
8640
8641
8642WIN32LDAPP=
8643
8644
8645
8646configdir="unix"
8647
8648GDBTKLIBS=
8649if test "${enable_gdbtk}" = "yes"; then
8650
d1c3b63a
KS
8651 # Gdbtk must have an absolute path to srcdir in order to run
8652 # properly when not installed.
8653 here=`pwd`
8654 cd ${srcdir}
8655 GDBTK_SRC_DIR=`pwd`
8656 cd $here
8657
3fc11d3e
JM
8658
8659#
8660# Ok, lets find the tcl configuration
8661# First, look for one uninstalled.
8662# the alternative search directory is invoked by --with-tclconfig
8663#
8664
8665if test x"${no_tcl}" = x ; then
8666 # we reset no_tcl in case something fails here
8667 no_tcl=true
8668 # Check whether --with-tclconfig or --without-tclconfig was given.
8669if test "${with_tclconfig+set}" = set; then
8670 withval="$with_tclconfig"
8671 with_tclconfig=${withval}
8672fi
8673
8674 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
14abd0fb 8675echo "configure:8676: checking for Tcl configuration" >&5
3fc11d3e
JM
8676 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8677 echo $ac_n "(cached) $ac_c" 1>&6
8678else
8679
8680
8681 # First check to see if --with-tclconfig was specified.
8682 if test x"${with_tclconfig}" != x ; then
8683 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8684 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8685 else
8686 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8687 fi
8688 fi
8689
8690 # then check for a private Tcl installation
8691 if test x"${ac_cv_c_tclconfig}" = x ; then
8692 for i in \
8693 ../tcl \
8694 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8695 ../../tcl \
8696 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8697 ../../../tcl \
8698 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8699 if test -f "$i/${configdir}/tclConfig.sh" ; then
8700 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8701 break
8702 fi
8703 done
8704 fi
8705 # check in a few common install locations
8706 if test x"${ac_cv_c_tclconfig}" = x ; then
8707 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8708 if test -f "$i/tclConfig.sh" ; then
8709 ac_cv_c_tclconfig=`(cd $i; pwd)`
8710 break
8711 fi
8712 done
8713 fi
8714 # check in a few other private locations
8715 if test x"${ac_cv_c_tclconfig}" = x ; then
8716 for i in \
8717 ${srcdir}/../tcl \
8718 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8719 if test -f "$i/${configdir}/tclConfig.sh" ; then
8720 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8721 break
8722 fi
8723 done
8724 fi
8725
8726fi
8727
8728 if test x"${ac_cv_c_tclconfig}" = x ; then
8729 TCLCONFIG="# no Tcl configs found"
8730 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8731 else
8732 no_tcl=
8733 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8734 echo "$ac_t""found $TCLCONFIG" 1>&6
8735 fi
8736fi
8737
8738 if test -z "${no_tcl}"; then
8739
8740 . $TCLCONFIG
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767#
8768# Ok, lets find the tk configuration
8769# First, look for one uninstalled.
8770# the alternative search directory is invoked by --with-tkconfig
8771#
8772
8773if test x"${no_tk}" = x ; then
8774 # we reset no_tk in case something fails here
8775 no_tk=true
8776 # Check whether --with-tkconfig or --without-tkconfig was given.
8777if test "${with_tkconfig+set}" = set; then
8778 withval="$with_tkconfig"
8779 with_tkconfig=${withval}
8780fi
8781
8782 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
14abd0fb 8783echo "configure:8784: checking for Tk configuration" >&5
3fc11d3e
JM
8784 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8785 echo $ac_n "(cached) $ac_c" 1>&6
8786else
8787
8788
8789 # First check to see if --with-tkconfig was specified.
8790 if test x"${with_tkconfig}" != x ; then
8791 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8792 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8793 else
8794 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8795 fi
8796 fi
8797
8798 # then check for a private Tk library
8799 if test x"${ac_cv_c_tkconfig}" = x ; then
8800 for i in \
8801 ../tk \
8802 `ls -dr ../tk[4-9]* 2>/dev/null` \
8803 ../../tk \
8804 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8805 ../../../tk \
8806 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8807 if test -f "$i/${configdir}/tkConfig.sh" ; then
8808 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8809 break
8810 fi
8811 done
8812 fi
8813 # check in a few common install locations
8814 if test x"${ac_cv_c_tkconfig}" = x ; then
8815 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8816 if test -f "$i/tkConfig.sh" ; then
8817 ac_cv_c_tkconfig=`(cd $i; pwd)`
8818 break
8819 fi
8820 done
8821 fi
8822 # check in a few other private locations
8823 if test x"${ac_cv_c_tkconfig}" = x ; then
8824 for i in \
8825 ${srcdir}/../tk \
8826 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8827 if test -f "$i/${configdir}/tkConfig.sh" ; then
8828 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8829 break
8830 fi
8831 done
8832 fi
8833
8834fi
8835
8836 if test x"${ac_cv_c_tkconfig}" = x ; then
8837 TKCONFIG="# no Tk configs found"
8838 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8839 else
8840 no_tk=
8841 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8842 echo "$ac_t""found $TKCONFIG" 1>&6
8843 fi
8844fi
8845
8846
8847
dd2504ab
JM
8848 # now look for Tcl library stuff
8849
8850 case "${host}" in
8851 *-*-cygwin*)
8852 tcldir=../tcl/win/
8853 ;;
8854 *)
8855 tcldir=../tcl/unix/
8856 ;;
8857 esac
8858
8859 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8860
3fc11d3e
JM
8861 # If $no_tk is nonempty, then we can't do Tk, and there is no
8862 # point to doing Tcl.
8863 if test -z "${no_tk}"; then
8864
8865 if test -f "$TKCONFIG" ; then
8866 . $TKCONFIG
8867 fi
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882#
8883# Ok, lets find the tcl source trees so we can use the headers
8884# Warning: transition of version 9 to 10 will break this algorithm
8885# because 10 sorts before 9. We also look for just tcl. We have to
8886# be careful that we don't match stuff like tclX by accident.
8887# the alternative search directory is involked by --with-tclinclude
8888#
8889
8890no_tcl=true
8891echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
14abd0fb 8892echo "configure:8893: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8893# Check whether --with-tclinclude or --without-tclinclude was given.
8894if test "${with_tclinclude+set}" = set; then
8895 withval="$with_tclinclude"
8896 with_tclinclude=${withval}
8897fi
8898
8899if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8900 echo $ac_n "(cached) $ac_c" 1>&6
8901else
8902
8903# first check to see if --with-tclinclude was specified
8904if test x"${with_tclinclude}" != x ; then
8905 if test -f ${with_tclinclude}/tclInt.h ; then
8906 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8907 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8908 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8909 else
8910 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8911 fi
8912fi
8913
8914# next check if it came with Tcl configuration file
8915if test x"${ac_cv_c_tclconfig}" = x ; then
8916 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8917 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8918 fi
8919fi
8920
8921# next check in private source directory
8922#
8923# since ls returns lowest version numbers first, reverse its output
8924if test x"${ac_cv_c_tclh}" = x ; then
8925 for i in \
8926 ${srcdir}/../tcl \
8927 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8928 ${srcdir}/../../tcl \
8929 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8930 ${srcdir}/../../../tcl \
8931 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8932 if test -f $i/generic/tclInt.h ; then
8933 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8934 break
8935 fi
8936 done
8937fi
8938# finally check in a few common install locations
8939#
8940# since ls returns lowest version numbers first, reverse its output
8941if test x"${ac_cv_c_tclh}" = x ; then
8942 for i in \
8943 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8944 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8945 /usr/local/src/tcl \
8946 /usr/local/lib/tcl \
8947 ${prefix}/include ; do
8948 if test -f $i/generic/tclInt.h ; then
8949 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8950 break
8951 fi
8952 done
8953fi
8954# see if one is installed
8955if test x"${ac_cv_c_tclh}" = x ; then
8956 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
8957echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
14abd0fb 8958echo "configure:8959: checking for tclInt.h" >&5
3fc11d3e
JM
8959if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8960 echo $ac_n "(cached) $ac_c" 1>&6
8961else
8962 cat > conftest.$ac_ext <<EOF
14abd0fb 8963#line 8964 "configure"
3fc11d3e
JM
8964#include "confdefs.h"
8965#include <tclInt.h>
8966EOF
8967ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 8968{ (eval echo configure:8969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
8969ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8970if test -z "$ac_err"; then
8971 rm -rf conftest*
8972 eval "ac_cv_header_$ac_safe=yes"
8973else
8974 echo "$ac_err" >&5
8975 echo "configure: failed program was:" >&5
8976 cat conftest.$ac_ext >&5
8977 rm -rf conftest*
8978 eval "ac_cv_header_$ac_safe=no"
8979fi
8980rm -f conftest*
8981fi
8982if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8983 echo "$ac_t""yes" 1>&6
8984 ac_cv_c_tclh=installed
8985else
8986 echo "$ac_t""no" 1>&6
8987ac_cv_c_tclh=""
8988fi
8989
8990fi
8991
8992fi
8993
8994if test x"${ac_cv_c_tclh}" = x ; then
8995 TCLHDIR="# no Tcl private headers found"
8996 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
8997fi
8998if test x"${ac_cv_c_tclh}" != x ; then
8999 no_tcl=""
9000 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9001 echo "$ac_t""is installed" 1>&6
9002 TCLHDIR=""
9003 else
9004 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9005 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9006 TCLHDIR="-I${ac_cv_c_tclh}"
9007 fi
9008fi
9009
9010
9011
9012
9013#
9014# Ok, lets find the tk source trees so we can use the headers
9015# If the directory (presumably symlink) named "tk" exists, use that one
9016# in preference to any others. Same logic is used when choosing library
9017# and again with Tcl. The search order is the best place to look first, then in
9018# decreasing significance. The loop breaks if the trigger file is found.
9019# Note the gross little conversion here of srcdir by cd'ing to the found
9020# directory. This converts the path from a relative to an absolute, so
9021# recursive cache variables for the path will work right. We check all
9022# the possible paths in one loop rather than many seperate loops to speed
9023# things up.
9024# the alternative search directory is involked by --with-tkinclude
9025#
9026no_tk=true
9027echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
14abd0fb 9028echo "configure:9029: checking for Tk private headers" >&5
3fc11d3e
JM
9029# Check whether --with-tkinclude or --without-tkinclude was given.
9030if test "${with_tkinclude+set}" = set; then
9031 withval="$with_tkinclude"
9032 with_tkinclude=${withval}
9033fi
9034
9035if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9036 echo $ac_n "(cached) $ac_c" 1>&6
9037else
9038
9039# first check to see if --with-tkinclude was specified
9040if test x"${with_tkinclude}" != x ; then
9041 if test -f ${with_tkinclude}/tk.h ; then
9042 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9043 elif test -f ${with_tkinclude}/generic/tk.h ; then
9044 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9045 else
9046 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9047 fi
9048fi
9049
9050# next check if it came with Tk configuration file
9051if test x"${ac_cv_c_tkconfig}" = x ; then
9052 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9053 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9054 fi
9055fi
9056
9057# next check in private source directory
9058#
9059# since ls returns lowest version numbers first, reverse its output
9060if test x"${ac_cv_c_tkh}" = x ; then
9061 for i in \
9062 ${srcdir}/../tk \
9063 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9064 ${srcdir}/../../tk \
9065 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9066 ${srcdir}/../../../tk \
9067 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9068 if test -f $i/generic/tk.h ; then
9069 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9070 break
9071 fi
9072 done
9073fi
9074# finally check in a few common install locations
9075#
9076# since ls returns lowest version numbers first, reverse its output
9077if test x"${ac_cv_c_tkh}" = x ; then
9078 for i in \
9079 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9080 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9081 /usr/local/src/tk \
9082 /usr/local/lib/tk \
9083 ${prefix}/include ; do
9084 if test -f $i/generic/tk.h ; then
9085 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9086 break
9087 fi
9088 done
9089fi
9090# see if one is installed
9091if test x"${ac_cv_c_tkh}" = x ; then
9092 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9093echo $ac_n "checking for tk.h""... $ac_c" 1>&6
14abd0fb 9094echo "configure:9095: checking for tk.h" >&5
3fc11d3e
JM
9095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9096 echo $ac_n "(cached) $ac_c" 1>&6
9097else
9098 cat > conftest.$ac_ext <<EOF
14abd0fb 9099#line 9100 "configure"
3fc11d3e
JM
9100#include "confdefs.h"
9101#include <tk.h>
9102EOF
9103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 9104{ (eval echo configure:9105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9106if test -z "$ac_err"; then
9107 rm -rf conftest*
9108 eval "ac_cv_header_$ac_safe=yes"
9109else
9110 echo "$ac_err" >&5
9111 echo "configure: failed program was:" >&5
9112 cat conftest.$ac_ext >&5
9113 rm -rf conftest*
9114 eval "ac_cv_header_$ac_safe=no"
9115fi
9116rm -f conftest*
9117fi
9118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9119 echo "$ac_t""yes" 1>&6
9120 ac_cv_c_tkh=installed
9121else
9122 echo "$ac_t""no" 1>&6
9123ac_cv_c_tkh=""
9124fi
9125
9126fi
9127
9128fi
9129
9130if test x"${ac_cv_c_tkh}" != x ; then
9131 no_tk=""
9132 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9133 echo "$ac_t""is installed" 1>&6
9134 TKHDIR=""
9135 else
9136 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9137 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9138 TKHDIR="-I${ac_cv_c_tkh}"
9139 fi
9140else
9141 TKHDIR="# no Tk directory found"
9142 echo "configure: warning: Can't find Tk private headers" 1>&2
9143 no_tk=true
9144fi
9145
9146
9147
9148
9149echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
14abd0fb 9150echo "configure:9151: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9151if test x"${ac_cv_c_itclh}" = x ; then
9152 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9153 if test -f $i/generic/itcl.h ; then
9154 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9155 break
9156 fi
9157 done
9158fi
9159if test x"${ac_cv_c_itclh}" = x ; then
9160 ITCLHDIR="# no Itcl private headers found"
9161 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9162fi
9163if test x"${ac_cv_c_itclh}" != x ; then
9164 ITCLHDIR="-I${ac_cv_c_itclh}"
9165fi
9166# should always be here
9167# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9168
9169#AC_SUBST(ITCLLIB)
9170
9171
9172echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
14abd0fb 9173echo "configure:9174: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9174if test x"${ac_cv_c_itkh}" = x ; then
9175 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9176 if test -f $i/generic/itk.h ; then
9177 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9178 break
9179 fi
9180 done
9181fi
9182if test x"${ac_cv_c_itkh}" = x ; then
9183 ITKHDIR="# no Itk private headers found"
9184 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9185fi
9186if test x"${ac_cv_c_itkh}" != x ; then
9187 ITKHDIR="-I${ac_cv_c_itkh}"
9188fi
9189# should always be here
9190# ITKLIB="../itcl/itk/unix/libitk.a"
9191
9192#AC_SUBST(ITKLIB)
9193
3fc11d3e 9194
dd2504ab
JM
9195
9196 # now look for Tk library stuff
9197
9198 case "${host}" in
9199 *-*-cygwin*)
9200 tkdir=../tk/win/
9201 ;;
9202 *)
9203 tkdir=../tk/unix/
9204 ;;
9205 esac
9206
9207 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9208
3fc11d3e
JM
9209 # now look for Itcl library stuff
9210
9211
9212#
9213# Ok, lets find the itcl configuration
9214# First, look for one uninstalled.
9215# the alternative search directory is invoked by --with-itclconfig
9216#
9217
9218if test x"${no_itcl}" = x ; then
9219 # we reset no_itcl in case something fails here
9220 no_itcl=true
9221 # Check whether --with-itclconfig or --without-itclconfig was given.
9222if test "${with_itclconfig+set}" = set; then
9223 withval="$with_itclconfig"
9224 with_itclconfig=${withval}
9225fi
9226
9227 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
14abd0fb 9228echo "configure:9229: checking for Itcl configuration" >&5
3fc11d3e
JM
9229 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9230 echo $ac_n "(cached) $ac_c" 1>&6
9231else
9232
9233
9234 # First check to see if --with-itclconfig was specified.
9235 if test x"${with_itclconfig}" != x ; then
9236 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9237 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9238 else
9239 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9240 fi
9241 fi
9242
9243 # then check for a private Itcl library
9244 if test x"${ac_cv_c_itclconfig}" = x ; then
9245 for i in \
9246 ../itcl/itcl \
9247 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9248 ../../itcl \
9249 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9250 ../../../itcl \
9251 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9252 if test -f "$i/itclConfig.sh" ; then
9253 ac_cv_c_itclconfig=`(cd $i; pwd)`
9254 break
9255 fi
9256 done
9257 fi
9258 # check in a few common install locations
9259 if test x"${ac_cv_c_itclconfig}" = x ; then
9260 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9261 if test -f "$i/itclConfig.sh" ; then
9262 ac_cv_c_itclconfig=`(cd $i; pwd)`
9263 break
9264 fi
9265 done
9266 fi
9267 # check in a few other private locations
9268 if test x"${ac_cv_c_itclconfig}" = x ; then
9269 for i in \
9270 ${srcdir}/../itcl/itcl \
9271 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9272 if test -f "$i/itclConfig.sh" ; then
9273 ac_cv_c_itclconfig=`(cd $i; pwd)`
9274 break
9275 fi
9276 done
9277 fi
9278
9279fi
9280
9281 if test x"${ac_cv_c_itclconfig}" = x ; then
9282 ITCLCONFIG="# no Itcl configs found"
9283 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9284 else
9285 no_itcl=
9286 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9287 echo "$ac_t""found $ITCLCONFIG" 1>&6
9288 fi
9289fi
9290
9291 if test -z "${no_itcl}"; then
9292
9293 if test -f "$ITCLCONFIG" ; then
9294 . $ITCLCONFIG
9295 fi
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
3fc11d3e
JM
9306
9307
9308 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9309 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9310 fi
9311
9312
9313 # now look for Itk library stuff
9314
9315#
9316# Ok, lets find the itk configuration
9317# First, look for one uninstalled.
9318# the alternative search directory is invoked by --with-itkconfig
9319#
9320
9321if test x"${no_itk}" = x ; then
9322 # we reset no_itk in case something fails here
9323 no_itk=true
9324 # Check whether --with-itkconfig or --without-itkconfig was given.
9325if test "${with_itkconfig+set}" = set; then
9326 withval="$with_itkconfig"
9327 with_itkconfig=${withval}
9328fi
9329
9330 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
14abd0fb 9331echo "configure:9332: checking for Itk configuration" >&5
3fc11d3e
JM
9332 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9333 echo $ac_n "(cached) $ac_c" 1>&6
9334else
9335
9336
9337 # First check to see if --with-itkconfig was specified.
9338 if test x"${with_itkconfig}" != x ; then
9339 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9340 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9341 else
9342 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9343 fi
9344 fi
9345
9346 # then check for a private Itk library
9347 if test x"${ac_cv_c_itkconfig}" = x ; then
9348 for i in \
9349 ../itcl/itk \
9350 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9351 ../../itk \
9352 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9353 ../../../itk \
9354 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9355 if test -f "$i/itkConfig.sh" ; then
9356 ac_cv_c_itkconfig=`(cd $i; pwd)`
9357 break
9358 fi
9359 done
9360 fi
9361 # check in a few common install locations
9362 if test x"${ac_cv_c_itkconfig}" = x ; then
9363 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9364 if test -f "$i/itkConfig.sh" ; then
9365 ac_cv_c_itkconfig=`(cd $i; pwd)`
9366 break
9367 fi
9368 done
9369 fi
9370 # check in a few other private locations
9371 if test x"${ac_cv_c_itkconfig}" = x ; then
9372 for i in \
9373 ${srcdir}/../itcl/itk \
9374 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9375 if test -f "$i/itkConfig.sh" ; then
9376 ac_cv_c_itkconfig=`(cd $i; pwd)`
9377 break
9378 fi
9379 done
9380 fi
9381
9382fi
9383
9384 if test x"${ac_cv_c_itkconfig}" = x ; then
9385 ITKCONFIG="# no Itk configs found"
9386 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9387 else
9388 no_itk=
9389 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9390 echo "$ac_t""found $ITKCONFIG" 1>&6
9391 fi
9392fi
9393
9394
9395 if test -z "${no_itcl}"; then
9396
9397 if test -f "$ITKCONFIG" ; then
9398 . $ITKCONFIG
9399 fi
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
3fc11d3e 9412 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9413 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9414 fi
9415
4226a5a5 9416 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9417 # Tcl/Tk 8.1 require -fwritable strings. I don't
9418 # know whether 8.2 will or not, but I bet it will.
9419 # I don't have to worry about 7.x since we don't support it.
9420 GDBTK_CFLAGS=""
9421 if test "$GCC" = "yes"; then
9422 if test "$TCL_VERSION" != "8.0" ; then
9423 GDBTK_CFLAGS="-fwritable-strings"
9424 fi
9425 fi
9426
9427 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9428 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9429 # Yes, the ordering seems wrong here. But it isn't.
9430 # TK_LIBS is the list of libraries that need to be linked
9431 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9432 # were in LIBS then any link tests after this point would
9433 # try to include things like `$(LIBGUI)', which wouldn't work.
9434 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9435
9436 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9437 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9438 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9439 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9440 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9441 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9442 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9443 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9444
9445 if test x$gdb_cv_os_cygwin = xyes; then
9446 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9447 WIN32LDAPP="-Wl,--subsystem,console"
9448 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9449 fi
9450 fi
9451 fi
ffc6a242 9452
ffc6a242 9453 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9454fi
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
dd2504ab 9468
c906108c
SS
9469# If we find X, set shell vars x_includes and x_libraries to the
9470# paths, otherwise set no_x=yes.
9471# Uses ac_ vars as temps to allow command line to override cache and checks.
9472# --without-x overrides everything else, but does not touch the cache.
9473echo $ac_n "checking for X""... $ac_c" 1>&6
14abd0fb 9474echo "configure:9475: checking for X" >&5
c906108c
SS
9475
9476# Check whether --with-x or --without-x was given.
9477if test "${with_x+set}" = set; then
9478 withval="$with_x"
9479 :
9480fi
9481
9482# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9483if test "x$with_x" = xno; then
9484 # The user explicitly disabled X.
9485 have_x=disabled
9486else
9487 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9488 # Both variables are already set.
9489 have_x=yes
9490 else
9491if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9492 echo $ac_n "(cached) $ac_c" 1>&6
9493else
9494 # One or both of the vars are not set, and there is no cached value.
9495ac_x_includes=NO ac_x_libraries=NO
9496rm -fr conftestdir
9497if mkdir conftestdir; then
9498 cd conftestdir
9499 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9500 cat > Imakefile <<'EOF'
9501acfindx:
9502 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9503EOF
9504 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9506 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9507 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9508 for ac_extension in a so sl; do
9509 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9510 test -f $ac_im_libdir/libX11.$ac_extension; then
9511 ac_im_usrlibdir=$ac_im_libdir; break
9512 fi
9513 done
9514 # Screen out bogus values from the imake configuration. They are
9515 # bogus both because they are the default anyway, and because
9516 # using them would break gcc on systems where it needs fixed includes.
9517 case "$ac_im_incroot" in
9518 /usr/include) ;;
9519 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9520 esac
9521 case "$ac_im_usrlibdir" in
9522 /usr/lib | /lib) ;;
9523 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9524 esac
9525 fi
9526 cd ..
9527 rm -fr conftestdir
9528fi
9529
9530if test "$ac_x_includes" = NO; then
9531 # Guess where to find include files, by looking for this one X11 .h file.
9532 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9533
9534 # First, try using that file with no special directory specified.
9535cat > conftest.$ac_ext <<EOF
14abd0fb 9536#line 9537 "configure"
c906108c
SS
9537#include "confdefs.h"
9538#include <$x_direct_test_include>
9539EOF
9540ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14abd0fb 9541{ (eval echo configure:9542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9542ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9543if test -z "$ac_err"; then
9544 rm -rf conftest*
9545 # We can compile using X headers with no special include directory.
9546ac_x_includes=
9547else
9548 echo "$ac_err" >&5
9549 echo "configure: failed program was:" >&5
9550 cat conftest.$ac_ext >&5
9551 rm -rf conftest*
9552 # Look for the header file in a standard set of common directories.
9553# Check X11 before X11Rn because it is often a symlink to the current release.
9554 for ac_dir in \
9555 /usr/X11/include \
9556 /usr/X11R6/include \
9557 /usr/X11R5/include \
9558 /usr/X11R4/include \
9559 \
9560 /usr/include/X11 \
9561 /usr/include/X11R6 \
9562 /usr/include/X11R5 \
9563 /usr/include/X11R4 \
9564 \
9565 /usr/local/X11/include \
9566 /usr/local/X11R6/include \
9567 /usr/local/X11R5/include \
9568 /usr/local/X11R4/include \
9569 \
9570 /usr/local/include/X11 \
9571 /usr/local/include/X11R6 \
9572 /usr/local/include/X11R5 \
9573 /usr/local/include/X11R4 \
9574 \
9575 /usr/X386/include \
9576 /usr/x386/include \
9577 /usr/XFree86/include/X11 \
9578 \
9579 /usr/include \
9580 /usr/local/include \
9581 /usr/unsupported/include \
9582 /usr/athena/include \
9583 /usr/local/x11r5/include \
9584 /usr/lpp/Xamples/include \
9585 \
9586 /usr/openwin/include \
9587 /usr/openwin/share/include \
9588 ; \
9589 do
9590 if test -r "$ac_dir/$x_direct_test_include"; then
9591 ac_x_includes=$ac_dir
9592 break
9593 fi
9594 done
9595fi
9596rm -f conftest*
9597fi # $ac_x_includes = NO
9598
9599if test "$ac_x_libraries" = NO; then
9600 # Check for the libraries.
9601
9602 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9603 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9604
9605 # See if we find them without any special options.
9606 # Don't add to $LIBS permanently.
9607 ac_save_LIBS="$LIBS"
9608 LIBS="-l$x_direct_test_library $LIBS"
9609cat > conftest.$ac_ext <<EOF
14abd0fb 9610#line 9611 "configure"
c906108c
SS
9611#include "confdefs.h"
9612
9613int main() {
9614${x_direct_test_function}()
9615; return 0; }
9616EOF
14abd0fb 9617if { (eval echo configure:9618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9618 rm -rf conftest*
9619 LIBS="$ac_save_LIBS"
9620# We can link X programs with no special library path.
9621ac_x_libraries=
9622else
9623 echo "configure: failed program was:" >&5
9624 cat conftest.$ac_ext >&5
9625 rm -rf conftest*
9626 LIBS="$ac_save_LIBS"
9627# First see if replacing the include by lib works.
9628# Check X11 before X11Rn because it is often a symlink to the current release.
9629for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9630 /usr/X11/lib \
9631 /usr/X11R6/lib \
9632 /usr/X11R5/lib \
9633 /usr/X11R4/lib \
9634 \
9635 /usr/lib/X11 \
9636 /usr/lib/X11R6 \
9637 /usr/lib/X11R5 \
9638 /usr/lib/X11R4 \
9639 \
9640 /usr/local/X11/lib \
9641 /usr/local/X11R6/lib \
9642 /usr/local/X11R5/lib \
9643 /usr/local/X11R4/lib \
9644 \
9645 /usr/local/lib/X11 \
9646 /usr/local/lib/X11R6 \
9647 /usr/local/lib/X11R5 \
9648 /usr/local/lib/X11R4 \
9649 \
9650 /usr/X386/lib \
9651 /usr/x386/lib \
9652 /usr/XFree86/lib/X11 \
9653 \
9654 /usr/lib \
9655 /usr/local/lib \
9656 /usr/unsupported/lib \
9657 /usr/athena/lib \
9658 /usr/local/x11r5/lib \
9659 /usr/lpp/Xamples/lib \
9660 /lib/usr/lib/X11 \
9661 \
9662 /usr/openwin/lib \
9663 /usr/openwin/share/lib \
9664 ; \
9665do
9666 for ac_extension in a so sl; do
9667 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9668 ac_x_libraries=$ac_dir
9669 break 2
9670 fi
9671 done
9672done
9673fi
9674rm -f conftest*
9675fi # $ac_x_libraries = NO
9676
9677if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9678 # Didn't find X anywhere. Cache the known absence of X.
9679 ac_cv_have_x="have_x=no"
9680else
9681 # Record where we found X for the cache.
9682 ac_cv_have_x="have_x=yes \
9683 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9684fi
9685fi
9686 fi
9687 eval "$ac_cv_have_x"
9688fi # $with_x != no
9689
9690if test "$have_x" != yes; then
9691 echo "$ac_t""$have_x" 1>&6
9692 no_x=yes
9693else
9694 # If each of the values was on the command line, it overrides each guess.
9695 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9696 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9697 # Update the cache value to reflect the command line values.
9698 ac_cv_have_x="have_x=yes \
9699 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9700 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9701fi
9702
9703
7a292a7a
SS
9704
9705# Unlike the sim directory, whether a simulator is linked is controlled by
9706# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9707# This code just checks for a few cases where we'd like to ignore those
9708# definitions, even when they're present in the '.mt' file. These cases
9709# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9710# not part of the source tree.
7a292a7a
SS
9711#
9712# Check whether --enable-sim or --disable-sim was given.
9713if test "${enable_sim+set}" = set; then
9714 enableval="$enable_sim"
9715 echo "enable_sim = $enable_sim";
9716 echo "enableval = ${enableval}";
9717 case "${enableval}" in
9718 yes) ignore_sim=false ;;
9719 no) ignore_sim=true ;;
9720 *) ignore_sim=false ;;
9721 esac
9722else
9723 ignore_sim=false
9724fi
9725
9726
9727if test ! -d "${srcdir}/../sim"; then
9728 ignore_sim=true
9729fi
9730
9731if test "${ignore_sim}" = "true"; then
9732 IGNORE_SIM="SIM="
9733 IGNORE_SIM_OBS="SIM_OBS="
9734else
9735 IGNORE_SIM=""
9736 IGNORE_SIM_OBS=""
9737 cat >> confdefs.h <<\EOF
9738#define WITH_SIM 1
9739EOF
9740
9741fi
9742
9743
9744
c906108c
SS
9745
9746
9747
9748
9749
9750
dfcd3bfb 9751
e56ac5c3
AC
9752
9753
b3a90332
AC
9754
9755
b46cd165 9756
c906108c
SS
9757# Begin stuff to support --enable-shared
9758# Check whether --enable-shared or --disable-shared was given.
9759if test "${enable_shared+set}" = set; then
9760 enableval="$enable_shared"
9761 case "${enableval}" in
9762 yes) shared=true ;;
9763 no) shared=false ;;
9764 *) shared=true ;;
9765esac
9766fi
9767
9768HLDFLAGS=
9769HLDENV=
9770# If we have shared libraries, try to set rpath reasonably.
9771if test "${shared}" = "true"; then
9772 case "${host}" in
9773 *-*-hpux*)
9774 HLDFLAGS='-Wl,+s,+b,$(libdir)'
9775 ;;
9776 *-*-irix5* | *-*-irix6*)
9777 HLDFLAGS='-Wl,-rpath,$(libdir)'
9778 ;;
9779 *-*-linux*aout*)
9780 ;;
88987551 9781 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
9782 HLDFLAGS='-Wl,-rpath,$(libdir)'
9783 ;;
9784 *-*-solaris*)
9785 HLDFLAGS='-R $(libdir)'
9786 ;;
9787 *-*-sysv4*)
9788 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
9789 ;;
9790 esac
9791fi
9792
9793# On SunOS, if the linker supports the -rpath option, use it to
9794# prevent ../bfd and ../opcodes from being included in the run time
9795# search path.
9796case "${host}" in
9797 *-*-sunos*)
9798 echo 'main () { }' > conftest.c
9799 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9800 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9801 :
9802 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9803 :
9804 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9805 :
9806 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9807 :
9808 elif test "${shared}" = "true"; then
9809 HLDFLAGS='-Wl,-rpath=$(libdir)'
9810 else
9811 HLDFLAGS='-Wl,-rpath='
9812 fi
9813 rm -f conftest.t conftest.c conftest
9814 ;;
9815esac
9816
9817
9818# End stuff to support --enable-shared
9819
9820# target_subdir is used by the testsuite to find the target libraries.
9821target_subdir=
9822if test "${host}" != "${target}"; then
9823 target_subdir="${target_alias}/"
9824fi
9825
9826
9827frags=
9828host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9829if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9830 # When building a native debuger the .mh file containing things
9831 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9832 # since it no longer contains anything useful.
9833 if test "${target}" = "${host}"; then
9834 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9835 else
9836 host_makefile_frag=/dev/null
9837 fi
c906108c
SS
9838fi
9839frags="$frags $host_makefile_frag"
9840
9841target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9842if test ! -f ${target_makefile_frag}; then
9843{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9844fi
9845frags="$frags $target_makefile_frag"
9846
9847
9848
9849
9850
9851hostfile=`sed -n '
9852s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9853' ${host_makefile_frag}`
9854
9855targetfile=`sed -n '
9856s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9857' ${target_makefile_frag}`
9858
6166d547
AC
9859GDB_MULTI_ARCH=`sed -n '
9860s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9861' ${target_makefile_frag}`
9862
c906108c 9863if test "${target}" = "${host}"; then
a85f51e7
DJ
9864# We pick this up from the host configuration file (.mh) because we
9865# do not have a native configuration Makefile fragment.
c906108c
SS
9866nativefile=`sed -n '
9867s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9868' ${host_makefile_frag}`
c906108c
SS
9869fi
9870
9871
6166d547
AC
9872# New targets should just set gdb_multi_arch=yes in configure.tgt.
9873# Old targets being converted can either do that or set GDB_MULTI_ARCH
9874# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9875# will be the default.
9876if test x"${GDB_MULTI_ARCH}" = x ; then
9877 case "${gdb_multi_arch}" in
9878 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9879 no ) GDB_MULTI_ARCH=0 ;;
9880 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9881 esac
9882fi
9883if test x"${GDB_MULTI_ARCH}" != x ; then
9884 cat >> confdefs.h <<EOF
9885#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9886EOF
9887
9888fi
6c5cfe5b 9889# Warn the user when they use an old practice
6166d547
AC
9890case "${GDB_MULTI_ARCH}" in
9891 "" ) ;;
9892 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9893 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9894 GDB_MULTI_ARCH_PURE )
9895 if test x"${targetfile}" != x ; then
6c5cfe5b 9896 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9897 targetfile=""
6166d547
AC
9898 fi ;;
9899 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9900esac
9901
8dcde887
MK
9902# Enable multi-ice-gdb-server.
9903# Check whether --enable-multi-ice or --disable-multi-ice was given.
9904if test "${enable_multi_ice+set}" = set; then
9905 enableval="$enable_multi_ice"
9906 case $enableval in
9907 yes | no)
9908 ;;
9909 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
9910 esac
96baa820
JM
9911fi
9912
8dcde887
MK
9913if test "x$enable_multi_ice" = xyes; then
9914 configdirs="$configdirs multi-ice"
a85f51e7
DJ
9915fi
9916
8dcde887
MK
9917# We only build gdbserver automatically if host and target are the same.
9918if test "x$target" = "x$host"; then
9919 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
14abd0fb 9920echo "configure:9921: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
9921 if test "x$build_gdbserver" = xyes; then
9922 configdirs="$configdirs gdbserver"
9923 echo "$ac_t""yes" 1>&6
9924 else
9925 echo "$ac_t""no" 1>&6
9926 fi
9927fi
9928
9929subdirs="doc testsuite $configdirs"
9930
9931SUBDIRS=$subdirs
96baa820
JM
9932
9933
c906108c 9934# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9935# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9936# version.
c906108c
SS
9937
9938files=
9939links=
5a2402b8 9940
c906108c 9941rm -f xm.h
5a2402b8 9942xm_h=""
c906108c 9943if test "${hostfile}" != ""; then
5a2402b8
AC
9944 xm_h=xm.h
9945 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9946 files="${files} ${GDB_XM_FILE}"
9947 links="${links} xm.h"
9948 cat >> confdefs.h <<EOF
9949#define GDB_XM_FILE ${GDB_XM_FILE}
9950EOF
9951
c906108c 9952fi
5a2402b8
AC
9953
9954
c906108c 9955rm -f tm.h
5a2402b8 9956tm_h=""
c906108c 9957if test "${targetfile}" != ""; then
5a2402b8
AC
9958 tm_h=tm.h
9959 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9960 files="${files} ${GDB_TM_FILE}"
9961 links="${links} tm.h"
9962 cat >> confdefs.h <<EOF
9963#define GDB_TM_FILE ${GDB_TM_FILE}
9964EOF
9965
c906108c 9966fi
5a2402b8
AC
9967
9968
c906108c 9969rm -f nm.h
5a2402b8 9970nm_h=""
c906108c 9971if test "${nativefile}" != ""; then
5a2402b8
AC
9972 nm_h=nm.h
9973 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
9974 files="${files} ${GDB_NM_FILE}"
9975 links="${links} nm.h"
9976 cat >> confdefs.h <<EOF
9977#define GDB_NM_FILE ${GDB_NM_FILE}
9978EOF
9979
c906108c 9980fi
5a2402b8
AC
9981
9982
c906108c
SS
9983
9984
9985echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
14abd0fb 9986echo "configure:9987: checking for Cygwin environment" >&5
c906108c
SS
9987if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9988 echo $ac_n "(cached) $ac_c" 1>&6
9989else
9990 cat > conftest.$ac_ext <<EOF
14abd0fb 9991#line 9992 "configure"
c906108c
SS
9992#include "confdefs.h"
9993
9994int main() {
9995
9996#ifndef __CYGWIN__
9997#define __CYGWIN__ __CYGWIN32__
9998#endif
9999return __CYGWIN__;
10000; return 0; }
10001EOF
14abd0fb 10002if { (eval echo configure:10003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10003 rm -rf conftest*
10004 ac_cv_cygwin=yes
10005else
10006 echo "configure: failed program was:" >&5
10007 cat conftest.$ac_ext >&5
10008 rm -rf conftest*
10009 ac_cv_cygwin=no
10010fi
10011rm -f conftest*
10012rm -f conftest*
10013fi
10014
10015echo "$ac_t""$ac_cv_cygwin" 1>&6
10016CYGWIN=
10017test "$ac_cv_cygwin" = yes && CYGWIN=yes
10018echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
14abd0fb 10019echo "configure:10020: checking for mingw32 environment" >&5
c906108c
SS
10020if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10021 echo $ac_n "(cached) $ac_c" 1>&6
10022else
10023 cat > conftest.$ac_ext <<EOF
14abd0fb 10024#line 10025 "configure"
c906108c
SS
10025#include "confdefs.h"
10026
10027int main() {
10028return __MINGW32__;
10029; return 0; }
10030EOF
14abd0fb 10031if { (eval echo configure:10032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10032 rm -rf conftest*
10033 ac_cv_mingw32=yes
10034else
10035 echo "configure: failed program was:" >&5
10036 cat conftest.$ac_ext >&5
10037 rm -rf conftest*
10038 ac_cv_mingw32=no
10039fi
10040rm -f conftest*
10041rm -f conftest*
10042fi
10043
10044echo "$ac_t""$ac_cv_mingw32" 1>&6
10045MINGW32=
10046test "$ac_cv_mingw32" = yes && MINGW32=yes
10047
10048
10049echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
14abd0fb 10050echo "configure:10051: checking for executable suffix" >&5
c906108c
SS
10051if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10052 echo $ac_n "(cached) $ac_c" 1>&6
10053else
10054 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10055 ac_cv_exeext=.exe
10056else
10057 rm -f conftest*
10058 echo 'int main () { return 0; }' > conftest.$ac_ext
10059 ac_cv_exeext=
14abd0fb 10060 if { (eval echo configure:10061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10061 for file in conftest.*; do
10062 case $file in
9608ab8b 10063 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10064 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10065 esac
10066 done
10067 else
10068 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10069 fi
10070 rm -f conftest*
10071 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10072fi
10073fi
10074
10075EXEEXT=""
10076test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10077echo "$ac_t""${ac_cv_exeext}" 1>&6
10078ac_exeext=$EXEEXT
10079
10080
234b45d4
KB
10081
10082cat >> confdefs.h <<\EOF
10083#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10084EOF
10085
10086
10087
10088
10089 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10090if test "${with_libiconv_prefix+set}" = set; then
10091 withval="$with_libiconv_prefix"
10092
10093 for dir in `echo "$withval" | tr : ' '`; do
10094 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10095 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10096 done
10097
10098fi
10099
10100
10101 echo $ac_n "checking for iconv""... $ac_c" 1>&6
14abd0fb 10102echo "configure:10103: checking for iconv" >&5
234b45d4
KB
10103if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10104 echo $ac_n "(cached) $ac_c" 1>&6
10105else
10106
10107 am_cv_func_iconv="no, consider installing GNU libiconv"
10108 am_cv_lib_iconv=no
10109 cat > conftest.$ac_ext <<EOF
14abd0fb 10110#line 10111 "configure"
234b45d4
KB
10111#include "confdefs.h"
10112#include <stdlib.h>
10113#include <iconv.h>
10114int main() {
10115iconv_t cd = iconv_open("","");
10116 iconv(cd,NULL,NULL,NULL,NULL);
10117 iconv_close(cd);
10118; return 0; }
10119EOF
14abd0fb 10120if { (eval echo configure:10121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10121 rm -rf conftest*
10122 am_cv_func_iconv=yes
10123else
10124 echo "configure: failed program was:" >&5
10125 cat conftest.$ac_ext >&5
10126fi
10127rm -f conftest*
10128 if test "$am_cv_func_iconv" != yes; then
10129 am_save_LIBS="$LIBS"
10130 LIBS="$LIBS -liconv"
10131 cat > conftest.$ac_ext <<EOF
14abd0fb 10132#line 10133 "configure"
234b45d4
KB
10133#include "confdefs.h"
10134#include <stdlib.h>
10135#include <iconv.h>
10136int main() {
10137iconv_t cd = iconv_open("","");
10138 iconv(cd,NULL,NULL,NULL,NULL);
10139 iconv_close(cd);
10140; return 0; }
10141EOF
14abd0fb 10142if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10143 rm -rf conftest*
10144 am_cv_lib_iconv=yes
10145 am_cv_func_iconv=yes
10146else
10147 echo "configure: failed program was:" >&5
10148 cat conftest.$ac_ext >&5
10149fi
10150rm -f conftest*
10151 LIBS="$am_save_LIBS"
10152 fi
10153
10154fi
10155
10156echo "$ac_t""$am_cv_func_iconv" 1>&6
10157 if test "$am_cv_func_iconv" = yes; then
10158 cat >> confdefs.h <<\EOF
10159#define HAVE_ICONV 1
10160EOF
10161
10162 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
14abd0fb 10163echo "configure:10164: checking for iconv declaration" >&5
234b45d4
KB
10164 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10165 echo $ac_n "(cached) $ac_c" 1>&6
10166else
10167
10168 cat > conftest.$ac_ext <<EOF
14abd0fb 10169#line 10170 "configure"
234b45d4
KB
10170#include "confdefs.h"
10171
10172#include <stdlib.h>
10173#include <iconv.h>
10174extern
10175#ifdef __cplusplus
10176"C"
10177#endif
10178#if defined(__STDC__) || defined(__cplusplus)
10179size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10180#else
10181size_t iconv();
10182#endif
10183
10184int main() {
10185
10186; return 0; }
10187EOF
14abd0fb 10188if { (eval echo configure:10189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10189 rm -rf conftest*
10190 am_cv_proto_iconv_arg1=""
10191else
10192 echo "configure: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 rm -rf conftest*
10195 am_cv_proto_iconv_arg1="const"
10196fi
10197rm -f conftest*
10198 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);"
10199fi
10200
10201 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10202 echo "$ac_t""${ac_t:-
10203 }$am_cv_proto_iconv" 1>&6
10204 cat >> confdefs.h <<EOF
10205#define ICONV_CONST $am_cv_proto_iconv_arg1
10206EOF
10207
10208 fi
10209 LIBICONV=
10210 if test "$am_cv_lib_iconv" = yes; then
10211 LIBICONV="-liconv"
10212 fi
10213
10214
10215
c906108c
SS
10216trap '' 1 2 15
10217cat > confcache <<\EOF
10218# This file is a shell script that caches the results of configure
10219# tests run on this system so they can be shared between configure
10220# scripts and configure runs. It is not useful on other systems.
10221# If it contains results you don't want to keep, you may remove or edit it.
10222#
10223# By default, configure uses ./config.cache as the cache file,
10224# creating it if it does not exist already. You can give configure
10225# the --cache-file=FILE option to use a different cache file; that is
10226# what configure does when it calls configure scripts in
10227# subdirectories, so they share the cache.
10228# Giving --cache-file=/dev/null disables caching, for debugging configure.
10229# config.status only pays attention to the cache file if you give it the
10230# --recheck option to rerun configure.
10231#
10232EOF
10233# The following way of writing the cache mishandles newlines in values,
10234# but we know of no workaround that is simple, portable, and efficient.
10235# So, don't put newlines in cache variables' values.
10236# Ultrix sh set writes to stderr and can't be redirected directly,
10237# and sets the high bit in the cache file unless we assign to the vars.
10238(set) 2>&1 |
10239 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10240 *ac_space=\ *)
10241 # `set' does not quote correctly, so add quotes (double-quote substitution
10242 # turns \\\\ into \\, and sed turns \\ into \).
10243 sed -n \
10244 -e "s/'/'\\\\''/g" \
10245 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10246 ;;
10247 *)
10248 # `set' quotes correctly as required by POSIX, so do not add quotes.
10249 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10250 ;;
10251 esac >> confcache
10252if cmp -s $cache_file confcache; then
10253 :
10254else
10255 if test -w $cache_file; then
10256 echo "updating cache $cache_file"
10257 cat confcache > $cache_file
10258 else
10259 echo "not updating unwritable cache $cache_file"
10260 fi
10261fi
10262rm -f confcache
10263
10264trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10265
10266test "x$prefix" = xNONE && prefix=$ac_default_prefix
10267# Let make expand exec_prefix.
10268test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10269
10270# Any assignment to VPATH causes Sun make to only execute
10271# the first set of double-colon rules, so remove it if not needed.
10272# If there is a colon in the path, we need to keep it.
10273if test "x$srcdir" = x.; then
10274 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10275fi
10276
10277trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10278
10279DEFS=-DHAVE_CONFIG_H
10280
10281# Without the "./", some shells look in PATH for config.status.
10282: ${CONFIG_STATUS=./config.status}
10283
10284echo creating $CONFIG_STATUS
10285rm -f $CONFIG_STATUS
10286cat > $CONFIG_STATUS <<EOF
10287#! /bin/sh
10288# Generated automatically by configure.
10289# Run this file to recreate the current configuration.
10290# This directory was configured as follows,
10291# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10292#
10293# $0 $ac_configure_args
10294#
10295# Compiler output produced by configure, useful for debugging
10296# configure, is in ./config.log if it exists.
10297
10298ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10299for ac_option
10300do
10301 case "\$ac_option" in
10302 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10303 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10304 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10305 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10306 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10307 exit 0 ;;
10308 -help | --help | --hel | --he | --h)
10309 echo "\$ac_cs_usage"; exit 0 ;;
10310 *) echo "\$ac_cs_usage"; exit 1 ;;
10311 esac
10312done
10313
10314ac_given_srcdir=$srcdir
10315ac_given_INSTALL="$INSTALL"
10316
ed952ac5 10317trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10318EOF
10319cat >> $CONFIG_STATUS <<EOF
10320
10321# Protect against being on the right side of a sed subst in config.status.
10322sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10323 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10324$ac_vpsub
10325$extrasub
10326s%@SHELL@%$SHELL%g
10327s%@CFLAGS@%$CFLAGS%g
10328s%@CPPFLAGS@%$CPPFLAGS%g
10329s%@CXXFLAGS@%$CXXFLAGS%g
10330s%@FFLAGS@%$FFLAGS%g
10331s%@DEFS@%$DEFS%g
10332s%@LDFLAGS@%$LDFLAGS%g
10333s%@LIBS@%$LIBS%g
10334s%@exec_prefix@%$exec_prefix%g
10335s%@prefix@%$prefix%g
10336s%@program_transform_name@%$program_transform_name%g
10337s%@bindir@%$bindir%g
10338s%@sbindir@%$sbindir%g
10339s%@libexecdir@%$libexecdir%g
10340s%@datadir@%$datadir%g
10341s%@sysconfdir@%$sysconfdir%g
10342s%@sharedstatedir@%$sharedstatedir%g
10343s%@localstatedir@%$localstatedir%g
10344s%@libdir@%$libdir%g
10345s%@includedir@%$includedir%g
10346s%@oldincludedir@%$oldincludedir%g
10347s%@infodir@%$infodir%g
10348s%@mandir@%$mandir%g
413ccac7
AC
10349s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10350s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10351s%@MAINT@%$MAINT%g
c906108c
SS
10352s%@CC@%$CC%g
10353s%@CPP@%$CPP%g
10354s%@host@%$host%g
10355s%@host_alias@%$host_alias%g
10356s%@host_cpu@%$host_cpu%g
10357s%@host_vendor@%$host_vendor%g
10358s%@host_os@%$host_os%g
10359s%@target@%$target%g
10360s%@target_alias@%$target_alias%g
10361s%@target_cpu@%$target_cpu%g
10362s%@target_vendor@%$target_vendor%g
10363s%@target_os@%$target_os%g
10364s%@build@%$build%g
10365s%@build_alias@%$build_alias%g
10366s%@build_cpu@%$build_cpu%g
10367s%@build_vendor@%$build_vendor%g
10368s%@build_os@%$build_os%g
c906108c 10369s%@RANLIB@%$RANLIB%g
8bb2c122 10370s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10371s%@ALLOCA@%$ALLOCA%g
10372s%@USE_NLS@%$USE_NLS%g
10373s%@MSGFMT@%$MSGFMT%g
10374s%@GMSGFMT@%$GMSGFMT%g
10375s%@XGETTEXT@%$XGETTEXT%g
10376s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10377s%@CATALOGS@%$CATALOGS%g
10378s%@CATOBJEXT@%$CATOBJEXT%g
10379s%@DATADIRNAME@%$DATADIRNAME%g
10380s%@GMOFILES@%$GMOFILES%g
10381s%@INSTOBJEXT@%$INSTOBJEXT%g
10382s%@INTLDEPS@%$INTLDEPS%g
10383s%@INTLLIBS@%$INTLLIBS%g
10384s%@INTLOBJS@%$INTLOBJS%g
10385s%@POFILES@%$POFILES%g
10386s%@POSUB@%$POSUB%g
10387s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10388s%@GT_NO@%$GT_NO%g
10389s%@GT_YES@%$GT_YES%g
10390s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10391s%@l@%$l%g
8dcde887 10392s%@subdirs@%$subdirs%g
7a292a7a 10393s%@AWK@%$AWK%g
c906108c
SS
10394s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10395s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10396s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10397s%@LN_S@%$LN_S%g
10398s%@YACC@%$YACC%g
c906108c 10399s%@AR@%$AR%g
95ca63c4
CF
10400s%@DLLTOOL@%$DLLTOOL%g
10401s%@WINDRES@%$WINDRES%g
75c6e08a 10402s%@MIG@%$MIG%g
c906108c 10403s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 10404s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10405s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10406s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10407s%@MMALLOC@%$MMALLOC%g
aff38e61 10408s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10409s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10410s%@LIBGUI@%$LIBGUI%g
10411s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10412s%@WIN32LDAPP@%$WIN32LDAPP%g
10413s%@TCL_VERSION@%$TCL_VERSION%g
10414s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10415s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10416s%@TCL_CC@%$TCL_CC%g
10417s%@TCL_DEFS@%$TCL_DEFS%g
10418s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10419s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10420s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10421s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10422s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10423s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10424s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10425s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10426s%@TCL_RANLIB@%$TCL_RANLIB%g
10427s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10428s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10429s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10430s%@TK_VERSION@%$TK_VERSION%g
10431s%@TK_DEFS@%$TK_DEFS%g
10432s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10433s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10434s%@TK_XLIBSW@%$TK_XLIBSW%g
10435s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10436s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10437s%@TCLHDIR@%$TCLHDIR%g
10438s%@TKHDIR@%$TKHDIR%g
10439s%@ITCLHDIR@%$ITCLHDIR%g
10440s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10441s%@ITCL_VERSION@%$ITCL_VERSION%g
10442s%@ITCL_DEFS@%$ITCL_DEFS%g
10443s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10444s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10445s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10446s%@ITK_VERSION@%$ITK_VERSION%g
10447s%@ITK_DEFS@%$ITK_DEFS%g
10448s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10449s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10450s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10451s%@X_CFLAGS@%$X_CFLAGS%g
10452s%@X_LDFLAGS@%$X_LDFLAGS%g
10453s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10454s%@TCL_DEPS@%$TCL_DEPS%g
10455s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10456s%@ITCLLIB@%$ITCLLIB%g
10457s%@ITCL_DEPS@%$ITCL_DEPS%g
10458s%@ITKLIB@%$ITKLIB%g
10459s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10460s%@GDBTKLIBS@%$GDBTKLIBS%g
10461s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10462s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10463s%@IGNORE_SIM@%$IGNORE_SIM%g
10464s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10465s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10466s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10467s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10468s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10469s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10470s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10471s%@CONFIG_ALL@%$CONFIG_ALL%g
10472s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10473s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10474s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10475s%@HLDFLAGS@%$HLDFLAGS%g
10476s%@HLDENV@%$HLDENV%g
10477s%@target_subdir@%$target_subdir%g
10478/@host_makefile_frag@/r $host_makefile_frag
10479s%@host_makefile_frag@%%g
10480/@target_makefile_frag@/r $target_makefile_frag
10481s%@target_makefile_frag@%%g
10482s%@frags@%$frags%g
96baa820 10483s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
10484s%@xm_h@%$xm_h%g
10485s%@tm_h@%$tm_h%g
10486s%@nm_h@%$nm_h%g
c906108c 10487s%@EXEEXT@%$EXEEXT%g
234b45d4 10488s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10489
10490CEOF
10491EOF
10492
10493cat >> $CONFIG_STATUS <<\EOF
10494
10495# Split the substitutions into bite-sized pieces for seds with
10496# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10497ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10498ac_file=1 # Number of current file.
10499ac_beg=1 # First line for current file.
10500ac_end=$ac_max_sed_cmds # Line after last line for current file.
10501ac_more_lines=:
10502ac_sed_cmds=""
10503while $ac_more_lines; do
10504 if test $ac_beg -gt 1; then
10505 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10506 else
10507 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10508 fi
10509 if test ! -s conftest.s$ac_file; then
10510 ac_more_lines=false
10511 rm -f conftest.s$ac_file
10512 else
10513 if test -z "$ac_sed_cmds"; then
10514 ac_sed_cmds="sed -f conftest.s$ac_file"
10515 else
10516 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10517 fi
10518 ac_file=`expr $ac_file + 1`
10519 ac_beg=$ac_end
10520 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10521 fi
10522done
10523if test -z "$ac_sed_cmds"; then
10524 ac_sed_cmds=cat
10525fi
10526EOF
10527
10528cat >> $CONFIG_STATUS <<EOF
10529
ed952ac5 10530CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10531EOF
10532cat >> $CONFIG_STATUS <<\EOF
10533for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10534 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10535 case "$ac_file" in
10536 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10537 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10538 *) ac_file_in="${ac_file}.in" ;;
10539 esac
10540
10541 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10542
10543 # Remove last slash and all that follows it. Not all systems have dirname.
10544 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10545 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10546 # The file is in a subdirectory.
10547 test ! -d "$ac_dir" && mkdir "$ac_dir"
10548 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10549 # A "../" for each directory in $ac_dir_suffix.
10550 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10551 else
10552 ac_dir_suffix= ac_dots=
10553 fi
10554
10555 case "$ac_given_srcdir" in
10556 .) srcdir=.
10557 if test -z "$ac_dots"; then top_srcdir=.
10558 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10559 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10560 *) # Relative path.
10561 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10562 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10563 esac
10564
10565 case "$ac_given_INSTALL" in
10566 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10567 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10568 esac
10569
10570 echo creating "$ac_file"
10571 rm -f "$ac_file"
10572 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10573 case "$ac_file" in
10574 *Makefile*) ac_comsub="1i\\
10575# $configure_input" ;;
10576 *) ac_comsub= ;;
10577 esac
10578
10579 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10580 sed -e "$ac_comsub
10581s%@configure_input@%$configure_input%g
10582s%@srcdir@%$srcdir%g
10583s%@top_srcdir@%$top_srcdir%g
10584s%@INSTALL@%$INSTALL%g
10585" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10586fi; done
10587rm -f conftest.s*
10588
10589# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10590# NAME is the cpp macro being defined and VALUE is the value it is being given.
10591#
10592# ac_d sets the value in "#define NAME VALUE" lines.
10593ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10594ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10595ac_dC='\3'
10596ac_dD='%g'
10597# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10598ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10599ac_uB='\([ ]\)%\1#\2define\3'
10600ac_uC=' '
10601ac_uD='\4%g'
10602# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10603ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10604ac_eB='$%\1#\2define\3'
10605ac_eC=' '
10606ac_eD='%g'
10607
10608if test "${CONFIG_HEADERS+set}" != set; then
10609EOF
10610cat >> $CONFIG_STATUS <<EOF
10611 CONFIG_HEADERS="config.h:config.in"
10612EOF
10613cat >> $CONFIG_STATUS <<\EOF
10614fi
10615for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10616 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10617 case "$ac_file" in
10618 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10619 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10620 *) ac_file_in="${ac_file}.in" ;;
10621 esac
10622
10623 echo creating $ac_file
10624
10625 rm -f conftest.frag conftest.in conftest.out
10626 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10627 cat $ac_file_inputs > conftest.in
10628
10629EOF
10630
10631# Transform confdefs.h into a sed script conftest.vals that substitutes
10632# the proper values into config.h.in to produce config.h. And first:
10633# Protect against being on the right side of a sed subst in config.status.
10634# Protect against being in an unquoted here document in config.status.
10635rm -f conftest.vals
10636cat > conftest.hdr <<\EOF
10637s/[\\&%]/\\&/g
10638s%[\\$`]%\\&%g
10639s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10640s%ac_d%ac_u%gp
10641s%ac_u%ac_e%gp
10642EOF
10643sed -n -f conftest.hdr confdefs.h > conftest.vals
10644rm -f conftest.hdr
10645
10646# This sed command replaces #undef with comments. This is necessary, for
10647# example, in the case of _POSIX_SOURCE, which is predefined and required
10648# on some systems where configure will not decide to define it.
10649cat >> conftest.vals <<\EOF
10650s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10651EOF
10652
10653# Break up conftest.vals because some shells have a limit on
10654# the size of here documents, and old seds have small limits too.
10655
10656rm -f conftest.tail
10657while :
10658do
10659 ac_lines=`grep -c . conftest.vals`
10660 # grep -c gives empty output for an empty file on some AIX systems.
10661 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10662 # Write a limited-size here document to conftest.frag.
10663 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10664 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10665 echo 'CEOF
10666 sed -f conftest.frag conftest.in > conftest.out
10667 rm -f conftest.in
10668 mv conftest.out conftest.in
10669' >> $CONFIG_STATUS
10670 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10671 rm -f conftest.vals
10672 mv conftest.tail conftest.vals
10673done
10674rm -f conftest.vals
10675
10676cat >> $CONFIG_STATUS <<\EOF
10677 rm -f conftest.frag conftest.h
10678 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10679 cat conftest.in >> conftest.h
10680 rm -f conftest.in
10681 if cmp -s $ac_file conftest.h 2>/dev/null; then
10682 echo "$ac_file is unchanged"
10683 rm -f conftest.h
10684 else
10685 # Remove last slash and all that follows it. Not all systems have dirname.
10686 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10687 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10688 # The file is in a subdirectory.
10689 test ! -d "$ac_dir" && mkdir "$ac_dir"
10690 fi
10691 rm -f $ac_file
10692 mv conftest.h $ac_file
10693 fi
10694fi; done
10695
10696EOF
10697
10698cat >> $CONFIG_STATUS <<EOF
10699ac_sources="$files"
10700ac_dests="$links"
10701EOF
10702
10703cat >> $CONFIG_STATUS <<\EOF
10704srcdir=$ac_given_srcdir
10705while test -n "$ac_sources"; do
10706 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10707 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10708
10709 echo "linking $srcdir/$ac_source to $ac_dest"
10710
10711 if test ! -r $srcdir/$ac_source; then
10712 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10713 fi
10714 rm -f $ac_dest
10715
10716 # Make relative symlinks.
10717 # Remove last slash and all that follows it. Not all systems have dirname.
10718 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10719 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10720 # The dest file is in a subdirectory.
10721 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10722 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10723 # A "../" for each directory in $ac_dest_dir_suffix.
10724 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10725 else
10726 ac_dest_dir_suffix= ac_dots=
10727 fi
10728
10729 case "$srcdir" in
10730 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10731 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10732 esac
10733
10734 # Make a symlink if possible; otherwise try a hard link.
10735 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10736 ln $srcdir/$ac_source $ac_dest; then :
10737 else
10738 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10739 fi
10740done
10741EOF
10742cat >> $CONFIG_STATUS <<EOF
10743
10744gdb_host_cpu=$gdb_host_cpu
10745gdb_target_cpu=$gdb_target_cpu
10746nativefile=$nativefile
10747
10748EOF
10749cat >> $CONFIG_STATUS <<\EOF
10750
10751if test "${nativefile}" = ""; then
c4620205 10752 < Makefile \
e27da16d
JT
10753 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10754 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10755 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10756 > Makefile.tem
c906108c
SS
10757mv -f Makefile.tem Makefile
10758fi
10759
10760sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10761/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10762/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10763mv -f Makefile.tmp Makefile
10764
2acceee2 10765
c906108c
SS
10766case x$CONFIG_HEADERS in
10767xconfig.h:config.in)
10768echo > stamp-h ;;
10769esac
10770
10771exit 0
10772EOF
10773chmod +x $CONFIG_STATUS
10774rm -fr confdefs* $ac_clean_files
10775test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10776
10777if test "$no_recursion" != yes; then
10778
10779 # Remove --cache-file and --srcdir arguments so they do not pile up.
10780 ac_sub_configure_args=
10781 ac_prev=
10782 for ac_arg in $ac_configure_args; do
10783 if test -n "$ac_prev"; then
10784 ac_prev=
10785 continue
10786 fi
10787 case "$ac_arg" in
10788 -cache-file | --cache-file | --cache-fil | --cache-fi \
10789 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10790 ac_prev=cache_file ;;
10791 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10792 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10793 ;;
10794 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10795 ac_prev=srcdir ;;
10796 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10797 ;;
10798 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10799 esac
10800 done
10801
8dcde887 10802 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10803
10804 # Do not complain, so a configure script can configure whichever
10805 # parts of a large source tree are present.
10806 if test ! -d $srcdir/$ac_config_dir; then
10807 continue
10808 fi
10809
10810 echo configuring in $ac_config_dir
10811
10812 case "$srcdir" in
10813 .) ;;
10814 *)
10815 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10816 else
10817 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10818 fi
10819 ;;
10820 esac
10821
10822 ac_popdir=`pwd`
10823 cd $ac_config_dir
10824
10825 # A "../" for each directory in /$ac_config_dir.
10826 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10827
10828 case "$srcdir" in
10829 .) # No --srcdir option. We are building in place.
10830 ac_sub_srcdir=$srcdir ;;
10831 /*) # Absolute path.
10832 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10833 *) # Relative path.
10834 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10835 esac
10836
10837 # Check for guested configure; otherwise get Cygnus style configure.
10838 if test -f $ac_sub_srcdir/configure; then
10839 ac_sub_configure=$ac_sub_srcdir/configure
10840 elif test -f $ac_sub_srcdir/configure.in; then
10841 ac_sub_configure=$ac_configure
10842 else
10843 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10844 ac_sub_configure=
10845 fi
10846
10847 # The recursion is here.
10848 if test -n "$ac_sub_configure"; then
10849
10850 # Make the cache file name correct relative to the subdirectory.
10851 case "$cache_file" in
10852 /*) ac_sub_cache_file=$cache_file ;;
10853 *) # Relative path.
10854 ac_sub_cache_file="$ac_dots$cache_file" ;;
10855 esac
10856 case "$ac_given_INSTALL" in
10857 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10858 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10859 esac
10860
10861 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10862 # The eval makes quoting arguments work.
10863 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10864 then :
10865 else
10866 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10867 fi
10868 fi
10869
10870 cd $ac_popdir
10871 done
10872fi
10873
10874
10875exit 0
This page took 0.914692 seconds and 4 git commands to generate.