daily update
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf
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=
c41b7eb1 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
c41b7eb1 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
c41b7eb1
JB
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
c41b7eb1
JB
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
5b5d99cf 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
5b5d99cf 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
5b5d99cf 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
5b5d99cf 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
5b5d99cf 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
5b5d99cf 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
5b5d99cf 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
5b5d99cf 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
5b5d99cf 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
5b5d99cf 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
5b5d99cf 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
5b5d99cf 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
5b5d99cf 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
5b5d99cf 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
5b5d99cf 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
5b5d99cf 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
5b5d99cf 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
5b5d99cf 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
5b5d99cf 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
5b5d99cf 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
5b5d99cf 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
5b5d99cf 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5b5d99cf 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
5b5d99cf 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
5b5d99cf 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
5b5d99cf 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
5b5d99cf 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
5b5d99cf 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
5b5d99cf 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
5b5d99cf 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
5b5d99cf 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
5b5d99cf 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
5b5d99cf 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
5b5d99cf 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
5b5d99cf 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
5b5d99cf 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
5b5d99cf 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
5b5d99cf 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5b5d99cf 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
5b5d99cf 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
5b5d99cf 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
5b5d99cf 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
5b5d99cf 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
5b5d99cf 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5b5d99cf 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
5b5d99cf 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
5b5d99cf 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
5b5d99cf 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5b5d99cf 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
5b5d99cf 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
5b5d99cf 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
c41b7eb1 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5b5d99cf 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
5b5d99cf 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
5b5d99cf 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
5b5d99cf 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5b5d99cf 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
5b5d99cf 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
5b5d99cf 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5b5d99cf 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
5b5d99cf 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
5b5d99cf 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
5b5d99cf 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
5b5d99cf 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
5b5d99cf 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5b5d99cf 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
5b5d99cf 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
5b5d99cf 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5b5d99cf 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5b5d99cf 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5b5d99cf 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
5b5d99cf 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5b5d99cf 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
5b5d99cf 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
5b5d99cf 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5b5d99cf 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
5b5d99cf 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
5b5d99cf 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5b5d99cf 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
5b5d99cf 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
5b5d99cf 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
5b5d99cf 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
5b5d99cf 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
5b5d99cf 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
5b5d99cf 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5b5d99cf 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5b5d99cf 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
5b5d99cf 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
66b965bb 2928CONFIG_LIB_OBS=
c906108c
SS
2929CONFIG_DEPS=
2930CONFIG_SRCS=
fb40c209
AC
2931CONFIG_INITS=
2932ENABLE_CFLAGS=
b3a90332
AC
2933CONFIG_ALL=
2934CONFIG_CLEAN=
e56ac5c3
AC
2935CONFIG_INSTALL=
2936CONFIG_UNINSTALL=
c906108c 2937
8dcde887 2938subdirs="doc testsuite"
96baa820 2939
8dcde887 2940configdirs=
96baa820 2941
27e9bf90 2942. $srcdir/configure.host
c906108c 2943
27e9bf90 2944. $srcdir/configure.tgt
c906108c 2945
27e9bf90
MK
2946# Fetch the default architecture and default target vector from BFD.
2947targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2948
27e9bf90
MK
2949# We only want the first architecture, so strip off the others if
2950# there is more than one.
2951targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2952
27e9bf90
MK
2953if test "x$targ_archs" != x; then
2954 cat >> confdefs.h <<EOF
2955#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2956EOF
2957
2958fi
27e9bf90
MK
2959if test "x$targ_defvec" != x; then
2960 cat >> confdefs.h <<EOF
2961#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2962EOF
2963
2964fi
c906108c 2965
8bb2c122
MK
2966if test "$program_transform_name" = s,x,x,; then
2967 program_transform_name=
2968else
2969 # Double any \ or $. echo might interpret backslashes.
2970 cat <<\EOF_SED > conftestsed
2971s,\\,\\\\,g; s,\$,$$,g
2972EOF_SED
2973 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2974 rm -f conftestsed
2975fi
2976test "$program_prefix" != NONE &&
2977 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2978# Use a double $ so make ignores it.
2979test "$program_suffix" != NONE &&
2980 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2981
2982# sed with no file args requires a program.
2983test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2984
2985
627af7ea
MK
2986# The CLI cannot be disabled yet, but may be in the future.
2987
2988# Enable CLI.
2989# Check whether --enable-gdbcli or --disable-gdbcli was given.
2990if test "${enable_gdbcli+set}" = set; then
2991 enableval="$enable_gdbcli"
2992 case $enableval in
2993 yes)
2994 ;;
2995 no)
2996 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2997 *)
2998 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2999 esac
3000else
3001 enable_gdbcli=yes
3002fi
3003
3004if test x"$enable_gdbcli" = xyes; then
3005 if test -d $srcdir/cli; then
3006 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3007 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3008 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3009 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3010 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3011 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3012 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3013 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3014 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3015 fi
3016fi
3017
3018# Enable MI.
3019# Check whether --enable-gdbmi or --disable-gdbmi was given.
3020if test "${enable_gdbmi+set}" = set; then
3021 enableval="$enable_gdbmi"
3022 case $enableval in
3023 yes | no)
3024 ;;
3025 *)
3026 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3027 esac
3028else
3029 enable_gdbmi=yes
3030fi
3031
3032if test x"$enable_gdbmi" = xyes; then
3033 if test -d $srcdir/mi; then
3034 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3035 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3036 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3037 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3038 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3039 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3040 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3041 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3042 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3043 fi
3044fi
3045
06825bd1
MK
3046# Enable TUI.
3047# Check whether --enable-tui or --disable-tui was given.
3048if test "${enable_tui+set}" = set; then
3049 enableval="$enable_tui"
3050 case $enableval in
3051 yes | no)
3052 ;;
3053 *)
3054 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3055 esac
3056fi
3057
3058if test x"$enable_tui" = xyes; then
3059 if test -d $srcdir/tui; then
3060 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3061 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3062 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3063 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3064 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3065 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3066 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3067 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3068 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3069 need_curses=yes
3070 fi
3071fi
3072
8ee53726
MK
3073# Enable gdbtk.
3074# Check whether --enable-gdbtk or --disable-gdbtk was given.
3075if test "${enable_gdbtk+set}" = set; then
3076 enableval="$enable_gdbtk"
3077 case $enableval in
3078 yes | no)
3079 ;;
3080 *)
3081 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3082 esac
3083else
3084 if test -d $srcdir/gdbtk; then
3085 enable_gdbtk=yes
3086 else
3087 enable_gdbtk=no
3088 fi
3089fi
3090
3091# We unconditionally disable gdbtk tests on selected platforms.
3092case $host_os in
3093 go32* | windows*)
3094 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3095 enable_gdbtk=no ;;
3096esac
3097
d28f9cdf
DJ
3098# Profiling support.
3099# Check whether --enable-profiling or --disable-profiling was given.
3100if test "${enable_profiling+set}" = set; then
3101 enableval="$enable_profiling"
3102 case $enableval in
3103 yes | no)
3104 ;;
3105 *)
3106 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3107 esac
3108else
3109 enable_profiling=no
3110fi
3111
3112
d9feb4e7
DJ
3113for ac_func in monstartup _mcleanup
3114do
3115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3116echo "configure:3117: checking for $ac_func" >&5
3117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 cat > conftest.$ac_ext <<EOF
d9feb4e7 3121#line 3122 "configure"
d28f9cdf
DJ
3122#include "confdefs.h"
3123/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3124 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3125#include <assert.h>
3126/* Override any gcc2 internal prototype to avoid an error. */
3127/* We use char because int might match the return type of a gcc2
3128 builtin and then its argument prototype would still apply. */
d9feb4e7 3129char $ac_func();
d28f9cdf
DJ
3130
3131int main() {
3132
3133/* The GNU C library defines this for functions which it implements
3134 to always fail with ENOSYS. Some functions are actually named
3135 something starting with __ and the normal name is an alias. */
d9feb4e7 3136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3137choke me
3138#else
d9feb4e7 3139$ac_func();
d28f9cdf
DJ
3140#endif
3141
3142; return 0; }
3143EOF
d9feb4e7 3144if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3145 rm -rf conftest*
d9feb4e7 3146 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3147else
3148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 rm -rf conftest*
d9feb4e7 3151 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3152fi
3153rm -f conftest*
3154fi
3155
d9feb4e7 3156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3157 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3159 cat >> confdefs.h <<EOF
3160#define $ac_tr_func 1
3161EOF
3162
d28f9cdf
DJ
3163else
3164 echo "$ac_t""no" 1>&6
d28f9cdf 3165fi
d9feb4e7 3166done
d28f9cdf 3167
b0b1c2c0
MK
3168echo $ac_n "checking for _etext""... $ac_c" 1>&6
3169echo "configure:3170: checking for _etext" >&5
3170if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3171 echo $ac_n "(cached) $ac_c" 1>&6
3172else
3173 cat > conftest.$ac_ext <<EOF
3174#line 3175 "configure"
3175#include "confdefs.h"
3176#include <stdlib.h>
3177extern char _etext;
3178
3179int main() {
3180free (&_etext);
3181; return 0; }
3182EOF
3183if { (eval echo configure:3184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3184 rm -rf conftest*
3185 ac_cv_var__etext=yes
3186else
3187 echo "configure: failed program was:" >&5
3188 cat conftest.$ac_ext >&5
3189 rm -rf conftest*
3190 ac_cv_var__etext=no
3191fi
3192rm -f conftest*
3193fi
3194
3195echo "$ac_t""$ac_cv_var__etext" 1>&6
3196if test $ac_cv_var__etext = yes; then
3197 cat >> confdefs.h <<\EOF
3198#define HAVE__ETEXT 1
3199EOF
3200
3201fi
d9feb4e7
DJ
3202if test "$enable_profiling" = yes ; then
3203 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3204 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3205 fi
3206 PROFILE_CFLAGS=-pg
3207 OLD_CFLAGS="$CFLAGS"
3208 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3209
d9feb4e7 3210 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
b0b1c2c0 3211echo "configure:3212: checking whether $CC supports -pg" >&5
d9feb4e7 3212if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3213 echo $ac_n "(cached) $ac_c" 1>&6
3214else
3215 cat > conftest.$ac_ext <<EOF
b0b1c2c0 3216#line 3217 "configure"
d28f9cdf 3217#include "confdefs.h"
d28f9cdf
DJ
3218
3219int main() {
d9feb4e7 3220int x;
d28f9cdf
DJ
3221; return 0; }
3222EOF
b0b1c2c0 3223if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3224 rm -rf conftest*
d9feb4e7 3225 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3226else
3227 echo "configure: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
3229 rm -rf conftest*
d9feb4e7 3230 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3231fi
3232rm -f conftest*
3233fi
3234
d9feb4e7 3235echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3236
d9feb4e7
DJ
3237 if test $ac_cv_cc_supports_pg = no; then
3238 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3239 fi
d28f9cdf
DJ
3240
3241 CFLAGS="$OLD_CFLAGS"
3242fi
3243
8bb2c122
MK
3244# --------------------- #
3245# Checks for programs. #
3246# --------------------- #
3247
c41b7eb1 3248for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3249do
3250# Extract the first word of "$ac_prog", so it can be a program name with args.
3251set dummy $ac_prog; ac_word=$2
3252echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3253echo "configure:3254: checking for $ac_word" >&5
7a292a7a
SS
3254if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3256else
3257 if test -n "$AWK"; then
3258 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3259else
3260 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3261 ac_dummy="$PATH"
3262 for ac_dir in $ac_dummy; do
3263 test -z "$ac_dir" && ac_dir=.
3264 if test -f $ac_dir/$ac_word; then
3265 ac_cv_prog_AWK="$ac_prog"
3266 break
3267 fi
3268 done
3269 IFS="$ac_save_ifs"
3270fi
3271fi
3272AWK="$ac_cv_prog_AWK"
3273if test -n "$AWK"; then
3274 echo "$ac_t""$AWK" 1>&6
3275else
3276 echo "$ac_t""no" 1>&6
3277fi
3278
3279test -n "$AWK" && break
3280done
3281
c906108c
SS
3282# Find a good install program. We prefer a C program (faster),
3283# so one script is as good as another. But avoid the broken or
3284# incompatible versions:
3285# SysV /etc/install, /usr/sbin/install
3286# SunOS /usr/etc/install
3287# IRIX /sbin/install
3288# AIX /bin/install
3289# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3290# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3291# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3292# ./install, which can be erroneously created by make from ./install.sh.
3293echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
b0b1c2c0 3294echo "configure:3295: checking for a BSD compatible install" >&5
c906108c
SS
3295if test -z "$INSTALL"; then
3296if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3297 echo $ac_n "(cached) $ac_c" 1>&6
3298else
3299 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3300 for ac_dir in $PATH; do
3301 # Account for people who put trailing slashes in PATH elements.
3302 case "$ac_dir/" in
3303 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3304 *)
3305 # OSF1 and SCO ODT 3.0 have their own names for install.
3306 # Don't use installbsd from OSF since it installs stuff as root
3307 # by default.
3308 for ac_prog in ginstall scoinst install; do
3309 if test -f $ac_dir/$ac_prog; then
3310 if test $ac_prog = install &&
3311 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3312 # AIX install. It has an incompatible calling convention.
3313 :
3314 else
3315 ac_cv_path_install="$ac_dir/$ac_prog -c"
3316 break 2
3317 fi
3318 fi
3319 done
3320 ;;
3321 esac
3322 done
3323 IFS="$ac_save_IFS"
3324
3325fi
3326 if test "${ac_cv_path_install+set}" = set; then
3327 INSTALL="$ac_cv_path_install"
3328 else
3329 # As a last resort, use the slow shell script. We don't cache a
3330 # path for INSTALL within a source directory, because that will
3331 # break other packages using the cache if that directory is
3332 # removed, or if the path is relative.
3333 INSTALL="$ac_install_sh"
3334 fi
3335fi
3336echo "$ac_t""$INSTALL" 1>&6
3337
3338# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3339# It thinks the first close brace ends the variable substitution.
3340test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3341
3342test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3343
3344test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3345
8bb2c122 3346echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
b0b1c2c0 3347echo "configure:3348: checking whether ln -s works" >&5
8bb2c122
MK
3348if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3349 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3350else
8bb2c122
MK
3351 rm -f conftestdata
3352if ln -s X conftestdata 2>/dev/null
3353then
3354 rm -f conftestdata
3355 ac_cv_prog_LN_S="ln -s"
3356else
3357 ac_cv_prog_LN_S=ln
3358fi
3359fi
3360LN_S="$ac_cv_prog_LN_S"
3361if test "$ac_cv_prog_LN_S" = "ln -s"; then
3362 echo "$ac_t""yes" 1>&6
3363else
3364 echo "$ac_t""no" 1>&6
c906108c
SS
3365fi
3366
8bb2c122
MK
3367# Extract the first word of "ranlib", so it can be a program name with args.
3368set dummy ranlib; ac_word=$2
c906108c 3369echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3370echo "configure:3371: checking for $ac_word" >&5
8bb2c122 3371if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3372 echo $ac_n "(cached) $ac_c" 1>&6
3373else
8bb2c122
MK
3374 if test -n "$RANLIB"; then
3375 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3376else
3377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3378 ac_dummy="$PATH"
3379 for ac_dir in $ac_dummy; do
3380 test -z "$ac_dir" && ac_dir=.
3381 if test -f $ac_dir/$ac_word; then
8bb2c122 3382 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3383 break
3384 fi
3385 done
3386 IFS="$ac_save_ifs"
8bb2c122 3387 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3388fi
3389fi
8bb2c122
MK
3390RANLIB="$ac_cv_prog_RANLIB"
3391if test -n "$RANLIB"; then
3392 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3393else
3394 echo "$ac_t""no" 1>&6
3395fi
3396
8bb2c122
MK
3397for ac_prog in 'bison -y' byacc
3398do
3399# Extract the first word of "$ac_prog", so it can be a program name with args.
3400set dummy $ac_prog; ac_word=$2
c906108c 3401echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3402echo "configure:3403: checking for $ac_word" >&5
8bb2c122 3403if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
8bb2c122
MK
3406 if test -n "$YACC"; then
3407 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3408else
3409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3410 ac_dummy="$PATH"
3411 for ac_dir in $ac_dummy; do
3412 test -z "$ac_dir" && ac_dir=.
3413 if test -f $ac_dir/$ac_word; then
8bb2c122 3414 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3415 break
3416 fi
3417 done
3418 IFS="$ac_save_ifs"
3419fi
3420fi
8bb2c122
MK
3421YACC="$ac_cv_prog_YACC"
3422if test -n "$YACC"; then
3423 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3424else
3425 echo "$ac_t""no" 1>&6
3426fi
3427
8bb2c122
MK
3428test -n "$YACC" && break
3429done
3430test -n "$YACC" || YACC="yacc"
c906108c 3431
8bb2c122
MK
3432
3433# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3434set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3435echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3436echo "configure:3437: checking for $ac_word" >&5
8bb2c122 3437if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3438 echo $ac_n "(cached) $ac_c" 1>&6
3439else
8bb2c122
MK
3440 if test -n "$AR"; then
3441 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3442else
3443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3444 ac_dummy="$PATH"
3445 for ac_dir in $ac_dummy; do
3446 test -z "$ac_dir" && ac_dir=.
3447 if test -f $ac_dir/$ac_word; then
8bb2c122 3448 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3449 break
3450 fi
3451 done
3452 IFS="$ac_save_ifs"
8bb2c122 3453 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3454fi
3455fi
8bb2c122
MK
3456AR="$ac_cv_prog_AR"
3457if test -n "$AR"; then
3458 echo "$ac_t""$AR" 1>&6
c906108c
SS
3459else
3460 echo "$ac_t""no" 1>&6
3461fi
3462
8bb2c122 3463
c906108c 3464
95ca63c4
CF
3465# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3466set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3467echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3468echo "configure:3469: checking for $ac_word" >&5
95ca63c4
CF
3469if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3470 echo $ac_n "(cached) $ac_c" 1>&6
3471else
3472 if test -n "$DLLTOOL"; then
3473 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3474else
3475 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3476 ac_dummy="$PATH"
3477 for ac_dir in $ac_dummy; do
3478 test -z "$ac_dir" && ac_dir=.
3479 if test -f $ac_dir/$ac_word; then
3480 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3481 break
3482 fi
3483 done
3484 IFS="$ac_save_ifs"
3485 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3486fi
3487fi
3488DLLTOOL="$ac_cv_prog_DLLTOOL"
3489if test -n "$DLLTOOL"; then
3490 echo "$ac_t""$DLLTOOL" 1>&6
3491else
3492 echo "$ac_t""no" 1>&6
3493fi
3494
3495
3496
3497# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3498set dummy ${ac_tool_prefix}windres; ac_word=$2
3499echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3500echo "configure:3501: checking for $ac_word" >&5
95ca63c4
CF
3501if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3503else
3504 if test -n "$WINDRES"; then
3505 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3506else
3507 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3508 ac_dummy="$PATH"
3509 for ac_dir in $ac_dummy; do
3510 test -z "$ac_dir" && ac_dir=.
3511 if test -f $ac_dir/$ac_word; then
3512 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3513 break
3514 fi
3515 done
3516 IFS="$ac_save_ifs"
3517 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3518fi
3519fi
3520WINDRES="$ac_cv_prog_WINDRES"
3521if test -n "$WINDRES"; then
3522 echo "$ac_t""$WINDRES" 1>&6
3523else
3524 echo "$ac_t""no" 1>&6
3525fi
3526
3527
3528
c906108c 3529
8bb2c122 3530# Needed for GNU/Hurd.
75c6e08a
MK
3531# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3532set dummy ${ac_tool_prefix}mig; ac_word=$2
3533echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
b0b1c2c0 3534echo "configure:3535: checking for $ac_word" >&5
75c6e08a
MK
3535if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3536 echo $ac_n "(cached) $ac_c" 1>&6
3537else
3538 if test -n "$MIG"; then
3539 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3540else
3541 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3542 ac_dummy="$PATH"
3543 for ac_dir in $ac_dummy; do
3544 test -z "$ac_dir" && ac_dir=.
3545 if test -f $ac_dir/$ac_word; then
3546 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3547 break
3548 fi
3549 done
3550 IFS="$ac_save_ifs"
3551 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3552fi
3553fi
3554MIG="$ac_cv_prog_MIG"
3555if test -n "$MIG"; then
3556 echo "$ac_t""$MIG" 1>&6
3557else
3558 echo "$ac_t""no" 1>&6
3559fi
3560
3561
3562
3563
9a156167
MK
3564# ---------------------- #
3565# Checks for libraries. #
3566# ---------------------- #
3567
3568# We might need to link with -lm; most simulators need it.
3569echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
b0b1c2c0 3570echo "configure:3571: checking for main in -lm" >&5
9a156167
MK
3571ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3572if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3573 echo $ac_n "(cached) $ac_c" 1>&6
3574else
3575 ac_save_LIBS="$LIBS"
3576LIBS="-lm $LIBS"
3577cat > conftest.$ac_ext <<EOF
b0b1c2c0 3578#line 3579 "configure"
9a156167
MK
3579#include "confdefs.h"
3580
3581int main() {
3582main()
3583; return 0; }
3584EOF
b0b1c2c0 3585if { (eval echo configure:3586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3586 rm -rf conftest*
3587 eval "ac_cv_lib_$ac_lib_var=yes"
3588else
3589 echo "configure: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3591 rm -rf conftest*
3592 eval "ac_cv_lib_$ac_lib_var=no"
3593fi
3594rm -f conftest*
3595LIBS="$ac_save_LIBS"
3596
3597fi
3598if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3599 echo "$ac_t""yes" 1>&6
3600 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3601 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3602 cat >> confdefs.h <<EOF
3603#define $ac_tr_lib 1
3604EOF
3605
3606 LIBS="-lm $LIBS"
3607
3608else
3609 echo "$ac_t""no" 1>&6
3610fi
3611
3612
3613# We need to link with -lw to get `wctype' on Solaris before Solaris
3614# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3615# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3616# is known to have this problem). Therefore we avoid libw if we can.
3617echo $ac_n "checking for wctype""... $ac_c" 1>&6
b0b1c2c0 3618echo "configure:3619: checking for wctype" >&5
9a156167
MK
3619if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3620 echo $ac_n "(cached) $ac_c" 1>&6
3621else
3622 cat > conftest.$ac_ext <<EOF
b0b1c2c0 3623#line 3624 "configure"
9a156167
MK
3624#include "confdefs.h"
3625/* System header to define __stub macros and hopefully few prototypes,
3626 which can conflict with char wctype(); below. */
3627#include <assert.h>
3628/* Override any gcc2 internal prototype to avoid an error. */
3629/* We use char because int might match the return type of a gcc2
3630 builtin and then its argument prototype would still apply. */
3631char wctype();
3632
3633int main() {
3634
3635/* The GNU C library defines this for functions which it implements
3636 to always fail with ENOSYS. Some functions are actually named
3637 something starting with __ and the normal name is an alias. */
3638#if defined (__stub_wctype) || defined (__stub___wctype)
3639choke me
3640#else
3641wctype();
3642#endif
3643
3644; return 0; }
3645EOF
b0b1c2c0 3646if { (eval echo configure:3647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3647 rm -rf conftest*
3648 eval "ac_cv_func_wctype=yes"
3649else
3650 echo "configure: failed program was:" >&5
3651 cat conftest.$ac_ext >&5
3652 rm -rf conftest*
3653 eval "ac_cv_func_wctype=no"
3654fi
3655rm -f conftest*
3656fi
3657
3658if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3659 echo "$ac_t""yes" 1>&6
3660 :
3661else
3662 echo "$ac_t""no" 1>&6
3663echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
b0b1c2c0 3664echo "configure:3665: checking for wctype in -lw" >&5
9a156167
MK
3665ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3666if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3667 echo $ac_n "(cached) $ac_c" 1>&6
3668else
3669 ac_save_LIBS="$LIBS"
3670LIBS="-lw $LIBS"
3671cat > conftest.$ac_ext <<EOF
b0b1c2c0 3672#line 3673 "configure"
9a156167
MK
3673#include "confdefs.h"
3674/* Override any gcc2 internal prototype to avoid an error. */
3675/* We use char because int might match the return type of a gcc2
3676 builtin and then its argument prototype would still apply. */
3677char wctype();
3678
3679int main() {
3680wctype()
3681; return 0; }
3682EOF
b0b1c2c0 3683if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3684 rm -rf conftest*
3685 eval "ac_cv_lib_$ac_lib_var=yes"
3686else
3687 echo "configure: failed program was:" >&5
3688 cat conftest.$ac_ext >&5
3689 rm -rf conftest*
3690 eval "ac_cv_lib_$ac_lib_var=no"
3691fi
3692rm -f conftest*
3693LIBS="$ac_save_LIBS"
3694
3695fi
3696if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3697 echo "$ac_t""yes" 1>&6
3698 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3699 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3700 cat >> confdefs.h <<EOF
3701#define $ac_tr_lib 1
3702EOF
3703
3704 LIBS="-lw $LIBS"
3705
3706else
3707 echo "$ac_t""no" 1>&6
3708fi
3709
3710fi
3711
3712
3713# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3714
3715echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
b0b1c2c0 3716echo "configure:3717: checking for library containing socketpair" >&5
9a156167
MK
3717if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3718 echo $ac_n "(cached) $ac_c" 1>&6
3719else
3720 ac_func_search_save_LIBS="$LIBS"
3721ac_cv_search_socketpair="no"
3722cat > conftest.$ac_ext <<EOF
b0b1c2c0 3723#line 3724 "configure"
9a156167
MK
3724#include "confdefs.h"
3725/* Override any gcc2 internal prototype to avoid an error. */
3726/* We use char because int might match the return type of a gcc2
3727 builtin and then its argument prototype would still apply. */
3728char socketpair();
3729
3730int main() {
3731socketpair()
3732; return 0; }
3733EOF
b0b1c2c0 3734if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3735 rm -rf conftest*
3736 ac_cv_search_socketpair="none required"
3737else
3738 echo "configure: failed program was:" >&5
3739 cat conftest.$ac_ext >&5
3740fi
3741rm -f conftest*
3742test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3743LIBS="-l$i $ac_func_search_save_LIBS"
3744cat > conftest.$ac_ext <<EOF
b0b1c2c0 3745#line 3746 "configure"
9a156167
MK
3746#include "confdefs.h"
3747/* Override any gcc2 internal prototype to avoid an error. */
3748/* We use char because int might match the return type of a gcc2
3749 builtin and then its argument prototype would still apply. */
3750char socketpair();
3751
3752int main() {
3753socketpair()
3754; return 0; }
3755EOF
b0b1c2c0 3756if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3757 rm -rf conftest*
3758 ac_cv_search_socketpair="-l$i"
3759break
3760else
3761 echo "configure: failed program was:" >&5
3762 cat conftest.$ac_ext >&5
3763fi
3764rm -f conftest*
3765done
3766LIBS="$ac_func_search_save_LIBS"
3767fi
3768
3769echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3770if test "$ac_cv_search_socketpair" != "no"; then
3771 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3772
3773else :
3774
3775fi
3776
06825bd1
MK
3777# Since GDB uses Readline, we need termcap functionality, so we need
3778# to find a library that provides that. When GDB is configured with
3779# --enable-tui, we need full curses functionality.
3780#
3781# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3782# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3783# Makefile fragments. That's why we need to have `Hcurses' before
3784# `curses'. I don't see why we should use HP curses if a more
3785# standard curses is available, except that according to HP's
3786# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3787# HP-UX 10.10 and 10.20.
3788
3789if test "$need_curses" = yes; then
3790
3791echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
b0b1c2c0 3792echo "configure:3793: checking for library containing initscr" >&5
06825bd1
MK
3793if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3794 echo $ac_n "(cached) $ac_c" 1>&6
3795else
3796 ac_func_search_save_LIBS="$LIBS"
3797ac_cv_search_initscr="no"
3798cat > conftest.$ac_ext <<EOF
b0b1c2c0 3799#line 3800 "configure"
06825bd1
MK
3800#include "confdefs.h"
3801/* Override any gcc2 internal prototype to avoid an error. */
3802/* We use char because int might match the return type of a gcc2
3803 builtin and then its argument prototype would still apply. */
3804char initscr();
3805
3806int main() {
3807initscr()
3808; return 0; }
3809EOF
b0b1c2c0 3810if { (eval echo configure:3811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3811 rm -rf conftest*
3812 ac_cv_search_initscr="none required"
3813else
3814 echo "configure: failed program was:" >&5
3815 cat conftest.$ac_ext >&5
3816fi
3817rm -f conftest*
3818test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3819LIBS="-l$i $ac_func_search_save_LIBS"
3820cat > conftest.$ac_ext <<EOF
b0b1c2c0 3821#line 3822 "configure"
06825bd1
MK
3822#include "confdefs.h"
3823/* Override any gcc2 internal prototype to avoid an error. */
3824/* We use char because int might match the return type of a gcc2
3825 builtin and then its argument prototype would still apply. */
3826char initscr();
3827
3828int main() {
3829initscr()
3830; return 0; }
3831EOF
b0b1c2c0 3832if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3833 rm -rf conftest*
3834 ac_cv_search_initscr="-l$i"
3835break
3836else
3837 echo "configure: failed program was:" >&5
3838 cat conftest.$ac_ext >&5
3839fi
3840rm -f conftest*
3841done
3842LIBS="$ac_func_search_save_LIBS"
3843fi
3844
3845echo "$ac_t""$ac_cv_search_initscr" 1>&6
3846if test "$ac_cv_search_initscr" != "no"; then
3847 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3848
3849else :
3850 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3851fi
3852fi
3853
3854case $host_os in
3855 cygwin*)
3856 if test -d $srcdir/libtermcap; then
3857 LIBS="../libtermcap/libtermcap.a $LIBS"
3858 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3859 fi ;;
3860 go32*)
3861 # ??? Is this really true?
3862 ac_cv_search_tgetent="none required"
3863 ;;
3864 aix*)
3865 # Readline prefers curses over termcap on AIX.
3866 # ??? Why?
3867
3868echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
b0b1c2c0 3869echo "configure:3870: checking for library containing tgetent" >&5
06825bd1
MK
3870if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872else
3873 ac_func_search_save_LIBS="$LIBS"
3874ac_cv_search_tgetent="no"
3875cat > conftest.$ac_ext <<EOF
b0b1c2c0 3876#line 3877 "configure"
06825bd1
MK
3877#include "confdefs.h"
3878/* Override any gcc2 internal prototype to avoid an error. */
3879/* We use char because int might match the return type of a gcc2
3880 builtin and then its argument prototype would still apply. */
3881char tgetent();
3882
3883int main() {
3884tgetent()
3885; return 0; }
3886EOF
b0b1c2c0 3887if { (eval echo configure:3888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3888 rm -rf conftest*
3889 ac_cv_search_tgetent="none required"
3890else
3891 echo "configure: failed program was:" >&5
3892 cat conftest.$ac_ext >&5
3893fi
3894rm -f conftest*
3895test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3896LIBS="-l$i $ac_func_search_save_LIBS"
3897cat > conftest.$ac_ext <<EOF
b0b1c2c0 3898#line 3899 "configure"
06825bd1
MK
3899#include "confdefs.h"
3900/* Override any gcc2 internal prototype to avoid an error. */
3901/* We use char because int might match the return type of a gcc2
3902 builtin and then its argument prototype would still apply. */
3903char tgetent();
3904
3905int main() {
3906tgetent()
3907; return 0; }
3908EOF
b0b1c2c0 3909if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3910 rm -rf conftest*
3911 ac_cv_search_tgetent="-l$i"
3912break
3913else
3914 echo "configure: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3916fi
3917rm -f conftest*
3918done
3919LIBS="$ac_func_search_save_LIBS"
3920fi
3921
3922echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3923if test "$ac_cv_search_tgetent" != "no"; then
3924 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3925
3926else :
3927
3928fi
3929 ;;
3930esac
3931
3932# Note: We used to check for libtermlib and libterminfo too, but
3933# Readline doesn't, so I think we're safe with leaving them out.
3934
3935echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
b0b1c2c0 3936echo "configure:3937: checking for library containing tgetent" >&5
06825bd1
MK
3937if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3938 echo $ac_n "(cached) $ac_c" 1>&6
3939else
3940 ac_func_search_save_LIBS="$LIBS"
3941ac_cv_search_tgetent="no"
3942cat > conftest.$ac_ext <<EOF
b0b1c2c0 3943#line 3944 "configure"
06825bd1
MK
3944#include "confdefs.h"
3945/* Override any gcc2 internal prototype to avoid an error. */
3946/* We use char because int might match the return type of a gcc2
3947 builtin and then its argument prototype would still apply. */
3948char tgetent();
3949
3950int main() {
3951tgetent()
3952; return 0; }
3953EOF
b0b1c2c0 3954if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3955 rm -rf conftest*
3956 ac_cv_search_tgetent="none required"
3957else
3958 echo "configure: failed program was:" >&5
3959 cat conftest.$ac_ext >&5
3960fi
3961rm -f conftest*
3962test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3963LIBS="-l$i $ac_func_search_save_LIBS"
3964cat > conftest.$ac_ext <<EOF
b0b1c2c0 3965#line 3966 "configure"
06825bd1
MK
3966#include "confdefs.h"
3967/* Override any gcc2 internal prototype to avoid an error. */
3968/* We use char because int might match the return type of a gcc2
3969 builtin and then its argument prototype would still apply. */
3970char tgetent();
3971
3972int main() {
3973tgetent()
3974; return 0; }
3975EOF
b0b1c2c0 3976if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3977 rm -rf conftest*
3978 ac_cv_search_tgetent="-l$i"
3979break
3980else
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3983fi
3984rm -f conftest*
3985done
3986LIBS="$ac_func_search_save_LIBS"
3987fi
3988
3989echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3990if test "$ac_cv_search_tgetent" != "no"; then
3991 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3992
3993else :
3994
3995fi
3996
3997if test "$ac_cv_search_tgetent" = no; then
3998 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3999fi
4000
5ee754fc
MK
4001# ------------------------- #
4002# Checks for header files. #
4003# ------------------------- #
4004
4005ac_header_dirent=no
4006for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4007do
4008ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4009echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
b0b1c2c0 4010echo "configure:4011: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4011if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4012 echo $ac_n "(cached) $ac_c" 1>&6
4013else
4014 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4015#line 4016 "configure"
c906108c
SS
4016#include "confdefs.h"
4017#include <sys/types.h>
5ee754fc
MK
4018#include <$ac_hdr>
4019int main() {
4020DIR *dirp = 0;
4021; return 0; }
4022EOF
b0b1c2c0 4023if { (eval echo configure:4024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4024 rm -rf conftest*
4025 eval "ac_cv_header_dirent_$ac_safe=yes"
4026else
4027 echo "configure: failed program was:" >&5
4028 cat conftest.$ac_ext >&5
4029 rm -rf conftest*
4030 eval "ac_cv_header_dirent_$ac_safe=no"
4031fi
4032rm -f conftest*
4033fi
4034if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4035 echo "$ac_t""yes" 1>&6
4036 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4037 cat >> confdefs.h <<EOF
4038#define $ac_tr_hdr 1
4039EOF
4040 ac_header_dirent=$ac_hdr; break
4041else
4042 echo "$ac_t""no" 1>&6
4043fi
4044done
4045# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4046if test $ac_header_dirent = dirent.h; then
4047echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
b0b1c2c0 4048echo "configure:4049: checking for opendir in -ldir" >&5
5ee754fc
MK
4049ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4050if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4051 echo $ac_n "(cached) $ac_c" 1>&6
4052else
4053 ac_save_LIBS="$LIBS"
4054LIBS="-ldir $LIBS"
4055cat > conftest.$ac_ext <<EOF
b0b1c2c0 4056#line 4057 "configure"
5ee754fc
MK
4057#include "confdefs.h"
4058/* Override any gcc2 internal prototype to avoid an error. */
4059/* We use char because int might match the return type of a gcc2
4060 builtin and then its argument prototype would still apply. */
4061char opendir();
c906108c
SS
4062
4063int main() {
5ee754fc 4064opendir()
c906108c
SS
4065; return 0; }
4066EOF
b0b1c2c0 4067if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4068 rm -rf conftest*
5ee754fc 4069 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4070else
4071 echo "configure: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4073 rm -rf conftest*
5ee754fc 4074 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4075fi
4076rm -f conftest*
5ee754fc
MK
4077LIBS="$ac_save_LIBS"
4078
4079fi
4080if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4081 echo "$ac_t""yes" 1>&6
4082 LIBS="$LIBS -ldir"
4083else
4084 echo "$ac_t""no" 1>&6
c906108c
SS
4085fi
4086
5ee754fc
MK
4087else
4088echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
b0b1c2c0 4089echo "configure:4090: checking for opendir in -lx" >&5
5ee754fc
MK
4090ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4091if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4092 echo $ac_n "(cached) $ac_c" 1>&6
4093else
4094 ac_save_LIBS="$LIBS"
4095LIBS="-lx $LIBS"
4096cat > conftest.$ac_ext <<EOF
b0b1c2c0 4097#line 4098 "configure"
5ee754fc
MK
4098#include "confdefs.h"
4099/* Override any gcc2 internal prototype to avoid an error. */
4100/* We use char because int might match the return type of a gcc2
4101 builtin and then its argument prototype would still apply. */
4102char opendir();
4103
4104int main() {
4105opendir()
4106; return 0; }
c906108c 4107EOF
b0b1c2c0 4108if { (eval echo configure:4109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4109 rm -rf conftest*
4110 eval "ac_cv_lib_$ac_lib_var=yes"
4111else
4112 echo "configure: failed program was:" >&5
4113 cat conftest.$ac_ext >&5
4114 rm -rf conftest*
4115 eval "ac_cv_lib_$ac_lib_var=no"
4116fi
4117rm -f conftest*
4118LIBS="$ac_save_LIBS"
c906108c 4119
5ee754fc
MK
4120fi
4121if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4122 echo "$ac_t""yes" 1>&6
4123 LIBS="$LIBS -lx"
4124else
4125 echo "$ac_t""no" 1>&6
4126fi
c906108c 4127
5ee754fc 4128fi
c906108c 4129
5ee754fc 4130echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
b0b1c2c0 4131echo "configure:4132: checking whether stat file-mode macros are broken" >&5
5ee754fc 4132if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4133 echo $ac_n "(cached) $ac_c" 1>&6
4134else
4135 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4136#line 4137 "configure"
9608ab8b
MK
4137#include "confdefs.h"
4138#include <sys/types.h>
5ee754fc
MK
4139#include <sys/stat.h>
4140
4141#if defined(S_ISBLK) && defined(S_IFDIR)
4142# if S_ISBLK (S_IFDIR)
4143You lose.
4144# endif
4145#endif
4146
4147#if defined(S_ISBLK) && defined(S_IFCHR)
4148# if S_ISBLK (S_IFCHR)
4149You lose.
4150# endif
4151#endif
4152
4153#if defined(S_ISLNK) && defined(S_IFREG)
4154# if S_ISLNK (S_IFREG)
4155You lose.
4156# endif
4157#endif
4158
4159#if defined(S_ISSOCK) && defined(S_IFREG)
4160# if S_ISSOCK (S_IFREG)
4161You lose.
4162# endif
4163#endif
4164
9608ab8b 4165EOF
5ee754fc
MK
4166if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4167 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4168 rm -rf conftest*
5ee754fc
MK
4169 ac_cv_header_stat_broken=yes
4170else
4171 rm -rf conftest*
4172 ac_cv_header_stat_broken=no
4173fi
4174rm -f conftest*
4175
4176fi
4177
4178echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4179if test $ac_cv_header_stat_broken = yes; then
4180 cat >> confdefs.h <<\EOF
4181#define STAT_MACROS_BROKEN 1
4182EOF
4183
4184fi
4185
4186echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
b0b1c2c0 4187echo "configure:4188: checking for ANSI C header files" >&5
5ee754fc
MK
4188if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4189 echo $ac_n "(cached) $ac_c" 1>&6
4190else
4191 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4192#line 4193 "configure"
5ee754fc
MK
4193#include "confdefs.h"
4194#include <stdlib.h>
4195#include <stdarg.h>
4196#include <string.h>
4197#include <float.h>
4198EOF
4199ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4200{ (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4201ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202if test -z "$ac_err"; then
4203 rm -rf conftest*
4204 ac_cv_header_stdc=yes
4205else
4206 echo "$ac_err" >&5
4207 echo "configure: failed program was:" >&5
4208 cat conftest.$ac_ext >&5
4209 rm -rf conftest*
4210 ac_cv_header_stdc=no
4211fi
4212rm -f conftest*
4213
4214if test $ac_cv_header_stdc = yes; then
4215 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4216cat > conftest.$ac_ext <<EOF
b0b1c2c0 4217#line 4218 "configure"
5ee754fc
MK
4218#include "confdefs.h"
4219#include <string.h>
4220EOF
4221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4222 egrep "memchr" >/dev/null 2>&1; then
4223 :
4224else
4225 rm -rf conftest*
4226 ac_cv_header_stdc=no
4227fi
4228rm -f conftest*
4229
4230fi
4231
4232if test $ac_cv_header_stdc = yes; then
4233 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4234cat > conftest.$ac_ext <<EOF
b0b1c2c0 4235#line 4236 "configure"
5ee754fc
MK
4236#include "confdefs.h"
4237#include <stdlib.h>
4238EOF
4239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4240 egrep "free" >/dev/null 2>&1; then
4241 :
4242else
4243 rm -rf conftest*
4244 ac_cv_header_stdc=no
4245fi
4246rm -f conftest*
4247
4248fi
4249
4250if test $ac_cv_header_stdc = yes; then
4251 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4252if test "$cross_compiling" = yes; then
4253 :
4254else
4255 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4256#line 4257 "configure"
5ee754fc
MK
4257#include "confdefs.h"
4258#include <ctype.h>
4259#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4260#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4261#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4262int main () { int i; for (i = 0; i < 256; i++)
4263if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4264exit (0); }
4265
4266EOF
b0b1c2c0 4267if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4268then
4269 :
9608ab8b 4270else
5ee754fc
MK
4271 echo "configure: failed program was:" >&5
4272 cat conftest.$ac_ext >&5
4273 rm -fr conftest*
4274 ac_cv_header_stdc=no
4275fi
4276rm -fr conftest*
4277fi
4278
4279fi
4280fi
4281
4282echo "$ac_t""$ac_cv_header_stdc" 1>&6
4283if test $ac_cv_header_stdc = yes; then
4284 cat >> confdefs.h <<\EOF
4285#define STDC_HEADERS 1
4286EOF
4287
4288fi
4289
4290for ac_hdr in link.h
4291do
4292ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4293echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4294echo "configure:4295: checking for $ac_hdr" >&5
5ee754fc
MK
4295if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4296 echo $ac_n "(cached) $ac_c" 1>&6
4297else
4298 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4299#line 4300 "configure"
5ee754fc
MK
4300#include "confdefs.h"
4301#include <$ac_hdr>
4302EOF
4303ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4304{ (eval echo configure:4305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4305ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4306if test -z "$ac_err"; then
4307 rm -rf conftest*
4308 eval "ac_cv_header_$ac_safe=yes"
4309else
4310 echo "$ac_err" >&5
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 rm -rf conftest*
4314 eval "ac_cv_header_$ac_safe=no"
4315fi
4316rm -f conftest*
4317fi
4318if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4319 echo "$ac_t""yes" 1>&6
4320 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4321 cat >> confdefs.h <<EOF
4322#define $ac_tr_hdr 1
4323EOF
4324
4325else
4326 echo "$ac_t""no" 1>&6
4327fi
4328done
4329
4330for ac_hdr in nlist.h
4331do
4332ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4333echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4334echo "configure:4335: checking for $ac_hdr" >&5
5ee754fc
MK
4335if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4336 echo $ac_n "(cached) $ac_c" 1>&6
4337else
4338 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4339#line 4340 "configure"
5ee754fc
MK
4340#include "confdefs.h"
4341#include <$ac_hdr>
4342EOF
4343ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4344{ (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4345ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4346if test -z "$ac_err"; then
4347 rm -rf conftest*
4348 eval "ac_cv_header_$ac_safe=yes"
4349else
4350 echo "$ac_err" >&5
4351 echo "configure: failed program was:" >&5
4352 cat conftest.$ac_ext >&5
4353 rm -rf conftest*
4354 eval "ac_cv_header_$ac_safe=no"
4355fi
4356rm -f conftest*
4357fi
4358if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4359 echo "$ac_t""yes" 1>&6
4360 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4361 cat >> confdefs.h <<EOF
4362#define $ac_tr_hdr 1
4363EOF
4364
4365else
4366 echo "$ac_t""no" 1>&6
4367fi
4368done
4369
4370for ac_hdr in poll.h sys/poll.h
4371do
4372ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4373echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4374echo "configure:4375: checking for $ac_hdr" >&5
5ee754fc
MK
4375if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377else
4378 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4379#line 4380 "configure"
5ee754fc
MK
4380#include "confdefs.h"
4381#include <$ac_hdr>
4382EOF
4383ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4384{ (eval echo configure:4385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4385ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4386if test -z "$ac_err"; then
4387 rm -rf conftest*
4388 eval "ac_cv_header_$ac_safe=yes"
4389else
4390 echo "$ac_err" >&5
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 eval "ac_cv_header_$ac_safe=no"
4395fi
4396rm -f conftest*
4397fi
4398if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4399 echo "$ac_t""yes" 1>&6
4400 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4401 cat >> confdefs.h <<EOF
4402#define $ac_tr_hdr 1
4403EOF
4404
4405else
4406 echo "$ac_t""no" 1>&6
4407fi
4408done
4409
4410for ac_hdr in proc_service.h thread_db.h
4411do
4412ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4413echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4414echo "configure:4415: checking for $ac_hdr" >&5
5ee754fc
MK
4415if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4416 echo $ac_n "(cached) $ac_c" 1>&6
4417else
4418 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4419#line 4420 "configure"
5ee754fc
MK
4420#include "confdefs.h"
4421#include <$ac_hdr>
4422EOF
4423ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4424{ (eval echo configure:4425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4425ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4426if test -z "$ac_err"; then
4427 rm -rf conftest*
4428 eval "ac_cv_header_$ac_safe=yes"
4429else
4430 echo "$ac_err" >&5
4431 echo "configure: failed program was:" >&5
4432 cat conftest.$ac_ext >&5
4433 rm -rf conftest*
4434 eval "ac_cv_header_$ac_safe=no"
4435fi
4436rm -f conftest*
4437fi
4438if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4439 echo "$ac_t""yes" 1>&6
4440 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4441 cat >> confdefs.h <<EOF
4442#define $ac_tr_hdr 1
4443EOF
4444
4445else
4446 echo "$ac_t""no" 1>&6
4447fi
4448done
4449
4450for ac_hdr in stddef.h
4451do
4452ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4453echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4454echo "configure:4455: checking for $ac_hdr" >&5
5ee754fc
MK
4455if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4456 echo $ac_n "(cached) $ac_c" 1>&6
4457else
4458 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4459#line 4460 "configure"
5ee754fc
MK
4460#include "confdefs.h"
4461#include <$ac_hdr>
4462EOF
4463ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4464{ (eval echo configure:4465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4465ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4466if test -z "$ac_err"; then
4467 rm -rf conftest*
4468 eval "ac_cv_header_$ac_safe=yes"
4469else
4470 echo "$ac_err" >&5
4471 echo "configure: failed program was:" >&5
4472 cat conftest.$ac_ext >&5
4473 rm -rf conftest*
4474 eval "ac_cv_header_$ac_safe=no"
4475fi
4476rm -f conftest*
4477fi
4478if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4479 echo "$ac_t""yes" 1>&6
4480 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4481 cat >> confdefs.h <<EOF
4482#define $ac_tr_hdr 1
4483EOF
4484
4485else
4486 echo "$ac_t""no" 1>&6
4487fi
4488done
4489
4490for ac_hdr in stdlib.h
4491do
4492ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4493echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4494echo "configure:4495: checking for $ac_hdr" >&5
5ee754fc
MK
4495if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4496 echo $ac_n "(cached) $ac_c" 1>&6
4497else
4498 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4499#line 4500 "configure"
5ee754fc
MK
4500#include "confdefs.h"
4501#include <$ac_hdr>
4502EOF
4503ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4504{ (eval echo configure:4505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4505ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4506if test -z "$ac_err"; then
4507 rm -rf conftest*
4508 eval "ac_cv_header_$ac_safe=yes"
4509else
4510 echo "$ac_err" >&5
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -rf conftest*
4514 eval "ac_cv_header_$ac_safe=no"
4515fi
4516rm -f conftest*
4517fi
4518if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4519 echo "$ac_t""yes" 1>&6
4520 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4521 cat >> confdefs.h <<EOF
4522#define $ac_tr_hdr 1
4523EOF
4524
4525else
4526 echo "$ac_t""no" 1>&6
4527fi
4528done
4529
4530for ac_hdr in stdint.h
4531do
4532ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4533echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4534echo "configure:4535: checking for $ac_hdr" >&5
5ee754fc
MK
4535if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4536 echo $ac_n "(cached) $ac_c" 1>&6
4537else
4538 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4539#line 4540 "configure"
5ee754fc
MK
4540#include "confdefs.h"
4541#include <$ac_hdr>
4542EOF
4543ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4544{ (eval echo configure:4545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4545ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4546if test -z "$ac_err"; then
4547 rm -rf conftest*
4548 eval "ac_cv_header_$ac_safe=yes"
4549else
4550 echo "$ac_err" >&5
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 eval "ac_cv_header_$ac_safe=no"
4555fi
4556rm -f conftest*
4557fi
4558if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4559 echo "$ac_t""yes" 1>&6
4560 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4561 cat >> confdefs.h <<EOF
4562#define $ac_tr_hdr 1
4563EOF
4564
4565else
4566 echo "$ac_t""no" 1>&6
4567fi
4568done
4569
4570for ac_hdr in string.h memory.h strings.h
4571do
4572ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4573echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4574echo "configure:4575: checking for $ac_hdr" >&5
5ee754fc
MK
4575if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4576 echo $ac_n "(cached) $ac_c" 1>&6
4577else
4578 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4579#line 4580 "configure"
5ee754fc
MK
4580#include "confdefs.h"
4581#include <$ac_hdr>
4582EOF
4583ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4584{ (eval echo configure:4585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4585ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4586if test -z "$ac_err"; then
4587 rm -rf conftest*
4588 eval "ac_cv_header_$ac_safe=yes"
4589else
4590 echo "$ac_err" >&5
4591 echo "configure: failed program was:" >&5
4592 cat conftest.$ac_ext >&5
4593 rm -rf conftest*
4594 eval "ac_cv_header_$ac_safe=no"
4595fi
4596rm -f conftest*
4597fi
4598if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4599 echo "$ac_t""yes" 1>&6
4600 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4601 cat >> confdefs.h <<EOF
4602#define $ac_tr_hdr 1
4603EOF
4604
4605else
4606 echo "$ac_t""no" 1>&6
4607fi
4608done
4609
4610for ac_hdr in sys/fault.h
4611do
4612ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4613echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4614echo "configure:4615: checking for $ac_hdr" >&5
5ee754fc
MK
4615if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4616 echo $ac_n "(cached) $ac_c" 1>&6
4617else
4618 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4619#line 4620 "configure"
5ee754fc
MK
4620#include "confdefs.h"
4621#include <$ac_hdr>
4622EOF
4623ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4624{ (eval echo configure:4625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4625ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4626if test -z "$ac_err"; then
4627 rm -rf conftest*
4628 eval "ac_cv_header_$ac_safe=yes"
4629else
4630 echo "$ac_err" >&5
4631 echo "configure: failed program was:" >&5
4632 cat conftest.$ac_ext >&5
4633 rm -rf conftest*
4634 eval "ac_cv_header_$ac_safe=no"
4635fi
4636rm -f conftest*
4637fi
4638if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4639 echo "$ac_t""yes" 1>&6
4640 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4641 cat >> confdefs.h <<EOF
4642#define $ac_tr_hdr 1
4643EOF
4644
4645else
4646 echo "$ac_t""no" 1>&6
4647fi
4648done
4649
4650for ac_hdr in sys/file.h
4651do
4652ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4653echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4654echo "configure:4655: checking for $ac_hdr" >&5
5ee754fc
MK
4655if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4656 echo $ac_n "(cached) $ac_c" 1>&6
4657else
4658 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4659#line 4660 "configure"
5ee754fc
MK
4660#include "confdefs.h"
4661#include <$ac_hdr>
4662EOF
4663ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4664{ (eval echo configure:4665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4665ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4666if test -z "$ac_err"; then
4667 rm -rf conftest*
4668 eval "ac_cv_header_$ac_safe=yes"
4669else
4670 echo "$ac_err" >&5
4671 echo "configure: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4673 rm -rf conftest*
4674 eval "ac_cv_header_$ac_safe=no"
4675fi
4676rm -f conftest*
4677fi
4678if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4679 echo "$ac_t""yes" 1>&6
4680 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4681 cat >> confdefs.h <<EOF
4682#define $ac_tr_hdr 1
4683EOF
4684
4685else
4686 echo "$ac_t""no" 1>&6
4687fi
4688done
4689
4690for ac_hdr in sys/filio.h
4691do
4692ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4693echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4694echo "configure:4695: checking for $ac_hdr" >&5
5ee754fc
MK
4695if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4696 echo $ac_n "(cached) $ac_c" 1>&6
4697else
4698 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4699#line 4700 "configure"
5ee754fc
MK
4700#include "confdefs.h"
4701#include <$ac_hdr>
4702EOF
4703ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4704{ (eval echo configure:4705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4705ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4706if test -z "$ac_err"; then
4707 rm -rf conftest*
4708 eval "ac_cv_header_$ac_safe=yes"
4709else
4710 echo "$ac_err" >&5
4711 echo "configure: failed program was:" >&5
4712 cat conftest.$ac_ext >&5
4713 rm -rf conftest*
4714 eval "ac_cv_header_$ac_safe=no"
4715fi
4716rm -f conftest*
4717fi
4718if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4719 echo "$ac_t""yes" 1>&6
4720 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4721 cat >> confdefs.h <<EOF
4722#define $ac_tr_hdr 1
4723EOF
4724
4725else
4726 echo "$ac_t""no" 1>&6
4727fi
4728done
4729
4730for ac_hdr in sys/ioctl.h
4731do
4732ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4733echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4734echo "configure:4735: checking for $ac_hdr" >&5
5ee754fc
MK
4735if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4736 echo $ac_n "(cached) $ac_c" 1>&6
4737else
4738 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4739#line 4740 "configure"
5ee754fc
MK
4740#include "confdefs.h"
4741#include <$ac_hdr>
4742EOF
4743ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4744{ (eval echo configure:4745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4745ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4746if test -z "$ac_err"; then
4747 rm -rf conftest*
4748 eval "ac_cv_header_$ac_safe=yes"
4749else
4750 echo "$ac_err" >&5
4751 echo "configure: failed program was:" >&5
4752 cat conftest.$ac_ext >&5
4753 rm -rf conftest*
4754 eval "ac_cv_header_$ac_safe=no"
4755fi
4756rm -f conftest*
4757fi
4758if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4759 echo "$ac_t""yes" 1>&6
4760 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4761 cat >> confdefs.h <<EOF
4762#define $ac_tr_hdr 1
4763EOF
4764
4765else
4766 echo "$ac_t""no" 1>&6
4767fi
4768done
4769
4770for ac_hdr in sys/param.h
4771do
4772ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4773echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4774echo "configure:4775: checking for $ac_hdr" >&5
5ee754fc
MK
4775if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4776 echo $ac_n "(cached) $ac_c" 1>&6
4777else
4778 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4779#line 4780 "configure"
5ee754fc
MK
4780#include "confdefs.h"
4781#include <$ac_hdr>
4782EOF
4783ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4784{ (eval echo configure:4785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4785ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4786if test -z "$ac_err"; then
4787 rm -rf conftest*
4788 eval "ac_cv_header_$ac_safe=yes"
4789else
4790 echo "$ac_err" >&5
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 rm -rf conftest*
4794 eval "ac_cv_header_$ac_safe=no"
4795fi
4796rm -f conftest*
4797fi
4798if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4799 echo "$ac_t""yes" 1>&6
4800 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4801 cat >> confdefs.h <<EOF
4802#define $ac_tr_hdr 1
4803EOF
4804
4805else
4806 echo "$ac_t""no" 1>&6
4807fi
4808done
4809
4810for ac_hdr in sys/proc.h
4811do
4812ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4813echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4814echo "configure:4815: checking for $ac_hdr" >&5
5ee754fc
MK
4815if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4816 echo $ac_n "(cached) $ac_c" 1>&6
4817else
4818 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4819#line 4820 "configure"
5ee754fc
MK
4820#include "confdefs.h"
4821#include <$ac_hdr>
4822EOF
4823ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4824{ (eval echo configure:4825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4825ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4826if test -z "$ac_err"; then
4827 rm -rf conftest*
4828 eval "ac_cv_header_$ac_safe=yes"
4829else
4830 echo "$ac_err" >&5
4831 echo "configure: failed program was:" >&5
4832 cat conftest.$ac_ext >&5
4833 rm -rf conftest*
4834 eval "ac_cv_header_$ac_safe=no"
4835fi
4836rm -f conftest*
4837fi
4838if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4839 echo "$ac_t""yes" 1>&6
4840 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4841 cat >> confdefs.h <<EOF
4842#define $ac_tr_hdr 1
4843EOF
4844
4845else
4846 echo "$ac_t""no" 1>&6
4847fi
4848done
4849
4850for ac_hdr in sys/procfs.h
4851do
4852ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4853echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4854echo "configure:4855: checking for $ac_hdr" >&5
5ee754fc
MK
4855if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4857else
4858 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4859#line 4860 "configure"
5ee754fc
MK
4860#include "confdefs.h"
4861#include <$ac_hdr>
4862EOF
4863ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4864{ (eval echo configure:4865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4865ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4866if test -z "$ac_err"; then
4867 rm -rf conftest*
4868 eval "ac_cv_header_$ac_safe=yes"
4869else
4870 echo "$ac_err" >&5
4871 echo "configure: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873 rm -rf conftest*
4874 eval "ac_cv_header_$ac_safe=no"
4875fi
4876rm -f conftest*
4877fi
4878if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4879 echo "$ac_t""yes" 1>&6
4880 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4881 cat >> confdefs.h <<EOF
4882#define $ac_tr_hdr 1
4883EOF
4884
4885else
4886 echo "$ac_t""no" 1>&6
4887fi
4888done
4889
4890for ac_hdr in sys/ptrace.h ptrace.h
4891do
4892ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4893echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4894echo "configure:4895: checking for $ac_hdr" >&5
5ee754fc
MK
4895if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4896 echo $ac_n "(cached) $ac_c" 1>&6
4897else
4898 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4899#line 4900 "configure"
5ee754fc
MK
4900#include "confdefs.h"
4901#include <$ac_hdr>
4902EOF
4903ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4904{ (eval echo configure:4905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4905ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4906if test -z "$ac_err"; then
4907 rm -rf conftest*
4908 eval "ac_cv_header_$ac_safe=yes"
4909else
4910 echo "$ac_err" >&5
4911 echo "configure: failed program was:" >&5
4912 cat conftest.$ac_ext >&5
4913 rm -rf conftest*
4914 eval "ac_cv_header_$ac_safe=no"
4915fi
4916rm -f conftest*
4917fi
4918if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4919 echo "$ac_t""yes" 1>&6
4920 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4921 cat >> confdefs.h <<EOF
4922#define $ac_tr_hdr 1
4923EOF
4924
4925else
4926 echo "$ac_t""no" 1>&6
4927fi
4928done
4929
4930for ac_hdr in sys/reg.h sys/debugreg.h
4931do
4932ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4933echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4934echo "configure:4935: checking for $ac_hdr" >&5
5ee754fc
MK
4935if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4936 echo $ac_n "(cached) $ac_c" 1>&6
4937else
4938 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4939#line 4940 "configure"
5ee754fc
MK
4940#include "confdefs.h"
4941#include <$ac_hdr>
4942EOF
4943ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4944{ (eval echo configure:4945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4945ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4946if test -z "$ac_err"; then
4947 rm -rf conftest*
4948 eval "ac_cv_header_$ac_safe=yes"
4949else
4950 echo "$ac_err" >&5
4951 echo "configure: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 rm -rf conftest*
4954 eval "ac_cv_header_$ac_safe=no"
4955fi
4956rm -f conftest*
4957fi
4958if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4959 echo "$ac_t""yes" 1>&6
4960 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4961 cat >> confdefs.h <<EOF
4962#define $ac_tr_hdr 1
4963EOF
4964
4965else
4966 echo "$ac_t""no" 1>&6
4967fi
4968done
4969
4970for ac_hdr in sys/select.h
4971do
4972ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4973echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 4974echo "configure:4975: checking for $ac_hdr" >&5
5ee754fc
MK
4975if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4976 echo $ac_n "(cached) $ac_c" 1>&6
4977else
4978 cat > conftest.$ac_ext <<EOF
b0b1c2c0 4979#line 4980 "configure"
5ee754fc
MK
4980#include "confdefs.h"
4981#include <$ac_hdr>
4982EOF
4983ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 4984{ (eval echo configure:4985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4985ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4986if test -z "$ac_err"; then
4987 rm -rf conftest*
4988 eval "ac_cv_header_$ac_safe=yes"
4989else
4990 echo "$ac_err" >&5
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4993 rm -rf conftest*
4994 eval "ac_cv_header_$ac_safe=no"
4995fi
4996rm -f conftest*
4997fi
4998if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4999 echo "$ac_t""yes" 1>&6
5000 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5001 cat >> confdefs.h <<EOF
5002#define $ac_tr_hdr 1
5003EOF
5004
5005else
5006 echo "$ac_t""no" 1>&6
5007fi
5008done
5009
5010for ac_hdr in sys/syscall.h
5011do
5012ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5013echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5014echo "configure:5015: checking for $ac_hdr" >&5
5ee754fc
MK
5015if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5016 echo $ac_n "(cached) $ac_c" 1>&6
5017else
5018 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5019#line 5020 "configure"
5ee754fc
MK
5020#include "confdefs.h"
5021#include <$ac_hdr>
5022EOF
5023ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5024{ (eval echo configure:5025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5025ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5026if test -z "$ac_err"; then
5027 rm -rf conftest*
5028 eval "ac_cv_header_$ac_safe=yes"
5029else
5030 echo "$ac_err" >&5
5031 echo "configure: failed program was:" >&5
5032 cat conftest.$ac_ext >&5
5033 rm -rf conftest*
5034 eval "ac_cv_header_$ac_safe=no"
5035fi
5036rm -f conftest*
5037fi
5038if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5039 echo "$ac_t""yes" 1>&6
5040 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5041 cat >> confdefs.h <<EOF
5042#define $ac_tr_hdr 1
5043EOF
5044
5045else
5046 echo "$ac_t""no" 1>&6
5047fi
5048done
5049
5050for ac_hdr in sys/user.h
5051do
5052ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5053echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5054echo "configure:5055: checking for $ac_hdr" >&5
5ee754fc
MK
5055if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5056 echo $ac_n "(cached) $ac_c" 1>&6
5057else
5058 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5059#line 5060 "configure"
5ee754fc
MK
5060#include "confdefs.h"
5061#include <$ac_hdr>
5062EOF
5063ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5064{ (eval echo configure:5065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5065ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5066if test -z "$ac_err"; then
5067 rm -rf conftest*
5068 eval "ac_cv_header_$ac_safe=yes"
5069else
5070 echo "$ac_err" >&5
5071 echo "configure: failed program was:" >&5
5072 cat conftest.$ac_ext >&5
5073 rm -rf conftest*
5074 eval "ac_cv_header_$ac_safe=no"
5075fi
5076rm -f conftest*
5077fi
5078if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5079 echo "$ac_t""yes" 1>&6
5080 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5081 cat >> confdefs.h <<EOF
5082#define $ac_tr_hdr 1
5083EOF
5084
5085else
5086 echo "$ac_t""no" 1>&6
5087fi
5088done
5089
5090for ac_hdr in sys/wait.h wait.h
5091do
5092ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5093echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5094echo "configure:5095: checking for $ac_hdr" >&5
5ee754fc
MK
5095if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5096 echo $ac_n "(cached) $ac_c" 1>&6
5097else
5098 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5099#line 5100 "configure"
5ee754fc
MK
5100#include "confdefs.h"
5101#include <$ac_hdr>
5102EOF
5103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5104{ (eval echo configure:5105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5106if test -z "$ac_err"; then
5107 rm -rf conftest*
5108 eval "ac_cv_header_$ac_safe=yes"
5109else
5110 echo "$ac_err" >&5
9608ab8b
MK
5111 echo "configure: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5113 rm -rf conftest*
5ee754fc 5114 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5115fi
5116rm -f conftest*
5117fi
5ee754fc 5118if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5119 echo "$ac_t""yes" 1>&6
5120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5121 cat >> confdefs.h <<EOF
5122#define $ac_tr_hdr 1
5123EOF
5ee754fc 5124
9608ab8b
MK
5125else
5126 echo "$ac_t""no" 1>&6
5127fi
5128done
5ee754fc
MK
5129
5130for ac_hdr in termios.h termio.h sgtty.h
5131do
5132ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5133echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5134echo "configure:5135: checking for $ac_hdr" >&5
5ee754fc 5135if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5136 echo $ac_n "(cached) $ac_c" 1>&6
5137else
5ee754fc 5138 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5139#line 5140 "configure"
9608ab8b 5140#include "confdefs.h"
5ee754fc 5141#include <$ac_hdr>
9608ab8b 5142EOF
5ee754fc 5143ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5144{ (eval echo configure:5145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5145ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5146if test -z "$ac_err"; then
9608ab8b 5147 rm -rf conftest*
5ee754fc 5148 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5149else
5ee754fc 5150 echo "$ac_err" >&5
9608ab8b
MK
5151 echo "configure: failed program was:" >&5
5152 cat conftest.$ac_ext >&5
5153 rm -rf conftest*
5ee754fc 5154 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5155fi
5156rm -f conftest*
9608ab8b 5157fi
5ee754fc 5158if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5159 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5160 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5161 cat >> confdefs.h <<EOF
5162#define $ac_tr_hdr 1
5163EOF
5164
9608ab8b
MK
5165else
5166 echo "$ac_t""no" 1>&6
5167fi
5ee754fc 5168done
9608ab8b 5169
5ee754fc
MK
5170for ac_hdr in unistd.h
5171do
5172ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5173echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5174echo "configure:5175: checking for $ac_hdr" >&5
5ee754fc 5175if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5176 echo $ac_n "(cached) $ac_c" 1>&6
5177else
5ee754fc 5178 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5179#line 5180 "configure"
9608ab8b 5180#include "confdefs.h"
5ee754fc 5181#include <$ac_hdr>
9608ab8b 5182EOF
5ee754fc 5183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5184{ (eval echo configure:5185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5185ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5186if test -z "$ac_err"; then
9608ab8b 5187 rm -rf conftest*
5ee754fc 5188 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5189else
5ee754fc 5190 echo "$ac_err" >&5
9608ab8b
MK
5191 echo "configure: failed program was:" >&5
5192 cat conftest.$ac_ext >&5
5193 rm -rf conftest*
5ee754fc 5194 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5195fi
5196rm -f conftest*
9608ab8b 5197fi
5ee754fc 5198if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5199 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5200 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5201 cat >> confdefs.h <<EOF
5202#define $ac_tr_hdr 1
5203EOF
5204
9608ab8b
MK
5205else
5206 echo "$ac_t""no" 1>&6
5207fi
5ee754fc 5208done
9608ab8b 5209
9608ab8b 5210
5ee754fc
MK
5211# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5212# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5213# think that we don't have <curses.h> if we're using GCC.
5214case $host_os in
5215 solaris2.[78])
5216 if test "$GCC" = yes; then
5217 cat >> confdefs.h <<\EOF
5218#define _MSE_INT_H 1
5219EOF
5220
5221 fi ;;
5222esac
5223for ac_hdr in curses.h ncurses.h term.h
5224do
5225ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5226echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5227echo "configure:5228: checking for $ac_hdr" >&5
5ee754fc 5228if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5229 echo $ac_n "(cached) $ac_c" 1>&6
5230else
5231 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5232#line 5233 "configure"
c906108c 5233#include "confdefs.h"
5ee754fc 5234#include <$ac_hdr>
c906108c
SS
5235EOF
5236ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5237{ (eval echo configure:5238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5238ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5239if test -z "$ac_err"; then
5240 rm -rf conftest*
5ee754fc 5241 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5242else
5243 echo "$ac_err" >&5
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 rm -rf conftest*
5ee754fc 5247 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5248fi
5249rm -f conftest*
c906108c 5250fi
5ee754fc
MK
5251if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5252 echo "$ac_t""yes" 1>&6
5253 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5254 cat >> confdefs.h <<EOF
5255#define $ac_tr_hdr 1
c906108c 5256EOF
5ee754fc 5257
c906108c 5258else
5ee754fc 5259 echo "$ac_t""no" 1>&6
c906108c 5260fi
5ee754fc 5261done
c906108c
SS
5262
5263
5ee754fc
MK
5264# FIXME: kettenis/20030102: In most cases we include these
5265# unconditionally, so what's the point in checking these?
5266for ac_hdr in ctype.h time.h
c906108c
SS
5267do
5268ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5269echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5270echo "configure:5271: checking for $ac_hdr" >&5
c906108c
SS
5271if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5272 echo $ac_n "(cached) $ac_c" 1>&6
5273else
5274 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5275#line 5276 "configure"
c906108c
SS
5276#include "confdefs.h"
5277#include <$ac_hdr>
5278EOF
5279ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5280{ (eval echo configure:5281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5281ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5282if test -z "$ac_err"; then
5283 rm -rf conftest*
5284 eval "ac_cv_header_$ac_safe=yes"
5285else
5286 echo "$ac_err" >&5
5287 echo "configure: failed program was:" >&5
5288 cat conftest.$ac_ext >&5
5289 rm -rf conftest*
5290 eval "ac_cv_header_$ac_safe=no"
5291fi
5292rm -f conftest*
5293fi
5294if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5295 echo "$ac_t""yes" 1>&6
5296 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5297 cat >> confdefs.h <<EOF
5298#define $ac_tr_hdr 1
5299EOF
5300
5301else
5302 echo "$ac_t""no" 1>&6
5303fi
5304done
5305
5ee754fc
MK
5306
5307# ------------------ #
5308# Checks for types. #
5309# ------------------ #
5310
5311echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
b0b1c2c0 5312echo "configure:5313: checking return type of signal handlers" >&5
5ee754fc 5313if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5314 echo $ac_n "(cached) $ac_c" 1>&6
5315else
5316 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5317#line 5318 "configure"
c906108c
SS
5318#include "confdefs.h"
5319#include <sys/types.h>
5ee754fc
MK
5320#include <signal.h>
5321#ifdef signal
5322#undef signal
c906108c 5323#endif
5ee754fc
MK
5324#ifdef __cplusplus
5325extern "C" void (*signal (int, void (*)(int)))(int);
5326#else
5327void (*signal ()) ();
c906108c
SS
5328#endif
5329
5ee754fc
MK
5330int main() {
5331int i;
5332; return 0; }
c906108c 5333EOF
b0b1c2c0 5334if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5335 rm -rf conftest*
5ee754fc 5336 ac_cv_type_signal=void
c906108c 5337else
5ee754fc
MK
5338 echo "configure: failed program was:" >&5
5339 cat conftest.$ac_ext >&5
c906108c 5340 rm -rf conftest*
5ee754fc 5341 ac_cv_type_signal=int
c906108c
SS
5342fi
5343rm -f conftest*
c906108c
SS
5344fi
5345
5ee754fc
MK
5346echo "$ac_t""$ac_cv_type_signal" 1>&6
5347cat >> confdefs.h <<EOF
5348#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5349EOF
5350
c906108c
SS
5351
5352
5ee754fc
MK
5353# ------------------------------------- #
5354# Checks for compiler characteristics. #
5355# ------------------------------------- #
5356
c906108c 5357echo $ac_n "checking for working const""... $ac_c" 1>&6
b0b1c2c0 5358echo "configure:5359: checking for working const" >&5
c906108c
SS
5359if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5360 echo $ac_n "(cached) $ac_c" 1>&6
5361else
5362 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5363#line 5364 "configure"
c906108c
SS
5364#include "confdefs.h"
5365
5366int main() {
5367
5368/* Ultrix mips cc rejects this. */
5369typedef int charset[2]; const charset x;
5370/* SunOS 4.1.1 cc rejects this. */
5371char const *const *ccp;
5372char **p;
5373/* NEC SVR4.0.2 mips cc rejects this. */
5374struct point {int x, y;};
5375static struct point const zero = {0,0};
5376/* AIX XL C 1.02.0.0 rejects this.
5377 It does not let you subtract one const X* pointer from another in an arm
5378 of an if-expression whose if-part is not a constant expression */
5379const char *g = "string";
5380ccp = &g + (g ? g-g : 0);
5381/* HPUX 7.0 cc rejects these. */
5382++ccp;
5383p = (char**) ccp;
5384ccp = (char const *const *) p;
5385{ /* SCO 3.2v4 cc rejects this. */
5386 char *t;
5387 char const *s = 0 ? (char *) 0 : (char const *) 0;
5388
5389 *t++ = 0;
5390}
5391{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5392 int x[] = {25, 17};
5393 const int *foo = &x[0];
5394 ++foo;
5395}
5396{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5397 typedef const int *iptr;
5398 iptr p = 0;
5399 ++p;
5400}
5401{ /* AIX XL C 1.02.0.0 rejects this saying
5402 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5403 struct s { int j; const int *ap[3]; };
5404 struct s *b; b->j = 5;
5405}
5406{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5407 const int foo = 10;
5408}
5409
5410; return 0; }
5411EOF
b0b1c2c0 5412if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5413 rm -rf conftest*
5414 ac_cv_c_const=yes
5415else
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 ac_cv_c_const=no
5420fi
5421rm -f conftest*
5422fi
5423
5424echo "$ac_t""$ac_cv_c_const" 1>&6
5425if test $ac_cv_c_const = no; then
5426 cat >> confdefs.h <<\EOF
5427#define const
5428EOF
5429
5430fi
5431
bce58c09 5432echo $ac_n "checking for inline""... $ac_c" 1>&6
b0b1c2c0 5433echo "configure:5434: checking for inline" >&5
bce58c09
JB
5434if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5435 echo $ac_n "(cached) $ac_c" 1>&6
5436else
5437 ac_cv_c_inline=no
5438for ac_kw in inline __inline__ __inline; do
5439 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5440#line 5441 "configure"
bce58c09
JB
5441#include "confdefs.h"
5442
5443int main() {
5444} $ac_kw foo() {
5445; return 0; }
5446EOF
b0b1c2c0 5447if { (eval echo configure:5448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5448 rm -rf conftest*
5449 ac_cv_c_inline=$ac_kw; break
5450else
5451 echo "configure: failed program was:" >&5
5452 cat conftest.$ac_ext >&5
5453fi
5454rm -f conftest*
5455done
5456
5457fi
5458
5459echo "$ac_t""$ac_cv_c_inline" 1>&6
5460case "$ac_cv_c_inline" in
5461 inline | yes) ;;
5462 no) cat >> confdefs.h <<\EOF
5463#define inline
5464EOF
5465 ;;
5466 *) cat >> confdefs.h <<EOF
5467#define inline $ac_cv_c_inline
5468EOF
5469 ;;
5470esac
5471
c906108c 5472
5ee754fc
MK
5473# ------------------------------ #
5474# Checks for library functions. #
5475# ------------------------------ #
5476
46711df8
MK
5477# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5478# for constant arguments. Useless!
5479echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
b0b1c2c0 5480echo "configure:5481: checking for working alloca.h" >&5
46711df8
MK
5481if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5482 echo $ac_n "(cached) $ac_c" 1>&6
5483else
5484 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5485#line 5486 "configure"
46711df8
MK
5486#include "confdefs.h"
5487#include <alloca.h>
5488int main() {
5489char *p = alloca(2 * sizeof(int));
5490; return 0; }
5491EOF
b0b1c2c0 5492if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5493 rm -rf conftest*
5494 ac_cv_header_alloca_h=yes
5495else
5496 echo "configure: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 rm -rf conftest*
5499 ac_cv_header_alloca_h=no
5500fi
5501rm -f conftest*
5502fi
5503
5504echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5505if test $ac_cv_header_alloca_h = yes; then
5506 cat >> confdefs.h <<\EOF
5507#define HAVE_ALLOCA_H 1
5508EOF
5509
5510fi
5511
5512echo $ac_n "checking for alloca""... $ac_c" 1>&6
b0b1c2c0 5513echo "configure:5514: checking for alloca" >&5
46711df8
MK
5514if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516else
5517 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5518#line 5519 "configure"
46711df8
MK
5519#include "confdefs.h"
5520
5521#ifdef __GNUC__
5522# define alloca __builtin_alloca
5523#else
5524# ifdef _MSC_VER
5525# include <malloc.h>
5526# define alloca _alloca
5527# else
5528# if HAVE_ALLOCA_H
5529# include <alloca.h>
5530# else
5531# ifdef _AIX
5532 #pragma alloca
5533# else
5534# ifndef alloca /* predefined by HP cc +Olibcalls */
5535char *alloca ();
5536# endif
5537# endif
5538# endif
5539# endif
5540#endif
5541
5542int main() {
5543char *p = (char *) alloca(1);
5544; return 0; }
5545EOF
b0b1c2c0 5546if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5547 rm -rf conftest*
5548 ac_cv_func_alloca_works=yes
5549else
5550 echo "configure: failed program was:" >&5
5551 cat conftest.$ac_ext >&5
5552 rm -rf conftest*
5553 ac_cv_func_alloca_works=no
5554fi
5555rm -f conftest*
5556fi
5557
5558echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5559if test $ac_cv_func_alloca_works = yes; then
5560 cat >> confdefs.h <<\EOF
5561#define HAVE_ALLOCA 1
5562EOF
5563
5564fi
5565
5566if test $ac_cv_func_alloca_works = no; then
5567 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5568 # that cause trouble. Some versions do not even contain alloca or
5569 # contain a buggy version. If you still want to use their alloca,
5570 # use ar to extract alloca.o from them instead of compiling alloca.c.
5571 ALLOCA=alloca.${ac_objext}
5572 cat >> confdefs.h <<\EOF
5573#define C_ALLOCA 1
5574EOF
5575
5576
5577echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
b0b1c2c0 5578echo "configure:5579: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5579if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581else
5582 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5583#line 5584 "configure"
46711df8
MK
5584#include "confdefs.h"
5585#if defined(CRAY) && ! defined(CRAY2)
5586webecray
5587#else
5588wenotbecray
5589#endif
5590
5591EOF
5592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5593 egrep "webecray" >/dev/null 2>&1; then
5594 rm -rf conftest*
5595 ac_cv_os_cray=yes
5596else
5597 rm -rf conftest*
5598 ac_cv_os_cray=no
5599fi
5600rm -f conftest*
5601
5602fi
5603
5604echo "$ac_t""$ac_cv_os_cray" 1>&6
5605if test $ac_cv_os_cray = yes; then
5606for ac_func in _getb67 GETB67 getb67; do
5607 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 5608echo "configure:5609: checking for $ac_func" >&5
46711df8
MK
5609if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5610 echo $ac_n "(cached) $ac_c" 1>&6
5611else
5612 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5613#line 5614 "configure"
46711df8
MK
5614#include "confdefs.h"
5615/* System header to define __stub macros and hopefully few prototypes,
5616 which can conflict with char $ac_func(); below. */
5617#include <assert.h>
5618/* Override any gcc2 internal prototype to avoid an error. */
5619/* We use char because int might match the return type of a gcc2
5620 builtin and then its argument prototype would still apply. */
5621char $ac_func();
5622
5623int main() {
5624
5625/* The GNU C library defines this for functions which it implements
5626 to always fail with ENOSYS. Some functions are actually named
5627 something starting with __ and the normal name is an alias. */
5628#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5629choke me
5630#else
5631$ac_func();
5632#endif
5633
5634; return 0; }
5635EOF
b0b1c2c0 5636if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5637 rm -rf conftest*
5638 eval "ac_cv_func_$ac_func=yes"
5639else
5640 echo "configure: failed program was:" >&5
5641 cat conftest.$ac_ext >&5
5642 rm -rf conftest*
5643 eval "ac_cv_func_$ac_func=no"
5644fi
5645rm -f conftest*
5646fi
5647
5648if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5649 echo "$ac_t""yes" 1>&6
5650 cat >> confdefs.h <<EOF
5651#define CRAY_STACKSEG_END $ac_func
5652EOF
5653
5654 break
5655else
5656 echo "$ac_t""no" 1>&6
5657fi
5658
5659done
5660fi
5661
5662echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
b0b1c2c0 5663echo "configure:5664: checking stack direction for C alloca" >&5
46711df8
MK
5664if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5665 echo $ac_n "(cached) $ac_c" 1>&6
5666else
5667 if test "$cross_compiling" = yes; then
5668 ac_cv_c_stack_direction=0
5669else
5670 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5671#line 5672 "configure"
46711df8
MK
5672#include "confdefs.h"
5673find_stack_direction ()
5674{
5675 static char *addr = 0;
5676 auto char dummy;
5677 if (addr == 0)
5678 {
5679 addr = &dummy;
5680 return find_stack_direction ();
5681 }
5682 else
5683 return (&dummy > addr) ? 1 : -1;
5684}
5685main ()
5686{
5687 exit (find_stack_direction() < 0);
5688}
5689EOF
b0b1c2c0 5690if { (eval echo configure:5691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5691then
5692 ac_cv_c_stack_direction=1
5693else
5694 echo "configure: failed program was:" >&5
5695 cat conftest.$ac_ext >&5
5696 rm -fr conftest*
5697 ac_cv_c_stack_direction=-1
5698fi
5699rm -fr conftest*
5700fi
5701
5702fi
5703
5704echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5705cat >> confdefs.h <<EOF
5706#define STACK_DIRECTION $ac_cv_c_stack_direction
5707EOF
5708
5709fi
5710
97bf5e38
MK
5711for ac_hdr in unistd.h
5712do
5713ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5714echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
b0b1c2c0 5715echo "configure:5716: checking for $ac_hdr" >&5
74c1b268
AC
5716if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5717 echo $ac_n "(cached) $ac_c" 1>&6
5718else
5719 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5720#line 5721 "configure"
74c1b268 5721#include "confdefs.h"
97bf5e38 5722#include <$ac_hdr>
74c1b268
AC
5723EOF
5724ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 5725{ (eval echo configure:5726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5726ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5727if test -z "$ac_err"; then
5728 rm -rf conftest*
5729 eval "ac_cv_header_$ac_safe=yes"
5730else
5731 echo "$ac_err" >&5
5732 echo "configure: failed program was:" >&5
5733 cat conftest.$ac_ext >&5
5734 rm -rf conftest*
5735 eval "ac_cv_header_$ac_safe=no"
5736fi
5737rm -f conftest*
5738fi
5739if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5740 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5741 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5742 cat >> confdefs.h <<EOF
5743#define $ac_tr_hdr 1
74c1b268 5744EOF
97bf5e38 5745
74c1b268
AC
5746else
5747 echo "$ac_t""no" 1>&6
5748fi
97bf5e38 5749done
74c1b268 5750
97bf5e38
MK
5751for ac_func in getpagesize
5752do
5753echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 5754echo "configure:5755: checking for $ac_func" >&5
97bf5e38 5755if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5756 echo $ac_n "(cached) $ac_c" 1>&6
5757else
5758 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5759#line 5760 "configure"
74c1b268
AC
5760#include "confdefs.h"
5761/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5762 which can conflict with char $ac_func(); below. */
74c1b268
AC
5763#include <assert.h>
5764/* Override any gcc2 internal prototype to avoid an error. */
5765/* We use char because int might match the return type of a gcc2
5766 builtin and then its argument prototype would still apply. */
97bf5e38 5767char $ac_func();
74c1b268
AC
5768
5769int main() {
5770
5771/* The GNU C library defines this for functions which it implements
5772 to always fail with ENOSYS. Some functions are actually named
5773 something starting with __ and the normal name is an alias. */
97bf5e38 5774#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5775choke me
5776#else
97bf5e38 5777$ac_func();
74c1b268
AC
5778#endif
5779
5780; return 0; }
5781EOF
b0b1c2c0 5782if { (eval echo configure:5783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5783 rm -rf conftest*
97bf5e38 5784 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5785else
5786 echo "configure: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
5788 rm -rf conftest*
97bf5e38 5789 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5790fi
5791rm -f conftest*
5792fi
5793
97bf5e38 5794if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5795 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5796 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5797 cat >> confdefs.h <<EOF
5798#define $ac_tr_func 1
5799EOF
5800
74c1b268
AC
5801else
5802 echo "$ac_t""no" 1>&6
5803fi
97bf5e38 5804done
74c1b268 5805
97bf5e38 5806echo $ac_n "checking for working mmap""... $ac_c" 1>&6
b0b1c2c0 5807echo "configure:5808: checking for working mmap" >&5
97bf5e38
MK
5808if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5809 echo $ac_n "(cached) $ac_c" 1>&6
5810else
5811 if test "$cross_compiling" = yes; then
5812 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5813else
5814 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5815#line 5816 "configure"
74c1b268 5816#include "confdefs.h"
97bf5e38
MK
5817
5818/* Thanks to Mike Haertel and Jim Avera for this test.
5819 Here is a matrix of mmap possibilities:
5820 mmap private not fixed
5821 mmap private fixed at somewhere currently unmapped
5822 mmap private fixed at somewhere already mapped
5823 mmap shared not fixed
5824 mmap shared fixed at somewhere currently unmapped
5825 mmap shared fixed at somewhere already mapped
5826 For private mappings, we should verify that changes cannot be read()
5827 back from the file, nor mmap's back from the file at a different
5828 address. (There have been systems where private was not correctly
5829 implemented like the infamous i386 svr4.0, and systems where the
5830 VM page cache was not coherent with the filesystem buffer cache
5831 like early versions of FreeBSD and possibly contemporary NetBSD.)
5832 For shared mappings, we should conversely verify that changes get
5833 propogated back to all the places they're supposed to be.
5834
5835 Grep wants private fixed already mapped.
5836 The main things grep needs to know about mmap are:
5837 * does it exist and is it safe to write into the mmap'd area
5838 * how to use it (BSD variants) */
74c1b268 5839#include <sys/types.h>
97bf5e38
MK
5840#include <fcntl.h>
5841#include <sys/mman.h>
5842
5843/* This mess was copied from the GNU getpagesize.h. */
5844#ifndef HAVE_GETPAGESIZE
5845# ifdef HAVE_UNISTD_H
5846# include <unistd.h>
5847# endif
5848
5849/* Assume that all systems that can run configure have sys/param.h. */
5850# ifndef HAVE_SYS_PARAM_H
5851# define HAVE_SYS_PARAM_H 1
5852# endif
5853
5854# ifdef _SC_PAGESIZE
5855# define getpagesize() sysconf(_SC_PAGESIZE)
5856# else /* no _SC_PAGESIZE */
5857# ifdef HAVE_SYS_PARAM_H
5858# include <sys/param.h>
5859# ifdef EXEC_PAGESIZE
5860# define getpagesize() EXEC_PAGESIZE
5861# else /* no EXEC_PAGESIZE */
5862# ifdef NBPG
5863# define getpagesize() NBPG * CLSIZE
5864# ifndef CLSIZE
5865# define CLSIZE 1
5866# endif /* no CLSIZE */
5867# else /* no NBPG */
5868# ifdef NBPC
5869# define getpagesize() NBPC
5870# else /* no NBPC */
5871# ifdef PAGESIZE
5872# define getpagesize() PAGESIZE
5873# endif /* PAGESIZE */
5874# endif /* no NBPC */
5875# endif /* no NBPG */
5876# endif /* no EXEC_PAGESIZE */
5877# else /* no HAVE_SYS_PARAM_H */
5878# define getpagesize() 8192 /* punt totally */
5879# endif /* no HAVE_SYS_PARAM_H */
5880# endif /* no _SC_PAGESIZE */
5881
5882#endif /* no HAVE_GETPAGESIZE */
5883
74c1b268 5884#ifdef __cplusplus
97bf5e38 5885extern "C" { void *malloc(unsigned); }
74c1b268 5886#else
97bf5e38 5887char *malloc();
74c1b268 5888#endif
74c1b268 5889
97bf5e38
MK
5890int
5891main()
5892{
5893 char *data, *data2, *data3;
5894 int i, pagesize;
5895 int fd;
74c1b268 5896
97bf5e38 5897 pagesize = getpagesize();
74c1b268 5898
97bf5e38
MK
5899 /*
5900 * First, make a file with some known garbage in it.
5901 */
5902 data = malloc(pagesize);
5903 if (!data)
5904 exit(1);
5905 for (i = 0; i < pagesize; ++i)
5906 *(data + i) = rand();
5907 umask(0);
5908 fd = creat("conftestmmap", 0600);
5909 if (fd < 0)
5910 exit(1);
5911 if (write(fd, data, pagesize) != pagesize)
5912 exit(1);
5913 close(fd);
74c1b268 5914
97bf5e38
MK
5915 /*
5916 * Next, try to mmap the file at a fixed address which
5917 * already has something else allocated at it. If we can,
5918 * also make sure that we see the same garbage.
5919 */
5920 fd = open("conftestmmap", O_RDWR);
5921 if (fd < 0)
5922 exit(1);
5923 data2 = malloc(2 * pagesize);
5924 if (!data2)
5925 exit(1);
5926 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5927 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5928 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5929 exit(1);
5930 for (i = 0; i < pagesize; ++i)
5931 if (*(data + i) != *(data2 + i))
5932 exit(1);
74c1b268 5933
97bf5e38
MK
5934 /*
5935 * Finally, make sure that changes to the mapped area
5936 * do not percolate back to the file as seen by read().
5937 * (This is a bug on some variants of i386 svr4.0.)
5938 */
5939 for (i = 0; i < pagesize; ++i)
5940 *(data2 + i) = *(data2 + i) + 1;
5941 data3 = malloc(pagesize);
5942 if (!data3)
5943 exit(1);
5944 if (read(fd, data3, pagesize) != pagesize)
5945 exit(1);
5946 for (i = 0; i < pagesize; ++i)
5947 if (*(data + i) != *(data3 + i))
5948 exit(1);
5949 close(fd);
5950 unlink("conftestmmap");
5951 exit(0);
74c1b268 5952}
97bf5e38 5953
74c1b268 5954EOF
b0b1c2c0 5955if { (eval echo configure:5956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5956then
97bf5e38 5957 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5958else
5959 echo "configure: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5961 rm -fr conftest*
97bf5e38 5962 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5963fi
5964rm -fr conftest*
5965fi
5966
5967fi
5968
97bf5e38
MK
5969echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5970if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5971 cat >> confdefs.h <<\EOF
97bf5e38 5972#define HAVE_MMAP 1
74c1b268
AC
5973EOF
5974
5975fi
5976
97bf5e38 5977echo $ac_n "checking for pid_t""... $ac_c" 1>&6
b0b1c2c0 5978echo "configure:5979: checking for pid_t" >&5
97bf5e38 5979if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5980 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5981else
5982 cat > conftest.$ac_ext <<EOF
b0b1c2c0 5983#line 5984 "configure"
0200359f 5984#include "confdefs.h"
97bf5e38
MK
5985#include <sys/types.h>
5986#if STDC_HEADERS
5987#include <stdlib.h>
5988#include <stddef.h>
0200359f 5989#endif
0200359f 5990EOF
97bf5e38
MK
5991if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5992 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5993 rm -rf conftest*
5994 ac_cv_type_pid_t=yes
0200359f 5995else
97bf5e38
MK
5996 rm -rf conftest*
5997 ac_cv_type_pid_t=no
0200359f 5998fi
97bf5e38 5999rm -f conftest*
0200359f
MK
6000
6001fi
97bf5e38
MK
6002echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6003if test $ac_cv_type_pid_t = no; then
0200359f 6004 cat >> confdefs.h <<\EOF
97bf5e38 6005#define pid_t int
0200359f
MK
6006EOF
6007
6008fi
6009
97bf5e38
MK
6010ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6011echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
b0b1c2c0 6012echo "configure:6013: checking for vfork.h" >&5
97bf5e38 6013if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6014 echo $ac_n "(cached) $ac_c" 1>&6
6015else
6016 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6017#line 6018 "configure"
72473524 6018#include "confdefs.h"
97bf5e38 6019#include <vfork.h>
72473524 6020EOF
97bf5e38 6021ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 6022{ (eval echo configure:6023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6023ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6024if test -z "$ac_err"; then
72473524 6025 rm -rf conftest*
97bf5e38 6026 eval "ac_cv_header_$ac_safe=yes"
72473524 6027else
97bf5e38 6028 echo "$ac_err" >&5
72473524
DJ
6029 echo "configure: failed program was:" >&5
6030 cat conftest.$ac_ext >&5
6031 rm -rf conftest*
97bf5e38 6032 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6033fi
6034rm -f conftest*
6035fi
97bf5e38
MK
6036if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6037 echo "$ac_t""yes" 1>&6
72473524 6038 cat >> confdefs.h <<\EOF
97bf5e38 6039#define HAVE_VFORK_H 1
72473524
DJ
6040EOF
6041
97bf5e38
MK
6042else
6043 echo "$ac_t""no" 1>&6
72473524 6044fi
c906108c 6045
97bf5e38 6046echo $ac_n "checking for working vfork""... $ac_c" 1>&6
b0b1c2c0 6047echo "configure:6048: checking for working vfork" >&5
97bf5e38
MK
6048if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6049 echo $ac_n "(cached) $ac_c" 1>&6
6050else
6051 if test "$cross_compiling" = yes; then
6052 echo $ac_n "checking for vfork""... $ac_c" 1>&6
b0b1c2c0 6053echo "configure:6054: checking for vfork" >&5
97bf5e38 6054if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6055 echo $ac_n "(cached) $ac_c" 1>&6
6056else
6057 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6058#line 6059 "configure"
2b2d558c 6059#include "confdefs.h"
97bf5e38
MK
6060/* System header to define __stub macros and hopefully few prototypes,
6061 which can conflict with char vfork(); below. */
6062#include <assert.h>
6063/* Override any gcc2 internal prototype to avoid an error. */
6064/* We use char because int might match the return type of a gcc2
6065 builtin and then its argument prototype would still apply. */
6066char vfork();
2b2d558c
MK
6067
6068int main() {
97bf5e38
MK
6069
6070/* The GNU C library defines this for functions which it implements
6071 to always fail with ENOSYS. Some functions are actually named
6072 something starting with __ and the normal name is an alias. */
6073#if defined (__stub_vfork) || defined (__stub___vfork)
6074choke me
6075#else
6076vfork();
6077#endif
6078
2b2d558c
MK
6079; return 0; }
6080EOF
b0b1c2c0 6081if { (eval echo configure:6082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6082 rm -rf conftest*
97bf5e38 6083 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6084else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6087 rm -rf conftest*
97bf5e38 6088 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6089fi
6090rm -f conftest*
6091fi
6092
97bf5e38
MK
6093if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6094 echo "$ac_t""yes" 1>&6
6095 :
6096else
6097 echo "$ac_t""no" 1>&6
2b2d558c
MK
6098fi
6099
97bf5e38 6100ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6101else
6102 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6103#line 6104 "configure"
7dfa765c 6104#include "confdefs.h"
97bf5e38
MK
6105/* Thanks to Paul Eggert for this test. */
6106#include <stdio.h>
6107#include <sys/types.h>
6108#include <sys/stat.h>
6109#ifdef HAVE_UNISTD_H
6110#include <unistd.h>
6111#endif
6112#ifdef HAVE_VFORK_H
6113#include <vfork.h>
6114#endif
6115/* On some sparc systems, changes by the child to local and incoming
6116 argument registers are propagated back to the parent.
6117 The compiler is told about this with #include <vfork.h>,
6118 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6119 Test for this by using a static variable whose address
6120 is put into a register that is clobbered by the vfork. */
6121static
6122#ifdef __cplusplus
6123sparc_address_test (int arg)
6124#else
6125sparc_address_test (arg) int arg;
6126#endif
6127{
6128 static pid_t child;
6129 if (!child) {
6130 child = vfork ();
6131 if (child < 0) {
6132 perror ("vfork");
6133 _exit(2);
6134 }
6135 if (!child) {
6136 arg = getpid();
6137 write(-1, "", 0);
6138 _exit (arg);
6139 }
6140 }
6141}
6142main() {
6143 pid_t parent = getpid ();
6144 pid_t child;
7dfa765c 6145
97bf5e38 6146 sparc_address_test ();
7dfa765c 6147
97bf5e38 6148 child = vfork ();
7dfa765c 6149
97bf5e38
MK
6150 if (child == 0) {
6151 /* Here is another test for sparc vfork register problems.
6152 This test uses lots of local variables, at least
6153 as many local variables as main has allocated so far
6154 including compiler temporaries. 4 locals are enough for
6155 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6156 A buggy compiler should reuse the register of parent
6157 for one of the local variables, since it will think that
6158 parent can't possibly be used any more in this routine.
6159 Assigning to the local variable will thus munge parent
6160 in the parent process. */
6161 pid_t
6162 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6163 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6164 /* Convince the compiler that p..p7 are live; otherwise, it might
6165 use the same hardware register for all 8 local variables. */
6166 if (p != p1 || p != p2 || p != p3 || p != p4
6167 || p != p5 || p != p6 || p != p7)
6168 _exit(1);
7dfa765c 6169
97bf5e38
MK
6170 /* On some systems (e.g. IRIX 3.3),
6171 vfork doesn't separate parent from child file descriptors.
6172 If the child closes a descriptor before it execs or exits,
6173 this munges the parent's descriptor as well.
6174 Test for this by closing stdout in the child. */
6175 _exit(close(fileno(stdout)) != 0);
6176 } else {
6177 int status;
6178 struct stat st;
64bb1671 6179
97bf5e38
MK
6180 while (wait(&status) != child)
6181 ;
6182 exit(
6183 /* Was there some problem with vforking? */
6184 child < 0
64bb1671 6185
97bf5e38
MK
6186 /* Did the child fail? (This shouldn't happen.) */
6187 || status
64bb1671 6188
97bf5e38
MK
6189 /* Did the vfork/compiler bug occur? */
6190 || parent != getpid()
6191
6192 /* Did the file descriptor bug occur? */
6193 || fstat(fileno(stdout), &st) != 0
6194 );
6195 }
6196}
5c44784c 6197EOF
b0b1c2c0 6198if { (eval echo configure:6199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6199then
6200 ac_cv_func_vfork_works=yes
5c44784c
JM
6201else
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
97bf5e38
MK
6204 rm -fr conftest*
6205 ac_cv_func_vfork_works=no
5c44784c 6206fi
97bf5e38 6207rm -fr conftest*
5c44784c
JM
6208fi
6209
0afdd437
MK
6210fi
6211
97bf5e38
MK
6212echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6213if test $ac_cv_func_vfork_works = no; then
0afdd437 6214 cat >> confdefs.h <<\EOF
97bf5e38 6215#define vfork fork
0afdd437
MK
6216EOF
6217
6218fi
6219
97bf5e38
MK
6220for ac_func in canonicalize_file_name realpath
6221do
6222echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6223echo "configure:6224: checking for $ac_func" >&5
97bf5e38 6224if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6225 echo $ac_n "(cached) $ac_c" 1>&6
6226else
6227 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6228#line 6229 "configure"
7e89e357 6229#include "confdefs.h"
97bf5e38
MK
6230/* System header to define __stub macros and hopefully few prototypes,
6231 which can conflict with char $ac_func(); below. */
6232#include <assert.h>
6233/* Override any gcc2 internal prototype to avoid an error. */
6234/* We use char because int might match the return type of a gcc2
6235 builtin and then its argument prototype would still apply. */
6236char $ac_func();
6237
7e89e357 6238int main() {
97bf5e38
MK
6239
6240/* The GNU C library defines this for functions which it implements
6241 to always fail with ENOSYS. Some functions are actually named
6242 something starting with __ and the normal name is an alias. */
6243#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6244choke me
6245#else
6246$ac_func();
6247#endif
6248
7e89e357
JT
6249; return 0; }
6250EOF
b0b1c2c0 6251if { (eval echo configure:6252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6252 rm -rf conftest*
97bf5e38 6253 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6254else
6255 echo "configure: failed program was:" >&5
6256 cat conftest.$ac_ext >&5
6257 rm -rf conftest*
97bf5e38 6258 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6259fi
6260rm -f conftest*
6261fi
6262
97bf5e38
MK
6263if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6264 echo "$ac_t""yes" 1>&6
6265 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6266 cat >> confdefs.h <<EOF
6267#define $ac_tr_func 1
7e89e357 6268EOF
97bf5e38
MK
6269
6270else
6271 echo "$ac_t""no" 1>&6
7e89e357 6272fi
97bf5e38 6273done
7e89e357 6274
97bf5e38 6275for ac_func in poll
7be570e7
JM
6276do
6277echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6278echo "configure:6279: checking for $ac_func" >&5
7be570e7
JM
6279if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6280 echo $ac_n "(cached) $ac_c" 1>&6
6281else
6282 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6283#line 6284 "configure"
7be570e7
JM
6284#include "confdefs.h"
6285/* System header to define __stub macros and hopefully few prototypes,
6286 which can conflict with char $ac_func(); below. */
6287#include <assert.h>
6288/* Override any gcc2 internal prototype to avoid an error. */
6289/* We use char because int might match the return type of a gcc2
6290 builtin and then its argument prototype would still apply. */
6291char $ac_func();
6292
6293int main() {
6294
6295/* The GNU C library defines this for functions which it implements
6296 to always fail with ENOSYS. Some functions are actually named
6297 something starting with __ and the normal name is an alias. */
6298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6299choke me
6300#else
6301$ac_func();
6302#endif
6303
6304; return 0; }
6305EOF
b0b1c2c0 6306if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6307 rm -rf conftest*
6308 eval "ac_cv_func_$ac_func=yes"
6309else
6310 echo "configure: failed program was:" >&5
6311 cat conftest.$ac_ext >&5
6312 rm -rf conftest*
6313 eval "ac_cv_func_$ac_func=no"
6314fi
6315rm -f conftest*
6316fi
6317
6318if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6319 echo "$ac_t""yes" 1>&6
6320 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6321 cat >> confdefs.h <<EOF
6322#define $ac_tr_func 1
6323EOF
6324
6325else
6326 echo "$ac_t""no" 1>&6
6327fi
6328done
6329
6330for ac_func in pread64
6331do
6332echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6333echo "configure:6334: checking for $ac_func" >&5
14abd0fb
MK
6334if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6335 echo $ac_n "(cached) $ac_c" 1>&6
6336else
6337 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6338#line 6339 "configure"
14abd0fb
MK
6339#include "confdefs.h"
6340/* System header to define __stub macros and hopefully few prototypes,
6341 which can conflict with char $ac_func(); below. */
6342#include <assert.h>
6343/* Override any gcc2 internal prototype to avoid an error. */
6344/* We use char because int might match the return type of a gcc2
6345 builtin and then its argument prototype would still apply. */
6346char $ac_func();
6347
6348int main() {
6349
6350/* The GNU C library defines this for functions which it implements
6351 to always fail with ENOSYS. Some functions are actually named
6352 something starting with __ and the normal name is an alias. */
6353#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6354choke me
6355#else
6356$ac_func();
6357#endif
6358
6359; return 0; }
6360EOF
b0b1c2c0 6361if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6362 rm -rf conftest*
6363 eval "ac_cv_func_$ac_func=yes"
6364else
6365 echo "configure: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6367 rm -rf conftest*
6368 eval "ac_cv_func_$ac_func=no"
6369fi
6370rm -f conftest*
6371fi
6372
6373if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6374 echo "$ac_t""yes" 1>&6
6375 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6376 cat >> confdefs.h <<EOF
6377#define $ac_tr_func 1
6378EOF
6379
6380else
6381 echo "$ac_t""no" 1>&6
6382fi
6383done
6384
97bf5e38
MK
6385for ac_func in sbrk
6386do
6387echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6388echo "configure:6389: checking for $ac_func" >&5
97bf5e38 6389if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6390 echo $ac_n "(cached) $ac_c" 1>&6
6391else
6392 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6393#line 6394 "configure"
c906108c 6394#include "confdefs.h"
97bf5e38
MK
6395/* System header to define __stub macros and hopefully few prototypes,
6396 which can conflict with char $ac_func(); below. */
6397#include <assert.h>
6398/* Override any gcc2 internal prototype to avoid an error. */
6399/* We use char because int might match the return type of a gcc2
6400 builtin and then its argument prototype would still apply. */
6401char $ac_func();
c906108c 6402
97bf5e38
MK
6403int main() {
6404
6405/* The GNU C library defines this for functions which it implements
6406 to always fail with ENOSYS. Some functions are actually named
6407 something starting with __ and the normal name is an alias. */
6408#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6409choke me
c906108c 6410#else
97bf5e38 6411$ac_func();
c906108c 6412#endif
97bf5e38 6413
c906108c
SS
6414; return 0; }
6415EOF
b0b1c2c0 6416if { (eval echo configure:6417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6417 rm -rf conftest*
97bf5e38 6418 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6419else
6420 echo "configure: failed program was:" >&5
6421 cat conftest.$ac_ext >&5
6422 rm -rf conftest*
97bf5e38 6423 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6424fi
6425rm -f conftest*
6426fi
6427
97bf5e38
MK
6428if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6429 echo "$ac_t""yes" 1>&6
6430 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6431 cat >> confdefs.h <<EOF
6432#define $ac_tr_func 1
c906108c 6433EOF
97bf5e38
MK
6434
6435else
6436 echo "$ac_t""no" 1>&6
c906108c 6437fi
97bf5e38 6438done
c906108c 6439
97bf5e38
MK
6440for ac_func in setpgid setpgrp
6441do
6442echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6443echo "configure:6444: checking for $ac_func" >&5
97bf5e38 6444if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6445 echo $ac_n "(cached) $ac_c" 1>&6
6446else
6447 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6448#line 6449 "configure"
c906108c 6449#include "confdefs.h"
97bf5e38
MK
6450/* System header to define __stub macros and hopefully few prototypes,
6451 which can conflict with char $ac_func(); below. */
6452#include <assert.h>
6453/* Override any gcc2 internal prototype to avoid an error. */
6454/* We use char because int might match the return type of a gcc2
6455 builtin and then its argument prototype would still apply. */
6456char $ac_func();
c906108c 6457
97bf5e38
MK
6458int main() {
6459
6460/* The GNU C library defines this for functions which it implements
6461 to always fail with ENOSYS. Some functions are actually named
6462 something starting with __ and the normal name is an alias. */
6463#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6464choke me
c906108c 6465#else
97bf5e38 6466$ac_func();
c906108c 6467#endif
97bf5e38 6468
c906108c
SS
6469; return 0; }
6470EOF
b0b1c2c0 6471if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6472 rm -rf conftest*
97bf5e38 6473 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6474else
6475 echo "configure: failed program was:" >&5
6476 cat conftest.$ac_ext >&5
6477 rm -rf conftest*
97bf5e38 6478 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6479fi
6480rm -f conftest*
6481fi
6482
97bf5e38
MK
6483if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6484 echo "$ac_t""yes" 1>&6
6485 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6486 cat >> confdefs.h <<EOF
6487#define $ac_tr_func 1
c906108c 6488EOF
97bf5e38
MK
6489
6490else
6491 echo "$ac_t""no" 1>&6
c906108c 6492fi
97bf5e38 6493done
c906108c 6494
e1ea1d75 6495for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6496do
6497echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6498echo "configure:6499: checking for $ac_func" >&5
97bf5e38 6499if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6500 echo $ac_n "(cached) $ac_c" 1>&6
6501else
6502 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6503#line 6504 "configure"
c906108c 6504#include "confdefs.h"
97bf5e38
MK
6505/* System header to define __stub macros and hopefully few prototypes,
6506 which can conflict with char $ac_func(); below. */
6507#include <assert.h>
6508/* Override any gcc2 internal prototype to avoid an error. */
6509/* We use char because int might match the return type of a gcc2
6510 builtin and then its argument prototype would still apply. */
6511char $ac_func();
c906108c 6512
97bf5e38
MK
6513int main() {
6514
6515/* The GNU C library defines this for functions which it implements
6516 to always fail with ENOSYS. Some functions are actually named
6517 something starting with __ and the normal name is an alias. */
6518#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6519choke me
c906108c 6520#else
97bf5e38 6521$ac_func();
c906108c 6522#endif
97bf5e38 6523
c906108c
SS
6524; return 0; }
6525EOF
b0b1c2c0 6526if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6527 rm -rf conftest*
97bf5e38 6528 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6529else
6530 echo "configure: failed program was:" >&5
6531 cat conftest.$ac_ext >&5
6532 rm -rf conftest*
97bf5e38 6533 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6534fi
6535rm -f conftest*
6536fi
6537
97bf5e38
MK
6538if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6539 echo "$ac_t""yes" 1>&6
6540 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6541 cat >> confdefs.h <<EOF
6542#define $ac_tr_func 1
c906108c 6543EOF
e1ea1d75 6544
97bf5e38
MK
6545else
6546 echo "$ac_t""no" 1>&6
c906108c 6547fi
97bf5e38 6548done
c906108c 6549
97bf5e38
MK
6550for ac_func in socketpair
6551do
6552echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
b0b1c2c0 6553echo "configure:6554: checking for $ac_func" >&5
97bf5e38 6554if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6555 echo $ac_n "(cached) $ac_c" 1>&6
6556else
6557 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6558#line 6559 "configure"
c906108c 6559#include "confdefs.h"
97bf5e38
MK
6560/* System header to define __stub macros and hopefully few prototypes,
6561 which can conflict with char $ac_func(); below. */
6562#include <assert.h>
6563/* Override any gcc2 internal prototype to avoid an error. */
6564/* We use char because int might match the return type of a gcc2
6565 builtin and then its argument prototype would still apply. */
6566char $ac_func();
c906108c 6567
97bf5e38
MK
6568int main() {
6569
6570/* The GNU C library defines this for functions which it implements
6571 to always fail with ENOSYS. Some functions are actually named
6572 something starting with __ and the normal name is an alias. */
6573#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6574choke me
c906108c 6575#else
97bf5e38 6576$ac_func();
c906108c 6577#endif
97bf5e38 6578
c906108c
SS
6579; return 0; }
6580EOF
b0b1c2c0 6581if { (eval echo configure:6582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6582 rm -rf conftest*
97bf5e38 6583 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6584else
6585 echo "configure: failed program was:" >&5
6586 cat conftest.$ac_ext >&5
6587 rm -rf conftest*
97bf5e38 6588 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6589fi
6590rm -f conftest*
6591fi
6592
97bf5e38
MK
6593if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6594 echo "$ac_t""yes" 1>&6
6595 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6596 cat >> confdefs.h <<EOF
6597#define $ac_tr_func 1
c906108c 6598EOF
97bf5e38
MK
6599
6600else
6601 echo "$ac_t""no" 1>&6
c906108c 6602fi
97bf5e38 6603done
c906108c 6604
97bf5e38
MK
6605
6606if test "$cross_compiling" = no; then
6607 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
b0b1c2c0 6608echo "configure:6609: checking whether setpgrp takes no argument" >&5
97bf5e38 6609if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6610 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6611else
6612 if test "$cross_compiling" = yes; then
6613 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6614else
6615 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6616#line 6617 "configure"
c906108c
SS
6617#include "confdefs.h"
6618
c906108c
SS
6619#ifdef HAVE_UNISTD_H
6620#include <unistd.h>
6621#endif
97bf5e38
MK
6622
6623/*
6624 * If this system has a BSD-style setpgrp, which takes arguments, exit
6625 * successfully.
6626 */
6627main()
6628{
6629 if (setpgrp(1,1) == -1)
6630 exit(0);
6631 else
6632 exit(1);
6633}
6634
c906108c 6635EOF
b0b1c2c0 6636if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6637then
6638 ac_cv_func_setpgrp_void=no
c906108c
SS
6639else
6640 echo "configure: failed program was:" >&5
6641 cat conftest.$ac_ext >&5
97bf5e38
MK
6642 rm -fr conftest*
6643 ac_cv_func_setpgrp_void=yes
c906108c 6644fi
97bf5e38 6645rm -fr conftest*
c906108c
SS
6646fi
6647
97bf5e38
MK
6648
6649fi
6650
6651echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6652if test $ac_cv_func_setpgrp_void = yes; then
6653 cat >> confdefs.h <<\EOF
6654#define SETPGRP_VOID 1
c906108c
SS
6655EOF
6656
6657fi
6658
97bf5e38
MK
6659else
6660 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
b0b1c2c0 6661echo "configure:6662: checking whether setpgrp takes no argument" >&5
97bf5e38 6662if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6663 echo $ac_n "(cached) $ac_c" 1>&6
6664else
6665 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6666#line 6667 "configure"
b83266a0
SS
6667#include "confdefs.h"
6668
b83266a0 6669#include <unistd.h>
97bf5e38 6670
b83266a0 6671int main() {
97bf5e38
MK
6672
6673 if (setpgrp(1,1) == -1)
6674 exit (0);
6675 else
6676 exit (1);
6677
b83266a0
SS
6678; return 0; }
6679EOF
b0b1c2c0 6680if { (eval echo configure:6681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6681 rm -rf conftest*
97bf5e38 6682 ac_cv_func_setpgrp_void=no
b83266a0
SS
6683else
6684 echo "configure: failed program was:" >&5
6685 cat conftest.$ac_ext >&5
6686 rm -rf conftest*
97bf5e38 6687 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6688fi
6689rm -f conftest*
6690fi
6691
97bf5e38
MK
6692echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6693if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6694 cat >> confdefs.h <<\EOF
97bf5e38 6695#define SETPGRP_VOID 1
b83266a0
SS
6696EOF
6697
97bf5e38 6698fi
b83266a0
SS
6699fi
6700
97bf5e38
MK
6701# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6702# since sigsetjmp might only be defined as a macro.
6703echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
b0b1c2c0 6704echo "configure:6705: checking for sigsetjmp" >&5
97bf5e38 6705if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6706 echo $ac_n "(cached) $ac_c" 1>&6
6707else
6708 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6709#line 6710 "configure"
a4db0f07
RH
6710#include "confdefs.h"
6711
97bf5e38
MK
6712#include <setjmp.h>
6713
a4db0f07 6714int main() {
97bf5e38 6715sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6716; return 0; }
6717EOF
b0b1c2c0 6718if { (eval echo configure:6719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6719 rm -rf conftest*
97bf5e38 6720 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6721else
6722 echo "configure: failed program was:" >&5
6723 cat conftest.$ac_ext >&5
6724 rm -rf conftest*
97bf5e38 6725 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6726fi
6727rm -f conftest*
6728fi
6729
97bf5e38
MK
6730echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6731if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6732 cat >> confdefs.h <<\EOF
97bf5e38 6733#define HAVE_SIGSETJMP 1
a4db0f07
RH
6734EOF
6735
6736fi
c906108c 6737
06825bd1
MK
6738# Assume we'll default to using the included libiberty regex.
6739gdb_use_included_regex=yes
6740
6741# However, if the system regex is GNU regex, then default to *not*
6742# using the included regex.
6743echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
b0b1c2c0 6744echo "configure:6745: checking for GNU regex" >&5
06825bd1
MK
6745if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6746 echo $ac_n "(cached) $ac_c" 1>&6
6747else
6748 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6749#line 6750 "configure"
06825bd1
MK
6750#include "confdefs.h"
6751#include <gnu-versions.h>
6752int main() {
6753#define REGEX_INTERFACE_VERSION 1
6754#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6755# error "Version mismatch"
6756#endif
6757; return 0; }
6758EOF
b0b1c2c0 6759if { (eval echo configure:6760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6760 rm -rf conftest*
6761 gdb_cv_have_gnu_regex=yes
6762else
6763 echo "configure: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 rm -rf conftest*
6766 gdb_cv_have_gnu_regex=no
6767fi
6768rm -f conftest*
6769fi
6770
6771echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6772if test $gdb_cv_have_gnu_regex = yes; then
6773 gdb_use_included_regex=no
6774fi
6775
6776# Check whether --with-included-regex or --without-included-regex was given.
6777if test "${with_included_regex+set}" = set; then
6778 withval="$with_included_regex"
6779 gdb_with_regex=$withval
6780else
6781 gdb_with_regex=$gdb_use_included_regex
6782fi
6783
6784if test "$gdb_with_regex" = yes; then
6785 cat >> confdefs.h <<\EOF
6786#define USE_INCLUDED_REGEX 1
6787EOF
6788
6789fi
6790
97bf5e38
MK
6791# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6792# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6793echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
b0b1c2c0 6794echo "configure:6795: checking for r_fs in struct reg" >&5
97bf5e38
MK
6795if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6796 echo $ac_n "(cached) $ac_c" 1>&6
6797else
6798 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6799#line 6800 "configure"
c906108c 6800#include "confdefs.h"
97bf5e38
MK
6801#include <machine/reg.h>
6802int main() {
6803struct reg r; r.r_fs;
6804; return 0; }
c906108c 6805EOF
b0b1c2c0 6806if { (eval echo configure:6807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6807 rm -rf conftest*
97bf5e38 6808 gdb_cv_struct_reg_r_fs=yes
c906108c 6809else
97bf5e38
MK
6810 echo "configure: failed program was:" >&5
6811 cat conftest.$ac_ext >&5
c906108c 6812 rm -rf conftest*
97bf5e38 6813 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6814fi
6815rm -f conftest*
97bf5e38 6816fi
c906108c 6817
97bf5e38
MK
6818echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6819if test $gdb_cv_struct_reg_r_fs = yes; then
6820 cat >> confdefs.h <<\EOF
6821#define HAVE_STRUCT_REG_R_FS 1
6822EOF
6823
6824fi
6825echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
b0b1c2c0 6826echo "configure:6827: checking for r_gs in struct reg" >&5
97bf5e38
MK
6827if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6828 echo $ac_n "(cached) $ac_c" 1>&6
6829else
6830 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6831#line 6832 "configure"
c906108c 6832#include "confdefs.h"
97bf5e38
MK
6833#include <machine/reg.h>
6834int main() {
6835struct reg r; r.r_gs;
6836; return 0; }
c906108c 6837EOF
b0b1c2c0 6838if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6839 rm -rf conftest*
97bf5e38 6840 gdb_cv_struct_reg_r_gs=yes
c906108c 6841else
97bf5e38
MK
6842 echo "configure: failed program was:" >&5
6843 cat conftest.$ac_ext >&5
c906108c 6844 rm -rf conftest*
97bf5e38 6845 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6846fi
6847rm -f conftest*
c906108c 6848fi
c906108c 6849
97bf5e38
MK
6850echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6851if test $gdb_cv_struct_reg_r_gs = yes; then
6852 cat >> confdefs.h <<\EOF
6853#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6854EOF
6855
c906108c
SS
6856fi
6857
97bf5e38
MK
6858# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6859echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
b0b1c2c0 6860echo "configure:6861: checking for PTRACE_GETREGS" >&5
97bf5e38 6861if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6862 echo $ac_n "(cached) $ac_c" 1>&6
6863else
6864 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6865#line 6866 "configure"
c906108c 6866#include "confdefs.h"
97bf5e38 6867#include <sys/ptrace.h>
c906108c 6868int main() {
97bf5e38 6869PTRACE_GETREGS;
c906108c
SS
6870; return 0; }
6871EOF
b0b1c2c0 6872if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6873 rm -rf conftest*
97bf5e38 6874 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6875else
6876 echo "configure: failed program was:" >&5
6877 cat conftest.$ac_ext >&5
6878 rm -rf conftest*
97bf5e38 6879 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6880fi
6881rm -f conftest*
6882fi
6883
97bf5e38
MK
6884echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6885if test $gdb_cv_have_ptrace_getregs = yes; then
6886 cat >> confdefs.h <<\EOF
6887#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6888EOF
6889
97bf5e38 6890fi
c906108c 6891
97bf5e38
MK
6892# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6893echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
b0b1c2c0 6894echo "configure:6895: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6895if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6896 echo $ac_n "(cached) $ac_c" 1>&6
6897else
6898 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6899#line 6900 "configure"
c906108c 6900#include "confdefs.h"
97bf5e38 6901#include <sys/ptrace.h>
c906108c 6902int main() {
97bf5e38 6903PTRACE_GETFPXREGS;
c906108c
SS
6904; return 0; }
6905EOF
b0b1c2c0 6906if { (eval echo configure:6907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6907 rm -rf conftest*
97bf5e38 6908 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6909else
6910 echo "configure: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 rm -rf conftest*
97bf5e38 6913 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6914fi
6915rm -f conftest*
6916fi
6917
97bf5e38
MK
6918echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6919if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6920 cat >> confdefs.h <<\EOF
6921#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6922EOF
6923
97bf5e38 6924fi
c906108c 6925
97bf5e38
MK
6926# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6927echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
b0b1c2c0 6928echo "configure:6929: checking for PT_GETDBREGS" >&5
97bf5e38 6929if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6930 echo $ac_n "(cached) $ac_c" 1>&6
6931else
6932 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6933#line 6934 "configure"
c906108c 6934#include "confdefs.h"
97bf5e38
MK
6935#include <sys/types.h>
6936#include <sys/ptrace.h>
c906108c 6937int main() {
97bf5e38 6938PT_GETDBREGS;
c906108c
SS
6939; return 0; }
6940EOF
b0b1c2c0 6941if { (eval echo configure:6942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6942 rm -rf conftest*
97bf5e38 6943 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6944else
6945 echo "configure: failed program was:" >&5
6946 cat conftest.$ac_ext >&5
6947 rm -rf conftest*
97bf5e38 6948 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6949fi
6950rm -f conftest*
6951fi
6952
97bf5e38
MK
6953echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6954if test $gdb_cv_have_pt_getdbregs = yes; then
6955 cat >> confdefs.h <<\EOF
6956#define HAVE_PT_GETDBREGS 1
c906108c
SS
6957EOF
6958
97bf5e38 6959fi
c906108c 6960
97bf5e38
MK
6961# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6962echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
b0b1c2c0 6963echo "configure:6964: checking for PT_GETXMMREGS" >&5
97bf5e38 6964if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6965 echo $ac_n "(cached) $ac_c" 1>&6
6966else
6967 cat > conftest.$ac_ext <<EOF
b0b1c2c0 6968#line 6969 "configure"
c906108c 6969#include "confdefs.h"
97bf5e38
MK
6970#include <sys/types.h>
6971#include <sys/ptrace.h>
c906108c 6972int main() {
97bf5e38 6973PT_GETXMMREGS;
c906108c
SS
6974; return 0; }
6975EOF
b0b1c2c0 6976if { (eval echo configure:6977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6977 rm -rf conftest*
97bf5e38 6978 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6979else
6980 echo "configure: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6982 rm -rf conftest*
97bf5e38 6983 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6984fi
6985rm -f conftest*
6986fi
6987
97bf5e38
MK
6988echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6989if test $gdb_cv_have_pt_getxmmregs = yes; then
6990 cat >> confdefs.h <<\EOF
6991#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6992EOF
6993
97bf5e38 6994fi
c906108c 6995
97bf5e38
MK
6996
6997echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
b0b1c2c0 6998echo "configure:6999: checking whether malloc must be declared" >&5
97bf5e38 6999if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7000 echo $ac_n "(cached) $ac_c" 1>&6
7001else
7002 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7003#line 7004 "configure"
3862412b 7004#include "confdefs.h"
e17bf198 7005
97bf5e38
MK
7006#include <stdio.h>
7007#ifdef HAVE_STRING_H
7008#include <string.h>
7009#else
7010#ifdef HAVE_STRINGS_H
7011#include <strings.h>
7012#endif
7013#endif
7014#ifdef HAVE_STDLIB_H
7015#include <stdlib.h>
7016#endif
7017#ifdef HAVE_UNISTD_H
7018#include <unistd.h>
7019#endif
3862412b 7020int main() {
97bf5e38 7021char *(*pfn) = (char *(*)) malloc
3862412b
MK
7022; return 0; }
7023EOF
b0b1c2c0 7024if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7025 rm -rf conftest*
97bf5e38 7026 bfd_cv_decl_needed_malloc=no
3862412b
MK
7027else
7028 echo "configure: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7030 rm -rf conftest*
97bf5e38 7031 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7032fi
7033rm -f conftest*
7034fi
7035
97bf5e38
MK
7036echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7037if test $bfd_cv_decl_needed_malloc = yes; then
7038 cat >> confdefs.h <<\EOF
7039#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7040EOF
7041
97bf5e38 7042fi
3862412b 7043
97bf5e38 7044echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
b0b1c2c0 7045echo "configure:7046: checking whether realloc must be declared" >&5
97bf5e38 7046if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7047 echo $ac_n "(cached) $ac_c" 1>&6
7048else
7049 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7050#line 7051 "configure"
3862412b 7051#include "confdefs.h"
e17bf198 7052
97bf5e38
MK
7053#include <stdio.h>
7054#ifdef HAVE_STRING_H
7055#include <string.h>
7056#else
7057#ifdef HAVE_STRINGS_H
7058#include <strings.h>
7059#endif
7060#endif
7061#ifdef HAVE_STDLIB_H
7062#include <stdlib.h>
7063#endif
7064#ifdef HAVE_UNISTD_H
7065#include <unistd.h>
7066#endif
3862412b 7067int main() {
97bf5e38 7068char *(*pfn) = (char *(*)) realloc
3862412b
MK
7069; return 0; }
7070EOF
b0b1c2c0 7071if { (eval echo configure:7072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7072 rm -rf conftest*
97bf5e38 7073 bfd_cv_decl_needed_realloc=no
3862412b
MK
7074else
7075 echo "configure: failed program was:" >&5
7076 cat conftest.$ac_ext >&5
7077 rm -rf conftest*
97bf5e38 7078 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7079fi
7080rm -f conftest*
7081fi
7082
97bf5e38
MK
7083echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7084if test $bfd_cv_decl_needed_realloc = yes; then
7085 cat >> confdefs.h <<\EOF
7086#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7087EOF
7088
97bf5e38 7089fi
3862412b 7090
97bf5e38 7091echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
b0b1c2c0 7092echo "configure:7093: checking whether free must be declared" >&5
97bf5e38 7093if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7094 echo $ac_n "(cached) $ac_c" 1>&6
7095else
7096 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7097#line 7098 "configure"
451928c5 7098#include "confdefs.h"
e17bf198 7099
97bf5e38
MK
7100#include <stdio.h>
7101#ifdef HAVE_STRING_H
7102#include <string.h>
7103#else
7104#ifdef HAVE_STRINGS_H
7105#include <strings.h>
7106#endif
7107#endif
7108#ifdef HAVE_STDLIB_H
7109#include <stdlib.h>
7110#endif
7111#ifdef HAVE_UNISTD_H
7112#include <unistd.h>
7113#endif
451928c5 7114int main() {
97bf5e38 7115char *(*pfn) = (char *(*)) free
451928c5
AC
7116; return 0; }
7117EOF
b0b1c2c0 7118if { (eval echo configure:7119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7119 rm -rf conftest*
97bf5e38 7120 bfd_cv_decl_needed_free=no
451928c5
AC
7121else
7122 echo "configure: failed program was:" >&5
7123 cat conftest.$ac_ext >&5
7124 rm -rf conftest*
97bf5e38 7125 bfd_cv_decl_needed_free=yes
451928c5
AC
7126fi
7127rm -f conftest*
7128fi
7129
97bf5e38
MK
7130echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7131if test $bfd_cv_decl_needed_free = yes; then
7132 cat >> confdefs.h <<\EOF
7133#define NEED_DECLARATION_FREE 1
451928c5
AC
7134EOF
7135
97bf5e38 7136fi
451928c5 7137
97bf5e38 7138echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
b0b1c2c0 7139echo "configure:7140: checking whether strerror must be declared" >&5
97bf5e38 7140if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7141 echo $ac_n "(cached) $ac_c" 1>&6
7142else
7143 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7144#line 7145 "configure"
451928c5 7145#include "confdefs.h"
e17bf198 7146
97bf5e38
MK
7147#include <stdio.h>
7148#ifdef HAVE_STRING_H
7149#include <string.h>
7150#else
7151#ifdef HAVE_STRINGS_H
7152#include <strings.h>
7153#endif
7154#endif
7155#ifdef HAVE_STDLIB_H
7156#include <stdlib.h>
7157#endif
7158#ifdef HAVE_UNISTD_H
7159#include <unistd.h>
7160#endif
451928c5 7161int main() {
97bf5e38 7162char *(*pfn) = (char *(*)) strerror
451928c5
AC
7163; return 0; }
7164EOF
b0b1c2c0 7165if { (eval echo configure:7166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7166 rm -rf conftest*
97bf5e38 7167 bfd_cv_decl_needed_strerror=no
451928c5
AC
7168else
7169 echo "configure: failed program was:" >&5
7170 cat conftest.$ac_ext >&5
7171 rm -rf conftest*
97bf5e38 7172 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7173fi
7174rm -f conftest*
7175fi
7176
97bf5e38
MK
7177echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7178if test $bfd_cv_decl_needed_strerror = yes; then
7179 cat >> confdefs.h <<\EOF
7180#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7181EOF
7182
97bf5e38 7183fi
451928c5 7184
97bf5e38 7185echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
b0b1c2c0 7186echo "configure:7187: checking whether strdup must be declared" >&5
97bf5e38 7187if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7188 echo $ac_n "(cached) $ac_c" 1>&6
7189else
7190 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7191#line 7192 "configure"
3862412b 7192#include "confdefs.h"
e17bf198 7193
97bf5e38
MK
7194#include <stdio.h>
7195#ifdef HAVE_STRING_H
7196#include <string.h>
7197#else
7198#ifdef HAVE_STRINGS_H
7199#include <strings.h>
7200#endif
7201#endif
7202#ifdef HAVE_STDLIB_H
7203#include <stdlib.h>
7204#endif
7205#ifdef HAVE_UNISTD_H
7206#include <unistd.h>
7207#endif
3862412b 7208int main() {
97bf5e38 7209char *(*pfn) = (char *(*)) strdup
3862412b
MK
7210; return 0; }
7211EOF
b0b1c2c0 7212if { (eval echo configure:7213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7213 rm -rf conftest*
97bf5e38 7214 bfd_cv_decl_needed_strdup=no
3862412b
MK
7215else
7216 echo "configure: failed program was:" >&5
7217 cat conftest.$ac_ext >&5
7218 rm -rf conftest*
97bf5e38 7219 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7220fi
7221rm -f conftest*
7222fi
7223
97bf5e38
MK
7224echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7225if test $bfd_cv_decl_needed_strdup = yes; then
7226 cat >> confdefs.h <<\EOF
7227#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7228EOF
7229
97bf5e38 7230fi
3862412b 7231
97bf5e38 7232echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
b0b1c2c0 7233echo "configure:7234: checking whether strstr must be declared" >&5
97bf5e38 7234if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7235 echo $ac_n "(cached) $ac_c" 1>&6
7236else
7237 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7238#line 7239 "configure"
3862412b 7239#include "confdefs.h"
e17bf198 7240
97bf5e38
MK
7241#include <stdio.h>
7242#ifdef HAVE_STRING_H
7243#include <string.h>
7244#else
7245#ifdef HAVE_STRINGS_H
7246#include <strings.h>
7247#endif
7248#endif
7249#ifdef HAVE_STDLIB_H
7250#include <stdlib.h>
7251#endif
7252#ifdef HAVE_UNISTD_H
7253#include <unistd.h>
7254#endif
3862412b 7255int main() {
97bf5e38 7256char *(*pfn) = (char *(*)) strstr
3862412b
MK
7257; return 0; }
7258EOF
b0b1c2c0 7259if { (eval echo configure:7260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7260 rm -rf conftest*
97bf5e38 7261 bfd_cv_decl_needed_strstr=no
3862412b
MK
7262else
7263 echo "configure: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 rm -rf conftest*
97bf5e38 7266 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7267fi
7268rm -f conftest*
7269fi
7270
97bf5e38
MK
7271echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7272if test $bfd_cv_decl_needed_strstr = yes; then
7273 cat >> confdefs.h <<\EOF
7274#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7275EOF
7276
97bf5e38 7277fi
3862412b 7278
97bf5e38 7279echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
b0b1c2c0 7280echo "configure:7281: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7281if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7282 echo $ac_n "(cached) $ac_c" 1>&6
7283else
7284 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7285#line 7286 "configure"
596c9d4b
KB
7286#include "confdefs.h"
7287
97bf5e38
MK
7288#include <stdio.h>
7289#ifdef HAVE_STRING_H
7290#include <string.h>
7291#else
7292#ifdef HAVE_STRINGS_H
7293#include <strings.h>
7294#endif
7295#endif
7296#ifdef HAVE_STDLIB_H
7297#include <stdlib.h>
7298#endif
7299#ifdef HAVE_UNISTD_H
7300#include <unistd.h>
7301#endif
596c9d4b 7302int main() {
97bf5e38 7303char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7304; return 0; }
7305EOF
b0b1c2c0 7306if { (eval echo configure:7307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7307 rm -rf conftest*
97bf5e38 7308 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7309else
7310 echo "configure: failed program was:" >&5
7311 cat conftest.$ac_ext >&5
7312 rm -rf conftest*
97bf5e38 7313 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7314fi
7315rm -f conftest*
7316fi
7317
97bf5e38
MK
7318echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7319if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7320 cat >> confdefs.h <<\EOF
7321#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7322EOF
7323
97bf5e38 7324fi
596c9d4b 7325
97bf5e38
MK
7326
7327# The following save_state_t checkery is only necessary for HPUX
7328# versions earlier than 10.20. When those fade from memory, this
7329# could be expunged. --jsm 1999-03-22
7330
7331echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
b0b1c2c0 7332echo "configure:7333: checking for HPUX save_state structure" >&5
97bf5e38 7333cat > conftest.$ac_ext <<EOF
b0b1c2c0 7334#line 7335 "configure"
97bf5e38
MK
7335#include "confdefs.h"
7336#include <machine/save_state.h>
7337EOF
7338if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7339 egrep "save_state_t" >/dev/null 2>&1; then
7340 rm -rf conftest*
7341 gdb_cv_hpux_savestate=yes
7342else
7343 rm -rf conftest*
7344 gdb_cv_hpux_savestate=no
7345fi
7346rm -f conftest*
7347
7348cat > conftest.$ac_ext <<EOF
b0b1c2c0 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 "ss_wide" >/dev/null 2>&1; then
7355 rm -rf conftest*
7356 gdb_cv_hpux_sswide=yes
7357else
7358 rm -rf conftest*
7359 gdb_cv_hpux_sswide=no
7360fi
7361rm -f conftest*
7362
7363if test $gdb_cv_hpux_savestate = yes
7364then
7365 cat >> confdefs.h <<\EOF
7366#define HAVE_STRUCT_SAVE_STATE_T 1
7367EOF
7368
7369fi
7370if test $gdb_cv_hpux_sswide = yes
7371then
7372 cat >> confdefs.h <<\EOF
7373#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7374EOF
7375
7376fi
7377echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7378
7379
7380# If we are configured native on GNU/Linux, work around problems with
7381# sys/procfs.h
7382# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7383
7384if test "${target}" = "${host}"; then
7385 case "${host}" in
7386 i[3456]86-*-linux*)
7387 cat >> confdefs.h <<\EOF
7388#define START_INFERIOR_TRAPS_EXPECTED 2
7389EOF
7390
7391 cat >> confdefs.h <<\EOF
7392#define sys_quotactl 1
7393EOF
7394
7395 ;;
7396 ia64-*-aix*)
7397 cat >> confdefs.h <<\EOF
7398#define NEW_PROC_API 1
7399EOF
7400
7401 ;;
7402 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7403 cat >> confdefs.h <<\EOF
7404#define NEW_PROC_API 1
7405EOF
7406
7407 ;;
7408 *-*-solaris2.[678])
7409 cat >> confdefs.h <<\EOF
7410#define NEW_PROC_API 1
7411EOF
7412
7413 ;;
7414 esac
7415fi
7416
7417if test "$ac_cv_header_sys_procfs_h" = yes; then
7418 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7419echo "configure:7420: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7420 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7421 echo $ac_n "(cached) $ac_c" 1>&6
7422else
7423 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7424#line 7425 "configure"
596c9d4b
KB
7425#include "confdefs.h"
7426
7427#define _SYSCALL32
7428#include <sys/procfs.h>
7429int main() {
97bf5e38 7430pstatus_t avar
596c9d4b
KB
7431; return 0; }
7432EOF
b0b1c2c0 7433if { (eval echo configure:7434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7434 rm -rf conftest*
97bf5e38 7435 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7436else
7437 echo "configure: failed program was:" >&5
7438 cat conftest.$ac_ext >&5
7439 rm -rf conftest*
97bf5e38 7440 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7441
7442fi
7443rm -f conftest*
7444fi
7445
97bf5e38 7446 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7447 cat >> confdefs.h <<\EOF
97bf5e38 7448#define HAVE_PSTATUS_T 1
596c9d4b
KB
7449EOF
7450
7451 fi
97bf5e38 7452 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7453
97bf5e38 7454 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7455echo "configure:7456: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7456 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7457 echo $ac_n "(cached) $ac_c" 1>&6
7458else
7459 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7460#line 7461 "configure"
596c9d4b
KB
7461#include "confdefs.h"
7462
7463#define _SYSCALL32
7464#include <sys/procfs.h>
7465int main() {
97bf5e38 7466prrun_t avar
596c9d4b
KB
7467; return 0; }
7468EOF
b0b1c2c0 7469if { (eval echo configure:7470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7470 rm -rf conftest*
97bf5e38 7471 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7472else
7473 echo "configure: failed program was:" >&5
7474 cat conftest.$ac_ext >&5
7475 rm -rf conftest*
97bf5e38 7476 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7477
7478fi
7479rm -f conftest*
7480fi
7481
97bf5e38 7482 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7483 cat >> confdefs.h <<\EOF
97bf5e38 7484#define HAVE_PRRUN_T 1
596c9d4b
KB
7485EOF
7486
7487 fi
97bf5e38 7488 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7489
97bf5e38 7490 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7491echo "configure:7492: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7492 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7493 echo $ac_n "(cached) $ac_c" 1>&6
7494else
7495 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7496#line 7497 "configure"
596c9d4b
KB
7497#include "confdefs.h"
7498
7499#define _SYSCALL32
7500#include <sys/procfs.h>
7501int main() {
97bf5e38 7502gregset_t avar
596c9d4b
KB
7503; return 0; }
7504EOF
b0b1c2c0 7505if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7506 rm -rf conftest*
97bf5e38 7507 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7508else
7509 echo "configure: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 rm -rf conftest*
97bf5e38 7512 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7513
7514fi
7515rm -f conftest*
7516fi
7517
97bf5e38 7518 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7519 cat >> confdefs.h <<\EOF
97bf5e38 7520#define HAVE_GREGSET_T 1
596c9d4b
KB
7521EOF
7522
7523 fi
97bf5e38 7524 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7525
97bf5e38 7526 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7527echo "configure:7528: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7528 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7529 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7530else
7531 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7532#line 7533 "configure"
d84dd0c5 7533#include "confdefs.h"
97bf5e38
MK
7534
7535#define _SYSCALL32
d84dd0c5 7536#include <sys/procfs.h>
97bf5e38
MK
7537int main() {
7538fpregset_t avar
7539; return 0; }
d84dd0c5 7540EOF
b0b1c2c0 7541if { (eval echo configure:7542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7542 rm -rf conftest*
7543 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7544else
7545 echo "configure: failed program was:" >&5
7546 cat conftest.$ac_ext >&5
97bf5e38
MK
7547 rm -rf conftest*
7548 bfd_cv_have_sys_procfs_type_fpregset_t=no
7549
d84dd0c5 7550fi
97bf5e38 7551rm -f conftest*
d84dd0c5
MK
7552fi
7553
97bf5e38
MK
7554 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7555 cat >> confdefs.h <<\EOF
7556#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7557EOF
7558
97bf5e38
MK
7559 fi
7560 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7561
97bf5e38 7562 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7563echo "configure:7564: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7564 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7565 echo $ac_n "(cached) $ac_c" 1>&6
7566else
7567 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7568#line 7569 "configure"
c906108c 7569#include "confdefs.h"
c906108c 7570
97bf5e38
MK
7571#define _SYSCALL32
7572#include <sys/procfs.h>
c906108c 7573int main() {
97bf5e38 7574prgregset_t avar
c906108c
SS
7575; return 0; }
7576EOF
b0b1c2c0 7577if { (eval echo configure:7578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7578 rm -rf conftest*
97bf5e38 7579 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7580else
7581 echo "configure: failed program was:" >&5
7582 cat conftest.$ac_ext >&5
7583 rm -rf conftest*
97bf5e38
MK
7584 bfd_cv_have_sys_procfs_type_prgregset_t=no
7585
c906108c
SS
7586fi
7587rm -f conftest*
7588fi
7589
97bf5e38
MK
7590 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7591 cat >> confdefs.h <<\EOF
7592#define HAVE_PRGREGSET_T 1
c906108c
SS
7593EOF
7594
97bf5e38
MK
7595 fi
7596 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7597
97bf5e38 7598 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7599echo "configure:7600: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7600 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7601 echo $ac_n "(cached) $ac_c" 1>&6
7602else
7603 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7604#line 7605 "configure"
d45fe813 7605#include "confdefs.h"
97bf5e38
MK
7606
7607#define _SYSCALL32
7608#include <sys/procfs.h>
d45fe813 7609int main() {
97bf5e38 7610prfpregset_t avar
d45fe813
KB
7611; return 0; }
7612EOF
b0b1c2c0 7613if { (eval echo configure:7614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7614 rm -rf conftest*
97bf5e38 7615 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7616else
7617 echo "configure: failed program was:" >&5
7618 cat conftest.$ac_ext >&5
7619 rm -rf conftest*
97bf5e38
MK
7620 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7621
d45fe813
KB
7622fi
7623rm -f conftest*
7624fi
7625
97bf5e38
MK
7626 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7627 cat >> confdefs.h <<\EOF
7628#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7629EOF
7630
97bf5e38
MK
7631 fi
7632 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7633
97bf5e38 7634 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7635echo "configure:7636: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7636 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7637 echo $ac_n "(cached) $ac_c" 1>&6
7638else
7639 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7640#line 7641 "configure"
d45fe813 7641#include "confdefs.h"
97bf5e38
MK
7642
7643#define _SYSCALL32
7644#include <sys/procfs.h>
d45fe813 7645int main() {
97bf5e38 7646prgregset32_t avar
d45fe813
KB
7647; return 0; }
7648EOF
b0b1c2c0 7649if { (eval echo configure:7650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7650 rm -rf conftest*
97bf5e38 7651 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7652else
7653 echo "configure: failed program was:" >&5
7654 cat conftest.$ac_ext >&5
7655 rm -rf conftest*
97bf5e38
MK
7656 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7657
d45fe813
KB
7658fi
7659rm -f conftest*
7660fi
7661
97bf5e38
MK
7662 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7663 cat >> confdefs.h <<\EOF
7664#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7665EOF
7666
97bf5e38
MK
7667 fi
7668 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7669
97bf5e38 7670 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7671echo "configure:7672: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7672 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7673 echo $ac_n "(cached) $ac_c" 1>&6
7674else
7675 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7676#line 7677 "configure"
d45fe813 7677#include "confdefs.h"
97bf5e38
MK
7678
7679#define _SYSCALL32
7680#include <sys/procfs.h>
d45fe813 7681int main() {
97bf5e38 7682prfpregset32_t avar
d45fe813
KB
7683; return 0; }
7684EOF
b0b1c2c0 7685if { (eval echo configure:7686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7686 rm -rf conftest*
97bf5e38 7687 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7688else
7689 echo "configure: failed program was:" >&5
7690 cat conftest.$ac_ext >&5
7691 rm -rf conftest*
97bf5e38
MK
7692 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7693
d45fe813
KB
7694fi
7695rm -f conftest*
7696fi
7697
97bf5e38
MK
7698 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7699 cat >> confdefs.h <<\EOF
7700#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7701EOF
7702
97bf5e38
MK
7703 fi
7704 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7705
97bf5e38 7706 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7707echo "configure:7708: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7708 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7709 echo $ac_n "(cached) $ac_c" 1>&6
7710else
7711 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7712#line 7713 "configure"
d45fe813 7713#include "confdefs.h"
97bf5e38 7714
d45fe813 7715#define _SYSCALL32
97bf5e38 7716#include <sys/procfs.h>
d45fe813 7717int main() {
97bf5e38 7718lwpid_t avar
d45fe813
KB
7719; return 0; }
7720EOF
b0b1c2c0 7721if { (eval echo configure:7722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7722 rm -rf conftest*
97bf5e38 7723 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7724else
7725 echo "configure: failed program was:" >&5
7726 cat conftest.$ac_ext >&5
7727 rm -rf conftest*
97bf5e38
MK
7728 bfd_cv_have_sys_procfs_type_lwpid_t=no
7729
d45fe813
KB
7730fi
7731rm -f conftest*
7732fi
7733
97bf5e38
MK
7734 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7735 cat >> confdefs.h <<\EOF
7736#define HAVE_LWPID_T 1
d45fe813
KB
7737EOF
7738
97bf5e38
MK
7739 fi
7740 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7741
97bf5e38 7742 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7743echo "configure:7744: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7744 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7745 echo $ac_n "(cached) $ac_c" 1>&6
7746else
7747 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7748#line 7749 "configure"
c906108c
SS
7749#include "confdefs.h"
7750
97bf5e38
MK
7751#define _SYSCALL32
7752#include <sys/procfs.h>
c906108c 7753int main() {
97bf5e38 7754psaddr_t avar
c906108c
SS
7755; return 0; }
7756EOF
b0b1c2c0 7757if { (eval echo configure:7758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7758 rm -rf conftest*
97bf5e38 7759 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7760else
7761 echo "configure: failed program was:" >&5
7762 cat conftest.$ac_ext >&5
7763 rm -rf conftest*
97bf5e38
MK
7764 bfd_cv_have_sys_procfs_type_psaddr_t=no
7765
c906108c
SS
7766fi
7767rm -f conftest*
7768fi
7769
97bf5e38
MK
7770 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7771 cat >> confdefs.h <<\EOF
7772#define HAVE_PSADDR_T 1
c906108c
SS
7773EOF
7774
97bf5e38
MK
7775 fi
7776 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7777
97bf5e38 7778 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7779echo "configure:7780: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7780 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7781 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7782else
7783 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7784#line 7785 "configure"
c906108c
SS
7785#include "confdefs.h"
7786
97bf5e38
MK
7787#define _SYSCALL32
7788#include <sys/procfs.h>
7789int main() {
7790prsysent_t avar
7791; return 0; }
c906108c 7792EOF
b0b1c2c0 7793if { (eval echo configure:7794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7794 rm -rf conftest*
7795 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7796else
7797 echo "configure: failed program was:" >&5
7798 cat conftest.$ac_ext >&5
97bf5e38
MK
7799 rm -rf conftest*
7800 bfd_cv_have_sys_procfs_type_prsysent_t=no
7801
c906108c 7802fi
97bf5e38 7803rm -f conftest*
c906108c
SS
7804fi
7805
97bf5e38
MK
7806 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7807 cat >> confdefs.h <<\EOF
7808#define HAVE_PRSYSENT_T 1
c906108c
SS
7809EOF
7810
97bf5e38
MK
7811 fi
7812 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7813
97bf5e38 7814 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7815echo "configure:7816: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7816 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7817 echo $ac_n "(cached) $ac_c" 1>&6
7818else
7819 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7820#line 7821 "configure"
c906108c
SS
7821#include "confdefs.h"
7822
97bf5e38
MK
7823#define _SYSCALL32
7824#include <sys/procfs.h>
c906108c 7825int main() {
97bf5e38 7826pr_sigset_t avar
c906108c
SS
7827; return 0; }
7828EOF
b0b1c2c0 7829if { (eval echo configure:7830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7830 rm -rf conftest*
97bf5e38 7831 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7832else
7833 echo "configure: failed program was:" >&5
7834 cat conftest.$ac_ext >&5
7835 rm -rf conftest*
97bf5e38
MK
7836 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7837
c906108c
SS
7838fi
7839rm -f conftest*
7840fi
7841
97bf5e38
MK
7842 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7843 cat >> confdefs.h <<\EOF
7844#define HAVE_PR_SIGSET_T 1
c906108c
SS
7845EOF
7846
97bf5e38
MK
7847 fi
7848 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7849
97bf5e38 7850 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7851echo "configure:7852: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7852 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7853 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7854else
7855 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7856#line 7857 "configure"
c906108c
SS
7857#include "confdefs.h"
7858
97bf5e38
MK
7859#define _SYSCALL32
7860#include <sys/procfs.h>
7861int main() {
7862pr_sigaction64_t avar
7863; return 0; }
c906108c 7864EOF
b0b1c2c0 7865if { (eval echo configure:7866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7866 rm -rf conftest*
7867 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7868else
7869 echo "configure: failed program was:" >&5
7870 cat conftest.$ac_ext >&5
97bf5e38
MK
7871 rm -rf conftest*
7872 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7873
c906108c 7874fi
97bf5e38 7875rm -f conftest*
c906108c
SS
7876fi
7877
97bf5e38
MK
7878 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7879 cat >> confdefs.h <<\EOF
7880#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7881EOF
7882
97bf5e38
MK
7883 fi
7884 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7885
7886 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7887echo "configure:7888: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7888 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7889 echo $ac_n "(cached) $ac_c" 1>&6
7890else
7891 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7892#line 7893 "configure"
97bf5e38
MK
7893#include "confdefs.h"
7894
7895#define _SYSCALL32
7896#include <sys/procfs.h>
7897int main() {
7898pr_siginfo64_t avar
7899; return 0; }
7900EOF
b0b1c2c0 7901if { (eval echo configure:7902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7902 rm -rf conftest*
7903 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7904else
7905 echo "configure: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 rm -rf conftest*
7908 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7909
7910fi
7911rm -f conftest*
c906108c 7912fi
c906108c 7913
97bf5e38
MK
7914 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7915 cat >> confdefs.h <<\EOF
7916#define HAVE_PR_SIGINFO64_T 1
7917EOF
c906108c 7918
97bf5e38
MK
7919 fi
7920 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7921
7922
7923
7924
7925
7926 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7927 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
b0b1c2c0 7928echo "configure:7929: checking whether prfpregset_t type is broken" >&5
97bf5e38 7929 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7930 echo $ac_n "(cached) $ac_c" 1>&6
7931else
7932 if test "$cross_compiling" = yes; then
97bf5e38 7933 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7934else
7935 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7936#line 7937 "configure"
c906108c 7937#include "confdefs.h"
97bf5e38
MK
7938#include <sys/procfs.h>
7939 int main ()
7940 {
7941 if (sizeof (prfpregset_t) == sizeof (void *))
7942 return 1;
7943 return 0;
7944 }
c906108c 7945EOF
b0b1c2c0 7946if { (eval echo configure:7947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7947then
97bf5e38 7948 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7949else
7950 echo "configure: failed program was:" >&5
7951 cat conftest.$ac_ext >&5
7952 rm -fr conftest*
97bf5e38 7953 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7954fi
7955rm -fr conftest*
7956fi
7957
7958fi
7959
97bf5e38
MK
7960 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7961 if test $gdb_cv_prfpregset_t_broken = yes; then
7962 cat >> confdefs.h <<\EOF
7963#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7964EOF
7965
97bf5e38
MK
7966 fi
7967 fi
c906108c 7968
97bf5e38
MK
7969
7970 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
b0b1c2c0 7971echo "configure:7972: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7972 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7973 echo $ac_n "(cached) $ac_c" 1>&6
7974else
7975 cat > conftest.$ac_ext <<EOF
b0b1c2c0 7976#line 7977 "configure"
c906108c 7977#include "confdefs.h"
97bf5e38
MK
7978#include <unistd.h>
7979#include <sys/types.h>
7980#include <sys/procfs.h>
7981
7982int main() {
7983
7984 int dummy;;
7985 dummy = ioctl(0, PIOCSET, &dummy);
7986
7987; return 0; }
c906108c 7988EOF
b0b1c2c0 7989if { (eval echo configure:7990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7990 rm -rf conftest*
97bf5e38 7991 gdb_cv_have_procfs_piocset=yes
c906108c 7992else
c906108c
SS
7993 echo "configure: failed program was:" >&5
7994 cat conftest.$ac_ext >&5
7995 rm -rf conftest*
97bf5e38 7996 gdb_cv_have_procfs_piocset=no
c906108c
SS
7997fi
7998rm -f conftest*
7999fi
97bf5e38
MK
8000
8001 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8002 if test $gdb_cv_have_procfs_piocset = yes; then
8003 cat >> confdefs.h <<\EOF
8004#define HAVE_PROCFS_PIOCSET 1
c906108c 8005EOF
97bf5e38
MK
8006
8007 fi
c906108c 8008fi
c906108c 8009
97bf5e38
MK
8010if test ${host} = ${target} ; then
8011
8012 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
b0b1c2c0 8013echo "configure:8014: checking for member l_addr in struct link_map" >&5
97bf5e38 8014 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8015 echo $ac_n "(cached) $ac_c" 1>&6
8016else
8017 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8018#line 8019 "configure"
c906108c 8019#include "confdefs.h"
97bf5e38 8020#include <link.h>
c906108c 8021int main() {
97bf5e38 8022struct link_map lm; (void) lm.l_addr;
c906108c
SS
8023; return 0; }
8024EOF
b0b1c2c0 8025if { (eval echo configure:8026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8026 rm -rf conftest*
97bf5e38 8027 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8028else
8029 echo "configure: failed program was:" >&5
8030 cat conftest.$ac_ext >&5
8031 rm -rf conftest*
97bf5e38 8032 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8033fi
8034rm -f conftest*
8035fi
8036
97bf5e38
MK
8037 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8038 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8039 cat >> confdefs.h <<\EOF
8040#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8041EOF
97bf5e38
MK
8042
8043 fi
8044
8045
8046 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
b0b1c2c0 8047echo "configure:8048: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8048 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8049 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8050else
97bf5e38 8051 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8052#line 8053 "configure"
97bf5e38
MK
8053#include "confdefs.h"
8054#include <sys/types.h>
8055#include <link.h>
8056int main() {
8057struct link_map lm; (void) lm.lm_addr;
8058; return 0; }
8059EOF
b0b1c2c0 8060if { (eval echo configure:8061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8061 rm -rf conftest*
8062 gdb_cv_have_struct_link_map_with_lm_members=yes
8063else
8064 echo "configure: failed program was:" >&5
8065 cat conftest.$ac_ext >&5
8066 rm -rf conftest*
8067 gdb_cv_have_struct_link_map_with_lm_members=no
8068fi
8069rm -f conftest*
c906108c 8070fi
c906108c 8071
97bf5e38
MK
8072 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8073 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8074 cat >> confdefs.h <<\EOF
8075#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8076EOF
8077
8078 fi
8079
8080
8081 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
b0b1c2c0 8082echo "configure:8083: checking for member som_addr in struct so_map" >&5
97bf5e38 8083 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8084 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8085else
8086 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8087#line 8088 "configure"
c906108c 8088#include "confdefs.h"
97bf5e38
MK
8089#include <sys/types.h>
8090#ifdef HAVE_NLIST_H
8091#include <nlist.h>
8092#endif
8093#include <link.h>
8094int main() {
8095struct so_map lm; (void) lm.som_addr;
8096; return 0; }
8097EOF
b0b1c2c0 8098if { (eval echo configure:8099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8099 rm -rf conftest*
8100 gdb_cv_have_struct_so_map_with_som_members=yes
8101else
8102 echo "configure: failed program was:" >&5
8103 cat conftest.$ac_ext >&5
8104 rm -rf conftest*
8105 gdb_cv_have_struct_so_map_with_som_members=no
8106fi
8107rm -f conftest*
8108fi
c906108c 8109
97bf5e38
MK
8110 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8111 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8112 cat >> confdefs.h <<\EOF
8113#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8114EOF
c906108c 8115
97bf5e38 8116 fi
c906108c 8117
97bf5e38
MK
8118
8119 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
b0b1c2c0 8120echo "configure:8121: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8121 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8122 echo $ac_n "(cached) $ac_c" 1>&6
8123else
8124 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8125#line 8126 "configure"
97bf5e38
MK
8126#include "confdefs.h"
8127#define _SYSCALL32
8128#include <sys/link.h>
8129int main() {
8130struct link_map32 l;
8131; return 0; }
8132EOF
b0b1c2c0 8133if { (eval echo configure:8134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8134 rm -rf conftest*
8135 gdb_cv_have_struct_link_map32=yes
8136else
8137 echo "configure: failed program was:" >&5
8138 cat conftest.$ac_ext >&5
8139 rm -rf conftest*
8140 gdb_cv_have_struct_link_map32=no
8141fi
8142rm -f conftest*
8143fi
c906108c 8144
97bf5e38
MK
8145 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8146 if test $gdb_cv_have_struct_link_map32 = yes; then
8147 cat >> confdefs.h <<\EOF
8148#define HAVE_STRUCT_LINK_MAP32 1
8149EOF
c906108c 8150
97bf5e38
MK
8151 cat >> confdefs.h <<\EOF
8152#define _SYSCALL32 1
8153EOF
c906108c 8154
97bf5e38
MK
8155 fi
8156fi
c906108c 8157
c906108c 8158
97bf5e38 8159echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
b0b1c2c0 8160echo "configure:8161: checking for long long support in compiler" >&5
97bf5e38
MK
8161if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8162 echo $ac_n "(cached) $ac_c" 1>&6
8163else
8164 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8165#line 8166 "configure"
97bf5e38 8166#include "confdefs.h"
c906108c 8167
97bf5e38 8168int main() {
c906108c 8169
97bf5e38
MK
8170 extern long long foo;
8171 switch (foo & 2) { case 0: return 1; }
c906108c 8172
97bf5e38
MK
8173; return 0; }
8174EOF
b0b1c2c0 8175if { (eval echo configure:8176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8176 rm -rf conftest*
8177 gdb_cv_c_long_long=yes
8178else
8179 echo "configure: failed program was:" >&5
8180 cat conftest.$ac_ext >&5
8181 rm -rf conftest*
8182 gdb_cv_c_long_long=no
8183fi
8184rm -f conftest*
8185fi
c906108c 8186
97bf5e38
MK
8187echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8188if test $gdb_cv_c_long_long = yes; then
8189 cat >> confdefs.h <<\EOF
8190#define CC_HAS_LONG_LONG 1
8191EOF
8192
8193fi
8194
8195
8196echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
b0b1c2c0 8197echo "configure:8198: checking for long long support in printf" >&5
97bf5e38
MK
8198if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8199 echo $ac_n "(cached) $ac_c" 1>&6
8200else
8201 if test "$cross_compiling" = yes; then
8202 gdb_cv_printf_has_long_long=no
8203else
8204 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8205#line 8206 "configure"
97bf5e38
MK
8206#include "confdefs.h"
8207
8208int main () {
8209 char buf[32];
8210 long long l = 0;
8211 l = (l << 16) + 0x0123;
8212 l = (l << 16) + 0x4567;
8213 l = (l << 16) + 0x89ab;
8214 l = (l << 16) + 0xcdef;
8215 sprintf (buf, "0x%016llx", l);
8216 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8217}
97bf5e38 8218EOF
b0b1c2c0 8219if { (eval echo configure:8220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8220then
8221 gdb_cv_printf_has_long_long=yes
8222else
8223 echo "configure: failed program was:" >&5
8224 cat conftest.$ac_ext >&5
8225 rm -fr conftest*
8226 gdb_cv_printf_has_long_long=no
8227fi
8228rm -fr conftest*
8229fi
8230
8231fi
8232
8233if test $gdb_cv_printf_has_long_long = yes; then
8234 cat >> confdefs.h <<\EOF
8235#define PRINTF_HAS_LONG_LONG 1
8236EOF
8237
8238fi
8239echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8240
8241
8242echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
b0b1c2c0 8243echo "configure:8244: checking for long double support in compiler" >&5
97bf5e38
MK
8244if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8245 echo $ac_n "(cached) $ac_c" 1>&6
8246else
8247 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8248#line 8249 "configure"
97bf5e38
MK
8249#include "confdefs.h"
8250
8251int main() {
8252long double foo;
8253; return 0; }
8254EOF
b0b1c2c0 8255if { (eval echo configure:8256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8256 rm -rf conftest*
8257 ac_cv_c_long_double=yes
8258else
8259 echo "configure: failed program was:" >&5
8260 cat conftest.$ac_ext >&5
8261 rm -rf conftest*
8262 ac_cv_c_long_double=no
8263fi
8264rm -f conftest*
8265fi
c906108c 8266
97bf5e38
MK
8267echo "$ac_t""$ac_cv_c_long_double" 1>&6
8268if test $ac_cv_c_long_double = yes; then
8269 cat >> confdefs.h <<\EOF
8270#define HAVE_LONG_DOUBLE 1
c906108c 8271EOF
97bf5e38
MK
8272
8273fi
8274
8275
8276echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
b0b1c2c0 8277echo "configure:8278: checking for long double support in printf" >&5
97bf5e38
MK
8278if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8279 echo $ac_n "(cached) $ac_c" 1>&6
8280else
8281 if test "$cross_compiling" = yes; then
8282 gdb_cv_printf_has_long_double=no
8283else
8284 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8285#line 8286 "configure"
97bf5e38
MK
8286#include "confdefs.h"
8287
8288int main () {
8289 char buf[16];
8290 long double f = 3.141592653;
8291 sprintf (buf, "%Lg", f);
8292 return (strncmp ("3.14159", buf, 7));
8293}
8294EOF
b0b1c2c0 8295if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8296then
97bf5e38 8297 gdb_cv_printf_has_long_double=yes
c906108c
SS
8298else
8299 echo "configure: failed program was:" >&5
8300 cat conftest.$ac_ext >&5
8301 rm -fr conftest*
97bf5e38 8302 gdb_cv_printf_has_long_double=no
c906108c
SS
8303fi
8304rm -fr conftest*
8305fi
8306
8307fi
8308
97bf5e38 8309if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8310 cat >> confdefs.h <<\EOF
97bf5e38
MK
8311#define PRINTF_HAS_LONG_DOUBLE 1
8312EOF
8313
8314fi
8315echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8316
8317
8318echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
b0b1c2c0 8319echo "configure:8320: checking for long double support in scanf" >&5
97bf5e38
MK
8320if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8321 echo $ac_n "(cached) $ac_c" 1>&6
8322else
8323 if test "$cross_compiling" = yes; then
8324 gdb_cv_scanf_has_long_double=no
8325else
8326 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8327#line 8328 "configure"
97bf5e38
MK
8328#include "confdefs.h"
8329
8330int main () {
8331 char *buf = "3.141592653";
8332 long double f = 0;
8333 sscanf (buf, "%Lg", &f);
8334 return !(f > 3.14159 && f < 3.14160);
8335}
c906108c 8336EOF
b0b1c2c0 8337if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8338then
8339 gdb_cv_scanf_has_long_double=yes
8340else
8341 echo "configure: failed program was:" >&5
8342 cat conftest.$ac_ext >&5
8343 rm -fr conftest*
8344 gdb_cv_scanf_has_long_double=no
8345fi
8346rm -fr conftest*
8347fi
c906108c
SS
8348
8349fi
8350
97bf5e38
MK
8351if test $gdb_cv_scanf_has_long_double = yes; then
8352 cat >> confdefs.h <<\EOF
8353#define SCANF_HAS_LONG_DOUBLE 1
8354EOF
8355
8356fi
8357echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8358
438013df
AO
8359case ${host_os} in
8360aix*)
8361 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
b0b1c2c0 8362echo "configure:8363: checking for -bbigtoc option" >&5
438013df
AO
8363if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8364 echo $ac_n "(cached) $ac_c" 1>&6
8365else
8366
8367 SAVE_LDFLAGS=$LDFLAGS
8368
8369 case $GCC in
8370 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8371 *) gdb_cv_bigtoc=-bbigtoc ;;
8372 esac
8373
8374 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8375 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8376#line 8377 "configure"
438013df
AO
8377#include "confdefs.h"
8378
8379int main() {
8380int i;
8381; return 0; }
8382EOF
b0b1c2c0 8383if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8384 :
8385else
8386 echo "configure: failed program was:" >&5
8387 cat conftest.$ac_ext >&5
8388 rm -rf conftest*
8389 gdb_cv_bigtoc=
8390fi
8391rm -f conftest*
8392
8393fi
8394
8395echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8396 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8397 ;;
8398esac
8399
c906108c
SS
8400
8401
8402if test ${build} = ${host} -a ${host} = ${target} ; then
8403 case ${host_os} in
8404 hpux*)
8405 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
b0b1c2c0 8406echo "configure:8407: checking for HPUX/OSF thread support" >&5
c906108c
SS
8407 if test -f /usr/include/dce/cma_config.h ; then
8408 if test "$GCC" = "yes" ; then
8409 echo "$ac_t""yes" 1>&6
8410 cat >> confdefs.h <<\EOF
8411#define HAVE_HPUX_THREAD_SUPPORT 1
8412EOF
8413
66b965bb 8414 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8415 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8416 else
8417 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8418 fi
8419 else
8420 echo "$ac_t""no" 1>&6
8421 fi
8422 ;;
8423 solaris*)
d92419e5
JB
8424 # See if thread_db library is around for Solaris thread debugging.
8425 # Note that we must explicitly test for version 1 of the library
8426 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8427 # the same API.
c906108c 8428 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
b0b1c2c0 8429echo "configure:8430: checking for Solaris thread debugging library" >&5
c906108c
SS
8430 if test -f /usr/lib/libthread_db.so.1 ; then
8431 echo "$ac_t""yes" 1>&6
8432 cat >> confdefs.h <<\EOF
8433#define HAVE_THREAD_DB_LIB 1
8434EOF
8435
66b965bb 8436 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8437 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8438 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
b0b1c2c0 8439echo "configure:8440: checking for dlopen in -ldl" >&5
c906108c
SS
8440ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8441if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8442 echo $ac_n "(cached) $ac_c" 1>&6
8443else
8444 ac_save_LIBS="$LIBS"
8445LIBS="-ldl $LIBS"
8446cat > conftest.$ac_ext <<EOF
b0b1c2c0 8447#line 8448 "configure"
c906108c
SS
8448#include "confdefs.h"
8449/* Override any gcc2 internal prototype to avoid an error. */
8450/* We use char because int might match the return type of a gcc2
8451 builtin and then its argument prototype would still apply. */
8452char dlopen();
8453
8454int main() {
8455dlopen()
8456; return 0; }
8457EOF
b0b1c2c0 8458if { (eval echo configure:8459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8459 rm -rf conftest*
8460 eval "ac_cv_lib_$ac_lib_var=yes"
8461else
8462 echo "configure: failed program was:" >&5
8463 cat conftest.$ac_ext >&5
8464 rm -rf conftest*
8465 eval "ac_cv_lib_$ac_lib_var=no"
8466fi
8467rm -f conftest*
8468LIBS="$ac_save_LIBS"
8469
8470fi
8471if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8472 echo "$ac_t""yes" 1>&6
8473 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8474 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8475 cat >> confdefs.h <<EOF
8476#define $ac_tr_lib 1
8477EOF
8478
8479 LIBS="-ldl $LIBS"
8480
8481else
8482 echo "$ac_t""no" 1>&6
8483fi
8484
8485 if test "$GCC" = "yes" ; then
8486 # The GNU linker requires the -export-dynamic option to make
8487 # all symbols visible in the dynamic symbol table.
8488 hold_ldflags=$LDFLAGS
8489 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
b0b1c2c0 8490echo "configure:8491: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8491 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8492 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8493#line 8494 "configure"
c906108c
SS
8494#include "confdefs.h"
8495
8496int main() {
8497int i;
8498; return 0; }
8499EOF
b0b1c2c0 8500if { (eval echo configure:8501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8501 rm -rf conftest*
8502 found=yes
8503else
8504 echo "configure: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 rm -rf conftest*
8507 found=no
8508fi
8509rm -f conftest*
8510 LDFLAGS=$hold_ldflags
8511 echo "$ac_t""$found" 1>&6
8512 if test $found = yes; then
8513 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8514 fi
8515 fi
8516 # Sun randomly tweaked the prototypes in <proc_service.h>
8517 # at one point.
8518 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
b0b1c2c0 8519echo "configure:8520: checking if <proc_service.h> is old" >&5
c906108c
SS
8520 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8521 echo $ac_n "(cached) $ac_c" 1>&6
8522else
8523
8524 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8525#line 8526 "configure"
c906108c
SS
8526#include "confdefs.h"
8527
8528 #include <proc_service.h>
8529 ps_err_e ps_pdwrite
8530 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8531
8532int main() {
8533
8534; return 0; }
8535EOF
b0b1c2c0 8536if { (eval echo configure:8537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8537 rm -rf conftest*
8538 gdb_cv_proc_service_is_old=no
8539else
8540 echo "configure: failed program was:" >&5
8541 cat conftest.$ac_ext >&5
8542 rm -rf conftest*
8543 gdb_cv_proc_service_is_old=yes
8544fi
8545rm -f conftest*
8546
8547fi
8548
8549 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8550 if test $gdb_cv_proc_service_is_old = yes; then
8551 cat >> confdefs.h <<\EOF
8552#define PROC_SERVICE_IS_OLD 1
8553EOF
8554
8555 fi
8556 else
8557 echo "$ac_t""no" 1>&6
8558 fi
8559 ;;
d92419e5
JB
8560 aix*)
8561 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
b0b1c2c0 8562echo "configure:8563: checking for AiX thread debugging library" >&5
d92419e5
JB
8563 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8564 echo $ac_n "(cached) $ac_c" 1>&6
8565else
8566 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8567#line 8568 "configure"
d92419e5
JB
8568#include "confdefs.h"
8569#include <sys/pthdebug.h>
8570int main() {
8571#ifndef PTHDB_VERSION_3
8572 #error
8573 #endif
8574; return 0; }
8575EOF
b0b1c2c0 8576if { (eval echo configure:8577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8577 rm -rf conftest*
8578 gdb_cv_have_aix_thread_debug=yes
8579else
8580 echo "configure: failed program was:" >&5
8581 cat conftest.$ac_ext >&5
8582 rm -rf conftest*
8583 gdb_cv_have_aix_thread_debug=no
8584fi
8585rm -f conftest*
8586fi
8587
8588 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8589 if test $gdb_cv_have_aix_thread_debug = yes; then
8590 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8591 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8592 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8593 fi
8594 ;;
c906108c
SS
8595 esac
8596
8597fi
8598
3f47be5c
EZ
8599if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8600 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
b0b1c2c0 8601echo "configure:8602: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8602if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8603 echo $ac_n "(cached) $ac_c" 1>&6
8604else
8605 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8606#line 8607 "configure"
3f47be5c
EZ
8607#include "confdefs.h"
8608#include <thread_db.h>
8609int main() {
8610int i = TD_NOTALLOC;
8611; return 0; }
8612EOF
b0b1c2c0 8613if { (eval echo configure:8614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8614 rm -rf conftest*
8615 gdb_cv_thread_db_h_has_td_notalloc=yes
8616else
8617 echo "configure: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619 rm -rf conftest*
8620 gdb_cv_thread_db_h_has_td_notalloc=no
8621
8622fi
8623rm -f conftest*
8624
8625fi
8626
8627echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8628fi
8629if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8630 cat >> confdefs.h <<\EOF
8631#define THREAD_DB_HAS_TD_NOTALLOC 1
8632EOF
8633
8634fi
8635
fb40c209 8636
030292b7
DJ
8637# Check whether --with-sysroot or --without-sysroot was given.
8638if test "${with_sysroot+set}" = set; then
8639 withval="$with_sysroot"
8640
8641 case ${with_sysroot} in
8642 yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;;
8643 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8644 esac
8645
8646 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8647
8648 if test "x$exec_prefix" = xNONE; then
8649 if test "x$prefix" = xNONE; then
8650 test_prefix=/usr/local
8651 else
8652 test_prefix=$prefix
8653 fi
8654 else
8655 test_prefix=$exec_prefix
8656 fi
8657 case ${TARGET_SYSTEM_ROOT} in
8658 ${test_prefix}*)
8659 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8660 TARGET_SYSTEM_ROOT_DEFINE="$t"
8661 ;;
8662 esac
8663
8664else
8665
8666 TARGET_SYSTEM_ROOT=
8667 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8668
8669fi
8670
8671
8672
8673
3b851bce
AC
8674# NOTE: Don't add -Wall or -Wunused, they both include
8675# -Wunused-parameter which reports bogus warnings.
8676# NOTE: If you add to this list, remember to update
8677# gdb/doc/gdbint.texinfo.
1decb323 8678build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8679-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8680# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8681# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8682# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8683# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8684# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8685# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8686# Check whether --enable-build-warnings or --disable-build-warnings was given.
8687if test "${enable_build_warnings+set}" = set; then
8688 enableval="$enable_build_warnings"
1decb323 8689 case "${enableval}" in
c906108c
SS
8690 yes) ;;
8691 no) build_warnings="-w";;
8692 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8693 build_warnings="${build_warnings} ${t}";;
8694 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8695 build_warnings="${t} ${build_warnings}";;
8696 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8697esac
d4f3574e 8698if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8699 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8700fi
1decb323 8701fi
3b851bce
AC
8702# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8703if test "${enable_gdb_build_warnings+set}" = set; then
8704 enableval="$enable_gdb_build_warnings"
8705 case "${enableval}" in
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
8714if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8715 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8716fi
8717fi
104c1213
JM
8718WARN_CFLAGS=""
8719WERROR_CFLAGS=""
c906108c
SS
8720if test "x${build_warnings}" != x -a "x$GCC" = xyes
8721then
746a987d 8722 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
b0b1c2c0 8723echo "configure:8724: checking compiler warning flags" >&5
746a987d
AC
8724 # Separate out the -Werror flag as some files just cannot be
8725 # compiled with it enabled.
8726 for w in ${build_warnings}; do
8727 case $w in
8728 -Werr*) WERROR_CFLAGS=-Werror ;;
8729 *) # Check that GCC accepts it
4536bbc6
AC
8730 saved_CFLAGS="$CFLAGS"
8731 CFLAGS="$CFLAGS $w"
8732 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8733#line 8734 "configure"
4536bbc6
AC
8734#include "confdefs.h"
8735
8736int main() {
8737
8738; return 0; }
8739EOF
b0b1c2c0 8740if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8741 rm -rf conftest*
8742 WARN_CFLAGS="${WARN_CFLAGS} $w"
8743else
8744 echo "configure: failed program was:" >&5
8745 cat conftest.$ac_ext >&5
8746fi
8747rm -f conftest*
8748 CFLAGS="$saved_CFLAGS"
746a987d
AC
8749 esac
8750 done
8751 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8752fi
8753
8754
104c1213 8755
c906108c
SS
8756MMALLOC_CFLAGS=
8757MMALLOC=
8758
8759
8760
8761# Check whether --with-mmalloc or --without-mmalloc was given.
8762if test "${with_mmalloc+set}" = set; then
8763 withval="$with_mmalloc"
8764 case "${withval}" in
8765 yes) want_mmalloc=true ;;
8766 no) want_mmalloc=false;;
8767 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8768esac
8769else
8770 want_mmalloc=false
8771fi
8772
8773if test x$want_mmalloc = xtrue; then
8774 cat >> confdefs.h <<\EOF
8775#define USE_MMALLOC 1
8776EOF
8777
8778 cat >> confdefs.h <<\EOF
8779#define MMCHECK_FORCE 1
8780EOF
8781
8782 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8783 MMALLOC='../mmalloc/libmmalloc.a'
8784fi
8785
7a292a7a
SS
8786# In the Cygwin environment, we need some additional flags.
8787echo $ac_n "checking for cygwin""... $ac_c" 1>&6
b0b1c2c0 8788echo "configure:8789: checking for cygwin" >&5
7a292a7a
SS
8789if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8790 echo $ac_n "(cached) $ac_c" 1>&6
8791else
8792 cat > conftest.$ac_ext <<EOF
b0b1c2c0 8793#line 8794 "configure"
7a292a7a
SS
8794#include "confdefs.h"
8795
8796#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8797lose
8798#endif
8799EOF
8800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8801 egrep "lose" >/dev/null 2>&1; then
8802 rm -rf conftest*
8803 gdb_cv_os_cygwin=yes
8804else
8805 rm -rf conftest*
8806 gdb_cv_os_cygwin=no
8807fi
8808rm -f conftest*
8809
8810fi
8811
8812echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8813
aff38e61
AC
8814
8815SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8816case ${host} in
95cbc983
AC
8817 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8818 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8819esac
8820
8821
cd0fc7c3
SS
8822# libreadline needs libuser32.a in a cygwin environment
8823WIN32LIBS=
8824if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8825 WIN32LIBS="-luser32"
8826 case "${target}" in
8827 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8828 ;;
8829 esac
cd0fc7c3 8830fi
c906108c 8831
7a292a7a 8832
3fc11d3e
JM
8833LIBGUI="../libgui/src/libgui.a"
8834GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8835
8836
7a292a7a 8837
3fc11d3e
JM
8838WIN32LDAPP=
8839
8840
8841
8842configdir="unix"
8843
8844GDBTKLIBS=
8845if test "${enable_gdbtk}" = "yes"; then
8846
d1c3b63a
KS
8847 # Gdbtk must have an absolute path to srcdir in order to run
8848 # properly when not installed.
8849 here=`pwd`
8850 cd ${srcdir}
8851 GDBTK_SRC_DIR=`pwd`
8852 cd $here
8853
3fc11d3e
JM
8854
8855#
8856# Ok, lets find the tcl configuration
8857# First, look for one uninstalled.
8858# the alternative search directory is invoked by --with-tclconfig
8859#
8860
8861if test x"${no_tcl}" = x ; then
8862 # we reset no_tcl in case something fails here
8863 no_tcl=true
8864 # Check whether --with-tclconfig or --without-tclconfig was given.
8865if test "${with_tclconfig+set}" = set; then
8866 withval="$with_tclconfig"
8867 with_tclconfig=${withval}
8868fi
8869
8870 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
b0b1c2c0 8871echo "configure:8872: checking for Tcl configuration" >&5
3fc11d3e
JM
8872 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8873 echo $ac_n "(cached) $ac_c" 1>&6
8874else
8875
8876
8877 # First check to see if --with-tclconfig was specified.
8878 if test x"${with_tclconfig}" != x ; then
8879 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8880 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8881 else
8882 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8883 fi
8884 fi
8885
8886 # then check for a private Tcl installation
8887 if test x"${ac_cv_c_tclconfig}" = x ; then
8888 for i in \
8889 ../tcl \
8890 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8891 ../../tcl \
8892 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8893 ../../../tcl \
8894 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8895 if test -f "$i/${configdir}/tclConfig.sh" ; then
8896 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8897 break
8898 fi
8899 done
8900 fi
8901 # check in a few common install locations
8902 if test x"${ac_cv_c_tclconfig}" = x ; then
8903 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8904 if test -f "$i/tclConfig.sh" ; then
8905 ac_cv_c_tclconfig=`(cd $i; pwd)`
8906 break
8907 fi
8908 done
8909 fi
8910 # check in a few other private locations
8911 if test x"${ac_cv_c_tclconfig}" = x ; then
8912 for i in \
8913 ${srcdir}/../tcl \
8914 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8915 if test -f "$i/${configdir}/tclConfig.sh" ; then
8916 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8917 break
8918 fi
8919 done
8920 fi
8921
8922fi
8923
8924 if test x"${ac_cv_c_tclconfig}" = x ; then
8925 TCLCONFIG="# no Tcl configs found"
8926 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8927 else
8928 no_tcl=
8929 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8930 echo "$ac_t""found $TCLCONFIG" 1>&6
8931 fi
8932fi
8933
8934 if test -z "${no_tcl}"; then
8935
8936 . $TCLCONFIG
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
033afc63 8957
3fc11d3e
JM
8958
8959
8960
8961
8962
8963
8964#
8965# Ok, lets find the tk configuration
8966# First, look for one uninstalled.
8967# the alternative search directory is invoked by --with-tkconfig
8968#
8969
8970if test x"${no_tk}" = x ; then
8971 # we reset no_tk in case something fails here
8972 no_tk=true
8973 # Check whether --with-tkconfig or --without-tkconfig was given.
8974if test "${with_tkconfig+set}" = set; then
8975 withval="$with_tkconfig"
8976 with_tkconfig=${withval}
8977fi
8978
8979 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
b0b1c2c0 8980echo "configure:8981: checking for Tk configuration" >&5
3fc11d3e
JM
8981 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8982 echo $ac_n "(cached) $ac_c" 1>&6
8983else
8984
8985
8986 # First check to see if --with-tkconfig was specified.
8987 if test x"${with_tkconfig}" != x ; then
8988 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8989 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8990 else
8991 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8992 fi
8993 fi
8994
8995 # then check for a private Tk library
8996 if test x"${ac_cv_c_tkconfig}" = x ; then
8997 for i in \
8998 ../tk \
8999 `ls -dr ../tk[4-9]* 2>/dev/null` \
9000 ../../tk \
9001 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9002 ../../../tk \
9003 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9004 if test -f "$i/${configdir}/tkConfig.sh" ; then
9005 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9006 break
9007 fi
9008 done
9009 fi
9010 # check in a few common install locations
9011 if test x"${ac_cv_c_tkconfig}" = x ; then
9012 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9013 if test -f "$i/tkConfig.sh" ; then
9014 ac_cv_c_tkconfig=`(cd $i; pwd)`
9015 break
9016 fi
9017 done
9018 fi
9019 # check in a few other private locations
9020 if test x"${ac_cv_c_tkconfig}" = x ; then
9021 for i in \
9022 ${srcdir}/../tk \
9023 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9024 if test -f "$i/${configdir}/tkConfig.sh" ; then
9025 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9026 break
9027 fi
9028 done
9029 fi
9030
9031fi
9032
9033 if test x"${ac_cv_c_tkconfig}" = x ; then
9034 TKCONFIG="# no Tk configs found"
9035 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9036 else
9037 no_tk=
9038 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9039 echo "$ac_t""found $TKCONFIG" 1>&6
9040 fi
9041fi
9042
9043
9044
dd2504ab
JM
9045 # now look for Tcl library stuff
9046
9047 case "${host}" in
9048 *-*-cygwin*)
9049 tcldir=../tcl/win/
9050 ;;
9051 *)
9052 tcldir=../tcl/unix/
9053 ;;
9054 esac
9055
9056 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9057
3fc11d3e
JM
9058 # If $no_tk is nonempty, then we can't do Tk, and there is no
9059 # point to doing Tcl.
9060 if test -z "${no_tk}"; then
9061
9062 if test -f "$TKCONFIG" ; then
9063 . $TKCONFIG
9064 fi
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079#
9080# Ok, lets find the tcl source trees so we can use the headers
9081# Warning: transition of version 9 to 10 will break this algorithm
9082# because 10 sorts before 9. We also look for just tcl. We have to
9083# be careful that we don't match stuff like tclX by accident.
9084# the alternative search directory is involked by --with-tclinclude
9085#
9086
9087no_tcl=true
9088echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
b0b1c2c0 9089echo "configure:9090: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9090# Check whether --with-tclinclude or --without-tclinclude was given.
9091if test "${with_tclinclude+set}" = set; then
9092 withval="$with_tclinclude"
9093 with_tclinclude=${withval}
9094fi
9095
9096if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9097 echo $ac_n "(cached) $ac_c" 1>&6
9098else
9099
9100# first check to see if --with-tclinclude was specified
9101if test x"${with_tclinclude}" != x ; then
9102 if test -f ${with_tclinclude}/tclInt.h ; then
9103 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9104 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9105 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9106 else
9107 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9108 fi
9109fi
9110
9111# next check if it came with Tcl configuration file
9112if test x"${ac_cv_c_tclconfig}" = x ; then
9113 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9114 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9115 fi
9116fi
9117
9118# next check in private source directory
9119#
9120# since ls returns lowest version numbers first, reverse its output
9121if test x"${ac_cv_c_tclh}" = x ; then
9122 for i in \
9123 ${srcdir}/../tcl \
9124 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9125 ${srcdir}/../../tcl \
9126 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9127 ${srcdir}/../../../tcl \
9128 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9129 if test -f $i/generic/tclInt.h ; then
9130 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9131 break
9132 fi
9133 done
9134fi
9135# finally check in a few common install locations
9136#
9137# since ls returns lowest version numbers first, reverse its output
9138if test x"${ac_cv_c_tclh}" = x ; then
9139 for i in \
9140 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9141 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9142 /usr/local/src/tcl \
9143 /usr/local/lib/tcl \
9144 ${prefix}/include ; 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# see if one is installed
9152if test x"${ac_cv_c_tclh}" = x ; then
9153 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9154echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
b0b1c2c0 9155echo "configure:9156: checking for tclInt.h" >&5
3fc11d3e
JM
9156if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9157 echo $ac_n "(cached) $ac_c" 1>&6
9158else
9159 cat > conftest.$ac_ext <<EOF
b0b1c2c0 9160#line 9161 "configure"
3fc11d3e
JM
9161#include "confdefs.h"
9162#include <tclInt.h>
9163EOF
9164ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 9165{ (eval echo configure:9166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9166ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9167if test -z "$ac_err"; then
9168 rm -rf conftest*
9169 eval "ac_cv_header_$ac_safe=yes"
9170else
9171 echo "$ac_err" >&5
9172 echo "configure: failed program was:" >&5
9173 cat conftest.$ac_ext >&5
9174 rm -rf conftest*
9175 eval "ac_cv_header_$ac_safe=no"
9176fi
9177rm -f conftest*
9178fi
9179if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9180 echo "$ac_t""yes" 1>&6
9181 ac_cv_c_tclh=installed
9182else
9183 echo "$ac_t""no" 1>&6
9184ac_cv_c_tclh=""
9185fi
9186
9187fi
9188
9189fi
9190
9191if test x"${ac_cv_c_tclh}" = x ; then
9192 TCLHDIR="# no Tcl private headers found"
9193 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9194fi
9195if test x"${ac_cv_c_tclh}" != x ; then
9196 no_tcl=""
9197 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9198 echo "$ac_t""is installed" 1>&6
9199 TCLHDIR=""
9200 else
9201 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9202 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9203 TCLHDIR="-I${ac_cv_c_tclh}"
9204 fi
9205fi
9206
9207
9208
9209
9210#
9211# Ok, lets find the tk source trees so we can use the headers
9212# If the directory (presumably symlink) named "tk" exists, use that one
9213# in preference to any others. Same logic is used when choosing library
9214# and again with Tcl. The search order is the best place to look first, then in
9215# decreasing significance. The loop breaks if the trigger file is found.
9216# Note the gross little conversion here of srcdir by cd'ing to the found
9217# directory. This converts the path from a relative to an absolute, so
9218# recursive cache variables for the path will work right. We check all
9219# the possible paths in one loop rather than many seperate loops to speed
9220# things up.
9221# the alternative search directory is involked by --with-tkinclude
9222#
9223no_tk=true
9224echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
b0b1c2c0 9225echo "configure:9226: checking for Tk private headers" >&5
3fc11d3e
JM
9226# Check whether --with-tkinclude or --without-tkinclude was given.
9227if test "${with_tkinclude+set}" = set; then
9228 withval="$with_tkinclude"
9229 with_tkinclude=${withval}
9230fi
9231
9232if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9233 echo $ac_n "(cached) $ac_c" 1>&6
9234else
9235
9236# first check to see if --with-tkinclude was specified
9237if test x"${with_tkinclude}" != x ; then
9238 if test -f ${with_tkinclude}/tk.h ; then
9239 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9240 elif test -f ${with_tkinclude}/generic/tk.h ; then
9241 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9242 else
9243 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9244 fi
9245fi
9246
9247# next check if it came with Tk configuration file
9248if test x"${ac_cv_c_tkconfig}" = x ; then
9249 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9250 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9251 fi
9252fi
9253
9254# next check in private source directory
9255#
9256# since ls returns lowest version numbers first, reverse its output
9257if test x"${ac_cv_c_tkh}" = x ; then
9258 for i in \
9259 ${srcdir}/../tk \
9260 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9261 ${srcdir}/../../tk \
9262 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9263 ${srcdir}/../../../tk \
9264 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9265 if test -f $i/generic/tk.h ; then
9266 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9267 break
9268 fi
9269 done
9270fi
9271# finally check in a few common install locations
9272#
9273# since ls returns lowest version numbers first, reverse its output
9274if test x"${ac_cv_c_tkh}" = x ; then
9275 for i in \
9276 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9277 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9278 /usr/local/src/tk \
9279 /usr/local/lib/tk \
9280 ${prefix}/include ; 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# see if one is installed
9288if test x"${ac_cv_c_tkh}" = x ; then
9289 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9290echo $ac_n "checking for tk.h""... $ac_c" 1>&6
b0b1c2c0 9291echo "configure:9292: checking for tk.h" >&5
3fc11d3e
JM
9292if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9293 echo $ac_n "(cached) $ac_c" 1>&6
9294else
9295 cat > conftest.$ac_ext <<EOF
b0b1c2c0 9296#line 9297 "configure"
3fc11d3e
JM
9297#include "confdefs.h"
9298#include <tk.h>
9299EOF
9300ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 9301{ (eval echo configure:9302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9302ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9303if test -z "$ac_err"; then
9304 rm -rf conftest*
9305 eval "ac_cv_header_$ac_safe=yes"
9306else
9307 echo "$ac_err" >&5
9308 echo "configure: failed program was:" >&5
9309 cat conftest.$ac_ext >&5
9310 rm -rf conftest*
9311 eval "ac_cv_header_$ac_safe=no"
9312fi
9313rm -f conftest*
9314fi
9315if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9316 echo "$ac_t""yes" 1>&6
9317 ac_cv_c_tkh=installed
9318else
9319 echo "$ac_t""no" 1>&6
9320ac_cv_c_tkh=""
9321fi
9322
9323fi
9324
9325fi
9326
9327if test x"${ac_cv_c_tkh}" != x ; then
9328 no_tk=""
9329 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9330 echo "$ac_t""is installed" 1>&6
9331 TKHDIR=""
9332 else
9333 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9334 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9335 TKHDIR="-I${ac_cv_c_tkh}"
9336 fi
9337else
9338 TKHDIR="# no Tk directory found"
9339 echo "configure: warning: Can't find Tk private headers" 1>&2
9340 no_tk=true
9341fi
9342
9343
9344
9345
9346echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
b0b1c2c0 9347echo "configure:9348: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9348if test x"${ac_cv_c_itclh}" = x ; then
9349 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9350 if test -f $i/generic/itcl.h ; then
9351 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9352 break
9353 fi
9354 done
9355fi
9356if test x"${ac_cv_c_itclh}" = x ; then
9357 ITCLHDIR="# no Itcl private headers found"
9358 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9359fi
9360if test x"${ac_cv_c_itclh}" != x ; then
9361 ITCLHDIR="-I${ac_cv_c_itclh}"
9362fi
9363# should always be here
9364# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9365
9366#AC_SUBST(ITCLLIB)
9367
9368
9369echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
b0b1c2c0 9370echo "configure:9371: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9371if test x"${ac_cv_c_itkh}" = x ; then
9372 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9373 if test -f $i/generic/itk.h ; then
9374 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9375 break
9376 fi
9377 done
9378fi
9379if test x"${ac_cv_c_itkh}" = x ; then
9380 ITKHDIR="# no Itk private headers found"
9381 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9382fi
9383if test x"${ac_cv_c_itkh}" != x ; then
9384 ITKHDIR="-I${ac_cv_c_itkh}"
9385fi
9386# should always be here
9387# ITKLIB="../itcl/itk/unix/libitk.a"
9388
9389#AC_SUBST(ITKLIB)
9390
3fc11d3e 9391
dd2504ab
JM
9392
9393 # now look for Tk library stuff
9394
9395 case "${host}" in
9396 *-*-cygwin*)
9397 tkdir=../tk/win/
9398 ;;
9399 *)
9400 tkdir=../tk/unix/
9401 ;;
9402 esac
9403
9404 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9405
3fc11d3e
JM
9406 # now look for Itcl library stuff
9407
9408
9409#
9410# Ok, lets find the itcl configuration
9411# First, look for one uninstalled.
9412# the alternative search directory is invoked by --with-itclconfig
9413#
9414
9415if test x"${no_itcl}" = x ; then
9416 # we reset no_itcl in case something fails here
9417 no_itcl=true
9418 # Check whether --with-itclconfig or --without-itclconfig was given.
9419if test "${with_itclconfig+set}" = set; then
9420 withval="$with_itclconfig"
9421 with_itclconfig=${withval}
9422fi
9423
9424 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
b0b1c2c0 9425echo "configure:9426: checking for Itcl configuration" >&5
3fc11d3e
JM
9426 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9427 echo $ac_n "(cached) $ac_c" 1>&6
9428else
9429
9430
9431 # First check to see if --with-itclconfig was specified.
9432 if test x"${with_itclconfig}" != x ; then
9433 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9434 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9435 else
9436 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9437 fi
9438 fi
9439
9440 # then check for a private Itcl library
9441 if test x"${ac_cv_c_itclconfig}" = x ; then
9442 for i in \
9443 ../itcl/itcl \
9444 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9445 ../../itcl \
9446 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9447 ../../../itcl \
9448 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9449 if test -f "$i/itclConfig.sh" ; then
9450 ac_cv_c_itclconfig=`(cd $i; pwd)`
9451 break
9452 fi
9453 done
9454 fi
9455 # check in a few common install locations
9456 if test x"${ac_cv_c_itclconfig}" = x ; then
9457 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9458 if test -f "$i/itclConfig.sh" ; then
9459 ac_cv_c_itclconfig=`(cd $i; pwd)`
9460 break
9461 fi
9462 done
9463 fi
9464 # check in a few other private locations
9465 if test x"${ac_cv_c_itclconfig}" = x ; then
9466 for i in \
9467 ${srcdir}/../itcl/itcl \
9468 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9469 if test -f "$i/itclConfig.sh" ; then
9470 ac_cv_c_itclconfig=`(cd $i; pwd)`
9471 break
9472 fi
9473 done
9474 fi
9475
9476fi
9477
9478 if test x"${ac_cv_c_itclconfig}" = x ; then
9479 ITCLCONFIG="# no Itcl configs found"
9480 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9481 else
9482 no_itcl=
9483 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9484 echo "$ac_t""found $ITCLCONFIG" 1>&6
9485 fi
9486fi
9487
9488 if test -z "${no_itcl}"; then
9489
9490 if test -f "$ITCLCONFIG" ; then
9491 . $ITCLCONFIG
9492 fi
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
3fc11d3e
JM
9503
9504
9505 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9506 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9507 fi
9508
9509
9510 # now look for Itk library stuff
9511
9512#
9513# Ok, lets find the itk configuration
9514# First, look for one uninstalled.
9515# the alternative search directory is invoked by --with-itkconfig
9516#
9517
9518if test x"${no_itk}" = x ; then
9519 # we reset no_itk in case something fails here
9520 no_itk=true
9521 # Check whether --with-itkconfig or --without-itkconfig was given.
9522if test "${with_itkconfig+set}" = set; then
9523 withval="$with_itkconfig"
9524 with_itkconfig=${withval}
9525fi
9526
9527 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
b0b1c2c0 9528echo "configure:9529: checking for Itk configuration" >&5
3fc11d3e
JM
9529 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9530 echo $ac_n "(cached) $ac_c" 1>&6
9531else
9532
9533
9534 # First check to see if --with-itkconfig was specified.
9535 if test x"${with_itkconfig}" != x ; then
9536 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9537 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9538 else
9539 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9540 fi
9541 fi
9542
9543 # then check for a private Itk library
9544 if test x"${ac_cv_c_itkconfig}" = x ; then
9545 for i in \
9546 ../itcl/itk \
9547 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9548 ../../itk \
9549 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9550 ../../../itk \
9551 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9552 if test -f "$i/itkConfig.sh" ; then
9553 ac_cv_c_itkconfig=`(cd $i; pwd)`
9554 break
9555 fi
9556 done
9557 fi
9558 # check in a few common install locations
9559 if test x"${ac_cv_c_itkconfig}" = x ; then
9560 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9561 if test -f "$i/itkConfig.sh" ; then
9562 ac_cv_c_itkconfig=`(cd $i; pwd)`
9563 break
9564 fi
9565 done
9566 fi
9567 # check in a few other private locations
9568 if test x"${ac_cv_c_itkconfig}" = x ; then
9569 for i in \
9570 ${srcdir}/../itcl/itk \
9571 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9572 if test -f "$i/itkConfig.sh" ; then
9573 ac_cv_c_itkconfig=`(cd $i; pwd)`
9574 break
9575 fi
9576 done
9577 fi
9578
9579fi
9580
9581 if test x"${ac_cv_c_itkconfig}" = x ; then
9582 ITKCONFIG="# no Itk configs found"
9583 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9584 else
9585 no_itk=
9586 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9587 echo "$ac_t""found $ITKCONFIG" 1>&6
9588 fi
9589fi
9590
9591
9592 if test -z "${no_itcl}"; then
9593
9594 if test -f "$ITKCONFIG" ; then
9595 . $ITKCONFIG
9596 fi
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
3fc11d3e 9609 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9610 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9611 fi
9612
4226a5a5 9613 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9614 # Tcl/Tk 8.1 require -fwritable strings. I don't
9615 # know whether 8.2 will or not, but I bet it will.
9616 # I don't have to worry about 7.x since we don't support it.
9617 GDBTK_CFLAGS=""
9618 if test "$GCC" = "yes"; then
9619 if test "$TCL_VERSION" != "8.0" ; then
9620 GDBTK_CFLAGS="-fwritable-strings"
9621 fi
9622 fi
9623
9624 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9625 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9626 # Yes, the ordering seems wrong here. But it isn't.
9627 # TK_LIBS is the list of libraries that need to be linked
9628 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9629 # were in LIBS then any link tests after this point would
9630 # try to include things like `$(LIBGUI)', which wouldn't work.
9631 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9632
9633 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9634 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9635 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9636 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9637 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9638 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9639 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9640 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9641
9642 if test x$gdb_cv_os_cygwin = xyes; then
9643 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9644 WIN32LDAPP="-Wl,--subsystem,console"
9645 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9646 fi
9647 fi
9648 fi
ffc6a242 9649
ffc6a242 9650 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9651fi
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
dd2504ab 9665
c906108c
SS
9666# If we find X, set shell vars x_includes and x_libraries to the
9667# paths, otherwise set no_x=yes.
9668# Uses ac_ vars as temps to allow command line to override cache and checks.
9669# --without-x overrides everything else, but does not touch the cache.
9670echo $ac_n "checking for X""... $ac_c" 1>&6
b0b1c2c0 9671echo "configure:9672: checking for X" >&5
c906108c
SS
9672
9673# Check whether --with-x or --without-x was given.
9674if test "${with_x+set}" = set; then
9675 withval="$with_x"
9676 :
9677fi
9678
9679# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9680if test "x$with_x" = xno; then
9681 # The user explicitly disabled X.
9682 have_x=disabled
9683else
9684 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9685 # Both variables are already set.
9686 have_x=yes
9687 else
9688if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9689 echo $ac_n "(cached) $ac_c" 1>&6
9690else
9691 # One or both of the vars are not set, and there is no cached value.
9692ac_x_includes=NO ac_x_libraries=NO
9693rm -fr conftestdir
9694if mkdir conftestdir; then
9695 cd conftestdir
9696 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9697 cat > Imakefile <<'EOF'
9698acfindx:
9699 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9700EOF
9701 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9702 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9703 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9704 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9705 for ac_extension in a so sl; do
9706 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9707 test -f $ac_im_libdir/libX11.$ac_extension; then
9708 ac_im_usrlibdir=$ac_im_libdir; break
9709 fi
9710 done
9711 # Screen out bogus values from the imake configuration. They are
9712 # bogus both because they are the default anyway, and because
9713 # using them would break gcc on systems where it needs fixed includes.
9714 case "$ac_im_incroot" in
9715 /usr/include) ;;
9716 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9717 esac
9718 case "$ac_im_usrlibdir" in
9719 /usr/lib | /lib) ;;
9720 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9721 esac
9722 fi
9723 cd ..
9724 rm -fr conftestdir
9725fi
9726
9727if test "$ac_x_includes" = NO; then
9728 # Guess where to find include files, by looking for this one X11 .h file.
9729 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9730
9731 # First, try using that file with no special directory specified.
9732cat > conftest.$ac_ext <<EOF
b0b1c2c0 9733#line 9734 "configure"
c906108c
SS
9734#include "confdefs.h"
9735#include <$x_direct_test_include>
9736EOF
9737ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
b0b1c2c0 9738{ (eval echo configure:9739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9739ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9740if test -z "$ac_err"; then
9741 rm -rf conftest*
9742 # We can compile using X headers with no special include directory.
9743ac_x_includes=
9744else
9745 echo "$ac_err" >&5
9746 echo "configure: failed program was:" >&5
9747 cat conftest.$ac_ext >&5
9748 rm -rf conftest*
9749 # Look for the header file in a standard set of common directories.
9750# Check X11 before X11Rn because it is often a symlink to the current release.
9751 for ac_dir in \
9752 /usr/X11/include \
9753 /usr/X11R6/include \
9754 /usr/X11R5/include \
9755 /usr/X11R4/include \
9756 \
9757 /usr/include/X11 \
9758 /usr/include/X11R6 \
9759 /usr/include/X11R5 \
9760 /usr/include/X11R4 \
9761 \
9762 /usr/local/X11/include \
9763 /usr/local/X11R6/include \
9764 /usr/local/X11R5/include \
9765 /usr/local/X11R4/include \
9766 \
9767 /usr/local/include/X11 \
9768 /usr/local/include/X11R6 \
9769 /usr/local/include/X11R5 \
9770 /usr/local/include/X11R4 \
9771 \
9772 /usr/X386/include \
9773 /usr/x386/include \
9774 /usr/XFree86/include/X11 \
9775 \
9776 /usr/include \
9777 /usr/local/include \
9778 /usr/unsupported/include \
9779 /usr/athena/include \
9780 /usr/local/x11r5/include \
9781 /usr/lpp/Xamples/include \
9782 \
9783 /usr/openwin/include \
9784 /usr/openwin/share/include \
9785 ; \
9786 do
9787 if test -r "$ac_dir/$x_direct_test_include"; then
9788 ac_x_includes=$ac_dir
9789 break
9790 fi
9791 done
9792fi
9793rm -f conftest*
9794fi # $ac_x_includes = NO
9795
9796if test "$ac_x_libraries" = NO; then
9797 # Check for the libraries.
9798
9799 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9800 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9801
9802 # See if we find them without any special options.
9803 # Don't add to $LIBS permanently.
9804 ac_save_LIBS="$LIBS"
9805 LIBS="-l$x_direct_test_library $LIBS"
9806cat > conftest.$ac_ext <<EOF
b0b1c2c0 9807#line 9808 "configure"
c906108c
SS
9808#include "confdefs.h"
9809
9810int main() {
9811${x_direct_test_function}()
9812; return 0; }
9813EOF
b0b1c2c0 9814if { (eval echo configure:9815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9815 rm -rf conftest*
9816 LIBS="$ac_save_LIBS"
9817# We can link X programs with no special library path.
9818ac_x_libraries=
9819else
9820 echo "configure: failed program was:" >&5
9821 cat conftest.$ac_ext >&5
9822 rm -rf conftest*
9823 LIBS="$ac_save_LIBS"
9824# First see if replacing the include by lib works.
9825# Check X11 before X11Rn because it is often a symlink to the current release.
9826for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9827 /usr/X11/lib \
9828 /usr/X11R6/lib \
9829 /usr/X11R5/lib \
9830 /usr/X11R4/lib \
9831 \
9832 /usr/lib/X11 \
9833 /usr/lib/X11R6 \
9834 /usr/lib/X11R5 \
9835 /usr/lib/X11R4 \
9836 \
9837 /usr/local/X11/lib \
9838 /usr/local/X11R6/lib \
9839 /usr/local/X11R5/lib \
9840 /usr/local/X11R4/lib \
9841 \
9842 /usr/local/lib/X11 \
9843 /usr/local/lib/X11R6 \
9844 /usr/local/lib/X11R5 \
9845 /usr/local/lib/X11R4 \
9846 \
9847 /usr/X386/lib \
9848 /usr/x386/lib \
9849 /usr/XFree86/lib/X11 \
9850 \
9851 /usr/lib \
9852 /usr/local/lib \
9853 /usr/unsupported/lib \
9854 /usr/athena/lib \
9855 /usr/local/x11r5/lib \
9856 /usr/lpp/Xamples/lib \
9857 /lib/usr/lib/X11 \
9858 \
9859 /usr/openwin/lib \
9860 /usr/openwin/share/lib \
9861 ; \
9862do
9863 for ac_extension in a so sl; do
9864 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9865 ac_x_libraries=$ac_dir
9866 break 2
9867 fi
9868 done
9869done
9870fi
9871rm -f conftest*
9872fi # $ac_x_libraries = NO
9873
9874if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9875 # Didn't find X anywhere. Cache the known absence of X.
9876 ac_cv_have_x="have_x=no"
9877else
9878 # Record where we found X for the cache.
9879 ac_cv_have_x="have_x=yes \
9880 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9881fi
9882fi
9883 fi
9884 eval "$ac_cv_have_x"
9885fi # $with_x != no
9886
9887if test "$have_x" != yes; then
9888 echo "$ac_t""$have_x" 1>&6
9889 no_x=yes
9890else
9891 # If each of the values was on the command line, it overrides each guess.
9892 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9893 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9894 # Update the cache value to reflect the command line values.
9895 ac_cv_have_x="have_x=yes \
9896 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9897 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9898fi
9899
9900
7a292a7a
SS
9901
9902# Unlike the sim directory, whether a simulator is linked is controlled by
9903# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9904# This code just checks for a few cases where we'd like to ignore those
9905# definitions, even when they're present in the '.mt' file. These cases
9906# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9907# not part of the source tree.
7a292a7a
SS
9908#
9909# Check whether --enable-sim or --disable-sim was given.
9910if test "${enable_sim+set}" = set; then
9911 enableval="$enable_sim"
9912 echo "enable_sim = $enable_sim";
9913 echo "enableval = ${enableval}";
9914 case "${enableval}" in
9915 yes) ignore_sim=false ;;
9916 no) ignore_sim=true ;;
9917 *) ignore_sim=false ;;
9918 esac
9919else
9920 ignore_sim=false
9921fi
9922
9923
9924if test ! -d "${srcdir}/../sim"; then
9925 ignore_sim=true
9926fi
9927
9928if test "${ignore_sim}" = "true"; then
9929 IGNORE_SIM="SIM="
9930 IGNORE_SIM_OBS="SIM_OBS="
9931else
9932 IGNORE_SIM=""
9933 IGNORE_SIM_OBS=""
9934 cat >> confdefs.h <<\EOF
9935#define WITH_SIM 1
9936EOF
9937
9938fi
9939
9940
9941
c906108c
SS
9942
9943
9944
9945
9946
9947
dfcd3bfb 9948
e56ac5c3
AC
9949
9950
b3a90332
AC
9951
9952
b46cd165 9953
d28f9cdf 9954
c906108c
SS
9955# target_subdir is used by the testsuite to find the target libraries.
9956target_subdir=
9957if test "${host}" != "${target}"; then
9958 target_subdir="${target_alias}/"
9959fi
9960
9961
9962frags=
9963host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9964if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9965 # When building a native debuger the .mh file containing things
9966 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9967 # since it no longer contains anything useful.
9968 if test "${target}" = "${host}"; then
9969 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9970 else
9971 host_makefile_frag=/dev/null
9972 fi
c906108c
SS
9973fi
9974frags="$frags $host_makefile_frag"
9975
9976target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9977if test ! -f ${target_makefile_frag}; then
9978{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9979fi
9980frags="$frags $target_makefile_frag"
9981
9982
9983
9984
9985
9986hostfile=`sed -n '
9987s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9988' ${host_makefile_frag}`
9989
9990targetfile=`sed -n '
9991s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9992' ${target_makefile_frag}`
9993
6166d547
AC
9994GDB_MULTI_ARCH=`sed -n '
9995s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9996' ${target_makefile_frag}`
9997
c906108c 9998if test "${target}" = "${host}"; then
a85f51e7
DJ
9999# We pick this up from the host configuration file (.mh) because we
10000# do not have a native configuration Makefile fragment.
c906108c
SS
10001nativefile=`sed -n '
10002s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10003' ${host_makefile_frag}`
c906108c
SS
10004fi
10005
10006
6166d547
AC
10007# New targets should just set gdb_multi_arch=yes in configure.tgt.
10008# Old targets being converted can either do that or set GDB_MULTI_ARCH
10009# in the target specific makefile frag. Eventually gdb_multi_arch=yes
10010# will be the default.
10011if test x"${GDB_MULTI_ARCH}" = x ; then
10012 case "${gdb_multi_arch}" in
10013 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
10014 no ) GDB_MULTI_ARCH=0 ;;
10015 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
10016 esac
10017fi
10018if test x"${GDB_MULTI_ARCH}" != x ; then
10019 cat >> confdefs.h <<EOF
10020#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
10021EOF
10022
10023fi
6c5cfe5b 10024# Warn the user when they use an old practice
6166d547
AC
10025case "${GDB_MULTI_ARCH}" in
10026 "" ) ;;
10027 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
10028 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
10029 GDB_MULTI_ARCH_PURE )
10030 if test x"${targetfile}" != x ; then
6c5cfe5b 10031 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 10032 targetfile=""
6166d547
AC
10033 fi ;;
10034 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
10035esac
10036
b00a8037
DJ
10037if test x"${gdb_osabi}" != x ; then
10038 cat >> confdefs.h <<EOF
10039#define GDB_OSABI_DEFAULT $gdb_osabi
10040EOF
10041
10042fi
10043
8dcde887
MK
10044# Enable multi-ice-gdb-server.
10045# Check whether --enable-multi-ice or --disable-multi-ice was given.
10046if test "${enable_multi_ice+set}" = set; then
10047 enableval="$enable_multi_ice"
10048 case $enableval in
10049 yes | no)
10050 ;;
10051 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10052 esac
96baa820
JM
10053fi
10054
8dcde887
MK
10055if test "x$enable_multi_ice" = xyes; then
10056 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10057fi
10058
8dcde887
MK
10059# We only build gdbserver automatically if host and target are the same.
10060if test "x$target" = "x$host"; then
10061 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
b0b1c2c0 10062echo "configure:10063: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10063 if test "x$build_gdbserver" = xyes; then
10064 configdirs="$configdirs gdbserver"
10065 echo "$ac_t""yes" 1>&6
10066 else
10067 echo "$ac_t""no" 1>&6
10068 fi
10069fi
10070
10071subdirs="doc testsuite $configdirs"
10072
96baa820 10073
c906108c 10074# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10075# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10076# version.
c906108c
SS
10077
10078files=
10079links=
5a2402b8 10080
c906108c 10081rm -f xm.h
5a2402b8 10082xm_h=""
c906108c 10083if test "${hostfile}" != ""; then
5a2402b8
AC
10084 xm_h=xm.h
10085 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10086 files="${files} ${GDB_XM_FILE}"
10087 links="${links} xm.h"
10088 cat >> confdefs.h <<EOF
10089#define GDB_XM_FILE ${GDB_XM_FILE}
10090EOF
10091
c906108c 10092fi
5a2402b8
AC
10093
10094
c906108c 10095rm -f tm.h
5a2402b8 10096tm_h=""
c906108c 10097if test "${targetfile}" != ""; then
5a2402b8
AC
10098 tm_h=tm.h
10099 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10100 files="${files} ${GDB_TM_FILE}"
10101 links="${links} tm.h"
10102 cat >> confdefs.h <<EOF
10103#define GDB_TM_FILE ${GDB_TM_FILE}
10104EOF
10105
c906108c 10106fi
5a2402b8
AC
10107
10108
c906108c 10109rm -f nm.h
5a2402b8 10110nm_h=""
c906108c 10111if test "${nativefile}" != ""; then
5a2402b8
AC
10112 nm_h=nm.h
10113 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10114 files="${files} ${GDB_NM_FILE}"
10115 links="${links} nm.h"
10116 cat >> confdefs.h <<EOF
10117#define GDB_NM_FILE ${GDB_NM_FILE}
10118EOF
10119
c906108c 10120fi
5a2402b8
AC
10121
10122
c906108c
SS
10123
10124
10125echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
b0b1c2c0 10126echo "configure:10127: checking for Cygwin environment" >&5
c906108c
SS
10127if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10128 echo $ac_n "(cached) $ac_c" 1>&6
10129else
10130 cat > conftest.$ac_ext <<EOF
b0b1c2c0 10131#line 10132 "configure"
c906108c
SS
10132#include "confdefs.h"
10133
10134int main() {
10135
10136#ifndef __CYGWIN__
10137#define __CYGWIN__ __CYGWIN32__
10138#endif
10139return __CYGWIN__;
10140; return 0; }
10141EOF
b0b1c2c0 10142if { (eval echo configure:10143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10143 rm -rf conftest*
10144 ac_cv_cygwin=yes
10145else
10146 echo "configure: failed program was:" >&5
10147 cat conftest.$ac_ext >&5
10148 rm -rf conftest*
10149 ac_cv_cygwin=no
10150fi
10151rm -f conftest*
10152rm -f conftest*
10153fi
10154
10155echo "$ac_t""$ac_cv_cygwin" 1>&6
10156CYGWIN=
10157test "$ac_cv_cygwin" = yes && CYGWIN=yes
10158echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
b0b1c2c0 10159echo "configure:10160: checking for mingw32 environment" >&5
c906108c
SS
10160if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10161 echo $ac_n "(cached) $ac_c" 1>&6
10162else
10163 cat > conftest.$ac_ext <<EOF
b0b1c2c0 10164#line 10165 "configure"
c906108c
SS
10165#include "confdefs.h"
10166
10167int main() {
10168return __MINGW32__;
10169; return 0; }
10170EOF
b0b1c2c0 10171if { (eval echo configure:10172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10172 rm -rf conftest*
10173 ac_cv_mingw32=yes
10174else
10175 echo "configure: failed program was:" >&5
10176 cat conftest.$ac_ext >&5
10177 rm -rf conftest*
10178 ac_cv_mingw32=no
10179fi
10180rm -f conftest*
10181rm -f conftest*
10182fi
10183
10184echo "$ac_t""$ac_cv_mingw32" 1>&6
10185MINGW32=
10186test "$ac_cv_mingw32" = yes && MINGW32=yes
10187
10188
10189echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
b0b1c2c0 10190echo "configure:10191: checking for executable suffix" >&5
c906108c
SS
10191if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10192 echo $ac_n "(cached) $ac_c" 1>&6
10193else
10194 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10195 ac_cv_exeext=.exe
10196else
10197 rm -f conftest*
10198 echo 'int main () { return 0; }' > conftest.$ac_ext
10199 ac_cv_exeext=
b0b1c2c0 10200 if { (eval echo configure:10201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10201 for file in conftest.*; do
10202 case $file in
b0b1c2c0 10203 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10204 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10205 esac
10206 done
10207 else
10208 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10209 fi
10210 rm -f conftest*
10211 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10212fi
10213fi
10214
10215EXEEXT=""
10216test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10217echo "$ac_t""${ac_cv_exeext}" 1>&6
10218ac_exeext=$EXEEXT
10219
10220
234b45d4
KB
10221
10222cat >> confdefs.h <<\EOF
10223#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10224EOF
10225
10226
10227
10228
10229 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10230if test "${with_libiconv_prefix+set}" = set; then
10231 withval="$with_libiconv_prefix"
10232
10233 for dir in `echo "$withval" | tr : ' '`; do
10234 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10235 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10236 done
10237
10238fi
10239
10240
10241 echo $ac_n "checking for iconv""... $ac_c" 1>&6
b0b1c2c0 10242echo "configure:10243: checking for iconv" >&5
234b45d4
KB
10243if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10244 echo $ac_n "(cached) $ac_c" 1>&6
10245else
10246
10247 am_cv_func_iconv="no, consider installing GNU libiconv"
10248 am_cv_lib_iconv=no
10249 cat > conftest.$ac_ext <<EOF
b0b1c2c0 10250#line 10251 "configure"
234b45d4
KB
10251#include "confdefs.h"
10252#include <stdlib.h>
10253#include <iconv.h>
10254int main() {
10255iconv_t cd = iconv_open("","");
10256 iconv(cd,NULL,NULL,NULL,NULL);
10257 iconv_close(cd);
10258; return 0; }
10259EOF
b0b1c2c0 10260if { (eval echo configure:10261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10261 rm -rf conftest*
10262 am_cv_func_iconv=yes
10263else
10264 echo "configure: failed program was:" >&5
10265 cat conftest.$ac_ext >&5
10266fi
10267rm -f conftest*
10268 if test "$am_cv_func_iconv" != yes; then
10269 am_save_LIBS="$LIBS"
10270 LIBS="$LIBS -liconv"
10271 cat > conftest.$ac_ext <<EOF
b0b1c2c0 10272#line 10273 "configure"
234b45d4
KB
10273#include "confdefs.h"
10274#include <stdlib.h>
10275#include <iconv.h>
10276int main() {
10277iconv_t cd = iconv_open("","");
10278 iconv(cd,NULL,NULL,NULL,NULL);
10279 iconv_close(cd);
10280; return 0; }
10281EOF
b0b1c2c0 10282if { (eval echo configure:10283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10283 rm -rf conftest*
10284 am_cv_lib_iconv=yes
10285 am_cv_func_iconv=yes
10286else
10287 echo "configure: failed program was:" >&5
10288 cat conftest.$ac_ext >&5
10289fi
10290rm -f conftest*
10291 LIBS="$am_save_LIBS"
10292 fi
10293
10294fi
10295
10296echo "$ac_t""$am_cv_func_iconv" 1>&6
10297 if test "$am_cv_func_iconv" = yes; then
10298 cat >> confdefs.h <<\EOF
10299#define HAVE_ICONV 1
10300EOF
10301
10302 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
b0b1c2c0 10303echo "configure:10304: checking for iconv declaration" >&5
234b45d4
KB
10304 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10305 echo $ac_n "(cached) $ac_c" 1>&6
10306else
10307
10308 cat > conftest.$ac_ext <<EOF
b0b1c2c0 10309#line 10310 "configure"
234b45d4
KB
10310#include "confdefs.h"
10311
10312#include <stdlib.h>
10313#include <iconv.h>
10314extern
10315#ifdef __cplusplus
10316"C"
10317#endif
10318#if defined(__STDC__) || defined(__cplusplus)
10319size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10320#else
10321size_t iconv();
10322#endif
10323
10324int main() {
10325
10326; return 0; }
10327EOF
b0b1c2c0 10328if { (eval echo configure:10329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10329 rm -rf conftest*
10330 am_cv_proto_iconv_arg1=""
10331else
10332 echo "configure: failed program was:" >&5
10333 cat conftest.$ac_ext >&5
10334 rm -rf conftest*
10335 am_cv_proto_iconv_arg1="const"
10336fi
10337rm -f conftest*
10338 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);"
10339fi
10340
10341 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10342 echo "$ac_t""${ac_t:-
10343 }$am_cv_proto_iconv" 1>&6
10344 cat >> confdefs.h <<EOF
10345#define ICONV_CONST $am_cv_proto_iconv_arg1
10346EOF
10347
10348 fi
10349 LIBICONV=
10350 if test "$am_cv_lib_iconv" = yes; then
10351 LIBICONV="-liconv"
10352 fi
10353
10354
10355
c906108c
SS
10356trap '' 1 2 15
10357cat > confcache <<\EOF
10358# This file is a shell script that caches the results of configure
10359# tests run on this system so they can be shared between configure
10360# scripts and configure runs. It is not useful on other systems.
10361# If it contains results you don't want to keep, you may remove or edit it.
10362#
10363# By default, configure uses ./config.cache as the cache file,
10364# creating it if it does not exist already. You can give configure
10365# the --cache-file=FILE option to use a different cache file; that is
10366# what configure does when it calls configure scripts in
10367# subdirectories, so they share the cache.
10368# Giving --cache-file=/dev/null disables caching, for debugging configure.
10369# config.status only pays attention to the cache file if you give it the
10370# --recheck option to rerun configure.
10371#
10372EOF
10373# The following way of writing the cache mishandles newlines in values,
10374# but we know of no workaround that is simple, portable, and efficient.
10375# So, don't put newlines in cache variables' values.
10376# Ultrix sh set writes to stderr and can't be redirected directly,
10377# and sets the high bit in the cache file unless we assign to the vars.
10378(set) 2>&1 |
10379 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10380 *ac_space=\ *)
10381 # `set' does not quote correctly, so add quotes (double-quote substitution
10382 # turns \\\\ into \\, and sed turns \\ into \).
10383 sed -n \
10384 -e "s/'/'\\\\''/g" \
10385 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10386 ;;
10387 *)
10388 # `set' quotes correctly as required by POSIX, so do not add quotes.
10389 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10390 ;;
10391 esac >> confcache
10392if cmp -s $cache_file confcache; then
10393 :
10394else
10395 if test -w $cache_file; then
10396 echo "updating cache $cache_file"
10397 cat confcache > $cache_file
10398 else
10399 echo "not updating unwritable cache $cache_file"
10400 fi
10401fi
10402rm -f confcache
10403
10404trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10405
10406test "x$prefix" = xNONE && prefix=$ac_default_prefix
10407# Let make expand exec_prefix.
10408test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10409
10410# Any assignment to VPATH causes Sun make to only execute
10411# the first set of double-colon rules, so remove it if not needed.
10412# If there is a colon in the path, we need to keep it.
10413if test "x$srcdir" = x.; then
10414 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10415fi
10416
10417trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10418
10419DEFS=-DHAVE_CONFIG_H
10420
10421# Without the "./", some shells look in PATH for config.status.
10422: ${CONFIG_STATUS=./config.status}
10423
10424echo creating $CONFIG_STATUS
10425rm -f $CONFIG_STATUS
10426cat > $CONFIG_STATUS <<EOF
10427#! /bin/sh
10428# Generated automatically by configure.
10429# Run this file to recreate the current configuration.
10430# This directory was configured as follows,
10431# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10432#
10433# $0 $ac_configure_args
10434#
10435# Compiler output produced by configure, useful for debugging
10436# configure, is in ./config.log if it exists.
10437
10438ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10439for ac_option
10440do
10441 case "\$ac_option" in
10442 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10443 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10444 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10445 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10446 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10447 exit 0 ;;
10448 -help | --help | --hel | --he | --h)
10449 echo "\$ac_cs_usage"; exit 0 ;;
10450 *) echo "\$ac_cs_usage"; exit 1 ;;
10451 esac
10452done
10453
10454ac_given_srcdir=$srcdir
10455ac_given_INSTALL="$INSTALL"
10456
ed952ac5 10457trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10458EOF
10459cat >> $CONFIG_STATUS <<EOF
10460
10461# Protect against being on the right side of a sed subst in config.status.
10462sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10463 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10464$ac_vpsub
10465$extrasub
10466s%@SHELL@%$SHELL%g
10467s%@CFLAGS@%$CFLAGS%g
10468s%@CPPFLAGS@%$CPPFLAGS%g
10469s%@CXXFLAGS@%$CXXFLAGS%g
10470s%@FFLAGS@%$FFLAGS%g
10471s%@DEFS@%$DEFS%g
10472s%@LDFLAGS@%$LDFLAGS%g
10473s%@LIBS@%$LIBS%g
10474s%@exec_prefix@%$exec_prefix%g
10475s%@prefix@%$prefix%g
10476s%@program_transform_name@%$program_transform_name%g
10477s%@bindir@%$bindir%g
10478s%@sbindir@%$sbindir%g
10479s%@libexecdir@%$libexecdir%g
10480s%@datadir@%$datadir%g
10481s%@sysconfdir@%$sysconfdir%g
10482s%@sharedstatedir@%$sharedstatedir%g
10483s%@localstatedir@%$localstatedir%g
10484s%@libdir@%$libdir%g
10485s%@includedir@%$includedir%g
10486s%@oldincludedir@%$oldincludedir%g
10487s%@infodir@%$infodir%g
10488s%@mandir@%$mandir%g
413ccac7
AC
10489s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10490s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10491s%@MAINT@%$MAINT%g
c906108c
SS
10492s%@CC@%$CC%g
10493s%@CPP@%$CPP%g
10494s%@host@%$host%g
10495s%@host_alias@%$host_alias%g
10496s%@host_cpu@%$host_cpu%g
10497s%@host_vendor@%$host_vendor%g
10498s%@host_os@%$host_os%g
10499s%@target@%$target%g
10500s%@target_alias@%$target_alias%g
10501s%@target_cpu@%$target_cpu%g
10502s%@target_vendor@%$target_vendor%g
10503s%@target_os@%$target_os%g
10504s%@build@%$build%g
10505s%@build_alias@%$build_alias%g
10506s%@build_cpu@%$build_cpu%g
10507s%@build_vendor@%$build_vendor%g
10508s%@build_os@%$build_os%g
c906108c 10509s%@RANLIB@%$RANLIB%g
8bb2c122 10510s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10511s%@ALLOCA@%$ALLOCA%g
10512s%@USE_NLS@%$USE_NLS%g
10513s%@MSGFMT@%$MSGFMT%g
10514s%@GMSGFMT@%$GMSGFMT%g
10515s%@XGETTEXT@%$XGETTEXT%g
10516s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10517s%@CATALOGS@%$CATALOGS%g
10518s%@CATOBJEXT@%$CATOBJEXT%g
10519s%@DATADIRNAME@%$DATADIRNAME%g
10520s%@GMOFILES@%$GMOFILES%g
10521s%@INSTOBJEXT@%$INSTOBJEXT%g
10522s%@INTLDEPS@%$INTLDEPS%g
10523s%@INTLLIBS@%$INTLLIBS%g
10524s%@INTLOBJS@%$INTLOBJS%g
10525s%@POFILES@%$POFILES%g
10526s%@POSUB@%$POSUB%g
10527s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10528s%@GT_NO@%$GT_NO%g
10529s%@GT_YES@%$GT_YES%g
10530s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10531s%@l@%$l%g
8dcde887 10532s%@subdirs@%$subdirs%g
7a292a7a 10533s%@AWK@%$AWK%g
c906108c
SS
10534s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10535s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10536s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10537s%@LN_S@%$LN_S%g
10538s%@YACC@%$YACC%g
c906108c 10539s%@AR@%$AR%g
95ca63c4
CF
10540s%@DLLTOOL@%$DLLTOOL%g
10541s%@WINDRES@%$WINDRES%g
75c6e08a 10542s%@MIG@%$MIG%g
c906108c 10543s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10544s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10545s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10546s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10547s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10548s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10549s%@MMALLOC@%$MMALLOC%g
aff38e61 10550s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10551s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10552s%@LIBGUI@%$LIBGUI%g
10553s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10554s%@WIN32LDAPP@%$WIN32LDAPP%g
10555s%@TCL_VERSION@%$TCL_VERSION%g
10556s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10557s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10558s%@TCL_CC@%$TCL_CC%g
10559s%@TCL_DEFS@%$TCL_DEFS%g
10560s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10561s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10562s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10563s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10564s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10565s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10566s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 10567s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
10568s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10569s%@TCL_RANLIB@%$TCL_RANLIB%g
10570s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10571s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10572s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10573s%@TK_VERSION@%$TK_VERSION%g
10574s%@TK_DEFS@%$TK_DEFS%g
10575s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10576s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10577s%@TK_XLIBSW@%$TK_XLIBSW%g
10578s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10579s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10580s%@TCLHDIR@%$TCLHDIR%g
10581s%@TKHDIR@%$TKHDIR%g
10582s%@ITCLHDIR@%$ITCLHDIR%g
10583s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10584s%@ITCL_VERSION@%$ITCL_VERSION%g
10585s%@ITCL_DEFS@%$ITCL_DEFS%g
10586s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10587s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10588s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10589s%@ITK_VERSION@%$ITK_VERSION%g
10590s%@ITK_DEFS@%$ITK_DEFS%g
10591s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10592s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10593s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10594s%@X_CFLAGS@%$X_CFLAGS%g
10595s%@X_LDFLAGS@%$X_LDFLAGS%g
10596s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10597s%@TCL_DEPS@%$TCL_DEPS%g
10598s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10599s%@ITCLLIB@%$ITCLLIB%g
10600s%@ITCL_DEPS@%$ITCL_DEPS%g
10601s%@ITKLIB@%$ITKLIB%g
10602s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10603s%@GDBTKLIBS@%$GDBTKLIBS%g
10604s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10605s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10606s%@IGNORE_SIM@%$IGNORE_SIM%g
10607s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 10608s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 10609s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 10610s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10611s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10612s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10613s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10614s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10615s%@CONFIG_ALL@%$CONFIG_ALL%g
10616s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10617s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10618s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10619s%@target_subdir@%$target_subdir%g
10620/@host_makefile_frag@/r $host_makefile_frag
10621s%@host_makefile_frag@%%g
10622/@target_makefile_frag@/r $target_makefile_frag
10623s%@target_makefile_frag@%%g
10624s%@frags@%$frags%g
5a2402b8
AC
10625s%@xm_h@%$xm_h%g
10626s%@tm_h@%$tm_h%g
10627s%@nm_h@%$nm_h%g
c906108c 10628s%@EXEEXT@%$EXEEXT%g
234b45d4 10629s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10630
10631CEOF
10632EOF
10633
10634cat >> $CONFIG_STATUS <<\EOF
10635
10636# Split the substitutions into bite-sized pieces for seds with
10637# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10638ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10639ac_file=1 # Number of current file.
10640ac_beg=1 # First line for current file.
10641ac_end=$ac_max_sed_cmds # Line after last line for current file.
10642ac_more_lines=:
10643ac_sed_cmds=""
10644while $ac_more_lines; do
10645 if test $ac_beg -gt 1; then
10646 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10647 else
10648 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10649 fi
10650 if test ! -s conftest.s$ac_file; then
10651 ac_more_lines=false
10652 rm -f conftest.s$ac_file
10653 else
10654 if test -z "$ac_sed_cmds"; then
10655 ac_sed_cmds="sed -f conftest.s$ac_file"
10656 else
10657 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10658 fi
10659 ac_file=`expr $ac_file + 1`
10660 ac_beg=$ac_end
10661 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10662 fi
10663done
10664if test -z "$ac_sed_cmds"; then
10665 ac_sed_cmds=cat
10666fi
10667EOF
10668
10669cat >> $CONFIG_STATUS <<EOF
10670
ed952ac5 10671CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10672EOF
10673cat >> $CONFIG_STATUS <<\EOF
10674for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10675 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10676 case "$ac_file" in
10677 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10678 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10679 *) ac_file_in="${ac_file}.in" ;;
10680 esac
10681
10682 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10683
10684 # Remove last slash and all that follows it. Not all systems have dirname.
10685 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10686 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10687 # The file is in a subdirectory.
10688 test ! -d "$ac_dir" && mkdir "$ac_dir"
10689 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10690 # A "../" for each directory in $ac_dir_suffix.
10691 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10692 else
10693 ac_dir_suffix= ac_dots=
10694 fi
10695
10696 case "$ac_given_srcdir" in
10697 .) srcdir=.
10698 if test -z "$ac_dots"; then top_srcdir=.
10699 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10700 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10701 *) # Relative path.
10702 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10703 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10704 esac
10705
10706 case "$ac_given_INSTALL" in
10707 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10708 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10709 esac
10710
10711 echo creating "$ac_file"
10712 rm -f "$ac_file"
10713 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10714 case "$ac_file" in
10715 *Makefile*) ac_comsub="1i\\
10716# $configure_input" ;;
10717 *) ac_comsub= ;;
10718 esac
10719
10720 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10721 sed -e "$ac_comsub
10722s%@configure_input@%$configure_input%g
10723s%@srcdir@%$srcdir%g
10724s%@top_srcdir@%$top_srcdir%g
10725s%@INSTALL@%$INSTALL%g
10726" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10727fi; done
10728rm -f conftest.s*
10729
10730# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10731# NAME is the cpp macro being defined and VALUE is the value it is being given.
10732#
10733# ac_d sets the value in "#define NAME VALUE" lines.
10734ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10735ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10736ac_dC='\3'
10737ac_dD='%g'
10738# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10739ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10740ac_uB='\([ ]\)%\1#\2define\3'
10741ac_uC=' '
10742ac_uD='\4%g'
10743# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10744ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10745ac_eB='$%\1#\2define\3'
10746ac_eC=' '
10747ac_eD='%g'
10748
10749if test "${CONFIG_HEADERS+set}" != set; then
10750EOF
10751cat >> $CONFIG_STATUS <<EOF
10752 CONFIG_HEADERS="config.h:config.in"
10753EOF
10754cat >> $CONFIG_STATUS <<\EOF
10755fi
10756for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10757 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10758 case "$ac_file" in
10759 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10760 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10761 *) ac_file_in="${ac_file}.in" ;;
10762 esac
10763
10764 echo creating $ac_file
10765
10766 rm -f conftest.frag conftest.in conftest.out
10767 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10768 cat $ac_file_inputs > conftest.in
10769
10770EOF
10771
10772# Transform confdefs.h into a sed script conftest.vals that substitutes
10773# the proper values into config.h.in to produce config.h. And first:
10774# Protect against being on the right side of a sed subst in config.status.
10775# Protect against being in an unquoted here document in config.status.
10776rm -f conftest.vals
10777cat > conftest.hdr <<\EOF
10778s/[\\&%]/\\&/g
10779s%[\\$`]%\\&%g
10780s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10781s%ac_d%ac_u%gp
10782s%ac_u%ac_e%gp
10783EOF
10784sed -n -f conftest.hdr confdefs.h > conftest.vals
10785rm -f conftest.hdr
10786
10787# This sed command replaces #undef with comments. This is necessary, for
10788# example, in the case of _POSIX_SOURCE, which is predefined and required
10789# on some systems where configure will not decide to define it.
10790cat >> conftest.vals <<\EOF
10791s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10792EOF
10793
10794# Break up conftest.vals because some shells have a limit on
10795# the size of here documents, and old seds have small limits too.
10796
10797rm -f conftest.tail
10798while :
10799do
10800 ac_lines=`grep -c . conftest.vals`
10801 # grep -c gives empty output for an empty file on some AIX systems.
10802 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10803 # Write a limited-size here document to conftest.frag.
10804 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10805 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10806 echo 'CEOF
10807 sed -f conftest.frag conftest.in > conftest.out
10808 rm -f conftest.in
10809 mv conftest.out conftest.in
10810' >> $CONFIG_STATUS
10811 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10812 rm -f conftest.vals
10813 mv conftest.tail conftest.vals
10814done
10815rm -f conftest.vals
10816
10817cat >> $CONFIG_STATUS <<\EOF
10818 rm -f conftest.frag conftest.h
10819 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10820 cat conftest.in >> conftest.h
10821 rm -f conftest.in
10822 if cmp -s $ac_file conftest.h 2>/dev/null; then
10823 echo "$ac_file is unchanged"
10824 rm -f conftest.h
10825 else
10826 # Remove last slash and all that follows it. Not all systems have dirname.
10827 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10828 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10829 # The file is in a subdirectory.
10830 test ! -d "$ac_dir" && mkdir "$ac_dir"
10831 fi
10832 rm -f $ac_file
10833 mv conftest.h $ac_file
10834 fi
10835fi; done
10836
10837EOF
10838
10839cat >> $CONFIG_STATUS <<EOF
10840ac_sources="$files"
10841ac_dests="$links"
10842EOF
10843
10844cat >> $CONFIG_STATUS <<\EOF
10845srcdir=$ac_given_srcdir
10846while test -n "$ac_sources"; do
10847 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10848 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10849
10850 echo "linking $srcdir/$ac_source to $ac_dest"
10851
10852 if test ! -r $srcdir/$ac_source; then
10853 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10854 fi
10855 rm -f $ac_dest
10856
10857 # Make relative symlinks.
10858 # Remove last slash and all that follows it. Not all systems have dirname.
10859 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10860 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10861 # The dest file is in a subdirectory.
10862 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10863 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10864 # A "../" for each directory in $ac_dest_dir_suffix.
10865 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10866 else
10867 ac_dest_dir_suffix= ac_dots=
10868 fi
10869
10870 case "$srcdir" in
10871 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10872 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10873 esac
10874
10875 # Make a symlink if possible; otherwise try a hard link.
10876 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10877 ln $srcdir/$ac_source $ac_dest; then :
10878 else
10879 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10880 fi
10881done
10882EOF
10883cat >> $CONFIG_STATUS <<EOF
10884
10885gdb_host_cpu=$gdb_host_cpu
10886gdb_target_cpu=$gdb_target_cpu
10887nativefile=$nativefile
10888
10889EOF
10890cat >> $CONFIG_STATUS <<\EOF
10891
7ee6d7eb 10892if test "${nativefile}" = ""; then
c4620205 10893 < Makefile \
e27da16d
JT
10894 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10895 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10896 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10897 > Makefile.tem
c906108c
SS
10898mv -f Makefile.tem Makefile
10899fi
10900
10901sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10902/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10903/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10904mv -f Makefile.tmp Makefile
10905
2acceee2 10906
c906108c
SS
10907case x$CONFIG_HEADERS in
10908xconfig.h:config.in)
10909echo > stamp-h ;;
10910esac
10911
10912exit 0
10913EOF
10914chmod +x $CONFIG_STATUS
10915rm -fr confdefs* $ac_clean_files
10916test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10917
10918if test "$no_recursion" != yes; then
10919
10920 # Remove --cache-file and --srcdir arguments so they do not pile up.
10921 ac_sub_configure_args=
10922 ac_prev=
10923 for ac_arg in $ac_configure_args; do
10924 if test -n "$ac_prev"; then
10925 ac_prev=
10926 continue
10927 fi
10928 case "$ac_arg" in
10929 -cache-file | --cache-file | --cache-fil | --cache-fi \
10930 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10931 ac_prev=cache_file ;;
10932 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10933 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10934 ;;
10935 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10936 ac_prev=srcdir ;;
10937 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10938 ;;
10939 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10940 esac
10941 done
10942
8dcde887 10943 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10944
10945 # Do not complain, so a configure script can configure whichever
10946 # parts of a large source tree are present.
10947 if test ! -d $srcdir/$ac_config_dir; then
10948 continue
10949 fi
10950
10951 echo configuring in $ac_config_dir
10952
10953 case "$srcdir" in
10954 .) ;;
10955 *)
10956 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10957 else
10958 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10959 fi
10960 ;;
10961 esac
10962
10963 ac_popdir=`pwd`
10964 cd $ac_config_dir
10965
10966 # A "../" for each directory in /$ac_config_dir.
10967 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10968
10969 case "$srcdir" in
10970 .) # No --srcdir option. We are building in place.
10971 ac_sub_srcdir=$srcdir ;;
10972 /*) # Absolute path.
10973 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10974 *) # Relative path.
10975 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10976 esac
10977
10978 # Check for guested configure; otherwise get Cygnus style configure.
10979 if test -f $ac_sub_srcdir/configure; then
10980 ac_sub_configure=$ac_sub_srcdir/configure
10981 elif test -f $ac_sub_srcdir/configure.in; then
10982 ac_sub_configure=$ac_configure
10983 else
10984 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10985 ac_sub_configure=
10986 fi
10987
10988 # The recursion is here.
10989 if test -n "$ac_sub_configure"; then
10990
10991 # Make the cache file name correct relative to the subdirectory.
10992 case "$cache_file" in
10993 /*) ac_sub_cache_file=$cache_file ;;
10994 *) # Relative path.
10995 ac_sub_cache_file="$ac_dots$cache_file" ;;
10996 esac
10997 case "$ac_given_INSTALL" in
10998 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10999 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11000 esac
11001
11002 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11003 # The eval makes quoting arguments work.
11004 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11005 then :
11006 else
11007 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11008 fi
11009 fi
11010
11011 cd $ac_popdir
11012 done
11013fi
11014
11015
11016exit 0
This page took 0.855549 seconds and 4 git commands to generate.