]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
2003-01-21 Andrew Cagney <ac131313@redhat.com>
[thirdparty/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
627af7ea
MK
21ac_help="$ac_help
22 --disable-gdbcli disable command-line interface (CLI)"
23ac_help="$ac_help
24 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
25ac_help="$ac_help
26 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726
MK
27ac_help="$ac_help
28 --enable-gtk enable gdbtk graphical user interface (GUI)"
06825bd1
MK
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)"
030292b7
DJ
33ac_help="$ac_help
34 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
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 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
43ac_help="$ac_help
44 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
45ac_help="$ac_help
46 --with-tclinclude=DIR Directory where tcl private headers are"
47ac_help="$ac_help
48 --with-tkinclude=DIR Directory where tk private headers are"
49ac_help="$ac_help
50 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
51ac_help="$ac_help
52 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
53ac_help="$ac_help
54 --with-x use the X Window System"
7a292a7a
SS
55ac_help="$ac_help
56 --enable-sim Link gdb with simulator"
8dcde887
MK
57ac_help="$ac_help
58 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
59ac_help="$ac_help
60 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
61
62# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
66cache_file=./config.cache
67exec_prefix=NONE
68host=NONE
69no_create=
70nonopt=NONE
71no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
76silent=
77site=
c41b7eb1 78sitefile=
c906108c
SS
79srcdir=
80target=NONE
81verbose=
82x_includes=NONE
83x_libraries=NONE
84bindir='${exec_prefix}/bin'
85sbindir='${exec_prefix}/sbin'
86libexecdir='${exec_prefix}/libexec'
87datadir='${prefix}/share'
88sysconfdir='${prefix}/etc'
89sharedstatedir='${prefix}/com'
90localstatedir='${prefix}/var'
91libdir='${exec_prefix}/lib'
92includedir='${prefix}/include'
93oldincludedir='/usr/include'
94infodir='${prefix}/info'
95mandir='${prefix}/man'
96
97# Initialize some other variables.
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101# Maximum number of lines to put in a shell here document.
102ac_max_here_lines=12
103
104ac_prev=
105for ac_option
106do
107
108 # If the previous option needs an argument, assign it.
109 if test -n "$ac_prev"; then
110 eval "$ac_prev=\$ac_option"
111 ac_prev=
112 continue
113 fi
114
115 case "$ac_option" in
116 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117 *) ac_optarg= ;;
118 esac
119
120 # Accept the important Cygnus configure options, so we can diagnose typos.
121
122 case "$ac_option" in
123
124 -bindir | --bindir | --bindi | --bind | --bin | --bi)
125 ac_prev=bindir ;;
126 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127 bindir="$ac_optarg" ;;
128
129 -build | --build | --buil | --bui | --bu)
130 ac_prev=build ;;
131 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132 build="$ac_optarg" ;;
133
134 -cache-file | --cache-file | --cache-fil | --cache-fi \
135 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136 ac_prev=cache_file ;;
137 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139 cache_file="$ac_optarg" ;;
140
141 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142 ac_prev=datadir ;;
143 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144 | --da=*)
145 datadir="$ac_optarg" ;;
146
147 -disable-* | --disable-*)
148 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149 # Reject names that are not valid shell variable names.
150 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 fi
153 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154 eval "enable_${ac_feature}=no" ;;
155
156 -enable-* | --enable-*)
157 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158 # Reject names that are not valid shell variable names.
159 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 fi
162 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163 case "$ac_option" in
164 *=*) ;;
165 *) ac_optarg=yes ;;
166 esac
167 eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171 | --exec | --exe | --ex)
172 ac_prev=exec_prefix ;;
173 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175 | --exec=* | --exe=* | --ex=*)
176 exec_prefix="$ac_optarg" ;;
177
178 -gas | --gas | --ga | --g)
179 # Obsolete; use --with-gas.
180 with_gas=yes ;;
181
182 -help | --help | --hel | --he)
183 # Omit some internal or obsolete options to make the list less imposing.
184 # This message is too long to be a string in the A/UX 3.1 sh.
185 cat << EOF
186Usage: configure [options] [host]
187Options: [defaults in brackets after descriptions]
188Configuration:
189 --cache-file=FILE cache test results in FILE
190 --help print this message
191 --no-create do not create output files
192 --quiet, --silent do not print \`checking...' messages
c41b7eb1 193 --site-file=FILE use FILE as the site file
c906108c
SS
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
199 [same as prefix]
200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
232EOF
233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
281 -nfp | --nfp | --nf)
282 # Obsolete; use --without-fp.
283 with_fp=no ;;
284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
292
293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
c41b7eb1
JB
364 -site-file | --site-file | --site-fil | --site-fi | --site-f)
365 ac_prev=sitefile ;;
366 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
367 sitefile="$ac_optarg" ;;
368
c906108c
SS
369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370 ac_prev=srcdir ;;
371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372 srcdir="$ac_optarg" ;;
373
374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375 | --syscon | --sysco | --sysc | --sys | --sy)
376 ac_prev=sysconfdir ;;
377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379 sysconfdir="$ac_optarg" ;;
380
381 -target | --target | --targe | --targ | --tar | --ta | --t)
382 ac_prev=target ;;
383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384 target="$ac_optarg" ;;
385
386 -v | -verbose | --verbose | --verbos | --verbo | --verb)
387 verbose=yes ;;
388
389 -version | --version | --versio | --versi | --vers)
390 echo "configure generated by autoconf version 2.13"
391 exit 0 ;;
392
393 -with-* | --with-*)
394 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395 # Reject names that are not valid shell variable names.
396 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398 fi
399 ac_package=`echo $ac_package| sed 's/-/_/g'`
400 case "$ac_option" in
401 *=*) ;;
402 *) ac_optarg=yes ;;
403 esac
404 eval "with_${ac_package}='$ac_optarg'" ;;
405
406 -without-* | --without-*)
407 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411 fi
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 eval "with_${ac_package}=no" ;;
414
415 --x)
416 # Obsolete; use --with-x.
417 with_x=yes ;;
418
419 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420 | --x-incl | --x-inc | --x-in | --x-i)
421 ac_prev=x_includes ;;
422 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424 x_includes="$ac_optarg" ;;
425
426 -x-libraries | --x-libraries | --x-librarie | --x-librari \
427 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428 ac_prev=x_libraries ;;
429 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431 x_libraries="$ac_optarg" ;;
432
433 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
434 ;;
435
436 *)
437 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438 echo "configure: warning: $ac_option: invalid host type" 1>&2
439 fi
440 if test "x$nonopt" != xNONE; then
441 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442 fi
443 nonopt="$ac_option"
444 ;;
445
446 esac
447done
448
449if test -n "$ac_prev"; then
450 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
451fi
452
453trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455# File descriptor usage:
456# 0 standard input
457# 1 file creation
458# 2 errors and warnings
459# 3 some systems may open it to /dev/tty
460# 4 used on the Kubota Titan
461# 6 checking for... messages and results
462# 5 compiler messages saved in config.log
463if test "$silent" = yes; then
464 exec 6>/dev/null
465else
466 exec 6>&1
467fi
468exec 5>./config.log
469
470echo "\
471This file contains any messages produced by compilers while
472running configure, to aid debugging if configure makes a mistake.
473" 1>&5
474
475# Strip out --no-create and --no-recursion so they do not pile up.
476# Also quote any args containing shell metacharacters.
477ac_configure_args=
478for ac_arg
479do
480 case "$ac_arg" in
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482 | --no-cr | --no-c) ;;
483 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488 esac
489done
490
491# NLS nuisances.
492# Only set these to C if already set. These must not be set unconditionally
493# because not all systems understand e.g. LANG=C (notably SCO).
494# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495# Non-C LC_CTYPE values break the ctype check.
496if test "${LANG+set}" = set; then LANG=C; export LANG; fi
497if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
500
501# confdefs.h avoids OS command line length limits that DEFS can exceed.
502rm -rf conftest* confdefs.h
503# AIX cpp loses on an empty file, so make sure it contains at least a newline.
504echo > confdefs.h
505
506# A filename unique to this package, relative to the directory that
507# configure is in, which we can look for to find out if srcdir is correct.
508ac_unique_file=main.c
509
510# Find the source files, if location was not specified.
511if test -z "$srcdir"; then
512 ac_srcdir_defaulted=yes
513 # Try the directory containing this script, then its parent.
514 ac_prog=$0
515 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517 srcdir=$ac_confdir
518 if test ! -r $srcdir/$ac_unique_file; then
519 srcdir=..
520 fi
521else
522 ac_srcdir_defaulted=no
523fi
524if test ! -r $srcdir/$ac_unique_file; then
525 if test "$ac_srcdir_defaulted" = yes; then
526 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527 else
528 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
529 fi
530fi
531srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532
533# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
534if test -z "$sitefile"; then
535 if test -z "$CONFIG_SITE"; then
536 if test "x$prefix" != xNONE; then
537 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
538 else
539 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
540 fi
c906108c 541 fi
c41b7eb1
JB
542else
543 CONFIG_SITE="$sitefile"
c906108c
SS
544fi
545for ac_site_file in $CONFIG_SITE; do
546 if test -r "$ac_site_file"; then
547 echo "loading site script $ac_site_file"
548 . "$ac_site_file"
549 fi
550done
551
552if test -r "$cache_file"; then
553 echo "loading cache $cache_file"
554 . $cache_file
555else
556 echo "creating cache $cache_file"
557 > $cache_file
558fi
559
560ac_ext=c
561# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
562ac_cpp='$CPP $CPPFLAGS'
563ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
564ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
565cross_compiling=$ac_cv_prog_cc_cross
566
567ac_exeext=
568ac_objext=o
569if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
570 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
571 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
572 ac_n= ac_c='
573' ac_t=' '
574 else
575 ac_n=-n ac_c= ac_t=
576 fi
577else
578 ac_n= ac_c='\c' ac_t=
579fi
580
581
582
413ccac7 583echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
030292b7 584echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
585 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
586if test "${enable_maintainer_mode+set}" = set; then
587 enableval="$enable_maintainer_mode"
588 USE_MAINTAINER_MODE=$enableval
589else
590 USE_MAINTAINER_MODE=no
591fi
592
593 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
594
595
596if test $USE_MAINTAINER_MODE = yes; then
597 MAINTAINER_MODE_TRUE=
598 MAINTAINER_MODE_FALSE='#'
599else
600 MAINTAINER_MODE_TRUE='#'
601 MAINTAINER_MODE_FALSE=
602fi
603 MAINT=$MAINTAINER_MODE_TRUE
604
605
c906108c
SS
606
607# Extract the first word of "gcc", so it can be a program name with args.
608set dummy gcc; ac_word=$2
609echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 610echo "configure:611: checking for $ac_word" >&5
c906108c
SS
611if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613else
614 if test -n "$CC"; then
615 ac_cv_prog_CC="$CC" # Let the user override the test.
616else
617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
618 ac_dummy="$PATH"
619 for ac_dir in $ac_dummy; do
620 test -z "$ac_dir" && ac_dir=.
621 if test -f $ac_dir/$ac_word; then
622 ac_cv_prog_CC="gcc"
623 break
624 fi
625 done
626 IFS="$ac_save_ifs"
627fi
628fi
629CC="$ac_cv_prog_CC"
630if test -n "$CC"; then
631 echo "$ac_t""$CC" 1>&6
632else
633 echo "$ac_t""no" 1>&6
634fi
635
636if test -z "$CC"; then
637 # Extract the first word of "cc", so it can be a program name with args.
638set dummy cc; ac_word=$2
639echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 640echo "configure:641: checking for $ac_word" >&5
c906108c
SS
641if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642 echo $ac_n "(cached) $ac_c" 1>&6
643else
644 if test -n "$CC"; then
645 ac_cv_prog_CC="$CC" # Let the user override the test.
646else
647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
648 ac_prog_rejected=no
649 ac_dummy="$PATH"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
653 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
654 ac_prog_rejected=yes
655 continue
656 fi
657 ac_cv_prog_CC="cc"
658 break
659 fi
660 done
661 IFS="$ac_save_ifs"
662if test $ac_prog_rejected = yes; then
663 # We found a bogon in the path, so make sure we never use it.
664 set dummy $ac_cv_prog_CC
665 shift
666 if test $# -gt 0; then
667 # We chose a different compiler from the bogus one.
668 # However, it has the same basename, so the bogon will be chosen
669 # first if we set CC to just the basename; use the full file name.
670 shift
671 set dummy "$ac_dir/$ac_word" "$@"
672 shift
673 ac_cv_prog_CC="$@"
674 fi
675fi
676fi
677fi
678CC="$ac_cv_prog_CC"
679if test -n "$CC"; then
680 echo "$ac_t""$CC" 1>&6
681else
682 echo "$ac_t""no" 1>&6
683fi
684
685 if test -z "$CC"; then
686 case "`uname -s`" in
687 *win32* | *WIN32*)
688 # Extract the first word of "cl", so it can be a program name with args.
689set dummy cl; ac_word=$2
690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 691echo "configure:692: checking for $ac_word" >&5
c906108c
SS
692if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697else
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
699 ac_dummy="$PATH"
700 for ac_dir in $ac_dummy; do
701 test -z "$ac_dir" && ac_dir=.
702 if test -f $ac_dir/$ac_word; then
703 ac_cv_prog_CC="cl"
704 break
705 fi
706 done
707 IFS="$ac_save_ifs"
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713else
714 echo "$ac_t""no" 1>&6
715fi
716 ;;
717 esac
718 fi
719 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
720fi
721
722echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
030292b7 723echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
724
725ac_ext=c
726# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
727ac_cpp='$CPP $CPPFLAGS'
728ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
729ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
730cross_compiling=$ac_cv_prog_cc_cross
731
732cat > conftest.$ac_ext << EOF
733
030292b7 734#line 735 "configure"
c906108c
SS
735#include "confdefs.h"
736
737main(){return(0);}
738EOF
030292b7 739if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
740 ac_cv_prog_cc_works=yes
741 # If we can't run a trivial program, we are probably using a cross compiler.
742 if (./conftest; exit) 2>/dev/null; then
743 ac_cv_prog_cc_cross=no
744 else
745 ac_cv_prog_cc_cross=yes
746 fi
747else
748 echo "configure: failed program was:" >&5
749 cat conftest.$ac_ext >&5
750 ac_cv_prog_cc_works=no
751fi
752rm -fr conftest*
753ac_ext=c
754# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
755ac_cpp='$CPP $CPPFLAGS'
756ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
757ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
758cross_compiling=$ac_cv_prog_cc_cross
759
760echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
761if test $ac_cv_prog_cc_works = no; then
762 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
763fi
764echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
030292b7 765echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
766echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
767cross_compiling=$ac_cv_prog_cc_cross
768
769echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
030292b7 770echo "configure:771: checking whether we are using GNU C" >&5
c906108c
SS
771if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 cat > conftest.c <<EOF
775#ifdef __GNUC__
776 yes;
777#endif
778EOF
030292b7 779if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
780 ac_cv_prog_gcc=yes
781else
782 ac_cv_prog_gcc=no
783fi
784fi
785
786echo "$ac_t""$ac_cv_prog_gcc" 1>&6
787
788if test $ac_cv_prog_gcc = yes; then
789 GCC=yes
790else
791 GCC=
792fi
793
794ac_test_CFLAGS="${CFLAGS+set}"
795ac_save_CFLAGS="$CFLAGS"
796CFLAGS=
797echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
030292b7 798echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
799if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801else
802 echo 'void f(){}' > conftest.c
803if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
804 ac_cv_prog_cc_g=yes
805else
806 ac_cv_prog_cc_g=no
807fi
808rm -f conftest*
809
810fi
811
812echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
813if test "$ac_test_CFLAGS" = set; then
814 CFLAGS="$ac_save_CFLAGS"
815elif test $ac_cv_prog_cc_g = yes; then
816 if test "$GCC" = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-g"
820 fi
821else
822 if test "$GCC" = yes; then
823 CFLAGS="-O2"
824 else
825 CFLAGS=
826 fi
827fi
828
14abd0fb
MK
829cat >> confdefs.h <<\EOF
830#define _GNU_SOURCE 1
831EOF
832
833
c906108c 834echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
030292b7 835echo "configure:836: checking how to run the C preprocessor" >&5
c906108c
SS
836# On Suns, sometimes $CPP names a directory.
837if test -n "$CPP" && test -d "$CPP"; then
838 CPP=
839fi
840if test -z "$CPP"; then
841if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
843else
844 # This must be in double quotes, not single quotes, because CPP may get
845 # substituted into the Makefile and "${CC-cc}" will confuse make.
846 CPP="${CC-cc} -E"
847 # On the NeXT, cc -E runs the code through the compiler's parser,
848 # not just through cpp.
849 cat > conftest.$ac_ext <<EOF
030292b7 850#line 851 "configure"
c906108c
SS
851#include "confdefs.h"
852#include <assert.h>
853Syntax Error
854EOF
855ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 856{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
857ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
858if test -z "$ac_err"; then
859 :
860else
861 echo "$ac_err" >&5
862 echo "configure: failed program was:" >&5
863 cat conftest.$ac_ext >&5
864 rm -rf conftest*
865 CPP="${CC-cc} -E -traditional-cpp"
866 cat > conftest.$ac_ext <<EOF
030292b7 867#line 868 "configure"
c906108c
SS
868#include "confdefs.h"
869#include <assert.h>
870Syntax Error
871EOF
872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 873{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
874ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
875if test -z "$ac_err"; then
876 :
877else
878 echo "$ac_err" >&5
879 echo "configure: failed program was:" >&5
880 cat conftest.$ac_ext >&5
881 rm -rf conftest*
882 CPP="${CC-cc} -nologo -E"
883 cat > conftest.$ac_ext <<EOF
030292b7 884#line 885 "configure"
c906108c
SS
885#include "confdefs.h"
886#include <assert.h>
887Syntax Error
888EOF
889ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 890{ (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
891ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
892if test -z "$ac_err"; then
893 :
894else
895 echo "$ac_err" >&5
896 echo "configure: failed program was:" >&5
897 cat conftest.$ac_ext >&5
898 rm -rf conftest*
899 CPP=/lib/cpp
900fi
901rm -f conftest*
902fi
903rm -f conftest*
904fi
905rm -f conftest*
906 ac_cv_prog_CPP="$CPP"
907fi
908 CPP="$ac_cv_prog_CPP"
909else
910 ac_cv_prog_CPP="$CPP"
911fi
912echo "$ac_t""$CPP" 1>&6
913
914echo $ac_n "checking for AIX""... $ac_c" 1>&6
030292b7 915echo "configure:916: checking for AIX" >&5
c906108c 916cat > conftest.$ac_ext <<EOF
030292b7 917#line 918 "configure"
c906108c
SS
918#include "confdefs.h"
919#ifdef _AIX
920 yes
921#endif
922
923EOF
924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
925 egrep "yes" >/dev/null 2>&1; then
926 rm -rf conftest*
927 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
928#define _ALL_SOURCE 1
929EOF
930
931else
932 rm -rf conftest*
933 echo "$ac_t""no" 1>&6
934fi
935rm -f conftest*
936
937
56157b4a 938echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
030292b7 939echo "configure:940: checking for POSIXized ISC" >&5
56157b4a
AC
940if test -d /etc/conf/kconfig.d &&
941 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
942then
943 echo "$ac_t""yes" 1>&6
944 ISC=yes # If later tests want to check for ISC.
945 cat >> confdefs.h <<\EOF
946#define _POSIX_SOURCE 1
c906108c
SS
947EOF
948
56157b4a
AC
949 if test "$GCC" = yes; then
950 CC="$CC -posix"
951 else
952 CC="$CC -Xp"
953 fi
c906108c
SS
954else
955 echo "$ac_t""no" 1>&6
56157b4a 956 ISC=
c906108c
SS
957fi
958
959
960
961
962echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
030292b7 963echo "configure:964: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
964if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
965 echo $ac_n "(cached) $ac_c" 1>&6
966else
967 am_cv_prog_cc_stdc=no
968ac_save_CC="$CC"
969# Don't try gcc -ansi; that turns off useful extensions and
970# breaks some systems' header files.
971# AIX -qlanglvl=ansi
972# Ultrix and OSF/1 -std1
56157b4a
AC
973# HP-UX 10.20 and later -Ae
974# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 975# SVR4 -Xc -D__EXTENSIONS__
56157b4a 976for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
977do
978 CC="$ac_save_CC $ac_arg"
979 cat > conftest.$ac_ext <<EOF
030292b7 980#line 981 "configure"
c906108c
SS
981#include "confdefs.h"
982#include <stdarg.h>
983#include <stdio.h>
984#include <sys/types.h>
985#include <sys/stat.h>
986/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
987struct buf { int x; };
988FILE * (*rcsopen) (struct buf *, struct stat *, int);
989static char *e (p, i)
990 char **p;
991 int i;
992{
993 return p[i];
994}
995static char *f (char * (*g) (char **, int), char **p, ...)
996{
997 char *s;
998 va_list v;
999 va_start (v,p);
1000 s = g (p, va_arg (v,int));
1001 va_end (v);
1002 return s;
1003}
1004int test (int i, double x);
1005struct s1 {int (*f) (int a);};
1006struct s2 {int (*f) (double a);};
1007int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1008int argc;
1009char **argv;
1010
1011int main() {
1012
1013return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1014
1015; return 0; }
1016EOF
030292b7 1017if { (eval echo configure:1018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1018 rm -rf conftest*
1019 am_cv_prog_cc_stdc="$ac_arg"; break
1020else
1021 echo "configure: failed program was:" >&5
1022 cat conftest.$ac_ext >&5
1023fi
1024rm -f conftest*
1025done
1026CC="$ac_save_CC"
1027
1028fi
1029
1030if test -z "$am_cv_prog_cc_stdc"; then
1031 echo "$ac_t""none needed" 1>&6
1032else
1033 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1034fi
1035case "x$am_cv_prog_cc_stdc" in
1036 x|xno) ;;
1037 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1038esac
1039
1040
1041ac_aux_dir=
1042for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1043 if test -f $ac_dir/install-sh; then
1044 ac_aux_dir=$ac_dir
1045 ac_install_sh="$ac_aux_dir/install-sh -c"
1046 break
1047 elif test -f $ac_dir/install.sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install.sh -c"
1050 break
1051 fi
1052done
1053if test -z "$ac_aux_dir"; then
1054 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1055fi
1056ac_config_guess=$ac_aux_dir/config.guess
1057ac_config_sub=$ac_aux_dir/config.sub
1058ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1059
1060
1061# Do some error checking and defaulting for the host and target type.
1062# The inputs are:
1063# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1064#
1065# The rules are:
1066# 1. You are not allowed to specify --host, --target, and nonopt at the
1067# same time.
1068# 2. Host defaults to nonopt.
1069# 3. If nonopt is not specified, then host defaults to the current host,
1070# as determined by config.guess.
1071# 4. Target and build default to nonopt.
1072# 5. If nonopt is not specified, then target and build default to host.
1073
1074# The aliases save the names the user supplied, while $host etc.
1075# will get canonicalized.
1076case $host---$target---$nonopt in
1077NONE---*---* | *---NONE---* | *---*---NONE) ;;
1078*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1079esac
1080
1081
1082# Make sure we can run config.sub.
1083if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1084else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1085fi
1086
1087echo $ac_n "checking host system type""... $ac_c" 1>&6
030292b7 1088echo "configure:1089: checking host system type" >&5
c906108c
SS
1089
1090host_alias=$host
1091case "$host_alias" in
1092NONE)
1093 case $nonopt in
1094 NONE)
1095 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1096 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1097 fi ;;
1098 *) host_alias=$nonopt ;;
1099 esac ;;
1100esac
1101
1102host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1103host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1104host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1105host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1106echo "$ac_t""$host" 1>&6
1107
1108echo $ac_n "checking target system type""... $ac_c" 1>&6
030292b7 1109echo "configure:1110: checking target system type" >&5
c906108c
SS
1110
1111target_alias=$target
1112case "$target_alias" in
1113NONE)
1114 case $nonopt in
1115 NONE) target_alias=$host_alias ;;
1116 *) target_alias=$nonopt ;;
1117 esac ;;
1118esac
1119
1120target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1121target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1122target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1123target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1124echo "$ac_t""$target" 1>&6
1125
1126echo $ac_n "checking build system type""... $ac_c" 1>&6
030292b7 1127echo "configure:1128: checking build system type" >&5
c906108c
SS
1128
1129build_alias=$build
1130case "$build_alias" in
1131NONE)
1132 case $nonopt in
1133 NONE) build_alias=$host_alias ;;
1134 *) build_alias=$nonopt ;;
1135 esac ;;
1136esac
1137
1138build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1139build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1140build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1141build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1142echo "$ac_t""$build" 1>&6
1143
1144test "$host_alias" != "$target_alias" &&
1145 test "$program_prefix$program_suffix$program_transform_name" = \
1146 NONENONEs,x,x, &&
1147 program_prefix=${target_alias}-
1148
1149
8bb2c122
MK
1150# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1151# doesn't support cross-compilation, but the one from Autoconf 2.5x
1152# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1153# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1154# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1155# 2.5x.
1156if test $host != $build; then
1157 ac_tool_prefix=${host_alias}-
1158else
1159 ac_tool_prefix=
1160fi
1161
1162# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1163set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1164echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 1165echo "configure:1166: checking for $ac_word" >&5
8bb2c122
MK
1166if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1167 echo $ac_n "(cached) $ac_c" 1>&6
1168else
1169 if test -n "$RANLIB"; then
1170 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1171else
1172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1173 ac_dummy="$PATH"
1174 for ac_dir in $ac_dummy; do
1175 test -z "$ac_dir" && ac_dir=.
1176 if test -f $ac_dir/$ac_word; then
1177 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1178 break
1179 fi
1180 done
1181 IFS="$ac_save_ifs"
1182fi
1183fi
1184RANLIB="$ac_cv_prog_RANLIB"
1185if test -n "$RANLIB"; then
1186 echo "$ac_t""$RANLIB" 1>&6
1187else
1188 echo "$ac_t""no" 1>&6
1189fi
1190
1191
1192if test -z "$ac_cv_prog_RANLIB"; then
1193if test -n "$ac_tool_prefix"; then
1194 # Extract the first word of "ranlib", so it can be a program name with args.
1195set dummy ranlib; ac_word=$2
1196echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 1197echo "configure:1198: checking for $ac_word" >&5
8bb2c122
MK
1198if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1199 echo $ac_n "(cached) $ac_c" 1>&6
1200else
1201 if test -n "$RANLIB"; then
1202 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1203else
1204 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1205 ac_dummy="$PATH"
1206 for ac_dir in $ac_dummy; do
1207 test -z "$ac_dir" && ac_dir=.
1208 if test -f $ac_dir/$ac_word; then
1209 ac_cv_prog_RANLIB="ranlib"
1210 break
1211 fi
1212 done
1213 IFS="$ac_save_ifs"
1214 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1215fi
1216fi
1217RANLIB="$ac_cv_prog_RANLIB"
1218if test -n "$RANLIB"; then
1219 echo "$ac_t""$RANLIB" 1>&6
1220else
1221 echo "$ac_t""no" 1>&6
1222fi
1223
1224else
1225 RANLIB=":"
1226fi
1227fi
1228
1229
c906108c
SS
1230ALL_LINGUAS=
1231echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
030292b7 1232echo "configure:1233: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1233set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1234if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1235 echo $ac_n "(cached) $ac_c" 1>&6
1236else
1237 cat > conftestmake <<\EOF
1238all:
1239 @echo 'ac_maketemp="${MAKE}"'
1240EOF
1241# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1242eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1243if test -n "$ac_maketemp"; then
1244 eval ac_cv_prog_make_${ac_make}_set=yes
1245else
1246 eval ac_cv_prog_make_${ac_make}_set=no
1247fi
1248rm -f conftestmake
1249fi
1250if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1251 echo "$ac_t""yes" 1>&6
1252 SET_MAKE=
1253else
1254 echo "$ac_t""no" 1>&6
1255 SET_MAKE="MAKE=${MAKE-make}"
1256fi
1257
1258# Extract the first word of "ranlib", so it can be a program name with args.
1259set dummy ranlib; ac_word=$2
1260echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 1261echo "configure:1262: checking for $ac_word" >&5
c906108c
SS
1262if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264else
1265 if test -n "$RANLIB"; then
1266 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1267else
1268 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1269 ac_dummy="$PATH"
1270 for ac_dir in $ac_dummy; do
1271 test -z "$ac_dir" && ac_dir=.
1272 if test -f $ac_dir/$ac_word; then
1273 ac_cv_prog_RANLIB="ranlib"
1274 break
1275 fi
1276 done
1277 IFS="$ac_save_ifs"
1278 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1279fi
1280fi
1281RANLIB="$ac_cv_prog_RANLIB"
1282if test -n "$RANLIB"; then
1283 echo "$ac_t""$RANLIB" 1>&6
1284else
1285 echo "$ac_t""no" 1>&6
1286fi
1287
1288echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
030292b7 1289echo "configure:1290: checking for ANSI C header files" >&5
c906108c
SS
1290if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1291 echo $ac_n "(cached) $ac_c" 1>&6
1292else
1293 cat > conftest.$ac_ext <<EOF
030292b7 1294#line 1295 "configure"
c906108c
SS
1295#include "confdefs.h"
1296#include <stdlib.h>
1297#include <stdarg.h>
1298#include <string.h>
1299#include <float.h>
1300EOF
1301ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 1302{ (eval echo configure:1303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1303ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1304if test -z "$ac_err"; then
1305 rm -rf conftest*
1306 ac_cv_header_stdc=yes
1307else
1308 echo "$ac_err" >&5
1309 echo "configure: failed program was:" >&5
1310 cat conftest.$ac_ext >&5
1311 rm -rf conftest*
1312 ac_cv_header_stdc=no
1313fi
1314rm -f conftest*
1315
1316if test $ac_cv_header_stdc = yes; then
1317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1318cat > conftest.$ac_ext <<EOF
030292b7 1319#line 1320 "configure"
c906108c
SS
1320#include "confdefs.h"
1321#include <string.h>
1322EOF
1323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1324 egrep "memchr" >/dev/null 2>&1; then
1325 :
1326else
1327 rm -rf conftest*
1328 ac_cv_header_stdc=no
1329fi
1330rm -f conftest*
1331
1332fi
1333
1334if test $ac_cv_header_stdc = yes; then
1335 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1336cat > conftest.$ac_ext <<EOF
030292b7 1337#line 1338 "configure"
c906108c
SS
1338#include "confdefs.h"
1339#include <stdlib.h>
1340EOF
1341if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1342 egrep "free" >/dev/null 2>&1; then
1343 :
1344else
1345 rm -rf conftest*
1346 ac_cv_header_stdc=no
1347fi
1348rm -f conftest*
1349
1350fi
1351
1352if test $ac_cv_header_stdc = yes; then
1353 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1354if test "$cross_compiling" = yes; then
1355 :
1356else
1357 cat > conftest.$ac_ext <<EOF
030292b7 1358#line 1359 "configure"
c906108c
SS
1359#include "confdefs.h"
1360#include <ctype.h>
1361#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1362#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1363#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1364int main () { int i; for (i = 0; i < 256; i++)
1365if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1366exit (0); }
1367
1368EOF
030292b7 1369if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1370then
1371 :
1372else
1373 echo "configure: failed program was:" >&5
1374 cat conftest.$ac_ext >&5
1375 rm -fr conftest*
1376 ac_cv_header_stdc=no
1377fi
1378rm -fr conftest*
1379fi
1380
1381fi
1382fi
1383
1384echo "$ac_t""$ac_cv_header_stdc" 1>&6
1385if test $ac_cv_header_stdc = yes; then
1386 cat >> confdefs.h <<\EOF
1387#define STDC_HEADERS 1
1388EOF
1389
1390fi
1391
1392echo $ac_n "checking for working const""... $ac_c" 1>&6
030292b7 1393echo "configure:1394: checking for working const" >&5
c906108c
SS
1394if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1395 echo $ac_n "(cached) $ac_c" 1>&6
1396else
1397 cat > conftest.$ac_ext <<EOF
030292b7 1398#line 1399 "configure"
c906108c
SS
1399#include "confdefs.h"
1400
1401int main() {
1402
1403/* Ultrix mips cc rejects this. */
1404typedef int charset[2]; const charset x;
1405/* SunOS 4.1.1 cc rejects this. */
1406char const *const *ccp;
1407char **p;
1408/* NEC SVR4.0.2 mips cc rejects this. */
1409struct point {int x, y;};
1410static struct point const zero = {0,0};
1411/* AIX XL C 1.02.0.0 rejects this.
1412 It does not let you subtract one const X* pointer from another in an arm
1413 of an if-expression whose if-part is not a constant expression */
1414const char *g = "string";
1415ccp = &g + (g ? g-g : 0);
1416/* HPUX 7.0 cc rejects these. */
1417++ccp;
1418p = (char**) ccp;
1419ccp = (char const *const *) p;
1420{ /* SCO 3.2v4 cc rejects this. */
1421 char *t;
1422 char const *s = 0 ? (char *) 0 : (char const *) 0;
1423
1424 *t++ = 0;
1425}
1426{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1427 int x[] = {25, 17};
1428 const int *foo = &x[0];
1429 ++foo;
1430}
1431{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1432 typedef const int *iptr;
1433 iptr p = 0;
1434 ++p;
1435}
1436{ /* AIX XL C 1.02.0.0 rejects this saying
1437 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1438 struct s { int j; const int *ap[3]; };
1439 struct s *b; b->j = 5;
1440}
1441{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1442 const int foo = 10;
1443}
1444
1445; return 0; }
1446EOF
030292b7 1447if { (eval echo configure:1448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1448 rm -rf conftest*
1449 ac_cv_c_const=yes
1450else
1451 echo "configure: failed program was:" >&5
1452 cat conftest.$ac_ext >&5
1453 rm -rf conftest*
1454 ac_cv_c_const=no
1455fi
1456rm -f conftest*
1457fi
1458
1459echo "$ac_t""$ac_cv_c_const" 1>&6
1460if test $ac_cv_c_const = no; then
1461 cat >> confdefs.h <<\EOF
1462#define const
1463EOF
1464
1465fi
1466
1467echo $ac_n "checking for inline""... $ac_c" 1>&6
030292b7 1468echo "configure:1469: checking for inline" >&5
c906108c
SS
1469if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1471else
1472 ac_cv_c_inline=no
1473for ac_kw in inline __inline__ __inline; do
1474 cat > conftest.$ac_ext <<EOF
030292b7 1475#line 1476 "configure"
c906108c
SS
1476#include "confdefs.h"
1477
1478int main() {
1479} $ac_kw foo() {
1480; return 0; }
1481EOF
030292b7 1482if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1483 rm -rf conftest*
1484 ac_cv_c_inline=$ac_kw; break
1485else
1486 echo "configure: failed program was:" >&5
1487 cat conftest.$ac_ext >&5
1488fi
1489rm -f conftest*
1490done
1491
1492fi
1493
1494echo "$ac_t""$ac_cv_c_inline" 1>&6
1495case "$ac_cv_c_inline" in
1496 inline | yes) ;;
1497 no) cat >> confdefs.h <<\EOF
1498#define inline
1499EOF
1500 ;;
1501 *) cat >> confdefs.h <<EOF
1502#define inline $ac_cv_c_inline
1503EOF
1504 ;;
1505esac
1506
1507echo $ac_n "checking for off_t""... $ac_c" 1>&6
030292b7 1508echo "configure:1509: checking for off_t" >&5
c906108c
SS
1509if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1510 echo $ac_n "(cached) $ac_c" 1>&6
1511else
1512 cat > conftest.$ac_ext <<EOF
030292b7 1513#line 1514 "configure"
c906108c
SS
1514#include "confdefs.h"
1515#include <sys/types.h>
1516#if STDC_HEADERS
1517#include <stdlib.h>
1518#include <stddef.h>
1519#endif
1520EOF
1521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1522 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1523 rm -rf conftest*
1524 ac_cv_type_off_t=yes
1525else
1526 rm -rf conftest*
1527 ac_cv_type_off_t=no
1528fi
1529rm -f conftest*
1530
1531fi
1532echo "$ac_t""$ac_cv_type_off_t" 1>&6
1533if test $ac_cv_type_off_t = no; then
1534 cat >> confdefs.h <<\EOF
1535#define off_t long
1536EOF
1537
1538fi
1539
1540echo $ac_n "checking for size_t""... $ac_c" 1>&6
030292b7 1541echo "configure:1542: checking for size_t" >&5
c906108c
SS
1542if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1543 echo $ac_n "(cached) $ac_c" 1>&6
1544else
1545 cat > conftest.$ac_ext <<EOF
030292b7 1546#line 1547 "configure"
c906108c
SS
1547#include "confdefs.h"
1548#include <sys/types.h>
1549#if STDC_HEADERS
1550#include <stdlib.h>
1551#include <stddef.h>
1552#endif
1553EOF
1554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1555 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1556 rm -rf conftest*
1557 ac_cv_type_size_t=yes
1558else
1559 rm -rf conftest*
1560 ac_cv_type_size_t=no
1561fi
1562rm -f conftest*
1563
1564fi
1565echo "$ac_t""$ac_cv_type_size_t" 1>&6
1566if test $ac_cv_type_size_t = no; then
1567 cat >> confdefs.h <<\EOF
1568#define size_t unsigned
1569EOF
1570
1571fi
1572
1573# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1574# for constant arguments. Useless!
1575echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
030292b7 1576echo "configure:1577: checking for working alloca.h" >&5
c906108c
SS
1577if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1578 echo $ac_n "(cached) $ac_c" 1>&6
1579else
1580 cat > conftest.$ac_ext <<EOF
030292b7 1581#line 1582 "configure"
c906108c
SS
1582#include "confdefs.h"
1583#include <alloca.h>
1584int main() {
1585char *p = alloca(2 * sizeof(int));
1586; return 0; }
1587EOF
030292b7 1588if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1589 rm -rf conftest*
1590 ac_cv_header_alloca_h=yes
1591else
1592 echo "configure: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1594 rm -rf conftest*
1595 ac_cv_header_alloca_h=no
1596fi
1597rm -f conftest*
1598fi
1599
1600echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1601if test $ac_cv_header_alloca_h = yes; then
1602 cat >> confdefs.h <<\EOF
1603#define HAVE_ALLOCA_H 1
1604EOF
1605
1606fi
1607
1608echo $ac_n "checking for alloca""... $ac_c" 1>&6
030292b7 1609echo "configure:1610: checking for alloca" >&5
c906108c
SS
1610if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1611 echo $ac_n "(cached) $ac_c" 1>&6
1612else
1613 cat > conftest.$ac_ext <<EOF
030292b7 1614#line 1615 "configure"
c906108c
SS
1615#include "confdefs.h"
1616
1617#ifdef __GNUC__
1618# define alloca __builtin_alloca
1619#else
1620# ifdef _MSC_VER
1621# include <malloc.h>
1622# define alloca _alloca
1623# else
1624# if HAVE_ALLOCA_H
1625# include <alloca.h>
1626# else
1627# ifdef _AIX
1628 #pragma alloca
1629# else
1630# ifndef alloca /* predefined by HP cc +Olibcalls */
1631char *alloca ();
1632# endif
1633# endif
1634# endif
1635# endif
1636#endif
1637
1638int main() {
1639char *p = (char *) alloca(1);
1640; return 0; }
1641EOF
030292b7 1642if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1643 rm -rf conftest*
1644 ac_cv_func_alloca_works=yes
1645else
1646 echo "configure: failed program was:" >&5
1647 cat conftest.$ac_ext >&5
1648 rm -rf conftest*
1649 ac_cv_func_alloca_works=no
1650fi
1651rm -f conftest*
1652fi
1653
1654echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1655if test $ac_cv_func_alloca_works = yes; then
1656 cat >> confdefs.h <<\EOF
1657#define HAVE_ALLOCA 1
1658EOF
1659
1660fi
1661
1662if test $ac_cv_func_alloca_works = no; then
1663 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1664 # that cause trouble. Some versions do not even contain alloca or
1665 # contain a buggy version. If you still want to use their alloca,
1666 # use ar to extract alloca.o from them instead of compiling alloca.c.
1667 ALLOCA=alloca.${ac_objext}
1668 cat >> confdefs.h <<\EOF
1669#define C_ALLOCA 1
1670EOF
1671
1672
1673echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
030292b7 1674echo "configure:1675: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1675if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1676 echo $ac_n "(cached) $ac_c" 1>&6
1677else
1678 cat > conftest.$ac_ext <<EOF
030292b7 1679#line 1680 "configure"
c906108c
SS
1680#include "confdefs.h"
1681#if defined(CRAY) && ! defined(CRAY2)
1682webecray
1683#else
1684wenotbecray
1685#endif
1686
1687EOF
1688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1689 egrep "webecray" >/dev/null 2>&1; then
1690 rm -rf conftest*
1691 ac_cv_os_cray=yes
1692else
1693 rm -rf conftest*
1694 ac_cv_os_cray=no
1695fi
1696rm -f conftest*
1697
1698fi
1699
1700echo "$ac_t""$ac_cv_os_cray" 1>&6
1701if test $ac_cv_os_cray = yes; then
1702for ac_func in _getb67 GETB67 getb67; do
1703 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 1704echo "configure:1705: checking for $ac_func" >&5
c906108c
SS
1705if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1706 echo $ac_n "(cached) $ac_c" 1>&6
1707else
1708 cat > conftest.$ac_ext <<EOF
030292b7 1709#line 1710 "configure"
c906108c
SS
1710#include "confdefs.h"
1711/* System header to define __stub macros and hopefully few prototypes,
1712 which can conflict with char $ac_func(); below. */
1713#include <assert.h>
1714/* Override any gcc2 internal prototype to avoid an error. */
1715/* We use char because int might match the return type of a gcc2
1716 builtin and then its argument prototype would still apply. */
1717char $ac_func();
1718
1719int main() {
1720
1721/* The GNU C library defines this for functions which it implements
1722 to always fail with ENOSYS. Some functions are actually named
1723 something starting with __ and the normal name is an alias. */
1724#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1725choke me
1726#else
1727$ac_func();
1728#endif
1729
1730; return 0; }
1731EOF
030292b7 1732if { (eval echo configure:1733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1733 rm -rf conftest*
1734 eval "ac_cv_func_$ac_func=yes"
1735else
1736 echo "configure: failed program was:" >&5
1737 cat conftest.$ac_ext >&5
1738 rm -rf conftest*
1739 eval "ac_cv_func_$ac_func=no"
1740fi
1741rm -f conftest*
1742fi
1743
1744if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1745 echo "$ac_t""yes" 1>&6
1746 cat >> confdefs.h <<EOF
1747#define CRAY_STACKSEG_END $ac_func
1748EOF
1749
1750 break
1751else
1752 echo "$ac_t""no" 1>&6
1753fi
1754
1755done
1756fi
1757
1758echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
030292b7 1759echo "configure:1760: checking stack direction for C alloca" >&5
c906108c
SS
1760if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1761 echo $ac_n "(cached) $ac_c" 1>&6
1762else
1763 if test "$cross_compiling" = yes; then
1764 ac_cv_c_stack_direction=0
1765else
1766 cat > conftest.$ac_ext <<EOF
030292b7 1767#line 1768 "configure"
c906108c
SS
1768#include "confdefs.h"
1769find_stack_direction ()
1770{
1771 static char *addr = 0;
1772 auto char dummy;
1773 if (addr == 0)
1774 {
1775 addr = &dummy;
1776 return find_stack_direction ();
1777 }
1778 else
1779 return (&dummy > addr) ? 1 : -1;
1780}
1781main ()
1782{
1783 exit (find_stack_direction() < 0);
1784}
1785EOF
030292b7 1786if { (eval echo configure:1787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1787then
1788 ac_cv_c_stack_direction=1
1789else
1790 echo "configure: failed program was:" >&5
1791 cat conftest.$ac_ext >&5
1792 rm -fr conftest*
1793 ac_cv_c_stack_direction=-1
1794fi
1795rm -fr conftest*
1796fi
1797
1798fi
1799
1800echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1801cat >> confdefs.h <<EOF
1802#define STACK_DIRECTION $ac_cv_c_stack_direction
1803EOF
1804
1805fi
1806
c41b7eb1 1807for ac_hdr in unistd.h
c906108c
SS
1808do
1809ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1810echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 1811echo "configure:1812: checking for $ac_hdr" >&5
c906108c
SS
1812if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1813 echo $ac_n "(cached) $ac_c" 1>&6
1814else
1815 cat > conftest.$ac_ext <<EOF
030292b7 1816#line 1817 "configure"
c906108c
SS
1817#include "confdefs.h"
1818#include <$ac_hdr>
1819EOF
1820ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 1821{ (eval echo configure:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1822ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1823if test -z "$ac_err"; then
1824 rm -rf conftest*
1825 eval "ac_cv_header_$ac_safe=yes"
1826else
1827 echo "$ac_err" >&5
1828 echo "configure: failed program was:" >&5
1829 cat conftest.$ac_ext >&5
1830 rm -rf conftest*
1831 eval "ac_cv_header_$ac_safe=no"
1832fi
1833rm -f conftest*
1834fi
1835if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1836 echo "$ac_t""yes" 1>&6
1837 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1838 cat >> confdefs.h <<EOF
1839#define $ac_tr_hdr 1
1840EOF
1841
1842else
1843 echo "$ac_t""no" 1>&6
1844fi
1845done
1846
1847for ac_func in getpagesize
1848do
1849echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 1850echo "configure:1851: checking for $ac_func" >&5
c906108c
SS
1851if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1853else
1854 cat > conftest.$ac_ext <<EOF
030292b7 1855#line 1856 "configure"
c906108c
SS
1856#include "confdefs.h"
1857/* System header to define __stub macros and hopefully few prototypes,
1858 which can conflict with char $ac_func(); below. */
1859#include <assert.h>
1860/* Override any gcc2 internal prototype to avoid an error. */
1861/* We use char because int might match the return type of a gcc2
1862 builtin and then its argument prototype would still apply. */
1863char $ac_func();
1864
1865int main() {
1866
1867/* The GNU C library defines this for functions which it implements
1868 to always fail with ENOSYS. Some functions are actually named
1869 something starting with __ and the normal name is an alias. */
1870#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1871choke me
1872#else
1873$ac_func();
1874#endif
1875
1876; return 0; }
1877EOF
030292b7 1878if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1879 rm -rf conftest*
1880 eval "ac_cv_func_$ac_func=yes"
1881else
1882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 rm -rf conftest*
1885 eval "ac_cv_func_$ac_func=no"
1886fi
1887rm -f conftest*
1888fi
1889
1890if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1891 echo "$ac_t""yes" 1>&6
1892 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1893 cat >> confdefs.h <<EOF
1894#define $ac_tr_func 1
1895EOF
1896
1897else
1898 echo "$ac_t""no" 1>&6
1899fi
1900done
1901
1902echo $ac_n "checking for working mmap""... $ac_c" 1>&6
030292b7 1903echo "configure:1904: checking for working mmap" >&5
c906108c
SS
1904if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1905 echo $ac_n "(cached) $ac_c" 1>&6
1906else
1907 if test "$cross_compiling" = yes; then
1908 ac_cv_func_mmap_fixed_mapped=no
1909else
1910 cat > conftest.$ac_ext <<EOF
030292b7 1911#line 1912 "configure"
c906108c
SS
1912#include "confdefs.h"
1913
1914/* Thanks to Mike Haertel and Jim Avera for this test.
1915 Here is a matrix of mmap possibilities:
1916 mmap private not fixed
1917 mmap private fixed at somewhere currently unmapped
1918 mmap private fixed at somewhere already mapped
1919 mmap shared not fixed
1920 mmap shared fixed at somewhere currently unmapped
1921 mmap shared fixed at somewhere already mapped
1922 For private mappings, we should verify that changes cannot be read()
1923 back from the file, nor mmap's back from the file at a different
1924 address. (There have been systems where private was not correctly
1925 implemented like the infamous i386 svr4.0, and systems where the
1926 VM page cache was not coherent with the filesystem buffer cache
1927 like early versions of FreeBSD and possibly contemporary NetBSD.)
1928 For shared mappings, we should conversely verify that changes get
1929 propogated back to all the places they're supposed to be.
1930
1931 Grep wants private fixed already mapped.
1932 The main things grep needs to know about mmap are:
1933 * does it exist and is it safe to write into the mmap'd area
1934 * how to use it (BSD variants) */
1935#include <sys/types.h>
1936#include <fcntl.h>
1937#include <sys/mman.h>
1938
1939/* This mess was copied from the GNU getpagesize.h. */
1940#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1941# ifdef HAVE_UNISTD_H
1942# include <unistd.h>
1943# endif
c906108c
SS
1944
1945/* Assume that all systems that can run configure have sys/param.h. */
1946# ifndef HAVE_SYS_PARAM_H
1947# define HAVE_SYS_PARAM_H 1
1948# endif
1949
1950# ifdef _SC_PAGESIZE
1951# define getpagesize() sysconf(_SC_PAGESIZE)
1952# else /* no _SC_PAGESIZE */
1953# ifdef HAVE_SYS_PARAM_H
1954# include <sys/param.h>
1955# ifdef EXEC_PAGESIZE
1956# define getpagesize() EXEC_PAGESIZE
1957# else /* no EXEC_PAGESIZE */
1958# ifdef NBPG
1959# define getpagesize() NBPG * CLSIZE
1960# ifndef CLSIZE
1961# define CLSIZE 1
1962# endif /* no CLSIZE */
1963# else /* no NBPG */
1964# ifdef NBPC
1965# define getpagesize() NBPC
1966# else /* no NBPC */
1967# ifdef PAGESIZE
1968# define getpagesize() PAGESIZE
1969# endif /* PAGESIZE */
1970# endif /* no NBPC */
1971# endif /* no NBPG */
1972# endif /* no EXEC_PAGESIZE */
1973# else /* no HAVE_SYS_PARAM_H */
1974# define getpagesize() 8192 /* punt totally */
1975# endif /* no HAVE_SYS_PARAM_H */
1976# endif /* no _SC_PAGESIZE */
1977
1978#endif /* no HAVE_GETPAGESIZE */
1979
1980#ifdef __cplusplus
1981extern "C" { void *malloc(unsigned); }
1982#else
1983char *malloc();
1984#endif
1985
1986int
1987main()
1988{
1989 char *data, *data2, *data3;
1990 int i, pagesize;
1991 int fd;
1992
1993 pagesize = getpagesize();
1994
1995 /*
1996 * First, make a file with some known garbage in it.
1997 */
1998 data = malloc(pagesize);
1999 if (!data)
2000 exit(1);
2001 for (i = 0; i < pagesize; ++i)
2002 *(data + i) = rand();
2003 umask(0);
2004 fd = creat("conftestmmap", 0600);
2005 if (fd < 0)
2006 exit(1);
2007 if (write(fd, data, pagesize) != pagesize)
2008 exit(1);
2009 close(fd);
2010
2011 /*
2012 * Next, try to mmap the file at a fixed address which
2013 * already has something else allocated at it. If we can,
2014 * also make sure that we see the same garbage.
2015 */
2016 fd = open("conftestmmap", O_RDWR);
2017 if (fd < 0)
2018 exit(1);
2019 data2 = malloc(2 * pagesize);
2020 if (!data2)
2021 exit(1);
2022 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2023 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2024 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2025 exit(1);
2026 for (i = 0; i < pagesize; ++i)
2027 if (*(data + i) != *(data2 + i))
2028 exit(1);
2029
2030 /*
2031 * Finally, make sure that changes to the mapped area
2032 * do not percolate back to the file as seen by read().
2033 * (This is a bug on some variants of i386 svr4.0.)
2034 */
2035 for (i = 0; i < pagesize; ++i)
2036 *(data2 + i) = *(data2 + i) + 1;
2037 data3 = malloc(pagesize);
2038 if (!data3)
2039 exit(1);
2040 if (read(fd, data3, pagesize) != pagesize)
2041 exit(1);
2042 for (i = 0; i < pagesize; ++i)
2043 if (*(data + i) != *(data3 + i))
2044 exit(1);
2045 close(fd);
2046 unlink("conftestmmap");
2047 exit(0);
2048}
2049
2050EOF
030292b7 2051if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2052then
2053 ac_cv_func_mmap_fixed_mapped=yes
2054else
2055 echo "configure: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 rm -fr conftest*
2058 ac_cv_func_mmap_fixed_mapped=no
2059fi
2060rm -fr conftest*
2061fi
2062
2063fi
2064
2065echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2066if test $ac_cv_func_mmap_fixed_mapped = yes; then
2067 cat >> confdefs.h <<\EOF
2068#define HAVE_MMAP 1
2069EOF
2070
2071fi
2072
2073
2074 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2075unistd.h values.h sys/param.h
2076do
2077ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2078echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 2079echo "configure:2080: checking for $ac_hdr" >&5
c906108c
SS
2080if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2081 echo $ac_n "(cached) $ac_c" 1>&6
2082else
2083 cat > conftest.$ac_ext <<EOF
030292b7 2084#line 2085 "configure"
c906108c
SS
2085#include "confdefs.h"
2086#include <$ac_hdr>
2087EOF
2088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 2089{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2090ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2091if test -z "$ac_err"; then
2092 rm -rf conftest*
2093 eval "ac_cv_header_$ac_safe=yes"
2094else
2095 echo "$ac_err" >&5
2096 echo "configure: failed program was:" >&5
2097 cat conftest.$ac_ext >&5
2098 rm -rf conftest*
2099 eval "ac_cv_header_$ac_safe=no"
2100fi
2101rm -f conftest*
2102fi
2103if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2104 echo "$ac_t""yes" 1>&6
2105 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2106 cat >> confdefs.h <<EOF
2107#define $ac_tr_hdr 1
2108EOF
2109
2110else
2111 echo "$ac_t""no" 1>&6
2112fi
2113done
2114
2115 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2116__argz_count __argz_stringify __argz_next
2117do
2118echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 2119echo "configure:2120: checking for $ac_func" >&5
c906108c
SS
2120if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2121 echo $ac_n "(cached) $ac_c" 1>&6
2122else
2123 cat > conftest.$ac_ext <<EOF
030292b7 2124#line 2125 "configure"
c906108c
SS
2125#include "confdefs.h"
2126/* System header to define __stub macros and hopefully few prototypes,
2127 which can conflict with char $ac_func(); below. */
2128#include <assert.h>
2129/* Override any gcc2 internal prototype to avoid an error. */
2130/* We use char because int might match the return type of a gcc2
2131 builtin and then its argument prototype would still apply. */
2132char $ac_func();
2133
2134int main() {
2135
2136/* The GNU C library defines this for functions which it implements
2137 to always fail with ENOSYS. Some functions are actually named
2138 something starting with __ and the normal name is an alias. */
2139#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2140choke me
2141#else
2142$ac_func();
2143#endif
2144
2145; return 0; }
2146EOF
030292b7 2147if { (eval echo configure:2148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2148 rm -rf conftest*
2149 eval "ac_cv_func_$ac_func=yes"
2150else
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2153 rm -rf conftest*
2154 eval "ac_cv_func_$ac_func=no"
2155fi
2156rm -f conftest*
2157fi
2158
2159if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2160 echo "$ac_t""yes" 1>&6
2161 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2162 cat >> confdefs.h <<EOF
2163#define $ac_tr_func 1
2164EOF
2165
2166else
2167 echo "$ac_t""no" 1>&6
2168fi
2169done
2170
2171
2172 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2173 for ac_func in stpcpy
2174do
2175echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 2176echo "configure:2177: checking for $ac_func" >&5
c906108c
SS
2177if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2178 echo $ac_n "(cached) $ac_c" 1>&6
2179else
2180 cat > conftest.$ac_ext <<EOF
030292b7 2181#line 2182 "configure"
c906108c
SS
2182#include "confdefs.h"
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $ac_func(); below. */
2185#include <assert.h>
2186/* Override any gcc2 internal prototype to avoid an error. */
2187/* We use char because int might match the return type of a gcc2
2188 builtin and then its argument prototype would still apply. */
2189char $ac_func();
2190
2191int main() {
2192
2193/* The GNU C library defines this for functions which it implements
2194 to always fail with ENOSYS. Some functions are actually named
2195 something starting with __ and the normal name is an alias. */
2196#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2197choke me
2198#else
2199$ac_func();
2200#endif
2201
2202; return 0; }
2203EOF
030292b7 2204if { (eval echo configure:2205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2205 rm -rf conftest*
2206 eval "ac_cv_func_$ac_func=yes"
2207else
2208 echo "configure: failed program was:" >&5
2209 cat conftest.$ac_ext >&5
2210 rm -rf conftest*
2211 eval "ac_cv_func_$ac_func=no"
2212fi
2213rm -f conftest*
2214fi
2215
2216if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2217 echo "$ac_t""yes" 1>&6
2218 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2219 cat >> confdefs.h <<EOF
2220#define $ac_tr_func 1
2221EOF
2222
2223else
2224 echo "$ac_t""no" 1>&6
2225fi
2226done
2227
2228 fi
2229 if test "${ac_cv_func_stpcpy}" = "yes"; then
2230 cat >> confdefs.h <<\EOF
2231#define HAVE_STPCPY 1
2232EOF
2233
2234 fi
2235
2236 if test $ac_cv_header_locale_h = yes; then
2237 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
030292b7 2238echo "configure:2239: checking for LC_MESSAGES" >&5
c906108c
SS
2239if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241else
2242 cat > conftest.$ac_ext <<EOF
030292b7 2243#line 2244 "configure"
c906108c
SS
2244#include "confdefs.h"
2245#include <locale.h>
2246int main() {
2247return LC_MESSAGES
2248; return 0; }
2249EOF
030292b7 2250if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2251 rm -rf conftest*
2252 am_cv_val_LC_MESSAGES=yes
2253else
2254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
2256 rm -rf conftest*
2257 am_cv_val_LC_MESSAGES=no
2258fi
2259rm -f conftest*
2260fi
2261
2262echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2263 if test $am_cv_val_LC_MESSAGES = yes; then
2264 cat >> confdefs.h <<\EOF
2265#define HAVE_LC_MESSAGES 1
2266EOF
2267
2268 fi
2269 fi
2270 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
030292b7 2271echo "configure:2272: checking whether NLS is requested" >&5
c906108c
SS
2272 # Check whether --enable-nls or --disable-nls was given.
2273if test "${enable_nls+set}" = set; then
2274 enableval="$enable_nls"
2275 USE_NLS=$enableval
2276else
2277 USE_NLS=yes
2278fi
2279
2280 echo "$ac_t""$USE_NLS" 1>&6
2281
2282
2283 USE_INCLUDED_LIBINTL=no
2284
2285 if test "$USE_NLS" = "yes"; then
2286 cat >> confdefs.h <<\EOF
2287#define ENABLE_NLS 1
2288EOF
2289
2290 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
030292b7 2291echo "configure:2292: checking whether included gettext is requested" >&5
c906108c
SS
2292 # Check whether --with-included-gettext or --without-included-gettext was given.
2293if test "${with_included_gettext+set}" = set; then
2294 withval="$with_included_gettext"
2295 nls_cv_force_use_gnu_gettext=$withval
2296else
2297 nls_cv_force_use_gnu_gettext=no
2298fi
2299
2300 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2301
2302 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2303 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2304 nls_cv_header_intl=
2305 nls_cv_header_libgt=
2306 CATOBJEXT=NONE
2307
2308 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2309echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
030292b7 2310echo "configure:2311: checking for libintl.h" >&5
c906108c
SS
2311if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2312 echo $ac_n "(cached) $ac_c" 1>&6
2313else
2314 cat > conftest.$ac_ext <<EOF
030292b7 2315#line 2316 "configure"
c906108c
SS
2316#include "confdefs.h"
2317#include <libintl.h>
2318EOF
2319ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 2320{ (eval echo configure:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2321ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2322if test -z "$ac_err"; then
2323 rm -rf conftest*
2324 eval "ac_cv_header_$ac_safe=yes"
2325else
2326 echo "$ac_err" >&5
2327 echo "configure: failed program was:" >&5
2328 cat conftest.$ac_ext >&5
2329 rm -rf conftest*
2330 eval "ac_cv_header_$ac_safe=no"
2331fi
2332rm -f conftest*
2333fi
2334if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2335 echo "$ac_t""yes" 1>&6
2336 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
030292b7 2337echo "configure:2338: checking for gettext in libc" >&5
c906108c
SS
2338if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2339 echo $ac_n "(cached) $ac_c" 1>&6
2340else
2341 cat > conftest.$ac_ext <<EOF
030292b7 2342#line 2343 "configure"
c906108c
SS
2343#include "confdefs.h"
2344#include <libintl.h>
2345int main() {
2346return (int) gettext ("")
2347; return 0; }
2348EOF
030292b7 2349if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2350 rm -rf conftest*
2351 gt_cv_func_gettext_libc=yes
2352else
2353 echo "configure: failed program was:" >&5
2354 cat conftest.$ac_ext >&5
2355 rm -rf conftest*
2356 gt_cv_func_gettext_libc=no
2357fi
2358rm -f conftest*
2359fi
2360
2361echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2362
2363 if test "$gt_cv_func_gettext_libc" != "yes"; then
2364 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
030292b7 2365echo "configure:2366: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2366ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2367if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2368 echo $ac_n "(cached) $ac_c" 1>&6
2369else
2370 ac_save_LIBS="$LIBS"
2371LIBS="-lintl $LIBS"
2372cat > conftest.$ac_ext <<EOF
030292b7 2373#line 2374 "configure"
c906108c
SS
2374#include "confdefs.h"
2375/* Override any gcc2 internal prototype to avoid an error. */
2376/* We use char because int might match the return type of a gcc2
2377 builtin and then its argument prototype would still apply. */
2378char bindtextdomain();
2379
2380int main() {
2381bindtextdomain()
2382; return 0; }
2383EOF
030292b7 2384if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2385 rm -rf conftest*
2386 eval "ac_cv_lib_$ac_lib_var=yes"
2387else
2388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -rf conftest*
2391 eval "ac_cv_lib_$ac_lib_var=no"
2392fi
2393rm -f conftest*
2394LIBS="$ac_save_LIBS"
2395
2396fi
2397if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2398 echo "$ac_t""yes" 1>&6
2399 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
030292b7 2400echo "configure:2401: checking for gettext in libintl" >&5
c906108c
SS
2401if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2402 echo $ac_n "(cached) $ac_c" 1>&6
2403else
2404 cat > conftest.$ac_ext <<EOF
030292b7 2405#line 2406 "configure"
c906108c
SS
2406#include "confdefs.h"
2407
2408int main() {
2409return (int) gettext ("")
2410; return 0; }
2411EOF
030292b7 2412if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2413 rm -rf conftest*
2414 gt_cv_func_gettext_libintl=yes
2415else
2416 echo "configure: failed program was:" >&5
2417 cat conftest.$ac_ext >&5
2418 rm -rf conftest*
2419 gt_cv_func_gettext_libintl=no
2420fi
2421rm -f conftest*
2422fi
2423
2424echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2425else
2426 echo "$ac_t""no" 1>&6
2427fi
2428
2429 fi
2430
2431 if test "$gt_cv_func_gettext_libc" = "yes" \
2432 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2433 cat >> confdefs.h <<\EOF
2434#define HAVE_GETTEXT 1
2435EOF
2436
2437 # Extract the first word of "msgfmt", so it can be a program name with args.
2438set dummy msgfmt; ac_word=$2
2439echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2440echo "configure:2441: checking for $ac_word" >&5
c906108c
SS
2441if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2442 echo $ac_n "(cached) $ac_c" 1>&6
2443else
2444 case "$MSGFMT" in
2445 /*)
2446 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2447 ;;
2448 *)
2449 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2450 for ac_dir in $PATH; do
2451 test -z "$ac_dir" && ac_dir=.
2452 if test -f $ac_dir/$ac_word; then
2453 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2454 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2455 break
2456 fi
2457 fi
2458 done
2459 IFS="$ac_save_ifs"
2460 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2461 ;;
2462esac
2463fi
2464MSGFMT="$ac_cv_path_MSGFMT"
2465if test -n "$MSGFMT"; then
2466 echo "$ac_t""$MSGFMT" 1>&6
2467else
2468 echo "$ac_t""no" 1>&6
2469fi
2470 if test "$MSGFMT" != "no"; then
2471 for ac_func in dcgettext
2472do
2473echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 2474echo "configure:2475: checking for $ac_func" >&5
c906108c
SS
2475if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2476 echo $ac_n "(cached) $ac_c" 1>&6
2477else
2478 cat > conftest.$ac_ext <<EOF
030292b7 2479#line 2480 "configure"
c906108c
SS
2480#include "confdefs.h"
2481/* System header to define __stub macros and hopefully few prototypes,
2482 which can conflict with char $ac_func(); below. */
2483#include <assert.h>
2484/* Override any gcc2 internal prototype to avoid an error. */
2485/* We use char because int might match the return type of a gcc2
2486 builtin and then its argument prototype would still apply. */
2487char $ac_func();
2488
2489int main() {
2490
2491/* The GNU C library defines this for functions which it implements
2492 to always fail with ENOSYS. Some functions are actually named
2493 something starting with __ and the normal name is an alias. */
2494#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2495choke me
2496#else
2497$ac_func();
2498#endif
2499
2500; return 0; }
2501EOF
030292b7 2502if { (eval echo configure:2503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2503 rm -rf conftest*
2504 eval "ac_cv_func_$ac_func=yes"
2505else
2506 echo "configure: failed program was:" >&5
2507 cat conftest.$ac_ext >&5
2508 rm -rf conftest*
2509 eval "ac_cv_func_$ac_func=no"
2510fi
2511rm -f conftest*
2512fi
2513
2514if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2515 echo "$ac_t""yes" 1>&6
2516 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2517 cat >> confdefs.h <<EOF
2518#define $ac_tr_func 1
2519EOF
2520
2521else
2522 echo "$ac_t""no" 1>&6
2523fi
2524done
2525
2526 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2527set dummy gmsgfmt; ac_word=$2
2528echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2529echo "configure:2530: checking for $ac_word" >&5
c906108c
SS
2530if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2531 echo $ac_n "(cached) $ac_c" 1>&6
2532else
2533 case "$GMSGFMT" in
2534 /*)
2535 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2536 ;;
2537 ?:/*)
2538 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2539 ;;
2540 *)
2541 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2542 ac_dummy="$PATH"
2543 for ac_dir in $ac_dummy; do
2544 test -z "$ac_dir" && ac_dir=.
2545 if test -f $ac_dir/$ac_word; then
2546 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2547 break
2548 fi
2549 done
2550 IFS="$ac_save_ifs"
2551 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2552 ;;
2553esac
2554fi
2555GMSGFMT="$ac_cv_path_GMSGFMT"
2556if test -n "$GMSGFMT"; then
2557 echo "$ac_t""$GMSGFMT" 1>&6
2558else
2559 echo "$ac_t""no" 1>&6
2560fi
2561
2562 # Extract the first word of "xgettext", so it can be a program name with args.
2563set dummy xgettext; ac_word=$2
2564echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2565echo "configure:2566: checking for $ac_word" >&5
c906108c
SS
2566if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2567 echo $ac_n "(cached) $ac_c" 1>&6
2568else
2569 case "$XGETTEXT" in
2570 /*)
2571 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2572 ;;
2573 *)
2574 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2575 for ac_dir in $PATH; do
2576 test -z "$ac_dir" && ac_dir=.
2577 if test -f $ac_dir/$ac_word; then
2578 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2579 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2580 break
2581 fi
2582 fi
2583 done
2584 IFS="$ac_save_ifs"
2585 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2586 ;;
2587esac
2588fi
2589XGETTEXT="$ac_cv_path_XGETTEXT"
2590if test -n "$XGETTEXT"; then
2591 echo "$ac_t""$XGETTEXT" 1>&6
2592else
2593 echo "$ac_t""no" 1>&6
2594fi
2595
2596 cat > conftest.$ac_ext <<EOF
030292b7 2597#line 2598 "configure"
c906108c
SS
2598#include "confdefs.h"
2599
2600int main() {
2601extern int _nl_msg_cat_cntr;
2602 return _nl_msg_cat_cntr
2603; return 0; }
2604EOF
030292b7 2605if { (eval echo configure:2606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2606 rm -rf conftest*
2607 CATOBJEXT=.gmo
2608 DATADIRNAME=share
2609else
2610 echo "configure: failed program was:" >&5
2611 cat conftest.$ac_ext >&5
2612 rm -rf conftest*
2613 CATOBJEXT=.mo
2614 DATADIRNAME=lib
2615fi
2616rm -f conftest*
2617 INSTOBJEXT=.mo
2618 fi
2619 fi
2620
2621else
2622 echo "$ac_t""no" 1>&6
2623fi
2624
2625
2626
2627 if test "$CATOBJEXT" = "NONE"; then
2628 nls_cv_use_gnu_gettext=yes
2629 fi
2630 fi
2631
2632 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2633 INTLOBJS="\$(GETTOBJS)"
2634 # Extract the first word of "msgfmt", so it can be a program name with args.
2635set dummy msgfmt; ac_word=$2
2636echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2637echo "configure:2638: checking for $ac_word" >&5
c906108c
SS
2638if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640else
2641 case "$MSGFMT" in
2642 /*)
2643 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2644 ;;
2645 *)
2646 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2647 for ac_dir in $PATH; do
2648 test -z "$ac_dir" && ac_dir=.
2649 if test -f $ac_dir/$ac_word; then
2650 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2651 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2652 break
2653 fi
2654 fi
2655 done
2656 IFS="$ac_save_ifs"
2657 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2658 ;;
2659esac
2660fi
2661MSGFMT="$ac_cv_path_MSGFMT"
2662if test -n "$MSGFMT"; then
2663 echo "$ac_t""$MSGFMT" 1>&6
2664else
2665 echo "$ac_t""no" 1>&6
2666fi
2667
2668 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2669set dummy gmsgfmt; ac_word=$2
2670echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2671echo "configure:2672: checking for $ac_word" >&5
c906108c
SS
2672if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2673 echo $ac_n "(cached) $ac_c" 1>&6
2674else
2675 case "$GMSGFMT" in
2676 /*)
2677 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2678 ;;
2679 ?:/*)
2680 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2681 ;;
2682 *)
2683 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2684 ac_dummy="$PATH"
2685 for ac_dir in $ac_dummy; do
2686 test -z "$ac_dir" && ac_dir=.
2687 if test -f $ac_dir/$ac_word; then
2688 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2689 break
2690 fi
2691 done
2692 IFS="$ac_save_ifs"
2693 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2694 ;;
2695esac
2696fi
2697GMSGFMT="$ac_cv_path_GMSGFMT"
2698if test -n "$GMSGFMT"; then
2699 echo "$ac_t""$GMSGFMT" 1>&6
2700else
2701 echo "$ac_t""no" 1>&6
2702fi
2703
2704 # Extract the first word of "xgettext", so it can be a program name with args.
2705set dummy xgettext; ac_word=$2
2706echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 2707echo "configure:2708: checking for $ac_word" >&5
c906108c
SS
2708if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
2710else
2711 case "$XGETTEXT" in
2712 /*)
2713 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2714 ;;
2715 *)
2716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2717 for ac_dir in $PATH; do
2718 test -z "$ac_dir" && ac_dir=.
2719 if test -f $ac_dir/$ac_word; then
2720 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2721 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2722 break
2723 fi
2724 fi
2725 done
2726 IFS="$ac_save_ifs"
2727 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2728 ;;
2729esac
2730fi
2731XGETTEXT="$ac_cv_path_XGETTEXT"
2732if test -n "$XGETTEXT"; then
2733 echo "$ac_t""$XGETTEXT" 1>&6
2734else
2735 echo "$ac_t""no" 1>&6
2736fi
2737
2738
2739 USE_INCLUDED_LIBINTL=yes
2740 CATOBJEXT=.gmo
2741 INSTOBJEXT=.mo
2742 DATADIRNAME=share
2743 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2744 INTLLIBS=$INTLDEPS
2745 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2746 nls_cv_header_intl=libintl.h
2747 nls_cv_header_libgt=libgettext.h
2748 fi
2749
2750 if test "$XGETTEXT" != ":"; then
2751 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2752 : ;
2753 else
2754 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2755 XGETTEXT=":"
2756 fi
2757 fi
2758
2759 # We need to process the po/ directory.
2760 POSUB=po
2761 else
2762 DATADIRNAME=share
2763 nls_cv_header_intl=libintl.h
2764 nls_cv_header_libgt=libgettext.h
2765 fi
2766
2767 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2768 # because some of the sources are only built for this goal.
2769 if test "$PACKAGE" = gettext; then
2770 USE_NLS=yes
2771 USE_INCLUDED_LIBINTL=yes
2772 fi
2773
2774 for lang in $ALL_LINGUAS; do
2775 GMOFILES="$GMOFILES $lang.gmo"
2776 POFILES="$POFILES $lang.po"
2777 done
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792 if test "x$CATOBJEXT" != "x"; then
2793 if test "x$ALL_LINGUAS" = "x"; then
2794 LINGUAS=
2795 else
2796 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
030292b7 2797echo "configure:2798: checking for catalogs to be installed" >&5
c906108c
SS
2798 NEW_LINGUAS=
2799 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2800 case "$ALL_LINGUAS" in
2801 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2802 esac
2803 done
2804 LINGUAS=$NEW_LINGUAS
2805 echo "$ac_t""$LINGUAS" 1>&6
2806 fi
2807
2808 if test -n "$LINGUAS"; then
2809 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2810 fi
2811 fi
2812
2813 if test $ac_cv_header_locale_h = yes; then
2814 INCLUDE_LOCALE_H="#include <locale.h>"
2815 else
2816 INCLUDE_LOCALE_H="\
2817/* The system does not provide the header <locale.h>. Take care yourself. */"
2818 fi
2819
2820
2821 if test -f $srcdir/po2tbl.sed.in; then
2822 if test "$CATOBJEXT" = ".cat"; then
2823 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2824echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
030292b7 2825echo "configure:2826: checking for linux/version.h" >&5
c906108c
SS
2826if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2828else
2829 cat > conftest.$ac_ext <<EOF
030292b7 2830#line 2831 "configure"
c906108c
SS
2831#include "confdefs.h"
2832#include <linux/version.h>
2833EOF
2834ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 2835{ (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2836ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2837if test -z "$ac_err"; then
2838 rm -rf conftest*
2839 eval "ac_cv_header_$ac_safe=yes"
2840else
2841 echo "$ac_err" >&5
2842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
2844 rm -rf conftest*
2845 eval "ac_cv_header_$ac_safe=no"
2846fi
2847rm -f conftest*
2848fi
2849if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2850 echo "$ac_t""yes" 1>&6
2851 msgformat=linux
2852else
2853 echo "$ac_t""no" 1>&6
2854msgformat=xopen
2855fi
2856
2857
2858 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2859 fi
2860 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2861 $srcdir/po2tbl.sed.in > po2tbl.sed
2862 fi
2863
2864 if test "$PACKAGE" = "gettext"; then
2865 GT_NO="#NO#"
2866 GT_YES=
2867 else
2868 GT_NO=
2869 GT_YES="#YES#"
2870 fi
2871
2872
2873
2874 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2875
2876
2877 l=
2878
2879
4536bbc6 2880 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2881 test -d po || mkdir po
2882 if test "x$srcdir" != "x."; then
2883 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2884 posrcprefix="$srcdir/"
2885 else
2886 posrcprefix="../$srcdir/"
2887 fi
2888 else
2889 posrcprefix="../"
2890 fi
2891 rm -f po/POTFILES
2892 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2893 < $srcdir/po/POTFILES.in > po/POTFILES
2894 fi
2895
0fbb3da7
TT
2896cat >> confdefs.h <<\EOF
2897#define PACKAGE "gdb"
2898EOF
2899
2900
c906108c
SS
2901
2902
2903CONFIG_OBS=
66b965bb 2904CONFIG_LIB_OBS=
c906108c
SS
2905CONFIG_DEPS=
2906CONFIG_SRCS=
fb40c209
AC
2907CONFIG_INITS=
2908ENABLE_CFLAGS=
b3a90332
AC
2909CONFIG_ALL=
2910CONFIG_CLEAN=
e56ac5c3
AC
2911CONFIG_INSTALL=
2912CONFIG_UNINSTALL=
c906108c 2913
8dcde887 2914subdirs="doc testsuite"
96baa820 2915
8dcde887 2916configdirs=
96baa820 2917
27e9bf90 2918. $srcdir/configure.host
c906108c 2919
27e9bf90 2920. $srcdir/configure.tgt
c906108c 2921
27e9bf90
MK
2922# Fetch the default architecture and default target vector from BFD.
2923targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2924
27e9bf90
MK
2925# We only want the first architecture, so strip off the others if
2926# there is more than one.
2927targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2928
27e9bf90
MK
2929if test "x$targ_archs" != x; then
2930 cat >> confdefs.h <<EOF
2931#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2932EOF
2933
2934fi
27e9bf90
MK
2935if test "x$targ_defvec" != x; then
2936 cat >> confdefs.h <<EOF
2937#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2938EOF
2939
2940fi
c906108c 2941
8bb2c122
MK
2942if test "$program_transform_name" = s,x,x,; then
2943 program_transform_name=
2944else
2945 # Double any \ or $. echo might interpret backslashes.
2946 cat <<\EOF_SED > conftestsed
2947s,\\,\\\\,g; s,\$,$$,g
2948EOF_SED
2949 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2950 rm -f conftestsed
2951fi
2952test "$program_prefix" != NONE &&
2953 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2954# Use a double $ so make ignores it.
2955test "$program_suffix" != NONE &&
2956 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2957
2958# sed with no file args requires a program.
2959test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2960
2961
627af7ea
MK
2962# The CLI cannot be disabled yet, but may be in the future.
2963
2964# Enable CLI.
2965# Check whether --enable-gdbcli or --disable-gdbcli was given.
2966if test "${enable_gdbcli+set}" = set; then
2967 enableval="$enable_gdbcli"
2968 case $enableval in
2969 yes)
2970 ;;
2971 no)
2972 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2973 *)
2974 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2975 esac
2976else
2977 enable_gdbcli=yes
2978fi
2979
2980if test x"$enable_gdbcli" = xyes; then
2981 if test -d $srcdir/cli; then
2982 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2983 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2984 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2985 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2986 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2987 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
2988 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
2989 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
2990 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
2991 fi
2992fi
2993
2994# Enable MI.
2995# Check whether --enable-gdbmi or --disable-gdbmi was given.
2996if test "${enable_gdbmi+set}" = set; then
2997 enableval="$enable_gdbmi"
2998 case $enableval in
2999 yes | no)
3000 ;;
3001 *)
3002 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3003 esac
3004else
3005 enable_gdbmi=yes
3006fi
3007
3008if test x"$enable_gdbmi" = xyes; then
3009 if test -d $srcdir/mi; then
3010 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3011 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3012 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3013 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3014 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3015 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3016 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3017 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3018 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3019 fi
3020fi
3021
06825bd1
MK
3022# Enable TUI.
3023# Check whether --enable-tui or --disable-tui was given.
3024if test "${enable_tui+set}" = set; then
3025 enableval="$enable_tui"
3026 case $enableval in
3027 yes | no)
3028 ;;
3029 *)
3030 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3031 esac
3032fi
3033
3034if test x"$enable_tui" = xyes; then
3035 if test -d $srcdir/tui; then
3036 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3037 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3038 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3039 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3040 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3041 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3042 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3043 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3044 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3045 need_curses=yes
3046 fi
3047fi
3048
8ee53726
MK
3049# Enable gdbtk.
3050# Check whether --enable-gdbtk or --disable-gdbtk was given.
3051if test "${enable_gdbtk+set}" = set; then
3052 enableval="$enable_gdbtk"
3053 case $enableval in
3054 yes | no)
3055 ;;
3056 *)
3057 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3058 esac
3059else
3060 if test -d $srcdir/gdbtk; then
3061 enable_gdbtk=yes
3062 else
3063 enable_gdbtk=no
3064 fi
3065fi
3066
3067# We unconditionally disable gdbtk tests on selected platforms.
3068case $host_os in
3069 go32* | windows*)
3070 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3071 enable_gdbtk=no ;;
3072esac
3073
8bb2c122
MK
3074# --------------------- #
3075# Checks for programs. #
3076# --------------------- #
3077
c41b7eb1 3078for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3079do
3080# Extract the first word of "$ac_prog", so it can be a program name with args.
3081set dummy $ac_prog; ac_word=$2
3082echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3083echo "configure:3084: checking for $ac_word" >&5
7a292a7a
SS
3084if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3085 echo $ac_n "(cached) $ac_c" 1>&6
3086else
3087 if test -n "$AWK"; then
3088 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3089else
3090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3091 ac_dummy="$PATH"
3092 for ac_dir in $ac_dummy; do
3093 test -z "$ac_dir" && ac_dir=.
3094 if test -f $ac_dir/$ac_word; then
3095 ac_cv_prog_AWK="$ac_prog"
3096 break
3097 fi
3098 done
3099 IFS="$ac_save_ifs"
3100fi
3101fi
3102AWK="$ac_cv_prog_AWK"
3103if test -n "$AWK"; then
3104 echo "$ac_t""$AWK" 1>&6
3105else
3106 echo "$ac_t""no" 1>&6
3107fi
3108
3109test -n "$AWK" && break
3110done
3111
c906108c
SS
3112# Find a good install program. We prefer a C program (faster),
3113# so one script is as good as another. But avoid the broken or
3114# incompatible versions:
3115# SysV /etc/install, /usr/sbin/install
3116# SunOS /usr/etc/install
3117# IRIX /sbin/install
3118# AIX /bin/install
3119# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3120# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3121# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3122# ./install, which can be erroneously created by make from ./install.sh.
3123echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
030292b7 3124echo "configure:3125: checking for a BSD compatible install" >&5
c906108c
SS
3125if test -z "$INSTALL"; then
3126if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3127 echo $ac_n "(cached) $ac_c" 1>&6
3128else
3129 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3130 for ac_dir in $PATH; do
3131 # Account for people who put trailing slashes in PATH elements.
3132 case "$ac_dir/" in
3133 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3134 *)
3135 # OSF1 and SCO ODT 3.0 have their own names for install.
3136 # Don't use installbsd from OSF since it installs stuff as root
3137 # by default.
3138 for ac_prog in ginstall scoinst install; do
3139 if test -f $ac_dir/$ac_prog; then
3140 if test $ac_prog = install &&
3141 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3142 # AIX install. It has an incompatible calling convention.
3143 :
3144 else
3145 ac_cv_path_install="$ac_dir/$ac_prog -c"
3146 break 2
3147 fi
3148 fi
3149 done
3150 ;;
3151 esac
3152 done
3153 IFS="$ac_save_IFS"
3154
3155fi
3156 if test "${ac_cv_path_install+set}" = set; then
3157 INSTALL="$ac_cv_path_install"
3158 else
3159 # As a last resort, use the slow shell script. We don't cache a
3160 # path for INSTALL within a source directory, because that will
3161 # break other packages using the cache if that directory is
3162 # removed, or if the path is relative.
3163 INSTALL="$ac_install_sh"
3164 fi
3165fi
3166echo "$ac_t""$INSTALL" 1>&6
3167
3168# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3169# It thinks the first close brace ends the variable substitution.
3170test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3171
3172test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3173
3174test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3175
8bb2c122 3176echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
030292b7 3177echo "configure:3178: checking whether ln -s works" >&5
8bb2c122
MK
3178if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3179 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3180else
8bb2c122
MK
3181 rm -f conftestdata
3182if ln -s X conftestdata 2>/dev/null
3183then
3184 rm -f conftestdata
3185 ac_cv_prog_LN_S="ln -s"
3186else
3187 ac_cv_prog_LN_S=ln
3188fi
3189fi
3190LN_S="$ac_cv_prog_LN_S"
3191if test "$ac_cv_prog_LN_S" = "ln -s"; then
3192 echo "$ac_t""yes" 1>&6
3193else
3194 echo "$ac_t""no" 1>&6
c906108c
SS
3195fi
3196
8bb2c122
MK
3197# Extract the first word of "ranlib", so it can be a program name with args.
3198set dummy ranlib; ac_word=$2
c906108c 3199echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3200echo "configure:3201: checking for $ac_word" >&5
8bb2c122 3201if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3202 echo $ac_n "(cached) $ac_c" 1>&6
3203else
8bb2c122
MK
3204 if test -n "$RANLIB"; then
3205 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3206else
3207 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3208 ac_dummy="$PATH"
3209 for ac_dir in $ac_dummy; do
3210 test -z "$ac_dir" && ac_dir=.
3211 if test -f $ac_dir/$ac_word; then
8bb2c122 3212 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3213 break
3214 fi
3215 done
3216 IFS="$ac_save_ifs"
8bb2c122 3217 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3218fi
3219fi
8bb2c122
MK
3220RANLIB="$ac_cv_prog_RANLIB"
3221if test -n "$RANLIB"; then
3222 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3223else
3224 echo "$ac_t""no" 1>&6
3225fi
3226
8bb2c122
MK
3227for ac_prog in 'bison -y' byacc
3228do
3229# Extract the first word of "$ac_prog", so it can be a program name with args.
3230set dummy $ac_prog; ac_word=$2
c906108c 3231echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3232echo "configure:3233: checking for $ac_word" >&5
8bb2c122 3233if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3234 echo $ac_n "(cached) $ac_c" 1>&6
3235else
8bb2c122
MK
3236 if test -n "$YACC"; then
3237 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3238else
3239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3240 ac_dummy="$PATH"
3241 for ac_dir in $ac_dummy; do
3242 test -z "$ac_dir" && ac_dir=.
3243 if test -f $ac_dir/$ac_word; then
8bb2c122 3244 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3245 break
3246 fi
3247 done
3248 IFS="$ac_save_ifs"
3249fi
3250fi
8bb2c122
MK
3251YACC="$ac_cv_prog_YACC"
3252if test -n "$YACC"; then
3253 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3254else
3255 echo "$ac_t""no" 1>&6
3256fi
3257
8bb2c122
MK
3258test -n "$YACC" && break
3259done
3260test -n "$YACC" || YACC="yacc"
c906108c 3261
8bb2c122
MK
3262
3263# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3264set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3265echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3266echo "configure:3267: checking for $ac_word" >&5
8bb2c122 3267if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3268 echo $ac_n "(cached) $ac_c" 1>&6
3269else
8bb2c122
MK
3270 if test -n "$AR"; then
3271 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3272else
3273 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3274 ac_dummy="$PATH"
3275 for ac_dir in $ac_dummy; do
3276 test -z "$ac_dir" && ac_dir=.
3277 if test -f $ac_dir/$ac_word; then
8bb2c122 3278 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3279 break
3280 fi
3281 done
3282 IFS="$ac_save_ifs"
8bb2c122 3283 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3284fi
3285fi
8bb2c122
MK
3286AR="$ac_cv_prog_AR"
3287if test -n "$AR"; then
3288 echo "$ac_t""$AR" 1>&6
c906108c
SS
3289else
3290 echo "$ac_t""no" 1>&6
3291fi
3292
8bb2c122 3293
c906108c 3294
95ca63c4
CF
3295# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3296set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3297echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3298echo "configure:3299: checking for $ac_word" >&5
95ca63c4
CF
3299if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3300 echo $ac_n "(cached) $ac_c" 1>&6
3301else
3302 if test -n "$DLLTOOL"; then
3303 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3304else
3305 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3306 ac_dummy="$PATH"
3307 for ac_dir in $ac_dummy; do
3308 test -z "$ac_dir" && ac_dir=.
3309 if test -f $ac_dir/$ac_word; then
3310 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3311 break
3312 fi
3313 done
3314 IFS="$ac_save_ifs"
3315 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3316fi
3317fi
3318DLLTOOL="$ac_cv_prog_DLLTOOL"
3319if test -n "$DLLTOOL"; then
3320 echo "$ac_t""$DLLTOOL" 1>&6
3321else
3322 echo "$ac_t""no" 1>&6
3323fi
3324
3325
3326
3327# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3328set dummy ${ac_tool_prefix}windres; ac_word=$2
3329echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3330echo "configure:3331: checking for $ac_word" >&5
95ca63c4
CF
3331if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3332 echo $ac_n "(cached) $ac_c" 1>&6
3333else
3334 if test -n "$WINDRES"; then
3335 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3336else
3337 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3338 ac_dummy="$PATH"
3339 for ac_dir in $ac_dummy; do
3340 test -z "$ac_dir" && ac_dir=.
3341 if test -f $ac_dir/$ac_word; then
3342 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3343 break
3344 fi
3345 done
3346 IFS="$ac_save_ifs"
3347 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3348fi
3349fi
3350WINDRES="$ac_cv_prog_WINDRES"
3351if test -n "$WINDRES"; then
3352 echo "$ac_t""$WINDRES" 1>&6
3353else
3354 echo "$ac_t""no" 1>&6
3355fi
3356
3357
3358
c906108c 3359
8bb2c122 3360# Needed for GNU/Hurd.
75c6e08a
MK
3361# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3362set dummy ${ac_tool_prefix}mig; ac_word=$2
3363echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
030292b7 3364echo "configure:3365: checking for $ac_word" >&5
75c6e08a
MK
3365if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3366 echo $ac_n "(cached) $ac_c" 1>&6
3367else
3368 if test -n "$MIG"; then
3369 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3370else
3371 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3372 ac_dummy="$PATH"
3373 for ac_dir in $ac_dummy; do
3374 test -z "$ac_dir" && ac_dir=.
3375 if test -f $ac_dir/$ac_word; then
3376 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3377 break
3378 fi
3379 done
3380 IFS="$ac_save_ifs"
3381 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3382fi
3383fi
3384MIG="$ac_cv_prog_MIG"
3385if test -n "$MIG"; then
3386 echo "$ac_t""$MIG" 1>&6
3387else
3388 echo "$ac_t""no" 1>&6
3389fi
3390
3391
3392
3393
9a156167
MK
3394# ---------------------- #
3395# Checks for libraries. #
3396# ---------------------- #
3397
3398# We might need to link with -lm; most simulators need it.
3399echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
030292b7 3400echo "configure:3401: checking for main in -lm" >&5
9a156167
MK
3401ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3402if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 ac_save_LIBS="$LIBS"
3406LIBS="-lm $LIBS"
3407cat > conftest.$ac_ext <<EOF
030292b7 3408#line 3409 "configure"
9a156167
MK
3409#include "confdefs.h"
3410
3411int main() {
3412main()
3413; return 0; }
3414EOF
030292b7 3415if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3416 rm -rf conftest*
3417 eval "ac_cv_lib_$ac_lib_var=yes"
3418else
3419 echo "configure: failed program was:" >&5
3420 cat conftest.$ac_ext >&5
3421 rm -rf conftest*
3422 eval "ac_cv_lib_$ac_lib_var=no"
3423fi
3424rm -f conftest*
3425LIBS="$ac_save_LIBS"
3426
3427fi
3428if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3429 echo "$ac_t""yes" 1>&6
3430 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3431 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3432 cat >> confdefs.h <<EOF
3433#define $ac_tr_lib 1
3434EOF
3435
3436 LIBS="-lm $LIBS"
3437
3438else
3439 echo "$ac_t""no" 1>&6
3440fi
3441
3442
3443# We need to link with -lw to get `wctype' on Solaris before Solaris
3444# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3445# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3446# is known to have this problem). Therefore we avoid libw if we can.
3447echo $ac_n "checking for wctype""... $ac_c" 1>&6
030292b7 3448echo "configure:3449: checking for wctype" >&5
9a156167
MK
3449if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3450 echo $ac_n "(cached) $ac_c" 1>&6
3451else
3452 cat > conftest.$ac_ext <<EOF
030292b7 3453#line 3454 "configure"
9a156167
MK
3454#include "confdefs.h"
3455/* System header to define __stub macros and hopefully few prototypes,
3456 which can conflict with char wctype(); below. */
3457#include <assert.h>
3458/* Override any gcc2 internal prototype to avoid an error. */
3459/* We use char because int might match the return type of a gcc2
3460 builtin and then its argument prototype would still apply. */
3461char wctype();
3462
3463int main() {
3464
3465/* The GNU C library defines this for functions which it implements
3466 to always fail with ENOSYS. Some functions are actually named
3467 something starting with __ and the normal name is an alias. */
3468#if defined (__stub_wctype) || defined (__stub___wctype)
3469choke me
3470#else
3471wctype();
3472#endif
3473
3474; return 0; }
3475EOF
030292b7 3476if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3477 rm -rf conftest*
3478 eval "ac_cv_func_wctype=yes"
3479else
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3482 rm -rf conftest*
3483 eval "ac_cv_func_wctype=no"
3484fi
3485rm -f conftest*
3486fi
3487
3488if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3489 echo "$ac_t""yes" 1>&6
3490 :
3491else
3492 echo "$ac_t""no" 1>&6
3493echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
030292b7 3494echo "configure:3495: checking for wctype in -lw" >&5
9a156167
MK
3495ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3496if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3497 echo $ac_n "(cached) $ac_c" 1>&6
3498else
3499 ac_save_LIBS="$LIBS"
3500LIBS="-lw $LIBS"
3501cat > conftest.$ac_ext <<EOF
030292b7 3502#line 3503 "configure"
9a156167
MK
3503#include "confdefs.h"
3504/* Override any gcc2 internal prototype to avoid an error. */
3505/* We use char because int might match the return type of a gcc2
3506 builtin and then its argument prototype would still apply. */
3507char wctype();
3508
3509int main() {
3510wctype()
3511; return 0; }
3512EOF
030292b7 3513if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3514 rm -rf conftest*
3515 eval "ac_cv_lib_$ac_lib_var=yes"
3516else
3517 echo "configure: failed program was:" >&5
3518 cat conftest.$ac_ext >&5
3519 rm -rf conftest*
3520 eval "ac_cv_lib_$ac_lib_var=no"
3521fi
3522rm -f conftest*
3523LIBS="$ac_save_LIBS"
3524
3525fi
3526if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3527 echo "$ac_t""yes" 1>&6
3528 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3529 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3530 cat >> confdefs.h <<EOF
3531#define $ac_tr_lib 1
3532EOF
3533
3534 LIBS="-lw $LIBS"
3535
3536else
3537 echo "$ac_t""no" 1>&6
3538fi
3539
3540fi
3541
3542
3543# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3544
3545echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
030292b7 3546echo "configure:3547: checking for library containing socketpair" >&5
9a156167
MK
3547if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3548 echo $ac_n "(cached) $ac_c" 1>&6
3549else
3550 ac_func_search_save_LIBS="$LIBS"
3551ac_cv_search_socketpair="no"
3552cat > conftest.$ac_ext <<EOF
030292b7 3553#line 3554 "configure"
9a156167
MK
3554#include "confdefs.h"
3555/* Override any gcc2 internal prototype to avoid an error. */
3556/* We use char because int might match the return type of a gcc2
3557 builtin and then its argument prototype would still apply. */
3558char socketpair();
3559
3560int main() {
3561socketpair()
3562; return 0; }
3563EOF
030292b7 3564if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3565 rm -rf conftest*
3566 ac_cv_search_socketpair="none required"
3567else
3568 echo "configure: failed program was:" >&5
3569 cat conftest.$ac_ext >&5
3570fi
3571rm -f conftest*
3572test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3573LIBS="-l$i $ac_func_search_save_LIBS"
3574cat > conftest.$ac_ext <<EOF
030292b7 3575#line 3576 "configure"
9a156167
MK
3576#include "confdefs.h"
3577/* Override any gcc2 internal prototype to avoid an error. */
3578/* We use char because int might match the return type of a gcc2
3579 builtin and then its argument prototype would still apply. */
3580char socketpair();
3581
3582int main() {
3583socketpair()
3584; return 0; }
3585EOF
030292b7 3586if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3587 rm -rf conftest*
3588 ac_cv_search_socketpair="-l$i"
3589break
3590else
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593fi
3594rm -f conftest*
3595done
3596LIBS="$ac_func_search_save_LIBS"
3597fi
3598
3599echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3600if test "$ac_cv_search_socketpair" != "no"; then
3601 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3602
3603else :
3604
3605fi
3606
06825bd1
MK
3607# Since GDB uses Readline, we need termcap functionality, so we need
3608# to find a library that provides that. When GDB is configured with
3609# --enable-tui, we need full curses functionality.
3610#
3611# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3612# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3613# Makefile fragments. That's why we need to have `Hcurses' before
3614# `curses'. I don't see why we should use HP curses if a more
3615# standard curses is available, except that according to HP's
3616# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3617# HP-UX 10.10 and 10.20.
3618
3619if test "$need_curses" = yes; then
3620
3621echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
030292b7 3622echo "configure:3623: checking for library containing initscr" >&5
06825bd1
MK
3623if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3624 echo $ac_n "(cached) $ac_c" 1>&6
3625else
3626 ac_func_search_save_LIBS="$LIBS"
3627ac_cv_search_initscr="no"
3628cat > conftest.$ac_ext <<EOF
030292b7 3629#line 3630 "configure"
06825bd1
MK
3630#include "confdefs.h"
3631/* Override any gcc2 internal prototype to avoid an error. */
3632/* We use char because int might match the return type of a gcc2
3633 builtin and then its argument prototype would still apply. */
3634char initscr();
3635
3636int main() {
3637initscr()
3638; return 0; }
3639EOF
030292b7 3640if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3641 rm -rf conftest*
3642 ac_cv_search_initscr="none required"
3643else
3644 echo "configure: failed program was:" >&5
3645 cat conftest.$ac_ext >&5
3646fi
3647rm -f conftest*
3648test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3649LIBS="-l$i $ac_func_search_save_LIBS"
3650cat > conftest.$ac_ext <<EOF
030292b7 3651#line 3652 "configure"
06825bd1
MK
3652#include "confdefs.h"
3653/* Override any gcc2 internal prototype to avoid an error. */
3654/* We use char because int might match the return type of a gcc2
3655 builtin and then its argument prototype would still apply. */
3656char initscr();
3657
3658int main() {
3659initscr()
3660; return 0; }
3661EOF
030292b7 3662if { (eval echo configure:3663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3663 rm -rf conftest*
3664 ac_cv_search_initscr="-l$i"
3665break
3666else
3667 echo "configure: failed program was:" >&5
3668 cat conftest.$ac_ext >&5
3669fi
3670rm -f conftest*
3671done
3672LIBS="$ac_func_search_save_LIBS"
3673fi
3674
3675echo "$ac_t""$ac_cv_search_initscr" 1>&6
3676if test "$ac_cv_search_initscr" != "no"; then
3677 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3678
3679else :
3680 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3681fi
3682fi
3683
3684case $host_os in
3685 cygwin*)
3686 if test -d $srcdir/libtermcap; then
3687 LIBS="../libtermcap/libtermcap.a $LIBS"
3688 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3689 fi ;;
3690 go32*)
3691 # ??? Is this really true?
3692 ac_cv_search_tgetent="none required"
3693 ;;
3694 aix*)
3695 # Readline prefers curses over termcap on AIX.
3696 # ??? Why?
3697
3698echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
030292b7 3699echo "configure:3700: checking for library containing tgetent" >&5
06825bd1
MK
3700if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3701 echo $ac_n "(cached) $ac_c" 1>&6
3702else
3703 ac_func_search_save_LIBS="$LIBS"
3704ac_cv_search_tgetent="no"
3705cat > conftest.$ac_ext <<EOF
030292b7 3706#line 3707 "configure"
06825bd1
MK
3707#include "confdefs.h"
3708/* Override any gcc2 internal prototype to avoid an error. */
3709/* We use char because int might match the return type of a gcc2
3710 builtin and then its argument prototype would still apply. */
3711char tgetent();
3712
3713int main() {
3714tgetent()
3715; return 0; }
3716EOF
030292b7 3717if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3718 rm -rf conftest*
3719 ac_cv_search_tgetent="none required"
3720else
3721 echo "configure: failed program was:" >&5
3722 cat conftest.$ac_ext >&5
3723fi
3724rm -f conftest*
3725test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3726LIBS="-l$i $ac_func_search_save_LIBS"
3727cat > conftest.$ac_ext <<EOF
030292b7 3728#line 3729 "configure"
06825bd1
MK
3729#include "confdefs.h"
3730/* Override any gcc2 internal prototype to avoid an error. */
3731/* We use char because int might match the return type of a gcc2
3732 builtin and then its argument prototype would still apply. */
3733char tgetent();
3734
3735int main() {
3736tgetent()
3737; return 0; }
3738EOF
030292b7 3739if { (eval echo configure:3740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3740 rm -rf conftest*
3741 ac_cv_search_tgetent="-l$i"
3742break
3743else
3744 echo "configure: failed program was:" >&5
3745 cat conftest.$ac_ext >&5
3746fi
3747rm -f conftest*
3748done
3749LIBS="$ac_func_search_save_LIBS"
3750fi
3751
3752echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3753if test "$ac_cv_search_tgetent" != "no"; then
3754 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3755
3756else :
3757
3758fi
3759 ;;
3760esac
3761
3762# Note: We used to check for libtermlib and libterminfo too, but
3763# Readline doesn't, so I think we're safe with leaving them out.
3764
3765echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
030292b7 3766echo "configure:3767: checking for library containing tgetent" >&5
06825bd1
MK
3767if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3768 echo $ac_n "(cached) $ac_c" 1>&6
3769else
3770 ac_func_search_save_LIBS="$LIBS"
3771ac_cv_search_tgetent="no"
3772cat > conftest.$ac_ext <<EOF
030292b7 3773#line 3774 "configure"
06825bd1
MK
3774#include "confdefs.h"
3775/* Override any gcc2 internal prototype to avoid an error. */
3776/* We use char because int might match the return type of a gcc2
3777 builtin and then its argument prototype would still apply. */
3778char tgetent();
3779
3780int main() {
3781tgetent()
3782; return 0; }
3783EOF
030292b7 3784if { (eval echo configure:3785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3785 rm -rf conftest*
3786 ac_cv_search_tgetent="none required"
3787else
3788 echo "configure: failed program was:" >&5
3789 cat conftest.$ac_ext >&5
3790fi
3791rm -f conftest*
3792test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3793LIBS="-l$i $ac_func_search_save_LIBS"
3794cat > conftest.$ac_ext <<EOF
030292b7 3795#line 3796 "configure"
06825bd1
MK
3796#include "confdefs.h"
3797/* Override any gcc2 internal prototype to avoid an error. */
3798/* We use char because int might match the return type of a gcc2
3799 builtin and then its argument prototype would still apply. */
3800char tgetent();
3801
3802int main() {
3803tgetent()
3804; return 0; }
3805EOF
030292b7 3806if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3807 rm -rf conftest*
3808 ac_cv_search_tgetent="-l$i"
3809break
3810else
3811 echo "configure: failed program was:" >&5
3812 cat conftest.$ac_ext >&5
3813fi
3814rm -f conftest*
3815done
3816LIBS="$ac_func_search_save_LIBS"
3817fi
3818
3819echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3820if test "$ac_cv_search_tgetent" != "no"; then
3821 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3822
3823else :
3824
3825fi
3826
3827if test "$ac_cv_search_tgetent" = no; then
3828 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3829fi
3830
5ee754fc
MK
3831# ------------------------- #
3832# Checks for header files. #
3833# ------------------------- #
3834
3835ac_header_dirent=no
3836for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3837do
3838ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3839echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
030292b7 3840echo "configure:3841: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3841if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3842 echo $ac_n "(cached) $ac_c" 1>&6
3843else
3844 cat > conftest.$ac_ext <<EOF
030292b7 3845#line 3846 "configure"
c906108c
SS
3846#include "confdefs.h"
3847#include <sys/types.h>
5ee754fc
MK
3848#include <$ac_hdr>
3849int main() {
3850DIR *dirp = 0;
3851; return 0; }
3852EOF
030292b7 3853if { (eval echo configure:3854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3854 rm -rf conftest*
3855 eval "ac_cv_header_dirent_$ac_safe=yes"
3856else
3857 echo "configure: failed program was:" >&5
3858 cat conftest.$ac_ext >&5
3859 rm -rf conftest*
3860 eval "ac_cv_header_dirent_$ac_safe=no"
3861fi
3862rm -f conftest*
3863fi
3864if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3865 echo "$ac_t""yes" 1>&6
3866 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3867 cat >> confdefs.h <<EOF
3868#define $ac_tr_hdr 1
3869EOF
3870 ac_header_dirent=$ac_hdr; break
3871else
3872 echo "$ac_t""no" 1>&6
3873fi
3874done
3875# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3876if test $ac_header_dirent = dirent.h; then
3877echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
030292b7 3878echo "configure:3879: checking for opendir in -ldir" >&5
5ee754fc
MK
3879ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3880if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3881 echo $ac_n "(cached) $ac_c" 1>&6
3882else
3883 ac_save_LIBS="$LIBS"
3884LIBS="-ldir $LIBS"
3885cat > conftest.$ac_ext <<EOF
030292b7 3886#line 3887 "configure"
5ee754fc
MK
3887#include "confdefs.h"
3888/* Override any gcc2 internal prototype to avoid an error. */
3889/* We use char because int might match the return type of a gcc2
3890 builtin and then its argument prototype would still apply. */
3891char opendir();
c906108c
SS
3892
3893int main() {
5ee754fc 3894opendir()
c906108c
SS
3895; return 0; }
3896EOF
030292b7 3897if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3898 rm -rf conftest*
5ee754fc 3899 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3900else
3901 echo "configure: failed program was:" >&5
3902 cat conftest.$ac_ext >&5
3903 rm -rf conftest*
5ee754fc 3904 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3905fi
3906rm -f conftest*
5ee754fc
MK
3907LIBS="$ac_save_LIBS"
3908
3909fi
3910if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3911 echo "$ac_t""yes" 1>&6
3912 LIBS="$LIBS -ldir"
3913else
3914 echo "$ac_t""no" 1>&6
c906108c
SS
3915fi
3916
5ee754fc
MK
3917else
3918echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
030292b7 3919echo "configure:3920: checking for opendir in -lx" >&5
5ee754fc
MK
3920ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3921if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3922 echo $ac_n "(cached) $ac_c" 1>&6
3923else
3924 ac_save_LIBS="$LIBS"
3925LIBS="-lx $LIBS"
3926cat > conftest.$ac_ext <<EOF
030292b7 3927#line 3928 "configure"
5ee754fc
MK
3928#include "confdefs.h"
3929/* Override any gcc2 internal prototype to avoid an error. */
3930/* We use char because int might match the return type of a gcc2
3931 builtin and then its argument prototype would still apply. */
3932char opendir();
3933
3934int main() {
3935opendir()
3936; return 0; }
c906108c 3937EOF
030292b7 3938if { (eval echo configure:3939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3939 rm -rf conftest*
3940 eval "ac_cv_lib_$ac_lib_var=yes"
3941else
3942 echo "configure: failed program was:" >&5
3943 cat conftest.$ac_ext >&5
3944 rm -rf conftest*
3945 eval "ac_cv_lib_$ac_lib_var=no"
3946fi
3947rm -f conftest*
3948LIBS="$ac_save_LIBS"
c906108c 3949
5ee754fc
MK
3950fi
3951if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3952 echo "$ac_t""yes" 1>&6
3953 LIBS="$LIBS -lx"
3954else
3955 echo "$ac_t""no" 1>&6
3956fi
c906108c 3957
5ee754fc 3958fi
c906108c 3959
5ee754fc 3960echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
030292b7 3961echo "configure:3962: checking whether stat file-mode macros are broken" >&5
5ee754fc 3962if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3963 echo $ac_n "(cached) $ac_c" 1>&6
3964else
3965 cat > conftest.$ac_ext <<EOF
030292b7 3966#line 3967 "configure"
9608ab8b
MK
3967#include "confdefs.h"
3968#include <sys/types.h>
5ee754fc
MK
3969#include <sys/stat.h>
3970
3971#if defined(S_ISBLK) && defined(S_IFDIR)
3972# if S_ISBLK (S_IFDIR)
3973You lose.
3974# endif
3975#endif
3976
3977#if defined(S_ISBLK) && defined(S_IFCHR)
3978# if S_ISBLK (S_IFCHR)
3979You lose.
3980# endif
3981#endif
3982
3983#if defined(S_ISLNK) && defined(S_IFREG)
3984# if S_ISLNK (S_IFREG)
3985You lose.
3986# endif
3987#endif
3988
3989#if defined(S_ISSOCK) && defined(S_IFREG)
3990# if S_ISSOCK (S_IFREG)
3991You lose.
3992# endif
3993#endif
3994
9608ab8b 3995EOF
5ee754fc
MK
3996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3997 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3998 rm -rf conftest*
5ee754fc
MK
3999 ac_cv_header_stat_broken=yes
4000else
4001 rm -rf conftest*
4002 ac_cv_header_stat_broken=no
4003fi
4004rm -f conftest*
4005
4006fi
4007
4008echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4009if test $ac_cv_header_stat_broken = yes; then
4010 cat >> confdefs.h <<\EOF
4011#define STAT_MACROS_BROKEN 1
4012EOF
4013
4014fi
4015
4016echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
030292b7 4017echo "configure:4018: checking for ANSI C header files" >&5
5ee754fc
MK
4018if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4019 echo $ac_n "(cached) $ac_c" 1>&6
4020else
4021 cat > conftest.$ac_ext <<EOF
030292b7 4022#line 4023 "configure"
5ee754fc
MK
4023#include "confdefs.h"
4024#include <stdlib.h>
4025#include <stdarg.h>
4026#include <string.h>
4027#include <float.h>
4028EOF
4029ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4030{ (eval echo configure:4031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4031ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4032if test -z "$ac_err"; then
4033 rm -rf conftest*
4034 ac_cv_header_stdc=yes
4035else
4036 echo "$ac_err" >&5
4037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
4039 rm -rf conftest*
4040 ac_cv_header_stdc=no
4041fi
4042rm -f conftest*
4043
4044if test $ac_cv_header_stdc = yes; then
4045 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4046cat > conftest.$ac_ext <<EOF
030292b7 4047#line 4048 "configure"
5ee754fc
MK
4048#include "confdefs.h"
4049#include <string.h>
4050EOF
4051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4052 egrep "memchr" >/dev/null 2>&1; then
4053 :
4054else
4055 rm -rf conftest*
4056 ac_cv_header_stdc=no
4057fi
4058rm -f conftest*
4059
4060fi
4061
4062if test $ac_cv_header_stdc = yes; then
4063 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4064cat > conftest.$ac_ext <<EOF
030292b7 4065#line 4066 "configure"
5ee754fc
MK
4066#include "confdefs.h"
4067#include <stdlib.h>
4068EOF
4069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4070 egrep "free" >/dev/null 2>&1; then
4071 :
4072else
4073 rm -rf conftest*
4074 ac_cv_header_stdc=no
4075fi
4076rm -f conftest*
4077
4078fi
4079
4080if test $ac_cv_header_stdc = yes; then
4081 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4082if test "$cross_compiling" = yes; then
4083 :
4084else
4085 cat > conftest.$ac_ext <<EOF
030292b7 4086#line 4087 "configure"
5ee754fc
MK
4087#include "confdefs.h"
4088#include <ctype.h>
4089#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4090#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4091#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4092int main () { int i; for (i = 0; i < 256; i++)
4093if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4094exit (0); }
4095
4096EOF
030292b7 4097if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4098then
4099 :
9608ab8b 4100else
5ee754fc
MK
4101 echo "configure: failed program was:" >&5
4102 cat conftest.$ac_ext >&5
4103 rm -fr conftest*
4104 ac_cv_header_stdc=no
4105fi
4106rm -fr conftest*
4107fi
4108
4109fi
4110fi
4111
4112echo "$ac_t""$ac_cv_header_stdc" 1>&6
4113if test $ac_cv_header_stdc = yes; then
4114 cat >> confdefs.h <<\EOF
4115#define STDC_HEADERS 1
4116EOF
4117
4118fi
4119
4120for ac_hdr in link.h
4121do
4122ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4123echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4124echo "configure:4125: checking for $ac_hdr" >&5
5ee754fc
MK
4125if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4126 echo $ac_n "(cached) $ac_c" 1>&6
4127else
4128 cat > conftest.$ac_ext <<EOF
030292b7 4129#line 4130 "configure"
5ee754fc
MK
4130#include "confdefs.h"
4131#include <$ac_hdr>
4132EOF
4133ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4134{ (eval echo configure:4135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4135ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4136if test -z "$ac_err"; then
4137 rm -rf conftest*
4138 eval "ac_cv_header_$ac_safe=yes"
4139else
4140 echo "$ac_err" >&5
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 rm -rf conftest*
4144 eval "ac_cv_header_$ac_safe=no"
4145fi
4146rm -f conftest*
4147fi
4148if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4149 echo "$ac_t""yes" 1>&6
4150 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4151 cat >> confdefs.h <<EOF
4152#define $ac_tr_hdr 1
4153EOF
4154
4155else
4156 echo "$ac_t""no" 1>&6
4157fi
4158done
4159
4160for ac_hdr in nlist.h
4161do
4162ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4163echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4164echo "configure:4165: checking for $ac_hdr" >&5
5ee754fc
MK
4165if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4166 echo $ac_n "(cached) $ac_c" 1>&6
4167else
4168 cat > conftest.$ac_ext <<EOF
030292b7 4169#line 4170 "configure"
5ee754fc
MK
4170#include "confdefs.h"
4171#include <$ac_hdr>
4172EOF
4173ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4174{ (eval echo configure:4175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4175ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4176if test -z "$ac_err"; then
4177 rm -rf conftest*
4178 eval "ac_cv_header_$ac_safe=yes"
4179else
4180 echo "$ac_err" >&5
4181 echo "configure: failed program was:" >&5
4182 cat conftest.$ac_ext >&5
4183 rm -rf conftest*
4184 eval "ac_cv_header_$ac_safe=no"
4185fi
4186rm -f conftest*
4187fi
4188if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4189 echo "$ac_t""yes" 1>&6
4190 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4191 cat >> confdefs.h <<EOF
4192#define $ac_tr_hdr 1
4193EOF
4194
4195else
4196 echo "$ac_t""no" 1>&6
4197fi
4198done
4199
4200for ac_hdr in poll.h sys/poll.h
4201do
4202ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4203echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4204echo "configure:4205: checking for $ac_hdr" >&5
5ee754fc
MK
4205if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4206 echo $ac_n "(cached) $ac_c" 1>&6
4207else
4208 cat > conftest.$ac_ext <<EOF
030292b7 4209#line 4210 "configure"
5ee754fc
MK
4210#include "confdefs.h"
4211#include <$ac_hdr>
4212EOF
4213ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4214{ (eval echo configure:4215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4215ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4216if test -z "$ac_err"; then
4217 rm -rf conftest*
4218 eval "ac_cv_header_$ac_safe=yes"
4219else
4220 echo "$ac_err" >&5
4221 echo "configure: failed program was:" >&5
4222 cat conftest.$ac_ext >&5
4223 rm -rf conftest*
4224 eval "ac_cv_header_$ac_safe=no"
4225fi
4226rm -f conftest*
4227fi
4228if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4229 echo "$ac_t""yes" 1>&6
4230 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4231 cat >> confdefs.h <<EOF
4232#define $ac_tr_hdr 1
4233EOF
4234
4235else
4236 echo "$ac_t""no" 1>&6
4237fi
4238done
4239
4240for ac_hdr in proc_service.h thread_db.h
4241do
4242ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4243echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4244echo "configure:4245: checking for $ac_hdr" >&5
5ee754fc
MK
4245if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4246 echo $ac_n "(cached) $ac_c" 1>&6
4247else
4248 cat > conftest.$ac_ext <<EOF
030292b7 4249#line 4250 "configure"
5ee754fc
MK
4250#include "confdefs.h"
4251#include <$ac_hdr>
4252EOF
4253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4254{ (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4255ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4256if test -z "$ac_err"; then
4257 rm -rf conftest*
4258 eval "ac_cv_header_$ac_safe=yes"
4259else
4260 echo "$ac_err" >&5
4261 echo "configure: failed program was:" >&5
4262 cat conftest.$ac_ext >&5
4263 rm -rf conftest*
4264 eval "ac_cv_header_$ac_safe=no"
4265fi
4266rm -f conftest*
4267fi
4268if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4269 echo "$ac_t""yes" 1>&6
4270 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4271 cat >> confdefs.h <<EOF
4272#define $ac_tr_hdr 1
4273EOF
4274
4275else
4276 echo "$ac_t""no" 1>&6
4277fi
4278done
4279
4280for ac_hdr in stddef.h
4281do
4282ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4283echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4284echo "configure:4285: checking for $ac_hdr" >&5
5ee754fc
MK
4285if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4286 echo $ac_n "(cached) $ac_c" 1>&6
4287else
4288 cat > conftest.$ac_ext <<EOF
030292b7 4289#line 4290 "configure"
5ee754fc
MK
4290#include "confdefs.h"
4291#include <$ac_hdr>
4292EOF
4293ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4294{ (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4295ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4296if test -z "$ac_err"; then
4297 rm -rf conftest*
4298 eval "ac_cv_header_$ac_safe=yes"
4299else
4300 echo "$ac_err" >&5
4301 echo "configure: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303 rm -rf conftest*
4304 eval "ac_cv_header_$ac_safe=no"
4305fi
4306rm -f conftest*
4307fi
4308if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4309 echo "$ac_t""yes" 1>&6
4310 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4311 cat >> confdefs.h <<EOF
4312#define $ac_tr_hdr 1
4313EOF
4314
4315else
4316 echo "$ac_t""no" 1>&6
4317fi
4318done
4319
4320for ac_hdr in stdlib.h
4321do
4322ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4323echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4324echo "configure:4325: checking for $ac_hdr" >&5
5ee754fc
MK
4325if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4326 echo $ac_n "(cached) $ac_c" 1>&6
4327else
4328 cat > conftest.$ac_ext <<EOF
030292b7 4329#line 4330 "configure"
5ee754fc
MK
4330#include "confdefs.h"
4331#include <$ac_hdr>
4332EOF
4333ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4334{ (eval echo configure:4335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4335ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4336if test -z "$ac_err"; then
4337 rm -rf conftest*
4338 eval "ac_cv_header_$ac_safe=yes"
4339else
4340 echo "$ac_err" >&5
4341 echo "configure: failed program was:" >&5
4342 cat conftest.$ac_ext >&5
4343 rm -rf conftest*
4344 eval "ac_cv_header_$ac_safe=no"
4345fi
4346rm -f conftest*
4347fi
4348if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4349 echo "$ac_t""yes" 1>&6
4350 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4351 cat >> confdefs.h <<EOF
4352#define $ac_tr_hdr 1
4353EOF
4354
4355else
4356 echo "$ac_t""no" 1>&6
4357fi
4358done
4359
4360for ac_hdr in stdint.h
4361do
4362ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4363echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4364echo "configure:4365: checking for $ac_hdr" >&5
5ee754fc
MK
4365if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4366 echo $ac_n "(cached) $ac_c" 1>&6
4367else
4368 cat > conftest.$ac_ext <<EOF
030292b7 4369#line 4370 "configure"
5ee754fc
MK
4370#include "confdefs.h"
4371#include <$ac_hdr>
4372EOF
4373ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4374{ (eval echo configure:4375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4375ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4376if test -z "$ac_err"; then
4377 rm -rf conftest*
4378 eval "ac_cv_header_$ac_safe=yes"
4379else
4380 echo "$ac_err" >&5
4381 echo "configure: failed program was:" >&5
4382 cat conftest.$ac_ext >&5
4383 rm -rf conftest*
4384 eval "ac_cv_header_$ac_safe=no"
4385fi
4386rm -f conftest*
4387fi
4388if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4389 echo "$ac_t""yes" 1>&6
4390 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4391 cat >> confdefs.h <<EOF
4392#define $ac_tr_hdr 1
4393EOF
4394
4395else
4396 echo "$ac_t""no" 1>&6
4397fi
4398done
4399
4400for ac_hdr in string.h memory.h strings.h
4401do
4402ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4403echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4404echo "configure:4405: checking for $ac_hdr" >&5
5ee754fc
MK
4405if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4406 echo $ac_n "(cached) $ac_c" 1>&6
4407else
4408 cat > conftest.$ac_ext <<EOF
030292b7 4409#line 4410 "configure"
5ee754fc
MK
4410#include "confdefs.h"
4411#include <$ac_hdr>
4412EOF
4413ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4414{ (eval echo configure:4415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4415ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4416if test -z "$ac_err"; then
4417 rm -rf conftest*
4418 eval "ac_cv_header_$ac_safe=yes"
4419else
4420 echo "$ac_err" >&5
4421 echo "configure: failed program was:" >&5
4422 cat conftest.$ac_ext >&5
4423 rm -rf conftest*
4424 eval "ac_cv_header_$ac_safe=no"
4425fi
4426rm -f conftest*
4427fi
4428if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4429 echo "$ac_t""yes" 1>&6
4430 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4431 cat >> confdefs.h <<EOF
4432#define $ac_tr_hdr 1
4433EOF
4434
4435else
4436 echo "$ac_t""no" 1>&6
4437fi
4438done
4439
4440for ac_hdr in sys/fault.h
4441do
4442ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4443echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4444echo "configure:4445: checking for $ac_hdr" >&5
5ee754fc
MK
4445if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4446 echo $ac_n "(cached) $ac_c" 1>&6
4447else
4448 cat > conftest.$ac_ext <<EOF
030292b7 4449#line 4450 "configure"
5ee754fc
MK
4450#include "confdefs.h"
4451#include <$ac_hdr>
4452EOF
4453ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4454{ (eval echo configure:4455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4455ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4456if test -z "$ac_err"; then
4457 rm -rf conftest*
4458 eval "ac_cv_header_$ac_safe=yes"
4459else
4460 echo "$ac_err" >&5
4461 echo "configure: failed program was:" >&5
4462 cat conftest.$ac_ext >&5
4463 rm -rf conftest*
4464 eval "ac_cv_header_$ac_safe=no"
4465fi
4466rm -f conftest*
4467fi
4468if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4469 echo "$ac_t""yes" 1>&6
4470 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4471 cat >> confdefs.h <<EOF
4472#define $ac_tr_hdr 1
4473EOF
4474
4475else
4476 echo "$ac_t""no" 1>&6
4477fi
4478done
4479
4480for ac_hdr in sys/file.h
4481do
4482ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4483echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4484echo "configure:4485: checking for $ac_hdr" >&5
5ee754fc
MK
4485if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4486 echo $ac_n "(cached) $ac_c" 1>&6
4487else
4488 cat > conftest.$ac_ext <<EOF
030292b7 4489#line 4490 "configure"
5ee754fc
MK
4490#include "confdefs.h"
4491#include <$ac_hdr>
4492EOF
4493ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4494{ (eval echo configure:4495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4495ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4496if test -z "$ac_err"; then
4497 rm -rf conftest*
4498 eval "ac_cv_header_$ac_safe=yes"
4499else
4500 echo "$ac_err" >&5
4501 echo "configure: failed program was:" >&5
4502 cat conftest.$ac_ext >&5
4503 rm -rf conftest*
4504 eval "ac_cv_header_$ac_safe=no"
4505fi
4506rm -f conftest*
4507fi
4508if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4509 echo "$ac_t""yes" 1>&6
4510 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4511 cat >> confdefs.h <<EOF
4512#define $ac_tr_hdr 1
4513EOF
4514
4515else
4516 echo "$ac_t""no" 1>&6
4517fi
4518done
4519
4520for ac_hdr in sys/filio.h
4521do
4522ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4523echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4524echo "configure:4525: checking for $ac_hdr" >&5
5ee754fc
MK
4525if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4526 echo $ac_n "(cached) $ac_c" 1>&6
4527else
4528 cat > conftest.$ac_ext <<EOF
030292b7 4529#line 4530 "configure"
5ee754fc
MK
4530#include "confdefs.h"
4531#include <$ac_hdr>
4532EOF
4533ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4534{ (eval echo configure:4535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4535ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4536if test -z "$ac_err"; then
4537 rm -rf conftest*
4538 eval "ac_cv_header_$ac_safe=yes"
4539else
4540 echo "$ac_err" >&5
4541 echo "configure: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4543 rm -rf conftest*
4544 eval "ac_cv_header_$ac_safe=no"
4545fi
4546rm -f conftest*
4547fi
4548if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4549 echo "$ac_t""yes" 1>&6
4550 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4551 cat >> confdefs.h <<EOF
4552#define $ac_tr_hdr 1
4553EOF
4554
4555else
4556 echo "$ac_t""no" 1>&6
4557fi
4558done
4559
4560for ac_hdr in sys/ioctl.h
4561do
4562ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4563echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4564echo "configure:4565: checking for $ac_hdr" >&5
5ee754fc
MK
4565if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4566 echo $ac_n "(cached) $ac_c" 1>&6
4567else
4568 cat > conftest.$ac_ext <<EOF
030292b7 4569#line 4570 "configure"
5ee754fc
MK
4570#include "confdefs.h"
4571#include <$ac_hdr>
4572EOF
4573ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4574{ (eval echo configure:4575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4575ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4576if test -z "$ac_err"; then
4577 rm -rf conftest*
4578 eval "ac_cv_header_$ac_safe=yes"
4579else
4580 echo "$ac_err" >&5
4581 echo "configure: failed program was:" >&5
4582 cat conftest.$ac_ext >&5
4583 rm -rf conftest*
4584 eval "ac_cv_header_$ac_safe=no"
4585fi
4586rm -f conftest*
4587fi
4588if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4589 echo "$ac_t""yes" 1>&6
4590 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4591 cat >> confdefs.h <<EOF
4592#define $ac_tr_hdr 1
4593EOF
4594
4595else
4596 echo "$ac_t""no" 1>&6
4597fi
4598done
4599
4600for ac_hdr in sys/param.h
4601do
4602ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4603echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4604echo "configure:4605: checking for $ac_hdr" >&5
5ee754fc
MK
4605if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4606 echo $ac_n "(cached) $ac_c" 1>&6
4607else
4608 cat > conftest.$ac_ext <<EOF
030292b7 4609#line 4610 "configure"
5ee754fc
MK
4610#include "confdefs.h"
4611#include <$ac_hdr>
4612EOF
4613ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4614{ (eval echo configure:4615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4615ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4616if test -z "$ac_err"; then
4617 rm -rf conftest*
4618 eval "ac_cv_header_$ac_safe=yes"
4619else
4620 echo "$ac_err" >&5
4621 echo "configure: failed program was:" >&5
4622 cat conftest.$ac_ext >&5
4623 rm -rf conftest*
4624 eval "ac_cv_header_$ac_safe=no"
4625fi
4626rm -f conftest*
4627fi
4628if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4629 echo "$ac_t""yes" 1>&6
4630 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4631 cat >> confdefs.h <<EOF
4632#define $ac_tr_hdr 1
4633EOF
4634
4635else
4636 echo "$ac_t""no" 1>&6
4637fi
4638done
4639
4640for ac_hdr in sys/proc.h
4641do
4642ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4643echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4644echo "configure:4645: checking for $ac_hdr" >&5
5ee754fc
MK
4645if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4646 echo $ac_n "(cached) $ac_c" 1>&6
4647else
4648 cat > conftest.$ac_ext <<EOF
030292b7 4649#line 4650 "configure"
5ee754fc
MK
4650#include "confdefs.h"
4651#include <$ac_hdr>
4652EOF
4653ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4654{ (eval echo configure:4655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4655ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4656if test -z "$ac_err"; then
4657 rm -rf conftest*
4658 eval "ac_cv_header_$ac_safe=yes"
4659else
4660 echo "$ac_err" >&5
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 eval "ac_cv_header_$ac_safe=no"
4665fi
4666rm -f conftest*
4667fi
4668if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4669 echo "$ac_t""yes" 1>&6
4670 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4671 cat >> confdefs.h <<EOF
4672#define $ac_tr_hdr 1
4673EOF
4674
4675else
4676 echo "$ac_t""no" 1>&6
4677fi
4678done
4679
4680for ac_hdr in sys/procfs.h
4681do
4682ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4683echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4684echo "configure:4685: checking for $ac_hdr" >&5
5ee754fc
MK
4685if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4686 echo $ac_n "(cached) $ac_c" 1>&6
4687else
4688 cat > conftest.$ac_ext <<EOF
030292b7 4689#line 4690 "configure"
5ee754fc
MK
4690#include "confdefs.h"
4691#include <$ac_hdr>
4692EOF
4693ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4694{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4695ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4696if test -z "$ac_err"; then
4697 rm -rf conftest*
4698 eval "ac_cv_header_$ac_safe=yes"
4699else
4700 echo "$ac_err" >&5
4701 echo "configure: failed program was:" >&5
4702 cat conftest.$ac_ext >&5
4703 rm -rf conftest*
4704 eval "ac_cv_header_$ac_safe=no"
4705fi
4706rm -f conftest*
4707fi
4708if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4709 echo "$ac_t""yes" 1>&6
4710 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4711 cat >> confdefs.h <<EOF
4712#define $ac_tr_hdr 1
4713EOF
4714
4715else
4716 echo "$ac_t""no" 1>&6
4717fi
4718done
4719
4720for ac_hdr in sys/ptrace.h ptrace.h
4721do
4722ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4723echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4724echo "configure:4725: checking for $ac_hdr" >&5
5ee754fc
MK
4725if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4726 echo $ac_n "(cached) $ac_c" 1>&6
4727else
4728 cat > conftest.$ac_ext <<EOF
030292b7 4729#line 4730 "configure"
5ee754fc
MK
4730#include "confdefs.h"
4731#include <$ac_hdr>
4732EOF
4733ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4734{ (eval echo configure:4735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4735ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4736if test -z "$ac_err"; then
4737 rm -rf conftest*
4738 eval "ac_cv_header_$ac_safe=yes"
4739else
4740 echo "$ac_err" >&5
4741 echo "configure: failed program was:" >&5
4742 cat conftest.$ac_ext >&5
4743 rm -rf conftest*
4744 eval "ac_cv_header_$ac_safe=no"
4745fi
4746rm -f conftest*
4747fi
4748if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4749 echo "$ac_t""yes" 1>&6
4750 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4751 cat >> confdefs.h <<EOF
4752#define $ac_tr_hdr 1
4753EOF
4754
4755else
4756 echo "$ac_t""no" 1>&6
4757fi
4758done
4759
4760for ac_hdr in sys/reg.h sys/debugreg.h
4761do
4762ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4763echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4764echo "configure:4765: checking for $ac_hdr" >&5
5ee754fc
MK
4765if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4766 echo $ac_n "(cached) $ac_c" 1>&6
4767else
4768 cat > conftest.$ac_ext <<EOF
030292b7 4769#line 4770 "configure"
5ee754fc
MK
4770#include "confdefs.h"
4771#include <$ac_hdr>
4772EOF
4773ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4774{ (eval echo configure:4775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4775ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4776if test -z "$ac_err"; then
4777 rm -rf conftest*
4778 eval "ac_cv_header_$ac_safe=yes"
4779else
4780 echo "$ac_err" >&5
4781 echo "configure: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 rm -rf conftest*
4784 eval "ac_cv_header_$ac_safe=no"
4785fi
4786rm -f conftest*
4787fi
4788if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4789 echo "$ac_t""yes" 1>&6
4790 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4791 cat >> confdefs.h <<EOF
4792#define $ac_tr_hdr 1
4793EOF
4794
4795else
4796 echo "$ac_t""no" 1>&6
4797fi
4798done
4799
4800for ac_hdr in sys/select.h
4801do
4802ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4803echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4804echo "configure:4805: checking for $ac_hdr" >&5
5ee754fc
MK
4805if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4806 echo $ac_n "(cached) $ac_c" 1>&6
4807else
4808 cat > conftest.$ac_ext <<EOF
030292b7 4809#line 4810 "configure"
5ee754fc
MK
4810#include "confdefs.h"
4811#include <$ac_hdr>
4812EOF
4813ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4814{ (eval echo configure:4815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4815ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4816if test -z "$ac_err"; then
4817 rm -rf conftest*
4818 eval "ac_cv_header_$ac_safe=yes"
4819else
4820 echo "$ac_err" >&5
4821 echo "configure: failed program was:" >&5
4822 cat conftest.$ac_ext >&5
4823 rm -rf conftest*
4824 eval "ac_cv_header_$ac_safe=no"
4825fi
4826rm -f conftest*
4827fi
4828if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4829 echo "$ac_t""yes" 1>&6
4830 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4831 cat >> confdefs.h <<EOF
4832#define $ac_tr_hdr 1
4833EOF
4834
4835else
4836 echo "$ac_t""no" 1>&6
4837fi
4838done
4839
4840for ac_hdr in sys/syscall.h
4841do
4842ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4843echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4844echo "configure:4845: checking for $ac_hdr" >&5
5ee754fc
MK
4845if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4846 echo $ac_n "(cached) $ac_c" 1>&6
4847else
4848 cat > conftest.$ac_ext <<EOF
030292b7 4849#line 4850 "configure"
5ee754fc
MK
4850#include "confdefs.h"
4851#include <$ac_hdr>
4852EOF
4853ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4854{ (eval echo configure:4855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4855ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4856if test -z "$ac_err"; then
4857 rm -rf conftest*
4858 eval "ac_cv_header_$ac_safe=yes"
4859else
4860 echo "$ac_err" >&5
4861 echo "configure: failed program was:" >&5
4862 cat conftest.$ac_ext >&5
4863 rm -rf conftest*
4864 eval "ac_cv_header_$ac_safe=no"
4865fi
4866rm -f conftest*
4867fi
4868if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4869 echo "$ac_t""yes" 1>&6
4870 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4871 cat >> confdefs.h <<EOF
4872#define $ac_tr_hdr 1
4873EOF
4874
4875else
4876 echo "$ac_t""no" 1>&6
4877fi
4878done
4879
4880for ac_hdr in sys/user.h
4881do
4882ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4883echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4884echo "configure:4885: checking for $ac_hdr" >&5
5ee754fc
MK
4885if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4886 echo $ac_n "(cached) $ac_c" 1>&6
4887else
4888 cat > conftest.$ac_ext <<EOF
030292b7 4889#line 4890 "configure"
5ee754fc
MK
4890#include "confdefs.h"
4891#include <$ac_hdr>
4892EOF
4893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4894{ (eval echo configure:4895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4896if test -z "$ac_err"; then
4897 rm -rf conftest*
4898 eval "ac_cv_header_$ac_safe=yes"
4899else
4900 echo "$ac_err" >&5
4901 echo "configure: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4903 rm -rf conftest*
4904 eval "ac_cv_header_$ac_safe=no"
4905fi
4906rm -f conftest*
4907fi
4908if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4909 echo "$ac_t""yes" 1>&6
4910 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4911 cat >> confdefs.h <<EOF
4912#define $ac_tr_hdr 1
4913EOF
4914
4915else
4916 echo "$ac_t""no" 1>&6
4917fi
4918done
4919
4920for ac_hdr in sys/wait.h wait.h
4921do
4922ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4923echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4924echo "configure:4925: checking for $ac_hdr" >&5
5ee754fc
MK
4925if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4926 echo $ac_n "(cached) $ac_c" 1>&6
4927else
4928 cat > conftest.$ac_ext <<EOF
030292b7 4929#line 4930 "configure"
5ee754fc
MK
4930#include "confdefs.h"
4931#include <$ac_hdr>
4932EOF
4933ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4934{ (eval echo configure:4935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4935ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4936if test -z "$ac_err"; then
4937 rm -rf conftest*
4938 eval "ac_cv_header_$ac_safe=yes"
4939else
4940 echo "$ac_err" >&5
9608ab8b
MK
4941 echo "configure: failed program was:" >&5
4942 cat conftest.$ac_ext >&5
4943 rm -rf conftest*
5ee754fc 4944 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4945fi
4946rm -f conftest*
4947fi
5ee754fc 4948if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4949 echo "$ac_t""yes" 1>&6
4950 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4951 cat >> confdefs.h <<EOF
4952#define $ac_tr_hdr 1
4953EOF
5ee754fc 4954
9608ab8b
MK
4955else
4956 echo "$ac_t""no" 1>&6
4957fi
4958done
5ee754fc
MK
4959
4960for ac_hdr in termios.h termio.h sgtty.h
4961do
4962ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4963echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 4964echo "configure:4965: checking for $ac_hdr" >&5
5ee754fc 4965if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4966 echo $ac_n "(cached) $ac_c" 1>&6
4967else
5ee754fc 4968 cat > conftest.$ac_ext <<EOF
030292b7 4969#line 4970 "configure"
9608ab8b 4970#include "confdefs.h"
5ee754fc 4971#include <$ac_hdr>
9608ab8b 4972EOF
5ee754fc 4973ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 4974{ (eval echo configure:4975: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4975ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4976if test -z "$ac_err"; then
9608ab8b 4977 rm -rf conftest*
5ee754fc 4978 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4979else
5ee754fc 4980 echo "$ac_err" >&5
9608ab8b
MK
4981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 rm -rf conftest*
5ee754fc 4984 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4985fi
4986rm -f conftest*
9608ab8b 4987fi
5ee754fc 4988if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4989 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4990 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4991 cat >> confdefs.h <<EOF
4992#define $ac_tr_hdr 1
4993EOF
4994
9608ab8b
MK
4995else
4996 echo "$ac_t""no" 1>&6
4997fi
5ee754fc 4998done
9608ab8b 4999
5ee754fc
MK
5000for ac_hdr in unistd.h
5001do
5002ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5003echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 5004echo "configure:5005: checking for $ac_hdr" >&5
5ee754fc 5005if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5006 echo $ac_n "(cached) $ac_c" 1>&6
5007else
5ee754fc 5008 cat > conftest.$ac_ext <<EOF
030292b7 5009#line 5010 "configure"
9608ab8b 5010#include "confdefs.h"
5ee754fc 5011#include <$ac_hdr>
9608ab8b 5012EOF
5ee754fc 5013ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 5014{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5015ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5016if test -z "$ac_err"; then
9608ab8b 5017 rm -rf conftest*
5ee754fc 5018 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5019else
5ee754fc 5020 echo "$ac_err" >&5
9608ab8b
MK
5021 echo "configure: failed program was:" >&5
5022 cat conftest.$ac_ext >&5
5023 rm -rf conftest*
5ee754fc 5024 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5025fi
5026rm -f conftest*
9608ab8b 5027fi
5ee754fc 5028if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5029 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5030 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5031 cat >> confdefs.h <<EOF
5032#define $ac_tr_hdr 1
5033EOF
5034
9608ab8b
MK
5035else
5036 echo "$ac_t""no" 1>&6
5037fi
5ee754fc 5038done
9608ab8b 5039
9608ab8b 5040
5ee754fc
MK
5041# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5042# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5043# think that we don't have <curses.h> if we're using GCC.
5044case $host_os in
5045 solaris2.[78])
5046 if test "$GCC" = yes; then
5047 cat >> confdefs.h <<\EOF
5048#define _MSE_INT_H 1
5049EOF
5050
5051 fi ;;
5052esac
5053for ac_hdr in curses.h ncurses.h term.h
5054do
5055ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5056echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 5057echo "configure:5058: checking for $ac_hdr" >&5
5ee754fc 5058if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5059 echo $ac_n "(cached) $ac_c" 1>&6
5060else
5061 cat > conftest.$ac_ext <<EOF
030292b7 5062#line 5063 "configure"
c906108c 5063#include "confdefs.h"
5ee754fc 5064#include <$ac_hdr>
c906108c
SS
5065EOF
5066ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 5067{ (eval echo configure:5068: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5068ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5069if test -z "$ac_err"; then
5070 rm -rf conftest*
5ee754fc 5071 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5072else
5073 echo "$ac_err" >&5
5074 echo "configure: failed program was:" >&5
5075 cat conftest.$ac_ext >&5
5076 rm -rf conftest*
5ee754fc 5077 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5078fi
5079rm -f conftest*
c906108c 5080fi
5ee754fc
MK
5081if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5082 echo "$ac_t""yes" 1>&6
5083 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5084 cat >> confdefs.h <<EOF
5085#define $ac_tr_hdr 1
c906108c 5086EOF
5ee754fc 5087
c906108c 5088else
5ee754fc 5089 echo "$ac_t""no" 1>&6
c906108c 5090fi
5ee754fc 5091done
c906108c
SS
5092
5093
5ee754fc
MK
5094# FIXME: kettenis/20030102: In most cases we include these
5095# unconditionally, so what's the point in checking these?
5096for ac_hdr in ctype.h time.h
c906108c
SS
5097do
5098ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5099echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 5100echo "configure:5101: checking for $ac_hdr" >&5
c906108c
SS
5101if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5102 echo $ac_n "(cached) $ac_c" 1>&6
5103else
5104 cat > conftest.$ac_ext <<EOF
030292b7 5105#line 5106 "configure"
c906108c
SS
5106#include "confdefs.h"
5107#include <$ac_hdr>
5108EOF
5109ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 5110{ (eval echo configure:5111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5111ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5112if test -z "$ac_err"; then
5113 rm -rf conftest*
5114 eval "ac_cv_header_$ac_safe=yes"
5115else
5116 echo "$ac_err" >&5
5117 echo "configure: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 rm -rf conftest*
5120 eval "ac_cv_header_$ac_safe=no"
5121fi
5122rm -f conftest*
5123fi
5124if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5125 echo "$ac_t""yes" 1>&6
5126 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5127 cat >> confdefs.h <<EOF
5128#define $ac_tr_hdr 1
5129EOF
5130
5131else
5132 echo "$ac_t""no" 1>&6
5133fi
5134done
5135
5ee754fc
MK
5136
5137# ------------------ #
5138# Checks for types. #
5139# ------------------ #
5140
5141echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
030292b7 5142echo "configure:5143: checking return type of signal handlers" >&5
5ee754fc 5143if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5144 echo $ac_n "(cached) $ac_c" 1>&6
5145else
5146 cat > conftest.$ac_ext <<EOF
030292b7 5147#line 5148 "configure"
c906108c
SS
5148#include "confdefs.h"
5149#include <sys/types.h>
5ee754fc
MK
5150#include <signal.h>
5151#ifdef signal
5152#undef signal
c906108c 5153#endif
5ee754fc
MK
5154#ifdef __cplusplus
5155extern "C" void (*signal (int, void (*)(int)))(int);
5156#else
5157void (*signal ()) ();
c906108c
SS
5158#endif
5159
5ee754fc
MK
5160int main() {
5161int i;
5162; return 0; }
c906108c 5163EOF
030292b7 5164if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5165 rm -rf conftest*
5ee754fc 5166 ac_cv_type_signal=void
c906108c 5167else
5ee754fc
MK
5168 echo "configure: failed program was:" >&5
5169 cat conftest.$ac_ext >&5
c906108c 5170 rm -rf conftest*
5ee754fc 5171 ac_cv_type_signal=int
c906108c
SS
5172fi
5173rm -f conftest*
c906108c
SS
5174fi
5175
5ee754fc
MK
5176echo "$ac_t""$ac_cv_type_signal" 1>&6
5177cat >> confdefs.h <<EOF
5178#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5179EOF
5180
c906108c
SS
5181
5182
5ee754fc
MK
5183# ------------------------------------- #
5184# Checks for compiler characteristics. #
5185# ------------------------------------- #
5186
c906108c 5187echo $ac_n "checking for working const""... $ac_c" 1>&6
030292b7 5188echo "configure:5189: checking for working const" >&5
c906108c
SS
5189if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5190 echo $ac_n "(cached) $ac_c" 1>&6
5191else
5192 cat > conftest.$ac_ext <<EOF
030292b7 5193#line 5194 "configure"
c906108c
SS
5194#include "confdefs.h"
5195
5196int main() {
5197
5198/* Ultrix mips cc rejects this. */
5199typedef int charset[2]; const charset x;
5200/* SunOS 4.1.1 cc rejects this. */
5201char const *const *ccp;
5202char **p;
5203/* NEC SVR4.0.2 mips cc rejects this. */
5204struct point {int x, y;};
5205static struct point const zero = {0,0};
5206/* AIX XL C 1.02.0.0 rejects this.
5207 It does not let you subtract one const X* pointer from another in an arm
5208 of an if-expression whose if-part is not a constant expression */
5209const char *g = "string";
5210ccp = &g + (g ? g-g : 0);
5211/* HPUX 7.0 cc rejects these. */
5212++ccp;
5213p = (char**) ccp;
5214ccp = (char const *const *) p;
5215{ /* SCO 3.2v4 cc rejects this. */
5216 char *t;
5217 char const *s = 0 ? (char *) 0 : (char const *) 0;
5218
5219 *t++ = 0;
5220}
5221{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5222 int x[] = {25, 17};
5223 const int *foo = &x[0];
5224 ++foo;
5225}
5226{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5227 typedef const int *iptr;
5228 iptr p = 0;
5229 ++p;
5230}
5231{ /* AIX XL C 1.02.0.0 rejects this saying
5232 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5233 struct s { int j; const int *ap[3]; };
5234 struct s *b; b->j = 5;
5235}
5236{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5237 const int foo = 10;
5238}
5239
5240; return 0; }
5241EOF
030292b7 5242if { (eval echo configure:5243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5243 rm -rf conftest*
5244 ac_cv_c_const=yes
5245else
5246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 rm -rf conftest*
5249 ac_cv_c_const=no
5250fi
5251rm -f conftest*
5252fi
5253
5254echo "$ac_t""$ac_cv_c_const" 1>&6
5255if test $ac_cv_c_const = no; then
5256 cat >> confdefs.h <<\EOF
5257#define const
5258EOF
5259
5260fi
5261
bce58c09 5262echo $ac_n "checking for inline""... $ac_c" 1>&6
030292b7 5263echo "configure:5264: checking for inline" >&5
bce58c09
JB
5264if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5265 echo $ac_n "(cached) $ac_c" 1>&6
5266else
5267 ac_cv_c_inline=no
5268for ac_kw in inline __inline__ __inline; do
5269 cat > conftest.$ac_ext <<EOF
030292b7 5270#line 5271 "configure"
bce58c09
JB
5271#include "confdefs.h"
5272
5273int main() {
5274} $ac_kw foo() {
5275; return 0; }
5276EOF
030292b7 5277if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5278 rm -rf conftest*
5279 ac_cv_c_inline=$ac_kw; break
5280else
5281 echo "configure: failed program was:" >&5
5282 cat conftest.$ac_ext >&5
5283fi
5284rm -f conftest*
5285done
5286
5287fi
5288
5289echo "$ac_t""$ac_cv_c_inline" 1>&6
5290case "$ac_cv_c_inline" in
5291 inline | yes) ;;
5292 no) cat >> confdefs.h <<\EOF
5293#define inline
5294EOF
5295 ;;
5296 *) cat >> confdefs.h <<EOF
5297#define inline $ac_cv_c_inline
5298EOF
5299 ;;
5300esac
5301
c906108c 5302
5ee754fc
MK
5303# ------------------------------ #
5304# Checks for library functions. #
5305# ------------------------------ #
5306
46711df8
MK
5307# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5308# for constant arguments. Useless!
5309echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
030292b7 5310echo "configure:5311: checking for working alloca.h" >&5
46711df8
MK
5311if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5312 echo $ac_n "(cached) $ac_c" 1>&6
5313else
5314 cat > conftest.$ac_ext <<EOF
030292b7 5315#line 5316 "configure"
46711df8
MK
5316#include "confdefs.h"
5317#include <alloca.h>
5318int main() {
5319char *p = alloca(2 * sizeof(int));
5320; return 0; }
5321EOF
030292b7 5322if { (eval echo configure:5323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5323 rm -rf conftest*
5324 ac_cv_header_alloca_h=yes
5325else
5326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 rm -rf conftest*
5329 ac_cv_header_alloca_h=no
5330fi
5331rm -f conftest*
5332fi
5333
5334echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5335if test $ac_cv_header_alloca_h = yes; then
5336 cat >> confdefs.h <<\EOF
5337#define HAVE_ALLOCA_H 1
5338EOF
5339
5340fi
5341
5342echo $ac_n "checking for alloca""... $ac_c" 1>&6
030292b7 5343echo "configure:5344: checking for alloca" >&5
46711df8
MK
5344if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5345 echo $ac_n "(cached) $ac_c" 1>&6
5346else
5347 cat > conftest.$ac_ext <<EOF
030292b7 5348#line 5349 "configure"
46711df8
MK
5349#include "confdefs.h"
5350
5351#ifdef __GNUC__
5352# define alloca __builtin_alloca
5353#else
5354# ifdef _MSC_VER
5355# include <malloc.h>
5356# define alloca _alloca
5357# else
5358# if HAVE_ALLOCA_H
5359# include <alloca.h>
5360# else
5361# ifdef _AIX
5362 #pragma alloca
5363# else
5364# ifndef alloca /* predefined by HP cc +Olibcalls */
5365char *alloca ();
5366# endif
5367# endif
5368# endif
5369# endif
5370#endif
5371
5372int main() {
5373char *p = (char *) alloca(1);
5374; return 0; }
5375EOF
030292b7 5376if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5377 rm -rf conftest*
5378 ac_cv_func_alloca_works=yes
5379else
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
5382 rm -rf conftest*
5383 ac_cv_func_alloca_works=no
5384fi
5385rm -f conftest*
5386fi
5387
5388echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5389if test $ac_cv_func_alloca_works = yes; then
5390 cat >> confdefs.h <<\EOF
5391#define HAVE_ALLOCA 1
5392EOF
5393
5394fi
5395
5396if test $ac_cv_func_alloca_works = no; then
5397 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5398 # that cause trouble. Some versions do not even contain alloca or
5399 # contain a buggy version. If you still want to use their alloca,
5400 # use ar to extract alloca.o from them instead of compiling alloca.c.
5401 ALLOCA=alloca.${ac_objext}
5402 cat >> confdefs.h <<\EOF
5403#define C_ALLOCA 1
5404EOF
5405
5406
5407echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
030292b7 5408echo "configure:5409: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5409if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5410 echo $ac_n "(cached) $ac_c" 1>&6
5411else
5412 cat > conftest.$ac_ext <<EOF
030292b7 5413#line 5414 "configure"
46711df8
MK
5414#include "confdefs.h"
5415#if defined(CRAY) && ! defined(CRAY2)
5416webecray
5417#else
5418wenotbecray
5419#endif
5420
5421EOF
5422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5423 egrep "webecray" >/dev/null 2>&1; then
5424 rm -rf conftest*
5425 ac_cv_os_cray=yes
5426else
5427 rm -rf conftest*
5428 ac_cv_os_cray=no
5429fi
5430rm -f conftest*
5431
5432fi
5433
5434echo "$ac_t""$ac_cv_os_cray" 1>&6
5435if test $ac_cv_os_cray = yes; then
5436for ac_func in _getb67 GETB67 getb67; do
5437 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 5438echo "configure:5439: checking for $ac_func" >&5
46711df8
MK
5439if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5441else
5442 cat > conftest.$ac_ext <<EOF
030292b7 5443#line 5444 "configure"
46711df8
MK
5444#include "confdefs.h"
5445/* System header to define __stub macros and hopefully few prototypes,
5446 which can conflict with char $ac_func(); below. */
5447#include <assert.h>
5448/* Override any gcc2 internal prototype to avoid an error. */
5449/* We use char because int might match the return type of a gcc2
5450 builtin and then its argument prototype would still apply. */
5451char $ac_func();
5452
5453int main() {
5454
5455/* The GNU C library defines this for functions which it implements
5456 to always fail with ENOSYS. Some functions are actually named
5457 something starting with __ and the normal name is an alias. */
5458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5459choke me
5460#else
5461$ac_func();
5462#endif
5463
5464; return 0; }
5465EOF
030292b7 5466if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5467 rm -rf conftest*
5468 eval "ac_cv_func_$ac_func=yes"
5469else
5470 echo "configure: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5472 rm -rf conftest*
5473 eval "ac_cv_func_$ac_func=no"
5474fi
5475rm -f conftest*
5476fi
5477
5478if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5479 echo "$ac_t""yes" 1>&6
5480 cat >> confdefs.h <<EOF
5481#define CRAY_STACKSEG_END $ac_func
5482EOF
5483
5484 break
5485else
5486 echo "$ac_t""no" 1>&6
5487fi
5488
5489done
5490fi
5491
5492echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
030292b7 5493echo "configure:5494: checking stack direction for C alloca" >&5
46711df8
MK
5494if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5495 echo $ac_n "(cached) $ac_c" 1>&6
5496else
5497 if test "$cross_compiling" = yes; then
5498 ac_cv_c_stack_direction=0
5499else
5500 cat > conftest.$ac_ext <<EOF
030292b7 5501#line 5502 "configure"
46711df8
MK
5502#include "confdefs.h"
5503find_stack_direction ()
5504{
5505 static char *addr = 0;
5506 auto char dummy;
5507 if (addr == 0)
5508 {
5509 addr = &dummy;
5510 return find_stack_direction ();
5511 }
5512 else
5513 return (&dummy > addr) ? 1 : -1;
5514}
5515main ()
5516{
5517 exit (find_stack_direction() < 0);
5518}
5519EOF
030292b7 5520if { (eval echo configure:5521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5521then
5522 ac_cv_c_stack_direction=1
5523else
5524 echo "configure: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5526 rm -fr conftest*
5527 ac_cv_c_stack_direction=-1
5528fi
5529rm -fr conftest*
5530fi
5531
5532fi
5533
5534echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5535cat >> confdefs.h <<EOF
5536#define STACK_DIRECTION $ac_cv_c_stack_direction
5537EOF
5538
5539fi
5540
97bf5e38
MK
5541for ac_hdr in unistd.h
5542do
5543ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5544echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
030292b7 5545echo "configure:5546: checking for $ac_hdr" >&5
74c1b268
AC
5546if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5547 echo $ac_n "(cached) $ac_c" 1>&6
5548else
5549 cat > conftest.$ac_ext <<EOF
030292b7 5550#line 5551 "configure"
74c1b268 5551#include "confdefs.h"
97bf5e38 5552#include <$ac_hdr>
74c1b268
AC
5553EOF
5554ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 5555{ (eval echo configure:5556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5556ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5557if test -z "$ac_err"; then
5558 rm -rf conftest*
5559 eval "ac_cv_header_$ac_safe=yes"
5560else
5561 echo "$ac_err" >&5
5562 echo "configure: failed program was:" >&5
5563 cat conftest.$ac_ext >&5
5564 rm -rf conftest*
5565 eval "ac_cv_header_$ac_safe=no"
5566fi
5567rm -f conftest*
5568fi
5569if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5570 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5571 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5572 cat >> confdefs.h <<EOF
5573#define $ac_tr_hdr 1
74c1b268 5574EOF
97bf5e38 5575
74c1b268
AC
5576else
5577 echo "$ac_t""no" 1>&6
5578fi
97bf5e38 5579done
74c1b268 5580
97bf5e38
MK
5581for ac_func in getpagesize
5582do
5583echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 5584echo "configure:5585: checking for $ac_func" >&5
97bf5e38 5585if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5586 echo $ac_n "(cached) $ac_c" 1>&6
5587else
5588 cat > conftest.$ac_ext <<EOF
030292b7 5589#line 5590 "configure"
74c1b268
AC
5590#include "confdefs.h"
5591/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5592 which can conflict with char $ac_func(); below. */
74c1b268
AC
5593#include <assert.h>
5594/* Override any gcc2 internal prototype to avoid an error. */
5595/* We use char because int might match the return type of a gcc2
5596 builtin and then its argument prototype would still apply. */
97bf5e38 5597char $ac_func();
74c1b268
AC
5598
5599int main() {
5600
5601/* The GNU C library defines this for functions which it implements
5602 to always fail with ENOSYS. Some functions are actually named
5603 something starting with __ and the normal name is an alias. */
97bf5e38 5604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5605choke me
5606#else
97bf5e38 5607$ac_func();
74c1b268
AC
5608#endif
5609
5610; return 0; }
5611EOF
030292b7 5612if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5613 rm -rf conftest*
97bf5e38 5614 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5615else
5616 echo "configure: failed program was:" >&5
5617 cat conftest.$ac_ext >&5
5618 rm -rf conftest*
97bf5e38 5619 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5620fi
5621rm -f conftest*
5622fi
5623
97bf5e38 5624if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5625 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5626 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5627 cat >> confdefs.h <<EOF
5628#define $ac_tr_func 1
5629EOF
5630
74c1b268
AC
5631else
5632 echo "$ac_t""no" 1>&6
5633fi
97bf5e38 5634done
74c1b268 5635
97bf5e38 5636echo $ac_n "checking for working mmap""... $ac_c" 1>&6
030292b7 5637echo "configure:5638: checking for working mmap" >&5
97bf5e38
MK
5638if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5639 echo $ac_n "(cached) $ac_c" 1>&6
5640else
5641 if test "$cross_compiling" = yes; then
5642 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5643else
5644 cat > conftest.$ac_ext <<EOF
030292b7 5645#line 5646 "configure"
74c1b268 5646#include "confdefs.h"
97bf5e38
MK
5647
5648/* Thanks to Mike Haertel and Jim Avera for this test.
5649 Here is a matrix of mmap possibilities:
5650 mmap private not fixed
5651 mmap private fixed at somewhere currently unmapped
5652 mmap private fixed at somewhere already mapped
5653 mmap shared not fixed
5654 mmap shared fixed at somewhere currently unmapped
5655 mmap shared fixed at somewhere already mapped
5656 For private mappings, we should verify that changes cannot be read()
5657 back from the file, nor mmap's back from the file at a different
5658 address. (There have been systems where private was not correctly
5659 implemented like the infamous i386 svr4.0, and systems where the
5660 VM page cache was not coherent with the filesystem buffer cache
5661 like early versions of FreeBSD and possibly contemporary NetBSD.)
5662 For shared mappings, we should conversely verify that changes get
5663 propogated back to all the places they're supposed to be.
5664
5665 Grep wants private fixed already mapped.
5666 The main things grep needs to know about mmap are:
5667 * does it exist and is it safe to write into the mmap'd area
5668 * how to use it (BSD variants) */
74c1b268 5669#include <sys/types.h>
97bf5e38
MK
5670#include <fcntl.h>
5671#include <sys/mman.h>
5672
5673/* This mess was copied from the GNU getpagesize.h. */
5674#ifndef HAVE_GETPAGESIZE
5675# ifdef HAVE_UNISTD_H
5676# include <unistd.h>
5677# endif
5678
5679/* Assume that all systems that can run configure have sys/param.h. */
5680# ifndef HAVE_SYS_PARAM_H
5681# define HAVE_SYS_PARAM_H 1
5682# endif
5683
5684# ifdef _SC_PAGESIZE
5685# define getpagesize() sysconf(_SC_PAGESIZE)
5686# else /* no _SC_PAGESIZE */
5687# ifdef HAVE_SYS_PARAM_H
5688# include <sys/param.h>
5689# ifdef EXEC_PAGESIZE
5690# define getpagesize() EXEC_PAGESIZE
5691# else /* no EXEC_PAGESIZE */
5692# ifdef NBPG
5693# define getpagesize() NBPG * CLSIZE
5694# ifndef CLSIZE
5695# define CLSIZE 1
5696# endif /* no CLSIZE */
5697# else /* no NBPG */
5698# ifdef NBPC
5699# define getpagesize() NBPC
5700# else /* no NBPC */
5701# ifdef PAGESIZE
5702# define getpagesize() PAGESIZE
5703# endif /* PAGESIZE */
5704# endif /* no NBPC */
5705# endif /* no NBPG */
5706# endif /* no EXEC_PAGESIZE */
5707# else /* no HAVE_SYS_PARAM_H */
5708# define getpagesize() 8192 /* punt totally */
5709# endif /* no HAVE_SYS_PARAM_H */
5710# endif /* no _SC_PAGESIZE */
5711
5712#endif /* no HAVE_GETPAGESIZE */
5713
74c1b268 5714#ifdef __cplusplus
97bf5e38 5715extern "C" { void *malloc(unsigned); }
74c1b268 5716#else
97bf5e38 5717char *malloc();
74c1b268 5718#endif
74c1b268 5719
97bf5e38
MK
5720int
5721main()
5722{
5723 char *data, *data2, *data3;
5724 int i, pagesize;
5725 int fd;
74c1b268 5726
97bf5e38 5727 pagesize = getpagesize();
74c1b268 5728
97bf5e38
MK
5729 /*
5730 * First, make a file with some known garbage in it.
5731 */
5732 data = malloc(pagesize);
5733 if (!data)
5734 exit(1);
5735 for (i = 0; i < pagesize; ++i)
5736 *(data + i) = rand();
5737 umask(0);
5738 fd = creat("conftestmmap", 0600);
5739 if (fd < 0)
5740 exit(1);
5741 if (write(fd, data, pagesize) != pagesize)
5742 exit(1);
5743 close(fd);
74c1b268 5744
97bf5e38
MK
5745 /*
5746 * Next, try to mmap the file at a fixed address which
5747 * already has something else allocated at it. If we can,
5748 * also make sure that we see the same garbage.
5749 */
5750 fd = open("conftestmmap", O_RDWR);
5751 if (fd < 0)
5752 exit(1);
5753 data2 = malloc(2 * pagesize);
5754 if (!data2)
5755 exit(1);
5756 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5757 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5758 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5759 exit(1);
5760 for (i = 0; i < pagesize; ++i)
5761 if (*(data + i) != *(data2 + i))
5762 exit(1);
74c1b268 5763
97bf5e38
MK
5764 /*
5765 * Finally, make sure that changes to the mapped area
5766 * do not percolate back to the file as seen by read().
5767 * (This is a bug on some variants of i386 svr4.0.)
5768 */
5769 for (i = 0; i < pagesize; ++i)
5770 *(data2 + i) = *(data2 + i) + 1;
5771 data3 = malloc(pagesize);
5772 if (!data3)
5773 exit(1);
5774 if (read(fd, data3, pagesize) != pagesize)
5775 exit(1);
5776 for (i = 0; i < pagesize; ++i)
5777 if (*(data + i) != *(data3 + i))
5778 exit(1);
5779 close(fd);
5780 unlink("conftestmmap");
5781 exit(0);
74c1b268 5782}
97bf5e38 5783
74c1b268 5784EOF
030292b7 5785if { (eval echo configure:5786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5786then
97bf5e38 5787 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5788else
5789 echo "configure: failed program was:" >&5
5790 cat conftest.$ac_ext >&5
5791 rm -fr conftest*
97bf5e38 5792 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5793fi
5794rm -fr conftest*
5795fi
5796
5797fi
5798
97bf5e38
MK
5799echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5800if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5801 cat >> confdefs.h <<\EOF
97bf5e38 5802#define HAVE_MMAP 1
74c1b268
AC
5803EOF
5804
5805fi
5806
97bf5e38 5807echo $ac_n "checking for pid_t""... $ac_c" 1>&6
030292b7 5808echo "configure:5809: checking for pid_t" >&5
97bf5e38 5809if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5810 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5811else
5812 cat > conftest.$ac_ext <<EOF
030292b7 5813#line 5814 "configure"
0200359f 5814#include "confdefs.h"
97bf5e38
MK
5815#include <sys/types.h>
5816#if STDC_HEADERS
5817#include <stdlib.h>
5818#include <stddef.h>
0200359f 5819#endif
0200359f 5820EOF
97bf5e38
MK
5821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5822 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5823 rm -rf conftest*
5824 ac_cv_type_pid_t=yes
0200359f 5825else
97bf5e38
MK
5826 rm -rf conftest*
5827 ac_cv_type_pid_t=no
0200359f 5828fi
97bf5e38 5829rm -f conftest*
0200359f
MK
5830
5831fi
97bf5e38
MK
5832echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5833if test $ac_cv_type_pid_t = no; then
0200359f 5834 cat >> confdefs.h <<\EOF
97bf5e38 5835#define pid_t int
0200359f
MK
5836EOF
5837
5838fi
5839
97bf5e38
MK
5840ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5841echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
030292b7 5842echo "configure:5843: checking for vfork.h" >&5
97bf5e38 5843if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5844 echo $ac_n "(cached) $ac_c" 1>&6
5845else
5846 cat > conftest.$ac_ext <<EOF
030292b7 5847#line 5848 "configure"
72473524 5848#include "confdefs.h"
97bf5e38 5849#include <vfork.h>
72473524 5850EOF
97bf5e38 5851ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 5852{ (eval echo configure:5853: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5853ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5854if test -z "$ac_err"; then
72473524 5855 rm -rf conftest*
97bf5e38 5856 eval "ac_cv_header_$ac_safe=yes"
72473524 5857else
97bf5e38 5858 echo "$ac_err" >&5
72473524
DJ
5859 echo "configure: failed program was:" >&5
5860 cat conftest.$ac_ext >&5
5861 rm -rf conftest*
97bf5e38 5862 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5863fi
5864rm -f conftest*
5865fi
97bf5e38
MK
5866if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5867 echo "$ac_t""yes" 1>&6
72473524 5868 cat >> confdefs.h <<\EOF
97bf5e38 5869#define HAVE_VFORK_H 1
72473524
DJ
5870EOF
5871
97bf5e38
MK
5872else
5873 echo "$ac_t""no" 1>&6
72473524 5874fi
c906108c 5875
97bf5e38 5876echo $ac_n "checking for working vfork""... $ac_c" 1>&6
030292b7 5877echo "configure:5878: checking for working vfork" >&5
97bf5e38
MK
5878if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5879 echo $ac_n "(cached) $ac_c" 1>&6
5880else
5881 if test "$cross_compiling" = yes; then
5882 echo $ac_n "checking for vfork""... $ac_c" 1>&6
030292b7 5883echo "configure:5884: checking for vfork" >&5
97bf5e38 5884if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5885 echo $ac_n "(cached) $ac_c" 1>&6
5886else
5887 cat > conftest.$ac_ext <<EOF
030292b7 5888#line 5889 "configure"
2b2d558c 5889#include "confdefs.h"
97bf5e38
MK
5890/* System header to define __stub macros and hopefully few prototypes,
5891 which can conflict with char vfork(); below. */
5892#include <assert.h>
5893/* Override any gcc2 internal prototype to avoid an error. */
5894/* We use char because int might match the return type of a gcc2
5895 builtin and then its argument prototype would still apply. */
5896char vfork();
2b2d558c
MK
5897
5898int main() {
97bf5e38
MK
5899
5900/* The GNU C library defines this for functions which it implements
5901 to always fail with ENOSYS. Some functions are actually named
5902 something starting with __ and the normal name is an alias. */
5903#if defined (__stub_vfork) || defined (__stub___vfork)
5904choke me
5905#else
5906vfork();
5907#endif
5908
2b2d558c
MK
5909; return 0; }
5910EOF
030292b7 5911if { (eval echo configure:5912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5912 rm -rf conftest*
97bf5e38 5913 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5914else
5915 echo "configure: failed program was:" >&5
5916 cat conftest.$ac_ext >&5
5917 rm -rf conftest*
97bf5e38 5918 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5919fi
5920rm -f conftest*
5921fi
5922
97bf5e38
MK
5923if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5924 echo "$ac_t""yes" 1>&6
5925 :
5926else
5927 echo "$ac_t""no" 1>&6
2b2d558c
MK
5928fi
5929
97bf5e38 5930ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5931else
5932 cat > conftest.$ac_ext <<EOF
030292b7 5933#line 5934 "configure"
7dfa765c 5934#include "confdefs.h"
97bf5e38
MK
5935/* Thanks to Paul Eggert for this test. */
5936#include <stdio.h>
5937#include <sys/types.h>
5938#include <sys/stat.h>
5939#ifdef HAVE_UNISTD_H
5940#include <unistd.h>
5941#endif
5942#ifdef HAVE_VFORK_H
5943#include <vfork.h>
5944#endif
5945/* On some sparc systems, changes by the child to local and incoming
5946 argument registers are propagated back to the parent.
5947 The compiler is told about this with #include <vfork.h>,
5948 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5949 Test for this by using a static variable whose address
5950 is put into a register that is clobbered by the vfork. */
5951static
5952#ifdef __cplusplus
5953sparc_address_test (int arg)
5954#else
5955sparc_address_test (arg) int arg;
5956#endif
5957{
5958 static pid_t child;
5959 if (!child) {
5960 child = vfork ();
5961 if (child < 0) {
5962 perror ("vfork");
5963 _exit(2);
5964 }
5965 if (!child) {
5966 arg = getpid();
5967 write(-1, "", 0);
5968 _exit (arg);
5969 }
5970 }
5971}
5972main() {
5973 pid_t parent = getpid ();
5974 pid_t child;
7dfa765c 5975
97bf5e38 5976 sparc_address_test ();
7dfa765c 5977
97bf5e38 5978 child = vfork ();
7dfa765c 5979
97bf5e38
MK
5980 if (child == 0) {
5981 /* Here is another test for sparc vfork register problems.
5982 This test uses lots of local variables, at least
5983 as many local variables as main has allocated so far
5984 including compiler temporaries. 4 locals are enough for
5985 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5986 A buggy compiler should reuse the register of parent
5987 for one of the local variables, since it will think that
5988 parent can't possibly be used any more in this routine.
5989 Assigning to the local variable will thus munge parent
5990 in the parent process. */
5991 pid_t
5992 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5993 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5994 /* Convince the compiler that p..p7 are live; otherwise, it might
5995 use the same hardware register for all 8 local variables. */
5996 if (p != p1 || p != p2 || p != p3 || p != p4
5997 || p != p5 || p != p6 || p != p7)
5998 _exit(1);
7dfa765c 5999
97bf5e38
MK
6000 /* On some systems (e.g. IRIX 3.3),
6001 vfork doesn't separate parent from child file descriptors.
6002 If the child closes a descriptor before it execs or exits,
6003 this munges the parent's descriptor as well.
6004 Test for this by closing stdout in the child. */
6005 _exit(close(fileno(stdout)) != 0);
6006 } else {
6007 int status;
6008 struct stat st;
64bb1671 6009
97bf5e38
MK
6010 while (wait(&status) != child)
6011 ;
6012 exit(
6013 /* Was there some problem with vforking? */
6014 child < 0
64bb1671 6015
97bf5e38
MK
6016 /* Did the child fail? (This shouldn't happen.) */
6017 || status
64bb1671 6018
97bf5e38
MK
6019 /* Did the vfork/compiler bug occur? */
6020 || parent != getpid()
6021
6022 /* Did the file descriptor bug occur? */
6023 || fstat(fileno(stdout), &st) != 0
6024 );
6025 }
6026}
5c44784c 6027EOF
030292b7 6028if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6029then
6030 ac_cv_func_vfork_works=yes
5c44784c
JM
6031else
6032 echo "configure: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
97bf5e38
MK
6034 rm -fr conftest*
6035 ac_cv_func_vfork_works=no
5c44784c 6036fi
97bf5e38 6037rm -fr conftest*
5c44784c
JM
6038fi
6039
0afdd437
MK
6040fi
6041
97bf5e38
MK
6042echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6043if test $ac_cv_func_vfork_works = no; then
0afdd437 6044 cat >> confdefs.h <<\EOF
97bf5e38 6045#define vfork fork
0afdd437
MK
6046EOF
6047
6048fi
6049
97bf5e38
MK
6050for ac_func in canonicalize_file_name realpath
6051do
6052echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6053echo "configure:6054: checking for $ac_func" >&5
97bf5e38 6054if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6055 echo $ac_n "(cached) $ac_c" 1>&6
6056else
6057 cat > conftest.$ac_ext <<EOF
030292b7 6058#line 6059 "configure"
7e89e357 6059#include "confdefs.h"
97bf5e38
MK
6060/* System header to define __stub macros and hopefully few prototypes,
6061 which can conflict with char $ac_func(); below. */
6062#include <assert.h>
6063/* Override any gcc2 internal prototype to avoid an error. */
6064/* We use char because int might match the return type of a gcc2
6065 builtin and then its argument prototype would still apply. */
6066char $ac_func();
6067
7e89e357 6068int main() {
97bf5e38
MK
6069
6070/* The GNU C library defines this for functions which it implements
6071 to always fail with ENOSYS. Some functions are actually named
6072 something starting with __ and the normal name is an alias. */
6073#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6074choke me
6075#else
6076$ac_func();
6077#endif
6078
7e89e357
JT
6079; return 0; }
6080EOF
030292b7 6081if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6082 rm -rf conftest*
97bf5e38 6083 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6084else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6087 rm -rf conftest*
97bf5e38 6088 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6089fi
6090rm -f conftest*
6091fi
6092
97bf5e38
MK
6093if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6094 echo "$ac_t""yes" 1>&6
6095 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6096 cat >> confdefs.h <<EOF
6097#define $ac_tr_func 1
7e89e357 6098EOF
97bf5e38
MK
6099
6100else
6101 echo "$ac_t""no" 1>&6
7e89e357 6102fi
97bf5e38 6103done
7e89e357 6104
97bf5e38 6105for ac_func in poll
7be570e7
JM
6106do
6107echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6108echo "configure:6109: checking for $ac_func" >&5
7be570e7
JM
6109if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6110 echo $ac_n "(cached) $ac_c" 1>&6
6111else
6112 cat > conftest.$ac_ext <<EOF
030292b7 6113#line 6114 "configure"
7be570e7
JM
6114#include "confdefs.h"
6115/* System header to define __stub macros and hopefully few prototypes,
6116 which can conflict with char $ac_func(); below. */
6117#include <assert.h>
6118/* Override any gcc2 internal prototype to avoid an error. */
6119/* We use char because int might match the return type of a gcc2
6120 builtin and then its argument prototype would still apply. */
6121char $ac_func();
6122
6123int main() {
6124
6125/* The GNU C library defines this for functions which it implements
6126 to always fail with ENOSYS. Some functions are actually named
6127 something starting with __ and the normal name is an alias. */
6128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6129choke me
6130#else
6131$ac_func();
6132#endif
6133
6134; return 0; }
6135EOF
030292b7 6136if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6137 rm -rf conftest*
6138 eval "ac_cv_func_$ac_func=yes"
6139else
6140 echo "configure: failed program was:" >&5
6141 cat conftest.$ac_ext >&5
6142 rm -rf conftest*
6143 eval "ac_cv_func_$ac_func=no"
6144fi
6145rm -f conftest*
6146fi
6147
6148if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6149 echo "$ac_t""yes" 1>&6
6150 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6151 cat >> confdefs.h <<EOF
6152#define $ac_tr_func 1
6153EOF
6154
6155else
6156 echo "$ac_t""no" 1>&6
6157fi
6158done
6159
6160for ac_func in pread64
6161do
6162echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6163echo "configure:6164: checking for $ac_func" >&5
14abd0fb
MK
6164if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6165 echo $ac_n "(cached) $ac_c" 1>&6
6166else
6167 cat > conftest.$ac_ext <<EOF
030292b7 6168#line 6169 "configure"
14abd0fb
MK
6169#include "confdefs.h"
6170/* System header to define __stub macros and hopefully few prototypes,
6171 which can conflict with char $ac_func(); below. */
6172#include <assert.h>
6173/* Override any gcc2 internal prototype to avoid an error. */
6174/* We use char because int might match the return type of a gcc2
6175 builtin and then its argument prototype would still apply. */
6176char $ac_func();
6177
6178int main() {
6179
6180/* The GNU C library defines this for functions which it implements
6181 to always fail with ENOSYS. Some functions are actually named
6182 something starting with __ and the normal name is an alias. */
6183#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6184choke me
6185#else
6186$ac_func();
6187#endif
6188
6189; return 0; }
6190EOF
030292b7 6191if { (eval echo configure:6192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6192 rm -rf conftest*
6193 eval "ac_cv_func_$ac_func=yes"
6194else
6195 echo "configure: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 rm -rf conftest*
6198 eval "ac_cv_func_$ac_func=no"
6199fi
6200rm -f conftest*
6201fi
6202
6203if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6204 echo "$ac_t""yes" 1>&6
6205 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6206 cat >> confdefs.h <<EOF
6207#define $ac_tr_func 1
6208EOF
6209
6210else
6211 echo "$ac_t""no" 1>&6
6212fi
6213done
6214
97bf5e38
MK
6215for ac_func in sbrk
6216do
6217echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6218echo "configure:6219: checking for $ac_func" >&5
97bf5e38 6219if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6220 echo $ac_n "(cached) $ac_c" 1>&6
6221else
6222 cat > conftest.$ac_ext <<EOF
030292b7 6223#line 6224 "configure"
c906108c 6224#include "confdefs.h"
97bf5e38
MK
6225/* System header to define __stub macros and hopefully few prototypes,
6226 which can conflict with char $ac_func(); below. */
6227#include <assert.h>
6228/* Override any gcc2 internal prototype to avoid an error. */
6229/* We use char because int might match the return type of a gcc2
6230 builtin and then its argument prototype would still apply. */
6231char $ac_func();
c906108c 6232
97bf5e38
MK
6233int main() {
6234
6235/* The GNU C library defines this for functions which it implements
6236 to always fail with ENOSYS. Some functions are actually named
6237 something starting with __ and the normal name is an alias. */
6238#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6239choke me
c906108c 6240#else
97bf5e38 6241$ac_func();
c906108c 6242#endif
97bf5e38 6243
c906108c
SS
6244; return 0; }
6245EOF
030292b7 6246if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6247 rm -rf conftest*
97bf5e38 6248 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6249else
6250 echo "configure: failed program was:" >&5
6251 cat conftest.$ac_ext >&5
6252 rm -rf conftest*
97bf5e38 6253 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6254fi
6255rm -f conftest*
6256fi
6257
97bf5e38
MK
6258if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6259 echo "$ac_t""yes" 1>&6
6260 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6261 cat >> confdefs.h <<EOF
6262#define $ac_tr_func 1
c906108c 6263EOF
97bf5e38
MK
6264
6265else
6266 echo "$ac_t""no" 1>&6
c906108c 6267fi
97bf5e38 6268done
c906108c 6269
97bf5e38
MK
6270for ac_func in setpgid setpgrp
6271do
6272echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6273echo "configure:6274: checking for $ac_func" >&5
97bf5e38 6274if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6275 echo $ac_n "(cached) $ac_c" 1>&6
6276else
6277 cat > conftest.$ac_ext <<EOF
030292b7 6278#line 6279 "configure"
c906108c 6279#include "confdefs.h"
97bf5e38
MK
6280/* System header to define __stub macros and hopefully few prototypes,
6281 which can conflict with char $ac_func(); below. */
6282#include <assert.h>
6283/* Override any gcc2 internal prototype to avoid an error. */
6284/* We use char because int might match the return type of a gcc2
6285 builtin and then its argument prototype would still apply. */
6286char $ac_func();
c906108c 6287
97bf5e38
MK
6288int main() {
6289
6290/* The GNU C library defines this for functions which it implements
6291 to always fail with ENOSYS. Some functions are actually named
6292 something starting with __ and the normal name is an alias. */
6293#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6294choke me
c906108c 6295#else
97bf5e38 6296$ac_func();
c906108c 6297#endif
97bf5e38 6298
c906108c
SS
6299; return 0; }
6300EOF
030292b7 6301if { (eval echo configure:6302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6302 rm -rf conftest*
97bf5e38 6303 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6304else
6305 echo "configure: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6307 rm -rf conftest*
97bf5e38 6308 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6309fi
6310rm -f conftest*
6311fi
6312
97bf5e38
MK
6313if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6314 echo "$ac_t""yes" 1>&6
6315 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6316 cat >> confdefs.h <<EOF
6317#define $ac_tr_func 1
c906108c 6318EOF
97bf5e38
MK
6319
6320else
6321 echo "$ac_t""no" 1>&6
c906108c 6322fi
97bf5e38 6323done
c906108c 6324
e1ea1d75 6325for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6326do
6327echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6328echo "configure:6329: checking for $ac_func" >&5
97bf5e38 6329if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6330 echo $ac_n "(cached) $ac_c" 1>&6
6331else
6332 cat > conftest.$ac_ext <<EOF
030292b7 6333#line 6334 "configure"
c906108c 6334#include "confdefs.h"
97bf5e38
MK
6335/* System header to define __stub macros and hopefully few prototypes,
6336 which can conflict with char $ac_func(); below. */
6337#include <assert.h>
6338/* Override any gcc2 internal prototype to avoid an error. */
6339/* We use char because int might match the return type of a gcc2
6340 builtin and then its argument prototype would still apply. */
6341char $ac_func();
c906108c 6342
97bf5e38
MK
6343int main() {
6344
6345/* The GNU C library defines this for functions which it implements
6346 to always fail with ENOSYS. Some functions are actually named
6347 something starting with __ and the normal name is an alias. */
6348#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6349choke me
c906108c 6350#else
97bf5e38 6351$ac_func();
c906108c 6352#endif
97bf5e38 6353
c906108c
SS
6354; return 0; }
6355EOF
030292b7 6356if { (eval echo configure:6357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6357 rm -rf conftest*
97bf5e38 6358 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6359else
6360 echo "configure: failed program was:" >&5
6361 cat conftest.$ac_ext >&5
6362 rm -rf conftest*
97bf5e38 6363 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6364fi
6365rm -f conftest*
6366fi
6367
97bf5e38
MK
6368if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6369 echo "$ac_t""yes" 1>&6
6370 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6371 cat >> confdefs.h <<EOF
6372#define $ac_tr_func 1
c906108c 6373EOF
e1ea1d75 6374
97bf5e38
MK
6375else
6376 echo "$ac_t""no" 1>&6
c906108c 6377fi
97bf5e38 6378done
c906108c 6379
97bf5e38
MK
6380for ac_func in socketpair
6381do
6382echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
030292b7 6383echo "configure:6384: checking for $ac_func" >&5
97bf5e38 6384if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6385 echo $ac_n "(cached) $ac_c" 1>&6
6386else
6387 cat > conftest.$ac_ext <<EOF
030292b7 6388#line 6389 "configure"
c906108c 6389#include "confdefs.h"
97bf5e38
MK
6390/* System header to define __stub macros and hopefully few prototypes,
6391 which can conflict with char $ac_func(); below. */
6392#include <assert.h>
6393/* Override any gcc2 internal prototype to avoid an error. */
6394/* We use char because int might match the return type of a gcc2
6395 builtin and then its argument prototype would still apply. */
6396char $ac_func();
c906108c 6397
97bf5e38
MK
6398int main() {
6399
6400/* The GNU C library defines this for functions which it implements
6401 to always fail with ENOSYS. Some functions are actually named
6402 something starting with __ and the normal name is an alias. */
6403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6404choke me
c906108c 6405#else
97bf5e38 6406$ac_func();
c906108c 6407#endif
97bf5e38 6408
c906108c
SS
6409; return 0; }
6410EOF
030292b7 6411if { (eval echo configure:6412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6412 rm -rf conftest*
97bf5e38 6413 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6414else
6415 echo "configure: failed program was:" >&5
6416 cat conftest.$ac_ext >&5
6417 rm -rf conftest*
97bf5e38 6418 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6419fi
6420rm -f conftest*
6421fi
6422
97bf5e38
MK
6423if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6424 echo "$ac_t""yes" 1>&6
6425 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6426 cat >> confdefs.h <<EOF
6427#define $ac_tr_func 1
c906108c 6428EOF
97bf5e38
MK
6429
6430else
6431 echo "$ac_t""no" 1>&6
c906108c 6432fi
97bf5e38 6433done
c906108c 6434
97bf5e38
MK
6435
6436if test "$cross_compiling" = no; then
6437 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
030292b7 6438echo "configure:6439: checking whether setpgrp takes no argument" >&5
97bf5e38 6439if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6440 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6441else
6442 if test "$cross_compiling" = yes; then
6443 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6444else
6445 cat > conftest.$ac_ext <<EOF
030292b7 6446#line 6447 "configure"
c906108c
SS
6447#include "confdefs.h"
6448
c906108c
SS
6449#ifdef HAVE_UNISTD_H
6450#include <unistd.h>
6451#endif
97bf5e38
MK
6452
6453/*
6454 * If this system has a BSD-style setpgrp, which takes arguments, exit
6455 * successfully.
6456 */
6457main()
6458{
6459 if (setpgrp(1,1) == -1)
6460 exit(0);
6461 else
6462 exit(1);
6463}
6464
c906108c 6465EOF
030292b7 6466if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6467then
6468 ac_cv_func_setpgrp_void=no
c906108c
SS
6469else
6470 echo "configure: failed program was:" >&5
6471 cat conftest.$ac_ext >&5
97bf5e38
MK
6472 rm -fr conftest*
6473 ac_cv_func_setpgrp_void=yes
c906108c 6474fi
97bf5e38 6475rm -fr conftest*
c906108c
SS
6476fi
6477
97bf5e38
MK
6478
6479fi
6480
6481echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6482if test $ac_cv_func_setpgrp_void = yes; then
6483 cat >> confdefs.h <<\EOF
6484#define SETPGRP_VOID 1
c906108c
SS
6485EOF
6486
6487fi
6488
97bf5e38
MK
6489else
6490 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
030292b7 6491echo "configure:6492: checking whether setpgrp takes no argument" >&5
97bf5e38 6492if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6493 echo $ac_n "(cached) $ac_c" 1>&6
6494else
6495 cat > conftest.$ac_ext <<EOF
030292b7 6496#line 6497 "configure"
b83266a0
SS
6497#include "confdefs.h"
6498
b83266a0 6499#include <unistd.h>
97bf5e38 6500
b83266a0 6501int main() {
97bf5e38
MK
6502
6503 if (setpgrp(1,1) == -1)
6504 exit (0);
6505 else
6506 exit (1);
6507
b83266a0
SS
6508; return 0; }
6509EOF
030292b7 6510if { (eval echo configure:6511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6511 rm -rf conftest*
97bf5e38 6512 ac_cv_func_setpgrp_void=no
b83266a0
SS
6513else
6514 echo "configure: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 rm -rf conftest*
97bf5e38 6517 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6518fi
6519rm -f conftest*
6520fi
6521
97bf5e38
MK
6522echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6523if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6524 cat >> confdefs.h <<\EOF
97bf5e38 6525#define SETPGRP_VOID 1
b83266a0
SS
6526EOF
6527
97bf5e38 6528fi
b83266a0
SS
6529fi
6530
97bf5e38
MK
6531# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6532# since sigsetjmp might only be defined as a macro.
6533echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
030292b7 6534echo "configure:6535: checking for sigsetjmp" >&5
97bf5e38 6535if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6536 echo $ac_n "(cached) $ac_c" 1>&6
6537else
6538 cat > conftest.$ac_ext <<EOF
030292b7 6539#line 6540 "configure"
a4db0f07
RH
6540#include "confdefs.h"
6541
97bf5e38
MK
6542#include <setjmp.h>
6543
a4db0f07 6544int main() {
97bf5e38 6545sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6546; return 0; }
6547EOF
030292b7 6548if { (eval echo configure:6549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6549 rm -rf conftest*
97bf5e38 6550 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6551else
6552 echo "configure: failed program was:" >&5
6553 cat conftest.$ac_ext >&5
6554 rm -rf conftest*
97bf5e38 6555 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6556fi
6557rm -f conftest*
6558fi
6559
97bf5e38
MK
6560echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6561if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6562 cat >> confdefs.h <<\EOF
97bf5e38 6563#define HAVE_SIGSETJMP 1
a4db0f07
RH
6564EOF
6565
6566fi
c906108c 6567
06825bd1
MK
6568# Assume we'll default to using the included libiberty regex.
6569gdb_use_included_regex=yes
6570
6571# However, if the system regex is GNU regex, then default to *not*
6572# using the included regex.
6573echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
030292b7 6574echo "configure:6575: checking for GNU regex" >&5
06825bd1
MK
6575if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6576 echo $ac_n "(cached) $ac_c" 1>&6
6577else
6578 cat > conftest.$ac_ext <<EOF
030292b7 6579#line 6580 "configure"
06825bd1
MK
6580#include "confdefs.h"
6581#include <gnu-versions.h>
6582int main() {
6583#define REGEX_INTERFACE_VERSION 1
6584#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6585# error "Version mismatch"
6586#endif
6587; return 0; }
6588EOF
030292b7 6589if { (eval echo configure:6590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6590 rm -rf conftest*
6591 gdb_cv_have_gnu_regex=yes
6592else
6593 echo "configure: failed program was:" >&5
6594 cat conftest.$ac_ext >&5
6595 rm -rf conftest*
6596 gdb_cv_have_gnu_regex=no
6597fi
6598rm -f conftest*
6599fi
6600
6601echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6602if test $gdb_cv_have_gnu_regex = yes; then
6603 gdb_use_included_regex=no
6604fi
6605
6606# Check whether --with-included-regex or --without-included-regex was given.
6607if test "${with_included_regex+set}" = set; then
6608 withval="$with_included_regex"
6609 gdb_with_regex=$withval
6610else
6611 gdb_with_regex=$gdb_use_included_regex
6612fi
6613
6614if test "$gdb_with_regex" = yes; then
6615 cat >> confdefs.h <<\EOF
6616#define USE_INCLUDED_REGEX 1
6617EOF
6618
6619fi
6620
97bf5e38
MK
6621# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6622# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6623echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
030292b7 6624echo "configure:6625: checking for r_fs in struct reg" >&5
97bf5e38
MK
6625if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6626 echo $ac_n "(cached) $ac_c" 1>&6
6627else
6628 cat > conftest.$ac_ext <<EOF
030292b7 6629#line 6630 "configure"
c906108c 6630#include "confdefs.h"
97bf5e38
MK
6631#include <machine/reg.h>
6632int main() {
6633struct reg r; r.r_fs;
6634; return 0; }
c906108c 6635EOF
030292b7 6636if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6637 rm -rf conftest*
97bf5e38 6638 gdb_cv_struct_reg_r_fs=yes
c906108c 6639else
97bf5e38
MK
6640 echo "configure: failed program was:" >&5
6641 cat conftest.$ac_ext >&5
c906108c 6642 rm -rf conftest*
97bf5e38 6643 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6644fi
6645rm -f conftest*
97bf5e38 6646fi
c906108c 6647
97bf5e38
MK
6648echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6649if test $gdb_cv_struct_reg_r_fs = yes; then
6650 cat >> confdefs.h <<\EOF
6651#define HAVE_STRUCT_REG_R_FS 1
6652EOF
6653
6654fi
6655echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
030292b7 6656echo "configure:6657: checking for r_gs in struct reg" >&5
97bf5e38
MK
6657if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6658 echo $ac_n "(cached) $ac_c" 1>&6
6659else
6660 cat > conftest.$ac_ext <<EOF
030292b7 6661#line 6662 "configure"
c906108c 6662#include "confdefs.h"
97bf5e38
MK
6663#include <machine/reg.h>
6664int main() {
6665struct reg r; r.r_gs;
6666; return 0; }
c906108c 6667EOF
030292b7 6668if { (eval echo configure:6669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6669 rm -rf conftest*
97bf5e38 6670 gdb_cv_struct_reg_r_gs=yes
c906108c 6671else
97bf5e38
MK
6672 echo "configure: failed program was:" >&5
6673 cat conftest.$ac_ext >&5
c906108c 6674 rm -rf conftest*
97bf5e38 6675 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6676fi
6677rm -f conftest*
c906108c 6678fi
c906108c 6679
97bf5e38
MK
6680echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6681if test $gdb_cv_struct_reg_r_gs = yes; then
6682 cat >> confdefs.h <<\EOF
6683#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6684EOF
6685
c906108c
SS
6686fi
6687
97bf5e38
MK
6688# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6689echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
030292b7 6690echo "configure:6691: checking for PTRACE_GETREGS" >&5
97bf5e38 6691if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6692 echo $ac_n "(cached) $ac_c" 1>&6
6693else
6694 cat > conftest.$ac_ext <<EOF
030292b7 6695#line 6696 "configure"
c906108c 6696#include "confdefs.h"
97bf5e38 6697#include <sys/ptrace.h>
c906108c 6698int main() {
97bf5e38 6699PTRACE_GETREGS;
c906108c
SS
6700; return 0; }
6701EOF
030292b7 6702if { (eval echo configure:6703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6703 rm -rf conftest*
97bf5e38 6704 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6705else
6706 echo "configure: failed program was:" >&5
6707 cat conftest.$ac_ext >&5
6708 rm -rf conftest*
97bf5e38 6709 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6710fi
6711rm -f conftest*
6712fi
6713
97bf5e38
MK
6714echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6715if test $gdb_cv_have_ptrace_getregs = yes; then
6716 cat >> confdefs.h <<\EOF
6717#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6718EOF
6719
97bf5e38 6720fi
c906108c 6721
97bf5e38
MK
6722# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6723echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
030292b7 6724echo "configure:6725: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6725if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6726 echo $ac_n "(cached) $ac_c" 1>&6
6727else
6728 cat > conftest.$ac_ext <<EOF
030292b7 6729#line 6730 "configure"
c906108c 6730#include "confdefs.h"
97bf5e38 6731#include <sys/ptrace.h>
c906108c 6732int main() {
97bf5e38 6733PTRACE_GETFPXREGS;
c906108c
SS
6734; return 0; }
6735EOF
030292b7 6736if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6737 rm -rf conftest*
97bf5e38 6738 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6739else
6740 echo "configure: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742 rm -rf conftest*
97bf5e38 6743 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6744fi
6745rm -f conftest*
6746fi
6747
97bf5e38
MK
6748echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6749if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6750 cat >> confdefs.h <<\EOF
6751#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6752EOF
6753
97bf5e38 6754fi
c906108c 6755
97bf5e38
MK
6756# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6757echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
030292b7 6758echo "configure:6759: checking for PT_GETDBREGS" >&5
97bf5e38 6759if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6760 echo $ac_n "(cached) $ac_c" 1>&6
6761else
6762 cat > conftest.$ac_ext <<EOF
030292b7 6763#line 6764 "configure"
c906108c 6764#include "confdefs.h"
97bf5e38
MK
6765#include <sys/types.h>
6766#include <sys/ptrace.h>
c906108c 6767int main() {
97bf5e38 6768PT_GETDBREGS;
c906108c
SS
6769; return 0; }
6770EOF
030292b7 6771if { (eval echo configure:6772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6772 rm -rf conftest*
97bf5e38 6773 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6774else
6775 echo "configure: failed program was:" >&5
6776 cat conftest.$ac_ext >&5
6777 rm -rf conftest*
97bf5e38 6778 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6779fi
6780rm -f conftest*
6781fi
6782
97bf5e38
MK
6783echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6784if test $gdb_cv_have_pt_getdbregs = yes; then
6785 cat >> confdefs.h <<\EOF
6786#define HAVE_PT_GETDBREGS 1
c906108c
SS
6787EOF
6788
97bf5e38 6789fi
c906108c 6790
97bf5e38
MK
6791# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6792echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
030292b7 6793echo "configure:6794: checking for PT_GETXMMREGS" >&5
97bf5e38 6794if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6795 echo $ac_n "(cached) $ac_c" 1>&6
6796else
6797 cat > conftest.$ac_ext <<EOF
030292b7 6798#line 6799 "configure"
c906108c 6799#include "confdefs.h"
97bf5e38
MK
6800#include <sys/types.h>
6801#include <sys/ptrace.h>
c906108c 6802int main() {
97bf5e38 6803PT_GETXMMREGS;
c906108c
SS
6804; return 0; }
6805EOF
030292b7 6806if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6807 rm -rf conftest*
97bf5e38 6808 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6809else
6810 echo "configure: failed program was:" >&5
6811 cat conftest.$ac_ext >&5
6812 rm -rf conftest*
97bf5e38 6813 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6814fi
6815rm -f conftest*
6816fi
6817
97bf5e38
MK
6818echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6819if test $gdb_cv_have_pt_getxmmregs = yes; then
6820 cat >> confdefs.h <<\EOF
6821#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6822EOF
6823
97bf5e38 6824fi
c906108c 6825
97bf5e38
MK
6826
6827echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
030292b7 6828echo "configure:6829: checking whether malloc must be declared" >&5
97bf5e38 6829if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6830 echo $ac_n "(cached) $ac_c" 1>&6
6831else
6832 cat > conftest.$ac_ext <<EOF
030292b7 6833#line 6834 "configure"
3862412b 6834#include "confdefs.h"
e17bf198 6835
97bf5e38
MK
6836#include <stdio.h>
6837#ifdef HAVE_STRING_H
6838#include <string.h>
6839#else
6840#ifdef HAVE_STRINGS_H
6841#include <strings.h>
6842#endif
6843#endif
6844#ifdef HAVE_STDLIB_H
6845#include <stdlib.h>
6846#endif
6847#ifdef HAVE_UNISTD_H
6848#include <unistd.h>
6849#endif
3862412b 6850int main() {
97bf5e38 6851char *(*pfn) = (char *(*)) malloc
3862412b
MK
6852; return 0; }
6853EOF
030292b7 6854if { (eval echo configure:6855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6855 rm -rf conftest*
97bf5e38 6856 bfd_cv_decl_needed_malloc=no
3862412b
MK
6857else
6858 echo "configure: failed program was:" >&5
6859 cat conftest.$ac_ext >&5
6860 rm -rf conftest*
97bf5e38 6861 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6862fi
6863rm -f conftest*
6864fi
6865
97bf5e38
MK
6866echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6867if test $bfd_cv_decl_needed_malloc = yes; then
6868 cat >> confdefs.h <<\EOF
6869#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6870EOF
6871
97bf5e38 6872fi
3862412b 6873
97bf5e38 6874echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
030292b7 6875echo "configure:6876: checking whether realloc must be declared" >&5
97bf5e38 6876if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6877 echo $ac_n "(cached) $ac_c" 1>&6
6878else
6879 cat > conftest.$ac_ext <<EOF
030292b7 6880#line 6881 "configure"
3862412b 6881#include "confdefs.h"
e17bf198 6882
97bf5e38
MK
6883#include <stdio.h>
6884#ifdef HAVE_STRING_H
6885#include <string.h>
6886#else
6887#ifdef HAVE_STRINGS_H
6888#include <strings.h>
6889#endif
6890#endif
6891#ifdef HAVE_STDLIB_H
6892#include <stdlib.h>
6893#endif
6894#ifdef HAVE_UNISTD_H
6895#include <unistd.h>
6896#endif
3862412b 6897int main() {
97bf5e38 6898char *(*pfn) = (char *(*)) realloc
3862412b
MK
6899; return 0; }
6900EOF
030292b7 6901if { (eval echo configure:6902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6902 rm -rf conftest*
97bf5e38 6903 bfd_cv_decl_needed_realloc=no
3862412b
MK
6904else
6905 echo "configure: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 rm -rf conftest*
97bf5e38 6908 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6909fi
6910rm -f conftest*
6911fi
6912
97bf5e38
MK
6913echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6914if test $bfd_cv_decl_needed_realloc = yes; then
6915 cat >> confdefs.h <<\EOF
6916#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6917EOF
6918
97bf5e38 6919fi
3862412b 6920
97bf5e38 6921echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
030292b7 6922echo "configure:6923: checking whether free must be declared" >&5
97bf5e38 6923if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6924 echo $ac_n "(cached) $ac_c" 1>&6
6925else
6926 cat > conftest.$ac_ext <<EOF
030292b7 6927#line 6928 "configure"
451928c5 6928#include "confdefs.h"
e17bf198 6929
97bf5e38
MK
6930#include <stdio.h>
6931#ifdef HAVE_STRING_H
6932#include <string.h>
6933#else
6934#ifdef HAVE_STRINGS_H
6935#include <strings.h>
6936#endif
6937#endif
6938#ifdef HAVE_STDLIB_H
6939#include <stdlib.h>
6940#endif
6941#ifdef HAVE_UNISTD_H
6942#include <unistd.h>
6943#endif
451928c5 6944int main() {
97bf5e38 6945char *(*pfn) = (char *(*)) free
451928c5
AC
6946; return 0; }
6947EOF
030292b7 6948if { (eval echo configure:6949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6949 rm -rf conftest*
97bf5e38 6950 bfd_cv_decl_needed_free=no
451928c5
AC
6951else
6952 echo "configure: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 rm -rf conftest*
97bf5e38 6955 bfd_cv_decl_needed_free=yes
451928c5
AC
6956fi
6957rm -f conftest*
6958fi
6959
97bf5e38
MK
6960echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6961if test $bfd_cv_decl_needed_free = yes; then
6962 cat >> confdefs.h <<\EOF
6963#define NEED_DECLARATION_FREE 1
451928c5
AC
6964EOF
6965
97bf5e38 6966fi
451928c5 6967
97bf5e38 6968echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
030292b7 6969echo "configure:6970: checking whether strerror must be declared" >&5
97bf5e38 6970if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6971 echo $ac_n "(cached) $ac_c" 1>&6
6972else
6973 cat > conftest.$ac_ext <<EOF
030292b7 6974#line 6975 "configure"
451928c5 6975#include "confdefs.h"
e17bf198 6976
97bf5e38
MK
6977#include <stdio.h>
6978#ifdef HAVE_STRING_H
6979#include <string.h>
6980#else
6981#ifdef HAVE_STRINGS_H
6982#include <strings.h>
6983#endif
6984#endif
6985#ifdef HAVE_STDLIB_H
6986#include <stdlib.h>
6987#endif
6988#ifdef HAVE_UNISTD_H
6989#include <unistd.h>
6990#endif
451928c5 6991int main() {
97bf5e38 6992char *(*pfn) = (char *(*)) strerror
451928c5
AC
6993; return 0; }
6994EOF
030292b7 6995if { (eval echo configure:6996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6996 rm -rf conftest*
97bf5e38 6997 bfd_cv_decl_needed_strerror=no
451928c5
AC
6998else
6999 echo "configure: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7001 rm -rf conftest*
97bf5e38 7002 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7003fi
7004rm -f conftest*
7005fi
7006
97bf5e38
MK
7007echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7008if test $bfd_cv_decl_needed_strerror = yes; then
7009 cat >> confdefs.h <<\EOF
7010#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7011EOF
7012
97bf5e38 7013fi
451928c5 7014
97bf5e38 7015echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
030292b7 7016echo "configure:7017: checking whether strdup must be declared" >&5
97bf5e38 7017if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7018 echo $ac_n "(cached) $ac_c" 1>&6
7019else
7020 cat > conftest.$ac_ext <<EOF
030292b7 7021#line 7022 "configure"
3862412b 7022#include "confdefs.h"
e17bf198 7023
97bf5e38
MK
7024#include <stdio.h>
7025#ifdef HAVE_STRING_H
7026#include <string.h>
7027#else
7028#ifdef HAVE_STRINGS_H
7029#include <strings.h>
7030#endif
7031#endif
7032#ifdef HAVE_STDLIB_H
7033#include <stdlib.h>
7034#endif
7035#ifdef HAVE_UNISTD_H
7036#include <unistd.h>
7037#endif
3862412b 7038int main() {
97bf5e38 7039char *(*pfn) = (char *(*)) strdup
3862412b
MK
7040; return 0; }
7041EOF
030292b7 7042if { (eval echo configure:7043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7043 rm -rf conftest*
97bf5e38 7044 bfd_cv_decl_needed_strdup=no
3862412b
MK
7045else
7046 echo "configure: failed program was:" >&5
7047 cat conftest.$ac_ext >&5
7048 rm -rf conftest*
97bf5e38 7049 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7050fi
7051rm -f conftest*
7052fi
7053
97bf5e38
MK
7054echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7055if test $bfd_cv_decl_needed_strdup = yes; then
7056 cat >> confdefs.h <<\EOF
7057#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7058EOF
7059
97bf5e38 7060fi
3862412b 7061
97bf5e38 7062echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
030292b7 7063echo "configure:7064: checking whether strstr must be declared" >&5
97bf5e38 7064if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7065 echo $ac_n "(cached) $ac_c" 1>&6
7066else
7067 cat > conftest.$ac_ext <<EOF
030292b7 7068#line 7069 "configure"
3862412b 7069#include "confdefs.h"
e17bf198 7070
97bf5e38
MK
7071#include <stdio.h>
7072#ifdef HAVE_STRING_H
7073#include <string.h>
7074#else
7075#ifdef HAVE_STRINGS_H
7076#include <strings.h>
7077#endif
7078#endif
7079#ifdef HAVE_STDLIB_H
7080#include <stdlib.h>
7081#endif
7082#ifdef HAVE_UNISTD_H
7083#include <unistd.h>
7084#endif
3862412b 7085int main() {
97bf5e38 7086char *(*pfn) = (char *(*)) strstr
3862412b
MK
7087; return 0; }
7088EOF
030292b7 7089if { (eval echo configure:7090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7090 rm -rf conftest*
97bf5e38 7091 bfd_cv_decl_needed_strstr=no
3862412b
MK
7092else
7093 echo "configure: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7095 rm -rf conftest*
97bf5e38 7096 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7097fi
7098rm -f conftest*
7099fi
7100
97bf5e38
MK
7101echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7102if test $bfd_cv_decl_needed_strstr = yes; then
7103 cat >> confdefs.h <<\EOF
7104#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7105EOF
7106
97bf5e38 7107fi
3862412b 7108
97bf5e38 7109echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
030292b7 7110echo "configure:7111: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7111if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7112 echo $ac_n "(cached) $ac_c" 1>&6
7113else
7114 cat > conftest.$ac_ext <<EOF
030292b7 7115#line 7116 "configure"
596c9d4b
KB
7116#include "confdefs.h"
7117
97bf5e38
MK
7118#include <stdio.h>
7119#ifdef HAVE_STRING_H
7120#include <string.h>
7121#else
7122#ifdef HAVE_STRINGS_H
7123#include <strings.h>
7124#endif
7125#endif
7126#ifdef HAVE_STDLIB_H
7127#include <stdlib.h>
7128#endif
7129#ifdef HAVE_UNISTD_H
7130#include <unistd.h>
7131#endif
596c9d4b 7132int main() {
97bf5e38 7133char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7134; return 0; }
7135EOF
030292b7 7136if { (eval echo configure:7137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7137 rm -rf conftest*
97bf5e38 7138 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7139else
7140 echo "configure: failed program was:" >&5
7141 cat conftest.$ac_ext >&5
7142 rm -rf conftest*
97bf5e38 7143 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7144fi
7145rm -f conftest*
7146fi
7147
97bf5e38
MK
7148echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7149if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7150 cat >> confdefs.h <<\EOF
7151#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7152EOF
7153
97bf5e38 7154fi
596c9d4b 7155
97bf5e38
MK
7156
7157# The following save_state_t checkery is only necessary for HPUX
7158# versions earlier than 10.20. When those fade from memory, this
7159# could be expunged. --jsm 1999-03-22
7160
7161echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
030292b7 7162echo "configure:7163: checking for HPUX save_state structure" >&5
97bf5e38 7163cat > conftest.$ac_ext <<EOF
030292b7 7164#line 7165 "configure"
97bf5e38
MK
7165#include "confdefs.h"
7166#include <machine/save_state.h>
7167EOF
7168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7169 egrep "save_state_t" >/dev/null 2>&1; then
7170 rm -rf conftest*
7171 gdb_cv_hpux_savestate=yes
7172else
7173 rm -rf conftest*
7174 gdb_cv_hpux_savestate=no
7175fi
7176rm -f conftest*
7177
7178cat > conftest.$ac_ext <<EOF
030292b7 7179#line 7180 "configure"
97bf5e38
MK
7180#include "confdefs.h"
7181#include <machine/save_state.h>
7182EOF
7183if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7184 egrep "ss_wide" >/dev/null 2>&1; then
7185 rm -rf conftest*
7186 gdb_cv_hpux_sswide=yes
7187else
7188 rm -rf conftest*
7189 gdb_cv_hpux_sswide=no
7190fi
7191rm -f conftest*
7192
7193if test $gdb_cv_hpux_savestate = yes
7194then
7195 cat >> confdefs.h <<\EOF
7196#define HAVE_STRUCT_SAVE_STATE_T 1
7197EOF
7198
7199fi
7200if test $gdb_cv_hpux_sswide = yes
7201then
7202 cat >> confdefs.h <<\EOF
7203#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7204EOF
7205
7206fi
7207echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7208
7209
7210# If we are configured native on GNU/Linux, work around problems with
7211# sys/procfs.h
7212# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7213
7214if test "${target}" = "${host}"; then
7215 case "${host}" in
7216 i[3456]86-*-linux*)
7217 cat >> confdefs.h <<\EOF
7218#define START_INFERIOR_TRAPS_EXPECTED 2
7219EOF
7220
7221 cat >> confdefs.h <<\EOF
7222#define sys_quotactl 1
7223EOF
7224
7225 ;;
7226 ia64-*-aix*)
7227 cat >> confdefs.h <<\EOF
7228#define NEW_PROC_API 1
7229EOF
7230
7231 ;;
7232 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7233 cat >> confdefs.h <<\EOF
7234#define NEW_PROC_API 1
7235EOF
7236
7237 ;;
7238 *-*-solaris2.[678])
7239 cat >> confdefs.h <<\EOF
7240#define NEW_PROC_API 1
7241EOF
7242
7243 ;;
7244 esac
7245fi
7246
7247if test "$ac_cv_header_sys_procfs_h" = yes; then
7248 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7249echo "configure:7250: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7250 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7251 echo $ac_n "(cached) $ac_c" 1>&6
7252else
7253 cat > conftest.$ac_ext <<EOF
030292b7 7254#line 7255 "configure"
596c9d4b
KB
7255#include "confdefs.h"
7256
7257#define _SYSCALL32
7258#include <sys/procfs.h>
7259int main() {
97bf5e38 7260pstatus_t avar
596c9d4b
KB
7261; return 0; }
7262EOF
030292b7 7263if { (eval echo configure:7264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7264 rm -rf conftest*
97bf5e38 7265 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7266else
7267 echo "configure: failed program was:" >&5
7268 cat conftest.$ac_ext >&5
7269 rm -rf conftest*
97bf5e38 7270 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7271
7272fi
7273rm -f conftest*
7274fi
7275
97bf5e38 7276 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7277 cat >> confdefs.h <<\EOF
97bf5e38 7278#define HAVE_PSTATUS_T 1
596c9d4b
KB
7279EOF
7280
7281 fi
97bf5e38 7282 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7283
97bf5e38 7284 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7285echo "configure:7286: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7286 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7287 echo $ac_n "(cached) $ac_c" 1>&6
7288else
7289 cat > conftest.$ac_ext <<EOF
030292b7 7290#line 7291 "configure"
596c9d4b
KB
7291#include "confdefs.h"
7292
7293#define _SYSCALL32
7294#include <sys/procfs.h>
7295int main() {
97bf5e38 7296prrun_t avar
596c9d4b
KB
7297; return 0; }
7298EOF
030292b7 7299if { (eval echo configure:7300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7300 rm -rf conftest*
97bf5e38 7301 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7302else
7303 echo "configure: failed program was:" >&5
7304 cat conftest.$ac_ext >&5
7305 rm -rf conftest*
97bf5e38 7306 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7307
7308fi
7309rm -f conftest*
7310fi
7311
97bf5e38 7312 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7313 cat >> confdefs.h <<\EOF
97bf5e38 7314#define HAVE_PRRUN_T 1
596c9d4b
KB
7315EOF
7316
7317 fi
97bf5e38 7318 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7319
97bf5e38 7320 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7321echo "configure:7322: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7322 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7323 echo $ac_n "(cached) $ac_c" 1>&6
7324else
7325 cat > conftest.$ac_ext <<EOF
030292b7 7326#line 7327 "configure"
596c9d4b
KB
7327#include "confdefs.h"
7328
7329#define _SYSCALL32
7330#include <sys/procfs.h>
7331int main() {
97bf5e38 7332gregset_t avar
596c9d4b
KB
7333; return 0; }
7334EOF
030292b7 7335if { (eval echo configure:7336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7336 rm -rf conftest*
97bf5e38 7337 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7338else
7339 echo "configure: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
7341 rm -rf conftest*
97bf5e38 7342 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7343
7344fi
7345rm -f conftest*
7346fi
7347
97bf5e38 7348 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7349 cat >> confdefs.h <<\EOF
97bf5e38 7350#define HAVE_GREGSET_T 1
596c9d4b
KB
7351EOF
7352
7353 fi
97bf5e38 7354 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7355
97bf5e38 7356 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7357echo "configure:7358: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7358 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7359 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7360else
7361 cat > conftest.$ac_ext <<EOF
030292b7 7362#line 7363 "configure"
d84dd0c5 7363#include "confdefs.h"
97bf5e38
MK
7364
7365#define _SYSCALL32
d84dd0c5 7366#include <sys/procfs.h>
97bf5e38
MK
7367int main() {
7368fpregset_t avar
7369; return 0; }
d84dd0c5 7370EOF
030292b7 7371if { (eval echo configure:7372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7372 rm -rf conftest*
7373 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7374else
7375 echo "configure: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
97bf5e38
MK
7377 rm -rf conftest*
7378 bfd_cv_have_sys_procfs_type_fpregset_t=no
7379
d84dd0c5 7380fi
97bf5e38 7381rm -f conftest*
d84dd0c5
MK
7382fi
7383
97bf5e38
MK
7384 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7385 cat >> confdefs.h <<\EOF
7386#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7387EOF
7388
97bf5e38
MK
7389 fi
7390 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7391
97bf5e38 7392 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7393echo "configure:7394: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7394 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7395 echo $ac_n "(cached) $ac_c" 1>&6
7396else
7397 cat > conftest.$ac_ext <<EOF
030292b7 7398#line 7399 "configure"
c906108c 7399#include "confdefs.h"
c906108c 7400
97bf5e38
MK
7401#define _SYSCALL32
7402#include <sys/procfs.h>
c906108c 7403int main() {
97bf5e38 7404prgregset_t avar
c906108c
SS
7405; return 0; }
7406EOF
030292b7 7407if { (eval echo configure:7408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7408 rm -rf conftest*
97bf5e38 7409 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7410else
7411 echo "configure: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 rm -rf conftest*
97bf5e38
MK
7414 bfd_cv_have_sys_procfs_type_prgregset_t=no
7415
c906108c
SS
7416fi
7417rm -f conftest*
7418fi
7419
97bf5e38
MK
7420 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7421 cat >> confdefs.h <<\EOF
7422#define HAVE_PRGREGSET_T 1
c906108c
SS
7423EOF
7424
97bf5e38
MK
7425 fi
7426 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7427
97bf5e38 7428 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7429echo "configure:7430: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7430 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7431 echo $ac_n "(cached) $ac_c" 1>&6
7432else
7433 cat > conftest.$ac_ext <<EOF
030292b7 7434#line 7435 "configure"
d45fe813 7435#include "confdefs.h"
97bf5e38
MK
7436
7437#define _SYSCALL32
7438#include <sys/procfs.h>
d45fe813 7439int main() {
97bf5e38 7440prfpregset_t avar
d45fe813
KB
7441; return 0; }
7442EOF
030292b7 7443if { (eval echo configure:7444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7444 rm -rf conftest*
97bf5e38 7445 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7446else
7447 echo "configure: failed program was:" >&5
7448 cat conftest.$ac_ext >&5
7449 rm -rf conftest*
97bf5e38
MK
7450 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7451
d45fe813
KB
7452fi
7453rm -f conftest*
7454fi
7455
97bf5e38
MK
7456 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7457 cat >> confdefs.h <<\EOF
7458#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7459EOF
7460
97bf5e38
MK
7461 fi
7462 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7463
97bf5e38 7464 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7465echo "configure:7466: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7466 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7467 echo $ac_n "(cached) $ac_c" 1>&6
7468else
7469 cat > conftest.$ac_ext <<EOF
030292b7 7470#line 7471 "configure"
d45fe813 7471#include "confdefs.h"
97bf5e38
MK
7472
7473#define _SYSCALL32
7474#include <sys/procfs.h>
d45fe813 7475int main() {
97bf5e38 7476prgregset32_t avar
d45fe813
KB
7477; return 0; }
7478EOF
030292b7 7479if { (eval echo configure:7480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7480 rm -rf conftest*
97bf5e38 7481 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7482else
7483 echo "configure: failed program was:" >&5
7484 cat conftest.$ac_ext >&5
7485 rm -rf conftest*
97bf5e38
MK
7486 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7487
d45fe813
KB
7488fi
7489rm -f conftest*
7490fi
7491
97bf5e38
MK
7492 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7493 cat >> confdefs.h <<\EOF
7494#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7495EOF
7496
97bf5e38
MK
7497 fi
7498 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7499
97bf5e38 7500 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7501echo "configure:7502: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7502 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7503 echo $ac_n "(cached) $ac_c" 1>&6
7504else
7505 cat > conftest.$ac_ext <<EOF
030292b7 7506#line 7507 "configure"
d45fe813 7507#include "confdefs.h"
97bf5e38
MK
7508
7509#define _SYSCALL32
7510#include <sys/procfs.h>
d45fe813 7511int main() {
97bf5e38 7512prfpregset32_t avar
d45fe813
KB
7513; return 0; }
7514EOF
030292b7 7515if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7516 rm -rf conftest*
97bf5e38 7517 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7518else
7519 echo "configure: failed program was:" >&5
7520 cat conftest.$ac_ext >&5
7521 rm -rf conftest*
97bf5e38
MK
7522 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7523
d45fe813
KB
7524fi
7525rm -f conftest*
7526fi
7527
97bf5e38
MK
7528 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7529 cat >> confdefs.h <<\EOF
7530#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7531EOF
7532
97bf5e38
MK
7533 fi
7534 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7535
97bf5e38 7536 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7537echo "configure:7538: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7538 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7539 echo $ac_n "(cached) $ac_c" 1>&6
7540else
7541 cat > conftest.$ac_ext <<EOF
030292b7 7542#line 7543 "configure"
d45fe813 7543#include "confdefs.h"
97bf5e38 7544
d45fe813 7545#define _SYSCALL32
97bf5e38 7546#include <sys/procfs.h>
d45fe813 7547int main() {
97bf5e38 7548lwpid_t avar
d45fe813
KB
7549; return 0; }
7550EOF
030292b7 7551if { (eval echo configure:7552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7552 rm -rf conftest*
97bf5e38 7553 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7554else
7555 echo "configure: failed program was:" >&5
7556 cat conftest.$ac_ext >&5
7557 rm -rf conftest*
97bf5e38
MK
7558 bfd_cv_have_sys_procfs_type_lwpid_t=no
7559
d45fe813
KB
7560fi
7561rm -f conftest*
7562fi
7563
97bf5e38
MK
7564 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7565 cat >> confdefs.h <<\EOF
7566#define HAVE_LWPID_T 1
d45fe813
KB
7567EOF
7568
97bf5e38
MK
7569 fi
7570 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7571
97bf5e38 7572 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7573echo "configure:7574: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7574 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7575 echo $ac_n "(cached) $ac_c" 1>&6
7576else
7577 cat > conftest.$ac_ext <<EOF
030292b7 7578#line 7579 "configure"
c906108c
SS
7579#include "confdefs.h"
7580
97bf5e38
MK
7581#define _SYSCALL32
7582#include <sys/procfs.h>
c906108c 7583int main() {
97bf5e38 7584psaddr_t avar
c906108c
SS
7585; return 0; }
7586EOF
030292b7 7587if { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7588 rm -rf conftest*
97bf5e38 7589 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7590else
7591 echo "configure: failed program was:" >&5
7592 cat conftest.$ac_ext >&5
7593 rm -rf conftest*
97bf5e38
MK
7594 bfd_cv_have_sys_procfs_type_psaddr_t=no
7595
c906108c
SS
7596fi
7597rm -f conftest*
7598fi
7599
97bf5e38
MK
7600 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7601 cat >> confdefs.h <<\EOF
7602#define HAVE_PSADDR_T 1
c906108c
SS
7603EOF
7604
97bf5e38
MK
7605 fi
7606 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7607
97bf5e38 7608 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7609echo "configure:7610: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7610 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7611 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7612else
7613 cat > conftest.$ac_ext <<EOF
030292b7 7614#line 7615 "configure"
c906108c
SS
7615#include "confdefs.h"
7616
97bf5e38
MK
7617#define _SYSCALL32
7618#include <sys/procfs.h>
7619int main() {
7620prsysent_t avar
7621; return 0; }
c906108c 7622EOF
030292b7 7623if { (eval echo configure:7624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7624 rm -rf conftest*
7625 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7626else
7627 echo "configure: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
97bf5e38
MK
7629 rm -rf conftest*
7630 bfd_cv_have_sys_procfs_type_prsysent_t=no
7631
c906108c 7632fi
97bf5e38 7633rm -f conftest*
c906108c
SS
7634fi
7635
97bf5e38
MK
7636 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7637 cat >> confdefs.h <<\EOF
7638#define HAVE_PRSYSENT_T 1
c906108c
SS
7639EOF
7640
97bf5e38
MK
7641 fi
7642 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7643
97bf5e38 7644 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7645echo "configure:7646: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7646 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7647 echo $ac_n "(cached) $ac_c" 1>&6
7648else
7649 cat > conftest.$ac_ext <<EOF
030292b7 7650#line 7651 "configure"
c906108c
SS
7651#include "confdefs.h"
7652
97bf5e38
MK
7653#define _SYSCALL32
7654#include <sys/procfs.h>
c906108c 7655int main() {
97bf5e38 7656pr_sigset_t avar
c906108c
SS
7657; return 0; }
7658EOF
030292b7 7659if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7660 rm -rf conftest*
97bf5e38 7661 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7662else
7663 echo "configure: failed program was:" >&5
7664 cat conftest.$ac_ext >&5
7665 rm -rf conftest*
97bf5e38
MK
7666 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7667
c906108c
SS
7668fi
7669rm -f conftest*
7670fi
7671
97bf5e38
MK
7672 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7673 cat >> confdefs.h <<\EOF
7674#define HAVE_PR_SIGSET_T 1
c906108c
SS
7675EOF
7676
97bf5e38
MK
7677 fi
7678 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7679
97bf5e38 7680 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7681echo "configure:7682: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7682 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7683 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7684else
7685 cat > conftest.$ac_ext <<EOF
030292b7 7686#line 7687 "configure"
c906108c
SS
7687#include "confdefs.h"
7688
97bf5e38
MK
7689#define _SYSCALL32
7690#include <sys/procfs.h>
7691int main() {
7692pr_sigaction64_t avar
7693; return 0; }
c906108c 7694EOF
030292b7 7695if { (eval echo configure:7696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7696 rm -rf conftest*
7697 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7698else
7699 echo "configure: failed program was:" >&5
7700 cat conftest.$ac_ext >&5
97bf5e38
MK
7701 rm -rf conftest*
7702 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7703
c906108c 7704fi
97bf5e38 7705rm -f conftest*
c906108c
SS
7706fi
7707
97bf5e38
MK
7708 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7709 cat >> confdefs.h <<\EOF
7710#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7711EOF
7712
97bf5e38
MK
7713 fi
7714 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7715
7716 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
030292b7 7717echo "configure:7718: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7718 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7719 echo $ac_n "(cached) $ac_c" 1>&6
7720else
7721 cat > conftest.$ac_ext <<EOF
030292b7 7722#line 7723 "configure"
97bf5e38
MK
7723#include "confdefs.h"
7724
7725#define _SYSCALL32
7726#include <sys/procfs.h>
7727int main() {
7728pr_siginfo64_t avar
7729; return 0; }
7730EOF
030292b7 7731if { (eval echo configure:7732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7732 rm -rf conftest*
7733 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7734else
7735 echo "configure: failed program was:" >&5
7736 cat conftest.$ac_ext >&5
7737 rm -rf conftest*
7738 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7739
7740fi
7741rm -f conftest*
c906108c 7742fi
c906108c 7743
97bf5e38
MK
7744 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7745 cat >> confdefs.h <<\EOF
7746#define HAVE_PR_SIGINFO64_T 1
7747EOF
c906108c 7748
97bf5e38
MK
7749 fi
7750 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7751
7752
7753
7754
7755
7756 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7757 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
030292b7 7758echo "configure:7759: checking whether prfpregset_t type is broken" >&5
97bf5e38 7759 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7760 echo $ac_n "(cached) $ac_c" 1>&6
7761else
7762 if test "$cross_compiling" = yes; then
97bf5e38 7763 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7764else
7765 cat > conftest.$ac_ext <<EOF
030292b7 7766#line 7767 "configure"
c906108c 7767#include "confdefs.h"
97bf5e38
MK
7768#include <sys/procfs.h>
7769 int main ()
7770 {
7771 if (sizeof (prfpregset_t) == sizeof (void *))
7772 return 1;
7773 return 0;
7774 }
c906108c 7775EOF
030292b7 7776if { (eval echo configure:7777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7777then
97bf5e38 7778 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7779else
7780 echo "configure: failed program was:" >&5
7781 cat conftest.$ac_ext >&5
7782 rm -fr conftest*
97bf5e38 7783 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7784fi
7785rm -fr conftest*
7786fi
7787
7788fi
7789
97bf5e38
MK
7790 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7791 if test $gdb_cv_prfpregset_t_broken = yes; then
7792 cat >> confdefs.h <<\EOF
7793#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7794EOF
7795
97bf5e38
MK
7796 fi
7797 fi
c906108c 7798
97bf5e38
MK
7799
7800 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
030292b7 7801echo "configure:7802: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7802 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7803 echo $ac_n "(cached) $ac_c" 1>&6
7804else
7805 cat > conftest.$ac_ext <<EOF
030292b7 7806#line 7807 "configure"
c906108c 7807#include "confdefs.h"
97bf5e38
MK
7808#include <unistd.h>
7809#include <sys/types.h>
7810#include <sys/procfs.h>
7811
7812int main() {
7813
7814 int dummy;;
7815 dummy = ioctl(0, PIOCSET, &dummy);
7816
7817; return 0; }
c906108c 7818EOF
030292b7 7819if { (eval echo configure:7820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7820 rm -rf conftest*
97bf5e38 7821 gdb_cv_have_procfs_piocset=yes
c906108c 7822else
c906108c
SS
7823 echo "configure: failed program was:" >&5
7824 cat conftest.$ac_ext >&5
7825 rm -rf conftest*
97bf5e38 7826 gdb_cv_have_procfs_piocset=no
c906108c
SS
7827fi
7828rm -f conftest*
7829fi
97bf5e38
MK
7830
7831 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7832 if test $gdb_cv_have_procfs_piocset = yes; then
7833 cat >> confdefs.h <<\EOF
7834#define HAVE_PROCFS_PIOCSET 1
c906108c 7835EOF
97bf5e38
MK
7836
7837 fi
c906108c 7838fi
c906108c 7839
97bf5e38
MK
7840if test ${host} = ${target} ; then
7841
7842 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
030292b7 7843echo "configure:7844: checking for member l_addr in struct link_map" >&5
97bf5e38 7844 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7845 echo $ac_n "(cached) $ac_c" 1>&6
7846else
7847 cat > conftest.$ac_ext <<EOF
030292b7 7848#line 7849 "configure"
c906108c 7849#include "confdefs.h"
97bf5e38 7850#include <link.h>
c906108c 7851int main() {
97bf5e38 7852struct link_map lm; (void) lm.l_addr;
c906108c
SS
7853; return 0; }
7854EOF
030292b7 7855if { (eval echo configure:7856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7856 rm -rf conftest*
97bf5e38 7857 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7858else
7859 echo "configure: failed program was:" >&5
7860 cat conftest.$ac_ext >&5
7861 rm -rf conftest*
97bf5e38 7862 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7863fi
7864rm -f conftest*
7865fi
7866
97bf5e38
MK
7867 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7868 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7869 cat >> confdefs.h <<\EOF
7870#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7871EOF
97bf5e38
MK
7872
7873 fi
7874
7875
7876 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
030292b7 7877echo "configure:7878: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7878 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7879 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7880else
97bf5e38 7881 cat > conftest.$ac_ext <<EOF
030292b7 7882#line 7883 "configure"
97bf5e38
MK
7883#include "confdefs.h"
7884#include <sys/types.h>
7885#include <link.h>
7886int main() {
7887struct link_map lm; (void) lm.lm_addr;
7888; return 0; }
7889EOF
030292b7 7890if { (eval echo configure:7891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7891 rm -rf conftest*
7892 gdb_cv_have_struct_link_map_with_lm_members=yes
7893else
7894 echo "configure: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7896 rm -rf conftest*
7897 gdb_cv_have_struct_link_map_with_lm_members=no
7898fi
7899rm -f conftest*
c906108c 7900fi
c906108c 7901
97bf5e38
MK
7902 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7903 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7904 cat >> confdefs.h <<\EOF
7905#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7906EOF
7907
7908 fi
7909
7910
7911 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
030292b7 7912echo "configure:7913: checking for member som_addr in struct so_map" >&5
97bf5e38 7913 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7914 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7915else
7916 cat > conftest.$ac_ext <<EOF
030292b7 7917#line 7918 "configure"
c906108c 7918#include "confdefs.h"
97bf5e38
MK
7919#include <sys/types.h>
7920#ifdef HAVE_NLIST_H
7921#include <nlist.h>
7922#endif
7923#include <link.h>
7924int main() {
7925struct so_map lm; (void) lm.som_addr;
7926; return 0; }
7927EOF
030292b7 7928if { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7929 rm -rf conftest*
7930 gdb_cv_have_struct_so_map_with_som_members=yes
7931else
7932 echo "configure: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 rm -rf conftest*
7935 gdb_cv_have_struct_so_map_with_som_members=no
7936fi
7937rm -f conftest*
7938fi
c906108c 7939
97bf5e38
MK
7940 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7941 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7942 cat >> confdefs.h <<\EOF
7943#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7944EOF
c906108c 7945
97bf5e38 7946 fi
c906108c 7947
97bf5e38
MK
7948
7949 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
030292b7 7950echo "configure:7951: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7951 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7952 echo $ac_n "(cached) $ac_c" 1>&6
7953else
7954 cat > conftest.$ac_ext <<EOF
030292b7 7955#line 7956 "configure"
97bf5e38
MK
7956#include "confdefs.h"
7957#define _SYSCALL32
7958#include <sys/link.h>
7959int main() {
7960struct link_map32 l;
7961; return 0; }
7962EOF
030292b7 7963if { (eval echo configure:7964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7964 rm -rf conftest*
7965 gdb_cv_have_struct_link_map32=yes
7966else
7967 echo "configure: failed program was:" >&5
7968 cat conftest.$ac_ext >&5
7969 rm -rf conftest*
7970 gdb_cv_have_struct_link_map32=no
7971fi
7972rm -f conftest*
7973fi
c906108c 7974
97bf5e38
MK
7975 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7976 if test $gdb_cv_have_struct_link_map32 = yes; then
7977 cat >> confdefs.h <<\EOF
7978#define HAVE_STRUCT_LINK_MAP32 1
7979EOF
c906108c 7980
97bf5e38
MK
7981 cat >> confdefs.h <<\EOF
7982#define _SYSCALL32 1
7983EOF
c906108c 7984
97bf5e38
MK
7985 fi
7986fi
c906108c 7987
c906108c 7988
97bf5e38 7989echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
030292b7 7990echo "configure:7991: checking for long long support in compiler" >&5
97bf5e38
MK
7991if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7992 echo $ac_n "(cached) $ac_c" 1>&6
7993else
7994 cat > conftest.$ac_ext <<EOF
030292b7 7995#line 7996 "configure"
97bf5e38 7996#include "confdefs.h"
c906108c 7997
97bf5e38 7998int main() {
c906108c 7999
97bf5e38
MK
8000 extern long long foo;
8001 switch (foo & 2) { case 0: return 1; }
c906108c 8002
97bf5e38
MK
8003; return 0; }
8004EOF
030292b7 8005if { (eval echo configure:8006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8006 rm -rf conftest*
8007 gdb_cv_c_long_long=yes
8008else
8009 echo "configure: failed program was:" >&5
8010 cat conftest.$ac_ext >&5
8011 rm -rf conftest*
8012 gdb_cv_c_long_long=no
8013fi
8014rm -f conftest*
8015fi
c906108c 8016
97bf5e38
MK
8017echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8018if test $gdb_cv_c_long_long = yes; then
8019 cat >> confdefs.h <<\EOF
8020#define CC_HAS_LONG_LONG 1
8021EOF
8022
8023fi
8024
8025
8026echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
030292b7 8027echo "configure:8028: checking for long long support in printf" >&5
97bf5e38
MK
8028if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8029 echo $ac_n "(cached) $ac_c" 1>&6
8030else
8031 if test "$cross_compiling" = yes; then
8032 gdb_cv_printf_has_long_long=no
8033else
8034 cat > conftest.$ac_ext <<EOF
030292b7 8035#line 8036 "configure"
97bf5e38
MK
8036#include "confdefs.h"
8037
8038int main () {
8039 char buf[32];
8040 long long l = 0;
8041 l = (l << 16) + 0x0123;
8042 l = (l << 16) + 0x4567;
8043 l = (l << 16) + 0x89ab;
8044 l = (l << 16) + 0xcdef;
8045 sprintf (buf, "0x%016llx", l);
8046 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8047}
97bf5e38 8048EOF
030292b7 8049if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8050then
8051 gdb_cv_printf_has_long_long=yes
8052else
8053 echo "configure: failed program was:" >&5
8054 cat conftest.$ac_ext >&5
8055 rm -fr conftest*
8056 gdb_cv_printf_has_long_long=no
8057fi
8058rm -fr conftest*
8059fi
8060
8061fi
8062
8063if test $gdb_cv_printf_has_long_long = yes; then
8064 cat >> confdefs.h <<\EOF
8065#define PRINTF_HAS_LONG_LONG 1
8066EOF
8067
8068fi
8069echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8070
8071
8072echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
030292b7 8073echo "configure:8074: checking for long double support in compiler" >&5
97bf5e38
MK
8074if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8075 echo $ac_n "(cached) $ac_c" 1>&6
8076else
8077 cat > conftest.$ac_ext <<EOF
030292b7 8078#line 8079 "configure"
97bf5e38
MK
8079#include "confdefs.h"
8080
8081int main() {
8082long double foo;
8083; return 0; }
8084EOF
030292b7 8085if { (eval echo configure:8086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8086 rm -rf conftest*
8087 ac_cv_c_long_double=yes
8088else
8089 echo "configure: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8091 rm -rf conftest*
8092 ac_cv_c_long_double=no
8093fi
8094rm -f conftest*
8095fi
c906108c 8096
97bf5e38
MK
8097echo "$ac_t""$ac_cv_c_long_double" 1>&6
8098if test $ac_cv_c_long_double = yes; then
8099 cat >> confdefs.h <<\EOF
8100#define HAVE_LONG_DOUBLE 1
c906108c 8101EOF
97bf5e38
MK
8102
8103fi
8104
8105
8106echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
030292b7 8107echo "configure:8108: checking for long double support in printf" >&5
97bf5e38
MK
8108if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8109 echo $ac_n "(cached) $ac_c" 1>&6
8110else
8111 if test "$cross_compiling" = yes; then
8112 gdb_cv_printf_has_long_double=no
8113else
8114 cat > conftest.$ac_ext <<EOF
030292b7 8115#line 8116 "configure"
97bf5e38
MK
8116#include "confdefs.h"
8117
8118int main () {
8119 char buf[16];
8120 long double f = 3.141592653;
8121 sprintf (buf, "%Lg", f);
8122 return (strncmp ("3.14159", buf, 7));
8123}
8124EOF
030292b7 8125if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8126then
97bf5e38 8127 gdb_cv_printf_has_long_double=yes
c906108c
SS
8128else
8129 echo "configure: failed program was:" >&5
8130 cat conftest.$ac_ext >&5
8131 rm -fr conftest*
97bf5e38 8132 gdb_cv_printf_has_long_double=no
c906108c
SS
8133fi
8134rm -fr conftest*
8135fi
8136
8137fi
8138
97bf5e38 8139if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8140 cat >> confdefs.h <<\EOF
97bf5e38
MK
8141#define PRINTF_HAS_LONG_DOUBLE 1
8142EOF
8143
8144fi
8145echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8146
8147
8148echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
030292b7 8149echo "configure:8150: checking for long double support in scanf" >&5
97bf5e38
MK
8150if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8151 echo $ac_n "(cached) $ac_c" 1>&6
8152else
8153 if test "$cross_compiling" = yes; then
8154 gdb_cv_scanf_has_long_double=no
8155else
8156 cat > conftest.$ac_ext <<EOF
030292b7 8157#line 8158 "configure"
97bf5e38
MK
8158#include "confdefs.h"
8159
8160int main () {
8161 char *buf = "3.141592653";
8162 long double f = 0;
8163 sscanf (buf, "%Lg", &f);
8164 return !(f > 3.14159 && f < 3.14160);
8165}
c906108c 8166EOF
030292b7 8167if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8168then
8169 gdb_cv_scanf_has_long_double=yes
8170else
8171 echo "configure: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8173 rm -fr conftest*
8174 gdb_cv_scanf_has_long_double=no
8175fi
8176rm -fr conftest*
8177fi
c906108c
SS
8178
8179fi
8180
97bf5e38
MK
8181if test $gdb_cv_scanf_has_long_double = yes; then
8182 cat >> confdefs.h <<\EOF
8183#define SCANF_HAS_LONG_DOUBLE 1
8184EOF
8185
8186fi
8187echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8188
438013df
AO
8189case ${host_os} in
8190aix*)
8191 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
030292b7 8192echo "configure:8193: checking for -bbigtoc option" >&5
438013df
AO
8193if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8194 echo $ac_n "(cached) $ac_c" 1>&6
8195else
8196
8197 SAVE_LDFLAGS=$LDFLAGS
8198
8199 case $GCC in
8200 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8201 *) gdb_cv_bigtoc=-bbigtoc ;;
8202 esac
8203
8204 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8205 cat > conftest.$ac_ext <<EOF
030292b7 8206#line 8207 "configure"
438013df
AO
8207#include "confdefs.h"
8208
8209int main() {
8210int i;
8211; return 0; }
8212EOF
030292b7 8213if { (eval echo configure:8214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8214 :
8215else
8216 echo "configure: failed program was:" >&5
8217 cat conftest.$ac_ext >&5
8218 rm -rf conftest*
8219 gdb_cv_bigtoc=
8220fi
8221rm -f conftest*
8222
8223fi
8224
8225echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8226 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8227 ;;
8228esac
8229
c906108c
SS
8230
8231
8232if test ${build} = ${host} -a ${host} = ${target} ; then
8233 case ${host_os} in
8234 hpux*)
8235 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
030292b7 8236echo "configure:8237: checking for HPUX/OSF thread support" >&5
c906108c
SS
8237 if test -f /usr/include/dce/cma_config.h ; then
8238 if test "$GCC" = "yes" ; then
8239 echo "$ac_t""yes" 1>&6
8240 cat >> confdefs.h <<\EOF
8241#define HAVE_HPUX_THREAD_SUPPORT 1
8242EOF
8243
66b965bb 8244 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8245 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8246 else
8247 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8248 fi
8249 else
8250 echo "$ac_t""no" 1>&6
8251 fi
8252 ;;
8253 solaris*)
d92419e5
JB
8254 # See if thread_db library is around for Solaris thread debugging.
8255 # Note that we must explicitly test for version 1 of the library
8256 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8257 # the same API.
c906108c 8258 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
030292b7 8259echo "configure:8260: checking for Solaris thread debugging library" >&5
c906108c
SS
8260 if test -f /usr/lib/libthread_db.so.1 ; then
8261 echo "$ac_t""yes" 1>&6
8262 cat >> confdefs.h <<\EOF
8263#define HAVE_THREAD_DB_LIB 1
8264EOF
8265
66b965bb 8266 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8267 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8268 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
030292b7 8269echo "configure:8270: checking for dlopen in -ldl" >&5
c906108c
SS
8270ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8271if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8272 echo $ac_n "(cached) $ac_c" 1>&6
8273else
8274 ac_save_LIBS="$LIBS"
8275LIBS="-ldl $LIBS"
8276cat > conftest.$ac_ext <<EOF
030292b7 8277#line 8278 "configure"
c906108c
SS
8278#include "confdefs.h"
8279/* Override any gcc2 internal prototype to avoid an error. */
8280/* We use char because int might match the return type of a gcc2
8281 builtin and then its argument prototype would still apply. */
8282char dlopen();
8283
8284int main() {
8285dlopen()
8286; return 0; }
8287EOF
030292b7 8288if { (eval echo configure:8289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8289 rm -rf conftest*
8290 eval "ac_cv_lib_$ac_lib_var=yes"
8291else
8292 echo "configure: failed program was:" >&5
8293 cat conftest.$ac_ext >&5
8294 rm -rf conftest*
8295 eval "ac_cv_lib_$ac_lib_var=no"
8296fi
8297rm -f conftest*
8298LIBS="$ac_save_LIBS"
8299
8300fi
8301if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8302 echo "$ac_t""yes" 1>&6
8303 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8304 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8305 cat >> confdefs.h <<EOF
8306#define $ac_tr_lib 1
8307EOF
8308
8309 LIBS="-ldl $LIBS"
8310
8311else
8312 echo "$ac_t""no" 1>&6
8313fi
8314
8315 if test "$GCC" = "yes" ; then
8316 # The GNU linker requires the -export-dynamic option to make
8317 # all symbols visible in the dynamic symbol table.
8318 hold_ldflags=$LDFLAGS
8319 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
030292b7 8320echo "configure:8321: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8321 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8322 cat > conftest.$ac_ext <<EOF
030292b7 8323#line 8324 "configure"
c906108c
SS
8324#include "confdefs.h"
8325
8326int main() {
8327int i;
8328; return 0; }
8329EOF
030292b7 8330if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8331 rm -rf conftest*
8332 found=yes
8333else
8334 echo "configure: failed program was:" >&5
8335 cat conftest.$ac_ext >&5
8336 rm -rf conftest*
8337 found=no
8338fi
8339rm -f conftest*
8340 LDFLAGS=$hold_ldflags
8341 echo "$ac_t""$found" 1>&6
8342 if test $found = yes; then
8343 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8344 fi
8345 fi
8346 # Sun randomly tweaked the prototypes in <proc_service.h>
8347 # at one point.
8348 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
030292b7 8349echo "configure:8350: checking if <proc_service.h> is old" >&5
c906108c
SS
8350 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8351 echo $ac_n "(cached) $ac_c" 1>&6
8352else
8353
8354 cat > conftest.$ac_ext <<EOF
030292b7 8355#line 8356 "configure"
c906108c
SS
8356#include "confdefs.h"
8357
8358 #include <proc_service.h>
8359 ps_err_e ps_pdwrite
8360 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8361
8362int main() {
8363
8364; return 0; }
8365EOF
030292b7 8366if { (eval echo configure:8367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8367 rm -rf conftest*
8368 gdb_cv_proc_service_is_old=no
8369else
8370 echo "configure: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 rm -rf conftest*
8373 gdb_cv_proc_service_is_old=yes
8374fi
8375rm -f conftest*
8376
8377fi
8378
8379 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8380 if test $gdb_cv_proc_service_is_old = yes; then
8381 cat >> confdefs.h <<\EOF
8382#define PROC_SERVICE_IS_OLD 1
8383EOF
8384
8385 fi
8386 else
8387 echo "$ac_t""no" 1>&6
8388 fi
8389 ;;
d92419e5
JB
8390 aix*)
8391 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
030292b7 8392echo "configure:8393: checking for AiX thread debugging library" >&5
d92419e5
JB
8393 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8394 echo $ac_n "(cached) $ac_c" 1>&6
8395else
8396 cat > conftest.$ac_ext <<EOF
030292b7 8397#line 8398 "configure"
d92419e5
JB
8398#include "confdefs.h"
8399#include <sys/pthdebug.h>
8400int main() {
8401#ifndef PTHDB_VERSION_3
8402 #error
8403 #endif
8404; return 0; }
8405EOF
030292b7 8406if { (eval echo configure:8407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8407 rm -rf conftest*
8408 gdb_cv_have_aix_thread_debug=yes
8409else
8410 echo "configure: failed program was:" >&5
8411 cat conftest.$ac_ext >&5
8412 rm -rf conftest*
8413 gdb_cv_have_aix_thread_debug=no
8414fi
8415rm -f conftest*
8416fi
8417
8418 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8419 if test $gdb_cv_have_aix_thread_debug = yes; then
8420 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8421 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8422 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8423 fi
8424 ;;
c906108c
SS
8425 esac
8426
8427fi
8428
3f47be5c
EZ
8429if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8430 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
030292b7 8431echo "configure:8432: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8432if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8433 echo $ac_n "(cached) $ac_c" 1>&6
8434else
8435 cat > conftest.$ac_ext <<EOF
030292b7 8436#line 8437 "configure"
3f47be5c
EZ
8437#include "confdefs.h"
8438#include <thread_db.h>
8439int main() {
8440int i = TD_NOTALLOC;
8441; return 0; }
8442EOF
030292b7 8443if { (eval echo configure:8444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8444 rm -rf conftest*
8445 gdb_cv_thread_db_h_has_td_notalloc=yes
8446else
8447 echo "configure: failed program was:" >&5
8448 cat conftest.$ac_ext >&5
8449 rm -rf conftest*
8450 gdb_cv_thread_db_h_has_td_notalloc=no
8451
8452fi
8453rm -f conftest*
8454
8455fi
8456
8457echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8458fi
8459if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8460 cat >> confdefs.h <<\EOF
8461#define THREAD_DB_HAS_TD_NOTALLOC 1
8462EOF
8463
8464fi
8465
fb40c209 8466
030292b7
DJ
8467# Check whether --with-sysroot or --without-sysroot was given.
8468if test "${with_sysroot+set}" = set; then
8469 withval="$with_sysroot"
8470
8471 case ${with_sysroot} in
8472 yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;;
8473 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8474 esac
8475
8476 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8477
8478 if test "x$exec_prefix" = xNONE; then
8479 if test "x$prefix" = xNONE; then
8480 test_prefix=/usr/local
8481 else
8482 test_prefix=$prefix
8483 fi
8484 else
8485 test_prefix=$exec_prefix
8486 fi
8487 case ${TARGET_SYSTEM_ROOT} in
8488 ${test_prefix}*)
8489 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8490 TARGET_SYSTEM_ROOT_DEFINE="$t"
8491 ;;
8492 esac
8493
8494else
8495
8496 TARGET_SYSTEM_ROOT=
8497 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8498
8499fi
8500
8501
8502
8503
3b851bce
AC
8504# NOTE: Don't add -Wall or -Wunused, they both include
8505# -Wunused-parameter which reports bogus warnings.
8506# NOTE: If you add to this list, remember to update
8507# gdb/doc/gdbint.texinfo.
1decb323 8508build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8509-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8510# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8511# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8512# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8513# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8514# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8515# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8516# Check whether --enable-build-warnings or --disable-build-warnings was given.
8517if test "${enable_build_warnings+set}" = set; then
8518 enableval="$enable_build_warnings"
1decb323 8519 case "${enableval}" in
c906108c
SS
8520 yes) ;;
8521 no) build_warnings="-w";;
8522 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8523 build_warnings="${build_warnings} ${t}";;
8524 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8525 build_warnings="${t} ${build_warnings}";;
8526 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8527esac
d4f3574e 8528if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8529 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8530fi
1decb323 8531fi
3b851bce
AC
8532# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8533if test "${enable_gdb_build_warnings+set}" = set; then
8534 enableval="$enable_gdb_build_warnings"
8535 case "${enableval}" in
8536 yes) ;;
8537 no) build_warnings="-w";;
8538 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8539 build_warnings="${build_warnings} ${t}";;
8540 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8541 build_warnings="${t} ${build_warnings}";;
8542 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8543esac
8544if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8545 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8546fi
8547fi
104c1213
JM
8548WARN_CFLAGS=""
8549WERROR_CFLAGS=""
c906108c
SS
8550if test "x${build_warnings}" != x -a "x$GCC" = xyes
8551then
746a987d 8552 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
030292b7 8553echo "configure:8554: checking compiler warning flags" >&5
746a987d
AC
8554 # Separate out the -Werror flag as some files just cannot be
8555 # compiled with it enabled.
8556 for w in ${build_warnings}; do
8557 case $w in
8558 -Werr*) WERROR_CFLAGS=-Werror ;;
8559 *) # Check that GCC accepts it
4536bbc6
AC
8560 saved_CFLAGS="$CFLAGS"
8561 CFLAGS="$CFLAGS $w"
8562 cat > conftest.$ac_ext <<EOF
030292b7 8563#line 8564 "configure"
4536bbc6
AC
8564#include "confdefs.h"
8565
8566int main() {
8567
8568; return 0; }
8569EOF
030292b7 8570if { (eval echo configure:8571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8571 rm -rf conftest*
8572 WARN_CFLAGS="${WARN_CFLAGS} $w"
8573else
8574 echo "configure: failed program was:" >&5
8575 cat conftest.$ac_ext >&5
8576fi
8577rm -f conftest*
8578 CFLAGS="$saved_CFLAGS"
746a987d
AC
8579 esac
8580 done
8581 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8582fi
8583
8584
104c1213 8585
c906108c
SS
8586MMALLOC_CFLAGS=
8587MMALLOC=
8588
8589
8590
8591# Check whether --with-mmalloc or --without-mmalloc was given.
8592if test "${with_mmalloc+set}" = set; then
8593 withval="$with_mmalloc"
8594 case "${withval}" in
8595 yes) want_mmalloc=true ;;
8596 no) want_mmalloc=false;;
8597 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8598esac
8599else
8600 want_mmalloc=false
8601fi
8602
8603if test x$want_mmalloc = xtrue; then
8604 cat >> confdefs.h <<\EOF
8605#define USE_MMALLOC 1
8606EOF
8607
8608 cat >> confdefs.h <<\EOF
8609#define MMCHECK_FORCE 1
8610EOF
8611
8612 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8613 MMALLOC='../mmalloc/libmmalloc.a'
8614fi
8615
7a292a7a
SS
8616# In the Cygwin environment, we need some additional flags.
8617echo $ac_n "checking for cygwin""... $ac_c" 1>&6
030292b7 8618echo "configure:8619: checking for cygwin" >&5
7a292a7a
SS
8619if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8620 echo $ac_n "(cached) $ac_c" 1>&6
8621else
8622 cat > conftest.$ac_ext <<EOF
030292b7 8623#line 8624 "configure"
7a292a7a
SS
8624#include "confdefs.h"
8625
8626#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8627lose
8628#endif
8629EOF
8630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8631 egrep "lose" >/dev/null 2>&1; then
8632 rm -rf conftest*
8633 gdb_cv_os_cygwin=yes
8634else
8635 rm -rf conftest*
8636 gdb_cv_os_cygwin=no
8637fi
8638rm -f conftest*
8639
8640fi
8641
8642echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8643
aff38e61
AC
8644
8645SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8646case ${host} in
95cbc983
AC
8647 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8648 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8649esac
8650
8651
cd0fc7c3
SS
8652# libreadline needs libuser32.a in a cygwin environment
8653WIN32LIBS=
8654if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8655 WIN32LIBS="-luser32"
8656 case "${target}" in
8657 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8658 ;;
8659 esac
cd0fc7c3 8660fi
c906108c 8661
7a292a7a 8662
3fc11d3e
JM
8663LIBGUI="../libgui/src/libgui.a"
8664GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8665
8666
7a292a7a 8667
3fc11d3e
JM
8668WIN32LDAPP=
8669
8670
8671
8672configdir="unix"
8673
8674GDBTKLIBS=
8675if test "${enable_gdbtk}" = "yes"; then
8676
d1c3b63a
KS
8677 # Gdbtk must have an absolute path to srcdir in order to run
8678 # properly when not installed.
8679 here=`pwd`
8680 cd ${srcdir}
8681 GDBTK_SRC_DIR=`pwd`
8682 cd $here
8683
3fc11d3e
JM
8684
8685#
8686# Ok, lets find the tcl configuration
8687# First, look for one uninstalled.
8688# the alternative search directory is invoked by --with-tclconfig
8689#
8690
8691if test x"${no_tcl}" = x ; then
8692 # we reset no_tcl in case something fails here
8693 no_tcl=true
8694 # Check whether --with-tclconfig or --without-tclconfig was given.
8695if test "${with_tclconfig+set}" = set; then
8696 withval="$with_tclconfig"
8697 with_tclconfig=${withval}
8698fi
8699
8700 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
030292b7 8701echo "configure:8702: checking for Tcl configuration" >&5
3fc11d3e
JM
8702 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8703 echo $ac_n "(cached) $ac_c" 1>&6
8704else
8705
8706
8707 # First check to see if --with-tclconfig was specified.
8708 if test x"${with_tclconfig}" != x ; then
8709 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8710 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8711 else
8712 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8713 fi
8714 fi
8715
8716 # then check for a private Tcl installation
8717 if test x"${ac_cv_c_tclconfig}" = x ; then
8718 for i in \
8719 ../tcl \
8720 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8721 ../../tcl \
8722 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8723 ../../../tcl \
8724 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8725 if test -f "$i/${configdir}/tclConfig.sh" ; then
8726 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8727 break
8728 fi
8729 done
8730 fi
8731 # check in a few common install locations
8732 if test x"${ac_cv_c_tclconfig}" = x ; then
8733 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8734 if test -f "$i/tclConfig.sh" ; then
8735 ac_cv_c_tclconfig=`(cd $i; pwd)`
8736 break
8737 fi
8738 done
8739 fi
8740 # check in a few other private locations
8741 if test x"${ac_cv_c_tclconfig}" = x ; then
8742 for i in \
8743 ${srcdir}/../tcl \
8744 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8745 if test -f "$i/${configdir}/tclConfig.sh" ; then
8746 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8747 break
8748 fi
8749 done
8750 fi
8751
8752fi
8753
8754 if test x"${ac_cv_c_tclconfig}" = x ; then
8755 TCLCONFIG="# no Tcl configs found"
8756 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8757 else
8758 no_tcl=
8759 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8760 echo "$ac_t""found $TCLCONFIG" 1>&6
8761 fi
8762fi
8763
8764 if test -z "${no_tcl}"; then
8765
8766 . $TCLCONFIG
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793#
8794# Ok, lets find the tk configuration
8795# First, look for one uninstalled.
8796# the alternative search directory is invoked by --with-tkconfig
8797#
8798
8799if test x"${no_tk}" = x ; then
8800 # we reset no_tk in case something fails here
8801 no_tk=true
8802 # Check whether --with-tkconfig or --without-tkconfig was given.
8803if test "${with_tkconfig+set}" = set; then
8804 withval="$with_tkconfig"
8805 with_tkconfig=${withval}
8806fi
8807
8808 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
030292b7 8809echo "configure:8810: checking for Tk configuration" >&5
3fc11d3e
JM
8810 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8811 echo $ac_n "(cached) $ac_c" 1>&6
8812else
8813
8814
8815 # First check to see if --with-tkconfig was specified.
8816 if test x"${with_tkconfig}" != x ; then
8817 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8818 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8819 else
8820 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8821 fi
8822 fi
8823
8824 # then check for a private Tk library
8825 if test x"${ac_cv_c_tkconfig}" = x ; then
8826 for i in \
8827 ../tk \
8828 `ls -dr ../tk[4-9]* 2>/dev/null` \
8829 ../../tk \
8830 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8831 ../../../tk \
8832 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8833 if test -f "$i/${configdir}/tkConfig.sh" ; then
8834 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8835 break
8836 fi
8837 done
8838 fi
8839 # check in a few common install locations
8840 if test x"${ac_cv_c_tkconfig}" = x ; then
8841 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8842 if test -f "$i/tkConfig.sh" ; then
8843 ac_cv_c_tkconfig=`(cd $i; pwd)`
8844 break
8845 fi
8846 done
8847 fi
8848 # check in a few other private locations
8849 if test x"${ac_cv_c_tkconfig}" = x ; then
8850 for i in \
8851 ${srcdir}/../tk \
8852 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8853 if test -f "$i/${configdir}/tkConfig.sh" ; then
8854 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8855 break
8856 fi
8857 done
8858 fi
8859
8860fi
8861
8862 if test x"${ac_cv_c_tkconfig}" = x ; then
8863 TKCONFIG="# no Tk configs found"
8864 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8865 else
8866 no_tk=
8867 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8868 echo "$ac_t""found $TKCONFIG" 1>&6
8869 fi
8870fi
8871
8872
8873
dd2504ab
JM
8874 # now look for Tcl library stuff
8875
8876 case "${host}" in
8877 *-*-cygwin*)
8878 tcldir=../tcl/win/
8879 ;;
8880 *)
8881 tcldir=../tcl/unix/
8882 ;;
8883 esac
8884
8885 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8886
3fc11d3e
JM
8887 # If $no_tk is nonempty, then we can't do Tk, and there is no
8888 # point to doing Tcl.
8889 if test -z "${no_tk}"; then
8890
8891 if test -f "$TKCONFIG" ; then
8892 . $TKCONFIG
8893 fi
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908#
8909# Ok, lets find the tcl source trees so we can use the headers
8910# Warning: transition of version 9 to 10 will break this algorithm
8911# because 10 sorts before 9. We also look for just tcl. We have to
8912# be careful that we don't match stuff like tclX by accident.
8913# the alternative search directory is involked by --with-tclinclude
8914#
8915
8916no_tcl=true
8917echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
030292b7 8918echo "configure:8919: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8919# Check whether --with-tclinclude or --without-tclinclude was given.
8920if test "${with_tclinclude+set}" = set; then
8921 withval="$with_tclinclude"
8922 with_tclinclude=${withval}
8923fi
8924
8925if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8926 echo $ac_n "(cached) $ac_c" 1>&6
8927else
8928
8929# first check to see if --with-tclinclude was specified
8930if test x"${with_tclinclude}" != x ; then
8931 if test -f ${with_tclinclude}/tclInt.h ; then
8932 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8933 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8934 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8935 else
8936 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8937 fi
8938fi
8939
8940# next check if it came with Tcl configuration file
8941if test x"${ac_cv_c_tclconfig}" = x ; then
8942 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8943 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8944 fi
8945fi
8946
8947# next check in private source directory
8948#
8949# since ls returns lowest version numbers first, reverse its output
8950if test x"${ac_cv_c_tclh}" = x ; then
8951 for i in \
8952 ${srcdir}/../tcl \
8953 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8954 ${srcdir}/../../tcl \
8955 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8956 ${srcdir}/../../../tcl \
8957 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8958 if test -f $i/generic/tclInt.h ; then
8959 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8960 break
8961 fi
8962 done
8963fi
8964# finally check in a few common install locations
8965#
8966# since ls returns lowest version numbers first, reverse its output
8967if test x"${ac_cv_c_tclh}" = x ; then
8968 for i in \
8969 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8970 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8971 /usr/local/src/tcl \
8972 /usr/local/lib/tcl \
8973 ${prefix}/include ; do
8974 if test -f $i/generic/tclInt.h ; then
8975 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8976 break
8977 fi
8978 done
8979fi
8980# see if one is installed
8981if test x"${ac_cv_c_tclh}" = x ; then
8982 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
8983echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
030292b7 8984echo "configure:8985: checking for tclInt.h" >&5
3fc11d3e
JM
8985if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8986 echo $ac_n "(cached) $ac_c" 1>&6
8987else
8988 cat > conftest.$ac_ext <<EOF
030292b7 8989#line 8990 "configure"
3fc11d3e
JM
8990#include "confdefs.h"
8991#include <tclInt.h>
8992EOF
8993ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 8994{ (eval echo configure:8995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
8995ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8996if test -z "$ac_err"; then
8997 rm -rf conftest*
8998 eval "ac_cv_header_$ac_safe=yes"
8999else
9000 echo "$ac_err" >&5
9001 echo "configure: failed program was:" >&5
9002 cat conftest.$ac_ext >&5
9003 rm -rf conftest*
9004 eval "ac_cv_header_$ac_safe=no"
9005fi
9006rm -f conftest*
9007fi
9008if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9009 echo "$ac_t""yes" 1>&6
9010 ac_cv_c_tclh=installed
9011else
9012 echo "$ac_t""no" 1>&6
9013ac_cv_c_tclh=""
9014fi
9015
9016fi
9017
9018fi
9019
9020if test x"${ac_cv_c_tclh}" = x ; then
9021 TCLHDIR="# no Tcl private headers found"
9022 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9023fi
9024if test x"${ac_cv_c_tclh}" != x ; then
9025 no_tcl=""
9026 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9027 echo "$ac_t""is installed" 1>&6
9028 TCLHDIR=""
9029 else
9030 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9031 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9032 TCLHDIR="-I${ac_cv_c_tclh}"
9033 fi
9034fi
9035
9036
9037
9038
9039#
9040# Ok, lets find the tk source trees so we can use the headers
9041# If the directory (presumably symlink) named "tk" exists, use that one
9042# in preference to any others. Same logic is used when choosing library
9043# and again with Tcl. The search order is the best place to look first, then in
9044# decreasing significance. The loop breaks if the trigger file is found.
9045# Note the gross little conversion here of srcdir by cd'ing to the found
9046# directory. This converts the path from a relative to an absolute, so
9047# recursive cache variables for the path will work right. We check all
9048# the possible paths in one loop rather than many seperate loops to speed
9049# things up.
9050# the alternative search directory is involked by --with-tkinclude
9051#
9052no_tk=true
9053echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
030292b7 9054echo "configure:9055: checking for Tk private headers" >&5
3fc11d3e
JM
9055# Check whether --with-tkinclude or --without-tkinclude was given.
9056if test "${with_tkinclude+set}" = set; then
9057 withval="$with_tkinclude"
9058 with_tkinclude=${withval}
9059fi
9060
9061if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9062 echo $ac_n "(cached) $ac_c" 1>&6
9063else
9064
9065# first check to see if --with-tkinclude was specified
9066if test x"${with_tkinclude}" != x ; then
9067 if test -f ${with_tkinclude}/tk.h ; then
9068 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9069 elif test -f ${with_tkinclude}/generic/tk.h ; then
9070 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9071 else
9072 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9073 fi
9074fi
9075
9076# next check if it came with Tk configuration file
9077if test x"${ac_cv_c_tkconfig}" = x ; then
9078 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9079 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9080 fi
9081fi
9082
9083# next check in private source directory
9084#
9085# since ls returns lowest version numbers first, reverse its output
9086if test x"${ac_cv_c_tkh}" = x ; then
9087 for i in \
9088 ${srcdir}/../tk \
9089 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9090 ${srcdir}/../../tk \
9091 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9092 ${srcdir}/../../../tk \
9093 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9094 if test -f $i/generic/tk.h ; then
9095 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9096 break
9097 fi
9098 done
9099fi
9100# finally check in a few common install locations
9101#
9102# since ls returns lowest version numbers first, reverse its output
9103if test x"${ac_cv_c_tkh}" = x ; then
9104 for i in \
9105 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9106 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9107 /usr/local/src/tk \
9108 /usr/local/lib/tk \
9109 ${prefix}/include ; do
9110 if test -f $i/generic/tk.h ; then
9111 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9112 break
9113 fi
9114 done
9115fi
9116# see if one is installed
9117if test x"${ac_cv_c_tkh}" = x ; then
9118 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9119echo $ac_n "checking for tk.h""... $ac_c" 1>&6
030292b7 9120echo "configure:9121: checking for tk.h" >&5
3fc11d3e
JM
9121if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9122 echo $ac_n "(cached) $ac_c" 1>&6
9123else
9124 cat > conftest.$ac_ext <<EOF
030292b7 9125#line 9126 "configure"
3fc11d3e
JM
9126#include "confdefs.h"
9127#include <tk.h>
9128EOF
9129ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 9130{ (eval echo configure:9131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9131ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9132if test -z "$ac_err"; then
9133 rm -rf conftest*
9134 eval "ac_cv_header_$ac_safe=yes"
9135else
9136 echo "$ac_err" >&5
9137 echo "configure: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 rm -rf conftest*
9140 eval "ac_cv_header_$ac_safe=no"
9141fi
9142rm -f conftest*
9143fi
9144if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9145 echo "$ac_t""yes" 1>&6
9146 ac_cv_c_tkh=installed
9147else
9148 echo "$ac_t""no" 1>&6
9149ac_cv_c_tkh=""
9150fi
9151
9152fi
9153
9154fi
9155
9156if test x"${ac_cv_c_tkh}" != x ; then
9157 no_tk=""
9158 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9159 echo "$ac_t""is installed" 1>&6
9160 TKHDIR=""
9161 else
9162 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9163 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9164 TKHDIR="-I${ac_cv_c_tkh}"
9165 fi
9166else
9167 TKHDIR="# no Tk directory found"
9168 echo "configure: warning: Can't find Tk private headers" 1>&2
9169 no_tk=true
9170fi
9171
9172
9173
9174
9175echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
030292b7 9176echo "configure:9177: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9177if test x"${ac_cv_c_itclh}" = x ; then
9178 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9179 if test -f $i/generic/itcl.h ; then
9180 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9181 break
9182 fi
9183 done
9184fi
9185if test x"${ac_cv_c_itclh}" = x ; then
9186 ITCLHDIR="# no Itcl private headers found"
9187 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9188fi
9189if test x"${ac_cv_c_itclh}" != x ; then
9190 ITCLHDIR="-I${ac_cv_c_itclh}"
9191fi
9192# should always be here
9193# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9194
9195#AC_SUBST(ITCLLIB)
9196
9197
9198echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
030292b7 9199echo "configure:9200: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9200if test x"${ac_cv_c_itkh}" = x ; then
9201 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9202 if test -f $i/generic/itk.h ; then
9203 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9204 break
9205 fi
9206 done
9207fi
9208if test x"${ac_cv_c_itkh}" = x ; then
9209 ITKHDIR="# no Itk private headers found"
9210 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9211fi
9212if test x"${ac_cv_c_itkh}" != x ; then
9213 ITKHDIR="-I${ac_cv_c_itkh}"
9214fi
9215# should always be here
9216# ITKLIB="../itcl/itk/unix/libitk.a"
9217
9218#AC_SUBST(ITKLIB)
9219
3fc11d3e 9220
dd2504ab
JM
9221
9222 # now look for Tk library stuff
9223
9224 case "${host}" in
9225 *-*-cygwin*)
9226 tkdir=../tk/win/
9227 ;;
9228 *)
9229 tkdir=../tk/unix/
9230 ;;
9231 esac
9232
9233 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9234
3fc11d3e
JM
9235 # now look for Itcl library stuff
9236
9237
9238#
9239# Ok, lets find the itcl configuration
9240# First, look for one uninstalled.
9241# the alternative search directory is invoked by --with-itclconfig
9242#
9243
9244if test x"${no_itcl}" = x ; then
9245 # we reset no_itcl in case something fails here
9246 no_itcl=true
9247 # Check whether --with-itclconfig or --without-itclconfig was given.
9248if test "${with_itclconfig+set}" = set; then
9249 withval="$with_itclconfig"
9250 with_itclconfig=${withval}
9251fi
9252
9253 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
030292b7 9254echo "configure:9255: checking for Itcl configuration" >&5
3fc11d3e
JM
9255 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9256 echo $ac_n "(cached) $ac_c" 1>&6
9257else
9258
9259
9260 # First check to see if --with-itclconfig was specified.
9261 if test x"${with_itclconfig}" != x ; then
9262 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9263 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9264 else
9265 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9266 fi
9267 fi
9268
9269 # then check for a private Itcl library
9270 if test x"${ac_cv_c_itclconfig}" = x ; then
9271 for i in \
9272 ../itcl/itcl \
9273 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9274 ../../itcl \
9275 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9276 ../../../itcl \
9277 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9278 if test -f "$i/itclConfig.sh" ; then
9279 ac_cv_c_itclconfig=`(cd $i; pwd)`
9280 break
9281 fi
9282 done
9283 fi
9284 # check in a few common install locations
9285 if test x"${ac_cv_c_itclconfig}" = x ; then
9286 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9287 if test -f "$i/itclConfig.sh" ; then
9288 ac_cv_c_itclconfig=`(cd $i; pwd)`
9289 break
9290 fi
9291 done
9292 fi
9293 # check in a few other private locations
9294 if test x"${ac_cv_c_itclconfig}" = x ; then
9295 for i in \
9296 ${srcdir}/../itcl/itcl \
9297 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9298 if test -f "$i/itclConfig.sh" ; then
9299 ac_cv_c_itclconfig=`(cd $i; pwd)`
9300 break
9301 fi
9302 done
9303 fi
9304
9305fi
9306
9307 if test x"${ac_cv_c_itclconfig}" = x ; then
9308 ITCLCONFIG="# no Itcl configs found"
9309 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9310 else
9311 no_itcl=
9312 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9313 echo "$ac_t""found $ITCLCONFIG" 1>&6
9314 fi
9315fi
9316
9317 if test -z "${no_itcl}"; then
9318
9319 if test -f "$ITCLCONFIG" ; then
9320 . $ITCLCONFIG
9321 fi
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
3fc11d3e
JM
9332
9333
9334 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9335 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9336 fi
9337
9338
9339 # now look for Itk library stuff
9340
9341#
9342# Ok, lets find the itk configuration
9343# First, look for one uninstalled.
9344# the alternative search directory is invoked by --with-itkconfig
9345#
9346
9347if test x"${no_itk}" = x ; then
9348 # we reset no_itk in case something fails here
9349 no_itk=true
9350 # Check whether --with-itkconfig or --without-itkconfig was given.
9351if test "${with_itkconfig+set}" = set; then
9352 withval="$with_itkconfig"
9353 with_itkconfig=${withval}
9354fi
9355
9356 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
030292b7 9357echo "configure:9358: checking for Itk configuration" >&5
3fc11d3e
JM
9358 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9359 echo $ac_n "(cached) $ac_c" 1>&6
9360else
9361
9362
9363 # First check to see if --with-itkconfig was specified.
9364 if test x"${with_itkconfig}" != x ; then
9365 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9366 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9367 else
9368 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9369 fi
9370 fi
9371
9372 # then check for a private Itk library
9373 if test x"${ac_cv_c_itkconfig}" = x ; then
9374 for i in \
9375 ../itcl/itk \
9376 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9377 ../../itk \
9378 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9379 ../../../itk \
9380 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9381 if test -f "$i/itkConfig.sh" ; then
9382 ac_cv_c_itkconfig=`(cd $i; pwd)`
9383 break
9384 fi
9385 done
9386 fi
9387 # check in a few common install locations
9388 if test x"${ac_cv_c_itkconfig}" = x ; then
9389 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9390 if test -f "$i/itkConfig.sh" ; then
9391 ac_cv_c_itkconfig=`(cd $i; pwd)`
9392 break
9393 fi
9394 done
9395 fi
9396 # check in a few other private locations
9397 if test x"${ac_cv_c_itkconfig}" = x ; then
9398 for i in \
9399 ${srcdir}/../itcl/itk \
9400 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9401 if test -f "$i/itkConfig.sh" ; then
9402 ac_cv_c_itkconfig=`(cd $i; pwd)`
9403 break
9404 fi
9405 done
9406 fi
9407
9408fi
9409
9410 if test x"${ac_cv_c_itkconfig}" = x ; then
9411 ITKCONFIG="# no Itk configs found"
9412 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9413 else
9414 no_itk=
9415 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9416 echo "$ac_t""found $ITKCONFIG" 1>&6
9417 fi
9418fi
9419
9420
9421 if test -z "${no_itcl}"; then
9422
9423 if test -f "$ITKCONFIG" ; then
9424 . $ITKCONFIG
9425 fi
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
3fc11d3e 9438 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9439 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9440 fi
9441
4226a5a5 9442 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9443 # Tcl/Tk 8.1 require -fwritable strings. I don't
9444 # know whether 8.2 will or not, but I bet it will.
9445 # I don't have to worry about 7.x since we don't support it.
9446 GDBTK_CFLAGS=""
9447 if test "$GCC" = "yes"; then
9448 if test "$TCL_VERSION" != "8.0" ; then
9449 GDBTK_CFLAGS="-fwritable-strings"
9450 fi
9451 fi
9452
9453 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9454 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9455 # Yes, the ordering seems wrong here. But it isn't.
9456 # TK_LIBS is the list of libraries that need to be linked
9457 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9458 # were in LIBS then any link tests after this point would
9459 # try to include things like `$(LIBGUI)', which wouldn't work.
9460 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9461
9462 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9463 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9464 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9465 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9466 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9467 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9468 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9469 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9470
9471 if test x$gdb_cv_os_cygwin = xyes; then
9472 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9473 WIN32LDAPP="-Wl,--subsystem,console"
9474 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9475 fi
9476 fi
9477 fi
ffc6a242 9478
ffc6a242 9479 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9480fi
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
dd2504ab 9494
c906108c
SS
9495# If we find X, set shell vars x_includes and x_libraries to the
9496# paths, otherwise set no_x=yes.
9497# Uses ac_ vars as temps to allow command line to override cache and checks.
9498# --without-x overrides everything else, but does not touch the cache.
9499echo $ac_n "checking for X""... $ac_c" 1>&6
030292b7 9500echo "configure:9501: checking for X" >&5
c906108c
SS
9501
9502# Check whether --with-x or --without-x was given.
9503if test "${with_x+set}" = set; then
9504 withval="$with_x"
9505 :
9506fi
9507
9508# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9509if test "x$with_x" = xno; then
9510 # The user explicitly disabled X.
9511 have_x=disabled
9512else
9513 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9514 # Both variables are already set.
9515 have_x=yes
9516 else
9517if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9518 echo $ac_n "(cached) $ac_c" 1>&6
9519else
9520 # One or both of the vars are not set, and there is no cached value.
9521ac_x_includes=NO ac_x_libraries=NO
9522rm -fr conftestdir
9523if mkdir conftestdir; then
9524 cd conftestdir
9525 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9526 cat > Imakefile <<'EOF'
9527acfindx:
9528 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9529EOF
9530 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9531 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9532 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9533 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9534 for ac_extension in a so sl; do
9535 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9536 test -f $ac_im_libdir/libX11.$ac_extension; then
9537 ac_im_usrlibdir=$ac_im_libdir; break
9538 fi
9539 done
9540 # Screen out bogus values from the imake configuration. They are
9541 # bogus both because they are the default anyway, and because
9542 # using them would break gcc on systems where it needs fixed includes.
9543 case "$ac_im_incroot" in
9544 /usr/include) ;;
9545 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9546 esac
9547 case "$ac_im_usrlibdir" in
9548 /usr/lib | /lib) ;;
9549 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9550 esac
9551 fi
9552 cd ..
9553 rm -fr conftestdir
9554fi
9555
9556if test "$ac_x_includes" = NO; then
9557 # Guess where to find include files, by looking for this one X11 .h file.
9558 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9559
9560 # First, try using that file with no special directory specified.
9561cat > conftest.$ac_ext <<EOF
030292b7 9562#line 9563 "configure"
c906108c
SS
9563#include "confdefs.h"
9564#include <$x_direct_test_include>
9565EOF
9566ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
030292b7 9567{ (eval echo configure:9568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9568ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9569if test -z "$ac_err"; then
9570 rm -rf conftest*
9571 # We can compile using X headers with no special include directory.
9572ac_x_includes=
9573else
9574 echo "$ac_err" >&5
9575 echo "configure: failed program was:" >&5
9576 cat conftest.$ac_ext >&5
9577 rm -rf conftest*
9578 # Look for the header file in a standard set of common directories.
9579# Check X11 before X11Rn because it is often a symlink to the current release.
9580 for ac_dir in \
9581 /usr/X11/include \
9582 /usr/X11R6/include \
9583 /usr/X11R5/include \
9584 /usr/X11R4/include \
9585 \
9586 /usr/include/X11 \
9587 /usr/include/X11R6 \
9588 /usr/include/X11R5 \
9589 /usr/include/X11R4 \
9590 \
9591 /usr/local/X11/include \
9592 /usr/local/X11R6/include \
9593 /usr/local/X11R5/include \
9594 /usr/local/X11R4/include \
9595 \
9596 /usr/local/include/X11 \
9597 /usr/local/include/X11R6 \
9598 /usr/local/include/X11R5 \
9599 /usr/local/include/X11R4 \
9600 \
9601 /usr/X386/include \
9602 /usr/x386/include \
9603 /usr/XFree86/include/X11 \
9604 \
9605 /usr/include \
9606 /usr/local/include \
9607 /usr/unsupported/include \
9608 /usr/athena/include \
9609 /usr/local/x11r5/include \
9610 /usr/lpp/Xamples/include \
9611 \
9612 /usr/openwin/include \
9613 /usr/openwin/share/include \
9614 ; \
9615 do
9616 if test -r "$ac_dir/$x_direct_test_include"; then
9617 ac_x_includes=$ac_dir
9618 break
9619 fi
9620 done
9621fi
9622rm -f conftest*
9623fi # $ac_x_includes = NO
9624
9625if test "$ac_x_libraries" = NO; then
9626 # Check for the libraries.
9627
9628 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9629 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9630
9631 # See if we find them without any special options.
9632 # Don't add to $LIBS permanently.
9633 ac_save_LIBS="$LIBS"
9634 LIBS="-l$x_direct_test_library $LIBS"
9635cat > conftest.$ac_ext <<EOF
030292b7 9636#line 9637 "configure"
c906108c
SS
9637#include "confdefs.h"
9638
9639int main() {
9640${x_direct_test_function}()
9641; return 0; }
9642EOF
030292b7 9643if { (eval echo configure:9644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9644 rm -rf conftest*
9645 LIBS="$ac_save_LIBS"
9646# We can link X programs with no special library path.
9647ac_x_libraries=
9648else
9649 echo "configure: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651 rm -rf conftest*
9652 LIBS="$ac_save_LIBS"
9653# First see if replacing the include by lib works.
9654# Check X11 before X11Rn because it is often a symlink to the current release.
9655for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9656 /usr/X11/lib \
9657 /usr/X11R6/lib \
9658 /usr/X11R5/lib \
9659 /usr/X11R4/lib \
9660 \
9661 /usr/lib/X11 \
9662 /usr/lib/X11R6 \
9663 /usr/lib/X11R5 \
9664 /usr/lib/X11R4 \
9665 \
9666 /usr/local/X11/lib \
9667 /usr/local/X11R6/lib \
9668 /usr/local/X11R5/lib \
9669 /usr/local/X11R4/lib \
9670 \
9671 /usr/local/lib/X11 \
9672 /usr/local/lib/X11R6 \
9673 /usr/local/lib/X11R5 \
9674 /usr/local/lib/X11R4 \
9675 \
9676 /usr/X386/lib \
9677 /usr/x386/lib \
9678 /usr/XFree86/lib/X11 \
9679 \
9680 /usr/lib \
9681 /usr/local/lib \
9682 /usr/unsupported/lib \
9683 /usr/athena/lib \
9684 /usr/local/x11r5/lib \
9685 /usr/lpp/Xamples/lib \
9686 /lib/usr/lib/X11 \
9687 \
9688 /usr/openwin/lib \
9689 /usr/openwin/share/lib \
9690 ; \
9691do
9692 for ac_extension in a so sl; do
9693 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9694 ac_x_libraries=$ac_dir
9695 break 2
9696 fi
9697 done
9698done
9699fi
9700rm -f conftest*
9701fi # $ac_x_libraries = NO
9702
9703if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9704 # Didn't find X anywhere. Cache the known absence of X.
9705 ac_cv_have_x="have_x=no"
9706else
9707 # Record where we found X for the cache.
9708 ac_cv_have_x="have_x=yes \
9709 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9710fi
9711fi
9712 fi
9713 eval "$ac_cv_have_x"
9714fi # $with_x != no
9715
9716if test "$have_x" != yes; then
9717 echo "$ac_t""$have_x" 1>&6
9718 no_x=yes
9719else
9720 # If each of the values was on the command line, it overrides each guess.
9721 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9722 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9723 # Update the cache value to reflect the command line values.
9724 ac_cv_have_x="have_x=yes \
9725 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9726 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9727fi
9728
9729
7a292a7a
SS
9730
9731# Unlike the sim directory, whether a simulator is linked is controlled by
9732# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9733# This code just checks for a few cases where we'd like to ignore those
9734# definitions, even when they're present in the '.mt' file. These cases
9735# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9736# not part of the source tree.
7a292a7a
SS
9737#
9738# Check whether --enable-sim or --disable-sim was given.
9739if test "${enable_sim+set}" = set; then
9740 enableval="$enable_sim"
9741 echo "enable_sim = $enable_sim";
9742 echo "enableval = ${enableval}";
9743 case "${enableval}" in
9744 yes) ignore_sim=false ;;
9745 no) ignore_sim=true ;;
9746 *) ignore_sim=false ;;
9747 esac
9748else
9749 ignore_sim=false
9750fi
9751
9752
9753if test ! -d "${srcdir}/../sim"; then
9754 ignore_sim=true
9755fi
9756
9757if test "${ignore_sim}" = "true"; then
9758 IGNORE_SIM="SIM="
9759 IGNORE_SIM_OBS="SIM_OBS="
9760else
9761 IGNORE_SIM=""
9762 IGNORE_SIM_OBS=""
9763 cat >> confdefs.h <<\EOF
9764#define WITH_SIM 1
9765EOF
9766
9767fi
9768
9769
9770
c906108c
SS
9771
9772
9773
9774
9775
9776
dfcd3bfb 9777
e56ac5c3
AC
9778
9779
b3a90332
AC
9780
9781
b46cd165 9782
c906108c
SS
9783# target_subdir is used by the testsuite to find the target libraries.
9784target_subdir=
9785if test "${host}" != "${target}"; then
9786 target_subdir="${target_alias}/"
9787fi
9788
9789
9790frags=
9791host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9792if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9793 # When building a native debuger the .mh file containing things
9794 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9795 # since it no longer contains anything useful.
9796 if test "${target}" = "${host}"; then
9797 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9798 else
9799 host_makefile_frag=/dev/null
9800 fi
c906108c
SS
9801fi
9802frags="$frags $host_makefile_frag"
9803
9804target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9805if test ! -f ${target_makefile_frag}; then
9806{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9807fi
9808frags="$frags $target_makefile_frag"
9809
9810
9811
9812
9813
9814hostfile=`sed -n '
9815s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9816' ${host_makefile_frag}`
9817
9818targetfile=`sed -n '
9819s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9820' ${target_makefile_frag}`
9821
6166d547
AC
9822GDB_MULTI_ARCH=`sed -n '
9823s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9824' ${target_makefile_frag}`
9825
c906108c 9826if test "${target}" = "${host}"; then
a85f51e7
DJ
9827# We pick this up from the host configuration file (.mh) because we
9828# do not have a native configuration Makefile fragment.
c906108c
SS
9829nativefile=`sed -n '
9830s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9831' ${host_makefile_frag}`
c906108c
SS
9832fi
9833
9834
6166d547
AC
9835# New targets should just set gdb_multi_arch=yes in configure.tgt.
9836# Old targets being converted can either do that or set GDB_MULTI_ARCH
9837# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9838# will be the default.
9839if test x"${GDB_MULTI_ARCH}" = x ; then
9840 case "${gdb_multi_arch}" in
9841 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9842 no ) GDB_MULTI_ARCH=0 ;;
9843 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9844 esac
9845fi
9846if test x"${GDB_MULTI_ARCH}" != x ; then
9847 cat >> confdefs.h <<EOF
9848#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9849EOF
9850
9851fi
6c5cfe5b 9852# Warn the user when they use an old practice
6166d547
AC
9853case "${GDB_MULTI_ARCH}" in
9854 "" ) ;;
9855 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9856 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9857 GDB_MULTI_ARCH_PURE )
9858 if test x"${targetfile}" != x ; then
6c5cfe5b 9859 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9860 targetfile=""
6166d547
AC
9861 fi ;;
9862 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9863esac
9864
b00a8037
DJ
9865if test x"${gdb_osabi}" != x ; then
9866 cat >> confdefs.h <<EOF
9867#define GDB_OSABI_DEFAULT $gdb_osabi
9868EOF
9869
9870fi
9871
8dcde887
MK
9872# Enable multi-ice-gdb-server.
9873# Check whether --enable-multi-ice or --disable-multi-ice was given.
9874if test "${enable_multi_ice+set}" = set; then
9875 enableval="$enable_multi_ice"
9876 case $enableval in
9877 yes | no)
9878 ;;
9879 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
9880 esac
96baa820
JM
9881fi
9882
8dcde887
MK
9883if test "x$enable_multi_ice" = xyes; then
9884 configdirs="$configdirs multi-ice"
a85f51e7
DJ
9885fi
9886
8dcde887
MK
9887# We only build gdbserver automatically if host and target are the same.
9888if test "x$target" = "x$host"; then
9889 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
030292b7 9890echo "configure:9891: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
9891 if test "x$build_gdbserver" = xyes; then
9892 configdirs="$configdirs gdbserver"
9893 echo "$ac_t""yes" 1>&6
9894 else
9895 echo "$ac_t""no" 1>&6
9896 fi
9897fi
9898
9899subdirs="doc testsuite $configdirs"
9900
96baa820 9901
c906108c 9902# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9903# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9904# version.
c906108c
SS
9905
9906files=
9907links=
5a2402b8 9908
c906108c 9909rm -f xm.h
5a2402b8 9910xm_h=""
c906108c 9911if test "${hostfile}" != ""; then
5a2402b8
AC
9912 xm_h=xm.h
9913 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9914 files="${files} ${GDB_XM_FILE}"
9915 links="${links} xm.h"
9916 cat >> confdefs.h <<EOF
9917#define GDB_XM_FILE ${GDB_XM_FILE}
9918EOF
9919
c906108c 9920fi
5a2402b8
AC
9921
9922
c906108c 9923rm -f tm.h
5a2402b8 9924tm_h=""
c906108c 9925if test "${targetfile}" != ""; then
5a2402b8
AC
9926 tm_h=tm.h
9927 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9928 files="${files} ${GDB_TM_FILE}"
9929 links="${links} tm.h"
9930 cat >> confdefs.h <<EOF
9931#define GDB_TM_FILE ${GDB_TM_FILE}
9932EOF
9933
c906108c 9934fi
5a2402b8
AC
9935
9936
c906108c 9937rm -f nm.h
5a2402b8 9938nm_h=""
c906108c 9939if test "${nativefile}" != ""; then
5a2402b8
AC
9940 nm_h=nm.h
9941 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
9942 files="${files} ${GDB_NM_FILE}"
9943 links="${links} nm.h"
9944 cat >> confdefs.h <<EOF
9945#define GDB_NM_FILE ${GDB_NM_FILE}
9946EOF
9947
c906108c 9948fi
5a2402b8
AC
9949
9950
c906108c
SS
9951
9952
9953echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
030292b7 9954echo "configure:9955: checking for Cygwin environment" >&5
c906108c
SS
9955if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9956 echo $ac_n "(cached) $ac_c" 1>&6
9957else
9958 cat > conftest.$ac_ext <<EOF
030292b7 9959#line 9960 "configure"
c906108c
SS
9960#include "confdefs.h"
9961
9962int main() {
9963
9964#ifndef __CYGWIN__
9965#define __CYGWIN__ __CYGWIN32__
9966#endif
9967return __CYGWIN__;
9968; return 0; }
9969EOF
030292b7 9970if { (eval echo configure:9971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9971 rm -rf conftest*
9972 ac_cv_cygwin=yes
9973else
9974 echo "configure: failed program was:" >&5
9975 cat conftest.$ac_ext >&5
9976 rm -rf conftest*
9977 ac_cv_cygwin=no
9978fi
9979rm -f conftest*
9980rm -f conftest*
9981fi
9982
9983echo "$ac_t""$ac_cv_cygwin" 1>&6
9984CYGWIN=
9985test "$ac_cv_cygwin" = yes && CYGWIN=yes
9986echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
030292b7 9987echo "configure:9988: checking for mingw32 environment" >&5
c906108c
SS
9988if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
9989 echo $ac_n "(cached) $ac_c" 1>&6
9990else
9991 cat > conftest.$ac_ext <<EOF
030292b7 9992#line 9993 "configure"
c906108c
SS
9993#include "confdefs.h"
9994
9995int main() {
9996return __MINGW32__;
9997; return 0; }
9998EOF
030292b7 9999if { (eval echo configure:10000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10000 rm -rf conftest*
10001 ac_cv_mingw32=yes
10002else
10003 echo "configure: failed program was:" >&5
10004 cat conftest.$ac_ext >&5
10005 rm -rf conftest*
10006 ac_cv_mingw32=no
10007fi
10008rm -f conftest*
10009rm -f conftest*
10010fi
10011
10012echo "$ac_t""$ac_cv_mingw32" 1>&6
10013MINGW32=
10014test "$ac_cv_mingw32" = yes && MINGW32=yes
10015
10016
10017echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
030292b7 10018echo "configure:10019: checking for executable suffix" >&5
c906108c
SS
10019if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10020 echo $ac_n "(cached) $ac_c" 1>&6
10021else
10022 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10023 ac_cv_exeext=.exe
10024else
10025 rm -f conftest*
10026 echo 'int main () { return 0; }' > conftest.$ac_ext
10027 ac_cv_exeext=
030292b7 10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10029 for file in conftest.*; do
10030 case $file in
b00a8037 10031 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10032 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10033 esac
10034 done
10035 else
10036 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10037 fi
10038 rm -f conftest*
10039 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10040fi
10041fi
10042
10043EXEEXT=""
10044test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10045echo "$ac_t""${ac_cv_exeext}" 1>&6
10046ac_exeext=$EXEEXT
10047
10048
234b45d4
KB
10049
10050cat >> confdefs.h <<\EOF
10051#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10052EOF
10053
10054
10055
10056
10057 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10058if test "${with_libiconv_prefix+set}" = set; then
10059 withval="$with_libiconv_prefix"
10060
10061 for dir in `echo "$withval" | tr : ' '`; do
10062 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10063 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10064 done
10065
10066fi
10067
10068
10069 echo $ac_n "checking for iconv""... $ac_c" 1>&6
030292b7 10070echo "configure:10071: checking for iconv" >&5
234b45d4
KB
10071if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10072 echo $ac_n "(cached) $ac_c" 1>&6
10073else
10074
10075 am_cv_func_iconv="no, consider installing GNU libiconv"
10076 am_cv_lib_iconv=no
10077 cat > conftest.$ac_ext <<EOF
030292b7 10078#line 10079 "configure"
234b45d4
KB
10079#include "confdefs.h"
10080#include <stdlib.h>
10081#include <iconv.h>
10082int main() {
10083iconv_t cd = iconv_open("","");
10084 iconv(cd,NULL,NULL,NULL,NULL);
10085 iconv_close(cd);
10086; return 0; }
10087EOF
030292b7 10088if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10089 rm -rf conftest*
10090 am_cv_func_iconv=yes
10091else
10092 echo "configure: failed program was:" >&5
10093 cat conftest.$ac_ext >&5
10094fi
10095rm -f conftest*
10096 if test "$am_cv_func_iconv" != yes; then
10097 am_save_LIBS="$LIBS"
10098 LIBS="$LIBS -liconv"
10099 cat > conftest.$ac_ext <<EOF
030292b7 10100#line 10101 "configure"
234b45d4
KB
10101#include "confdefs.h"
10102#include <stdlib.h>
10103#include <iconv.h>
10104int main() {
10105iconv_t cd = iconv_open("","");
10106 iconv(cd,NULL,NULL,NULL,NULL);
10107 iconv_close(cd);
10108; return 0; }
10109EOF
030292b7 10110if { (eval echo configure:10111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10111 rm -rf conftest*
10112 am_cv_lib_iconv=yes
10113 am_cv_func_iconv=yes
10114else
10115 echo "configure: failed program was:" >&5
10116 cat conftest.$ac_ext >&5
10117fi
10118rm -f conftest*
10119 LIBS="$am_save_LIBS"
10120 fi
10121
10122fi
10123
10124echo "$ac_t""$am_cv_func_iconv" 1>&6
10125 if test "$am_cv_func_iconv" = yes; then
10126 cat >> confdefs.h <<\EOF
10127#define HAVE_ICONV 1
10128EOF
10129
10130 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
030292b7 10131echo "configure:10132: checking for iconv declaration" >&5
234b45d4
KB
10132 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10133 echo $ac_n "(cached) $ac_c" 1>&6
10134else
10135
10136 cat > conftest.$ac_ext <<EOF
030292b7 10137#line 10138 "configure"
234b45d4
KB
10138#include "confdefs.h"
10139
10140#include <stdlib.h>
10141#include <iconv.h>
10142extern
10143#ifdef __cplusplus
10144"C"
10145#endif
10146#if defined(__STDC__) || defined(__cplusplus)
10147size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10148#else
10149size_t iconv();
10150#endif
10151
10152int main() {
10153
10154; return 0; }
10155EOF
030292b7 10156if { (eval echo configure:10157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10157 rm -rf conftest*
10158 am_cv_proto_iconv_arg1=""
10159else
10160 echo "configure: failed program was:" >&5
10161 cat conftest.$ac_ext >&5
10162 rm -rf conftest*
10163 am_cv_proto_iconv_arg1="const"
10164fi
10165rm -f conftest*
10166 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);"
10167fi
10168
10169 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10170 echo "$ac_t""${ac_t:-
10171 }$am_cv_proto_iconv" 1>&6
10172 cat >> confdefs.h <<EOF
10173#define ICONV_CONST $am_cv_proto_iconv_arg1
10174EOF
10175
10176 fi
10177 LIBICONV=
10178 if test "$am_cv_lib_iconv" = yes; then
10179 LIBICONV="-liconv"
10180 fi
10181
10182
10183
c906108c
SS
10184trap '' 1 2 15
10185cat > confcache <<\EOF
10186# This file is a shell script that caches the results of configure
10187# tests run on this system so they can be shared between configure
10188# scripts and configure runs. It is not useful on other systems.
10189# If it contains results you don't want to keep, you may remove or edit it.
10190#
10191# By default, configure uses ./config.cache as the cache file,
10192# creating it if it does not exist already. You can give configure
10193# the --cache-file=FILE option to use a different cache file; that is
10194# what configure does when it calls configure scripts in
10195# subdirectories, so they share the cache.
10196# Giving --cache-file=/dev/null disables caching, for debugging configure.
10197# config.status only pays attention to the cache file if you give it the
10198# --recheck option to rerun configure.
10199#
10200EOF
10201# The following way of writing the cache mishandles newlines in values,
10202# but we know of no workaround that is simple, portable, and efficient.
10203# So, don't put newlines in cache variables' values.
10204# Ultrix sh set writes to stderr and can't be redirected directly,
10205# and sets the high bit in the cache file unless we assign to the vars.
10206(set) 2>&1 |
10207 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10208 *ac_space=\ *)
10209 # `set' does not quote correctly, so add quotes (double-quote substitution
10210 # turns \\\\ into \\, and sed turns \\ into \).
10211 sed -n \
10212 -e "s/'/'\\\\''/g" \
10213 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10214 ;;
10215 *)
10216 # `set' quotes correctly as required by POSIX, so do not add quotes.
10217 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10218 ;;
10219 esac >> confcache
10220if cmp -s $cache_file confcache; then
10221 :
10222else
10223 if test -w $cache_file; then
10224 echo "updating cache $cache_file"
10225 cat confcache > $cache_file
10226 else
10227 echo "not updating unwritable cache $cache_file"
10228 fi
10229fi
10230rm -f confcache
10231
10232trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10233
10234test "x$prefix" = xNONE && prefix=$ac_default_prefix
10235# Let make expand exec_prefix.
10236test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10237
10238# Any assignment to VPATH causes Sun make to only execute
10239# the first set of double-colon rules, so remove it if not needed.
10240# If there is a colon in the path, we need to keep it.
10241if test "x$srcdir" = x.; then
10242 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10243fi
10244
10245trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10246
10247DEFS=-DHAVE_CONFIG_H
10248
10249# Without the "./", some shells look in PATH for config.status.
10250: ${CONFIG_STATUS=./config.status}
10251
10252echo creating $CONFIG_STATUS
10253rm -f $CONFIG_STATUS
10254cat > $CONFIG_STATUS <<EOF
10255#! /bin/sh
10256# Generated automatically by configure.
10257# Run this file to recreate the current configuration.
10258# This directory was configured as follows,
10259# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10260#
10261# $0 $ac_configure_args
10262#
10263# Compiler output produced by configure, useful for debugging
10264# configure, is in ./config.log if it exists.
10265
10266ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10267for ac_option
10268do
10269 case "\$ac_option" in
10270 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10271 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10272 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10273 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10274 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10275 exit 0 ;;
10276 -help | --help | --hel | --he | --h)
10277 echo "\$ac_cs_usage"; exit 0 ;;
10278 *) echo "\$ac_cs_usage"; exit 1 ;;
10279 esac
10280done
10281
10282ac_given_srcdir=$srcdir
10283ac_given_INSTALL="$INSTALL"
10284
ed952ac5 10285trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10286EOF
10287cat >> $CONFIG_STATUS <<EOF
10288
10289# Protect against being on the right side of a sed subst in config.status.
10290sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10291 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10292$ac_vpsub
10293$extrasub
10294s%@SHELL@%$SHELL%g
10295s%@CFLAGS@%$CFLAGS%g
10296s%@CPPFLAGS@%$CPPFLAGS%g
10297s%@CXXFLAGS@%$CXXFLAGS%g
10298s%@FFLAGS@%$FFLAGS%g
10299s%@DEFS@%$DEFS%g
10300s%@LDFLAGS@%$LDFLAGS%g
10301s%@LIBS@%$LIBS%g
10302s%@exec_prefix@%$exec_prefix%g
10303s%@prefix@%$prefix%g
10304s%@program_transform_name@%$program_transform_name%g
10305s%@bindir@%$bindir%g
10306s%@sbindir@%$sbindir%g
10307s%@libexecdir@%$libexecdir%g
10308s%@datadir@%$datadir%g
10309s%@sysconfdir@%$sysconfdir%g
10310s%@sharedstatedir@%$sharedstatedir%g
10311s%@localstatedir@%$localstatedir%g
10312s%@libdir@%$libdir%g
10313s%@includedir@%$includedir%g
10314s%@oldincludedir@%$oldincludedir%g
10315s%@infodir@%$infodir%g
10316s%@mandir@%$mandir%g
413ccac7
AC
10317s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10318s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10319s%@MAINT@%$MAINT%g
c906108c
SS
10320s%@CC@%$CC%g
10321s%@CPP@%$CPP%g
10322s%@host@%$host%g
10323s%@host_alias@%$host_alias%g
10324s%@host_cpu@%$host_cpu%g
10325s%@host_vendor@%$host_vendor%g
10326s%@host_os@%$host_os%g
10327s%@target@%$target%g
10328s%@target_alias@%$target_alias%g
10329s%@target_cpu@%$target_cpu%g
10330s%@target_vendor@%$target_vendor%g
10331s%@target_os@%$target_os%g
10332s%@build@%$build%g
10333s%@build_alias@%$build_alias%g
10334s%@build_cpu@%$build_cpu%g
10335s%@build_vendor@%$build_vendor%g
10336s%@build_os@%$build_os%g
c906108c 10337s%@RANLIB@%$RANLIB%g
8bb2c122 10338s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10339s%@ALLOCA@%$ALLOCA%g
10340s%@USE_NLS@%$USE_NLS%g
10341s%@MSGFMT@%$MSGFMT%g
10342s%@GMSGFMT@%$GMSGFMT%g
10343s%@XGETTEXT@%$XGETTEXT%g
10344s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10345s%@CATALOGS@%$CATALOGS%g
10346s%@CATOBJEXT@%$CATOBJEXT%g
10347s%@DATADIRNAME@%$DATADIRNAME%g
10348s%@GMOFILES@%$GMOFILES%g
10349s%@INSTOBJEXT@%$INSTOBJEXT%g
10350s%@INTLDEPS@%$INTLDEPS%g
10351s%@INTLLIBS@%$INTLLIBS%g
10352s%@INTLOBJS@%$INTLOBJS%g
10353s%@POFILES@%$POFILES%g
10354s%@POSUB@%$POSUB%g
10355s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10356s%@GT_NO@%$GT_NO%g
10357s%@GT_YES@%$GT_YES%g
10358s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10359s%@l@%$l%g
8dcde887 10360s%@subdirs@%$subdirs%g
7a292a7a 10361s%@AWK@%$AWK%g
c906108c
SS
10362s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10363s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10364s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10365s%@LN_S@%$LN_S%g
10366s%@YACC@%$YACC%g
c906108c 10367s%@AR@%$AR%g
95ca63c4
CF
10368s%@DLLTOOL@%$DLLTOOL%g
10369s%@WINDRES@%$WINDRES%g
75c6e08a 10370s%@MIG@%$MIG%g
c906108c 10371s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10372s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10373s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10374s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10375s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10376s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10377s%@MMALLOC@%$MMALLOC%g
aff38e61 10378s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10379s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10380s%@LIBGUI@%$LIBGUI%g
10381s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10382s%@WIN32LDAPP@%$WIN32LDAPP%g
10383s%@TCL_VERSION@%$TCL_VERSION%g
10384s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10385s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10386s%@TCL_CC@%$TCL_CC%g
10387s%@TCL_DEFS@%$TCL_DEFS%g
10388s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10389s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10390s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10391s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10392s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10393s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10394s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10395s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10396s%@TCL_RANLIB@%$TCL_RANLIB%g
10397s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10398s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10399s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10400s%@TK_VERSION@%$TK_VERSION%g
10401s%@TK_DEFS@%$TK_DEFS%g
10402s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10403s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10404s%@TK_XLIBSW@%$TK_XLIBSW%g
10405s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10406s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10407s%@TCLHDIR@%$TCLHDIR%g
10408s%@TKHDIR@%$TKHDIR%g
10409s%@ITCLHDIR@%$ITCLHDIR%g
10410s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10411s%@ITCL_VERSION@%$ITCL_VERSION%g
10412s%@ITCL_DEFS@%$ITCL_DEFS%g
10413s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10414s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10415s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10416s%@ITK_VERSION@%$ITK_VERSION%g
10417s%@ITK_DEFS@%$ITK_DEFS%g
10418s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10419s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10420s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10421s%@X_CFLAGS@%$X_CFLAGS%g
10422s%@X_LDFLAGS@%$X_LDFLAGS%g
10423s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10424s%@TCL_DEPS@%$TCL_DEPS%g
10425s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10426s%@ITCLLIB@%$ITCLLIB%g
10427s%@ITCL_DEPS@%$ITCL_DEPS%g
10428s%@ITKLIB@%$ITKLIB%g
10429s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10430s%@GDBTKLIBS@%$GDBTKLIBS%g
10431s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10432s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10433s%@IGNORE_SIM@%$IGNORE_SIM%g
10434s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10435s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10436s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10437s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10438s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10439s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10440s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10441s%@CONFIG_ALL@%$CONFIG_ALL%g
10442s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10443s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10444s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10445s%@target_subdir@%$target_subdir%g
10446/@host_makefile_frag@/r $host_makefile_frag
10447s%@host_makefile_frag@%%g
10448/@target_makefile_frag@/r $target_makefile_frag
10449s%@target_makefile_frag@%%g
10450s%@frags@%$frags%g
5a2402b8
AC
10451s%@xm_h@%$xm_h%g
10452s%@tm_h@%$tm_h%g
10453s%@nm_h@%$nm_h%g
c906108c 10454s%@EXEEXT@%$EXEEXT%g
234b45d4 10455s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10456
10457CEOF
10458EOF
10459
10460cat >> $CONFIG_STATUS <<\EOF
10461
10462# Split the substitutions into bite-sized pieces for seds with
10463# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10464ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10465ac_file=1 # Number of current file.
10466ac_beg=1 # First line for current file.
10467ac_end=$ac_max_sed_cmds # Line after last line for current file.
10468ac_more_lines=:
10469ac_sed_cmds=""
10470while $ac_more_lines; do
10471 if test $ac_beg -gt 1; then
10472 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10473 else
10474 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10475 fi
10476 if test ! -s conftest.s$ac_file; then
10477 ac_more_lines=false
10478 rm -f conftest.s$ac_file
10479 else
10480 if test -z "$ac_sed_cmds"; then
10481 ac_sed_cmds="sed -f conftest.s$ac_file"
10482 else
10483 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10484 fi
10485 ac_file=`expr $ac_file + 1`
10486 ac_beg=$ac_end
10487 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10488 fi
10489done
10490if test -z "$ac_sed_cmds"; then
10491 ac_sed_cmds=cat
10492fi
10493EOF
10494
10495cat >> $CONFIG_STATUS <<EOF
10496
ed952ac5 10497CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10498EOF
10499cat >> $CONFIG_STATUS <<\EOF
10500for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10501 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10502 case "$ac_file" in
10503 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10504 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10505 *) ac_file_in="${ac_file}.in" ;;
10506 esac
10507
10508 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10509
10510 # Remove last slash and all that follows it. Not all systems have dirname.
10511 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10512 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10513 # The file is in a subdirectory.
10514 test ! -d "$ac_dir" && mkdir "$ac_dir"
10515 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10516 # A "../" for each directory in $ac_dir_suffix.
10517 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10518 else
10519 ac_dir_suffix= ac_dots=
10520 fi
10521
10522 case "$ac_given_srcdir" in
10523 .) srcdir=.
10524 if test -z "$ac_dots"; then top_srcdir=.
10525 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10526 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10527 *) # Relative path.
10528 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10529 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10530 esac
10531
10532 case "$ac_given_INSTALL" in
10533 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10534 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10535 esac
10536
10537 echo creating "$ac_file"
10538 rm -f "$ac_file"
10539 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10540 case "$ac_file" in
10541 *Makefile*) ac_comsub="1i\\
10542# $configure_input" ;;
10543 *) ac_comsub= ;;
10544 esac
10545
10546 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10547 sed -e "$ac_comsub
10548s%@configure_input@%$configure_input%g
10549s%@srcdir@%$srcdir%g
10550s%@top_srcdir@%$top_srcdir%g
10551s%@INSTALL@%$INSTALL%g
10552" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10553fi; done
10554rm -f conftest.s*
10555
10556# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10557# NAME is the cpp macro being defined and VALUE is the value it is being given.
10558#
10559# ac_d sets the value in "#define NAME VALUE" lines.
10560ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10561ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10562ac_dC='\3'
10563ac_dD='%g'
10564# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10565ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10566ac_uB='\([ ]\)%\1#\2define\3'
10567ac_uC=' '
10568ac_uD='\4%g'
10569# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10570ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10571ac_eB='$%\1#\2define\3'
10572ac_eC=' '
10573ac_eD='%g'
10574
10575if test "${CONFIG_HEADERS+set}" != set; then
10576EOF
10577cat >> $CONFIG_STATUS <<EOF
10578 CONFIG_HEADERS="config.h:config.in"
10579EOF
10580cat >> $CONFIG_STATUS <<\EOF
10581fi
10582for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10583 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10584 case "$ac_file" in
10585 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10586 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10587 *) ac_file_in="${ac_file}.in" ;;
10588 esac
10589
10590 echo creating $ac_file
10591
10592 rm -f conftest.frag conftest.in conftest.out
10593 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10594 cat $ac_file_inputs > conftest.in
10595
10596EOF
10597
10598# Transform confdefs.h into a sed script conftest.vals that substitutes
10599# the proper values into config.h.in to produce config.h. And first:
10600# Protect against being on the right side of a sed subst in config.status.
10601# Protect against being in an unquoted here document in config.status.
10602rm -f conftest.vals
10603cat > conftest.hdr <<\EOF
10604s/[\\&%]/\\&/g
10605s%[\\$`]%\\&%g
10606s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10607s%ac_d%ac_u%gp
10608s%ac_u%ac_e%gp
10609EOF
10610sed -n -f conftest.hdr confdefs.h > conftest.vals
10611rm -f conftest.hdr
10612
10613# This sed command replaces #undef with comments. This is necessary, for
10614# example, in the case of _POSIX_SOURCE, which is predefined and required
10615# on some systems where configure will not decide to define it.
10616cat >> conftest.vals <<\EOF
10617s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10618EOF
10619
10620# Break up conftest.vals because some shells have a limit on
10621# the size of here documents, and old seds have small limits too.
10622
10623rm -f conftest.tail
10624while :
10625do
10626 ac_lines=`grep -c . conftest.vals`
10627 # grep -c gives empty output for an empty file on some AIX systems.
10628 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10629 # Write a limited-size here document to conftest.frag.
10630 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10631 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10632 echo 'CEOF
10633 sed -f conftest.frag conftest.in > conftest.out
10634 rm -f conftest.in
10635 mv conftest.out conftest.in
10636' >> $CONFIG_STATUS
10637 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10638 rm -f conftest.vals
10639 mv conftest.tail conftest.vals
10640done
10641rm -f conftest.vals
10642
10643cat >> $CONFIG_STATUS <<\EOF
10644 rm -f conftest.frag conftest.h
10645 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10646 cat conftest.in >> conftest.h
10647 rm -f conftest.in
10648 if cmp -s $ac_file conftest.h 2>/dev/null; then
10649 echo "$ac_file is unchanged"
10650 rm -f conftest.h
10651 else
10652 # Remove last slash and all that follows it. Not all systems have dirname.
10653 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10654 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10655 # The file is in a subdirectory.
10656 test ! -d "$ac_dir" && mkdir "$ac_dir"
10657 fi
10658 rm -f $ac_file
10659 mv conftest.h $ac_file
10660 fi
10661fi; done
10662
10663EOF
10664
10665cat >> $CONFIG_STATUS <<EOF
10666ac_sources="$files"
10667ac_dests="$links"
10668EOF
10669
10670cat >> $CONFIG_STATUS <<\EOF
10671srcdir=$ac_given_srcdir
10672while test -n "$ac_sources"; do
10673 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10674 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10675
10676 echo "linking $srcdir/$ac_source to $ac_dest"
10677
10678 if test ! -r $srcdir/$ac_source; then
10679 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10680 fi
10681 rm -f $ac_dest
10682
10683 # Make relative symlinks.
10684 # Remove last slash and all that follows it. Not all systems have dirname.
10685 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10686 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10687 # The dest file is in a subdirectory.
10688 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10689 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10690 # A "../" for each directory in $ac_dest_dir_suffix.
10691 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10692 else
10693 ac_dest_dir_suffix= ac_dots=
10694 fi
10695
10696 case "$srcdir" in
10697 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10698 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10699 esac
10700
10701 # Make a symlink if possible; otherwise try a hard link.
10702 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10703 ln $srcdir/$ac_source $ac_dest; then :
10704 else
10705 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10706 fi
10707done
10708EOF
10709cat >> $CONFIG_STATUS <<EOF
10710
10711gdb_host_cpu=$gdb_host_cpu
10712gdb_target_cpu=$gdb_target_cpu
10713nativefile=$nativefile
10714
10715EOF
10716cat >> $CONFIG_STATUS <<\EOF
10717
10718if test "${nativefile}" = ""; then
c4620205 10719 < Makefile \
e27da16d
JT
10720 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10721 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10722 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10723 > Makefile.tem
c906108c
SS
10724mv -f Makefile.tem Makefile
10725fi
10726
10727sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10728/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10729/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10730mv -f Makefile.tmp Makefile
10731
2acceee2 10732
c906108c
SS
10733case x$CONFIG_HEADERS in
10734xconfig.h:config.in)
10735echo > stamp-h ;;
10736esac
10737
10738exit 0
10739EOF
10740chmod +x $CONFIG_STATUS
10741rm -fr confdefs* $ac_clean_files
10742test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10743
10744if test "$no_recursion" != yes; then
10745
10746 # Remove --cache-file and --srcdir arguments so they do not pile up.
10747 ac_sub_configure_args=
10748 ac_prev=
10749 for ac_arg in $ac_configure_args; do
10750 if test -n "$ac_prev"; then
10751 ac_prev=
10752 continue
10753 fi
10754 case "$ac_arg" in
10755 -cache-file | --cache-file | --cache-fil | --cache-fi \
10756 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10757 ac_prev=cache_file ;;
10758 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10759 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10760 ;;
10761 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10762 ac_prev=srcdir ;;
10763 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10764 ;;
10765 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10766 esac
10767 done
10768
8dcde887 10769 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10770
10771 # Do not complain, so a configure script can configure whichever
10772 # parts of a large source tree are present.
10773 if test ! -d $srcdir/$ac_config_dir; then
10774 continue
10775 fi
10776
10777 echo configuring in $ac_config_dir
10778
10779 case "$srcdir" in
10780 .) ;;
10781 *)
10782 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10783 else
10784 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10785 fi
10786 ;;
10787 esac
10788
10789 ac_popdir=`pwd`
10790 cd $ac_config_dir
10791
10792 # A "../" for each directory in /$ac_config_dir.
10793 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10794
10795 case "$srcdir" in
10796 .) # No --srcdir option. We are building in place.
10797 ac_sub_srcdir=$srcdir ;;
10798 /*) # Absolute path.
10799 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10800 *) # Relative path.
10801 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10802 esac
10803
10804 # Check for guested configure; otherwise get Cygnus style configure.
10805 if test -f $ac_sub_srcdir/configure; then
10806 ac_sub_configure=$ac_sub_srcdir/configure
10807 elif test -f $ac_sub_srcdir/configure.in; then
10808 ac_sub_configure=$ac_configure
10809 else
10810 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10811 ac_sub_configure=
10812 fi
10813
10814 # The recursion is here.
10815 if test -n "$ac_sub_configure"; then
10816
10817 # Make the cache file name correct relative to the subdirectory.
10818 case "$cache_file" in
10819 /*) ac_sub_cache_file=$cache_file ;;
10820 *) # Relative path.
10821 ac_sub_cache_file="$ac_dots$cache_file" ;;
10822 esac
10823 case "$ac_given_INSTALL" in
10824 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10825 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10826 esac
10827
10828 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10829 # The eval makes quoting arguments work.
10830 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10831 then :
10832 else
10833 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10834 fi
10835 fi
10836
10837 cd $ac_popdir
10838 done
10839fi
10840
10841
10842exit 0