]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/configure
Fix PR build/1097.
[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"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf
DJ
30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
31ac_help="$ac_help
32 --enable-profiling enable profiling of GDB"
06825bd1
MK
33ac_help="$ac_help
34 --without-included-regex don't use included regex; this is the default
35 on systems with version 2 of the GNU C library
36 (use with caution on other system)"
030292b7
DJ
37ac_help="$ac_help
38 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
39ac_help="$ac_help
40 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
41ac_help="$ac_help
42 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
43ac_help="$ac_help
44 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
82srcdir=
83target=NONE
84verbose=
85x_includes=NONE
86x_libraries=NONE
87bindir='${exec_prefix}/bin'
88sbindir='${exec_prefix}/sbin'
89libexecdir='${exec_prefix}/libexec'
90datadir='${prefix}/share'
91sysconfdir='${prefix}/etc'
92sharedstatedir='${prefix}/com'
93localstatedir='${prefix}/var'
94libdir='${exec_prefix}/lib'
95includedir='${prefix}/include'
96oldincludedir='/usr/include'
97infodir='${prefix}/info'
98mandir='${prefix}/man'
99
100# Initialize some other variables.
101subdirs=
102MFLAGS= MAKEFLAGS=
103SHELL=${CONFIG_SHELL-/bin/sh}
104# Maximum number of lines to put in a shell here document.
105ac_max_here_lines=12
106
107ac_prev=
108for ac_option
109do
110
111 # If the previous option needs an argument, assign it.
112 if test -n "$ac_prev"; then
113 eval "$ac_prev=\$ac_option"
114 ac_prev=
115 continue
116 fi
117
118 case "$ac_option" in
119 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
120 *) ac_optarg= ;;
121 esac
122
123 # Accept the important Cygnus configure options, so we can diagnose typos.
124
125 case "$ac_option" in
126
127 -bindir | --bindir | --bindi | --bind | --bin | --bi)
128 ac_prev=bindir ;;
129 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
130 bindir="$ac_optarg" ;;
131
132 -build | --build | --buil | --bui | --bu)
133 ac_prev=build ;;
134 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
135 build="$ac_optarg" ;;
136
137 -cache-file | --cache-file | --cache-fil | --cache-fi \
138 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
139 ac_prev=cache_file ;;
140 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
141 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
142 cache_file="$ac_optarg" ;;
143
144 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
145 ac_prev=datadir ;;
146 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
147 | --da=*)
148 datadir="$ac_optarg" ;;
149
150 -disable-* | --disable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
152 # Reject names that are not valid shell variable names.
153 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 eval "enable_${ac_feature}=no" ;;
158
159 -enable-* | --enable-*)
160 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
161 # Reject names that are not valid shell variable names.
162 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
163 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
164 fi
165 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
166 case "$ac_option" in
167 *=*) ;;
168 *) ac_optarg=yes ;;
169 esac
170 eval "enable_${ac_feature}='$ac_optarg'" ;;
171
172 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
173 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
174 | --exec | --exe | --ex)
175 ac_prev=exec_prefix ;;
176 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
177 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
178 | --exec=* | --exe=* | --ex=*)
179 exec_prefix="$ac_optarg" ;;
180
181 -gas | --gas | --ga | --g)
182 # Obsolete; use --with-gas.
183 with_gas=yes ;;
184
185 -help | --help | --hel | --he)
186 # Omit some internal or obsolete options to make the list less imposing.
187 # This message is too long to be a string in the A/UX 3.1 sh.
188 cat << EOF
189Usage: configure [options] [host]
190Options: [defaults in brackets after descriptions]
191Configuration:
192 --cache-file=FILE cache test results in FILE
193 --help print this message
194 --no-create do not create output files
195 --quiet, --silent do not print \`checking...' messages
196 --version print the version of autoconf that created configure
197Directory and file names:
198 --prefix=PREFIX install architecture-independent files in PREFIX
199 [$ac_default_prefix]
200 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
201 [same as prefix]
202 --bindir=DIR user executables in DIR [EPREFIX/bin]
203 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
204 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
205 --datadir=DIR read-only architecture-independent data in DIR
206 [PREFIX/share]
207 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
208 --sharedstatedir=DIR modifiable architecture-independent data in DIR
209 [PREFIX/com]
210 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
211 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
212 --includedir=DIR C header files in DIR [PREFIX/include]
213 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
214 --infodir=DIR info documentation in DIR [PREFIX/info]
215 --mandir=DIR man documentation in DIR [PREFIX/man]
216 --srcdir=DIR find the sources in DIR [configure dir or ..]
217 --program-prefix=PREFIX prepend PREFIX to installed program names
218 --program-suffix=SUFFIX append SUFFIX to installed program names
219 --program-transform-name=PROGRAM
220 run sed PROGRAM on installed program names
221EOF
222 cat << EOF
223Host type:
224 --build=BUILD configure for building on BUILD [BUILD=HOST]
225 --host=HOST configure for HOST [guessed]
226 --target=TARGET configure for TARGET [TARGET=HOST]
227Features and packages:
228 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
229 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
230 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
231 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
232 --x-includes=DIR X include files are in DIR
233 --x-libraries=DIR X library files are in DIR
234EOF
235 if test -n "$ac_help"; then
236 echo "--enable and --with options recognized:$ac_help"
237 fi
238 exit 0 ;;
239
240 -host | --host | --hos | --ho)
241 ac_prev=host ;;
242 -host=* | --host=* | --hos=* | --ho=*)
243 host="$ac_optarg" ;;
244
245 -includedir | --includedir | --includedi | --included | --include \
246 | --includ | --inclu | --incl | --inc)
247 ac_prev=includedir ;;
248 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249 | --includ=* | --inclu=* | --incl=* | --inc=*)
250 includedir="$ac_optarg" ;;
251
252 -infodir | --infodir | --infodi | --infod | --info | --inf)
253 ac_prev=infodir ;;
254 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255 infodir="$ac_optarg" ;;
256
257 -libdir | --libdir | --libdi | --libd)
258 ac_prev=libdir ;;
259 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 libdir="$ac_optarg" ;;
261
262 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263 | --libexe | --libex | --libe)
264 ac_prev=libexecdir ;;
265 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266 | --libexe=* | --libex=* | --libe=*)
267 libexecdir="$ac_optarg" ;;
268
269 -localstatedir | --localstatedir | --localstatedi | --localstated \
270 | --localstate | --localstat | --localsta | --localst \
271 | --locals | --local | --loca | --loc | --lo)
272 ac_prev=localstatedir ;;
273 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276 localstatedir="$ac_optarg" ;;
277
278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279 ac_prev=mandir ;;
280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281 mandir="$ac_optarg" ;;
282
283 -nfp | --nfp | --nf)
284 # Obsolete; use --without-fp.
285 with_fp=no ;;
286
287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288 | --no-cr | --no-c)
289 no_create=yes ;;
290
291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 no_recursion=yes ;;
294
295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297 | --oldin | --oldi | --old | --ol | --o)
298 ac_prev=oldincludedir ;;
299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302 oldincludedir="$ac_optarg" ;;
303
304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305 ac_prev=prefix ;;
306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 prefix="$ac_optarg" ;;
308
309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
310 | --program-pre | --program-pr | --program-p)
311 ac_prev=program_prefix ;;
312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314 program_prefix="$ac_optarg" ;;
315
316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
317 | --program-suf | --program-su | --program-s)
318 ac_prev=program_suffix ;;
319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321 program_suffix="$ac_optarg" ;;
322
323 -program-transform-name | --program-transform-name \
324 | --program-transform-nam | --program-transform-na \
325 | --program-transform-n | --program-transform- \
326 | --program-transform | --program-transfor \
327 | --program-transfo | --program-transf \
328 | --program-trans | --program-tran \
329 | --progr-tra | --program-tr | --program-t)
330 ac_prev=program_transform_name ;;
331 -program-transform-name=* | --program-transform-name=* \
332 | --program-transform-nam=* | --program-transform-na=* \
333 | --program-transform-n=* | --program-transform-=* \
334 | --program-transform=* | --program-transfor=* \
335 | --program-transfo=* | --program-transf=* \
336 | --program-trans=* | --program-tran=* \
337 | --progr-tra=* | --program-tr=* | --program-t=*)
338 program_transform_name="$ac_optarg" ;;
339
340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341 | -silent | --silent | --silen | --sile | --sil)
342 silent=yes ;;
343
344 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345 ac_prev=sbindir ;;
346 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347 | --sbi=* | --sb=*)
348 sbindir="$ac_optarg" ;;
349
350 -sharedstatedir | --sharedstatedir | --sharedstatedi \
351 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352 | --sharedst | --shareds | --shared | --share | --shar \
353 | --sha | --sh)
354 ac_prev=sharedstatedir ;;
355 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358 | --sha=* | --sh=*)
359 sharedstatedir="$ac_optarg" ;;
360
361 -site | --site | --sit)
362 ac_prev=site ;;
363 -site=* | --site=* | --sit=*)
364 site="$ac_optarg" ;;
365
366 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
367 ac_prev=srcdir ;;
368 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369 srcdir="$ac_optarg" ;;
370
371 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
372 | --syscon | --sysco | --sysc | --sys | --sy)
373 ac_prev=sysconfdir ;;
374 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
375 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
376 sysconfdir="$ac_optarg" ;;
377
378 -target | --target | --targe | --targ | --tar | --ta | --t)
379 ac_prev=target ;;
380 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
381 target="$ac_optarg" ;;
382
383 -v | -verbose | --verbose | --verbos | --verbo | --verb)
384 verbose=yes ;;
385
386 -version | --version | --versio | --versi | --vers)
387 echo "configure generated by autoconf version 2.13"
388 exit 0 ;;
389
390 -with-* | --with-*)
391 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
392 # Reject names that are not valid shell variable names.
393 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 case "$ac_option" in
398 *=*) ;;
399 *) ac_optarg=yes ;;
400 esac
401 eval "with_${ac_package}='$ac_optarg'" ;;
402
403 -without-* | --without-*)
404 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
405 # Reject names that are not valid shell variable names.
406 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
407 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408 fi
409 ac_package=`echo $ac_package| sed 's/-/_/g'`
410 eval "with_${ac_package}=no" ;;
411
412 --x)
413 # Obsolete; use --with-x.
414 with_x=yes ;;
415
416 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
417 | --x-incl | --x-inc | --x-in | --x-i)
418 ac_prev=x_includes ;;
419 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
420 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
421 x_includes="$ac_optarg" ;;
422
423 -x-libraries | --x-libraries | --x-librarie | --x-librari \
424 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
425 ac_prev=x_libraries ;;
426 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
427 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
428 x_libraries="$ac_optarg" ;;
429
430 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
431 ;;
432
433 *)
434 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
435 echo "configure: warning: $ac_option: invalid host type" 1>&2
436 fi
437 if test "x$nonopt" != xNONE; then
438 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
439 fi
440 nonopt="$ac_option"
441 ;;
442
443 esac
444done
445
446if test -n "$ac_prev"; then
447 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
448fi
449
450trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
451
452# File descriptor usage:
453# 0 standard input
454# 1 file creation
455# 2 errors and warnings
456# 3 some systems may open it to /dev/tty
457# 4 used on the Kubota Titan
458# 6 checking for... messages and results
459# 5 compiler messages saved in config.log
460if test "$silent" = yes; then
461 exec 6>/dev/null
462else
463 exec 6>&1
464fi
465exec 5>./config.log
466
467echo "\
468This file contains any messages produced by compilers while
469running configure, to aid debugging if configure makes a mistake.
470" 1>&5
471
472# Strip out --no-create and --no-recursion so they do not pile up.
473# Also quote any args containing shell metacharacters.
474ac_configure_args=
475for ac_arg
476do
477 case "$ac_arg" in
478 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
479 | --no-cr | --no-c) ;;
480 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
481 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
482 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
483 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
484 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
485 esac
486done
487
488# NLS nuisances.
489# Only set these to C if already set. These must not be set unconditionally
490# because not all systems understand e.g. LANG=C (notably SCO).
491# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
492# Non-C LC_CTYPE values break the ctype check.
493if test "${LANG+set}" = set; then LANG=C; export LANG; fi
494if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
495if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
496if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
497
498# confdefs.h avoids OS command line length limits that DEFS can exceed.
499rm -rf conftest* confdefs.h
500# AIX cpp loses on an empty file, so make sure it contains at least a newline.
501echo > confdefs.h
502
503# A filename unique to this package, relative to the directory that
504# configure is in, which we can look for to find out if srcdir is correct.
505ac_unique_file=main.c
506
507# Find the source files, if location was not specified.
508if test -z "$srcdir"; then
509 ac_srcdir_defaulted=yes
510 # Try the directory containing this script, then its parent.
511 ac_prog=$0
512 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
513 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
514 srcdir=$ac_confdir
515 if test ! -r $srcdir/$ac_unique_file; then
516 srcdir=..
517 fi
518else
519 ac_srcdir_defaulted=no
520fi
521if test ! -r $srcdir/$ac_unique_file; then
522 if test "$ac_srcdir_defaulted" = yes; then
523 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
524 else
525 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
526 fi
527fi
528srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
529
530# Prefer explicitly selected file to automatically selected ones.
715d1656
AO
531if test -z "$CONFIG_SITE"; then
532 if test "x$prefix" != xNONE; then
533 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
534 else
535 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
c906108c
SS
536 fi
537fi
538for ac_site_file in $CONFIG_SITE; do
539 if test -r "$ac_site_file"; then
540 echo "loading site script $ac_site_file"
541 . "$ac_site_file"
542 fi
543done
544
545if test -r "$cache_file"; then
546 echo "loading cache $cache_file"
547 . $cache_file
548else
549 echo "creating cache $cache_file"
550 > $cache_file
551fi
552
553ac_ext=c
554# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
555ac_cpp='$CPP $CPPFLAGS'
556ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
557ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
558cross_compiling=$ac_cv_prog_cc_cross
559
560ac_exeext=
561ac_objext=o
562if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
563 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
564 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
565 ac_n= ac_c='
566' ac_t=' '
567 else
568 ac_n=-n ac_c= ac_t=
569 fi
570else
571 ac_n= ac_c='\c' ac_t=
572fi
573
574
575
413ccac7 576echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
715d1656 577echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
578 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
579if test "${enable_maintainer_mode+set}" = set; then
580 enableval="$enable_maintainer_mode"
581 USE_MAINTAINER_MODE=$enableval
582else
583 USE_MAINTAINER_MODE=no
584fi
585
586 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
587
588
589if test $USE_MAINTAINER_MODE = yes; then
590 MAINTAINER_MODE_TRUE=
591 MAINTAINER_MODE_FALSE='#'
592else
593 MAINTAINER_MODE_TRUE='#'
594 MAINTAINER_MODE_FALSE=
595fi
596 MAINT=$MAINTAINER_MODE_TRUE
597
598
c906108c
SS
599
600# Extract the first word of "gcc", so it can be a program name with args.
601set dummy gcc; ac_word=$2
602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 603echo "configure:604: checking for $ac_word" >&5
c906108c
SS
604if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605 echo $ac_n "(cached) $ac_c" 1>&6
606else
607 if test -n "$CC"; then
608 ac_cv_prog_CC="$CC" # Let the user override the test.
609else
610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
611 ac_dummy="$PATH"
612 for ac_dir in $ac_dummy; do
613 test -z "$ac_dir" && ac_dir=.
614 if test -f $ac_dir/$ac_word; then
615 ac_cv_prog_CC="gcc"
616 break
617 fi
618 done
619 IFS="$ac_save_ifs"
620fi
621fi
622CC="$ac_cv_prog_CC"
623if test -n "$CC"; then
624 echo "$ac_t""$CC" 1>&6
625else
626 echo "$ac_t""no" 1>&6
627fi
628
629if test -z "$CC"; then
630 # Extract the first word of "cc", so it can be a program name with args.
631set dummy cc; ac_word=$2
632echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 633echo "configure:634: checking for $ac_word" >&5
c906108c
SS
634if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
636else
637 if test -n "$CC"; then
638 ac_cv_prog_CC="$CC" # Let the user override the test.
639else
640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
641 ac_prog_rejected=no
642 ac_dummy="$PATH"
643 for ac_dir in $ac_dummy; do
644 test -z "$ac_dir" && ac_dir=.
645 if test -f $ac_dir/$ac_word; then
646 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
647 ac_prog_rejected=yes
648 continue
649 fi
650 ac_cv_prog_CC="cc"
651 break
652 fi
653 done
654 IFS="$ac_save_ifs"
655if test $ac_prog_rejected = yes; then
656 # We found a bogon in the path, so make sure we never use it.
657 set dummy $ac_cv_prog_CC
658 shift
659 if test $# -gt 0; then
660 # We chose a different compiler from the bogus one.
661 # However, it has the same basename, so the bogon will be chosen
662 # first if we set CC to just the basename; use the full file name.
663 shift
664 set dummy "$ac_dir/$ac_word" "$@"
665 shift
666 ac_cv_prog_CC="$@"
667 fi
668fi
669fi
670fi
671CC="$ac_cv_prog_CC"
672if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
674else
675 echo "$ac_t""no" 1>&6
676fi
677
678 if test -z "$CC"; then
679 case "`uname -s`" in
680 *win32* | *WIN32*)
681 # Extract the first word of "cl", so it can be a program name with args.
682set dummy cl; ac_word=$2
683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 684echo "configure:685: checking for $ac_word" >&5
c906108c
SS
685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
687else
688 if test -n "$CC"; then
689 ac_cv_prog_CC="$CC" # Let the user override the test.
690else
691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 ac_dummy="$PATH"
693 for ac_dir in $ac_dummy; do
694 test -z "$ac_dir" && ac_dir=.
695 if test -f $ac_dir/$ac_word; then
696 ac_cv_prog_CC="cl"
697 break
698 fi
699 done
700 IFS="$ac_save_ifs"
701fi
702fi
703CC="$ac_cv_prog_CC"
704if test -n "$CC"; then
705 echo "$ac_t""$CC" 1>&6
706else
707 echo "$ac_t""no" 1>&6
708fi
709 ;;
710 esac
711 fi
712 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
713fi
714
715echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
715d1656 716echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
717
718ac_ext=c
719# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
720ac_cpp='$CPP $CPPFLAGS'
721ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
722ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
723cross_compiling=$ac_cv_prog_cc_cross
724
725cat > conftest.$ac_ext << EOF
726
715d1656 727#line 728 "configure"
c906108c
SS
728#include "confdefs.h"
729
730main(){return(0);}
731EOF
715d1656 732if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
733 ac_cv_prog_cc_works=yes
734 # If we can't run a trivial program, we are probably using a cross compiler.
735 if (./conftest; exit) 2>/dev/null; then
736 ac_cv_prog_cc_cross=no
737 else
738 ac_cv_prog_cc_cross=yes
739 fi
740else
741 echo "configure: failed program was:" >&5
742 cat conftest.$ac_ext >&5
743 ac_cv_prog_cc_works=no
744fi
745rm -fr conftest*
746ac_ext=c
747# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
748ac_cpp='$CPP $CPPFLAGS'
749ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
750ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
751cross_compiling=$ac_cv_prog_cc_cross
752
753echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
754if test $ac_cv_prog_cc_works = no; then
755 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
756fi
757echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
715d1656 758echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
759echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
760cross_compiling=$ac_cv_prog_cc_cross
761
762echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
715d1656 763echo "configure:764: checking whether we are using GNU C" >&5
c906108c
SS
764if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 cat > conftest.c <<EOF
768#ifdef __GNUC__
769 yes;
770#endif
771EOF
715d1656 772if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
773 ac_cv_prog_gcc=yes
774else
775 ac_cv_prog_gcc=no
776fi
777fi
778
779echo "$ac_t""$ac_cv_prog_gcc" 1>&6
780
781if test $ac_cv_prog_gcc = yes; then
782 GCC=yes
783else
784 GCC=
785fi
786
787ac_test_CFLAGS="${CFLAGS+set}"
788ac_save_CFLAGS="$CFLAGS"
789CFLAGS=
790echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
715d1656 791echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
792if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794else
795 echo 'void f(){}' > conftest.c
796if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
797 ac_cv_prog_cc_g=yes
798else
799 ac_cv_prog_cc_g=no
800fi
801rm -f conftest*
802
803fi
804
805echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
806if test "$ac_test_CFLAGS" = set; then
807 CFLAGS="$ac_save_CFLAGS"
808elif test $ac_cv_prog_cc_g = yes; then
809 if test "$GCC" = yes; then
810 CFLAGS="-g -O2"
811 else
812 CFLAGS="-g"
813 fi
814else
815 if test "$GCC" = yes; then
816 CFLAGS="-O2"
817 else
818 CFLAGS=
819 fi
820fi
821
14abd0fb
MK
822cat >> confdefs.h <<\EOF
823#define _GNU_SOURCE 1
824EOF
825
826
c906108c 827echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
715d1656 828echo "configure:829: checking how to run the C preprocessor" >&5
c906108c
SS
829# On Suns, sometimes $CPP names a directory.
830if test -n "$CPP" && test -d "$CPP"; then
831 CPP=
832fi
833if test -z "$CPP"; then
834if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836else
837 # This must be in double quotes, not single quotes, because CPP may get
838 # substituted into the Makefile and "${CC-cc}" will confuse make.
839 CPP="${CC-cc} -E"
840 # On the NeXT, cc -E runs the code through the compiler's parser,
841 # not just through cpp.
842 cat > conftest.$ac_ext <<EOF
715d1656 843#line 844 "configure"
c906108c
SS
844#include "confdefs.h"
845#include <assert.h>
846Syntax Error
847EOF
848ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 849{ (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
850ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
851if test -z "$ac_err"; then
852 :
853else
854 echo "$ac_err" >&5
855 echo "configure: failed program was:" >&5
856 cat conftest.$ac_ext >&5
857 rm -rf conftest*
858 CPP="${CC-cc} -E -traditional-cpp"
859 cat > conftest.$ac_ext <<EOF
715d1656 860#line 861 "configure"
c906108c
SS
861#include "confdefs.h"
862#include <assert.h>
863Syntax Error
864EOF
865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 866{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
868if test -z "$ac_err"; then
869 :
870else
871 echo "$ac_err" >&5
872 echo "configure: failed program was:" >&5
873 cat conftest.$ac_ext >&5
874 rm -rf conftest*
875 CPP="${CC-cc} -nologo -E"
876 cat > conftest.$ac_ext <<EOF
715d1656 877#line 878 "configure"
c906108c
SS
878#include "confdefs.h"
879#include <assert.h>
880Syntax Error
881EOF
882ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 883{ (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
884ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
885if test -z "$ac_err"; then
886 :
887else
888 echo "$ac_err" >&5
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 CPP=/lib/cpp
893fi
894rm -f conftest*
895fi
896rm -f conftest*
897fi
898rm -f conftest*
899 ac_cv_prog_CPP="$CPP"
900fi
901 CPP="$ac_cv_prog_CPP"
902else
903 ac_cv_prog_CPP="$CPP"
904fi
905echo "$ac_t""$CPP" 1>&6
906
907echo $ac_n "checking for AIX""... $ac_c" 1>&6
715d1656 908echo "configure:909: checking for AIX" >&5
c906108c 909cat > conftest.$ac_ext <<EOF
715d1656 910#line 911 "configure"
c906108c
SS
911#include "confdefs.h"
912#ifdef _AIX
913 yes
914#endif
915
916EOF
917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
918 egrep "yes" >/dev/null 2>&1; then
919 rm -rf conftest*
920 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
921#define _ALL_SOURCE 1
922EOF
923
924else
925 rm -rf conftest*
926 echo "$ac_t""no" 1>&6
927fi
928rm -f conftest*
929
930
56157b4a 931echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
715d1656 932echo "configure:933: checking for POSIXized ISC" >&5
56157b4a
AC
933if test -d /etc/conf/kconfig.d &&
934 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
935then
936 echo "$ac_t""yes" 1>&6
937 ISC=yes # If later tests want to check for ISC.
938 cat >> confdefs.h <<\EOF
939#define _POSIX_SOURCE 1
c906108c
SS
940EOF
941
56157b4a
AC
942 if test "$GCC" = yes; then
943 CC="$CC -posix"
944 else
945 CC="$CC -Xp"
946 fi
c906108c
SS
947else
948 echo "$ac_t""no" 1>&6
56157b4a 949 ISC=
c906108c
SS
950fi
951
952
953
954
955echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
715d1656 956echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
957if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
958 echo $ac_n "(cached) $ac_c" 1>&6
959else
960 am_cv_prog_cc_stdc=no
961ac_save_CC="$CC"
962# Don't try gcc -ansi; that turns off useful extensions and
963# breaks some systems' header files.
964# AIX -qlanglvl=ansi
965# Ultrix and OSF/1 -std1
56157b4a
AC
966# HP-UX 10.20 and later -Ae
967# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 968# SVR4 -Xc -D__EXTENSIONS__
56157b4a 969for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
970do
971 CC="$ac_save_CC $ac_arg"
972 cat > conftest.$ac_ext <<EOF
715d1656 973#line 974 "configure"
c906108c
SS
974#include "confdefs.h"
975#include <stdarg.h>
976#include <stdio.h>
977#include <sys/types.h>
978#include <sys/stat.h>
979/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
980struct buf { int x; };
981FILE * (*rcsopen) (struct buf *, struct stat *, int);
982static char *e (p, i)
983 char **p;
984 int i;
985{
986 return p[i];
987}
988static char *f (char * (*g) (char **, int), char **p, ...)
989{
990 char *s;
991 va_list v;
992 va_start (v,p);
993 s = g (p, va_arg (v,int));
994 va_end (v);
995 return s;
996}
997int test (int i, double x);
998struct s1 {int (*f) (int a);};
999struct s2 {int (*f) (double a);};
1000int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1001int argc;
1002char **argv;
1003
1004int main() {
1005
1006return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1007
1008; return 0; }
1009EOF
715d1656 1010if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1011 rm -rf conftest*
1012 am_cv_prog_cc_stdc="$ac_arg"; break
1013else
1014 echo "configure: failed program was:" >&5
1015 cat conftest.$ac_ext >&5
1016fi
1017rm -f conftest*
1018done
1019CC="$ac_save_CC"
1020
1021fi
1022
1023if test -z "$am_cv_prog_cc_stdc"; then
1024 echo "$ac_t""none needed" 1>&6
1025else
1026 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1027fi
1028case "x$am_cv_prog_cc_stdc" in
1029 x|xno) ;;
1030 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1031esac
1032
1033
1034ac_aux_dir=
1035for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1036 if test -f $ac_dir/install-sh; then
1037 ac_aux_dir=$ac_dir
1038 ac_install_sh="$ac_aux_dir/install-sh -c"
1039 break
1040 elif test -f $ac_dir/install.sh; then
1041 ac_aux_dir=$ac_dir
1042 ac_install_sh="$ac_aux_dir/install.sh -c"
1043 break
1044 fi
1045done
1046if test -z "$ac_aux_dir"; then
1047 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1048fi
1049ac_config_guess=$ac_aux_dir/config.guess
1050ac_config_sub=$ac_aux_dir/config.sub
1051ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1052
1053
1054# Do some error checking and defaulting for the host and target type.
1055# The inputs are:
1056# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1057#
1058# The rules are:
1059# 1. You are not allowed to specify --host, --target, and nonopt at the
1060# same time.
1061# 2. Host defaults to nonopt.
1062# 3. If nonopt is not specified, then host defaults to the current host,
1063# as determined by config.guess.
1064# 4. Target and build default to nonopt.
1065# 5. If nonopt is not specified, then target and build default to host.
1066
1067# The aliases save the names the user supplied, while $host etc.
1068# will get canonicalized.
1069case $host---$target---$nonopt in
1070NONE---*---* | *---NONE---* | *---*---NONE) ;;
1071*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1072esac
1073
1074
1075# Make sure we can run config.sub.
1076if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1077else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1078fi
1079
1080echo $ac_n "checking host system type""... $ac_c" 1>&6
715d1656 1081echo "configure:1082: checking host system type" >&5
c906108c
SS
1082
1083host_alias=$host
1084case "$host_alias" in
1085NONE)
1086 case $nonopt in
1087 NONE)
1088 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1089 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1090 fi ;;
1091 *) host_alias=$nonopt ;;
1092 esac ;;
1093esac
1094
1095host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1096host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1097host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1098host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1099echo "$ac_t""$host" 1>&6
1100
1101echo $ac_n "checking target system type""... $ac_c" 1>&6
715d1656 1102echo "configure:1103: checking target system type" >&5
c906108c
SS
1103
1104target_alias=$target
1105case "$target_alias" in
1106NONE)
1107 case $nonopt in
1108 NONE) target_alias=$host_alias ;;
1109 *) target_alias=$nonopt ;;
1110 esac ;;
1111esac
1112
1113target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1114target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1115target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1116target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117echo "$ac_t""$target" 1>&6
1118
1119echo $ac_n "checking build system type""... $ac_c" 1>&6
715d1656 1120echo "configure:1121: checking build system type" >&5
c906108c
SS
1121
1122build_alias=$build
1123case "$build_alias" in
1124NONE)
1125 case $nonopt in
1126 NONE) build_alias=$host_alias ;;
1127 *) build_alias=$nonopt ;;
1128 esac ;;
1129esac
1130
1131build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1132build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1133build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1134build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1135echo "$ac_t""$build" 1>&6
1136
1137test "$host_alias" != "$target_alias" &&
1138 test "$program_prefix$program_suffix$program_transform_name" = \
1139 NONENONEs,x,x, &&
1140 program_prefix=${target_alias}-
1141
1142
8bb2c122
MK
1143# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1144# doesn't support cross-compilation, but the one from Autoconf 2.5x
1145# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1146# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1147# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1148# 2.5x.
1149if test $host != $build; then
1150 ac_tool_prefix=${host_alias}-
1151else
1152 ac_tool_prefix=
1153fi
1154
1155# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1156set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1158echo "configure:1159: checking for $ac_word" >&5
8bb2c122
MK
1159if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161else
1162 if test -n "$RANLIB"; then
1163 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1164else
1165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1166 ac_dummy="$PATH"
1167 for ac_dir in $ac_dummy; do
1168 test -z "$ac_dir" && ac_dir=.
1169 if test -f $ac_dir/$ac_word; then
1170 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1171 break
1172 fi
1173 done
1174 IFS="$ac_save_ifs"
1175fi
1176fi
1177RANLIB="$ac_cv_prog_RANLIB"
1178if test -n "$RANLIB"; then
1179 echo "$ac_t""$RANLIB" 1>&6
1180else
1181 echo "$ac_t""no" 1>&6
1182fi
1183
1184
1185if test -z "$ac_cv_prog_RANLIB"; then
1186if test -n "$ac_tool_prefix"; then
1187 # Extract the first word of "ranlib", so it can be a program name with args.
1188set dummy ranlib; ac_word=$2
1189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1190echo "configure:1191: checking for $ac_word" >&5
8bb2c122
MK
1191if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193else
1194 if test -n "$RANLIB"; then
1195 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1196else
1197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200 test -z "$ac_dir" && ac_dir=.
1201 if test -f $ac_dir/$ac_word; then
1202 ac_cv_prog_RANLIB="ranlib"
1203 break
1204 fi
1205 done
1206 IFS="$ac_save_ifs"
1207 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1208fi
1209fi
1210RANLIB="$ac_cv_prog_RANLIB"
1211if test -n "$RANLIB"; then
1212 echo "$ac_t""$RANLIB" 1>&6
1213else
1214 echo "$ac_t""no" 1>&6
1215fi
1216
1217else
1218 RANLIB=":"
1219fi
1220fi
1221
1222
c906108c
SS
1223ALL_LINGUAS=
1224echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
715d1656 1225echo "configure:1226: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1226set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1227if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1229else
1230 cat > conftestmake <<\EOF
1231all:
1232 @echo 'ac_maketemp="${MAKE}"'
1233EOF
1234# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1235eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1236if test -n "$ac_maketemp"; then
1237 eval ac_cv_prog_make_${ac_make}_set=yes
1238else
1239 eval ac_cv_prog_make_${ac_make}_set=no
1240fi
1241rm -f conftestmake
1242fi
1243if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1244 echo "$ac_t""yes" 1>&6
1245 SET_MAKE=
1246else
1247 echo "$ac_t""no" 1>&6
1248 SET_MAKE="MAKE=${MAKE-make}"
1249fi
1250
1251# Extract the first word of "ranlib", so it can be a program name with args.
1252set dummy ranlib; ac_word=$2
1253echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1254echo "configure:1255: checking for $ac_word" >&5
c906108c
SS
1255if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257else
1258 if test -n "$RANLIB"; then
1259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1260else
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_RANLIB="ranlib"
1267 break
1268 fi
1269 done
1270 IFS="$ac_save_ifs"
1271 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1272fi
1273fi
1274RANLIB="$ac_cv_prog_RANLIB"
1275if test -n "$RANLIB"; then
1276 echo "$ac_t""$RANLIB" 1>&6
1277else
1278 echo "$ac_t""no" 1>&6
1279fi
1280
1281echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
715d1656 1282echo "configure:1283: checking for ANSI C header files" >&5
c906108c
SS
1283if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1285else
1286 cat > conftest.$ac_ext <<EOF
715d1656 1287#line 1288 "configure"
c906108c
SS
1288#include "confdefs.h"
1289#include <stdlib.h>
1290#include <stdarg.h>
1291#include <string.h>
1292#include <float.h>
1293EOF
1294ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 1295{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1296ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1297if test -z "$ac_err"; then
1298 rm -rf conftest*
1299 ac_cv_header_stdc=yes
1300else
1301 echo "$ac_err" >&5
1302 echo "configure: failed program was:" >&5
1303 cat conftest.$ac_ext >&5
1304 rm -rf conftest*
1305 ac_cv_header_stdc=no
1306fi
1307rm -f conftest*
1308
1309if test $ac_cv_header_stdc = yes; then
1310 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1311cat > conftest.$ac_ext <<EOF
715d1656 1312#line 1313 "configure"
c906108c
SS
1313#include "confdefs.h"
1314#include <string.h>
1315EOF
1316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1317 egrep "memchr" >/dev/null 2>&1; then
1318 :
1319else
1320 rm -rf conftest*
1321 ac_cv_header_stdc=no
1322fi
1323rm -f conftest*
1324
1325fi
1326
1327if test $ac_cv_header_stdc = yes; then
1328 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1329cat > conftest.$ac_ext <<EOF
715d1656 1330#line 1331 "configure"
c906108c
SS
1331#include "confdefs.h"
1332#include <stdlib.h>
1333EOF
1334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1335 egrep "free" >/dev/null 2>&1; then
1336 :
1337else
1338 rm -rf conftest*
1339 ac_cv_header_stdc=no
1340fi
1341rm -f conftest*
1342
1343fi
1344
1345if test $ac_cv_header_stdc = yes; then
1346 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1347if test "$cross_compiling" = yes; then
1348 :
1349else
1350 cat > conftest.$ac_ext <<EOF
715d1656 1351#line 1352 "configure"
c906108c
SS
1352#include "confdefs.h"
1353#include <ctype.h>
1354#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1355#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1356#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1357int main () { int i; for (i = 0; i < 256; i++)
1358if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1359exit (0); }
1360
1361EOF
715d1656 1362if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1363then
1364 :
1365else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1368 rm -fr conftest*
1369 ac_cv_header_stdc=no
1370fi
1371rm -fr conftest*
1372fi
1373
1374fi
1375fi
1376
1377echo "$ac_t""$ac_cv_header_stdc" 1>&6
1378if test $ac_cv_header_stdc = yes; then
1379 cat >> confdefs.h <<\EOF
1380#define STDC_HEADERS 1
1381EOF
1382
1383fi
1384
1385echo $ac_n "checking for working const""... $ac_c" 1>&6
715d1656 1386echo "configure:1387: checking for working const" >&5
c906108c
SS
1387if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389else
1390 cat > conftest.$ac_ext <<EOF
715d1656 1391#line 1392 "configure"
c906108c
SS
1392#include "confdefs.h"
1393
1394int main() {
1395
1396/* Ultrix mips cc rejects this. */
1397typedef int charset[2]; const charset x;
1398/* SunOS 4.1.1 cc rejects this. */
1399char const *const *ccp;
1400char **p;
1401/* NEC SVR4.0.2 mips cc rejects this. */
1402struct point {int x, y;};
1403static struct point const zero = {0,0};
1404/* AIX XL C 1.02.0.0 rejects this.
1405 It does not let you subtract one const X* pointer from another in an arm
1406 of an if-expression whose if-part is not a constant expression */
1407const char *g = "string";
1408ccp = &g + (g ? g-g : 0);
1409/* HPUX 7.0 cc rejects these. */
1410++ccp;
1411p = (char**) ccp;
1412ccp = (char const *const *) p;
1413{ /* SCO 3.2v4 cc rejects this. */
1414 char *t;
1415 char const *s = 0 ? (char *) 0 : (char const *) 0;
1416
1417 *t++ = 0;
1418}
1419{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1420 int x[] = {25, 17};
1421 const int *foo = &x[0];
1422 ++foo;
1423}
1424{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1425 typedef const int *iptr;
1426 iptr p = 0;
1427 ++p;
1428}
1429{ /* AIX XL C 1.02.0.0 rejects this saying
1430 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1431 struct s { int j; const int *ap[3]; };
1432 struct s *b; b->j = 5;
1433}
1434{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1435 const int foo = 10;
1436}
1437
1438; return 0; }
1439EOF
715d1656 1440if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1441 rm -rf conftest*
1442 ac_cv_c_const=yes
1443else
1444 echo "configure: failed program was:" >&5
1445 cat conftest.$ac_ext >&5
1446 rm -rf conftest*
1447 ac_cv_c_const=no
1448fi
1449rm -f conftest*
1450fi
1451
1452echo "$ac_t""$ac_cv_c_const" 1>&6
1453if test $ac_cv_c_const = no; then
1454 cat >> confdefs.h <<\EOF
1455#define const
1456EOF
1457
1458fi
1459
1460echo $ac_n "checking for inline""... $ac_c" 1>&6
715d1656 1461echo "configure:1462: checking for inline" >&5
c906108c
SS
1462if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464else
1465 ac_cv_c_inline=no
1466for ac_kw in inline __inline__ __inline; do
1467 cat > conftest.$ac_ext <<EOF
715d1656 1468#line 1469 "configure"
c906108c
SS
1469#include "confdefs.h"
1470
1471int main() {
1472} $ac_kw foo() {
1473; return 0; }
1474EOF
715d1656 1475if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1476 rm -rf conftest*
1477 ac_cv_c_inline=$ac_kw; break
1478else
1479 echo "configure: failed program was:" >&5
1480 cat conftest.$ac_ext >&5
1481fi
1482rm -f conftest*
1483done
1484
1485fi
1486
1487echo "$ac_t""$ac_cv_c_inline" 1>&6
1488case "$ac_cv_c_inline" in
1489 inline | yes) ;;
1490 no) cat >> confdefs.h <<\EOF
1491#define inline
1492EOF
1493 ;;
1494 *) cat >> confdefs.h <<EOF
1495#define inline $ac_cv_c_inline
1496EOF
1497 ;;
1498esac
1499
1500echo $ac_n "checking for off_t""... $ac_c" 1>&6
715d1656 1501echo "configure:1502: checking for off_t" >&5
c906108c
SS
1502if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1503 echo $ac_n "(cached) $ac_c" 1>&6
1504else
1505 cat > conftest.$ac_ext <<EOF
715d1656 1506#line 1507 "configure"
c906108c
SS
1507#include "confdefs.h"
1508#include <sys/types.h>
1509#if STDC_HEADERS
1510#include <stdlib.h>
1511#include <stddef.h>
1512#endif
1513EOF
1514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1515 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1516 rm -rf conftest*
1517 ac_cv_type_off_t=yes
1518else
1519 rm -rf conftest*
1520 ac_cv_type_off_t=no
1521fi
1522rm -f conftest*
1523
1524fi
1525echo "$ac_t""$ac_cv_type_off_t" 1>&6
1526if test $ac_cv_type_off_t = no; then
1527 cat >> confdefs.h <<\EOF
1528#define off_t long
1529EOF
1530
1531fi
1532
1533echo $ac_n "checking for size_t""... $ac_c" 1>&6
715d1656 1534echo "configure:1535: checking for size_t" >&5
c906108c
SS
1535if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
1537else
1538 cat > conftest.$ac_ext <<EOF
715d1656 1539#line 1540 "configure"
c906108c
SS
1540#include "confdefs.h"
1541#include <sys/types.h>
1542#if STDC_HEADERS
1543#include <stdlib.h>
1544#include <stddef.h>
1545#endif
1546EOF
1547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1548 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1549 rm -rf conftest*
1550 ac_cv_type_size_t=yes
1551else
1552 rm -rf conftest*
1553 ac_cv_type_size_t=no
1554fi
1555rm -f conftest*
1556
1557fi
1558echo "$ac_t""$ac_cv_type_size_t" 1>&6
1559if test $ac_cv_type_size_t = no; then
1560 cat >> confdefs.h <<\EOF
1561#define size_t unsigned
1562EOF
1563
1564fi
1565
1566# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1567# for constant arguments. Useless!
1568echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
715d1656 1569echo "configure:1570: checking for working alloca.h" >&5
c906108c
SS
1570if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573 cat > conftest.$ac_ext <<EOF
715d1656 1574#line 1575 "configure"
c906108c
SS
1575#include "confdefs.h"
1576#include <alloca.h>
1577int main() {
1578char *p = alloca(2 * sizeof(int));
1579; return 0; }
1580EOF
715d1656 1581if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1582 rm -rf conftest*
1583 ac_cv_header_alloca_h=yes
1584else
1585 echo "configure: failed program was:" >&5
1586 cat conftest.$ac_ext >&5
1587 rm -rf conftest*
1588 ac_cv_header_alloca_h=no
1589fi
1590rm -f conftest*
1591fi
1592
1593echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1594if test $ac_cv_header_alloca_h = yes; then
1595 cat >> confdefs.h <<\EOF
1596#define HAVE_ALLOCA_H 1
1597EOF
1598
1599fi
1600
1601echo $ac_n "checking for alloca""... $ac_c" 1>&6
715d1656 1602echo "configure:1603: checking for alloca" >&5
c906108c
SS
1603if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605else
1606 cat > conftest.$ac_ext <<EOF
715d1656 1607#line 1608 "configure"
c906108c
SS
1608#include "confdefs.h"
1609
1610#ifdef __GNUC__
1611# define alloca __builtin_alloca
1612#else
1613# ifdef _MSC_VER
1614# include <malloc.h>
1615# define alloca _alloca
1616# else
1617# if HAVE_ALLOCA_H
1618# include <alloca.h>
1619# else
1620# ifdef _AIX
1621 #pragma alloca
1622# else
1623# ifndef alloca /* predefined by HP cc +Olibcalls */
1624char *alloca ();
1625# endif
1626# endif
1627# endif
1628# endif
1629#endif
1630
1631int main() {
1632char *p = (char *) alloca(1);
1633; return 0; }
1634EOF
715d1656 1635if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1636 rm -rf conftest*
1637 ac_cv_func_alloca_works=yes
1638else
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
1641 rm -rf conftest*
1642 ac_cv_func_alloca_works=no
1643fi
1644rm -f conftest*
1645fi
1646
1647echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1648if test $ac_cv_func_alloca_works = yes; then
1649 cat >> confdefs.h <<\EOF
1650#define HAVE_ALLOCA 1
1651EOF
1652
1653fi
1654
1655if test $ac_cv_func_alloca_works = no; then
1656 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1657 # that cause trouble. Some versions do not even contain alloca or
1658 # contain a buggy version. If you still want to use their alloca,
1659 # use ar to extract alloca.o from them instead of compiling alloca.c.
1660 ALLOCA=alloca.${ac_objext}
1661 cat >> confdefs.h <<\EOF
1662#define C_ALLOCA 1
1663EOF
1664
1665
1666echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
715d1656 1667echo "configure:1668: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1668if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
1670else
1671 cat > conftest.$ac_ext <<EOF
715d1656 1672#line 1673 "configure"
c906108c
SS
1673#include "confdefs.h"
1674#if defined(CRAY) && ! defined(CRAY2)
1675webecray
1676#else
1677wenotbecray
1678#endif
1679
1680EOF
1681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1682 egrep "webecray" >/dev/null 2>&1; then
1683 rm -rf conftest*
1684 ac_cv_os_cray=yes
1685else
1686 rm -rf conftest*
1687 ac_cv_os_cray=no
1688fi
1689rm -f conftest*
1690
1691fi
1692
1693echo "$ac_t""$ac_cv_os_cray" 1>&6
1694if test $ac_cv_os_cray = yes; then
1695for ac_func in _getb67 GETB67 getb67; do
1696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 1697echo "configure:1698: checking for $ac_func" >&5
c906108c
SS
1698if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700else
1701 cat > conftest.$ac_ext <<EOF
715d1656 1702#line 1703 "configure"
c906108c
SS
1703#include "confdefs.h"
1704/* System header to define __stub macros and hopefully few prototypes,
1705 which can conflict with char $ac_func(); below. */
1706#include <assert.h>
1707/* Override any gcc2 internal prototype to avoid an error. */
1708/* We use char because int might match the return type of a gcc2
1709 builtin and then its argument prototype would still apply. */
1710char $ac_func();
1711
1712int main() {
1713
1714/* The GNU C library defines this for functions which it implements
1715 to always fail with ENOSYS. Some functions are actually named
1716 something starting with __ and the normal name is an alias. */
1717#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1718choke me
1719#else
1720$ac_func();
1721#endif
1722
1723; return 0; }
1724EOF
715d1656 1725if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1726 rm -rf conftest*
1727 eval "ac_cv_func_$ac_func=yes"
1728else
1729 echo "configure: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1731 rm -rf conftest*
1732 eval "ac_cv_func_$ac_func=no"
1733fi
1734rm -f conftest*
1735fi
1736
1737if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1738 echo "$ac_t""yes" 1>&6
1739 cat >> confdefs.h <<EOF
1740#define CRAY_STACKSEG_END $ac_func
1741EOF
1742
1743 break
1744else
1745 echo "$ac_t""no" 1>&6
1746fi
1747
1748done
1749fi
1750
1751echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
715d1656 1752echo "configure:1753: checking stack direction for C alloca" >&5
c906108c
SS
1753if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1755else
1756 if test "$cross_compiling" = yes; then
1757 ac_cv_c_stack_direction=0
1758else
1759 cat > conftest.$ac_ext <<EOF
715d1656 1760#line 1761 "configure"
c906108c
SS
1761#include "confdefs.h"
1762find_stack_direction ()
1763{
1764 static char *addr = 0;
1765 auto char dummy;
1766 if (addr == 0)
1767 {
1768 addr = &dummy;
1769 return find_stack_direction ();
1770 }
1771 else
1772 return (&dummy > addr) ? 1 : -1;
1773}
1774main ()
1775{
1776 exit (find_stack_direction() < 0);
1777}
1778EOF
715d1656 1779if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1780then
1781 ac_cv_c_stack_direction=1
1782else
1783 echo "configure: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1785 rm -fr conftest*
1786 ac_cv_c_stack_direction=-1
1787fi
1788rm -fr conftest*
1789fi
1790
1791fi
1792
1793echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1794cat >> confdefs.h <<EOF
1795#define STACK_DIRECTION $ac_cv_c_stack_direction
1796EOF
1797
1798fi
1799
715d1656 1800for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
c906108c
SS
1801do
1802ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1803echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 1804echo "configure:1805: checking for $ac_hdr" >&5
c906108c
SS
1805if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807else
1808 cat > conftest.$ac_ext <<EOF
715d1656 1809#line 1810 "configure"
c906108c
SS
1810#include "confdefs.h"
1811#include <$ac_hdr>
1812EOF
1813ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 1814{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1815ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1816if test -z "$ac_err"; then
1817 rm -rf conftest*
1818 eval "ac_cv_header_$ac_safe=yes"
1819else
1820 echo "$ac_err" >&5
1821 echo "configure: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1823 rm -rf conftest*
1824 eval "ac_cv_header_$ac_safe=no"
1825fi
1826rm -f conftest*
1827fi
1828if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1829 echo "$ac_t""yes" 1>&6
1830 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1831 cat >> confdefs.h <<EOF
1832#define $ac_tr_hdr 1
1833EOF
1834
1835else
1836 echo "$ac_t""no" 1>&6
1837fi
1838done
1839
1840for ac_func in getpagesize
1841do
1842echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 1843echo "configure:1844: checking for $ac_func" >&5
c906108c
SS
1844if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846else
1847 cat > conftest.$ac_ext <<EOF
715d1656 1848#line 1849 "configure"
c906108c
SS
1849#include "confdefs.h"
1850/* System header to define __stub macros and hopefully few prototypes,
1851 which can conflict with char $ac_func(); below. */
1852#include <assert.h>
1853/* Override any gcc2 internal prototype to avoid an error. */
1854/* We use char because int might match the return type of a gcc2
1855 builtin and then its argument prototype would still apply. */
1856char $ac_func();
1857
1858int main() {
1859
1860/* The GNU C library defines this for functions which it implements
1861 to always fail with ENOSYS. Some functions are actually named
1862 something starting with __ and the normal name is an alias. */
1863#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1864choke me
1865#else
1866$ac_func();
1867#endif
1868
1869; return 0; }
1870EOF
715d1656 1871if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1872 rm -rf conftest*
1873 eval "ac_cv_func_$ac_func=yes"
1874else
1875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 rm -rf conftest*
1878 eval "ac_cv_func_$ac_func=no"
1879fi
1880rm -f conftest*
1881fi
1882
1883if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1884 echo "$ac_t""yes" 1>&6
1885 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1886 cat >> confdefs.h <<EOF
1887#define $ac_tr_func 1
1888EOF
1889
1890else
1891 echo "$ac_t""no" 1>&6
1892fi
1893done
1894
1895echo $ac_n "checking for working mmap""... $ac_c" 1>&6
715d1656 1896echo "configure:1897: checking for working mmap" >&5
c906108c
SS
1897if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1899else
1900 if test "$cross_compiling" = yes; then
1901 ac_cv_func_mmap_fixed_mapped=no
1902else
1903 cat > conftest.$ac_ext <<EOF
715d1656 1904#line 1905 "configure"
c906108c
SS
1905#include "confdefs.h"
1906
1907/* Thanks to Mike Haertel and Jim Avera for this test.
1908 Here is a matrix of mmap possibilities:
1909 mmap private not fixed
1910 mmap private fixed at somewhere currently unmapped
1911 mmap private fixed at somewhere already mapped
1912 mmap shared not fixed
1913 mmap shared fixed at somewhere currently unmapped
1914 mmap shared fixed at somewhere already mapped
1915 For private mappings, we should verify that changes cannot be read()
1916 back from the file, nor mmap's back from the file at a different
1917 address. (There have been systems where private was not correctly
1918 implemented like the infamous i386 svr4.0, and systems where the
1919 VM page cache was not coherent with the filesystem buffer cache
1920 like early versions of FreeBSD and possibly contemporary NetBSD.)
1921 For shared mappings, we should conversely verify that changes get
1922 propogated back to all the places they're supposed to be.
1923
1924 Grep wants private fixed already mapped.
1925 The main things grep needs to know about mmap are:
1926 * does it exist and is it safe to write into the mmap'd area
1927 * how to use it (BSD variants) */
1928#include <sys/types.h>
1929#include <fcntl.h>
1930#include <sys/mman.h>
1931
715d1656
AO
1932#if HAVE_SYS_TYPES_H
1933# include <sys/types.h>
1934#endif
1935
1936#if HAVE_STDLIB_H
1937# include <stdlib.h>
1938#endif
1939
1940#if HAVE_SYS_STAT_H
1941# include <sys/stat.h>
1942#endif
1943
1944#if HAVE_UNISTD_H
1945# include <unistd.h>
1946#endif
1947
c906108c
SS
1948/* This mess was copied from the GNU getpagesize.h. */
1949#ifndef HAVE_GETPAGESIZE
c906108c
SS
1950
1951/* Assume that all systems that can run configure have sys/param.h. */
1952# ifndef HAVE_SYS_PARAM_H
1953# define HAVE_SYS_PARAM_H 1
1954# endif
1955
1956# ifdef _SC_PAGESIZE
1957# define getpagesize() sysconf(_SC_PAGESIZE)
1958# else /* no _SC_PAGESIZE */
1959# ifdef HAVE_SYS_PARAM_H
1960# include <sys/param.h>
1961# ifdef EXEC_PAGESIZE
1962# define getpagesize() EXEC_PAGESIZE
1963# else /* no EXEC_PAGESIZE */
1964# ifdef NBPG
1965# define getpagesize() NBPG * CLSIZE
1966# ifndef CLSIZE
1967# define CLSIZE 1
1968# endif /* no CLSIZE */
1969# else /* no NBPG */
1970# ifdef NBPC
1971# define getpagesize() NBPC
1972# else /* no NBPC */
1973# ifdef PAGESIZE
1974# define getpagesize() PAGESIZE
1975# endif /* PAGESIZE */
1976# endif /* no NBPC */
1977# endif /* no NBPG */
1978# endif /* no EXEC_PAGESIZE */
1979# else /* no HAVE_SYS_PARAM_H */
1980# define getpagesize() 8192 /* punt totally */
1981# endif /* no HAVE_SYS_PARAM_H */
1982# endif /* no _SC_PAGESIZE */
1983
1984#endif /* no HAVE_GETPAGESIZE */
1985
1986#ifdef __cplusplus
1987extern "C" { void *malloc(unsigned); }
1988#else
1989char *malloc();
1990#endif
1991
1992int
1993main()
1994{
1995 char *data, *data2, *data3;
1996 int i, pagesize;
1997 int fd;
1998
1999 pagesize = getpagesize();
2000
2001 /*
2002 * First, make a file with some known garbage in it.
2003 */
2004 data = malloc(pagesize);
2005 if (!data)
2006 exit(1);
2007 for (i = 0; i < pagesize; ++i)
2008 *(data + i) = rand();
2009 umask(0);
2010 fd = creat("conftestmmap", 0600);
2011 if (fd < 0)
2012 exit(1);
2013 if (write(fd, data, pagesize) != pagesize)
2014 exit(1);
2015 close(fd);
2016
2017 /*
2018 * Next, try to mmap the file at a fixed address which
2019 * already has something else allocated at it. If we can,
2020 * also make sure that we see the same garbage.
2021 */
2022 fd = open("conftestmmap", O_RDWR);
2023 if (fd < 0)
2024 exit(1);
2025 data2 = malloc(2 * pagesize);
2026 if (!data2)
2027 exit(1);
2028 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2029 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2030 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2031 exit(1);
2032 for (i = 0; i < pagesize; ++i)
2033 if (*(data + i) != *(data2 + i))
2034 exit(1);
2035
2036 /*
2037 * Finally, make sure that changes to the mapped area
2038 * do not percolate back to the file as seen by read().
2039 * (This is a bug on some variants of i386 svr4.0.)
2040 */
2041 for (i = 0; i < pagesize; ++i)
2042 *(data2 + i) = *(data2 + i) + 1;
2043 data3 = malloc(pagesize);
2044 if (!data3)
2045 exit(1);
2046 if (read(fd, data3, pagesize) != pagesize)
2047 exit(1);
2048 for (i = 0; i < pagesize; ++i)
2049 if (*(data + i) != *(data3 + i))
2050 exit(1);
2051 close(fd);
2052 unlink("conftestmmap");
2053 exit(0);
2054}
2055
2056EOF
715d1656 2057if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2058then
2059 ac_cv_func_mmap_fixed_mapped=yes
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -fr conftest*
2064 ac_cv_func_mmap_fixed_mapped=no
2065fi
2066rm -fr conftest*
2067fi
2068
2069fi
2070
2071echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2072if test $ac_cv_func_mmap_fixed_mapped = yes; then
2073 cat >> confdefs.h <<\EOF
2074#define HAVE_MMAP 1
2075EOF
2076
2077fi
2078
2079
2080 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2081unistd.h values.h sys/param.h
2082do
2083ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2084echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 2085echo "configure:2086: checking for $ac_hdr" >&5
c906108c
SS
2086if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
2088else
2089 cat > conftest.$ac_ext <<EOF
715d1656 2090#line 2091 "configure"
c906108c
SS
2091#include "confdefs.h"
2092#include <$ac_hdr>
2093EOF
2094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 2095{ (eval echo configure:2096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2097if test -z "$ac_err"; then
2098 rm -rf conftest*
2099 eval "ac_cv_header_$ac_safe=yes"
2100else
2101 echo "$ac_err" >&5
2102 echo "configure: failed program was:" >&5
2103 cat conftest.$ac_ext >&5
2104 rm -rf conftest*
2105 eval "ac_cv_header_$ac_safe=no"
2106fi
2107rm -f conftest*
2108fi
2109if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2110 echo "$ac_t""yes" 1>&6
2111 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2112 cat >> confdefs.h <<EOF
2113#define $ac_tr_hdr 1
2114EOF
2115
2116else
2117 echo "$ac_t""no" 1>&6
2118fi
2119done
2120
2121 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2122__argz_count __argz_stringify __argz_next
2123do
2124echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 2125echo "configure:2126: checking for $ac_func" >&5
c906108c
SS
2126if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2127 echo $ac_n "(cached) $ac_c" 1>&6
2128else
2129 cat > conftest.$ac_ext <<EOF
715d1656 2130#line 2131 "configure"
c906108c
SS
2131#include "confdefs.h"
2132/* System header to define __stub macros and hopefully few prototypes,
2133 which can conflict with char $ac_func(); below. */
2134#include <assert.h>
2135/* Override any gcc2 internal prototype to avoid an error. */
2136/* We use char because int might match the return type of a gcc2
2137 builtin and then its argument prototype would still apply. */
2138char $ac_func();
2139
2140int main() {
2141
2142/* The GNU C library defines this for functions which it implements
2143 to always fail with ENOSYS. Some functions are actually named
2144 something starting with __ and the normal name is an alias. */
2145#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2146choke me
2147#else
2148$ac_func();
2149#endif
2150
2151; return 0; }
2152EOF
715d1656 2153if { (eval echo configure:2154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2154 rm -rf conftest*
2155 eval "ac_cv_func_$ac_func=yes"
2156else
2157 echo "configure: failed program was:" >&5
2158 cat conftest.$ac_ext >&5
2159 rm -rf conftest*
2160 eval "ac_cv_func_$ac_func=no"
2161fi
2162rm -f conftest*
2163fi
2164
2165if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2166 echo "$ac_t""yes" 1>&6
2167 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2168 cat >> confdefs.h <<EOF
2169#define $ac_tr_func 1
2170EOF
2171
2172else
2173 echo "$ac_t""no" 1>&6
2174fi
2175done
2176
2177
2178 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2179 for ac_func in stpcpy
2180do
2181echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 2182echo "configure:2183: checking for $ac_func" >&5
c906108c
SS
2183if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 cat > conftest.$ac_ext <<EOF
715d1656 2187#line 2188 "configure"
c906108c
SS
2188#include "confdefs.h"
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $ac_func(); below. */
2191#include <assert.h>
2192/* Override any gcc2 internal prototype to avoid an error. */
2193/* We use char because int might match the return type of a gcc2
2194 builtin and then its argument prototype would still apply. */
2195char $ac_func();
2196
2197int main() {
2198
2199/* The GNU C library defines this for functions which it implements
2200 to always fail with ENOSYS. Some functions are actually named
2201 something starting with __ and the normal name is an alias. */
2202#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2203choke me
2204#else
2205$ac_func();
2206#endif
2207
2208; return 0; }
2209EOF
715d1656 2210if { (eval echo configure:2211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2211 rm -rf conftest*
2212 eval "ac_cv_func_$ac_func=yes"
2213else
2214 echo "configure: failed program was:" >&5
2215 cat conftest.$ac_ext >&5
2216 rm -rf conftest*
2217 eval "ac_cv_func_$ac_func=no"
2218fi
2219rm -f conftest*
2220fi
2221
2222if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2223 echo "$ac_t""yes" 1>&6
2224 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2225 cat >> confdefs.h <<EOF
2226#define $ac_tr_func 1
2227EOF
2228
2229else
2230 echo "$ac_t""no" 1>&6
2231fi
2232done
2233
2234 fi
2235 if test "${ac_cv_func_stpcpy}" = "yes"; then
2236 cat >> confdefs.h <<\EOF
2237#define HAVE_STPCPY 1
2238EOF
2239
2240 fi
2241
2242 if test $ac_cv_header_locale_h = yes; then
2243 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
715d1656 2244echo "configure:2245: checking for LC_MESSAGES" >&5
c906108c
SS
2245if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2246 echo $ac_n "(cached) $ac_c" 1>&6
2247else
2248 cat > conftest.$ac_ext <<EOF
715d1656 2249#line 2250 "configure"
c906108c
SS
2250#include "confdefs.h"
2251#include <locale.h>
2252int main() {
2253return LC_MESSAGES
2254; return 0; }
2255EOF
715d1656 2256if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2257 rm -rf conftest*
2258 am_cv_val_LC_MESSAGES=yes
2259else
2260 echo "configure: failed program was:" >&5
2261 cat conftest.$ac_ext >&5
2262 rm -rf conftest*
2263 am_cv_val_LC_MESSAGES=no
2264fi
2265rm -f conftest*
2266fi
2267
2268echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2269 if test $am_cv_val_LC_MESSAGES = yes; then
2270 cat >> confdefs.h <<\EOF
2271#define HAVE_LC_MESSAGES 1
2272EOF
2273
2274 fi
2275 fi
2276 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
715d1656 2277echo "configure:2278: checking whether NLS is requested" >&5
c906108c
SS
2278 # Check whether --enable-nls or --disable-nls was given.
2279if test "${enable_nls+set}" = set; then
2280 enableval="$enable_nls"
2281 USE_NLS=$enableval
2282else
2283 USE_NLS=yes
2284fi
2285
2286 echo "$ac_t""$USE_NLS" 1>&6
2287
2288
2289 USE_INCLUDED_LIBINTL=no
2290
2291 if test "$USE_NLS" = "yes"; then
2292 cat >> confdefs.h <<\EOF
2293#define ENABLE_NLS 1
2294EOF
2295
2296 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
715d1656 2297echo "configure:2298: checking whether included gettext is requested" >&5
c906108c
SS
2298 # Check whether --with-included-gettext or --without-included-gettext was given.
2299if test "${with_included_gettext+set}" = set; then
2300 withval="$with_included_gettext"
2301 nls_cv_force_use_gnu_gettext=$withval
2302else
2303 nls_cv_force_use_gnu_gettext=no
2304fi
2305
2306 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2307
2308 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2309 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2310 nls_cv_header_intl=
2311 nls_cv_header_libgt=
2312 CATOBJEXT=NONE
2313
2314 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2315echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
715d1656 2316echo "configure:2317: checking for libintl.h" >&5
c906108c
SS
2317if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 cat > conftest.$ac_ext <<EOF
715d1656 2321#line 2322 "configure"
c906108c
SS
2322#include "confdefs.h"
2323#include <libintl.h>
2324EOF
2325ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 2326{ (eval echo configure:2327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2327ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2328if test -z "$ac_err"; then
2329 rm -rf conftest*
2330 eval "ac_cv_header_$ac_safe=yes"
2331else
2332 echo "$ac_err" >&5
2333 echo "configure: failed program was:" >&5
2334 cat conftest.$ac_ext >&5
2335 rm -rf conftest*
2336 eval "ac_cv_header_$ac_safe=no"
2337fi
2338rm -f conftest*
2339fi
2340if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2341 echo "$ac_t""yes" 1>&6
2342 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
715d1656 2343echo "configure:2344: checking for gettext in libc" >&5
c906108c
SS
2344if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2346else
2347 cat > conftest.$ac_ext <<EOF
715d1656 2348#line 2349 "configure"
c906108c
SS
2349#include "confdefs.h"
2350#include <libintl.h>
2351int main() {
2352return (int) gettext ("")
2353; return 0; }
2354EOF
715d1656 2355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2356 rm -rf conftest*
2357 gt_cv_func_gettext_libc=yes
2358else
2359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -rf conftest*
2362 gt_cv_func_gettext_libc=no
2363fi
2364rm -f conftest*
2365fi
2366
2367echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2368
2369 if test "$gt_cv_func_gettext_libc" != "yes"; then
2370 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
715d1656 2371echo "configure:2372: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2372ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2373if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2374 echo $ac_n "(cached) $ac_c" 1>&6
2375else
2376 ac_save_LIBS="$LIBS"
2377LIBS="-lintl $LIBS"
2378cat > conftest.$ac_ext <<EOF
715d1656 2379#line 2380 "configure"
c906108c
SS
2380#include "confdefs.h"
2381/* Override any gcc2 internal prototype to avoid an error. */
2382/* We use char because int might match the return type of a gcc2
2383 builtin and then its argument prototype would still apply. */
2384char bindtextdomain();
2385
2386int main() {
2387bindtextdomain()
2388; return 0; }
2389EOF
715d1656 2390if { (eval echo configure:2391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2391 rm -rf conftest*
2392 eval "ac_cv_lib_$ac_lib_var=yes"
2393else
2394 echo "configure: failed program was:" >&5
2395 cat conftest.$ac_ext >&5
2396 rm -rf conftest*
2397 eval "ac_cv_lib_$ac_lib_var=no"
2398fi
2399rm -f conftest*
2400LIBS="$ac_save_LIBS"
2401
2402fi
2403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2404 echo "$ac_t""yes" 1>&6
2405 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
715d1656 2406echo "configure:2407: checking for gettext in libintl" >&5
c906108c
SS
2407if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2408 echo $ac_n "(cached) $ac_c" 1>&6
2409else
2410 cat > conftest.$ac_ext <<EOF
715d1656 2411#line 2412 "configure"
c906108c
SS
2412#include "confdefs.h"
2413
2414int main() {
2415return (int) gettext ("")
2416; return 0; }
2417EOF
715d1656 2418if { (eval echo configure:2419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2419 rm -rf conftest*
2420 gt_cv_func_gettext_libintl=yes
2421else
2422 echo "configure: failed program was:" >&5
2423 cat conftest.$ac_ext >&5
2424 rm -rf conftest*
2425 gt_cv_func_gettext_libintl=no
2426fi
2427rm -f conftest*
2428fi
2429
2430echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2431else
2432 echo "$ac_t""no" 1>&6
2433fi
2434
2435 fi
2436
2437 if test "$gt_cv_func_gettext_libc" = "yes" \
2438 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2439 cat >> confdefs.h <<\EOF
2440#define HAVE_GETTEXT 1
2441EOF
2442
2443 # Extract the first word of "msgfmt", so it can be a program name with args.
2444set dummy msgfmt; ac_word=$2
2445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2446echo "configure:2447: checking for $ac_word" >&5
c906108c
SS
2447if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2448 echo $ac_n "(cached) $ac_c" 1>&6
2449else
2450 case "$MSGFMT" in
2451 /*)
2452 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2453 ;;
2454 *)
2455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2456 for ac_dir in $PATH; do
2457 test -z "$ac_dir" && ac_dir=.
2458 if test -f $ac_dir/$ac_word; then
2459 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2460 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2461 break
2462 fi
2463 fi
2464 done
2465 IFS="$ac_save_ifs"
2466 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2467 ;;
2468esac
2469fi
2470MSGFMT="$ac_cv_path_MSGFMT"
2471if test -n "$MSGFMT"; then
2472 echo "$ac_t""$MSGFMT" 1>&6
2473else
2474 echo "$ac_t""no" 1>&6
2475fi
2476 if test "$MSGFMT" != "no"; then
2477 for ac_func in dcgettext
2478do
2479echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 2480echo "configure:2481: checking for $ac_func" >&5
c906108c
SS
2481if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2482 echo $ac_n "(cached) $ac_c" 1>&6
2483else
2484 cat > conftest.$ac_ext <<EOF
715d1656 2485#line 2486 "configure"
c906108c
SS
2486#include "confdefs.h"
2487/* System header to define __stub macros and hopefully few prototypes,
2488 which can conflict with char $ac_func(); below. */
2489#include <assert.h>
2490/* Override any gcc2 internal prototype to avoid an error. */
2491/* We use char because int might match the return type of a gcc2
2492 builtin and then its argument prototype would still apply. */
2493char $ac_func();
2494
2495int main() {
2496
2497/* The GNU C library defines this for functions which it implements
2498 to always fail with ENOSYS. Some functions are actually named
2499 something starting with __ and the normal name is an alias. */
2500#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2501choke me
2502#else
2503$ac_func();
2504#endif
2505
2506; return 0; }
2507EOF
715d1656 2508if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2509 rm -rf conftest*
2510 eval "ac_cv_func_$ac_func=yes"
2511else
2512 echo "configure: failed program was:" >&5
2513 cat conftest.$ac_ext >&5
2514 rm -rf conftest*
2515 eval "ac_cv_func_$ac_func=no"
2516fi
2517rm -f conftest*
2518fi
2519
2520if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2521 echo "$ac_t""yes" 1>&6
2522 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2523 cat >> confdefs.h <<EOF
2524#define $ac_tr_func 1
2525EOF
2526
2527else
2528 echo "$ac_t""no" 1>&6
2529fi
2530done
2531
2532 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2533set dummy gmsgfmt; ac_word=$2
2534echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2535echo "configure:2536: checking for $ac_word" >&5
c906108c
SS
2536if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
2538else
2539 case "$GMSGFMT" in
2540 /*)
2541 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2542 ;;
2543 ?:/*)
2544 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2545 ;;
2546 *)
2547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2548 ac_dummy="$PATH"
2549 for ac_dir in $ac_dummy; do
2550 test -z "$ac_dir" && ac_dir=.
2551 if test -f $ac_dir/$ac_word; then
2552 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2553 break
2554 fi
2555 done
2556 IFS="$ac_save_ifs"
2557 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2558 ;;
2559esac
2560fi
2561GMSGFMT="$ac_cv_path_GMSGFMT"
2562if test -n "$GMSGFMT"; then
2563 echo "$ac_t""$GMSGFMT" 1>&6
2564else
2565 echo "$ac_t""no" 1>&6
2566fi
2567
2568 # Extract the first word of "xgettext", so it can be a program name with args.
2569set dummy xgettext; ac_word=$2
2570echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2571echo "configure:2572: checking for $ac_word" >&5
c906108c
SS
2572if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2573 echo $ac_n "(cached) $ac_c" 1>&6
2574else
2575 case "$XGETTEXT" in
2576 /*)
2577 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2578 ;;
2579 *)
2580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2581 for ac_dir in $PATH; do
2582 test -z "$ac_dir" && ac_dir=.
2583 if test -f $ac_dir/$ac_word; then
2584 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2585 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2586 break
2587 fi
2588 fi
2589 done
2590 IFS="$ac_save_ifs"
2591 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2592 ;;
2593esac
2594fi
2595XGETTEXT="$ac_cv_path_XGETTEXT"
2596if test -n "$XGETTEXT"; then
2597 echo "$ac_t""$XGETTEXT" 1>&6
2598else
2599 echo "$ac_t""no" 1>&6
2600fi
2601
2602 cat > conftest.$ac_ext <<EOF
715d1656 2603#line 2604 "configure"
c906108c
SS
2604#include "confdefs.h"
2605
2606int main() {
2607extern int _nl_msg_cat_cntr;
2608 return _nl_msg_cat_cntr
2609; return 0; }
2610EOF
715d1656 2611if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2612 rm -rf conftest*
2613 CATOBJEXT=.gmo
2614 DATADIRNAME=share
2615else
2616 echo "configure: failed program was:" >&5
2617 cat conftest.$ac_ext >&5
2618 rm -rf conftest*
2619 CATOBJEXT=.mo
2620 DATADIRNAME=lib
2621fi
2622rm -f conftest*
2623 INSTOBJEXT=.mo
2624 fi
2625 fi
2626
2627else
2628 echo "$ac_t""no" 1>&6
2629fi
2630
2631
2632
2633 if test "$CATOBJEXT" = "NONE"; then
2634 nls_cv_use_gnu_gettext=yes
2635 fi
2636 fi
2637
2638 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2639 INTLOBJS="\$(GETTOBJS)"
2640 # Extract the first word of "msgfmt", so it can be a program name with args.
2641set dummy msgfmt; ac_word=$2
2642echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2643echo "configure:2644: checking for $ac_word" >&5
c906108c
SS
2644if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2645 echo $ac_n "(cached) $ac_c" 1>&6
2646else
2647 case "$MSGFMT" in
2648 /*)
2649 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2650 ;;
2651 *)
2652 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2653 for ac_dir in $PATH; do
2654 test -z "$ac_dir" && ac_dir=.
2655 if test -f $ac_dir/$ac_word; then
2656 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2657 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2658 break
2659 fi
2660 fi
2661 done
2662 IFS="$ac_save_ifs"
2663 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2664 ;;
2665esac
2666fi
2667MSGFMT="$ac_cv_path_MSGFMT"
2668if test -n "$MSGFMT"; then
2669 echo "$ac_t""$MSGFMT" 1>&6
2670else
2671 echo "$ac_t""no" 1>&6
2672fi
2673
2674 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2675set dummy gmsgfmt; ac_word=$2
2676echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2677echo "configure:2678: checking for $ac_word" >&5
c906108c
SS
2678if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2679 echo $ac_n "(cached) $ac_c" 1>&6
2680else
2681 case "$GMSGFMT" in
2682 /*)
2683 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2684 ;;
2685 ?:/*)
2686 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2687 ;;
2688 *)
2689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2690 ac_dummy="$PATH"
2691 for ac_dir in $ac_dummy; do
2692 test -z "$ac_dir" && ac_dir=.
2693 if test -f $ac_dir/$ac_word; then
2694 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2695 break
2696 fi
2697 done
2698 IFS="$ac_save_ifs"
2699 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2700 ;;
2701esac
2702fi
2703GMSGFMT="$ac_cv_path_GMSGFMT"
2704if test -n "$GMSGFMT"; then
2705 echo "$ac_t""$GMSGFMT" 1>&6
2706else
2707 echo "$ac_t""no" 1>&6
2708fi
2709
2710 # Extract the first word of "xgettext", so it can be a program name with args.
2711set dummy xgettext; ac_word=$2
2712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 2713echo "configure:2714: checking for $ac_word" >&5
c906108c
SS
2714if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716else
2717 case "$XGETTEXT" in
2718 /*)
2719 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2720 ;;
2721 *)
2722 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2723 for ac_dir in $PATH; do
2724 test -z "$ac_dir" && ac_dir=.
2725 if test -f $ac_dir/$ac_word; then
2726 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2727 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2728 break
2729 fi
2730 fi
2731 done
2732 IFS="$ac_save_ifs"
2733 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2734 ;;
2735esac
2736fi
2737XGETTEXT="$ac_cv_path_XGETTEXT"
2738if test -n "$XGETTEXT"; then
2739 echo "$ac_t""$XGETTEXT" 1>&6
2740else
2741 echo "$ac_t""no" 1>&6
2742fi
2743
2744
2745 USE_INCLUDED_LIBINTL=yes
2746 CATOBJEXT=.gmo
2747 INSTOBJEXT=.mo
2748 DATADIRNAME=share
2749 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2750 INTLLIBS=$INTLDEPS
2751 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2752 nls_cv_header_intl=libintl.h
2753 nls_cv_header_libgt=libgettext.h
2754 fi
2755
2756 if test "$XGETTEXT" != ":"; then
2757 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2758 : ;
2759 else
2760 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2761 XGETTEXT=":"
2762 fi
2763 fi
2764
2765 # We need to process the po/ directory.
2766 POSUB=po
2767 else
2768 DATADIRNAME=share
2769 nls_cv_header_intl=libintl.h
2770 nls_cv_header_libgt=libgettext.h
2771 fi
2772
2773 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2774 # because some of the sources are only built for this goal.
2775 if test "$PACKAGE" = gettext; then
2776 USE_NLS=yes
2777 USE_INCLUDED_LIBINTL=yes
2778 fi
2779
2780 for lang in $ALL_LINGUAS; do
2781 GMOFILES="$GMOFILES $lang.gmo"
2782 POFILES="$POFILES $lang.po"
2783 done
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798 if test "x$CATOBJEXT" != "x"; then
2799 if test "x$ALL_LINGUAS" = "x"; then
2800 LINGUAS=
2801 else
2802 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
715d1656 2803echo "configure:2804: checking for catalogs to be installed" >&5
c906108c
SS
2804 NEW_LINGUAS=
2805 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2806 case "$ALL_LINGUAS" in
2807 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2808 esac
2809 done
2810 LINGUAS=$NEW_LINGUAS
2811 echo "$ac_t""$LINGUAS" 1>&6
2812 fi
2813
2814 if test -n "$LINGUAS"; then
2815 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2816 fi
2817 fi
2818
2819 if test $ac_cv_header_locale_h = yes; then
2820 INCLUDE_LOCALE_H="#include <locale.h>"
2821 else
2822 INCLUDE_LOCALE_H="\
2823/* The system does not provide the header <locale.h>. Take care yourself. */"
2824 fi
2825
2826
2827 if test -f $srcdir/po2tbl.sed.in; then
2828 if test "$CATOBJEXT" = ".cat"; then
2829 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2830echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
715d1656 2831echo "configure:2832: checking for linux/version.h" >&5
c906108c
SS
2832if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2833 echo $ac_n "(cached) $ac_c" 1>&6
2834else
2835 cat > conftest.$ac_ext <<EOF
715d1656 2836#line 2837 "configure"
c906108c
SS
2837#include "confdefs.h"
2838#include <linux/version.h>
2839EOF
2840ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 2841{ (eval echo configure:2842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2842ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2843if test -z "$ac_err"; then
2844 rm -rf conftest*
2845 eval "ac_cv_header_$ac_safe=yes"
2846else
2847 echo "$ac_err" >&5
2848 echo "configure: failed program was:" >&5
2849 cat conftest.$ac_ext >&5
2850 rm -rf conftest*
2851 eval "ac_cv_header_$ac_safe=no"
2852fi
2853rm -f conftest*
2854fi
2855if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2856 echo "$ac_t""yes" 1>&6
2857 msgformat=linux
2858else
2859 echo "$ac_t""no" 1>&6
2860msgformat=xopen
2861fi
2862
2863
2864 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2865 fi
2866 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2867 $srcdir/po2tbl.sed.in > po2tbl.sed
2868 fi
2869
2870 if test "$PACKAGE" = "gettext"; then
2871 GT_NO="#NO#"
2872 GT_YES=
2873 else
2874 GT_NO=
2875 GT_YES="#YES#"
2876 fi
2877
2878
2879
2880 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2881
2882
2883 l=
2884
2885
4536bbc6 2886 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2887 test -d po || mkdir po
2888 if test "x$srcdir" != "x."; then
2889 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2890 posrcprefix="$srcdir/"
2891 else
2892 posrcprefix="../$srcdir/"
2893 fi
2894 else
2895 posrcprefix="../"
2896 fi
2897 rm -f po/POTFILES
2898 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2899 < $srcdir/po/POTFILES.in > po/POTFILES
2900 fi
2901
0fbb3da7
TT
2902cat >> confdefs.h <<\EOF
2903#define PACKAGE "gdb"
2904EOF
2905
2906
5b5d99cf
JB
2907debugdir=${libdir}/debug
2908
2909# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2910if test "${with_separate_debug_dir+set}" = set; then
2911 withval="$with_separate_debug_dir"
2912 debugdir="${withval}"
2913fi
2914
2915
2916
2917 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2918 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2919 ac_define_dir=`eval echo $debugdir`
2920 ac_define_dir=`eval echo $ac_define_dir`
2921 cat >> confdefs.h <<EOF
2922#define DEBUGDIR "$ac_define_dir"
2923EOF
2924
2925
2926#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2927
2928
2929CONFIG_OBS=
66b965bb 2930CONFIG_LIB_OBS=
c906108c
SS
2931CONFIG_DEPS=
2932CONFIG_SRCS=
fb40c209
AC
2933CONFIG_INITS=
2934ENABLE_CFLAGS=
b3a90332
AC
2935CONFIG_ALL=
2936CONFIG_CLEAN=
e56ac5c3
AC
2937CONFIG_INSTALL=
2938CONFIG_UNINSTALL=
c906108c 2939
8dcde887 2940subdirs="doc testsuite"
96baa820 2941
8dcde887 2942configdirs=
96baa820 2943
27e9bf90 2944. $srcdir/configure.host
c906108c 2945
27e9bf90 2946. $srcdir/configure.tgt
c906108c 2947
27e9bf90
MK
2948# Fetch the default architecture and default target vector from BFD.
2949targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2950
27e9bf90
MK
2951# We only want the first architecture, so strip off the others if
2952# there is more than one.
2953targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2954
27e9bf90
MK
2955if test "x$targ_archs" != x; then
2956 cat >> confdefs.h <<EOF
2957#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2958EOF
2959
2960fi
27e9bf90
MK
2961if test "x$targ_defvec" != x; then
2962 cat >> confdefs.h <<EOF
2963#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2964EOF
2965
2966fi
c906108c 2967
8bb2c122
MK
2968if test "$program_transform_name" = s,x,x,; then
2969 program_transform_name=
2970else
2971 # Double any \ or $. echo might interpret backslashes.
2972 cat <<\EOF_SED > conftestsed
2973s,\\,\\\\,g; s,\$,$$,g
2974EOF_SED
2975 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2976 rm -f conftestsed
2977fi
2978test "$program_prefix" != NONE &&
2979 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2980# Use a double $ so make ignores it.
2981test "$program_suffix" != NONE &&
2982 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2983
2984# sed with no file args requires a program.
2985test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2986
2987
627af7ea
MK
2988# The CLI cannot be disabled yet, but may be in the future.
2989
2990# Enable CLI.
2991# Check whether --enable-gdbcli or --disable-gdbcli was given.
2992if test "${enable_gdbcli+set}" = set; then
2993 enableval="$enable_gdbcli"
2994 case $enableval in
2995 yes)
2996 ;;
2997 no)
2998 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2999 *)
3000 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3001 esac
3002else
3003 enable_gdbcli=yes
3004fi
3005
3006if test x"$enable_gdbcli" = xyes; then
3007 if test -d $srcdir/cli; then
3008 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3009 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3010 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3011 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3012 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3013 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3014 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3015 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3016 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3017 fi
3018fi
3019
3020# Enable MI.
3021# Check whether --enable-gdbmi or --disable-gdbmi was given.
3022if test "${enable_gdbmi+set}" = set; then
3023 enableval="$enable_gdbmi"
3024 case $enableval in
3025 yes | no)
3026 ;;
3027 *)
3028 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3029 esac
3030else
3031 enable_gdbmi=yes
3032fi
3033
3034if test x"$enable_gdbmi" = xyes; then
3035 if test -d $srcdir/mi; then
3036 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3037 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3038 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3039 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3040 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3041 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3042 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3043 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3044 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3045 fi
3046fi
3047
06825bd1
MK
3048# Enable TUI.
3049# Check whether --enable-tui or --disable-tui was given.
3050if test "${enable_tui+set}" = set; then
3051 enableval="$enable_tui"
3052 case $enableval in
3053 yes | no)
3054 ;;
3055 *)
3056 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3057 esac
3058fi
3059
3060if test x"$enable_tui" = xyes; then
3061 if test -d $srcdir/tui; then
3062 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3063 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3064 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3065 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3066 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3067 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3068 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3069 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3070 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3071 need_curses=yes
3072 fi
3073fi
3074
8ee53726
MK
3075# Enable gdbtk.
3076# Check whether --enable-gdbtk or --disable-gdbtk was given.
3077if test "${enable_gdbtk+set}" = set; then
3078 enableval="$enable_gdbtk"
3079 case $enableval in
3080 yes | no)
3081 ;;
3082 *)
3083 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3084 esac
3085else
3086 if test -d $srcdir/gdbtk; then
3087 enable_gdbtk=yes
3088 else
3089 enable_gdbtk=no
3090 fi
3091fi
3092
3093# We unconditionally disable gdbtk tests on selected platforms.
3094case $host_os in
3095 go32* | windows*)
3096 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3097 enable_gdbtk=no ;;
3098esac
3099
d28f9cdf
DJ
3100# Profiling support.
3101# Check whether --enable-profiling or --disable-profiling was given.
3102if test "${enable_profiling+set}" = set; then
3103 enableval="$enable_profiling"
3104 case $enableval in
3105 yes | no)
3106 ;;
3107 *)
3108 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3109 esac
3110else
3111 enable_profiling=no
3112fi
3113
3114
d9feb4e7
DJ
3115for ac_func in monstartup _mcleanup
3116do
3117echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 3118echo "configure:3119: checking for $ac_func" >&5
d9feb4e7 3119if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3120 echo $ac_n "(cached) $ac_c" 1>&6
3121else
3122 cat > conftest.$ac_ext <<EOF
715d1656 3123#line 3124 "configure"
d28f9cdf
DJ
3124#include "confdefs.h"
3125/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3126 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3127#include <assert.h>
3128/* Override any gcc2 internal prototype to avoid an error. */
3129/* We use char because int might match the return type of a gcc2
3130 builtin and then its argument prototype would still apply. */
d9feb4e7 3131char $ac_func();
d28f9cdf
DJ
3132
3133int main() {
3134
3135/* The GNU C library defines this for functions which it implements
3136 to always fail with ENOSYS. Some functions are actually named
3137 something starting with __ and the normal name is an alias. */
d9feb4e7 3138#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3139choke me
3140#else
d9feb4e7 3141$ac_func();
d28f9cdf
DJ
3142#endif
3143
3144; return 0; }
3145EOF
715d1656 3146if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3147 rm -rf conftest*
d9feb4e7 3148 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3149else
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3152 rm -rf conftest*
d9feb4e7 3153 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3154fi
3155rm -f conftest*
3156fi
3157
d9feb4e7 3158if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3159 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3160 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3161 cat >> confdefs.h <<EOF
3162#define $ac_tr_func 1
3163EOF
3164
d28f9cdf
DJ
3165else
3166 echo "$ac_t""no" 1>&6
d28f9cdf 3167fi
d9feb4e7 3168done
d28f9cdf 3169
b0b1c2c0 3170echo $ac_n "checking for _etext""... $ac_c" 1>&6
715d1656 3171echo "configure:3172: checking for _etext" >&5
b0b1c2c0
MK
3172if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3173 echo $ac_n "(cached) $ac_c" 1>&6
3174else
3175 cat > conftest.$ac_ext <<EOF
715d1656 3176#line 3177 "configure"
b0b1c2c0
MK
3177#include "confdefs.h"
3178#include <stdlib.h>
3179extern char _etext;
3180
3181int main() {
3182free (&_etext);
3183; return 0; }
3184EOF
715d1656 3185if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3186 rm -rf conftest*
3187 ac_cv_var__etext=yes
3188else
3189 echo "configure: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
3191 rm -rf conftest*
3192 ac_cv_var__etext=no
3193fi
3194rm -f conftest*
3195fi
3196
3197echo "$ac_t""$ac_cv_var__etext" 1>&6
3198if test $ac_cv_var__etext = yes; then
3199 cat >> confdefs.h <<\EOF
3200#define HAVE__ETEXT 1
3201EOF
3202
3203fi
d9feb4e7
DJ
3204if test "$enable_profiling" = yes ; then
3205 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3206 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3207 fi
3208 PROFILE_CFLAGS=-pg
3209 OLD_CFLAGS="$CFLAGS"
3210 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3211
d9feb4e7 3212 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
715d1656 3213echo "configure:3214: checking whether $CC supports -pg" >&5
d9feb4e7 3214if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3215 echo $ac_n "(cached) $ac_c" 1>&6
3216else
3217 cat > conftest.$ac_ext <<EOF
715d1656 3218#line 3219 "configure"
d28f9cdf 3219#include "confdefs.h"
d28f9cdf
DJ
3220
3221int main() {
d9feb4e7 3222int x;
d28f9cdf
DJ
3223; return 0; }
3224EOF
715d1656 3225if { (eval echo configure:3226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3226 rm -rf conftest*
d9feb4e7 3227 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3228else
3229 echo "configure: failed program was:" >&5
3230 cat conftest.$ac_ext >&5
3231 rm -rf conftest*
d9feb4e7 3232 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3233fi
3234rm -f conftest*
3235fi
3236
d9feb4e7 3237echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3238
d9feb4e7
DJ
3239 if test $ac_cv_cc_supports_pg = no; then
3240 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3241 fi
d28f9cdf
DJ
3242
3243 CFLAGS="$OLD_CFLAGS"
3244fi
3245
8bb2c122
MK
3246# --------------------- #
3247# Checks for programs. #
3248# --------------------- #
3249
715d1656 3250for ac_prog in gawk mawk nawk awk
7a292a7a
SS
3251do
3252# Extract the first word of "$ac_prog", so it can be a program name with args.
3253set dummy $ac_prog; ac_word=$2
3254echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3255echo "configure:3256: checking for $ac_word" >&5
7a292a7a
SS
3256if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3257 echo $ac_n "(cached) $ac_c" 1>&6
3258else
3259 if test -n "$AWK"; then
3260 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3261else
3262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3263 ac_dummy="$PATH"
3264 for ac_dir in $ac_dummy; do
3265 test -z "$ac_dir" && ac_dir=.
3266 if test -f $ac_dir/$ac_word; then
3267 ac_cv_prog_AWK="$ac_prog"
3268 break
3269 fi
3270 done
3271 IFS="$ac_save_ifs"
3272fi
3273fi
3274AWK="$ac_cv_prog_AWK"
3275if test -n "$AWK"; then
3276 echo "$ac_t""$AWK" 1>&6
3277else
3278 echo "$ac_t""no" 1>&6
3279fi
3280
3281test -n "$AWK" && break
3282done
3283
c906108c
SS
3284# Find a good install program. We prefer a C program (faster),
3285# so one script is as good as another. But avoid the broken or
3286# incompatible versions:
3287# SysV /etc/install, /usr/sbin/install
3288# SunOS /usr/etc/install
3289# IRIX /sbin/install
3290# AIX /bin/install
3291# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3292# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3293# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3294# ./install, which can be erroneously created by make from ./install.sh.
3295echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
715d1656 3296echo "configure:3297: checking for a BSD compatible install" >&5
c906108c
SS
3297if test -z "$INSTALL"; then
3298if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3299 echo $ac_n "(cached) $ac_c" 1>&6
3300else
3301 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3302 for ac_dir in $PATH; do
3303 # Account for people who put trailing slashes in PATH elements.
3304 case "$ac_dir/" in
3305 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3306 *)
3307 # OSF1 and SCO ODT 3.0 have their own names for install.
3308 # Don't use installbsd from OSF since it installs stuff as root
3309 # by default.
3310 for ac_prog in ginstall scoinst install; do
3311 if test -f $ac_dir/$ac_prog; then
3312 if test $ac_prog = install &&
3313 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3314 # AIX install. It has an incompatible calling convention.
3315 :
3316 else
3317 ac_cv_path_install="$ac_dir/$ac_prog -c"
3318 break 2
3319 fi
3320 fi
3321 done
3322 ;;
3323 esac
3324 done
3325 IFS="$ac_save_IFS"
3326
3327fi
3328 if test "${ac_cv_path_install+set}" = set; then
3329 INSTALL="$ac_cv_path_install"
3330 else
3331 # As a last resort, use the slow shell script. We don't cache a
3332 # path for INSTALL within a source directory, because that will
3333 # break other packages using the cache if that directory is
3334 # removed, or if the path is relative.
3335 INSTALL="$ac_install_sh"
3336 fi
3337fi
3338echo "$ac_t""$INSTALL" 1>&6
3339
3340# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3341# It thinks the first close brace ends the variable substitution.
3342test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3343
3344test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3345
3346test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3347
8bb2c122 3348echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
715d1656 3349echo "configure:3350: checking whether ln -s works" >&5
8bb2c122
MK
3350if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3351 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3352else
8bb2c122
MK
3353 rm -f conftestdata
3354if ln -s X conftestdata 2>/dev/null
3355then
3356 rm -f conftestdata
3357 ac_cv_prog_LN_S="ln -s"
3358else
3359 ac_cv_prog_LN_S=ln
3360fi
3361fi
3362LN_S="$ac_cv_prog_LN_S"
3363if test "$ac_cv_prog_LN_S" = "ln -s"; then
3364 echo "$ac_t""yes" 1>&6
3365else
3366 echo "$ac_t""no" 1>&6
c906108c
SS
3367fi
3368
8bb2c122
MK
3369# Extract the first word of "ranlib", so it can be a program name with args.
3370set dummy ranlib; ac_word=$2
c906108c 3371echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3372echo "configure:3373: checking for $ac_word" >&5
8bb2c122 3373if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3374 echo $ac_n "(cached) $ac_c" 1>&6
3375else
8bb2c122
MK
3376 if test -n "$RANLIB"; then
3377 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3378else
3379 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3380 ac_dummy="$PATH"
3381 for ac_dir in $ac_dummy; do
3382 test -z "$ac_dir" && ac_dir=.
3383 if test -f $ac_dir/$ac_word; then
8bb2c122 3384 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3385 break
3386 fi
3387 done
3388 IFS="$ac_save_ifs"
8bb2c122 3389 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3390fi
3391fi
8bb2c122
MK
3392RANLIB="$ac_cv_prog_RANLIB"
3393if test -n "$RANLIB"; then
3394 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3395else
3396 echo "$ac_t""no" 1>&6
3397fi
3398
8bb2c122
MK
3399for ac_prog in 'bison -y' byacc
3400do
3401# Extract the first word of "$ac_prog", so it can be a program name with args.
3402set dummy $ac_prog; ac_word=$2
c906108c 3403echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3404echo "configure:3405: checking for $ac_word" >&5
8bb2c122 3405if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3406 echo $ac_n "(cached) $ac_c" 1>&6
3407else
8bb2c122
MK
3408 if test -n "$YACC"; then
3409 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3410else
3411 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3412 ac_dummy="$PATH"
3413 for ac_dir in $ac_dummy; do
3414 test -z "$ac_dir" && ac_dir=.
3415 if test -f $ac_dir/$ac_word; then
8bb2c122 3416 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3417 break
3418 fi
3419 done
3420 IFS="$ac_save_ifs"
3421fi
3422fi
8bb2c122
MK
3423YACC="$ac_cv_prog_YACC"
3424if test -n "$YACC"; then
3425 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3426else
3427 echo "$ac_t""no" 1>&6
3428fi
3429
8bb2c122
MK
3430test -n "$YACC" && break
3431done
3432test -n "$YACC" || YACC="yacc"
c906108c 3433
8bb2c122
MK
3434
3435# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3436set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3437echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3438echo "configure:3439: checking for $ac_word" >&5
8bb2c122 3439if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3440 echo $ac_n "(cached) $ac_c" 1>&6
3441else
8bb2c122
MK
3442 if test -n "$AR"; then
3443 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3444else
3445 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3446 ac_dummy="$PATH"
3447 for ac_dir in $ac_dummy; do
3448 test -z "$ac_dir" && ac_dir=.
3449 if test -f $ac_dir/$ac_word; then
8bb2c122 3450 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3451 break
3452 fi
3453 done
3454 IFS="$ac_save_ifs"
8bb2c122 3455 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3456fi
3457fi
8bb2c122
MK
3458AR="$ac_cv_prog_AR"
3459if test -n "$AR"; then
3460 echo "$ac_t""$AR" 1>&6
c906108c
SS
3461else
3462 echo "$ac_t""no" 1>&6
3463fi
3464
8bb2c122 3465
c906108c 3466
95ca63c4
CF
3467# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3468set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3469echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3470echo "configure:3471: checking for $ac_word" >&5
95ca63c4
CF
3471if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3472 echo $ac_n "(cached) $ac_c" 1>&6
3473else
3474 if test -n "$DLLTOOL"; then
3475 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3476else
3477 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3478 ac_dummy="$PATH"
3479 for ac_dir in $ac_dummy; do
3480 test -z "$ac_dir" && ac_dir=.
3481 if test -f $ac_dir/$ac_word; then
3482 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3483 break
3484 fi
3485 done
3486 IFS="$ac_save_ifs"
3487 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3488fi
3489fi
3490DLLTOOL="$ac_cv_prog_DLLTOOL"
3491if test -n "$DLLTOOL"; then
3492 echo "$ac_t""$DLLTOOL" 1>&6
3493else
3494 echo "$ac_t""no" 1>&6
3495fi
3496
3497
3498
3499# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3500set dummy ${ac_tool_prefix}windres; ac_word=$2
3501echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3502echo "configure:3503: checking for $ac_word" >&5
95ca63c4
CF
3503if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3504 echo $ac_n "(cached) $ac_c" 1>&6
3505else
3506 if test -n "$WINDRES"; then
3507 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3508else
3509 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3510 ac_dummy="$PATH"
3511 for ac_dir in $ac_dummy; do
3512 test -z "$ac_dir" && ac_dir=.
3513 if test -f $ac_dir/$ac_word; then
3514 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3515 break
3516 fi
3517 done
3518 IFS="$ac_save_ifs"
3519 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3520fi
3521fi
3522WINDRES="$ac_cv_prog_WINDRES"
3523if test -n "$WINDRES"; then
3524 echo "$ac_t""$WINDRES" 1>&6
3525else
3526 echo "$ac_t""no" 1>&6
3527fi
3528
3529
3530
c906108c 3531
8bb2c122 3532# Needed for GNU/Hurd.
75c6e08a
MK
3533# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3534set dummy ${ac_tool_prefix}mig; ac_word=$2
3535echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 3536echo "configure:3537: checking for $ac_word" >&5
75c6e08a
MK
3537if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3538 echo $ac_n "(cached) $ac_c" 1>&6
3539else
3540 if test -n "$MIG"; then
3541 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3542else
3543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3544 ac_dummy="$PATH"
3545 for ac_dir in $ac_dummy; do
3546 test -z "$ac_dir" && ac_dir=.
3547 if test -f $ac_dir/$ac_word; then
3548 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3549 break
3550 fi
3551 done
3552 IFS="$ac_save_ifs"
3553 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3554fi
3555fi
3556MIG="$ac_cv_prog_MIG"
3557if test -n "$MIG"; then
3558 echo "$ac_t""$MIG" 1>&6
3559else
3560 echo "$ac_t""no" 1>&6
3561fi
3562
3563
3564
3565
9a156167
MK
3566# ---------------------- #
3567# Checks for libraries. #
3568# ---------------------- #
3569
3570# We might need to link with -lm; most simulators need it.
3571echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
715d1656 3572echo "configure:3573: checking for main in -lm" >&5
9a156167
MK
3573ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3574if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3575 echo $ac_n "(cached) $ac_c" 1>&6
3576else
3577 ac_save_LIBS="$LIBS"
3578LIBS="-lm $LIBS"
3579cat > conftest.$ac_ext <<EOF
715d1656 3580#line 3581 "configure"
9a156167
MK
3581#include "confdefs.h"
3582
3583int main() {
3584main()
3585; return 0; }
3586EOF
715d1656 3587if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3588 rm -rf conftest*
3589 eval "ac_cv_lib_$ac_lib_var=yes"
3590else
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
3594 eval "ac_cv_lib_$ac_lib_var=no"
3595fi
3596rm -f conftest*
3597LIBS="$ac_save_LIBS"
3598
3599fi
3600if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3601 echo "$ac_t""yes" 1>&6
3602 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3603 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3604 cat >> confdefs.h <<EOF
3605#define $ac_tr_lib 1
3606EOF
3607
3608 LIBS="-lm $LIBS"
3609
3610else
3611 echo "$ac_t""no" 1>&6
3612fi
3613
3614
3615# We need to link with -lw to get `wctype' on Solaris before Solaris
3616# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3617# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3618# is known to have this problem). Therefore we avoid libw if we can.
3619echo $ac_n "checking for wctype""... $ac_c" 1>&6
715d1656 3620echo "configure:3621: checking for wctype" >&5
9a156167
MK
3621if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3623else
3624 cat > conftest.$ac_ext <<EOF
715d1656 3625#line 3626 "configure"
9a156167
MK
3626#include "confdefs.h"
3627/* System header to define __stub macros and hopefully few prototypes,
3628 which can conflict with char wctype(); below. */
3629#include <assert.h>
3630/* Override any gcc2 internal prototype to avoid an error. */
3631/* We use char because int might match the return type of a gcc2
3632 builtin and then its argument prototype would still apply. */
3633char wctype();
3634
3635int main() {
3636
3637/* The GNU C library defines this for functions which it implements
3638 to always fail with ENOSYS. Some functions are actually named
3639 something starting with __ and the normal name is an alias. */
3640#if defined (__stub_wctype) || defined (__stub___wctype)
3641choke me
3642#else
3643wctype();
3644#endif
3645
3646; return 0; }
3647EOF
715d1656 3648if { (eval echo configure:3649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3649 rm -rf conftest*
3650 eval "ac_cv_func_wctype=yes"
3651else
3652 echo "configure: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3654 rm -rf conftest*
3655 eval "ac_cv_func_wctype=no"
3656fi
3657rm -f conftest*
3658fi
3659
3660if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3661 echo "$ac_t""yes" 1>&6
3662 :
3663else
3664 echo "$ac_t""no" 1>&6
3665echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
715d1656 3666echo "configure:3667: checking for wctype in -lw" >&5
9a156167
MK
3667ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3668if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3669 echo $ac_n "(cached) $ac_c" 1>&6
3670else
3671 ac_save_LIBS="$LIBS"
3672LIBS="-lw $LIBS"
3673cat > conftest.$ac_ext <<EOF
715d1656 3674#line 3675 "configure"
9a156167
MK
3675#include "confdefs.h"
3676/* Override any gcc2 internal prototype to avoid an error. */
3677/* We use char because int might match the return type of a gcc2
3678 builtin and then its argument prototype would still apply. */
3679char wctype();
3680
3681int main() {
3682wctype()
3683; return 0; }
3684EOF
715d1656 3685if { (eval echo configure:3686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3686 rm -rf conftest*
3687 eval "ac_cv_lib_$ac_lib_var=yes"
3688else
3689 echo "configure: failed program was:" >&5
3690 cat conftest.$ac_ext >&5
3691 rm -rf conftest*
3692 eval "ac_cv_lib_$ac_lib_var=no"
3693fi
3694rm -f conftest*
3695LIBS="$ac_save_LIBS"
3696
3697fi
3698if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3699 echo "$ac_t""yes" 1>&6
3700 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3701 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3702 cat >> confdefs.h <<EOF
3703#define $ac_tr_lib 1
3704EOF
3705
3706 LIBS="-lw $LIBS"
3707
3708else
3709 echo "$ac_t""no" 1>&6
3710fi
3711
3712fi
3713
3714
3715# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3716
3717echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
715d1656 3718echo "configure:3719: checking for library containing socketpair" >&5
9a156167
MK
3719if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3720 echo $ac_n "(cached) $ac_c" 1>&6
3721else
3722 ac_func_search_save_LIBS="$LIBS"
3723ac_cv_search_socketpair="no"
3724cat > conftest.$ac_ext <<EOF
715d1656 3725#line 3726 "configure"
9a156167
MK
3726#include "confdefs.h"
3727/* Override any gcc2 internal prototype to avoid an error. */
3728/* We use char because int might match the return type of a gcc2
3729 builtin and then its argument prototype would still apply. */
3730char socketpair();
3731
3732int main() {
3733socketpair()
3734; return 0; }
3735EOF
715d1656 3736if { (eval echo configure:3737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3737 rm -rf conftest*
3738 ac_cv_search_socketpair="none required"
3739else
3740 echo "configure: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3742fi
3743rm -f conftest*
3744test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3745LIBS="-l$i $ac_func_search_save_LIBS"
3746cat > conftest.$ac_ext <<EOF
715d1656 3747#line 3748 "configure"
9a156167
MK
3748#include "confdefs.h"
3749/* Override any gcc2 internal prototype to avoid an error. */
3750/* We use char because int might match the return type of a gcc2
3751 builtin and then its argument prototype would still apply. */
3752char socketpair();
3753
3754int main() {
3755socketpair()
3756; return 0; }
3757EOF
715d1656 3758if { (eval echo configure:3759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3759 rm -rf conftest*
3760 ac_cv_search_socketpair="-l$i"
3761break
3762else
3763 echo "configure: failed program was:" >&5
3764 cat conftest.$ac_ext >&5
3765fi
3766rm -f conftest*
3767done
3768LIBS="$ac_func_search_save_LIBS"
3769fi
3770
3771echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3772if test "$ac_cv_search_socketpair" != "no"; then
3773 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3774
3775else :
3776
3777fi
3778
06825bd1
MK
3779# Since GDB uses Readline, we need termcap functionality, so we need
3780# to find a library that provides that. When GDB is configured with
3781# --enable-tui, we need full curses functionality.
3782#
3783# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3784# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3785# Makefile fragments. That's why we need to have `Hcurses' before
3786# `curses'. I don't see why we should use HP curses if a more
3787# standard curses is available, except that according to HP's
3788# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3789# HP-UX 10.10 and 10.20.
3790
3791if test "$need_curses" = yes; then
3792
3793echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
715d1656 3794echo "configure:3795: checking for library containing initscr" >&5
06825bd1
MK
3795if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3796 echo $ac_n "(cached) $ac_c" 1>&6
3797else
3798 ac_func_search_save_LIBS="$LIBS"
3799ac_cv_search_initscr="no"
3800cat > conftest.$ac_ext <<EOF
715d1656 3801#line 3802 "configure"
06825bd1
MK
3802#include "confdefs.h"
3803/* Override any gcc2 internal prototype to avoid an error. */
3804/* We use char because int might match the return type of a gcc2
3805 builtin and then its argument prototype would still apply. */
3806char initscr();
3807
3808int main() {
3809initscr()
3810; return 0; }
3811EOF
715d1656 3812if { (eval echo configure:3813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3813 rm -rf conftest*
3814 ac_cv_search_initscr="none required"
3815else
3816 echo "configure: failed program was:" >&5
3817 cat conftest.$ac_ext >&5
3818fi
3819rm -f conftest*
3820test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3821LIBS="-l$i $ac_func_search_save_LIBS"
3822cat > conftest.$ac_ext <<EOF
715d1656 3823#line 3824 "configure"
06825bd1
MK
3824#include "confdefs.h"
3825/* Override any gcc2 internal prototype to avoid an error. */
3826/* We use char because int might match the return type of a gcc2
3827 builtin and then its argument prototype would still apply. */
3828char initscr();
3829
3830int main() {
3831initscr()
3832; return 0; }
3833EOF
715d1656 3834if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3835 rm -rf conftest*
3836 ac_cv_search_initscr="-l$i"
3837break
3838else
3839 echo "configure: failed program was:" >&5
3840 cat conftest.$ac_ext >&5
3841fi
3842rm -f conftest*
3843done
3844LIBS="$ac_func_search_save_LIBS"
3845fi
3846
3847echo "$ac_t""$ac_cv_search_initscr" 1>&6
3848if test "$ac_cv_search_initscr" != "no"; then
3849 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3850
3851else :
3852 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3853fi
3854fi
3855
3856case $host_os in
3857 cygwin*)
3858 if test -d $srcdir/libtermcap; then
3859 LIBS="../libtermcap/libtermcap.a $LIBS"
3860 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3861 fi ;;
3862 go32*)
3863 # ??? Is this really true?
3864 ac_cv_search_tgetent="none required"
3865 ;;
3866 aix*)
3867 # Readline prefers curses over termcap on AIX.
3868 # ??? Why?
3869
3870echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
715d1656 3871echo "configure:3872: checking for library containing tgetent" >&5
06825bd1
MK
3872if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3874else
3875 ac_func_search_save_LIBS="$LIBS"
3876ac_cv_search_tgetent="no"
3877cat > conftest.$ac_ext <<EOF
715d1656 3878#line 3879 "configure"
06825bd1
MK
3879#include "confdefs.h"
3880/* Override any gcc2 internal prototype to avoid an error. */
3881/* We use char because int might match the return type of a gcc2
3882 builtin and then its argument prototype would still apply. */
3883char tgetent();
3884
3885int main() {
3886tgetent()
3887; return 0; }
3888EOF
715d1656 3889if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3890 rm -rf conftest*
3891 ac_cv_search_tgetent="none required"
3892else
3893 echo "configure: failed program was:" >&5
3894 cat conftest.$ac_ext >&5
3895fi
3896rm -f conftest*
3897test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3898LIBS="-l$i $ac_func_search_save_LIBS"
3899cat > conftest.$ac_ext <<EOF
715d1656 3900#line 3901 "configure"
06825bd1
MK
3901#include "confdefs.h"
3902/* Override any gcc2 internal prototype to avoid an error. */
3903/* We use char because int might match the return type of a gcc2
3904 builtin and then its argument prototype would still apply. */
3905char tgetent();
3906
3907int main() {
3908tgetent()
3909; return 0; }
3910EOF
715d1656 3911if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3912 rm -rf conftest*
3913 ac_cv_search_tgetent="-l$i"
3914break
3915else
3916 echo "configure: failed program was:" >&5
3917 cat conftest.$ac_ext >&5
3918fi
3919rm -f conftest*
3920done
3921LIBS="$ac_func_search_save_LIBS"
3922fi
3923
3924echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3925if test "$ac_cv_search_tgetent" != "no"; then
3926 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3927
3928else :
3929
3930fi
3931 ;;
3932esac
3933
3934# Note: We used to check for libtermlib and libterminfo too, but
3935# Readline doesn't, so I think we're safe with leaving them out.
3936
3937echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
715d1656 3938echo "configure:3939: checking for library containing tgetent" >&5
06825bd1
MK
3939if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3940 echo $ac_n "(cached) $ac_c" 1>&6
3941else
3942 ac_func_search_save_LIBS="$LIBS"
3943ac_cv_search_tgetent="no"
3944cat > conftest.$ac_ext <<EOF
715d1656 3945#line 3946 "configure"
06825bd1
MK
3946#include "confdefs.h"
3947/* Override any gcc2 internal prototype to avoid an error. */
3948/* We use char because int might match the return type of a gcc2
3949 builtin and then its argument prototype would still apply. */
3950char tgetent();
3951
3952int main() {
3953tgetent()
3954; return 0; }
3955EOF
715d1656 3956if { (eval echo configure:3957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3957 rm -rf conftest*
3958 ac_cv_search_tgetent="none required"
3959else
3960 echo "configure: failed program was:" >&5
3961 cat conftest.$ac_ext >&5
3962fi
3963rm -f conftest*
3964test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3965LIBS="-l$i $ac_func_search_save_LIBS"
3966cat > conftest.$ac_ext <<EOF
715d1656 3967#line 3968 "configure"
06825bd1
MK
3968#include "confdefs.h"
3969/* Override any gcc2 internal prototype to avoid an error. */
3970/* We use char because int might match the return type of a gcc2
3971 builtin and then its argument prototype would still apply. */
3972char tgetent();
3973
3974int main() {
3975tgetent()
3976; return 0; }
3977EOF
715d1656 3978if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3979 rm -rf conftest*
3980 ac_cv_search_tgetent="-l$i"
3981break
3982else
3983 echo "configure: failed program was:" >&5
3984 cat conftest.$ac_ext >&5
3985fi
3986rm -f conftest*
3987done
3988LIBS="$ac_func_search_save_LIBS"
3989fi
3990
3991echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3992if test "$ac_cv_search_tgetent" != "no"; then
3993 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3994
3995else :
3996
3997fi
3998
3999if test "$ac_cv_search_tgetent" = no; then
4000 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4001fi
4002
5ee754fc
MK
4003# ------------------------- #
4004# Checks for header files. #
4005# ------------------------- #
4006
4007ac_header_dirent=no
4008for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4009do
4010ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4011echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
715d1656 4012echo "configure:4013: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4013if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4014 echo $ac_n "(cached) $ac_c" 1>&6
4015else
4016 cat > conftest.$ac_ext <<EOF
715d1656 4017#line 4018 "configure"
c906108c
SS
4018#include "confdefs.h"
4019#include <sys/types.h>
5ee754fc
MK
4020#include <$ac_hdr>
4021int main() {
4022DIR *dirp = 0;
4023; return 0; }
4024EOF
715d1656 4025if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4026 rm -rf conftest*
4027 eval "ac_cv_header_dirent_$ac_safe=yes"
4028else
4029 echo "configure: failed program was:" >&5
4030 cat conftest.$ac_ext >&5
4031 rm -rf conftest*
4032 eval "ac_cv_header_dirent_$ac_safe=no"
4033fi
4034rm -f conftest*
4035fi
4036if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4037 echo "$ac_t""yes" 1>&6
4038 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4039 cat >> confdefs.h <<EOF
4040#define $ac_tr_hdr 1
4041EOF
4042 ac_header_dirent=$ac_hdr; break
4043else
4044 echo "$ac_t""no" 1>&6
4045fi
4046done
4047# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4048if test $ac_header_dirent = dirent.h; then
4049echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
715d1656 4050echo "configure:4051: checking for opendir in -ldir" >&5
5ee754fc
MK
4051ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4052if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4053 echo $ac_n "(cached) $ac_c" 1>&6
4054else
4055 ac_save_LIBS="$LIBS"
4056LIBS="-ldir $LIBS"
4057cat > conftest.$ac_ext <<EOF
715d1656 4058#line 4059 "configure"
5ee754fc
MK
4059#include "confdefs.h"
4060/* Override any gcc2 internal prototype to avoid an error. */
4061/* We use char because int might match the return type of a gcc2
4062 builtin and then its argument prototype would still apply. */
4063char opendir();
c906108c
SS
4064
4065int main() {
5ee754fc 4066opendir()
c906108c
SS
4067; return 0; }
4068EOF
715d1656 4069if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4070 rm -rf conftest*
5ee754fc 4071 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4072else
4073 echo "configure: failed program was:" >&5
4074 cat conftest.$ac_ext >&5
4075 rm -rf conftest*
5ee754fc 4076 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4077fi
4078rm -f conftest*
5ee754fc
MK
4079LIBS="$ac_save_LIBS"
4080
4081fi
4082if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4083 echo "$ac_t""yes" 1>&6
4084 LIBS="$LIBS -ldir"
4085else
4086 echo "$ac_t""no" 1>&6
c906108c
SS
4087fi
4088
5ee754fc
MK
4089else
4090echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
715d1656 4091echo "configure:4092: checking for opendir in -lx" >&5
5ee754fc
MK
4092ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4093if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4094 echo $ac_n "(cached) $ac_c" 1>&6
4095else
4096 ac_save_LIBS="$LIBS"
4097LIBS="-lx $LIBS"
4098cat > conftest.$ac_ext <<EOF
715d1656 4099#line 4100 "configure"
5ee754fc
MK
4100#include "confdefs.h"
4101/* Override any gcc2 internal prototype to avoid an error. */
4102/* We use char because int might match the return type of a gcc2
4103 builtin and then its argument prototype would still apply. */
4104char opendir();
4105
4106int main() {
4107opendir()
4108; return 0; }
c906108c 4109EOF
715d1656 4110if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4111 rm -rf conftest*
4112 eval "ac_cv_lib_$ac_lib_var=yes"
4113else
4114 echo "configure: failed program was:" >&5
4115 cat conftest.$ac_ext >&5
4116 rm -rf conftest*
4117 eval "ac_cv_lib_$ac_lib_var=no"
4118fi
4119rm -f conftest*
4120LIBS="$ac_save_LIBS"
c906108c 4121
5ee754fc
MK
4122fi
4123if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4124 echo "$ac_t""yes" 1>&6
4125 LIBS="$LIBS -lx"
4126else
4127 echo "$ac_t""no" 1>&6
4128fi
c906108c 4129
5ee754fc 4130fi
c906108c 4131
5ee754fc 4132echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
715d1656 4133echo "configure:4134: checking whether stat file-mode macros are broken" >&5
5ee754fc 4134if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4135 echo $ac_n "(cached) $ac_c" 1>&6
4136else
4137 cat > conftest.$ac_ext <<EOF
715d1656 4138#line 4139 "configure"
9608ab8b
MK
4139#include "confdefs.h"
4140#include <sys/types.h>
5ee754fc
MK
4141#include <sys/stat.h>
4142
4143#if defined(S_ISBLK) && defined(S_IFDIR)
4144# if S_ISBLK (S_IFDIR)
4145You lose.
4146# endif
4147#endif
4148
4149#if defined(S_ISBLK) && defined(S_IFCHR)
4150# if S_ISBLK (S_IFCHR)
4151You lose.
4152# endif
4153#endif
4154
4155#if defined(S_ISLNK) && defined(S_IFREG)
4156# if S_ISLNK (S_IFREG)
4157You lose.
4158# endif
4159#endif
4160
4161#if defined(S_ISSOCK) && defined(S_IFREG)
4162# if S_ISSOCK (S_IFREG)
4163You lose.
4164# endif
4165#endif
4166
9608ab8b 4167EOF
5ee754fc
MK
4168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4169 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4170 rm -rf conftest*
5ee754fc
MK
4171 ac_cv_header_stat_broken=yes
4172else
4173 rm -rf conftest*
4174 ac_cv_header_stat_broken=no
4175fi
4176rm -f conftest*
4177
4178fi
4179
4180echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4181if test $ac_cv_header_stat_broken = yes; then
4182 cat >> confdefs.h <<\EOF
4183#define STAT_MACROS_BROKEN 1
4184EOF
4185
4186fi
4187
4188echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
715d1656 4189echo "configure:4190: checking for ANSI C header files" >&5
5ee754fc
MK
4190if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4191 echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193 cat > conftest.$ac_ext <<EOF
715d1656 4194#line 4195 "configure"
5ee754fc
MK
4195#include "confdefs.h"
4196#include <stdlib.h>
4197#include <stdarg.h>
4198#include <string.h>
4199#include <float.h>
4200EOF
4201ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4202{ (eval echo configure:4203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4203ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4204if test -z "$ac_err"; then
4205 rm -rf conftest*
4206 ac_cv_header_stdc=yes
4207else
4208 echo "$ac_err" >&5
4209 echo "configure: failed program was:" >&5
4210 cat conftest.$ac_ext >&5
4211 rm -rf conftest*
4212 ac_cv_header_stdc=no
4213fi
4214rm -f conftest*
4215
4216if test $ac_cv_header_stdc = yes; then
4217 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4218cat > conftest.$ac_ext <<EOF
715d1656 4219#line 4220 "configure"
5ee754fc
MK
4220#include "confdefs.h"
4221#include <string.h>
4222EOF
4223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4224 egrep "memchr" >/dev/null 2>&1; then
4225 :
4226else
4227 rm -rf conftest*
4228 ac_cv_header_stdc=no
4229fi
4230rm -f conftest*
4231
4232fi
4233
4234if test $ac_cv_header_stdc = yes; then
4235 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4236cat > conftest.$ac_ext <<EOF
715d1656 4237#line 4238 "configure"
5ee754fc
MK
4238#include "confdefs.h"
4239#include <stdlib.h>
4240EOF
4241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4242 egrep "free" >/dev/null 2>&1; then
4243 :
4244else
4245 rm -rf conftest*
4246 ac_cv_header_stdc=no
4247fi
4248rm -f conftest*
4249
4250fi
4251
4252if test $ac_cv_header_stdc = yes; then
4253 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4254if test "$cross_compiling" = yes; then
4255 :
4256else
4257 cat > conftest.$ac_ext <<EOF
715d1656 4258#line 4259 "configure"
5ee754fc
MK
4259#include "confdefs.h"
4260#include <ctype.h>
4261#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4262#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4263#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4264int main () { int i; for (i = 0; i < 256; i++)
4265if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4266exit (0); }
4267
4268EOF
715d1656 4269if { (eval echo configure:4270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4270then
4271 :
9608ab8b 4272else
5ee754fc
MK
4273 echo "configure: failed program was:" >&5
4274 cat conftest.$ac_ext >&5
4275 rm -fr conftest*
4276 ac_cv_header_stdc=no
4277fi
4278rm -fr conftest*
4279fi
4280
4281fi
4282fi
4283
4284echo "$ac_t""$ac_cv_header_stdc" 1>&6
4285if test $ac_cv_header_stdc = yes; then
4286 cat >> confdefs.h <<\EOF
4287#define STDC_HEADERS 1
4288EOF
4289
4290fi
4291
4292for ac_hdr in link.h
4293do
4294ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4295echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4296echo "configure:4297: checking for $ac_hdr" >&5
5ee754fc
MK
4297if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4298 echo $ac_n "(cached) $ac_c" 1>&6
4299else
4300 cat > conftest.$ac_ext <<EOF
715d1656 4301#line 4302 "configure"
5ee754fc
MK
4302#include "confdefs.h"
4303#include <$ac_hdr>
4304EOF
4305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4306{ (eval echo configure:4307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4308if test -z "$ac_err"; then
4309 rm -rf conftest*
4310 eval "ac_cv_header_$ac_safe=yes"
4311else
4312 echo "$ac_err" >&5
4313 echo "configure: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
4315 rm -rf conftest*
4316 eval "ac_cv_header_$ac_safe=no"
4317fi
4318rm -f conftest*
4319fi
4320if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4321 echo "$ac_t""yes" 1>&6
4322 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4323 cat >> confdefs.h <<EOF
4324#define $ac_tr_hdr 1
4325EOF
4326
4327else
4328 echo "$ac_t""no" 1>&6
4329fi
4330done
4331
4332for ac_hdr in nlist.h
4333do
4334ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4335echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4336echo "configure:4337: checking for $ac_hdr" >&5
5ee754fc
MK
4337if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4338 echo $ac_n "(cached) $ac_c" 1>&6
4339else
4340 cat > conftest.$ac_ext <<EOF
715d1656 4341#line 4342 "configure"
5ee754fc
MK
4342#include "confdefs.h"
4343#include <$ac_hdr>
4344EOF
4345ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4346{ (eval echo configure:4347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4347ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4348if test -z "$ac_err"; then
4349 rm -rf conftest*
4350 eval "ac_cv_header_$ac_safe=yes"
4351else
4352 echo "$ac_err" >&5
4353 echo "configure: failed program was:" >&5
4354 cat conftest.$ac_ext >&5
4355 rm -rf conftest*
4356 eval "ac_cv_header_$ac_safe=no"
4357fi
4358rm -f conftest*
4359fi
4360if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4361 echo "$ac_t""yes" 1>&6
4362 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4363 cat >> confdefs.h <<EOF
4364#define $ac_tr_hdr 1
4365EOF
4366
4367else
4368 echo "$ac_t""no" 1>&6
4369fi
4370done
4371
4372for ac_hdr in poll.h sys/poll.h
4373do
4374ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4375echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4376echo "configure:4377: checking for $ac_hdr" >&5
5ee754fc
MK
4377if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4378 echo $ac_n "(cached) $ac_c" 1>&6
4379else
4380 cat > conftest.$ac_ext <<EOF
715d1656 4381#line 4382 "configure"
5ee754fc
MK
4382#include "confdefs.h"
4383#include <$ac_hdr>
4384EOF
4385ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4386{ (eval echo configure:4387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4387ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4388if test -z "$ac_err"; then
4389 rm -rf conftest*
4390 eval "ac_cv_header_$ac_safe=yes"
4391else
4392 echo "$ac_err" >&5
4393 echo "configure: failed program was:" >&5
4394 cat conftest.$ac_ext >&5
4395 rm -rf conftest*
4396 eval "ac_cv_header_$ac_safe=no"
4397fi
4398rm -f conftest*
4399fi
4400if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4401 echo "$ac_t""yes" 1>&6
4402 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4403 cat >> confdefs.h <<EOF
4404#define $ac_tr_hdr 1
4405EOF
4406
4407else
4408 echo "$ac_t""no" 1>&6
4409fi
4410done
4411
4412for ac_hdr in proc_service.h thread_db.h
4413do
4414ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4415echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4416echo "configure:4417: checking for $ac_hdr" >&5
5ee754fc
MK
4417if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4418 echo $ac_n "(cached) $ac_c" 1>&6
4419else
4420 cat > conftest.$ac_ext <<EOF
715d1656 4421#line 4422 "configure"
5ee754fc
MK
4422#include "confdefs.h"
4423#include <$ac_hdr>
4424EOF
4425ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4426{ (eval echo configure:4427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4427ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4428if test -z "$ac_err"; then
4429 rm -rf conftest*
4430 eval "ac_cv_header_$ac_safe=yes"
4431else
4432 echo "$ac_err" >&5
4433 echo "configure: failed program was:" >&5
4434 cat conftest.$ac_ext >&5
4435 rm -rf conftest*
4436 eval "ac_cv_header_$ac_safe=no"
4437fi
4438rm -f conftest*
4439fi
4440if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4441 echo "$ac_t""yes" 1>&6
4442 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4443 cat >> confdefs.h <<EOF
4444#define $ac_tr_hdr 1
4445EOF
4446
4447else
4448 echo "$ac_t""no" 1>&6
4449fi
4450done
4451
4452for ac_hdr in stddef.h
4453do
4454ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4455echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4456echo "configure:4457: checking for $ac_hdr" >&5
5ee754fc
MK
4457if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4458 echo $ac_n "(cached) $ac_c" 1>&6
4459else
4460 cat > conftest.$ac_ext <<EOF
715d1656 4461#line 4462 "configure"
5ee754fc
MK
4462#include "confdefs.h"
4463#include <$ac_hdr>
4464EOF
4465ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4466{ (eval echo configure:4467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4467ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4468if test -z "$ac_err"; then
4469 rm -rf conftest*
4470 eval "ac_cv_header_$ac_safe=yes"
4471else
4472 echo "$ac_err" >&5
4473 echo "configure: failed program was:" >&5
4474 cat conftest.$ac_ext >&5
4475 rm -rf conftest*
4476 eval "ac_cv_header_$ac_safe=no"
4477fi
4478rm -f conftest*
4479fi
4480if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4481 echo "$ac_t""yes" 1>&6
4482 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4483 cat >> confdefs.h <<EOF
4484#define $ac_tr_hdr 1
4485EOF
4486
4487else
4488 echo "$ac_t""no" 1>&6
4489fi
4490done
4491
4492for ac_hdr in stdlib.h
4493do
4494ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4495echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4496echo "configure:4497: checking for $ac_hdr" >&5
5ee754fc
MK
4497if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4498 echo $ac_n "(cached) $ac_c" 1>&6
4499else
4500 cat > conftest.$ac_ext <<EOF
715d1656 4501#line 4502 "configure"
5ee754fc
MK
4502#include "confdefs.h"
4503#include <$ac_hdr>
4504EOF
4505ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4506{ (eval echo configure:4507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4507ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4508if test -z "$ac_err"; then
4509 rm -rf conftest*
4510 eval "ac_cv_header_$ac_safe=yes"
4511else
4512 echo "$ac_err" >&5
4513 echo "configure: failed program was:" >&5
4514 cat conftest.$ac_ext >&5
4515 rm -rf conftest*
4516 eval "ac_cv_header_$ac_safe=no"
4517fi
4518rm -f conftest*
4519fi
4520if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4521 echo "$ac_t""yes" 1>&6
4522 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4523 cat >> confdefs.h <<EOF
4524#define $ac_tr_hdr 1
4525EOF
4526
4527else
4528 echo "$ac_t""no" 1>&6
4529fi
4530done
4531
4532for ac_hdr in stdint.h
4533do
4534ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4535echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4536echo "configure:4537: checking for $ac_hdr" >&5
5ee754fc
MK
4537if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4538 echo $ac_n "(cached) $ac_c" 1>&6
4539else
4540 cat > conftest.$ac_ext <<EOF
715d1656 4541#line 4542 "configure"
5ee754fc
MK
4542#include "confdefs.h"
4543#include <$ac_hdr>
4544EOF
4545ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4546{ (eval echo configure:4547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4547ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4548if test -z "$ac_err"; then
4549 rm -rf conftest*
4550 eval "ac_cv_header_$ac_safe=yes"
4551else
4552 echo "$ac_err" >&5
4553 echo "configure: failed program was:" >&5
4554 cat conftest.$ac_ext >&5
4555 rm -rf conftest*
4556 eval "ac_cv_header_$ac_safe=no"
4557fi
4558rm -f conftest*
4559fi
4560if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4561 echo "$ac_t""yes" 1>&6
4562 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4563 cat >> confdefs.h <<EOF
4564#define $ac_tr_hdr 1
4565EOF
4566
4567else
4568 echo "$ac_t""no" 1>&6
4569fi
4570done
4571
4572for ac_hdr in string.h memory.h strings.h
4573do
4574ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4575echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4576echo "configure:4577: checking for $ac_hdr" >&5
5ee754fc
MK
4577if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4578 echo $ac_n "(cached) $ac_c" 1>&6
4579else
4580 cat > conftest.$ac_ext <<EOF
715d1656 4581#line 4582 "configure"
5ee754fc
MK
4582#include "confdefs.h"
4583#include <$ac_hdr>
4584EOF
4585ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4586{ (eval echo configure:4587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4587ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4588if test -z "$ac_err"; then
4589 rm -rf conftest*
4590 eval "ac_cv_header_$ac_safe=yes"
4591else
4592 echo "$ac_err" >&5
4593 echo "configure: failed program was:" >&5
4594 cat conftest.$ac_ext >&5
4595 rm -rf conftest*
4596 eval "ac_cv_header_$ac_safe=no"
4597fi
4598rm -f conftest*
4599fi
4600if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4601 echo "$ac_t""yes" 1>&6
4602 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4603 cat >> confdefs.h <<EOF
4604#define $ac_tr_hdr 1
4605EOF
4606
4607else
4608 echo "$ac_t""no" 1>&6
4609fi
4610done
4611
4612for ac_hdr in sys/fault.h
4613do
4614ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4615echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4616echo "configure:4617: checking for $ac_hdr" >&5
5ee754fc
MK
4617if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4618 echo $ac_n "(cached) $ac_c" 1>&6
4619else
4620 cat > conftest.$ac_ext <<EOF
715d1656 4621#line 4622 "configure"
5ee754fc
MK
4622#include "confdefs.h"
4623#include <$ac_hdr>
4624EOF
4625ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4626{ (eval echo configure:4627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4627ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4628if test -z "$ac_err"; then
4629 rm -rf conftest*
4630 eval "ac_cv_header_$ac_safe=yes"
4631else
4632 echo "$ac_err" >&5
4633 echo "configure: failed program was:" >&5
4634 cat conftest.$ac_ext >&5
4635 rm -rf conftest*
4636 eval "ac_cv_header_$ac_safe=no"
4637fi
4638rm -f conftest*
4639fi
4640if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4641 echo "$ac_t""yes" 1>&6
4642 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4643 cat >> confdefs.h <<EOF
4644#define $ac_tr_hdr 1
4645EOF
4646
4647else
4648 echo "$ac_t""no" 1>&6
4649fi
4650done
4651
4652for ac_hdr in sys/file.h
4653do
4654ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4655echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4656echo "configure:4657: checking for $ac_hdr" >&5
5ee754fc
MK
4657if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4658 echo $ac_n "(cached) $ac_c" 1>&6
4659else
4660 cat > conftest.$ac_ext <<EOF
715d1656 4661#line 4662 "configure"
5ee754fc
MK
4662#include "confdefs.h"
4663#include <$ac_hdr>
4664EOF
4665ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4666{ (eval echo configure:4667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4667ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4668if test -z "$ac_err"; then
4669 rm -rf conftest*
4670 eval "ac_cv_header_$ac_safe=yes"
4671else
4672 echo "$ac_err" >&5
4673 echo "configure: failed program was:" >&5
4674 cat conftest.$ac_ext >&5
4675 rm -rf conftest*
4676 eval "ac_cv_header_$ac_safe=no"
4677fi
4678rm -f conftest*
4679fi
4680if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4681 echo "$ac_t""yes" 1>&6
4682 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4683 cat >> confdefs.h <<EOF
4684#define $ac_tr_hdr 1
4685EOF
4686
4687else
4688 echo "$ac_t""no" 1>&6
4689fi
4690done
4691
4692for ac_hdr in sys/filio.h
4693do
4694ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4695echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4696echo "configure:4697: checking for $ac_hdr" >&5
5ee754fc
MK
4697if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4698 echo $ac_n "(cached) $ac_c" 1>&6
4699else
4700 cat > conftest.$ac_ext <<EOF
715d1656 4701#line 4702 "configure"
5ee754fc
MK
4702#include "confdefs.h"
4703#include <$ac_hdr>
4704EOF
4705ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4706{ (eval echo configure:4707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4707ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4708if test -z "$ac_err"; then
4709 rm -rf conftest*
4710 eval "ac_cv_header_$ac_safe=yes"
4711else
4712 echo "$ac_err" >&5
4713 echo "configure: failed program was:" >&5
4714 cat conftest.$ac_ext >&5
4715 rm -rf conftest*
4716 eval "ac_cv_header_$ac_safe=no"
4717fi
4718rm -f conftest*
4719fi
4720if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4721 echo "$ac_t""yes" 1>&6
4722 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4723 cat >> confdefs.h <<EOF
4724#define $ac_tr_hdr 1
4725EOF
4726
4727else
4728 echo "$ac_t""no" 1>&6
4729fi
4730done
4731
4732for ac_hdr in sys/ioctl.h
4733do
4734ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4735echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4736echo "configure:4737: checking for $ac_hdr" >&5
5ee754fc
MK
4737if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4738 echo $ac_n "(cached) $ac_c" 1>&6
4739else
4740 cat > conftest.$ac_ext <<EOF
715d1656 4741#line 4742 "configure"
5ee754fc
MK
4742#include "confdefs.h"
4743#include <$ac_hdr>
4744EOF
4745ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4746{ (eval echo configure:4747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4747ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4748if test -z "$ac_err"; then
4749 rm -rf conftest*
4750 eval "ac_cv_header_$ac_safe=yes"
4751else
4752 echo "$ac_err" >&5
4753 echo "configure: failed program was:" >&5
4754 cat conftest.$ac_ext >&5
4755 rm -rf conftest*
4756 eval "ac_cv_header_$ac_safe=no"
4757fi
4758rm -f conftest*
4759fi
4760if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4761 echo "$ac_t""yes" 1>&6
4762 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4763 cat >> confdefs.h <<EOF
4764#define $ac_tr_hdr 1
4765EOF
4766
4767else
4768 echo "$ac_t""no" 1>&6
4769fi
4770done
4771
4772for ac_hdr in sys/param.h
4773do
4774ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4775echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4776echo "configure:4777: checking for $ac_hdr" >&5
5ee754fc
MK
4777if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4778 echo $ac_n "(cached) $ac_c" 1>&6
4779else
4780 cat > conftest.$ac_ext <<EOF
715d1656 4781#line 4782 "configure"
5ee754fc
MK
4782#include "confdefs.h"
4783#include <$ac_hdr>
4784EOF
4785ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4786{ (eval echo configure:4787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4787ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4788if test -z "$ac_err"; then
4789 rm -rf conftest*
4790 eval "ac_cv_header_$ac_safe=yes"
4791else
4792 echo "$ac_err" >&5
4793 echo "configure: failed program was:" >&5
4794 cat conftest.$ac_ext >&5
4795 rm -rf conftest*
4796 eval "ac_cv_header_$ac_safe=no"
4797fi
4798rm -f conftest*
4799fi
4800if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4801 echo "$ac_t""yes" 1>&6
4802 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4803 cat >> confdefs.h <<EOF
4804#define $ac_tr_hdr 1
4805EOF
4806
4807else
4808 echo "$ac_t""no" 1>&6
4809fi
4810done
4811
4812for ac_hdr in sys/proc.h
4813do
4814ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4815echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4816echo "configure:4817: checking for $ac_hdr" >&5
5ee754fc
MK
4817if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4818 echo $ac_n "(cached) $ac_c" 1>&6
4819else
4820 cat > conftest.$ac_ext <<EOF
715d1656 4821#line 4822 "configure"
5ee754fc
MK
4822#include "confdefs.h"
4823#include <$ac_hdr>
4824EOF
4825ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4826{ (eval echo configure:4827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4827ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4828if test -z "$ac_err"; then
4829 rm -rf conftest*
4830 eval "ac_cv_header_$ac_safe=yes"
4831else
4832 echo "$ac_err" >&5
4833 echo "configure: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4835 rm -rf conftest*
4836 eval "ac_cv_header_$ac_safe=no"
4837fi
4838rm -f conftest*
4839fi
4840if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4841 echo "$ac_t""yes" 1>&6
4842 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4843 cat >> confdefs.h <<EOF
4844#define $ac_tr_hdr 1
4845EOF
4846
4847else
4848 echo "$ac_t""no" 1>&6
4849fi
4850done
4851
4852for ac_hdr in sys/procfs.h
4853do
4854ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4855echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4856echo "configure:4857: checking for $ac_hdr" >&5
5ee754fc
MK
4857if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4858 echo $ac_n "(cached) $ac_c" 1>&6
4859else
4860 cat > conftest.$ac_ext <<EOF
715d1656 4861#line 4862 "configure"
5ee754fc
MK
4862#include "confdefs.h"
4863#include <$ac_hdr>
4864EOF
4865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4866{ (eval echo configure:4867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4868if test -z "$ac_err"; then
4869 rm -rf conftest*
4870 eval "ac_cv_header_$ac_safe=yes"
4871else
4872 echo "$ac_err" >&5
4873 echo "configure: failed program was:" >&5
4874 cat conftest.$ac_ext >&5
4875 rm -rf conftest*
4876 eval "ac_cv_header_$ac_safe=no"
4877fi
4878rm -f conftest*
4879fi
4880if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4881 echo "$ac_t""yes" 1>&6
4882 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4883 cat >> confdefs.h <<EOF
4884#define $ac_tr_hdr 1
4885EOF
4886
4887else
4888 echo "$ac_t""no" 1>&6
4889fi
4890done
4891
4892for ac_hdr in sys/ptrace.h ptrace.h
4893do
4894ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4895echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4896echo "configure:4897: checking for $ac_hdr" >&5
5ee754fc
MK
4897if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4898 echo $ac_n "(cached) $ac_c" 1>&6
4899else
4900 cat > conftest.$ac_ext <<EOF
715d1656 4901#line 4902 "configure"
5ee754fc
MK
4902#include "confdefs.h"
4903#include <$ac_hdr>
4904EOF
4905ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4906{ (eval echo configure:4907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4907ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4908if test -z "$ac_err"; then
4909 rm -rf conftest*
4910 eval "ac_cv_header_$ac_safe=yes"
4911else
4912 echo "$ac_err" >&5
4913 echo "configure: failed program was:" >&5
4914 cat conftest.$ac_ext >&5
4915 rm -rf conftest*
4916 eval "ac_cv_header_$ac_safe=no"
4917fi
4918rm -f conftest*
4919fi
4920if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4921 echo "$ac_t""yes" 1>&6
4922 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4923 cat >> confdefs.h <<EOF
4924#define $ac_tr_hdr 1
4925EOF
4926
4927else
4928 echo "$ac_t""no" 1>&6
4929fi
4930done
4931
4932for ac_hdr in sys/reg.h sys/debugreg.h
4933do
4934ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4935echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4936echo "configure:4937: checking for $ac_hdr" >&5
5ee754fc
MK
4937if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4938 echo $ac_n "(cached) $ac_c" 1>&6
4939else
4940 cat > conftest.$ac_ext <<EOF
715d1656 4941#line 4942 "configure"
5ee754fc
MK
4942#include "confdefs.h"
4943#include <$ac_hdr>
4944EOF
4945ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4946{ (eval echo configure:4947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4947ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4948if test -z "$ac_err"; then
4949 rm -rf conftest*
4950 eval "ac_cv_header_$ac_safe=yes"
4951else
4952 echo "$ac_err" >&5
4953 echo "configure: failed program was:" >&5
4954 cat conftest.$ac_ext >&5
4955 rm -rf conftest*
4956 eval "ac_cv_header_$ac_safe=no"
4957fi
4958rm -f conftest*
4959fi
4960if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4961 echo "$ac_t""yes" 1>&6
4962 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4963 cat >> confdefs.h <<EOF
4964#define $ac_tr_hdr 1
4965EOF
4966
4967else
4968 echo "$ac_t""no" 1>&6
4969fi
4970done
4971
4972for ac_hdr in sys/select.h
4973do
4974ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4975echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 4976echo "configure:4977: checking for $ac_hdr" >&5
5ee754fc
MK
4977if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4978 echo $ac_n "(cached) $ac_c" 1>&6
4979else
4980 cat > conftest.$ac_ext <<EOF
715d1656 4981#line 4982 "configure"
5ee754fc
MK
4982#include "confdefs.h"
4983#include <$ac_hdr>
4984EOF
4985ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 4986{ (eval echo configure:4987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4987ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4988if test -z "$ac_err"; then
4989 rm -rf conftest*
4990 eval "ac_cv_header_$ac_safe=yes"
4991else
4992 echo "$ac_err" >&5
4993 echo "configure: failed program was:" >&5
4994 cat conftest.$ac_ext >&5
4995 rm -rf conftest*
4996 eval "ac_cv_header_$ac_safe=no"
4997fi
4998rm -f conftest*
4999fi
5000if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5001 echo "$ac_t""yes" 1>&6
5002 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5003 cat >> confdefs.h <<EOF
5004#define $ac_tr_hdr 1
5005EOF
5006
5007else
5008 echo "$ac_t""no" 1>&6
5009fi
5010done
5011
5012for ac_hdr in sys/syscall.h
5013do
5014ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5015echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5016echo "configure:5017: checking for $ac_hdr" >&5
5ee754fc
MK
5017if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5018 echo $ac_n "(cached) $ac_c" 1>&6
5019else
5020 cat > conftest.$ac_ext <<EOF
715d1656 5021#line 5022 "configure"
5ee754fc
MK
5022#include "confdefs.h"
5023#include <$ac_hdr>
5024EOF
5025ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5026{ (eval echo configure:5027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5027ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5028if test -z "$ac_err"; then
5029 rm -rf conftest*
5030 eval "ac_cv_header_$ac_safe=yes"
5031else
5032 echo "$ac_err" >&5
5033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5035 rm -rf conftest*
5036 eval "ac_cv_header_$ac_safe=no"
5037fi
5038rm -f conftest*
5039fi
5040if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5041 echo "$ac_t""yes" 1>&6
5042 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5043 cat >> confdefs.h <<EOF
5044#define $ac_tr_hdr 1
5045EOF
5046
5047else
5048 echo "$ac_t""no" 1>&6
5049fi
5050done
5051
5052for ac_hdr in sys/user.h
5053do
5054ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5055echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5056echo "configure:5057: checking for $ac_hdr" >&5
5ee754fc
MK
5057if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5058 echo $ac_n "(cached) $ac_c" 1>&6
5059else
5060 cat > conftest.$ac_ext <<EOF
715d1656 5061#line 5062 "configure"
5ee754fc
MK
5062#include "confdefs.h"
5063#include <$ac_hdr>
5064EOF
5065ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5066{ (eval echo configure:5067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5067ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5068if test -z "$ac_err"; then
5069 rm -rf conftest*
5070 eval "ac_cv_header_$ac_safe=yes"
5071else
5072 echo "$ac_err" >&5
5073 echo "configure: failed program was:" >&5
5074 cat conftest.$ac_ext >&5
5075 rm -rf conftest*
5076 eval "ac_cv_header_$ac_safe=no"
5077fi
5078rm -f conftest*
5079fi
5080if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5081 echo "$ac_t""yes" 1>&6
5082 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5083 cat >> confdefs.h <<EOF
5084#define $ac_tr_hdr 1
5085EOF
5086
5087else
5088 echo "$ac_t""no" 1>&6
5089fi
5090done
5091
5092for ac_hdr in sys/wait.h wait.h
5093do
5094ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5095echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5096echo "configure:5097: checking for $ac_hdr" >&5
5ee754fc
MK
5097if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5098 echo $ac_n "(cached) $ac_c" 1>&6
5099else
5100 cat > conftest.$ac_ext <<EOF
715d1656 5101#line 5102 "configure"
5ee754fc
MK
5102#include "confdefs.h"
5103#include <$ac_hdr>
5104EOF
5105ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5106{ (eval echo configure:5107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5107ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5108if test -z "$ac_err"; then
5109 rm -rf conftest*
5110 eval "ac_cv_header_$ac_safe=yes"
5111else
5112 echo "$ac_err" >&5
9608ab8b
MK
5113 echo "configure: failed program was:" >&5
5114 cat conftest.$ac_ext >&5
5115 rm -rf conftest*
5ee754fc 5116 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5117fi
5118rm -f conftest*
5119fi
5ee754fc 5120if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5121 echo "$ac_t""yes" 1>&6
5122 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5123 cat >> confdefs.h <<EOF
5124#define $ac_tr_hdr 1
5125EOF
5ee754fc 5126
9608ab8b
MK
5127else
5128 echo "$ac_t""no" 1>&6
5129fi
5130done
5ee754fc
MK
5131
5132for ac_hdr in termios.h termio.h sgtty.h
5133do
5134ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5135echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5136echo "configure:5137: checking for $ac_hdr" >&5
5ee754fc 5137if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5138 echo $ac_n "(cached) $ac_c" 1>&6
5139else
5ee754fc 5140 cat > conftest.$ac_ext <<EOF
715d1656 5141#line 5142 "configure"
9608ab8b 5142#include "confdefs.h"
5ee754fc 5143#include <$ac_hdr>
9608ab8b 5144EOF
5ee754fc 5145ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5146{ (eval echo configure:5147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5147ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5148if test -z "$ac_err"; then
9608ab8b 5149 rm -rf conftest*
5ee754fc 5150 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5151else
5ee754fc 5152 echo "$ac_err" >&5
9608ab8b
MK
5153 echo "configure: failed program was:" >&5
5154 cat conftest.$ac_ext >&5
5155 rm -rf conftest*
5ee754fc 5156 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5157fi
5158rm -f conftest*
9608ab8b 5159fi
5ee754fc 5160if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5161 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5162 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5163 cat >> confdefs.h <<EOF
5164#define $ac_tr_hdr 1
5165EOF
5166
9608ab8b
MK
5167else
5168 echo "$ac_t""no" 1>&6
5169fi
5ee754fc 5170done
9608ab8b 5171
5ee754fc
MK
5172for ac_hdr in unistd.h
5173do
5174ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5175echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5176echo "configure:5177: checking for $ac_hdr" >&5
5ee754fc 5177if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5178 echo $ac_n "(cached) $ac_c" 1>&6
5179else
5ee754fc 5180 cat > conftest.$ac_ext <<EOF
715d1656 5181#line 5182 "configure"
9608ab8b 5182#include "confdefs.h"
5ee754fc 5183#include <$ac_hdr>
9608ab8b 5184EOF
5ee754fc 5185ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5186{ (eval echo configure:5187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5187ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5188if test -z "$ac_err"; then
9608ab8b 5189 rm -rf conftest*
5ee754fc 5190 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5191else
5ee754fc 5192 echo "$ac_err" >&5
9608ab8b
MK
5193 echo "configure: failed program was:" >&5
5194 cat conftest.$ac_ext >&5
5195 rm -rf conftest*
5ee754fc 5196 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5197fi
5198rm -f conftest*
9608ab8b 5199fi
5ee754fc 5200if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5201 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5202 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5203 cat >> confdefs.h <<EOF
5204#define $ac_tr_hdr 1
5205EOF
5206
9608ab8b
MK
5207else
5208 echo "$ac_t""no" 1>&6
5209fi
5ee754fc 5210done
9608ab8b 5211
9608ab8b 5212
5ee754fc
MK
5213# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5214# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5215# think that we don't have <curses.h> if we're using GCC.
5216case $host_os in
5217 solaris2.[78])
5218 if test "$GCC" = yes; then
5219 cat >> confdefs.h <<\EOF
5220#define _MSE_INT_H 1
5221EOF
5222
5223 fi ;;
5224esac
5225for ac_hdr in curses.h ncurses.h term.h
5226do
5227ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5228echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5229echo "configure:5230: checking for $ac_hdr" >&5
5ee754fc 5230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5231 echo $ac_n "(cached) $ac_c" 1>&6
5232else
5233 cat > conftest.$ac_ext <<EOF
715d1656 5234#line 5235 "configure"
c906108c 5235#include "confdefs.h"
5ee754fc 5236#include <$ac_hdr>
c906108c
SS
5237EOF
5238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5239{ (eval echo configure:5240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5241if test -z "$ac_err"; then
5242 rm -rf conftest*
5ee754fc 5243 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5244else
5245 echo "$ac_err" >&5
5246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 rm -rf conftest*
5ee754fc 5249 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5250fi
5251rm -f conftest*
c906108c 5252fi
5ee754fc
MK
5253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5254 echo "$ac_t""yes" 1>&6
5255 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5256 cat >> confdefs.h <<EOF
5257#define $ac_tr_hdr 1
c906108c 5258EOF
5ee754fc 5259
c906108c 5260else
5ee754fc 5261 echo "$ac_t""no" 1>&6
c906108c 5262fi
5ee754fc 5263done
c906108c
SS
5264
5265
5ee754fc
MK
5266# FIXME: kettenis/20030102: In most cases we include these
5267# unconditionally, so what's the point in checking these?
5268for ac_hdr in ctype.h time.h
c906108c
SS
5269do
5270ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5271echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5272echo "configure:5273: checking for $ac_hdr" >&5
c906108c
SS
5273if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5274 echo $ac_n "(cached) $ac_c" 1>&6
5275else
5276 cat > conftest.$ac_ext <<EOF
715d1656 5277#line 5278 "configure"
c906108c
SS
5278#include "confdefs.h"
5279#include <$ac_hdr>
5280EOF
5281ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5282{ (eval echo configure:5283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5283ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5284if test -z "$ac_err"; then
5285 rm -rf conftest*
5286 eval "ac_cv_header_$ac_safe=yes"
5287else
5288 echo "$ac_err" >&5
5289 echo "configure: failed program was:" >&5
5290 cat conftest.$ac_ext >&5
5291 rm -rf conftest*
5292 eval "ac_cv_header_$ac_safe=no"
5293fi
5294rm -f conftest*
5295fi
5296if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5297 echo "$ac_t""yes" 1>&6
5298 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5299 cat >> confdefs.h <<EOF
5300#define $ac_tr_hdr 1
5301EOF
5302
5303else
5304 echo "$ac_t""no" 1>&6
5305fi
5306done
5307
5ee754fc
MK
5308
5309# ------------------ #
5310# Checks for types. #
5311# ------------------ #
5312
5313echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
715d1656 5314echo "configure:5315: checking return type of signal handlers" >&5
5ee754fc 5315if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5316 echo $ac_n "(cached) $ac_c" 1>&6
5317else
5318 cat > conftest.$ac_ext <<EOF
715d1656 5319#line 5320 "configure"
c906108c
SS
5320#include "confdefs.h"
5321#include <sys/types.h>
5ee754fc
MK
5322#include <signal.h>
5323#ifdef signal
5324#undef signal
c906108c 5325#endif
5ee754fc
MK
5326#ifdef __cplusplus
5327extern "C" void (*signal (int, void (*)(int)))(int);
5328#else
5329void (*signal ()) ();
c906108c
SS
5330#endif
5331
5ee754fc
MK
5332int main() {
5333int i;
5334; return 0; }
c906108c 5335EOF
715d1656 5336if { (eval echo configure:5337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5337 rm -rf conftest*
5ee754fc 5338 ac_cv_type_signal=void
c906108c 5339else
5ee754fc
MK
5340 echo "configure: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
c906108c 5342 rm -rf conftest*
5ee754fc 5343 ac_cv_type_signal=int
c906108c
SS
5344fi
5345rm -f conftest*
c906108c
SS
5346fi
5347
5ee754fc
MK
5348echo "$ac_t""$ac_cv_type_signal" 1>&6
5349cat >> confdefs.h <<EOF
5350#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5351EOF
5352
c906108c
SS
5353
5354
5ee754fc
MK
5355# ------------------------------------- #
5356# Checks for compiler characteristics. #
5357# ------------------------------------- #
5358
c906108c 5359echo $ac_n "checking for working const""... $ac_c" 1>&6
715d1656 5360echo "configure:5361: checking for working const" >&5
c906108c
SS
5361if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5362 echo $ac_n "(cached) $ac_c" 1>&6
5363else
5364 cat > conftest.$ac_ext <<EOF
715d1656 5365#line 5366 "configure"
c906108c
SS
5366#include "confdefs.h"
5367
5368int main() {
5369
5370/* Ultrix mips cc rejects this. */
5371typedef int charset[2]; const charset x;
5372/* SunOS 4.1.1 cc rejects this. */
5373char const *const *ccp;
5374char **p;
5375/* NEC SVR4.0.2 mips cc rejects this. */
5376struct point {int x, y;};
5377static struct point const zero = {0,0};
5378/* AIX XL C 1.02.0.0 rejects this.
5379 It does not let you subtract one const X* pointer from another in an arm
5380 of an if-expression whose if-part is not a constant expression */
5381const char *g = "string";
5382ccp = &g + (g ? g-g : 0);
5383/* HPUX 7.0 cc rejects these. */
5384++ccp;
5385p = (char**) ccp;
5386ccp = (char const *const *) p;
5387{ /* SCO 3.2v4 cc rejects this. */
5388 char *t;
5389 char const *s = 0 ? (char *) 0 : (char const *) 0;
5390
5391 *t++ = 0;
5392}
5393{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5394 int x[] = {25, 17};
5395 const int *foo = &x[0];
5396 ++foo;
5397}
5398{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5399 typedef const int *iptr;
5400 iptr p = 0;
5401 ++p;
5402}
5403{ /* AIX XL C 1.02.0.0 rejects this saying
5404 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5405 struct s { int j; const int *ap[3]; };
5406 struct s *b; b->j = 5;
5407}
5408{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5409 const int foo = 10;
5410}
5411
5412; return 0; }
5413EOF
715d1656 5414if { (eval echo configure:5415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5415 rm -rf conftest*
5416 ac_cv_c_const=yes
5417else
5418 echo "configure: failed program was:" >&5
5419 cat conftest.$ac_ext >&5
5420 rm -rf conftest*
5421 ac_cv_c_const=no
5422fi
5423rm -f conftest*
5424fi
5425
5426echo "$ac_t""$ac_cv_c_const" 1>&6
5427if test $ac_cv_c_const = no; then
5428 cat >> confdefs.h <<\EOF
5429#define const
5430EOF
5431
5432fi
5433
bce58c09 5434echo $ac_n "checking for inline""... $ac_c" 1>&6
715d1656 5435echo "configure:5436: checking for inline" >&5
bce58c09
JB
5436if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5437 echo $ac_n "(cached) $ac_c" 1>&6
5438else
5439 ac_cv_c_inline=no
5440for ac_kw in inline __inline__ __inline; do
5441 cat > conftest.$ac_ext <<EOF
715d1656 5442#line 5443 "configure"
bce58c09
JB
5443#include "confdefs.h"
5444
5445int main() {
5446} $ac_kw foo() {
5447; return 0; }
5448EOF
715d1656 5449if { (eval echo configure:5450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5450 rm -rf conftest*
5451 ac_cv_c_inline=$ac_kw; break
5452else
5453 echo "configure: failed program was:" >&5
5454 cat conftest.$ac_ext >&5
5455fi
5456rm -f conftest*
5457done
5458
5459fi
5460
5461echo "$ac_t""$ac_cv_c_inline" 1>&6
5462case "$ac_cv_c_inline" in
5463 inline | yes) ;;
5464 no) cat >> confdefs.h <<\EOF
5465#define inline
5466EOF
5467 ;;
5468 *) cat >> confdefs.h <<EOF
5469#define inline $ac_cv_c_inline
5470EOF
5471 ;;
5472esac
5473
c906108c 5474
5ee754fc
MK
5475# ------------------------------ #
5476# Checks for library functions. #
5477# ------------------------------ #
5478
46711df8
MK
5479# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5480# for constant arguments. Useless!
5481echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
715d1656 5482echo "configure:5483: checking for working alloca.h" >&5
46711df8
MK
5483if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5484 echo $ac_n "(cached) $ac_c" 1>&6
5485else
5486 cat > conftest.$ac_ext <<EOF
715d1656 5487#line 5488 "configure"
46711df8
MK
5488#include "confdefs.h"
5489#include <alloca.h>
5490int main() {
5491char *p = alloca(2 * sizeof(int));
5492; return 0; }
5493EOF
715d1656 5494if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5495 rm -rf conftest*
5496 ac_cv_header_alloca_h=yes
5497else
5498 echo "configure: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5500 rm -rf conftest*
5501 ac_cv_header_alloca_h=no
5502fi
5503rm -f conftest*
5504fi
5505
5506echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5507if test $ac_cv_header_alloca_h = yes; then
5508 cat >> confdefs.h <<\EOF
5509#define HAVE_ALLOCA_H 1
5510EOF
5511
5512fi
5513
5514echo $ac_n "checking for alloca""... $ac_c" 1>&6
715d1656 5515echo "configure:5516: checking for alloca" >&5
46711df8
MK
5516if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5517 echo $ac_n "(cached) $ac_c" 1>&6
5518else
5519 cat > conftest.$ac_ext <<EOF
715d1656 5520#line 5521 "configure"
46711df8
MK
5521#include "confdefs.h"
5522
5523#ifdef __GNUC__
5524# define alloca __builtin_alloca
5525#else
5526# ifdef _MSC_VER
5527# include <malloc.h>
5528# define alloca _alloca
5529# else
5530# if HAVE_ALLOCA_H
5531# include <alloca.h>
5532# else
5533# ifdef _AIX
5534 #pragma alloca
5535# else
5536# ifndef alloca /* predefined by HP cc +Olibcalls */
5537char *alloca ();
5538# endif
5539# endif
5540# endif
5541# endif
5542#endif
5543
5544int main() {
5545char *p = (char *) alloca(1);
5546; return 0; }
5547EOF
715d1656 5548if { (eval echo configure:5549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5549 rm -rf conftest*
5550 ac_cv_func_alloca_works=yes
5551else
5552 echo "configure: failed program was:" >&5
5553 cat conftest.$ac_ext >&5
5554 rm -rf conftest*
5555 ac_cv_func_alloca_works=no
5556fi
5557rm -f conftest*
5558fi
5559
5560echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5561if test $ac_cv_func_alloca_works = yes; then
5562 cat >> confdefs.h <<\EOF
5563#define HAVE_ALLOCA 1
5564EOF
5565
5566fi
5567
5568if test $ac_cv_func_alloca_works = no; then
5569 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5570 # that cause trouble. Some versions do not even contain alloca or
5571 # contain a buggy version. If you still want to use their alloca,
5572 # use ar to extract alloca.o from them instead of compiling alloca.c.
5573 ALLOCA=alloca.${ac_objext}
5574 cat >> confdefs.h <<\EOF
5575#define C_ALLOCA 1
5576EOF
5577
5578
5579echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
715d1656 5580echo "configure:5581: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5581if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5582 echo $ac_n "(cached) $ac_c" 1>&6
5583else
5584 cat > conftest.$ac_ext <<EOF
715d1656 5585#line 5586 "configure"
46711df8
MK
5586#include "confdefs.h"
5587#if defined(CRAY) && ! defined(CRAY2)
5588webecray
5589#else
5590wenotbecray
5591#endif
5592
5593EOF
5594if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5595 egrep "webecray" >/dev/null 2>&1; then
5596 rm -rf conftest*
5597 ac_cv_os_cray=yes
5598else
5599 rm -rf conftest*
5600 ac_cv_os_cray=no
5601fi
5602rm -f conftest*
5603
5604fi
5605
5606echo "$ac_t""$ac_cv_os_cray" 1>&6
5607if test $ac_cv_os_cray = yes; then
5608for ac_func in _getb67 GETB67 getb67; do
5609 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 5610echo "configure:5611: checking for $ac_func" >&5
46711df8
MK
5611if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5612 echo $ac_n "(cached) $ac_c" 1>&6
5613else
5614 cat > conftest.$ac_ext <<EOF
715d1656 5615#line 5616 "configure"
46711df8
MK
5616#include "confdefs.h"
5617/* System header to define __stub macros and hopefully few prototypes,
5618 which can conflict with char $ac_func(); below. */
5619#include <assert.h>
5620/* Override any gcc2 internal prototype to avoid an error. */
5621/* We use char because int might match the return type of a gcc2
5622 builtin and then its argument prototype would still apply. */
5623char $ac_func();
5624
5625int main() {
5626
5627/* The GNU C library defines this for functions which it implements
5628 to always fail with ENOSYS. Some functions are actually named
5629 something starting with __ and the normal name is an alias. */
5630#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5631choke me
5632#else
5633$ac_func();
5634#endif
5635
5636; return 0; }
5637EOF
715d1656 5638if { (eval echo configure:5639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5639 rm -rf conftest*
5640 eval "ac_cv_func_$ac_func=yes"
5641else
5642 echo "configure: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 rm -rf conftest*
5645 eval "ac_cv_func_$ac_func=no"
5646fi
5647rm -f conftest*
5648fi
5649
5650if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5651 echo "$ac_t""yes" 1>&6
5652 cat >> confdefs.h <<EOF
5653#define CRAY_STACKSEG_END $ac_func
5654EOF
5655
5656 break
5657else
5658 echo "$ac_t""no" 1>&6
5659fi
5660
5661done
5662fi
5663
5664echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
715d1656 5665echo "configure:5666: checking stack direction for C alloca" >&5
46711df8
MK
5666if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5667 echo $ac_n "(cached) $ac_c" 1>&6
5668else
5669 if test "$cross_compiling" = yes; then
5670 ac_cv_c_stack_direction=0
5671else
5672 cat > conftest.$ac_ext <<EOF
715d1656 5673#line 5674 "configure"
46711df8
MK
5674#include "confdefs.h"
5675find_stack_direction ()
5676{
5677 static char *addr = 0;
5678 auto char dummy;
5679 if (addr == 0)
5680 {
5681 addr = &dummy;
5682 return find_stack_direction ();
5683 }
5684 else
5685 return (&dummy > addr) ? 1 : -1;
5686}
5687main ()
5688{
5689 exit (find_stack_direction() < 0);
5690}
5691EOF
715d1656 5692if { (eval echo configure:5693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5693then
5694 ac_cv_c_stack_direction=1
5695else
5696 echo "configure: failed program was:" >&5
5697 cat conftest.$ac_ext >&5
5698 rm -fr conftest*
5699 ac_cv_c_stack_direction=-1
5700fi
5701rm -fr conftest*
5702fi
5703
5704fi
5705
5706echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5707cat >> confdefs.h <<EOF
5708#define STACK_DIRECTION $ac_cv_c_stack_direction
5709EOF
5710
5711fi
5712
715d1656 5713for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
97bf5e38
MK
5714do
5715ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5716echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 5717echo "configure:5718: checking for $ac_hdr" >&5
74c1b268
AC
5718if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5719 echo $ac_n "(cached) $ac_c" 1>&6
5720else
5721 cat > conftest.$ac_ext <<EOF
715d1656 5722#line 5723 "configure"
74c1b268 5723#include "confdefs.h"
97bf5e38 5724#include <$ac_hdr>
74c1b268
AC
5725EOF
5726ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 5727{ (eval echo configure:5728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5728ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5729if test -z "$ac_err"; then
5730 rm -rf conftest*
5731 eval "ac_cv_header_$ac_safe=yes"
5732else
5733 echo "$ac_err" >&5
5734 echo "configure: failed program was:" >&5
5735 cat conftest.$ac_ext >&5
5736 rm -rf conftest*
5737 eval "ac_cv_header_$ac_safe=no"
5738fi
5739rm -f conftest*
5740fi
5741if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5742 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5743 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5744 cat >> confdefs.h <<EOF
5745#define $ac_tr_hdr 1
74c1b268 5746EOF
97bf5e38 5747
74c1b268
AC
5748else
5749 echo "$ac_t""no" 1>&6
5750fi
97bf5e38 5751done
74c1b268 5752
97bf5e38
MK
5753for ac_func in getpagesize
5754do
5755echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 5756echo "configure:5757: checking for $ac_func" >&5
97bf5e38 5757if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5758 echo $ac_n "(cached) $ac_c" 1>&6
5759else
5760 cat > conftest.$ac_ext <<EOF
715d1656 5761#line 5762 "configure"
74c1b268
AC
5762#include "confdefs.h"
5763/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5764 which can conflict with char $ac_func(); below. */
74c1b268
AC
5765#include <assert.h>
5766/* Override any gcc2 internal prototype to avoid an error. */
5767/* We use char because int might match the return type of a gcc2
5768 builtin and then its argument prototype would still apply. */
97bf5e38 5769char $ac_func();
74c1b268
AC
5770
5771int main() {
5772
5773/* The GNU C library defines this for functions which it implements
5774 to always fail with ENOSYS. Some functions are actually named
5775 something starting with __ and the normal name is an alias. */
97bf5e38 5776#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5777choke me
5778#else
97bf5e38 5779$ac_func();
74c1b268
AC
5780#endif
5781
5782; return 0; }
5783EOF
715d1656 5784if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5785 rm -rf conftest*
97bf5e38 5786 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5787else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
97bf5e38 5791 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5792fi
5793rm -f conftest*
5794fi
5795
97bf5e38 5796if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5797 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5798 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5799 cat >> confdefs.h <<EOF
5800#define $ac_tr_func 1
5801EOF
5802
74c1b268
AC
5803else
5804 echo "$ac_t""no" 1>&6
5805fi
97bf5e38 5806done
74c1b268 5807
97bf5e38 5808echo $ac_n "checking for working mmap""... $ac_c" 1>&6
715d1656 5809echo "configure:5810: checking for working mmap" >&5
97bf5e38
MK
5810if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5811 echo $ac_n "(cached) $ac_c" 1>&6
5812else
5813 if test "$cross_compiling" = yes; then
5814 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5815else
5816 cat > conftest.$ac_ext <<EOF
715d1656 5817#line 5818 "configure"
74c1b268 5818#include "confdefs.h"
97bf5e38
MK
5819
5820/* Thanks to Mike Haertel and Jim Avera for this test.
5821 Here is a matrix of mmap possibilities:
5822 mmap private not fixed
5823 mmap private fixed at somewhere currently unmapped
5824 mmap private fixed at somewhere already mapped
5825 mmap shared not fixed
5826 mmap shared fixed at somewhere currently unmapped
5827 mmap shared fixed at somewhere already mapped
5828 For private mappings, we should verify that changes cannot be read()
5829 back from the file, nor mmap's back from the file at a different
5830 address. (There have been systems where private was not correctly
5831 implemented like the infamous i386 svr4.0, and systems where the
5832 VM page cache was not coherent with the filesystem buffer cache
5833 like early versions of FreeBSD and possibly contemporary NetBSD.)
5834 For shared mappings, we should conversely verify that changes get
5835 propogated back to all the places they're supposed to be.
5836
5837 Grep wants private fixed already mapped.
5838 The main things grep needs to know about mmap are:
5839 * does it exist and is it safe to write into the mmap'd area
5840 * how to use it (BSD variants) */
74c1b268 5841#include <sys/types.h>
97bf5e38
MK
5842#include <fcntl.h>
5843#include <sys/mman.h>
5844
715d1656
AO
5845#if HAVE_SYS_TYPES_H
5846# include <sys/types.h>
5847#endif
5848
5849#if HAVE_STDLIB_H
5850# include <stdlib.h>
5851#endif
5852
5853#if HAVE_SYS_STAT_H
5854# include <sys/stat.h>
5855#endif
5856
5857#if HAVE_UNISTD_H
5858# include <unistd.h>
5859#endif
5860
97bf5e38
MK
5861/* This mess was copied from the GNU getpagesize.h. */
5862#ifndef HAVE_GETPAGESIZE
97bf5e38
MK
5863
5864/* Assume that all systems that can run configure have sys/param.h. */
5865# ifndef HAVE_SYS_PARAM_H
5866# define HAVE_SYS_PARAM_H 1
5867# endif
5868
5869# ifdef _SC_PAGESIZE
5870# define getpagesize() sysconf(_SC_PAGESIZE)
5871# else /* no _SC_PAGESIZE */
5872# ifdef HAVE_SYS_PARAM_H
5873# include <sys/param.h>
5874# ifdef EXEC_PAGESIZE
5875# define getpagesize() EXEC_PAGESIZE
5876# else /* no EXEC_PAGESIZE */
5877# ifdef NBPG
5878# define getpagesize() NBPG * CLSIZE
5879# ifndef CLSIZE
5880# define CLSIZE 1
5881# endif /* no CLSIZE */
5882# else /* no NBPG */
5883# ifdef NBPC
5884# define getpagesize() NBPC
5885# else /* no NBPC */
5886# ifdef PAGESIZE
5887# define getpagesize() PAGESIZE
5888# endif /* PAGESIZE */
5889# endif /* no NBPC */
5890# endif /* no NBPG */
5891# endif /* no EXEC_PAGESIZE */
5892# else /* no HAVE_SYS_PARAM_H */
5893# define getpagesize() 8192 /* punt totally */
5894# endif /* no HAVE_SYS_PARAM_H */
5895# endif /* no _SC_PAGESIZE */
5896
5897#endif /* no HAVE_GETPAGESIZE */
5898
74c1b268 5899#ifdef __cplusplus
97bf5e38 5900extern "C" { void *malloc(unsigned); }
74c1b268 5901#else
97bf5e38 5902char *malloc();
74c1b268 5903#endif
74c1b268 5904
97bf5e38
MK
5905int
5906main()
5907{
5908 char *data, *data2, *data3;
5909 int i, pagesize;
5910 int fd;
74c1b268 5911
97bf5e38 5912 pagesize = getpagesize();
74c1b268 5913
97bf5e38
MK
5914 /*
5915 * First, make a file with some known garbage in it.
5916 */
5917 data = malloc(pagesize);
5918 if (!data)
5919 exit(1);
5920 for (i = 0; i < pagesize; ++i)
5921 *(data + i) = rand();
5922 umask(0);
5923 fd = creat("conftestmmap", 0600);
5924 if (fd < 0)
5925 exit(1);
5926 if (write(fd, data, pagesize) != pagesize)
5927 exit(1);
5928 close(fd);
74c1b268 5929
97bf5e38
MK
5930 /*
5931 * Next, try to mmap the file at a fixed address which
5932 * already has something else allocated at it. If we can,
5933 * also make sure that we see the same garbage.
5934 */
5935 fd = open("conftestmmap", O_RDWR);
5936 if (fd < 0)
5937 exit(1);
5938 data2 = malloc(2 * pagesize);
5939 if (!data2)
5940 exit(1);
5941 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5942 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5943 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5944 exit(1);
5945 for (i = 0; i < pagesize; ++i)
5946 if (*(data + i) != *(data2 + i))
5947 exit(1);
74c1b268 5948
97bf5e38
MK
5949 /*
5950 * Finally, make sure that changes to the mapped area
5951 * do not percolate back to the file as seen by read().
5952 * (This is a bug on some variants of i386 svr4.0.)
5953 */
5954 for (i = 0; i < pagesize; ++i)
5955 *(data2 + i) = *(data2 + i) + 1;
5956 data3 = malloc(pagesize);
5957 if (!data3)
5958 exit(1);
5959 if (read(fd, data3, pagesize) != pagesize)
5960 exit(1);
5961 for (i = 0; i < pagesize; ++i)
5962 if (*(data + i) != *(data3 + i))
5963 exit(1);
5964 close(fd);
5965 unlink("conftestmmap");
5966 exit(0);
74c1b268 5967}
97bf5e38 5968
74c1b268 5969EOF
715d1656 5970if { (eval echo configure:5971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5971then
97bf5e38 5972 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5973else
5974 echo "configure: failed program was:" >&5
5975 cat conftest.$ac_ext >&5
5976 rm -fr conftest*
97bf5e38 5977 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5978fi
5979rm -fr conftest*
5980fi
5981
5982fi
5983
97bf5e38
MK
5984echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5985if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5986 cat >> confdefs.h <<\EOF
97bf5e38 5987#define HAVE_MMAP 1
74c1b268
AC
5988EOF
5989
5990fi
5991
97bf5e38 5992echo $ac_n "checking for pid_t""... $ac_c" 1>&6
715d1656 5993echo "configure:5994: checking for pid_t" >&5
97bf5e38 5994if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5995 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5996else
5997 cat > conftest.$ac_ext <<EOF
715d1656 5998#line 5999 "configure"
0200359f 5999#include "confdefs.h"
97bf5e38
MK
6000#include <sys/types.h>
6001#if STDC_HEADERS
6002#include <stdlib.h>
6003#include <stddef.h>
0200359f 6004#endif
0200359f 6005EOF
97bf5e38
MK
6006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6007 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6008 rm -rf conftest*
6009 ac_cv_type_pid_t=yes
0200359f 6010else
97bf5e38
MK
6011 rm -rf conftest*
6012 ac_cv_type_pid_t=no
0200359f 6013fi
97bf5e38 6014rm -f conftest*
0200359f
MK
6015
6016fi
97bf5e38
MK
6017echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6018if test $ac_cv_type_pid_t = no; then
0200359f 6019 cat >> confdefs.h <<\EOF
97bf5e38 6020#define pid_t int
0200359f
MK
6021EOF
6022
6023fi
6024
97bf5e38
MK
6025ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6026echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
715d1656 6027echo "configure:6028: checking for vfork.h" >&5
97bf5e38 6028if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6029 echo $ac_n "(cached) $ac_c" 1>&6
6030else
6031 cat > conftest.$ac_ext <<EOF
715d1656 6032#line 6033 "configure"
72473524 6033#include "confdefs.h"
97bf5e38 6034#include <vfork.h>
72473524 6035EOF
97bf5e38 6036ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 6037{ (eval echo configure:6038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6038ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6039if test -z "$ac_err"; then
72473524 6040 rm -rf conftest*
97bf5e38 6041 eval "ac_cv_header_$ac_safe=yes"
72473524 6042else
97bf5e38 6043 echo "$ac_err" >&5
72473524
DJ
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 rm -rf conftest*
97bf5e38 6047 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6048fi
6049rm -f conftest*
6050fi
97bf5e38
MK
6051if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6052 echo "$ac_t""yes" 1>&6
72473524 6053 cat >> confdefs.h <<\EOF
97bf5e38 6054#define HAVE_VFORK_H 1
72473524
DJ
6055EOF
6056
97bf5e38
MK
6057else
6058 echo "$ac_t""no" 1>&6
72473524 6059fi
c906108c 6060
97bf5e38 6061echo $ac_n "checking for working vfork""... $ac_c" 1>&6
715d1656 6062echo "configure:6063: checking for working vfork" >&5
97bf5e38
MK
6063if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6064 echo $ac_n "(cached) $ac_c" 1>&6
6065else
6066 if test "$cross_compiling" = yes; then
6067 echo $ac_n "checking for vfork""... $ac_c" 1>&6
715d1656 6068echo "configure:6069: checking for vfork" >&5
97bf5e38 6069if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6070 echo $ac_n "(cached) $ac_c" 1>&6
6071else
6072 cat > conftest.$ac_ext <<EOF
715d1656 6073#line 6074 "configure"
2b2d558c 6074#include "confdefs.h"
97bf5e38
MK
6075/* System header to define __stub macros and hopefully few prototypes,
6076 which can conflict with char vfork(); below. */
6077#include <assert.h>
6078/* Override any gcc2 internal prototype to avoid an error. */
6079/* We use char because int might match the return type of a gcc2
6080 builtin and then its argument prototype would still apply. */
6081char vfork();
2b2d558c
MK
6082
6083int main() {
97bf5e38
MK
6084
6085/* The GNU C library defines this for functions which it implements
6086 to always fail with ENOSYS. Some functions are actually named
6087 something starting with __ and the normal name is an alias. */
6088#if defined (__stub_vfork) || defined (__stub___vfork)
6089choke me
6090#else
6091vfork();
6092#endif
6093
2b2d558c
MK
6094; return 0; }
6095EOF
715d1656 6096if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6097 rm -rf conftest*
97bf5e38 6098 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6099else
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
97bf5e38 6103 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6104fi
6105rm -f conftest*
6106fi
6107
97bf5e38
MK
6108if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6109 echo "$ac_t""yes" 1>&6
6110 :
6111else
6112 echo "$ac_t""no" 1>&6
2b2d558c
MK
6113fi
6114
97bf5e38 6115ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6116else
6117 cat > conftest.$ac_ext <<EOF
715d1656 6118#line 6119 "configure"
7dfa765c 6119#include "confdefs.h"
97bf5e38
MK
6120/* Thanks to Paul Eggert for this test. */
6121#include <stdio.h>
6122#include <sys/types.h>
6123#include <sys/stat.h>
6124#ifdef HAVE_UNISTD_H
6125#include <unistd.h>
6126#endif
6127#ifdef HAVE_VFORK_H
6128#include <vfork.h>
6129#endif
6130/* On some sparc systems, changes by the child to local and incoming
6131 argument registers are propagated back to the parent.
6132 The compiler is told about this with #include <vfork.h>,
6133 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6134 Test for this by using a static variable whose address
6135 is put into a register that is clobbered by the vfork. */
6136static
6137#ifdef __cplusplus
6138sparc_address_test (int arg)
6139#else
6140sparc_address_test (arg) int arg;
6141#endif
6142{
6143 static pid_t child;
6144 if (!child) {
6145 child = vfork ();
6146 if (child < 0) {
6147 perror ("vfork");
6148 _exit(2);
6149 }
6150 if (!child) {
6151 arg = getpid();
6152 write(-1, "", 0);
6153 _exit (arg);
6154 }
6155 }
6156}
6157main() {
6158 pid_t parent = getpid ();
6159 pid_t child;
7dfa765c 6160
97bf5e38 6161 sparc_address_test ();
7dfa765c 6162
97bf5e38 6163 child = vfork ();
7dfa765c 6164
97bf5e38
MK
6165 if (child == 0) {
6166 /* Here is another test for sparc vfork register problems.
6167 This test uses lots of local variables, at least
6168 as many local variables as main has allocated so far
6169 including compiler temporaries. 4 locals are enough for
6170 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6171 A buggy compiler should reuse the register of parent
6172 for one of the local variables, since it will think that
6173 parent can't possibly be used any more in this routine.
6174 Assigning to the local variable will thus munge parent
6175 in the parent process. */
6176 pid_t
6177 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6178 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6179 /* Convince the compiler that p..p7 are live; otherwise, it might
6180 use the same hardware register for all 8 local variables. */
6181 if (p != p1 || p != p2 || p != p3 || p != p4
6182 || p != p5 || p != p6 || p != p7)
6183 _exit(1);
7dfa765c 6184
97bf5e38
MK
6185 /* On some systems (e.g. IRIX 3.3),
6186 vfork doesn't separate parent from child file descriptors.
6187 If the child closes a descriptor before it execs or exits,
6188 this munges the parent's descriptor as well.
6189 Test for this by closing stdout in the child. */
6190 _exit(close(fileno(stdout)) != 0);
6191 } else {
6192 int status;
6193 struct stat st;
64bb1671 6194
97bf5e38
MK
6195 while (wait(&status) != child)
6196 ;
6197 exit(
6198 /* Was there some problem with vforking? */
6199 child < 0
64bb1671 6200
97bf5e38
MK
6201 /* Did the child fail? (This shouldn't happen.) */
6202 || status
64bb1671 6203
97bf5e38
MK
6204 /* Did the vfork/compiler bug occur? */
6205 || parent != getpid()
6206
6207 /* Did the file descriptor bug occur? */
6208 || fstat(fileno(stdout), &st) != 0
6209 );
6210 }
6211}
5c44784c 6212EOF
715d1656 6213if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6214then
6215 ac_cv_func_vfork_works=yes
5c44784c
JM
6216else
6217 echo "configure: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
97bf5e38
MK
6219 rm -fr conftest*
6220 ac_cv_func_vfork_works=no
5c44784c 6221fi
97bf5e38 6222rm -fr conftest*
5c44784c
JM
6223fi
6224
0afdd437
MK
6225fi
6226
97bf5e38
MK
6227echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6228if test $ac_cv_func_vfork_works = no; then
0afdd437 6229 cat >> confdefs.h <<\EOF
97bf5e38 6230#define vfork fork
0afdd437
MK
6231EOF
6232
6233fi
6234
97bf5e38
MK
6235for ac_func in canonicalize_file_name realpath
6236do
6237echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6238echo "configure:6239: checking for $ac_func" >&5
97bf5e38 6239if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6240 echo $ac_n "(cached) $ac_c" 1>&6
6241else
6242 cat > conftest.$ac_ext <<EOF
715d1656 6243#line 6244 "configure"
7e89e357 6244#include "confdefs.h"
97bf5e38
MK
6245/* System header to define __stub macros and hopefully few prototypes,
6246 which can conflict with char $ac_func(); below. */
6247#include <assert.h>
6248/* Override any gcc2 internal prototype to avoid an error. */
6249/* We use char because int might match the return type of a gcc2
6250 builtin and then its argument prototype would still apply. */
6251char $ac_func();
6252
7e89e357 6253int main() {
97bf5e38
MK
6254
6255/* The GNU C library defines this for functions which it implements
6256 to always fail with ENOSYS. Some functions are actually named
6257 something starting with __ and the normal name is an alias. */
6258#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6259choke me
6260#else
6261$ac_func();
6262#endif
6263
7e89e357
JT
6264; return 0; }
6265EOF
715d1656 6266if { (eval echo configure:6267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6267 rm -rf conftest*
97bf5e38 6268 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6269else
6270 echo "configure: failed program was:" >&5
6271 cat conftest.$ac_ext >&5
6272 rm -rf conftest*
97bf5e38 6273 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6274fi
6275rm -f conftest*
6276fi
6277
97bf5e38
MK
6278if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6279 echo "$ac_t""yes" 1>&6
6280 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6281 cat >> confdefs.h <<EOF
6282#define $ac_tr_func 1
7e89e357 6283EOF
97bf5e38
MK
6284
6285else
6286 echo "$ac_t""no" 1>&6
7e89e357 6287fi
97bf5e38 6288done
7e89e357 6289
97bf5e38 6290for ac_func in poll
7be570e7
JM
6291do
6292echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6293echo "configure:6294: checking for $ac_func" >&5
7be570e7
JM
6294if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6295 echo $ac_n "(cached) $ac_c" 1>&6
6296else
6297 cat > conftest.$ac_ext <<EOF
715d1656 6298#line 6299 "configure"
7be570e7
JM
6299#include "confdefs.h"
6300/* System header to define __stub macros and hopefully few prototypes,
6301 which can conflict with char $ac_func(); below. */
6302#include <assert.h>
6303/* Override any gcc2 internal prototype to avoid an error. */
6304/* We use char because int might match the return type of a gcc2
6305 builtin and then its argument prototype would still apply. */
6306char $ac_func();
6307
6308int main() {
6309
6310/* The GNU C library defines this for functions which it implements
6311 to always fail with ENOSYS. Some functions are actually named
6312 something starting with __ and the normal name is an alias. */
6313#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6314choke me
6315#else
6316$ac_func();
6317#endif
6318
6319; return 0; }
6320EOF
715d1656 6321if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6322 rm -rf conftest*
6323 eval "ac_cv_func_$ac_func=yes"
6324else
6325 echo "configure: failed program was:" >&5
6326 cat conftest.$ac_ext >&5
6327 rm -rf conftest*
6328 eval "ac_cv_func_$ac_func=no"
6329fi
6330rm -f conftest*
6331fi
6332
6333if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6334 echo "$ac_t""yes" 1>&6
6335 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6336 cat >> confdefs.h <<EOF
6337#define $ac_tr_func 1
6338EOF
6339
6340else
6341 echo "$ac_t""no" 1>&6
6342fi
6343done
6344
6345for ac_func in pread64
6346do
6347echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6348echo "configure:6349: checking for $ac_func" >&5
14abd0fb
MK
6349if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6350 echo $ac_n "(cached) $ac_c" 1>&6
6351else
6352 cat > conftest.$ac_ext <<EOF
715d1656 6353#line 6354 "configure"
14abd0fb
MK
6354#include "confdefs.h"
6355/* System header to define __stub macros and hopefully few prototypes,
6356 which can conflict with char $ac_func(); below. */
6357#include <assert.h>
6358/* Override any gcc2 internal prototype to avoid an error. */
6359/* We use char because int might match the return type of a gcc2
6360 builtin and then its argument prototype would still apply. */
6361char $ac_func();
6362
6363int main() {
6364
6365/* The GNU C library defines this for functions which it implements
6366 to always fail with ENOSYS. Some functions are actually named
6367 something starting with __ and the normal name is an alias. */
6368#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6369choke me
6370#else
6371$ac_func();
6372#endif
6373
6374; return 0; }
6375EOF
715d1656 6376if { (eval echo configure:6377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6377 rm -rf conftest*
6378 eval "ac_cv_func_$ac_func=yes"
6379else
6380 echo "configure: failed program was:" >&5
6381 cat conftest.$ac_ext >&5
6382 rm -rf conftest*
6383 eval "ac_cv_func_$ac_func=no"
6384fi
6385rm -f conftest*
6386fi
6387
6388if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6389 echo "$ac_t""yes" 1>&6
6390 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6391 cat >> confdefs.h <<EOF
6392#define $ac_tr_func 1
6393EOF
6394
6395else
6396 echo "$ac_t""no" 1>&6
6397fi
6398done
6399
97bf5e38
MK
6400for ac_func in sbrk
6401do
6402echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6403echo "configure:6404: checking for $ac_func" >&5
97bf5e38 6404if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6405 echo $ac_n "(cached) $ac_c" 1>&6
6406else
6407 cat > conftest.$ac_ext <<EOF
715d1656 6408#line 6409 "configure"
c906108c 6409#include "confdefs.h"
97bf5e38
MK
6410/* System header to define __stub macros and hopefully few prototypes,
6411 which can conflict with char $ac_func(); below. */
6412#include <assert.h>
6413/* Override any gcc2 internal prototype to avoid an error. */
6414/* We use char because int might match the return type of a gcc2
6415 builtin and then its argument prototype would still apply. */
6416char $ac_func();
c906108c 6417
97bf5e38
MK
6418int main() {
6419
6420/* The GNU C library defines this for functions which it implements
6421 to always fail with ENOSYS. Some functions are actually named
6422 something starting with __ and the normal name is an alias. */
6423#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6424choke me
c906108c 6425#else
97bf5e38 6426$ac_func();
c906108c 6427#endif
97bf5e38 6428
c906108c
SS
6429; return 0; }
6430EOF
715d1656 6431if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6432 rm -rf conftest*
97bf5e38 6433 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6434else
6435 echo "configure: failed program was:" >&5
6436 cat conftest.$ac_ext >&5
6437 rm -rf conftest*
97bf5e38 6438 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6439fi
6440rm -f conftest*
6441fi
6442
97bf5e38
MK
6443if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6444 echo "$ac_t""yes" 1>&6
6445 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6446 cat >> confdefs.h <<EOF
6447#define $ac_tr_func 1
c906108c 6448EOF
97bf5e38
MK
6449
6450else
6451 echo "$ac_t""no" 1>&6
c906108c 6452fi
97bf5e38 6453done
c906108c 6454
97bf5e38
MK
6455for ac_func in setpgid setpgrp
6456do
6457echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6458echo "configure:6459: checking for $ac_func" >&5
97bf5e38 6459if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6460 echo $ac_n "(cached) $ac_c" 1>&6
6461else
6462 cat > conftest.$ac_ext <<EOF
715d1656 6463#line 6464 "configure"
c906108c 6464#include "confdefs.h"
97bf5e38
MK
6465/* System header to define __stub macros and hopefully few prototypes,
6466 which can conflict with char $ac_func(); below. */
6467#include <assert.h>
6468/* Override any gcc2 internal prototype to avoid an error. */
6469/* We use char because int might match the return type of a gcc2
6470 builtin and then its argument prototype would still apply. */
6471char $ac_func();
c906108c 6472
97bf5e38
MK
6473int main() {
6474
6475/* The GNU C library defines this for functions which it implements
6476 to always fail with ENOSYS. Some functions are actually named
6477 something starting with __ and the normal name is an alias. */
6478#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6479choke me
c906108c 6480#else
97bf5e38 6481$ac_func();
c906108c 6482#endif
97bf5e38 6483
c906108c
SS
6484; return 0; }
6485EOF
715d1656 6486if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6487 rm -rf conftest*
97bf5e38 6488 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6489else
6490 echo "configure: failed program was:" >&5
6491 cat conftest.$ac_ext >&5
6492 rm -rf conftest*
97bf5e38 6493 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6494fi
6495rm -f conftest*
6496fi
6497
97bf5e38
MK
6498if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6499 echo "$ac_t""yes" 1>&6
6500 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6501 cat >> confdefs.h <<EOF
6502#define $ac_tr_func 1
c906108c 6503EOF
97bf5e38
MK
6504
6505else
6506 echo "$ac_t""no" 1>&6
c906108c 6507fi
97bf5e38 6508done
c906108c 6509
e1ea1d75 6510for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6511do
6512echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6513echo "configure:6514: checking for $ac_func" >&5
97bf5e38 6514if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6515 echo $ac_n "(cached) $ac_c" 1>&6
6516else
6517 cat > conftest.$ac_ext <<EOF
715d1656 6518#line 6519 "configure"
c906108c 6519#include "confdefs.h"
97bf5e38
MK
6520/* System header to define __stub macros and hopefully few prototypes,
6521 which can conflict with char $ac_func(); below. */
6522#include <assert.h>
6523/* Override any gcc2 internal prototype to avoid an error. */
6524/* We use char because int might match the return type of a gcc2
6525 builtin and then its argument prototype would still apply. */
6526char $ac_func();
c906108c 6527
97bf5e38
MK
6528int main() {
6529
6530/* The GNU C library defines this for functions which it implements
6531 to always fail with ENOSYS. Some functions are actually named
6532 something starting with __ and the normal name is an alias. */
6533#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6534choke me
c906108c 6535#else
97bf5e38 6536$ac_func();
c906108c 6537#endif
97bf5e38 6538
c906108c
SS
6539; return 0; }
6540EOF
715d1656 6541if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6542 rm -rf conftest*
97bf5e38 6543 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6544else
6545 echo "configure: failed program was:" >&5
6546 cat conftest.$ac_ext >&5
6547 rm -rf conftest*
97bf5e38 6548 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6549fi
6550rm -f conftest*
6551fi
6552
97bf5e38
MK
6553if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6554 echo "$ac_t""yes" 1>&6
6555 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6556 cat >> confdefs.h <<EOF
6557#define $ac_tr_func 1
c906108c 6558EOF
e1ea1d75 6559
97bf5e38
MK
6560else
6561 echo "$ac_t""no" 1>&6
c906108c 6562fi
97bf5e38 6563done
c906108c 6564
97bf5e38
MK
6565for ac_func in socketpair
6566do
6567echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 6568echo "configure:6569: checking for $ac_func" >&5
97bf5e38 6569if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6570 echo $ac_n "(cached) $ac_c" 1>&6
6571else
6572 cat > conftest.$ac_ext <<EOF
715d1656 6573#line 6574 "configure"
c906108c 6574#include "confdefs.h"
97bf5e38
MK
6575/* System header to define __stub macros and hopefully few prototypes,
6576 which can conflict with char $ac_func(); below. */
6577#include <assert.h>
6578/* Override any gcc2 internal prototype to avoid an error. */
6579/* We use char because int might match the return type of a gcc2
6580 builtin and then its argument prototype would still apply. */
6581char $ac_func();
c906108c 6582
97bf5e38
MK
6583int main() {
6584
6585/* The GNU C library defines this for functions which it implements
6586 to always fail with ENOSYS. Some functions are actually named
6587 something starting with __ and the normal name is an alias. */
6588#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6589choke me
c906108c 6590#else
97bf5e38 6591$ac_func();
c906108c 6592#endif
97bf5e38 6593
c906108c
SS
6594; return 0; }
6595EOF
715d1656 6596if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6597 rm -rf conftest*
97bf5e38 6598 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6599else
6600 echo "configure: failed program was:" >&5
6601 cat conftest.$ac_ext >&5
6602 rm -rf conftest*
97bf5e38 6603 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6604fi
6605rm -f conftest*
6606fi
6607
97bf5e38
MK
6608if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6609 echo "$ac_t""yes" 1>&6
6610 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6611 cat >> confdefs.h <<EOF
6612#define $ac_tr_func 1
c906108c 6613EOF
97bf5e38
MK
6614
6615else
6616 echo "$ac_t""no" 1>&6
c906108c 6617fi
97bf5e38 6618done
c906108c 6619
97bf5e38
MK
6620
6621if test "$cross_compiling" = no; then
6622 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
715d1656 6623echo "configure:6624: checking whether setpgrp takes no argument" >&5
97bf5e38 6624if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6625 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6626else
6627 if test "$cross_compiling" = yes; then
6628 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6629else
6630 cat > conftest.$ac_ext <<EOF
715d1656 6631#line 6632 "configure"
c906108c
SS
6632#include "confdefs.h"
6633
c906108c
SS
6634#ifdef HAVE_UNISTD_H
6635#include <unistd.h>
6636#endif
97bf5e38
MK
6637
6638/*
6639 * If this system has a BSD-style setpgrp, which takes arguments, exit
6640 * successfully.
6641 */
6642main()
6643{
6644 if (setpgrp(1,1) == -1)
6645 exit(0);
6646 else
6647 exit(1);
6648}
6649
c906108c 6650EOF
715d1656 6651if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6652then
6653 ac_cv_func_setpgrp_void=no
c906108c
SS
6654else
6655 echo "configure: failed program was:" >&5
6656 cat conftest.$ac_ext >&5
97bf5e38
MK
6657 rm -fr conftest*
6658 ac_cv_func_setpgrp_void=yes
c906108c 6659fi
97bf5e38 6660rm -fr conftest*
c906108c
SS
6661fi
6662
97bf5e38
MK
6663
6664fi
6665
6666echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6667if test $ac_cv_func_setpgrp_void = yes; then
6668 cat >> confdefs.h <<\EOF
6669#define SETPGRP_VOID 1
c906108c
SS
6670EOF
6671
6672fi
6673
97bf5e38
MK
6674else
6675 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
715d1656 6676echo "configure:6677: checking whether setpgrp takes no argument" >&5
97bf5e38 6677if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6678 echo $ac_n "(cached) $ac_c" 1>&6
6679else
6680 cat > conftest.$ac_ext <<EOF
715d1656 6681#line 6682 "configure"
b83266a0
SS
6682#include "confdefs.h"
6683
b83266a0 6684#include <unistd.h>
97bf5e38 6685
b83266a0 6686int main() {
97bf5e38
MK
6687
6688 if (setpgrp(1,1) == -1)
6689 exit (0);
6690 else
6691 exit (1);
6692
b83266a0
SS
6693; return 0; }
6694EOF
715d1656 6695if { (eval echo configure:6696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6696 rm -rf conftest*
97bf5e38 6697 ac_cv_func_setpgrp_void=no
b83266a0
SS
6698else
6699 echo "configure: failed program was:" >&5
6700 cat conftest.$ac_ext >&5
6701 rm -rf conftest*
97bf5e38 6702 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6703fi
6704rm -f conftest*
6705fi
6706
97bf5e38
MK
6707echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6708if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6709 cat >> confdefs.h <<\EOF
97bf5e38 6710#define SETPGRP_VOID 1
b83266a0
SS
6711EOF
6712
97bf5e38 6713fi
b83266a0
SS
6714fi
6715
97bf5e38
MK
6716# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6717# since sigsetjmp might only be defined as a macro.
6718echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
715d1656 6719echo "configure:6720: checking for sigsetjmp" >&5
97bf5e38 6720if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6721 echo $ac_n "(cached) $ac_c" 1>&6
6722else
6723 cat > conftest.$ac_ext <<EOF
715d1656 6724#line 6725 "configure"
a4db0f07
RH
6725#include "confdefs.h"
6726
97bf5e38
MK
6727#include <setjmp.h>
6728
a4db0f07 6729int main() {
97bf5e38 6730sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6731; return 0; }
6732EOF
715d1656 6733if { (eval echo configure:6734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6734 rm -rf conftest*
97bf5e38 6735 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6736else
6737 echo "configure: failed program was:" >&5
6738 cat conftest.$ac_ext >&5
6739 rm -rf conftest*
97bf5e38 6740 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6741fi
6742rm -f conftest*
6743fi
6744
97bf5e38
MK
6745echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6746if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6747 cat >> confdefs.h <<\EOF
97bf5e38 6748#define HAVE_SIGSETJMP 1
a4db0f07
RH
6749EOF
6750
6751fi
c906108c 6752
06825bd1
MK
6753# Assume we'll default to using the included libiberty regex.
6754gdb_use_included_regex=yes
6755
6756# However, if the system regex is GNU regex, then default to *not*
6757# using the included regex.
6758echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
715d1656 6759echo "configure:6760: checking for GNU regex" >&5
06825bd1
MK
6760if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6761 echo $ac_n "(cached) $ac_c" 1>&6
6762else
6763 cat > conftest.$ac_ext <<EOF
715d1656 6764#line 6765 "configure"
06825bd1
MK
6765#include "confdefs.h"
6766#include <gnu-versions.h>
6767int main() {
6768#define REGEX_INTERFACE_VERSION 1
6769#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6770# error "Version mismatch"
6771#endif
6772; return 0; }
6773EOF
715d1656 6774if { (eval echo configure:6775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6775 rm -rf conftest*
6776 gdb_cv_have_gnu_regex=yes
6777else
6778 echo "configure: failed program was:" >&5
6779 cat conftest.$ac_ext >&5
6780 rm -rf conftest*
6781 gdb_cv_have_gnu_regex=no
6782fi
6783rm -f conftest*
6784fi
6785
6786echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6787if test $gdb_cv_have_gnu_regex = yes; then
6788 gdb_use_included_regex=no
6789fi
6790
6791# Check whether --with-included-regex or --without-included-regex was given.
6792if test "${with_included_regex+set}" = set; then
6793 withval="$with_included_regex"
6794 gdb_with_regex=$withval
6795else
6796 gdb_with_regex=$gdb_use_included_regex
6797fi
6798
6799if test "$gdb_with_regex" = yes; then
6800 cat >> confdefs.h <<\EOF
6801#define USE_INCLUDED_REGEX 1
6802EOF
6803
6804fi
6805
97bf5e38
MK
6806# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6807# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6808echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
715d1656 6809echo "configure:6810: checking for r_fs in struct reg" >&5
97bf5e38
MK
6810if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6811 echo $ac_n "(cached) $ac_c" 1>&6
6812else
6813 cat > conftest.$ac_ext <<EOF
715d1656 6814#line 6815 "configure"
c906108c 6815#include "confdefs.h"
97bf5e38
MK
6816#include <machine/reg.h>
6817int main() {
6818struct reg r; r.r_fs;
6819; return 0; }
c906108c 6820EOF
715d1656 6821if { (eval echo configure:6822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6822 rm -rf conftest*
97bf5e38 6823 gdb_cv_struct_reg_r_fs=yes
c906108c 6824else
97bf5e38
MK
6825 echo "configure: failed program was:" >&5
6826 cat conftest.$ac_ext >&5
c906108c 6827 rm -rf conftest*
97bf5e38 6828 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6829fi
6830rm -f conftest*
97bf5e38 6831fi
c906108c 6832
97bf5e38
MK
6833echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6834if test $gdb_cv_struct_reg_r_fs = yes; then
6835 cat >> confdefs.h <<\EOF
6836#define HAVE_STRUCT_REG_R_FS 1
6837EOF
6838
6839fi
6840echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
715d1656 6841echo "configure:6842: checking for r_gs in struct reg" >&5
97bf5e38
MK
6842if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6843 echo $ac_n "(cached) $ac_c" 1>&6
6844else
6845 cat > conftest.$ac_ext <<EOF
715d1656 6846#line 6847 "configure"
c906108c 6847#include "confdefs.h"
97bf5e38
MK
6848#include <machine/reg.h>
6849int main() {
6850struct reg r; r.r_gs;
6851; return 0; }
c906108c 6852EOF
715d1656 6853if { (eval echo configure:6854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6854 rm -rf conftest*
97bf5e38 6855 gdb_cv_struct_reg_r_gs=yes
c906108c 6856else
97bf5e38
MK
6857 echo "configure: failed program was:" >&5
6858 cat conftest.$ac_ext >&5
c906108c 6859 rm -rf conftest*
97bf5e38 6860 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6861fi
6862rm -f conftest*
c906108c 6863fi
c906108c 6864
97bf5e38
MK
6865echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6866if test $gdb_cv_struct_reg_r_gs = yes; then
6867 cat >> confdefs.h <<\EOF
6868#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6869EOF
6870
c906108c
SS
6871fi
6872
97bf5e38
MK
6873# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6874echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
715d1656 6875echo "configure:6876: checking for PTRACE_GETREGS" >&5
97bf5e38 6876if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6877 echo $ac_n "(cached) $ac_c" 1>&6
6878else
6879 cat > conftest.$ac_ext <<EOF
715d1656 6880#line 6881 "configure"
c906108c 6881#include "confdefs.h"
97bf5e38 6882#include <sys/ptrace.h>
c906108c 6883int main() {
97bf5e38 6884PTRACE_GETREGS;
c906108c
SS
6885; return 0; }
6886EOF
715d1656 6887if { (eval echo configure:6888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6888 rm -rf conftest*
97bf5e38 6889 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6890else
6891 echo "configure: failed program was:" >&5
6892 cat conftest.$ac_ext >&5
6893 rm -rf conftest*
97bf5e38 6894 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6895fi
6896rm -f conftest*
6897fi
6898
97bf5e38
MK
6899echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6900if test $gdb_cv_have_ptrace_getregs = yes; then
6901 cat >> confdefs.h <<\EOF
6902#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6903EOF
6904
97bf5e38 6905fi
c906108c 6906
97bf5e38
MK
6907# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6908echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
715d1656 6909echo "configure:6910: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6910if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6911 echo $ac_n "(cached) $ac_c" 1>&6
6912else
6913 cat > conftest.$ac_ext <<EOF
715d1656 6914#line 6915 "configure"
c906108c 6915#include "confdefs.h"
97bf5e38 6916#include <sys/ptrace.h>
c906108c 6917int main() {
97bf5e38 6918PTRACE_GETFPXREGS;
c906108c
SS
6919; return 0; }
6920EOF
715d1656 6921if { (eval echo configure:6922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6922 rm -rf conftest*
97bf5e38 6923 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6924else
6925 echo "configure: failed program was:" >&5
6926 cat conftest.$ac_ext >&5
6927 rm -rf conftest*
97bf5e38 6928 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6929fi
6930rm -f conftest*
6931fi
6932
97bf5e38
MK
6933echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6934if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6935 cat >> confdefs.h <<\EOF
6936#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6937EOF
6938
97bf5e38 6939fi
c906108c 6940
97bf5e38
MK
6941# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6942echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
715d1656 6943echo "configure:6944: checking for PT_GETDBREGS" >&5
97bf5e38 6944if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6945 echo $ac_n "(cached) $ac_c" 1>&6
6946else
6947 cat > conftest.$ac_ext <<EOF
715d1656 6948#line 6949 "configure"
c906108c 6949#include "confdefs.h"
97bf5e38
MK
6950#include <sys/types.h>
6951#include <sys/ptrace.h>
c906108c 6952int main() {
97bf5e38 6953PT_GETDBREGS;
c906108c
SS
6954; return 0; }
6955EOF
715d1656 6956if { (eval echo configure:6957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6957 rm -rf conftest*
97bf5e38 6958 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6959else
6960 echo "configure: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6962 rm -rf conftest*
97bf5e38 6963 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6964fi
6965rm -f conftest*
6966fi
6967
97bf5e38
MK
6968echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6969if test $gdb_cv_have_pt_getdbregs = yes; then
6970 cat >> confdefs.h <<\EOF
6971#define HAVE_PT_GETDBREGS 1
c906108c
SS
6972EOF
6973
97bf5e38 6974fi
c906108c 6975
97bf5e38
MK
6976# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6977echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
715d1656 6978echo "configure:6979: checking for PT_GETXMMREGS" >&5
97bf5e38 6979if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6980 echo $ac_n "(cached) $ac_c" 1>&6
6981else
6982 cat > conftest.$ac_ext <<EOF
715d1656 6983#line 6984 "configure"
c906108c 6984#include "confdefs.h"
97bf5e38
MK
6985#include <sys/types.h>
6986#include <sys/ptrace.h>
c906108c 6987int main() {
97bf5e38 6988PT_GETXMMREGS;
c906108c
SS
6989; return 0; }
6990EOF
715d1656 6991if { (eval echo configure:6992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6992 rm -rf conftest*
97bf5e38 6993 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6994else
6995 echo "configure: failed program was:" >&5
6996 cat conftest.$ac_ext >&5
6997 rm -rf conftest*
97bf5e38 6998 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6999fi
7000rm -f conftest*
7001fi
7002
97bf5e38
MK
7003echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7004if test $gdb_cv_have_pt_getxmmregs = yes; then
7005 cat >> confdefs.h <<\EOF
7006#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7007EOF
7008
97bf5e38 7009fi
c906108c 7010
97bf5e38
MK
7011
7012echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
715d1656 7013echo "configure:7014: checking whether malloc must be declared" >&5
97bf5e38 7014if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7015 echo $ac_n "(cached) $ac_c" 1>&6
7016else
7017 cat > conftest.$ac_ext <<EOF
715d1656 7018#line 7019 "configure"
3862412b 7019#include "confdefs.h"
e17bf198 7020
97bf5e38
MK
7021#include <stdio.h>
7022#ifdef HAVE_STRING_H
7023#include <string.h>
7024#else
7025#ifdef HAVE_STRINGS_H
7026#include <strings.h>
7027#endif
7028#endif
7029#ifdef HAVE_STDLIB_H
7030#include <stdlib.h>
7031#endif
7032#ifdef HAVE_UNISTD_H
7033#include <unistd.h>
7034#endif
3862412b 7035int main() {
97bf5e38 7036char *(*pfn) = (char *(*)) malloc
3862412b
MK
7037; return 0; }
7038EOF
715d1656 7039if { (eval echo configure:7040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7040 rm -rf conftest*
97bf5e38 7041 bfd_cv_decl_needed_malloc=no
3862412b
MK
7042else
7043 echo "configure: failed program was:" >&5
7044 cat conftest.$ac_ext >&5
7045 rm -rf conftest*
97bf5e38 7046 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7047fi
7048rm -f conftest*
7049fi
7050
97bf5e38
MK
7051echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7052if test $bfd_cv_decl_needed_malloc = yes; then
7053 cat >> confdefs.h <<\EOF
7054#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7055EOF
7056
97bf5e38 7057fi
3862412b 7058
97bf5e38 7059echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
715d1656 7060echo "configure:7061: checking whether realloc must be declared" >&5
97bf5e38 7061if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7062 echo $ac_n "(cached) $ac_c" 1>&6
7063else
7064 cat > conftest.$ac_ext <<EOF
715d1656 7065#line 7066 "configure"
3862412b 7066#include "confdefs.h"
e17bf198 7067
97bf5e38
MK
7068#include <stdio.h>
7069#ifdef HAVE_STRING_H
7070#include <string.h>
7071#else
7072#ifdef HAVE_STRINGS_H
7073#include <strings.h>
7074#endif
7075#endif
7076#ifdef HAVE_STDLIB_H
7077#include <stdlib.h>
7078#endif
7079#ifdef HAVE_UNISTD_H
7080#include <unistd.h>
7081#endif
3862412b 7082int main() {
97bf5e38 7083char *(*pfn) = (char *(*)) realloc
3862412b
MK
7084; return 0; }
7085EOF
715d1656 7086if { (eval echo configure:7087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7087 rm -rf conftest*
97bf5e38 7088 bfd_cv_decl_needed_realloc=no
3862412b
MK
7089else
7090 echo "configure: failed program was:" >&5
7091 cat conftest.$ac_ext >&5
7092 rm -rf conftest*
97bf5e38 7093 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7094fi
7095rm -f conftest*
7096fi
7097
97bf5e38
MK
7098echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7099if test $bfd_cv_decl_needed_realloc = yes; then
7100 cat >> confdefs.h <<\EOF
7101#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7102EOF
7103
97bf5e38 7104fi
3862412b 7105
97bf5e38 7106echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
715d1656 7107echo "configure:7108: checking whether free must be declared" >&5
97bf5e38 7108if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7109 echo $ac_n "(cached) $ac_c" 1>&6
7110else
7111 cat > conftest.$ac_ext <<EOF
715d1656 7112#line 7113 "configure"
451928c5 7113#include "confdefs.h"
e17bf198 7114
97bf5e38
MK
7115#include <stdio.h>
7116#ifdef HAVE_STRING_H
7117#include <string.h>
7118#else
7119#ifdef HAVE_STRINGS_H
7120#include <strings.h>
7121#endif
7122#endif
7123#ifdef HAVE_STDLIB_H
7124#include <stdlib.h>
7125#endif
7126#ifdef HAVE_UNISTD_H
7127#include <unistd.h>
7128#endif
451928c5 7129int main() {
97bf5e38 7130char *(*pfn) = (char *(*)) free
451928c5
AC
7131; return 0; }
7132EOF
715d1656 7133if { (eval echo configure:7134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7134 rm -rf conftest*
97bf5e38 7135 bfd_cv_decl_needed_free=no
451928c5
AC
7136else
7137 echo "configure: failed program was:" >&5
7138 cat conftest.$ac_ext >&5
7139 rm -rf conftest*
97bf5e38 7140 bfd_cv_decl_needed_free=yes
451928c5
AC
7141fi
7142rm -f conftest*
7143fi
7144
97bf5e38
MK
7145echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7146if test $bfd_cv_decl_needed_free = yes; then
7147 cat >> confdefs.h <<\EOF
7148#define NEED_DECLARATION_FREE 1
451928c5
AC
7149EOF
7150
97bf5e38 7151fi
451928c5 7152
97bf5e38 7153echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
715d1656 7154echo "configure:7155: checking whether strerror must be declared" >&5
97bf5e38 7155if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7156 echo $ac_n "(cached) $ac_c" 1>&6
7157else
7158 cat > conftest.$ac_ext <<EOF
715d1656 7159#line 7160 "configure"
451928c5 7160#include "confdefs.h"
e17bf198 7161
97bf5e38
MK
7162#include <stdio.h>
7163#ifdef HAVE_STRING_H
7164#include <string.h>
7165#else
7166#ifdef HAVE_STRINGS_H
7167#include <strings.h>
7168#endif
7169#endif
7170#ifdef HAVE_STDLIB_H
7171#include <stdlib.h>
7172#endif
7173#ifdef HAVE_UNISTD_H
7174#include <unistd.h>
7175#endif
451928c5 7176int main() {
97bf5e38 7177char *(*pfn) = (char *(*)) strerror
451928c5
AC
7178; return 0; }
7179EOF
715d1656 7180if { (eval echo configure:7181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7181 rm -rf conftest*
97bf5e38 7182 bfd_cv_decl_needed_strerror=no
451928c5
AC
7183else
7184 echo "configure: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
7186 rm -rf conftest*
97bf5e38 7187 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7188fi
7189rm -f conftest*
7190fi
7191
97bf5e38
MK
7192echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7193if test $bfd_cv_decl_needed_strerror = yes; then
7194 cat >> confdefs.h <<\EOF
7195#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7196EOF
7197
97bf5e38 7198fi
451928c5 7199
97bf5e38 7200echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
715d1656 7201echo "configure:7202: checking whether strdup must be declared" >&5
97bf5e38 7202if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7203 echo $ac_n "(cached) $ac_c" 1>&6
7204else
7205 cat > conftest.$ac_ext <<EOF
715d1656 7206#line 7207 "configure"
3862412b 7207#include "confdefs.h"
e17bf198 7208
97bf5e38
MK
7209#include <stdio.h>
7210#ifdef HAVE_STRING_H
7211#include <string.h>
7212#else
7213#ifdef HAVE_STRINGS_H
7214#include <strings.h>
7215#endif
7216#endif
7217#ifdef HAVE_STDLIB_H
7218#include <stdlib.h>
7219#endif
7220#ifdef HAVE_UNISTD_H
7221#include <unistd.h>
7222#endif
3862412b 7223int main() {
97bf5e38 7224char *(*pfn) = (char *(*)) strdup
3862412b
MK
7225; return 0; }
7226EOF
715d1656 7227if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7228 rm -rf conftest*
97bf5e38 7229 bfd_cv_decl_needed_strdup=no
3862412b
MK
7230else
7231 echo "configure: failed program was:" >&5
7232 cat conftest.$ac_ext >&5
7233 rm -rf conftest*
97bf5e38 7234 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7235fi
7236rm -f conftest*
7237fi
7238
97bf5e38
MK
7239echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7240if test $bfd_cv_decl_needed_strdup = yes; then
7241 cat >> confdefs.h <<\EOF
7242#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7243EOF
7244
97bf5e38 7245fi
3862412b 7246
97bf5e38 7247echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
715d1656 7248echo "configure:7249: checking whether strstr must be declared" >&5
97bf5e38 7249if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7250 echo $ac_n "(cached) $ac_c" 1>&6
7251else
7252 cat > conftest.$ac_ext <<EOF
715d1656 7253#line 7254 "configure"
3862412b 7254#include "confdefs.h"
e17bf198 7255
97bf5e38
MK
7256#include <stdio.h>
7257#ifdef HAVE_STRING_H
7258#include <string.h>
7259#else
7260#ifdef HAVE_STRINGS_H
7261#include <strings.h>
7262#endif
7263#endif
7264#ifdef HAVE_STDLIB_H
7265#include <stdlib.h>
7266#endif
7267#ifdef HAVE_UNISTD_H
7268#include <unistd.h>
7269#endif
3862412b 7270int main() {
97bf5e38 7271char *(*pfn) = (char *(*)) strstr
3862412b
MK
7272; return 0; }
7273EOF
715d1656 7274if { (eval echo configure:7275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7275 rm -rf conftest*
97bf5e38 7276 bfd_cv_decl_needed_strstr=no
3862412b
MK
7277else
7278 echo "configure: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 rm -rf conftest*
97bf5e38 7281 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7282fi
7283rm -f conftest*
7284fi
7285
97bf5e38
MK
7286echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7287if test $bfd_cv_decl_needed_strstr = yes; then
7288 cat >> confdefs.h <<\EOF
7289#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7290EOF
7291
97bf5e38 7292fi
3862412b 7293
97bf5e38 7294echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
715d1656 7295echo "configure:7296: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7296if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7297 echo $ac_n "(cached) $ac_c" 1>&6
7298else
7299 cat > conftest.$ac_ext <<EOF
715d1656 7300#line 7301 "configure"
596c9d4b
KB
7301#include "confdefs.h"
7302
97bf5e38
MK
7303#include <stdio.h>
7304#ifdef HAVE_STRING_H
7305#include <string.h>
7306#else
7307#ifdef HAVE_STRINGS_H
7308#include <strings.h>
7309#endif
7310#endif
7311#ifdef HAVE_STDLIB_H
7312#include <stdlib.h>
7313#endif
7314#ifdef HAVE_UNISTD_H
7315#include <unistd.h>
7316#endif
596c9d4b 7317int main() {
97bf5e38 7318char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7319; return 0; }
7320EOF
715d1656 7321if { (eval echo configure:7322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7322 rm -rf conftest*
97bf5e38 7323 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7324else
7325 echo "configure: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7327 rm -rf conftest*
97bf5e38 7328 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7329fi
7330rm -f conftest*
7331fi
7332
97bf5e38
MK
7333echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7334if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7335 cat >> confdefs.h <<\EOF
7336#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7337EOF
7338
97bf5e38 7339fi
596c9d4b 7340
97bf5e38
MK
7341
7342# The following save_state_t checkery is only necessary for HPUX
7343# versions earlier than 10.20. When those fade from memory, this
7344# could be expunged. --jsm 1999-03-22
7345
7346echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
715d1656 7347echo "configure:7348: checking for HPUX save_state structure" >&5
97bf5e38 7348cat > conftest.$ac_ext <<EOF
715d1656 7349#line 7350 "configure"
97bf5e38
MK
7350#include "confdefs.h"
7351#include <machine/save_state.h>
7352EOF
7353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7354 egrep "save_state_t" >/dev/null 2>&1; then
7355 rm -rf conftest*
7356 gdb_cv_hpux_savestate=yes
7357else
7358 rm -rf conftest*
7359 gdb_cv_hpux_savestate=no
7360fi
7361rm -f conftest*
7362
7363cat > conftest.$ac_ext <<EOF
715d1656 7364#line 7365 "configure"
97bf5e38
MK
7365#include "confdefs.h"
7366#include <machine/save_state.h>
7367EOF
7368if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7369 egrep "ss_wide" >/dev/null 2>&1; then
7370 rm -rf conftest*
7371 gdb_cv_hpux_sswide=yes
7372else
7373 rm -rf conftest*
7374 gdb_cv_hpux_sswide=no
7375fi
7376rm -f conftest*
7377
7378if test $gdb_cv_hpux_savestate = yes
7379then
7380 cat >> confdefs.h <<\EOF
7381#define HAVE_STRUCT_SAVE_STATE_T 1
7382EOF
7383
7384fi
7385if test $gdb_cv_hpux_sswide = yes
7386then
7387 cat >> confdefs.h <<\EOF
7388#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7389EOF
7390
7391fi
7392echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7393
7394
7395# If we are configured native on GNU/Linux, work around problems with
7396# sys/procfs.h
7397# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7398
7399if test "${target}" = "${host}"; then
7400 case "${host}" in
7401 i[3456]86-*-linux*)
7402 cat >> confdefs.h <<\EOF
7403#define START_INFERIOR_TRAPS_EXPECTED 2
7404EOF
7405
7406 cat >> confdefs.h <<\EOF
7407#define sys_quotactl 1
7408EOF
7409
7410 ;;
7411 ia64-*-aix*)
7412 cat >> confdefs.h <<\EOF
7413#define NEW_PROC_API 1
7414EOF
7415
7416 ;;
7417 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7418 cat >> confdefs.h <<\EOF
7419#define NEW_PROC_API 1
7420EOF
7421
7422 ;;
7423 *-*-solaris2.[678])
7424 cat >> confdefs.h <<\EOF
7425#define NEW_PROC_API 1
7426EOF
7427
7428 ;;
7429 esac
7430fi
7431
7432if test "$ac_cv_header_sys_procfs_h" = yes; then
7433 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7434echo "configure:7435: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7435 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7436 echo $ac_n "(cached) $ac_c" 1>&6
7437else
7438 cat > conftest.$ac_ext <<EOF
715d1656 7439#line 7440 "configure"
596c9d4b
KB
7440#include "confdefs.h"
7441
7442#define _SYSCALL32
7443#include <sys/procfs.h>
7444int main() {
97bf5e38 7445pstatus_t avar
596c9d4b
KB
7446; return 0; }
7447EOF
715d1656 7448if { (eval echo configure:7449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7449 rm -rf conftest*
97bf5e38 7450 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7451else
7452 echo "configure: failed program was:" >&5
7453 cat conftest.$ac_ext >&5
7454 rm -rf conftest*
97bf5e38 7455 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7456
7457fi
7458rm -f conftest*
7459fi
7460
97bf5e38 7461 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7462 cat >> confdefs.h <<\EOF
97bf5e38 7463#define HAVE_PSTATUS_T 1
596c9d4b
KB
7464EOF
7465
7466 fi
97bf5e38 7467 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7468
97bf5e38 7469 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7470echo "configure:7471: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7471 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7472 echo $ac_n "(cached) $ac_c" 1>&6
7473else
7474 cat > conftest.$ac_ext <<EOF
715d1656 7475#line 7476 "configure"
596c9d4b
KB
7476#include "confdefs.h"
7477
7478#define _SYSCALL32
7479#include <sys/procfs.h>
7480int main() {
97bf5e38 7481prrun_t avar
596c9d4b
KB
7482; return 0; }
7483EOF
715d1656 7484if { (eval echo configure:7485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7485 rm -rf conftest*
97bf5e38 7486 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7487else
7488 echo "configure: failed program was:" >&5
7489 cat conftest.$ac_ext >&5
7490 rm -rf conftest*
97bf5e38 7491 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7492
7493fi
7494rm -f conftest*
7495fi
7496
97bf5e38 7497 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7498 cat >> confdefs.h <<\EOF
97bf5e38 7499#define HAVE_PRRUN_T 1
596c9d4b
KB
7500EOF
7501
7502 fi
97bf5e38 7503 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7504
97bf5e38 7505 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7506echo "configure:7507: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7507 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7508 echo $ac_n "(cached) $ac_c" 1>&6
7509else
7510 cat > conftest.$ac_ext <<EOF
715d1656 7511#line 7512 "configure"
596c9d4b
KB
7512#include "confdefs.h"
7513
7514#define _SYSCALL32
7515#include <sys/procfs.h>
7516int main() {
97bf5e38 7517gregset_t avar
596c9d4b
KB
7518; return 0; }
7519EOF
715d1656 7520if { (eval echo configure:7521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7521 rm -rf conftest*
97bf5e38 7522 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7523else
7524 echo "configure: failed program was:" >&5
7525 cat conftest.$ac_ext >&5
7526 rm -rf conftest*
97bf5e38 7527 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7528
7529fi
7530rm -f conftest*
7531fi
7532
97bf5e38 7533 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7534 cat >> confdefs.h <<\EOF
97bf5e38 7535#define HAVE_GREGSET_T 1
596c9d4b
KB
7536EOF
7537
7538 fi
97bf5e38 7539 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7540
97bf5e38 7541 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7542echo "configure:7543: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7543 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7544 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7545else
7546 cat > conftest.$ac_ext <<EOF
715d1656 7547#line 7548 "configure"
d84dd0c5 7548#include "confdefs.h"
97bf5e38
MK
7549
7550#define _SYSCALL32
d84dd0c5 7551#include <sys/procfs.h>
97bf5e38
MK
7552int main() {
7553fpregset_t avar
7554; return 0; }
d84dd0c5 7555EOF
715d1656 7556if { (eval echo configure:7557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7557 rm -rf conftest*
7558 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7559else
7560 echo "configure: failed program was:" >&5
7561 cat conftest.$ac_ext >&5
97bf5e38
MK
7562 rm -rf conftest*
7563 bfd_cv_have_sys_procfs_type_fpregset_t=no
7564
d84dd0c5 7565fi
97bf5e38 7566rm -f conftest*
d84dd0c5
MK
7567fi
7568
97bf5e38
MK
7569 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7570 cat >> confdefs.h <<\EOF
7571#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7572EOF
7573
97bf5e38
MK
7574 fi
7575 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7576
97bf5e38 7577 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7578echo "configure:7579: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7579 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7580 echo $ac_n "(cached) $ac_c" 1>&6
7581else
7582 cat > conftest.$ac_ext <<EOF
715d1656 7583#line 7584 "configure"
c906108c 7584#include "confdefs.h"
c906108c 7585
97bf5e38
MK
7586#define _SYSCALL32
7587#include <sys/procfs.h>
c906108c 7588int main() {
97bf5e38 7589prgregset_t avar
c906108c
SS
7590; return 0; }
7591EOF
715d1656 7592if { (eval echo configure:7593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7593 rm -rf conftest*
97bf5e38 7594 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7595else
7596 echo "configure: failed program was:" >&5
7597 cat conftest.$ac_ext >&5
7598 rm -rf conftest*
97bf5e38
MK
7599 bfd_cv_have_sys_procfs_type_prgregset_t=no
7600
c906108c
SS
7601fi
7602rm -f conftest*
7603fi
7604
97bf5e38
MK
7605 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7606 cat >> confdefs.h <<\EOF
7607#define HAVE_PRGREGSET_T 1
c906108c
SS
7608EOF
7609
97bf5e38
MK
7610 fi
7611 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7612
97bf5e38 7613 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7614echo "configure:7615: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7615 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7616 echo $ac_n "(cached) $ac_c" 1>&6
7617else
7618 cat > conftest.$ac_ext <<EOF
715d1656 7619#line 7620 "configure"
d45fe813 7620#include "confdefs.h"
97bf5e38
MK
7621
7622#define _SYSCALL32
7623#include <sys/procfs.h>
d45fe813 7624int main() {
97bf5e38 7625prfpregset_t avar
d45fe813
KB
7626; return 0; }
7627EOF
715d1656 7628if { (eval echo configure:7629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7629 rm -rf conftest*
97bf5e38 7630 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7631else
7632 echo "configure: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 rm -rf conftest*
97bf5e38
MK
7635 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7636
d45fe813
KB
7637fi
7638rm -f conftest*
7639fi
7640
97bf5e38
MK
7641 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7642 cat >> confdefs.h <<\EOF
7643#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7644EOF
7645
97bf5e38
MK
7646 fi
7647 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7648
97bf5e38 7649 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7650echo "configure:7651: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7651 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7652 echo $ac_n "(cached) $ac_c" 1>&6
7653else
7654 cat > conftest.$ac_ext <<EOF
715d1656 7655#line 7656 "configure"
d45fe813 7656#include "confdefs.h"
97bf5e38
MK
7657
7658#define _SYSCALL32
7659#include <sys/procfs.h>
d45fe813 7660int main() {
97bf5e38 7661prgregset32_t avar
d45fe813
KB
7662; return 0; }
7663EOF
715d1656 7664if { (eval echo configure:7665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7665 rm -rf conftest*
97bf5e38 7666 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7667else
7668 echo "configure: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670 rm -rf conftest*
97bf5e38
MK
7671 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7672
d45fe813
KB
7673fi
7674rm -f conftest*
7675fi
7676
97bf5e38
MK
7677 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7678 cat >> confdefs.h <<\EOF
7679#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7680EOF
7681
97bf5e38
MK
7682 fi
7683 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7684
97bf5e38 7685 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7686echo "configure:7687: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7687 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7688 echo $ac_n "(cached) $ac_c" 1>&6
7689else
7690 cat > conftest.$ac_ext <<EOF
715d1656 7691#line 7692 "configure"
d45fe813 7692#include "confdefs.h"
97bf5e38
MK
7693
7694#define _SYSCALL32
7695#include <sys/procfs.h>
d45fe813 7696int main() {
97bf5e38 7697prfpregset32_t avar
d45fe813
KB
7698; return 0; }
7699EOF
715d1656 7700if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7701 rm -rf conftest*
97bf5e38 7702 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7703else
7704 echo "configure: failed program was:" >&5
7705 cat conftest.$ac_ext >&5
7706 rm -rf conftest*
97bf5e38
MK
7707 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7708
d45fe813
KB
7709fi
7710rm -f conftest*
7711fi
7712
97bf5e38
MK
7713 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7714 cat >> confdefs.h <<\EOF
7715#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7716EOF
7717
97bf5e38
MK
7718 fi
7719 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7720
97bf5e38 7721 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7722echo "configure:7723: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7723 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7724 echo $ac_n "(cached) $ac_c" 1>&6
7725else
7726 cat > conftest.$ac_ext <<EOF
715d1656 7727#line 7728 "configure"
d45fe813 7728#include "confdefs.h"
97bf5e38 7729
d45fe813 7730#define _SYSCALL32
97bf5e38 7731#include <sys/procfs.h>
d45fe813 7732int main() {
97bf5e38 7733lwpid_t avar
d45fe813
KB
7734; return 0; }
7735EOF
715d1656 7736if { (eval echo configure:7737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7737 rm -rf conftest*
97bf5e38 7738 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7739else
7740 echo "configure: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7742 rm -rf conftest*
97bf5e38
MK
7743 bfd_cv_have_sys_procfs_type_lwpid_t=no
7744
d45fe813
KB
7745fi
7746rm -f conftest*
7747fi
7748
97bf5e38
MK
7749 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7750 cat >> confdefs.h <<\EOF
7751#define HAVE_LWPID_T 1
d45fe813
KB
7752EOF
7753
97bf5e38
MK
7754 fi
7755 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7756
97bf5e38 7757 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7758echo "configure:7759: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7759 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7760 echo $ac_n "(cached) $ac_c" 1>&6
7761else
7762 cat > conftest.$ac_ext <<EOF
715d1656 7763#line 7764 "configure"
c906108c
SS
7764#include "confdefs.h"
7765
97bf5e38
MK
7766#define _SYSCALL32
7767#include <sys/procfs.h>
c906108c 7768int main() {
97bf5e38 7769psaddr_t avar
c906108c
SS
7770; return 0; }
7771EOF
715d1656 7772if { (eval echo configure:7773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7773 rm -rf conftest*
97bf5e38 7774 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7775else
7776 echo "configure: failed program was:" >&5
7777 cat conftest.$ac_ext >&5
7778 rm -rf conftest*
97bf5e38
MK
7779 bfd_cv_have_sys_procfs_type_psaddr_t=no
7780
c906108c
SS
7781fi
7782rm -f conftest*
7783fi
7784
97bf5e38
MK
7785 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7786 cat >> confdefs.h <<\EOF
7787#define HAVE_PSADDR_T 1
c906108c
SS
7788EOF
7789
97bf5e38
MK
7790 fi
7791 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7792
97bf5e38 7793 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7794echo "configure:7795: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7795 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7796 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7797else
7798 cat > conftest.$ac_ext <<EOF
715d1656 7799#line 7800 "configure"
c906108c
SS
7800#include "confdefs.h"
7801
97bf5e38
MK
7802#define _SYSCALL32
7803#include <sys/procfs.h>
7804int main() {
7805prsysent_t avar
7806; return 0; }
c906108c 7807EOF
715d1656 7808if { (eval echo configure:7809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7809 rm -rf conftest*
7810 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7811else
7812 echo "configure: failed program was:" >&5
7813 cat conftest.$ac_ext >&5
97bf5e38
MK
7814 rm -rf conftest*
7815 bfd_cv_have_sys_procfs_type_prsysent_t=no
7816
c906108c 7817fi
97bf5e38 7818rm -f conftest*
c906108c
SS
7819fi
7820
97bf5e38
MK
7821 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7822 cat >> confdefs.h <<\EOF
7823#define HAVE_PRSYSENT_T 1
c906108c
SS
7824EOF
7825
97bf5e38
MK
7826 fi
7827 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7828
97bf5e38 7829 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7830echo "configure:7831: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7831 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7832 echo $ac_n "(cached) $ac_c" 1>&6
7833else
7834 cat > conftest.$ac_ext <<EOF
715d1656 7835#line 7836 "configure"
c906108c
SS
7836#include "confdefs.h"
7837
97bf5e38
MK
7838#define _SYSCALL32
7839#include <sys/procfs.h>
c906108c 7840int main() {
97bf5e38 7841pr_sigset_t avar
c906108c
SS
7842; return 0; }
7843EOF
715d1656 7844if { (eval echo configure:7845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7845 rm -rf conftest*
97bf5e38 7846 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7847else
7848 echo "configure: failed program was:" >&5
7849 cat conftest.$ac_ext >&5
7850 rm -rf conftest*
97bf5e38
MK
7851 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7852
c906108c
SS
7853fi
7854rm -f conftest*
7855fi
7856
97bf5e38
MK
7857 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7858 cat >> confdefs.h <<\EOF
7859#define HAVE_PR_SIGSET_T 1
c906108c
SS
7860EOF
7861
97bf5e38
MK
7862 fi
7863 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7864
97bf5e38 7865 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7866echo "configure:7867: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7867 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7868 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7869else
7870 cat > conftest.$ac_ext <<EOF
715d1656 7871#line 7872 "configure"
c906108c
SS
7872#include "confdefs.h"
7873
97bf5e38
MK
7874#define _SYSCALL32
7875#include <sys/procfs.h>
7876int main() {
7877pr_sigaction64_t avar
7878; return 0; }
c906108c 7879EOF
715d1656 7880if { (eval echo configure:7881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7881 rm -rf conftest*
7882 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7883else
7884 echo "configure: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
97bf5e38
MK
7886 rm -rf conftest*
7887 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7888
c906108c 7889fi
97bf5e38 7890rm -f conftest*
c906108c
SS
7891fi
7892
97bf5e38
MK
7893 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7894 cat >> confdefs.h <<\EOF
7895#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7896EOF
7897
97bf5e38
MK
7898 fi
7899 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7900
7901 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
715d1656 7902echo "configure:7903: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7903 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7904 echo $ac_n "(cached) $ac_c" 1>&6
7905else
7906 cat > conftest.$ac_ext <<EOF
715d1656 7907#line 7908 "configure"
97bf5e38
MK
7908#include "confdefs.h"
7909
7910#define _SYSCALL32
7911#include <sys/procfs.h>
7912int main() {
7913pr_siginfo64_t avar
7914; return 0; }
7915EOF
715d1656 7916if { (eval echo configure:7917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7917 rm -rf conftest*
7918 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7919else
7920 echo "configure: failed program was:" >&5
7921 cat conftest.$ac_ext >&5
7922 rm -rf conftest*
7923 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7924
7925fi
7926rm -f conftest*
c906108c 7927fi
c906108c 7928
97bf5e38
MK
7929 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7930 cat >> confdefs.h <<\EOF
7931#define HAVE_PR_SIGINFO64_T 1
7932EOF
c906108c 7933
97bf5e38
MK
7934 fi
7935 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7936
7937
7938
7939
7940
7941 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7942 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
715d1656 7943echo "configure:7944: checking whether prfpregset_t type is broken" >&5
97bf5e38 7944 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7945 echo $ac_n "(cached) $ac_c" 1>&6
7946else
7947 if test "$cross_compiling" = yes; then
97bf5e38 7948 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7949else
7950 cat > conftest.$ac_ext <<EOF
715d1656 7951#line 7952 "configure"
c906108c 7952#include "confdefs.h"
97bf5e38
MK
7953#include <sys/procfs.h>
7954 int main ()
7955 {
7956 if (sizeof (prfpregset_t) == sizeof (void *))
7957 return 1;
7958 return 0;
7959 }
c906108c 7960EOF
715d1656 7961if { (eval echo configure:7962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7962then
97bf5e38 7963 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7964else
7965 echo "configure: failed program was:" >&5
7966 cat conftest.$ac_ext >&5
7967 rm -fr conftest*
97bf5e38 7968 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7969fi
7970rm -fr conftest*
7971fi
7972
7973fi
7974
97bf5e38
MK
7975 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7976 if test $gdb_cv_prfpregset_t_broken = yes; then
7977 cat >> confdefs.h <<\EOF
7978#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7979EOF
7980
97bf5e38
MK
7981 fi
7982 fi
c906108c 7983
97bf5e38
MK
7984
7985 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
715d1656 7986echo "configure:7987: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7987 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7988 echo $ac_n "(cached) $ac_c" 1>&6
7989else
7990 cat > conftest.$ac_ext <<EOF
715d1656 7991#line 7992 "configure"
c906108c 7992#include "confdefs.h"
97bf5e38
MK
7993#include <unistd.h>
7994#include <sys/types.h>
7995#include <sys/procfs.h>
7996
7997int main() {
7998
7999 int dummy;;
8000 dummy = ioctl(0, PIOCSET, &dummy);
8001
8002; return 0; }
c906108c 8003EOF
715d1656 8004if { (eval echo configure:8005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8005 rm -rf conftest*
97bf5e38 8006 gdb_cv_have_procfs_piocset=yes
c906108c 8007else
c906108c
SS
8008 echo "configure: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8010 rm -rf conftest*
97bf5e38 8011 gdb_cv_have_procfs_piocset=no
c906108c
SS
8012fi
8013rm -f conftest*
8014fi
97bf5e38
MK
8015
8016 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8017 if test $gdb_cv_have_procfs_piocset = yes; then
8018 cat >> confdefs.h <<\EOF
8019#define HAVE_PROCFS_PIOCSET 1
c906108c 8020EOF
97bf5e38
MK
8021
8022 fi
c906108c 8023fi
c906108c 8024
97bf5e38
MK
8025if test ${host} = ${target} ; then
8026
8027 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
715d1656 8028echo "configure:8029: checking for member l_addr in struct link_map" >&5
97bf5e38 8029 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8030 echo $ac_n "(cached) $ac_c" 1>&6
8031else
8032 cat > conftest.$ac_ext <<EOF
715d1656 8033#line 8034 "configure"
c906108c 8034#include "confdefs.h"
97bf5e38 8035#include <link.h>
c906108c 8036int main() {
97bf5e38 8037struct link_map lm; (void) lm.l_addr;
c906108c
SS
8038; return 0; }
8039EOF
715d1656 8040if { (eval echo configure:8041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8041 rm -rf conftest*
97bf5e38 8042 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8043else
8044 echo "configure: failed program was:" >&5
8045 cat conftest.$ac_ext >&5
8046 rm -rf conftest*
97bf5e38 8047 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8048fi
8049rm -f conftest*
8050fi
8051
97bf5e38
MK
8052 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8053 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8054 cat >> confdefs.h <<\EOF
8055#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8056EOF
97bf5e38
MK
8057
8058 fi
8059
8060
8061 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
715d1656 8062echo "configure:8063: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8063 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8064 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8065else
97bf5e38 8066 cat > conftest.$ac_ext <<EOF
715d1656 8067#line 8068 "configure"
97bf5e38
MK
8068#include "confdefs.h"
8069#include <sys/types.h>
8070#include <link.h>
8071int main() {
8072struct link_map lm; (void) lm.lm_addr;
8073; return 0; }
8074EOF
715d1656 8075if { (eval echo configure:8076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8076 rm -rf conftest*
8077 gdb_cv_have_struct_link_map_with_lm_members=yes
8078else
8079 echo "configure: failed program was:" >&5
8080 cat conftest.$ac_ext >&5
8081 rm -rf conftest*
8082 gdb_cv_have_struct_link_map_with_lm_members=no
8083fi
8084rm -f conftest*
c906108c 8085fi
c906108c 8086
97bf5e38
MK
8087 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8088 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8089 cat >> confdefs.h <<\EOF
8090#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8091EOF
8092
8093 fi
8094
8095
8096 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
715d1656 8097echo "configure:8098: checking for member som_addr in struct so_map" >&5
97bf5e38 8098 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8099 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8100else
8101 cat > conftest.$ac_ext <<EOF
715d1656 8102#line 8103 "configure"
c906108c 8103#include "confdefs.h"
97bf5e38
MK
8104#include <sys/types.h>
8105#ifdef HAVE_NLIST_H
8106#include <nlist.h>
8107#endif
8108#include <link.h>
8109int main() {
8110struct so_map lm; (void) lm.som_addr;
8111; return 0; }
8112EOF
715d1656 8113if { (eval echo configure:8114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8114 rm -rf conftest*
8115 gdb_cv_have_struct_so_map_with_som_members=yes
8116else
8117 echo "configure: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8119 rm -rf conftest*
8120 gdb_cv_have_struct_so_map_with_som_members=no
8121fi
8122rm -f conftest*
8123fi
c906108c 8124
97bf5e38
MK
8125 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8126 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8127 cat >> confdefs.h <<\EOF
8128#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8129EOF
c906108c 8130
97bf5e38 8131 fi
c906108c 8132
97bf5e38
MK
8133
8134 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
715d1656 8135echo "configure:8136: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8136 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8137 echo $ac_n "(cached) $ac_c" 1>&6
8138else
8139 cat > conftest.$ac_ext <<EOF
715d1656 8140#line 8141 "configure"
97bf5e38
MK
8141#include "confdefs.h"
8142#define _SYSCALL32
8143#include <sys/link.h>
8144int main() {
8145struct link_map32 l;
8146; return 0; }
8147EOF
715d1656 8148if { (eval echo configure:8149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8149 rm -rf conftest*
8150 gdb_cv_have_struct_link_map32=yes
8151else
8152 echo "configure: failed program was:" >&5
8153 cat conftest.$ac_ext >&5
8154 rm -rf conftest*
8155 gdb_cv_have_struct_link_map32=no
8156fi
8157rm -f conftest*
8158fi
c906108c 8159
97bf5e38
MK
8160 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8161 if test $gdb_cv_have_struct_link_map32 = yes; then
8162 cat >> confdefs.h <<\EOF
8163#define HAVE_STRUCT_LINK_MAP32 1
8164EOF
c906108c 8165
97bf5e38
MK
8166 cat >> confdefs.h <<\EOF
8167#define _SYSCALL32 1
8168EOF
c906108c 8169
97bf5e38
MK
8170 fi
8171fi
c906108c 8172
c906108c 8173
97bf5e38 8174echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
715d1656 8175echo "configure:8176: checking for long long support in compiler" >&5
97bf5e38
MK
8176if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8177 echo $ac_n "(cached) $ac_c" 1>&6
8178else
8179 cat > conftest.$ac_ext <<EOF
715d1656 8180#line 8181 "configure"
97bf5e38 8181#include "confdefs.h"
c906108c 8182
97bf5e38 8183int main() {
c906108c 8184
97bf5e38
MK
8185 extern long long foo;
8186 switch (foo & 2) { case 0: return 1; }
c906108c 8187
97bf5e38
MK
8188; return 0; }
8189EOF
715d1656 8190if { (eval echo configure:8191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8191 rm -rf conftest*
8192 gdb_cv_c_long_long=yes
8193else
8194 echo "configure: failed program was:" >&5
8195 cat conftest.$ac_ext >&5
8196 rm -rf conftest*
8197 gdb_cv_c_long_long=no
8198fi
8199rm -f conftest*
8200fi
c906108c 8201
97bf5e38
MK
8202echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8203if test $gdb_cv_c_long_long = yes; then
8204 cat >> confdefs.h <<\EOF
8205#define CC_HAS_LONG_LONG 1
8206EOF
8207
8208fi
8209
8210
8211echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
715d1656 8212echo "configure:8213: checking for long long support in printf" >&5
97bf5e38
MK
8213if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8214 echo $ac_n "(cached) $ac_c" 1>&6
8215else
8216 if test "$cross_compiling" = yes; then
8217 gdb_cv_printf_has_long_long=no
8218else
8219 cat > conftest.$ac_ext <<EOF
715d1656 8220#line 8221 "configure"
97bf5e38
MK
8221#include "confdefs.h"
8222
8223int main () {
8224 char buf[32];
8225 long long l = 0;
8226 l = (l << 16) + 0x0123;
8227 l = (l << 16) + 0x4567;
8228 l = (l << 16) + 0x89ab;
8229 l = (l << 16) + 0xcdef;
8230 sprintf (buf, "0x%016llx", l);
8231 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8232}
97bf5e38 8233EOF
715d1656 8234if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8235then
8236 gdb_cv_printf_has_long_long=yes
8237else
8238 echo "configure: failed program was:" >&5
8239 cat conftest.$ac_ext >&5
8240 rm -fr conftest*
8241 gdb_cv_printf_has_long_long=no
8242fi
8243rm -fr conftest*
8244fi
8245
8246fi
8247
8248if test $gdb_cv_printf_has_long_long = yes; then
8249 cat >> confdefs.h <<\EOF
8250#define PRINTF_HAS_LONG_LONG 1
8251EOF
8252
8253fi
8254echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8255
8256
8257echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
715d1656 8258echo "configure:8259: checking for long double support in compiler" >&5
97bf5e38
MK
8259if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8260 echo $ac_n "(cached) $ac_c" 1>&6
8261else
8262 cat > conftest.$ac_ext <<EOF
715d1656 8263#line 8264 "configure"
97bf5e38
MK
8264#include "confdefs.h"
8265
8266int main() {
8267long double foo;
8268; return 0; }
8269EOF
715d1656 8270if { (eval echo configure:8271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8271 rm -rf conftest*
8272 ac_cv_c_long_double=yes
8273else
8274 echo "configure: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 rm -rf conftest*
8277 ac_cv_c_long_double=no
8278fi
8279rm -f conftest*
8280fi
c906108c 8281
97bf5e38
MK
8282echo "$ac_t""$ac_cv_c_long_double" 1>&6
8283if test $ac_cv_c_long_double = yes; then
8284 cat >> confdefs.h <<\EOF
8285#define HAVE_LONG_DOUBLE 1
c906108c 8286EOF
97bf5e38
MK
8287
8288fi
8289
8290
8291echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
715d1656 8292echo "configure:8293: checking for long double support in printf" >&5
97bf5e38
MK
8293if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8294 echo $ac_n "(cached) $ac_c" 1>&6
8295else
8296 if test "$cross_compiling" = yes; then
8297 gdb_cv_printf_has_long_double=no
8298else
8299 cat > conftest.$ac_ext <<EOF
715d1656 8300#line 8301 "configure"
97bf5e38
MK
8301#include "confdefs.h"
8302
8303int main () {
8304 char buf[16];
8305 long double f = 3.141592653;
8306 sprintf (buf, "%Lg", f);
8307 return (strncmp ("3.14159", buf, 7));
8308}
8309EOF
715d1656 8310if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8311then
97bf5e38 8312 gdb_cv_printf_has_long_double=yes
c906108c
SS
8313else
8314 echo "configure: failed program was:" >&5
8315 cat conftest.$ac_ext >&5
8316 rm -fr conftest*
97bf5e38 8317 gdb_cv_printf_has_long_double=no
c906108c
SS
8318fi
8319rm -fr conftest*
8320fi
8321
8322fi
8323
97bf5e38 8324if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8325 cat >> confdefs.h <<\EOF
97bf5e38
MK
8326#define PRINTF_HAS_LONG_DOUBLE 1
8327EOF
8328
8329fi
8330echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8331
8332
8333echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
715d1656 8334echo "configure:8335: checking for long double support in scanf" >&5
97bf5e38
MK
8335if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8336 echo $ac_n "(cached) $ac_c" 1>&6
8337else
8338 if test "$cross_compiling" = yes; then
8339 gdb_cv_scanf_has_long_double=no
8340else
8341 cat > conftest.$ac_ext <<EOF
715d1656 8342#line 8343 "configure"
97bf5e38
MK
8343#include "confdefs.h"
8344
8345int main () {
8346 char *buf = "3.141592653";
8347 long double f = 0;
8348 sscanf (buf, "%Lg", &f);
8349 return !(f > 3.14159 && f < 3.14160);
8350}
c906108c 8351EOF
715d1656 8352if { (eval echo configure:8353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8353then
8354 gdb_cv_scanf_has_long_double=yes
8355else
8356 echo "configure: failed program was:" >&5
8357 cat conftest.$ac_ext >&5
8358 rm -fr conftest*
8359 gdb_cv_scanf_has_long_double=no
8360fi
8361rm -fr conftest*
8362fi
c906108c
SS
8363
8364fi
8365
97bf5e38
MK
8366if test $gdb_cv_scanf_has_long_double = yes; then
8367 cat >> confdefs.h <<\EOF
8368#define SCANF_HAS_LONG_DOUBLE 1
8369EOF
8370
8371fi
8372echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8373
438013df
AO
8374case ${host_os} in
8375aix*)
8376 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
715d1656 8377echo "configure:8378: checking for -bbigtoc option" >&5
438013df
AO
8378if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8379 echo $ac_n "(cached) $ac_c" 1>&6
8380else
8381
8382 SAVE_LDFLAGS=$LDFLAGS
8383
8384 case $GCC in
8385 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8386 *) gdb_cv_bigtoc=-bbigtoc ;;
8387 esac
8388
8389 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8390 cat > conftest.$ac_ext <<EOF
715d1656 8391#line 8392 "configure"
438013df
AO
8392#include "confdefs.h"
8393
8394int main() {
8395int i;
8396; return 0; }
8397EOF
715d1656 8398if { (eval echo configure:8399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8399 :
8400else
8401 echo "configure: failed program was:" >&5
8402 cat conftest.$ac_ext >&5
8403 rm -rf conftest*
8404 gdb_cv_bigtoc=
8405fi
8406rm -f conftest*
8407
8408fi
8409
8410echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8411 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8412 ;;
8413esac
8414
c906108c
SS
8415
8416
8417if test ${build} = ${host} -a ${host} = ${target} ; then
8418 case ${host_os} in
8419 hpux*)
8420 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
715d1656 8421echo "configure:8422: checking for HPUX/OSF thread support" >&5
c906108c
SS
8422 if test -f /usr/include/dce/cma_config.h ; then
8423 if test "$GCC" = "yes" ; then
8424 echo "$ac_t""yes" 1>&6
8425 cat >> confdefs.h <<\EOF
8426#define HAVE_HPUX_THREAD_SUPPORT 1
8427EOF
8428
66b965bb 8429 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8430 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8431 else
8432 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8433 fi
8434 else
8435 echo "$ac_t""no" 1>&6
8436 fi
8437 ;;
8438 solaris*)
d92419e5
JB
8439 # See if thread_db library is around for Solaris thread debugging.
8440 # Note that we must explicitly test for version 1 of the library
8441 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8442 # the same API.
c906108c 8443 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
715d1656 8444echo "configure:8445: checking for Solaris thread debugging library" >&5
c906108c
SS
8445 if test -f /usr/lib/libthread_db.so.1 ; then
8446 echo "$ac_t""yes" 1>&6
8447 cat >> confdefs.h <<\EOF
8448#define HAVE_THREAD_DB_LIB 1
8449EOF
8450
66b965bb 8451 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8452 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8453 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
715d1656 8454echo "configure:8455: checking for dlopen in -ldl" >&5
c906108c
SS
8455ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8456if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8457 echo $ac_n "(cached) $ac_c" 1>&6
8458else
8459 ac_save_LIBS="$LIBS"
8460LIBS="-ldl $LIBS"
8461cat > conftest.$ac_ext <<EOF
715d1656 8462#line 8463 "configure"
c906108c
SS
8463#include "confdefs.h"
8464/* Override any gcc2 internal prototype to avoid an error. */
8465/* We use char because int might match the return type of a gcc2
8466 builtin and then its argument prototype would still apply. */
8467char dlopen();
8468
8469int main() {
8470dlopen()
8471; return 0; }
8472EOF
715d1656 8473if { (eval echo configure:8474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8474 rm -rf conftest*
8475 eval "ac_cv_lib_$ac_lib_var=yes"
8476else
8477 echo "configure: failed program was:" >&5
8478 cat conftest.$ac_ext >&5
8479 rm -rf conftest*
8480 eval "ac_cv_lib_$ac_lib_var=no"
8481fi
8482rm -f conftest*
8483LIBS="$ac_save_LIBS"
8484
8485fi
8486if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8487 echo "$ac_t""yes" 1>&6
8488 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8489 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8490 cat >> confdefs.h <<EOF
8491#define $ac_tr_lib 1
8492EOF
8493
8494 LIBS="-ldl $LIBS"
8495
8496else
8497 echo "$ac_t""no" 1>&6
8498fi
8499
8500 if test "$GCC" = "yes" ; then
8501 # The GNU linker requires the -export-dynamic option to make
8502 # all symbols visible in the dynamic symbol table.
8503 hold_ldflags=$LDFLAGS
8504 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
715d1656 8505echo "configure:8506: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8506 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8507 cat > conftest.$ac_ext <<EOF
715d1656 8508#line 8509 "configure"
c906108c
SS
8509#include "confdefs.h"
8510
8511int main() {
8512int i;
8513; return 0; }
8514EOF
715d1656 8515if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8516 rm -rf conftest*
8517 found=yes
8518else
8519 echo "configure: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 rm -rf conftest*
8522 found=no
8523fi
8524rm -f conftest*
8525 LDFLAGS=$hold_ldflags
8526 echo "$ac_t""$found" 1>&6
8527 if test $found = yes; then
8528 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8529 fi
8530 fi
8531 # Sun randomly tweaked the prototypes in <proc_service.h>
8532 # at one point.
8533 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
715d1656 8534echo "configure:8535: checking if <proc_service.h> is old" >&5
c906108c
SS
8535 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8536 echo $ac_n "(cached) $ac_c" 1>&6
8537else
8538
8539 cat > conftest.$ac_ext <<EOF
715d1656 8540#line 8541 "configure"
c906108c
SS
8541#include "confdefs.h"
8542
8543 #include <proc_service.h>
8544 ps_err_e ps_pdwrite
8545 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8546
8547int main() {
8548
8549; return 0; }
8550EOF
715d1656 8551if { (eval echo configure:8552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8552 rm -rf conftest*
8553 gdb_cv_proc_service_is_old=no
8554else
8555 echo "configure: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8557 rm -rf conftest*
8558 gdb_cv_proc_service_is_old=yes
8559fi
8560rm -f conftest*
8561
8562fi
8563
8564 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8565 if test $gdb_cv_proc_service_is_old = yes; then
8566 cat >> confdefs.h <<\EOF
8567#define PROC_SERVICE_IS_OLD 1
8568EOF
8569
8570 fi
8571 else
8572 echo "$ac_t""no" 1>&6
8573 fi
8574 ;;
d92419e5
JB
8575 aix*)
8576 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
715d1656 8577echo "configure:8578: checking for AiX thread debugging library" >&5
d92419e5
JB
8578 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8579 echo $ac_n "(cached) $ac_c" 1>&6
8580else
8581 cat > conftest.$ac_ext <<EOF
715d1656 8582#line 8583 "configure"
d92419e5
JB
8583#include "confdefs.h"
8584#include <sys/pthdebug.h>
8585int main() {
8586#ifndef PTHDB_VERSION_3
8587 #error
8588 #endif
8589; return 0; }
8590EOF
715d1656 8591if { (eval echo configure:8592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8592 rm -rf conftest*
8593 gdb_cv_have_aix_thread_debug=yes
8594else
8595 echo "configure: failed program was:" >&5
8596 cat conftest.$ac_ext >&5
8597 rm -rf conftest*
8598 gdb_cv_have_aix_thread_debug=no
8599fi
8600rm -f conftest*
8601fi
8602
8603 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8604 if test $gdb_cv_have_aix_thread_debug = yes; then
8605 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8606 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8607 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8608 fi
8609 ;;
c906108c
SS
8610 esac
8611
8612fi
8613
3f47be5c
EZ
8614if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8615 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
715d1656 8616echo "configure:8617: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8617if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8618 echo $ac_n "(cached) $ac_c" 1>&6
8619else
8620 cat > conftest.$ac_ext <<EOF
715d1656 8621#line 8622 "configure"
3f47be5c
EZ
8622#include "confdefs.h"
8623#include <thread_db.h>
8624int main() {
8625int i = TD_NOTALLOC;
8626; return 0; }
8627EOF
715d1656 8628if { (eval echo configure:8629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8629 rm -rf conftest*
8630 gdb_cv_thread_db_h_has_td_notalloc=yes
8631else
8632 echo "configure: failed program was:" >&5
8633 cat conftest.$ac_ext >&5
8634 rm -rf conftest*
8635 gdb_cv_thread_db_h_has_td_notalloc=no
8636
8637fi
8638rm -f conftest*
8639
8640fi
8641
8642echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8643fi
8644if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8645 cat >> confdefs.h <<\EOF
8646#define THREAD_DB_HAS_TD_NOTALLOC 1
8647EOF
8648
8649fi
8650
fb40c209 8651
030292b7
DJ
8652# Check whether --with-sysroot or --without-sysroot was given.
8653if test "${with_sysroot+set}" = set; then
8654 withval="$with_sysroot"
8655
8656 case ${with_sysroot} in
715d1656 8657 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
8658 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8659 esac
8660
8661 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8662
8663 if test "x$exec_prefix" = xNONE; then
8664 if test "x$prefix" = xNONE; then
8665 test_prefix=/usr/local
8666 else
8667 test_prefix=$prefix
8668 fi
8669 else
8670 test_prefix=$exec_prefix
8671 fi
8672 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
8673 "${test_prefix}"|"${test_prefix}/"*|\
8674 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
8675 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8676 TARGET_SYSTEM_ROOT_DEFINE="$t"
8677 ;;
8678 esac
8679
8680else
8681
8682 TARGET_SYSTEM_ROOT=
8683 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8684
8685fi
8686
8687
8688
8689
3b851bce
AC
8690# NOTE: Don't add -Wall or -Wunused, they both include
8691# -Wunused-parameter which reports bogus warnings.
8692# NOTE: If you add to this list, remember to update
8693# gdb/doc/gdbint.texinfo.
1decb323 8694build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8695-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8696# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8697# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8698# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8699# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8700# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8701# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8702# Check whether --enable-build-warnings or --disable-build-warnings was given.
8703if test "${enable_build_warnings+set}" = set; then
8704 enableval="$enable_build_warnings"
1decb323 8705 case "${enableval}" in
c906108c
SS
8706 yes) ;;
8707 no) build_warnings="-w";;
8708 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8709 build_warnings="${build_warnings} ${t}";;
8710 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8711 build_warnings="${t} ${build_warnings}";;
8712 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8713esac
d4f3574e 8714if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8715 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8716fi
1decb323 8717fi
3b851bce
AC
8718# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8719if test "${enable_gdb_build_warnings+set}" = set; then
8720 enableval="$enable_gdb_build_warnings"
8721 case "${enableval}" in
8722 yes) ;;
8723 no) build_warnings="-w";;
8724 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8725 build_warnings="${build_warnings} ${t}";;
8726 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8727 build_warnings="${t} ${build_warnings}";;
8728 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8729esac
8730if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8731 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8732fi
8733fi
104c1213
JM
8734WARN_CFLAGS=""
8735WERROR_CFLAGS=""
c906108c
SS
8736if test "x${build_warnings}" != x -a "x$GCC" = xyes
8737then
746a987d 8738 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
715d1656 8739echo "configure:8740: checking compiler warning flags" >&5
746a987d
AC
8740 # Separate out the -Werror flag as some files just cannot be
8741 # compiled with it enabled.
8742 for w in ${build_warnings}; do
8743 case $w in
8744 -Werr*) WERROR_CFLAGS=-Werror ;;
8745 *) # Check that GCC accepts it
4536bbc6
AC
8746 saved_CFLAGS="$CFLAGS"
8747 CFLAGS="$CFLAGS $w"
8748 cat > conftest.$ac_ext <<EOF
715d1656 8749#line 8750 "configure"
4536bbc6
AC
8750#include "confdefs.h"
8751
8752int main() {
8753
8754; return 0; }
8755EOF
715d1656 8756if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8757 rm -rf conftest*
8758 WARN_CFLAGS="${WARN_CFLAGS} $w"
8759else
8760 echo "configure: failed program was:" >&5
8761 cat conftest.$ac_ext >&5
8762fi
8763rm -f conftest*
8764 CFLAGS="$saved_CFLAGS"
746a987d
AC
8765 esac
8766 done
8767 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8768fi
8769
8770
104c1213 8771
c906108c
SS
8772MMALLOC_CFLAGS=
8773MMALLOC=
8774
8775
8776
8777# Check whether --with-mmalloc or --without-mmalloc was given.
8778if test "${with_mmalloc+set}" = set; then
8779 withval="$with_mmalloc"
8780 case "${withval}" in
8781 yes) want_mmalloc=true ;;
8782 no) want_mmalloc=false;;
8783 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8784esac
8785else
8786 want_mmalloc=false
8787fi
8788
8789if test x$want_mmalloc = xtrue; then
8790 cat >> confdefs.h <<\EOF
8791#define USE_MMALLOC 1
8792EOF
8793
8794 cat >> confdefs.h <<\EOF
8795#define MMCHECK_FORCE 1
8796EOF
8797
8798 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8799 MMALLOC='../mmalloc/libmmalloc.a'
8800fi
8801
7a292a7a
SS
8802# In the Cygwin environment, we need some additional flags.
8803echo $ac_n "checking for cygwin""... $ac_c" 1>&6
715d1656 8804echo "configure:8805: checking for cygwin" >&5
7a292a7a
SS
8805if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8806 echo $ac_n "(cached) $ac_c" 1>&6
8807else
8808 cat > conftest.$ac_ext <<EOF
715d1656 8809#line 8810 "configure"
7a292a7a
SS
8810#include "confdefs.h"
8811
8812#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8813lose
8814#endif
8815EOF
8816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8817 egrep "lose" >/dev/null 2>&1; then
8818 rm -rf conftest*
8819 gdb_cv_os_cygwin=yes
8820else
8821 rm -rf conftest*
8822 gdb_cv_os_cygwin=no
8823fi
8824rm -f conftest*
8825
8826fi
8827
8828echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8829
aff38e61
AC
8830
8831SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8832case ${host} in
95cbc983
AC
8833 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8834 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8835esac
8836
8837
cd0fc7c3
SS
8838# libreadline needs libuser32.a in a cygwin environment
8839WIN32LIBS=
8840if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8841 WIN32LIBS="-luser32"
8842 case "${target}" in
8843 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8844 ;;
8845 esac
cd0fc7c3 8846fi
c906108c 8847
7a292a7a 8848
3fc11d3e
JM
8849LIBGUI="../libgui/src/libgui.a"
8850GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8851
8852
7a292a7a 8853
3fc11d3e
JM
8854WIN32LDAPP=
8855
8856
8857
8858configdir="unix"
8859
8860GDBTKLIBS=
8861if test "${enable_gdbtk}" = "yes"; then
8862
d1c3b63a
KS
8863 # Gdbtk must have an absolute path to srcdir in order to run
8864 # properly when not installed.
8865 here=`pwd`
8866 cd ${srcdir}
8867 GDBTK_SRC_DIR=`pwd`
8868 cd $here
8869
3fc11d3e
JM
8870
8871#
8872# Ok, lets find the tcl configuration
8873# First, look for one uninstalled.
8874# the alternative search directory is invoked by --with-tclconfig
8875#
8876
8877if test x"${no_tcl}" = x ; then
8878 # we reset no_tcl in case something fails here
8879 no_tcl=true
8880 # Check whether --with-tclconfig or --without-tclconfig was given.
8881if test "${with_tclconfig+set}" = set; then
8882 withval="$with_tclconfig"
8883 with_tclconfig=${withval}
8884fi
8885
8886 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
715d1656 8887echo "configure:8888: checking for Tcl configuration" >&5
3fc11d3e
JM
8888 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8889 echo $ac_n "(cached) $ac_c" 1>&6
8890else
8891
8892
8893 # First check to see if --with-tclconfig was specified.
8894 if test x"${with_tclconfig}" != x ; then
8895 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8896 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8897 else
8898 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8899 fi
8900 fi
8901
8902 # then check for a private Tcl installation
8903 if test x"${ac_cv_c_tclconfig}" = x ; then
8904 for i in \
8905 ../tcl \
8906 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8907 ../../tcl \
8908 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8909 ../../../tcl \
8910 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8911 if test -f "$i/${configdir}/tclConfig.sh" ; then
8912 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8913 break
8914 fi
8915 done
8916 fi
8917 # check in a few common install locations
8918 if test x"${ac_cv_c_tclconfig}" = x ; then
8919 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8920 if test -f "$i/tclConfig.sh" ; then
8921 ac_cv_c_tclconfig=`(cd $i; pwd)`
8922 break
8923 fi
8924 done
8925 fi
8926 # check in a few other private locations
8927 if test x"${ac_cv_c_tclconfig}" = x ; then
8928 for i in \
8929 ${srcdir}/../tcl \
8930 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8931 if test -f "$i/${configdir}/tclConfig.sh" ; then
8932 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8933 break
8934 fi
8935 done
8936 fi
8937
8938fi
8939
8940 if test x"${ac_cv_c_tclconfig}" = x ; then
8941 TCLCONFIG="# no Tcl configs found"
8942 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8943 else
8944 no_tcl=
8945 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8946 echo "$ac_t""found $TCLCONFIG" 1>&6
8947 fi
8948fi
8949
8950 if test -z "${no_tcl}"; then
8951
8952 . $TCLCONFIG
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
033afc63 8973
3fc11d3e
JM
8974
8975
8976
8977
8978
8979
8980#
8981# Ok, lets find the tk configuration
8982# First, look for one uninstalled.
8983# the alternative search directory is invoked by --with-tkconfig
8984#
8985
8986if test x"${no_tk}" = x ; then
8987 # we reset no_tk in case something fails here
8988 no_tk=true
8989 # Check whether --with-tkconfig or --without-tkconfig was given.
8990if test "${with_tkconfig+set}" = set; then
8991 withval="$with_tkconfig"
8992 with_tkconfig=${withval}
8993fi
8994
8995 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
715d1656 8996echo "configure:8997: checking for Tk configuration" >&5
3fc11d3e
JM
8997 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8998 echo $ac_n "(cached) $ac_c" 1>&6
8999else
9000
9001
9002 # First check to see if --with-tkconfig was specified.
9003 if test x"${with_tkconfig}" != x ; then
9004 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9005 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9006 else
9007 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9008 fi
9009 fi
9010
9011 # then check for a private Tk library
9012 if test x"${ac_cv_c_tkconfig}" = x ; then
9013 for i in \
9014 ../tk \
9015 `ls -dr ../tk[4-9]* 2>/dev/null` \
9016 ../../tk \
9017 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9018 ../../../tk \
9019 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9020 if test -f "$i/${configdir}/tkConfig.sh" ; then
9021 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9022 break
9023 fi
9024 done
9025 fi
9026 # check in a few common install locations
9027 if test x"${ac_cv_c_tkconfig}" = x ; then
9028 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9029 if test -f "$i/tkConfig.sh" ; then
9030 ac_cv_c_tkconfig=`(cd $i; pwd)`
9031 break
9032 fi
9033 done
9034 fi
9035 # check in a few other private locations
9036 if test x"${ac_cv_c_tkconfig}" = x ; then
9037 for i in \
9038 ${srcdir}/../tk \
9039 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9040 if test -f "$i/${configdir}/tkConfig.sh" ; then
9041 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9042 break
9043 fi
9044 done
9045 fi
9046
9047fi
9048
9049 if test x"${ac_cv_c_tkconfig}" = x ; then
9050 TKCONFIG="# no Tk configs found"
9051 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9052 else
9053 no_tk=
9054 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9055 echo "$ac_t""found $TKCONFIG" 1>&6
9056 fi
9057fi
9058
9059
9060
dd2504ab
JM
9061 # now look for Tcl library stuff
9062
9063 case "${host}" in
9064 *-*-cygwin*)
9065 tcldir=../tcl/win/
9066 ;;
9067 *)
9068 tcldir=../tcl/unix/
9069 ;;
9070 esac
9071
9072 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9073
3fc11d3e
JM
9074 # If $no_tk is nonempty, then we can't do Tk, and there is no
9075 # point to doing Tcl.
9076 if test -z "${no_tk}"; then
9077
9078 if test -f "$TKCONFIG" ; then
9079 . $TKCONFIG
9080 fi
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095#
9096# Ok, lets find the tcl source trees so we can use the headers
9097# Warning: transition of version 9 to 10 will break this algorithm
9098# because 10 sorts before 9. We also look for just tcl. We have to
9099# be careful that we don't match stuff like tclX by accident.
9100# the alternative search directory is involked by --with-tclinclude
9101#
9102
9103no_tcl=true
9104echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
715d1656 9105echo "configure:9106: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9106# Check whether --with-tclinclude or --without-tclinclude was given.
9107if test "${with_tclinclude+set}" = set; then
9108 withval="$with_tclinclude"
9109 with_tclinclude=${withval}
9110fi
9111
9112if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9113 echo $ac_n "(cached) $ac_c" 1>&6
9114else
9115
9116# first check to see if --with-tclinclude was specified
9117if test x"${with_tclinclude}" != x ; then
9118 if test -f ${with_tclinclude}/tclInt.h ; then
9119 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9120 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9121 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9122 else
9123 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9124 fi
9125fi
9126
9127# next check if it came with Tcl configuration file
9128if test x"${ac_cv_c_tclconfig}" = x ; then
9129 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9130 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9131 fi
9132fi
9133
9134# next check in private source directory
9135#
9136# since ls returns lowest version numbers first, reverse its output
9137if test x"${ac_cv_c_tclh}" = x ; then
9138 for i in \
9139 ${srcdir}/../tcl \
9140 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9141 ${srcdir}/../../tcl \
9142 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9143 ${srcdir}/../../../tcl \
9144 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9145 if test -f $i/generic/tclInt.h ; then
9146 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9147 break
9148 fi
9149 done
9150fi
9151# finally check in a few common install locations
9152#
9153# since ls returns lowest version numbers first, reverse its output
9154if test x"${ac_cv_c_tclh}" = x ; then
9155 for i in \
9156 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9157 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9158 /usr/local/src/tcl \
9159 /usr/local/lib/tcl \
9160 ${prefix}/include ; do
9161 if test -f $i/generic/tclInt.h ; then
9162 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9163 break
9164 fi
9165 done
9166fi
9167# see if one is installed
9168if test x"${ac_cv_c_tclh}" = x ; then
9169 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9170echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
715d1656 9171echo "configure:9172: checking for tclInt.h" >&5
3fc11d3e
JM
9172if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9173 echo $ac_n "(cached) $ac_c" 1>&6
9174else
9175 cat > conftest.$ac_ext <<EOF
715d1656 9176#line 9177 "configure"
3fc11d3e
JM
9177#include "confdefs.h"
9178#include <tclInt.h>
9179EOF
9180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 9181{ (eval echo configure:9182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9183if test -z "$ac_err"; then
9184 rm -rf conftest*
9185 eval "ac_cv_header_$ac_safe=yes"
9186else
9187 echo "$ac_err" >&5
9188 echo "configure: failed program was:" >&5
9189 cat conftest.$ac_ext >&5
9190 rm -rf conftest*
9191 eval "ac_cv_header_$ac_safe=no"
9192fi
9193rm -f conftest*
9194fi
9195if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9196 echo "$ac_t""yes" 1>&6
9197 ac_cv_c_tclh=installed
9198else
9199 echo "$ac_t""no" 1>&6
9200ac_cv_c_tclh=""
9201fi
9202
9203fi
9204
9205fi
9206
9207if test x"${ac_cv_c_tclh}" = x ; then
9208 TCLHDIR="# no Tcl private headers found"
9209 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9210fi
9211if test x"${ac_cv_c_tclh}" != x ; then
9212 no_tcl=""
9213 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9214 echo "$ac_t""is installed" 1>&6
9215 TCLHDIR=""
9216 else
9217 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9218 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9219 TCLHDIR="-I${ac_cv_c_tclh}"
9220 fi
9221fi
9222
9223
9224
9225
9226#
9227# Ok, lets find the tk source trees so we can use the headers
9228# If the directory (presumably symlink) named "tk" exists, use that one
9229# in preference to any others. Same logic is used when choosing library
9230# and again with Tcl. The search order is the best place to look first, then in
9231# decreasing significance. The loop breaks if the trigger file is found.
9232# Note the gross little conversion here of srcdir by cd'ing to the found
9233# directory. This converts the path from a relative to an absolute, so
9234# recursive cache variables for the path will work right. We check all
9235# the possible paths in one loop rather than many seperate loops to speed
9236# things up.
9237# the alternative search directory is involked by --with-tkinclude
9238#
9239no_tk=true
9240echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
715d1656 9241echo "configure:9242: checking for Tk private headers" >&5
3fc11d3e
JM
9242# Check whether --with-tkinclude or --without-tkinclude was given.
9243if test "${with_tkinclude+set}" = set; then
9244 withval="$with_tkinclude"
9245 with_tkinclude=${withval}
9246fi
9247
9248if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9249 echo $ac_n "(cached) $ac_c" 1>&6
9250else
9251
9252# first check to see if --with-tkinclude was specified
9253if test x"${with_tkinclude}" != x ; then
9254 if test -f ${with_tkinclude}/tk.h ; then
9255 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9256 elif test -f ${with_tkinclude}/generic/tk.h ; then
9257 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9258 else
9259 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9260 fi
9261fi
9262
9263# next check if it came with Tk configuration file
9264if test x"${ac_cv_c_tkconfig}" = x ; then
9265 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9266 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9267 fi
9268fi
9269
9270# next check in private source directory
9271#
9272# since ls returns lowest version numbers first, reverse its output
9273if test x"${ac_cv_c_tkh}" = x ; then
9274 for i in \
9275 ${srcdir}/../tk \
9276 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9277 ${srcdir}/../../tk \
9278 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9279 ${srcdir}/../../../tk \
9280 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9281 if test -f $i/generic/tk.h ; then
9282 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9283 break
9284 fi
9285 done
9286fi
9287# finally check in a few common install locations
9288#
9289# since ls returns lowest version numbers first, reverse its output
9290if test x"${ac_cv_c_tkh}" = x ; then
9291 for i in \
9292 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9293 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9294 /usr/local/src/tk \
9295 /usr/local/lib/tk \
9296 ${prefix}/include ; do
9297 if test -f $i/generic/tk.h ; then
9298 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9299 break
9300 fi
9301 done
9302fi
9303# see if one is installed
9304if test x"${ac_cv_c_tkh}" = x ; then
9305 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9306echo $ac_n "checking for tk.h""... $ac_c" 1>&6
715d1656 9307echo "configure:9308: checking for tk.h" >&5
3fc11d3e
JM
9308if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9309 echo $ac_n "(cached) $ac_c" 1>&6
9310else
9311 cat > conftest.$ac_ext <<EOF
715d1656 9312#line 9313 "configure"
3fc11d3e
JM
9313#include "confdefs.h"
9314#include <tk.h>
9315EOF
9316ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 9317{ (eval echo configure:9318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9318ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9319if test -z "$ac_err"; then
9320 rm -rf conftest*
9321 eval "ac_cv_header_$ac_safe=yes"
9322else
9323 echo "$ac_err" >&5
9324 echo "configure: failed program was:" >&5
9325 cat conftest.$ac_ext >&5
9326 rm -rf conftest*
9327 eval "ac_cv_header_$ac_safe=no"
9328fi
9329rm -f conftest*
9330fi
9331if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9332 echo "$ac_t""yes" 1>&6
9333 ac_cv_c_tkh=installed
9334else
9335 echo "$ac_t""no" 1>&6
9336ac_cv_c_tkh=""
9337fi
9338
9339fi
9340
9341fi
9342
9343if test x"${ac_cv_c_tkh}" != x ; then
9344 no_tk=""
9345 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9346 echo "$ac_t""is installed" 1>&6
9347 TKHDIR=""
9348 else
9349 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9350 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9351 TKHDIR="-I${ac_cv_c_tkh}"
9352 fi
9353else
9354 TKHDIR="# no Tk directory found"
9355 echo "configure: warning: Can't find Tk private headers" 1>&2
9356 no_tk=true
9357fi
9358
9359
9360
9361
9362echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
715d1656 9363echo "configure:9364: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9364if test x"${ac_cv_c_itclh}" = x ; then
9365 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9366 if test -f $i/generic/itcl.h ; then
9367 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9368 break
9369 fi
9370 done
9371fi
9372if test x"${ac_cv_c_itclh}" = x ; then
9373 ITCLHDIR="# no Itcl private headers found"
9374 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9375fi
9376if test x"${ac_cv_c_itclh}" != x ; then
9377 ITCLHDIR="-I${ac_cv_c_itclh}"
9378fi
9379# should always be here
9380# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9381
9382#AC_SUBST(ITCLLIB)
9383
9384
9385echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
715d1656 9386echo "configure:9387: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9387if test x"${ac_cv_c_itkh}" = x ; then
9388 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9389 if test -f $i/generic/itk.h ; then
9390 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9391 break
9392 fi
9393 done
9394fi
9395if test x"${ac_cv_c_itkh}" = x ; then
9396 ITKHDIR="# no Itk private headers found"
9397 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9398fi
9399if test x"${ac_cv_c_itkh}" != x ; then
9400 ITKHDIR="-I${ac_cv_c_itkh}"
9401fi
9402# should always be here
9403# ITKLIB="../itcl/itk/unix/libitk.a"
9404
9405#AC_SUBST(ITKLIB)
9406
3fc11d3e 9407
dd2504ab
JM
9408
9409 # now look for Tk library stuff
9410
9411 case "${host}" in
9412 *-*-cygwin*)
9413 tkdir=../tk/win/
9414 ;;
9415 *)
9416 tkdir=../tk/unix/
9417 ;;
9418 esac
9419
9420 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9421
3fc11d3e
JM
9422 # now look for Itcl library stuff
9423
9424
9425#
9426# Ok, lets find the itcl configuration
9427# First, look for one uninstalled.
9428# the alternative search directory is invoked by --with-itclconfig
9429#
9430
9431if test x"${no_itcl}" = x ; then
9432 # we reset no_itcl in case something fails here
9433 no_itcl=true
9434 # Check whether --with-itclconfig or --without-itclconfig was given.
9435if test "${with_itclconfig+set}" = set; then
9436 withval="$with_itclconfig"
9437 with_itclconfig=${withval}
9438fi
9439
9440 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
715d1656 9441echo "configure:9442: checking for Itcl configuration" >&5
3fc11d3e
JM
9442 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9443 echo $ac_n "(cached) $ac_c" 1>&6
9444else
9445
9446
9447 # First check to see if --with-itclconfig was specified.
9448 if test x"${with_itclconfig}" != x ; then
9449 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9450 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9451 else
9452 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9453 fi
9454 fi
9455
9456 # then check for a private Itcl library
9457 if test x"${ac_cv_c_itclconfig}" = x ; then
9458 for i in \
9459 ../itcl/itcl \
9460 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9461 ../../itcl \
9462 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9463 ../../../itcl \
9464 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9465 if test -f "$i/itclConfig.sh" ; then
9466 ac_cv_c_itclconfig=`(cd $i; pwd)`
9467 break
9468 fi
9469 done
9470 fi
9471 # check in a few common install locations
9472 if test x"${ac_cv_c_itclconfig}" = x ; then
9473 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9474 if test -f "$i/itclConfig.sh" ; then
9475 ac_cv_c_itclconfig=`(cd $i; pwd)`
9476 break
9477 fi
9478 done
9479 fi
9480 # check in a few other private locations
9481 if test x"${ac_cv_c_itclconfig}" = x ; then
9482 for i in \
9483 ${srcdir}/../itcl/itcl \
9484 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9485 if test -f "$i/itclConfig.sh" ; then
9486 ac_cv_c_itclconfig=`(cd $i; pwd)`
9487 break
9488 fi
9489 done
9490 fi
9491
9492fi
9493
9494 if test x"${ac_cv_c_itclconfig}" = x ; then
9495 ITCLCONFIG="# no Itcl configs found"
9496 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9497 else
9498 no_itcl=
9499 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9500 echo "$ac_t""found $ITCLCONFIG" 1>&6
9501 fi
9502fi
9503
9504 if test -z "${no_itcl}"; then
9505
9506 if test -f "$ITCLCONFIG" ; then
9507 . $ITCLCONFIG
9508 fi
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
3fc11d3e
JM
9519
9520
9521 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9522 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9523 fi
9524
9525
9526 # now look for Itk library stuff
9527
9528#
9529# Ok, lets find the itk configuration
9530# First, look for one uninstalled.
9531# the alternative search directory is invoked by --with-itkconfig
9532#
9533
9534if test x"${no_itk}" = x ; then
9535 # we reset no_itk in case something fails here
9536 no_itk=true
9537 # Check whether --with-itkconfig or --without-itkconfig was given.
9538if test "${with_itkconfig+set}" = set; then
9539 withval="$with_itkconfig"
9540 with_itkconfig=${withval}
9541fi
9542
9543 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
715d1656 9544echo "configure:9545: checking for Itk configuration" >&5
3fc11d3e
JM
9545 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9546 echo $ac_n "(cached) $ac_c" 1>&6
9547else
9548
9549
9550 # First check to see if --with-itkconfig was specified.
9551 if test x"${with_itkconfig}" != x ; then
9552 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9553 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9554 else
9555 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9556 fi
9557 fi
9558
9559 # then check for a private Itk library
9560 if test x"${ac_cv_c_itkconfig}" = x ; then
9561 for i in \
9562 ../itcl/itk \
9563 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9564 ../../itk \
9565 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9566 ../../../itk \
9567 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9568 if test -f "$i/itkConfig.sh" ; then
9569 ac_cv_c_itkconfig=`(cd $i; pwd)`
9570 break
9571 fi
9572 done
9573 fi
9574 # check in a few common install locations
9575 if test x"${ac_cv_c_itkconfig}" = x ; then
9576 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9577 if test -f "$i/itkConfig.sh" ; then
9578 ac_cv_c_itkconfig=`(cd $i; pwd)`
9579 break
9580 fi
9581 done
9582 fi
9583 # check in a few other private locations
9584 if test x"${ac_cv_c_itkconfig}" = x ; then
9585 for i in \
9586 ${srcdir}/../itcl/itk \
9587 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9588 if test -f "$i/itkConfig.sh" ; then
9589 ac_cv_c_itkconfig=`(cd $i; pwd)`
9590 break
9591 fi
9592 done
9593 fi
9594
9595fi
9596
9597 if test x"${ac_cv_c_itkconfig}" = x ; then
9598 ITKCONFIG="# no Itk configs found"
9599 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9600 else
9601 no_itk=
9602 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9603 echo "$ac_t""found $ITKCONFIG" 1>&6
9604 fi
9605fi
9606
9607
9608 if test -z "${no_itcl}"; then
9609
9610 if test -f "$ITKCONFIG" ; then
9611 . $ITKCONFIG
9612 fi
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
3fc11d3e 9625 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9626 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9627 fi
9628
4226a5a5 9629 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9630 # Tcl/Tk 8.1 require -fwritable strings. I don't
9631 # know whether 8.2 will or not, but I bet it will.
9632 # I don't have to worry about 7.x since we don't support it.
9633 GDBTK_CFLAGS=""
9634 if test "$GCC" = "yes"; then
9635 if test "$TCL_VERSION" != "8.0" ; then
9636 GDBTK_CFLAGS="-fwritable-strings"
9637 fi
9638 fi
9639
9640 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9641 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9642 # Yes, the ordering seems wrong here. But it isn't.
9643 # TK_LIBS is the list of libraries that need to be linked
9644 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9645 # were in LIBS then any link tests after this point would
9646 # try to include things like `$(LIBGUI)', which wouldn't work.
9647 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9648
9649 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9650 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9651 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9652 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9653 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9654 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9655 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9656 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9657
9658 if test x$gdb_cv_os_cygwin = xyes; then
9659 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9660 WIN32LDAPP="-Wl,--subsystem,console"
9661 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9662 fi
9663 fi
9664 fi
ffc6a242 9665
ffc6a242 9666 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9667fi
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
dd2504ab 9681
c906108c
SS
9682# If we find X, set shell vars x_includes and x_libraries to the
9683# paths, otherwise set no_x=yes.
9684# Uses ac_ vars as temps to allow command line to override cache and checks.
9685# --without-x overrides everything else, but does not touch the cache.
9686echo $ac_n "checking for X""... $ac_c" 1>&6
715d1656 9687echo "configure:9688: checking for X" >&5
c906108c
SS
9688
9689# Check whether --with-x or --without-x was given.
9690if test "${with_x+set}" = set; then
9691 withval="$with_x"
9692 :
9693fi
9694
9695# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9696if test "x$with_x" = xno; then
9697 # The user explicitly disabled X.
9698 have_x=disabled
9699else
9700 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9701 # Both variables are already set.
9702 have_x=yes
9703 else
9704if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9705 echo $ac_n "(cached) $ac_c" 1>&6
9706else
9707 # One or both of the vars are not set, and there is no cached value.
9708ac_x_includes=NO ac_x_libraries=NO
9709rm -fr conftestdir
9710if mkdir conftestdir; then
9711 cd conftestdir
9712 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9713 cat > Imakefile <<'EOF'
9714acfindx:
9715 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9716EOF
9717 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9718 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9719 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9720 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9721 for ac_extension in a so sl; do
9722 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9723 test -f $ac_im_libdir/libX11.$ac_extension; then
9724 ac_im_usrlibdir=$ac_im_libdir; break
9725 fi
9726 done
9727 # Screen out bogus values from the imake configuration. They are
9728 # bogus both because they are the default anyway, and because
9729 # using them would break gcc on systems where it needs fixed includes.
9730 case "$ac_im_incroot" in
9731 /usr/include) ;;
9732 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9733 esac
9734 case "$ac_im_usrlibdir" in
9735 /usr/lib | /lib) ;;
9736 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9737 esac
9738 fi
9739 cd ..
9740 rm -fr conftestdir
9741fi
9742
9743if test "$ac_x_includes" = NO; then
9744 # Guess where to find include files, by looking for this one X11 .h file.
9745 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9746
9747 # First, try using that file with no special directory specified.
9748cat > conftest.$ac_ext <<EOF
715d1656 9749#line 9750 "configure"
c906108c
SS
9750#include "confdefs.h"
9751#include <$x_direct_test_include>
9752EOF
9753ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 9754{ (eval echo configure:9755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9755ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9756if test -z "$ac_err"; then
9757 rm -rf conftest*
9758 # We can compile using X headers with no special include directory.
9759ac_x_includes=
9760else
9761 echo "$ac_err" >&5
9762 echo "configure: failed program was:" >&5
9763 cat conftest.$ac_ext >&5
9764 rm -rf conftest*
9765 # Look for the header file in a standard set of common directories.
9766# Check X11 before X11Rn because it is often a symlink to the current release.
9767 for ac_dir in \
9768 /usr/X11/include \
9769 /usr/X11R6/include \
9770 /usr/X11R5/include \
9771 /usr/X11R4/include \
9772 \
9773 /usr/include/X11 \
9774 /usr/include/X11R6 \
9775 /usr/include/X11R5 \
9776 /usr/include/X11R4 \
9777 \
9778 /usr/local/X11/include \
9779 /usr/local/X11R6/include \
9780 /usr/local/X11R5/include \
9781 /usr/local/X11R4/include \
9782 \
9783 /usr/local/include/X11 \
9784 /usr/local/include/X11R6 \
9785 /usr/local/include/X11R5 \
9786 /usr/local/include/X11R4 \
9787 \
9788 /usr/X386/include \
9789 /usr/x386/include \
9790 /usr/XFree86/include/X11 \
9791 \
9792 /usr/include \
9793 /usr/local/include \
9794 /usr/unsupported/include \
9795 /usr/athena/include \
9796 /usr/local/x11r5/include \
9797 /usr/lpp/Xamples/include \
9798 \
9799 /usr/openwin/include \
9800 /usr/openwin/share/include \
9801 ; \
9802 do
9803 if test -r "$ac_dir/$x_direct_test_include"; then
9804 ac_x_includes=$ac_dir
9805 break
9806 fi
9807 done
9808fi
9809rm -f conftest*
9810fi # $ac_x_includes = NO
9811
9812if test "$ac_x_libraries" = NO; then
9813 # Check for the libraries.
9814
9815 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9816 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9817
9818 # See if we find them without any special options.
9819 # Don't add to $LIBS permanently.
9820 ac_save_LIBS="$LIBS"
9821 LIBS="-l$x_direct_test_library $LIBS"
9822cat > conftest.$ac_ext <<EOF
715d1656 9823#line 9824 "configure"
c906108c
SS
9824#include "confdefs.h"
9825
9826int main() {
9827${x_direct_test_function}()
9828; return 0; }
9829EOF
715d1656 9830if { (eval echo configure:9831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9831 rm -rf conftest*
9832 LIBS="$ac_save_LIBS"
9833# We can link X programs with no special library path.
9834ac_x_libraries=
9835else
9836 echo "configure: failed program was:" >&5
9837 cat conftest.$ac_ext >&5
9838 rm -rf conftest*
9839 LIBS="$ac_save_LIBS"
9840# First see if replacing the include by lib works.
9841# Check X11 before X11Rn because it is often a symlink to the current release.
9842for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9843 /usr/X11/lib \
9844 /usr/X11R6/lib \
9845 /usr/X11R5/lib \
9846 /usr/X11R4/lib \
9847 \
9848 /usr/lib/X11 \
9849 /usr/lib/X11R6 \
9850 /usr/lib/X11R5 \
9851 /usr/lib/X11R4 \
9852 \
9853 /usr/local/X11/lib \
9854 /usr/local/X11R6/lib \
9855 /usr/local/X11R5/lib \
9856 /usr/local/X11R4/lib \
9857 \
9858 /usr/local/lib/X11 \
9859 /usr/local/lib/X11R6 \
9860 /usr/local/lib/X11R5 \
9861 /usr/local/lib/X11R4 \
9862 \
9863 /usr/X386/lib \
9864 /usr/x386/lib \
9865 /usr/XFree86/lib/X11 \
9866 \
9867 /usr/lib \
9868 /usr/local/lib \
9869 /usr/unsupported/lib \
9870 /usr/athena/lib \
9871 /usr/local/x11r5/lib \
9872 /usr/lpp/Xamples/lib \
9873 /lib/usr/lib/X11 \
9874 \
9875 /usr/openwin/lib \
9876 /usr/openwin/share/lib \
9877 ; \
9878do
9879 for ac_extension in a so sl; do
9880 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9881 ac_x_libraries=$ac_dir
9882 break 2
9883 fi
9884 done
9885done
9886fi
9887rm -f conftest*
9888fi # $ac_x_libraries = NO
9889
9890if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9891 # Didn't find X anywhere. Cache the known absence of X.
9892 ac_cv_have_x="have_x=no"
9893else
9894 # Record where we found X for the cache.
9895 ac_cv_have_x="have_x=yes \
9896 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9897fi
9898fi
9899 fi
9900 eval "$ac_cv_have_x"
9901fi # $with_x != no
9902
9903if test "$have_x" != yes; then
9904 echo "$ac_t""$have_x" 1>&6
9905 no_x=yes
9906else
9907 # If each of the values was on the command line, it overrides each guess.
9908 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9909 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9910 # Update the cache value to reflect the command line values.
9911 ac_cv_have_x="have_x=yes \
9912 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9913 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9914fi
9915
9916
7a292a7a
SS
9917
9918# Unlike the sim directory, whether a simulator is linked is controlled by
9919# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9920# This code just checks for a few cases where we'd like to ignore those
9921# definitions, even when they're present in the '.mt' file. These cases
9922# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9923# not part of the source tree.
7a292a7a
SS
9924#
9925# Check whether --enable-sim or --disable-sim was given.
9926if test "${enable_sim+set}" = set; then
9927 enableval="$enable_sim"
9928 echo "enable_sim = $enable_sim";
9929 echo "enableval = ${enableval}";
9930 case "${enableval}" in
9931 yes) ignore_sim=false ;;
9932 no) ignore_sim=true ;;
9933 *) ignore_sim=false ;;
9934 esac
9935else
9936 ignore_sim=false
9937fi
9938
9939
9940if test ! -d "${srcdir}/../sim"; then
9941 ignore_sim=true
9942fi
9943
9944if test "${ignore_sim}" = "true"; then
9945 IGNORE_SIM="SIM="
9946 IGNORE_SIM_OBS="SIM_OBS="
9947else
9948 IGNORE_SIM=""
9949 IGNORE_SIM_OBS=""
9950 cat >> confdefs.h <<\EOF
9951#define WITH_SIM 1
9952EOF
9953
9954fi
9955
9956
9957
c906108c
SS
9958
9959
9960
9961
9962
9963
dfcd3bfb 9964
e56ac5c3
AC
9965
9966
b3a90332
AC
9967
9968
b46cd165 9969
d28f9cdf 9970
c906108c
SS
9971# target_subdir is used by the testsuite to find the target libraries.
9972target_subdir=
9973if test "${host}" != "${target}"; then
9974 target_subdir="${target_alias}/"
9975fi
9976
9977
9978frags=
9979host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9980if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9981 # When building a native debuger the .mh file containing things
9982 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9983 # since it no longer contains anything useful.
9984 if test "${target}" = "${host}"; then
9985 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9986 else
9987 host_makefile_frag=/dev/null
9988 fi
c906108c
SS
9989fi
9990frags="$frags $host_makefile_frag"
9991
9992target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9993if test ! -f ${target_makefile_frag}; then
9994{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9995fi
9996frags="$frags $target_makefile_frag"
9997
9998
9999
10000
10001
10002hostfile=`sed -n '
10003s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10004' ${host_makefile_frag}`
10005
10006targetfile=`sed -n '
10007s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10008' ${target_makefile_frag}`
10009
6166d547
AC
10010GDB_MULTI_ARCH=`sed -n '
10011s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
10012' ${target_makefile_frag}`
10013
c906108c 10014if test "${target}" = "${host}"; then
a85f51e7
DJ
10015# We pick this up from the host configuration file (.mh) because we
10016# do not have a native configuration Makefile fragment.
c906108c
SS
10017nativefile=`sed -n '
10018s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10019' ${host_makefile_frag}`
c906108c
SS
10020fi
10021
10022
6166d547
AC
10023# New targets should just set gdb_multi_arch=yes in configure.tgt.
10024# Old targets being converted can either do that or set GDB_MULTI_ARCH
10025# in the target specific makefile frag. Eventually gdb_multi_arch=yes
10026# will be the default.
10027if test x"${GDB_MULTI_ARCH}" = x ; then
10028 case "${gdb_multi_arch}" in
10029 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
10030 no ) GDB_MULTI_ARCH=0 ;;
10031 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
10032 esac
10033fi
10034if test x"${GDB_MULTI_ARCH}" != x ; then
10035 cat >> confdefs.h <<EOF
10036#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
10037EOF
10038
10039fi
6c5cfe5b 10040# Warn the user when they use an old practice
6166d547
AC
10041case "${GDB_MULTI_ARCH}" in
10042 "" ) ;;
10043 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
10044 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
10045 GDB_MULTI_ARCH_PURE )
10046 if test x"${targetfile}" != x ; then
6c5cfe5b 10047 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 10048 targetfile=""
6166d547
AC
10049 fi ;;
10050 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
10051esac
10052
b00a8037
DJ
10053if test x"${gdb_osabi}" != x ; then
10054 cat >> confdefs.h <<EOF
10055#define GDB_OSABI_DEFAULT $gdb_osabi
10056EOF
10057
10058fi
10059
8dcde887
MK
10060# Enable multi-ice-gdb-server.
10061# Check whether --enable-multi-ice or --disable-multi-ice was given.
10062if test "${enable_multi_ice+set}" = set; then
10063 enableval="$enable_multi_ice"
10064 case $enableval in
10065 yes | no)
10066 ;;
10067 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10068 esac
96baa820
JM
10069fi
10070
8dcde887
MK
10071if test "x$enable_multi_ice" = xyes; then
10072 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10073fi
10074
8dcde887
MK
10075# We only build gdbserver automatically if host and target are the same.
10076if test "x$target" = "x$host"; then
10077 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
715d1656 10078echo "configure:10079: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10079 if test "x$build_gdbserver" = xyes; then
10080 configdirs="$configdirs gdbserver"
10081 echo "$ac_t""yes" 1>&6
10082 else
10083 echo "$ac_t""no" 1>&6
10084 fi
10085fi
10086
10087subdirs="doc testsuite $configdirs"
10088
96baa820 10089
c906108c 10090# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10091# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10092# version.
c906108c
SS
10093
10094files=
10095links=
5a2402b8 10096
c906108c 10097rm -f xm.h
5a2402b8 10098xm_h=""
c906108c 10099if test "${hostfile}" != ""; then
5a2402b8
AC
10100 xm_h=xm.h
10101 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10102 files="${files} ${GDB_XM_FILE}"
10103 links="${links} xm.h"
10104 cat >> confdefs.h <<EOF
10105#define GDB_XM_FILE ${GDB_XM_FILE}
10106EOF
10107
c906108c 10108fi
5a2402b8
AC
10109
10110
c906108c 10111rm -f tm.h
5a2402b8 10112tm_h=""
c906108c 10113if test "${targetfile}" != ""; then
5a2402b8
AC
10114 tm_h=tm.h
10115 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10116 files="${files} ${GDB_TM_FILE}"
10117 links="${links} tm.h"
10118 cat >> confdefs.h <<EOF
10119#define GDB_TM_FILE ${GDB_TM_FILE}
10120EOF
10121
c906108c 10122fi
5a2402b8
AC
10123
10124
c906108c 10125rm -f nm.h
5a2402b8 10126nm_h=""
c906108c 10127if test "${nativefile}" != ""; then
5a2402b8
AC
10128 nm_h=nm.h
10129 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10130 files="${files} ${GDB_NM_FILE}"
10131 links="${links} nm.h"
10132 cat >> confdefs.h <<EOF
10133#define GDB_NM_FILE ${GDB_NM_FILE}
10134EOF
10135
c906108c 10136fi
5a2402b8
AC
10137
10138
c906108c
SS
10139
10140
10141echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
715d1656 10142echo "configure:10143: checking for Cygwin environment" >&5
c906108c
SS
10143if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10144 echo $ac_n "(cached) $ac_c" 1>&6
10145else
10146 cat > conftest.$ac_ext <<EOF
715d1656 10147#line 10148 "configure"
c906108c
SS
10148#include "confdefs.h"
10149
10150int main() {
10151
10152#ifndef __CYGWIN__
10153#define __CYGWIN__ __CYGWIN32__
10154#endif
10155return __CYGWIN__;
10156; return 0; }
10157EOF
715d1656 10158if { (eval echo configure:10159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10159 rm -rf conftest*
10160 ac_cv_cygwin=yes
10161else
10162 echo "configure: failed program was:" >&5
10163 cat conftest.$ac_ext >&5
10164 rm -rf conftest*
10165 ac_cv_cygwin=no
10166fi
10167rm -f conftest*
10168rm -f conftest*
10169fi
10170
10171echo "$ac_t""$ac_cv_cygwin" 1>&6
10172CYGWIN=
10173test "$ac_cv_cygwin" = yes && CYGWIN=yes
10174echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
715d1656 10175echo "configure:10176: checking for mingw32 environment" >&5
c906108c
SS
10176if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10177 echo $ac_n "(cached) $ac_c" 1>&6
10178else
10179 cat > conftest.$ac_ext <<EOF
715d1656 10180#line 10181 "configure"
c906108c
SS
10181#include "confdefs.h"
10182
10183int main() {
10184return __MINGW32__;
10185; return 0; }
10186EOF
715d1656 10187if { (eval echo configure:10188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10188 rm -rf conftest*
10189 ac_cv_mingw32=yes
10190else
10191 echo "configure: failed program was:" >&5
10192 cat conftest.$ac_ext >&5
10193 rm -rf conftest*
10194 ac_cv_mingw32=no
10195fi
10196rm -f conftest*
10197rm -f conftest*
10198fi
10199
10200echo "$ac_t""$ac_cv_mingw32" 1>&6
10201MINGW32=
10202test "$ac_cv_mingw32" = yes && MINGW32=yes
10203
10204
10205echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
715d1656 10206echo "configure:10207: checking for executable suffix" >&5
c906108c
SS
10207if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10208 echo $ac_n "(cached) $ac_c" 1>&6
10209else
10210 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10211 ac_cv_exeext=.exe
10212else
10213 rm -f conftest*
10214 echo 'int main () { return 0; }' > conftest.$ac_ext
10215 ac_cv_exeext=
715d1656 10216 if { (eval echo configure:10217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10217 for file in conftest.*; do
10218 case $file in
715d1656 10219 *.c | *.o | *.obj) ;;
c906108c
SS
10220 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10221 esac
10222 done
10223 else
10224 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10225 fi
10226 rm -f conftest*
10227 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10228fi
10229fi
10230
10231EXEEXT=""
10232test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10233echo "$ac_t""${ac_cv_exeext}" 1>&6
10234ac_exeext=$EXEEXT
10235
10236
234b45d4
KB
10237
10238cat >> confdefs.h <<\EOF
10239#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10240EOF
10241
10242
10243
10244
10245 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10246if test "${with_libiconv_prefix+set}" = set; then
10247 withval="$with_libiconv_prefix"
10248
10249 for dir in `echo "$withval" | tr : ' '`; do
10250 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10251 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10252 done
10253
10254fi
10255
10256
10257 echo $ac_n "checking for iconv""... $ac_c" 1>&6
715d1656 10258echo "configure:10259: checking for iconv" >&5
234b45d4
KB
10259if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10260 echo $ac_n "(cached) $ac_c" 1>&6
10261else
10262
10263 am_cv_func_iconv="no, consider installing GNU libiconv"
10264 am_cv_lib_iconv=no
10265 cat > conftest.$ac_ext <<EOF
715d1656 10266#line 10267 "configure"
234b45d4
KB
10267#include "confdefs.h"
10268#include <stdlib.h>
10269#include <iconv.h>
10270int main() {
10271iconv_t cd = iconv_open("","");
10272 iconv(cd,NULL,NULL,NULL,NULL);
10273 iconv_close(cd);
10274; return 0; }
10275EOF
715d1656 10276if { (eval echo configure:10277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10277 rm -rf conftest*
10278 am_cv_func_iconv=yes
10279else
10280 echo "configure: failed program was:" >&5
10281 cat conftest.$ac_ext >&5
10282fi
10283rm -f conftest*
10284 if test "$am_cv_func_iconv" != yes; then
10285 am_save_LIBS="$LIBS"
10286 LIBS="$LIBS -liconv"
10287 cat > conftest.$ac_ext <<EOF
715d1656 10288#line 10289 "configure"
234b45d4
KB
10289#include "confdefs.h"
10290#include <stdlib.h>
10291#include <iconv.h>
10292int main() {
10293iconv_t cd = iconv_open("","");
10294 iconv(cd,NULL,NULL,NULL,NULL);
10295 iconv_close(cd);
10296; return 0; }
10297EOF
715d1656 10298if { (eval echo configure:10299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10299 rm -rf conftest*
10300 am_cv_lib_iconv=yes
10301 am_cv_func_iconv=yes
10302else
10303 echo "configure: failed program was:" >&5
10304 cat conftest.$ac_ext >&5
10305fi
10306rm -f conftest*
10307 LIBS="$am_save_LIBS"
10308 fi
10309
10310fi
10311
10312echo "$ac_t""$am_cv_func_iconv" 1>&6
10313 if test "$am_cv_func_iconv" = yes; then
10314 cat >> confdefs.h <<\EOF
10315#define HAVE_ICONV 1
10316EOF
10317
10318 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
715d1656 10319echo "configure:10320: checking for iconv declaration" >&5
234b45d4
KB
10320 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10321 echo $ac_n "(cached) $ac_c" 1>&6
10322else
10323
10324 cat > conftest.$ac_ext <<EOF
715d1656 10325#line 10326 "configure"
234b45d4
KB
10326#include "confdefs.h"
10327
10328#include <stdlib.h>
10329#include <iconv.h>
10330extern
10331#ifdef __cplusplus
10332"C"
10333#endif
10334#if defined(__STDC__) || defined(__cplusplus)
10335size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10336#else
10337size_t iconv();
10338#endif
10339
10340int main() {
10341
10342; return 0; }
10343EOF
715d1656 10344if { (eval echo configure:10345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10345 rm -rf conftest*
10346 am_cv_proto_iconv_arg1=""
10347else
10348 echo "configure: failed program was:" >&5
10349 cat conftest.$ac_ext >&5
10350 rm -rf conftest*
10351 am_cv_proto_iconv_arg1="const"
10352fi
10353rm -f conftest*
10354 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);"
10355fi
10356
10357 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10358 echo "$ac_t""${ac_t:-
10359 }$am_cv_proto_iconv" 1>&6
10360 cat >> confdefs.h <<EOF
10361#define ICONV_CONST $am_cv_proto_iconv_arg1
10362EOF
10363
10364 fi
10365 LIBICONV=
10366 if test "$am_cv_lib_iconv" = yes; then
10367 LIBICONV="-liconv"
10368 fi
10369
10370
10371
c906108c
SS
10372trap '' 1 2 15
10373cat > confcache <<\EOF
10374# This file is a shell script that caches the results of configure
10375# tests run on this system so they can be shared between configure
10376# scripts and configure runs. It is not useful on other systems.
10377# If it contains results you don't want to keep, you may remove or edit it.
10378#
10379# By default, configure uses ./config.cache as the cache file,
10380# creating it if it does not exist already. You can give configure
10381# the --cache-file=FILE option to use a different cache file; that is
10382# what configure does when it calls configure scripts in
10383# subdirectories, so they share the cache.
10384# Giving --cache-file=/dev/null disables caching, for debugging configure.
10385# config.status only pays attention to the cache file if you give it the
10386# --recheck option to rerun configure.
10387#
10388EOF
10389# The following way of writing the cache mishandles newlines in values,
10390# but we know of no workaround that is simple, portable, and efficient.
10391# So, don't put newlines in cache variables' values.
10392# Ultrix sh set writes to stderr and can't be redirected directly,
10393# and sets the high bit in the cache file unless we assign to the vars.
10394(set) 2>&1 |
10395 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10396 *ac_space=\ *)
10397 # `set' does not quote correctly, so add quotes (double-quote substitution
10398 # turns \\\\ into \\, and sed turns \\ into \).
10399 sed -n \
10400 -e "s/'/'\\\\''/g" \
10401 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10402 ;;
10403 *)
10404 # `set' quotes correctly as required by POSIX, so do not add quotes.
10405 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10406 ;;
10407 esac >> confcache
10408if cmp -s $cache_file confcache; then
10409 :
10410else
10411 if test -w $cache_file; then
10412 echo "updating cache $cache_file"
10413 cat confcache > $cache_file
10414 else
10415 echo "not updating unwritable cache $cache_file"
10416 fi
10417fi
10418rm -f confcache
10419
10420trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10421
10422test "x$prefix" = xNONE && prefix=$ac_default_prefix
10423# Let make expand exec_prefix.
10424test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10425
10426# Any assignment to VPATH causes Sun make to only execute
10427# the first set of double-colon rules, so remove it if not needed.
10428# If there is a colon in the path, we need to keep it.
10429if test "x$srcdir" = x.; then
10430 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10431fi
10432
10433trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10434
10435DEFS=-DHAVE_CONFIG_H
10436
10437# Without the "./", some shells look in PATH for config.status.
10438: ${CONFIG_STATUS=./config.status}
10439
10440echo creating $CONFIG_STATUS
10441rm -f $CONFIG_STATUS
10442cat > $CONFIG_STATUS <<EOF
10443#! /bin/sh
10444# Generated automatically by configure.
10445# Run this file to recreate the current configuration.
10446# This directory was configured as follows,
10447# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10448#
10449# $0 $ac_configure_args
10450#
10451# Compiler output produced by configure, useful for debugging
10452# configure, is in ./config.log if it exists.
10453
10454ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10455for ac_option
10456do
10457 case "\$ac_option" in
10458 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10459 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10460 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10461 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10462 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10463 exit 0 ;;
10464 -help | --help | --hel | --he | --h)
10465 echo "\$ac_cs_usage"; exit 0 ;;
10466 *) echo "\$ac_cs_usage"; exit 1 ;;
10467 esac
10468done
10469
10470ac_given_srcdir=$srcdir
10471ac_given_INSTALL="$INSTALL"
10472
ed952ac5 10473trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10474EOF
10475cat >> $CONFIG_STATUS <<EOF
10476
10477# Protect against being on the right side of a sed subst in config.status.
10478sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10479 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10480$ac_vpsub
10481$extrasub
10482s%@SHELL@%$SHELL%g
10483s%@CFLAGS@%$CFLAGS%g
10484s%@CPPFLAGS@%$CPPFLAGS%g
10485s%@CXXFLAGS@%$CXXFLAGS%g
10486s%@FFLAGS@%$FFLAGS%g
10487s%@DEFS@%$DEFS%g
10488s%@LDFLAGS@%$LDFLAGS%g
10489s%@LIBS@%$LIBS%g
10490s%@exec_prefix@%$exec_prefix%g
10491s%@prefix@%$prefix%g
10492s%@program_transform_name@%$program_transform_name%g
10493s%@bindir@%$bindir%g
10494s%@sbindir@%$sbindir%g
10495s%@libexecdir@%$libexecdir%g
10496s%@datadir@%$datadir%g
10497s%@sysconfdir@%$sysconfdir%g
10498s%@sharedstatedir@%$sharedstatedir%g
10499s%@localstatedir@%$localstatedir%g
10500s%@libdir@%$libdir%g
10501s%@includedir@%$includedir%g
10502s%@oldincludedir@%$oldincludedir%g
10503s%@infodir@%$infodir%g
10504s%@mandir@%$mandir%g
413ccac7
AC
10505s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10506s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10507s%@MAINT@%$MAINT%g
c906108c
SS
10508s%@CC@%$CC%g
10509s%@CPP@%$CPP%g
10510s%@host@%$host%g
10511s%@host_alias@%$host_alias%g
10512s%@host_cpu@%$host_cpu%g
10513s%@host_vendor@%$host_vendor%g
10514s%@host_os@%$host_os%g
10515s%@target@%$target%g
10516s%@target_alias@%$target_alias%g
10517s%@target_cpu@%$target_cpu%g
10518s%@target_vendor@%$target_vendor%g
10519s%@target_os@%$target_os%g
10520s%@build@%$build%g
10521s%@build_alias@%$build_alias%g
10522s%@build_cpu@%$build_cpu%g
10523s%@build_vendor@%$build_vendor%g
10524s%@build_os@%$build_os%g
c906108c 10525s%@RANLIB@%$RANLIB%g
8bb2c122 10526s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10527s%@ALLOCA@%$ALLOCA%g
10528s%@USE_NLS@%$USE_NLS%g
10529s%@MSGFMT@%$MSGFMT%g
10530s%@GMSGFMT@%$GMSGFMT%g
10531s%@XGETTEXT@%$XGETTEXT%g
10532s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10533s%@CATALOGS@%$CATALOGS%g
10534s%@CATOBJEXT@%$CATOBJEXT%g
10535s%@DATADIRNAME@%$DATADIRNAME%g
10536s%@GMOFILES@%$GMOFILES%g
10537s%@INSTOBJEXT@%$INSTOBJEXT%g
10538s%@INTLDEPS@%$INTLDEPS%g
10539s%@INTLLIBS@%$INTLLIBS%g
10540s%@INTLOBJS@%$INTLOBJS%g
10541s%@POFILES@%$POFILES%g
10542s%@POSUB@%$POSUB%g
10543s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10544s%@GT_NO@%$GT_NO%g
10545s%@GT_YES@%$GT_YES%g
10546s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10547s%@l@%$l%g
8dcde887 10548s%@subdirs@%$subdirs%g
7a292a7a 10549s%@AWK@%$AWK%g
c906108c
SS
10550s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10551s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10552s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10553s%@LN_S@%$LN_S%g
10554s%@YACC@%$YACC%g
c906108c 10555s%@AR@%$AR%g
95ca63c4
CF
10556s%@DLLTOOL@%$DLLTOOL%g
10557s%@WINDRES@%$WINDRES%g
75c6e08a 10558s%@MIG@%$MIG%g
c906108c 10559s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10560s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10561s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10562s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10563s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10564s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10565s%@MMALLOC@%$MMALLOC%g
aff38e61 10566s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10567s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10568s%@LIBGUI@%$LIBGUI%g
10569s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10570s%@WIN32LDAPP@%$WIN32LDAPP%g
10571s%@TCL_VERSION@%$TCL_VERSION%g
10572s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10573s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10574s%@TCL_CC@%$TCL_CC%g
10575s%@TCL_DEFS@%$TCL_DEFS%g
10576s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10577s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10578s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10579s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10580s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10581s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10582s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 10583s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
10584s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10585s%@TCL_RANLIB@%$TCL_RANLIB%g
10586s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10587s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10588s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10589s%@TK_VERSION@%$TK_VERSION%g
10590s%@TK_DEFS@%$TK_DEFS%g
10591s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10592s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10593s%@TK_XLIBSW@%$TK_XLIBSW%g
10594s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10595s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10596s%@TCLHDIR@%$TCLHDIR%g
10597s%@TKHDIR@%$TKHDIR%g
10598s%@ITCLHDIR@%$ITCLHDIR%g
10599s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10600s%@ITCL_VERSION@%$ITCL_VERSION%g
10601s%@ITCL_DEFS@%$ITCL_DEFS%g
10602s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10603s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10604s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10605s%@ITK_VERSION@%$ITK_VERSION%g
10606s%@ITK_DEFS@%$ITK_DEFS%g
10607s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10608s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10609s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10610s%@X_CFLAGS@%$X_CFLAGS%g
10611s%@X_LDFLAGS@%$X_LDFLAGS%g
10612s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10613s%@TCL_DEPS@%$TCL_DEPS%g
10614s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10615s%@ITCLLIB@%$ITCLLIB%g
10616s%@ITCL_DEPS@%$ITCL_DEPS%g
10617s%@ITKLIB@%$ITKLIB%g
10618s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10619s%@GDBTKLIBS@%$GDBTKLIBS%g
10620s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10621s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10622s%@IGNORE_SIM@%$IGNORE_SIM%g
10623s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 10624s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 10625s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 10626s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10627s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10628s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10629s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10630s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10631s%@CONFIG_ALL@%$CONFIG_ALL%g
10632s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10633s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10634s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10635s%@target_subdir@%$target_subdir%g
10636/@host_makefile_frag@/r $host_makefile_frag
10637s%@host_makefile_frag@%%g
10638/@target_makefile_frag@/r $target_makefile_frag
10639s%@target_makefile_frag@%%g
10640s%@frags@%$frags%g
5a2402b8
AC
10641s%@xm_h@%$xm_h%g
10642s%@tm_h@%$tm_h%g
10643s%@nm_h@%$nm_h%g
c906108c 10644s%@EXEEXT@%$EXEEXT%g
234b45d4 10645s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10646
10647CEOF
10648EOF
10649
10650cat >> $CONFIG_STATUS <<\EOF
10651
10652# Split the substitutions into bite-sized pieces for seds with
10653# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10654ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10655ac_file=1 # Number of current file.
10656ac_beg=1 # First line for current file.
10657ac_end=$ac_max_sed_cmds # Line after last line for current file.
10658ac_more_lines=:
10659ac_sed_cmds=""
10660while $ac_more_lines; do
10661 if test $ac_beg -gt 1; then
10662 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10663 else
10664 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10665 fi
10666 if test ! -s conftest.s$ac_file; then
10667 ac_more_lines=false
10668 rm -f conftest.s$ac_file
10669 else
10670 if test -z "$ac_sed_cmds"; then
10671 ac_sed_cmds="sed -f conftest.s$ac_file"
10672 else
10673 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10674 fi
10675 ac_file=`expr $ac_file + 1`
10676 ac_beg=$ac_end
10677 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10678 fi
10679done
10680if test -z "$ac_sed_cmds"; then
10681 ac_sed_cmds=cat
10682fi
10683EOF
10684
10685cat >> $CONFIG_STATUS <<EOF
10686
ed952ac5 10687CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10688EOF
10689cat >> $CONFIG_STATUS <<\EOF
10690for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10691 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10692 case "$ac_file" in
10693 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10694 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10695 *) ac_file_in="${ac_file}.in" ;;
10696 esac
10697
10698 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10699
10700 # Remove last slash and all that follows it. Not all systems have dirname.
10701 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10702 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10703 # The file is in a subdirectory.
10704 test ! -d "$ac_dir" && mkdir "$ac_dir"
10705 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10706 # A "../" for each directory in $ac_dir_suffix.
10707 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10708 else
10709 ac_dir_suffix= ac_dots=
10710 fi
10711
10712 case "$ac_given_srcdir" in
10713 .) srcdir=.
10714 if test -z "$ac_dots"; then top_srcdir=.
10715 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10716 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10717 *) # Relative path.
10718 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10719 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10720 esac
10721
10722 case "$ac_given_INSTALL" in
10723 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10724 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10725 esac
10726
10727 echo creating "$ac_file"
10728 rm -f "$ac_file"
10729 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10730 case "$ac_file" in
10731 *Makefile*) ac_comsub="1i\\
10732# $configure_input" ;;
10733 *) ac_comsub= ;;
10734 esac
10735
10736 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10737 sed -e "$ac_comsub
10738s%@configure_input@%$configure_input%g
10739s%@srcdir@%$srcdir%g
10740s%@top_srcdir@%$top_srcdir%g
10741s%@INSTALL@%$INSTALL%g
10742" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10743fi; done
10744rm -f conftest.s*
10745
10746# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10747# NAME is the cpp macro being defined and VALUE is the value it is being given.
10748#
10749# ac_d sets the value in "#define NAME VALUE" lines.
10750ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10751ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10752ac_dC='\3'
10753ac_dD='%g'
10754# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10755ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10756ac_uB='\([ ]\)%\1#\2define\3'
10757ac_uC=' '
10758ac_uD='\4%g'
10759# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10760ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10761ac_eB='$%\1#\2define\3'
10762ac_eC=' '
10763ac_eD='%g'
10764
10765if test "${CONFIG_HEADERS+set}" != set; then
10766EOF
10767cat >> $CONFIG_STATUS <<EOF
10768 CONFIG_HEADERS="config.h:config.in"
10769EOF
10770cat >> $CONFIG_STATUS <<\EOF
10771fi
10772for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10773 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10774 case "$ac_file" in
10775 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10776 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10777 *) ac_file_in="${ac_file}.in" ;;
10778 esac
10779
10780 echo creating $ac_file
10781
10782 rm -f conftest.frag conftest.in conftest.out
10783 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10784 cat $ac_file_inputs > conftest.in
10785
10786EOF
10787
10788# Transform confdefs.h into a sed script conftest.vals that substitutes
10789# the proper values into config.h.in to produce config.h. And first:
10790# Protect against being on the right side of a sed subst in config.status.
10791# Protect against being in an unquoted here document in config.status.
10792rm -f conftest.vals
10793cat > conftest.hdr <<\EOF
10794s/[\\&%]/\\&/g
10795s%[\\$`]%\\&%g
10796s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10797s%ac_d%ac_u%gp
10798s%ac_u%ac_e%gp
10799EOF
10800sed -n -f conftest.hdr confdefs.h > conftest.vals
10801rm -f conftest.hdr
10802
10803# This sed command replaces #undef with comments. This is necessary, for
10804# example, in the case of _POSIX_SOURCE, which is predefined and required
10805# on some systems where configure will not decide to define it.
10806cat >> conftest.vals <<\EOF
10807s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10808EOF
10809
10810# Break up conftest.vals because some shells have a limit on
10811# the size of here documents, and old seds have small limits too.
10812
10813rm -f conftest.tail
10814while :
10815do
10816 ac_lines=`grep -c . conftest.vals`
10817 # grep -c gives empty output for an empty file on some AIX systems.
10818 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10819 # Write a limited-size here document to conftest.frag.
10820 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10821 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10822 echo 'CEOF
10823 sed -f conftest.frag conftest.in > conftest.out
10824 rm -f conftest.in
10825 mv conftest.out conftest.in
10826' >> $CONFIG_STATUS
10827 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10828 rm -f conftest.vals
10829 mv conftest.tail conftest.vals
10830done
10831rm -f conftest.vals
10832
10833cat >> $CONFIG_STATUS <<\EOF
10834 rm -f conftest.frag conftest.h
10835 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10836 cat conftest.in >> conftest.h
10837 rm -f conftest.in
10838 if cmp -s $ac_file conftest.h 2>/dev/null; then
10839 echo "$ac_file is unchanged"
10840 rm -f conftest.h
10841 else
10842 # Remove last slash and all that follows it. Not all systems have dirname.
10843 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10844 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10845 # The file is in a subdirectory.
10846 test ! -d "$ac_dir" && mkdir "$ac_dir"
10847 fi
10848 rm -f $ac_file
10849 mv conftest.h $ac_file
10850 fi
10851fi; done
10852
10853EOF
10854
10855cat >> $CONFIG_STATUS <<EOF
10856ac_sources="$files"
10857ac_dests="$links"
10858EOF
10859
10860cat >> $CONFIG_STATUS <<\EOF
10861srcdir=$ac_given_srcdir
10862while test -n "$ac_sources"; do
10863 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10864 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10865
10866 echo "linking $srcdir/$ac_source to $ac_dest"
10867
10868 if test ! -r $srcdir/$ac_source; then
10869 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10870 fi
10871 rm -f $ac_dest
10872
10873 # Make relative symlinks.
10874 # Remove last slash and all that follows it. Not all systems have dirname.
10875 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10876 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10877 # The dest file is in a subdirectory.
10878 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10879 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10880 # A "../" for each directory in $ac_dest_dir_suffix.
10881 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10882 else
10883 ac_dest_dir_suffix= ac_dots=
10884 fi
10885
10886 case "$srcdir" in
10887 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10888 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10889 esac
10890
10891 # Make a symlink if possible; otherwise try a hard link.
10892 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10893 ln $srcdir/$ac_source $ac_dest; then :
10894 else
10895 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10896 fi
10897done
10898EOF
10899cat >> $CONFIG_STATUS <<EOF
10900
10901gdb_host_cpu=$gdb_host_cpu
10902gdb_target_cpu=$gdb_target_cpu
10903nativefile=$nativefile
10904
10905EOF
10906cat >> $CONFIG_STATUS <<\EOF
10907
7ee6d7eb 10908if test "${nativefile}" = ""; then
c4620205 10909 < Makefile \
e27da16d
JT
10910 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10911 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10912 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10913 > Makefile.tem
c906108c
SS
10914mv -f Makefile.tem Makefile
10915fi
10916
10917sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10918/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10919/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10920mv -f Makefile.tmp Makefile
10921
2acceee2 10922
c906108c
SS
10923case x$CONFIG_HEADERS in
10924xconfig.h:config.in)
10925echo > stamp-h ;;
10926esac
10927
10928exit 0
10929EOF
10930chmod +x $CONFIG_STATUS
10931rm -fr confdefs* $ac_clean_files
10932test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10933
10934if test "$no_recursion" != yes; then
10935
10936 # Remove --cache-file and --srcdir arguments so they do not pile up.
10937 ac_sub_configure_args=
10938 ac_prev=
10939 for ac_arg in $ac_configure_args; do
10940 if test -n "$ac_prev"; then
10941 ac_prev=
10942 continue
10943 fi
10944 case "$ac_arg" in
10945 -cache-file | --cache-file | --cache-fil | --cache-fi \
10946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10947 ac_prev=cache_file ;;
10948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10950 ;;
10951 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10952 ac_prev=srcdir ;;
10953 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10954 ;;
10955 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10956 esac
10957 done
10958
8dcde887 10959 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10960
10961 # Do not complain, so a configure script can configure whichever
10962 # parts of a large source tree are present.
10963 if test ! -d $srcdir/$ac_config_dir; then
10964 continue
10965 fi
10966
10967 echo configuring in $ac_config_dir
10968
10969 case "$srcdir" in
10970 .) ;;
10971 *)
10972 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10973 else
10974 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10975 fi
10976 ;;
10977 esac
10978
10979 ac_popdir=`pwd`
10980 cd $ac_config_dir
10981
10982 # A "../" for each directory in /$ac_config_dir.
10983 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10984
10985 case "$srcdir" in
10986 .) # No --srcdir option. We are building in place.
10987 ac_sub_srcdir=$srcdir ;;
10988 /*) # Absolute path.
10989 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10990 *) # Relative path.
10991 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10992 esac
10993
10994 # Check for guested configure; otherwise get Cygnus style configure.
10995 if test -f $ac_sub_srcdir/configure; then
10996 ac_sub_configure=$ac_sub_srcdir/configure
10997 elif test -f $ac_sub_srcdir/configure.in; then
10998 ac_sub_configure=$ac_configure
10999 else
11000 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11001 ac_sub_configure=
11002 fi
11003
11004 # The recursion is here.
11005 if test -n "$ac_sub_configure"; then
11006
11007 # Make the cache file name correct relative to the subdirectory.
11008 case "$cache_file" in
11009 /*) ac_sub_cache_file=$cache_file ;;
11010 *) # Relative path.
11011 ac_sub_cache_file="$ac_dots$cache_file" ;;
11012 esac
11013 case "$ac_given_INSTALL" in
11014 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11015 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11016 esac
11017
11018 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11019 # The eval makes quoting arguments work.
11020 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11021 then :
11022 else
11023 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11024 fi
11025 fi
11026
11027 cd $ac_popdir
11028 done
11029fi
11030
11031
11032exit 0