* cli/cli-decode.h: Don't include "gdb_regex.h"; provide a forward
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
29ac_help="$ac_help
30 --without-included-regex don't use included regex; this is the default
31 on systems with version 2 of the GNU C library
32 (use with caution on other system)"
c906108c
SS
33ac_help="$ac_help
34 --enable-netrom Enable NetROM support"
35ac_help="$ac_help
36 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
37ac_help="$ac_help
38 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
39ac_help="$ac_help
40 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
41ac_help="$ac_help
42 --enable-gdbtk Enable GDBTK GUI front end"
43ac_help="$ac_help
44 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
45ac_help="$ac_help
46 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
47ac_help="$ac_help
48 --with-tclinclude=DIR Directory where tcl private headers are"
49ac_help="$ac_help
50 --with-tkinclude=DIR Directory where tk private headers are"
51ac_help="$ac_help
52 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
53ac_help="$ac_help
54 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
55ac_help="$ac_help
56 --with-x use the X Window System"
7a292a7a
SS
57ac_help="$ac_help
58 --enable-sim Link gdb with simulator"
c906108c
SS
59ac_help="$ac_help
60 --enable-shared Use shared libraries"
234b45d4
KB
61ac_help="$ac_help
62 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
63
64# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
67build=NONE
68cache_file=./config.cache
69exec_prefix=NONE
70host=NONE
71no_create=
72nonopt=NONE
73no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
78silent=
79site=
c41b7eb1 80sitefile=
c906108c
SS
81srcdir=
82target=NONE
83verbose=
84x_includes=NONE
85x_libraries=NONE
86bindir='${exec_prefix}/bin'
87sbindir='${exec_prefix}/sbin'
88libexecdir='${exec_prefix}/libexec'
89datadir='${prefix}/share'
90sysconfdir='${prefix}/etc'
91sharedstatedir='${prefix}/com'
92localstatedir='${prefix}/var'
93libdir='${exec_prefix}/lib'
94includedir='${prefix}/include'
95oldincludedir='/usr/include'
96infodir='${prefix}/info'
97mandir='${prefix}/man'
98
99# Initialize some other variables.
100subdirs=
101MFLAGS= MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103# Maximum number of lines to put in a shell here document.
104ac_max_here_lines=12
105
106ac_prev=
107for ac_option
108do
109
110 # If the previous option needs an argument, assign it.
111 if test -n "$ac_prev"; then
112 eval "$ac_prev=\$ac_option"
113 ac_prev=
114 continue
115 fi
116
117 case "$ac_option" in
118 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
119 *) ac_optarg= ;;
120 esac
121
122 # Accept the important Cygnus configure options, so we can diagnose typos.
123
124 case "$ac_option" in
125
126 -bindir | --bindir | --bindi | --bind | --bin | --bi)
127 ac_prev=bindir ;;
128 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
129 bindir="$ac_optarg" ;;
130
131 -build | --build | --buil | --bui | --bu)
132 ac_prev=build ;;
133 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
134 build="$ac_optarg" ;;
135
136 -cache-file | --cache-file | --cache-fil | --cache-fi \
137 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
138 ac_prev=cache_file ;;
139 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
140 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
141 cache_file="$ac_optarg" ;;
142
143 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
144 ac_prev=datadir ;;
145 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
146 | --da=*)
147 datadir="$ac_optarg" ;;
148
149 -disable-* | --disable-*)
150 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
151 # Reject names that are not valid shell variable names.
152 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
153 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
154 fi
155 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
156 eval "enable_${ac_feature}=no" ;;
157
158 -enable-* | --enable-*)
159 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
160 # Reject names that are not valid shell variable names.
161 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
162 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
163 fi
164 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
165 case "$ac_option" in
166 *=*) ;;
167 *) ac_optarg=yes ;;
168 esac
169 eval "enable_${ac_feature}='$ac_optarg'" ;;
170
171 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
172 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
173 | --exec | --exe | --ex)
174 ac_prev=exec_prefix ;;
175 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
176 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
177 | --exec=* | --exe=* | --ex=*)
178 exec_prefix="$ac_optarg" ;;
179
180 -gas | --gas | --ga | --g)
181 # Obsolete; use --with-gas.
182 with_gas=yes ;;
183
184 -help | --help | --hel | --he)
185 # Omit some internal or obsolete options to make the list less imposing.
186 # This message is too long to be a string in the A/UX 3.1 sh.
187 cat << EOF
188Usage: configure [options] [host]
189Options: [defaults in brackets after descriptions]
190Configuration:
191 --cache-file=FILE cache test results in FILE
192 --help print this message
193 --no-create do not create output files
194 --quiet, --silent do not print \`checking...' messages
c41b7eb1 195 --site-file=FILE use FILE as the site file
c906108c
SS
196 --version print the version of autoconf that created configure
197Directory and file names:
198 --prefix=PREFIX install architecture-independent files in PREFIX
199 [$ac_default_prefix]
200 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
201 [same as prefix]
202 --bindir=DIR user executables in DIR [EPREFIX/bin]
203 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
204 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
205 --datadir=DIR read-only architecture-independent data in DIR
206 [PREFIX/share]
207 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
208 --sharedstatedir=DIR modifiable architecture-independent data in DIR
209 [PREFIX/com]
210 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
211 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
212 --includedir=DIR C header files in DIR [PREFIX/include]
213 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
214 --infodir=DIR info documentation in DIR [PREFIX/info]
215 --mandir=DIR man documentation in DIR [PREFIX/man]
216 --srcdir=DIR find the sources in DIR [configure dir or ..]
217 --program-prefix=PREFIX prepend PREFIX to installed program names
218 --program-suffix=SUFFIX append SUFFIX to installed program names
219 --program-transform-name=PROGRAM
220 run sed PROGRAM on installed program names
221EOF
222 cat << EOF
223Host type:
224 --build=BUILD configure for building on BUILD [BUILD=HOST]
225 --host=HOST configure for HOST [guessed]
226 --target=TARGET configure for TARGET [TARGET=HOST]
227Features and packages:
228 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
229 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
230 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
231 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
232 --x-includes=DIR X include files are in DIR
233 --x-libraries=DIR X library files are in DIR
234EOF
235 if test -n "$ac_help"; then
236 echo "--enable and --with options recognized:$ac_help"
237 fi
238 exit 0 ;;
239
240 -host | --host | --hos | --ho)
241 ac_prev=host ;;
242 -host=* | --host=* | --hos=* | --ho=*)
243 host="$ac_optarg" ;;
244
245 -includedir | --includedir | --includedi | --included | --include \
246 | --includ | --inclu | --incl | --inc)
247 ac_prev=includedir ;;
248 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249 | --includ=* | --inclu=* | --incl=* | --inc=*)
250 includedir="$ac_optarg" ;;
251
252 -infodir | --infodir | --infodi | --infod | --info | --inf)
253 ac_prev=infodir ;;
254 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255 infodir="$ac_optarg" ;;
256
257 -libdir | --libdir | --libdi | --libd)
258 ac_prev=libdir ;;
259 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 libdir="$ac_optarg" ;;
261
262 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263 | --libexe | --libex | --libe)
264 ac_prev=libexecdir ;;
265 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266 | --libexe=* | --libex=* | --libe=*)
267 libexecdir="$ac_optarg" ;;
268
269 -localstatedir | --localstatedir | --localstatedi | --localstated \
270 | --localstate | --localstat | --localsta | --localst \
271 | --locals | --local | --loca | --loc | --lo)
272 ac_prev=localstatedir ;;
273 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276 localstatedir="$ac_optarg" ;;
277
278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279 ac_prev=mandir ;;
280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281 mandir="$ac_optarg" ;;
282
283 -nfp | --nfp | --nf)
284 # Obsolete; use --without-fp.
285 with_fp=no ;;
286
287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288 | --no-cr | --no-c)
289 no_create=yes ;;
290
291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 no_recursion=yes ;;
294
295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297 | --oldin | --oldi | --old | --ol | --o)
298 ac_prev=oldincludedir ;;
299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302 oldincludedir="$ac_optarg" ;;
303
304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305 ac_prev=prefix ;;
306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 prefix="$ac_optarg" ;;
308
309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
310 | --program-pre | --program-pr | --program-p)
311 ac_prev=program_prefix ;;
312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314 program_prefix="$ac_optarg" ;;
315
316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
317 | --program-suf | --program-su | --program-s)
318 ac_prev=program_suffix ;;
319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321 program_suffix="$ac_optarg" ;;
322
323 -program-transform-name | --program-transform-name \
324 | --program-transform-nam | --program-transform-na \
325 | --program-transform-n | --program-transform- \
326 | --program-transform | --program-transfor \
327 | --program-transfo | --program-transf \
328 | --program-trans | --program-tran \
329 | --progr-tra | --program-tr | --program-t)
330 ac_prev=program_transform_name ;;
331 -program-transform-name=* | --program-transform-name=* \
332 | --program-transform-nam=* | --program-transform-na=* \
333 | --program-transform-n=* | --program-transform-=* \
334 | --program-transform=* | --program-transfor=* \
335 | --program-transfo=* | --program-transf=* \
336 | --program-trans=* | --program-tran=* \
337 | --progr-tra=* | --program-tr=* | --program-t=*)
338 program_transform_name="$ac_optarg" ;;
339
340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341 | -silent | --silent | --silen | --sile | --sil)
342 silent=yes ;;
343
344 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345 ac_prev=sbindir ;;
346 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347 | --sbi=* | --sb=*)
348 sbindir="$ac_optarg" ;;
349
350 -sharedstatedir | --sharedstatedir | --sharedstatedi \
351 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352 | --sharedst | --shareds | --shared | --share | --shar \
353 | --sha | --sh)
354 ac_prev=sharedstatedir ;;
355 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358 | --sha=* | --sh=*)
359 sharedstatedir="$ac_optarg" ;;
360
361 -site | --site | --sit)
362 ac_prev=site ;;
363 -site=* | --site=* | --sit=*)
364 site="$ac_optarg" ;;
365
c41b7eb1
JB
366 -site-file | --site-file | --site-fil | --site-fi | --site-f)
367 ac_prev=sitefile ;;
368 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
369 sitefile="$ac_optarg" ;;
370
c906108c
SS
371 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
372 ac_prev=srcdir ;;
373 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
374 srcdir="$ac_optarg" ;;
375
376 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
377 | --syscon | --sysco | --sysc | --sys | --sy)
378 ac_prev=sysconfdir ;;
379 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
380 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
381 sysconfdir="$ac_optarg" ;;
382
383 -target | --target | --targe | --targ | --tar | --ta | --t)
384 ac_prev=target ;;
385 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
386 target="$ac_optarg" ;;
387
388 -v | -verbose | --verbose | --verbos | --verbo | --verb)
389 verbose=yes ;;
390
391 -version | --version | --versio | --versi | --vers)
392 echo "configure generated by autoconf version 2.13"
393 exit 0 ;;
394
395 -with-* | --with-*)
396 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
397 # Reject names that are not valid shell variable names.
398 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
399 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
400 fi
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
402 case "$ac_option" in
403 *=*) ;;
404 *) ac_optarg=yes ;;
405 esac
406 eval "with_${ac_package}='$ac_optarg'" ;;
407
408 -without-* | --without-*)
409 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
410 # Reject names that are not valid shell variable names.
411 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
412 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
413 fi
414 ac_package=`echo $ac_package| sed 's/-/_/g'`
415 eval "with_${ac_package}=no" ;;
416
417 --x)
418 # Obsolete; use --with-x.
419 with_x=yes ;;
420
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes="$ac_optarg" ;;
427
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries="$ac_optarg" ;;
434
435 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
436 ;;
437
438 *)
439 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
440 echo "configure: warning: $ac_option: invalid host type" 1>&2
441 fi
442 if test "x$nonopt" != xNONE; then
443 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
444 fi
445 nonopt="$ac_option"
446 ;;
447
448 esac
449done
450
451if test -n "$ac_prev"; then
452 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453fi
454
455trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
456
457# File descriptor usage:
458# 0 standard input
459# 1 file creation
460# 2 errors and warnings
461# 3 some systems may open it to /dev/tty
462# 4 used on the Kubota Titan
463# 6 checking for... messages and results
464# 5 compiler messages saved in config.log
465if test "$silent" = yes; then
466 exec 6>/dev/null
467else
468 exec 6>&1
469fi
470exec 5>./config.log
471
472echo "\
473This file contains any messages produced by compilers while
474running configure, to aid debugging if configure makes a mistake.
475" 1>&5
476
477# Strip out --no-create and --no-recursion so they do not pile up.
478# Also quote any args containing shell metacharacters.
479ac_configure_args=
480for ac_arg
481do
482 case "$ac_arg" in
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484 | --no-cr | --no-c) ;;
485 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
487 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
488 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
489 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
490 esac
491done
492
493# NLS nuisances.
494# Only set these to C if already set. These must not be set unconditionally
495# because not all systems understand e.g. LANG=C (notably SCO).
496# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
497# Non-C LC_CTYPE values break the ctype check.
498if test "${LANG+set}" = set; then LANG=C; export LANG; fi
499if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
500if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
501if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
502
503# confdefs.h avoids OS command line length limits that DEFS can exceed.
504rm -rf conftest* confdefs.h
505# AIX cpp loses on an empty file, so make sure it contains at least a newline.
506echo > confdefs.h
507
508# A filename unique to this package, relative to the directory that
509# configure is in, which we can look for to find out if srcdir is correct.
510ac_unique_file=main.c
511
512# Find the source files, if location was not specified.
513if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
516 ac_prog=$0
517 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519 srcdir=$ac_confdir
520 if test ! -r $srcdir/$ac_unique_file; then
521 srcdir=..
522 fi
523else
524 ac_srcdir_defaulted=no
525fi
526if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
529 else
530 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531 fi
532fi
533srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
534
535# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
536if test -z "$sitefile"; then
537 if test -z "$CONFIG_SITE"; then
538 if test "x$prefix" != xNONE; then
539 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
540 else
541 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
542 fi
c906108c 543 fi
c41b7eb1
JB
544else
545 CONFIG_SITE="$sitefile"
c906108c
SS
546fi
547for ac_site_file in $CONFIG_SITE; do
548 if test -r "$ac_site_file"; then
549 echo "loading site script $ac_site_file"
550 . "$ac_site_file"
551 fi
552done
553
554if test -r "$cache_file"; then
555 echo "loading cache $cache_file"
556 . $cache_file
557else
558 echo "creating cache $cache_file"
559 > $cache_file
560fi
561
562ac_ext=c
563# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
564ac_cpp='$CPP $CPPFLAGS'
565ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
566ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
567cross_compiling=$ac_cv_prog_cc_cross
568
569ac_exeext=
570ac_objext=o
571if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
572 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
573 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
574 ac_n= ac_c='
575' ac_t=' '
576 else
577 ac_n=-n ac_c= ac_t=
578 fi
579else
580 ac_n= ac_c='\c' ac_t=
581fi
582
583
584
413ccac7 585echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
93d331ba 586echo "configure:587: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
587 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
588if test "${enable_maintainer_mode+set}" = set; then
589 enableval="$enable_maintainer_mode"
590 USE_MAINTAINER_MODE=$enableval
591else
592 USE_MAINTAINER_MODE=no
593fi
594
595 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
596
597
598if test $USE_MAINTAINER_MODE = yes; then
599 MAINTAINER_MODE_TRUE=
600 MAINTAINER_MODE_FALSE='#'
601else
602 MAINTAINER_MODE_TRUE='#'
603 MAINTAINER_MODE_FALSE=
604fi
605 MAINT=$MAINTAINER_MODE_TRUE
606
607
c906108c
SS
608
609# Extract the first word of "gcc", so it can be a program name with args.
610set dummy gcc; ac_word=$2
611echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 612echo "configure:613: checking for $ac_word" >&5
c906108c
SS
613if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
615else
616 if test -n "$CC"; then
617 ac_cv_prog_CC="$CC" # Let the user override the test.
618else
619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
620 ac_dummy="$PATH"
621 for ac_dir in $ac_dummy; do
622 test -z "$ac_dir" && ac_dir=.
623 if test -f $ac_dir/$ac_word; then
624 ac_cv_prog_CC="gcc"
625 break
626 fi
627 done
628 IFS="$ac_save_ifs"
629fi
630fi
631CC="$ac_cv_prog_CC"
632if test -n "$CC"; then
633 echo "$ac_t""$CC" 1>&6
634else
635 echo "$ac_t""no" 1>&6
636fi
637
638if test -z "$CC"; then
639 # Extract the first word of "cc", so it can be a program name with args.
640set dummy cc; ac_word=$2
641echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 642echo "configure:643: checking for $ac_word" >&5
c906108c
SS
643if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
645else
646 if test -n "$CC"; then
647 ac_cv_prog_CC="$CC" # Let the user override the test.
648else
649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
650 ac_prog_rejected=no
651 ac_dummy="$PATH"
652 for ac_dir in $ac_dummy; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
655 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
656 ac_prog_rejected=yes
657 continue
658 fi
659 ac_cv_prog_CC="cc"
660 break
661 fi
662 done
663 IFS="$ac_save_ifs"
664if test $ac_prog_rejected = yes; then
665 # We found a bogon in the path, so make sure we never use it.
666 set dummy $ac_cv_prog_CC
667 shift
668 if test $# -gt 0; then
669 # We chose a different compiler from the bogus one.
670 # However, it has the same basename, so the bogon will be chosen
671 # first if we set CC to just the basename; use the full file name.
672 shift
673 set dummy "$ac_dir/$ac_word" "$@"
674 shift
675 ac_cv_prog_CC="$@"
676 fi
677fi
678fi
679fi
680CC="$ac_cv_prog_CC"
681if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
683else
684 echo "$ac_t""no" 1>&6
685fi
686
687 if test -z "$CC"; then
688 case "`uname -s`" in
689 *win32* | *WIN32*)
690 # Extract the first word of "cl", so it can be a program name with args.
691set dummy cl; ac_word=$2
692echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 693echo "configure:694: checking for $ac_word" >&5
c906108c
SS
694if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
696else
697 if test -n "$CC"; then
698 ac_cv_prog_CC="$CC" # Let the user override the test.
699else
700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
701 ac_dummy="$PATH"
702 for ac_dir in $ac_dummy; do
703 test -z "$ac_dir" && ac_dir=.
704 if test -f $ac_dir/$ac_word; then
705 ac_cv_prog_CC="cl"
706 break
707 fi
708 done
709 IFS="$ac_save_ifs"
710fi
711fi
712CC="$ac_cv_prog_CC"
713if test -n "$CC"; then
714 echo "$ac_t""$CC" 1>&6
715else
716 echo "$ac_t""no" 1>&6
717fi
718 ;;
719 esac
720 fi
721 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
722fi
723
724echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
93d331ba 725echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
726
727ac_ext=c
728# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
729ac_cpp='$CPP $CPPFLAGS'
730ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
731ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
732cross_compiling=$ac_cv_prog_cc_cross
733
734cat > conftest.$ac_ext << EOF
735
93d331ba 736#line 737 "configure"
c906108c
SS
737#include "confdefs.h"
738
739main(){return(0);}
740EOF
93d331ba 741if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
742 ac_cv_prog_cc_works=yes
743 # If we can't run a trivial program, we are probably using a cross compiler.
744 if (./conftest; exit) 2>/dev/null; then
745 ac_cv_prog_cc_cross=no
746 else
747 ac_cv_prog_cc_cross=yes
748 fi
749else
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 ac_cv_prog_cc_works=no
753fi
754rm -fr conftest*
755ac_ext=c
756# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
757ac_cpp='$CPP $CPPFLAGS'
758ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
759ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
760cross_compiling=$ac_cv_prog_cc_cross
761
762echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
763if test $ac_cv_prog_cc_works = no; then
764 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
765fi
766echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
93d331ba 767echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
768echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
769cross_compiling=$ac_cv_prog_cc_cross
770
771echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
93d331ba 772echo "configure:773: checking whether we are using GNU C" >&5
c906108c
SS
773if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775else
776 cat > conftest.c <<EOF
777#ifdef __GNUC__
778 yes;
779#endif
780EOF
93d331ba 781if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
782 ac_cv_prog_gcc=yes
783else
784 ac_cv_prog_gcc=no
785fi
786fi
787
788echo "$ac_t""$ac_cv_prog_gcc" 1>&6
789
790if test $ac_cv_prog_gcc = yes; then
791 GCC=yes
792else
793 GCC=
794fi
795
796ac_test_CFLAGS="${CFLAGS+set}"
797ac_save_CFLAGS="$CFLAGS"
798CFLAGS=
799echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
93d331ba 800echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
801if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
803else
804 echo 'void f(){}' > conftest.c
805if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
806 ac_cv_prog_cc_g=yes
807else
808 ac_cv_prog_cc_g=no
809fi
810rm -f conftest*
811
812fi
813
814echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
815if test "$ac_test_CFLAGS" = set; then
816 CFLAGS="$ac_save_CFLAGS"
817elif test $ac_cv_prog_cc_g = yes; then
818 if test "$GCC" = yes; then
819 CFLAGS="-g -O2"
820 else
821 CFLAGS="-g"
822 fi
823else
824 if test "$GCC" = yes; then
825 CFLAGS="-O2"
826 else
827 CFLAGS=
828 fi
829fi
830
831echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
93d331ba 832echo "configure:833: checking how to run the C preprocessor" >&5
c906108c
SS
833# On Suns, sometimes $CPP names a directory.
834if test -n "$CPP" && test -d "$CPP"; then
835 CPP=
836fi
837if test -z "$CPP"; then
838if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
840else
841 # This must be in double quotes, not single quotes, because CPP may get
842 # substituted into the Makefile and "${CC-cc}" will confuse make.
843 CPP="${CC-cc} -E"
844 # On the NeXT, cc -E runs the code through the compiler's parser,
845 # not just through cpp.
846 cat > conftest.$ac_ext <<EOF
93d331ba 847#line 848 "configure"
c906108c
SS
848#include "confdefs.h"
849#include <assert.h>
850Syntax Error
851EOF
852ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 853{ (eval echo configure:854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
854ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
855if test -z "$ac_err"; then
856 :
857else
858 echo "$ac_err" >&5
859 echo "configure: failed program was:" >&5
860 cat conftest.$ac_ext >&5
861 rm -rf conftest*
862 CPP="${CC-cc} -E -traditional-cpp"
863 cat > conftest.$ac_ext <<EOF
93d331ba 864#line 865 "configure"
c906108c
SS
865#include "confdefs.h"
866#include <assert.h>
867Syntax Error
868EOF
869ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 870{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
871ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
872if test -z "$ac_err"; then
873 :
874else
875 echo "$ac_err" >&5
876 echo "configure: failed program was:" >&5
877 cat conftest.$ac_ext >&5
878 rm -rf conftest*
879 CPP="${CC-cc} -nologo -E"
880 cat > conftest.$ac_ext <<EOF
93d331ba 881#line 882 "configure"
c906108c
SS
882#include "confdefs.h"
883#include <assert.h>
884Syntax Error
885EOF
886ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 887{ (eval echo configure:888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
888ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
889if test -z "$ac_err"; then
890 :
891else
892 echo "$ac_err" >&5
893 echo "configure: failed program was:" >&5
894 cat conftest.$ac_ext >&5
895 rm -rf conftest*
896 CPP=/lib/cpp
897fi
898rm -f conftest*
899fi
900rm -f conftest*
901fi
902rm -f conftest*
903 ac_cv_prog_CPP="$CPP"
904fi
905 CPP="$ac_cv_prog_CPP"
906else
907 ac_cv_prog_CPP="$CPP"
908fi
909echo "$ac_t""$CPP" 1>&6
910
911echo $ac_n "checking for AIX""... $ac_c" 1>&6
93d331ba 912echo "configure:913: checking for AIX" >&5
c906108c 913cat > conftest.$ac_ext <<EOF
93d331ba 914#line 915 "configure"
c906108c
SS
915#include "confdefs.h"
916#ifdef _AIX
917 yes
918#endif
919
920EOF
921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
922 egrep "yes" >/dev/null 2>&1; then
923 rm -rf conftest*
924 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
925#define _ALL_SOURCE 1
926EOF
927
928else
929 rm -rf conftest*
930 echo "$ac_t""no" 1>&6
931fi
932rm -f conftest*
933
934
56157b4a 935echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
93d331ba 936echo "configure:937: checking for POSIXized ISC" >&5
56157b4a
AC
937if test -d /etc/conf/kconfig.d &&
938 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
939then
940 echo "$ac_t""yes" 1>&6
941 ISC=yes # If later tests want to check for ISC.
942 cat >> confdefs.h <<\EOF
943#define _POSIX_SOURCE 1
c906108c
SS
944EOF
945
56157b4a
AC
946 if test "$GCC" = yes; then
947 CC="$CC -posix"
948 else
949 CC="$CC -Xp"
950 fi
c906108c
SS
951else
952 echo "$ac_t""no" 1>&6
56157b4a 953 ISC=
c906108c
SS
954fi
955
956
957
958
959echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
93d331ba 960echo "configure:961: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
961if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
962 echo $ac_n "(cached) $ac_c" 1>&6
963else
964 am_cv_prog_cc_stdc=no
965ac_save_CC="$CC"
966# Don't try gcc -ansi; that turns off useful extensions and
967# breaks some systems' header files.
968# AIX -qlanglvl=ansi
969# Ultrix and OSF/1 -std1
56157b4a
AC
970# HP-UX 10.20 and later -Ae
971# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 972# SVR4 -Xc -D__EXTENSIONS__
56157b4a 973for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
974do
975 CC="$ac_save_CC $ac_arg"
976 cat > conftest.$ac_ext <<EOF
93d331ba 977#line 978 "configure"
c906108c
SS
978#include "confdefs.h"
979#include <stdarg.h>
980#include <stdio.h>
981#include <sys/types.h>
982#include <sys/stat.h>
983/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
984struct buf { int x; };
985FILE * (*rcsopen) (struct buf *, struct stat *, int);
986static char *e (p, i)
987 char **p;
988 int i;
989{
990 return p[i];
991}
992static char *f (char * (*g) (char **, int), char **p, ...)
993{
994 char *s;
995 va_list v;
996 va_start (v,p);
997 s = g (p, va_arg (v,int));
998 va_end (v);
999 return s;
1000}
1001int test (int i, double x);
1002struct s1 {int (*f) (int a);};
1003struct s2 {int (*f) (double a);};
1004int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1005int argc;
1006char **argv;
1007
1008int main() {
1009
1010return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1011
1012; return 0; }
1013EOF
93d331ba 1014if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1015 rm -rf conftest*
1016 am_cv_prog_cc_stdc="$ac_arg"; break
1017else
1018 echo "configure: failed program was:" >&5
1019 cat conftest.$ac_ext >&5
1020fi
1021rm -f conftest*
1022done
1023CC="$ac_save_CC"
1024
1025fi
1026
1027if test -z "$am_cv_prog_cc_stdc"; then
1028 echo "$ac_t""none needed" 1>&6
1029else
1030 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1031fi
1032case "x$am_cv_prog_cc_stdc" in
1033 x|xno) ;;
1034 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1035esac
1036
1037
1038ac_aux_dir=
1039for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1040 if test -f $ac_dir/install-sh; then
1041 ac_aux_dir=$ac_dir
1042 ac_install_sh="$ac_aux_dir/install-sh -c"
1043 break
1044 elif test -f $ac_dir/install.sh; then
1045 ac_aux_dir=$ac_dir
1046 ac_install_sh="$ac_aux_dir/install.sh -c"
1047 break
1048 fi
1049done
1050if test -z "$ac_aux_dir"; then
1051 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1052fi
1053ac_config_guess=$ac_aux_dir/config.guess
1054ac_config_sub=$ac_aux_dir/config.sub
1055ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1056
1057
1058# Do some error checking and defaulting for the host and target type.
1059# The inputs are:
1060# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1061#
1062# The rules are:
1063# 1. You are not allowed to specify --host, --target, and nonopt at the
1064# same time.
1065# 2. Host defaults to nonopt.
1066# 3. If nonopt is not specified, then host defaults to the current host,
1067# as determined by config.guess.
1068# 4. Target and build default to nonopt.
1069# 5. If nonopt is not specified, then target and build default to host.
1070
1071# The aliases save the names the user supplied, while $host etc.
1072# will get canonicalized.
1073case $host---$target---$nonopt in
1074NONE---*---* | *---NONE---* | *---*---NONE) ;;
1075*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1076esac
1077
1078
1079# Make sure we can run config.sub.
1080if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1081else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1082fi
1083
1084echo $ac_n "checking host system type""... $ac_c" 1>&6
93d331ba 1085echo "configure:1086: checking host system type" >&5
c906108c
SS
1086
1087host_alias=$host
1088case "$host_alias" in
1089NONE)
1090 case $nonopt in
1091 NONE)
1092 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1093 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1094 fi ;;
1095 *) host_alias=$nonopt ;;
1096 esac ;;
1097esac
1098
1099host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1100host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1101host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1102host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1103echo "$ac_t""$host" 1>&6
1104
1105echo $ac_n "checking target system type""... $ac_c" 1>&6
93d331ba 1106echo "configure:1107: checking target system type" >&5
c906108c
SS
1107
1108target_alias=$target
1109case "$target_alias" in
1110NONE)
1111 case $nonopt in
1112 NONE) target_alias=$host_alias ;;
1113 *) target_alias=$nonopt ;;
1114 esac ;;
1115esac
1116
1117target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1118target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1119target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1120target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1121echo "$ac_t""$target" 1>&6
1122
1123echo $ac_n "checking build system type""... $ac_c" 1>&6
93d331ba 1124echo "configure:1125: checking build system type" >&5
c906108c
SS
1125
1126build_alias=$build
1127case "$build_alias" in
1128NONE)
1129 case $nonopt in
1130 NONE) build_alias=$host_alias ;;
1131 *) build_alias=$nonopt ;;
1132 esac ;;
1133esac
1134
1135build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1136build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1137build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1138build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1139echo "$ac_t""$build" 1>&6
1140
1141test "$host_alias" != "$target_alias" &&
1142 test "$program_prefix$program_suffix$program_transform_name" = \
1143 NONENONEs,x,x, &&
1144 program_prefix=${target_alias}-
1145
1146
8bb2c122
MK
1147# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1148# doesn't support cross-compilation, but the one from Autoconf 2.5x
1149# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1150# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1151# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1152# 2.5x.
1153if test $host != $build; then
1154 ac_tool_prefix=${host_alias}-
1155else
1156 ac_tool_prefix=
1157fi
1158
1159# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1160set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1161echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 1162echo "configure:1163: checking for $ac_word" >&5
8bb2c122
MK
1163if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165else
1166 if test -n "$RANLIB"; then
1167 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1168else
1169 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1170 ac_dummy="$PATH"
1171 for ac_dir in $ac_dummy; do
1172 test -z "$ac_dir" && ac_dir=.
1173 if test -f $ac_dir/$ac_word; then
1174 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1175 break
1176 fi
1177 done
1178 IFS="$ac_save_ifs"
1179fi
1180fi
1181RANLIB="$ac_cv_prog_RANLIB"
1182if test -n "$RANLIB"; then
1183 echo "$ac_t""$RANLIB" 1>&6
1184else
1185 echo "$ac_t""no" 1>&6
1186fi
1187
1188
1189if test -z "$ac_cv_prog_RANLIB"; then
1190if test -n "$ac_tool_prefix"; then
1191 # Extract the first word of "ranlib", so it can be a program name with args.
1192set dummy ranlib; ac_word=$2
1193echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 1194echo "configure:1195: checking for $ac_word" >&5
8bb2c122
MK
1195if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1196 echo $ac_n "(cached) $ac_c" 1>&6
1197else
1198 if test -n "$RANLIB"; then
1199 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1200else
1201 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1202 ac_dummy="$PATH"
1203 for ac_dir in $ac_dummy; do
1204 test -z "$ac_dir" && ac_dir=.
1205 if test -f $ac_dir/$ac_word; then
1206 ac_cv_prog_RANLIB="ranlib"
1207 break
1208 fi
1209 done
1210 IFS="$ac_save_ifs"
1211 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1212fi
1213fi
1214RANLIB="$ac_cv_prog_RANLIB"
1215if test -n "$RANLIB"; then
1216 echo "$ac_t""$RANLIB" 1>&6
1217else
1218 echo "$ac_t""no" 1>&6
1219fi
1220
1221else
1222 RANLIB=":"
1223fi
1224fi
1225
1226
c906108c
SS
1227ALL_LINGUAS=
1228echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
93d331ba 1229echo "configure:1230: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1230set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1231if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1232 echo $ac_n "(cached) $ac_c" 1>&6
1233else
1234 cat > conftestmake <<\EOF
1235all:
1236 @echo 'ac_maketemp="${MAKE}"'
1237EOF
1238# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1239eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1240if test -n "$ac_maketemp"; then
1241 eval ac_cv_prog_make_${ac_make}_set=yes
1242else
1243 eval ac_cv_prog_make_${ac_make}_set=no
1244fi
1245rm -f conftestmake
1246fi
1247if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1248 echo "$ac_t""yes" 1>&6
1249 SET_MAKE=
1250else
1251 echo "$ac_t""no" 1>&6
1252 SET_MAKE="MAKE=${MAKE-make}"
1253fi
1254
1255# Extract the first word of "ranlib", so it can be a program name with args.
1256set dummy ranlib; ac_word=$2
1257echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 1258echo "configure:1259: checking for $ac_word" >&5
c906108c
SS
1259if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1260 echo $ac_n "(cached) $ac_c" 1>&6
1261else
1262 if test -n "$RANLIB"; then
1263 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1264else
1265 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1266 ac_dummy="$PATH"
1267 for ac_dir in $ac_dummy; do
1268 test -z "$ac_dir" && ac_dir=.
1269 if test -f $ac_dir/$ac_word; then
1270 ac_cv_prog_RANLIB="ranlib"
1271 break
1272 fi
1273 done
1274 IFS="$ac_save_ifs"
1275 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1276fi
1277fi
1278RANLIB="$ac_cv_prog_RANLIB"
1279if test -n "$RANLIB"; then
1280 echo "$ac_t""$RANLIB" 1>&6
1281else
1282 echo "$ac_t""no" 1>&6
1283fi
1284
1285echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
93d331ba 1286echo "configure:1287: checking for ANSI C header files" >&5
c906108c
SS
1287if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1289else
1290 cat > conftest.$ac_ext <<EOF
93d331ba 1291#line 1292 "configure"
c906108c
SS
1292#include "confdefs.h"
1293#include <stdlib.h>
1294#include <stdarg.h>
1295#include <string.h>
1296#include <float.h>
1297EOF
1298ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 1299{ (eval echo configure:1300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1300ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1301if test -z "$ac_err"; then
1302 rm -rf conftest*
1303 ac_cv_header_stdc=yes
1304else
1305 echo "$ac_err" >&5
1306 echo "configure: failed program was:" >&5
1307 cat conftest.$ac_ext >&5
1308 rm -rf conftest*
1309 ac_cv_header_stdc=no
1310fi
1311rm -f conftest*
1312
1313if test $ac_cv_header_stdc = yes; then
1314 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1315cat > conftest.$ac_ext <<EOF
93d331ba 1316#line 1317 "configure"
c906108c
SS
1317#include "confdefs.h"
1318#include <string.h>
1319EOF
1320if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1321 egrep "memchr" >/dev/null 2>&1; then
1322 :
1323else
1324 rm -rf conftest*
1325 ac_cv_header_stdc=no
1326fi
1327rm -f conftest*
1328
1329fi
1330
1331if test $ac_cv_header_stdc = yes; then
1332 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1333cat > conftest.$ac_ext <<EOF
93d331ba 1334#line 1335 "configure"
c906108c
SS
1335#include "confdefs.h"
1336#include <stdlib.h>
1337EOF
1338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "free" >/dev/null 2>&1; then
1340 :
1341else
1342 rm -rf conftest*
1343 ac_cv_header_stdc=no
1344fi
1345rm -f conftest*
1346
1347fi
1348
1349if test $ac_cv_header_stdc = yes; then
1350 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1351if test "$cross_compiling" = yes; then
1352 :
1353else
1354 cat > conftest.$ac_ext <<EOF
93d331ba 1355#line 1356 "configure"
c906108c
SS
1356#include "confdefs.h"
1357#include <ctype.h>
1358#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1359#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1360#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1361int main () { int i; for (i = 0; i < 256; i++)
1362if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1363exit (0); }
1364
1365EOF
93d331ba 1366if { (eval echo configure:1367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1367then
1368 :
1369else
1370 echo "configure: failed program was:" >&5
1371 cat conftest.$ac_ext >&5
1372 rm -fr conftest*
1373 ac_cv_header_stdc=no
1374fi
1375rm -fr conftest*
1376fi
1377
1378fi
1379fi
1380
1381echo "$ac_t""$ac_cv_header_stdc" 1>&6
1382if test $ac_cv_header_stdc = yes; then
1383 cat >> confdefs.h <<\EOF
1384#define STDC_HEADERS 1
1385EOF
1386
1387fi
1388
1389echo $ac_n "checking for working const""... $ac_c" 1>&6
93d331ba 1390echo "configure:1391: checking for working const" >&5
c906108c
SS
1391if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1392 echo $ac_n "(cached) $ac_c" 1>&6
1393else
1394 cat > conftest.$ac_ext <<EOF
93d331ba 1395#line 1396 "configure"
c906108c
SS
1396#include "confdefs.h"
1397
1398int main() {
1399
1400/* Ultrix mips cc rejects this. */
1401typedef int charset[2]; const charset x;
1402/* SunOS 4.1.1 cc rejects this. */
1403char const *const *ccp;
1404char **p;
1405/* NEC SVR4.0.2 mips cc rejects this. */
1406struct point {int x, y;};
1407static struct point const zero = {0,0};
1408/* AIX XL C 1.02.0.0 rejects this.
1409 It does not let you subtract one const X* pointer from another in an arm
1410 of an if-expression whose if-part is not a constant expression */
1411const char *g = "string";
1412ccp = &g + (g ? g-g : 0);
1413/* HPUX 7.0 cc rejects these. */
1414++ccp;
1415p = (char**) ccp;
1416ccp = (char const *const *) p;
1417{ /* SCO 3.2v4 cc rejects this. */
1418 char *t;
1419 char const *s = 0 ? (char *) 0 : (char const *) 0;
1420
1421 *t++ = 0;
1422}
1423{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1424 int x[] = {25, 17};
1425 const int *foo = &x[0];
1426 ++foo;
1427}
1428{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1429 typedef const int *iptr;
1430 iptr p = 0;
1431 ++p;
1432}
1433{ /* AIX XL C 1.02.0.0 rejects this saying
1434 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1435 struct s { int j; const int *ap[3]; };
1436 struct s *b; b->j = 5;
1437}
1438{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1439 const int foo = 10;
1440}
1441
1442; return 0; }
1443EOF
93d331ba 1444if { (eval echo configure:1445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1445 rm -rf conftest*
1446 ac_cv_c_const=yes
1447else
1448 echo "configure: failed program was:" >&5
1449 cat conftest.$ac_ext >&5
1450 rm -rf conftest*
1451 ac_cv_c_const=no
1452fi
1453rm -f conftest*
1454fi
1455
1456echo "$ac_t""$ac_cv_c_const" 1>&6
1457if test $ac_cv_c_const = no; then
1458 cat >> confdefs.h <<\EOF
1459#define const
1460EOF
1461
1462fi
1463
1464echo $ac_n "checking for inline""... $ac_c" 1>&6
93d331ba 1465echo "configure:1466: checking for inline" >&5
c906108c
SS
1466if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1467 echo $ac_n "(cached) $ac_c" 1>&6
1468else
1469 ac_cv_c_inline=no
1470for ac_kw in inline __inline__ __inline; do
1471 cat > conftest.$ac_ext <<EOF
93d331ba 1472#line 1473 "configure"
c906108c
SS
1473#include "confdefs.h"
1474
1475int main() {
1476} $ac_kw foo() {
1477; return 0; }
1478EOF
93d331ba 1479if { (eval echo configure:1480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1480 rm -rf conftest*
1481 ac_cv_c_inline=$ac_kw; break
1482else
1483 echo "configure: failed program was:" >&5
1484 cat conftest.$ac_ext >&5
1485fi
1486rm -f conftest*
1487done
1488
1489fi
1490
1491echo "$ac_t""$ac_cv_c_inline" 1>&6
1492case "$ac_cv_c_inline" in
1493 inline | yes) ;;
1494 no) cat >> confdefs.h <<\EOF
1495#define inline
1496EOF
1497 ;;
1498 *) cat >> confdefs.h <<EOF
1499#define inline $ac_cv_c_inline
1500EOF
1501 ;;
1502esac
1503
1504echo $ac_n "checking for off_t""... $ac_c" 1>&6
93d331ba 1505echo "configure:1506: checking for off_t" >&5
c906108c
SS
1506if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508else
1509 cat > conftest.$ac_ext <<EOF
93d331ba 1510#line 1511 "configure"
c906108c
SS
1511#include "confdefs.h"
1512#include <sys/types.h>
1513#if STDC_HEADERS
1514#include <stdlib.h>
1515#include <stddef.h>
1516#endif
1517EOF
1518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1519 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1520 rm -rf conftest*
1521 ac_cv_type_off_t=yes
1522else
1523 rm -rf conftest*
1524 ac_cv_type_off_t=no
1525fi
1526rm -f conftest*
1527
1528fi
1529echo "$ac_t""$ac_cv_type_off_t" 1>&6
1530if test $ac_cv_type_off_t = no; then
1531 cat >> confdefs.h <<\EOF
1532#define off_t long
1533EOF
1534
1535fi
1536
1537echo $ac_n "checking for size_t""... $ac_c" 1>&6
93d331ba 1538echo "configure:1539: checking for size_t" >&5
c906108c
SS
1539if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1540 echo $ac_n "(cached) $ac_c" 1>&6
1541else
1542 cat > conftest.$ac_ext <<EOF
93d331ba 1543#line 1544 "configure"
c906108c
SS
1544#include "confdefs.h"
1545#include <sys/types.h>
1546#if STDC_HEADERS
1547#include <stdlib.h>
1548#include <stddef.h>
1549#endif
1550EOF
1551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1552 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1553 rm -rf conftest*
1554 ac_cv_type_size_t=yes
1555else
1556 rm -rf conftest*
1557 ac_cv_type_size_t=no
1558fi
1559rm -f conftest*
1560
1561fi
1562echo "$ac_t""$ac_cv_type_size_t" 1>&6
1563if test $ac_cv_type_size_t = no; then
1564 cat >> confdefs.h <<\EOF
1565#define size_t unsigned
1566EOF
1567
1568fi
1569
1570# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1571# for constant arguments. Useless!
1572echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
93d331ba 1573echo "configure:1574: checking for working alloca.h" >&5
c906108c
SS
1574if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1575 echo $ac_n "(cached) $ac_c" 1>&6
1576else
1577 cat > conftest.$ac_ext <<EOF
93d331ba 1578#line 1579 "configure"
c906108c
SS
1579#include "confdefs.h"
1580#include <alloca.h>
1581int main() {
1582char *p = alloca(2 * sizeof(int));
1583; return 0; }
1584EOF
93d331ba 1585if { (eval echo configure:1586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1586 rm -rf conftest*
1587 ac_cv_header_alloca_h=yes
1588else
1589 echo "configure: failed program was:" >&5
1590 cat conftest.$ac_ext >&5
1591 rm -rf conftest*
1592 ac_cv_header_alloca_h=no
1593fi
1594rm -f conftest*
1595fi
1596
1597echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1598if test $ac_cv_header_alloca_h = yes; then
1599 cat >> confdefs.h <<\EOF
1600#define HAVE_ALLOCA_H 1
1601EOF
1602
1603fi
1604
1605echo $ac_n "checking for alloca""... $ac_c" 1>&6
93d331ba 1606echo "configure:1607: checking for alloca" >&5
c906108c
SS
1607if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1608 echo $ac_n "(cached) $ac_c" 1>&6
1609else
1610 cat > conftest.$ac_ext <<EOF
93d331ba 1611#line 1612 "configure"
c906108c
SS
1612#include "confdefs.h"
1613
1614#ifdef __GNUC__
1615# define alloca __builtin_alloca
1616#else
1617# ifdef _MSC_VER
1618# include <malloc.h>
1619# define alloca _alloca
1620# else
1621# if HAVE_ALLOCA_H
1622# include <alloca.h>
1623# else
1624# ifdef _AIX
1625 #pragma alloca
1626# else
1627# ifndef alloca /* predefined by HP cc +Olibcalls */
1628char *alloca ();
1629# endif
1630# endif
1631# endif
1632# endif
1633#endif
1634
1635int main() {
1636char *p = (char *) alloca(1);
1637; return 0; }
1638EOF
93d331ba 1639if { (eval echo configure:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1640 rm -rf conftest*
1641 ac_cv_func_alloca_works=yes
1642else
1643 echo "configure: failed program was:" >&5
1644 cat conftest.$ac_ext >&5
1645 rm -rf conftest*
1646 ac_cv_func_alloca_works=no
1647fi
1648rm -f conftest*
1649fi
1650
1651echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1652if test $ac_cv_func_alloca_works = yes; then
1653 cat >> confdefs.h <<\EOF
1654#define HAVE_ALLOCA 1
1655EOF
1656
1657fi
1658
1659if test $ac_cv_func_alloca_works = no; then
1660 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1661 # that cause trouble. Some versions do not even contain alloca or
1662 # contain a buggy version. If you still want to use their alloca,
1663 # use ar to extract alloca.o from them instead of compiling alloca.c.
1664 ALLOCA=alloca.${ac_objext}
1665 cat >> confdefs.h <<\EOF
1666#define C_ALLOCA 1
1667EOF
1668
1669
1670echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
93d331ba 1671echo "configure:1672: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1672if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1673 echo $ac_n "(cached) $ac_c" 1>&6
1674else
1675 cat > conftest.$ac_ext <<EOF
93d331ba 1676#line 1677 "configure"
c906108c
SS
1677#include "confdefs.h"
1678#if defined(CRAY) && ! defined(CRAY2)
1679webecray
1680#else
1681wenotbecray
1682#endif
1683
1684EOF
1685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1686 egrep "webecray" >/dev/null 2>&1; then
1687 rm -rf conftest*
1688 ac_cv_os_cray=yes
1689else
1690 rm -rf conftest*
1691 ac_cv_os_cray=no
1692fi
1693rm -f conftest*
1694
1695fi
1696
1697echo "$ac_t""$ac_cv_os_cray" 1>&6
1698if test $ac_cv_os_cray = yes; then
1699for ac_func in _getb67 GETB67 getb67; do
1700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 1701echo "configure:1702: checking for $ac_func" >&5
c906108c
SS
1702if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1703 echo $ac_n "(cached) $ac_c" 1>&6
1704else
1705 cat > conftest.$ac_ext <<EOF
93d331ba 1706#line 1707 "configure"
c906108c
SS
1707#include "confdefs.h"
1708/* System header to define __stub macros and hopefully few prototypes,
1709 which can conflict with char $ac_func(); below. */
1710#include <assert.h>
1711/* Override any gcc2 internal prototype to avoid an error. */
1712/* We use char because int might match the return type of a gcc2
1713 builtin and then its argument prototype would still apply. */
1714char $ac_func();
1715
1716int main() {
1717
1718/* The GNU C library defines this for functions which it implements
1719 to always fail with ENOSYS. Some functions are actually named
1720 something starting with __ and the normal name is an alias. */
1721#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1722choke me
1723#else
1724$ac_func();
1725#endif
1726
1727; return 0; }
1728EOF
93d331ba 1729if { (eval echo configure:1730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1730 rm -rf conftest*
1731 eval "ac_cv_func_$ac_func=yes"
1732else
1733 echo "configure: failed program was:" >&5
1734 cat conftest.$ac_ext >&5
1735 rm -rf conftest*
1736 eval "ac_cv_func_$ac_func=no"
1737fi
1738rm -f conftest*
1739fi
1740
1741if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1742 echo "$ac_t""yes" 1>&6
1743 cat >> confdefs.h <<EOF
1744#define CRAY_STACKSEG_END $ac_func
1745EOF
1746
1747 break
1748else
1749 echo "$ac_t""no" 1>&6
1750fi
1751
1752done
1753fi
1754
1755echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
93d331ba 1756echo "configure:1757: checking stack direction for C alloca" >&5
c906108c
SS
1757if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1758 echo $ac_n "(cached) $ac_c" 1>&6
1759else
1760 if test "$cross_compiling" = yes; then
1761 ac_cv_c_stack_direction=0
1762else
1763 cat > conftest.$ac_ext <<EOF
93d331ba 1764#line 1765 "configure"
c906108c
SS
1765#include "confdefs.h"
1766find_stack_direction ()
1767{
1768 static char *addr = 0;
1769 auto char dummy;
1770 if (addr == 0)
1771 {
1772 addr = &dummy;
1773 return find_stack_direction ();
1774 }
1775 else
1776 return (&dummy > addr) ? 1 : -1;
1777}
1778main ()
1779{
1780 exit (find_stack_direction() < 0);
1781}
1782EOF
93d331ba 1783if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1784then
1785 ac_cv_c_stack_direction=1
1786else
1787 echo "configure: failed program was:" >&5
1788 cat conftest.$ac_ext >&5
1789 rm -fr conftest*
1790 ac_cv_c_stack_direction=-1
1791fi
1792rm -fr conftest*
1793fi
1794
1795fi
1796
1797echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1798cat >> confdefs.h <<EOF
1799#define STACK_DIRECTION $ac_cv_c_stack_direction
1800EOF
1801
1802fi
1803
c41b7eb1 1804for ac_hdr in unistd.h
c906108c
SS
1805do
1806ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1807echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 1808echo "configure:1809: checking for $ac_hdr" >&5
c906108c
SS
1809if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1811else
1812 cat > conftest.$ac_ext <<EOF
93d331ba 1813#line 1814 "configure"
c906108c
SS
1814#include "confdefs.h"
1815#include <$ac_hdr>
1816EOF
1817ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 1818{ (eval echo configure:1819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1819ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1820if test -z "$ac_err"; then
1821 rm -rf conftest*
1822 eval "ac_cv_header_$ac_safe=yes"
1823else
1824 echo "$ac_err" >&5
1825 echo "configure: failed program was:" >&5
1826 cat conftest.$ac_ext >&5
1827 rm -rf conftest*
1828 eval "ac_cv_header_$ac_safe=no"
1829fi
1830rm -f conftest*
1831fi
1832if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1833 echo "$ac_t""yes" 1>&6
1834 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1835 cat >> confdefs.h <<EOF
1836#define $ac_tr_hdr 1
1837EOF
1838
1839else
1840 echo "$ac_t""no" 1>&6
1841fi
1842done
1843
1844for ac_func in getpagesize
1845do
1846echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 1847echo "configure:1848: checking for $ac_func" >&5
c906108c
SS
1848if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1849 echo $ac_n "(cached) $ac_c" 1>&6
1850else
1851 cat > conftest.$ac_ext <<EOF
93d331ba 1852#line 1853 "configure"
c906108c
SS
1853#include "confdefs.h"
1854/* System header to define __stub macros and hopefully few prototypes,
1855 which can conflict with char $ac_func(); below. */
1856#include <assert.h>
1857/* Override any gcc2 internal prototype to avoid an error. */
1858/* We use char because int might match the return type of a gcc2
1859 builtin and then its argument prototype would still apply. */
1860char $ac_func();
1861
1862int main() {
1863
1864/* The GNU C library defines this for functions which it implements
1865 to always fail with ENOSYS. Some functions are actually named
1866 something starting with __ and the normal name is an alias. */
1867#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1868choke me
1869#else
1870$ac_func();
1871#endif
1872
1873; return 0; }
1874EOF
93d331ba 1875if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1876 rm -rf conftest*
1877 eval "ac_cv_func_$ac_func=yes"
1878else
1879 echo "configure: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 rm -rf conftest*
1882 eval "ac_cv_func_$ac_func=no"
1883fi
1884rm -f conftest*
1885fi
1886
1887if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1888 echo "$ac_t""yes" 1>&6
1889 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1890 cat >> confdefs.h <<EOF
1891#define $ac_tr_func 1
1892EOF
1893
1894else
1895 echo "$ac_t""no" 1>&6
1896fi
1897done
1898
1899echo $ac_n "checking for working mmap""... $ac_c" 1>&6
93d331ba 1900echo "configure:1901: checking for working mmap" >&5
c906108c
SS
1901if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1902 echo $ac_n "(cached) $ac_c" 1>&6
1903else
1904 if test "$cross_compiling" = yes; then
1905 ac_cv_func_mmap_fixed_mapped=no
1906else
1907 cat > conftest.$ac_ext <<EOF
93d331ba 1908#line 1909 "configure"
c906108c
SS
1909#include "confdefs.h"
1910
1911/* Thanks to Mike Haertel and Jim Avera for this test.
1912 Here is a matrix of mmap possibilities:
1913 mmap private not fixed
1914 mmap private fixed at somewhere currently unmapped
1915 mmap private fixed at somewhere already mapped
1916 mmap shared not fixed
1917 mmap shared fixed at somewhere currently unmapped
1918 mmap shared fixed at somewhere already mapped
1919 For private mappings, we should verify that changes cannot be read()
1920 back from the file, nor mmap's back from the file at a different
1921 address. (There have been systems where private was not correctly
1922 implemented like the infamous i386 svr4.0, and systems where the
1923 VM page cache was not coherent with the filesystem buffer cache
1924 like early versions of FreeBSD and possibly contemporary NetBSD.)
1925 For shared mappings, we should conversely verify that changes get
1926 propogated back to all the places they're supposed to be.
1927
1928 Grep wants private fixed already mapped.
1929 The main things grep needs to know about mmap are:
1930 * does it exist and is it safe to write into the mmap'd area
1931 * how to use it (BSD variants) */
1932#include <sys/types.h>
1933#include <fcntl.h>
1934#include <sys/mman.h>
1935
1936/* This mess was copied from the GNU getpagesize.h. */
1937#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1938# ifdef HAVE_UNISTD_H
1939# include <unistd.h>
1940# endif
c906108c
SS
1941
1942/* Assume that all systems that can run configure have sys/param.h. */
1943# ifndef HAVE_SYS_PARAM_H
1944# define HAVE_SYS_PARAM_H 1
1945# endif
1946
1947# ifdef _SC_PAGESIZE
1948# define getpagesize() sysconf(_SC_PAGESIZE)
1949# else /* no _SC_PAGESIZE */
1950# ifdef HAVE_SYS_PARAM_H
1951# include <sys/param.h>
1952# ifdef EXEC_PAGESIZE
1953# define getpagesize() EXEC_PAGESIZE
1954# else /* no EXEC_PAGESIZE */
1955# ifdef NBPG
1956# define getpagesize() NBPG * CLSIZE
1957# ifndef CLSIZE
1958# define CLSIZE 1
1959# endif /* no CLSIZE */
1960# else /* no NBPG */
1961# ifdef NBPC
1962# define getpagesize() NBPC
1963# else /* no NBPC */
1964# ifdef PAGESIZE
1965# define getpagesize() PAGESIZE
1966# endif /* PAGESIZE */
1967# endif /* no NBPC */
1968# endif /* no NBPG */
1969# endif /* no EXEC_PAGESIZE */
1970# else /* no HAVE_SYS_PARAM_H */
1971# define getpagesize() 8192 /* punt totally */
1972# endif /* no HAVE_SYS_PARAM_H */
1973# endif /* no _SC_PAGESIZE */
1974
1975#endif /* no HAVE_GETPAGESIZE */
1976
1977#ifdef __cplusplus
1978extern "C" { void *malloc(unsigned); }
1979#else
1980char *malloc();
1981#endif
1982
1983int
1984main()
1985{
1986 char *data, *data2, *data3;
1987 int i, pagesize;
1988 int fd;
1989
1990 pagesize = getpagesize();
1991
1992 /*
1993 * First, make a file with some known garbage in it.
1994 */
1995 data = malloc(pagesize);
1996 if (!data)
1997 exit(1);
1998 for (i = 0; i < pagesize; ++i)
1999 *(data + i) = rand();
2000 umask(0);
2001 fd = creat("conftestmmap", 0600);
2002 if (fd < 0)
2003 exit(1);
2004 if (write(fd, data, pagesize) != pagesize)
2005 exit(1);
2006 close(fd);
2007
2008 /*
2009 * Next, try to mmap the file at a fixed address which
2010 * already has something else allocated at it. If we can,
2011 * also make sure that we see the same garbage.
2012 */
2013 fd = open("conftestmmap", O_RDWR);
2014 if (fd < 0)
2015 exit(1);
2016 data2 = malloc(2 * pagesize);
2017 if (!data2)
2018 exit(1);
2019 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2020 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2021 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2022 exit(1);
2023 for (i = 0; i < pagesize; ++i)
2024 if (*(data + i) != *(data2 + i))
2025 exit(1);
2026
2027 /*
2028 * Finally, make sure that changes to the mapped area
2029 * do not percolate back to the file as seen by read().
2030 * (This is a bug on some variants of i386 svr4.0.)
2031 */
2032 for (i = 0; i < pagesize; ++i)
2033 *(data2 + i) = *(data2 + i) + 1;
2034 data3 = malloc(pagesize);
2035 if (!data3)
2036 exit(1);
2037 if (read(fd, data3, pagesize) != pagesize)
2038 exit(1);
2039 for (i = 0; i < pagesize; ++i)
2040 if (*(data + i) != *(data3 + i))
2041 exit(1);
2042 close(fd);
2043 unlink("conftestmmap");
2044 exit(0);
2045}
2046
2047EOF
93d331ba 2048if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2049then
2050 ac_cv_func_mmap_fixed_mapped=yes
2051else
2052 echo "configure: failed program was:" >&5
2053 cat conftest.$ac_ext >&5
2054 rm -fr conftest*
2055 ac_cv_func_mmap_fixed_mapped=no
2056fi
2057rm -fr conftest*
2058fi
2059
2060fi
2061
2062echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2063if test $ac_cv_func_mmap_fixed_mapped = yes; then
2064 cat >> confdefs.h <<\EOF
2065#define HAVE_MMAP 1
2066EOF
2067
2068fi
2069
2070
2071 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2072unistd.h values.h sys/param.h
2073do
2074ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2075echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 2076echo "configure:2077: checking for $ac_hdr" >&5
c906108c
SS
2077if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
2079else
2080 cat > conftest.$ac_ext <<EOF
93d331ba 2081#line 2082 "configure"
c906108c
SS
2082#include "confdefs.h"
2083#include <$ac_hdr>
2084EOF
2085ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 2086{ (eval echo configure:2087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2087ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2088if test -z "$ac_err"; then
2089 rm -rf conftest*
2090 eval "ac_cv_header_$ac_safe=yes"
2091else
2092 echo "$ac_err" >&5
2093 echo "configure: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 rm -rf conftest*
2096 eval "ac_cv_header_$ac_safe=no"
2097fi
2098rm -f conftest*
2099fi
2100if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2101 echo "$ac_t""yes" 1>&6
2102 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2103 cat >> confdefs.h <<EOF
2104#define $ac_tr_hdr 1
2105EOF
2106
2107else
2108 echo "$ac_t""no" 1>&6
2109fi
2110done
2111
2112 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2113__argz_count __argz_stringify __argz_next
2114do
2115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 2116echo "configure:2117: checking for $ac_func" >&5
c906108c
SS
2117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119else
2120 cat > conftest.$ac_ext <<EOF
93d331ba 2121#line 2122 "configure"
c906108c
SS
2122#include "confdefs.h"
2123/* System header to define __stub macros and hopefully few prototypes,
2124 which can conflict with char $ac_func(); below. */
2125#include <assert.h>
2126/* Override any gcc2 internal prototype to avoid an error. */
2127/* We use char because int might match the return type of a gcc2
2128 builtin and then its argument prototype would still apply. */
2129char $ac_func();
2130
2131int main() {
2132
2133/* The GNU C library defines this for functions which it implements
2134 to always fail with ENOSYS. Some functions are actually named
2135 something starting with __ and the normal name is an alias. */
2136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2137choke me
2138#else
2139$ac_func();
2140#endif
2141
2142; return 0; }
2143EOF
93d331ba 2144if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2145 rm -rf conftest*
2146 eval "ac_cv_func_$ac_func=yes"
2147else
2148 echo "configure: failed program was:" >&5
2149 cat conftest.$ac_ext >&5
2150 rm -rf conftest*
2151 eval "ac_cv_func_$ac_func=no"
2152fi
2153rm -f conftest*
2154fi
2155
2156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2157 echo "$ac_t""yes" 1>&6
2158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2159 cat >> confdefs.h <<EOF
2160#define $ac_tr_func 1
2161EOF
2162
2163else
2164 echo "$ac_t""no" 1>&6
2165fi
2166done
2167
2168
2169 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2170 for ac_func in stpcpy
2171do
2172echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 2173echo "configure:2174: checking for $ac_func" >&5
c906108c
SS
2174if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176else
2177 cat > conftest.$ac_ext <<EOF
93d331ba 2178#line 2179 "configure"
c906108c
SS
2179#include "confdefs.h"
2180/* System header to define __stub macros and hopefully few prototypes,
2181 which can conflict with char $ac_func(); below. */
2182#include <assert.h>
2183/* Override any gcc2 internal prototype to avoid an error. */
2184/* We use char because int might match the return type of a gcc2
2185 builtin and then its argument prototype would still apply. */
2186char $ac_func();
2187
2188int main() {
2189
2190/* The GNU C library defines this for functions which it implements
2191 to always fail with ENOSYS. Some functions are actually named
2192 something starting with __ and the normal name is an alias. */
2193#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2194choke me
2195#else
2196$ac_func();
2197#endif
2198
2199; return 0; }
2200EOF
93d331ba 2201if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2202 rm -rf conftest*
2203 eval "ac_cv_func_$ac_func=yes"
2204else
2205 echo "configure: failed program was:" >&5
2206 cat conftest.$ac_ext >&5
2207 rm -rf conftest*
2208 eval "ac_cv_func_$ac_func=no"
2209fi
2210rm -f conftest*
2211fi
2212
2213if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2214 echo "$ac_t""yes" 1>&6
2215 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2216 cat >> confdefs.h <<EOF
2217#define $ac_tr_func 1
2218EOF
2219
2220else
2221 echo "$ac_t""no" 1>&6
2222fi
2223done
2224
2225 fi
2226 if test "${ac_cv_func_stpcpy}" = "yes"; then
2227 cat >> confdefs.h <<\EOF
2228#define HAVE_STPCPY 1
2229EOF
2230
2231 fi
2232
2233 if test $ac_cv_header_locale_h = yes; then
2234 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
93d331ba 2235echo "configure:2236: checking for LC_MESSAGES" >&5
c906108c
SS
2236if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2237 echo $ac_n "(cached) $ac_c" 1>&6
2238else
2239 cat > conftest.$ac_ext <<EOF
93d331ba 2240#line 2241 "configure"
c906108c
SS
2241#include "confdefs.h"
2242#include <locale.h>
2243int main() {
2244return LC_MESSAGES
2245; return 0; }
2246EOF
93d331ba 2247if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2248 rm -rf conftest*
2249 am_cv_val_LC_MESSAGES=yes
2250else
2251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2253 rm -rf conftest*
2254 am_cv_val_LC_MESSAGES=no
2255fi
2256rm -f conftest*
2257fi
2258
2259echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2260 if test $am_cv_val_LC_MESSAGES = yes; then
2261 cat >> confdefs.h <<\EOF
2262#define HAVE_LC_MESSAGES 1
2263EOF
2264
2265 fi
2266 fi
2267 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
93d331ba 2268echo "configure:2269: checking whether NLS is requested" >&5
c906108c
SS
2269 # Check whether --enable-nls or --disable-nls was given.
2270if test "${enable_nls+set}" = set; then
2271 enableval="$enable_nls"
2272 USE_NLS=$enableval
2273else
2274 USE_NLS=yes
2275fi
2276
2277 echo "$ac_t""$USE_NLS" 1>&6
2278
2279
2280 USE_INCLUDED_LIBINTL=no
2281
2282 if test "$USE_NLS" = "yes"; then
2283 cat >> confdefs.h <<\EOF
2284#define ENABLE_NLS 1
2285EOF
2286
2287 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
93d331ba 2288echo "configure:2289: checking whether included gettext is requested" >&5
c906108c
SS
2289 # Check whether --with-included-gettext or --without-included-gettext was given.
2290if test "${with_included_gettext+set}" = set; then
2291 withval="$with_included_gettext"
2292 nls_cv_force_use_gnu_gettext=$withval
2293else
2294 nls_cv_force_use_gnu_gettext=no
2295fi
2296
2297 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2298
2299 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2300 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2301 nls_cv_header_intl=
2302 nls_cv_header_libgt=
2303 CATOBJEXT=NONE
2304
2305 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2306echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
93d331ba 2307echo "configure:2308: checking for libintl.h" >&5
c906108c
SS
2308if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2309 echo $ac_n "(cached) $ac_c" 1>&6
2310else
2311 cat > conftest.$ac_ext <<EOF
93d331ba 2312#line 2313 "configure"
c906108c
SS
2313#include "confdefs.h"
2314#include <libintl.h>
2315EOF
2316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 2317{ (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2319if test -z "$ac_err"; then
2320 rm -rf conftest*
2321 eval "ac_cv_header_$ac_safe=yes"
2322else
2323 echo "$ac_err" >&5
2324 echo "configure: failed program was:" >&5
2325 cat conftest.$ac_ext >&5
2326 rm -rf conftest*
2327 eval "ac_cv_header_$ac_safe=no"
2328fi
2329rm -f conftest*
2330fi
2331if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2332 echo "$ac_t""yes" 1>&6
2333 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
93d331ba 2334echo "configure:2335: checking for gettext in libc" >&5
c906108c
SS
2335if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2336 echo $ac_n "(cached) $ac_c" 1>&6
2337else
2338 cat > conftest.$ac_ext <<EOF
93d331ba 2339#line 2340 "configure"
c906108c
SS
2340#include "confdefs.h"
2341#include <libintl.h>
2342int main() {
2343return (int) gettext ("")
2344; return 0; }
2345EOF
93d331ba 2346if { (eval echo configure:2347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2347 rm -rf conftest*
2348 gt_cv_func_gettext_libc=yes
2349else
2350 echo "configure: failed program was:" >&5
2351 cat conftest.$ac_ext >&5
2352 rm -rf conftest*
2353 gt_cv_func_gettext_libc=no
2354fi
2355rm -f conftest*
2356fi
2357
2358echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2359
2360 if test "$gt_cv_func_gettext_libc" != "yes"; then
2361 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
93d331ba 2362echo "configure:2363: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2363ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2364if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
2366else
2367 ac_save_LIBS="$LIBS"
2368LIBS="-lintl $LIBS"
2369cat > conftest.$ac_ext <<EOF
93d331ba 2370#line 2371 "configure"
c906108c
SS
2371#include "confdefs.h"
2372/* Override any gcc2 internal prototype to avoid an error. */
2373/* We use char because int might match the return type of a gcc2
2374 builtin and then its argument prototype would still apply. */
2375char bindtextdomain();
2376
2377int main() {
2378bindtextdomain()
2379; return 0; }
2380EOF
93d331ba 2381if { (eval echo configure:2382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2382 rm -rf conftest*
2383 eval "ac_cv_lib_$ac_lib_var=yes"
2384else
2385 echo "configure: failed program was:" >&5
2386 cat conftest.$ac_ext >&5
2387 rm -rf conftest*
2388 eval "ac_cv_lib_$ac_lib_var=no"
2389fi
2390rm -f conftest*
2391LIBS="$ac_save_LIBS"
2392
2393fi
2394if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2395 echo "$ac_t""yes" 1>&6
2396 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
93d331ba 2397echo "configure:2398: checking for gettext in libintl" >&5
c906108c
SS
2398if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2399 echo $ac_n "(cached) $ac_c" 1>&6
2400else
2401 cat > conftest.$ac_ext <<EOF
93d331ba 2402#line 2403 "configure"
c906108c
SS
2403#include "confdefs.h"
2404
2405int main() {
2406return (int) gettext ("")
2407; return 0; }
2408EOF
93d331ba 2409if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2410 rm -rf conftest*
2411 gt_cv_func_gettext_libintl=yes
2412else
2413 echo "configure: failed program was:" >&5
2414 cat conftest.$ac_ext >&5
2415 rm -rf conftest*
2416 gt_cv_func_gettext_libintl=no
2417fi
2418rm -f conftest*
2419fi
2420
2421echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2422else
2423 echo "$ac_t""no" 1>&6
2424fi
2425
2426 fi
2427
2428 if test "$gt_cv_func_gettext_libc" = "yes" \
2429 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2430 cat >> confdefs.h <<\EOF
2431#define HAVE_GETTEXT 1
2432EOF
2433
2434 # Extract the first word of "msgfmt", so it can be a program name with args.
2435set dummy msgfmt; ac_word=$2
2436echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2437echo "configure:2438: checking for $ac_word" >&5
c906108c
SS
2438if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
2440else
2441 case "$MSGFMT" in
2442 /*)
2443 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2444 ;;
2445 *)
2446 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2447 for ac_dir in $PATH; do
2448 test -z "$ac_dir" && ac_dir=.
2449 if test -f $ac_dir/$ac_word; then
2450 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2451 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2452 break
2453 fi
2454 fi
2455 done
2456 IFS="$ac_save_ifs"
2457 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2458 ;;
2459esac
2460fi
2461MSGFMT="$ac_cv_path_MSGFMT"
2462if test -n "$MSGFMT"; then
2463 echo "$ac_t""$MSGFMT" 1>&6
2464else
2465 echo "$ac_t""no" 1>&6
2466fi
2467 if test "$MSGFMT" != "no"; then
2468 for ac_func in dcgettext
2469do
2470echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 2471echo "configure:2472: checking for $ac_func" >&5
c906108c
SS
2472if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2473 echo $ac_n "(cached) $ac_c" 1>&6
2474else
2475 cat > conftest.$ac_ext <<EOF
93d331ba 2476#line 2477 "configure"
c906108c
SS
2477#include "confdefs.h"
2478/* System header to define __stub macros and hopefully few prototypes,
2479 which can conflict with char $ac_func(); below. */
2480#include <assert.h>
2481/* Override any gcc2 internal prototype to avoid an error. */
2482/* We use char because int might match the return type of a gcc2
2483 builtin and then its argument prototype would still apply. */
2484char $ac_func();
2485
2486int main() {
2487
2488/* The GNU C library defines this for functions which it implements
2489 to always fail with ENOSYS. Some functions are actually named
2490 something starting with __ and the normal name is an alias. */
2491#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2492choke me
2493#else
2494$ac_func();
2495#endif
2496
2497; return 0; }
2498EOF
93d331ba 2499if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2500 rm -rf conftest*
2501 eval "ac_cv_func_$ac_func=yes"
2502else
2503 echo "configure: failed program was:" >&5
2504 cat conftest.$ac_ext >&5
2505 rm -rf conftest*
2506 eval "ac_cv_func_$ac_func=no"
2507fi
2508rm -f conftest*
2509fi
2510
2511if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2512 echo "$ac_t""yes" 1>&6
2513 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2514 cat >> confdefs.h <<EOF
2515#define $ac_tr_func 1
2516EOF
2517
2518else
2519 echo "$ac_t""no" 1>&6
2520fi
2521done
2522
2523 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2524set dummy gmsgfmt; ac_word=$2
2525echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2526echo "configure:2527: checking for $ac_word" >&5
c906108c
SS
2527if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2528 echo $ac_n "(cached) $ac_c" 1>&6
2529else
2530 case "$GMSGFMT" in
2531 /*)
2532 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2533 ;;
2534 ?:/*)
2535 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2536 ;;
2537 *)
2538 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2539 ac_dummy="$PATH"
2540 for ac_dir in $ac_dummy; do
2541 test -z "$ac_dir" && ac_dir=.
2542 if test -f $ac_dir/$ac_word; then
2543 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2544 break
2545 fi
2546 done
2547 IFS="$ac_save_ifs"
2548 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2549 ;;
2550esac
2551fi
2552GMSGFMT="$ac_cv_path_GMSGFMT"
2553if test -n "$GMSGFMT"; then
2554 echo "$ac_t""$GMSGFMT" 1>&6
2555else
2556 echo "$ac_t""no" 1>&6
2557fi
2558
2559 # Extract the first word of "xgettext", so it can be a program name with args.
2560set dummy xgettext; ac_word=$2
2561echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2562echo "configure:2563: checking for $ac_word" >&5
c906108c
SS
2563if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2565else
2566 case "$XGETTEXT" in
2567 /*)
2568 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2569 ;;
2570 *)
2571 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2572 for ac_dir in $PATH; do
2573 test -z "$ac_dir" && ac_dir=.
2574 if test -f $ac_dir/$ac_word; then
2575 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2576 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2577 break
2578 fi
2579 fi
2580 done
2581 IFS="$ac_save_ifs"
2582 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2583 ;;
2584esac
2585fi
2586XGETTEXT="$ac_cv_path_XGETTEXT"
2587if test -n "$XGETTEXT"; then
2588 echo "$ac_t""$XGETTEXT" 1>&6
2589else
2590 echo "$ac_t""no" 1>&6
2591fi
2592
2593 cat > conftest.$ac_ext <<EOF
93d331ba 2594#line 2595 "configure"
c906108c
SS
2595#include "confdefs.h"
2596
2597int main() {
2598extern int _nl_msg_cat_cntr;
2599 return _nl_msg_cat_cntr
2600; return 0; }
2601EOF
93d331ba 2602if { (eval echo configure:2603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2603 rm -rf conftest*
2604 CATOBJEXT=.gmo
2605 DATADIRNAME=share
2606else
2607 echo "configure: failed program was:" >&5
2608 cat conftest.$ac_ext >&5
2609 rm -rf conftest*
2610 CATOBJEXT=.mo
2611 DATADIRNAME=lib
2612fi
2613rm -f conftest*
2614 INSTOBJEXT=.mo
2615 fi
2616 fi
2617
2618else
2619 echo "$ac_t""no" 1>&6
2620fi
2621
2622
2623
2624 if test "$CATOBJEXT" = "NONE"; then
2625 nls_cv_use_gnu_gettext=yes
2626 fi
2627 fi
2628
2629 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2630 INTLOBJS="\$(GETTOBJS)"
2631 # Extract the first word of "msgfmt", so it can be a program name with args.
2632set dummy msgfmt; ac_word=$2
2633echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2634echo "configure:2635: checking for $ac_word" >&5
c906108c
SS
2635if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2636 echo $ac_n "(cached) $ac_c" 1>&6
2637else
2638 case "$MSGFMT" in
2639 /*)
2640 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2641 ;;
2642 *)
2643 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2644 for ac_dir in $PATH; do
2645 test -z "$ac_dir" && ac_dir=.
2646 if test -f $ac_dir/$ac_word; then
2647 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2648 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2649 break
2650 fi
2651 fi
2652 done
2653 IFS="$ac_save_ifs"
2654 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2655 ;;
2656esac
2657fi
2658MSGFMT="$ac_cv_path_MSGFMT"
2659if test -n "$MSGFMT"; then
2660 echo "$ac_t""$MSGFMT" 1>&6
2661else
2662 echo "$ac_t""no" 1>&6
2663fi
2664
2665 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2666set dummy gmsgfmt; ac_word=$2
2667echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2668echo "configure:2669: checking for $ac_word" >&5
c906108c
SS
2669if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2670 echo $ac_n "(cached) $ac_c" 1>&6
2671else
2672 case "$GMSGFMT" in
2673 /*)
2674 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2675 ;;
2676 ?:/*)
2677 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2678 ;;
2679 *)
2680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2681 ac_dummy="$PATH"
2682 for ac_dir in $ac_dummy; do
2683 test -z "$ac_dir" && ac_dir=.
2684 if test -f $ac_dir/$ac_word; then
2685 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2686 break
2687 fi
2688 done
2689 IFS="$ac_save_ifs"
2690 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2691 ;;
2692esac
2693fi
2694GMSGFMT="$ac_cv_path_GMSGFMT"
2695if test -n "$GMSGFMT"; then
2696 echo "$ac_t""$GMSGFMT" 1>&6
2697else
2698 echo "$ac_t""no" 1>&6
2699fi
2700
2701 # Extract the first word of "xgettext", so it can be a program name with args.
2702set dummy xgettext; ac_word=$2
2703echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 2704echo "configure:2705: checking for $ac_word" >&5
c906108c
SS
2705if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2706 echo $ac_n "(cached) $ac_c" 1>&6
2707else
2708 case "$XGETTEXT" in
2709 /*)
2710 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2711 ;;
2712 *)
2713 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2714 for ac_dir in $PATH; do
2715 test -z "$ac_dir" && ac_dir=.
2716 if test -f $ac_dir/$ac_word; then
2717 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2718 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2719 break
2720 fi
2721 fi
2722 done
2723 IFS="$ac_save_ifs"
2724 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2725 ;;
2726esac
2727fi
2728XGETTEXT="$ac_cv_path_XGETTEXT"
2729if test -n "$XGETTEXT"; then
2730 echo "$ac_t""$XGETTEXT" 1>&6
2731else
2732 echo "$ac_t""no" 1>&6
2733fi
2734
2735
2736 USE_INCLUDED_LIBINTL=yes
2737 CATOBJEXT=.gmo
2738 INSTOBJEXT=.mo
2739 DATADIRNAME=share
2740 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2741 INTLLIBS=$INTLDEPS
2742 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2743 nls_cv_header_intl=libintl.h
2744 nls_cv_header_libgt=libgettext.h
2745 fi
2746
2747 if test "$XGETTEXT" != ":"; then
2748 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2749 : ;
2750 else
2751 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2752 XGETTEXT=":"
2753 fi
2754 fi
2755
2756 # We need to process the po/ directory.
2757 POSUB=po
2758 else
2759 DATADIRNAME=share
2760 nls_cv_header_intl=libintl.h
2761 nls_cv_header_libgt=libgettext.h
2762 fi
2763
2764 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2765 # because some of the sources are only built for this goal.
2766 if test "$PACKAGE" = gettext; then
2767 USE_NLS=yes
2768 USE_INCLUDED_LIBINTL=yes
2769 fi
2770
2771 for lang in $ALL_LINGUAS; do
2772 GMOFILES="$GMOFILES $lang.gmo"
2773 POFILES="$POFILES $lang.po"
2774 done
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789 if test "x$CATOBJEXT" != "x"; then
2790 if test "x$ALL_LINGUAS" = "x"; then
2791 LINGUAS=
2792 else
2793 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
93d331ba 2794echo "configure:2795: checking for catalogs to be installed" >&5
c906108c
SS
2795 NEW_LINGUAS=
2796 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2797 case "$ALL_LINGUAS" in
2798 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2799 esac
2800 done
2801 LINGUAS=$NEW_LINGUAS
2802 echo "$ac_t""$LINGUAS" 1>&6
2803 fi
2804
2805 if test -n "$LINGUAS"; then
2806 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2807 fi
2808 fi
2809
2810 if test $ac_cv_header_locale_h = yes; then
2811 INCLUDE_LOCALE_H="#include <locale.h>"
2812 else
2813 INCLUDE_LOCALE_H="\
2814/* The system does not provide the header <locale.h>. Take care yourself. */"
2815 fi
2816
2817
2818 if test -f $srcdir/po2tbl.sed.in; then
2819 if test "$CATOBJEXT" = ".cat"; then
2820 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2821echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
93d331ba 2822echo "configure:2823: checking for linux/version.h" >&5
c906108c
SS
2823if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2824 echo $ac_n "(cached) $ac_c" 1>&6
2825else
2826 cat > conftest.$ac_ext <<EOF
93d331ba 2827#line 2828 "configure"
c906108c
SS
2828#include "confdefs.h"
2829#include <linux/version.h>
2830EOF
2831ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 2832{ (eval echo configure:2833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2833ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2834if test -z "$ac_err"; then
2835 rm -rf conftest*
2836 eval "ac_cv_header_$ac_safe=yes"
2837else
2838 echo "$ac_err" >&5
2839 echo "configure: failed program was:" >&5
2840 cat conftest.$ac_ext >&5
2841 rm -rf conftest*
2842 eval "ac_cv_header_$ac_safe=no"
2843fi
2844rm -f conftest*
2845fi
2846if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2847 echo "$ac_t""yes" 1>&6
2848 msgformat=linux
2849else
2850 echo "$ac_t""no" 1>&6
2851msgformat=xopen
2852fi
2853
2854
2855 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2856 fi
2857 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2858 $srcdir/po2tbl.sed.in > po2tbl.sed
2859 fi
2860
2861 if test "$PACKAGE" = "gettext"; then
2862 GT_NO="#NO#"
2863 GT_YES=
2864 else
2865 GT_NO=
2866 GT_YES="#YES#"
2867 fi
2868
2869
2870
2871 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2872
2873
2874 l=
2875
2876
4536bbc6 2877 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2878 test -d po || mkdir po
2879 if test "x$srcdir" != "x."; then
2880 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2881 posrcprefix="$srcdir/"
2882 else
2883 posrcprefix="../$srcdir/"
2884 fi
2885 else
2886 posrcprefix="../"
2887 fi
2888 rm -f po/POTFILES
2889 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2890 < $srcdir/po/POTFILES.in > po/POTFILES
2891 fi
2892
0fbb3da7
TT
2893cat >> confdefs.h <<\EOF
2894#define PACKAGE "gdb"
2895EOF
2896
2897
c906108c
SS
2898
2899
2900CONFIG_OBS=
66b965bb 2901CONFIG_LIB_OBS=
c906108c
SS
2902CONFIG_DEPS=
2903CONFIG_SRCS=
fb40c209
AC
2904CONFIG_INITS=
2905ENABLE_CFLAGS=
b3a90332
AC
2906CONFIG_ALL=
2907CONFIG_CLEAN=
e56ac5c3
AC
2908CONFIG_INSTALL=
2909CONFIG_UNINSTALL=
c906108c 2910
ffc6a242 2911SUBDIRS="doc testsuite nlm"
c906108c
SS
2912configdirs="doc testsuite"
2913
96baa820
JM
2914# Check whether --enable-multi-ice or --disable-multi-ice was given.
2915if test "${enable_multi_ice+set}" = set; then
2916 enableval="$enable_multi_ice"
2917 case "${enableval}" in
2918 yes ) enable_multi_ice="yes" ;;
2919 no) enable_multi_ice="no" ;;
2920 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2921 esac
2922
2923fi
2924
2925
2926if test "${enable_multi_ice}" = "yes"; then
2927 configdirs="${configdirs} multi-ice"
2928fi
2929
27e9bf90 2930. $srcdir/configure.host
c906108c 2931
27e9bf90 2932. $srcdir/configure.tgt
c906108c 2933
27e9bf90
MK
2934# Fetch the default architecture and default target vector from BFD.
2935targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2936
27e9bf90
MK
2937# We only want the first architecture, so strip off the others if
2938# there is more than one.
2939targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2940
27e9bf90
MK
2941if test "x$targ_archs" != x; then
2942 cat >> confdefs.h <<EOF
2943#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2944EOF
2945
2946fi
27e9bf90
MK
2947if test "x$targ_defvec" != x; then
2948 cat >> confdefs.h <<EOF
2949#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2950EOF
2951
2952fi
c906108c 2953
8bb2c122
MK
2954if test "$program_transform_name" = s,x,x,; then
2955 program_transform_name=
2956else
2957 # Double any \ or $. echo might interpret backslashes.
2958 cat <<\EOF_SED > conftestsed
2959s,\\,\\\\,g; s,\$,$$,g
2960EOF_SED
2961 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2962 rm -f conftestsed
2963fi
2964test "$program_prefix" != NONE &&
2965 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2966# Use a double $ so make ignores it.
2967test "$program_suffix" != NONE &&
2968 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2969
2970# sed with no file args requires a program.
2971test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2972
2973
627af7ea
MK
2974# The CLI cannot be disabled yet, but may be in the future.
2975
2976# Enable CLI.
2977# Check whether --enable-gdbcli or --disable-gdbcli was given.
2978if test "${enable_gdbcli+set}" = set; then
2979 enableval="$enable_gdbcli"
2980 case $enableval in
2981 yes)
2982 ;;
2983 no)
2984 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2985 *)
2986 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2987 esac
2988else
2989 enable_gdbcli=yes
2990fi
2991
2992if test x"$enable_gdbcli" = xyes; then
2993 if test -d $srcdir/cli; then
2994 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2995 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2996 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2997 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2998 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2999 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3000 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3001 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3002 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3003 fi
3004fi
3005
3006# Enable MI.
3007# Check whether --enable-gdbmi or --disable-gdbmi was given.
3008if test "${enable_gdbmi+set}" = set; then
3009 enableval="$enable_gdbmi"
3010 case $enableval in
3011 yes | no)
3012 ;;
3013 *)
3014 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3015 esac
3016else
3017 enable_gdbmi=yes
3018fi
3019
3020if test x"$enable_gdbmi" = xyes; then
3021 if test -d $srcdir/mi; then
3022 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3023 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3024 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3025 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3026 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3027 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3028 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3029 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3030 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3031 fi
3032fi
3033
06825bd1
MK
3034# Enable TUI.
3035# Check whether --enable-tui or --disable-tui was given.
3036if test "${enable_tui+set}" = set; then
3037 enableval="$enable_tui"
3038 case $enableval in
3039 yes | no)
3040 ;;
3041 *)
3042 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3043 esac
3044fi
3045
3046if test x"$enable_tui" = xyes; then
3047 if test -d $srcdir/tui; then
3048 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3049 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3050 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3051 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3052 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3053 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3054 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3055 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3056 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3057 need_curses=yes
3058 fi
3059fi
3060
8bb2c122
MK
3061# --------------------- #
3062# Checks for programs. #
3063# --------------------- #
3064
c41b7eb1 3065for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3066do
3067# Extract the first word of "$ac_prog", so it can be a program name with args.
3068set dummy $ac_prog; ac_word=$2
3069echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3070echo "configure:3071: checking for $ac_word" >&5
7a292a7a
SS
3071if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3073else
3074 if test -n "$AWK"; then
3075 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3076else
3077 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3078 ac_dummy="$PATH"
3079 for ac_dir in $ac_dummy; do
3080 test -z "$ac_dir" && ac_dir=.
3081 if test -f $ac_dir/$ac_word; then
3082 ac_cv_prog_AWK="$ac_prog"
3083 break
3084 fi
3085 done
3086 IFS="$ac_save_ifs"
3087fi
3088fi
3089AWK="$ac_cv_prog_AWK"
3090if test -n "$AWK"; then
3091 echo "$ac_t""$AWK" 1>&6
3092else
3093 echo "$ac_t""no" 1>&6
3094fi
3095
3096test -n "$AWK" && break
3097done
3098
c906108c
SS
3099# Find a good install program. We prefer a C program (faster),
3100# so one script is as good as another. But avoid the broken or
3101# incompatible versions:
3102# SysV /etc/install, /usr/sbin/install
3103# SunOS /usr/etc/install
3104# IRIX /sbin/install
3105# AIX /bin/install
3106# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3107# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3108# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3109# ./install, which can be erroneously created by make from ./install.sh.
3110echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
93d331ba 3111echo "configure:3112: checking for a BSD compatible install" >&5
c906108c
SS
3112if test -z "$INSTALL"; then
3113if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3114 echo $ac_n "(cached) $ac_c" 1>&6
3115else
3116 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3117 for ac_dir in $PATH; do
3118 # Account for people who put trailing slashes in PATH elements.
3119 case "$ac_dir/" in
3120 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3121 *)
3122 # OSF1 and SCO ODT 3.0 have their own names for install.
3123 # Don't use installbsd from OSF since it installs stuff as root
3124 # by default.
3125 for ac_prog in ginstall scoinst install; do
3126 if test -f $ac_dir/$ac_prog; then
3127 if test $ac_prog = install &&
3128 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3129 # AIX install. It has an incompatible calling convention.
3130 :
3131 else
3132 ac_cv_path_install="$ac_dir/$ac_prog -c"
3133 break 2
3134 fi
3135 fi
3136 done
3137 ;;
3138 esac
3139 done
3140 IFS="$ac_save_IFS"
3141
3142fi
3143 if test "${ac_cv_path_install+set}" = set; then
3144 INSTALL="$ac_cv_path_install"
3145 else
3146 # As a last resort, use the slow shell script. We don't cache a
3147 # path for INSTALL within a source directory, because that will
3148 # break other packages using the cache if that directory is
3149 # removed, or if the path is relative.
3150 INSTALL="$ac_install_sh"
3151 fi
3152fi
3153echo "$ac_t""$INSTALL" 1>&6
3154
3155# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3156# It thinks the first close brace ends the variable substitution.
3157test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3158
3159test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3160
3161test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3162
8bb2c122 3163echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
93d331ba 3164echo "configure:3165: checking whether ln -s works" >&5
8bb2c122
MK
3165if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3166 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3167else
8bb2c122
MK
3168 rm -f conftestdata
3169if ln -s X conftestdata 2>/dev/null
3170then
3171 rm -f conftestdata
3172 ac_cv_prog_LN_S="ln -s"
3173else
3174 ac_cv_prog_LN_S=ln
3175fi
3176fi
3177LN_S="$ac_cv_prog_LN_S"
3178if test "$ac_cv_prog_LN_S" = "ln -s"; then
3179 echo "$ac_t""yes" 1>&6
3180else
3181 echo "$ac_t""no" 1>&6
c906108c
SS
3182fi
3183
8bb2c122
MK
3184# Extract the first word of "ranlib", so it can be a program name with args.
3185set dummy ranlib; ac_word=$2
c906108c 3186echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3187echo "configure:3188: checking for $ac_word" >&5
8bb2c122 3188if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3189 echo $ac_n "(cached) $ac_c" 1>&6
3190else
8bb2c122
MK
3191 if test -n "$RANLIB"; then
3192 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3193else
3194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3195 ac_dummy="$PATH"
3196 for ac_dir in $ac_dummy; do
3197 test -z "$ac_dir" && ac_dir=.
3198 if test -f $ac_dir/$ac_word; then
8bb2c122 3199 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3200 break
3201 fi
3202 done
3203 IFS="$ac_save_ifs"
8bb2c122 3204 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3205fi
3206fi
8bb2c122
MK
3207RANLIB="$ac_cv_prog_RANLIB"
3208if test -n "$RANLIB"; then
3209 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3210else
3211 echo "$ac_t""no" 1>&6
3212fi
3213
8bb2c122
MK
3214for ac_prog in 'bison -y' byacc
3215do
3216# Extract the first word of "$ac_prog", so it can be a program name with args.
3217set dummy $ac_prog; ac_word=$2
c906108c 3218echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3219echo "configure:3220: checking for $ac_word" >&5
8bb2c122 3220if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3221 echo $ac_n "(cached) $ac_c" 1>&6
3222else
8bb2c122
MK
3223 if test -n "$YACC"; then
3224 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3225else
3226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229 test -z "$ac_dir" && ac_dir=.
3230 if test -f $ac_dir/$ac_word; then
8bb2c122 3231 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3232 break
3233 fi
3234 done
3235 IFS="$ac_save_ifs"
3236fi
3237fi
8bb2c122
MK
3238YACC="$ac_cv_prog_YACC"
3239if test -n "$YACC"; then
3240 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3241else
3242 echo "$ac_t""no" 1>&6
3243fi
3244
8bb2c122
MK
3245test -n "$YACC" && break
3246done
3247test -n "$YACC" || YACC="yacc"
c906108c 3248
8bb2c122
MK
3249
3250# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3251set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3252echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3253echo "configure:3254: checking for $ac_word" >&5
8bb2c122 3254if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3255 echo $ac_n "(cached) $ac_c" 1>&6
3256else
8bb2c122
MK
3257 if test -n "$AR"; then
3258 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3259else
3260 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3261 ac_dummy="$PATH"
3262 for ac_dir in $ac_dummy; do
3263 test -z "$ac_dir" && ac_dir=.
3264 if test -f $ac_dir/$ac_word; then
8bb2c122 3265 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3266 break
3267 fi
3268 done
3269 IFS="$ac_save_ifs"
8bb2c122 3270 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3271fi
3272fi
8bb2c122
MK
3273AR="$ac_cv_prog_AR"
3274if test -n "$AR"; then
3275 echo "$ac_t""$AR" 1>&6
c906108c
SS
3276else
3277 echo "$ac_t""no" 1>&6
3278fi
3279
8bb2c122 3280
c906108c 3281
95ca63c4
CF
3282# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3283set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3284echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3285echo "configure:3286: checking for $ac_word" >&5
95ca63c4
CF
3286if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3287 echo $ac_n "(cached) $ac_c" 1>&6
3288else
3289 if test -n "$DLLTOOL"; then
3290 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3291else
3292 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3293 ac_dummy="$PATH"
3294 for ac_dir in $ac_dummy; do
3295 test -z "$ac_dir" && ac_dir=.
3296 if test -f $ac_dir/$ac_word; then
3297 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3298 break
3299 fi
3300 done
3301 IFS="$ac_save_ifs"
3302 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3303fi
3304fi
3305DLLTOOL="$ac_cv_prog_DLLTOOL"
3306if test -n "$DLLTOOL"; then
3307 echo "$ac_t""$DLLTOOL" 1>&6
3308else
3309 echo "$ac_t""no" 1>&6
3310fi
3311
3312
3313
3314# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3315set dummy ${ac_tool_prefix}windres; ac_word=$2
3316echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3317echo "configure:3318: checking for $ac_word" >&5
95ca63c4
CF
3318if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3319 echo $ac_n "(cached) $ac_c" 1>&6
3320else
3321 if test -n "$WINDRES"; then
3322 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3323else
3324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3325 ac_dummy="$PATH"
3326 for ac_dir in $ac_dummy; do
3327 test -z "$ac_dir" && ac_dir=.
3328 if test -f $ac_dir/$ac_word; then
3329 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3330 break
3331 fi
3332 done
3333 IFS="$ac_save_ifs"
3334 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3335fi
3336fi
3337WINDRES="$ac_cv_prog_WINDRES"
3338if test -n "$WINDRES"; then
3339 echo "$ac_t""$WINDRES" 1>&6
3340else
3341 echo "$ac_t""no" 1>&6
3342fi
3343
3344
3345
c906108c 3346
8bb2c122 3347# Needed for GNU/Hurd.
75c6e08a
MK
3348# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3349set dummy ${ac_tool_prefix}mig; ac_word=$2
3350echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
93d331ba 3351echo "configure:3352: checking for $ac_word" >&5
75c6e08a
MK
3352if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3353 echo $ac_n "(cached) $ac_c" 1>&6
3354else
3355 if test -n "$MIG"; then
3356 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3357else
3358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3359 ac_dummy="$PATH"
3360 for ac_dir in $ac_dummy; do
3361 test -z "$ac_dir" && ac_dir=.
3362 if test -f $ac_dir/$ac_word; then
3363 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3364 break
3365 fi
3366 done
3367 IFS="$ac_save_ifs"
3368 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3369fi
3370fi
3371MIG="$ac_cv_prog_MIG"
3372if test -n "$MIG"; then
3373 echo "$ac_t""$MIG" 1>&6
3374else
3375 echo "$ac_t""no" 1>&6
3376fi
3377
3378
3379
3380
9a156167
MK
3381# ---------------------- #
3382# Checks for libraries. #
3383# ---------------------- #
3384
3385# We might need to link with -lm; most simulators need it.
3386echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
93d331ba 3387echo "configure:3388: checking for main in -lm" >&5
9a156167
MK
3388ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3389if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3390 echo $ac_n "(cached) $ac_c" 1>&6
3391else
3392 ac_save_LIBS="$LIBS"
3393LIBS="-lm $LIBS"
3394cat > conftest.$ac_ext <<EOF
93d331ba 3395#line 3396 "configure"
9a156167
MK
3396#include "confdefs.h"
3397
3398int main() {
3399main()
3400; return 0; }
3401EOF
93d331ba 3402if { (eval echo configure:3403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3403 rm -rf conftest*
3404 eval "ac_cv_lib_$ac_lib_var=yes"
3405else
3406 echo "configure: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 rm -rf conftest*
3409 eval "ac_cv_lib_$ac_lib_var=no"
3410fi
3411rm -f conftest*
3412LIBS="$ac_save_LIBS"
3413
3414fi
3415if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3416 echo "$ac_t""yes" 1>&6
3417 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3418 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3419 cat >> confdefs.h <<EOF
3420#define $ac_tr_lib 1
3421EOF
3422
3423 LIBS="-lm $LIBS"
3424
3425else
3426 echo "$ac_t""no" 1>&6
3427fi
3428
3429
3430# We need to link with -lw to get `wctype' on Solaris before Solaris
3431# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3432# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3433# is known to have this problem). Therefore we avoid libw if we can.
3434echo $ac_n "checking for wctype""... $ac_c" 1>&6
93d331ba 3435echo "configure:3436: checking for wctype" >&5
9a156167
MK
3436if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
3438else
3439 cat > conftest.$ac_ext <<EOF
93d331ba 3440#line 3441 "configure"
9a156167
MK
3441#include "confdefs.h"
3442/* System header to define __stub macros and hopefully few prototypes,
3443 which can conflict with char wctype(); below. */
3444#include <assert.h>
3445/* Override any gcc2 internal prototype to avoid an error. */
3446/* We use char because int might match the return type of a gcc2
3447 builtin and then its argument prototype would still apply. */
3448char wctype();
3449
3450int main() {
3451
3452/* The GNU C library defines this for functions which it implements
3453 to always fail with ENOSYS. Some functions are actually named
3454 something starting with __ and the normal name is an alias. */
3455#if defined (__stub_wctype) || defined (__stub___wctype)
3456choke me
3457#else
3458wctype();
3459#endif
3460
3461; return 0; }
3462EOF
93d331ba 3463if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3464 rm -rf conftest*
3465 eval "ac_cv_func_wctype=yes"
3466else
3467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
3469 rm -rf conftest*
3470 eval "ac_cv_func_wctype=no"
3471fi
3472rm -f conftest*
3473fi
3474
3475if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3476 echo "$ac_t""yes" 1>&6
3477 :
3478else
3479 echo "$ac_t""no" 1>&6
3480echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
93d331ba 3481echo "configure:3482: checking for wctype in -lw" >&5
9a156167
MK
3482ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3483if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3484 echo $ac_n "(cached) $ac_c" 1>&6
3485else
3486 ac_save_LIBS="$LIBS"
3487LIBS="-lw $LIBS"
3488cat > conftest.$ac_ext <<EOF
93d331ba 3489#line 3490 "configure"
9a156167
MK
3490#include "confdefs.h"
3491/* Override any gcc2 internal prototype to avoid an error. */
3492/* We use char because int might match the return type of a gcc2
3493 builtin and then its argument prototype would still apply. */
3494char wctype();
3495
3496int main() {
3497wctype()
3498; return 0; }
3499EOF
93d331ba 3500if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3501 rm -rf conftest*
3502 eval "ac_cv_lib_$ac_lib_var=yes"
3503else
3504 echo "configure: failed program was:" >&5
3505 cat conftest.$ac_ext >&5
3506 rm -rf conftest*
3507 eval "ac_cv_lib_$ac_lib_var=no"
3508fi
3509rm -f conftest*
3510LIBS="$ac_save_LIBS"
3511
3512fi
3513if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3514 echo "$ac_t""yes" 1>&6
3515 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3516 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3517 cat >> confdefs.h <<EOF
3518#define $ac_tr_lib 1
3519EOF
3520
3521 LIBS="-lw $LIBS"
3522
3523else
3524 echo "$ac_t""no" 1>&6
3525fi
3526
3527fi
3528
3529
3530# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3531
3532echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
93d331ba 3533echo "configure:3534: checking for library containing socketpair" >&5
9a156167
MK
3534if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3536else
3537 ac_func_search_save_LIBS="$LIBS"
3538ac_cv_search_socketpair="no"
3539cat > conftest.$ac_ext <<EOF
93d331ba 3540#line 3541 "configure"
9a156167
MK
3541#include "confdefs.h"
3542/* Override any gcc2 internal prototype to avoid an error. */
3543/* We use char because int might match the return type of a gcc2
3544 builtin and then its argument prototype would still apply. */
3545char socketpair();
3546
3547int main() {
3548socketpair()
3549; return 0; }
3550EOF
93d331ba 3551if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3552 rm -rf conftest*
3553 ac_cv_search_socketpair="none required"
3554else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3557fi
3558rm -f conftest*
3559test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3560LIBS="-l$i $ac_func_search_save_LIBS"
3561cat > conftest.$ac_ext <<EOF
93d331ba 3562#line 3563 "configure"
9a156167
MK
3563#include "confdefs.h"
3564/* Override any gcc2 internal prototype to avoid an error. */
3565/* We use char because int might match the return type of a gcc2
3566 builtin and then its argument prototype would still apply. */
3567char socketpair();
3568
3569int main() {
3570socketpair()
3571; return 0; }
3572EOF
93d331ba 3573if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3574 rm -rf conftest*
3575 ac_cv_search_socketpair="-l$i"
3576break
3577else
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3580fi
3581rm -f conftest*
3582done
3583LIBS="$ac_func_search_save_LIBS"
3584fi
3585
3586echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3587if test "$ac_cv_search_socketpair" != "no"; then
3588 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3589
3590else :
3591
3592fi
3593
06825bd1
MK
3594# Since GDB uses Readline, we need termcap functionality, so we need
3595# to find a library that provides that. When GDB is configured with
3596# --enable-tui, we need full curses functionality.
3597#
3598# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3599# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3600# Makefile fragments. That's why we need to have `Hcurses' before
3601# `curses'. I don't see why we should use HP curses if a more
3602# standard curses is available, except that according to HP's
3603# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3604# HP-UX 10.10 and 10.20.
3605
3606if test "$need_curses" = yes; then
3607
3608echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
93d331ba 3609echo "configure:3610: checking for library containing initscr" >&5
06825bd1
MK
3610if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3611 echo $ac_n "(cached) $ac_c" 1>&6
3612else
3613 ac_func_search_save_LIBS="$LIBS"
3614ac_cv_search_initscr="no"
3615cat > conftest.$ac_ext <<EOF
93d331ba 3616#line 3617 "configure"
06825bd1
MK
3617#include "confdefs.h"
3618/* Override any gcc2 internal prototype to avoid an error. */
3619/* We use char because int might match the return type of a gcc2
3620 builtin and then its argument prototype would still apply. */
3621char initscr();
3622
3623int main() {
3624initscr()
3625; return 0; }
3626EOF
93d331ba 3627if { (eval echo configure:3628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3628 rm -rf conftest*
3629 ac_cv_search_initscr="none required"
3630else
3631 echo "configure: failed program was:" >&5
3632 cat conftest.$ac_ext >&5
3633fi
3634rm -f conftest*
3635test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3636LIBS="-l$i $ac_func_search_save_LIBS"
3637cat > conftest.$ac_ext <<EOF
93d331ba 3638#line 3639 "configure"
06825bd1
MK
3639#include "confdefs.h"
3640/* Override any gcc2 internal prototype to avoid an error. */
3641/* We use char because int might match the return type of a gcc2
3642 builtin and then its argument prototype would still apply. */
3643char initscr();
3644
3645int main() {
3646initscr()
3647; return 0; }
3648EOF
93d331ba 3649if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3650 rm -rf conftest*
3651 ac_cv_search_initscr="-l$i"
3652break
3653else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656fi
3657rm -f conftest*
3658done
3659LIBS="$ac_func_search_save_LIBS"
3660fi
3661
3662echo "$ac_t""$ac_cv_search_initscr" 1>&6
3663if test "$ac_cv_search_initscr" != "no"; then
3664 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3665
3666else :
3667 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3668fi
3669fi
3670
3671case $host_os in
3672 cygwin*)
3673 if test -d $srcdir/libtermcap; then
3674 LIBS="../libtermcap/libtermcap.a $LIBS"
3675 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3676 fi ;;
3677 go32*)
3678 # ??? Is this really true?
3679 ac_cv_search_tgetent="none required"
3680 ;;
3681 aix*)
3682 # Readline prefers curses over termcap on AIX.
3683 # ??? Why?
3684
3685echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
93d331ba 3686echo "configure:3687: checking for library containing tgetent" >&5
06825bd1
MK
3687if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3688 echo $ac_n "(cached) $ac_c" 1>&6
3689else
3690 ac_func_search_save_LIBS="$LIBS"
3691ac_cv_search_tgetent="no"
3692cat > conftest.$ac_ext <<EOF
93d331ba 3693#line 3694 "configure"
06825bd1
MK
3694#include "confdefs.h"
3695/* Override any gcc2 internal prototype to avoid an error. */
3696/* We use char because int might match the return type of a gcc2
3697 builtin and then its argument prototype would still apply. */
3698char tgetent();
3699
3700int main() {
3701tgetent()
3702; return 0; }
3703EOF
93d331ba 3704if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3705 rm -rf conftest*
3706 ac_cv_search_tgetent="none required"
3707else
3708 echo "configure: failed program was:" >&5
3709 cat conftest.$ac_ext >&5
3710fi
3711rm -f conftest*
3712test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3713LIBS="-l$i $ac_func_search_save_LIBS"
3714cat > conftest.$ac_ext <<EOF
93d331ba 3715#line 3716 "configure"
06825bd1
MK
3716#include "confdefs.h"
3717/* Override any gcc2 internal prototype to avoid an error. */
3718/* We use char because int might match the return type of a gcc2
3719 builtin and then its argument prototype would still apply. */
3720char tgetent();
3721
3722int main() {
3723tgetent()
3724; return 0; }
3725EOF
93d331ba 3726if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3727 rm -rf conftest*
3728 ac_cv_search_tgetent="-l$i"
3729break
3730else
3731 echo "configure: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3733fi
3734rm -f conftest*
3735done
3736LIBS="$ac_func_search_save_LIBS"
3737fi
3738
3739echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3740if test "$ac_cv_search_tgetent" != "no"; then
3741 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3742
3743else :
3744
3745fi
3746 ;;
3747esac
3748
3749# Note: We used to check for libtermlib and libterminfo too, but
3750# Readline doesn't, so I think we're safe with leaving them out.
3751
3752echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
93d331ba 3753echo "configure:3754: checking for library containing tgetent" >&5
06825bd1
MK
3754if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3755 echo $ac_n "(cached) $ac_c" 1>&6
3756else
3757 ac_func_search_save_LIBS="$LIBS"
3758ac_cv_search_tgetent="no"
3759cat > conftest.$ac_ext <<EOF
93d331ba 3760#line 3761 "configure"
06825bd1
MK
3761#include "confdefs.h"
3762/* Override any gcc2 internal prototype to avoid an error. */
3763/* We use char because int might match the return type of a gcc2
3764 builtin and then its argument prototype would still apply. */
3765char tgetent();
3766
3767int main() {
3768tgetent()
3769; return 0; }
3770EOF
93d331ba 3771if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3772 rm -rf conftest*
3773 ac_cv_search_tgetent="none required"
3774else
3775 echo "configure: failed program was:" >&5
3776 cat conftest.$ac_ext >&5
3777fi
3778rm -f conftest*
3779test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3780LIBS="-l$i $ac_func_search_save_LIBS"
3781cat > conftest.$ac_ext <<EOF
93d331ba 3782#line 3783 "configure"
06825bd1
MK
3783#include "confdefs.h"
3784/* Override any gcc2 internal prototype to avoid an error. */
3785/* We use char because int might match the return type of a gcc2
3786 builtin and then its argument prototype would still apply. */
3787char tgetent();
3788
3789int main() {
3790tgetent()
3791; return 0; }
3792EOF
93d331ba 3793if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3794 rm -rf conftest*
3795 ac_cv_search_tgetent="-l$i"
3796break
3797else
3798 echo "configure: failed program was:" >&5
3799 cat conftest.$ac_ext >&5
3800fi
3801rm -f conftest*
3802done
3803LIBS="$ac_func_search_save_LIBS"
3804fi
3805
3806echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3807if test "$ac_cv_search_tgetent" != "no"; then
3808 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3809
3810else :
3811
3812fi
3813
3814if test "$ac_cv_search_tgetent" = no; then
3815 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3816fi
3817
5ee754fc
MK
3818# ------------------------- #
3819# Checks for header files. #
3820# ------------------------- #
3821
3822ac_header_dirent=no
3823for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3824do
3825ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3826echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
93d331ba 3827echo "configure:3828: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3828if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3829 echo $ac_n "(cached) $ac_c" 1>&6
3830else
3831 cat > conftest.$ac_ext <<EOF
93d331ba 3832#line 3833 "configure"
c906108c
SS
3833#include "confdefs.h"
3834#include <sys/types.h>
5ee754fc
MK
3835#include <$ac_hdr>
3836int main() {
3837DIR *dirp = 0;
3838; return 0; }
3839EOF
93d331ba 3840if { (eval echo configure:3841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3841 rm -rf conftest*
3842 eval "ac_cv_header_dirent_$ac_safe=yes"
3843else
3844 echo "configure: failed program was:" >&5
3845 cat conftest.$ac_ext >&5
3846 rm -rf conftest*
3847 eval "ac_cv_header_dirent_$ac_safe=no"
3848fi
3849rm -f conftest*
3850fi
3851if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3852 echo "$ac_t""yes" 1>&6
3853 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3854 cat >> confdefs.h <<EOF
3855#define $ac_tr_hdr 1
3856EOF
3857 ac_header_dirent=$ac_hdr; break
3858else
3859 echo "$ac_t""no" 1>&6
3860fi
3861done
3862# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3863if test $ac_header_dirent = dirent.h; then
3864echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
93d331ba 3865echo "configure:3866: checking for opendir in -ldir" >&5
5ee754fc
MK
3866ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3867if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3868 echo $ac_n "(cached) $ac_c" 1>&6
3869else
3870 ac_save_LIBS="$LIBS"
3871LIBS="-ldir $LIBS"
3872cat > conftest.$ac_ext <<EOF
93d331ba 3873#line 3874 "configure"
5ee754fc
MK
3874#include "confdefs.h"
3875/* Override any gcc2 internal prototype to avoid an error. */
3876/* We use char because int might match the return type of a gcc2
3877 builtin and then its argument prototype would still apply. */
3878char opendir();
c906108c
SS
3879
3880int main() {
5ee754fc 3881opendir()
c906108c
SS
3882; return 0; }
3883EOF
93d331ba 3884if { (eval echo configure:3885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3885 rm -rf conftest*
5ee754fc 3886 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3887else
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3890 rm -rf conftest*
5ee754fc 3891 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3892fi
3893rm -f conftest*
5ee754fc
MK
3894LIBS="$ac_save_LIBS"
3895
3896fi
3897if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3898 echo "$ac_t""yes" 1>&6
3899 LIBS="$LIBS -ldir"
3900else
3901 echo "$ac_t""no" 1>&6
c906108c
SS
3902fi
3903
5ee754fc
MK
3904else
3905echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
93d331ba 3906echo "configure:3907: checking for opendir in -lx" >&5
5ee754fc
MK
3907ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3908if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3909 echo $ac_n "(cached) $ac_c" 1>&6
3910else
3911 ac_save_LIBS="$LIBS"
3912LIBS="-lx $LIBS"
3913cat > conftest.$ac_ext <<EOF
93d331ba 3914#line 3915 "configure"
5ee754fc
MK
3915#include "confdefs.h"
3916/* Override any gcc2 internal prototype to avoid an error. */
3917/* We use char because int might match the return type of a gcc2
3918 builtin and then its argument prototype would still apply. */
3919char opendir();
3920
3921int main() {
3922opendir()
3923; return 0; }
c906108c 3924EOF
93d331ba 3925if { (eval echo configure:3926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3926 rm -rf conftest*
3927 eval "ac_cv_lib_$ac_lib_var=yes"
3928else
3929 echo "configure: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3931 rm -rf conftest*
3932 eval "ac_cv_lib_$ac_lib_var=no"
3933fi
3934rm -f conftest*
3935LIBS="$ac_save_LIBS"
c906108c 3936
5ee754fc
MK
3937fi
3938if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3939 echo "$ac_t""yes" 1>&6
3940 LIBS="$LIBS -lx"
3941else
3942 echo "$ac_t""no" 1>&6
3943fi
c906108c 3944
5ee754fc 3945fi
c906108c 3946
5ee754fc 3947echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
93d331ba 3948echo "configure:3949: checking whether stat file-mode macros are broken" >&5
5ee754fc 3949if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3950 echo $ac_n "(cached) $ac_c" 1>&6
3951else
3952 cat > conftest.$ac_ext <<EOF
93d331ba 3953#line 3954 "configure"
9608ab8b
MK
3954#include "confdefs.h"
3955#include <sys/types.h>
5ee754fc
MK
3956#include <sys/stat.h>
3957
3958#if defined(S_ISBLK) && defined(S_IFDIR)
3959# if S_ISBLK (S_IFDIR)
3960You lose.
3961# endif
3962#endif
3963
3964#if defined(S_ISBLK) && defined(S_IFCHR)
3965# if S_ISBLK (S_IFCHR)
3966You lose.
3967# endif
3968#endif
3969
3970#if defined(S_ISLNK) && defined(S_IFREG)
3971# if S_ISLNK (S_IFREG)
3972You lose.
3973# endif
3974#endif
3975
3976#if defined(S_ISSOCK) && defined(S_IFREG)
3977# if S_ISSOCK (S_IFREG)
3978You lose.
3979# endif
3980#endif
3981
9608ab8b 3982EOF
5ee754fc
MK
3983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3984 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3985 rm -rf conftest*
5ee754fc
MK
3986 ac_cv_header_stat_broken=yes
3987else
3988 rm -rf conftest*
3989 ac_cv_header_stat_broken=no
3990fi
3991rm -f conftest*
3992
3993fi
3994
3995echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3996if test $ac_cv_header_stat_broken = yes; then
3997 cat >> confdefs.h <<\EOF
3998#define STAT_MACROS_BROKEN 1
3999EOF
4000
4001fi
4002
4003echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
93d331ba 4004echo "configure:4005: checking for ANSI C header files" >&5
5ee754fc
MK
4005if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4006 echo $ac_n "(cached) $ac_c" 1>&6
4007else
4008 cat > conftest.$ac_ext <<EOF
93d331ba 4009#line 4010 "configure"
5ee754fc
MK
4010#include "confdefs.h"
4011#include <stdlib.h>
4012#include <stdarg.h>
4013#include <string.h>
4014#include <float.h>
4015EOF
4016ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4017{ (eval echo configure:4018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4018ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4019if test -z "$ac_err"; then
4020 rm -rf conftest*
4021 ac_cv_header_stdc=yes
4022else
4023 echo "$ac_err" >&5
4024 echo "configure: failed program was:" >&5
4025 cat conftest.$ac_ext >&5
4026 rm -rf conftest*
4027 ac_cv_header_stdc=no
4028fi
4029rm -f conftest*
4030
4031if test $ac_cv_header_stdc = yes; then
4032 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4033cat > conftest.$ac_ext <<EOF
93d331ba 4034#line 4035 "configure"
5ee754fc
MK
4035#include "confdefs.h"
4036#include <string.h>
4037EOF
4038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4039 egrep "memchr" >/dev/null 2>&1; then
4040 :
4041else
4042 rm -rf conftest*
4043 ac_cv_header_stdc=no
4044fi
4045rm -f conftest*
4046
4047fi
4048
4049if test $ac_cv_header_stdc = yes; then
4050 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4051cat > conftest.$ac_ext <<EOF
93d331ba 4052#line 4053 "configure"
5ee754fc
MK
4053#include "confdefs.h"
4054#include <stdlib.h>
4055EOF
4056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4057 egrep "free" >/dev/null 2>&1; then
4058 :
4059else
4060 rm -rf conftest*
4061 ac_cv_header_stdc=no
4062fi
4063rm -f conftest*
4064
4065fi
4066
4067if test $ac_cv_header_stdc = yes; then
4068 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4069if test "$cross_compiling" = yes; then
4070 :
4071else
4072 cat > conftest.$ac_ext <<EOF
93d331ba 4073#line 4074 "configure"
5ee754fc
MK
4074#include "confdefs.h"
4075#include <ctype.h>
4076#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4077#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4078#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4079int main () { int i; for (i = 0; i < 256; i++)
4080if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4081exit (0); }
4082
4083EOF
93d331ba 4084if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4085then
4086 :
9608ab8b 4087else
5ee754fc
MK
4088 echo "configure: failed program was:" >&5
4089 cat conftest.$ac_ext >&5
4090 rm -fr conftest*
4091 ac_cv_header_stdc=no
4092fi
4093rm -fr conftest*
4094fi
4095
4096fi
4097fi
4098
4099echo "$ac_t""$ac_cv_header_stdc" 1>&6
4100if test $ac_cv_header_stdc = yes; then
4101 cat >> confdefs.h <<\EOF
4102#define STDC_HEADERS 1
4103EOF
4104
4105fi
4106
4107for ac_hdr in link.h
4108do
4109ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4110echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4111echo "configure:4112: checking for $ac_hdr" >&5
5ee754fc
MK
4112if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4113 echo $ac_n "(cached) $ac_c" 1>&6
4114else
4115 cat > conftest.$ac_ext <<EOF
93d331ba 4116#line 4117 "configure"
5ee754fc
MK
4117#include "confdefs.h"
4118#include <$ac_hdr>
4119EOF
4120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4121{ (eval echo configure:4122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4123if test -z "$ac_err"; then
4124 rm -rf conftest*
4125 eval "ac_cv_header_$ac_safe=yes"
4126else
4127 echo "$ac_err" >&5
4128 echo "configure: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130 rm -rf conftest*
4131 eval "ac_cv_header_$ac_safe=no"
4132fi
4133rm -f conftest*
4134fi
4135if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4136 echo "$ac_t""yes" 1>&6
4137 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4138 cat >> confdefs.h <<EOF
4139#define $ac_tr_hdr 1
4140EOF
4141
4142else
4143 echo "$ac_t""no" 1>&6
4144fi
4145done
4146
4147for ac_hdr in nlist.h
4148do
4149ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4150echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4151echo "configure:4152: checking for $ac_hdr" >&5
5ee754fc
MK
4152if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4153 echo $ac_n "(cached) $ac_c" 1>&6
4154else
4155 cat > conftest.$ac_ext <<EOF
93d331ba 4156#line 4157 "configure"
5ee754fc
MK
4157#include "confdefs.h"
4158#include <$ac_hdr>
4159EOF
4160ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4161{ (eval echo configure:4162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4162ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4163if test -z "$ac_err"; then
4164 rm -rf conftest*
4165 eval "ac_cv_header_$ac_safe=yes"
4166else
4167 echo "$ac_err" >&5
4168 echo "configure: failed program was:" >&5
4169 cat conftest.$ac_ext >&5
4170 rm -rf conftest*
4171 eval "ac_cv_header_$ac_safe=no"
4172fi
4173rm -f conftest*
4174fi
4175if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4176 echo "$ac_t""yes" 1>&6
4177 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4178 cat >> confdefs.h <<EOF
4179#define $ac_tr_hdr 1
4180EOF
4181
4182else
4183 echo "$ac_t""no" 1>&6
4184fi
4185done
4186
4187for ac_hdr in poll.h sys/poll.h
4188do
4189ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4191echo "configure:4192: checking for $ac_hdr" >&5
5ee754fc
MK
4192if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4193 echo $ac_n "(cached) $ac_c" 1>&6
4194else
4195 cat > conftest.$ac_ext <<EOF
93d331ba 4196#line 4197 "configure"
5ee754fc
MK
4197#include "confdefs.h"
4198#include <$ac_hdr>
4199EOF
4200ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4201{ (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4202ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203if test -z "$ac_err"; then
4204 rm -rf conftest*
4205 eval "ac_cv_header_$ac_safe=yes"
4206else
4207 echo "$ac_err" >&5
4208 echo "configure: failed program was:" >&5
4209 cat conftest.$ac_ext >&5
4210 rm -rf conftest*
4211 eval "ac_cv_header_$ac_safe=no"
4212fi
4213rm -f conftest*
4214fi
4215if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216 echo "$ac_t""yes" 1>&6
4217 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218 cat >> confdefs.h <<EOF
4219#define $ac_tr_hdr 1
4220EOF
4221
4222else
4223 echo "$ac_t""no" 1>&6
4224fi
4225done
4226
4227for ac_hdr in proc_service.h thread_db.h
4228do
4229ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4230echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4231echo "configure:4232: checking for $ac_hdr" >&5
5ee754fc
MK
4232if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4233 echo $ac_n "(cached) $ac_c" 1>&6
4234else
4235 cat > conftest.$ac_ext <<EOF
93d331ba 4236#line 4237 "configure"
5ee754fc
MK
4237#include "confdefs.h"
4238#include <$ac_hdr>
4239EOF
4240ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4241{ (eval echo configure:4242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4242ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4243if test -z "$ac_err"; then
4244 rm -rf conftest*
4245 eval "ac_cv_header_$ac_safe=yes"
4246else
4247 echo "$ac_err" >&5
4248 echo "configure: failed program was:" >&5
4249 cat conftest.$ac_ext >&5
4250 rm -rf conftest*
4251 eval "ac_cv_header_$ac_safe=no"
4252fi
4253rm -f conftest*
4254fi
4255if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4256 echo "$ac_t""yes" 1>&6
4257 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4258 cat >> confdefs.h <<EOF
4259#define $ac_tr_hdr 1
4260EOF
4261
4262else
4263 echo "$ac_t""no" 1>&6
4264fi
4265done
4266
4267for ac_hdr in stddef.h
4268do
4269ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4270echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4271echo "configure:4272: checking for $ac_hdr" >&5
5ee754fc
MK
4272if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4273 echo $ac_n "(cached) $ac_c" 1>&6
4274else
4275 cat > conftest.$ac_ext <<EOF
93d331ba 4276#line 4277 "configure"
5ee754fc
MK
4277#include "confdefs.h"
4278#include <$ac_hdr>
4279EOF
4280ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4281{ (eval echo configure:4282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4282ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4283if test -z "$ac_err"; then
4284 rm -rf conftest*
4285 eval "ac_cv_header_$ac_safe=yes"
4286else
4287 echo "$ac_err" >&5
4288 echo "configure: failed program was:" >&5
4289 cat conftest.$ac_ext >&5
4290 rm -rf conftest*
4291 eval "ac_cv_header_$ac_safe=no"
4292fi
4293rm -f conftest*
4294fi
4295if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4296 echo "$ac_t""yes" 1>&6
4297 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4298 cat >> confdefs.h <<EOF
4299#define $ac_tr_hdr 1
4300EOF
4301
4302else
4303 echo "$ac_t""no" 1>&6
4304fi
4305done
4306
4307for ac_hdr in stdlib.h
4308do
4309ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4310echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4311echo "configure:4312: checking for $ac_hdr" >&5
5ee754fc
MK
4312if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4313 echo $ac_n "(cached) $ac_c" 1>&6
4314else
4315 cat > conftest.$ac_ext <<EOF
93d331ba 4316#line 4317 "configure"
5ee754fc
MK
4317#include "confdefs.h"
4318#include <$ac_hdr>
4319EOF
4320ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4321{ (eval echo configure:4322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4322ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4323if test -z "$ac_err"; then
4324 rm -rf conftest*
4325 eval "ac_cv_header_$ac_safe=yes"
4326else
4327 echo "$ac_err" >&5
4328 echo "configure: failed program was:" >&5
4329 cat conftest.$ac_ext >&5
4330 rm -rf conftest*
4331 eval "ac_cv_header_$ac_safe=no"
4332fi
4333rm -f conftest*
4334fi
4335if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4336 echo "$ac_t""yes" 1>&6
4337 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4338 cat >> confdefs.h <<EOF
4339#define $ac_tr_hdr 1
4340EOF
4341
4342else
4343 echo "$ac_t""no" 1>&6
4344fi
4345done
4346
4347for ac_hdr in stdint.h
4348do
4349ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4350echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4351echo "configure:4352: checking for $ac_hdr" >&5
5ee754fc
MK
4352if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4353 echo $ac_n "(cached) $ac_c" 1>&6
4354else
4355 cat > conftest.$ac_ext <<EOF
93d331ba 4356#line 4357 "configure"
5ee754fc
MK
4357#include "confdefs.h"
4358#include <$ac_hdr>
4359EOF
4360ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4361{ (eval echo configure:4362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4362ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4363if test -z "$ac_err"; then
4364 rm -rf conftest*
4365 eval "ac_cv_header_$ac_safe=yes"
4366else
4367 echo "$ac_err" >&5
4368 echo "configure: failed program was:" >&5
4369 cat conftest.$ac_ext >&5
4370 rm -rf conftest*
4371 eval "ac_cv_header_$ac_safe=no"
4372fi
4373rm -f conftest*
4374fi
4375if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4376 echo "$ac_t""yes" 1>&6
4377 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4378 cat >> confdefs.h <<EOF
4379#define $ac_tr_hdr 1
4380EOF
4381
4382else
4383 echo "$ac_t""no" 1>&6
4384fi
4385done
4386
4387for ac_hdr in string.h memory.h strings.h
4388do
4389ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4390echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4391echo "configure:4392: checking for $ac_hdr" >&5
5ee754fc
MK
4392if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4393 echo $ac_n "(cached) $ac_c" 1>&6
4394else
4395 cat > conftest.$ac_ext <<EOF
93d331ba 4396#line 4397 "configure"
5ee754fc
MK
4397#include "confdefs.h"
4398#include <$ac_hdr>
4399EOF
4400ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4401{ (eval echo configure:4402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4402ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4403if test -z "$ac_err"; then
4404 rm -rf conftest*
4405 eval "ac_cv_header_$ac_safe=yes"
4406else
4407 echo "$ac_err" >&5
4408 echo "configure: failed program was:" >&5
4409 cat conftest.$ac_ext >&5
4410 rm -rf conftest*
4411 eval "ac_cv_header_$ac_safe=no"
4412fi
4413rm -f conftest*
4414fi
4415if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4416 echo "$ac_t""yes" 1>&6
4417 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4418 cat >> confdefs.h <<EOF
4419#define $ac_tr_hdr 1
4420EOF
4421
4422else
4423 echo "$ac_t""no" 1>&6
4424fi
4425done
4426
4427for ac_hdr in sys/fault.h
4428do
4429ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4430echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4431echo "configure:4432: checking for $ac_hdr" >&5
5ee754fc
MK
4432if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4433 echo $ac_n "(cached) $ac_c" 1>&6
4434else
4435 cat > conftest.$ac_ext <<EOF
93d331ba 4436#line 4437 "configure"
5ee754fc
MK
4437#include "confdefs.h"
4438#include <$ac_hdr>
4439EOF
4440ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4441{ (eval echo configure:4442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4442ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4443if test -z "$ac_err"; then
4444 rm -rf conftest*
4445 eval "ac_cv_header_$ac_safe=yes"
4446else
4447 echo "$ac_err" >&5
4448 echo "configure: failed program was:" >&5
4449 cat conftest.$ac_ext >&5
4450 rm -rf conftest*
4451 eval "ac_cv_header_$ac_safe=no"
4452fi
4453rm -f conftest*
4454fi
4455if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4456 echo "$ac_t""yes" 1>&6
4457 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4458 cat >> confdefs.h <<EOF
4459#define $ac_tr_hdr 1
4460EOF
4461
4462else
4463 echo "$ac_t""no" 1>&6
4464fi
4465done
4466
4467for ac_hdr in sys/file.h
4468do
4469ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4470echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4471echo "configure:4472: checking for $ac_hdr" >&5
5ee754fc
MK
4472if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
4474else
4475 cat > conftest.$ac_ext <<EOF
93d331ba 4476#line 4477 "configure"
5ee754fc
MK
4477#include "confdefs.h"
4478#include <$ac_hdr>
4479EOF
4480ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4481{ (eval echo configure:4482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4482ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4483if test -z "$ac_err"; then
4484 rm -rf conftest*
4485 eval "ac_cv_header_$ac_safe=yes"
4486else
4487 echo "$ac_err" >&5
4488 echo "configure: failed program was:" >&5
4489 cat conftest.$ac_ext >&5
4490 rm -rf conftest*
4491 eval "ac_cv_header_$ac_safe=no"
4492fi
4493rm -f conftest*
4494fi
4495if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4496 echo "$ac_t""yes" 1>&6
4497 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4498 cat >> confdefs.h <<EOF
4499#define $ac_tr_hdr 1
4500EOF
4501
4502else
4503 echo "$ac_t""no" 1>&6
4504fi
4505done
4506
4507for ac_hdr in sys/filio.h
4508do
4509ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4510echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4511echo "configure:4512: checking for $ac_hdr" >&5
5ee754fc
MK
4512if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4513 echo $ac_n "(cached) $ac_c" 1>&6
4514else
4515 cat > conftest.$ac_ext <<EOF
93d331ba 4516#line 4517 "configure"
5ee754fc
MK
4517#include "confdefs.h"
4518#include <$ac_hdr>
4519EOF
4520ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4521{ (eval echo configure:4522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4522ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4523if test -z "$ac_err"; then
4524 rm -rf conftest*
4525 eval "ac_cv_header_$ac_safe=yes"
4526else
4527 echo "$ac_err" >&5
4528 echo "configure: failed program was:" >&5
4529 cat conftest.$ac_ext >&5
4530 rm -rf conftest*
4531 eval "ac_cv_header_$ac_safe=no"
4532fi
4533rm -f conftest*
4534fi
4535if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4536 echo "$ac_t""yes" 1>&6
4537 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4538 cat >> confdefs.h <<EOF
4539#define $ac_tr_hdr 1
4540EOF
4541
4542else
4543 echo "$ac_t""no" 1>&6
4544fi
4545done
4546
4547for ac_hdr in sys/ioctl.h
4548do
4549ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4550echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4551echo "configure:4552: checking for $ac_hdr" >&5
5ee754fc
MK
4552if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4553 echo $ac_n "(cached) $ac_c" 1>&6
4554else
4555 cat > conftest.$ac_ext <<EOF
93d331ba 4556#line 4557 "configure"
5ee754fc
MK
4557#include "confdefs.h"
4558#include <$ac_hdr>
4559EOF
4560ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4561{ (eval echo configure:4562: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4562ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4563if test -z "$ac_err"; then
4564 rm -rf conftest*
4565 eval "ac_cv_header_$ac_safe=yes"
4566else
4567 echo "$ac_err" >&5
4568 echo "configure: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
4570 rm -rf conftest*
4571 eval "ac_cv_header_$ac_safe=no"
4572fi
4573rm -f conftest*
4574fi
4575if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4576 echo "$ac_t""yes" 1>&6
4577 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4578 cat >> confdefs.h <<EOF
4579#define $ac_tr_hdr 1
4580EOF
4581
4582else
4583 echo "$ac_t""no" 1>&6
4584fi
4585done
4586
4587for ac_hdr in sys/param.h
4588do
4589ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4590echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4591echo "configure:4592: checking for $ac_hdr" >&5
5ee754fc
MK
4592if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4593 echo $ac_n "(cached) $ac_c" 1>&6
4594else
4595 cat > conftest.$ac_ext <<EOF
93d331ba 4596#line 4597 "configure"
5ee754fc
MK
4597#include "confdefs.h"
4598#include <$ac_hdr>
4599EOF
4600ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4601{ (eval echo configure:4602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4602ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4603if test -z "$ac_err"; then
4604 rm -rf conftest*
4605 eval "ac_cv_header_$ac_safe=yes"
4606else
4607 echo "$ac_err" >&5
4608 echo "configure: failed program was:" >&5
4609 cat conftest.$ac_ext >&5
4610 rm -rf conftest*
4611 eval "ac_cv_header_$ac_safe=no"
4612fi
4613rm -f conftest*
4614fi
4615if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4616 echo "$ac_t""yes" 1>&6
4617 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4618 cat >> confdefs.h <<EOF
4619#define $ac_tr_hdr 1
4620EOF
4621
4622else
4623 echo "$ac_t""no" 1>&6
4624fi
4625done
4626
4627for ac_hdr in sys/proc.h
4628do
4629ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4630echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4631echo "configure:4632: checking for $ac_hdr" >&5
5ee754fc
MK
4632if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4633 echo $ac_n "(cached) $ac_c" 1>&6
4634else
4635 cat > conftest.$ac_ext <<EOF
93d331ba 4636#line 4637 "configure"
5ee754fc
MK
4637#include "confdefs.h"
4638#include <$ac_hdr>
4639EOF
4640ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4641{ (eval echo configure:4642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4642ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4643if test -z "$ac_err"; then
4644 rm -rf conftest*
4645 eval "ac_cv_header_$ac_safe=yes"
4646else
4647 echo "$ac_err" >&5
4648 echo "configure: failed program was:" >&5
4649 cat conftest.$ac_ext >&5
4650 rm -rf conftest*
4651 eval "ac_cv_header_$ac_safe=no"
4652fi
4653rm -f conftest*
4654fi
4655if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4656 echo "$ac_t""yes" 1>&6
4657 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4658 cat >> confdefs.h <<EOF
4659#define $ac_tr_hdr 1
4660EOF
4661
4662else
4663 echo "$ac_t""no" 1>&6
4664fi
4665done
4666
4667for ac_hdr in sys/procfs.h
4668do
4669ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4670echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4671echo "configure:4672: checking for $ac_hdr" >&5
5ee754fc
MK
4672if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4673 echo $ac_n "(cached) $ac_c" 1>&6
4674else
4675 cat > conftest.$ac_ext <<EOF
93d331ba 4676#line 4677 "configure"
5ee754fc
MK
4677#include "confdefs.h"
4678#include <$ac_hdr>
4679EOF
4680ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4681{ (eval echo configure:4682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4682ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4683if test -z "$ac_err"; then
4684 rm -rf conftest*
4685 eval "ac_cv_header_$ac_safe=yes"
4686else
4687 echo "$ac_err" >&5
4688 echo "configure: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 rm -rf conftest*
4691 eval "ac_cv_header_$ac_safe=no"
4692fi
4693rm -f conftest*
4694fi
4695if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4696 echo "$ac_t""yes" 1>&6
4697 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4698 cat >> confdefs.h <<EOF
4699#define $ac_tr_hdr 1
4700EOF
4701
4702else
4703 echo "$ac_t""no" 1>&6
4704fi
4705done
4706
4707for ac_hdr in sys/ptrace.h ptrace.h
4708do
4709ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4710echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4711echo "configure:4712: checking for $ac_hdr" >&5
5ee754fc
MK
4712if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4713 echo $ac_n "(cached) $ac_c" 1>&6
4714else
4715 cat > conftest.$ac_ext <<EOF
93d331ba 4716#line 4717 "configure"
5ee754fc
MK
4717#include "confdefs.h"
4718#include <$ac_hdr>
4719EOF
4720ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4721{ (eval echo configure:4722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4722ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4723if test -z "$ac_err"; then
4724 rm -rf conftest*
4725 eval "ac_cv_header_$ac_safe=yes"
4726else
4727 echo "$ac_err" >&5
4728 echo "configure: failed program was:" >&5
4729 cat conftest.$ac_ext >&5
4730 rm -rf conftest*
4731 eval "ac_cv_header_$ac_safe=no"
4732fi
4733rm -f conftest*
4734fi
4735if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4736 echo "$ac_t""yes" 1>&6
4737 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4738 cat >> confdefs.h <<EOF
4739#define $ac_tr_hdr 1
4740EOF
4741
4742else
4743 echo "$ac_t""no" 1>&6
4744fi
4745done
4746
4747for ac_hdr in sys/reg.h sys/debugreg.h
4748do
4749ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4750echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4751echo "configure:4752: checking for $ac_hdr" >&5
5ee754fc
MK
4752if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4753 echo $ac_n "(cached) $ac_c" 1>&6
4754else
4755 cat > conftest.$ac_ext <<EOF
93d331ba 4756#line 4757 "configure"
5ee754fc
MK
4757#include "confdefs.h"
4758#include <$ac_hdr>
4759EOF
4760ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4761{ (eval echo configure:4762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4762ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4763if test -z "$ac_err"; then
4764 rm -rf conftest*
4765 eval "ac_cv_header_$ac_safe=yes"
4766else
4767 echo "$ac_err" >&5
4768 echo "configure: failed program was:" >&5
4769 cat conftest.$ac_ext >&5
4770 rm -rf conftest*
4771 eval "ac_cv_header_$ac_safe=no"
4772fi
4773rm -f conftest*
4774fi
4775if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4776 echo "$ac_t""yes" 1>&6
4777 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4778 cat >> confdefs.h <<EOF
4779#define $ac_tr_hdr 1
4780EOF
4781
4782else
4783 echo "$ac_t""no" 1>&6
4784fi
4785done
4786
4787for ac_hdr in sys/select.h
4788do
4789ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4790echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4791echo "configure:4792: checking for $ac_hdr" >&5
5ee754fc
MK
4792if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4793 echo $ac_n "(cached) $ac_c" 1>&6
4794else
4795 cat > conftest.$ac_ext <<EOF
93d331ba 4796#line 4797 "configure"
5ee754fc
MK
4797#include "confdefs.h"
4798#include <$ac_hdr>
4799EOF
4800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4801{ (eval echo configure:4802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4802ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4803if test -z "$ac_err"; then
4804 rm -rf conftest*
4805 eval "ac_cv_header_$ac_safe=yes"
4806else
4807 echo "$ac_err" >&5
4808 echo "configure: failed program was:" >&5
4809 cat conftest.$ac_ext >&5
4810 rm -rf conftest*
4811 eval "ac_cv_header_$ac_safe=no"
4812fi
4813rm -f conftest*
4814fi
4815if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4816 echo "$ac_t""yes" 1>&6
4817 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4818 cat >> confdefs.h <<EOF
4819#define $ac_tr_hdr 1
4820EOF
4821
4822else
4823 echo "$ac_t""no" 1>&6
4824fi
4825done
4826
4827for ac_hdr in sys/syscall.h
4828do
4829ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4830echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4831echo "configure:4832: checking for $ac_hdr" >&5
5ee754fc
MK
4832if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4833 echo $ac_n "(cached) $ac_c" 1>&6
4834else
4835 cat > conftest.$ac_ext <<EOF
93d331ba 4836#line 4837 "configure"
5ee754fc
MK
4837#include "confdefs.h"
4838#include <$ac_hdr>
4839EOF
4840ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4841{ (eval echo configure:4842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4842ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4843if test -z "$ac_err"; then
4844 rm -rf conftest*
4845 eval "ac_cv_header_$ac_safe=yes"
4846else
4847 echo "$ac_err" >&5
4848 echo "configure: failed program was:" >&5
4849 cat conftest.$ac_ext >&5
4850 rm -rf conftest*
4851 eval "ac_cv_header_$ac_safe=no"
4852fi
4853rm -f conftest*
4854fi
4855if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4856 echo "$ac_t""yes" 1>&6
4857 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4858 cat >> confdefs.h <<EOF
4859#define $ac_tr_hdr 1
4860EOF
4861
4862else
4863 echo "$ac_t""no" 1>&6
4864fi
4865done
4866
4867for ac_hdr in sys/user.h
4868do
4869ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4870echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4871echo "configure:4872: checking for $ac_hdr" >&5
5ee754fc
MK
4872if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4873 echo $ac_n "(cached) $ac_c" 1>&6
4874else
4875 cat > conftest.$ac_ext <<EOF
93d331ba 4876#line 4877 "configure"
5ee754fc
MK
4877#include "confdefs.h"
4878#include <$ac_hdr>
4879EOF
4880ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4881{ (eval echo configure:4882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4882ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4883if test -z "$ac_err"; then
4884 rm -rf conftest*
4885 eval "ac_cv_header_$ac_safe=yes"
4886else
4887 echo "$ac_err" >&5
4888 echo "configure: failed program was:" >&5
4889 cat conftest.$ac_ext >&5
4890 rm -rf conftest*
4891 eval "ac_cv_header_$ac_safe=no"
4892fi
4893rm -f conftest*
4894fi
4895if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4896 echo "$ac_t""yes" 1>&6
4897 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4898 cat >> confdefs.h <<EOF
4899#define $ac_tr_hdr 1
4900EOF
4901
4902else
4903 echo "$ac_t""no" 1>&6
4904fi
4905done
4906
4907for ac_hdr in sys/wait.h wait.h
4908do
4909ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4910echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4911echo "configure:4912: checking for $ac_hdr" >&5
5ee754fc
MK
4912if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4913 echo $ac_n "(cached) $ac_c" 1>&6
4914else
4915 cat > conftest.$ac_ext <<EOF
93d331ba 4916#line 4917 "configure"
5ee754fc
MK
4917#include "confdefs.h"
4918#include <$ac_hdr>
4919EOF
4920ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4921{ (eval echo configure:4922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4922ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4923if test -z "$ac_err"; then
4924 rm -rf conftest*
4925 eval "ac_cv_header_$ac_safe=yes"
4926else
4927 echo "$ac_err" >&5
9608ab8b
MK
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -rf conftest*
5ee754fc 4931 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4932fi
4933rm -f conftest*
4934fi
5ee754fc 4935if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4936 echo "$ac_t""yes" 1>&6
4937 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4938 cat >> confdefs.h <<EOF
4939#define $ac_tr_hdr 1
4940EOF
5ee754fc 4941
9608ab8b
MK
4942else
4943 echo "$ac_t""no" 1>&6
4944fi
4945done
5ee754fc
MK
4946
4947for ac_hdr in termios.h termio.h sgtty.h
4948do
4949ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4950echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4951echo "configure:4952: checking for $ac_hdr" >&5
5ee754fc 4952if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4953 echo $ac_n "(cached) $ac_c" 1>&6
4954else
5ee754fc 4955 cat > conftest.$ac_ext <<EOF
93d331ba 4956#line 4957 "configure"
9608ab8b 4957#include "confdefs.h"
5ee754fc 4958#include <$ac_hdr>
9608ab8b 4959EOF
5ee754fc 4960ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 4961{ (eval echo configure:4962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4962ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4963if test -z "$ac_err"; then
9608ab8b 4964 rm -rf conftest*
5ee754fc 4965 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4966else
5ee754fc 4967 echo "$ac_err" >&5
9608ab8b
MK
4968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
4970 rm -rf conftest*
5ee754fc 4971 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4972fi
4973rm -f conftest*
9608ab8b 4974fi
5ee754fc 4975if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4976 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4977 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4978 cat >> confdefs.h <<EOF
4979#define $ac_tr_hdr 1
4980EOF
4981
9608ab8b
MK
4982else
4983 echo "$ac_t""no" 1>&6
4984fi
5ee754fc 4985done
9608ab8b 4986
5ee754fc
MK
4987for ac_hdr in unistd.h
4988do
4989ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4990echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 4991echo "configure:4992: checking for $ac_hdr" >&5
5ee754fc 4992if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4993 echo $ac_n "(cached) $ac_c" 1>&6
4994else
5ee754fc 4995 cat > conftest.$ac_ext <<EOF
93d331ba 4996#line 4997 "configure"
9608ab8b 4997#include "confdefs.h"
5ee754fc 4998#include <$ac_hdr>
9608ab8b 4999EOF
5ee754fc 5000ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 5001{ (eval echo configure:5002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5002ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5003if test -z "$ac_err"; then
9608ab8b 5004 rm -rf conftest*
5ee754fc 5005 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5006else
5ee754fc 5007 echo "$ac_err" >&5
9608ab8b
MK
5008 echo "configure: failed program was:" >&5
5009 cat conftest.$ac_ext >&5
5010 rm -rf conftest*
5ee754fc 5011 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5012fi
5013rm -f conftest*
9608ab8b 5014fi
5ee754fc 5015if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5016 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5017 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5018 cat >> confdefs.h <<EOF
5019#define $ac_tr_hdr 1
5020EOF
5021
9608ab8b
MK
5022else
5023 echo "$ac_t""no" 1>&6
5024fi
5ee754fc 5025done
9608ab8b 5026
9608ab8b 5027
5ee754fc
MK
5028# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5029# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5030# think that we don't have <curses.h> if we're using GCC.
5031case $host_os in
5032 solaris2.[78])
5033 if test "$GCC" = yes; then
5034 cat >> confdefs.h <<\EOF
5035#define _MSE_INT_H 1
5036EOF
5037
5038 fi ;;
5039esac
5040for ac_hdr in curses.h ncurses.h term.h
5041do
5042ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5043echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 5044echo "configure:5045: checking for $ac_hdr" >&5
5ee754fc 5045if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5046 echo $ac_n "(cached) $ac_c" 1>&6
5047else
5048 cat > conftest.$ac_ext <<EOF
93d331ba 5049#line 5050 "configure"
c906108c 5050#include "confdefs.h"
5ee754fc 5051#include <$ac_hdr>
c906108c
SS
5052EOF
5053ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 5054{ (eval echo configure:5055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5055ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5056if test -z "$ac_err"; then
5057 rm -rf conftest*
5ee754fc 5058 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5059else
5060 echo "$ac_err" >&5
5061 echo "configure: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 rm -rf conftest*
5ee754fc 5064 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5065fi
5066rm -f conftest*
c906108c 5067fi
5ee754fc
MK
5068if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5069 echo "$ac_t""yes" 1>&6
5070 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5071 cat >> confdefs.h <<EOF
5072#define $ac_tr_hdr 1
c906108c 5073EOF
5ee754fc 5074
c906108c 5075else
5ee754fc 5076 echo "$ac_t""no" 1>&6
c906108c 5077fi
5ee754fc 5078done
c906108c
SS
5079
5080
5ee754fc
MK
5081# FIXME: kettenis/20030102: In most cases we include these
5082# unconditionally, so what's the point in checking these?
5083for ac_hdr in ctype.h time.h
c906108c
SS
5084do
5085ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5086echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 5087echo "configure:5088: checking for $ac_hdr" >&5
c906108c
SS
5088if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5089 echo $ac_n "(cached) $ac_c" 1>&6
5090else
5091 cat > conftest.$ac_ext <<EOF
93d331ba 5092#line 5093 "configure"
c906108c
SS
5093#include "confdefs.h"
5094#include <$ac_hdr>
5095EOF
5096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 5097{ (eval echo configure:5098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5098ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5099if test -z "$ac_err"; then
5100 rm -rf conftest*
5101 eval "ac_cv_header_$ac_safe=yes"
5102else
5103 echo "$ac_err" >&5
5104 echo "configure: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 rm -rf conftest*
5107 eval "ac_cv_header_$ac_safe=no"
5108fi
5109rm -f conftest*
5110fi
5111if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5112 echo "$ac_t""yes" 1>&6
5113 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5114 cat >> confdefs.h <<EOF
5115#define $ac_tr_hdr 1
5116EOF
5117
5118else
5119 echo "$ac_t""no" 1>&6
5120fi
5121done
5122
5ee754fc
MK
5123
5124# ------------------ #
5125# Checks for types. #
5126# ------------------ #
5127
5128echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
93d331ba 5129echo "configure:5130: checking return type of signal handlers" >&5
5ee754fc 5130if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132else
5133 cat > conftest.$ac_ext <<EOF
93d331ba 5134#line 5135 "configure"
c906108c
SS
5135#include "confdefs.h"
5136#include <sys/types.h>
5ee754fc
MK
5137#include <signal.h>
5138#ifdef signal
5139#undef signal
c906108c 5140#endif
5ee754fc
MK
5141#ifdef __cplusplus
5142extern "C" void (*signal (int, void (*)(int)))(int);
5143#else
5144void (*signal ()) ();
c906108c
SS
5145#endif
5146
5ee754fc
MK
5147int main() {
5148int i;
5149; return 0; }
c906108c 5150EOF
93d331ba 5151if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5152 rm -rf conftest*
5ee754fc 5153 ac_cv_type_signal=void
c906108c 5154else
5ee754fc
MK
5155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
c906108c 5157 rm -rf conftest*
5ee754fc 5158 ac_cv_type_signal=int
c906108c
SS
5159fi
5160rm -f conftest*
c906108c
SS
5161fi
5162
5ee754fc
MK
5163echo "$ac_t""$ac_cv_type_signal" 1>&6
5164cat >> confdefs.h <<EOF
5165#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5166EOF
5167
c906108c
SS
5168
5169
5ee754fc
MK
5170# ------------------------------------- #
5171# Checks for compiler characteristics. #
5172# ------------------------------------- #
5173
c906108c 5174echo $ac_n "checking for working const""... $ac_c" 1>&6
93d331ba 5175echo "configure:5176: checking for working const" >&5
c906108c
SS
5176if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5177 echo $ac_n "(cached) $ac_c" 1>&6
5178else
5179 cat > conftest.$ac_ext <<EOF
93d331ba 5180#line 5181 "configure"
c906108c
SS
5181#include "confdefs.h"
5182
5183int main() {
5184
5185/* Ultrix mips cc rejects this. */
5186typedef int charset[2]; const charset x;
5187/* SunOS 4.1.1 cc rejects this. */
5188char const *const *ccp;
5189char **p;
5190/* NEC SVR4.0.2 mips cc rejects this. */
5191struct point {int x, y;};
5192static struct point const zero = {0,0};
5193/* AIX XL C 1.02.0.0 rejects this.
5194 It does not let you subtract one const X* pointer from another in an arm
5195 of an if-expression whose if-part is not a constant expression */
5196const char *g = "string";
5197ccp = &g + (g ? g-g : 0);
5198/* HPUX 7.0 cc rejects these. */
5199++ccp;
5200p = (char**) ccp;
5201ccp = (char const *const *) p;
5202{ /* SCO 3.2v4 cc rejects this. */
5203 char *t;
5204 char const *s = 0 ? (char *) 0 : (char const *) 0;
5205
5206 *t++ = 0;
5207}
5208{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5209 int x[] = {25, 17};
5210 const int *foo = &x[0];
5211 ++foo;
5212}
5213{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5214 typedef const int *iptr;
5215 iptr p = 0;
5216 ++p;
5217}
5218{ /* AIX XL C 1.02.0.0 rejects this saying
5219 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5220 struct s { int j; const int *ap[3]; };
5221 struct s *b; b->j = 5;
5222}
5223{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5224 const int foo = 10;
5225}
5226
5227; return 0; }
5228EOF
93d331ba 5229if { (eval echo configure:5230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5230 rm -rf conftest*
5231 ac_cv_c_const=yes
5232else
5233 echo "configure: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
5235 rm -rf conftest*
5236 ac_cv_c_const=no
5237fi
5238rm -f conftest*
5239fi
5240
5241echo "$ac_t""$ac_cv_c_const" 1>&6
5242if test $ac_cv_c_const = no; then
5243 cat >> confdefs.h <<\EOF
5244#define const
5245EOF
5246
5247fi
5248
bce58c09 5249echo $ac_n "checking for inline""... $ac_c" 1>&6
93d331ba 5250echo "configure:5251: checking for inline" >&5
bce58c09
JB
5251if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5252 echo $ac_n "(cached) $ac_c" 1>&6
5253else
5254 ac_cv_c_inline=no
5255for ac_kw in inline __inline__ __inline; do
5256 cat > conftest.$ac_ext <<EOF
93d331ba 5257#line 5258 "configure"
bce58c09
JB
5258#include "confdefs.h"
5259
5260int main() {
5261} $ac_kw foo() {
5262; return 0; }
5263EOF
93d331ba 5264if { (eval echo configure:5265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5265 rm -rf conftest*
5266 ac_cv_c_inline=$ac_kw; break
5267else
5268 echo "configure: failed program was:" >&5
5269 cat conftest.$ac_ext >&5
5270fi
5271rm -f conftest*
5272done
5273
5274fi
5275
5276echo "$ac_t""$ac_cv_c_inline" 1>&6
5277case "$ac_cv_c_inline" in
5278 inline | yes) ;;
5279 no) cat >> confdefs.h <<\EOF
5280#define inline
5281EOF
5282 ;;
5283 *) cat >> confdefs.h <<EOF
5284#define inline $ac_cv_c_inline
5285EOF
5286 ;;
5287esac
5288
c906108c 5289
5ee754fc
MK
5290# ------------------------------ #
5291# Checks for library functions. #
5292# ------------------------------ #
5293
46711df8
MK
5294# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5295# for constant arguments. Useless!
5296echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
93d331ba 5297echo "configure:5298: checking for working alloca.h" >&5
46711df8
MK
5298if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5299 echo $ac_n "(cached) $ac_c" 1>&6
5300else
5301 cat > conftest.$ac_ext <<EOF
93d331ba 5302#line 5303 "configure"
46711df8
MK
5303#include "confdefs.h"
5304#include <alloca.h>
5305int main() {
5306char *p = alloca(2 * sizeof(int));
5307; return 0; }
5308EOF
93d331ba 5309if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5310 rm -rf conftest*
5311 ac_cv_header_alloca_h=yes
5312else
5313 echo "configure: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 rm -rf conftest*
5316 ac_cv_header_alloca_h=no
5317fi
5318rm -f conftest*
5319fi
5320
5321echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5322if test $ac_cv_header_alloca_h = yes; then
5323 cat >> confdefs.h <<\EOF
5324#define HAVE_ALLOCA_H 1
5325EOF
5326
5327fi
5328
5329echo $ac_n "checking for alloca""... $ac_c" 1>&6
93d331ba 5330echo "configure:5331: checking for alloca" >&5
46711df8
MK
5331if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5332 echo $ac_n "(cached) $ac_c" 1>&6
5333else
5334 cat > conftest.$ac_ext <<EOF
93d331ba 5335#line 5336 "configure"
46711df8
MK
5336#include "confdefs.h"
5337
5338#ifdef __GNUC__
5339# define alloca __builtin_alloca
5340#else
5341# ifdef _MSC_VER
5342# include <malloc.h>
5343# define alloca _alloca
5344# else
5345# if HAVE_ALLOCA_H
5346# include <alloca.h>
5347# else
5348# ifdef _AIX
5349 #pragma alloca
5350# else
5351# ifndef alloca /* predefined by HP cc +Olibcalls */
5352char *alloca ();
5353# endif
5354# endif
5355# endif
5356# endif
5357#endif
5358
5359int main() {
5360char *p = (char *) alloca(1);
5361; return 0; }
5362EOF
93d331ba 5363if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5364 rm -rf conftest*
5365 ac_cv_func_alloca_works=yes
5366else
5367 echo "configure: failed program was:" >&5
5368 cat conftest.$ac_ext >&5
5369 rm -rf conftest*
5370 ac_cv_func_alloca_works=no
5371fi
5372rm -f conftest*
5373fi
5374
5375echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5376if test $ac_cv_func_alloca_works = yes; then
5377 cat >> confdefs.h <<\EOF
5378#define HAVE_ALLOCA 1
5379EOF
5380
5381fi
5382
5383if test $ac_cv_func_alloca_works = no; then
5384 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5385 # that cause trouble. Some versions do not even contain alloca or
5386 # contain a buggy version. If you still want to use their alloca,
5387 # use ar to extract alloca.o from them instead of compiling alloca.c.
5388 ALLOCA=alloca.${ac_objext}
5389 cat >> confdefs.h <<\EOF
5390#define C_ALLOCA 1
5391EOF
5392
5393
5394echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
93d331ba 5395echo "configure:5396: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5396if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5397 echo $ac_n "(cached) $ac_c" 1>&6
5398else
5399 cat > conftest.$ac_ext <<EOF
93d331ba 5400#line 5401 "configure"
46711df8
MK
5401#include "confdefs.h"
5402#if defined(CRAY) && ! defined(CRAY2)
5403webecray
5404#else
5405wenotbecray
5406#endif
5407
5408EOF
5409if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5410 egrep "webecray" >/dev/null 2>&1; then
5411 rm -rf conftest*
5412 ac_cv_os_cray=yes
5413else
5414 rm -rf conftest*
5415 ac_cv_os_cray=no
5416fi
5417rm -f conftest*
5418
5419fi
5420
5421echo "$ac_t""$ac_cv_os_cray" 1>&6
5422if test $ac_cv_os_cray = yes; then
5423for ac_func in _getb67 GETB67 getb67; do
5424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 5425echo "configure:5426: checking for $ac_func" >&5
46711df8
MK
5426if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5427 echo $ac_n "(cached) $ac_c" 1>&6
5428else
5429 cat > conftest.$ac_ext <<EOF
93d331ba 5430#line 5431 "configure"
46711df8
MK
5431#include "confdefs.h"
5432/* System header to define __stub macros and hopefully few prototypes,
5433 which can conflict with char $ac_func(); below. */
5434#include <assert.h>
5435/* Override any gcc2 internal prototype to avoid an error. */
5436/* We use char because int might match the return type of a gcc2
5437 builtin and then its argument prototype would still apply. */
5438char $ac_func();
5439
5440int main() {
5441
5442/* The GNU C library defines this for functions which it implements
5443 to always fail with ENOSYS. Some functions are actually named
5444 something starting with __ and the normal name is an alias. */
5445#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5446choke me
5447#else
5448$ac_func();
5449#endif
5450
5451; return 0; }
5452EOF
93d331ba 5453if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5454 rm -rf conftest*
5455 eval "ac_cv_func_$ac_func=yes"
5456else
5457 echo "configure: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 rm -rf conftest*
5460 eval "ac_cv_func_$ac_func=no"
5461fi
5462rm -f conftest*
5463fi
5464
5465if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5466 echo "$ac_t""yes" 1>&6
5467 cat >> confdefs.h <<EOF
5468#define CRAY_STACKSEG_END $ac_func
5469EOF
5470
5471 break
5472else
5473 echo "$ac_t""no" 1>&6
5474fi
5475
5476done
5477fi
5478
5479echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
93d331ba 5480echo "configure:5481: checking stack direction for C alloca" >&5
46711df8
MK
5481if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5482 echo $ac_n "(cached) $ac_c" 1>&6
5483else
5484 if test "$cross_compiling" = yes; then
5485 ac_cv_c_stack_direction=0
5486else
5487 cat > conftest.$ac_ext <<EOF
93d331ba 5488#line 5489 "configure"
46711df8
MK
5489#include "confdefs.h"
5490find_stack_direction ()
5491{
5492 static char *addr = 0;
5493 auto char dummy;
5494 if (addr == 0)
5495 {
5496 addr = &dummy;
5497 return find_stack_direction ();
5498 }
5499 else
5500 return (&dummy > addr) ? 1 : -1;
5501}
5502main ()
5503{
5504 exit (find_stack_direction() < 0);
5505}
5506EOF
93d331ba 5507if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5508then
5509 ac_cv_c_stack_direction=1
5510else
5511 echo "configure: failed program was:" >&5
5512 cat conftest.$ac_ext >&5
5513 rm -fr conftest*
5514 ac_cv_c_stack_direction=-1
5515fi
5516rm -fr conftest*
5517fi
5518
5519fi
5520
5521echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5522cat >> confdefs.h <<EOF
5523#define STACK_DIRECTION $ac_cv_c_stack_direction
5524EOF
5525
5526fi
5527
97bf5e38
MK
5528for ac_hdr in unistd.h
5529do
5530ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5531echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
93d331ba 5532echo "configure:5533: checking for $ac_hdr" >&5
74c1b268
AC
5533if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5534 echo $ac_n "(cached) $ac_c" 1>&6
5535else
5536 cat > conftest.$ac_ext <<EOF
93d331ba 5537#line 5538 "configure"
74c1b268 5538#include "confdefs.h"
97bf5e38 5539#include <$ac_hdr>
74c1b268
AC
5540EOF
5541ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 5542{ (eval echo configure:5543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5543ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5544if test -z "$ac_err"; then
5545 rm -rf conftest*
5546 eval "ac_cv_header_$ac_safe=yes"
5547else
5548 echo "$ac_err" >&5
5549 echo "configure: failed program was:" >&5
5550 cat conftest.$ac_ext >&5
5551 rm -rf conftest*
5552 eval "ac_cv_header_$ac_safe=no"
5553fi
5554rm -f conftest*
5555fi
5556if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5557 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5558 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5559 cat >> confdefs.h <<EOF
5560#define $ac_tr_hdr 1
74c1b268 5561EOF
97bf5e38 5562
74c1b268
AC
5563else
5564 echo "$ac_t""no" 1>&6
5565fi
97bf5e38 5566done
74c1b268 5567
97bf5e38
MK
5568for ac_func in getpagesize
5569do
5570echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 5571echo "configure:5572: checking for $ac_func" >&5
97bf5e38 5572if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5573 echo $ac_n "(cached) $ac_c" 1>&6
5574else
5575 cat > conftest.$ac_ext <<EOF
93d331ba 5576#line 5577 "configure"
74c1b268
AC
5577#include "confdefs.h"
5578/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5579 which can conflict with char $ac_func(); below. */
74c1b268
AC
5580#include <assert.h>
5581/* Override any gcc2 internal prototype to avoid an error. */
5582/* We use char because int might match the return type of a gcc2
5583 builtin and then its argument prototype would still apply. */
97bf5e38 5584char $ac_func();
74c1b268
AC
5585
5586int main() {
5587
5588/* The GNU C library defines this for functions which it implements
5589 to always fail with ENOSYS. Some functions are actually named
5590 something starting with __ and the normal name is an alias. */
97bf5e38 5591#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5592choke me
5593#else
97bf5e38 5594$ac_func();
74c1b268
AC
5595#endif
5596
5597; return 0; }
5598EOF
93d331ba 5599if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5600 rm -rf conftest*
97bf5e38 5601 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5602else
5603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
5605 rm -rf conftest*
97bf5e38 5606 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5607fi
5608rm -f conftest*
5609fi
5610
97bf5e38 5611if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5612 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5613 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5614 cat >> confdefs.h <<EOF
5615#define $ac_tr_func 1
5616EOF
5617
74c1b268
AC
5618else
5619 echo "$ac_t""no" 1>&6
5620fi
97bf5e38 5621done
74c1b268 5622
97bf5e38 5623echo $ac_n "checking for working mmap""... $ac_c" 1>&6
93d331ba 5624echo "configure:5625: checking for working mmap" >&5
97bf5e38
MK
5625if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5626 echo $ac_n "(cached) $ac_c" 1>&6
5627else
5628 if test "$cross_compiling" = yes; then
5629 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5630else
5631 cat > conftest.$ac_ext <<EOF
93d331ba 5632#line 5633 "configure"
74c1b268 5633#include "confdefs.h"
97bf5e38
MK
5634
5635/* Thanks to Mike Haertel and Jim Avera for this test.
5636 Here is a matrix of mmap possibilities:
5637 mmap private not fixed
5638 mmap private fixed at somewhere currently unmapped
5639 mmap private fixed at somewhere already mapped
5640 mmap shared not fixed
5641 mmap shared fixed at somewhere currently unmapped
5642 mmap shared fixed at somewhere already mapped
5643 For private mappings, we should verify that changes cannot be read()
5644 back from the file, nor mmap's back from the file at a different
5645 address. (There have been systems where private was not correctly
5646 implemented like the infamous i386 svr4.0, and systems where the
5647 VM page cache was not coherent with the filesystem buffer cache
5648 like early versions of FreeBSD and possibly contemporary NetBSD.)
5649 For shared mappings, we should conversely verify that changes get
5650 propogated back to all the places they're supposed to be.
5651
5652 Grep wants private fixed already mapped.
5653 The main things grep needs to know about mmap are:
5654 * does it exist and is it safe to write into the mmap'd area
5655 * how to use it (BSD variants) */
74c1b268 5656#include <sys/types.h>
97bf5e38
MK
5657#include <fcntl.h>
5658#include <sys/mman.h>
5659
5660/* This mess was copied from the GNU getpagesize.h. */
5661#ifndef HAVE_GETPAGESIZE
5662# ifdef HAVE_UNISTD_H
5663# include <unistd.h>
5664# endif
5665
5666/* Assume that all systems that can run configure have sys/param.h. */
5667# ifndef HAVE_SYS_PARAM_H
5668# define HAVE_SYS_PARAM_H 1
5669# endif
5670
5671# ifdef _SC_PAGESIZE
5672# define getpagesize() sysconf(_SC_PAGESIZE)
5673# else /* no _SC_PAGESIZE */
5674# ifdef HAVE_SYS_PARAM_H
5675# include <sys/param.h>
5676# ifdef EXEC_PAGESIZE
5677# define getpagesize() EXEC_PAGESIZE
5678# else /* no EXEC_PAGESIZE */
5679# ifdef NBPG
5680# define getpagesize() NBPG * CLSIZE
5681# ifndef CLSIZE
5682# define CLSIZE 1
5683# endif /* no CLSIZE */
5684# else /* no NBPG */
5685# ifdef NBPC
5686# define getpagesize() NBPC
5687# else /* no NBPC */
5688# ifdef PAGESIZE
5689# define getpagesize() PAGESIZE
5690# endif /* PAGESIZE */
5691# endif /* no NBPC */
5692# endif /* no NBPG */
5693# endif /* no EXEC_PAGESIZE */
5694# else /* no HAVE_SYS_PARAM_H */
5695# define getpagesize() 8192 /* punt totally */
5696# endif /* no HAVE_SYS_PARAM_H */
5697# endif /* no _SC_PAGESIZE */
5698
5699#endif /* no HAVE_GETPAGESIZE */
5700
74c1b268 5701#ifdef __cplusplus
97bf5e38 5702extern "C" { void *malloc(unsigned); }
74c1b268 5703#else
97bf5e38 5704char *malloc();
74c1b268 5705#endif
74c1b268 5706
97bf5e38
MK
5707int
5708main()
5709{
5710 char *data, *data2, *data3;
5711 int i, pagesize;
5712 int fd;
74c1b268 5713
97bf5e38 5714 pagesize = getpagesize();
74c1b268 5715
97bf5e38
MK
5716 /*
5717 * First, make a file with some known garbage in it.
5718 */
5719 data = malloc(pagesize);
5720 if (!data)
5721 exit(1);
5722 for (i = 0; i < pagesize; ++i)
5723 *(data + i) = rand();
5724 umask(0);
5725 fd = creat("conftestmmap", 0600);
5726 if (fd < 0)
5727 exit(1);
5728 if (write(fd, data, pagesize) != pagesize)
5729 exit(1);
5730 close(fd);
74c1b268 5731
97bf5e38
MK
5732 /*
5733 * Next, try to mmap the file at a fixed address which
5734 * already has something else allocated at it. If we can,
5735 * also make sure that we see the same garbage.
5736 */
5737 fd = open("conftestmmap", O_RDWR);
5738 if (fd < 0)
5739 exit(1);
5740 data2 = malloc(2 * pagesize);
5741 if (!data2)
5742 exit(1);
5743 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5744 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5745 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5746 exit(1);
5747 for (i = 0; i < pagesize; ++i)
5748 if (*(data + i) != *(data2 + i))
5749 exit(1);
74c1b268 5750
97bf5e38
MK
5751 /*
5752 * Finally, make sure that changes to the mapped area
5753 * do not percolate back to the file as seen by read().
5754 * (This is a bug on some variants of i386 svr4.0.)
5755 */
5756 for (i = 0; i < pagesize; ++i)
5757 *(data2 + i) = *(data2 + i) + 1;
5758 data3 = malloc(pagesize);
5759 if (!data3)
5760 exit(1);
5761 if (read(fd, data3, pagesize) != pagesize)
5762 exit(1);
5763 for (i = 0; i < pagesize; ++i)
5764 if (*(data + i) != *(data3 + i))
5765 exit(1);
5766 close(fd);
5767 unlink("conftestmmap");
5768 exit(0);
74c1b268 5769}
97bf5e38 5770
74c1b268 5771EOF
93d331ba 5772if { (eval echo configure:5773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5773then
97bf5e38 5774 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5775else
5776 echo "configure: failed program was:" >&5
5777 cat conftest.$ac_ext >&5
5778 rm -fr conftest*
97bf5e38 5779 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5780fi
5781rm -fr conftest*
5782fi
5783
5784fi
5785
97bf5e38
MK
5786echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5787if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5788 cat >> confdefs.h <<\EOF
97bf5e38 5789#define HAVE_MMAP 1
74c1b268
AC
5790EOF
5791
5792fi
5793
97bf5e38 5794echo $ac_n "checking for pid_t""... $ac_c" 1>&6
93d331ba 5795echo "configure:5796: checking for pid_t" >&5
97bf5e38 5796if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5797 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5798else
5799 cat > conftest.$ac_ext <<EOF
93d331ba 5800#line 5801 "configure"
0200359f 5801#include "confdefs.h"
97bf5e38
MK
5802#include <sys/types.h>
5803#if STDC_HEADERS
5804#include <stdlib.h>
5805#include <stddef.h>
0200359f 5806#endif
0200359f 5807EOF
97bf5e38
MK
5808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5809 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5810 rm -rf conftest*
5811 ac_cv_type_pid_t=yes
0200359f 5812else
97bf5e38
MK
5813 rm -rf conftest*
5814 ac_cv_type_pid_t=no
0200359f 5815fi
97bf5e38 5816rm -f conftest*
0200359f
MK
5817
5818fi
97bf5e38
MK
5819echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5820if test $ac_cv_type_pid_t = no; then
0200359f 5821 cat >> confdefs.h <<\EOF
97bf5e38 5822#define pid_t int
0200359f
MK
5823EOF
5824
5825fi
5826
97bf5e38
MK
5827ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5828echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
93d331ba 5829echo "configure:5830: checking for vfork.h" >&5
97bf5e38 5830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5831 echo $ac_n "(cached) $ac_c" 1>&6
5832else
5833 cat > conftest.$ac_ext <<EOF
93d331ba 5834#line 5835 "configure"
72473524 5835#include "confdefs.h"
97bf5e38 5836#include <vfork.h>
72473524 5837EOF
97bf5e38 5838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 5839{ (eval echo configure:5840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5841if test -z "$ac_err"; then
72473524 5842 rm -rf conftest*
97bf5e38 5843 eval "ac_cv_header_$ac_safe=yes"
72473524 5844else
97bf5e38 5845 echo "$ac_err" >&5
72473524
DJ
5846 echo "configure: failed program was:" >&5
5847 cat conftest.$ac_ext >&5
5848 rm -rf conftest*
97bf5e38 5849 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5850fi
5851rm -f conftest*
5852fi
97bf5e38
MK
5853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5854 echo "$ac_t""yes" 1>&6
72473524 5855 cat >> confdefs.h <<\EOF
97bf5e38 5856#define HAVE_VFORK_H 1
72473524
DJ
5857EOF
5858
97bf5e38
MK
5859else
5860 echo "$ac_t""no" 1>&6
72473524 5861fi
c906108c 5862
97bf5e38 5863echo $ac_n "checking for working vfork""... $ac_c" 1>&6
93d331ba 5864echo "configure:5865: checking for working vfork" >&5
97bf5e38
MK
5865if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5866 echo $ac_n "(cached) $ac_c" 1>&6
5867else
5868 if test "$cross_compiling" = yes; then
5869 echo $ac_n "checking for vfork""... $ac_c" 1>&6
93d331ba 5870echo "configure:5871: checking for vfork" >&5
97bf5e38 5871if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5872 echo $ac_n "(cached) $ac_c" 1>&6
5873else
5874 cat > conftest.$ac_ext <<EOF
93d331ba 5875#line 5876 "configure"
2b2d558c 5876#include "confdefs.h"
97bf5e38
MK
5877/* System header to define __stub macros and hopefully few prototypes,
5878 which can conflict with char vfork(); below. */
5879#include <assert.h>
5880/* Override any gcc2 internal prototype to avoid an error. */
5881/* We use char because int might match the return type of a gcc2
5882 builtin and then its argument prototype would still apply. */
5883char vfork();
2b2d558c
MK
5884
5885int main() {
97bf5e38
MK
5886
5887/* The GNU C library defines this for functions which it implements
5888 to always fail with ENOSYS. Some functions are actually named
5889 something starting with __ and the normal name is an alias. */
5890#if defined (__stub_vfork) || defined (__stub___vfork)
5891choke me
5892#else
5893vfork();
5894#endif
5895
2b2d558c
MK
5896; return 0; }
5897EOF
93d331ba 5898if { (eval echo configure:5899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5899 rm -rf conftest*
97bf5e38 5900 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5901else
5902 echo "configure: failed program was:" >&5
5903 cat conftest.$ac_ext >&5
5904 rm -rf conftest*
97bf5e38 5905 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5906fi
5907rm -f conftest*
5908fi
5909
97bf5e38
MK
5910if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5911 echo "$ac_t""yes" 1>&6
5912 :
5913else
5914 echo "$ac_t""no" 1>&6
2b2d558c
MK
5915fi
5916
97bf5e38 5917ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5918else
5919 cat > conftest.$ac_ext <<EOF
93d331ba 5920#line 5921 "configure"
7dfa765c 5921#include "confdefs.h"
97bf5e38
MK
5922/* Thanks to Paul Eggert for this test. */
5923#include <stdio.h>
5924#include <sys/types.h>
5925#include <sys/stat.h>
5926#ifdef HAVE_UNISTD_H
5927#include <unistd.h>
5928#endif
5929#ifdef HAVE_VFORK_H
5930#include <vfork.h>
5931#endif
5932/* On some sparc systems, changes by the child to local and incoming
5933 argument registers are propagated back to the parent.
5934 The compiler is told about this with #include <vfork.h>,
5935 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5936 Test for this by using a static variable whose address
5937 is put into a register that is clobbered by the vfork. */
5938static
5939#ifdef __cplusplus
5940sparc_address_test (int arg)
5941#else
5942sparc_address_test (arg) int arg;
5943#endif
5944{
5945 static pid_t child;
5946 if (!child) {
5947 child = vfork ();
5948 if (child < 0) {
5949 perror ("vfork");
5950 _exit(2);
5951 }
5952 if (!child) {
5953 arg = getpid();
5954 write(-1, "", 0);
5955 _exit (arg);
5956 }
5957 }
5958}
5959main() {
5960 pid_t parent = getpid ();
5961 pid_t child;
7dfa765c 5962
97bf5e38 5963 sparc_address_test ();
7dfa765c 5964
97bf5e38 5965 child = vfork ();
7dfa765c 5966
97bf5e38
MK
5967 if (child == 0) {
5968 /* Here is another test for sparc vfork register problems.
5969 This test uses lots of local variables, at least
5970 as many local variables as main has allocated so far
5971 including compiler temporaries. 4 locals are enough for
5972 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5973 A buggy compiler should reuse the register of parent
5974 for one of the local variables, since it will think that
5975 parent can't possibly be used any more in this routine.
5976 Assigning to the local variable will thus munge parent
5977 in the parent process. */
5978 pid_t
5979 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5980 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5981 /* Convince the compiler that p..p7 are live; otherwise, it might
5982 use the same hardware register for all 8 local variables. */
5983 if (p != p1 || p != p2 || p != p3 || p != p4
5984 || p != p5 || p != p6 || p != p7)
5985 _exit(1);
7dfa765c 5986
97bf5e38
MK
5987 /* On some systems (e.g. IRIX 3.3),
5988 vfork doesn't separate parent from child file descriptors.
5989 If the child closes a descriptor before it execs or exits,
5990 this munges the parent's descriptor as well.
5991 Test for this by closing stdout in the child. */
5992 _exit(close(fileno(stdout)) != 0);
5993 } else {
5994 int status;
5995 struct stat st;
64bb1671 5996
97bf5e38
MK
5997 while (wait(&status) != child)
5998 ;
5999 exit(
6000 /* Was there some problem with vforking? */
6001 child < 0
64bb1671 6002
97bf5e38
MK
6003 /* Did the child fail? (This shouldn't happen.) */
6004 || status
64bb1671 6005
97bf5e38
MK
6006 /* Did the vfork/compiler bug occur? */
6007 || parent != getpid()
6008
6009 /* Did the file descriptor bug occur? */
6010 || fstat(fileno(stdout), &st) != 0
6011 );
6012 }
6013}
5c44784c 6014EOF
93d331ba 6015if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6016then
6017 ac_cv_func_vfork_works=yes
5c44784c
JM
6018else
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
97bf5e38
MK
6021 rm -fr conftest*
6022 ac_cv_func_vfork_works=no
5c44784c 6023fi
97bf5e38 6024rm -fr conftest*
5c44784c
JM
6025fi
6026
0afdd437
MK
6027fi
6028
97bf5e38
MK
6029echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6030if test $ac_cv_func_vfork_works = no; then
0afdd437 6031 cat >> confdefs.h <<\EOF
97bf5e38 6032#define vfork fork
0afdd437
MK
6033EOF
6034
6035fi
6036
97bf5e38
MK
6037for ac_func in canonicalize_file_name realpath
6038do
6039echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6040echo "configure:6041: checking for $ac_func" >&5
97bf5e38 6041if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6042 echo $ac_n "(cached) $ac_c" 1>&6
6043else
6044 cat > conftest.$ac_ext <<EOF
93d331ba 6045#line 6046 "configure"
7e89e357 6046#include "confdefs.h"
97bf5e38
MK
6047/* System header to define __stub macros and hopefully few prototypes,
6048 which can conflict with char $ac_func(); below. */
6049#include <assert.h>
6050/* Override any gcc2 internal prototype to avoid an error. */
6051/* We use char because int might match the return type of a gcc2
6052 builtin and then its argument prototype would still apply. */
6053char $ac_func();
6054
7e89e357 6055int main() {
97bf5e38
MK
6056
6057/* The GNU C library defines this for functions which it implements
6058 to always fail with ENOSYS. Some functions are actually named
6059 something starting with __ and the normal name is an alias. */
6060#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6061choke me
6062#else
6063$ac_func();
6064#endif
6065
7e89e357
JT
6066; return 0; }
6067EOF
93d331ba 6068if { (eval echo configure:6069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6069 rm -rf conftest*
97bf5e38 6070 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6071else
6072 echo "configure: failed program was:" >&5
6073 cat conftest.$ac_ext >&5
6074 rm -rf conftest*
97bf5e38 6075 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6076fi
6077rm -f conftest*
6078fi
6079
97bf5e38
MK
6080if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6081 echo "$ac_t""yes" 1>&6
6082 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6083 cat >> confdefs.h <<EOF
6084#define $ac_tr_func 1
7e89e357 6085EOF
97bf5e38
MK
6086
6087else
6088 echo "$ac_t""no" 1>&6
7e89e357 6089fi
97bf5e38 6090done
7e89e357 6091
97bf5e38 6092for ac_func in poll
7be570e7
JM
6093do
6094echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6095echo "configure:6096: checking for $ac_func" >&5
7be570e7
JM
6096if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6097 echo $ac_n "(cached) $ac_c" 1>&6
6098else
6099 cat > conftest.$ac_ext <<EOF
93d331ba 6100#line 6101 "configure"
7be570e7
JM
6101#include "confdefs.h"
6102/* System header to define __stub macros and hopefully few prototypes,
6103 which can conflict with char $ac_func(); below. */
6104#include <assert.h>
6105/* Override any gcc2 internal prototype to avoid an error. */
6106/* We use char because int might match the return type of a gcc2
6107 builtin and then its argument prototype would still apply. */
6108char $ac_func();
6109
6110int main() {
6111
6112/* The GNU C library defines this for functions which it implements
6113 to always fail with ENOSYS. Some functions are actually named
6114 something starting with __ and the normal name is an alias. */
6115#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6116choke me
6117#else
6118$ac_func();
6119#endif
6120
6121; return 0; }
6122EOF
93d331ba 6123if { (eval echo configure:6124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6124 rm -rf conftest*
6125 eval "ac_cv_func_$ac_func=yes"
6126else
6127 echo "configure: failed program was:" >&5
6128 cat conftest.$ac_ext >&5
6129 rm -rf conftest*
6130 eval "ac_cv_func_$ac_func=no"
6131fi
6132rm -f conftest*
6133fi
6134
6135if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6136 echo "$ac_t""yes" 1>&6
6137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6138 cat >> confdefs.h <<EOF
6139#define $ac_tr_func 1
6140EOF
6141
6142else
6143 echo "$ac_t""no" 1>&6
6144fi
6145done
6146
97bf5e38
MK
6147for ac_func in sbrk
6148do
6149echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6150echo "configure:6151: checking for $ac_func" >&5
97bf5e38 6151if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6152 echo $ac_n "(cached) $ac_c" 1>&6
6153else
6154 cat > conftest.$ac_ext <<EOF
93d331ba 6155#line 6156 "configure"
c906108c 6156#include "confdefs.h"
97bf5e38
MK
6157/* System header to define __stub macros and hopefully few prototypes,
6158 which can conflict with char $ac_func(); below. */
6159#include <assert.h>
6160/* Override any gcc2 internal prototype to avoid an error. */
6161/* We use char because int might match the return type of a gcc2
6162 builtin and then its argument prototype would still apply. */
6163char $ac_func();
c906108c 6164
97bf5e38
MK
6165int main() {
6166
6167/* The GNU C library defines this for functions which it implements
6168 to always fail with ENOSYS. Some functions are actually named
6169 something starting with __ and the normal name is an alias. */
6170#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6171choke me
c906108c 6172#else
97bf5e38 6173$ac_func();
c906108c 6174#endif
97bf5e38 6175
c906108c
SS
6176; return 0; }
6177EOF
93d331ba 6178if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6179 rm -rf conftest*
97bf5e38 6180 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6181else
6182 echo "configure: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 rm -rf conftest*
97bf5e38 6185 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6186fi
6187rm -f conftest*
6188fi
6189
97bf5e38
MK
6190if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6191 echo "$ac_t""yes" 1>&6
6192 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6193 cat >> confdefs.h <<EOF
6194#define $ac_tr_func 1
c906108c 6195EOF
97bf5e38
MK
6196
6197else
6198 echo "$ac_t""no" 1>&6
c906108c 6199fi
97bf5e38 6200done
c906108c 6201
97bf5e38
MK
6202for ac_func in setpgid setpgrp
6203do
6204echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6205echo "configure:6206: checking for $ac_func" >&5
97bf5e38 6206if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6207 echo $ac_n "(cached) $ac_c" 1>&6
6208else
6209 cat > conftest.$ac_ext <<EOF
93d331ba 6210#line 6211 "configure"
c906108c 6211#include "confdefs.h"
97bf5e38
MK
6212/* System header to define __stub macros and hopefully few prototypes,
6213 which can conflict with char $ac_func(); below. */
6214#include <assert.h>
6215/* Override any gcc2 internal prototype to avoid an error. */
6216/* We use char because int might match the return type of a gcc2
6217 builtin and then its argument prototype would still apply. */
6218char $ac_func();
c906108c 6219
97bf5e38
MK
6220int main() {
6221
6222/* The GNU C library defines this for functions which it implements
6223 to always fail with ENOSYS. Some functions are actually named
6224 something starting with __ and the normal name is an alias. */
6225#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6226choke me
c906108c 6227#else
97bf5e38 6228$ac_func();
c906108c 6229#endif
97bf5e38 6230
c906108c
SS
6231; return 0; }
6232EOF
93d331ba 6233if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6234 rm -rf conftest*
97bf5e38 6235 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6236else
6237 echo "configure: failed program was:" >&5
6238 cat conftest.$ac_ext >&5
6239 rm -rf conftest*
97bf5e38 6240 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6241fi
6242rm -f conftest*
6243fi
6244
97bf5e38
MK
6245if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6246 echo "$ac_t""yes" 1>&6
6247 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6248 cat >> confdefs.h <<EOF
6249#define $ac_tr_func 1
c906108c 6250EOF
97bf5e38
MK
6251
6252else
6253 echo "$ac_t""no" 1>&6
c906108c 6254fi
97bf5e38 6255done
c906108c 6256
e1ea1d75 6257for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6258do
6259echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6260echo "configure:6261: checking for $ac_func" >&5
97bf5e38 6261if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6262 echo $ac_n "(cached) $ac_c" 1>&6
6263else
6264 cat > conftest.$ac_ext <<EOF
93d331ba 6265#line 6266 "configure"
c906108c 6266#include "confdefs.h"
97bf5e38
MK
6267/* System header to define __stub macros and hopefully few prototypes,
6268 which can conflict with char $ac_func(); below. */
6269#include <assert.h>
6270/* Override any gcc2 internal prototype to avoid an error. */
6271/* We use char because int might match the return type of a gcc2
6272 builtin and then its argument prototype would still apply. */
6273char $ac_func();
c906108c 6274
97bf5e38
MK
6275int main() {
6276
6277/* The GNU C library defines this for functions which it implements
6278 to always fail with ENOSYS. Some functions are actually named
6279 something starting with __ and the normal name is an alias. */
6280#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6281choke me
c906108c 6282#else
97bf5e38 6283$ac_func();
c906108c 6284#endif
97bf5e38 6285
c906108c
SS
6286; return 0; }
6287EOF
93d331ba 6288if { (eval echo configure:6289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6289 rm -rf conftest*
97bf5e38 6290 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6291else
6292 echo "configure: failed program was:" >&5
6293 cat conftest.$ac_ext >&5
6294 rm -rf conftest*
97bf5e38 6295 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6296fi
6297rm -f conftest*
6298fi
6299
97bf5e38
MK
6300if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6301 echo "$ac_t""yes" 1>&6
6302 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6303 cat >> confdefs.h <<EOF
6304#define $ac_tr_func 1
c906108c 6305EOF
e1ea1d75 6306
97bf5e38
MK
6307else
6308 echo "$ac_t""no" 1>&6
c906108c 6309fi
97bf5e38 6310done
c906108c 6311
97bf5e38
MK
6312for ac_func in socketpair
6313do
6314echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
93d331ba 6315echo "configure:6316: checking for $ac_func" >&5
97bf5e38 6316if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6317 echo $ac_n "(cached) $ac_c" 1>&6
6318else
6319 cat > conftest.$ac_ext <<EOF
93d331ba 6320#line 6321 "configure"
c906108c 6321#include "confdefs.h"
97bf5e38
MK
6322/* System header to define __stub macros and hopefully few prototypes,
6323 which can conflict with char $ac_func(); below. */
6324#include <assert.h>
6325/* Override any gcc2 internal prototype to avoid an error. */
6326/* We use char because int might match the return type of a gcc2
6327 builtin and then its argument prototype would still apply. */
6328char $ac_func();
c906108c 6329
97bf5e38
MK
6330int main() {
6331
6332/* The GNU C library defines this for functions which it implements
6333 to always fail with ENOSYS. Some functions are actually named
6334 something starting with __ and the normal name is an alias. */
6335#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6336choke me
c906108c 6337#else
97bf5e38 6338$ac_func();
c906108c 6339#endif
97bf5e38 6340
c906108c
SS
6341; return 0; }
6342EOF
93d331ba 6343if { (eval echo configure:6344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6344 rm -rf conftest*
97bf5e38 6345 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6346else
6347 echo "configure: failed program was:" >&5
6348 cat conftest.$ac_ext >&5
6349 rm -rf conftest*
97bf5e38 6350 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6351fi
6352rm -f conftest*
6353fi
6354
97bf5e38
MK
6355if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6356 echo "$ac_t""yes" 1>&6
6357 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6358 cat >> confdefs.h <<EOF
6359#define $ac_tr_func 1
c906108c 6360EOF
97bf5e38
MK
6361
6362else
6363 echo "$ac_t""no" 1>&6
c906108c 6364fi
97bf5e38 6365done
c906108c 6366
97bf5e38
MK
6367
6368if test "$cross_compiling" = no; then
6369 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
93d331ba 6370echo "configure:6371: checking whether setpgrp takes no argument" >&5
97bf5e38 6371if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6372 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6373else
6374 if test "$cross_compiling" = yes; then
6375 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6376else
6377 cat > conftest.$ac_ext <<EOF
93d331ba 6378#line 6379 "configure"
c906108c
SS
6379#include "confdefs.h"
6380
c906108c
SS
6381#ifdef HAVE_UNISTD_H
6382#include <unistd.h>
6383#endif
97bf5e38
MK
6384
6385/*
6386 * If this system has a BSD-style setpgrp, which takes arguments, exit
6387 * successfully.
6388 */
6389main()
6390{
6391 if (setpgrp(1,1) == -1)
6392 exit(0);
6393 else
6394 exit(1);
6395}
6396
c906108c 6397EOF
93d331ba 6398if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6399then
6400 ac_cv_func_setpgrp_void=no
c906108c
SS
6401else
6402 echo "configure: failed program was:" >&5
6403 cat conftest.$ac_ext >&5
97bf5e38
MK
6404 rm -fr conftest*
6405 ac_cv_func_setpgrp_void=yes
c906108c 6406fi
97bf5e38 6407rm -fr conftest*
c906108c
SS
6408fi
6409
97bf5e38
MK
6410
6411fi
6412
6413echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6414if test $ac_cv_func_setpgrp_void = yes; then
6415 cat >> confdefs.h <<\EOF
6416#define SETPGRP_VOID 1
c906108c
SS
6417EOF
6418
6419fi
6420
97bf5e38
MK
6421else
6422 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
93d331ba 6423echo "configure:6424: checking whether setpgrp takes no argument" >&5
97bf5e38 6424if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426else
6427 cat > conftest.$ac_ext <<EOF
93d331ba 6428#line 6429 "configure"
b83266a0
SS
6429#include "confdefs.h"
6430
b83266a0 6431#include <unistd.h>
97bf5e38 6432
b83266a0 6433int main() {
97bf5e38
MK
6434
6435 if (setpgrp(1,1) == -1)
6436 exit (0);
6437 else
6438 exit (1);
6439
b83266a0
SS
6440; return 0; }
6441EOF
93d331ba 6442if { (eval echo configure:6443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6443 rm -rf conftest*
97bf5e38 6444 ac_cv_func_setpgrp_void=no
b83266a0
SS
6445else
6446 echo "configure: failed program was:" >&5
6447 cat conftest.$ac_ext >&5
6448 rm -rf conftest*
97bf5e38 6449 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6450fi
6451rm -f conftest*
6452fi
6453
97bf5e38
MK
6454echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6455if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6456 cat >> confdefs.h <<\EOF
97bf5e38 6457#define SETPGRP_VOID 1
b83266a0
SS
6458EOF
6459
97bf5e38 6460fi
b83266a0
SS
6461fi
6462
97bf5e38
MK
6463# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6464# since sigsetjmp might only be defined as a macro.
6465echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
93d331ba 6466echo "configure:6467: checking for sigsetjmp" >&5
97bf5e38 6467if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6468 echo $ac_n "(cached) $ac_c" 1>&6
6469else
6470 cat > conftest.$ac_ext <<EOF
93d331ba 6471#line 6472 "configure"
a4db0f07
RH
6472#include "confdefs.h"
6473
97bf5e38
MK
6474#include <setjmp.h>
6475
a4db0f07 6476int main() {
97bf5e38 6477sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6478; return 0; }
6479EOF
93d331ba 6480if { (eval echo configure:6481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6481 rm -rf conftest*
97bf5e38 6482 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6483else
6484 echo "configure: failed program was:" >&5
6485 cat conftest.$ac_ext >&5
6486 rm -rf conftest*
97bf5e38 6487 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6488fi
6489rm -f conftest*
6490fi
6491
97bf5e38
MK
6492echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6493if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6494 cat >> confdefs.h <<\EOF
97bf5e38 6495#define HAVE_SIGSETJMP 1
a4db0f07
RH
6496EOF
6497
6498fi
c906108c 6499
06825bd1
MK
6500# Assume we'll default to using the included libiberty regex.
6501gdb_use_included_regex=yes
6502
6503# However, if the system regex is GNU regex, then default to *not*
6504# using the included regex.
6505echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
93d331ba 6506echo "configure:6507: checking for GNU regex" >&5
06825bd1
MK
6507if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6508 echo $ac_n "(cached) $ac_c" 1>&6
6509else
6510 cat > conftest.$ac_ext <<EOF
93d331ba 6511#line 6512 "configure"
06825bd1
MK
6512#include "confdefs.h"
6513#include <gnu-versions.h>
6514int main() {
6515#define REGEX_INTERFACE_VERSION 1
6516#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6517# error "Version mismatch"
6518#endif
6519; return 0; }
6520EOF
93d331ba 6521if { (eval echo configure:6522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6522 rm -rf conftest*
6523 gdb_cv_have_gnu_regex=yes
6524else
6525 echo "configure: failed program was:" >&5
6526 cat conftest.$ac_ext >&5
6527 rm -rf conftest*
6528 gdb_cv_have_gnu_regex=no
6529fi
6530rm -f conftest*
6531fi
6532
6533echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6534if test $gdb_cv_have_gnu_regex = yes; then
6535 gdb_use_included_regex=no
6536fi
6537
6538# Check whether --with-included-regex or --without-included-regex was given.
6539if test "${with_included_regex+set}" = set; then
6540 withval="$with_included_regex"
6541 gdb_with_regex=$withval
6542else
6543 gdb_with_regex=$gdb_use_included_regex
6544fi
6545
6546if test "$gdb_with_regex" = yes; then
6547 cat >> confdefs.h <<\EOF
6548#define USE_INCLUDED_REGEX 1
6549EOF
6550
6551fi
6552
97bf5e38
MK
6553# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6554# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6555echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
93d331ba 6556echo "configure:6557: checking for r_fs in struct reg" >&5
97bf5e38
MK
6557if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6558 echo $ac_n "(cached) $ac_c" 1>&6
6559else
6560 cat > conftest.$ac_ext <<EOF
93d331ba 6561#line 6562 "configure"
c906108c 6562#include "confdefs.h"
97bf5e38
MK
6563#include <machine/reg.h>
6564int main() {
6565struct reg r; r.r_fs;
6566; return 0; }
c906108c 6567EOF
93d331ba 6568if { (eval echo configure:6569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6569 rm -rf conftest*
97bf5e38 6570 gdb_cv_struct_reg_r_fs=yes
c906108c 6571else
97bf5e38
MK
6572 echo "configure: failed program was:" >&5
6573 cat conftest.$ac_ext >&5
c906108c 6574 rm -rf conftest*
97bf5e38 6575 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6576fi
6577rm -f conftest*
97bf5e38 6578fi
c906108c 6579
97bf5e38
MK
6580echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6581if test $gdb_cv_struct_reg_r_fs = yes; then
6582 cat >> confdefs.h <<\EOF
6583#define HAVE_STRUCT_REG_R_FS 1
6584EOF
6585
6586fi
6587echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
93d331ba 6588echo "configure:6589: checking for r_gs in struct reg" >&5
97bf5e38
MK
6589if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6590 echo $ac_n "(cached) $ac_c" 1>&6
6591else
6592 cat > conftest.$ac_ext <<EOF
93d331ba 6593#line 6594 "configure"
c906108c 6594#include "confdefs.h"
97bf5e38
MK
6595#include <machine/reg.h>
6596int main() {
6597struct reg r; r.r_gs;
6598; return 0; }
c906108c 6599EOF
93d331ba 6600if { (eval echo configure:6601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6601 rm -rf conftest*
97bf5e38 6602 gdb_cv_struct_reg_r_gs=yes
c906108c 6603else
97bf5e38
MK
6604 echo "configure: failed program was:" >&5
6605 cat conftest.$ac_ext >&5
c906108c 6606 rm -rf conftest*
97bf5e38 6607 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6608fi
6609rm -f conftest*
c906108c 6610fi
c906108c 6611
97bf5e38
MK
6612echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6613if test $gdb_cv_struct_reg_r_gs = yes; then
6614 cat >> confdefs.h <<\EOF
6615#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6616EOF
6617
c906108c
SS
6618fi
6619
97bf5e38
MK
6620# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6621echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
93d331ba 6622echo "configure:6623: checking for PTRACE_GETREGS" >&5
97bf5e38 6623if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6624 echo $ac_n "(cached) $ac_c" 1>&6
6625else
6626 cat > conftest.$ac_ext <<EOF
93d331ba 6627#line 6628 "configure"
c906108c 6628#include "confdefs.h"
97bf5e38 6629#include <sys/ptrace.h>
c906108c 6630int main() {
97bf5e38 6631PTRACE_GETREGS;
c906108c
SS
6632; return 0; }
6633EOF
93d331ba 6634if { (eval echo configure:6635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6635 rm -rf conftest*
97bf5e38 6636 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6637else
6638 echo "configure: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 rm -rf conftest*
97bf5e38 6641 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6642fi
6643rm -f conftest*
6644fi
6645
97bf5e38
MK
6646echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6647if test $gdb_cv_have_ptrace_getregs = yes; then
6648 cat >> confdefs.h <<\EOF
6649#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6650EOF
6651
97bf5e38 6652fi
c906108c 6653
97bf5e38
MK
6654# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6655echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
93d331ba 6656echo "configure:6657: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6657if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6658 echo $ac_n "(cached) $ac_c" 1>&6
6659else
6660 cat > conftest.$ac_ext <<EOF
93d331ba 6661#line 6662 "configure"
c906108c 6662#include "confdefs.h"
97bf5e38 6663#include <sys/ptrace.h>
c906108c 6664int main() {
97bf5e38 6665PTRACE_GETFPXREGS;
c906108c
SS
6666; return 0; }
6667EOF
93d331ba 6668if { (eval echo configure:6669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6669 rm -rf conftest*
97bf5e38 6670 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6671else
6672 echo "configure: failed program was:" >&5
6673 cat conftest.$ac_ext >&5
6674 rm -rf conftest*
97bf5e38 6675 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6676fi
6677rm -f conftest*
6678fi
6679
97bf5e38
MK
6680echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6681if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6682 cat >> confdefs.h <<\EOF
6683#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6684EOF
6685
97bf5e38 6686fi
c906108c 6687
97bf5e38
MK
6688# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6689echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
93d331ba 6690echo "configure:6691: checking for PT_GETDBREGS" >&5
97bf5e38 6691if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6692 echo $ac_n "(cached) $ac_c" 1>&6
6693else
6694 cat > conftest.$ac_ext <<EOF
93d331ba 6695#line 6696 "configure"
c906108c 6696#include "confdefs.h"
97bf5e38
MK
6697#include <sys/types.h>
6698#include <sys/ptrace.h>
c906108c 6699int main() {
97bf5e38 6700PT_GETDBREGS;
c906108c
SS
6701; return 0; }
6702EOF
93d331ba 6703if { (eval echo configure:6704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6704 rm -rf conftest*
97bf5e38 6705 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6706else
6707 echo "configure: failed program was:" >&5
6708 cat conftest.$ac_ext >&5
6709 rm -rf conftest*
97bf5e38 6710 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6711fi
6712rm -f conftest*
6713fi
6714
97bf5e38
MK
6715echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6716if test $gdb_cv_have_pt_getdbregs = yes; then
6717 cat >> confdefs.h <<\EOF
6718#define HAVE_PT_GETDBREGS 1
c906108c
SS
6719EOF
6720
97bf5e38 6721fi
c906108c 6722
97bf5e38
MK
6723# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6724echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
93d331ba 6725echo "configure:6726: checking for PT_GETXMMREGS" >&5
97bf5e38 6726if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6727 echo $ac_n "(cached) $ac_c" 1>&6
6728else
6729 cat > conftest.$ac_ext <<EOF
93d331ba 6730#line 6731 "configure"
c906108c 6731#include "confdefs.h"
97bf5e38
MK
6732#include <sys/types.h>
6733#include <sys/ptrace.h>
c906108c 6734int main() {
97bf5e38 6735PT_GETXMMREGS;
c906108c
SS
6736; return 0; }
6737EOF
93d331ba 6738if { (eval echo configure:6739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6739 rm -rf conftest*
97bf5e38 6740 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6741else
6742 echo "configure: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6744 rm -rf conftest*
97bf5e38 6745 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6746fi
6747rm -f conftest*
6748fi
6749
97bf5e38
MK
6750echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6751if test $gdb_cv_have_pt_getxmmregs = yes; then
6752 cat >> confdefs.h <<\EOF
6753#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6754EOF
6755
97bf5e38 6756fi
c906108c 6757
97bf5e38
MK
6758
6759echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
93d331ba 6760echo "configure:6761: checking whether malloc must be declared" >&5
97bf5e38 6761if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6762 echo $ac_n "(cached) $ac_c" 1>&6
6763else
6764 cat > conftest.$ac_ext <<EOF
93d331ba 6765#line 6766 "configure"
3862412b 6766#include "confdefs.h"
e17bf198 6767
97bf5e38
MK
6768#include <stdio.h>
6769#ifdef HAVE_STRING_H
6770#include <string.h>
6771#else
6772#ifdef HAVE_STRINGS_H
6773#include <strings.h>
6774#endif
6775#endif
6776#ifdef HAVE_STDLIB_H
6777#include <stdlib.h>
6778#endif
6779#ifdef HAVE_UNISTD_H
6780#include <unistd.h>
6781#endif
3862412b 6782int main() {
97bf5e38 6783char *(*pfn) = (char *(*)) malloc
3862412b
MK
6784; return 0; }
6785EOF
93d331ba 6786if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6787 rm -rf conftest*
97bf5e38 6788 bfd_cv_decl_needed_malloc=no
3862412b
MK
6789else
6790 echo "configure: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 rm -rf conftest*
97bf5e38 6793 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6794fi
6795rm -f conftest*
6796fi
6797
97bf5e38
MK
6798echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6799if test $bfd_cv_decl_needed_malloc = yes; then
6800 cat >> confdefs.h <<\EOF
6801#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6802EOF
6803
97bf5e38 6804fi
3862412b 6805
97bf5e38 6806echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
93d331ba 6807echo "configure:6808: checking whether realloc must be declared" >&5
97bf5e38 6808if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6809 echo $ac_n "(cached) $ac_c" 1>&6
6810else
6811 cat > conftest.$ac_ext <<EOF
93d331ba 6812#line 6813 "configure"
3862412b 6813#include "confdefs.h"
e17bf198 6814
97bf5e38
MK
6815#include <stdio.h>
6816#ifdef HAVE_STRING_H
6817#include <string.h>
6818#else
6819#ifdef HAVE_STRINGS_H
6820#include <strings.h>
6821#endif
6822#endif
6823#ifdef HAVE_STDLIB_H
6824#include <stdlib.h>
6825#endif
6826#ifdef HAVE_UNISTD_H
6827#include <unistd.h>
6828#endif
3862412b 6829int main() {
97bf5e38 6830char *(*pfn) = (char *(*)) realloc
3862412b
MK
6831; return 0; }
6832EOF
93d331ba 6833if { (eval echo configure:6834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6834 rm -rf conftest*
97bf5e38 6835 bfd_cv_decl_needed_realloc=no
3862412b
MK
6836else
6837 echo "configure: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 rm -rf conftest*
97bf5e38 6840 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6841fi
6842rm -f conftest*
6843fi
6844
97bf5e38
MK
6845echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6846if test $bfd_cv_decl_needed_realloc = yes; then
6847 cat >> confdefs.h <<\EOF
6848#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6849EOF
6850
97bf5e38 6851fi
3862412b 6852
97bf5e38 6853echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
93d331ba 6854echo "configure:6855: checking whether free must be declared" >&5
97bf5e38 6855if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6856 echo $ac_n "(cached) $ac_c" 1>&6
6857else
6858 cat > conftest.$ac_ext <<EOF
93d331ba 6859#line 6860 "configure"
451928c5 6860#include "confdefs.h"
e17bf198 6861
97bf5e38
MK
6862#include <stdio.h>
6863#ifdef HAVE_STRING_H
6864#include <string.h>
6865#else
6866#ifdef HAVE_STRINGS_H
6867#include <strings.h>
6868#endif
6869#endif
6870#ifdef HAVE_STDLIB_H
6871#include <stdlib.h>
6872#endif
6873#ifdef HAVE_UNISTD_H
6874#include <unistd.h>
6875#endif
451928c5 6876int main() {
97bf5e38 6877char *(*pfn) = (char *(*)) free
451928c5
AC
6878; return 0; }
6879EOF
93d331ba 6880if { (eval echo configure:6881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6881 rm -rf conftest*
97bf5e38 6882 bfd_cv_decl_needed_free=no
451928c5
AC
6883else
6884 echo "configure: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 rm -rf conftest*
97bf5e38 6887 bfd_cv_decl_needed_free=yes
451928c5
AC
6888fi
6889rm -f conftest*
6890fi
6891
97bf5e38
MK
6892echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6893if test $bfd_cv_decl_needed_free = yes; then
6894 cat >> confdefs.h <<\EOF
6895#define NEED_DECLARATION_FREE 1
451928c5
AC
6896EOF
6897
97bf5e38 6898fi
451928c5 6899
97bf5e38 6900echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
93d331ba 6901echo "configure:6902: checking whether strerror must be declared" >&5
97bf5e38 6902if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6903 echo $ac_n "(cached) $ac_c" 1>&6
6904else
6905 cat > conftest.$ac_ext <<EOF
93d331ba 6906#line 6907 "configure"
451928c5 6907#include "confdefs.h"
e17bf198 6908
97bf5e38
MK
6909#include <stdio.h>
6910#ifdef HAVE_STRING_H
6911#include <string.h>
6912#else
6913#ifdef HAVE_STRINGS_H
6914#include <strings.h>
6915#endif
6916#endif
6917#ifdef HAVE_STDLIB_H
6918#include <stdlib.h>
6919#endif
6920#ifdef HAVE_UNISTD_H
6921#include <unistd.h>
6922#endif
451928c5 6923int main() {
97bf5e38 6924char *(*pfn) = (char *(*)) strerror
451928c5
AC
6925; return 0; }
6926EOF
93d331ba 6927if { (eval echo configure:6928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6928 rm -rf conftest*
97bf5e38 6929 bfd_cv_decl_needed_strerror=no
451928c5
AC
6930else
6931 echo "configure: failed program was:" >&5
6932 cat conftest.$ac_ext >&5
6933 rm -rf conftest*
97bf5e38 6934 bfd_cv_decl_needed_strerror=yes
451928c5
AC
6935fi
6936rm -f conftest*
6937fi
6938
97bf5e38
MK
6939echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6940if test $bfd_cv_decl_needed_strerror = yes; then
6941 cat >> confdefs.h <<\EOF
6942#define NEED_DECLARATION_STRERROR 1
451928c5
AC
6943EOF
6944
97bf5e38 6945fi
451928c5 6946
97bf5e38 6947echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
93d331ba 6948echo "configure:6949: checking whether strdup must be declared" >&5
97bf5e38 6949if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
6950 echo $ac_n "(cached) $ac_c" 1>&6
6951else
6952 cat > conftest.$ac_ext <<EOF
93d331ba 6953#line 6954 "configure"
3862412b 6954#include "confdefs.h"
e17bf198 6955
97bf5e38
MK
6956#include <stdio.h>
6957#ifdef HAVE_STRING_H
6958#include <string.h>
6959#else
6960#ifdef HAVE_STRINGS_H
6961#include <strings.h>
6962#endif
6963#endif
6964#ifdef HAVE_STDLIB_H
6965#include <stdlib.h>
6966#endif
6967#ifdef HAVE_UNISTD_H
6968#include <unistd.h>
6969#endif
3862412b 6970int main() {
97bf5e38 6971char *(*pfn) = (char *(*)) strdup
3862412b
MK
6972; return 0; }
6973EOF
93d331ba 6974if { (eval echo configure:6975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6975 rm -rf conftest*
97bf5e38 6976 bfd_cv_decl_needed_strdup=no
3862412b
MK
6977else
6978 echo "configure: failed program was:" >&5
6979 cat conftest.$ac_ext >&5
6980 rm -rf conftest*
97bf5e38 6981 bfd_cv_decl_needed_strdup=yes
3862412b
MK
6982fi
6983rm -f conftest*
6984fi
6985
97bf5e38
MK
6986echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
6987if test $bfd_cv_decl_needed_strdup = yes; then
6988 cat >> confdefs.h <<\EOF
6989#define NEED_DECLARATION_STRDUP 1
3862412b
MK
6990EOF
6991
97bf5e38 6992fi
3862412b 6993
97bf5e38 6994echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
93d331ba 6995echo "configure:6996: checking whether strstr must be declared" >&5
97bf5e38 6996if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
6997 echo $ac_n "(cached) $ac_c" 1>&6
6998else
6999 cat > conftest.$ac_ext <<EOF
93d331ba 7000#line 7001 "configure"
3862412b 7001#include "confdefs.h"
e17bf198 7002
97bf5e38
MK
7003#include <stdio.h>
7004#ifdef HAVE_STRING_H
7005#include <string.h>
7006#else
7007#ifdef HAVE_STRINGS_H
7008#include <strings.h>
7009#endif
7010#endif
7011#ifdef HAVE_STDLIB_H
7012#include <stdlib.h>
7013#endif
7014#ifdef HAVE_UNISTD_H
7015#include <unistd.h>
7016#endif
3862412b 7017int main() {
97bf5e38 7018char *(*pfn) = (char *(*)) strstr
3862412b
MK
7019; return 0; }
7020EOF
93d331ba 7021if { (eval echo configure:7022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7022 rm -rf conftest*
97bf5e38 7023 bfd_cv_decl_needed_strstr=no
3862412b
MK
7024else
7025 echo "configure: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027 rm -rf conftest*
97bf5e38 7028 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7029fi
7030rm -f conftest*
7031fi
7032
97bf5e38
MK
7033echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7034if test $bfd_cv_decl_needed_strstr = yes; then
7035 cat >> confdefs.h <<\EOF
7036#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7037EOF
7038
97bf5e38 7039fi
3862412b 7040
97bf5e38 7041echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
93d331ba 7042echo "configure:7043: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7043if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7044 echo $ac_n "(cached) $ac_c" 1>&6
7045else
7046 cat > conftest.$ac_ext <<EOF
93d331ba 7047#line 7048 "configure"
596c9d4b
KB
7048#include "confdefs.h"
7049
97bf5e38
MK
7050#include <stdio.h>
7051#ifdef HAVE_STRING_H
7052#include <string.h>
7053#else
7054#ifdef HAVE_STRINGS_H
7055#include <strings.h>
7056#endif
7057#endif
7058#ifdef HAVE_STDLIB_H
7059#include <stdlib.h>
7060#endif
7061#ifdef HAVE_UNISTD_H
7062#include <unistd.h>
7063#endif
596c9d4b 7064int main() {
97bf5e38 7065char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7066; return 0; }
7067EOF
93d331ba 7068if { (eval echo configure:7069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7069 rm -rf conftest*
97bf5e38 7070 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7071else
7072 echo "configure: failed program was:" >&5
7073 cat conftest.$ac_ext >&5
7074 rm -rf conftest*
97bf5e38 7075 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7076fi
7077rm -f conftest*
7078fi
7079
97bf5e38
MK
7080echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7081if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7082 cat >> confdefs.h <<\EOF
7083#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7084EOF
7085
97bf5e38 7086fi
596c9d4b 7087
97bf5e38
MK
7088
7089# The following save_state_t checkery is only necessary for HPUX
7090# versions earlier than 10.20. When those fade from memory, this
7091# could be expunged. --jsm 1999-03-22
7092
7093echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
93d331ba 7094echo "configure:7095: checking for HPUX save_state structure" >&5
97bf5e38 7095cat > conftest.$ac_ext <<EOF
93d331ba 7096#line 7097 "configure"
97bf5e38
MK
7097#include "confdefs.h"
7098#include <machine/save_state.h>
7099EOF
7100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7101 egrep "save_state_t" >/dev/null 2>&1; then
7102 rm -rf conftest*
7103 gdb_cv_hpux_savestate=yes
7104else
7105 rm -rf conftest*
7106 gdb_cv_hpux_savestate=no
7107fi
7108rm -f conftest*
7109
7110cat > conftest.$ac_ext <<EOF
93d331ba 7111#line 7112 "configure"
97bf5e38
MK
7112#include "confdefs.h"
7113#include <machine/save_state.h>
7114EOF
7115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7116 egrep "ss_wide" >/dev/null 2>&1; then
7117 rm -rf conftest*
7118 gdb_cv_hpux_sswide=yes
7119else
7120 rm -rf conftest*
7121 gdb_cv_hpux_sswide=no
7122fi
7123rm -f conftest*
7124
7125if test $gdb_cv_hpux_savestate = yes
7126then
7127 cat >> confdefs.h <<\EOF
7128#define HAVE_STRUCT_SAVE_STATE_T 1
7129EOF
7130
7131fi
7132if test $gdb_cv_hpux_sswide = yes
7133then
7134 cat >> confdefs.h <<\EOF
7135#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7136EOF
7137
7138fi
7139echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7140
7141
7142# If we are configured native on GNU/Linux, work around problems with
7143# sys/procfs.h
7144# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7145
7146if test "${target}" = "${host}"; then
7147 case "${host}" in
7148 i[3456]86-*-linux*)
7149 cat >> confdefs.h <<\EOF
7150#define START_INFERIOR_TRAPS_EXPECTED 2
7151EOF
7152
7153 cat >> confdefs.h <<\EOF
7154#define sys_quotactl 1
7155EOF
7156
7157 ;;
7158 ia64-*-aix*)
7159 cat >> confdefs.h <<\EOF
7160#define NEW_PROC_API 1
7161EOF
7162
7163 ;;
7164 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7165 cat >> confdefs.h <<\EOF
7166#define NEW_PROC_API 1
7167EOF
7168
7169 ;;
7170 *-*-solaris2.[678])
7171 cat >> confdefs.h <<\EOF
7172#define NEW_PROC_API 1
7173EOF
7174
7175 ;;
7176 esac
7177fi
7178
7179if test "$ac_cv_header_sys_procfs_h" = yes; then
7180 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7181echo "configure:7182: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7182 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7183 echo $ac_n "(cached) $ac_c" 1>&6
7184else
7185 cat > conftest.$ac_ext <<EOF
93d331ba 7186#line 7187 "configure"
596c9d4b
KB
7187#include "confdefs.h"
7188
7189#define _SYSCALL32
7190#include <sys/procfs.h>
7191int main() {
97bf5e38 7192pstatus_t avar
596c9d4b
KB
7193; return 0; }
7194EOF
93d331ba 7195if { (eval echo configure:7196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7196 rm -rf conftest*
97bf5e38 7197 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7198else
7199 echo "configure: failed program was:" >&5
7200 cat conftest.$ac_ext >&5
7201 rm -rf conftest*
97bf5e38 7202 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7203
7204fi
7205rm -f conftest*
7206fi
7207
97bf5e38 7208 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7209 cat >> confdefs.h <<\EOF
97bf5e38 7210#define HAVE_PSTATUS_T 1
596c9d4b
KB
7211EOF
7212
7213 fi
97bf5e38 7214 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7215
97bf5e38 7216 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7217echo "configure:7218: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7218 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7219 echo $ac_n "(cached) $ac_c" 1>&6
7220else
7221 cat > conftest.$ac_ext <<EOF
93d331ba 7222#line 7223 "configure"
596c9d4b
KB
7223#include "confdefs.h"
7224
7225#define _SYSCALL32
7226#include <sys/procfs.h>
7227int main() {
97bf5e38 7228prrun_t avar
596c9d4b
KB
7229; return 0; }
7230EOF
93d331ba 7231if { (eval echo configure:7232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7232 rm -rf conftest*
97bf5e38 7233 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7234else
7235 echo "configure: failed program was:" >&5
7236 cat conftest.$ac_ext >&5
7237 rm -rf conftest*
97bf5e38 7238 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7239
7240fi
7241rm -f conftest*
7242fi
7243
97bf5e38 7244 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7245 cat >> confdefs.h <<\EOF
97bf5e38 7246#define HAVE_PRRUN_T 1
596c9d4b
KB
7247EOF
7248
7249 fi
97bf5e38 7250 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7251
97bf5e38 7252 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7253echo "configure:7254: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7254 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7255 echo $ac_n "(cached) $ac_c" 1>&6
7256else
7257 cat > conftest.$ac_ext <<EOF
93d331ba 7258#line 7259 "configure"
596c9d4b
KB
7259#include "confdefs.h"
7260
7261#define _SYSCALL32
7262#include <sys/procfs.h>
7263int main() {
97bf5e38 7264gregset_t avar
596c9d4b
KB
7265; return 0; }
7266EOF
93d331ba 7267if { (eval echo configure:7268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7268 rm -rf conftest*
97bf5e38 7269 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7270else
7271 echo "configure: failed program was:" >&5
7272 cat conftest.$ac_ext >&5
7273 rm -rf conftest*
97bf5e38 7274 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7275
7276fi
7277rm -f conftest*
7278fi
7279
97bf5e38 7280 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7281 cat >> confdefs.h <<\EOF
97bf5e38 7282#define HAVE_GREGSET_T 1
596c9d4b
KB
7283EOF
7284
7285 fi
97bf5e38 7286 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7287
97bf5e38 7288 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7289echo "configure:7290: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7290 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7291 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7292else
7293 cat > conftest.$ac_ext <<EOF
93d331ba 7294#line 7295 "configure"
d84dd0c5 7295#include "confdefs.h"
97bf5e38
MK
7296
7297#define _SYSCALL32
d84dd0c5 7298#include <sys/procfs.h>
97bf5e38
MK
7299int main() {
7300fpregset_t avar
7301; return 0; }
d84dd0c5 7302EOF
93d331ba 7303if { (eval echo configure:7304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7304 rm -rf conftest*
7305 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7306else
7307 echo "configure: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
97bf5e38
MK
7309 rm -rf conftest*
7310 bfd_cv_have_sys_procfs_type_fpregset_t=no
7311
d84dd0c5 7312fi
97bf5e38 7313rm -f conftest*
d84dd0c5
MK
7314fi
7315
97bf5e38
MK
7316 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7317 cat >> confdefs.h <<\EOF
7318#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7319EOF
7320
97bf5e38
MK
7321 fi
7322 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7323
97bf5e38 7324 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7325echo "configure:7326: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7326 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7327 echo $ac_n "(cached) $ac_c" 1>&6
7328else
7329 cat > conftest.$ac_ext <<EOF
93d331ba 7330#line 7331 "configure"
c906108c 7331#include "confdefs.h"
c906108c 7332
97bf5e38
MK
7333#define _SYSCALL32
7334#include <sys/procfs.h>
c906108c 7335int main() {
97bf5e38 7336prgregset_t avar
c906108c
SS
7337; return 0; }
7338EOF
93d331ba 7339if { (eval echo configure:7340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7340 rm -rf conftest*
97bf5e38 7341 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7342else
7343 echo "configure: failed program was:" >&5
7344 cat conftest.$ac_ext >&5
7345 rm -rf conftest*
97bf5e38
MK
7346 bfd_cv_have_sys_procfs_type_prgregset_t=no
7347
c906108c
SS
7348fi
7349rm -f conftest*
7350fi
7351
97bf5e38
MK
7352 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7353 cat >> confdefs.h <<\EOF
7354#define HAVE_PRGREGSET_T 1
c906108c
SS
7355EOF
7356
97bf5e38
MK
7357 fi
7358 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7359
97bf5e38 7360 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7361echo "configure:7362: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7362 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7363 echo $ac_n "(cached) $ac_c" 1>&6
7364else
7365 cat > conftest.$ac_ext <<EOF
93d331ba 7366#line 7367 "configure"
d45fe813 7367#include "confdefs.h"
97bf5e38
MK
7368
7369#define _SYSCALL32
7370#include <sys/procfs.h>
d45fe813 7371int main() {
97bf5e38 7372prfpregset_t avar
d45fe813
KB
7373; return 0; }
7374EOF
93d331ba 7375if { (eval echo configure:7376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7376 rm -rf conftest*
97bf5e38 7377 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7378else
7379 echo "configure: failed program was:" >&5
7380 cat conftest.$ac_ext >&5
7381 rm -rf conftest*
97bf5e38
MK
7382 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7383
d45fe813
KB
7384fi
7385rm -f conftest*
7386fi
7387
97bf5e38
MK
7388 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7389 cat >> confdefs.h <<\EOF
7390#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7391EOF
7392
97bf5e38
MK
7393 fi
7394 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7395
97bf5e38 7396 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7397echo "configure:7398: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7398 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7399 echo $ac_n "(cached) $ac_c" 1>&6
7400else
7401 cat > conftest.$ac_ext <<EOF
93d331ba 7402#line 7403 "configure"
d45fe813 7403#include "confdefs.h"
97bf5e38
MK
7404
7405#define _SYSCALL32
7406#include <sys/procfs.h>
d45fe813 7407int main() {
97bf5e38 7408prgregset32_t avar
d45fe813
KB
7409; return 0; }
7410EOF
93d331ba 7411if { (eval echo configure:7412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7412 rm -rf conftest*
97bf5e38 7413 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7414else
7415 echo "configure: failed program was:" >&5
7416 cat conftest.$ac_ext >&5
7417 rm -rf conftest*
97bf5e38
MK
7418 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7419
d45fe813
KB
7420fi
7421rm -f conftest*
7422fi
7423
97bf5e38
MK
7424 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7425 cat >> confdefs.h <<\EOF
7426#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7427EOF
7428
97bf5e38
MK
7429 fi
7430 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7431
97bf5e38 7432 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7433echo "configure:7434: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7434 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7435 echo $ac_n "(cached) $ac_c" 1>&6
7436else
7437 cat > conftest.$ac_ext <<EOF
93d331ba 7438#line 7439 "configure"
d45fe813 7439#include "confdefs.h"
97bf5e38
MK
7440
7441#define _SYSCALL32
7442#include <sys/procfs.h>
d45fe813 7443int main() {
97bf5e38 7444prfpregset32_t avar
d45fe813
KB
7445; return 0; }
7446EOF
93d331ba 7447if { (eval echo configure:7448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7448 rm -rf conftest*
97bf5e38 7449 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7450else
7451 echo "configure: failed program was:" >&5
7452 cat conftest.$ac_ext >&5
7453 rm -rf conftest*
97bf5e38
MK
7454 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7455
d45fe813
KB
7456fi
7457rm -f conftest*
7458fi
7459
97bf5e38
MK
7460 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7461 cat >> confdefs.h <<\EOF
7462#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7463EOF
7464
97bf5e38
MK
7465 fi
7466 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7467
97bf5e38 7468 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7469echo "configure:7470: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7470 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7471 echo $ac_n "(cached) $ac_c" 1>&6
7472else
7473 cat > conftest.$ac_ext <<EOF
93d331ba 7474#line 7475 "configure"
d45fe813 7475#include "confdefs.h"
97bf5e38 7476
d45fe813 7477#define _SYSCALL32
97bf5e38 7478#include <sys/procfs.h>
d45fe813 7479int main() {
97bf5e38 7480lwpid_t avar
d45fe813
KB
7481; return 0; }
7482EOF
93d331ba 7483if { (eval echo configure:7484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7484 rm -rf conftest*
97bf5e38 7485 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7486else
7487 echo "configure: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 rm -rf conftest*
97bf5e38
MK
7490 bfd_cv_have_sys_procfs_type_lwpid_t=no
7491
d45fe813
KB
7492fi
7493rm -f conftest*
7494fi
7495
97bf5e38
MK
7496 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7497 cat >> confdefs.h <<\EOF
7498#define HAVE_LWPID_T 1
d45fe813
KB
7499EOF
7500
97bf5e38
MK
7501 fi
7502 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7503
97bf5e38 7504 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7505echo "configure:7506: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7506 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7507 echo $ac_n "(cached) $ac_c" 1>&6
7508else
7509 cat > conftest.$ac_ext <<EOF
93d331ba 7510#line 7511 "configure"
c906108c
SS
7511#include "confdefs.h"
7512
97bf5e38
MK
7513#define _SYSCALL32
7514#include <sys/procfs.h>
c906108c 7515int main() {
97bf5e38 7516psaddr_t avar
c906108c
SS
7517; return 0; }
7518EOF
93d331ba 7519if { (eval echo configure:7520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7520 rm -rf conftest*
97bf5e38 7521 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7522else
7523 echo "configure: failed program was:" >&5
7524 cat conftest.$ac_ext >&5
7525 rm -rf conftest*
97bf5e38
MK
7526 bfd_cv_have_sys_procfs_type_psaddr_t=no
7527
c906108c
SS
7528fi
7529rm -f conftest*
7530fi
7531
97bf5e38
MK
7532 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7533 cat >> confdefs.h <<\EOF
7534#define HAVE_PSADDR_T 1
c906108c
SS
7535EOF
7536
97bf5e38
MK
7537 fi
7538 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7539
97bf5e38 7540 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7541echo "configure:7542: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7542 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7543 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7544else
7545 cat > conftest.$ac_ext <<EOF
93d331ba 7546#line 7547 "configure"
c906108c
SS
7547#include "confdefs.h"
7548
97bf5e38
MK
7549#define _SYSCALL32
7550#include <sys/procfs.h>
7551int main() {
7552prsysent_t avar
7553; return 0; }
c906108c 7554EOF
93d331ba 7555if { (eval echo configure:7556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7556 rm -rf conftest*
7557 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7558else
7559 echo "configure: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
97bf5e38
MK
7561 rm -rf conftest*
7562 bfd_cv_have_sys_procfs_type_prsysent_t=no
7563
c906108c 7564fi
97bf5e38 7565rm -f conftest*
c906108c
SS
7566fi
7567
97bf5e38
MK
7568 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7569 cat >> confdefs.h <<\EOF
7570#define HAVE_PRSYSENT_T 1
c906108c
SS
7571EOF
7572
97bf5e38
MK
7573 fi
7574 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7575
97bf5e38 7576 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7577echo "configure:7578: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7578 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7579 echo $ac_n "(cached) $ac_c" 1>&6
7580else
7581 cat > conftest.$ac_ext <<EOF
93d331ba 7582#line 7583 "configure"
c906108c
SS
7583#include "confdefs.h"
7584
97bf5e38
MK
7585#define _SYSCALL32
7586#include <sys/procfs.h>
c906108c 7587int main() {
97bf5e38 7588pr_sigset_t avar
c906108c
SS
7589; return 0; }
7590EOF
93d331ba 7591if { (eval echo configure:7592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7592 rm -rf conftest*
97bf5e38 7593 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7594else
7595 echo "configure: failed program was:" >&5
7596 cat conftest.$ac_ext >&5
7597 rm -rf conftest*
97bf5e38
MK
7598 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7599
c906108c
SS
7600fi
7601rm -f conftest*
7602fi
7603
97bf5e38
MK
7604 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7605 cat >> confdefs.h <<\EOF
7606#define HAVE_PR_SIGSET_T 1
c906108c
SS
7607EOF
7608
97bf5e38
MK
7609 fi
7610 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7611
97bf5e38 7612 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7613echo "configure:7614: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7614 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7615 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7616else
7617 cat > conftest.$ac_ext <<EOF
93d331ba 7618#line 7619 "configure"
c906108c
SS
7619#include "confdefs.h"
7620
97bf5e38
MK
7621#define _SYSCALL32
7622#include <sys/procfs.h>
7623int main() {
7624pr_sigaction64_t avar
7625; return 0; }
c906108c 7626EOF
93d331ba 7627if { (eval echo configure:7628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7628 rm -rf conftest*
7629 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7630else
7631 echo "configure: failed program was:" >&5
7632 cat conftest.$ac_ext >&5
97bf5e38
MK
7633 rm -rf conftest*
7634 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7635
c906108c 7636fi
97bf5e38 7637rm -f conftest*
c906108c
SS
7638fi
7639
97bf5e38
MK
7640 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7641 cat >> confdefs.h <<\EOF
7642#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7643EOF
7644
97bf5e38
MK
7645 fi
7646 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7647
7648 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7649echo "configure:7650: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7650 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7651 echo $ac_n "(cached) $ac_c" 1>&6
7652else
7653 cat > conftest.$ac_ext <<EOF
93d331ba 7654#line 7655 "configure"
97bf5e38
MK
7655#include "confdefs.h"
7656
7657#define _SYSCALL32
7658#include <sys/procfs.h>
7659int main() {
7660pr_siginfo64_t avar
7661; return 0; }
7662EOF
93d331ba 7663if { (eval echo configure:7664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7664 rm -rf conftest*
7665 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7666else
7667 echo "configure: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669 rm -rf conftest*
7670 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7671
7672fi
7673rm -f conftest*
c906108c 7674fi
c906108c 7675
97bf5e38
MK
7676 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7677 cat >> confdefs.h <<\EOF
7678#define HAVE_PR_SIGINFO64_T 1
7679EOF
c906108c 7680
97bf5e38
MK
7681 fi
7682 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7683
7684
7685
7686
7687
7688 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7689 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
93d331ba 7690echo "configure:7691: checking whether prfpregset_t type is broken" >&5
97bf5e38 7691 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7692 echo $ac_n "(cached) $ac_c" 1>&6
7693else
7694 if test "$cross_compiling" = yes; then
97bf5e38 7695 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7696else
7697 cat > conftest.$ac_ext <<EOF
93d331ba 7698#line 7699 "configure"
c906108c 7699#include "confdefs.h"
97bf5e38
MK
7700#include <sys/procfs.h>
7701 int main ()
7702 {
7703 if (sizeof (prfpregset_t) == sizeof (void *))
7704 return 1;
7705 return 0;
7706 }
c906108c 7707EOF
93d331ba 7708if { (eval echo configure:7709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7709then
97bf5e38 7710 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7711else
7712 echo "configure: failed program was:" >&5
7713 cat conftest.$ac_ext >&5
7714 rm -fr conftest*
97bf5e38 7715 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7716fi
7717rm -fr conftest*
7718fi
7719
7720fi
7721
97bf5e38
MK
7722 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7723 if test $gdb_cv_prfpregset_t_broken = yes; then
7724 cat >> confdefs.h <<\EOF
7725#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7726EOF
7727
97bf5e38
MK
7728 fi
7729 fi
c906108c 7730
97bf5e38
MK
7731
7732 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
93d331ba 7733echo "configure:7734: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7734 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7735 echo $ac_n "(cached) $ac_c" 1>&6
7736else
7737 cat > conftest.$ac_ext <<EOF
93d331ba 7738#line 7739 "configure"
c906108c 7739#include "confdefs.h"
97bf5e38
MK
7740#include <unistd.h>
7741#include <sys/types.h>
7742#include <sys/procfs.h>
7743
7744int main() {
7745
7746 int dummy;;
7747 dummy = ioctl(0, PIOCSET, &dummy);
7748
7749; return 0; }
c906108c 7750EOF
93d331ba 7751if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7752 rm -rf conftest*
97bf5e38 7753 gdb_cv_have_procfs_piocset=yes
c906108c 7754else
c906108c
SS
7755 echo "configure: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 rm -rf conftest*
97bf5e38 7758 gdb_cv_have_procfs_piocset=no
c906108c
SS
7759fi
7760rm -f conftest*
7761fi
97bf5e38
MK
7762
7763 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7764 if test $gdb_cv_have_procfs_piocset = yes; then
7765 cat >> confdefs.h <<\EOF
7766#define HAVE_PROCFS_PIOCSET 1
c906108c 7767EOF
97bf5e38
MK
7768
7769 fi
c906108c 7770fi
c906108c 7771
97bf5e38
MK
7772if test ${host} = ${target} ; then
7773
7774 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
93d331ba 7775echo "configure:7776: checking for member l_addr in struct link_map" >&5
97bf5e38 7776 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7777 echo $ac_n "(cached) $ac_c" 1>&6
7778else
7779 cat > conftest.$ac_ext <<EOF
93d331ba 7780#line 7781 "configure"
c906108c 7781#include "confdefs.h"
97bf5e38 7782#include <link.h>
c906108c 7783int main() {
97bf5e38 7784struct link_map lm; (void) lm.l_addr;
c906108c
SS
7785; return 0; }
7786EOF
93d331ba 7787if { (eval echo configure:7788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7788 rm -rf conftest*
97bf5e38 7789 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7790else
7791 echo "configure: failed program was:" >&5
7792 cat conftest.$ac_ext >&5
7793 rm -rf conftest*
97bf5e38 7794 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7795fi
7796rm -f conftest*
7797fi
7798
97bf5e38
MK
7799 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7800 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7801 cat >> confdefs.h <<\EOF
7802#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7803EOF
97bf5e38
MK
7804
7805 fi
7806
7807
7808 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
93d331ba 7809echo "configure:7810: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7810 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7811 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7812else
97bf5e38 7813 cat > conftest.$ac_ext <<EOF
93d331ba 7814#line 7815 "configure"
97bf5e38
MK
7815#include "confdefs.h"
7816#include <sys/types.h>
7817#include <link.h>
7818int main() {
7819struct link_map lm; (void) lm.lm_addr;
7820; return 0; }
7821EOF
93d331ba 7822if { (eval echo configure:7823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7823 rm -rf conftest*
7824 gdb_cv_have_struct_link_map_with_lm_members=yes
7825else
7826 echo "configure: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7828 rm -rf conftest*
7829 gdb_cv_have_struct_link_map_with_lm_members=no
7830fi
7831rm -f conftest*
c906108c 7832fi
c906108c 7833
97bf5e38
MK
7834 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7835 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7836 cat >> confdefs.h <<\EOF
7837#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7838EOF
7839
7840 fi
7841
7842
7843 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
93d331ba 7844echo "configure:7845: checking for member som_addr in struct so_map" >&5
97bf5e38 7845 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7846 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7847else
7848 cat > conftest.$ac_ext <<EOF
93d331ba 7849#line 7850 "configure"
c906108c 7850#include "confdefs.h"
97bf5e38
MK
7851#include <sys/types.h>
7852#ifdef HAVE_NLIST_H
7853#include <nlist.h>
7854#endif
7855#include <link.h>
7856int main() {
7857struct so_map lm; (void) lm.som_addr;
7858; return 0; }
7859EOF
93d331ba 7860if { (eval echo configure:7861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7861 rm -rf conftest*
7862 gdb_cv_have_struct_so_map_with_som_members=yes
7863else
7864 echo "configure: failed program was:" >&5
7865 cat conftest.$ac_ext >&5
7866 rm -rf conftest*
7867 gdb_cv_have_struct_so_map_with_som_members=no
7868fi
7869rm -f conftest*
7870fi
c906108c 7871
97bf5e38
MK
7872 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7873 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7874 cat >> confdefs.h <<\EOF
7875#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7876EOF
c906108c 7877
97bf5e38 7878 fi
c906108c 7879
97bf5e38
MK
7880
7881 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
93d331ba 7882echo "configure:7883: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7883 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7884 echo $ac_n "(cached) $ac_c" 1>&6
7885else
7886 cat > conftest.$ac_ext <<EOF
93d331ba 7887#line 7888 "configure"
97bf5e38
MK
7888#include "confdefs.h"
7889#define _SYSCALL32
7890#include <sys/link.h>
7891int main() {
7892struct link_map32 l;
7893; return 0; }
7894EOF
93d331ba 7895if { (eval echo configure:7896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7896 rm -rf conftest*
7897 gdb_cv_have_struct_link_map32=yes
7898else
7899 echo "configure: failed program was:" >&5
7900 cat conftest.$ac_ext >&5
7901 rm -rf conftest*
7902 gdb_cv_have_struct_link_map32=no
7903fi
7904rm -f conftest*
7905fi
c906108c 7906
97bf5e38
MK
7907 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7908 if test $gdb_cv_have_struct_link_map32 = yes; then
7909 cat >> confdefs.h <<\EOF
7910#define HAVE_STRUCT_LINK_MAP32 1
7911EOF
c906108c 7912
97bf5e38
MK
7913 cat >> confdefs.h <<\EOF
7914#define _SYSCALL32 1
7915EOF
c906108c 7916
97bf5e38
MK
7917 fi
7918fi
c906108c 7919
c906108c 7920
97bf5e38 7921echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
93d331ba 7922echo "configure:7923: checking for long long support in compiler" >&5
97bf5e38
MK
7923if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7924 echo $ac_n "(cached) $ac_c" 1>&6
7925else
7926 cat > conftest.$ac_ext <<EOF
93d331ba 7927#line 7928 "configure"
97bf5e38 7928#include "confdefs.h"
c906108c 7929
97bf5e38 7930int main() {
c906108c 7931
97bf5e38
MK
7932 extern long long foo;
7933 switch (foo & 2) { case 0: return 1; }
c906108c 7934
97bf5e38
MK
7935; return 0; }
7936EOF
93d331ba 7937if { (eval echo configure:7938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7938 rm -rf conftest*
7939 gdb_cv_c_long_long=yes
7940else
7941 echo "configure: failed program was:" >&5
7942 cat conftest.$ac_ext >&5
7943 rm -rf conftest*
7944 gdb_cv_c_long_long=no
7945fi
7946rm -f conftest*
7947fi
c906108c 7948
97bf5e38
MK
7949echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7950if test $gdb_cv_c_long_long = yes; then
7951 cat >> confdefs.h <<\EOF
7952#define CC_HAS_LONG_LONG 1
7953EOF
7954
7955fi
7956
7957
7958echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
93d331ba 7959echo "configure:7960: checking for long long support in printf" >&5
97bf5e38
MK
7960if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
7961 echo $ac_n "(cached) $ac_c" 1>&6
7962else
7963 if test "$cross_compiling" = yes; then
7964 gdb_cv_printf_has_long_long=no
7965else
7966 cat > conftest.$ac_ext <<EOF
93d331ba 7967#line 7968 "configure"
97bf5e38
MK
7968#include "confdefs.h"
7969
7970int main () {
7971 char buf[32];
7972 long long l = 0;
7973 l = (l << 16) + 0x0123;
7974 l = (l << 16) + 0x4567;
7975 l = (l << 16) + 0x89ab;
7976 l = (l << 16) + 0xcdef;
7977 sprintf (buf, "0x%016llx", l);
7978 return (strcmp ("0x0123456789abcdef", buf));
c906108c 7979}
97bf5e38 7980EOF
93d331ba 7981if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7982then
7983 gdb_cv_printf_has_long_long=yes
7984else
7985 echo "configure: failed program was:" >&5
7986 cat conftest.$ac_ext >&5
7987 rm -fr conftest*
7988 gdb_cv_printf_has_long_long=no
7989fi
7990rm -fr conftest*
7991fi
7992
7993fi
7994
7995if test $gdb_cv_printf_has_long_long = yes; then
7996 cat >> confdefs.h <<\EOF
7997#define PRINTF_HAS_LONG_LONG 1
7998EOF
7999
8000fi
8001echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8002
8003
8004echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
93d331ba 8005echo "configure:8006: checking for long double support in compiler" >&5
97bf5e38
MK
8006if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8007 echo $ac_n "(cached) $ac_c" 1>&6
8008else
8009 cat > conftest.$ac_ext <<EOF
93d331ba 8010#line 8011 "configure"
97bf5e38
MK
8011#include "confdefs.h"
8012
8013int main() {
8014long double foo;
8015; return 0; }
8016EOF
93d331ba 8017if { (eval echo configure:8018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8018 rm -rf conftest*
8019 ac_cv_c_long_double=yes
8020else
8021 echo "configure: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 rm -rf conftest*
8024 ac_cv_c_long_double=no
8025fi
8026rm -f conftest*
8027fi
c906108c 8028
97bf5e38
MK
8029echo "$ac_t""$ac_cv_c_long_double" 1>&6
8030if test $ac_cv_c_long_double = yes; then
8031 cat >> confdefs.h <<\EOF
8032#define HAVE_LONG_DOUBLE 1
c906108c 8033EOF
97bf5e38
MK
8034
8035fi
8036
8037
8038echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
93d331ba 8039echo "configure:8040: checking for long double support in printf" >&5
97bf5e38
MK
8040if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8041 echo $ac_n "(cached) $ac_c" 1>&6
8042else
8043 if test "$cross_compiling" = yes; then
8044 gdb_cv_printf_has_long_double=no
8045else
8046 cat > conftest.$ac_ext <<EOF
93d331ba 8047#line 8048 "configure"
97bf5e38
MK
8048#include "confdefs.h"
8049
8050int main () {
8051 char buf[16];
8052 long double f = 3.141592653;
8053 sprintf (buf, "%Lg", f);
8054 return (strncmp ("3.14159", buf, 7));
8055}
8056EOF
93d331ba 8057if { (eval echo configure:8058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8058then
97bf5e38 8059 gdb_cv_printf_has_long_double=yes
c906108c
SS
8060else
8061 echo "configure: failed program was:" >&5
8062 cat conftest.$ac_ext >&5
8063 rm -fr conftest*
97bf5e38 8064 gdb_cv_printf_has_long_double=no
c906108c
SS
8065fi
8066rm -fr conftest*
8067fi
8068
8069fi
8070
97bf5e38 8071if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8072 cat >> confdefs.h <<\EOF
97bf5e38
MK
8073#define PRINTF_HAS_LONG_DOUBLE 1
8074EOF
8075
8076fi
8077echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8078
8079
8080echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
93d331ba 8081echo "configure:8082: checking for long double support in scanf" >&5
97bf5e38
MK
8082if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8083 echo $ac_n "(cached) $ac_c" 1>&6
8084else
8085 if test "$cross_compiling" = yes; then
8086 gdb_cv_scanf_has_long_double=no
8087else
8088 cat > conftest.$ac_ext <<EOF
93d331ba 8089#line 8090 "configure"
97bf5e38
MK
8090#include "confdefs.h"
8091
8092int main () {
8093 char *buf = "3.141592653";
8094 long double f = 0;
8095 sscanf (buf, "%Lg", &f);
8096 return !(f > 3.14159 && f < 3.14160);
8097}
c906108c 8098EOF
93d331ba 8099if { (eval echo configure:8100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8100then
8101 gdb_cv_scanf_has_long_double=yes
8102else
8103 echo "configure: failed program was:" >&5
8104 cat conftest.$ac_ext >&5
8105 rm -fr conftest*
8106 gdb_cv_scanf_has_long_double=no
8107fi
8108rm -fr conftest*
8109fi
c906108c
SS
8110
8111fi
8112
97bf5e38
MK
8113if test $gdb_cv_scanf_has_long_double = yes; then
8114 cat >> confdefs.h <<\EOF
8115#define SCANF_HAS_LONG_DOUBLE 1
8116EOF
8117
8118fi
8119echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8120
438013df
AO
8121case ${host_os} in
8122aix*)
8123 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
93d331ba 8124echo "configure:8125: checking for -bbigtoc option" >&5
438013df
AO
8125if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8126 echo $ac_n "(cached) $ac_c" 1>&6
8127else
8128
8129 SAVE_LDFLAGS=$LDFLAGS
8130
8131 case $GCC in
8132 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8133 *) gdb_cv_bigtoc=-bbigtoc ;;
8134 esac
8135
8136 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8137 cat > conftest.$ac_ext <<EOF
93d331ba 8138#line 8139 "configure"
438013df
AO
8139#include "confdefs.h"
8140
8141int main() {
8142int i;
8143; return 0; }
8144EOF
93d331ba 8145if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8146 :
8147else
8148 echo "configure: failed program was:" >&5
8149 cat conftest.$ac_ext >&5
8150 rm -rf conftest*
8151 gdb_cv_bigtoc=
8152fi
8153rm -f conftest*
8154
8155fi
8156
8157echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8158 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8159 ;;
8160esac
8161
c906108c
SS
8162
8163
8164if test ${build} = ${host} -a ${host} = ${target} ; then
8165 case ${host_os} in
8166 hpux*)
8167 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
93d331ba 8168echo "configure:8169: checking for HPUX/OSF thread support" >&5
c906108c
SS
8169 if test -f /usr/include/dce/cma_config.h ; then
8170 if test "$GCC" = "yes" ; then
8171 echo "$ac_t""yes" 1>&6
8172 cat >> confdefs.h <<\EOF
8173#define HAVE_HPUX_THREAD_SUPPORT 1
8174EOF
8175
66b965bb 8176 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8177 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8178 else
8179 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8180 fi
8181 else
8182 echo "$ac_t""no" 1>&6
8183 fi
8184 ;;
8185 solaris*)
d92419e5
JB
8186 # See if thread_db library is around for Solaris thread debugging.
8187 # Note that we must explicitly test for version 1 of the library
8188 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8189 # the same API.
c906108c 8190 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
93d331ba 8191echo "configure:8192: checking for Solaris thread debugging library" >&5
c906108c
SS
8192 if test -f /usr/lib/libthread_db.so.1 ; then
8193 echo "$ac_t""yes" 1>&6
8194 cat >> confdefs.h <<\EOF
8195#define HAVE_THREAD_DB_LIB 1
8196EOF
8197
66b965bb 8198 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8199 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8200 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
93d331ba 8201echo "configure:8202: checking for dlopen in -ldl" >&5
c906108c
SS
8202ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8203if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8204 echo $ac_n "(cached) $ac_c" 1>&6
8205else
8206 ac_save_LIBS="$LIBS"
8207LIBS="-ldl $LIBS"
8208cat > conftest.$ac_ext <<EOF
93d331ba 8209#line 8210 "configure"
c906108c
SS
8210#include "confdefs.h"
8211/* Override any gcc2 internal prototype to avoid an error. */
8212/* We use char because int might match the return type of a gcc2
8213 builtin and then its argument prototype would still apply. */
8214char dlopen();
8215
8216int main() {
8217dlopen()
8218; return 0; }
8219EOF
93d331ba 8220if { (eval echo configure:8221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8221 rm -rf conftest*
8222 eval "ac_cv_lib_$ac_lib_var=yes"
8223else
8224 echo "configure: failed program was:" >&5
8225 cat conftest.$ac_ext >&5
8226 rm -rf conftest*
8227 eval "ac_cv_lib_$ac_lib_var=no"
8228fi
8229rm -f conftest*
8230LIBS="$ac_save_LIBS"
8231
8232fi
8233if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8234 echo "$ac_t""yes" 1>&6
8235 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8236 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8237 cat >> confdefs.h <<EOF
8238#define $ac_tr_lib 1
8239EOF
8240
8241 LIBS="-ldl $LIBS"
8242
8243else
8244 echo "$ac_t""no" 1>&6
8245fi
8246
8247 if test "$GCC" = "yes" ; then
8248 # The GNU linker requires the -export-dynamic option to make
8249 # all symbols visible in the dynamic symbol table.
8250 hold_ldflags=$LDFLAGS
8251 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
93d331ba 8252echo "configure:8253: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8253 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8254 cat > conftest.$ac_ext <<EOF
93d331ba 8255#line 8256 "configure"
c906108c
SS
8256#include "confdefs.h"
8257
8258int main() {
8259int i;
8260; return 0; }
8261EOF
93d331ba 8262if { (eval echo configure:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8263 rm -rf conftest*
8264 found=yes
8265else
8266 echo "configure: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 rm -rf conftest*
8269 found=no
8270fi
8271rm -f conftest*
8272 LDFLAGS=$hold_ldflags
8273 echo "$ac_t""$found" 1>&6
8274 if test $found = yes; then
8275 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8276 fi
8277 fi
8278 # Sun randomly tweaked the prototypes in <proc_service.h>
8279 # at one point.
8280 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
93d331ba 8281echo "configure:8282: checking if <proc_service.h> is old" >&5
c906108c
SS
8282 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8283 echo $ac_n "(cached) $ac_c" 1>&6
8284else
8285
8286 cat > conftest.$ac_ext <<EOF
93d331ba 8287#line 8288 "configure"
c906108c
SS
8288#include "confdefs.h"
8289
8290 #include <proc_service.h>
8291 ps_err_e ps_pdwrite
8292 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8293
8294int main() {
8295
8296; return 0; }
8297EOF
93d331ba 8298if { (eval echo configure:8299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8299 rm -rf conftest*
8300 gdb_cv_proc_service_is_old=no
8301else
8302 echo "configure: failed program was:" >&5
8303 cat conftest.$ac_ext >&5
8304 rm -rf conftest*
8305 gdb_cv_proc_service_is_old=yes
8306fi
8307rm -f conftest*
8308
8309fi
8310
8311 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8312 if test $gdb_cv_proc_service_is_old = yes; then
8313 cat >> confdefs.h <<\EOF
8314#define PROC_SERVICE_IS_OLD 1
8315EOF
8316
8317 fi
8318 else
8319 echo "$ac_t""no" 1>&6
8320 fi
8321 ;;
d92419e5
JB
8322 aix*)
8323 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
93d331ba 8324echo "configure:8325: checking for AiX thread debugging library" >&5
d92419e5
JB
8325 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8326 echo $ac_n "(cached) $ac_c" 1>&6
8327else
8328 cat > conftest.$ac_ext <<EOF
93d331ba 8329#line 8330 "configure"
d92419e5
JB
8330#include "confdefs.h"
8331#include <sys/pthdebug.h>
8332int main() {
8333#ifndef PTHDB_VERSION_3
8334 #error
8335 #endif
8336; return 0; }
8337EOF
93d331ba 8338if { (eval echo configure:8339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8339 rm -rf conftest*
8340 gdb_cv_have_aix_thread_debug=yes
8341else
8342 echo "configure: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 rm -rf conftest*
8345 gdb_cv_have_aix_thread_debug=no
8346fi
8347rm -f conftest*
8348fi
8349
8350 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8351 if test $gdb_cv_have_aix_thread_debug = yes; then
8352 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8353 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8354 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8355 fi
8356 ;;
c906108c
SS
8357 esac
8358
8359fi
8360
3f47be5c
EZ
8361if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8362 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
93d331ba 8363echo "configure:8364: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8364if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8365 echo $ac_n "(cached) $ac_c" 1>&6
8366else
8367 cat > conftest.$ac_ext <<EOF
93d331ba 8368#line 8369 "configure"
3f47be5c
EZ
8369#include "confdefs.h"
8370#include <thread_db.h>
8371int main() {
8372int i = TD_NOTALLOC;
8373; return 0; }
8374EOF
93d331ba 8375if { (eval echo configure:8376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8376 rm -rf conftest*
8377 gdb_cv_thread_db_h_has_td_notalloc=yes
8378else
8379 echo "configure: failed program was:" >&5
8380 cat conftest.$ac_ext >&5
8381 rm -rf conftest*
8382 gdb_cv_thread_db_h_has_td_notalloc=no
8383
8384fi
8385rm -f conftest*
8386
8387fi
8388
8389echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8390fi
8391if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8392 cat >> confdefs.h <<\EOF
8393#define THREAD_DB_HAS_TD_NOTALLOC 1
8394EOF
8395
8396fi
8397
eb784848
DJ
8398if test $host = $target; then
8399 case $target in
8400 *-linux*)
8401 save_CFLAGS=$CFLAGS
8402 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8403 cat > conftest.$ac_ext <<EOF
93d331ba 8404#line 8405 "configure"
eb784848
DJ
8405#include "confdefs.h"
8406#include <unistd.h>
8407int main() {
8408pread64 (0, NULL, 0, 0);
8409; return 0; }
8410EOF
93d331ba 8411if { (eval echo configure:8412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
eb784848
DJ
8412 rm -rf conftest*
8413 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8414 cat >> confdefs.h <<\EOF
8415#define HAVE_PREAD64 1
8416EOF
8417
8418else
8419 echo "configure: failed program was:" >&5
8420 cat conftest.$ac_ext >&5
8421fi
8422rm -f conftest*
8423 CFLAGS=$save_CFLAGS
8424 ;;
8425 esac
8426fi
8427
fb40c209 8428
c906108c
SS
8429# Check whether --enable-netrom or --disable-netrom was given.
8430if test "${enable_netrom+set}" = set; then
8431 enableval="$enable_netrom"
8432 case "${enableval}" in
8433yes) enable_netrom=yes ;;
8434no) enable_netrom=no ;;
8435*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
8436esac
8437fi
8438
8439
8440if test "${enable_netrom}" = "yes"; then
66b965bb 8441 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
8442 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
8443fi
8444
1decb323 8445
3b851bce
AC
8446# NOTE: Don't add -Wall or -Wunused, they both include
8447# -Wunused-parameter which reports bogus warnings.
8448# NOTE: If you add to this list, remember to update
8449# gdb/doc/gdbint.texinfo.
1decb323 8450build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8451-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8452# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8453# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8454# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8455# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8456# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8457# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8458# Check whether --enable-build-warnings or --disable-build-warnings was given.
8459if test "${enable_build_warnings+set}" = set; then
8460 enableval="$enable_build_warnings"
1decb323 8461 case "${enableval}" in
c906108c
SS
8462 yes) ;;
8463 no) build_warnings="-w";;
8464 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8465 build_warnings="${build_warnings} ${t}";;
8466 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8467 build_warnings="${t} ${build_warnings}";;
8468 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8469esac
d4f3574e 8470if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8471 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8472fi
1decb323 8473fi
3b851bce
AC
8474# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8475if test "${enable_gdb_build_warnings+set}" = set; then
8476 enableval="$enable_gdb_build_warnings"
8477 case "${enableval}" in
8478 yes) ;;
8479 no) build_warnings="-w";;
8480 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8481 build_warnings="${build_warnings} ${t}";;
8482 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8483 build_warnings="${t} ${build_warnings}";;
8484 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8485esac
8486if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8487 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8488fi
8489fi
104c1213
JM
8490WARN_CFLAGS=""
8491WERROR_CFLAGS=""
c906108c
SS
8492if test "x${build_warnings}" != x -a "x$GCC" = xyes
8493then
746a987d 8494 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
93d331ba 8495echo "configure:8496: checking compiler warning flags" >&5
746a987d
AC
8496 # Separate out the -Werror flag as some files just cannot be
8497 # compiled with it enabled.
8498 for w in ${build_warnings}; do
8499 case $w in
8500 -Werr*) WERROR_CFLAGS=-Werror ;;
8501 *) # Check that GCC accepts it
4536bbc6
AC
8502 saved_CFLAGS="$CFLAGS"
8503 CFLAGS="$CFLAGS $w"
8504 cat > conftest.$ac_ext <<EOF
93d331ba 8505#line 8506 "configure"
4536bbc6
AC
8506#include "confdefs.h"
8507
8508int main() {
8509
8510; return 0; }
8511EOF
93d331ba 8512if { (eval echo configure:8513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8513 rm -rf conftest*
8514 WARN_CFLAGS="${WARN_CFLAGS} $w"
8515else
8516 echo "configure: failed program was:" >&5
8517 cat conftest.$ac_ext >&5
8518fi
8519rm -f conftest*
8520 CFLAGS="$saved_CFLAGS"
746a987d
AC
8521 esac
8522 done
8523 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8524fi
8525
8526
104c1213 8527
c906108c
SS
8528MMALLOC_CFLAGS=
8529MMALLOC=
8530
8531
8532
8533# Check whether --with-mmalloc or --without-mmalloc was given.
8534if test "${with_mmalloc+set}" = set; then
8535 withval="$with_mmalloc"
8536 case "${withval}" in
8537 yes) want_mmalloc=true ;;
8538 no) want_mmalloc=false;;
8539 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8540esac
8541else
8542 want_mmalloc=false
8543fi
8544
8545if test x$want_mmalloc = xtrue; then
8546 cat >> confdefs.h <<\EOF
8547#define USE_MMALLOC 1
8548EOF
8549
8550 cat >> confdefs.h <<\EOF
8551#define MMCHECK_FORCE 1
8552EOF
8553
8554 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8555 MMALLOC='../mmalloc/libmmalloc.a'
8556fi
8557
7a292a7a
SS
8558# In the Cygwin environment, we need some additional flags.
8559echo $ac_n "checking for cygwin""... $ac_c" 1>&6
93d331ba 8560echo "configure:8561: checking for cygwin" >&5
7a292a7a
SS
8561if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8562 echo $ac_n "(cached) $ac_c" 1>&6
8563else
8564 cat > conftest.$ac_ext <<EOF
93d331ba 8565#line 8566 "configure"
7a292a7a
SS
8566#include "confdefs.h"
8567
8568#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8569lose
8570#endif
8571EOF
8572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8573 egrep "lose" >/dev/null 2>&1; then
8574 rm -rf conftest*
8575 gdb_cv_os_cygwin=yes
8576else
8577 rm -rf conftest*
8578 gdb_cv_os_cygwin=no
8579fi
8580rm -f conftest*
8581
8582fi
8583
8584echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8585
aff38e61
AC
8586
8587SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8588case ${host} in
95cbc983
AC
8589 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8590 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8591esac
8592
8593
cd0fc7c3
SS
8594# libreadline needs libuser32.a in a cygwin environment
8595WIN32LIBS=
8596if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8597 WIN32LIBS="-luser32"
8598 case "${target}" in
8599 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8600 ;;
8601 esac
cd0fc7c3 8602fi
c906108c 8603
7a292a7a 8604
3fc11d3e
JM
8605LIBGUI="../libgui/src/libgui.a"
8606GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8607
8608
7a292a7a 8609
3fc11d3e
JM
8610# Check whether --enable-gdbtk or --disable-gdbtk was given.
8611if test "${enable_gdbtk+set}" = set; then
8612 enableval="$enable_gdbtk"
8613 case "${enableval}" in
8614 yes)
8615 case "$host" in
8616 *go32*)
8617 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8618 enable_gdbtk=no ;;
8619 *windows*)
8620 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8621 enable_gdbtk=no ;;
8622 *)
8623 enable_gdbtk=yes ;;
8624 esac ;;
8625 no)
8626 enable_gdbtk=no ;;
8627 *)
8628 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8629esac
8630else
8631
8632# Default is on for everything but go32 and Cygwin
8633case "$host" in
8634 *go32* | *windows*)
8635 ;;
8636 *)
379d6434
AC
8637 if test -d "${srcdir}/gdbtk" ; then
8638 enable_gdbtk=yes
8639 fi
8640 ;;
8641esac
3fc11d3e
JM
8642
8643fi
8644
8645
8646WIN32LDAPP=
8647
8648
8649
8650configdir="unix"
8651
8652GDBTKLIBS=
8653if test "${enable_gdbtk}" = "yes"; then
8654
d1c3b63a
KS
8655 # Gdbtk must have an absolute path to srcdir in order to run
8656 # properly when not installed.
8657 here=`pwd`
8658 cd ${srcdir}
8659 GDBTK_SRC_DIR=`pwd`
8660 cd $here
8661
3fc11d3e
JM
8662
8663#
8664# Ok, lets find the tcl configuration
8665# First, look for one uninstalled.
8666# the alternative search directory is invoked by --with-tclconfig
8667#
8668
8669if test x"${no_tcl}" = x ; then
8670 # we reset no_tcl in case something fails here
8671 no_tcl=true
8672 # Check whether --with-tclconfig or --without-tclconfig was given.
8673if test "${with_tclconfig+set}" = set; then
8674 withval="$with_tclconfig"
8675 with_tclconfig=${withval}
8676fi
8677
8678 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
93d331ba 8679echo "configure:8680: checking for Tcl configuration" >&5
3fc11d3e
JM
8680 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8681 echo $ac_n "(cached) $ac_c" 1>&6
8682else
8683
8684
8685 # First check to see if --with-tclconfig was specified.
8686 if test x"${with_tclconfig}" != x ; then
8687 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8688 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8689 else
8690 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8691 fi
8692 fi
8693
8694 # then check for a private Tcl installation
8695 if test x"${ac_cv_c_tclconfig}" = x ; then
8696 for i in \
8697 ../tcl \
8698 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8699 ../../tcl \
8700 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8701 ../../../tcl \
8702 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8703 if test -f "$i/${configdir}/tclConfig.sh" ; then
8704 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8705 break
8706 fi
8707 done
8708 fi
8709 # check in a few common install locations
8710 if test x"${ac_cv_c_tclconfig}" = x ; then
8711 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8712 if test -f "$i/tclConfig.sh" ; then
8713 ac_cv_c_tclconfig=`(cd $i; pwd)`
8714 break
8715 fi
8716 done
8717 fi
8718 # check in a few other private locations
8719 if test x"${ac_cv_c_tclconfig}" = x ; then
8720 for i in \
8721 ${srcdir}/../tcl \
8722 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8723 if test -f "$i/${configdir}/tclConfig.sh" ; then
8724 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8725 break
8726 fi
8727 done
8728 fi
8729
8730fi
8731
8732 if test x"${ac_cv_c_tclconfig}" = x ; then
8733 TCLCONFIG="# no Tcl configs found"
8734 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8735 else
8736 no_tcl=
8737 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8738 echo "$ac_t""found $TCLCONFIG" 1>&6
8739 fi
8740fi
8741
8742 if test -z "${no_tcl}"; then
8743
8744 . $TCLCONFIG
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771#
8772# Ok, lets find the tk configuration
8773# First, look for one uninstalled.
8774# the alternative search directory is invoked by --with-tkconfig
8775#
8776
8777if test x"${no_tk}" = x ; then
8778 # we reset no_tk in case something fails here
8779 no_tk=true
8780 # Check whether --with-tkconfig or --without-tkconfig was given.
8781if test "${with_tkconfig+set}" = set; then
8782 withval="$with_tkconfig"
8783 with_tkconfig=${withval}
8784fi
8785
8786 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
93d331ba 8787echo "configure:8788: checking for Tk configuration" >&5
3fc11d3e
JM
8788 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8789 echo $ac_n "(cached) $ac_c" 1>&6
8790else
8791
8792
8793 # First check to see if --with-tkconfig was specified.
8794 if test x"${with_tkconfig}" != x ; then
8795 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8796 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8797 else
8798 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8799 fi
8800 fi
8801
8802 # then check for a private Tk library
8803 if test x"${ac_cv_c_tkconfig}" = x ; then
8804 for i in \
8805 ../tk \
8806 `ls -dr ../tk[4-9]* 2>/dev/null` \
8807 ../../tk \
8808 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8809 ../../../tk \
8810 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8811 if test -f "$i/${configdir}/tkConfig.sh" ; then
8812 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8813 break
8814 fi
8815 done
8816 fi
8817 # check in a few common install locations
8818 if test x"${ac_cv_c_tkconfig}" = x ; then
8819 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8820 if test -f "$i/tkConfig.sh" ; then
8821 ac_cv_c_tkconfig=`(cd $i; pwd)`
8822 break
8823 fi
8824 done
8825 fi
8826 # check in a few other private locations
8827 if test x"${ac_cv_c_tkconfig}" = x ; then
8828 for i in \
8829 ${srcdir}/../tk \
8830 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8831 if test -f "$i/${configdir}/tkConfig.sh" ; then
8832 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8833 break
8834 fi
8835 done
8836 fi
8837
8838fi
8839
8840 if test x"${ac_cv_c_tkconfig}" = x ; then
8841 TKCONFIG="# no Tk configs found"
8842 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8843 else
8844 no_tk=
8845 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8846 echo "$ac_t""found $TKCONFIG" 1>&6
8847 fi
8848fi
8849
8850
8851
dd2504ab
JM
8852 # now look for Tcl library stuff
8853
8854 case "${host}" in
8855 *-*-cygwin*)
8856 tcldir=../tcl/win/
8857 ;;
8858 *)
8859 tcldir=../tcl/unix/
8860 ;;
8861 esac
8862
8863 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8864
3fc11d3e
JM
8865 # If $no_tk is nonempty, then we can't do Tk, and there is no
8866 # point to doing Tcl.
8867 if test -z "${no_tk}"; then
8868
8869 if test -f "$TKCONFIG" ; then
8870 . $TKCONFIG
8871 fi
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886#
8887# Ok, lets find the tcl source trees so we can use the headers
8888# Warning: transition of version 9 to 10 will break this algorithm
8889# because 10 sorts before 9. We also look for just tcl. We have to
8890# be careful that we don't match stuff like tclX by accident.
8891# the alternative search directory is involked by --with-tclinclude
8892#
8893
8894no_tcl=true
8895echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
93d331ba 8896echo "configure:8897: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8897# Check whether --with-tclinclude or --without-tclinclude was given.
8898if test "${with_tclinclude+set}" = set; then
8899 withval="$with_tclinclude"
8900 with_tclinclude=${withval}
8901fi
8902
8903if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8904 echo $ac_n "(cached) $ac_c" 1>&6
8905else
8906
8907# first check to see if --with-tclinclude was specified
8908if test x"${with_tclinclude}" != x ; then
8909 if test -f ${with_tclinclude}/tclInt.h ; then
8910 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8911 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8912 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8913 else
8914 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8915 fi
8916fi
8917
8918# next check if it came with Tcl configuration file
8919if test x"${ac_cv_c_tclconfig}" = x ; then
8920 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8921 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8922 fi
8923fi
8924
8925# next check in private source directory
8926#
8927# since ls returns lowest version numbers first, reverse its output
8928if test x"${ac_cv_c_tclh}" = x ; then
8929 for i in \
8930 ${srcdir}/../tcl \
8931 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8932 ${srcdir}/../../tcl \
8933 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8934 ${srcdir}/../../../tcl \
8935 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8936 if test -f $i/generic/tclInt.h ; then
8937 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8938 break
8939 fi
8940 done
8941fi
8942# finally check in a few common install locations
8943#
8944# since ls returns lowest version numbers first, reverse its output
8945if test x"${ac_cv_c_tclh}" = x ; then
8946 for i in \
8947 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8948 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8949 /usr/local/src/tcl \
8950 /usr/local/lib/tcl \
8951 ${prefix}/include ; do
8952 if test -f $i/generic/tclInt.h ; then
8953 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8954 break
8955 fi
8956 done
8957fi
8958# see if one is installed
8959if test x"${ac_cv_c_tclh}" = x ; then
8960 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
8961echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
93d331ba 8962echo "configure:8963: checking for tclInt.h" >&5
3fc11d3e
JM
8963if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8964 echo $ac_n "(cached) $ac_c" 1>&6
8965else
8966 cat > conftest.$ac_ext <<EOF
93d331ba 8967#line 8968 "configure"
3fc11d3e
JM
8968#include "confdefs.h"
8969#include <tclInt.h>
8970EOF
8971ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 8972{ (eval echo configure:8973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
8973ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8974if test -z "$ac_err"; then
8975 rm -rf conftest*
8976 eval "ac_cv_header_$ac_safe=yes"
8977else
8978 echo "$ac_err" >&5
8979 echo "configure: failed program was:" >&5
8980 cat conftest.$ac_ext >&5
8981 rm -rf conftest*
8982 eval "ac_cv_header_$ac_safe=no"
8983fi
8984rm -f conftest*
8985fi
8986if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8987 echo "$ac_t""yes" 1>&6
8988 ac_cv_c_tclh=installed
8989else
8990 echo "$ac_t""no" 1>&6
8991ac_cv_c_tclh=""
8992fi
8993
8994fi
8995
8996fi
8997
8998if test x"${ac_cv_c_tclh}" = x ; then
8999 TCLHDIR="# no Tcl private headers found"
9000 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9001fi
9002if test x"${ac_cv_c_tclh}" != x ; then
9003 no_tcl=""
9004 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9005 echo "$ac_t""is installed" 1>&6
9006 TCLHDIR=""
9007 else
9008 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9009 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9010 TCLHDIR="-I${ac_cv_c_tclh}"
9011 fi
9012fi
9013
9014
9015
9016
9017#
9018# Ok, lets find the tk source trees so we can use the headers
9019# If the directory (presumably symlink) named "tk" exists, use that one
9020# in preference to any others. Same logic is used when choosing library
9021# and again with Tcl. The search order is the best place to look first, then in
9022# decreasing significance. The loop breaks if the trigger file is found.
9023# Note the gross little conversion here of srcdir by cd'ing to the found
9024# directory. This converts the path from a relative to an absolute, so
9025# recursive cache variables for the path will work right. We check all
9026# the possible paths in one loop rather than many seperate loops to speed
9027# things up.
9028# the alternative search directory is involked by --with-tkinclude
9029#
9030no_tk=true
9031echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
93d331ba 9032echo "configure:9033: checking for Tk private headers" >&5
3fc11d3e
JM
9033# Check whether --with-tkinclude or --without-tkinclude was given.
9034if test "${with_tkinclude+set}" = set; then
9035 withval="$with_tkinclude"
9036 with_tkinclude=${withval}
9037fi
9038
9039if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9040 echo $ac_n "(cached) $ac_c" 1>&6
9041else
9042
9043# first check to see if --with-tkinclude was specified
9044if test x"${with_tkinclude}" != x ; then
9045 if test -f ${with_tkinclude}/tk.h ; then
9046 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9047 elif test -f ${with_tkinclude}/generic/tk.h ; then
9048 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9049 else
9050 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9051 fi
9052fi
9053
9054# next check if it came with Tk configuration file
9055if test x"${ac_cv_c_tkconfig}" = x ; then
9056 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9057 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9058 fi
9059fi
9060
9061# next check in private source directory
9062#
9063# since ls returns lowest version numbers first, reverse its output
9064if test x"${ac_cv_c_tkh}" = x ; then
9065 for i in \
9066 ${srcdir}/../tk \
9067 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9068 ${srcdir}/../../tk \
9069 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9070 ${srcdir}/../../../tk \
9071 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9072 if test -f $i/generic/tk.h ; then
9073 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9074 break
9075 fi
9076 done
9077fi
9078# finally check in a few common install locations
9079#
9080# since ls returns lowest version numbers first, reverse its output
9081if test x"${ac_cv_c_tkh}" = x ; then
9082 for i in \
9083 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9084 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9085 /usr/local/src/tk \
9086 /usr/local/lib/tk \
9087 ${prefix}/include ; do
9088 if test -f $i/generic/tk.h ; then
9089 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9090 break
9091 fi
9092 done
9093fi
9094# see if one is installed
9095if test x"${ac_cv_c_tkh}" = x ; then
9096 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9097echo $ac_n "checking for tk.h""... $ac_c" 1>&6
93d331ba 9098echo "configure:9099: checking for tk.h" >&5
3fc11d3e
JM
9099if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9100 echo $ac_n "(cached) $ac_c" 1>&6
9101else
9102 cat > conftest.$ac_ext <<EOF
93d331ba 9103#line 9104 "configure"
3fc11d3e
JM
9104#include "confdefs.h"
9105#include <tk.h>
9106EOF
9107ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 9108{ (eval echo configure:9109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9109ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9110if test -z "$ac_err"; then
9111 rm -rf conftest*
9112 eval "ac_cv_header_$ac_safe=yes"
9113else
9114 echo "$ac_err" >&5
9115 echo "configure: failed program was:" >&5
9116 cat conftest.$ac_ext >&5
9117 rm -rf conftest*
9118 eval "ac_cv_header_$ac_safe=no"
9119fi
9120rm -f conftest*
9121fi
9122if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9123 echo "$ac_t""yes" 1>&6
9124 ac_cv_c_tkh=installed
9125else
9126 echo "$ac_t""no" 1>&6
9127ac_cv_c_tkh=""
9128fi
9129
9130fi
9131
9132fi
9133
9134if test x"${ac_cv_c_tkh}" != x ; then
9135 no_tk=""
9136 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9137 echo "$ac_t""is installed" 1>&6
9138 TKHDIR=""
9139 else
9140 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9141 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9142 TKHDIR="-I${ac_cv_c_tkh}"
9143 fi
9144else
9145 TKHDIR="# no Tk directory found"
9146 echo "configure: warning: Can't find Tk private headers" 1>&2
9147 no_tk=true
9148fi
9149
9150
9151
9152
9153echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
93d331ba 9154echo "configure:9155: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9155if test x"${ac_cv_c_itclh}" = x ; then
9156 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9157 if test -f $i/generic/itcl.h ; then
9158 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9159 break
9160 fi
9161 done
9162fi
9163if test x"${ac_cv_c_itclh}" = x ; then
9164 ITCLHDIR="# no Itcl private headers found"
9165 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9166fi
9167if test x"${ac_cv_c_itclh}" != x ; then
9168 ITCLHDIR="-I${ac_cv_c_itclh}"
9169fi
9170# should always be here
9171# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9172
9173#AC_SUBST(ITCLLIB)
9174
9175
9176echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
93d331ba 9177echo "configure:9178: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9178if test x"${ac_cv_c_itkh}" = x ; then
9179 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9180 if test -f $i/generic/itk.h ; then
9181 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9182 break
9183 fi
9184 done
9185fi
9186if test x"${ac_cv_c_itkh}" = x ; then
9187 ITKHDIR="# no Itk private headers found"
9188 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9189fi
9190if test x"${ac_cv_c_itkh}" != x ; then
9191 ITKHDIR="-I${ac_cv_c_itkh}"
9192fi
9193# should always be here
9194# ITKLIB="../itcl/itk/unix/libitk.a"
9195
9196#AC_SUBST(ITKLIB)
9197
3fc11d3e 9198
dd2504ab
JM
9199
9200 # now look for Tk library stuff
9201
9202 case "${host}" in
9203 *-*-cygwin*)
9204 tkdir=../tk/win/
9205 ;;
9206 *)
9207 tkdir=../tk/unix/
9208 ;;
9209 esac
9210
9211 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9212
3fc11d3e
JM
9213 # now look for Itcl library stuff
9214
9215
9216#
9217# Ok, lets find the itcl configuration
9218# First, look for one uninstalled.
9219# the alternative search directory is invoked by --with-itclconfig
9220#
9221
9222if test x"${no_itcl}" = x ; then
9223 # we reset no_itcl in case something fails here
9224 no_itcl=true
9225 # Check whether --with-itclconfig or --without-itclconfig was given.
9226if test "${with_itclconfig+set}" = set; then
9227 withval="$with_itclconfig"
9228 with_itclconfig=${withval}
9229fi
9230
9231 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
93d331ba 9232echo "configure:9233: checking for Itcl configuration" >&5
3fc11d3e
JM
9233 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9234 echo $ac_n "(cached) $ac_c" 1>&6
9235else
9236
9237
9238 # First check to see if --with-itclconfig was specified.
9239 if test x"${with_itclconfig}" != x ; then
9240 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9241 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9242 else
9243 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9244 fi
9245 fi
9246
9247 # then check for a private Itcl library
9248 if test x"${ac_cv_c_itclconfig}" = x ; then
9249 for i in \
9250 ../itcl/itcl \
9251 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9252 ../../itcl \
9253 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9254 ../../../itcl \
9255 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9256 if test -f "$i/itclConfig.sh" ; then
9257 ac_cv_c_itclconfig=`(cd $i; pwd)`
9258 break
9259 fi
9260 done
9261 fi
9262 # check in a few common install locations
9263 if test x"${ac_cv_c_itclconfig}" = x ; then
9264 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9265 if test -f "$i/itclConfig.sh" ; then
9266 ac_cv_c_itclconfig=`(cd $i; pwd)`
9267 break
9268 fi
9269 done
9270 fi
9271 # check in a few other private locations
9272 if test x"${ac_cv_c_itclconfig}" = x ; then
9273 for i in \
9274 ${srcdir}/../itcl/itcl \
9275 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9276 if test -f "$i/itclConfig.sh" ; then
9277 ac_cv_c_itclconfig=`(cd $i; pwd)`
9278 break
9279 fi
9280 done
9281 fi
9282
9283fi
9284
9285 if test x"${ac_cv_c_itclconfig}" = x ; then
9286 ITCLCONFIG="# no Itcl configs found"
9287 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9288 else
9289 no_itcl=
9290 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9291 echo "$ac_t""found $ITCLCONFIG" 1>&6
9292 fi
9293fi
9294
9295 if test -z "${no_itcl}"; then
9296
9297 if test -f "$ITCLCONFIG" ; then
9298 . $ITCLCONFIG
9299 fi
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
3fc11d3e
JM
9310
9311
9312 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9313 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9314 fi
9315
9316
9317 # now look for Itk library stuff
9318
9319#
9320# Ok, lets find the itk configuration
9321# First, look for one uninstalled.
9322# the alternative search directory is invoked by --with-itkconfig
9323#
9324
9325if test x"${no_itk}" = x ; then
9326 # we reset no_itk in case something fails here
9327 no_itk=true
9328 # Check whether --with-itkconfig or --without-itkconfig was given.
9329if test "${with_itkconfig+set}" = set; then
9330 withval="$with_itkconfig"
9331 with_itkconfig=${withval}
9332fi
9333
9334 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
93d331ba 9335echo "configure:9336: checking for Itk configuration" >&5
3fc11d3e
JM
9336 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9337 echo $ac_n "(cached) $ac_c" 1>&6
9338else
9339
9340
9341 # First check to see if --with-itkconfig was specified.
9342 if test x"${with_itkconfig}" != x ; then
9343 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9344 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9345 else
9346 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9347 fi
9348 fi
9349
9350 # then check for a private Itk library
9351 if test x"${ac_cv_c_itkconfig}" = x ; then
9352 for i in \
9353 ../itcl/itk \
9354 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9355 ../../itk \
9356 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9357 ../../../itk \
9358 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9359 if test -f "$i/itkConfig.sh" ; then
9360 ac_cv_c_itkconfig=`(cd $i; pwd)`
9361 break
9362 fi
9363 done
9364 fi
9365 # check in a few common install locations
9366 if test x"${ac_cv_c_itkconfig}" = x ; then
9367 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9368 if test -f "$i/itkConfig.sh" ; then
9369 ac_cv_c_itkconfig=`(cd $i; pwd)`
9370 break
9371 fi
9372 done
9373 fi
9374 # check in a few other private locations
9375 if test x"${ac_cv_c_itkconfig}" = x ; then
9376 for i in \
9377 ${srcdir}/../itcl/itk \
9378 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9379 if test -f "$i/itkConfig.sh" ; then
9380 ac_cv_c_itkconfig=`(cd $i; pwd)`
9381 break
9382 fi
9383 done
9384 fi
9385
9386fi
9387
9388 if test x"${ac_cv_c_itkconfig}" = x ; then
9389 ITKCONFIG="# no Itk configs found"
9390 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9391 else
9392 no_itk=
9393 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9394 echo "$ac_t""found $ITKCONFIG" 1>&6
9395 fi
9396fi
9397
9398
9399 if test -z "${no_itcl}"; then
9400
9401 if test -f "$ITKCONFIG" ; then
9402 . $ITKCONFIG
9403 fi
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
3fc11d3e 9416 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9417 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9418 fi
9419
4226a5a5 9420 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9421 # Tcl/Tk 8.1 require -fwritable strings. I don't
9422 # know whether 8.2 will or not, but I bet it will.
9423 # I don't have to worry about 7.x since we don't support it.
9424 GDBTK_CFLAGS=""
9425 if test "$GCC" = "yes"; then
9426 if test "$TCL_VERSION" != "8.0" ; then
9427 GDBTK_CFLAGS="-fwritable-strings"
9428 fi
9429 fi
9430
9431 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9432 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9433 # Yes, the ordering seems wrong here. But it isn't.
9434 # TK_LIBS is the list of libraries that need to be linked
9435 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9436 # were in LIBS then any link tests after this point would
9437 # try to include things like `$(LIBGUI)', which wouldn't work.
9438 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9439
9440 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9441 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9442 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9443 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9444 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9445 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9446 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9447 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9448
9449 if test x$gdb_cv_os_cygwin = xyes; then
9450 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9451 WIN32LDAPP="-Wl,--subsystem,console"
9452 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9453 fi
9454 fi
9455 fi
ffc6a242
KS
9456
9457 SUBDIRS="${SUBDIRS} gdbtk"
9458 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9459fi
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
dd2504ab 9473
c906108c
SS
9474# If we find X, set shell vars x_includes and x_libraries to the
9475# paths, otherwise set no_x=yes.
9476# Uses ac_ vars as temps to allow command line to override cache and checks.
9477# --without-x overrides everything else, but does not touch the cache.
9478echo $ac_n "checking for X""... $ac_c" 1>&6
93d331ba 9479echo "configure:9480: checking for X" >&5
c906108c
SS
9480
9481# Check whether --with-x or --without-x was given.
9482if test "${with_x+set}" = set; then
9483 withval="$with_x"
9484 :
9485fi
9486
9487# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9488if test "x$with_x" = xno; then
9489 # The user explicitly disabled X.
9490 have_x=disabled
9491else
9492 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9493 # Both variables are already set.
9494 have_x=yes
9495 else
9496if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9497 echo $ac_n "(cached) $ac_c" 1>&6
9498else
9499 # One or both of the vars are not set, and there is no cached value.
9500ac_x_includes=NO ac_x_libraries=NO
9501rm -fr conftestdir
9502if mkdir conftestdir; then
9503 cd conftestdir
9504 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9505 cat > Imakefile <<'EOF'
9506acfindx:
9507 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9508EOF
9509 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9510 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9511 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9512 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9513 for ac_extension in a so sl; do
9514 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9515 test -f $ac_im_libdir/libX11.$ac_extension; then
9516 ac_im_usrlibdir=$ac_im_libdir; break
9517 fi
9518 done
9519 # Screen out bogus values from the imake configuration. They are
9520 # bogus both because they are the default anyway, and because
9521 # using them would break gcc on systems where it needs fixed includes.
9522 case "$ac_im_incroot" in
9523 /usr/include) ;;
9524 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9525 esac
9526 case "$ac_im_usrlibdir" in
9527 /usr/lib | /lib) ;;
9528 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9529 esac
9530 fi
9531 cd ..
9532 rm -fr conftestdir
9533fi
9534
9535if test "$ac_x_includes" = NO; then
9536 # Guess where to find include files, by looking for this one X11 .h file.
9537 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9538
9539 # First, try using that file with no special directory specified.
9540cat > conftest.$ac_ext <<EOF
93d331ba 9541#line 9542 "configure"
c906108c
SS
9542#include "confdefs.h"
9543#include <$x_direct_test_include>
9544EOF
9545ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
93d331ba 9546{ (eval echo configure:9547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9547ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9548if test -z "$ac_err"; then
9549 rm -rf conftest*
9550 # We can compile using X headers with no special include directory.
9551ac_x_includes=
9552else
9553 echo "$ac_err" >&5
9554 echo "configure: failed program was:" >&5
9555 cat conftest.$ac_ext >&5
9556 rm -rf conftest*
9557 # Look for the header file in a standard set of common directories.
9558# Check X11 before X11Rn because it is often a symlink to the current release.
9559 for ac_dir in \
9560 /usr/X11/include \
9561 /usr/X11R6/include \
9562 /usr/X11R5/include \
9563 /usr/X11R4/include \
9564 \
9565 /usr/include/X11 \
9566 /usr/include/X11R6 \
9567 /usr/include/X11R5 \
9568 /usr/include/X11R4 \
9569 \
9570 /usr/local/X11/include \
9571 /usr/local/X11R6/include \
9572 /usr/local/X11R5/include \
9573 /usr/local/X11R4/include \
9574 \
9575 /usr/local/include/X11 \
9576 /usr/local/include/X11R6 \
9577 /usr/local/include/X11R5 \
9578 /usr/local/include/X11R4 \
9579 \
9580 /usr/X386/include \
9581 /usr/x386/include \
9582 /usr/XFree86/include/X11 \
9583 \
9584 /usr/include \
9585 /usr/local/include \
9586 /usr/unsupported/include \
9587 /usr/athena/include \
9588 /usr/local/x11r5/include \
9589 /usr/lpp/Xamples/include \
9590 \
9591 /usr/openwin/include \
9592 /usr/openwin/share/include \
9593 ; \
9594 do
9595 if test -r "$ac_dir/$x_direct_test_include"; then
9596 ac_x_includes=$ac_dir
9597 break
9598 fi
9599 done
9600fi
9601rm -f conftest*
9602fi # $ac_x_includes = NO
9603
9604if test "$ac_x_libraries" = NO; then
9605 # Check for the libraries.
9606
9607 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9608 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9609
9610 # See if we find them without any special options.
9611 # Don't add to $LIBS permanently.
9612 ac_save_LIBS="$LIBS"
9613 LIBS="-l$x_direct_test_library $LIBS"
9614cat > conftest.$ac_ext <<EOF
93d331ba 9615#line 9616 "configure"
c906108c
SS
9616#include "confdefs.h"
9617
9618int main() {
9619${x_direct_test_function}()
9620; return 0; }
9621EOF
93d331ba 9622if { (eval echo configure:9623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9623 rm -rf conftest*
9624 LIBS="$ac_save_LIBS"
9625# We can link X programs with no special library path.
9626ac_x_libraries=
9627else
9628 echo "configure: failed program was:" >&5
9629 cat conftest.$ac_ext >&5
9630 rm -rf conftest*
9631 LIBS="$ac_save_LIBS"
9632# First see if replacing the include by lib works.
9633# Check X11 before X11Rn because it is often a symlink to the current release.
9634for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9635 /usr/X11/lib \
9636 /usr/X11R6/lib \
9637 /usr/X11R5/lib \
9638 /usr/X11R4/lib \
9639 \
9640 /usr/lib/X11 \
9641 /usr/lib/X11R6 \
9642 /usr/lib/X11R5 \
9643 /usr/lib/X11R4 \
9644 \
9645 /usr/local/X11/lib \
9646 /usr/local/X11R6/lib \
9647 /usr/local/X11R5/lib \
9648 /usr/local/X11R4/lib \
9649 \
9650 /usr/local/lib/X11 \
9651 /usr/local/lib/X11R6 \
9652 /usr/local/lib/X11R5 \
9653 /usr/local/lib/X11R4 \
9654 \
9655 /usr/X386/lib \
9656 /usr/x386/lib \
9657 /usr/XFree86/lib/X11 \
9658 \
9659 /usr/lib \
9660 /usr/local/lib \
9661 /usr/unsupported/lib \
9662 /usr/athena/lib \
9663 /usr/local/x11r5/lib \
9664 /usr/lpp/Xamples/lib \
9665 /lib/usr/lib/X11 \
9666 \
9667 /usr/openwin/lib \
9668 /usr/openwin/share/lib \
9669 ; \
9670do
9671 for ac_extension in a so sl; do
9672 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9673 ac_x_libraries=$ac_dir
9674 break 2
9675 fi
9676 done
9677done
9678fi
9679rm -f conftest*
9680fi # $ac_x_libraries = NO
9681
9682if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9683 # Didn't find X anywhere. Cache the known absence of X.
9684 ac_cv_have_x="have_x=no"
9685else
9686 # Record where we found X for the cache.
9687 ac_cv_have_x="have_x=yes \
9688 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9689fi
9690fi
9691 fi
9692 eval "$ac_cv_have_x"
9693fi # $with_x != no
9694
9695if test "$have_x" != yes; then
9696 echo "$ac_t""$have_x" 1>&6
9697 no_x=yes
9698else
9699 # If each of the values was on the command line, it overrides each guess.
9700 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9701 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9702 # Update the cache value to reflect the command line values.
9703 ac_cv_have_x="have_x=yes \
9704 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9705 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9706fi
9707
9708
7a292a7a
SS
9709
9710# Unlike the sim directory, whether a simulator is linked is controlled by
9711# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9712# This code just checks for a few cases where we'd like to ignore those
9713# definitions, even when they're present in the '.mt' file. These cases
9714# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9715# not part of the source tree.
7a292a7a
SS
9716#
9717# Check whether --enable-sim or --disable-sim was given.
9718if test "${enable_sim+set}" = set; then
9719 enableval="$enable_sim"
9720 echo "enable_sim = $enable_sim";
9721 echo "enableval = ${enableval}";
9722 case "${enableval}" in
9723 yes) ignore_sim=false ;;
9724 no) ignore_sim=true ;;
9725 *) ignore_sim=false ;;
9726 esac
9727else
9728 ignore_sim=false
9729fi
9730
9731
9732if test ! -d "${srcdir}/../sim"; then
9733 ignore_sim=true
9734fi
9735
9736if test "${ignore_sim}" = "true"; then
9737 IGNORE_SIM="SIM="
9738 IGNORE_SIM_OBS="SIM_OBS="
9739else
9740 IGNORE_SIM=""
9741 IGNORE_SIM_OBS=""
9742 cat >> confdefs.h <<\EOF
9743#define WITH_SIM 1
9744EOF
9745
9746fi
9747
9748
9749
c906108c
SS
9750
9751
9752
9753
9754
9755
dfcd3bfb 9756
e56ac5c3
AC
9757
9758
b3a90332
AC
9759
9760
b46cd165 9761
c906108c
SS
9762# Begin stuff to support --enable-shared
9763# Check whether --enable-shared or --disable-shared was given.
9764if test "${enable_shared+set}" = set; then
9765 enableval="$enable_shared"
9766 case "${enableval}" in
9767 yes) shared=true ;;
9768 no) shared=false ;;
9769 *) shared=true ;;
9770esac
9771fi
9772
9773HLDFLAGS=
9774HLDENV=
9775# If we have shared libraries, try to set rpath reasonably.
9776if test "${shared}" = "true"; then
9777 case "${host}" in
9778 *-*-hpux*)
9779 HLDFLAGS='-Wl,+s,+b,$(libdir)'
9780 ;;
9781 *-*-irix5* | *-*-irix6*)
9782 HLDFLAGS='-Wl,-rpath,$(libdir)'
9783 ;;
9784 *-*-linux*aout*)
9785 ;;
88987551 9786 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
9787 HLDFLAGS='-Wl,-rpath,$(libdir)'
9788 ;;
9789 *-*-solaris*)
9790 HLDFLAGS='-R $(libdir)'
9791 ;;
9792 *-*-sysv4*)
9793 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;'
9794 ;;
9795 esac
9796fi
9797
9798# On SunOS, if the linker supports the -rpath option, use it to
9799# prevent ../bfd and ../opcodes from being included in the run time
9800# search path.
9801case "${host}" in
9802 *-*-sunos*)
9803 echo 'main () { }' > conftest.c
9804 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9805 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9806 :
9807 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9808 :
9809 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9810 :
9811 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9812 :
9813 elif test "${shared}" = "true"; then
9814 HLDFLAGS='-Wl,-rpath=$(libdir)'
9815 else
9816 HLDFLAGS='-Wl,-rpath='
9817 fi
9818 rm -f conftest.t conftest.c conftest
9819 ;;
9820esac
9821
9822
9823# End stuff to support --enable-shared
9824
9825# target_subdir is used by the testsuite to find the target libraries.
9826target_subdir=
9827if test "${host}" != "${target}"; then
9828 target_subdir="${target_alias}/"
9829fi
9830
9831
9832frags=
9833host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9834if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9835 # When building a native debuger the .mh file containing things
9836 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9837 # since it no longer contains anything useful.
9838 if test "${target}" = "${host}"; then
9839 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9840 else
9841 host_makefile_frag=/dev/null
9842 fi
c906108c
SS
9843fi
9844frags="$frags $host_makefile_frag"
9845
9846target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9847if test ! -f ${target_makefile_frag}; then
9848{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9849fi
9850frags="$frags $target_makefile_frag"
9851
9852
9853
9854
9855
9856hostfile=`sed -n '
9857s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9858' ${host_makefile_frag}`
9859
9860targetfile=`sed -n '
9861s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9862' ${target_makefile_frag}`
9863
6166d547
AC
9864GDB_MULTI_ARCH=`sed -n '
9865s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9866' ${target_makefile_frag}`
9867
c906108c 9868if test "${target}" = "${host}"; then
a85f51e7
DJ
9869# We pick this up from the host configuration file (.mh) because we
9870# do not have a native configuration Makefile fragment.
c906108c
SS
9871nativefile=`sed -n '
9872s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9873' ${host_makefile_frag}`
c906108c
SS
9874fi
9875
9876
6166d547
AC
9877# New targets should just set gdb_multi_arch=yes in configure.tgt.
9878# Old targets being converted can either do that or set GDB_MULTI_ARCH
9879# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9880# will be the default.
9881if test x"${GDB_MULTI_ARCH}" = x ; then
9882 case "${gdb_multi_arch}" in
9883 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9884 no ) GDB_MULTI_ARCH=0 ;;
9885 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9886 esac
9887fi
9888if test x"${GDB_MULTI_ARCH}" != x ; then
9889 cat >> confdefs.h <<EOF
9890#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9891EOF
9892
9893fi
6c5cfe5b 9894# Warn the user when they use an old practice
6166d547
AC
9895case "${GDB_MULTI_ARCH}" in
9896 "" ) ;;
9897 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9898 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9899 GDB_MULTI_ARCH_PURE )
9900 if test x"${targetfile}" != x ; then
6c5cfe5b 9901 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9902 targetfile=""
6166d547
AC
9903 fi ;;
9904 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9905esac
9906
96baa820
JM
9907if test "${enable_multi_ice}" = "yes"; then
9908 SUBDIRS="${SUBDIRS} multi-ice"
9909fi
9910
a85f51e7
DJ
9911# ``gdbserver'' can only be built in a native configuration.
9912if test x"${target}" = x"${host}"; then
9913 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
93d331ba 9914echo "configure:9915: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
9915 if test x"${build_gdbserver}" = xyes ; then
9916 configdirs="${configdirs} gdbserver"
9917 SUBDIRS="${SUBDIRS} gdbserver"
9918 echo "$ac_t""yes" 1>&6
9919 else
9920 echo "$ac_t""no" 1>&6
9921 fi
9922fi
9923
96baa820
JM
9924
9925
c906108c 9926# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9927# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9928# version.
c906108c
SS
9929
9930files=
9931links=
5a2402b8 9932
c906108c 9933rm -f xm.h
5a2402b8 9934xm_h=""
c906108c 9935if test "${hostfile}" != ""; then
5a2402b8
AC
9936 xm_h=xm.h
9937 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9938 files="${files} ${GDB_XM_FILE}"
9939 links="${links} xm.h"
9940 cat >> confdefs.h <<EOF
9941#define GDB_XM_FILE ${GDB_XM_FILE}
9942EOF
9943
c906108c 9944fi
5a2402b8
AC
9945
9946
c906108c 9947rm -f tm.h
5a2402b8 9948tm_h=""
c906108c 9949if test "${targetfile}" != ""; then
5a2402b8
AC
9950 tm_h=tm.h
9951 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9952 files="${files} ${GDB_TM_FILE}"
9953 links="${links} tm.h"
9954 cat >> confdefs.h <<EOF
9955#define GDB_TM_FILE ${GDB_TM_FILE}
9956EOF
9957
c906108c 9958fi
5a2402b8
AC
9959
9960
c906108c 9961rm -f nm.h
5a2402b8 9962nm_h=""
c906108c 9963if test "${nativefile}" != ""; then
5a2402b8
AC
9964 nm_h=nm.h
9965 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
9966 files="${files} ${GDB_NM_FILE}"
9967 links="${links} nm.h"
9968 cat >> confdefs.h <<EOF
9969#define GDB_NM_FILE ${GDB_NM_FILE}
9970EOF
9971
c906108c 9972fi
5a2402b8
AC
9973
9974
c906108c
SS
9975
9976
9977echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
93d331ba 9978echo "configure:9979: checking for Cygwin environment" >&5
c906108c
SS
9979if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9980 echo $ac_n "(cached) $ac_c" 1>&6
9981else
9982 cat > conftest.$ac_ext <<EOF
93d331ba 9983#line 9984 "configure"
c906108c
SS
9984#include "confdefs.h"
9985
9986int main() {
9987
9988#ifndef __CYGWIN__
9989#define __CYGWIN__ __CYGWIN32__
9990#endif
9991return __CYGWIN__;
9992; return 0; }
9993EOF
93d331ba 9994if { (eval echo configure:9995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9995 rm -rf conftest*
9996 ac_cv_cygwin=yes
9997else
9998 echo "configure: failed program was:" >&5
9999 cat conftest.$ac_ext >&5
10000 rm -rf conftest*
10001 ac_cv_cygwin=no
10002fi
10003rm -f conftest*
10004rm -f conftest*
10005fi
10006
10007echo "$ac_t""$ac_cv_cygwin" 1>&6
10008CYGWIN=
10009test "$ac_cv_cygwin" = yes && CYGWIN=yes
10010echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
93d331ba 10011echo "configure:10012: checking for mingw32 environment" >&5
c906108c
SS
10012if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10013 echo $ac_n "(cached) $ac_c" 1>&6
10014else
10015 cat > conftest.$ac_ext <<EOF
93d331ba 10016#line 10017 "configure"
c906108c
SS
10017#include "confdefs.h"
10018
10019int main() {
10020return __MINGW32__;
10021; return 0; }
10022EOF
93d331ba 10023if { (eval echo configure:10024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10024 rm -rf conftest*
10025 ac_cv_mingw32=yes
10026else
10027 echo "configure: failed program was:" >&5
10028 cat conftest.$ac_ext >&5
10029 rm -rf conftest*
10030 ac_cv_mingw32=no
10031fi
10032rm -f conftest*
10033rm -f conftest*
10034fi
10035
10036echo "$ac_t""$ac_cv_mingw32" 1>&6
10037MINGW32=
10038test "$ac_cv_mingw32" = yes && MINGW32=yes
10039
10040
10041echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
93d331ba 10042echo "configure:10043: checking for executable suffix" >&5
c906108c
SS
10043if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10044 echo $ac_n "(cached) $ac_c" 1>&6
10045else
10046 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10047 ac_cv_exeext=.exe
10048else
10049 rm -f conftest*
10050 echo 'int main () { return 0; }' > conftest.$ac_ext
10051 ac_cv_exeext=
93d331ba 10052 if { (eval echo configure:10053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10053 for file in conftest.*; do
10054 case $file in
9608ab8b 10055 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10056 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10057 esac
10058 done
10059 else
10060 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10061 fi
10062 rm -f conftest*
10063 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10064fi
10065fi
10066
10067EXEEXT=""
10068test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10069echo "$ac_t""${ac_cv_exeext}" 1>&6
10070ac_exeext=$EXEEXT
10071
10072
234b45d4
KB
10073
10074cat >> confdefs.h <<\EOF
10075#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10076EOF
10077
10078
10079
10080
10081 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10082if test "${with_libiconv_prefix+set}" = set; then
10083 withval="$with_libiconv_prefix"
10084
10085 for dir in `echo "$withval" | tr : ' '`; do
10086 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10087 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10088 done
10089
10090fi
10091
10092
10093 echo $ac_n "checking for iconv""... $ac_c" 1>&6
93d331ba 10094echo "configure:10095: checking for iconv" >&5
234b45d4
KB
10095if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10096 echo $ac_n "(cached) $ac_c" 1>&6
10097else
10098
10099 am_cv_func_iconv="no, consider installing GNU libiconv"
10100 am_cv_lib_iconv=no
10101 cat > conftest.$ac_ext <<EOF
93d331ba 10102#line 10103 "configure"
234b45d4
KB
10103#include "confdefs.h"
10104#include <stdlib.h>
10105#include <iconv.h>
10106int main() {
10107iconv_t cd = iconv_open("","");
10108 iconv(cd,NULL,NULL,NULL,NULL);
10109 iconv_close(cd);
10110; return 0; }
10111EOF
93d331ba 10112if { (eval echo configure:10113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10113 rm -rf conftest*
10114 am_cv_func_iconv=yes
10115else
10116 echo "configure: failed program was:" >&5
10117 cat conftest.$ac_ext >&5
10118fi
10119rm -f conftest*
10120 if test "$am_cv_func_iconv" != yes; then
10121 am_save_LIBS="$LIBS"
10122 LIBS="$LIBS -liconv"
10123 cat > conftest.$ac_ext <<EOF
93d331ba 10124#line 10125 "configure"
234b45d4
KB
10125#include "confdefs.h"
10126#include <stdlib.h>
10127#include <iconv.h>
10128int main() {
10129iconv_t cd = iconv_open("","");
10130 iconv(cd,NULL,NULL,NULL,NULL);
10131 iconv_close(cd);
10132; return 0; }
10133EOF
93d331ba 10134if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10135 rm -rf conftest*
10136 am_cv_lib_iconv=yes
10137 am_cv_func_iconv=yes
10138else
10139 echo "configure: failed program was:" >&5
10140 cat conftest.$ac_ext >&5
10141fi
10142rm -f conftest*
10143 LIBS="$am_save_LIBS"
10144 fi
10145
10146fi
10147
10148echo "$ac_t""$am_cv_func_iconv" 1>&6
10149 if test "$am_cv_func_iconv" = yes; then
10150 cat >> confdefs.h <<\EOF
10151#define HAVE_ICONV 1
10152EOF
10153
10154 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
93d331ba 10155echo "configure:10156: checking for iconv declaration" >&5
234b45d4
KB
10156 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10157 echo $ac_n "(cached) $ac_c" 1>&6
10158else
10159
10160 cat > conftest.$ac_ext <<EOF
93d331ba 10161#line 10162 "configure"
234b45d4
KB
10162#include "confdefs.h"
10163
10164#include <stdlib.h>
10165#include <iconv.h>
10166extern
10167#ifdef __cplusplus
10168"C"
10169#endif
10170#if defined(__STDC__) || defined(__cplusplus)
10171size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10172#else
10173size_t iconv();
10174#endif
10175
10176int main() {
10177
10178; return 0; }
10179EOF
93d331ba 10180if { (eval echo configure:10181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10181 rm -rf conftest*
10182 am_cv_proto_iconv_arg1=""
10183else
10184 echo "configure: failed program was:" >&5
10185 cat conftest.$ac_ext >&5
10186 rm -rf conftest*
10187 am_cv_proto_iconv_arg1="const"
10188fi
10189rm -f conftest*
10190 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);"
10191fi
10192
10193 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10194 echo "$ac_t""${ac_t:-
10195 }$am_cv_proto_iconv" 1>&6
10196 cat >> confdefs.h <<EOF
10197#define ICONV_CONST $am_cv_proto_iconv_arg1
10198EOF
10199
10200 fi
10201 LIBICONV=
10202 if test "$am_cv_lib_iconv" = yes; then
10203 LIBICONV="-liconv"
10204 fi
10205
10206
10207
c906108c
SS
10208subdirs="$configdirs"
10209
10210trap '' 1 2 15
10211cat > confcache <<\EOF
10212# This file is a shell script that caches the results of configure
10213# tests run on this system so they can be shared between configure
10214# scripts and configure runs. It is not useful on other systems.
10215# If it contains results you don't want to keep, you may remove or edit it.
10216#
10217# By default, configure uses ./config.cache as the cache file,
10218# creating it if it does not exist already. You can give configure
10219# the --cache-file=FILE option to use a different cache file; that is
10220# what configure does when it calls configure scripts in
10221# subdirectories, so they share the cache.
10222# Giving --cache-file=/dev/null disables caching, for debugging configure.
10223# config.status only pays attention to the cache file if you give it the
10224# --recheck option to rerun configure.
10225#
10226EOF
10227# The following way of writing the cache mishandles newlines in values,
10228# but we know of no workaround that is simple, portable, and efficient.
10229# So, don't put newlines in cache variables' values.
10230# Ultrix sh set writes to stderr and can't be redirected directly,
10231# and sets the high bit in the cache file unless we assign to the vars.
10232(set) 2>&1 |
10233 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10234 *ac_space=\ *)
10235 # `set' does not quote correctly, so add quotes (double-quote substitution
10236 # turns \\\\ into \\, and sed turns \\ into \).
10237 sed -n \
10238 -e "s/'/'\\\\''/g" \
10239 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10240 ;;
10241 *)
10242 # `set' quotes correctly as required by POSIX, so do not add quotes.
10243 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10244 ;;
10245 esac >> confcache
10246if cmp -s $cache_file confcache; then
10247 :
10248else
10249 if test -w $cache_file; then
10250 echo "updating cache $cache_file"
10251 cat confcache > $cache_file
10252 else
10253 echo "not updating unwritable cache $cache_file"
10254 fi
10255fi
10256rm -f confcache
10257
10258trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10259
10260test "x$prefix" = xNONE && prefix=$ac_default_prefix
10261# Let make expand exec_prefix.
10262test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10263
10264# Any assignment to VPATH causes Sun make to only execute
10265# the first set of double-colon rules, so remove it if not needed.
10266# If there is a colon in the path, we need to keep it.
10267if test "x$srcdir" = x.; then
10268 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10269fi
10270
10271trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10272
10273DEFS=-DHAVE_CONFIG_H
10274
10275# Without the "./", some shells look in PATH for config.status.
10276: ${CONFIG_STATUS=./config.status}
10277
10278echo creating $CONFIG_STATUS
10279rm -f $CONFIG_STATUS
10280cat > $CONFIG_STATUS <<EOF
10281#! /bin/sh
10282# Generated automatically by configure.
10283# Run this file to recreate the current configuration.
10284# This directory was configured as follows,
10285# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10286#
10287# $0 $ac_configure_args
10288#
10289# Compiler output produced by configure, useful for debugging
10290# configure, is in ./config.log if it exists.
10291
10292ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10293for ac_option
10294do
10295 case "\$ac_option" in
10296 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10297 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10298 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10299 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10300 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10301 exit 0 ;;
10302 -help | --help | --hel | --he | --h)
10303 echo "\$ac_cs_usage"; exit 0 ;;
10304 *) echo "\$ac_cs_usage"; exit 1 ;;
10305 esac
10306done
10307
10308ac_given_srcdir=$srcdir
10309ac_given_INSTALL="$INSTALL"
10310
ed952ac5 10311trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10312EOF
10313cat >> $CONFIG_STATUS <<EOF
10314
10315# Protect against being on the right side of a sed subst in config.status.
10316sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10317 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10318$ac_vpsub
10319$extrasub
10320s%@SHELL@%$SHELL%g
10321s%@CFLAGS@%$CFLAGS%g
10322s%@CPPFLAGS@%$CPPFLAGS%g
10323s%@CXXFLAGS@%$CXXFLAGS%g
10324s%@FFLAGS@%$FFLAGS%g
10325s%@DEFS@%$DEFS%g
10326s%@LDFLAGS@%$LDFLAGS%g
10327s%@LIBS@%$LIBS%g
10328s%@exec_prefix@%$exec_prefix%g
10329s%@prefix@%$prefix%g
10330s%@program_transform_name@%$program_transform_name%g
10331s%@bindir@%$bindir%g
10332s%@sbindir@%$sbindir%g
10333s%@libexecdir@%$libexecdir%g
10334s%@datadir@%$datadir%g
10335s%@sysconfdir@%$sysconfdir%g
10336s%@sharedstatedir@%$sharedstatedir%g
10337s%@localstatedir@%$localstatedir%g
10338s%@libdir@%$libdir%g
10339s%@includedir@%$includedir%g
10340s%@oldincludedir@%$oldincludedir%g
10341s%@infodir@%$infodir%g
10342s%@mandir@%$mandir%g
413ccac7
AC
10343s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10344s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10345s%@MAINT@%$MAINT%g
c906108c
SS
10346s%@CC@%$CC%g
10347s%@CPP@%$CPP%g
10348s%@host@%$host%g
10349s%@host_alias@%$host_alias%g
10350s%@host_cpu@%$host_cpu%g
10351s%@host_vendor@%$host_vendor%g
10352s%@host_os@%$host_os%g
10353s%@target@%$target%g
10354s%@target_alias@%$target_alias%g
10355s%@target_cpu@%$target_cpu%g
10356s%@target_vendor@%$target_vendor%g
10357s%@target_os@%$target_os%g
10358s%@build@%$build%g
10359s%@build_alias@%$build_alias%g
10360s%@build_cpu@%$build_cpu%g
10361s%@build_vendor@%$build_vendor%g
10362s%@build_os@%$build_os%g
c906108c 10363s%@RANLIB@%$RANLIB%g
8bb2c122 10364s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10365s%@ALLOCA@%$ALLOCA%g
10366s%@USE_NLS@%$USE_NLS%g
10367s%@MSGFMT@%$MSGFMT%g
10368s%@GMSGFMT@%$GMSGFMT%g
10369s%@XGETTEXT@%$XGETTEXT%g
10370s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10371s%@CATALOGS@%$CATALOGS%g
10372s%@CATOBJEXT@%$CATOBJEXT%g
10373s%@DATADIRNAME@%$DATADIRNAME%g
10374s%@GMOFILES@%$GMOFILES%g
10375s%@INSTOBJEXT@%$INSTOBJEXT%g
10376s%@INTLDEPS@%$INTLDEPS%g
10377s%@INTLLIBS@%$INTLLIBS%g
10378s%@INTLOBJS@%$INTLOBJS%g
10379s%@POFILES@%$POFILES%g
10380s%@POSUB@%$POSUB%g
10381s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10382s%@GT_NO@%$GT_NO%g
10383s%@GT_YES@%$GT_YES%g
10384s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10385s%@l@%$l%g
7a292a7a 10386s%@AWK@%$AWK%g
c906108c
SS
10387s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10388s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10389s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10390s%@LN_S@%$LN_S%g
10391s%@YACC@%$YACC%g
c906108c 10392s%@AR@%$AR%g
95ca63c4
CF
10393s%@DLLTOOL@%$DLLTOOL%g
10394s%@WINDRES@%$WINDRES%g
75c6e08a 10395s%@MIG@%$MIG%g
c906108c 10396s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 10397s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10398s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10399s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10400s%@MMALLOC@%$MMALLOC%g
aff38e61 10401s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10402s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10403s%@LIBGUI@%$LIBGUI%g
10404s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10405s%@WIN32LDAPP@%$WIN32LDAPP%g
10406s%@TCL_VERSION@%$TCL_VERSION%g
10407s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10408s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10409s%@TCL_CC@%$TCL_CC%g
10410s%@TCL_DEFS@%$TCL_DEFS%g
10411s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10412s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10413s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10414s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10415s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10416s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10417s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10418s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10419s%@TCL_RANLIB@%$TCL_RANLIB%g
10420s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10421s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10422s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10423s%@TK_VERSION@%$TK_VERSION%g
10424s%@TK_DEFS@%$TK_DEFS%g
10425s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10426s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10427s%@TK_XLIBSW@%$TK_XLIBSW%g
10428s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10429s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10430s%@TCLHDIR@%$TCLHDIR%g
10431s%@TKHDIR@%$TKHDIR%g
10432s%@ITCLHDIR@%$ITCLHDIR%g
10433s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10434s%@ITCL_VERSION@%$ITCL_VERSION%g
10435s%@ITCL_DEFS@%$ITCL_DEFS%g
10436s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10437s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10438s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10439s%@ITK_VERSION@%$ITK_VERSION%g
10440s%@ITK_DEFS@%$ITK_DEFS%g
10441s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10442s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10443s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10444s%@X_CFLAGS@%$X_CFLAGS%g
10445s%@X_LDFLAGS@%$X_LDFLAGS%g
10446s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10447s%@TCL_DEPS@%$TCL_DEPS%g
10448s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10449s%@ITCLLIB@%$ITCLLIB%g
10450s%@ITCL_DEPS@%$ITCL_DEPS%g
10451s%@ITKLIB@%$ITKLIB%g
10452s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10453s%@GDBTKLIBS@%$GDBTKLIBS%g
10454s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10455s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10456s%@IGNORE_SIM@%$IGNORE_SIM%g
10457s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10458s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10459s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10460s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10461s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10462s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10463s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10464s%@CONFIG_ALL@%$CONFIG_ALL%g
10465s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10466s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10467s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10468s%@HLDFLAGS@%$HLDFLAGS%g
10469s%@HLDENV@%$HLDENV%g
10470s%@target_subdir@%$target_subdir%g
10471/@host_makefile_frag@/r $host_makefile_frag
10472s%@host_makefile_frag@%%g
10473/@target_makefile_frag@/r $target_makefile_frag
10474s%@target_makefile_frag@%%g
10475s%@frags@%$frags%g
96baa820 10476s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
10477s%@xm_h@%$xm_h%g
10478s%@tm_h@%$tm_h%g
10479s%@nm_h@%$nm_h%g
c906108c 10480s%@EXEEXT@%$EXEEXT%g
234b45d4 10481s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10482s%@subdirs@%$subdirs%g
10483
10484CEOF
10485EOF
10486
10487cat >> $CONFIG_STATUS <<\EOF
10488
10489# Split the substitutions into bite-sized pieces for seds with
10490# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10491ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10492ac_file=1 # Number of current file.
10493ac_beg=1 # First line for current file.
10494ac_end=$ac_max_sed_cmds # Line after last line for current file.
10495ac_more_lines=:
10496ac_sed_cmds=""
10497while $ac_more_lines; do
10498 if test $ac_beg -gt 1; then
10499 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10500 else
10501 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10502 fi
10503 if test ! -s conftest.s$ac_file; then
10504 ac_more_lines=false
10505 rm -f conftest.s$ac_file
10506 else
10507 if test -z "$ac_sed_cmds"; then
10508 ac_sed_cmds="sed -f conftest.s$ac_file"
10509 else
10510 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10511 fi
10512 ac_file=`expr $ac_file + 1`
10513 ac_beg=$ac_end
10514 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10515 fi
10516done
10517if test -z "$ac_sed_cmds"; then
10518 ac_sed_cmds=cat
10519fi
10520EOF
10521
10522cat >> $CONFIG_STATUS <<EOF
10523
ed952ac5 10524CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10525EOF
10526cat >> $CONFIG_STATUS <<\EOF
10527for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10528 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10529 case "$ac_file" in
10530 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10531 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10532 *) ac_file_in="${ac_file}.in" ;;
10533 esac
10534
10535 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10536
10537 # Remove last slash and all that follows it. Not all systems have dirname.
10538 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10539 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10540 # The file is in a subdirectory.
10541 test ! -d "$ac_dir" && mkdir "$ac_dir"
10542 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10543 # A "../" for each directory in $ac_dir_suffix.
10544 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10545 else
10546 ac_dir_suffix= ac_dots=
10547 fi
10548
10549 case "$ac_given_srcdir" in
10550 .) srcdir=.
10551 if test -z "$ac_dots"; then top_srcdir=.
10552 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10553 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10554 *) # Relative path.
10555 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10556 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10557 esac
10558
10559 case "$ac_given_INSTALL" in
10560 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10561 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10562 esac
10563
10564 echo creating "$ac_file"
10565 rm -f "$ac_file"
10566 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10567 case "$ac_file" in
10568 *Makefile*) ac_comsub="1i\\
10569# $configure_input" ;;
10570 *) ac_comsub= ;;
10571 esac
10572
10573 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10574 sed -e "$ac_comsub
10575s%@configure_input@%$configure_input%g
10576s%@srcdir@%$srcdir%g
10577s%@top_srcdir@%$top_srcdir%g
10578s%@INSTALL@%$INSTALL%g
10579" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10580fi; done
10581rm -f conftest.s*
10582
10583# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10584# NAME is the cpp macro being defined and VALUE is the value it is being given.
10585#
10586# ac_d sets the value in "#define NAME VALUE" lines.
10587ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10588ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10589ac_dC='\3'
10590ac_dD='%g'
10591# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10592ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10593ac_uB='\([ ]\)%\1#\2define\3'
10594ac_uC=' '
10595ac_uD='\4%g'
10596# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10597ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10598ac_eB='$%\1#\2define\3'
10599ac_eC=' '
10600ac_eD='%g'
10601
10602if test "${CONFIG_HEADERS+set}" != set; then
10603EOF
10604cat >> $CONFIG_STATUS <<EOF
10605 CONFIG_HEADERS="config.h:config.in"
10606EOF
10607cat >> $CONFIG_STATUS <<\EOF
10608fi
10609for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10610 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10611 case "$ac_file" in
10612 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10613 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10614 *) ac_file_in="${ac_file}.in" ;;
10615 esac
10616
10617 echo creating $ac_file
10618
10619 rm -f conftest.frag conftest.in conftest.out
10620 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10621 cat $ac_file_inputs > conftest.in
10622
10623EOF
10624
10625# Transform confdefs.h into a sed script conftest.vals that substitutes
10626# the proper values into config.h.in to produce config.h. And first:
10627# Protect against being on the right side of a sed subst in config.status.
10628# Protect against being in an unquoted here document in config.status.
10629rm -f conftest.vals
10630cat > conftest.hdr <<\EOF
10631s/[\\&%]/\\&/g
10632s%[\\$`]%\\&%g
10633s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10634s%ac_d%ac_u%gp
10635s%ac_u%ac_e%gp
10636EOF
10637sed -n -f conftest.hdr confdefs.h > conftest.vals
10638rm -f conftest.hdr
10639
10640# This sed command replaces #undef with comments. This is necessary, for
10641# example, in the case of _POSIX_SOURCE, which is predefined and required
10642# on some systems where configure will not decide to define it.
10643cat >> conftest.vals <<\EOF
10644s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10645EOF
10646
10647# Break up conftest.vals because some shells have a limit on
10648# the size of here documents, and old seds have small limits too.
10649
10650rm -f conftest.tail
10651while :
10652do
10653 ac_lines=`grep -c . conftest.vals`
10654 # grep -c gives empty output for an empty file on some AIX systems.
10655 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10656 # Write a limited-size here document to conftest.frag.
10657 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10658 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10659 echo 'CEOF
10660 sed -f conftest.frag conftest.in > conftest.out
10661 rm -f conftest.in
10662 mv conftest.out conftest.in
10663' >> $CONFIG_STATUS
10664 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10665 rm -f conftest.vals
10666 mv conftest.tail conftest.vals
10667done
10668rm -f conftest.vals
10669
10670cat >> $CONFIG_STATUS <<\EOF
10671 rm -f conftest.frag conftest.h
10672 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10673 cat conftest.in >> conftest.h
10674 rm -f conftest.in
10675 if cmp -s $ac_file conftest.h 2>/dev/null; then
10676 echo "$ac_file is unchanged"
10677 rm -f conftest.h
10678 else
10679 # Remove last slash and all that follows it. Not all systems have dirname.
10680 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10681 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10682 # The file is in a subdirectory.
10683 test ! -d "$ac_dir" && mkdir "$ac_dir"
10684 fi
10685 rm -f $ac_file
10686 mv conftest.h $ac_file
10687 fi
10688fi; done
10689
10690EOF
10691
10692cat >> $CONFIG_STATUS <<EOF
10693ac_sources="$files"
10694ac_dests="$links"
10695EOF
10696
10697cat >> $CONFIG_STATUS <<\EOF
10698srcdir=$ac_given_srcdir
10699while test -n "$ac_sources"; do
10700 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10701 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10702
10703 echo "linking $srcdir/$ac_source to $ac_dest"
10704
10705 if test ! -r $srcdir/$ac_source; then
10706 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10707 fi
10708 rm -f $ac_dest
10709
10710 # Make relative symlinks.
10711 # Remove last slash and all that follows it. Not all systems have dirname.
10712 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10713 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10714 # The dest file is in a subdirectory.
10715 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10716 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10717 # A "../" for each directory in $ac_dest_dir_suffix.
10718 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10719 else
10720 ac_dest_dir_suffix= ac_dots=
10721 fi
10722
10723 case "$srcdir" in
10724 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10725 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10726 esac
10727
10728 # Make a symlink if possible; otherwise try a hard link.
10729 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10730 ln $srcdir/$ac_source $ac_dest; then :
10731 else
10732 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10733 fi
10734done
10735EOF
10736cat >> $CONFIG_STATUS <<EOF
10737
10738gdb_host_cpu=$gdb_host_cpu
10739gdb_target_cpu=$gdb_target_cpu
10740nativefile=$nativefile
10741
10742EOF
10743cat >> $CONFIG_STATUS <<\EOF
10744
10745if test "${nativefile}" = ""; then
c4620205 10746 < Makefile \
e27da16d
JT
10747 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10748 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10749 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10750 > Makefile.tem
c906108c
SS
10751mv -f Makefile.tem Makefile
10752fi
10753
10754sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10755/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10756/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10757mv -f Makefile.tmp Makefile
10758
2acceee2 10759
c906108c
SS
10760case x$CONFIG_HEADERS in
10761xconfig.h:config.in)
10762echo > stamp-h ;;
10763esac
10764
10765exit 0
10766EOF
10767chmod +x $CONFIG_STATUS
10768rm -fr confdefs* $ac_clean_files
10769test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10770
10771if test "$no_recursion" != yes; then
10772
10773 # Remove --cache-file and --srcdir arguments so they do not pile up.
10774 ac_sub_configure_args=
10775 ac_prev=
10776 for ac_arg in $ac_configure_args; do
10777 if test -n "$ac_prev"; then
10778 ac_prev=
10779 continue
10780 fi
10781 case "$ac_arg" in
10782 -cache-file | --cache-file | --cache-fil | --cache-fi \
10783 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10784 ac_prev=cache_file ;;
10785 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10786 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10787 ;;
10788 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10789 ac_prev=srcdir ;;
10790 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10791 ;;
10792 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10793 esac
10794 done
10795
10796 for ac_config_dir in $configdirs; do
10797
10798 # Do not complain, so a configure script can configure whichever
10799 # parts of a large source tree are present.
10800 if test ! -d $srcdir/$ac_config_dir; then
10801 continue
10802 fi
10803
10804 echo configuring in $ac_config_dir
10805
10806 case "$srcdir" in
10807 .) ;;
10808 *)
10809 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10810 else
10811 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10812 fi
10813 ;;
10814 esac
10815
10816 ac_popdir=`pwd`
10817 cd $ac_config_dir
10818
10819 # A "../" for each directory in /$ac_config_dir.
10820 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10821
10822 case "$srcdir" in
10823 .) # No --srcdir option. We are building in place.
10824 ac_sub_srcdir=$srcdir ;;
10825 /*) # Absolute path.
10826 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10827 *) # Relative path.
10828 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10829 esac
10830
10831 # Check for guested configure; otherwise get Cygnus style configure.
10832 if test -f $ac_sub_srcdir/configure; then
10833 ac_sub_configure=$ac_sub_srcdir/configure
10834 elif test -f $ac_sub_srcdir/configure.in; then
10835 ac_sub_configure=$ac_configure
10836 else
10837 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10838 ac_sub_configure=
10839 fi
10840
10841 # The recursion is here.
10842 if test -n "$ac_sub_configure"; then
10843
10844 # Make the cache file name correct relative to the subdirectory.
10845 case "$cache_file" in
10846 /*) ac_sub_cache_file=$cache_file ;;
10847 *) # Relative path.
10848 ac_sub_cache_file="$ac_dots$cache_file" ;;
10849 esac
10850 case "$ac_given_INSTALL" in
10851 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10852 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10853 esac
10854
10855 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10856 # The eval makes quoting arguments work.
10857 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10858 then :
10859 else
10860 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10861 fi
10862 fi
10863
10864 cd $ac_popdir
10865 done
10866fi
10867
10868
10869exit 0
This page took 1.169222 seconds and 4 git commands to generate.