2003-02-26 Michael Chastain <mec@shout.net>
[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=
82srcdir=
83target=NONE
84verbose=
85x_includes=NONE
86x_libraries=NONE
87bindir='${exec_prefix}/bin'
88sbindir='${exec_prefix}/sbin'
89libexecdir='${exec_prefix}/libexec'
90datadir='${prefix}/share'
91sysconfdir='${prefix}/etc'
92sharedstatedir='${prefix}/com'
93localstatedir='${prefix}/var'
94libdir='${exec_prefix}/lib'
95includedir='${prefix}/include'
96oldincludedir='/usr/include'
97infodir='${prefix}/info'
98mandir='${prefix}/man'
99
100# Initialize some other variables.
101subdirs=
102MFLAGS= MAKEFLAGS=
103SHELL=${CONFIG_SHELL-/bin/sh}
104# Maximum number of lines to put in a shell here document.
105ac_max_here_lines=12
106
107ac_prev=
108for ac_option
109do
110
111 # If the previous option needs an argument, assign it.
112 if test -n "$ac_prev"; then
113 eval "$ac_prev=\$ac_option"
114 ac_prev=
115 continue
116 fi
117
118 case "$ac_option" in
119 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
120 *) ac_optarg= ;;
121 esac
122
123 # Accept the important Cygnus configure options, so we can diagnose typos.
124
125 case "$ac_option" in
126
127 -bindir | --bindir | --bindi | --bind | --bin | --bi)
128 ac_prev=bindir ;;
129 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
130 bindir="$ac_optarg" ;;
131
132 -build | --build | --buil | --bui | --bu)
133 ac_prev=build ;;
134 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
135 build="$ac_optarg" ;;
136
137 -cache-file | --cache-file | --cache-fil | --cache-fi \
138 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
139 ac_prev=cache_file ;;
140 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
141 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
142 cache_file="$ac_optarg" ;;
143
144 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
145 ac_prev=datadir ;;
146 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
147 | --da=*)
148 datadir="$ac_optarg" ;;
149
150 -disable-* | --disable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
152 # Reject names that are not valid shell variable names.
153 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 eval "enable_${ac_feature}=no" ;;
158
159 -enable-* | --enable-*)
160 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
161 # Reject names that are not valid shell variable names.
162 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
163 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
164 fi
165 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
166 case "$ac_option" in
167 *=*) ;;
168 *) ac_optarg=yes ;;
169 esac
170 eval "enable_${ac_feature}='$ac_optarg'" ;;
171
172 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
173 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
174 | --exec | --exe | --ex)
175 ac_prev=exec_prefix ;;
176 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
177 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
178 | --exec=* | --exe=* | --ex=*)
179 exec_prefix="$ac_optarg" ;;
180
181 -gas | --gas | --ga | --g)
182 # Obsolete; use --with-gas.
183 with_gas=yes ;;
184
185 -help | --help | --hel | --he)
186 # Omit some internal or obsolete options to make the list less imposing.
187 # This message is too long to be a string in the A/UX 3.1 sh.
188 cat << EOF
189Usage: configure [options] [host]
190Options: [defaults in brackets after descriptions]
191Configuration:
192 --cache-file=FILE cache test results in FILE
193 --help print this message
194 --no-create do not create output files
195 --quiet, --silent do not print \`checking...' messages
196 --version print the version of autoconf that created configure
197Directory and file names:
198 --prefix=PREFIX install architecture-independent files in PREFIX
199 [$ac_default_prefix]
200 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
201 [same as prefix]
202 --bindir=DIR user executables in DIR [EPREFIX/bin]
203 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
204 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
205 --datadir=DIR read-only architecture-independent data in DIR
206 [PREFIX/share]
207 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
208 --sharedstatedir=DIR modifiable architecture-independent data in DIR
209 [PREFIX/com]
210 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
211 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
212 --includedir=DIR C header files in DIR [PREFIX/include]
213 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
214 --infodir=DIR info documentation in DIR [PREFIX/info]
215 --mandir=DIR man documentation in DIR [PREFIX/man]
216 --srcdir=DIR find the sources in DIR [configure dir or ..]
217 --program-prefix=PREFIX prepend PREFIX to installed program names
218 --program-suffix=SUFFIX append SUFFIX to installed program names
219 --program-transform-name=PROGRAM
220 run sed PROGRAM on installed program names
221EOF
222 cat << EOF
223Host type:
224 --build=BUILD configure for building on BUILD [BUILD=HOST]
225 --host=HOST configure for HOST [guessed]
226 --target=TARGET configure for TARGET [TARGET=HOST]
227Features and packages:
228 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
229 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
230 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
231 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
232 --x-includes=DIR X include files are in DIR
233 --x-libraries=DIR X library files are in DIR
234EOF
235 if test -n "$ac_help"; then
236 echo "--enable and --with options recognized:$ac_help"
237 fi
238 exit 0 ;;
239
240 -host | --host | --hos | --ho)
241 ac_prev=host ;;
242 -host=* | --host=* | --hos=* | --ho=*)
243 host="$ac_optarg" ;;
244
245 -includedir | --includedir | --includedi | --included | --include \
246 | --includ | --inclu | --incl | --inc)
247 ac_prev=includedir ;;
248 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249 | --includ=* | --inclu=* | --incl=* | --inc=*)
250 includedir="$ac_optarg" ;;
251
252 -infodir | --infodir | --infodi | --infod | --info | --inf)
253 ac_prev=infodir ;;
254 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255 infodir="$ac_optarg" ;;
256
257 -libdir | --libdir | --libdi | --libd)
258 ac_prev=libdir ;;
259 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 libdir="$ac_optarg" ;;
261
262 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263 | --libexe | --libex | --libe)
264 ac_prev=libexecdir ;;
265 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266 | --libexe=* | --libex=* | --libe=*)
267 libexecdir="$ac_optarg" ;;
268
269 -localstatedir | --localstatedir | --localstatedi | --localstated \
270 | --localstate | --localstat | --localsta | --localst \
271 | --locals | --local | --loca | --loc | --lo)
272 ac_prev=localstatedir ;;
273 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276 localstatedir="$ac_optarg" ;;
277
278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279 ac_prev=mandir ;;
280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281 mandir="$ac_optarg" ;;
282
283 -nfp | --nfp | --nf)
284 # Obsolete; use --without-fp.
285 with_fp=no ;;
286
287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288 | --no-cr | --no-c)
289 no_create=yes ;;
290
291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 no_recursion=yes ;;
294
295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297 | --oldin | --oldi | --old | --ol | --o)
298 ac_prev=oldincludedir ;;
299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302 oldincludedir="$ac_optarg" ;;
303
304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305 ac_prev=prefix ;;
306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 prefix="$ac_optarg" ;;
308
309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
310 | --program-pre | --program-pr | --program-p)
311 ac_prev=program_prefix ;;
312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314 program_prefix="$ac_optarg" ;;
315
316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
317 | --program-suf | --program-su | --program-s)
318 ac_prev=program_suffix ;;
319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321 program_suffix="$ac_optarg" ;;
322
323 -program-transform-name | --program-transform-name \
324 | --program-transform-nam | --program-transform-na \
325 | --program-transform-n | --program-transform- \
326 | --program-transform | --program-transfor \
327 | --program-transfo | --program-transf \
328 | --program-trans | --program-tran \
329 | --progr-tra | --program-tr | --program-t)
330 ac_prev=program_transform_name ;;
331 -program-transform-name=* | --program-transform-name=* \
332 | --program-transform-nam=* | --program-transform-na=* \
333 | --program-transform-n=* | --program-transform-=* \
334 | --program-transform=* | --program-transfor=* \
335 | --program-transfo=* | --program-transf=* \
336 | --program-trans=* | --program-tran=* \
337 | --progr-tra=* | --program-tr=* | --program-t=*)
338 program_transform_name="$ac_optarg" ;;
339
340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341 | -silent | --silent | --silen | --sile | --sil)
342 silent=yes ;;
343
344 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345 ac_prev=sbindir ;;
346 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347 | --sbi=* | --sb=*)
348 sbindir="$ac_optarg" ;;
349
350 -sharedstatedir | --sharedstatedir | --sharedstatedi \
351 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352 | --sharedst | --shareds | --shared | --share | --shar \
353 | --sha | --sh)
354 ac_prev=sharedstatedir ;;
355 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358 | --sha=* | --sh=*)
359 sharedstatedir="$ac_optarg" ;;
360
361 -site | --site | --sit)
362 ac_prev=site ;;
363 -site=* | --site=* | --sit=*)
364 site="$ac_optarg" ;;
365
366 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
367 ac_prev=srcdir ;;
368 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369 srcdir="$ac_optarg" ;;
370
371 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
372 | --syscon | --sysco | --sysc | --sys | --sy)
373 ac_prev=sysconfdir ;;
374 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
375 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
376 sysconfdir="$ac_optarg" ;;
377
378 -target | --target | --targe | --targ | --tar | --ta | --t)
379 ac_prev=target ;;
380 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
381 target="$ac_optarg" ;;
382
383 -v | -verbose | --verbose | --verbos | --verbo | --verb)
384 verbose=yes ;;
385
386 -version | --version | --versio | --versi | --vers)
387 echo "configure generated by autoconf version 2.13"
388 exit 0 ;;
389
390 -with-* | --with-*)
391 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
392 # Reject names that are not valid shell variable names.
393 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 case "$ac_option" in
398 *=*) ;;
399 *) ac_optarg=yes ;;
400 esac
401 eval "with_${ac_package}='$ac_optarg'" ;;
402
403 -without-* | --without-*)
404 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
405 # Reject names that are not valid shell variable names.
406 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
407 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408 fi
409 ac_package=`echo $ac_package| sed 's/-/_/g'`
410 eval "with_${ac_package}=no" ;;
411
412 --x)
413 # Obsolete; use --with-x.
414 with_x=yes ;;
415
416 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
417 | --x-incl | --x-inc | --x-in | --x-i)
418 ac_prev=x_includes ;;
419 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
420 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
421 x_includes="$ac_optarg" ;;
422
423 -x-libraries | --x-libraries | --x-librarie | --x-librari \
424 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
425 ac_prev=x_libraries ;;
426 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
427 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
428 x_libraries="$ac_optarg" ;;
429
430 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
431 ;;
432
433 *)
434 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
435 echo "configure: warning: $ac_option: invalid host type" 1>&2
436 fi
437 if test "x$nonopt" != xNONE; then
438 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
439 fi
440 nonopt="$ac_option"
441 ;;
442
443 esac
444done
445
446if test -n "$ac_prev"; then
447 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
448fi
449
450trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
451
452# File descriptor usage:
453# 0 standard input
454# 1 file creation
455# 2 errors and warnings
456# 3 some systems may open it to /dev/tty
457# 4 used on the Kubota Titan
458# 6 checking for... messages and results
459# 5 compiler messages saved in config.log
460if test "$silent" = yes; then
461 exec 6>/dev/null
462else
463 exec 6>&1
464fi
465exec 5>./config.log
466
467echo "\
468This file contains any messages produced by compilers while
469running configure, to aid debugging if configure makes a mistake.
470" 1>&5
471
472# Strip out --no-create and --no-recursion so they do not pile up.
473# Also quote any args containing shell metacharacters.
474ac_configure_args=
475for ac_arg
476do
477 case "$ac_arg" in
478 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
479 | --no-cr | --no-c) ;;
480 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
481 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
482 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
483 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
484 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
485 esac
486done
487
488# NLS nuisances.
489# Only set these to C if already set. These must not be set unconditionally
490# because not all systems understand e.g. LANG=C (notably SCO).
491# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
492# Non-C LC_CTYPE values break the ctype check.
493if test "${LANG+set}" = set; then LANG=C; export LANG; fi
494if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
495if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
496if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
497
498# confdefs.h avoids OS command line length limits that DEFS can exceed.
499rm -rf conftest* confdefs.h
500# AIX cpp loses on an empty file, so make sure it contains at least a newline.
501echo > confdefs.h
502
503# A filename unique to this package, relative to the directory that
504# configure is in, which we can look for to find out if srcdir is correct.
505ac_unique_file=main.c
506
507# Find the source files, if location was not specified.
508if test -z "$srcdir"; then
509 ac_srcdir_defaulted=yes
510 # Try the directory containing this script, then its parent.
511 ac_prog=$0
512 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
513 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
514 srcdir=$ac_confdir
515 if test ! -r $srcdir/$ac_unique_file; then
516 srcdir=..
517 fi
518else
519 ac_srcdir_defaulted=no
520fi
521if test ! -r $srcdir/$ac_unique_file; then
522 if test "$ac_srcdir_defaulted" = yes; then
523 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
524 else
525 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
526 fi
527fi
528srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
529
530# Prefer explicitly selected file to automatically selected ones.
715d1656
AO
531if test -z "$CONFIG_SITE"; then
532 if test "x$prefix" != xNONE; then
533 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
534 else
535 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
c906108c
SS
536 fi
537fi
538for ac_site_file in $CONFIG_SITE; do
539 if test -r "$ac_site_file"; then
540 echo "loading site script $ac_site_file"
541 . "$ac_site_file"
542 fi
543done
544
545if test -r "$cache_file"; then
546 echo "loading cache $cache_file"
547 . $cache_file
548else
549 echo "creating cache $cache_file"
550 > $cache_file
551fi
552
553ac_ext=c
554# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
555ac_cpp='$CPP $CPPFLAGS'
556ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
557ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
558cross_compiling=$ac_cv_prog_cc_cross
559
560ac_exeext=
561ac_objext=o
562if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
563 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
564 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
565 ac_n= ac_c='
566' ac_t=' '
567 else
568 ac_n=-n ac_c= ac_t=
569 fi
570else
571 ac_n= ac_c='\c' ac_t=
572fi
573
574
575
413ccac7 576echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
715d1656 577echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
578 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
579if test "${enable_maintainer_mode+set}" = set; then
580 enableval="$enable_maintainer_mode"
581 USE_MAINTAINER_MODE=$enableval
582else
583 USE_MAINTAINER_MODE=no
584fi
585
586 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
587
588
589if test $USE_MAINTAINER_MODE = yes; then
590 MAINTAINER_MODE_TRUE=
591 MAINTAINER_MODE_FALSE='#'
592else
593 MAINTAINER_MODE_TRUE='#'
594 MAINTAINER_MODE_FALSE=
595fi
596 MAINT=$MAINTAINER_MODE_TRUE
597
598
c906108c
SS
599
600# Extract the first word of "gcc", so it can be a program name with args.
601set dummy gcc; ac_word=$2
602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 603echo "configure:604: checking for $ac_word" >&5
c906108c
SS
604if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605 echo $ac_n "(cached) $ac_c" 1>&6
606else
607 if test -n "$CC"; then
608 ac_cv_prog_CC="$CC" # Let the user override the test.
609else
610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
611 ac_dummy="$PATH"
612 for ac_dir in $ac_dummy; do
613 test -z "$ac_dir" && ac_dir=.
614 if test -f $ac_dir/$ac_word; then
615 ac_cv_prog_CC="gcc"
616 break
617 fi
618 done
619 IFS="$ac_save_ifs"
620fi
621fi
622CC="$ac_cv_prog_CC"
623if test -n "$CC"; then
624 echo "$ac_t""$CC" 1>&6
625else
626 echo "$ac_t""no" 1>&6
627fi
628
629if test -z "$CC"; then
630 # Extract the first word of "cc", so it can be a program name with args.
631set dummy cc; ac_word=$2
632echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 633echo "configure:634: checking for $ac_word" >&5
c906108c
SS
634if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
636else
637 if test -n "$CC"; then
638 ac_cv_prog_CC="$CC" # Let the user override the test.
639else
640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
641 ac_prog_rejected=no
642 ac_dummy="$PATH"
643 for ac_dir in $ac_dummy; do
644 test -z "$ac_dir" && ac_dir=.
645 if test -f $ac_dir/$ac_word; then
646 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
647 ac_prog_rejected=yes
648 continue
649 fi
650 ac_cv_prog_CC="cc"
651 break
652 fi
653 done
654 IFS="$ac_save_ifs"
655if test $ac_prog_rejected = yes; then
656 # We found a bogon in the path, so make sure we never use it.
657 set dummy $ac_cv_prog_CC
658 shift
659 if test $# -gt 0; then
660 # We chose a different compiler from the bogus one.
661 # However, it has the same basename, so the bogon will be chosen
662 # first if we set CC to just the basename; use the full file name.
663 shift
664 set dummy "$ac_dir/$ac_word" "$@"
665 shift
666 ac_cv_prog_CC="$@"
667 fi
668fi
669fi
670fi
671CC="$ac_cv_prog_CC"
672if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
674else
675 echo "$ac_t""no" 1>&6
676fi
677
678 if test -z "$CC"; then
679 case "`uname -s`" in
680 *win32* | *WIN32*)
681 # Extract the first word of "cl", so it can be a program name with args.
682set dummy cl; ac_word=$2
683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 684echo "configure:685: checking for $ac_word" >&5
c906108c
SS
685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
687else
688 if test -n "$CC"; then
689 ac_cv_prog_CC="$CC" # Let the user override the test.
690else
691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 ac_dummy="$PATH"
693 for ac_dir in $ac_dummy; do
694 test -z "$ac_dir" && ac_dir=.
695 if test -f $ac_dir/$ac_word; then
696 ac_cv_prog_CC="cl"
697 break
698 fi
699 done
700 IFS="$ac_save_ifs"
701fi
702fi
703CC="$ac_cv_prog_CC"
704if test -n "$CC"; then
705 echo "$ac_t""$CC" 1>&6
706else
707 echo "$ac_t""no" 1>&6
708fi
709 ;;
710 esac
711 fi
712 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
713fi
714
715echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
715d1656 716echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
717
718ac_ext=c
719# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
720ac_cpp='$CPP $CPPFLAGS'
721ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
722ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
723cross_compiling=$ac_cv_prog_cc_cross
724
725cat > conftest.$ac_ext << EOF
726
715d1656 727#line 728 "configure"
c906108c
SS
728#include "confdefs.h"
729
730main(){return(0);}
731EOF
715d1656 732if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
733 ac_cv_prog_cc_works=yes
734 # If we can't run a trivial program, we are probably using a cross compiler.
735 if (./conftest; exit) 2>/dev/null; then
736 ac_cv_prog_cc_cross=no
737 else
738 ac_cv_prog_cc_cross=yes
739 fi
740else
741 echo "configure: failed program was:" >&5
742 cat conftest.$ac_ext >&5
743 ac_cv_prog_cc_works=no
744fi
745rm -fr conftest*
746ac_ext=c
747# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
748ac_cpp='$CPP $CPPFLAGS'
749ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
750ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
751cross_compiling=$ac_cv_prog_cc_cross
752
753echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
754if test $ac_cv_prog_cc_works = no; then
755 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
756fi
757echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
715d1656 758echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
759echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
760cross_compiling=$ac_cv_prog_cc_cross
761
762echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
715d1656 763echo "configure:764: checking whether we are using GNU C" >&5
c906108c
SS
764if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 cat > conftest.c <<EOF
768#ifdef __GNUC__
769 yes;
770#endif
771EOF
715d1656 772if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
773 ac_cv_prog_gcc=yes
774else
775 ac_cv_prog_gcc=no
776fi
777fi
778
779echo "$ac_t""$ac_cv_prog_gcc" 1>&6
780
781if test $ac_cv_prog_gcc = yes; then
782 GCC=yes
783else
784 GCC=
785fi
786
787ac_test_CFLAGS="${CFLAGS+set}"
788ac_save_CFLAGS="$CFLAGS"
789CFLAGS=
790echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
715d1656 791echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
792if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794else
795 echo 'void f(){}' > conftest.c
796if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
797 ac_cv_prog_cc_g=yes
798else
799 ac_cv_prog_cc_g=no
800fi
801rm -f conftest*
802
803fi
804
805echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
806if test "$ac_test_CFLAGS" = set; then
807 CFLAGS="$ac_save_CFLAGS"
808elif test $ac_cv_prog_cc_g = yes; then
809 if test "$GCC" = yes; then
810 CFLAGS="-g -O2"
811 else
812 CFLAGS="-g"
813 fi
814else
815 if test "$GCC" = yes; then
816 CFLAGS="-O2"
817 else
818 CFLAGS=
819 fi
820fi
821
14abd0fb
MK
822cat >> confdefs.h <<\EOF
823#define _GNU_SOURCE 1
824EOF
825
826
c906108c 827echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
715d1656 828echo "configure:829: checking how to run the C preprocessor" >&5
c906108c
SS
829# On Suns, sometimes $CPP names a directory.
830if test -n "$CPP" && test -d "$CPP"; then
831 CPP=
832fi
833if test -z "$CPP"; then
834if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836else
837 # This must be in double quotes, not single quotes, because CPP may get
838 # substituted into the Makefile and "${CC-cc}" will confuse make.
839 CPP="${CC-cc} -E"
840 # On the NeXT, cc -E runs the code through the compiler's parser,
841 # not just through cpp.
842 cat > conftest.$ac_ext <<EOF
715d1656 843#line 844 "configure"
c906108c
SS
844#include "confdefs.h"
845#include <assert.h>
846Syntax Error
847EOF
848ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 849{ (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
850ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
851if test -z "$ac_err"; then
852 :
853else
854 echo "$ac_err" >&5
855 echo "configure: failed program was:" >&5
856 cat conftest.$ac_ext >&5
857 rm -rf conftest*
858 CPP="${CC-cc} -E -traditional-cpp"
859 cat > conftest.$ac_ext <<EOF
715d1656 860#line 861 "configure"
c906108c
SS
861#include "confdefs.h"
862#include <assert.h>
863Syntax Error
864EOF
865ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 866{ (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
867ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
868if test -z "$ac_err"; then
869 :
870else
871 echo "$ac_err" >&5
872 echo "configure: failed program was:" >&5
873 cat conftest.$ac_ext >&5
874 rm -rf conftest*
875 CPP="${CC-cc} -nologo -E"
876 cat > conftest.$ac_ext <<EOF
715d1656 877#line 878 "configure"
c906108c
SS
878#include "confdefs.h"
879#include <assert.h>
880Syntax Error
881EOF
882ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 883{ (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
884ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
885if test -z "$ac_err"; then
886 :
887else
888 echo "$ac_err" >&5
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 CPP=/lib/cpp
893fi
894rm -f conftest*
895fi
896rm -f conftest*
897fi
898rm -f conftest*
899 ac_cv_prog_CPP="$CPP"
900fi
901 CPP="$ac_cv_prog_CPP"
902else
903 ac_cv_prog_CPP="$CPP"
904fi
905echo "$ac_t""$CPP" 1>&6
906
907echo $ac_n "checking for AIX""... $ac_c" 1>&6
715d1656 908echo "configure:909: checking for AIX" >&5
c906108c 909cat > conftest.$ac_ext <<EOF
715d1656 910#line 911 "configure"
c906108c
SS
911#include "confdefs.h"
912#ifdef _AIX
913 yes
914#endif
915
916EOF
917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
918 egrep "yes" >/dev/null 2>&1; then
919 rm -rf conftest*
920 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
921#define _ALL_SOURCE 1
922EOF
923
924else
925 rm -rf conftest*
926 echo "$ac_t""no" 1>&6
927fi
928rm -f conftest*
929
930
56157b4a 931echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
715d1656 932echo "configure:933: checking for POSIXized ISC" >&5
56157b4a
AC
933if test -d /etc/conf/kconfig.d &&
934 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
935then
936 echo "$ac_t""yes" 1>&6
937 ISC=yes # If later tests want to check for ISC.
938 cat >> confdefs.h <<\EOF
939#define _POSIX_SOURCE 1
c906108c
SS
940EOF
941
56157b4a
AC
942 if test "$GCC" = yes; then
943 CC="$CC -posix"
944 else
945 CC="$CC -Xp"
946 fi
c906108c
SS
947else
948 echo "$ac_t""no" 1>&6
56157b4a 949 ISC=
c906108c
SS
950fi
951
952
953
954
955echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
715d1656 956echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
957if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
958 echo $ac_n "(cached) $ac_c" 1>&6
959else
960 am_cv_prog_cc_stdc=no
961ac_save_CC="$CC"
962# Don't try gcc -ansi; that turns off useful extensions and
963# breaks some systems' header files.
964# AIX -qlanglvl=ansi
965# Ultrix and OSF/1 -std1
56157b4a
AC
966# HP-UX 10.20 and later -Ae
967# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 968# SVR4 -Xc -D__EXTENSIONS__
56157b4a 969for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
970do
971 CC="$ac_save_CC $ac_arg"
972 cat > conftest.$ac_ext <<EOF
715d1656 973#line 974 "configure"
c906108c
SS
974#include "confdefs.h"
975#include <stdarg.h>
976#include <stdio.h>
977#include <sys/types.h>
978#include <sys/stat.h>
979/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
980struct buf { int x; };
981FILE * (*rcsopen) (struct buf *, struct stat *, int);
982static char *e (p, i)
983 char **p;
984 int i;
985{
986 return p[i];
987}
988static char *f (char * (*g) (char **, int), char **p, ...)
989{
990 char *s;
991 va_list v;
992 va_start (v,p);
993 s = g (p, va_arg (v,int));
994 va_end (v);
995 return s;
996}
997int test (int i, double x);
998struct s1 {int (*f) (int a);};
999struct s2 {int (*f) (double a);};
1000int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1001int argc;
1002char **argv;
1003
1004int main() {
1005
1006return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1007
1008; return 0; }
1009EOF
715d1656 1010if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1011 rm -rf conftest*
1012 am_cv_prog_cc_stdc="$ac_arg"; break
1013else
1014 echo "configure: failed program was:" >&5
1015 cat conftest.$ac_ext >&5
1016fi
1017rm -f conftest*
1018done
1019CC="$ac_save_CC"
1020
1021fi
1022
1023if test -z "$am_cv_prog_cc_stdc"; then
1024 echo "$ac_t""none needed" 1>&6
1025else
1026 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1027fi
1028case "x$am_cv_prog_cc_stdc" in
1029 x|xno) ;;
1030 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1031esac
1032
1033
1034ac_aux_dir=
1035for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1036 if test -f $ac_dir/install-sh; then
1037 ac_aux_dir=$ac_dir
1038 ac_install_sh="$ac_aux_dir/install-sh -c"
1039 break
1040 elif test -f $ac_dir/install.sh; then
1041 ac_aux_dir=$ac_dir
1042 ac_install_sh="$ac_aux_dir/install.sh -c"
1043 break
1044 fi
1045done
1046if test -z "$ac_aux_dir"; then
1047 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1048fi
1049ac_config_guess=$ac_aux_dir/config.guess
1050ac_config_sub=$ac_aux_dir/config.sub
1051ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1052
1053
1054# Do some error checking and defaulting for the host and target type.
1055# The inputs are:
1056# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1057#
1058# The rules are:
1059# 1. You are not allowed to specify --host, --target, and nonopt at the
1060# same time.
1061# 2. Host defaults to nonopt.
1062# 3. If nonopt is not specified, then host defaults to the current host,
1063# as determined by config.guess.
1064# 4. Target and build default to nonopt.
1065# 5. If nonopt is not specified, then target and build default to host.
1066
1067# The aliases save the names the user supplied, while $host etc.
1068# will get canonicalized.
1069case $host---$target---$nonopt in
1070NONE---*---* | *---NONE---* | *---*---NONE) ;;
1071*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1072esac
1073
1074
1075# Make sure we can run config.sub.
1076if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1077else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1078fi
1079
1080echo $ac_n "checking host system type""... $ac_c" 1>&6
715d1656 1081echo "configure:1082: checking host system type" >&5
c906108c
SS
1082
1083host_alias=$host
1084case "$host_alias" in
1085NONE)
1086 case $nonopt in
1087 NONE)
1088 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1089 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1090 fi ;;
1091 *) host_alias=$nonopt ;;
1092 esac ;;
1093esac
1094
1095host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1096host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1097host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1098host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1099echo "$ac_t""$host" 1>&6
1100
1101echo $ac_n "checking target system type""... $ac_c" 1>&6
715d1656 1102echo "configure:1103: checking target system type" >&5
c906108c
SS
1103
1104target_alias=$target
1105case "$target_alias" in
1106NONE)
1107 case $nonopt in
1108 NONE) target_alias=$host_alias ;;
1109 *) target_alias=$nonopt ;;
1110 esac ;;
1111esac
1112
1113target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1114target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1115target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1116target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117echo "$ac_t""$target" 1>&6
1118
1119echo $ac_n "checking build system type""... $ac_c" 1>&6
715d1656 1120echo "configure:1121: checking build system type" >&5
c906108c
SS
1121
1122build_alias=$build
1123case "$build_alias" in
1124NONE)
1125 case $nonopt in
1126 NONE) build_alias=$host_alias ;;
1127 *) build_alias=$nonopt ;;
1128 esac ;;
1129esac
1130
1131build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1132build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1133build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1134build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1135echo "$ac_t""$build" 1>&6
1136
1137test "$host_alias" != "$target_alias" &&
1138 test "$program_prefix$program_suffix$program_transform_name" = \
1139 NONENONEs,x,x, &&
1140 program_prefix=${target_alias}-
1141
1142
8bb2c122
MK
1143# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1144# doesn't support cross-compilation, but the one from Autoconf 2.5x
1145# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1146# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1147# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1148# 2.5x.
1149if test $host != $build; then
1150 ac_tool_prefix=${host_alias}-
1151else
1152 ac_tool_prefix=
1153fi
1154
1155# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1156set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1157echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1158echo "configure:1159: checking for $ac_word" >&5
8bb2c122
MK
1159if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161else
1162 if test -n "$RANLIB"; then
1163 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1164else
1165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1166 ac_dummy="$PATH"
1167 for ac_dir in $ac_dummy; do
1168 test -z "$ac_dir" && ac_dir=.
1169 if test -f $ac_dir/$ac_word; then
1170 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1171 break
1172 fi
1173 done
1174 IFS="$ac_save_ifs"
1175fi
1176fi
1177RANLIB="$ac_cv_prog_RANLIB"
1178if test -n "$RANLIB"; then
1179 echo "$ac_t""$RANLIB" 1>&6
1180else
1181 echo "$ac_t""no" 1>&6
1182fi
1183
1184
1185if test -z "$ac_cv_prog_RANLIB"; then
1186if test -n "$ac_tool_prefix"; then
1187 # Extract the first word of "ranlib", so it can be a program name with args.
1188set dummy ranlib; ac_word=$2
1189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1190echo "configure:1191: checking for $ac_word" >&5
8bb2c122
MK
1191if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193else
1194 if test -n "$RANLIB"; then
1195 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1196else
1197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200 test -z "$ac_dir" && ac_dir=.
1201 if test -f $ac_dir/$ac_word; then
1202 ac_cv_prog_RANLIB="ranlib"
1203 break
1204 fi
1205 done
1206 IFS="$ac_save_ifs"
1207 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1208fi
1209fi
1210RANLIB="$ac_cv_prog_RANLIB"
1211if test -n "$RANLIB"; then
1212 echo "$ac_t""$RANLIB" 1>&6
1213else
1214 echo "$ac_t""no" 1>&6
1215fi
1216
1217else
1218 RANLIB=":"
1219fi
1220fi
1221
1222
c906108c
SS
1223ALL_LINGUAS=
1224echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
715d1656 1225echo "configure:1226: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1226set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1227if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1229else
1230 cat > conftestmake <<\EOF
1231all:
1232 @echo 'ac_maketemp="${MAKE}"'
1233EOF
1234# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1235eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1236if test -n "$ac_maketemp"; then
1237 eval ac_cv_prog_make_${ac_make}_set=yes
1238else
1239 eval ac_cv_prog_make_${ac_make}_set=no
1240fi
1241rm -f conftestmake
1242fi
1243if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1244 echo "$ac_t""yes" 1>&6
1245 SET_MAKE=
1246else
1247 echo "$ac_t""no" 1>&6
1248 SET_MAKE="MAKE=${MAKE-make}"
1249fi
1250
1251# Extract the first word of "ranlib", so it can be a program name with args.
1252set dummy ranlib; ac_word=$2
1253echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
715d1656 1254echo "configure:1255: checking for $ac_word" >&5
c906108c
SS
1255if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257else
1258 if test -n "$RANLIB"; then
1259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1260else
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_RANLIB="ranlib"
1267 break
1268 fi
1269 done
1270 IFS="$ac_save_ifs"
1271 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1272fi
1273fi
1274RANLIB="$ac_cv_prog_RANLIB"
1275if test -n "$RANLIB"; then
1276 echo "$ac_t""$RANLIB" 1>&6
1277else
1278 echo "$ac_t""no" 1>&6
1279fi
1280
1281echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
715d1656 1282echo "configure:1283: checking for ANSI C header files" >&5
c906108c
SS
1283if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1285else
1286 cat > conftest.$ac_ext <<EOF
715d1656 1287#line 1288 "configure"
c906108c
SS
1288#include "confdefs.h"
1289#include <stdlib.h>
1290#include <stdarg.h>
1291#include <string.h>
1292#include <float.h>
1293EOF
1294ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 1295{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1296ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1297if test -z "$ac_err"; then
1298 rm -rf conftest*
1299 ac_cv_header_stdc=yes
1300else
1301 echo "$ac_err" >&5
1302 echo "configure: failed program was:" >&5
1303 cat conftest.$ac_ext >&5
1304 rm -rf conftest*
1305 ac_cv_header_stdc=no
1306fi
1307rm -f conftest*
1308
1309if test $ac_cv_header_stdc = yes; then
1310 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1311cat > conftest.$ac_ext <<EOF
715d1656 1312#line 1313 "configure"
c906108c
SS
1313#include "confdefs.h"
1314#include <string.h>
1315EOF
1316if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1317 egrep "memchr" >/dev/null 2>&1; then
1318 :
1319else
1320 rm -rf conftest*
1321 ac_cv_header_stdc=no
1322fi
1323rm -f conftest*
1324
1325fi
1326
1327if test $ac_cv_header_stdc = yes; then
1328 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1329cat > conftest.$ac_ext <<EOF
715d1656 1330#line 1331 "configure"
c906108c
SS
1331#include "confdefs.h"
1332#include <stdlib.h>
1333EOF
1334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1335 egrep "free" >/dev/null 2>&1; then
1336 :
1337else
1338 rm -rf conftest*
1339 ac_cv_header_stdc=no
1340fi
1341rm -f conftest*
1342
1343fi
1344
1345if test $ac_cv_header_stdc = yes; then
1346 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1347if test "$cross_compiling" = yes; then
1348 :
1349else
1350 cat > conftest.$ac_ext <<EOF
715d1656 1351#line 1352 "configure"
c906108c
SS
1352#include "confdefs.h"
1353#include <ctype.h>
1354#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1355#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1356#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1357int main () { int i; for (i = 0; i < 256; i++)
1358if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1359exit (0); }
1360
1361EOF
715d1656 1362if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1363then
1364 :
1365else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1368 rm -fr conftest*
1369 ac_cv_header_stdc=no
1370fi
1371rm -fr conftest*
1372fi
1373
1374fi
1375fi
1376
1377echo "$ac_t""$ac_cv_header_stdc" 1>&6
1378if test $ac_cv_header_stdc = yes; then
1379 cat >> confdefs.h <<\EOF
1380#define STDC_HEADERS 1
1381EOF
1382
1383fi
1384
1385echo $ac_n "checking for working const""... $ac_c" 1>&6
715d1656 1386echo "configure:1387: checking for working const" >&5
c906108c
SS
1387if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389else
1390 cat > conftest.$ac_ext <<EOF
715d1656 1391#line 1392 "configure"
c906108c
SS
1392#include "confdefs.h"
1393
1394int main() {
1395
1396/* Ultrix mips cc rejects this. */
1397typedef int charset[2]; const charset x;
1398/* SunOS 4.1.1 cc rejects this. */
1399char const *const *ccp;
1400char **p;
1401/* NEC SVR4.0.2 mips cc rejects this. */
1402struct point {int x, y;};
1403static struct point const zero = {0,0};
1404/* AIX XL C 1.02.0.0 rejects this.
1405 It does not let you subtract one const X* pointer from another in an arm
1406 of an if-expression whose if-part is not a constant expression */
1407const char *g = "string";
1408ccp = &g + (g ? g-g : 0);
1409/* HPUX 7.0 cc rejects these. */
1410++ccp;
1411p = (char**) ccp;
1412ccp = (char const *const *) p;
1413{ /* SCO 3.2v4 cc rejects this. */
1414 char *t;
1415 char const *s = 0 ? (char *) 0 : (char const *) 0;
1416
1417 *t++ = 0;
1418}
1419{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1420 int x[] = {25, 17};
1421 const int *foo = &x[0];
1422 ++foo;
1423}
1424{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1425 typedef const int *iptr;
1426 iptr p = 0;
1427 ++p;
1428}
1429{ /* AIX XL C 1.02.0.0 rejects this saying
1430 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1431 struct s { int j; const int *ap[3]; };
1432 struct s *b; b->j = 5;
1433}
1434{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1435 const int foo = 10;
1436}
1437
1438; return 0; }
1439EOF
715d1656 1440if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1441 rm -rf conftest*
1442 ac_cv_c_const=yes
1443else
1444 echo "configure: failed program was:" >&5
1445 cat conftest.$ac_ext >&5
1446 rm -rf conftest*
1447 ac_cv_c_const=no
1448fi
1449rm -f conftest*
1450fi
1451
1452echo "$ac_t""$ac_cv_c_const" 1>&6
1453if test $ac_cv_c_const = no; then
1454 cat >> confdefs.h <<\EOF
1455#define const
1456EOF
1457
1458fi
1459
1460echo $ac_n "checking for inline""... $ac_c" 1>&6
715d1656 1461echo "configure:1462: checking for inline" >&5
c906108c
SS
1462if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464else
1465 ac_cv_c_inline=no
1466for ac_kw in inline __inline__ __inline; do
1467 cat > conftest.$ac_ext <<EOF
715d1656 1468#line 1469 "configure"
c906108c
SS
1469#include "confdefs.h"
1470
1471int main() {
1472} $ac_kw foo() {
1473; return 0; }
1474EOF
715d1656 1475if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1476 rm -rf conftest*
1477 ac_cv_c_inline=$ac_kw; break
1478else
1479 echo "configure: failed program was:" >&5
1480 cat conftest.$ac_ext >&5
1481fi
1482rm -f conftest*
1483done
1484
1485fi
1486
1487echo "$ac_t""$ac_cv_c_inline" 1>&6
1488case "$ac_cv_c_inline" in
1489 inline | yes) ;;
1490 no) cat >> confdefs.h <<\EOF
1491#define inline
1492EOF
1493 ;;
1494 *) cat >> confdefs.h <<EOF
1495#define inline $ac_cv_c_inline
1496EOF
1497 ;;
1498esac
1499
1500echo $ac_n "checking for off_t""... $ac_c" 1>&6
715d1656 1501echo "configure:1502: checking for off_t" >&5
c906108c
SS
1502if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1503 echo $ac_n "(cached) $ac_c" 1>&6
1504else
1505 cat > conftest.$ac_ext <<EOF
715d1656 1506#line 1507 "configure"
c906108c
SS
1507#include "confdefs.h"
1508#include <sys/types.h>
1509#if STDC_HEADERS
1510#include <stdlib.h>
1511#include <stddef.h>
1512#endif
1513EOF
1514if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1515 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1516 rm -rf conftest*
1517 ac_cv_type_off_t=yes
1518else
1519 rm -rf conftest*
1520 ac_cv_type_off_t=no
1521fi
1522rm -f conftest*
1523
1524fi
1525echo "$ac_t""$ac_cv_type_off_t" 1>&6
1526if test $ac_cv_type_off_t = no; then
1527 cat >> confdefs.h <<\EOF
1528#define off_t long
1529EOF
1530
1531fi
1532
1533echo $ac_n "checking for size_t""... $ac_c" 1>&6
715d1656 1534echo "configure:1535: checking for size_t" >&5
c906108c
SS
1535if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
1537else
1538 cat > conftest.$ac_ext <<EOF
715d1656 1539#line 1540 "configure"
c906108c
SS
1540#include "confdefs.h"
1541#include <sys/types.h>
1542#if STDC_HEADERS
1543#include <stdlib.h>
1544#include <stddef.h>
1545#endif
1546EOF
1547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1548 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1549 rm -rf conftest*
1550 ac_cv_type_size_t=yes
1551else
1552 rm -rf conftest*
1553 ac_cv_type_size_t=no
1554fi
1555rm -f conftest*
1556
1557fi
1558echo "$ac_t""$ac_cv_type_size_t" 1>&6
1559if test $ac_cv_type_size_t = no; then
1560 cat >> confdefs.h <<\EOF
1561#define size_t unsigned
1562EOF
1563
1564fi
1565
1566# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1567# for constant arguments. Useless!
1568echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
715d1656 1569echo "configure:1570: checking for working alloca.h" >&5
c906108c
SS
1570if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573 cat > conftest.$ac_ext <<EOF
715d1656 1574#line 1575 "configure"
c906108c
SS
1575#include "confdefs.h"
1576#include <alloca.h>
1577int main() {
1578char *p = alloca(2 * sizeof(int));
1579; return 0; }
1580EOF
715d1656 1581if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1582 rm -rf conftest*
1583 ac_cv_header_alloca_h=yes
1584else
1585 echo "configure: failed program was:" >&5
1586 cat conftest.$ac_ext >&5
1587 rm -rf conftest*
1588 ac_cv_header_alloca_h=no
1589fi
1590rm -f conftest*
1591fi
1592
1593echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1594if test $ac_cv_header_alloca_h = yes; then
1595 cat >> confdefs.h <<\EOF
1596#define HAVE_ALLOCA_H 1
1597EOF
1598
1599fi
1600
1601echo $ac_n "checking for alloca""... $ac_c" 1>&6
715d1656 1602echo "configure:1603: checking for alloca" >&5
c906108c
SS
1603if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605else
1606 cat > conftest.$ac_ext <<EOF
715d1656 1607#line 1608 "configure"
c906108c
SS
1608#include "confdefs.h"
1609
1610#ifdef __GNUC__
1611# define alloca __builtin_alloca
1612#else
1613# ifdef _MSC_VER
1614# include <malloc.h>
1615# define alloca _alloca
1616# else
1617# if HAVE_ALLOCA_H
1618# include <alloca.h>
1619# else
1620# ifdef _AIX
1621 #pragma alloca
1622# else
1623# ifndef alloca /* predefined by HP cc +Olibcalls */
1624char *alloca ();
1625# endif
1626# endif
1627# endif
1628# endif
1629#endif
1630
1631int main() {
1632char *p = (char *) alloca(1);
1633; return 0; }
1634EOF
715d1656 1635if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1636 rm -rf conftest*
1637 ac_cv_func_alloca_works=yes
1638else
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
1641 rm -rf conftest*
1642 ac_cv_func_alloca_works=no
1643fi
1644rm -f conftest*
1645fi
1646
1647echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1648if test $ac_cv_func_alloca_works = yes; then
1649 cat >> confdefs.h <<\EOF
1650#define HAVE_ALLOCA 1
1651EOF
1652
1653fi
1654
1655if test $ac_cv_func_alloca_works = no; then
1656 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1657 # that cause trouble. Some versions do not even contain alloca or
1658 # contain a buggy version. If you still want to use their alloca,
1659 # use ar to extract alloca.o from them instead of compiling alloca.c.
1660 ALLOCA=alloca.${ac_objext}
1661 cat >> confdefs.h <<\EOF
1662#define C_ALLOCA 1
1663EOF
1664
1665
1666echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
715d1656 1667echo "configure:1668: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1668if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
1670else
1671 cat > conftest.$ac_ext <<EOF
715d1656 1672#line 1673 "configure"
c906108c
SS
1673#include "confdefs.h"
1674#if defined(CRAY) && ! defined(CRAY2)
1675webecray
1676#else
1677wenotbecray
1678#endif
1679
1680EOF
1681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1682 egrep "webecray" >/dev/null 2>&1; then
1683 rm -rf conftest*
1684 ac_cv_os_cray=yes
1685else
1686 rm -rf conftest*
1687 ac_cv_os_cray=no
1688fi
1689rm -f conftest*
1690
1691fi
1692
1693echo "$ac_t""$ac_cv_os_cray" 1>&6
1694if test $ac_cv_os_cray = yes; then
1695for ac_func in _getb67 GETB67 getb67; do
1696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 1697echo "configure:1698: checking for $ac_func" >&5
c906108c
SS
1698if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700else
1701 cat > conftest.$ac_ext <<EOF
715d1656 1702#line 1703 "configure"
c906108c
SS
1703#include "confdefs.h"
1704/* System header to define __stub macros and hopefully few prototypes,
1705 which can conflict with char $ac_func(); below. */
1706#include <assert.h>
1707/* Override any gcc2 internal prototype to avoid an error. */
1708/* We use char because int might match the return type of a gcc2
1709 builtin and then its argument prototype would still apply. */
1710char $ac_func();
1711
1712int main() {
1713
1714/* The GNU C library defines this for functions which it implements
1715 to always fail with ENOSYS. Some functions are actually named
1716 something starting with __ and the normal name is an alias. */
1717#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1718choke me
1719#else
1720$ac_func();
1721#endif
1722
1723; return 0; }
1724EOF
715d1656 1725if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1726 rm -rf conftest*
1727 eval "ac_cv_func_$ac_func=yes"
1728else
1729 echo "configure: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1731 rm -rf conftest*
1732 eval "ac_cv_func_$ac_func=no"
1733fi
1734rm -f conftest*
1735fi
1736
1737if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1738 echo "$ac_t""yes" 1>&6
1739 cat >> confdefs.h <<EOF
1740#define CRAY_STACKSEG_END $ac_func
1741EOF
1742
1743 break
1744else
1745 echo "$ac_t""no" 1>&6
1746fi
1747
1748done
1749fi
1750
1751echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
715d1656 1752echo "configure:1753: checking stack direction for C alloca" >&5
c906108c
SS
1753if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1755else
1756 if test "$cross_compiling" = yes; then
1757 ac_cv_c_stack_direction=0
1758else
1759 cat > conftest.$ac_ext <<EOF
715d1656 1760#line 1761 "configure"
c906108c
SS
1761#include "confdefs.h"
1762find_stack_direction ()
1763{
1764 static char *addr = 0;
1765 auto char dummy;
1766 if (addr == 0)
1767 {
1768 addr = &dummy;
1769 return find_stack_direction ();
1770 }
1771 else
1772 return (&dummy > addr) ? 1 : -1;
1773}
1774main ()
1775{
1776 exit (find_stack_direction() < 0);
1777}
1778EOF
715d1656 1779if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1780then
1781 ac_cv_c_stack_direction=1
1782else
1783 echo "configure: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1785 rm -fr conftest*
1786 ac_cv_c_stack_direction=-1
1787fi
1788rm -fr conftest*
1789fi
1790
1791fi
1792
1793echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1794cat >> confdefs.h <<EOF
1795#define STACK_DIRECTION $ac_cv_c_stack_direction
1796EOF
1797
1798fi
1799
27ca5dad 1800for ac_hdr in unistd.h
c906108c
SS
1801do
1802ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1803echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
715d1656 1804echo "configure:1805: checking for $ac_hdr" >&5
c906108c
SS
1805if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807else
1808 cat > conftest.$ac_ext <<EOF
715d1656 1809#line 1810 "configure"
c906108c
SS
1810#include "confdefs.h"
1811#include <$ac_hdr>
1812EOF
1813ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
715d1656 1814{ (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1815ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1816if test -z "$ac_err"; then
1817 rm -rf conftest*
1818 eval "ac_cv_header_$ac_safe=yes"
1819else
1820 echo "$ac_err" >&5
1821 echo "configure: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1823 rm -rf conftest*
1824 eval "ac_cv_header_$ac_safe=no"
1825fi
1826rm -f conftest*
1827fi
1828if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1829 echo "$ac_t""yes" 1>&6
1830 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1831 cat >> confdefs.h <<EOF
1832#define $ac_tr_hdr 1
1833EOF
1834
1835else
1836 echo "$ac_t""no" 1>&6
1837fi
1838done
1839
1840for ac_func in getpagesize
1841do
1842echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
715d1656 1843echo "configure:1844: checking for $ac_func" >&5
c906108c
SS
1844if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846else
1847 cat > conftest.$ac_ext <<EOF
715d1656 1848#line 1849 "configure"
c906108c
SS
1849#include "confdefs.h"
1850/* System header to define __stub macros and hopefully few prototypes,
1851 which can conflict with char $ac_func(); below. */
1852#include <assert.h>
1853/* Override any gcc2 internal prototype to avoid an error. */
1854/* We use char because int might match the return type of a gcc2
1855 builtin and then its argument prototype would still apply. */
1856char $ac_func();
1857
1858int main() {
1859
1860/* The GNU C library defines this for functions which it implements
1861 to always fail with ENOSYS. Some functions are actually named
1862 something starting with __ and the normal name is an alias. */
1863#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1864choke me
1865#else
1866$ac_func();
1867#endif
1868
1869; return 0; }
1870EOF
715d1656 1871if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1872 rm -rf conftest*
1873 eval "ac_cv_func_$ac_func=yes"
1874else
1875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 rm -rf conftest*
1878 eval "ac_cv_func_$ac_func=no"
1879fi
1880rm -f conftest*
1881fi
1882
1883if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1884 echo "$ac_t""yes" 1>&6
1885 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1886 cat >> confdefs.h <<EOF
1887#define $ac_tr_func 1
1888EOF
1889
1890else
1891 echo "$ac_t""no" 1>&6
1892fi
1893done
1894
1895echo $ac_n "checking for working mmap""... $ac_c" 1>&6
715d1656 1896echo "configure:1897: checking for working mmap" >&5
c906108c
SS
1897if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1899else
1900 if test "$cross_compiling" = yes; then
1901 ac_cv_func_mmap_fixed_mapped=no
1902else
1903 cat > conftest.$ac_ext <<EOF
715d1656 1904#line 1905 "configure"
c906108c
SS
1905#include "confdefs.h"
1906
1907/* Thanks to Mike Haertel and Jim Avera for this test.
1908 Here is a matrix of mmap possibilities:
1909 mmap private not fixed
1910 mmap private fixed at somewhere currently unmapped
1911 mmap private fixed at somewhere already mapped
1912 mmap shared not fixed
1913 mmap shared fixed at somewhere currently unmapped
1914 mmap shared fixed at somewhere already mapped
1915 For private mappings, we should verify that changes cannot be read()
1916 back from the file, nor mmap's back from the file at a different
1917 address. (There have been systems where private was not correctly
1918 implemented like the infamous i386 svr4.0, and systems where the
1919 VM page cache was not coherent with the filesystem buffer cache
1920 like early versions of FreeBSD and possibly contemporary NetBSD.)
1921 For shared mappings, we should conversely verify that changes get
1922 propogated back to all the places they're supposed to be.
1923
1924 Grep wants private fixed already mapped.
1925 The main things grep needs to know about mmap are:
1926 * does it exist and is it safe to write into the mmap'd area
1927 * how to use it (BSD variants) */
1928#include <sys/types.h>
1929#include <fcntl.h>
1930#include <sys/mman.h>
1931
1932/* This mess was copied from the GNU getpagesize.h. */
1933#ifndef HAVE_GETPAGESIZE
27ca5dad
MC
1934# ifdef HAVE_UNISTD_H
1935# include <unistd.h>
1936# endif
c906108c
SS
1937
1938/* Assume that all systems that can run configure have sys/param.h. */
1939# ifndef HAVE_SYS_PARAM_H
1940# define HAVE_SYS_PARAM_H 1
1941# endif
1942
1943# ifdef _SC_PAGESIZE
1944# define getpagesize() sysconf(_SC_PAGESIZE)
1945# else /* no _SC_PAGESIZE */
1946# ifdef HAVE_SYS_PARAM_H
1947# include <sys/param.h>
1948# ifdef EXEC_PAGESIZE
1949# define getpagesize() EXEC_PAGESIZE
1950# else /* no EXEC_PAGESIZE */
1951# ifdef NBPG
1952# define getpagesize() NBPG * CLSIZE
1953# ifndef CLSIZE
1954# define CLSIZE 1
1955# endif /* no CLSIZE */
1956# else /* no NBPG */
1957# ifdef NBPC
1958# define getpagesize() NBPC
1959# else /* no NBPC */
1960# ifdef PAGESIZE
1961# define getpagesize() PAGESIZE
1962# endif /* PAGESIZE */
1963# endif /* no NBPC */
1964# endif /* no NBPG */
1965# endif /* no EXEC_PAGESIZE */
1966# else /* no HAVE_SYS_PARAM_H */
1967# define getpagesize() 8192 /* punt totally */
1968# endif /* no HAVE_SYS_PARAM_H */
1969# endif /* no _SC_PAGESIZE */
1970
1971#endif /* no HAVE_GETPAGESIZE */
1972
1973#ifdef __cplusplus
1974extern "C" { void *malloc(unsigned); }
1975#else
1976char *malloc();
1977#endif
1978
1979int
1980main()
1981{
1982 char *data, *data2, *data3;
1983 int i, pagesize;
1984 int fd;
1985
1986 pagesize = getpagesize();
1987
1988 /*
1989 * First, make a file with some known garbage in it.
1990 */
1991 data = malloc(pagesize);
1992 if (!data)
1993 exit(1);
1994 for (i = 0; i < pagesize; ++i)
1995 *(data + i) = rand();
1996 umask(0);
1997 fd = creat("conftestmmap", 0600);
1998 if (fd < 0)
1999 exit(1);
2000 if (write(fd, data, pagesize) != pagesize)
2001 exit(1);
2002 close(fd);
2003
2004 /*
2005 * Next, try to mmap the file at a fixed address which
2006 * already has something else allocated at it. If we can,
2007 * also make sure that we see the same garbage.
2008 */
2009 fd = open("conftestmmap", O_RDWR);
2010 if (fd < 0)
2011 exit(1);
2012 data2 = malloc(2 * pagesize);
2013 if (!data2)
2014 exit(1);
2015 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2016 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2017 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2018 exit(1);
2019 for (i = 0; i < pagesize; ++i)
2020 if (*(data + i) != *(data2 + i))
2021 exit(1);
2022
2023 /*
2024 * Finally, make sure that changes to the mapped area
2025 * do not percolate back to the file as seen by read().
2026 * (This is a bug on some variants of i386 svr4.0.)
2027 */
2028 for (i = 0; i < pagesize; ++i)
2029 *(data2 + i) = *(data2 + i) + 1;
2030 data3 = malloc(pagesize);
2031 if (!data3)
2032 exit(1);
2033 if (read(fd, data3, pagesize) != pagesize)
2034 exit(1);
2035 for (i = 0; i < pagesize; ++i)
2036 if (*(data + i) != *(data3 + i))
2037 exit(1);
2038 close(fd);
2039 unlink("conftestmmap");
2040 exit(0);
2041}
2042
2043EOF
27ca5dad 2044if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2045then
2046 ac_cv_func_mmap_fixed_mapped=yes
2047else
2048 echo "configure: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 rm -fr conftest*
2051 ac_cv_func_mmap_fixed_mapped=no
2052fi
2053rm -fr conftest*
2054fi
2055
2056fi
2057
2058echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2059if test $ac_cv_func_mmap_fixed_mapped = yes; then
2060 cat >> confdefs.h <<\EOF
2061#define HAVE_MMAP 1
2062EOF
2063
2064fi
2065
2066
2067 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2068unistd.h values.h sys/param.h
2069do
2070ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2071echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 2072echo "configure:2073: checking for $ac_hdr" >&5
c906108c
SS
2073if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2074 echo $ac_n "(cached) $ac_c" 1>&6
2075else
2076 cat > conftest.$ac_ext <<EOF
27ca5dad 2077#line 2078 "configure"
c906108c
SS
2078#include "confdefs.h"
2079#include <$ac_hdr>
2080EOF
2081ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 2082{ (eval echo configure:2083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2083ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2084if test -z "$ac_err"; then
2085 rm -rf conftest*
2086 eval "ac_cv_header_$ac_safe=yes"
2087else
2088 echo "$ac_err" >&5
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 eval "ac_cv_header_$ac_safe=no"
2093fi
2094rm -f conftest*
2095fi
2096if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2097 echo "$ac_t""yes" 1>&6
2098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2099 cat >> confdefs.h <<EOF
2100#define $ac_tr_hdr 1
2101EOF
2102
2103else
2104 echo "$ac_t""no" 1>&6
2105fi
2106done
2107
2108 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2109__argz_count __argz_stringify __argz_next
2110do
2111echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 2112echo "configure:2113: checking for $ac_func" >&5
c906108c
SS
2113if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2114 echo $ac_n "(cached) $ac_c" 1>&6
2115else
2116 cat > conftest.$ac_ext <<EOF
27ca5dad 2117#line 2118 "configure"
c906108c
SS
2118#include "confdefs.h"
2119/* System header to define __stub macros and hopefully few prototypes,
2120 which can conflict with char $ac_func(); below. */
2121#include <assert.h>
2122/* Override any gcc2 internal prototype to avoid an error. */
2123/* We use char because int might match the return type of a gcc2
2124 builtin and then its argument prototype would still apply. */
2125char $ac_func();
2126
2127int main() {
2128
2129/* The GNU C library defines this for functions which it implements
2130 to always fail with ENOSYS. Some functions are actually named
2131 something starting with __ and the normal name is an alias. */
2132#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2133choke me
2134#else
2135$ac_func();
2136#endif
2137
2138; return 0; }
2139EOF
27ca5dad 2140if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2141 rm -rf conftest*
2142 eval "ac_cv_func_$ac_func=yes"
2143else
2144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
2146 rm -rf conftest*
2147 eval "ac_cv_func_$ac_func=no"
2148fi
2149rm -f conftest*
2150fi
2151
2152if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2153 echo "$ac_t""yes" 1>&6
2154 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2155 cat >> confdefs.h <<EOF
2156#define $ac_tr_func 1
2157EOF
2158
2159else
2160 echo "$ac_t""no" 1>&6
2161fi
2162done
2163
2164
2165 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2166 for ac_func in stpcpy
2167do
2168echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 2169echo "configure:2170: checking for $ac_func" >&5
c906108c
SS
2170if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172else
2173 cat > conftest.$ac_ext <<EOF
27ca5dad 2174#line 2175 "configure"
c906108c
SS
2175#include "confdefs.h"
2176/* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $ac_func(); below. */
2178#include <assert.h>
2179/* Override any gcc2 internal prototype to avoid an error. */
2180/* We use char because int might match the return type of a gcc2
2181 builtin and then its argument prototype would still apply. */
2182char $ac_func();
2183
2184int main() {
2185
2186/* The GNU C library defines this for functions which it implements
2187 to always fail with ENOSYS. Some functions are actually named
2188 something starting with __ and the normal name is an alias. */
2189#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2190choke me
2191#else
2192$ac_func();
2193#endif
2194
2195; return 0; }
2196EOF
27ca5dad 2197if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2198 rm -rf conftest*
2199 eval "ac_cv_func_$ac_func=yes"
2200else
2201 echo "configure: failed program was:" >&5
2202 cat conftest.$ac_ext >&5
2203 rm -rf conftest*
2204 eval "ac_cv_func_$ac_func=no"
2205fi
2206rm -f conftest*
2207fi
2208
2209if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2210 echo "$ac_t""yes" 1>&6
2211 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2212 cat >> confdefs.h <<EOF
2213#define $ac_tr_func 1
2214EOF
2215
2216else
2217 echo "$ac_t""no" 1>&6
2218fi
2219done
2220
2221 fi
2222 if test "${ac_cv_func_stpcpy}" = "yes"; then
2223 cat >> confdefs.h <<\EOF
2224#define HAVE_STPCPY 1
2225EOF
2226
2227 fi
2228
2229 if test $ac_cv_header_locale_h = yes; then
2230 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
27ca5dad 2231echo "configure:2232: checking for LC_MESSAGES" >&5
c906108c
SS
2232if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2233 echo $ac_n "(cached) $ac_c" 1>&6
2234else
2235 cat > conftest.$ac_ext <<EOF
27ca5dad 2236#line 2237 "configure"
c906108c
SS
2237#include "confdefs.h"
2238#include <locale.h>
2239int main() {
2240return LC_MESSAGES
2241; return 0; }
2242EOF
27ca5dad 2243if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2244 rm -rf conftest*
2245 am_cv_val_LC_MESSAGES=yes
2246else
2247 echo "configure: failed program was:" >&5
2248 cat conftest.$ac_ext >&5
2249 rm -rf conftest*
2250 am_cv_val_LC_MESSAGES=no
2251fi
2252rm -f conftest*
2253fi
2254
2255echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2256 if test $am_cv_val_LC_MESSAGES = yes; then
2257 cat >> confdefs.h <<\EOF
2258#define HAVE_LC_MESSAGES 1
2259EOF
2260
2261 fi
2262 fi
2263 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
27ca5dad 2264echo "configure:2265: checking whether NLS is requested" >&5
c906108c
SS
2265 # Check whether --enable-nls or --disable-nls was given.
2266if test "${enable_nls+set}" = set; then
2267 enableval="$enable_nls"
2268 USE_NLS=$enableval
2269else
2270 USE_NLS=yes
2271fi
2272
2273 echo "$ac_t""$USE_NLS" 1>&6
2274
2275
2276 USE_INCLUDED_LIBINTL=no
2277
2278 if test "$USE_NLS" = "yes"; then
2279 cat >> confdefs.h <<\EOF
2280#define ENABLE_NLS 1
2281EOF
2282
2283 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
27ca5dad 2284echo "configure:2285: checking whether included gettext is requested" >&5
c906108c
SS
2285 # Check whether --with-included-gettext or --without-included-gettext was given.
2286if test "${with_included_gettext+set}" = set; then
2287 withval="$with_included_gettext"
2288 nls_cv_force_use_gnu_gettext=$withval
2289else
2290 nls_cv_force_use_gnu_gettext=no
2291fi
2292
2293 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2294
2295 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2296 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2297 nls_cv_header_intl=
2298 nls_cv_header_libgt=
2299 CATOBJEXT=NONE
2300
2301 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2302echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
27ca5dad 2303echo "configure:2304: checking for libintl.h" >&5
c906108c
SS
2304if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306else
2307 cat > conftest.$ac_ext <<EOF
27ca5dad 2308#line 2309 "configure"
c906108c
SS
2309#include "confdefs.h"
2310#include <libintl.h>
2311EOF
2312ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 2313{ (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2314ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2315if test -z "$ac_err"; then
2316 rm -rf conftest*
2317 eval "ac_cv_header_$ac_safe=yes"
2318else
2319 echo "$ac_err" >&5
2320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -rf conftest*
2323 eval "ac_cv_header_$ac_safe=no"
2324fi
2325rm -f conftest*
2326fi
2327if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2328 echo "$ac_t""yes" 1>&6
2329 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
27ca5dad 2330echo "configure:2331: checking for gettext in libc" >&5
c906108c
SS
2331if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333else
2334 cat > conftest.$ac_ext <<EOF
27ca5dad 2335#line 2336 "configure"
c906108c
SS
2336#include "confdefs.h"
2337#include <libintl.h>
2338int main() {
2339return (int) gettext ("")
2340; return 0; }
2341EOF
27ca5dad 2342if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2343 rm -rf conftest*
2344 gt_cv_func_gettext_libc=yes
2345else
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 rm -rf conftest*
2349 gt_cv_func_gettext_libc=no
2350fi
2351rm -f conftest*
2352fi
2353
2354echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2355
2356 if test "$gt_cv_func_gettext_libc" != "yes"; then
2357 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
27ca5dad 2358echo "configure:2359: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2359ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2360if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362else
2363 ac_save_LIBS="$LIBS"
2364LIBS="-lintl $LIBS"
2365cat > conftest.$ac_ext <<EOF
27ca5dad 2366#line 2367 "configure"
c906108c
SS
2367#include "confdefs.h"
2368/* Override any gcc2 internal prototype to avoid an error. */
2369/* We use char because int might match the return type of a gcc2
2370 builtin and then its argument prototype would still apply. */
2371char bindtextdomain();
2372
2373int main() {
2374bindtextdomain()
2375; return 0; }
2376EOF
27ca5dad 2377if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2378 rm -rf conftest*
2379 eval "ac_cv_lib_$ac_lib_var=yes"
2380else
2381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
2383 rm -rf conftest*
2384 eval "ac_cv_lib_$ac_lib_var=no"
2385fi
2386rm -f conftest*
2387LIBS="$ac_save_LIBS"
2388
2389fi
2390if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2391 echo "$ac_t""yes" 1>&6
2392 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
27ca5dad 2393echo "configure:2394: checking for gettext in libintl" >&5
c906108c
SS
2394if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2396else
2397 cat > conftest.$ac_ext <<EOF
27ca5dad 2398#line 2399 "configure"
c906108c
SS
2399#include "confdefs.h"
2400
2401int main() {
2402return (int) gettext ("")
2403; return 0; }
2404EOF
27ca5dad 2405if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2406 rm -rf conftest*
2407 gt_cv_func_gettext_libintl=yes
2408else
2409 echo "configure: failed program was:" >&5
2410 cat conftest.$ac_ext >&5
2411 rm -rf conftest*
2412 gt_cv_func_gettext_libintl=no
2413fi
2414rm -f conftest*
2415fi
2416
2417echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2418else
2419 echo "$ac_t""no" 1>&6
2420fi
2421
2422 fi
2423
2424 if test "$gt_cv_func_gettext_libc" = "yes" \
2425 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2426 cat >> confdefs.h <<\EOF
2427#define HAVE_GETTEXT 1
2428EOF
2429
2430 # Extract the first word of "msgfmt", so it can be a program name with args.
2431set dummy msgfmt; ac_word=$2
2432echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2433echo "configure:2434: checking for $ac_word" >&5
c906108c
SS
2434if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2435 echo $ac_n "(cached) $ac_c" 1>&6
2436else
2437 case "$MSGFMT" in
2438 /*)
2439 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2440 ;;
2441 *)
2442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2443 for ac_dir in $PATH; do
2444 test -z "$ac_dir" && ac_dir=.
2445 if test -f $ac_dir/$ac_word; then
2446 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2447 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2448 break
2449 fi
2450 fi
2451 done
2452 IFS="$ac_save_ifs"
2453 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2454 ;;
2455esac
2456fi
2457MSGFMT="$ac_cv_path_MSGFMT"
2458if test -n "$MSGFMT"; then
2459 echo "$ac_t""$MSGFMT" 1>&6
2460else
2461 echo "$ac_t""no" 1>&6
2462fi
2463 if test "$MSGFMT" != "no"; then
2464 for ac_func in dcgettext
2465do
2466echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 2467echo "configure:2468: checking for $ac_func" >&5
c906108c
SS
2468if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2470else
2471 cat > conftest.$ac_ext <<EOF
27ca5dad 2472#line 2473 "configure"
c906108c
SS
2473#include "confdefs.h"
2474/* System header to define __stub macros and hopefully few prototypes,
2475 which can conflict with char $ac_func(); below. */
2476#include <assert.h>
2477/* Override any gcc2 internal prototype to avoid an error. */
2478/* We use char because int might match the return type of a gcc2
2479 builtin and then its argument prototype would still apply. */
2480char $ac_func();
2481
2482int main() {
2483
2484/* The GNU C library defines this for functions which it implements
2485 to always fail with ENOSYS. Some functions are actually named
2486 something starting with __ and the normal name is an alias. */
2487#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2488choke me
2489#else
2490$ac_func();
2491#endif
2492
2493; return 0; }
2494EOF
27ca5dad 2495if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2496 rm -rf conftest*
2497 eval "ac_cv_func_$ac_func=yes"
2498else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -rf conftest*
2502 eval "ac_cv_func_$ac_func=no"
2503fi
2504rm -f conftest*
2505fi
2506
2507if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2508 echo "$ac_t""yes" 1>&6
2509 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2510 cat >> confdefs.h <<EOF
2511#define $ac_tr_func 1
2512EOF
2513
2514else
2515 echo "$ac_t""no" 1>&6
2516fi
2517done
2518
2519 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2520set dummy gmsgfmt; ac_word=$2
2521echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2522echo "configure:2523: checking for $ac_word" >&5
c906108c
SS
2523if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2524 echo $ac_n "(cached) $ac_c" 1>&6
2525else
2526 case "$GMSGFMT" in
2527 /*)
2528 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2529 ;;
2530 ?:/*)
2531 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2532 ;;
2533 *)
2534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2535 ac_dummy="$PATH"
2536 for ac_dir in $ac_dummy; do
2537 test -z "$ac_dir" && ac_dir=.
2538 if test -f $ac_dir/$ac_word; then
2539 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2540 break
2541 fi
2542 done
2543 IFS="$ac_save_ifs"
2544 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2545 ;;
2546esac
2547fi
2548GMSGFMT="$ac_cv_path_GMSGFMT"
2549if test -n "$GMSGFMT"; then
2550 echo "$ac_t""$GMSGFMT" 1>&6
2551else
2552 echo "$ac_t""no" 1>&6
2553fi
2554
2555 # Extract the first word of "xgettext", so it can be a program name with args.
2556set dummy xgettext; ac_word=$2
2557echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2558echo "configure:2559: checking for $ac_word" >&5
c906108c
SS
2559if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2560 echo $ac_n "(cached) $ac_c" 1>&6
2561else
2562 case "$XGETTEXT" in
2563 /*)
2564 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2565 ;;
2566 *)
2567 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2568 for ac_dir in $PATH; do
2569 test -z "$ac_dir" && ac_dir=.
2570 if test -f $ac_dir/$ac_word; then
2571 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2572 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2573 break
2574 fi
2575 fi
2576 done
2577 IFS="$ac_save_ifs"
2578 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2579 ;;
2580esac
2581fi
2582XGETTEXT="$ac_cv_path_XGETTEXT"
2583if test -n "$XGETTEXT"; then
2584 echo "$ac_t""$XGETTEXT" 1>&6
2585else
2586 echo "$ac_t""no" 1>&6
2587fi
2588
2589 cat > conftest.$ac_ext <<EOF
27ca5dad 2590#line 2591 "configure"
c906108c
SS
2591#include "confdefs.h"
2592
2593int main() {
2594extern int _nl_msg_cat_cntr;
2595 return _nl_msg_cat_cntr
2596; return 0; }
2597EOF
27ca5dad 2598if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2599 rm -rf conftest*
2600 CATOBJEXT=.gmo
2601 DATADIRNAME=share
2602else
2603 echo "configure: failed program was:" >&5
2604 cat conftest.$ac_ext >&5
2605 rm -rf conftest*
2606 CATOBJEXT=.mo
2607 DATADIRNAME=lib
2608fi
2609rm -f conftest*
2610 INSTOBJEXT=.mo
2611 fi
2612 fi
2613
2614else
2615 echo "$ac_t""no" 1>&6
2616fi
2617
2618
2619
2620 if test "$CATOBJEXT" = "NONE"; then
2621 nls_cv_use_gnu_gettext=yes
2622 fi
2623 fi
2624
2625 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2626 INTLOBJS="\$(GETTOBJS)"
2627 # Extract the first word of "msgfmt", so it can be a program name with args.
2628set dummy msgfmt; ac_word=$2
2629echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2630echo "configure:2631: checking for $ac_word" >&5
c906108c
SS
2631if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2633else
2634 case "$MSGFMT" in
2635 /*)
2636 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2637 ;;
2638 *)
2639 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2640 for ac_dir in $PATH; do
2641 test -z "$ac_dir" && ac_dir=.
2642 if test -f $ac_dir/$ac_word; then
2643 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2644 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2645 break
2646 fi
2647 fi
2648 done
2649 IFS="$ac_save_ifs"
2650 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2651 ;;
2652esac
2653fi
2654MSGFMT="$ac_cv_path_MSGFMT"
2655if test -n "$MSGFMT"; then
2656 echo "$ac_t""$MSGFMT" 1>&6
2657else
2658 echo "$ac_t""no" 1>&6
2659fi
2660
2661 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2662set dummy gmsgfmt; ac_word=$2
2663echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2664echo "configure:2665: checking for $ac_word" >&5
c906108c
SS
2665if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
2667else
2668 case "$GMSGFMT" in
2669 /*)
2670 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2671 ;;
2672 ?:/*)
2673 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2674 ;;
2675 *)
2676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2677 ac_dummy="$PATH"
2678 for ac_dir in $ac_dummy; do
2679 test -z "$ac_dir" && ac_dir=.
2680 if test -f $ac_dir/$ac_word; then
2681 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2682 break
2683 fi
2684 done
2685 IFS="$ac_save_ifs"
2686 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2687 ;;
2688esac
2689fi
2690GMSGFMT="$ac_cv_path_GMSGFMT"
2691if test -n "$GMSGFMT"; then
2692 echo "$ac_t""$GMSGFMT" 1>&6
2693else
2694 echo "$ac_t""no" 1>&6
2695fi
2696
2697 # Extract the first word of "xgettext", so it can be a program name with args.
2698set dummy xgettext; ac_word=$2
2699echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 2700echo "configure:2701: checking for $ac_word" >&5
c906108c
SS
2701if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2702 echo $ac_n "(cached) $ac_c" 1>&6
2703else
2704 case "$XGETTEXT" in
2705 /*)
2706 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2707 ;;
2708 *)
2709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2710 for ac_dir in $PATH; do
2711 test -z "$ac_dir" && ac_dir=.
2712 if test -f $ac_dir/$ac_word; then
2713 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2714 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2715 break
2716 fi
2717 fi
2718 done
2719 IFS="$ac_save_ifs"
2720 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2721 ;;
2722esac
2723fi
2724XGETTEXT="$ac_cv_path_XGETTEXT"
2725if test -n "$XGETTEXT"; then
2726 echo "$ac_t""$XGETTEXT" 1>&6
2727else
2728 echo "$ac_t""no" 1>&6
2729fi
2730
2731
2732 USE_INCLUDED_LIBINTL=yes
2733 CATOBJEXT=.gmo
2734 INSTOBJEXT=.mo
2735 DATADIRNAME=share
2736 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2737 INTLLIBS=$INTLDEPS
2738 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2739 nls_cv_header_intl=libintl.h
2740 nls_cv_header_libgt=libgettext.h
2741 fi
2742
2743 if test "$XGETTEXT" != ":"; then
2744 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2745 : ;
2746 else
2747 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2748 XGETTEXT=":"
2749 fi
2750 fi
2751
2752 # We need to process the po/ directory.
2753 POSUB=po
2754 else
2755 DATADIRNAME=share
2756 nls_cv_header_intl=libintl.h
2757 nls_cv_header_libgt=libgettext.h
2758 fi
2759
2760 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2761 # because some of the sources are only built for this goal.
2762 if test "$PACKAGE" = gettext; then
2763 USE_NLS=yes
2764 USE_INCLUDED_LIBINTL=yes
2765 fi
2766
2767 for lang in $ALL_LINGUAS; do
2768 GMOFILES="$GMOFILES $lang.gmo"
2769 POFILES="$POFILES $lang.po"
2770 done
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785 if test "x$CATOBJEXT" != "x"; then
2786 if test "x$ALL_LINGUAS" = "x"; then
2787 LINGUAS=
2788 else
2789 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
27ca5dad 2790echo "configure:2791: checking for catalogs to be installed" >&5
c906108c
SS
2791 NEW_LINGUAS=
2792 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2793 case "$ALL_LINGUAS" in
2794 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2795 esac
2796 done
2797 LINGUAS=$NEW_LINGUAS
2798 echo "$ac_t""$LINGUAS" 1>&6
2799 fi
2800
2801 if test -n "$LINGUAS"; then
2802 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2803 fi
2804 fi
2805
2806 if test $ac_cv_header_locale_h = yes; then
2807 INCLUDE_LOCALE_H="#include <locale.h>"
2808 else
2809 INCLUDE_LOCALE_H="\
2810/* The system does not provide the header <locale.h>. Take care yourself. */"
2811 fi
2812
2813
2814 if test -f $srcdir/po2tbl.sed.in; then
2815 if test "$CATOBJEXT" = ".cat"; then
2816 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2817echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
27ca5dad 2818echo "configure:2819: checking for linux/version.h" >&5
c906108c
SS
2819if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
2821else
2822 cat > conftest.$ac_ext <<EOF
27ca5dad 2823#line 2824 "configure"
c906108c
SS
2824#include "confdefs.h"
2825#include <linux/version.h>
2826EOF
2827ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 2828{ (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2829ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2830if test -z "$ac_err"; then
2831 rm -rf conftest*
2832 eval "ac_cv_header_$ac_safe=yes"
2833else
2834 echo "$ac_err" >&5
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
2837 rm -rf conftest*
2838 eval "ac_cv_header_$ac_safe=no"
2839fi
2840rm -f conftest*
2841fi
2842if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2843 echo "$ac_t""yes" 1>&6
2844 msgformat=linux
2845else
2846 echo "$ac_t""no" 1>&6
2847msgformat=xopen
2848fi
2849
2850
2851 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2852 fi
2853 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2854 $srcdir/po2tbl.sed.in > po2tbl.sed
2855 fi
2856
2857 if test "$PACKAGE" = "gettext"; then
2858 GT_NO="#NO#"
2859 GT_YES=
2860 else
2861 GT_NO=
2862 GT_YES="#YES#"
2863 fi
2864
2865
2866
2867 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2868
2869
2870 l=
2871
2872
4536bbc6 2873 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2874 test -d po || mkdir po
2875 if test "x$srcdir" != "x."; then
2876 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2877 posrcprefix="$srcdir/"
2878 else
2879 posrcprefix="../$srcdir/"
2880 fi
2881 else
2882 posrcprefix="../"
2883 fi
2884 rm -f po/POTFILES
2885 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2886 < $srcdir/po/POTFILES.in > po/POTFILES
2887 fi
2888
0fbb3da7
TT
2889cat >> confdefs.h <<\EOF
2890#define PACKAGE "gdb"
2891EOF
2892
2893
5b5d99cf
JB
2894debugdir=${libdir}/debug
2895
2896# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2897if test "${with_separate_debug_dir+set}" = set; then
2898 withval="$with_separate_debug_dir"
2899 debugdir="${withval}"
2900fi
2901
2902
2903
2904 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2905 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2906 ac_define_dir=`eval echo $debugdir`
2907 ac_define_dir=`eval echo $ac_define_dir`
2908 cat >> confdefs.h <<EOF
2909#define DEBUGDIR "$ac_define_dir"
2910EOF
2911
2912
2913#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2914
2915
2916CONFIG_OBS=
66b965bb 2917CONFIG_LIB_OBS=
c906108c
SS
2918CONFIG_DEPS=
2919CONFIG_SRCS=
fb40c209
AC
2920CONFIG_INITS=
2921ENABLE_CFLAGS=
b3a90332
AC
2922CONFIG_ALL=
2923CONFIG_CLEAN=
e56ac5c3
AC
2924CONFIG_INSTALL=
2925CONFIG_UNINSTALL=
c906108c 2926
8dcde887 2927subdirs="doc testsuite"
96baa820 2928
8dcde887 2929configdirs=
96baa820 2930
27e9bf90 2931. $srcdir/configure.host
c906108c 2932
27e9bf90 2933. $srcdir/configure.tgt
c906108c 2934
27e9bf90
MK
2935# Fetch the default architecture and default target vector from BFD.
2936targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2937
27e9bf90
MK
2938# We only want the first architecture, so strip off the others if
2939# there is more than one.
2940targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2941
27e9bf90
MK
2942if test "x$targ_archs" != x; then
2943 cat >> confdefs.h <<EOF
2944#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2945EOF
2946
2947fi
27e9bf90
MK
2948if test "x$targ_defvec" != x; then
2949 cat >> confdefs.h <<EOF
2950#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2951EOF
2952
2953fi
c906108c 2954
8bb2c122
MK
2955if test "$program_transform_name" = s,x,x,; then
2956 program_transform_name=
2957else
2958 # Double any \ or $. echo might interpret backslashes.
2959 cat <<\EOF_SED > conftestsed
2960s,\\,\\\\,g; s,\$,$$,g
2961EOF_SED
2962 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2963 rm -f conftestsed
2964fi
2965test "$program_prefix" != NONE &&
2966 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2967# Use a double $ so make ignores it.
2968test "$program_suffix" != NONE &&
2969 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2970
2971# sed with no file args requires a program.
2972test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2973
2974
627af7ea
MK
2975# The CLI cannot be disabled yet, but may be in the future.
2976
2977# Enable CLI.
2978# Check whether --enable-gdbcli or --disable-gdbcli was given.
2979if test "${enable_gdbcli+set}" = set; then
2980 enableval="$enable_gdbcli"
2981 case $enableval in
2982 yes)
2983 ;;
2984 no)
2985 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2986 *)
2987 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2988 esac
2989else
2990 enable_gdbcli=yes
2991fi
2992
2993if test x"$enable_gdbcli" = xyes; then
2994 if test -d $srcdir/cli; then
2995 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2996 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2997 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2998 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2999 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3000 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3001 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3002 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3003 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3004 fi
3005fi
3006
3007# Enable MI.
3008# Check whether --enable-gdbmi or --disable-gdbmi was given.
3009if test "${enable_gdbmi+set}" = set; then
3010 enableval="$enable_gdbmi"
3011 case $enableval in
3012 yes | no)
3013 ;;
3014 *)
3015 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3016 esac
3017else
3018 enable_gdbmi=yes
3019fi
3020
3021if test x"$enable_gdbmi" = xyes; then
3022 if test -d $srcdir/mi; then
3023 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3024 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3025 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3026 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3027 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3028 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3029 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3030 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3031 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3032 fi
3033fi
3034
06825bd1
MK
3035# Enable TUI.
3036# Check whether --enable-tui or --disable-tui was given.
3037if test "${enable_tui+set}" = set; then
3038 enableval="$enable_tui"
3039 case $enableval in
3040 yes | no)
3041 ;;
3042 *)
3043 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3044 esac
3045fi
3046
3047if test x"$enable_tui" = xyes; then
3048 if test -d $srcdir/tui; then
3049 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3050 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3051 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3052 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3053 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3054 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3055 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3056 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3057 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3058 need_curses=yes
3059 fi
3060fi
3061
8ee53726
MK
3062# Enable gdbtk.
3063# Check whether --enable-gdbtk or --disable-gdbtk was given.
3064if test "${enable_gdbtk+set}" = set; then
3065 enableval="$enable_gdbtk"
3066 case $enableval in
3067 yes | no)
3068 ;;
3069 *)
3070 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3071 esac
3072else
3073 if test -d $srcdir/gdbtk; then
3074 enable_gdbtk=yes
3075 else
3076 enable_gdbtk=no
3077 fi
3078fi
3079
3080# We unconditionally disable gdbtk tests on selected platforms.
3081case $host_os in
3082 go32* | windows*)
3083 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3084 enable_gdbtk=no ;;
3085esac
3086
d28f9cdf
DJ
3087# Profiling support.
3088# Check whether --enable-profiling or --disable-profiling was given.
3089if test "${enable_profiling+set}" = set; then
3090 enableval="$enable_profiling"
3091 case $enableval in
3092 yes | no)
3093 ;;
3094 *)
3095 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3096 esac
3097else
3098 enable_profiling=no
3099fi
3100
3101
d9feb4e7
DJ
3102for ac_func in monstartup _mcleanup
3103do
3104echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 3105echo "configure:3106: checking for $ac_func" >&5
d9feb4e7 3106if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3107 echo $ac_n "(cached) $ac_c" 1>&6
3108else
3109 cat > conftest.$ac_ext <<EOF
27ca5dad 3110#line 3111 "configure"
d28f9cdf
DJ
3111#include "confdefs.h"
3112/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3113 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3114#include <assert.h>
3115/* Override any gcc2 internal prototype to avoid an error. */
3116/* We use char because int might match the return type of a gcc2
3117 builtin and then its argument prototype would still apply. */
d9feb4e7 3118char $ac_func();
d28f9cdf
DJ
3119
3120int main() {
3121
3122/* The GNU C library defines this for functions which it implements
3123 to always fail with ENOSYS. Some functions are actually named
3124 something starting with __ and the normal name is an alias. */
d9feb4e7 3125#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3126choke me
3127#else
d9feb4e7 3128$ac_func();
d28f9cdf
DJ
3129#endif
3130
3131; return 0; }
3132EOF
27ca5dad 3133if { (eval echo configure:3134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3134 rm -rf conftest*
d9feb4e7 3135 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3136else
3137 echo "configure: failed program was:" >&5
3138 cat conftest.$ac_ext >&5
3139 rm -rf conftest*
d9feb4e7 3140 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3141fi
3142rm -f conftest*
3143fi
3144
d9feb4e7 3145if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3146 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3147 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3148 cat >> confdefs.h <<EOF
3149#define $ac_tr_func 1
3150EOF
3151
d28f9cdf
DJ
3152else
3153 echo "$ac_t""no" 1>&6
d28f9cdf 3154fi
d9feb4e7 3155done
d28f9cdf 3156
b0b1c2c0 3157echo $ac_n "checking for _etext""... $ac_c" 1>&6
27ca5dad 3158echo "configure:3159: checking for _etext" >&5
b0b1c2c0
MK
3159if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3160 echo $ac_n "(cached) $ac_c" 1>&6
3161else
3162 cat > conftest.$ac_ext <<EOF
27ca5dad 3163#line 3164 "configure"
b0b1c2c0
MK
3164#include "confdefs.h"
3165#include <stdlib.h>
3166extern char _etext;
3167
3168int main() {
3169free (&_etext);
3170; return 0; }
3171EOF
27ca5dad 3172if { (eval echo configure:3173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3173 rm -rf conftest*
3174 ac_cv_var__etext=yes
3175else
3176 echo "configure: failed program was:" >&5
3177 cat conftest.$ac_ext >&5
3178 rm -rf conftest*
3179 ac_cv_var__etext=no
3180fi
3181rm -f conftest*
3182fi
3183
3184echo "$ac_t""$ac_cv_var__etext" 1>&6
3185if test $ac_cv_var__etext = yes; then
3186 cat >> confdefs.h <<\EOF
3187#define HAVE__ETEXT 1
3188EOF
3189
3190fi
d9feb4e7
DJ
3191if test "$enable_profiling" = yes ; then
3192 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3193 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3194 fi
3195 PROFILE_CFLAGS=-pg
3196 OLD_CFLAGS="$CFLAGS"
3197 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3198
d9feb4e7 3199 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
27ca5dad 3200echo "configure:3201: checking whether $CC supports -pg" >&5
d9feb4e7 3201if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3202 echo $ac_n "(cached) $ac_c" 1>&6
3203else
3204 cat > conftest.$ac_ext <<EOF
27ca5dad 3205#line 3206 "configure"
d28f9cdf 3206#include "confdefs.h"
d28f9cdf
DJ
3207
3208int main() {
d9feb4e7 3209int x;
d28f9cdf
DJ
3210; return 0; }
3211EOF
27ca5dad 3212if { (eval echo configure:3213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3213 rm -rf conftest*
d9feb4e7 3214 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3215else
3216 echo "configure: failed program was:" >&5
3217 cat conftest.$ac_ext >&5
3218 rm -rf conftest*
d9feb4e7 3219 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3220fi
3221rm -f conftest*
3222fi
3223
d9feb4e7 3224echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3225
d9feb4e7
DJ
3226 if test $ac_cv_cc_supports_pg = no; then
3227 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3228 fi
d28f9cdf
DJ
3229
3230 CFLAGS="$OLD_CFLAGS"
3231fi
3232
8bb2c122
MK
3233# --------------------- #
3234# Checks for programs. #
3235# --------------------- #
3236
27ca5dad 3237for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3238do
3239# Extract the first word of "$ac_prog", so it can be a program name with args.
3240set dummy $ac_prog; ac_word=$2
3241echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3242echo "configure:3243: checking for $ac_word" >&5
7a292a7a
SS
3243if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3244 echo $ac_n "(cached) $ac_c" 1>&6
3245else
3246 if test -n "$AWK"; then
3247 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3248else
3249 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3250 ac_dummy="$PATH"
3251 for ac_dir in $ac_dummy; do
3252 test -z "$ac_dir" && ac_dir=.
3253 if test -f $ac_dir/$ac_word; then
3254 ac_cv_prog_AWK="$ac_prog"
3255 break
3256 fi
3257 done
3258 IFS="$ac_save_ifs"
3259fi
3260fi
3261AWK="$ac_cv_prog_AWK"
3262if test -n "$AWK"; then
3263 echo "$ac_t""$AWK" 1>&6
3264else
3265 echo "$ac_t""no" 1>&6
3266fi
3267
3268test -n "$AWK" && break
3269done
3270
c906108c
SS
3271# Find a good install program. We prefer a C program (faster),
3272# so one script is as good as another. But avoid the broken or
3273# incompatible versions:
3274# SysV /etc/install, /usr/sbin/install
3275# SunOS /usr/etc/install
3276# IRIX /sbin/install
3277# AIX /bin/install
3278# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3279# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3280# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3281# ./install, which can be erroneously created by make from ./install.sh.
3282echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
27ca5dad 3283echo "configure:3284: checking for a BSD compatible install" >&5
c906108c
SS
3284if test -z "$INSTALL"; then
3285if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3286 echo $ac_n "(cached) $ac_c" 1>&6
3287else
3288 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3289 for ac_dir in $PATH; do
3290 # Account for people who put trailing slashes in PATH elements.
3291 case "$ac_dir/" in
3292 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3293 *)
3294 # OSF1 and SCO ODT 3.0 have their own names for install.
3295 # Don't use installbsd from OSF since it installs stuff as root
3296 # by default.
3297 for ac_prog in ginstall scoinst install; do
3298 if test -f $ac_dir/$ac_prog; then
3299 if test $ac_prog = install &&
3300 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3301 # AIX install. It has an incompatible calling convention.
3302 :
3303 else
3304 ac_cv_path_install="$ac_dir/$ac_prog -c"
3305 break 2
3306 fi
3307 fi
3308 done
3309 ;;
3310 esac
3311 done
3312 IFS="$ac_save_IFS"
3313
3314fi
3315 if test "${ac_cv_path_install+set}" = set; then
3316 INSTALL="$ac_cv_path_install"
3317 else
3318 # As a last resort, use the slow shell script. We don't cache a
3319 # path for INSTALL within a source directory, because that will
3320 # break other packages using the cache if that directory is
3321 # removed, or if the path is relative.
3322 INSTALL="$ac_install_sh"
3323 fi
3324fi
3325echo "$ac_t""$INSTALL" 1>&6
3326
3327# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3328# It thinks the first close brace ends the variable substitution.
3329test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3330
3331test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3332
3333test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3334
8bb2c122 3335echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
27ca5dad 3336echo "configure:3337: checking whether ln -s works" >&5
8bb2c122
MK
3337if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3338 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3339else
8bb2c122
MK
3340 rm -f conftestdata
3341if ln -s X conftestdata 2>/dev/null
3342then
3343 rm -f conftestdata
3344 ac_cv_prog_LN_S="ln -s"
3345else
3346 ac_cv_prog_LN_S=ln
3347fi
3348fi
3349LN_S="$ac_cv_prog_LN_S"
3350if test "$ac_cv_prog_LN_S" = "ln -s"; then
3351 echo "$ac_t""yes" 1>&6
3352else
3353 echo "$ac_t""no" 1>&6
c906108c
SS
3354fi
3355
8bb2c122
MK
3356# Extract the first word of "ranlib", so it can be a program name with args.
3357set dummy ranlib; ac_word=$2
c906108c 3358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3359echo "configure:3360: checking for $ac_word" >&5
8bb2c122 3360if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3361 echo $ac_n "(cached) $ac_c" 1>&6
3362else
8bb2c122
MK
3363 if test -n "$RANLIB"; then
3364 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3365else
3366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3367 ac_dummy="$PATH"
3368 for ac_dir in $ac_dummy; do
3369 test -z "$ac_dir" && ac_dir=.
3370 if test -f $ac_dir/$ac_word; then
8bb2c122 3371 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3372 break
3373 fi
3374 done
3375 IFS="$ac_save_ifs"
8bb2c122 3376 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3377fi
3378fi
8bb2c122
MK
3379RANLIB="$ac_cv_prog_RANLIB"
3380if test -n "$RANLIB"; then
3381 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3382else
3383 echo "$ac_t""no" 1>&6
3384fi
3385
8bb2c122
MK
3386for ac_prog in 'bison -y' byacc
3387do
3388# Extract the first word of "$ac_prog", so it can be a program name with args.
3389set dummy $ac_prog; ac_word=$2
c906108c 3390echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3391echo "configure:3392: checking for $ac_word" >&5
8bb2c122 3392if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3393 echo $ac_n "(cached) $ac_c" 1>&6
3394else
8bb2c122
MK
3395 if test -n "$YACC"; then
3396 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3397else
3398 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3399 ac_dummy="$PATH"
3400 for ac_dir in $ac_dummy; do
3401 test -z "$ac_dir" && ac_dir=.
3402 if test -f $ac_dir/$ac_word; then
8bb2c122 3403 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3404 break
3405 fi
3406 done
3407 IFS="$ac_save_ifs"
3408fi
3409fi
8bb2c122
MK
3410YACC="$ac_cv_prog_YACC"
3411if test -n "$YACC"; then
3412 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3413else
3414 echo "$ac_t""no" 1>&6
3415fi
3416
8bb2c122
MK
3417test -n "$YACC" && break
3418done
3419test -n "$YACC" || YACC="yacc"
c906108c 3420
8bb2c122
MK
3421
3422# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3423set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3424echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3425echo "configure:3426: checking for $ac_word" >&5
8bb2c122 3426if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3427 echo $ac_n "(cached) $ac_c" 1>&6
3428else
8bb2c122
MK
3429 if test -n "$AR"; then
3430 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3431else
3432 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3433 ac_dummy="$PATH"
3434 for ac_dir in $ac_dummy; do
3435 test -z "$ac_dir" && ac_dir=.
3436 if test -f $ac_dir/$ac_word; then
8bb2c122 3437 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3438 break
3439 fi
3440 done
3441 IFS="$ac_save_ifs"
8bb2c122 3442 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3443fi
3444fi
8bb2c122
MK
3445AR="$ac_cv_prog_AR"
3446if test -n "$AR"; then
3447 echo "$ac_t""$AR" 1>&6
c906108c
SS
3448else
3449 echo "$ac_t""no" 1>&6
3450fi
3451
8bb2c122 3452
c906108c 3453
95ca63c4
CF
3454# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3455set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3456echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3457echo "configure:3458: checking for $ac_word" >&5
95ca63c4
CF
3458if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3459 echo $ac_n "(cached) $ac_c" 1>&6
3460else
3461 if test -n "$DLLTOOL"; then
3462 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3463else
3464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3465 ac_dummy="$PATH"
3466 for ac_dir in $ac_dummy; do
3467 test -z "$ac_dir" && ac_dir=.
3468 if test -f $ac_dir/$ac_word; then
3469 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3470 break
3471 fi
3472 done
3473 IFS="$ac_save_ifs"
3474 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3475fi
3476fi
3477DLLTOOL="$ac_cv_prog_DLLTOOL"
3478if test -n "$DLLTOOL"; then
3479 echo "$ac_t""$DLLTOOL" 1>&6
3480else
3481 echo "$ac_t""no" 1>&6
3482fi
3483
3484
3485
3486# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3487set dummy ${ac_tool_prefix}windres; ac_word=$2
3488echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3489echo "configure:3490: checking for $ac_word" >&5
95ca63c4
CF
3490if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492else
3493 if test -n "$WINDRES"; then
3494 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3495else
3496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3497 ac_dummy="$PATH"
3498 for ac_dir in $ac_dummy; do
3499 test -z "$ac_dir" && ac_dir=.
3500 if test -f $ac_dir/$ac_word; then
3501 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3502 break
3503 fi
3504 done
3505 IFS="$ac_save_ifs"
3506 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3507fi
3508fi
3509WINDRES="$ac_cv_prog_WINDRES"
3510if test -n "$WINDRES"; then
3511 echo "$ac_t""$WINDRES" 1>&6
3512else
3513 echo "$ac_t""no" 1>&6
3514fi
3515
3516
3517
c906108c 3518
8bb2c122 3519# Needed for GNU/Hurd.
75c6e08a
MK
3520# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3521set dummy ${ac_tool_prefix}mig; ac_word=$2
3522echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
27ca5dad 3523echo "configure:3524: checking for $ac_word" >&5
75c6e08a
MK
3524if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526else
3527 if test -n "$MIG"; then
3528 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3529else
3530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3531 ac_dummy="$PATH"
3532 for ac_dir in $ac_dummy; do
3533 test -z "$ac_dir" && ac_dir=.
3534 if test -f $ac_dir/$ac_word; then
3535 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3536 break
3537 fi
3538 done
3539 IFS="$ac_save_ifs"
3540 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3541fi
3542fi
3543MIG="$ac_cv_prog_MIG"
3544if test -n "$MIG"; then
3545 echo "$ac_t""$MIG" 1>&6
3546else
3547 echo "$ac_t""no" 1>&6
3548fi
3549
3550
3551
3552
9a156167
MK
3553# ---------------------- #
3554# Checks for libraries. #
3555# ---------------------- #
3556
3557# We might need to link with -lm; most simulators need it.
3558echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
27ca5dad 3559echo "configure:3560: checking for main in -lm" >&5
9a156167
MK
3560ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3561if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3562 echo $ac_n "(cached) $ac_c" 1>&6
3563else
3564 ac_save_LIBS="$LIBS"
3565LIBS="-lm $LIBS"
3566cat > conftest.$ac_ext <<EOF
27ca5dad 3567#line 3568 "configure"
9a156167
MK
3568#include "confdefs.h"
3569
3570int main() {
3571main()
3572; return 0; }
3573EOF
27ca5dad 3574if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3575 rm -rf conftest*
3576 eval "ac_cv_lib_$ac_lib_var=yes"
3577else
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3580 rm -rf conftest*
3581 eval "ac_cv_lib_$ac_lib_var=no"
3582fi
3583rm -f conftest*
3584LIBS="$ac_save_LIBS"
3585
3586fi
3587if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3588 echo "$ac_t""yes" 1>&6
3589 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3590 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3591 cat >> confdefs.h <<EOF
3592#define $ac_tr_lib 1
3593EOF
3594
3595 LIBS="-lm $LIBS"
3596
3597else
3598 echo "$ac_t""no" 1>&6
3599fi
3600
3601
3602# We need to link with -lw to get `wctype' on Solaris before Solaris
3603# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3604# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3605# is known to have this problem). Therefore we avoid libw if we can.
3606echo $ac_n "checking for wctype""... $ac_c" 1>&6
27ca5dad 3607echo "configure:3608: checking for wctype" >&5
9a156167
MK
3608if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3609 echo $ac_n "(cached) $ac_c" 1>&6
3610else
3611 cat > conftest.$ac_ext <<EOF
27ca5dad 3612#line 3613 "configure"
9a156167
MK
3613#include "confdefs.h"
3614/* System header to define __stub macros and hopefully few prototypes,
3615 which can conflict with char wctype(); below. */
3616#include <assert.h>
3617/* Override any gcc2 internal prototype to avoid an error. */
3618/* We use char because int might match the return type of a gcc2
3619 builtin and then its argument prototype would still apply. */
3620char wctype();
3621
3622int main() {
3623
3624/* The GNU C library defines this for functions which it implements
3625 to always fail with ENOSYS. Some functions are actually named
3626 something starting with __ and the normal name is an alias. */
3627#if defined (__stub_wctype) || defined (__stub___wctype)
3628choke me
3629#else
3630wctype();
3631#endif
3632
3633; return 0; }
3634EOF
27ca5dad 3635if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3636 rm -rf conftest*
3637 eval "ac_cv_func_wctype=yes"
3638else
3639 echo "configure: failed program was:" >&5
3640 cat conftest.$ac_ext >&5
3641 rm -rf conftest*
3642 eval "ac_cv_func_wctype=no"
3643fi
3644rm -f conftest*
3645fi
3646
3647if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3648 echo "$ac_t""yes" 1>&6
3649 :
3650else
3651 echo "$ac_t""no" 1>&6
3652echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
27ca5dad 3653echo "configure:3654: checking for wctype in -lw" >&5
9a156167
MK
3654ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3655if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3656 echo $ac_n "(cached) $ac_c" 1>&6
3657else
3658 ac_save_LIBS="$LIBS"
3659LIBS="-lw $LIBS"
3660cat > conftest.$ac_ext <<EOF
27ca5dad 3661#line 3662 "configure"
9a156167
MK
3662#include "confdefs.h"
3663/* Override any gcc2 internal prototype to avoid an error. */
3664/* We use char because int might match the return type of a gcc2
3665 builtin and then its argument prototype would still apply. */
3666char wctype();
3667
3668int main() {
3669wctype()
3670; return 0; }
3671EOF
27ca5dad 3672if { (eval echo configure:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3673 rm -rf conftest*
3674 eval "ac_cv_lib_$ac_lib_var=yes"
3675else
3676 echo "configure: failed program was:" >&5
3677 cat conftest.$ac_ext >&5
3678 rm -rf conftest*
3679 eval "ac_cv_lib_$ac_lib_var=no"
3680fi
3681rm -f conftest*
3682LIBS="$ac_save_LIBS"
3683
3684fi
3685if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3686 echo "$ac_t""yes" 1>&6
3687 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3688 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3689 cat >> confdefs.h <<EOF
3690#define $ac_tr_lib 1
3691EOF
3692
3693 LIBS="-lw $LIBS"
3694
3695else
3696 echo "$ac_t""no" 1>&6
3697fi
3698
3699fi
3700
3701
3702# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3703
3704echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
27ca5dad 3705echo "configure:3706: checking for library containing socketpair" >&5
9a156167
MK
3706if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3707 echo $ac_n "(cached) $ac_c" 1>&6
3708else
3709 ac_func_search_save_LIBS="$LIBS"
3710ac_cv_search_socketpair="no"
3711cat > conftest.$ac_ext <<EOF
27ca5dad 3712#line 3713 "configure"
9a156167
MK
3713#include "confdefs.h"
3714/* Override any gcc2 internal prototype to avoid an error. */
3715/* We use char because int might match the return type of a gcc2
3716 builtin and then its argument prototype would still apply. */
3717char socketpair();
3718
3719int main() {
3720socketpair()
3721; return 0; }
3722EOF
27ca5dad 3723if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3724 rm -rf conftest*
3725 ac_cv_search_socketpair="none required"
3726else
3727 echo "configure: failed program was:" >&5
3728 cat conftest.$ac_ext >&5
3729fi
3730rm -f conftest*
3731test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3732LIBS="-l$i $ac_func_search_save_LIBS"
3733cat > conftest.$ac_ext <<EOF
27ca5dad 3734#line 3735 "configure"
9a156167
MK
3735#include "confdefs.h"
3736/* Override any gcc2 internal prototype to avoid an error. */
3737/* We use char because int might match the return type of a gcc2
3738 builtin and then its argument prototype would still apply. */
3739char socketpair();
3740
3741int main() {
3742socketpair()
3743; return 0; }
3744EOF
27ca5dad 3745if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3746 rm -rf conftest*
3747 ac_cv_search_socketpair="-l$i"
3748break
3749else
3750 echo "configure: failed program was:" >&5
3751 cat conftest.$ac_ext >&5
3752fi
3753rm -f conftest*
3754done
3755LIBS="$ac_func_search_save_LIBS"
3756fi
3757
3758echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3759if test "$ac_cv_search_socketpair" != "no"; then
3760 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3761
3762else :
3763
3764fi
3765
06825bd1
MK
3766# Since GDB uses Readline, we need termcap functionality, so we need
3767# to find a library that provides that. When GDB is configured with
3768# --enable-tui, we need full curses functionality.
3769#
3770# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3771# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3772# Makefile fragments. That's why we need to have `Hcurses' before
3773# `curses'. I don't see why we should use HP curses if a more
3774# standard curses is available, except that according to HP's
3775# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3776# HP-UX 10.10 and 10.20.
3777
3778if test "$need_curses" = yes; then
3779
3780echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
27ca5dad 3781echo "configure:3782: checking for library containing initscr" >&5
06825bd1
MK
3782if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3783 echo $ac_n "(cached) $ac_c" 1>&6
3784else
3785 ac_func_search_save_LIBS="$LIBS"
3786ac_cv_search_initscr="no"
3787cat > conftest.$ac_ext <<EOF
27ca5dad 3788#line 3789 "configure"
06825bd1
MK
3789#include "confdefs.h"
3790/* Override any gcc2 internal prototype to avoid an error. */
3791/* We use char because int might match the return type of a gcc2
3792 builtin and then its argument prototype would still apply. */
3793char initscr();
3794
3795int main() {
3796initscr()
3797; return 0; }
3798EOF
27ca5dad 3799if { (eval echo configure:3800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3800 rm -rf conftest*
3801 ac_cv_search_initscr="none required"
3802else
3803 echo "configure: failed program was:" >&5
3804 cat conftest.$ac_ext >&5
3805fi
3806rm -f conftest*
3807test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3808LIBS="-l$i $ac_func_search_save_LIBS"
3809cat > conftest.$ac_ext <<EOF
27ca5dad 3810#line 3811 "configure"
06825bd1
MK
3811#include "confdefs.h"
3812/* Override any gcc2 internal prototype to avoid an error. */
3813/* We use char because int might match the return type of a gcc2
3814 builtin and then its argument prototype would still apply. */
3815char initscr();
3816
3817int main() {
3818initscr()
3819; return 0; }
3820EOF
27ca5dad 3821if { (eval echo configure:3822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3822 rm -rf conftest*
3823 ac_cv_search_initscr="-l$i"
3824break
3825else
3826 echo "configure: failed program was:" >&5
3827 cat conftest.$ac_ext >&5
3828fi
3829rm -f conftest*
3830done
3831LIBS="$ac_func_search_save_LIBS"
3832fi
3833
3834echo "$ac_t""$ac_cv_search_initscr" 1>&6
3835if test "$ac_cv_search_initscr" != "no"; then
3836 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3837
3838else :
3839 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3840fi
3841fi
3842
3843case $host_os in
3844 cygwin*)
3845 if test -d $srcdir/libtermcap; then
3846 LIBS="../libtermcap/libtermcap.a $LIBS"
3847 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3848 fi ;;
3849 go32*)
3850 # ??? Is this really true?
3851 ac_cv_search_tgetent="none required"
3852 ;;
3853 aix*)
3854 # Readline prefers curses over termcap on AIX.
3855 # ??? Why?
3856
3857echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
27ca5dad 3858echo "configure:3859: checking for library containing tgetent" >&5
06825bd1
MK
3859if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 ac_func_search_save_LIBS="$LIBS"
3863ac_cv_search_tgetent="no"
3864cat > conftest.$ac_ext <<EOF
27ca5dad 3865#line 3866 "configure"
06825bd1
MK
3866#include "confdefs.h"
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
3870char tgetent();
3871
3872int main() {
3873tgetent()
3874; return 0; }
3875EOF
27ca5dad 3876if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3877 rm -rf conftest*
3878 ac_cv_search_tgetent="none required"
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882fi
3883rm -f conftest*
3884test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3885LIBS="-l$i $ac_func_search_save_LIBS"
3886cat > conftest.$ac_ext <<EOF
27ca5dad 3887#line 3888 "configure"
06825bd1
MK
3888#include "confdefs.h"
3889/* Override any gcc2 internal prototype to avoid an error. */
3890/* We use char because int might match the return type of a gcc2
3891 builtin and then its argument prototype would still apply. */
3892char tgetent();
3893
3894int main() {
3895tgetent()
3896; return 0; }
3897EOF
27ca5dad 3898if { (eval echo configure:3899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3899 rm -rf conftest*
3900 ac_cv_search_tgetent="-l$i"
3901break
3902else
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905fi
3906rm -f conftest*
3907done
3908LIBS="$ac_func_search_save_LIBS"
3909fi
3910
3911echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3912if test "$ac_cv_search_tgetent" != "no"; then
3913 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3914
3915else :
3916
3917fi
3918 ;;
3919esac
3920
3921# Note: We used to check for libtermlib and libterminfo too, but
3922# Readline doesn't, so I think we're safe with leaving them out.
3923
3924echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
27ca5dad 3925echo "configure:3926: checking for library containing tgetent" >&5
06825bd1
MK
3926if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3927 echo $ac_n "(cached) $ac_c" 1>&6
3928else
3929 ac_func_search_save_LIBS="$LIBS"
3930ac_cv_search_tgetent="no"
3931cat > conftest.$ac_ext <<EOF
27ca5dad 3932#line 3933 "configure"
06825bd1
MK
3933#include "confdefs.h"
3934/* Override any gcc2 internal prototype to avoid an error. */
3935/* We use char because int might match the return type of a gcc2
3936 builtin and then its argument prototype would still apply. */
3937char tgetent();
3938
3939int main() {
3940tgetent()
3941; return 0; }
3942EOF
27ca5dad 3943if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3944 rm -rf conftest*
3945 ac_cv_search_tgetent="none required"
3946else
3947 echo "configure: failed program was:" >&5
3948 cat conftest.$ac_ext >&5
3949fi
3950rm -f conftest*
3951test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3952LIBS="-l$i $ac_func_search_save_LIBS"
3953cat > conftest.$ac_ext <<EOF
27ca5dad 3954#line 3955 "configure"
06825bd1
MK
3955#include "confdefs.h"
3956/* Override any gcc2 internal prototype to avoid an error. */
3957/* We use char because int might match the return type of a gcc2
3958 builtin and then its argument prototype would still apply. */
3959char tgetent();
3960
3961int main() {
3962tgetent()
3963; return 0; }
3964EOF
27ca5dad 3965if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3966 rm -rf conftest*
3967 ac_cv_search_tgetent="-l$i"
3968break
3969else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972fi
3973rm -f conftest*
3974done
3975LIBS="$ac_func_search_save_LIBS"
3976fi
3977
3978echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3979if test "$ac_cv_search_tgetent" != "no"; then
3980 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3981
3982else :
3983
3984fi
3985
3986if test "$ac_cv_search_tgetent" = no; then
3987 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3988fi
3989
5ee754fc
MK
3990# ------------------------- #
3991# Checks for header files. #
3992# ------------------------- #
3993
3994ac_header_dirent=no
3995for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3996do
3997ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3998echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
27ca5dad 3999echo "configure:4000: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4000if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4001 echo $ac_n "(cached) $ac_c" 1>&6
4002else
4003 cat > conftest.$ac_ext <<EOF
27ca5dad 4004#line 4005 "configure"
c906108c
SS
4005#include "confdefs.h"
4006#include <sys/types.h>
5ee754fc
MK
4007#include <$ac_hdr>
4008int main() {
4009DIR *dirp = 0;
4010; return 0; }
4011EOF
27ca5dad 4012if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4013 rm -rf conftest*
4014 eval "ac_cv_header_dirent_$ac_safe=yes"
4015else
4016 echo "configure: failed program was:" >&5
4017 cat conftest.$ac_ext >&5
4018 rm -rf conftest*
4019 eval "ac_cv_header_dirent_$ac_safe=no"
4020fi
4021rm -f conftest*
4022fi
4023if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4024 echo "$ac_t""yes" 1>&6
4025 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4026 cat >> confdefs.h <<EOF
4027#define $ac_tr_hdr 1
4028EOF
4029 ac_header_dirent=$ac_hdr; break
4030else
4031 echo "$ac_t""no" 1>&6
4032fi
4033done
4034# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4035if test $ac_header_dirent = dirent.h; then
4036echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
27ca5dad 4037echo "configure:4038: checking for opendir in -ldir" >&5
5ee754fc
MK
4038ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4039if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 ac_save_LIBS="$LIBS"
4043LIBS="-ldir $LIBS"
4044cat > conftest.$ac_ext <<EOF
27ca5dad 4045#line 4046 "configure"
5ee754fc
MK
4046#include "confdefs.h"
4047/* Override any gcc2 internal prototype to avoid an error. */
4048/* We use char because int might match the return type of a gcc2
4049 builtin and then its argument prototype would still apply. */
4050char opendir();
c906108c
SS
4051
4052int main() {
5ee754fc 4053opendir()
c906108c
SS
4054; return 0; }
4055EOF
27ca5dad 4056if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4057 rm -rf conftest*
5ee754fc 4058 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4059else
4060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062 rm -rf conftest*
5ee754fc 4063 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4064fi
4065rm -f conftest*
5ee754fc
MK
4066LIBS="$ac_save_LIBS"
4067
4068fi
4069if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4070 echo "$ac_t""yes" 1>&6
4071 LIBS="$LIBS -ldir"
4072else
4073 echo "$ac_t""no" 1>&6
c906108c
SS
4074fi
4075
5ee754fc
MK
4076else
4077echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
27ca5dad 4078echo "configure:4079: checking for opendir in -lx" >&5
5ee754fc
MK
4079ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4080if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4081 echo $ac_n "(cached) $ac_c" 1>&6
4082else
4083 ac_save_LIBS="$LIBS"
4084LIBS="-lx $LIBS"
4085cat > conftest.$ac_ext <<EOF
27ca5dad 4086#line 4087 "configure"
5ee754fc
MK
4087#include "confdefs.h"
4088/* Override any gcc2 internal prototype to avoid an error. */
4089/* We use char because int might match the return type of a gcc2
4090 builtin and then its argument prototype would still apply. */
4091char opendir();
4092
4093int main() {
4094opendir()
4095; return 0; }
c906108c 4096EOF
27ca5dad 4097if { (eval echo configure:4098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4098 rm -rf conftest*
4099 eval "ac_cv_lib_$ac_lib_var=yes"
4100else
4101 echo "configure: failed program was:" >&5
4102 cat conftest.$ac_ext >&5
4103 rm -rf conftest*
4104 eval "ac_cv_lib_$ac_lib_var=no"
4105fi
4106rm -f conftest*
4107LIBS="$ac_save_LIBS"
c906108c 4108
5ee754fc
MK
4109fi
4110if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4111 echo "$ac_t""yes" 1>&6
4112 LIBS="$LIBS -lx"
4113else
4114 echo "$ac_t""no" 1>&6
4115fi
c906108c 4116
5ee754fc 4117fi
c906108c 4118
5ee754fc 4119echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
27ca5dad 4120echo "configure:4121: checking whether stat file-mode macros are broken" >&5
5ee754fc 4121if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4122 echo $ac_n "(cached) $ac_c" 1>&6
4123else
4124 cat > conftest.$ac_ext <<EOF
27ca5dad 4125#line 4126 "configure"
9608ab8b
MK
4126#include "confdefs.h"
4127#include <sys/types.h>
5ee754fc
MK
4128#include <sys/stat.h>
4129
4130#if defined(S_ISBLK) && defined(S_IFDIR)
4131# if S_ISBLK (S_IFDIR)
4132You lose.
4133# endif
4134#endif
4135
4136#if defined(S_ISBLK) && defined(S_IFCHR)
4137# if S_ISBLK (S_IFCHR)
4138You lose.
4139# endif
4140#endif
4141
4142#if defined(S_ISLNK) && defined(S_IFREG)
4143# if S_ISLNK (S_IFREG)
4144You lose.
4145# endif
4146#endif
4147
4148#if defined(S_ISSOCK) && defined(S_IFREG)
4149# if S_ISSOCK (S_IFREG)
4150You lose.
4151# endif
4152#endif
4153
9608ab8b 4154EOF
5ee754fc
MK
4155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4156 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4157 rm -rf conftest*
5ee754fc
MK
4158 ac_cv_header_stat_broken=yes
4159else
4160 rm -rf conftest*
4161 ac_cv_header_stat_broken=no
4162fi
4163rm -f conftest*
4164
4165fi
4166
4167echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4168if test $ac_cv_header_stat_broken = yes; then
4169 cat >> confdefs.h <<\EOF
4170#define STAT_MACROS_BROKEN 1
4171EOF
4172
4173fi
4174
4175echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
27ca5dad 4176echo "configure:4177: checking for ANSI C header files" >&5
5ee754fc
MK
4177if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4178 echo $ac_n "(cached) $ac_c" 1>&6
4179else
4180 cat > conftest.$ac_ext <<EOF
27ca5dad 4181#line 4182 "configure"
5ee754fc
MK
4182#include "confdefs.h"
4183#include <stdlib.h>
4184#include <stdarg.h>
4185#include <string.h>
4186#include <float.h>
4187EOF
4188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4189{ (eval echo configure:4190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4191if test -z "$ac_err"; then
4192 rm -rf conftest*
4193 ac_cv_header_stdc=yes
4194else
4195 echo "$ac_err" >&5
4196 echo "configure: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4198 rm -rf conftest*
4199 ac_cv_header_stdc=no
4200fi
4201rm -f conftest*
4202
4203if test $ac_cv_header_stdc = yes; then
4204 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4205cat > conftest.$ac_ext <<EOF
27ca5dad 4206#line 4207 "configure"
5ee754fc
MK
4207#include "confdefs.h"
4208#include <string.h>
4209EOF
4210if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4211 egrep "memchr" >/dev/null 2>&1; then
4212 :
4213else
4214 rm -rf conftest*
4215 ac_cv_header_stdc=no
4216fi
4217rm -f conftest*
4218
4219fi
4220
4221if test $ac_cv_header_stdc = yes; then
4222 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4223cat > conftest.$ac_ext <<EOF
27ca5dad 4224#line 4225 "configure"
5ee754fc
MK
4225#include "confdefs.h"
4226#include <stdlib.h>
4227EOF
4228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4229 egrep "free" >/dev/null 2>&1; then
4230 :
4231else
4232 rm -rf conftest*
4233 ac_cv_header_stdc=no
4234fi
4235rm -f conftest*
4236
4237fi
4238
4239if test $ac_cv_header_stdc = yes; then
4240 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4241if test "$cross_compiling" = yes; then
4242 :
4243else
4244 cat > conftest.$ac_ext <<EOF
27ca5dad 4245#line 4246 "configure"
5ee754fc
MK
4246#include "confdefs.h"
4247#include <ctype.h>
4248#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4249#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4250#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4251int main () { int i; for (i = 0; i < 256; i++)
4252if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4253exit (0); }
4254
4255EOF
27ca5dad 4256if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4257then
4258 :
9608ab8b 4259else
5ee754fc
MK
4260 echo "configure: failed program was:" >&5
4261 cat conftest.$ac_ext >&5
4262 rm -fr conftest*
4263 ac_cv_header_stdc=no
4264fi
4265rm -fr conftest*
4266fi
4267
4268fi
4269fi
4270
4271echo "$ac_t""$ac_cv_header_stdc" 1>&6
4272if test $ac_cv_header_stdc = yes; then
4273 cat >> confdefs.h <<\EOF
4274#define STDC_HEADERS 1
4275EOF
4276
4277fi
4278
4279for ac_hdr in link.h
4280do
4281ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4282echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4283echo "configure:4284: checking for $ac_hdr" >&5
5ee754fc
MK
4284if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4285 echo $ac_n "(cached) $ac_c" 1>&6
4286else
4287 cat > conftest.$ac_ext <<EOF
27ca5dad 4288#line 4289 "configure"
5ee754fc
MK
4289#include "confdefs.h"
4290#include <$ac_hdr>
4291EOF
4292ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4293{ (eval echo configure:4294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4294ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4295if test -z "$ac_err"; then
4296 rm -rf conftest*
4297 eval "ac_cv_header_$ac_safe=yes"
4298else
4299 echo "$ac_err" >&5
4300 echo "configure: failed program was:" >&5
4301 cat conftest.$ac_ext >&5
4302 rm -rf conftest*
4303 eval "ac_cv_header_$ac_safe=no"
4304fi
4305rm -f conftest*
4306fi
4307if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4308 echo "$ac_t""yes" 1>&6
4309 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4310 cat >> confdefs.h <<EOF
4311#define $ac_tr_hdr 1
4312EOF
4313
4314else
4315 echo "$ac_t""no" 1>&6
4316fi
4317done
4318
4319for ac_hdr in nlist.h
4320do
4321ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4322echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4323echo "configure:4324: checking for $ac_hdr" >&5
5ee754fc
MK
4324if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4325 echo $ac_n "(cached) $ac_c" 1>&6
4326else
4327 cat > conftest.$ac_ext <<EOF
27ca5dad 4328#line 4329 "configure"
5ee754fc
MK
4329#include "confdefs.h"
4330#include <$ac_hdr>
4331EOF
4332ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4333{ (eval echo configure:4334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4334ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4335if test -z "$ac_err"; then
4336 rm -rf conftest*
4337 eval "ac_cv_header_$ac_safe=yes"
4338else
4339 echo "$ac_err" >&5
4340 echo "configure: failed program was:" >&5
4341 cat conftest.$ac_ext >&5
4342 rm -rf conftest*
4343 eval "ac_cv_header_$ac_safe=no"
4344fi
4345rm -f conftest*
4346fi
4347if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4348 echo "$ac_t""yes" 1>&6
4349 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4350 cat >> confdefs.h <<EOF
4351#define $ac_tr_hdr 1
4352EOF
4353
4354else
4355 echo "$ac_t""no" 1>&6
4356fi
4357done
4358
4359for ac_hdr in poll.h sys/poll.h
4360do
4361ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4362echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4363echo "configure:4364: checking for $ac_hdr" >&5
5ee754fc
MK
4364if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4365 echo $ac_n "(cached) $ac_c" 1>&6
4366else
4367 cat > conftest.$ac_ext <<EOF
27ca5dad 4368#line 4369 "configure"
5ee754fc
MK
4369#include "confdefs.h"
4370#include <$ac_hdr>
4371EOF
4372ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4373{ (eval echo configure:4374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4374ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4375if test -z "$ac_err"; then
4376 rm -rf conftest*
4377 eval "ac_cv_header_$ac_safe=yes"
4378else
4379 echo "$ac_err" >&5
4380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
4382 rm -rf conftest*
4383 eval "ac_cv_header_$ac_safe=no"
4384fi
4385rm -f conftest*
4386fi
4387if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4388 echo "$ac_t""yes" 1>&6
4389 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4390 cat >> confdefs.h <<EOF
4391#define $ac_tr_hdr 1
4392EOF
4393
4394else
4395 echo "$ac_t""no" 1>&6
4396fi
4397done
4398
4399for ac_hdr in proc_service.h thread_db.h
4400do
4401ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4402echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4403echo "configure:4404: checking for $ac_hdr" >&5
5ee754fc
MK
4404if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4405 echo $ac_n "(cached) $ac_c" 1>&6
4406else
4407 cat > conftest.$ac_ext <<EOF
27ca5dad 4408#line 4409 "configure"
5ee754fc
MK
4409#include "confdefs.h"
4410#include <$ac_hdr>
4411EOF
4412ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4413{ (eval echo configure:4414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4414ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4415if test -z "$ac_err"; then
4416 rm -rf conftest*
4417 eval "ac_cv_header_$ac_safe=yes"
4418else
4419 echo "$ac_err" >&5
4420 echo "configure: failed program was:" >&5
4421 cat conftest.$ac_ext >&5
4422 rm -rf conftest*
4423 eval "ac_cv_header_$ac_safe=no"
4424fi
4425rm -f conftest*
4426fi
4427if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4428 echo "$ac_t""yes" 1>&6
4429 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4430 cat >> confdefs.h <<EOF
4431#define $ac_tr_hdr 1
4432EOF
4433
4434else
4435 echo "$ac_t""no" 1>&6
4436fi
4437done
4438
4439for ac_hdr in stddef.h
4440do
4441ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4442echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4443echo "configure:4444: checking for $ac_hdr" >&5
5ee754fc
MK
4444if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4445 echo $ac_n "(cached) $ac_c" 1>&6
4446else
4447 cat > conftest.$ac_ext <<EOF
27ca5dad 4448#line 4449 "configure"
5ee754fc
MK
4449#include "confdefs.h"
4450#include <$ac_hdr>
4451EOF
4452ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4453{ (eval echo configure:4454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4454ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4455if test -z "$ac_err"; then
4456 rm -rf conftest*
4457 eval "ac_cv_header_$ac_safe=yes"
4458else
4459 echo "$ac_err" >&5
4460 echo "configure: failed program was:" >&5
4461 cat conftest.$ac_ext >&5
4462 rm -rf conftest*
4463 eval "ac_cv_header_$ac_safe=no"
4464fi
4465rm -f conftest*
4466fi
4467if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4468 echo "$ac_t""yes" 1>&6
4469 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4470 cat >> confdefs.h <<EOF
4471#define $ac_tr_hdr 1
4472EOF
4473
4474else
4475 echo "$ac_t""no" 1>&6
4476fi
4477done
4478
4479for ac_hdr in stdlib.h
4480do
4481ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4482echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4483echo "configure:4484: checking for $ac_hdr" >&5
5ee754fc
MK
4484if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4485 echo $ac_n "(cached) $ac_c" 1>&6
4486else
4487 cat > conftest.$ac_ext <<EOF
27ca5dad 4488#line 4489 "configure"
5ee754fc
MK
4489#include "confdefs.h"
4490#include <$ac_hdr>
4491EOF
4492ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4493{ (eval echo configure:4494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4494ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4495if test -z "$ac_err"; then
4496 rm -rf conftest*
4497 eval "ac_cv_header_$ac_safe=yes"
4498else
4499 echo "$ac_err" >&5
4500 echo "configure: failed program was:" >&5
4501 cat conftest.$ac_ext >&5
4502 rm -rf conftest*
4503 eval "ac_cv_header_$ac_safe=no"
4504fi
4505rm -f conftest*
4506fi
4507if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4508 echo "$ac_t""yes" 1>&6
4509 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4510 cat >> confdefs.h <<EOF
4511#define $ac_tr_hdr 1
4512EOF
4513
4514else
4515 echo "$ac_t""no" 1>&6
4516fi
4517done
4518
4519for ac_hdr in stdint.h
4520do
4521ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4522echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4523echo "configure:4524: checking for $ac_hdr" >&5
5ee754fc
MK
4524if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4525 echo $ac_n "(cached) $ac_c" 1>&6
4526else
4527 cat > conftest.$ac_ext <<EOF
27ca5dad 4528#line 4529 "configure"
5ee754fc
MK
4529#include "confdefs.h"
4530#include <$ac_hdr>
4531EOF
4532ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4533{ (eval echo configure:4534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4534ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4535if test -z "$ac_err"; then
4536 rm -rf conftest*
4537 eval "ac_cv_header_$ac_safe=yes"
4538else
4539 echo "$ac_err" >&5
4540 echo "configure: failed program was:" >&5
4541 cat conftest.$ac_ext >&5
4542 rm -rf conftest*
4543 eval "ac_cv_header_$ac_safe=no"
4544fi
4545rm -f conftest*
4546fi
4547if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4548 echo "$ac_t""yes" 1>&6
4549 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4550 cat >> confdefs.h <<EOF
4551#define $ac_tr_hdr 1
4552EOF
4553
4554else
4555 echo "$ac_t""no" 1>&6
4556fi
4557done
4558
4559for ac_hdr in string.h memory.h strings.h
4560do
4561ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4562echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4563echo "configure:4564: checking for $ac_hdr" >&5
5ee754fc
MK
4564if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4565 echo $ac_n "(cached) $ac_c" 1>&6
4566else
4567 cat > conftest.$ac_ext <<EOF
27ca5dad 4568#line 4569 "configure"
5ee754fc
MK
4569#include "confdefs.h"
4570#include <$ac_hdr>
4571EOF
4572ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4573{ (eval echo configure:4574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4574ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4575if test -z "$ac_err"; then
4576 rm -rf conftest*
4577 eval "ac_cv_header_$ac_safe=yes"
4578else
4579 echo "$ac_err" >&5
4580 echo "configure: failed program was:" >&5
4581 cat conftest.$ac_ext >&5
4582 rm -rf conftest*
4583 eval "ac_cv_header_$ac_safe=no"
4584fi
4585rm -f conftest*
4586fi
4587if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4588 echo "$ac_t""yes" 1>&6
4589 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4590 cat >> confdefs.h <<EOF
4591#define $ac_tr_hdr 1
4592EOF
4593
4594else
4595 echo "$ac_t""no" 1>&6
4596fi
4597done
4598
4599for ac_hdr in sys/fault.h
4600do
4601ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4602echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4603echo "configure:4604: checking for $ac_hdr" >&5
5ee754fc
MK
4604if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4605 echo $ac_n "(cached) $ac_c" 1>&6
4606else
4607 cat > conftest.$ac_ext <<EOF
27ca5dad 4608#line 4609 "configure"
5ee754fc
MK
4609#include "confdefs.h"
4610#include <$ac_hdr>
4611EOF
4612ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4613{ (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4614ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4615if test -z "$ac_err"; then
4616 rm -rf conftest*
4617 eval "ac_cv_header_$ac_safe=yes"
4618else
4619 echo "$ac_err" >&5
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
4623 eval "ac_cv_header_$ac_safe=no"
4624fi
4625rm -f conftest*
4626fi
4627if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4628 echo "$ac_t""yes" 1>&6
4629 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4630 cat >> confdefs.h <<EOF
4631#define $ac_tr_hdr 1
4632EOF
4633
4634else
4635 echo "$ac_t""no" 1>&6
4636fi
4637done
4638
4639for ac_hdr in sys/file.h
4640do
4641ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4642echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4643echo "configure:4644: checking for $ac_hdr" >&5
5ee754fc
MK
4644if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4645 echo $ac_n "(cached) $ac_c" 1>&6
4646else
4647 cat > conftest.$ac_ext <<EOF
27ca5dad 4648#line 4649 "configure"
5ee754fc
MK
4649#include "confdefs.h"
4650#include <$ac_hdr>
4651EOF
4652ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4653{ (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4654ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4655if test -z "$ac_err"; then
4656 rm -rf conftest*
4657 eval "ac_cv_header_$ac_safe=yes"
4658else
4659 echo "$ac_err" >&5
4660 echo "configure: failed program was:" >&5
4661 cat conftest.$ac_ext >&5
4662 rm -rf conftest*
4663 eval "ac_cv_header_$ac_safe=no"
4664fi
4665rm -f conftest*
4666fi
4667if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4668 echo "$ac_t""yes" 1>&6
4669 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4670 cat >> confdefs.h <<EOF
4671#define $ac_tr_hdr 1
4672EOF
4673
4674else
4675 echo "$ac_t""no" 1>&6
4676fi
4677done
4678
4679for ac_hdr in sys/filio.h
4680do
4681ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4682echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4683echo "configure:4684: checking for $ac_hdr" >&5
5ee754fc
MK
4684if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4685 echo $ac_n "(cached) $ac_c" 1>&6
4686else
4687 cat > conftest.$ac_ext <<EOF
27ca5dad 4688#line 4689 "configure"
5ee754fc
MK
4689#include "confdefs.h"
4690#include <$ac_hdr>
4691EOF
4692ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4693{ (eval echo configure:4694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4694ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4695if test -z "$ac_err"; then
4696 rm -rf conftest*
4697 eval "ac_cv_header_$ac_safe=yes"
4698else
4699 echo "$ac_err" >&5
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -rf conftest*
4703 eval "ac_cv_header_$ac_safe=no"
4704fi
4705rm -f conftest*
4706fi
4707if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4708 echo "$ac_t""yes" 1>&6
4709 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4710 cat >> confdefs.h <<EOF
4711#define $ac_tr_hdr 1
4712EOF
4713
4714else
4715 echo "$ac_t""no" 1>&6
4716fi
4717done
4718
4719for ac_hdr in sys/ioctl.h
4720do
4721ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4722echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4723echo "configure:4724: checking for $ac_hdr" >&5
5ee754fc
MK
4724if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4725 echo $ac_n "(cached) $ac_c" 1>&6
4726else
4727 cat > conftest.$ac_ext <<EOF
27ca5dad 4728#line 4729 "configure"
5ee754fc
MK
4729#include "confdefs.h"
4730#include <$ac_hdr>
4731EOF
4732ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4733{ (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4734ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4735if test -z "$ac_err"; then
4736 rm -rf conftest*
4737 eval "ac_cv_header_$ac_safe=yes"
4738else
4739 echo "$ac_err" >&5
4740 echo "configure: failed program was:" >&5
4741 cat conftest.$ac_ext >&5
4742 rm -rf conftest*
4743 eval "ac_cv_header_$ac_safe=no"
4744fi
4745rm -f conftest*
4746fi
4747if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4748 echo "$ac_t""yes" 1>&6
4749 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4750 cat >> confdefs.h <<EOF
4751#define $ac_tr_hdr 1
4752EOF
4753
4754else
4755 echo "$ac_t""no" 1>&6
4756fi
4757done
4758
4759for ac_hdr in sys/param.h
4760do
4761ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4762echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4763echo "configure:4764: checking for $ac_hdr" >&5
5ee754fc
MK
4764if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
4766else
4767 cat > conftest.$ac_ext <<EOF
27ca5dad 4768#line 4769 "configure"
5ee754fc
MK
4769#include "confdefs.h"
4770#include <$ac_hdr>
4771EOF
4772ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4773{ (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4774ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4775if test -z "$ac_err"; then
4776 rm -rf conftest*
4777 eval "ac_cv_header_$ac_safe=yes"
4778else
4779 echo "$ac_err" >&5
4780 echo "configure: failed program was:" >&5
4781 cat conftest.$ac_ext >&5
4782 rm -rf conftest*
4783 eval "ac_cv_header_$ac_safe=no"
4784fi
4785rm -f conftest*
4786fi
4787if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4788 echo "$ac_t""yes" 1>&6
4789 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4790 cat >> confdefs.h <<EOF
4791#define $ac_tr_hdr 1
4792EOF
4793
4794else
4795 echo "$ac_t""no" 1>&6
4796fi
4797done
4798
4799for ac_hdr in sys/proc.h
4800do
4801ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4802echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4803echo "configure:4804: checking for $ac_hdr" >&5
5ee754fc
MK
4804if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4805 echo $ac_n "(cached) $ac_c" 1>&6
4806else
4807 cat > conftest.$ac_ext <<EOF
27ca5dad 4808#line 4809 "configure"
5ee754fc
MK
4809#include "confdefs.h"
4810#include <$ac_hdr>
4811EOF
4812ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4813{ (eval echo configure:4814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4814ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4815if test -z "$ac_err"; then
4816 rm -rf conftest*
4817 eval "ac_cv_header_$ac_safe=yes"
4818else
4819 echo "$ac_err" >&5
4820 echo "configure: failed program was:" >&5
4821 cat conftest.$ac_ext >&5
4822 rm -rf conftest*
4823 eval "ac_cv_header_$ac_safe=no"
4824fi
4825rm -f conftest*
4826fi
4827if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4828 echo "$ac_t""yes" 1>&6
4829 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4830 cat >> confdefs.h <<EOF
4831#define $ac_tr_hdr 1
4832EOF
4833
4834else
4835 echo "$ac_t""no" 1>&6
4836fi
4837done
4838
4839for ac_hdr in sys/procfs.h
4840do
4841ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4842echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4843echo "configure:4844: checking for $ac_hdr" >&5
5ee754fc
MK
4844if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4845 echo $ac_n "(cached) $ac_c" 1>&6
4846else
4847 cat > conftest.$ac_ext <<EOF
27ca5dad 4848#line 4849 "configure"
5ee754fc
MK
4849#include "confdefs.h"
4850#include <$ac_hdr>
4851EOF
4852ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4853{ (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4854ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4855if test -z "$ac_err"; then
4856 rm -rf conftest*
4857 eval "ac_cv_header_$ac_safe=yes"
4858else
4859 echo "$ac_err" >&5
4860 echo "configure: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4862 rm -rf conftest*
4863 eval "ac_cv_header_$ac_safe=no"
4864fi
4865rm -f conftest*
4866fi
4867if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4868 echo "$ac_t""yes" 1>&6
4869 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4870 cat >> confdefs.h <<EOF
4871#define $ac_tr_hdr 1
4872EOF
4873
4874else
4875 echo "$ac_t""no" 1>&6
4876fi
4877done
4878
4879for ac_hdr in sys/ptrace.h ptrace.h
4880do
4881ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4882echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4883echo "configure:4884: checking for $ac_hdr" >&5
5ee754fc
MK
4884if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4885 echo $ac_n "(cached) $ac_c" 1>&6
4886else
4887 cat > conftest.$ac_ext <<EOF
27ca5dad 4888#line 4889 "configure"
5ee754fc
MK
4889#include "confdefs.h"
4890#include <$ac_hdr>
4891EOF
4892ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4893{ (eval echo configure:4894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4894ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4895if test -z "$ac_err"; then
4896 rm -rf conftest*
4897 eval "ac_cv_header_$ac_safe=yes"
4898else
4899 echo "$ac_err" >&5
4900 echo "configure: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
4902 rm -rf conftest*
4903 eval "ac_cv_header_$ac_safe=no"
4904fi
4905rm -f conftest*
4906fi
4907if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4908 echo "$ac_t""yes" 1>&6
4909 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4910 cat >> confdefs.h <<EOF
4911#define $ac_tr_hdr 1
4912EOF
4913
4914else
4915 echo "$ac_t""no" 1>&6
4916fi
4917done
4918
4919for ac_hdr in sys/reg.h sys/debugreg.h
4920do
4921ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4922echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4923echo "configure:4924: checking for $ac_hdr" >&5
5ee754fc
MK
4924if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4925 echo $ac_n "(cached) $ac_c" 1>&6
4926else
4927 cat > conftest.$ac_ext <<EOF
27ca5dad 4928#line 4929 "configure"
5ee754fc
MK
4929#include "confdefs.h"
4930#include <$ac_hdr>
4931EOF
4932ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4933{ (eval echo configure:4934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4934ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4935if test -z "$ac_err"; then
4936 rm -rf conftest*
4937 eval "ac_cv_header_$ac_safe=yes"
4938else
4939 echo "$ac_err" >&5
4940 echo "configure: failed program was:" >&5
4941 cat conftest.$ac_ext >&5
4942 rm -rf conftest*
4943 eval "ac_cv_header_$ac_safe=no"
4944fi
4945rm -f conftest*
4946fi
4947if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4948 echo "$ac_t""yes" 1>&6
4949 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4950 cat >> confdefs.h <<EOF
4951#define $ac_tr_hdr 1
4952EOF
4953
4954else
4955 echo "$ac_t""no" 1>&6
4956fi
4957done
4958
4959for ac_hdr in sys/select.h
4960do
4961ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4962echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 4963echo "configure:4964: checking for $ac_hdr" >&5
5ee754fc
MK
4964if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966else
4967 cat > conftest.$ac_ext <<EOF
27ca5dad 4968#line 4969 "configure"
5ee754fc
MK
4969#include "confdefs.h"
4970#include <$ac_hdr>
4971EOF
4972ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 4973{ (eval echo configure:4974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4974ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4975if test -z "$ac_err"; then
4976 rm -rf conftest*
4977 eval "ac_cv_header_$ac_safe=yes"
4978else
4979 echo "$ac_err" >&5
4980 echo "configure: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982 rm -rf conftest*
4983 eval "ac_cv_header_$ac_safe=no"
4984fi
4985rm -f conftest*
4986fi
4987if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4988 echo "$ac_t""yes" 1>&6
4989 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4990 cat >> confdefs.h <<EOF
4991#define $ac_tr_hdr 1
4992EOF
4993
4994else
4995 echo "$ac_t""no" 1>&6
4996fi
4997done
4998
4999for ac_hdr in sys/syscall.h
5000do
5001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5003echo "configure:5004: checking for $ac_hdr" >&5
5ee754fc
MK
5004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5005 echo $ac_n "(cached) $ac_c" 1>&6
5006else
5007 cat > conftest.$ac_ext <<EOF
27ca5dad 5008#line 5009 "configure"
5ee754fc
MK
5009#include "confdefs.h"
5010#include <$ac_hdr>
5011EOF
5012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5013{ (eval echo configure:5014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5014ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5015if test -z "$ac_err"; then
5016 rm -rf conftest*
5017 eval "ac_cv_header_$ac_safe=yes"
5018else
5019 echo "$ac_err" >&5
5020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 rm -rf conftest*
5023 eval "ac_cv_header_$ac_safe=no"
5024fi
5025rm -f conftest*
5026fi
5027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5028 echo "$ac_t""yes" 1>&6
5029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5030 cat >> confdefs.h <<EOF
5031#define $ac_tr_hdr 1
5032EOF
5033
5034else
5035 echo "$ac_t""no" 1>&6
5036fi
5037done
5038
5039for ac_hdr in sys/user.h
5040do
5041ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5042echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5043echo "configure:5044: checking for $ac_hdr" >&5
5ee754fc
MK
5044if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5045 echo $ac_n "(cached) $ac_c" 1>&6
5046else
5047 cat > conftest.$ac_ext <<EOF
27ca5dad 5048#line 5049 "configure"
5ee754fc
MK
5049#include "confdefs.h"
5050#include <$ac_hdr>
5051EOF
5052ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5053{ (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5054ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5055if test -z "$ac_err"; then
5056 rm -rf conftest*
5057 eval "ac_cv_header_$ac_safe=yes"
5058else
5059 echo "$ac_err" >&5
5060 echo "configure: failed program was:" >&5
5061 cat conftest.$ac_ext >&5
5062 rm -rf conftest*
5063 eval "ac_cv_header_$ac_safe=no"
5064fi
5065rm -f conftest*
5066fi
5067if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5068 echo "$ac_t""yes" 1>&6
5069 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5070 cat >> confdefs.h <<EOF
5071#define $ac_tr_hdr 1
5072EOF
5073
5074else
5075 echo "$ac_t""no" 1>&6
5076fi
5077done
5078
5079for ac_hdr in sys/wait.h wait.h
5080do
5081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5083echo "configure:5084: checking for $ac_hdr" >&5
5ee754fc
MK
5084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5085 echo $ac_n "(cached) $ac_c" 1>&6
5086else
5087 cat > conftest.$ac_ext <<EOF
27ca5dad 5088#line 5089 "configure"
5ee754fc
MK
5089#include "confdefs.h"
5090#include <$ac_hdr>
5091EOF
5092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5093{ (eval echo configure:5094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5095if test -z "$ac_err"; then
5096 rm -rf conftest*
5097 eval "ac_cv_header_$ac_safe=yes"
5098else
5099 echo "$ac_err" >&5
9608ab8b
MK
5100 echo "configure: failed program was:" >&5
5101 cat conftest.$ac_ext >&5
5102 rm -rf conftest*
5ee754fc 5103 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5104fi
5105rm -f conftest*
5106fi
5ee754fc 5107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5108 echo "$ac_t""yes" 1>&6
5109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5110 cat >> confdefs.h <<EOF
5111#define $ac_tr_hdr 1
5112EOF
5ee754fc 5113
9608ab8b
MK
5114else
5115 echo "$ac_t""no" 1>&6
5116fi
5117done
5ee754fc
MK
5118
5119for ac_hdr in termios.h termio.h sgtty.h
5120do
5121ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5122echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5123echo "configure:5124: checking for $ac_hdr" >&5
5ee754fc 5124if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5125 echo $ac_n "(cached) $ac_c" 1>&6
5126else
5ee754fc 5127 cat > conftest.$ac_ext <<EOF
27ca5dad 5128#line 5129 "configure"
9608ab8b 5129#include "confdefs.h"
5ee754fc 5130#include <$ac_hdr>
9608ab8b 5131EOF
5ee754fc 5132ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5133{ (eval echo configure:5134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5134ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5135if test -z "$ac_err"; then
9608ab8b 5136 rm -rf conftest*
5ee754fc 5137 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5138else
5ee754fc 5139 echo "$ac_err" >&5
9608ab8b
MK
5140 echo "configure: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 rm -rf conftest*
5ee754fc 5143 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5144fi
5145rm -f conftest*
9608ab8b 5146fi
5ee754fc 5147if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5148 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5149 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5150 cat >> confdefs.h <<EOF
5151#define $ac_tr_hdr 1
5152EOF
5153
9608ab8b
MK
5154else
5155 echo "$ac_t""no" 1>&6
5156fi
5ee754fc 5157done
9608ab8b 5158
5ee754fc
MK
5159for ac_hdr in unistd.h
5160do
5161ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5162echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5163echo "configure:5164: checking for $ac_hdr" >&5
5ee754fc 5164if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5165 echo $ac_n "(cached) $ac_c" 1>&6
5166else
5ee754fc 5167 cat > conftest.$ac_ext <<EOF
27ca5dad 5168#line 5169 "configure"
9608ab8b 5169#include "confdefs.h"
5ee754fc 5170#include <$ac_hdr>
9608ab8b 5171EOF
5ee754fc 5172ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5173{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5174ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5175if test -z "$ac_err"; then
9608ab8b 5176 rm -rf conftest*
5ee754fc 5177 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5178else
5ee754fc 5179 echo "$ac_err" >&5
9608ab8b
MK
5180 echo "configure: failed program was:" >&5
5181 cat conftest.$ac_ext >&5
5182 rm -rf conftest*
5ee754fc 5183 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5184fi
5185rm -f conftest*
9608ab8b 5186fi
5ee754fc 5187if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5188 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5189 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5190 cat >> confdefs.h <<EOF
5191#define $ac_tr_hdr 1
5192EOF
5193
9608ab8b
MK
5194else
5195 echo "$ac_t""no" 1>&6
5196fi
5ee754fc 5197done
9608ab8b 5198
9608ab8b 5199
5ee754fc
MK
5200# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5201# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5202# think that we don't have <curses.h> if we're using GCC.
5203case $host_os in
5204 solaris2.[78])
5205 if test "$GCC" = yes; then
5206 cat >> confdefs.h <<\EOF
5207#define _MSE_INT_H 1
5208EOF
5209
5210 fi ;;
5211esac
5212for ac_hdr in curses.h ncurses.h term.h
5213do
5214ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5215echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5216echo "configure:5217: checking for $ac_hdr" >&5
5ee754fc 5217if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5218 echo $ac_n "(cached) $ac_c" 1>&6
5219else
5220 cat > conftest.$ac_ext <<EOF
27ca5dad 5221#line 5222 "configure"
c906108c 5222#include "confdefs.h"
5ee754fc 5223#include <$ac_hdr>
c906108c
SS
5224EOF
5225ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5226{ (eval echo configure:5227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5227ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5228if test -z "$ac_err"; then
5229 rm -rf conftest*
5ee754fc 5230 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5231else
5232 echo "$ac_err" >&5
5233 echo "configure: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
5235 rm -rf conftest*
5ee754fc 5236 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5237fi
5238rm -f conftest*
c906108c 5239fi
5ee754fc
MK
5240if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5241 echo "$ac_t""yes" 1>&6
5242 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5243 cat >> confdefs.h <<EOF
5244#define $ac_tr_hdr 1
c906108c 5245EOF
5ee754fc 5246
c906108c 5247else
5ee754fc 5248 echo "$ac_t""no" 1>&6
c906108c 5249fi
5ee754fc 5250done
c906108c
SS
5251
5252
5ee754fc
MK
5253# FIXME: kettenis/20030102: In most cases we include these
5254# unconditionally, so what's the point in checking these?
5255for ac_hdr in ctype.h time.h
c906108c
SS
5256do
5257ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5258echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5259echo "configure:5260: checking for $ac_hdr" >&5
c906108c
SS
5260if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5261 echo $ac_n "(cached) $ac_c" 1>&6
5262else
5263 cat > conftest.$ac_ext <<EOF
27ca5dad 5264#line 5265 "configure"
c906108c
SS
5265#include "confdefs.h"
5266#include <$ac_hdr>
5267EOF
5268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5269{ (eval echo configure:5270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5271if test -z "$ac_err"; then
5272 rm -rf conftest*
5273 eval "ac_cv_header_$ac_safe=yes"
5274else
5275 echo "$ac_err" >&5
5276 echo "configure: failed program was:" >&5
5277 cat conftest.$ac_ext >&5
5278 rm -rf conftest*
5279 eval "ac_cv_header_$ac_safe=no"
5280fi
5281rm -f conftest*
5282fi
5283if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5284 echo "$ac_t""yes" 1>&6
5285 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5286 cat >> confdefs.h <<EOF
5287#define $ac_tr_hdr 1
5288EOF
5289
5290else
5291 echo "$ac_t""no" 1>&6
5292fi
5293done
5294
5ee754fc
MK
5295
5296# ------------------ #
5297# Checks for types. #
5298# ------------------ #
5299
5300echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
27ca5dad 5301echo "configure:5302: checking return type of signal handlers" >&5
5ee754fc 5302if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5303 echo $ac_n "(cached) $ac_c" 1>&6
5304else
5305 cat > conftest.$ac_ext <<EOF
27ca5dad 5306#line 5307 "configure"
c906108c
SS
5307#include "confdefs.h"
5308#include <sys/types.h>
5ee754fc
MK
5309#include <signal.h>
5310#ifdef signal
5311#undef signal
c906108c 5312#endif
5ee754fc
MK
5313#ifdef __cplusplus
5314extern "C" void (*signal (int, void (*)(int)))(int);
5315#else
5316void (*signal ()) ();
c906108c
SS
5317#endif
5318
5ee754fc
MK
5319int main() {
5320int i;
5321; return 0; }
c906108c 5322EOF
27ca5dad 5323if { (eval echo configure:5324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5324 rm -rf conftest*
5ee754fc 5325 ac_cv_type_signal=void
c906108c 5326else
5ee754fc
MK
5327 echo "configure: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
c906108c 5329 rm -rf conftest*
5ee754fc 5330 ac_cv_type_signal=int
c906108c
SS
5331fi
5332rm -f conftest*
c906108c
SS
5333fi
5334
5ee754fc
MK
5335echo "$ac_t""$ac_cv_type_signal" 1>&6
5336cat >> confdefs.h <<EOF
5337#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5338EOF
5339
c906108c
SS
5340
5341
5ee754fc
MK
5342# ------------------------------------- #
5343# Checks for compiler characteristics. #
5344# ------------------------------------- #
5345
c906108c 5346echo $ac_n "checking for working const""... $ac_c" 1>&6
27ca5dad 5347echo "configure:5348: checking for working const" >&5
c906108c
SS
5348if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5349 echo $ac_n "(cached) $ac_c" 1>&6
5350else
5351 cat > conftest.$ac_ext <<EOF
27ca5dad 5352#line 5353 "configure"
c906108c
SS
5353#include "confdefs.h"
5354
5355int main() {
5356
5357/* Ultrix mips cc rejects this. */
5358typedef int charset[2]; const charset x;
5359/* SunOS 4.1.1 cc rejects this. */
5360char const *const *ccp;
5361char **p;
5362/* NEC SVR4.0.2 mips cc rejects this. */
5363struct point {int x, y;};
5364static struct point const zero = {0,0};
5365/* AIX XL C 1.02.0.0 rejects this.
5366 It does not let you subtract one const X* pointer from another in an arm
5367 of an if-expression whose if-part is not a constant expression */
5368const char *g = "string";
5369ccp = &g + (g ? g-g : 0);
5370/* HPUX 7.0 cc rejects these. */
5371++ccp;
5372p = (char**) ccp;
5373ccp = (char const *const *) p;
5374{ /* SCO 3.2v4 cc rejects this. */
5375 char *t;
5376 char const *s = 0 ? (char *) 0 : (char const *) 0;
5377
5378 *t++ = 0;
5379}
5380{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5381 int x[] = {25, 17};
5382 const int *foo = &x[0];
5383 ++foo;
5384}
5385{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5386 typedef const int *iptr;
5387 iptr p = 0;
5388 ++p;
5389}
5390{ /* AIX XL C 1.02.0.0 rejects this saying
5391 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5392 struct s { int j; const int *ap[3]; };
5393 struct s *b; b->j = 5;
5394}
5395{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5396 const int foo = 10;
5397}
5398
5399; return 0; }
5400EOF
27ca5dad 5401if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5402 rm -rf conftest*
5403 ac_cv_c_const=yes
5404else
5405 echo "configure: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
5407 rm -rf conftest*
5408 ac_cv_c_const=no
5409fi
5410rm -f conftest*
5411fi
5412
5413echo "$ac_t""$ac_cv_c_const" 1>&6
5414if test $ac_cv_c_const = no; then
5415 cat >> confdefs.h <<\EOF
5416#define const
5417EOF
5418
5419fi
5420
bce58c09 5421echo $ac_n "checking for inline""... $ac_c" 1>&6
27ca5dad 5422echo "configure:5423: checking for inline" >&5
bce58c09
JB
5423if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5424 echo $ac_n "(cached) $ac_c" 1>&6
5425else
5426 ac_cv_c_inline=no
5427for ac_kw in inline __inline__ __inline; do
5428 cat > conftest.$ac_ext <<EOF
27ca5dad 5429#line 5430 "configure"
bce58c09
JB
5430#include "confdefs.h"
5431
5432int main() {
5433} $ac_kw foo() {
5434; return 0; }
5435EOF
27ca5dad 5436if { (eval echo configure:5437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5437 rm -rf conftest*
5438 ac_cv_c_inline=$ac_kw; break
5439else
5440 echo "configure: failed program was:" >&5
5441 cat conftest.$ac_ext >&5
5442fi
5443rm -f conftest*
5444done
5445
5446fi
5447
5448echo "$ac_t""$ac_cv_c_inline" 1>&6
5449case "$ac_cv_c_inline" in
5450 inline | yes) ;;
5451 no) cat >> confdefs.h <<\EOF
5452#define inline
5453EOF
5454 ;;
5455 *) cat >> confdefs.h <<EOF
5456#define inline $ac_cv_c_inline
5457EOF
5458 ;;
5459esac
5460
c906108c 5461
5ee754fc
MK
5462# ------------------------------ #
5463# Checks for library functions. #
5464# ------------------------------ #
5465
46711df8
MK
5466# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5467# for constant arguments. Useless!
5468echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
27ca5dad 5469echo "configure:5470: checking for working alloca.h" >&5
46711df8
MK
5470if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5471 echo $ac_n "(cached) $ac_c" 1>&6
5472else
5473 cat > conftest.$ac_ext <<EOF
27ca5dad 5474#line 5475 "configure"
46711df8
MK
5475#include "confdefs.h"
5476#include <alloca.h>
5477int main() {
5478char *p = alloca(2 * sizeof(int));
5479; return 0; }
5480EOF
27ca5dad 5481if { (eval echo configure:5482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5482 rm -rf conftest*
5483 ac_cv_header_alloca_h=yes
5484else
5485 echo "configure: failed program was:" >&5
5486 cat conftest.$ac_ext >&5
5487 rm -rf conftest*
5488 ac_cv_header_alloca_h=no
5489fi
5490rm -f conftest*
5491fi
5492
5493echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5494if test $ac_cv_header_alloca_h = yes; then
5495 cat >> confdefs.h <<\EOF
5496#define HAVE_ALLOCA_H 1
5497EOF
5498
5499fi
5500
5501echo $ac_n "checking for alloca""... $ac_c" 1>&6
27ca5dad 5502echo "configure:5503: checking for alloca" >&5
46711df8
MK
5503if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5504 echo $ac_n "(cached) $ac_c" 1>&6
5505else
5506 cat > conftest.$ac_ext <<EOF
27ca5dad 5507#line 5508 "configure"
46711df8
MK
5508#include "confdefs.h"
5509
5510#ifdef __GNUC__
5511# define alloca __builtin_alloca
5512#else
5513# ifdef _MSC_VER
5514# include <malloc.h>
5515# define alloca _alloca
5516# else
5517# if HAVE_ALLOCA_H
5518# include <alloca.h>
5519# else
5520# ifdef _AIX
5521 #pragma alloca
5522# else
5523# ifndef alloca /* predefined by HP cc +Olibcalls */
5524char *alloca ();
5525# endif
5526# endif
5527# endif
5528# endif
5529#endif
5530
5531int main() {
5532char *p = (char *) alloca(1);
5533; return 0; }
5534EOF
27ca5dad 5535if { (eval echo configure:5536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5536 rm -rf conftest*
5537 ac_cv_func_alloca_works=yes
5538else
5539 echo "configure: failed program was:" >&5
5540 cat conftest.$ac_ext >&5
5541 rm -rf conftest*
5542 ac_cv_func_alloca_works=no
5543fi
5544rm -f conftest*
5545fi
5546
5547echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5548if test $ac_cv_func_alloca_works = yes; then
5549 cat >> confdefs.h <<\EOF
5550#define HAVE_ALLOCA 1
5551EOF
5552
5553fi
5554
5555if test $ac_cv_func_alloca_works = no; then
5556 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5557 # that cause trouble. Some versions do not even contain alloca or
5558 # contain a buggy version. If you still want to use their alloca,
5559 # use ar to extract alloca.o from them instead of compiling alloca.c.
5560 ALLOCA=alloca.${ac_objext}
5561 cat >> confdefs.h <<\EOF
5562#define C_ALLOCA 1
5563EOF
5564
5565
5566echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
27ca5dad 5567echo "configure:5568: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5568if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5569 echo $ac_n "(cached) $ac_c" 1>&6
5570else
5571 cat > conftest.$ac_ext <<EOF
27ca5dad 5572#line 5573 "configure"
46711df8
MK
5573#include "confdefs.h"
5574#if defined(CRAY) && ! defined(CRAY2)
5575webecray
5576#else
5577wenotbecray
5578#endif
5579
5580EOF
5581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5582 egrep "webecray" >/dev/null 2>&1; then
5583 rm -rf conftest*
5584 ac_cv_os_cray=yes
5585else
5586 rm -rf conftest*
5587 ac_cv_os_cray=no
5588fi
5589rm -f conftest*
5590
5591fi
5592
5593echo "$ac_t""$ac_cv_os_cray" 1>&6
5594if test $ac_cv_os_cray = yes; then
5595for ac_func in _getb67 GETB67 getb67; do
5596 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 5597echo "configure:5598: checking for $ac_func" >&5
46711df8
MK
5598if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5599 echo $ac_n "(cached) $ac_c" 1>&6
5600else
5601 cat > conftest.$ac_ext <<EOF
27ca5dad 5602#line 5603 "configure"
46711df8
MK
5603#include "confdefs.h"
5604/* System header to define __stub macros and hopefully few prototypes,
5605 which can conflict with char $ac_func(); below. */
5606#include <assert.h>
5607/* Override any gcc2 internal prototype to avoid an error. */
5608/* We use char because int might match the return type of a gcc2
5609 builtin and then its argument prototype would still apply. */
5610char $ac_func();
5611
5612int main() {
5613
5614/* The GNU C library defines this for functions which it implements
5615 to always fail with ENOSYS. Some functions are actually named
5616 something starting with __ and the normal name is an alias. */
5617#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5618choke me
5619#else
5620$ac_func();
5621#endif
5622
5623; return 0; }
5624EOF
27ca5dad 5625if { (eval echo configure:5626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5626 rm -rf conftest*
5627 eval "ac_cv_func_$ac_func=yes"
5628else
5629 echo "configure: failed program was:" >&5
5630 cat conftest.$ac_ext >&5
5631 rm -rf conftest*
5632 eval "ac_cv_func_$ac_func=no"
5633fi
5634rm -f conftest*
5635fi
5636
5637if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5638 echo "$ac_t""yes" 1>&6
5639 cat >> confdefs.h <<EOF
5640#define CRAY_STACKSEG_END $ac_func
5641EOF
5642
5643 break
5644else
5645 echo "$ac_t""no" 1>&6
5646fi
5647
5648done
5649fi
5650
5651echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
27ca5dad 5652echo "configure:5653: checking stack direction for C alloca" >&5
46711df8
MK
5653if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5654 echo $ac_n "(cached) $ac_c" 1>&6
5655else
5656 if test "$cross_compiling" = yes; then
5657 ac_cv_c_stack_direction=0
5658else
5659 cat > conftest.$ac_ext <<EOF
27ca5dad 5660#line 5661 "configure"
46711df8
MK
5661#include "confdefs.h"
5662find_stack_direction ()
5663{
5664 static char *addr = 0;
5665 auto char dummy;
5666 if (addr == 0)
5667 {
5668 addr = &dummy;
5669 return find_stack_direction ();
5670 }
5671 else
5672 return (&dummy > addr) ? 1 : -1;
5673}
5674main ()
5675{
5676 exit (find_stack_direction() < 0);
5677}
5678EOF
27ca5dad 5679if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5680then
5681 ac_cv_c_stack_direction=1
5682else
5683 echo "configure: failed program was:" >&5
5684 cat conftest.$ac_ext >&5
5685 rm -fr conftest*
5686 ac_cv_c_stack_direction=-1
5687fi
5688rm -fr conftest*
5689fi
5690
5691fi
5692
5693echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5694cat >> confdefs.h <<EOF
5695#define STACK_DIRECTION $ac_cv_c_stack_direction
5696EOF
5697
5698fi
5699
27ca5dad 5700for ac_hdr in unistd.h
97bf5e38
MK
5701do
5702ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5703echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
27ca5dad 5704echo "configure:5705: checking for $ac_hdr" >&5
74c1b268
AC
5705if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5706 echo $ac_n "(cached) $ac_c" 1>&6
5707else
5708 cat > conftest.$ac_ext <<EOF
27ca5dad 5709#line 5710 "configure"
74c1b268 5710#include "confdefs.h"
97bf5e38 5711#include <$ac_hdr>
74c1b268
AC
5712EOF
5713ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 5714{ (eval echo configure:5715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5715ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5716if test -z "$ac_err"; then
5717 rm -rf conftest*
5718 eval "ac_cv_header_$ac_safe=yes"
5719else
5720 echo "$ac_err" >&5
5721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5723 rm -rf conftest*
5724 eval "ac_cv_header_$ac_safe=no"
5725fi
5726rm -f conftest*
5727fi
5728if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5729 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5730 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5731 cat >> confdefs.h <<EOF
5732#define $ac_tr_hdr 1
74c1b268 5733EOF
97bf5e38 5734
74c1b268
AC
5735else
5736 echo "$ac_t""no" 1>&6
5737fi
97bf5e38 5738done
74c1b268 5739
97bf5e38
MK
5740for ac_func in getpagesize
5741do
5742echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 5743echo "configure:5744: checking for $ac_func" >&5
97bf5e38 5744if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5745 echo $ac_n "(cached) $ac_c" 1>&6
5746else
5747 cat > conftest.$ac_ext <<EOF
27ca5dad 5748#line 5749 "configure"
74c1b268
AC
5749#include "confdefs.h"
5750/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5751 which can conflict with char $ac_func(); below. */
74c1b268
AC
5752#include <assert.h>
5753/* Override any gcc2 internal prototype to avoid an error. */
5754/* We use char because int might match the return type of a gcc2
5755 builtin and then its argument prototype would still apply. */
97bf5e38 5756char $ac_func();
74c1b268
AC
5757
5758int main() {
5759
5760/* The GNU C library defines this for functions which it implements
5761 to always fail with ENOSYS. Some functions are actually named
5762 something starting with __ and the normal name is an alias. */
97bf5e38 5763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5764choke me
5765#else
97bf5e38 5766$ac_func();
74c1b268
AC
5767#endif
5768
5769; return 0; }
5770EOF
27ca5dad 5771if { (eval echo configure:5772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5772 rm -rf conftest*
97bf5e38 5773 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5774else
5775 echo "configure: failed program was:" >&5
5776 cat conftest.$ac_ext >&5
5777 rm -rf conftest*
97bf5e38 5778 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5779fi
5780rm -f conftest*
5781fi
5782
97bf5e38 5783if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5784 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5785 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5786 cat >> confdefs.h <<EOF
5787#define $ac_tr_func 1
5788EOF
5789
74c1b268
AC
5790else
5791 echo "$ac_t""no" 1>&6
5792fi
97bf5e38 5793done
74c1b268 5794
97bf5e38 5795echo $ac_n "checking for working mmap""... $ac_c" 1>&6
27ca5dad 5796echo "configure:5797: checking for working mmap" >&5
97bf5e38
MK
5797if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5798 echo $ac_n "(cached) $ac_c" 1>&6
5799else
5800 if test "$cross_compiling" = yes; then
5801 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5802else
5803 cat > conftest.$ac_ext <<EOF
27ca5dad 5804#line 5805 "configure"
74c1b268 5805#include "confdefs.h"
97bf5e38
MK
5806
5807/* Thanks to Mike Haertel and Jim Avera for this test.
5808 Here is a matrix of mmap possibilities:
5809 mmap private not fixed
5810 mmap private fixed at somewhere currently unmapped
5811 mmap private fixed at somewhere already mapped
5812 mmap shared not fixed
5813 mmap shared fixed at somewhere currently unmapped
5814 mmap shared fixed at somewhere already mapped
5815 For private mappings, we should verify that changes cannot be read()
5816 back from the file, nor mmap's back from the file at a different
5817 address. (There have been systems where private was not correctly
5818 implemented like the infamous i386 svr4.0, and systems where the
5819 VM page cache was not coherent with the filesystem buffer cache
5820 like early versions of FreeBSD and possibly contemporary NetBSD.)
5821 For shared mappings, we should conversely verify that changes get
5822 propogated back to all the places they're supposed to be.
5823
5824 Grep wants private fixed already mapped.
5825 The main things grep needs to know about mmap are:
5826 * does it exist and is it safe to write into the mmap'd area
5827 * how to use it (BSD variants) */
74c1b268 5828#include <sys/types.h>
97bf5e38
MK
5829#include <fcntl.h>
5830#include <sys/mman.h>
5831
5832/* This mess was copied from the GNU getpagesize.h. */
5833#ifndef HAVE_GETPAGESIZE
27ca5dad
MC
5834# ifdef HAVE_UNISTD_H
5835# include <unistd.h>
5836# endif
97bf5e38
MK
5837
5838/* Assume that all systems that can run configure have sys/param.h. */
5839# ifndef HAVE_SYS_PARAM_H
5840# define HAVE_SYS_PARAM_H 1
5841# endif
5842
5843# ifdef _SC_PAGESIZE
5844# define getpagesize() sysconf(_SC_PAGESIZE)
5845# else /* no _SC_PAGESIZE */
5846# ifdef HAVE_SYS_PARAM_H
5847# include <sys/param.h>
5848# ifdef EXEC_PAGESIZE
5849# define getpagesize() EXEC_PAGESIZE
5850# else /* no EXEC_PAGESIZE */
5851# ifdef NBPG
5852# define getpagesize() NBPG * CLSIZE
5853# ifndef CLSIZE
5854# define CLSIZE 1
5855# endif /* no CLSIZE */
5856# else /* no NBPG */
5857# ifdef NBPC
5858# define getpagesize() NBPC
5859# else /* no NBPC */
5860# ifdef PAGESIZE
5861# define getpagesize() PAGESIZE
5862# endif /* PAGESIZE */
5863# endif /* no NBPC */
5864# endif /* no NBPG */
5865# endif /* no EXEC_PAGESIZE */
5866# else /* no HAVE_SYS_PARAM_H */
5867# define getpagesize() 8192 /* punt totally */
5868# endif /* no HAVE_SYS_PARAM_H */
5869# endif /* no _SC_PAGESIZE */
5870
5871#endif /* no HAVE_GETPAGESIZE */
5872
74c1b268 5873#ifdef __cplusplus
97bf5e38 5874extern "C" { void *malloc(unsigned); }
74c1b268 5875#else
97bf5e38 5876char *malloc();
74c1b268 5877#endif
74c1b268 5878
97bf5e38
MK
5879int
5880main()
5881{
5882 char *data, *data2, *data3;
5883 int i, pagesize;
5884 int fd;
74c1b268 5885
97bf5e38 5886 pagesize = getpagesize();
74c1b268 5887
97bf5e38
MK
5888 /*
5889 * First, make a file with some known garbage in it.
5890 */
5891 data = malloc(pagesize);
5892 if (!data)
5893 exit(1);
5894 for (i = 0; i < pagesize; ++i)
5895 *(data + i) = rand();
5896 umask(0);
5897 fd = creat("conftestmmap", 0600);
5898 if (fd < 0)
5899 exit(1);
5900 if (write(fd, data, pagesize) != pagesize)
5901 exit(1);
5902 close(fd);
74c1b268 5903
97bf5e38
MK
5904 /*
5905 * Next, try to mmap the file at a fixed address which
5906 * already has something else allocated at it. If we can,
5907 * also make sure that we see the same garbage.
5908 */
5909 fd = open("conftestmmap", O_RDWR);
5910 if (fd < 0)
5911 exit(1);
5912 data2 = malloc(2 * pagesize);
5913 if (!data2)
5914 exit(1);
5915 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5916 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5917 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5918 exit(1);
5919 for (i = 0; i < pagesize; ++i)
5920 if (*(data + i) != *(data2 + i))
5921 exit(1);
74c1b268 5922
97bf5e38
MK
5923 /*
5924 * Finally, make sure that changes to the mapped area
5925 * do not percolate back to the file as seen by read().
5926 * (This is a bug on some variants of i386 svr4.0.)
5927 */
5928 for (i = 0; i < pagesize; ++i)
5929 *(data2 + i) = *(data2 + i) + 1;
5930 data3 = malloc(pagesize);
5931 if (!data3)
5932 exit(1);
5933 if (read(fd, data3, pagesize) != pagesize)
5934 exit(1);
5935 for (i = 0; i < pagesize; ++i)
5936 if (*(data + i) != *(data3 + i))
5937 exit(1);
5938 close(fd);
5939 unlink("conftestmmap");
5940 exit(0);
74c1b268 5941}
97bf5e38 5942
74c1b268 5943EOF
27ca5dad 5944if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5945then
97bf5e38 5946 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5947else
5948 echo "configure: failed program was:" >&5
5949 cat conftest.$ac_ext >&5
5950 rm -fr conftest*
97bf5e38 5951 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5952fi
5953rm -fr conftest*
5954fi
5955
5956fi
5957
97bf5e38
MK
5958echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5959if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5960 cat >> confdefs.h <<\EOF
97bf5e38 5961#define HAVE_MMAP 1
74c1b268
AC
5962EOF
5963
5964fi
5965
97bf5e38 5966echo $ac_n "checking for pid_t""... $ac_c" 1>&6
27ca5dad 5967echo "configure:5968: checking for pid_t" >&5
97bf5e38 5968if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5969 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5970else
5971 cat > conftest.$ac_ext <<EOF
27ca5dad 5972#line 5973 "configure"
0200359f 5973#include "confdefs.h"
97bf5e38
MK
5974#include <sys/types.h>
5975#if STDC_HEADERS
5976#include <stdlib.h>
5977#include <stddef.h>
0200359f 5978#endif
0200359f 5979EOF
97bf5e38
MK
5980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5981 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5982 rm -rf conftest*
5983 ac_cv_type_pid_t=yes
0200359f 5984else
97bf5e38
MK
5985 rm -rf conftest*
5986 ac_cv_type_pid_t=no
0200359f 5987fi
97bf5e38 5988rm -f conftest*
0200359f
MK
5989
5990fi
97bf5e38
MK
5991echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5992if test $ac_cv_type_pid_t = no; then
0200359f 5993 cat >> confdefs.h <<\EOF
97bf5e38 5994#define pid_t int
0200359f
MK
5995EOF
5996
5997fi
5998
97bf5e38
MK
5999ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6000echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
27ca5dad 6001echo "configure:6002: checking for vfork.h" >&5
97bf5e38 6002if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6003 echo $ac_n "(cached) $ac_c" 1>&6
6004else
6005 cat > conftest.$ac_ext <<EOF
27ca5dad 6006#line 6007 "configure"
72473524 6007#include "confdefs.h"
97bf5e38 6008#include <vfork.h>
72473524 6009EOF
97bf5e38 6010ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 6011{ (eval echo configure:6012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6012ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6013if test -z "$ac_err"; then
72473524 6014 rm -rf conftest*
97bf5e38 6015 eval "ac_cv_header_$ac_safe=yes"
72473524 6016else
97bf5e38 6017 echo "$ac_err" >&5
72473524
DJ
6018 echo "configure: failed program was:" >&5
6019 cat conftest.$ac_ext >&5
6020 rm -rf conftest*
97bf5e38 6021 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6022fi
6023rm -f conftest*
6024fi
97bf5e38
MK
6025if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6026 echo "$ac_t""yes" 1>&6
72473524 6027 cat >> confdefs.h <<\EOF
97bf5e38 6028#define HAVE_VFORK_H 1
72473524
DJ
6029EOF
6030
97bf5e38
MK
6031else
6032 echo "$ac_t""no" 1>&6
72473524 6033fi
c906108c 6034
97bf5e38 6035echo $ac_n "checking for working vfork""... $ac_c" 1>&6
27ca5dad 6036echo "configure:6037: checking for working vfork" >&5
97bf5e38
MK
6037if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6038 echo $ac_n "(cached) $ac_c" 1>&6
6039else
6040 if test "$cross_compiling" = yes; then
6041 echo $ac_n "checking for vfork""... $ac_c" 1>&6
27ca5dad 6042echo "configure:6043: checking for vfork" >&5
97bf5e38 6043if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045else
6046 cat > conftest.$ac_ext <<EOF
27ca5dad 6047#line 6048 "configure"
2b2d558c 6048#include "confdefs.h"
97bf5e38
MK
6049/* System header to define __stub macros and hopefully few prototypes,
6050 which can conflict with char vfork(); below. */
6051#include <assert.h>
6052/* Override any gcc2 internal prototype to avoid an error. */
6053/* We use char because int might match the return type of a gcc2
6054 builtin and then its argument prototype would still apply. */
6055char vfork();
2b2d558c
MK
6056
6057int main() {
97bf5e38
MK
6058
6059/* The GNU C library defines this for functions which it implements
6060 to always fail with ENOSYS. Some functions are actually named
6061 something starting with __ and the normal name is an alias. */
6062#if defined (__stub_vfork) || defined (__stub___vfork)
6063choke me
6064#else
6065vfork();
6066#endif
6067
2b2d558c
MK
6068; return 0; }
6069EOF
27ca5dad 6070if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6071 rm -rf conftest*
97bf5e38 6072 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6073else
6074 echo "configure: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 rm -rf conftest*
97bf5e38 6077 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6078fi
6079rm -f conftest*
6080fi
6081
97bf5e38
MK
6082if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6083 echo "$ac_t""yes" 1>&6
6084 :
6085else
6086 echo "$ac_t""no" 1>&6
2b2d558c
MK
6087fi
6088
97bf5e38 6089ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6090else
6091 cat > conftest.$ac_ext <<EOF
27ca5dad 6092#line 6093 "configure"
7dfa765c 6093#include "confdefs.h"
97bf5e38
MK
6094/* Thanks to Paul Eggert for this test. */
6095#include <stdio.h>
6096#include <sys/types.h>
6097#include <sys/stat.h>
6098#ifdef HAVE_UNISTD_H
6099#include <unistd.h>
6100#endif
6101#ifdef HAVE_VFORK_H
6102#include <vfork.h>
6103#endif
6104/* On some sparc systems, changes by the child to local and incoming
6105 argument registers are propagated back to the parent.
6106 The compiler is told about this with #include <vfork.h>,
6107 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6108 Test for this by using a static variable whose address
6109 is put into a register that is clobbered by the vfork. */
6110static
6111#ifdef __cplusplus
6112sparc_address_test (int arg)
6113#else
6114sparc_address_test (arg) int arg;
6115#endif
6116{
6117 static pid_t child;
6118 if (!child) {
6119 child = vfork ();
6120 if (child < 0) {
6121 perror ("vfork");
6122 _exit(2);
6123 }
6124 if (!child) {
6125 arg = getpid();
6126 write(-1, "", 0);
6127 _exit (arg);
6128 }
6129 }
6130}
6131main() {
6132 pid_t parent = getpid ();
6133 pid_t child;
7dfa765c 6134
97bf5e38 6135 sparc_address_test ();
7dfa765c 6136
97bf5e38 6137 child = vfork ();
7dfa765c 6138
97bf5e38
MK
6139 if (child == 0) {
6140 /* Here is another test for sparc vfork register problems.
6141 This test uses lots of local variables, at least
6142 as many local variables as main has allocated so far
6143 including compiler temporaries. 4 locals are enough for
6144 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6145 A buggy compiler should reuse the register of parent
6146 for one of the local variables, since it will think that
6147 parent can't possibly be used any more in this routine.
6148 Assigning to the local variable will thus munge parent
6149 in the parent process. */
6150 pid_t
6151 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6152 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6153 /* Convince the compiler that p..p7 are live; otherwise, it might
6154 use the same hardware register for all 8 local variables. */
6155 if (p != p1 || p != p2 || p != p3 || p != p4
6156 || p != p5 || p != p6 || p != p7)
6157 _exit(1);
7dfa765c 6158
97bf5e38
MK
6159 /* On some systems (e.g. IRIX 3.3),
6160 vfork doesn't separate parent from child file descriptors.
6161 If the child closes a descriptor before it execs or exits,
6162 this munges the parent's descriptor as well.
6163 Test for this by closing stdout in the child. */
6164 _exit(close(fileno(stdout)) != 0);
6165 } else {
6166 int status;
6167 struct stat st;
64bb1671 6168
97bf5e38
MK
6169 while (wait(&status) != child)
6170 ;
6171 exit(
6172 /* Was there some problem with vforking? */
6173 child < 0
64bb1671 6174
97bf5e38
MK
6175 /* Did the child fail? (This shouldn't happen.) */
6176 || status
64bb1671 6177
97bf5e38
MK
6178 /* Did the vfork/compiler bug occur? */
6179 || parent != getpid()
6180
6181 /* Did the file descriptor bug occur? */
6182 || fstat(fileno(stdout), &st) != 0
6183 );
6184 }
6185}
5c44784c 6186EOF
27ca5dad 6187if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6188then
6189 ac_cv_func_vfork_works=yes
5c44784c
JM
6190else
6191 echo "configure: failed program was:" >&5
6192 cat conftest.$ac_ext >&5
97bf5e38
MK
6193 rm -fr conftest*
6194 ac_cv_func_vfork_works=no
5c44784c 6195fi
97bf5e38 6196rm -fr conftest*
5c44784c
JM
6197fi
6198
0afdd437
MK
6199fi
6200
97bf5e38
MK
6201echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6202if test $ac_cv_func_vfork_works = no; then
0afdd437 6203 cat >> confdefs.h <<\EOF
97bf5e38 6204#define vfork fork
0afdd437
MK
6205EOF
6206
6207fi
6208
97bf5e38
MK
6209for ac_func in canonicalize_file_name realpath
6210do
6211echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6212echo "configure:6213: checking for $ac_func" >&5
97bf5e38 6213if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6214 echo $ac_n "(cached) $ac_c" 1>&6
6215else
6216 cat > conftest.$ac_ext <<EOF
27ca5dad 6217#line 6218 "configure"
7e89e357 6218#include "confdefs.h"
97bf5e38
MK
6219/* System header to define __stub macros and hopefully few prototypes,
6220 which can conflict with char $ac_func(); below. */
6221#include <assert.h>
6222/* Override any gcc2 internal prototype to avoid an error. */
6223/* We use char because int might match the return type of a gcc2
6224 builtin and then its argument prototype would still apply. */
6225char $ac_func();
6226
7e89e357 6227int main() {
97bf5e38
MK
6228
6229/* The GNU C library defines this for functions which it implements
6230 to always fail with ENOSYS. Some functions are actually named
6231 something starting with __ and the normal name is an alias. */
6232#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6233choke me
6234#else
6235$ac_func();
6236#endif
6237
7e89e357
JT
6238; return 0; }
6239EOF
27ca5dad 6240if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6241 rm -rf conftest*
97bf5e38 6242 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6243else
6244 echo "configure: failed program was:" >&5
6245 cat conftest.$ac_ext >&5
6246 rm -rf conftest*
97bf5e38 6247 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6248fi
6249rm -f conftest*
6250fi
6251
97bf5e38
MK
6252if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6253 echo "$ac_t""yes" 1>&6
6254 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6255 cat >> confdefs.h <<EOF
6256#define $ac_tr_func 1
7e89e357 6257EOF
97bf5e38
MK
6258
6259else
6260 echo "$ac_t""no" 1>&6
7e89e357 6261fi
97bf5e38 6262done
7e89e357 6263
97bf5e38 6264for ac_func in poll
7be570e7
JM
6265do
6266echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6267echo "configure:6268: checking for $ac_func" >&5
7be570e7
JM
6268if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6269 echo $ac_n "(cached) $ac_c" 1>&6
6270else
6271 cat > conftest.$ac_ext <<EOF
27ca5dad 6272#line 6273 "configure"
7be570e7
JM
6273#include "confdefs.h"
6274/* System header to define __stub macros and hopefully few prototypes,
6275 which can conflict with char $ac_func(); below. */
6276#include <assert.h>
6277/* Override any gcc2 internal prototype to avoid an error. */
6278/* We use char because int might match the return type of a gcc2
6279 builtin and then its argument prototype would still apply. */
6280char $ac_func();
6281
6282int main() {
6283
6284/* The GNU C library defines this for functions which it implements
6285 to always fail with ENOSYS. Some functions are actually named
6286 something starting with __ and the normal name is an alias. */
6287#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6288choke me
6289#else
6290$ac_func();
6291#endif
6292
6293; return 0; }
6294EOF
27ca5dad 6295if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6296 rm -rf conftest*
6297 eval "ac_cv_func_$ac_func=yes"
6298else
6299 echo "configure: failed program was:" >&5
6300 cat conftest.$ac_ext >&5
6301 rm -rf conftest*
6302 eval "ac_cv_func_$ac_func=no"
6303fi
6304rm -f conftest*
6305fi
6306
6307if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6308 echo "$ac_t""yes" 1>&6
6309 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6310 cat >> confdefs.h <<EOF
6311#define $ac_tr_func 1
6312EOF
6313
6314else
6315 echo "$ac_t""no" 1>&6
6316fi
6317done
6318
6319for ac_func in pread64
6320do
6321echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6322echo "configure:6323: checking for $ac_func" >&5
14abd0fb
MK
6323if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6324 echo $ac_n "(cached) $ac_c" 1>&6
6325else
6326 cat > conftest.$ac_ext <<EOF
27ca5dad 6327#line 6328 "configure"
14abd0fb
MK
6328#include "confdefs.h"
6329/* System header to define __stub macros and hopefully few prototypes,
6330 which can conflict with char $ac_func(); below. */
6331#include <assert.h>
6332/* Override any gcc2 internal prototype to avoid an error. */
6333/* We use char because int might match the return type of a gcc2
6334 builtin and then its argument prototype would still apply. */
6335char $ac_func();
6336
6337int main() {
6338
6339/* The GNU C library defines this for functions which it implements
6340 to always fail with ENOSYS. Some functions are actually named
6341 something starting with __ and the normal name is an alias. */
6342#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6343choke me
6344#else
6345$ac_func();
6346#endif
6347
6348; return 0; }
6349EOF
27ca5dad 6350if { (eval echo configure:6351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6351 rm -rf conftest*
6352 eval "ac_cv_func_$ac_func=yes"
6353else
6354 echo "configure: failed program was:" >&5
6355 cat conftest.$ac_ext >&5
6356 rm -rf conftest*
6357 eval "ac_cv_func_$ac_func=no"
6358fi
6359rm -f conftest*
6360fi
6361
6362if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6363 echo "$ac_t""yes" 1>&6
6364 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6365 cat >> confdefs.h <<EOF
6366#define $ac_tr_func 1
6367EOF
6368
6369else
6370 echo "$ac_t""no" 1>&6
6371fi
6372done
6373
97bf5e38
MK
6374for ac_func in sbrk
6375do
6376echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6377echo "configure:6378: checking for $ac_func" >&5
97bf5e38 6378if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6379 echo $ac_n "(cached) $ac_c" 1>&6
6380else
6381 cat > conftest.$ac_ext <<EOF
27ca5dad 6382#line 6383 "configure"
c906108c 6383#include "confdefs.h"
97bf5e38
MK
6384/* System header to define __stub macros and hopefully few prototypes,
6385 which can conflict with char $ac_func(); below. */
6386#include <assert.h>
6387/* Override any gcc2 internal prototype to avoid an error. */
6388/* We use char because int might match the return type of a gcc2
6389 builtin and then its argument prototype would still apply. */
6390char $ac_func();
c906108c 6391
97bf5e38
MK
6392int main() {
6393
6394/* The GNU C library defines this for functions which it implements
6395 to always fail with ENOSYS. Some functions are actually named
6396 something starting with __ and the normal name is an alias. */
6397#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6398choke me
c906108c 6399#else
97bf5e38 6400$ac_func();
c906108c 6401#endif
97bf5e38 6402
c906108c
SS
6403; return 0; }
6404EOF
27ca5dad 6405if { (eval echo configure:6406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6406 rm -rf conftest*
97bf5e38 6407 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6408else
6409 echo "configure: failed program was:" >&5
6410 cat conftest.$ac_ext >&5
6411 rm -rf conftest*
97bf5e38 6412 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6413fi
6414rm -f conftest*
6415fi
6416
97bf5e38
MK
6417if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6418 echo "$ac_t""yes" 1>&6
6419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6420 cat >> confdefs.h <<EOF
6421#define $ac_tr_func 1
c906108c 6422EOF
97bf5e38
MK
6423
6424else
6425 echo "$ac_t""no" 1>&6
c906108c 6426fi
97bf5e38 6427done
c906108c 6428
97bf5e38
MK
6429for ac_func in setpgid setpgrp
6430do
6431echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6432echo "configure:6433: checking for $ac_func" >&5
97bf5e38 6433if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6434 echo $ac_n "(cached) $ac_c" 1>&6
6435else
6436 cat > conftest.$ac_ext <<EOF
27ca5dad 6437#line 6438 "configure"
c906108c 6438#include "confdefs.h"
97bf5e38
MK
6439/* System header to define __stub macros and hopefully few prototypes,
6440 which can conflict with char $ac_func(); below. */
6441#include <assert.h>
6442/* Override any gcc2 internal prototype to avoid an error. */
6443/* We use char because int might match the return type of a gcc2
6444 builtin and then its argument prototype would still apply. */
6445char $ac_func();
c906108c 6446
97bf5e38
MK
6447int main() {
6448
6449/* The GNU C library defines this for functions which it implements
6450 to always fail with ENOSYS. Some functions are actually named
6451 something starting with __ and the normal name is an alias. */
6452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6453choke me
c906108c 6454#else
97bf5e38 6455$ac_func();
c906108c 6456#endif
97bf5e38 6457
c906108c
SS
6458; return 0; }
6459EOF
27ca5dad 6460if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6461 rm -rf conftest*
97bf5e38 6462 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6463else
6464 echo "configure: failed program was:" >&5
6465 cat conftest.$ac_ext >&5
6466 rm -rf conftest*
97bf5e38 6467 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6468fi
6469rm -f conftest*
6470fi
6471
97bf5e38
MK
6472if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6473 echo "$ac_t""yes" 1>&6
6474 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6475 cat >> confdefs.h <<EOF
6476#define $ac_tr_func 1
c906108c 6477EOF
97bf5e38
MK
6478
6479else
6480 echo "$ac_t""no" 1>&6
c906108c 6481fi
97bf5e38 6482done
c906108c 6483
e1ea1d75 6484for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6485do
6486echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6487echo "configure:6488: checking for $ac_func" >&5
97bf5e38 6488if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6489 echo $ac_n "(cached) $ac_c" 1>&6
6490else
6491 cat > conftest.$ac_ext <<EOF
27ca5dad 6492#line 6493 "configure"
c906108c 6493#include "confdefs.h"
97bf5e38
MK
6494/* System header to define __stub macros and hopefully few prototypes,
6495 which can conflict with char $ac_func(); below. */
6496#include <assert.h>
6497/* Override any gcc2 internal prototype to avoid an error. */
6498/* We use char because int might match the return type of a gcc2
6499 builtin and then its argument prototype would still apply. */
6500char $ac_func();
c906108c 6501
97bf5e38
MK
6502int main() {
6503
6504/* The GNU C library defines this for functions which it implements
6505 to always fail with ENOSYS. Some functions are actually named
6506 something starting with __ and the normal name is an alias. */
6507#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6508choke me
c906108c 6509#else
97bf5e38 6510$ac_func();
c906108c 6511#endif
97bf5e38 6512
c906108c
SS
6513; return 0; }
6514EOF
27ca5dad 6515if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6516 rm -rf conftest*
97bf5e38 6517 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6518else
6519 echo "configure: failed program was:" >&5
6520 cat conftest.$ac_ext >&5
6521 rm -rf conftest*
97bf5e38 6522 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6523fi
6524rm -f conftest*
6525fi
6526
97bf5e38
MK
6527if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6528 echo "$ac_t""yes" 1>&6
6529 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6530 cat >> confdefs.h <<EOF
6531#define $ac_tr_func 1
c906108c 6532EOF
e1ea1d75 6533
97bf5e38
MK
6534else
6535 echo "$ac_t""no" 1>&6
c906108c 6536fi
97bf5e38 6537done
c906108c 6538
97bf5e38
MK
6539for ac_func in socketpair
6540do
6541echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
27ca5dad 6542echo "configure:6543: checking for $ac_func" >&5
97bf5e38 6543if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6544 echo $ac_n "(cached) $ac_c" 1>&6
6545else
6546 cat > conftest.$ac_ext <<EOF
27ca5dad 6547#line 6548 "configure"
c906108c 6548#include "confdefs.h"
97bf5e38
MK
6549/* System header to define __stub macros and hopefully few prototypes,
6550 which can conflict with char $ac_func(); below. */
6551#include <assert.h>
6552/* Override any gcc2 internal prototype to avoid an error. */
6553/* We use char because int might match the return type of a gcc2
6554 builtin and then its argument prototype would still apply. */
6555char $ac_func();
c906108c 6556
97bf5e38
MK
6557int main() {
6558
6559/* The GNU C library defines this for functions which it implements
6560 to always fail with ENOSYS. Some functions are actually named
6561 something starting with __ and the normal name is an alias. */
6562#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6563choke me
c906108c 6564#else
97bf5e38 6565$ac_func();
c906108c 6566#endif
97bf5e38 6567
c906108c
SS
6568; return 0; }
6569EOF
27ca5dad 6570if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6571 rm -rf conftest*
97bf5e38 6572 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6573else
6574 echo "configure: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 rm -rf conftest*
97bf5e38 6577 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6578fi
6579rm -f conftest*
6580fi
6581
97bf5e38
MK
6582if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6583 echo "$ac_t""yes" 1>&6
6584 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6585 cat >> confdefs.h <<EOF
6586#define $ac_tr_func 1
c906108c 6587EOF
97bf5e38
MK
6588
6589else
6590 echo "$ac_t""no" 1>&6
c906108c 6591fi
97bf5e38 6592done
c906108c 6593
97bf5e38
MK
6594
6595if test "$cross_compiling" = no; then
6596 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
27ca5dad 6597echo "configure:6598: checking whether setpgrp takes no argument" >&5
97bf5e38 6598if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6599 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6600else
6601 if test "$cross_compiling" = yes; then
6602 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6603else
6604 cat > conftest.$ac_ext <<EOF
27ca5dad 6605#line 6606 "configure"
c906108c
SS
6606#include "confdefs.h"
6607
c906108c
SS
6608#ifdef HAVE_UNISTD_H
6609#include <unistd.h>
6610#endif
97bf5e38
MK
6611
6612/*
6613 * If this system has a BSD-style setpgrp, which takes arguments, exit
6614 * successfully.
6615 */
6616main()
6617{
6618 if (setpgrp(1,1) == -1)
6619 exit(0);
6620 else
6621 exit(1);
6622}
6623
c906108c 6624EOF
27ca5dad 6625if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6626then
6627 ac_cv_func_setpgrp_void=no
c906108c
SS
6628else
6629 echo "configure: failed program was:" >&5
6630 cat conftest.$ac_ext >&5
97bf5e38
MK
6631 rm -fr conftest*
6632 ac_cv_func_setpgrp_void=yes
c906108c 6633fi
97bf5e38 6634rm -fr conftest*
c906108c
SS
6635fi
6636
97bf5e38
MK
6637
6638fi
6639
6640echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6641if test $ac_cv_func_setpgrp_void = yes; then
6642 cat >> confdefs.h <<\EOF
6643#define SETPGRP_VOID 1
c906108c
SS
6644EOF
6645
6646fi
6647
97bf5e38
MK
6648else
6649 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
27ca5dad 6650echo "configure:6651: checking whether setpgrp takes no argument" >&5
97bf5e38 6651if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6652 echo $ac_n "(cached) $ac_c" 1>&6
6653else
6654 cat > conftest.$ac_ext <<EOF
27ca5dad 6655#line 6656 "configure"
b83266a0
SS
6656#include "confdefs.h"
6657
b83266a0 6658#include <unistd.h>
97bf5e38 6659
b83266a0 6660int main() {
97bf5e38
MK
6661
6662 if (setpgrp(1,1) == -1)
6663 exit (0);
6664 else
6665 exit (1);
6666
b83266a0
SS
6667; return 0; }
6668EOF
27ca5dad 6669if { (eval echo configure:6670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6670 rm -rf conftest*
97bf5e38 6671 ac_cv_func_setpgrp_void=no
b83266a0
SS
6672else
6673 echo "configure: failed program was:" >&5
6674 cat conftest.$ac_ext >&5
6675 rm -rf conftest*
97bf5e38 6676 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6677fi
6678rm -f conftest*
6679fi
6680
97bf5e38
MK
6681echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6682if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6683 cat >> confdefs.h <<\EOF
97bf5e38 6684#define SETPGRP_VOID 1
b83266a0
SS
6685EOF
6686
97bf5e38 6687fi
b83266a0
SS
6688fi
6689
97bf5e38
MK
6690# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6691# since sigsetjmp might only be defined as a macro.
6692echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
27ca5dad 6693echo "configure:6694: checking for sigsetjmp" >&5
97bf5e38 6694if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6695 echo $ac_n "(cached) $ac_c" 1>&6
6696else
6697 cat > conftest.$ac_ext <<EOF
27ca5dad 6698#line 6699 "configure"
a4db0f07
RH
6699#include "confdefs.h"
6700
97bf5e38
MK
6701#include <setjmp.h>
6702
a4db0f07 6703int main() {
97bf5e38 6704sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6705; return 0; }
6706EOF
27ca5dad 6707if { (eval echo configure:6708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6708 rm -rf conftest*
97bf5e38 6709 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6710else
6711 echo "configure: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
6713 rm -rf conftest*
97bf5e38 6714 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6715fi
6716rm -f conftest*
6717fi
6718
97bf5e38
MK
6719echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6720if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6721 cat >> confdefs.h <<\EOF
97bf5e38 6722#define HAVE_SIGSETJMP 1
a4db0f07
RH
6723EOF
6724
6725fi
c906108c 6726
06825bd1
MK
6727# Assume we'll default to using the included libiberty regex.
6728gdb_use_included_regex=yes
6729
6730# However, if the system regex is GNU regex, then default to *not*
6731# using the included regex.
6732echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
27ca5dad 6733echo "configure:6734: checking for GNU regex" >&5
06825bd1
MK
6734if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6735 echo $ac_n "(cached) $ac_c" 1>&6
6736else
6737 cat > conftest.$ac_ext <<EOF
27ca5dad 6738#line 6739 "configure"
06825bd1
MK
6739#include "confdefs.h"
6740#include <gnu-versions.h>
6741int main() {
6742#define REGEX_INTERFACE_VERSION 1
6743#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6744# error "Version mismatch"
6745#endif
6746; return 0; }
6747EOF
27ca5dad 6748if { (eval echo configure:6749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6749 rm -rf conftest*
6750 gdb_cv_have_gnu_regex=yes
6751else
6752 echo "configure: failed program was:" >&5
6753 cat conftest.$ac_ext >&5
6754 rm -rf conftest*
6755 gdb_cv_have_gnu_regex=no
6756fi
6757rm -f conftest*
6758fi
6759
6760echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6761if test $gdb_cv_have_gnu_regex = yes; then
6762 gdb_use_included_regex=no
6763fi
6764
6765# Check whether --with-included-regex or --without-included-regex was given.
6766if test "${with_included_regex+set}" = set; then
6767 withval="$with_included_regex"
6768 gdb_with_regex=$withval
6769else
6770 gdb_with_regex=$gdb_use_included_regex
6771fi
6772
6773if test "$gdb_with_regex" = yes; then
6774 cat >> confdefs.h <<\EOF
6775#define USE_INCLUDED_REGEX 1
6776EOF
6777
6778fi
6779
97bf5e38
MK
6780# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6781# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6782echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
27ca5dad 6783echo "configure:6784: checking for r_fs in struct reg" >&5
97bf5e38
MK
6784if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6785 echo $ac_n "(cached) $ac_c" 1>&6
6786else
6787 cat > conftest.$ac_ext <<EOF
27ca5dad 6788#line 6789 "configure"
c906108c 6789#include "confdefs.h"
97bf5e38
MK
6790#include <machine/reg.h>
6791int main() {
6792struct reg r; r.r_fs;
6793; return 0; }
c906108c 6794EOF
27ca5dad 6795if { (eval echo configure:6796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6796 rm -rf conftest*
97bf5e38 6797 gdb_cv_struct_reg_r_fs=yes
c906108c 6798else
97bf5e38
MK
6799 echo "configure: failed program was:" >&5
6800 cat conftest.$ac_ext >&5
c906108c 6801 rm -rf conftest*
97bf5e38 6802 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6803fi
6804rm -f conftest*
97bf5e38 6805fi
c906108c 6806
97bf5e38
MK
6807echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6808if test $gdb_cv_struct_reg_r_fs = yes; then
6809 cat >> confdefs.h <<\EOF
6810#define HAVE_STRUCT_REG_R_FS 1
6811EOF
6812
6813fi
6814echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
27ca5dad 6815echo "configure:6816: checking for r_gs in struct reg" >&5
97bf5e38
MK
6816if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6817 echo $ac_n "(cached) $ac_c" 1>&6
6818else
6819 cat > conftest.$ac_ext <<EOF
27ca5dad 6820#line 6821 "configure"
c906108c 6821#include "confdefs.h"
97bf5e38
MK
6822#include <machine/reg.h>
6823int main() {
6824struct reg r; r.r_gs;
6825; return 0; }
c906108c 6826EOF
27ca5dad 6827if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6828 rm -rf conftest*
97bf5e38 6829 gdb_cv_struct_reg_r_gs=yes
c906108c 6830else
97bf5e38
MK
6831 echo "configure: failed program was:" >&5
6832 cat conftest.$ac_ext >&5
c906108c 6833 rm -rf conftest*
97bf5e38 6834 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6835fi
6836rm -f conftest*
c906108c 6837fi
c906108c 6838
97bf5e38
MK
6839echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6840if test $gdb_cv_struct_reg_r_gs = yes; then
6841 cat >> confdefs.h <<\EOF
6842#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6843EOF
6844
c906108c
SS
6845fi
6846
97bf5e38
MK
6847# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6848echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
27ca5dad 6849echo "configure:6850: checking for PTRACE_GETREGS" >&5
97bf5e38 6850if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6851 echo $ac_n "(cached) $ac_c" 1>&6
6852else
6853 cat > conftest.$ac_ext <<EOF
27ca5dad 6854#line 6855 "configure"
c906108c 6855#include "confdefs.h"
97bf5e38 6856#include <sys/ptrace.h>
c906108c 6857int main() {
97bf5e38 6858PTRACE_GETREGS;
c906108c
SS
6859; return 0; }
6860EOF
27ca5dad 6861if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6862 rm -rf conftest*
97bf5e38 6863 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6864else
6865 echo "configure: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 rm -rf conftest*
97bf5e38 6868 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6869fi
6870rm -f conftest*
6871fi
6872
97bf5e38
MK
6873echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6874if test $gdb_cv_have_ptrace_getregs = yes; then
6875 cat >> confdefs.h <<\EOF
6876#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6877EOF
6878
97bf5e38 6879fi
c906108c 6880
97bf5e38
MK
6881# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6882echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
27ca5dad 6883echo "configure:6884: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6884if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6885 echo $ac_n "(cached) $ac_c" 1>&6
6886else
6887 cat > conftest.$ac_ext <<EOF
27ca5dad 6888#line 6889 "configure"
c906108c 6889#include "confdefs.h"
97bf5e38 6890#include <sys/ptrace.h>
c906108c 6891int main() {
97bf5e38 6892PTRACE_GETFPXREGS;
c906108c
SS
6893; return 0; }
6894EOF
27ca5dad 6895if { (eval echo configure:6896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6896 rm -rf conftest*
97bf5e38 6897 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6898else
6899 echo "configure: failed program was:" >&5
6900 cat conftest.$ac_ext >&5
6901 rm -rf conftest*
97bf5e38 6902 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6903fi
6904rm -f conftest*
6905fi
6906
97bf5e38
MK
6907echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6908if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6909 cat >> confdefs.h <<\EOF
6910#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6911EOF
6912
97bf5e38 6913fi
c906108c 6914
97bf5e38
MK
6915# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6916echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
27ca5dad 6917echo "configure:6918: checking for PT_GETDBREGS" >&5
97bf5e38 6918if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6919 echo $ac_n "(cached) $ac_c" 1>&6
6920else
6921 cat > conftest.$ac_ext <<EOF
27ca5dad 6922#line 6923 "configure"
c906108c 6923#include "confdefs.h"
97bf5e38
MK
6924#include <sys/types.h>
6925#include <sys/ptrace.h>
c906108c 6926int main() {
97bf5e38 6927PT_GETDBREGS;
c906108c
SS
6928; return 0; }
6929EOF
27ca5dad 6930if { (eval echo configure:6931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6931 rm -rf conftest*
97bf5e38 6932 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6933else
6934 echo "configure: failed program was:" >&5
6935 cat conftest.$ac_ext >&5
6936 rm -rf conftest*
97bf5e38 6937 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6938fi
6939rm -f conftest*
6940fi
6941
97bf5e38
MK
6942echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6943if test $gdb_cv_have_pt_getdbregs = yes; then
6944 cat >> confdefs.h <<\EOF
6945#define HAVE_PT_GETDBREGS 1
c906108c
SS
6946EOF
6947
97bf5e38 6948fi
c906108c 6949
97bf5e38
MK
6950# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6951echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
27ca5dad 6952echo "configure:6953: checking for PT_GETXMMREGS" >&5
97bf5e38 6953if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6954 echo $ac_n "(cached) $ac_c" 1>&6
6955else
6956 cat > conftest.$ac_ext <<EOF
27ca5dad 6957#line 6958 "configure"
c906108c 6958#include "confdefs.h"
97bf5e38
MK
6959#include <sys/types.h>
6960#include <sys/ptrace.h>
c906108c 6961int main() {
97bf5e38 6962PT_GETXMMREGS;
c906108c
SS
6963; return 0; }
6964EOF
27ca5dad 6965if { (eval echo configure:6966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6966 rm -rf conftest*
97bf5e38 6967 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6968else
6969 echo "configure: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 rm -rf conftest*
97bf5e38 6972 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6973fi
6974rm -f conftest*
6975fi
6976
97bf5e38
MK
6977echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6978if test $gdb_cv_have_pt_getxmmregs = yes; then
6979 cat >> confdefs.h <<\EOF
6980#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6981EOF
6982
97bf5e38 6983fi
c906108c 6984
27ca5dad
MC
6985# See if stdint.h provides the uintptr_t type.
6986echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
6987echo "configure:6988: checking for uintptr_t in stdint.h" >&5
6988if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
6989 echo $ac_n "(cached) $ac_c" 1>&6
6990else
6991 cat > conftest.$ac_ext <<EOF
6992#line 6993 "configure"
6993#include "confdefs.h"
6994#include <stdint.h>
6995int main() {
6996uintptr_t foo = 0;
6997; return 0; }
6998EOF
6999if { (eval echo configure:7000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7000 rm -rf conftest*
7001 gdb_cv_have_uintptr_t=yes
7002else
7003 echo "configure: failed program was:" >&5
7004 cat conftest.$ac_ext >&5
7005 rm -rf conftest*
7006 gdb_cv_have_uintptr_t=no
7007fi
7008rm -f conftest*
7009fi
7010
7011echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7012if test $gdb_cv_have_uintptr_t = yes; then
7013 cat >> confdefs.h <<\EOF
7014#define HAVE_UINTPTR_T 1
7015EOF
7016
7017fi
97bf5e38
MK
7018
7019echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
27ca5dad 7020echo "configure:7021: checking whether malloc must be declared" >&5
97bf5e38 7021if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7022 echo $ac_n "(cached) $ac_c" 1>&6
7023else
7024 cat > conftest.$ac_ext <<EOF
27ca5dad 7025#line 7026 "configure"
3862412b 7026#include "confdefs.h"
e17bf198 7027
97bf5e38
MK
7028#include <stdio.h>
7029#ifdef HAVE_STRING_H
7030#include <string.h>
7031#else
7032#ifdef HAVE_STRINGS_H
7033#include <strings.h>
7034#endif
7035#endif
7036#ifdef HAVE_STDLIB_H
7037#include <stdlib.h>
7038#endif
7039#ifdef HAVE_UNISTD_H
7040#include <unistd.h>
7041#endif
3862412b 7042int main() {
97bf5e38 7043char *(*pfn) = (char *(*)) malloc
3862412b
MK
7044; return 0; }
7045EOF
27ca5dad 7046if { (eval echo configure:7047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7047 rm -rf conftest*
97bf5e38 7048 bfd_cv_decl_needed_malloc=no
3862412b
MK
7049else
7050 echo "configure: failed program was:" >&5
7051 cat conftest.$ac_ext >&5
7052 rm -rf conftest*
97bf5e38 7053 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7054fi
7055rm -f conftest*
7056fi
7057
97bf5e38
MK
7058echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7059if test $bfd_cv_decl_needed_malloc = yes; then
7060 cat >> confdefs.h <<\EOF
7061#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7062EOF
7063
97bf5e38 7064fi
3862412b 7065
97bf5e38 7066echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
27ca5dad 7067echo "configure:7068: checking whether realloc must be declared" >&5
97bf5e38 7068if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7069 echo $ac_n "(cached) $ac_c" 1>&6
7070else
7071 cat > conftest.$ac_ext <<EOF
27ca5dad 7072#line 7073 "configure"
3862412b 7073#include "confdefs.h"
e17bf198 7074
97bf5e38
MK
7075#include <stdio.h>
7076#ifdef HAVE_STRING_H
7077#include <string.h>
7078#else
7079#ifdef HAVE_STRINGS_H
7080#include <strings.h>
7081#endif
7082#endif
7083#ifdef HAVE_STDLIB_H
7084#include <stdlib.h>
7085#endif
7086#ifdef HAVE_UNISTD_H
7087#include <unistd.h>
7088#endif
3862412b 7089int main() {
97bf5e38 7090char *(*pfn) = (char *(*)) realloc
3862412b
MK
7091; return 0; }
7092EOF
27ca5dad 7093if { (eval echo configure:7094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7094 rm -rf conftest*
97bf5e38 7095 bfd_cv_decl_needed_realloc=no
3862412b
MK
7096else
7097 echo "configure: failed program was:" >&5
7098 cat conftest.$ac_ext >&5
7099 rm -rf conftest*
97bf5e38 7100 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7101fi
7102rm -f conftest*
7103fi
7104
97bf5e38
MK
7105echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7106if test $bfd_cv_decl_needed_realloc = yes; then
7107 cat >> confdefs.h <<\EOF
7108#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7109EOF
7110
97bf5e38 7111fi
3862412b 7112
97bf5e38 7113echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
27ca5dad 7114echo "configure:7115: checking whether free must be declared" >&5
97bf5e38 7115if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7116 echo $ac_n "(cached) $ac_c" 1>&6
7117else
7118 cat > conftest.$ac_ext <<EOF
27ca5dad 7119#line 7120 "configure"
451928c5 7120#include "confdefs.h"
e17bf198 7121
97bf5e38
MK
7122#include <stdio.h>
7123#ifdef HAVE_STRING_H
7124#include <string.h>
7125#else
7126#ifdef HAVE_STRINGS_H
7127#include <strings.h>
7128#endif
7129#endif
7130#ifdef HAVE_STDLIB_H
7131#include <stdlib.h>
7132#endif
7133#ifdef HAVE_UNISTD_H
7134#include <unistd.h>
7135#endif
451928c5 7136int main() {
97bf5e38 7137char *(*pfn) = (char *(*)) free
451928c5
AC
7138; return 0; }
7139EOF
27ca5dad 7140if { (eval echo configure:7141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7141 rm -rf conftest*
97bf5e38 7142 bfd_cv_decl_needed_free=no
451928c5
AC
7143else
7144 echo "configure: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 rm -rf conftest*
97bf5e38 7147 bfd_cv_decl_needed_free=yes
451928c5
AC
7148fi
7149rm -f conftest*
7150fi
7151
97bf5e38
MK
7152echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7153if test $bfd_cv_decl_needed_free = yes; then
7154 cat >> confdefs.h <<\EOF
7155#define NEED_DECLARATION_FREE 1
451928c5
AC
7156EOF
7157
97bf5e38 7158fi
451928c5 7159
97bf5e38 7160echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
27ca5dad 7161echo "configure:7162: checking whether strerror must be declared" >&5
97bf5e38 7162if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7163 echo $ac_n "(cached) $ac_c" 1>&6
7164else
7165 cat > conftest.$ac_ext <<EOF
27ca5dad 7166#line 7167 "configure"
451928c5 7167#include "confdefs.h"
e17bf198 7168
97bf5e38
MK
7169#include <stdio.h>
7170#ifdef HAVE_STRING_H
7171#include <string.h>
7172#else
7173#ifdef HAVE_STRINGS_H
7174#include <strings.h>
7175#endif
7176#endif
7177#ifdef HAVE_STDLIB_H
7178#include <stdlib.h>
7179#endif
7180#ifdef HAVE_UNISTD_H
7181#include <unistd.h>
7182#endif
451928c5 7183int main() {
97bf5e38 7184char *(*pfn) = (char *(*)) strerror
451928c5
AC
7185; return 0; }
7186EOF
27ca5dad 7187if { (eval echo configure:7188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7188 rm -rf conftest*
97bf5e38 7189 bfd_cv_decl_needed_strerror=no
451928c5
AC
7190else
7191 echo "configure: failed program was:" >&5
7192 cat conftest.$ac_ext >&5
7193 rm -rf conftest*
97bf5e38 7194 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7195fi
7196rm -f conftest*
7197fi
7198
97bf5e38
MK
7199echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7200if test $bfd_cv_decl_needed_strerror = yes; then
7201 cat >> confdefs.h <<\EOF
7202#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7203EOF
7204
97bf5e38 7205fi
451928c5 7206
97bf5e38 7207echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
27ca5dad 7208echo "configure:7209: checking whether strdup must be declared" >&5
97bf5e38 7209if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7210 echo $ac_n "(cached) $ac_c" 1>&6
7211else
7212 cat > conftest.$ac_ext <<EOF
27ca5dad 7213#line 7214 "configure"
3862412b 7214#include "confdefs.h"
e17bf198 7215
97bf5e38
MK
7216#include <stdio.h>
7217#ifdef HAVE_STRING_H
7218#include <string.h>
7219#else
7220#ifdef HAVE_STRINGS_H
7221#include <strings.h>
7222#endif
7223#endif
7224#ifdef HAVE_STDLIB_H
7225#include <stdlib.h>
7226#endif
7227#ifdef HAVE_UNISTD_H
7228#include <unistd.h>
7229#endif
3862412b 7230int main() {
97bf5e38 7231char *(*pfn) = (char *(*)) strdup
3862412b
MK
7232; return 0; }
7233EOF
27ca5dad 7234if { (eval echo configure:7235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7235 rm -rf conftest*
97bf5e38 7236 bfd_cv_decl_needed_strdup=no
3862412b
MK
7237else
7238 echo "configure: failed program was:" >&5
7239 cat conftest.$ac_ext >&5
7240 rm -rf conftest*
97bf5e38 7241 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7242fi
7243rm -f conftest*
7244fi
7245
97bf5e38
MK
7246echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7247if test $bfd_cv_decl_needed_strdup = yes; then
7248 cat >> confdefs.h <<\EOF
7249#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7250EOF
7251
97bf5e38 7252fi
3862412b 7253
97bf5e38 7254echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
27ca5dad 7255echo "configure:7256: checking whether strstr must be declared" >&5
97bf5e38 7256if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7257 echo $ac_n "(cached) $ac_c" 1>&6
7258else
7259 cat > conftest.$ac_ext <<EOF
27ca5dad 7260#line 7261 "configure"
3862412b 7261#include "confdefs.h"
e17bf198 7262
97bf5e38
MK
7263#include <stdio.h>
7264#ifdef HAVE_STRING_H
7265#include <string.h>
7266#else
7267#ifdef HAVE_STRINGS_H
7268#include <strings.h>
7269#endif
7270#endif
7271#ifdef HAVE_STDLIB_H
7272#include <stdlib.h>
7273#endif
7274#ifdef HAVE_UNISTD_H
7275#include <unistd.h>
7276#endif
3862412b 7277int main() {
97bf5e38 7278char *(*pfn) = (char *(*)) strstr
3862412b
MK
7279; return 0; }
7280EOF
27ca5dad 7281if { (eval echo configure:7282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7282 rm -rf conftest*
97bf5e38 7283 bfd_cv_decl_needed_strstr=no
3862412b
MK
7284else
7285 echo "configure: failed program was:" >&5
7286 cat conftest.$ac_ext >&5
7287 rm -rf conftest*
97bf5e38 7288 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7289fi
7290rm -f conftest*
7291fi
7292
97bf5e38
MK
7293echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7294if test $bfd_cv_decl_needed_strstr = yes; then
7295 cat >> confdefs.h <<\EOF
7296#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7297EOF
7298
97bf5e38 7299fi
3862412b 7300
97bf5e38 7301echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
27ca5dad 7302echo "configure:7303: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7303if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7304 echo $ac_n "(cached) $ac_c" 1>&6
7305else
7306 cat > conftest.$ac_ext <<EOF
27ca5dad 7307#line 7308 "configure"
596c9d4b
KB
7308#include "confdefs.h"
7309
97bf5e38
MK
7310#include <stdio.h>
7311#ifdef HAVE_STRING_H
7312#include <string.h>
7313#else
7314#ifdef HAVE_STRINGS_H
7315#include <strings.h>
7316#endif
7317#endif
7318#ifdef HAVE_STDLIB_H
7319#include <stdlib.h>
7320#endif
7321#ifdef HAVE_UNISTD_H
7322#include <unistd.h>
7323#endif
596c9d4b 7324int main() {
97bf5e38 7325char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7326; return 0; }
7327EOF
27ca5dad 7328if { (eval echo configure:7329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7329 rm -rf conftest*
97bf5e38 7330 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7331else
7332 echo "configure: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 rm -rf conftest*
97bf5e38 7335 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7336fi
7337rm -f conftest*
7338fi
7339
97bf5e38
MK
7340echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7341if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7342 cat >> confdefs.h <<\EOF
7343#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7344EOF
7345
97bf5e38 7346fi
596c9d4b 7347
97bf5e38
MK
7348
7349# The following save_state_t checkery is only necessary for HPUX
7350# versions earlier than 10.20. When those fade from memory, this
7351# could be expunged. --jsm 1999-03-22
7352
7353echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
27ca5dad 7354echo "configure:7355: checking for HPUX save_state structure" >&5
97bf5e38 7355cat > conftest.$ac_ext <<EOF
27ca5dad 7356#line 7357 "configure"
97bf5e38
MK
7357#include "confdefs.h"
7358#include <machine/save_state.h>
7359EOF
7360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7361 egrep "save_state_t" >/dev/null 2>&1; then
7362 rm -rf conftest*
7363 gdb_cv_hpux_savestate=yes
7364else
7365 rm -rf conftest*
7366 gdb_cv_hpux_savestate=no
7367fi
7368rm -f conftest*
7369
7370cat > conftest.$ac_ext <<EOF
27ca5dad 7371#line 7372 "configure"
97bf5e38
MK
7372#include "confdefs.h"
7373#include <machine/save_state.h>
7374EOF
7375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7376 egrep "ss_wide" >/dev/null 2>&1; then
7377 rm -rf conftest*
7378 gdb_cv_hpux_sswide=yes
7379else
7380 rm -rf conftest*
7381 gdb_cv_hpux_sswide=no
7382fi
7383rm -f conftest*
7384
7385if test $gdb_cv_hpux_savestate = yes
7386then
7387 cat >> confdefs.h <<\EOF
7388#define HAVE_STRUCT_SAVE_STATE_T 1
7389EOF
7390
7391fi
7392if test $gdb_cv_hpux_sswide = yes
7393then
7394 cat >> confdefs.h <<\EOF
7395#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7396EOF
7397
7398fi
7399echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7400
7401
7402# If we are configured native on GNU/Linux, work around problems with
7403# sys/procfs.h
7404# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7405
7406if test "${target}" = "${host}"; then
7407 case "${host}" in
7408 i[3456]86-*-linux*)
7409 cat >> confdefs.h <<\EOF
7410#define START_INFERIOR_TRAPS_EXPECTED 2
7411EOF
7412
7413 cat >> confdefs.h <<\EOF
7414#define sys_quotactl 1
7415EOF
7416
7417 ;;
7418 ia64-*-aix*)
7419 cat >> confdefs.h <<\EOF
7420#define NEW_PROC_API 1
7421EOF
7422
7423 ;;
7424 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7425 cat >> confdefs.h <<\EOF
7426#define NEW_PROC_API 1
7427EOF
7428
7429 ;;
7430 *-*-solaris2.[678])
7431 cat >> confdefs.h <<\EOF
7432#define NEW_PROC_API 1
7433EOF
7434
7435 ;;
7436 esac
7437fi
7438
7439if test "$ac_cv_header_sys_procfs_h" = yes; then
7440 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7441echo "configure:7442: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7442 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7443 echo $ac_n "(cached) $ac_c" 1>&6
7444else
7445 cat > conftest.$ac_ext <<EOF
27ca5dad 7446#line 7447 "configure"
596c9d4b
KB
7447#include "confdefs.h"
7448
7449#define _SYSCALL32
7450#include <sys/procfs.h>
7451int main() {
97bf5e38 7452pstatus_t avar
596c9d4b
KB
7453; return 0; }
7454EOF
27ca5dad 7455if { (eval echo configure:7456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7456 rm -rf conftest*
97bf5e38 7457 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7458else
7459 echo "configure: failed program was:" >&5
7460 cat conftest.$ac_ext >&5
7461 rm -rf conftest*
97bf5e38 7462 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7463
7464fi
7465rm -f conftest*
7466fi
7467
97bf5e38 7468 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7469 cat >> confdefs.h <<\EOF
97bf5e38 7470#define HAVE_PSTATUS_T 1
596c9d4b
KB
7471EOF
7472
7473 fi
97bf5e38 7474 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7475
97bf5e38 7476 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7477echo "configure:7478: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7478 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7479 echo $ac_n "(cached) $ac_c" 1>&6
7480else
7481 cat > conftest.$ac_ext <<EOF
27ca5dad 7482#line 7483 "configure"
596c9d4b
KB
7483#include "confdefs.h"
7484
7485#define _SYSCALL32
7486#include <sys/procfs.h>
7487int main() {
97bf5e38 7488prrun_t avar
596c9d4b
KB
7489; return 0; }
7490EOF
27ca5dad 7491if { (eval echo configure:7492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7492 rm -rf conftest*
97bf5e38 7493 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7494else
7495 echo "configure: failed program was:" >&5
7496 cat conftest.$ac_ext >&5
7497 rm -rf conftest*
97bf5e38 7498 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7499
7500fi
7501rm -f conftest*
7502fi
7503
97bf5e38 7504 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7505 cat >> confdefs.h <<\EOF
97bf5e38 7506#define HAVE_PRRUN_T 1
596c9d4b
KB
7507EOF
7508
7509 fi
97bf5e38 7510 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7511
97bf5e38 7512 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7513echo "configure:7514: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7514 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7515 echo $ac_n "(cached) $ac_c" 1>&6
7516else
7517 cat > conftest.$ac_ext <<EOF
27ca5dad 7518#line 7519 "configure"
596c9d4b
KB
7519#include "confdefs.h"
7520
7521#define _SYSCALL32
7522#include <sys/procfs.h>
7523int main() {
97bf5e38 7524gregset_t avar
596c9d4b
KB
7525; return 0; }
7526EOF
27ca5dad 7527if { (eval echo configure:7528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7528 rm -rf conftest*
97bf5e38 7529 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7530else
7531 echo "configure: failed program was:" >&5
7532 cat conftest.$ac_ext >&5
7533 rm -rf conftest*
97bf5e38 7534 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7535
7536fi
7537rm -f conftest*
7538fi
7539
97bf5e38 7540 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7541 cat >> confdefs.h <<\EOF
97bf5e38 7542#define HAVE_GREGSET_T 1
596c9d4b
KB
7543EOF
7544
7545 fi
97bf5e38 7546 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7547
97bf5e38 7548 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7549echo "configure:7550: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7550 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7551 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7552else
7553 cat > conftest.$ac_ext <<EOF
27ca5dad 7554#line 7555 "configure"
d84dd0c5 7555#include "confdefs.h"
97bf5e38
MK
7556
7557#define _SYSCALL32
d84dd0c5 7558#include <sys/procfs.h>
97bf5e38
MK
7559int main() {
7560fpregset_t avar
7561; return 0; }
d84dd0c5 7562EOF
27ca5dad 7563if { (eval echo configure:7564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7564 rm -rf conftest*
7565 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7566else
7567 echo "configure: failed program was:" >&5
7568 cat conftest.$ac_ext >&5
97bf5e38
MK
7569 rm -rf conftest*
7570 bfd_cv_have_sys_procfs_type_fpregset_t=no
7571
d84dd0c5 7572fi
97bf5e38 7573rm -f conftest*
d84dd0c5
MK
7574fi
7575
97bf5e38
MK
7576 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7577 cat >> confdefs.h <<\EOF
7578#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7579EOF
7580
97bf5e38
MK
7581 fi
7582 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7583
97bf5e38 7584 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7585echo "configure:7586: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7586 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7587 echo $ac_n "(cached) $ac_c" 1>&6
7588else
7589 cat > conftest.$ac_ext <<EOF
27ca5dad 7590#line 7591 "configure"
c906108c 7591#include "confdefs.h"
c906108c 7592
97bf5e38
MK
7593#define _SYSCALL32
7594#include <sys/procfs.h>
c906108c 7595int main() {
97bf5e38 7596prgregset_t avar
c906108c
SS
7597; return 0; }
7598EOF
27ca5dad 7599if { (eval echo configure:7600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7600 rm -rf conftest*
97bf5e38 7601 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7602else
7603 echo "configure: failed program was:" >&5
7604 cat conftest.$ac_ext >&5
7605 rm -rf conftest*
97bf5e38
MK
7606 bfd_cv_have_sys_procfs_type_prgregset_t=no
7607
c906108c
SS
7608fi
7609rm -f conftest*
7610fi
7611
97bf5e38
MK
7612 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7613 cat >> confdefs.h <<\EOF
7614#define HAVE_PRGREGSET_T 1
c906108c
SS
7615EOF
7616
97bf5e38
MK
7617 fi
7618 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7619
97bf5e38 7620 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7621echo "configure:7622: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7622 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7623 echo $ac_n "(cached) $ac_c" 1>&6
7624else
7625 cat > conftest.$ac_ext <<EOF
27ca5dad 7626#line 7627 "configure"
d45fe813 7627#include "confdefs.h"
97bf5e38
MK
7628
7629#define _SYSCALL32
7630#include <sys/procfs.h>
d45fe813 7631int main() {
97bf5e38 7632prfpregset_t avar
d45fe813
KB
7633; return 0; }
7634EOF
27ca5dad 7635if { (eval echo configure:7636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7636 rm -rf conftest*
97bf5e38 7637 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7638else
7639 echo "configure: failed program was:" >&5
7640 cat conftest.$ac_ext >&5
7641 rm -rf conftest*
97bf5e38
MK
7642 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7643
d45fe813
KB
7644fi
7645rm -f conftest*
7646fi
7647
97bf5e38
MK
7648 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7649 cat >> confdefs.h <<\EOF
7650#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7651EOF
7652
97bf5e38
MK
7653 fi
7654 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7655
97bf5e38 7656 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7657echo "configure:7658: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7658 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7659 echo $ac_n "(cached) $ac_c" 1>&6
7660else
7661 cat > conftest.$ac_ext <<EOF
27ca5dad 7662#line 7663 "configure"
d45fe813 7663#include "confdefs.h"
97bf5e38
MK
7664
7665#define _SYSCALL32
7666#include <sys/procfs.h>
d45fe813 7667int main() {
97bf5e38 7668prgregset32_t avar
d45fe813
KB
7669; return 0; }
7670EOF
27ca5dad 7671if { (eval echo configure:7672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7672 rm -rf conftest*
97bf5e38 7673 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7674else
7675 echo "configure: failed program was:" >&5
7676 cat conftest.$ac_ext >&5
7677 rm -rf conftest*
97bf5e38
MK
7678 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7679
d45fe813
KB
7680fi
7681rm -f conftest*
7682fi
7683
97bf5e38
MK
7684 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7685 cat >> confdefs.h <<\EOF
7686#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7687EOF
7688
97bf5e38
MK
7689 fi
7690 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7691
97bf5e38 7692 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7693echo "configure:7694: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7694 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7695 echo $ac_n "(cached) $ac_c" 1>&6
7696else
7697 cat > conftest.$ac_ext <<EOF
27ca5dad 7698#line 7699 "configure"
d45fe813 7699#include "confdefs.h"
97bf5e38
MK
7700
7701#define _SYSCALL32
7702#include <sys/procfs.h>
d45fe813 7703int main() {
97bf5e38 7704prfpregset32_t avar
d45fe813
KB
7705; return 0; }
7706EOF
27ca5dad 7707if { (eval echo configure:7708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7708 rm -rf conftest*
97bf5e38 7709 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7710else
7711 echo "configure: failed program was:" >&5
7712 cat conftest.$ac_ext >&5
7713 rm -rf conftest*
97bf5e38
MK
7714 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7715
d45fe813
KB
7716fi
7717rm -f conftest*
7718fi
7719
97bf5e38
MK
7720 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7721 cat >> confdefs.h <<\EOF
7722#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7723EOF
7724
97bf5e38
MK
7725 fi
7726 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7727
97bf5e38 7728 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7729echo "configure:7730: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7730 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7731 echo $ac_n "(cached) $ac_c" 1>&6
7732else
7733 cat > conftest.$ac_ext <<EOF
27ca5dad 7734#line 7735 "configure"
d45fe813 7735#include "confdefs.h"
97bf5e38 7736
d45fe813 7737#define _SYSCALL32
97bf5e38 7738#include <sys/procfs.h>
d45fe813 7739int main() {
97bf5e38 7740lwpid_t avar
d45fe813
KB
7741; return 0; }
7742EOF
27ca5dad 7743if { (eval echo configure:7744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7744 rm -rf conftest*
97bf5e38 7745 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7746else
7747 echo "configure: failed program was:" >&5
7748 cat conftest.$ac_ext >&5
7749 rm -rf conftest*
97bf5e38
MK
7750 bfd_cv_have_sys_procfs_type_lwpid_t=no
7751
d45fe813
KB
7752fi
7753rm -f conftest*
7754fi
7755
97bf5e38
MK
7756 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7757 cat >> confdefs.h <<\EOF
7758#define HAVE_LWPID_T 1
d45fe813
KB
7759EOF
7760
97bf5e38
MK
7761 fi
7762 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7763
97bf5e38 7764 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7765echo "configure:7766: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7766 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7767 echo $ac_n "(cached) $ac_c" 1>&6
7768else
7769 cat > conftest.$ac_ext <<EOF
27ca5dad 7770#line 7771 "configure"
c906108c
SS
7771#include "confdefs.h"
7772
97bf5e38
MK
7773#define _SYSCALL32
7774#include <sys/procfs.h>
c906108c 7775int main() {
97bf5e38 7776psaddr_t avar
c906108c
SS
7777; return 0; }
7778EOF
27ca5dad 7779if { (eval echo configure:7780: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7780 rm -rf conftest*
97bf5e38 7781 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7782else
7783 echo "configure: failed program was:" >&5
7784 cat conftest.$ac_ext >&5
7785 rm -rf conftest*
97bf5e38
MK
7786 bfd_cv_have_sys_procfs_type_psaddr_t=no
7787
c906108c
SS
7788fi
7789rm -f conftest*
7790fi
7791
97bf5e38
MK
7792 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7793 cat >> confdefs.h <<\EOF
7794#define HAVE_PSADDR_T 1
c906108c
SS
7795EOF
7796
97bf5e38
MK
7797 fi
7798 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7799
97bf5e38 7800 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7801echo "configure:7802: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7802 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7803 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7804else
7805 cat > conftest.$ac_ext <<EOF
27ca5dad 7806#line 7807 "configure"
c906108c
SS
7807#include "confdefs.h"
7808
97bf5e38
MK
7809#define _SYSCALL32
7810#include <sys/procfs.h>
7811int main() {
7812prsysent_t avar
7813; return 0; }
c906108c 7814EOF
27ca5dad 7815if { (eval echo configure:7816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7816 rm -rf conftest*
7817 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7818else
7819 echo "configure: failed program was:" >&5
7820 cat conftest.$ac_ext >&5
97bf5e38
MK
7821 rm -rf conftest*
7822 bfd_cv_have_sys_procfs_type_prsysent_t=no
7823
c906108c 7824fi
97bf5e38 7825rm -f conftest*
c906108c
SS
7826fi
7827
97bf5e38
MK
7828 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7829 cat >> confdefs.h <<\EOF
7830#define HAVE_PRSYSENT_T 1
c906108c
SS
7831EOF
7832
97bf5e38
MK
7833 fi
7834 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7835
97bf5e38 7836 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7837echo "configure:7838: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7838 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7839 echo $ac_n "(cached) $ac_c" 1>&6
7840else
7841 cat > conftest.$ac_ext <<EOF
27ca5dad 7842#line 7843 "configure"
c906108c
SS
7843#include "confdefs.h"
7844
97bf5e38
MK
7845#define _SYSCALL32
7846#include <sys/procfs.h>
c906108c 7847int main() {
97bf5e38 7848pr_sigset_t avar
c906108c
SS
7849; return 0; }
7850EOF
27ca5dad 7851if { (eval echo configure:7852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7852 rm -rf conftest*
97bf5e38 7853 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7854else
7855 echo "configure: failed program was:" >&5
7856 cat conftest.$ac_ext >&5
7857 rm -rf conftest*
97bf5e38
MK
7858 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7859
c906108c
SS
7860fi
7861rm -f conftest*
7862fi
7863
97bf5e38
MK
7864 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7865 cat >> confdefs.h <<\EOF
7866#define HAVE_PR_SIGSET_T 1
c906108c
SS
7867EOF
7868
97bf5e38
MK
7869 fi
7870 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7871
97bf5e38 7872 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7873echo "configure:7874: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7874 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7875 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7876else
7877 cat > conftest.$ac_ext <<EOF
27ca5dad 7878#line 7879 "configure"
c906108c
SS
7879#include "confdefs.h"
7880
97bf5e38
MK
7881#define _SYSCALL32
7882#include <sys/procfs.h>
7883int main() {
7884pr_sigaction64_t avar
7885; return 0; }
c906108c 7886EOF
27ca5dad 7887if { (eval echo configure:7888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7888 rm -rf conftest*
7889 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7890else
7891 echo "configure: failed program was:" >&5
7892 cat conftest.$ac_ext >&5
97bf5e38
MK
7893 rm -rf conftest*
7894 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7895
c906108c 7896fi
97bf5e38 7897rm -f conftest*
c906108c
SS
7898fi
7899
97bf5e38
MK
7900 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7901 cat >> confdefs.h <<\EOF
7902#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7903EOF
7904
97bf5e38
MK
7905 fi
7906 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7907
7908 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7909echo "configure:7910: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7910 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7911 echo $ac_n "(cached) $ac_c" 1>&6
7912else
7913 cat > conftest.$ac_ext <<EOF
27ca5dad 7914#line 7915 "configure"
97bf5e38
MK
7915#include "confdefs.h"
7916
7917#define _SYSCALL32
7918#include <sys/procfs.h>
7919int main() {
7920pr_siginfo64_t avar
7921; return 0; }
7922EOF
27ca5dad 7923if { (eval echo configure:7924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7924 rm -rf conftest*
7925 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7926else
7927 echo "configure: failed program was:" >&5
7928 cat conftest.$ac_ext >&5
7929 rm -rf conftest*
7930 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7931
7932fi
7933rm -f conftest*
c906108c 7934fi
c906108c 7935
97bf5e38
MK
7936 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7937 cat >> confdefs.h <<\EOF
7938#define HAVE_PR_SIGINFO64_T 1
7939EOF
c906108c 7940
97bf5e38
MK
7941 fi
7942 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7943
7944
7945
7946
7947
7948 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7949 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
27ca5dad 7950echo "configure:7951: checking whether prfpregset_t type is broken" >&5
97bf5e38 7951 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7952 echo $ac_n "(cached) $ac_c" 1>&6
7953else
7954 if test "$cross_compiling" = yes; then
97bf5e38 7955 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7956else
7957 cat > conftest.$ac_ext <<EOF
27ca5dad 7958#line 7959 "configure"
c906108c 7959#include "confdefs.h"
97bf5e38
MK
7960#include <sys/procfs.h>
7961 int main ()
7962 {
7963 if (sizeof (prfpregset_t) == sizeof (void *))
7964 return 1;
7965 return 0;
7966 }
c906108c 7967EOF
27ca5dad 7968if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7969then
97bf5e38 7970 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7971else
7972 echo "configure: failed program was:" >&5
7973 cat conftest.$ac_ext >&5
7974 rm -fr conftest*
97bf5e38 7975 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7976fi
7977rm -fr conftest*
7978fi
7979
7980fi
7981
97bf5e38
MK
7982 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7983 if test $gdb_cv_prfpregset_t_broken = yes; then
7984 cat >> confdefs.h <<\EOF
7985#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7986EOF
7987
97bf5e38
MK
7988 fi
7989 fi
c906108c 7990
97bf5e38
MK
7991
7992 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
27ca5dad 7993echo "configure:7994: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7994 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7995 echo $ac_n "(cached) $ac_c" 1>&6
7996else
7997 cat > conftest.$ac_ext <<EOF
27ca5dad 7998#line 7999 "configure"
c906108c 7999#include "confdefs.h"
97bf5e38
MK
8000#include <unistd.h>
8001#include <sys/types.h>
8002#include <sys/procfs.h>
8003
8004int main() {
8005
8006 int dummy;;
8007 dummy = ioctl(0, PIOCSET, &dummy);
8008
8009; return 0; }
c906108c 8010EOF
27ca5dad 8011if { (eval echo configure:8012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8012 rm -rf conftest*
97bf5e38 8013 gdb_cv_have_procfs_piocset=yes
c906108c 8014else
c906108c
SS
8015 echo "configure: failed program was:" >&5
8016 cat conftest.$ac_ext >&5
8017 rm -rf conftest*
97bf5e38 8018 gdb_cv_have_procfs_piocset=no
c906108c
SS
8019fi
8020rm -f conftest*
8021fi
97bf5e38
MK
8022
8023 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8024 if test $gdb_cv_have_procfs_piocset = yes; then
8025 cat >> confdefs.h <<\EOF
8026#define HAVE_PROCFS_PIOCSET 1
c906108c 8027EOF
97bf5e38
MK
8028
8029 fi
c906108c 8030fi
c906108c 8031
97bf5e38
MK
8032if test ${host} = ${target} ; then
8033
8034 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
27ca5dad 8035echo "configure:8036: checking for member l_addr in struct link_map" >&5
97bf5e38 8036 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8037 echo $ac_n "(cached) $ac_c" 1>&6
8038else
8039 cat > conftest.$ac_ext <<EOF
27ca5dad 8040#line 8041 "configure"
c906108c 8041#include "confdefs.h"
97bf5e38 8042#include <link.h>
c906108c 8043int main() {
97bf5e38 8044struct link_map lm; (void) lm.l_addr;
c906108c
SS
8045; return 0; }
8046EOF
27ca5dad 8047if { (eval echo configure:8048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8048 rm -rf conftest*
97bf5e38 8049 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8050else
8051 echo "configure: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 rm -rf conftest*
97bf5e38 8054 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8055fi
8056rm -f conftest*
8057fi
8058
97bf5e38
MK
8059 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8060 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8061 cat >> confdefs.h <<\EOF
8062#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8063EOF
97bf5e38
MK
8064
8065 fi
8066
8067
8068 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
27ca5dad 8069echo "configure:8070: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8070 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8071 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8072else
97bf5e38 8073 cat > conftest.$ac_ext <<EOF
27ca5dad 8074#line 8075 "configure"
97bf5e38
MK
8075#include "confdefs.h"
8076#include <sys/types.h>
8077#include <link.h>
8078int main() {
8079struct link_map lm; (void) lm.lm_addr;
8080; return 0; }
8081EOF
27ca5dad 8082if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8083 rm -rf conftest*
8084 gdb_cv_have_struct_link_map_with_lm_members=yes
8085else
8086 echo "configure: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 rm -rf conftest*
8089 gdb_cv_have_struct_link_map_with_lm_members=no
8090fi
8091rm -f conftest*
c906108c 8092fi
c906108c 8093
97bf5e38
MK
8094 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8095 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8096 cat >> confdefs.h <<\EOF
8097#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8098EOF
8099
8100 fi
8101
8102
8103 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
27ca5dad 8104echo "configure:8105: checking for member som_addr in struct so_map" >&5
97bf5e38 8105 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8106 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8107else
8108 cat > conftest.$ac_ext <<EOF
27ca5dad 8109#line 8110 "configure"
c906108c 8110#include "confdefs.h"
97bf5e38
MK
8111#include <sys/types.h>
8112#ifdef HAVE_NLIST_H
8113#include <nlist.h>
8114#endif
8115#include <link.h>
8116int main() {
8117struct so_map lm; (void) lm.som_addr;
8118; return 0; }
8119EOF
27ca5dad 8120if { (eval echo configure:8121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8121 rm -rf conftest*
8122 gdb_cv_have_struct_so_map_with_som_members=yes
8123else
8124 echo "configure: failed program was:" >&5
8125 cat conftest.$ac_ext >&5
8126 rm -rf conftest*
8127 gdb_cv_have_struct_so_map_with_som_members=no
8128fi
8129rm -f conftest*
8130fi
c906108c 8131
97bf5e38
MK
8132 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8133 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8134 cat >> confdefs.h <<\EOF
8135#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8136EOF
c906108c 8137
97bf5e38 8138 fi
c906108c 8139
97bf5e38
MK
8140
8141 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
27ca5dad 8142echo "configure:8143: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8143 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8144 echo $ac_n "(cached) $ac_c" 1>&6
8145else
8146 cat > conftest.$ac_ext <<EOF
27ca5dad 8147#line 8148 "configure"
97bf5e38
MK
8148#include "confdefs.h"
8149#define _SYSCALL32
8150#include <sys/link.h>
8151int main() {
8152struct link_map32 l;
8153; return 0; }
8154EOF
27ca5dad 8155if { (eval echo configure:8156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8156 rm -rf conftest*
8157 gdb_cv_have_struct_link_map32=yes
8158else
8159 echo "configure: failed program was:" >&5
8160 cat conftest.$ac_ext >&5
8161 rm -rf conftest*
8162 gdb_cv_have_struct_link_map32=no
8163fi
8164rm -f conftest*
8165fi
c906108c 8166
97bf5e38
MK
8167 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8168 if test $gdb_cv_have_struct_link_map32 = yes; then
8169 cat >> confdefs.h <<\EOF
8170#define HAVE_STRUCT_LINK_MAP32 1
8171EOF
c906108c 8172
97bf5e38
MK
8173 cat >> confdefs.h <<\EOF
8174#define _SYSCALL32 1
8175EOF
c906108c 8176
97bf5e38
MK
8177 fi
8178fi
c906108c 8179
c906108c 8180
97bf5e38 8181echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
27ca5dad 8182echo "configure:8183: checking for long long support in compiler" >&5
97bf5e38
MK
8183if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8184 echo $ac_n "(cached) $ac_c" 1>&6
8185else
8186 cat > conftest.$ac_ext <<EOF
27ca5dad 8187#line 8188 "configure"
97bf5e38 8188#include "confdefs.h"
c906108c 8189
97bf5e38 8190int main() {
c906108c 8191
97bf5e38
MK
8192 extern long long foo;
8193 switch (foo & 2) { case 0: return 1; }
c906108c 8194
97bf5e38
MK
8195; return 0; }
8196EOF
27ca5dad 8197if { (eval echo configure:8198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8198 rm -rf conftest*
8199 gdb_cv_c_long_long=yes
8200else
8201 echo "configure: failed program was:" >&5
8202 cat conftest.$ac_ext >&5
8203 rm -rf conftest*
8204 gdb_cv_c_long_long=no
8205fi
8206rm -f conftest*
8207fi
c906108c 8208
97bf5e38
MK
8209echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8210if test $gdb_cv_c_long_long = yes; then
8211 cat >> confdefs.h <<\EOF
8212#define CC_HAS_LONG_LONG 1
8213EOF
8214
8215fi
8216
8217
8218echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
27ca5dad 8219echo "configure:8220: checking for long long support in printf" >&5
97bf5e38
MK
8220if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8221 echo $ac_n "(cached) $ac_c" 1>&6
8222else
8223 if test "$cross_compiling" = yes; then
8224 gdb_cv_printf_has_long_long=no
8225else
8226 cat > conftest.$ac_ext <<EOF
27ca5dad 8227#line 8228 "configure"
97bf5e38
MK
8228#include "confdefs.h"
8229
8230int main () {
8231 char buf[32];
8232 long long l = 0;
8233 l = (l << 16) + 0x0123;
8234 l = (l << 16) + 0x4567;
8235 l = (l << 16) + 0x89ab;
8236 l = (l << 16) + 0xcdef;
8237 sprintf (buf, "0x%016llx", l);
8238 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8239}
97bf5e38 8240EOF
27ca5dad 8241if { (eval echo configure:8242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8242then
8243 gdb_cv_printf_has_long_long=yes
8244else
8245 echo "configure: failed program was:" >&5
8246 cat conftest.$ac_ext >&5
8247 rm -fr conftest*
8248 gdb_cv_printf_has_long_long=no
8249fi
8250rm -fr conftest*
8251fi
8252
8253fi
8254
8255if test $gdb_cv_printf_has_long_long = yes; then
8256 cat >> confdefs.h <<\EOF
8257#define PRINTF_HAS_LONG_LONG 1
8258EOF
8259
8260fi
8261echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8262
8263
8264echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
27ca5dad 8265echo "configure:8266: checking for long double support in compiler" >&5
97bf5e38
MK
8266if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8267 echo $ac_n "(cached) $ac_c" 1>&6
8268else
8269 cat > conftest.$ac_ext <<EOF
27ca5dad 8270#line 8271 "configure"
97bf5e38
MK
8271#include "confdefs.h"
8272
8273int main() {
8274long double foo;
8275; return 0; }
8276EOF
27ca5dad 8277if { (eval echo configure:8278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8278 rm -rf conftest*
8279 ac_cv_c_long_double=yes
8280else
8281 echo "configure: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8283 rm -rf conftest*
8284 ac_cv_c_long_double=no
8285fi
8286rm -f conftest*
8287fi
c906108c 8288
97bf5e38
MK
8289echo "$ac_t""$ac_cv_c_long_double" 1>&6
8290if test $ac_cv_c_long_double = yes; then
8291 cat >> confdefs.h <<\EOF
8292#define HAVE_LONG_DOUBLE 1
c906108c 8293EOF
97bf5e38
MK
8294
8295fi
8296
8297
8298echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
27ca5dad 8299echo "configure:8300: checking for long double support in printf" >&5
97bf5e38
MK
8300if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8301 echo $ac_n "(cached) $ac_c" 1>&6
8302else
8303 if test "$cross_compiling" = yes; then
8304 gdb_cv_printf_has_long_double=no
8305else
8306 cat > conftest.$ac_ext <<EOF
27ca5dad 8307#line 8308 "configure"
97bf5e38
MK
8308#include "confdefs.h"
8309
8310int main () {
8311 char buf[16];
8312 long double f = 3.141592653;
8313 sprintf (buf, "%Lg", f);
8314 return (strncmp ("3.14159", buf, 7));
8315}
8316EOF
27ca5dad 8317if { (eval echo configure:8318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8318then
97bf5e38 8319 gdb_cv_printf_has_long_double=yes
c906108c
SS
8320else
8321 echo "configure: failed program was:" >&5
8322 cat conftest.$ac_ext >&5
8323 rm -fr conftest*
97bf5e38 8324 gdb_cv_printf_has_long_double=no
c906108c
SS
8325fi
8326rm -fr conftest*
8327fi
8328
8329fi
8330
97bf5e38 8331if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8332 cat >> confdefs.h <<\EOF
97bf5e38
MK
8333#define PRINTF_HAS_LONG_DOUBLE 1
8334EOF
8335
8336fi
8337echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8338
8339
8340echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
27ca5dad 8341echo "configure:8342: checking for long double support in scanf" >&5
97bf5e38
MK
8342if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8343 echo $ac_n "(cached) $ac_c" 1>&6
8344else
8345 if test "$cross_compiling" = yes; then
8346 gdb_cv_scanf_has_long_double=no
8347else
8348 cat > conftest.$ac_ext <<EOF
27ca5dad 8349#line 8350 "configure"
97bf5e38
MK
8350#include "confdefs.h"
8351
8352int main () {
8353 char *buf = "3.141592653";
8354 long double f = 0;
8355 sscanf (buf, "%Lg", &f);
8356 return !(f > 3.14159 && f < 3.14160);
8357}
c906108c 8358EOF
27ca5dad 8359if { (eval echo configure:8360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8360then
8361 gdb_cv_scanf_has_long_double=yes
8362else
8363 echo "configure: failed program was:" >&5
8364 cat conftest.$ac_ext >&5
8365 rm -fr conftest*
8366 gdb_cv_scanf_has_long_double=no
8367fi
8368rm -fr conftest*
8369fi
c906108c
SS
8370
8371fi
8372
97bf5e38
MK
8373if test $gdb_cv_scanf_has_long_double = yes; then
8374 cat >> confdefs.h <<\EOF
8375#define SCANF_HAS_LONG_DOUBLE 1
8376EOF
8377
8378fi
8379echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8380
438013df
AO
8381case ${host_os} in
8382aix*)
8383 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
27ca5dad 8384echo "configure:8385: checking for -bbigtoc option" >&5
438013df
AO
8385if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8386 echo $ac_n "(cached) $ac_c" 1>&6
8387else
8388
8389 SAVE_LDFLAGS=$LDFLAGS
8390
8391 case $GCC in
8392 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8393 *) gdb_cv_bigtoc=-bbigtoc ;;
8394 esac
8395
8396 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8397 cat > conftest.$ac_ext <<EOF
27ca5dad 8398#line 8399 "configure"
438013df
AO
8399#include "confdefs.h"
8400
8401int main() {
8402int i;
8403; return 0; }
8404EOF
27ca5dad 8405if { (eval echo configure:8406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8406 :
8407else
8408 echo "configure: failed program was:" >&5
8409 cat conftest.$ac_ext >&5
8410 rm -rf conftest*
8411 gdb_cv_bigtoc=
8412fi
8413rm -f conftest*
8414
8415fi
8416
8417echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8418 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8419 ;;
8420esac
8421
c906108c
SS
8422
8423
8424if test ${build} = ${host} -a ${host} = ${target} ; then
8425 case ${host_os} in
8426 hpux*)
8427 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
27ca5dad 8428echo "configure:8429: checking for HPUX/OSF thread support" >&5
c906108c
SS
8429 if test -f /usr/include/dce/cma_config.h ; then
8430 if test "$GCC" = "yes" ; then
8431 echo "$ac_t""yes" 1>&6
8432 cat >> confdefs.h <<\EOF
8433#define HAVE_HPUX_THREAD_SUPPORT 1
8434EOF
8435
66b965bb 8436 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8437 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8438 else
8439 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8440 fi
8441 else
8442 echo "$ac_t""no" 1>&6
8443 fi
8444 ;;
8445 solaris*)
d92419e5
JB
8446 # See if thread_db library is around for Solaris thread debugging.
8447 # Note that we must explicitly test for version 1 of the library
8448 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8449 # the same API.
c906108c 8450 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
27ca5dad 8451echo "configure:8452: checking for Solaris thread debugging library" >&5
c906108c
SS
8452 if test -f /usr/lib/libthread_db.so.1 ; then
8453 echo "$ac_t""yes" 1>&6
8454 cat >> confdefs.h <<\EOF
8455#define HAVE_THREAD_DB_LIB 1
8456EOF
8457
66b965bb 8458 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8459 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8460 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
27ca5dad 8461echo "configure:8462: checking for dlopen in -ldl" >&5
c906108c
SS
8462ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8463if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8464 echo $ac_n "(cached) $ac_c" 1>&6
8465else
8466 ac_save_LIBS="$LIBS"
8467LIBS="-ldl $LIBS"
8468cat > conftest.$ac_ext <<EOF
27ca5dad 8469#line 8470 "configure"
c906108c
SS
8470#include "confdefs.h"
8471/* Override any gcc2 internal prototype to avoid an error. */
8472/* We use char because int might match the return type of a gcc2
8473 builtin and then its argument prototype would still apply. */
8474char dlopen();
8475
8476int main() {
8477dlopen()
8478; return 0; }
8479EOF
27ca5dad 8480if { (eval echo configure:8481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8481 rm -rf conftest*
8482 eval "ac_cv_lib_$ac_lib_var=yes"
8483else
8484 echo "configure: failed program was:" >&5
8485 cat conftest.$ac_ext >&5
8486 rm -rf conftest*
8487 eval "ac_cv_lib_$ac_lib_var=no"
8488fi
8489rm -f conftest*
8490LIBS="$ac_save_LIBS"
8491
8492fi
8493if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8494 echo "$ac_t""yes" 1>&6
8495 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8496 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8497 cat >> confdefs.h <<EOF
8498#define $ac_tr_lib 1
8499EOF
8500
8501 LIBS="-ldl $LIBS"
8502
8503else
8504 echo "$ac_t""no" 1>&6
8505fi
8506
8507 if test "$GCC" = "yes" ; then
8508 # The GNU linker requires the -export-dynamic option to make
8509 # all symbols visible in the dynamic symbol table.
8510 hold_ldflags=$LDFLAGS
8511 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
27ca5dad 8512echo "configure:8513: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8513 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8514 cat > conftest.$ac_ext <<EOF
27ca5dad 8515#line 8516 "configure"
c906108c
SS
8516#include "confdefs.h"
8517
8518int main() {
8519int i;
8520; return 0; }
8521EOF
27ca5dad 8522if { (eval echo configure:8523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8523 rm -rf conftest*
8524 found=yes
8525else
8526 echo "configure: failed program was:" >&5
8527 cat conftest.$ac_ext >&5
8528 rm -rf conftest*
8529 found=no
8530fi
8531rm -f conftest*
8532 LDFLAGS=$hold_ldflags
8533 echo "$ac_t""$found" 1>&6
8534 if test $found = yes; then
8535 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8536 fi
8537 fi
8538 # Sun randomly tweaked the prototypes in <proc_service.h>
8539 # at one point.
8540 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
27ca5dad 8541echo "configure:8542: checking if <proc_service.h> is old" >&5
c906108c
SS
8542 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8543 echo $ac_n "(cached) $ac_c" 1>&6
8544else
8545
8546 cat > conftest.$ac_ext <<EOF
27ca5dad 8547#line 8548 "configure"
c906108c
SS
8548#include "confdefs.h"
8549
8550 #include <proc_service.h>
8551 ps_err_e ps_pdwrite
8552 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8553
8554int main() {
8555
8556; return 0; }
8557EOF
27ca5dad 8558if { (eval echo configure:8559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8559 rm -rf conftest*
8560 gdb_cv_proc_service_is_old=no
8561else
8562 echo "configure: failed program was:" >&5
8563 cat conftest.$ac_ext >&5
8564 rm -rf conftest*
8565 gdb_cv_proc_service_is_old=yes
8566fi
8567rm -f conftest*
8568
8569fi
8570
8571 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8572 if test $gdb_cv_proc_service_is_old = yes; then
8573 cat >> confdefs.h <<\EOF
8574#define PROC_SERVICE_IS_OLD 1
8575EOF
8576
8577 fi
8578 else
8579 echo "$ac_t""no" 1>&6
8580 fi
8581 ;;
d92419e5
JB
8582 aix*)
8583 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
27ca5dad 8584echo "configure:8585: checking for AiX thread debugging library" >&5
d92419e5
JB
8585 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8586 echo $ac_n "(cached) $ac_c" 1>&6
8587else
8588 cat > conftest.$ac_ext <<EOF
27ca5dad 8589#line 8590 "configure"
d92419e5
JB
8590#include "confdefs.h"
8591#include <sys/pthdebug.h>
8592int main() {
8593#ifndef PTHDB_VERSION_3
8594 #error
8595 #endif
8596; return 0; }
8597EOF
27ca5dad 8598if { (eval echo configure:8599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8599 rm -rf conftest*
8600 gdb_cv_have_aix_thread_debug=yes
8601else
8602 echo "configure: failed program was:" >&5
8603 cat conftest.$ac_ext >&5
8604 rm -rf conftest*
8605 gdb_cv_have_aix_thread_debug=no
8606fi
8607rm -f conftest*
8608fi
8609
8610 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8611 if test $gdb_cv_have_aix_thread_debug = yes; then
8612 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8613 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8614 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8615 fi
8616 ;;
c906108c
SS
8617 esac
8618
8619fi
8620
3f47be5c
EZ
8621if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8622 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
27ca5dad 8623echo "configure:8624: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8624if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8625 echo $ac_n "(cached) $ac_c" 1>&6
8626else
8627 cat > conftest.$ac_ext <<EOF
27ca5dad 8628#line 8629 "configure"
3f47be5c
EZ
8629#include "confdefs.h"
8630#include <thread_db.h>
8631int main() {
8632int i = TD_NOTALLOC;
8633; return 0; }
8634EOF
27ca5dad 8635if { (eval echo configure:8636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8636 rm -rf conftest*
8637 gdb_cv_thread_db_h_has_td_notalloc=yes
8638else
8639 echo "configure: failed program was:" >&5
8640 cat conftest.$ac_ext >&5
8641 rm -rf conftest*
8642 gdb_cv_thread_db_h_has_td_notalloc=no
8643
8644fi
8645rm -f conftest*
8646
8647fi
8648
8649echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8650fi
8651if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8652 cat >> confdefs.h <<\EOF
8653#define THREAD_DB_HAS_TD_NOTALLOC 1
8654EOF
8655
8656fi
8657
fb40c209 8658
030292b7
DJ
8659# Check whether --with-sysroot or --without-sysroot was given.
8660if test "${with_sysroot+set}" = set; then
8661 withval="$with_sysroot"
8662
8663 case ${with_sysroot} in
715d1656 8664 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
8665 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8666 esac
8667
8668 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8669
8670 if test "x$exec_prefix" = xNONE; then
8671 if test "x$prefix" = xNONE; then
8672 test_prefix=/usr/local
8673 else
8674 test_prefix=$prefix
8675 fi
8676 else
8677 test_prefix=$exec_prefix
8678 fi
8679 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
8680 "${test_prefix}"|"${test_prefix}/"*|\
8681 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
8682 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8683 TARGET_SYSTEM_ROOT_DEFINE="$t"
8684 ;;
8685 esac
8686
8687else
8688
8689 TARGET_SYSTEM_ROOT=
8690 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8691
8692fi
8693
8694
8695
8696
3b851bce
AC
8697# NOTE: Don't add -Wall or -Wunused, they both include
8698# -Wunused-parameter which reports bogus warnings.
8699# NOTE: If you add to this list, remember to update
8700# gdb/doc/gdbint.texinfo.
1decb323 8701build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8702-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8703# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8704# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8705# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8706# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8707# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8708# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8709# Check whether --enable-build-warnings or --disable-build-warnings was given.
8710if test "${enable_build_warnings+set}" = set; then
8711 enableval="$enable_build_warnings"
1decb323 8712 case "${enableval}" in
c906108c
SS
8713 yes) ;;
8714 no) build_warnings="-w";;
8715 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8716 build_warnings="${build_warnings} ${t}";;
8717 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8718 build_warnings="${t} ${build_warnings}";;
8719 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8720esac
d4f3574e 8721if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8722 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8723fi
1decb323 8724fi
3b851bce
AC
8725# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8726if test "${enable_gdb_build_warnings+set}" = set; then
8727 enableval="$enable_gdb_build_warnings"
8728 case "${enableval}" in
8729 yes) ;;
8730 no) build_warnings="-w";;
8731 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8732 build_warnings="${build_warnings} ${t}";;
8733 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8734 build_warnings="${t} ${build_warnings}";;
8735 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8736esac
8737if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8738 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8739fi
8740fi
104c1213
JM
8741WARN_CFLAGS=""
8742WERROR_CFLAGS=""
c906108c
SS
8743if test "x${build_warnings}" != x -a "x$GCC" = xyes
8744then
746a987d 8745 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
27ca5dad 8746echo "configure:8747: checking compiler warning flags" >&5
746a987d
AC
8747 # Separate out the -Werror flag as some files just cannot be
8748 # compiled with it enabled.
8749 for w in ${build_warnings}; do
8750 case $w in
8751 -Werr*) WERROR_CFLAGS=-Werror ;;
8752 *) # Check that GCC accepts it
4536bbc6
AC
8753 saved_CFLAGS="$CFLAGS"
8754 CFLAGS="$CFLAGS $w"
8755 cat > conftest.$ac_ext <<EOF
27ca5dad 8756#line 8757 "configure"
4536bbc6
AC
8757#include "confdefs.h"
8758
8759int main() {
8760
8761; return 0; }
8762EOF
27ca5dad 8763if { (eval echo configure:8764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8764 rm -rf conftest*
8765 WARN_CFLAGS="${WARN_CFLAGS} $w"
8766else
8767 echo "configure: failed program was:" >&5
8768 cat conftest.$ac_ext >&5
8769fi
8770rm -f conftest*
8771 CFLAGS="$saved_CFLAGS"
746a987d
AC
8772 esac
8773 done
8774 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8775fi
8776
8777
104c1213 8778
c906108c
SS
8779MMALLOC_CFLAGS=
8780MMALLOC=
8781
8782
8783
8784# Check whether --with-mmalloc or --without-mmalloc was given.
8785if test "${with_mmalloc+set}" = set; then
8786 withval="$with_mmalloc"
8787 case "${withval}" in
8788 yes) want_mmalloc=true ;;
8789 no) want_mmalloc=false;;
8790 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8791esac
8792else
8793 want_mmalloc=false
8794fi
8795
8796if test x$want_mmalloc = xtrue; then
8797 cat >> confdefs.h <<\EOF
8798#define USE_MMALLOC 1
8799EOF
8800
8801 cat >> confdefs.h <<\EOF
8802#define MMCHECK_FORCE 1
8803EOF
8804
8805 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8806 MMALLOC='../mmalloc/libmmalloc.a'
8807fi
8808
7a292a7a
SS
8809# In the Cygwin environment, we need some additional flags.
8810echo $ac_n "checking for cygwin""... $ac_c" 1>&6
27ca5dad 8811echo "configure:8812: checking for cygwin" >&5
7a292a7a
SS
8812if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8813 echo $ac_n "(cached) $ac_c" 1>&6
8814else
8815 cat > conftest.$ac_ext <<EOF
27ca5dad 8816#line 8817 "configure"
7a292a7a
SS
8817#include "confdefs.h"
8818
8819#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8820lose
8821#endif
8822EOF
8823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8824 egrep "lose" >/dev/null 2>&1; then
8825 rm -rf conftest*
8826 gdb_cv_os_cygwin=yes
8827else
8828 rm -rf conftest*
8829 gdb_cv_os_cygwin=no
8830fi
8831rm -f conftest*
8832
8833fi
8834
8835echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8836
aff38e61
AC
8837
8838SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8839case ${host} in
95cbc983
AC
8840 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8841 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8842esac
8843
8844
cd0fc7c3
SS
8845# libreadline needs libuser32.a in a cygwin environment
8846WIN32LIBS=
8847if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8848 WIN32LIBS="-luser32"
8849 case "${target}" in
8850 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8851 ;;
8852 esac
cd0fc7c3 8853fi
c906108c 8854
7a292a7a 8855
3fc11d3e
JM
8856LIBGUI="../libgui/src/libgui.a"
8857GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8858
8859
7a292a7a 8860
3fc11d3e
JM
8861WIN32LDAPP=
8862
8863
8864
8865configdir="unix"
8866
8867GDBTKLIBS=
8868if test "${enable_gdbtk}" = "yes"; then
8869
d1c3b63a
KS
8870 # Gdbtk must have an absolute path to srcdir in order to run
8871 # properly when not installed.
8872 here=`pwd`
8873 cd ${srcdir}
8874 GDBTK_SRC_DIR=`pwd`
8875 cd $here
8876
3fc11d3e
JM
8877
8878#
8879# Ok, lets find the tcl configuration
8880# First, look for one uninstalled.
8881# the alternative search directory is invoked by --with-tclconfig
8882#
8883
8884if test x"${no_tcl}" = x ; then
8885 # we reset no_tcl in case something fails here
8886 no_tcl=true
8887 # Check whether --with-tclconfig or --without-tclconfig was given.
8888if test "${with_tclconfig+set}" = set; then
8889 withval="$with_tclconfig"
8890 with_tclconfig=${withval}
8891fi
8892
8893 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
27ca5dad 8894echo "configure:8895: checking for Tcl configuration" >&5
3fc11d3e
JM
8895 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8896 echo $ac_n "(cached) $ac_c" 1>&6
8897else
8898
8899
8900 # First check to see if --with-tclconfig was specified.
8901 if test x"${with_tclconfig}" != x ; then
8902 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8903 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8904 else
8905 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8906 fi
8907 fi
8908
8909 # then check for a private Tcl installation
8910 if test x"${ac_cv_c_tclconfig}" = x ; then
8911 for i in \
8912 ../tcl \
8913 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8914 ../../tcl \
8915 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8916 ../../../tcl \
8917 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8918 if test -f "$i/${configdir}/tclConfig.sh" ; then
8919 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8920 break
8921 fi
8922 done
8923 fi
8924 # check in a few common install locations
8925 if test x"${ac_cv_c_tclconfig}" = x ; then
8926 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8927 if test -f "$i/tclConfig.sh" ; then
8928 ac_cv_c_tclconfig=`(cd $i; pwd)`
8929 break
8930 fi
8931 done
8932 fi
8933 # check in a few other private locations
8934 if test x"${ac_cv_c_tclconfig}" = x ; then
8935 for i in \
8936 ${srcdir}/../tcl \
8937 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8938 if test -f "$i/${configdir}/tclConfig.sh" ; then
8939 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8940 break
8941 fi
8942 done
8943 fi
8944
8945fi
8946
8947 if test x"${ac_cv_c_tclconfig}" = x ; then
8948 TCLCONFIG="# no Tcl configs found"
8949 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8950 else
8951 no_tcl=
8952 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8953 echo "$ac_t""found $TCLCONFIG" 1>&6
8954 fi
8955fi
8956
8957 if test -z "${no_tcl}"; then
8958
8959 . $TCLCONFIG
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
033afc63 8980
3fc11d3e
JM
8981
8982
8983
8984
8985
8986
8987#
8988# Ok, lets find the tk configuration
8989# First, look for one uninstalled.
8990# the alternative search directory is invoked by --with-tkconfig
8991#
8992
8993if test x"${no_tk}" = x ; then
8994 # we reset no_tk in case something fails here
8995 no_tk=true
8996 # Check whether --with-tkconfig or --without-tkconfig was given.
8997if test "${with_tkconfig+set}" = set; then
8998 withval="$with_tkconfig"
8999 with_tkconfig=${withval}
9000fi
9001
9002 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
27ca5dad 9003echo "configure:9004: checking for Tk configuration" >&5
3fc11d3e
JM
9004 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9005 echo $ac_n "(cached) $ac_c" 1>&6
9006else
9007
9008
9009 # First check to see if --with-tkconfig was specified.
9010 if test x"${with_tkconfig}" != x ; then
9011 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9012 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9013 else
9014 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9015 fi
9016 fi
9017
9018 # then check for a private Tk library
9019 if test x"${ac_cv_c_tkconfig}" = x ; then
9020 for i in \
9021 ../tk \
9022 `ls -dr ../tk[4-9]* 2>/dev/null` \
9023 ../../tk \
9024 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9025 ../../../tk \
9026 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9027 if test -f "$i/${configdir}/tkConfig.sh" ; then
9028 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9029 break
9030 fi
9031 done
9032 fi
9033 # check in a few common install locations
9034 if test x"${ac_cv_c_tkconfig}" = x ; then
9035 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9036 if test -f "$i/tkConfig.sh" ; then
9037 ac_cv_c_tkconfig=`(cd $i; pwd)`
9038 break
9039 fi
9040 done
9041 fi
9042 # check in a few other private locations
9043 if test x"${ac_cv_c_tkconfig}" = x ; then
9044 for i in \
9045 ${srcdir}/../tk \
9046 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9047 if test -f "$i/${configdir}/tkConfig.sh" ; then
9048 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9049 break
9050 fi
9051 done
9052 fi
9053
9054fi
9055
9056 if test x"${ac_cv_c_tkconfig}" = x ; then
9057 TKCONFIG="# no Tk configs found"
9058 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9059 else
9060 no_tk=
9061 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9062 echo "$ac_t""found $TKCONFIG" 1>&6
9063 fi
9064fi
9065
9066
9067
dd2504ab
JM
9068 # now look for Tcl library stuff
9069
9070 case "${host}" in
9071 *-*-cygwin*)
9072 tcldir=../tcl/win/
9073 ;;
9074 *)
9075 tcldir=../tcl/unix/
9076 ;;
9077 esac
9078
9079 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9080
3fc11d3e
JM
9081 # If $no_tk is nonempty, then we can't do Tk, and there is no
9082 # point to doing Tcl.
9083 if test -z "${no_tk}"; then
9084
9085 if test -f "$TKCONFIG" ; then
9086 . $TKCONFIG
9087 fi
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102#
9103# Ok, lets find the tcl source trees so we can use the headers
9104# Warning: transition of version 9 to 10 will break this algorithm
9105# because 10 sorts before 9. We also look for just tcl. We have to
9106# be careful that we don't match stuff like tclX by accident.
9107# the alternative search directory is involked by --with-tclinclude
9108#
9109
9110no_tcl=true
9111echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
27ca5dad 9112echo "configure:9113: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9113# Check whether --with-tclinclude or --without-tclinclude was given.
9114if test "${with_tclinclude+set}" = set; then
9115 withval="$with_tclinclude"
9116 with_tclinclude=${withval}
9117fi
9118
9119if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9120 echo $ac_n "(cached) $ac_c" 1>&6
9121else
9122
9123# first check to see if --with-tclinclude was specified
9124if test x"${with_tclinclude}" != x ; then
9125 if test -f ${with_tclinclude}/tclInt.h ; then
9126 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9127 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9128 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9129 else
9130 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9131 fi
9132fi
9133
9134# next check if it came with Tcl configuration file
9135if test x"${ac_cv_c_tclconfig}" = x ; then
9136 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9137 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9138 fi
9139fi
9140
9141# next check in private source directory
9142#
9143# since ls returns lowest version numbers first, reverse its output
9144if test x"${ac_cv_c_tclh}" = x ; then
9145 for i in \
9146 ${srcdir}/../tcl \
9147 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9148 ${srcdir}/../../tcl \
9149 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9150 ${srcdir}/../../../tcl \
9151 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9152 if test -f $i/generic/tclInt.h ; then
9153 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9154 break
9155 fi
9156 done
9157fi
9158# finally check in a few common install locations
9159#
9160# since ls returns lowest version numbers first, reverse its output
9161if test x"${ac_cv_c_tclh}" = x ; then
9162 for i in \
9163 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9164 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9165 /usr/local/src/tcl \
9166 /usr/local/lib/tcl \
9167 ${prefix}/include ; do
9168 if test -f $i/generic/tclInt.h ; then
9169 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9170 break
9171 fi
9172 done
9173fi
9174# see if one is installed
9175if test x"${ac_cv_c_tclh}" = x ; then
9176 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9177echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
27ca5dad 9178echo "configure:9179: checking for tclInt.h" >&5
3fc11d3e
JM
9179if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9180 echo $ac_n "(cached) $ac_c" 1>&6
9181else
9182 cat > conftest.$ac_ext <<EOF
27ca5dad 9183#line 9184 "configure"
3fc11d3e
JM
9184#include "confdefs.h"
9185#include <tclInt.h>
9186EOF
9187ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 9188{ (eval echo configure:9189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9189ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9190if test -z "$ac_err"; then
9191 rm -rf conftest*
9192 eval "ac_cv_header_$ac_safe=yes"
9193else
9194 echo "$ac_err" >&5
9195 echo "configure: failed program was:" >&5
9196 cat conftest.$ac_ext >&5
9197 rm -rf conftest*
9198 eval "ac_cv_header_$ac_safe=no"
9199fi
9200rm -f conftest*
9201fi
9202if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9203 echo "$ac_t""yes" 1>&6
9204 ac_cv_c_tclh=installed
9205else
9206 echo "$ac_t""no" 1>&6
9207ac_cv_c_tclh=""
9208fi
9209
9210fi
9211
9212fi
9213
9214if test x"${ac_cv_c_tclh}" = x ; then
9215 TCLHDIR="# no Tcl private headers found"
9216 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9217fi
9218if test x"${ac_cv_c_tclh}" != x ; then
9219 no_tcl=""
9220 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9221 echo "$ac_t""is installed" 1>&6
9222 TCLHDIR=""
9223 else
9224 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9225 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9226 TCLHDIR="-I${ac_cv_c_tclh}"
9227 fi
9228fi
9229
9230
9231
9232
9233#
9234# Ok, lets find the tk source trees so we can use the headers
9235# If the directory (presumably symlink) named "tk" exists, use that one
9236# in preference to any others. Same logic is used when choosing library
9237# and again with Tcl. The search order is the best place to look first, then in
9238# decreasing significance. The loop breaks if the trigger file is found.
9239# Note the gross little conversion here of srcdir by cd'ing to the found
9240# directory. This converts the path from a relative to an absolute, so
9241# recursive cache variables for the path will work right. We check all
9242# the possible paths in one loop rather than many seperate loops to speed
9243# things up.
9244# the alternative search directory is involked by --with-tkinclude
9245#
9246no_tk=true
9247echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
27ca5dad 9248echo "configure:9249: checking for Tk private headers" >&5
3fc11d3e
JM
9249# Check whether --with-tkinclude or --without-tkinclude was given.
9250if test "${with_tkinclude+set}" = set; then
9251 withval="$with_tkinclude"
9252 with_tkinclude=${withval}
9253fi
9254
9255if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9256 echo $ac_n "(cached) $ac_c" 1>&6
9257else
9258
9259# first check to see if --with-tkinclude was specified
9260if test x"${with_tkinclude}" != x ; then
9261 if test -f ${with_tkinclude}/tk.h ; then
9262 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9263 elif test -f ${with_tkinclude}/generic/tk.h ; then
9264 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9265 else
9266 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9267 fi
9268fi
9269
9270# next check if it came with Tk configuration file
9271if test x"${ac_cv_c_tkconfig}" = x ; then
9272 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9273 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9274 fi
9275fi
9276
9277# next check in private source directory
9278#
9279# since ls returns lowest version numbers first, reverse its output
9280if test x"${ac_cv_c_tkh}" = x ; then
9281 for i in \
9282 ${srcdir}/../tk \
9283 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9284 ${srcdir}/../../tk \
9285 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9286 ${srcdir}/../../../tk \
9287 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9288 if test -f $i/generic/tk.h ; then
9289 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9290 break
9291 fi
9292 done
9293fi
9294# finally check in a few common install locations
9295#
9296# since ls returns lowest version numbers first, reverse its output
9297if test x"${ac_cv_c_tkh}" = x ; then
9298 for i in \
9299 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9300 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9301 /usr/local/src/tk \
9302 /usr/local/lib/tk \
9303 ${prefix}/include ; do
9304 if test -f $i/generic/tk.h ; then
9305 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9306 break
9307 fi
9308 done
9309fi
9310# see if one is installed
9311if test x"${ac_cv_c_tkh}" = x ; then
9312 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9313echo $ac_n "checking for tk.h""... $ac_c" 1>&6
27ca5dad 9314echo "configure:9315: checking for tk.h" >&5
3fc11d3e
JM
9315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9316 echo $ac_n "(cached) $ac_c" 1>&6
9317else
9318 cat > conftest.$ac_ext <<EOF
27ca5dad 9319#line 9320 "configure"
3fc11d3e
JM
9320#include "confdefs.h"
9321#include <tk.h>
9322EOF
9323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 9324{ (eval echo configure:9325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9326if test -z "$ac_err"; then
9327 rm -rf conftest*
9328 eval "ac_cv_header_$ac_safe=yes"
9329else
9330 echo "$ac_err" >&5
9331 echo "configure: failed program was:" >&5
9332 cat conftest.$ac_ext >&5
9333 rm -rf conftest*
9334 eval "ac_cv_header_$ac_safe=no"
9335fi
9336rm -f conftest*
9337fi
9338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9339 echo "$ac_t""yes" 1>&6
9340 ac_cv_c_tkh=installed
9341else
9342 echo "$ac_t""no" 1>&6
9343ac_cv_c_tkh=""
9344fi
9345
9346fi
9347
9348fi
9349
9350if test x"${ac_cv_c_tkh}" != x ; then
9351 no_tk=""
9352 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9353 echo "$ac_t""is installed" 1>&6
9354 TKHDIR=""
9355 else
9356 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9357 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9358 TKHDIR="-I${ac_cv_c_tkh}"
9359 fi
9360else
9361 TKHDIR="# no Tk directory found"
9362 echo "configure: warning: Can't find Tk private headers" 1>&2
9363 no_tk=true
9364fi
9365
9366
9367
9368
9369echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
27ca5dad 9370echo "configure:9371: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9371if test x"${ac_cv_c_itclh}" = x ; then
9372 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9373 if test -f $i/generic/itcl.h ; then
9374 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9375 break
9376 fi
9377 done
9378fi
9379if test x"${ac_cv_c_itclh}" = x ; then
9380 ITCLHDIR="# no Itcl private headers found"
9381 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9382fi
9383if test x"${ac_cv_c_itclh}" != x ; then
9384 ITCLHDIR="-I${ac_cv_c_itclh}"
9385fi
9386# should always be here
9387# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9388
9389#AC_SUBST(ITCLLIB)
9390
9391
9392echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
27ca5dad 9393echo "configure:9394: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9394if test x"${ac_cv_c_itkh}" = x ; then
9395 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9396 if test -f $i/generic/itk.h ; then
9397 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9398 break
9399 fi
9400 done
9401fi
9402if test x"${ac_cv_c_itkh}" = x ; then
9403 ITKHDIR="# no Itk private headers found"
9404 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9405fi
9406if test x"${ac_cv_c_itkh}" != x ; then
9407 ITKHDIR="-I${ac_cv_c_itkh}"
9408fi
9409# should always be here
9410# ITKLIB="../itcl/itk/unix/libitk.a"
9411
9412#AC_SUBST(ITKLIB)
9413
3fc11d3e 9414
dd2504ab
JM
9415
9416 # now look for Tk library stuff
9417
9418 case "${host}" in
9419 *-*-cygwin*)
9420 tkdir=../tk/win/
9421 ;;
9422 *)
9423 tkdir=../tk/unix/
9424 ;;
9425 esac
9426
9427 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9428
3fc11d3e
JM
9429 # now look for Itcl library stuff
9430
9431
9432#
9433# Ok, lets find the itcl configuration
9434# First, look for one uninstalled.
9435# the alternative search directory is invoked by --with-itclconfig
9436#
9437
9438if test x"${no_itcl}" = x ; then
9439 # we reset no_itcl in case something fails here
9440 no_itcl=true
9441 # Check whether --with-itclconfig or --without-itclconfig was given.
9442if test "${with_itclconfig+set}" = set; then
9443 withval="$with_itclconfig"
9444 with_itclconfig=${withval}
9445fi
9446
9447 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
27ca5dad 9448echo "configure:9449: checking for Itcl configuration" >&5
3fc11d3e
JM
9449 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9450 echo $ac_n "(cached) $ac_c" 1>&6
9451else
9452
9453
9454 # First check to see if --with-itclconfig was specified.
9455 if test x"${with_itclconfig}" != x ; then
9456 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9457 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9458 else
9459 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9460 fi
9461 fi
9462
9463 # then check for a private Itcl library
9464 if test x"${ac_cv_c_itclconfig}" = x ; then
9465 for i in \
9466 ../itcl/itcl \
9467 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9468 ../../itcl \
9469 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9470 ../../../itcl \
9471 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9472 if test -f "$i/itclConfig.sh" ; then
9473 ac_cv_c_itclconfig=`(cd $i; pwd)`
9474 break
9475 fi
9476 done
9477 fi
9478 # check in a few common install locations
9479 if test x"${ac_cv_c_itclconfig}" = x ; then
9480 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9481 if test -f "$i/itclConfig.sh" ; then
9482 ac_cv_c_itclconfig=`(cd $i; pwd)`
9483 break
9484 fi
9485 done
9486 fi
9487 # check in a few other private locations
9488 if test x"${ac_cv_c_itclconfig}" = x ; then
9489 for i in \
9490 ${srcdir}/../itcl/itcl \
9491 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9492 if test -f "$i/itclConfig.sh" ; then
9493 ac_cv_c_itclconfig=`(cd $i; pwd)`
9494 break
9495 fi
9496 done
9497 fi
9498
9499fi
9500
9501 if test x"${ac_cv_c_itclconfig}" = x ; then
9502 ITCLCONFIG="# no Itcl configs found"
9503 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9504 else
9505 no_itcl=
9506 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9507 echo "$ac_t""found $ITCLCONFIG" 1>&6
9508 fi
9509fi
9510
9511 if test -z "${no_itcl}"; then
9512
9513 if test -f "$ITCLCONFIG" ; then
9514 . $ITCLCONFIG
9515 fi
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
3fc11d3e
JM
9526
9527
9528 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9529 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9530 fi
9531
9532
9533 # now look for Itk library stuff
9534
9535#
9536# Ok, lets find the itk configuration
9537# First, look for one uninstalled.
9538# the alternative search directory is invoked by --with-itkconfig
9539#
9540
9541if test x"${no_itk}" = x ; then
9542 # we reset no_itk in case something fails here
9543 no_itk=true
9544 # Check whether --with-itkconfig or --without-itkconfig was given.
9545if test "${with_itkconfig+set}" = set; then
9546 withval="$with_itkconfig"
9547 with_itkconfig=${withval}
9548fi
9549
9550 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
27ca5dad 9551echo "configure:9552: checking for Itk configuration" >&5
3fc11d3e
JM
9552 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9553 echo $ac_n "(cached) $ac_c" 1>&6
9554else
9555
9556
9557 # First check to see if --with-itkconfig was specified.
9558 if test x"${with_itkconfig}" != x ; then
9559 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9560 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9561 else
9562 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9563 fi
9564 fi
9565
9566 # then check for a private Itk library
9567 if test x"${ac_cv_c_itkconfig}" = x ; then
9568 for i in \
9569 ../itcl/itk \
9570 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9571 ../../itk \
9572 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9573 ../../../itk \
9574 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9575 if test -f "$i/itkConfig.sh" ; then
9576 ac_cv_c_itkconfig=`(cd $i; pwd)`
9577 break
9578 fi
9579 done
9580 fi
9581 # check in a few common install locations
9582 if test x"${ac_cv_c_itkconfig}" = x ; then
9583 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9584 if test -f "$i/itkConfig.sh" ; then
9585 ac_cv_c_itkconfig=`(cd $i; pwd)`
9586 break
9587 fi
9588 done
9589 fi
9590 # check in a few other private locations
9591 if test x"${ac_cv_c_itkconfig}" = x ; then
9592 for i in \
9593 ${srcdir}/../itcl/itk \
9594 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9595 if test -f "$i/itkConfig.sh" ; then
9596 ac_cv_c_itkconfig=`(cd $i; pwd)`
9597 break
9598 fi
9599 done
9600 fi
9601
9602fi
9603
9604 if test x"${ac_cv_c_itkconfig}" = x ; then
9605 ITKCONFIG="# no Itk configs found"
9606 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9607 else
9608 no_itk=
9609 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9610 echo "$ac_t""found $ITKCONFIG" 1>&6
9611 fi
9612fi
9613
9614
9615 if test -z "${no_itcl}"; then
9616
9617 if test -f "$ITKCONFIG" ; then
9618 . $ITKCONFIG
9619 fi
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
3fc11d3e 9632 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9633 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9634 fi
9635
4226a5a5 9636 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9637 # Tcl/Tk 8.1 require -fwritable strings. I don't
9638 # know whether 8.2 will or not, but I bet it will.
9639 # I don't have to worry about 7.x since we don't support it.
9640 GDBTK_CFLAGS=""
9641 if test "$GCC" = "yes"; then
9642 if test "$TCL_VERSION" != "8.0" ; then
9643 GDBTK_CFLAGS="-fwritable-strings"
9644 fi
9645 fi
9646
9647 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9648 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9649 # Yes, the ordering seems wrong here. But it isn't.
9650 # TK_LIBS is the list of libraries that need to be linked
9651 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9652 # were in LIBS then any link tests after this point would
9653 # try to include things like `$(LIBGUI)', which wouldn't work.
9654 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9655
9656 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9657 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9658 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9659 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9660 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9661 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9662 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9663 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9664
9665 if test x$gdb_cv_os_cygwin = xyes; then
9666 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9667 WIN32LDAPP="-Wl,--subsystem,console"
9668 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9669 fi
9670 fi
9671 fi
ffc6a242 9672
ffc6a242 9673 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9674fi
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
dd2504ab 9688
c906108c
SS
9689# If we find X, set shell vars x_includes and x_libraries to the
9690# paths, otherwise set no_x=yes.
9691# Uses ac_ vars as temps to allow command line to override cache and checks.
9692# --without-x overrides everything else, but does not touch the cache.
9693echo $ac_n "checking for X""... $ac_c" 1>&6
27ca5dad 9694echo "configure:9695: checking for X" >&5
c906108c
SS
9695
9696# Check whether --with-x or --without-x was given.
9697if test "${with_x+set}" = set; then
9698 withval="$with_x"
9699 :
9700fi
9701
9702# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9703if test "x$with_x" = xno; then
9704 # The user explicitly disabled X.
9705 have_x=disabled
9706else
9707 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9708 # Both variables are already set.
9709 have_x=yes
9710 else
9711if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9712 echo $ac_n "(cached) $ac_c" 1>&6
9713else
9714 # One or both of the vars are not set, and there is no cached value.
9715ac_x_includes=NO ac_x_libraries=NO
9716rm -fr conftestdir
9717if mkdir conftestdir; then
9718 cd conftestdir
9719 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9720 cat > Imakefile <<'EOF'
9721acfindx:
9722 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9723EOF
9724 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9725 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9726 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9727 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9728 for ac_extension in a so sl; do
9729 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9730 test -f $ac_im_libdir/libX11.$ac_extension; then
9731 ac_im_usrlibdir=$ac_im_libdir; break
9732 fi
9733 done
9734 # Screen out bogus values from the imake configuration. They are
9735 # bogus both because they are the default anyway, and because
9736 # using them would break gcc on systems where it needs fixed includes.
9737 case "$ac_im_incroot" in
9738 /usr/include) ;;
9739 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9740 esac
9741 case "$ac_im_usrlibdir" in
9742 /usr/lib | /lib) ;;
9743 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9744 esac
9745 fi
9746 cd ..
9747 rm -fr conftestdir
9748fi
9749
9750if test "$ac_x_includes" = NO; then
9751 # Guess where to find include files, by looking for this one X11 .h file.
9752 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9753
9754 # First, try using that file with no special directory specified.
9755cat > conftest.$ac_ext <<EOF
27ca5dad 9756#line 9757 "configure"
c906108c
SS
9757#include "confdefs.h"
9758#include <$x_direct_test_include>
9759EOF
9760ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
27ca5dad 9761{ (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9762ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9763if test -z "$ac_err"; then
9764 rm -rf conftest*
9765 # We can compile using X headers with no special include directory.
9766ac_x_includes=
9767else
9768 echo "$ac_err" >&5
9769 echo "configure: failed program was:" >&5
9770 cat conftest.$ac_ext >&5
9771 rm -rf conftest*
9772 # Look for the header file in a standard set of common directories.
9773# Check X11 before X11Rn because it is often a symlink to the current release.
9774 for ac_dir in \
9775 /usr/X11/include \
9776 /usr/X11R6/include \
9777 /usr/X11R5/include \
9778 /usr/X11R4/include \
9779 \
9780 /usr/include/X11 \
9781 /usr/include/X11R6 \
9782 /usr/include/X11R5 \
9783 /usr/include/X11R4 \
9784 \
9785 /usr/local/X11/include \
9786 /usr/local/X11R6/include \
9787 /usr/local/X11R5/include \
9788 /usr/local/X11R4/include \
9789 \
9790 /usr/local/include/X11 \
9791 /usr/local/include/X11R6 \
9792 /usr/local/include/X11R5 \
9793 /usr/local/include/X11R4 \
9794 \
9795 /usr/X386/include \
9796 /usr/x386/include \
9797 /usr/XFree86/include/X11 \
9798 \
9799 /usr/include \
9800 /usr/local/include \
9801 /usr/unsupported/include \
9802 /usr/athena/include \
9803 /usr/local/x11r5/include \
9804 /usr/lpp/Xamples/include \
9805 \
9806 /usr/openwin/include \
9807 /usr/openwin/share/include \
9808 ; \
9809 do
9810 if test -r "$ac_dir/$x_direct_test_include"; then
9811 ac_x_includes=$ac_dir
9812 break
9813 fi
9814 done
9815fi
9816rm -f conftest*
9817fi # $ac_x_includes = NO
9818
9819if test "$ac_x_libraries" = NO; then
9820 # Check for the libraries.
9821
9822 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9823 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9824
9825 # See if we find them without any special options.
9826 # Don't add to $LIBS permanently.
9827 ac_save_LIBS="$LIBS"
9828 LIBS="-l$x_direct_test_library $LIBS"
9829cat > conftest.$ac_ext <<EOF
27ca5dad 9830#line 9831 "configure"
c906108c
SS
9831#include "confdefs.h"
9832
9833int main() {
9834${x_direct_test_function}()
9835; return 0; }
9836EOF
27ca5dad 9837if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9838 rm -rf conftest*
9839 LIBS="$ac_save_LIBS"
9840# We can link X programs with no special library path.
9841ac_x_libraries=
9842else
9843 echo "configure: failed program was:" >&5
9844 cat conftest.$ac_ext >&5
9845 rm -rf conftest*
9846 LIBS="$ac_save_LIBS"
9847# First see if replacing the include by lib works.
9848# Check X11 before X11Rn because it is often a symlink to the current release.
9849for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9850 /usr/X11/lib \
9851 /usr/X11R6/lib \
9852 /usr/X11R5/lib \
9853 /usr/X11R4/lib \
9854 \
9855 /usr/lib/X11 \
9856 /usr/lib/X11R6 \
9857 /usr/lib/X11R5 \
9858 /usr/lib/X11R4 \
9859 \
9860 /usr/local/X11/lib \
9861 /usr/local/X11R6/lib \
9862 /usr/local/X11R5/lib \
9863 /usr/local/X11R4/lib \
9864 \
9865 /usr/local/lib/X11 \
9866 /usr/local/lib/X11R6 \
9867 /usr/local/lib/X11R5 \
9868 /usr/local/lib/X11R4 \
9869 \
9870 /usr/X386/lib \
9871 /usr/x386/lib \
9872 /usr/XFree86/lib/X11 \
9873 \
9874 /usr/lib \
9875 /usr/local/lib \
9876 /usr/unsupported/lib \
9877 /usr/athena/lib \
9878 /usr/local/x11r5/lib \
9879 /usr/lpp/Xamples/lib \
9880 /lib/usr/lib/X11 \
9881 \
9882 /usr/openwin/lib \
9883 /usr/openwin/share/lib \
9884 ; \
9885do
9886 for ac_extension in a so sl; do
9887 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9888 ac_x_libraries=$ac_dir
9889 break 2
9890 fi
9891 done
9892done
9893fi
9894rm -f conftest*
9895fi # $ac_x_libraries = NO
9896
9897if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9898 # Didn't find X anywhere. Cache the known absence of X.
9899 ac_cv_have_x="have_x=no"
9900else
9901 # Record where we found X for the cache.
9902 ac_cv_have_x="have_x=yes \
9903 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9904fi
9905fi
9906 fi
9907 eval "$ac_cv_have_x"
9908fi # $with_x != no
9909
9910if test "$have_x" != yes; then
9911 echo "$ac_t""$have_x" 1>&6
9912 no_x=yes
9913else
9914 # If each of the values was on the command line, it overrides each guess.
9915 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9916 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9917 # Update the cache value to reflect the command line values.
9918 ac_cv_have_x="have_x=yes \
9919 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9920 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9921fi
9922
9923
7a292a7a
SS
9924
9925# Unlike the sim directory, whether a simulator is linked is controlled by
9926# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9927# This code just checks for a few cases where we'd like to ignore those
9928# definitions, even when they're present in the '.mt' file. These cases
9929# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9930# not part of the source tree.
7a292a7a
SS
9931#
9932# Check whether --enable-sim or --disable-sim was given.
9933if test "${enable_sim+set}" = set; then
9934 enableval="$enable_sim"
9935 echo "enable_sim = $enable_sim";
9936 echo "enableval = ${enableval}";
9937 case "${enableval}" in
9938 yes) ignore_sim=false ;;
9939 no) ignore_sim=true ;;
9940 *) ignore_sim=false ;;
9941 esac
9942else
9943 ignore_sim=false
9944fi
9945
9946
9947if test ! -d "${srcdir}/../sim"; then
9948 ignore_sim=true
9949fi
9950
9951if test "${ignore_sim}" = "true"; then
9952 IGNORE_SIM="SIM="
9953 IGNORE_SIM_OBS="SIM_OBS="
9954else
9955 IGNORE_SIM=""
9956 IGNORE_SIM_OBS=""
9957 cat >> confdefs.h <<\EOF
9958#define WITH_SIM 1
9959EOF
9960
9961fi
9962
9963
9964
c906108c
SS
9965
9966
9967
9968
9969
9970
dfcd3bfb 9971
e56ac5c3
AC
9972
9973
b3a90332
AC
9974
9975
b46cd165 9976
d28f9cdf 9977
c906108c
SS
9978# target_subdir is used by the testsuite to find the target libraries.
9979target_subdir=
9980if test "${host}" != "${target}"; then
9981 target_subdir="${target_alias}/"
9982fi
9983
9984
9985frags=
9986host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9987if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9988 # When building a native debuger the .mh file containing things
9989 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9990 # since it no longer contains anything useful.
9991 if test "${target}" = "${host}"; then
9992 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9993 else
9994 host_makefile_frag=/dev/null
9995 fi
c906108c
SS
9996fi
9997frags="$frags $host_makefile_frag"
9998
9999target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10000if test ! -f ${target_makefile_frag}; then
10001{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10002fi
10003frags="$frags $target_makefile_frag"
10004
10005
10006
10007
10008
10009hostfile=`sed -n '
10010s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10011' ${host_makefile_frag}`
10012
10013targetfile=`sed -n '
10014s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10015' ${target_makefile_frag}`
10016
6166d547
AC
10017GDB_MULTI_ARCH=`sed -n '
10018s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
10019' ${target_makefile_frag}`
10020
c906108c 10021if test "${target}" = "${host}"; then
a85f51e7
DJ
10022# We pick this up from the host configuration file (.mh) because we
10023# do not have a native configuration Makefile fragment.
c906108c
SS
10024nativefile=`sed -n '
10025s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10026' ${host_makefile_frag}`
c906108c
SS
10027fi
10028
10029
6166d547
AC
10030# New targets should just set gdb_multi_arch=yes in configure.tgt.
10031# Old targets being converted can either do that or set GDB_MULTI_ARCH
10032# in the target specific makefile frag. Eventually gdb_multi_arch=yes
10033# will be the default.
10034if test x"${GDB_MULTI_ARCH}" = x ; then
10035 case "${gdb_multi_arch}" in
10036 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
10037 no ) GDB_MULTI_ARCH=0 ;;
10038 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
10039 esac
10040fi
10041if test x"${GDB_MULTI_ARCH}" != x ; then
10042 cat >> confdefs.h <<EOF
10043#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
10044EOF
10045
10046fi
6c5cfe5b 10047# Warn the user when they use an old practice
6166d547
AC
10048case "${GDB_MULTI_ARCH}" in
10049 "" ) ;;
10050 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
10051 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
10052 GDB_MULTI_ARCH_PURE )
10053 if test x"${targetfile}" != x ; then
6c5cfe5b 10054 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 10055 targetfile=""
6166d547
AC
10056 fi ;;
10057 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
10058esac
10059
b00a8037
DJ
10060if test x"${gdb_osabi}" != x ; then
10061 cat >> confdefs.h <<EOF
10062#define GDB_OSABI_DEFAULT $gdb_osabi
10063EOF
10064
10065fi
10066
8dcde887
MK
10067# Enable multi-ice-gdb-server.
10068# Check whether --enable-multi-ice or --disable-multi-ice was given.
10069if test "${enable_multi_ice+set}" = set; then
10070 enableval="$enable_multi_ice"
10071 case $enableval in
10072 yes | no)
10073 ;;
10074 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10075 esac
96baa820
JM
10076fi
10077
8dcde887
MK
10078if test "x$enable_multi_ice" = xyes; then
10079 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10080fi
10081
8dcde887
MK
10082# We only build gdbserver automatically if host and target are the same.
10083if test "x$target" = "x$host"; then
10084 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
27ca5dad 10085echo "configure:10086: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10086 if test "x$build_gdbserver" = xyes; then
10087 configdirs="$configdirs gdbserver"
10088 echo "$ac_t""yes" 1>&6
10089 else
10090 echo "$ac_t""no" 1>&6
10091 fi
10092fi
10093
10094subdirs="doc testsuite $configdirs"
10095
96baa820 10096
c906108c 10097# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10098# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10099# version.
c906108c
SS
10100
10101files=
10102links=
5a2402b8 10103
c906108c 10104rm -f xm.h
5a2402b8 10105xm_h=""
c906108c 10106if test "${hostfile}" != ""; then
5a2402b8
AC
10107 xm_h=xm.h
10108 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10109 files="${files} ${GDB_XM_FILE}"
10110 links="${links} xm.h"
10111 cat >> confdefs.h <<EOF
10112#define GDB_XM_FILE ${GDB_XM_FILE}
10113EOF
10114
c906108c 10115fi
5a2402b8
AC
10116
10117
c906108c 10118rm -f tm.h
5a2402b8 10119tm_h=""
c906108c 10120if test "${targetfile}" != ""; then
5a2402b8
AC
10121 tm_h=tm.h
10122 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10123 files="${files} ${GDB_TM_FILE}"
10124 links="${links} tm.h"
10125 cat >> confdefs.h <<EOF
10126#define GDB_TM_FILE ${GDB_TM_FILE}
10127EOF
10128
c906108c 10129fi
5a2402b8
AC
10130
10131
c906108c 10132rm -f nm.h
5a2402b8 10133nm_h=""
c906108c 10134if test "${nativefile}" != ""; then
5a2402b8
AC
10135 nm_h=nm.h
10136 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10137 files="${files} ${GDB_NM_FILE}"
10138 links="${links} nm.h"
10139 cat >> confdefs.h <<EOF
10140#define GDB_NM_FILE ${GDB_NM_FILE}
10141EOF
10142
c906108c 10143fi
5a2402b8
AC
10144
10145
c906108c
SS
10146
10147
10148echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
27ca5dad 10149echo "configure:10150: checking for Cygwin environment" >&5
c906108c
SS
10150if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10151 echo $ac_n "(cached) $ac_c" 1>&6
10152else
10153 cat > conftest.$ac_ext <<EOF
27ca5dad 10154#line 10155 "configure"
c906108c
SS
10155#include "confdefs.h"
10156
10157int main() {
10158
10159#ifndef __CYGWIN__
10160#define __CYGWIN__ __CYGWIN32__
10161#endif
10162return __CYGWIN__;
10163; return 0; }
10164EOF
27ca5dad 10165if { (eval echo configure:10166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10166 rm -rf conftest*
10167 ac_cv_cygwin=yes
10168else
10169 echo "configure: failed program was:" >&5
10170 cat conftest.$ac_ext >&5
10171 rm -rf conftest*
10172 ac_cv_cygwin=no
10173fi
10174rm -f conftest*
10175rm -f conftest*
10176fi
10177
10178echo "$ac_t""$ac_cv_cygwin" 1>&6
10179CYGWIN=
10180test "$ac_cv_cygwin" = yes && CYGWIN=yes
10181echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
27ca5dad 10182echo "configure:10183: checking for mingw32 environment" >&5
c906108c
SS
10183if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10184 echo $ac_n "(cached) $ac_c" 1>&6
10185else
10186 cat > conftest.$ac_ext <<EOF
27ca5dad 10187#line 10188 "configure"
c906108c
SS
10188#include "confdefs.h"
10189
10190int main() {
10191return __MINGW32__;
10192; return 0; }
10193EOF
27ca5dad 10194if { (eval echo configure:10195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10195 rm -rf conftest*
10196 ac_cv_mingw32=yes
10197else
10198 echo "configure: failed program was:" >&5
10199 cat conftest.$ac_ext >&5
10200 rm -rf conftest*
10201 ac_cv_mingw32=no
10202fi
10203rm -f conftest*
10204rm -f conftest*
10205fi
10206
10207echo "$ac_t""$ac_cv_mingw32" 1>&6
10208MINGW32=
10209test "$ac_cv_mingw32" = yes && MINGW32=yes
10210
10211
10212echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
27ca5dad 10213echo "configure:10214: checking for executable suffix" >&5
c906108c
SS
10214if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10215 echo $ac_n "(cached) $ac_c" 1>&6
10216else
10217 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10218 ac_cv_exeext=.exe
10219else
10220 rm -f conftest*
10221 echo 'int main () { return 0; }' > conftest.$ac_ext
10222 ac_cv_exeext=
27ca5dad 10223 if { (eval echo configure:10224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10224 for file in conftest.*; do
10225 case $file in
715d1656 10226 *.c | *.o | *.obj) ;;
c906108c
SS
10227 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10228 esac
10229 done
10230 else
10231 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10232 fi
10233 rm -f conftest*
10234 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10235fi
10236fi
10237
10238EXEEXT=""
10239test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10240echo "$ac_t""${ac_cv_exeext}" 1>&6
10241ac_exeext=$EXEEXT
10242
10243
234b45d4
KB
10244
10245cat >> confdefs.h <<\EOF
10246#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10247EOF
10248
10249
10250
10251
10252 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10253if test "${with_libiconv_prefix+set}" = set; then
10254 withval="$with_libiconv_prefix"
10255
10256 for dir in `echo "$withval" | tr : ' '`; do
10257 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10258 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10259 done
10260
10261fi
10262
10263
10264 echo $ac_n "checking for iconv""... $ac_c" 1>&6
27ca5dad 10265echo "configure:10266: checking for iconv" >&5
234b45d4
KB
10266if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10267 echo $ac_n "(cached) $ac_c" 1>&6
10268else
10269
10270 am_cv_func_iconv="no, consider installing GNU libiconv"
10271 am_cv_lib_iconv=no
10272 cat > conftest.$ac_ext <<EOF
27ca5dad 10273#line 10274 "configure"
234b45d4
KB
10274#include "confdefs.h"
10275#include <stdlib.h>
10276#include <iconv.h>
10277int main() {
10278iconv_t cd = iconv_open("","");
10279 iconv(cd,NULL,NULL,NULL,NULL);
10280 iconv_close(cd);
10281; return 0; }
10282EOF
27ca5dad 10283if { (eval echo configure:10284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10284 rm -rf conftest*
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 if test "$am_cv_func_iconv" != yes; then
10292 am_save_LIBS="$LIBS"
10293 LIBS="$LIBS -liconv"
10294 cat > conftest.$ac_ext <<EOF
27ca5dad 10295#line 10296 "configure"
234b45d4
KB
10296#include "confdefs.h"
10297#include <stdlib.h>
10298#include <iconv.h>
10299int main() {
10300iconv_t cd = iconv_open("","");
10301 iconv(cd,NULL,NULL,NULL,NULL);
10302 iconv_close(cd);
10303; return 0; }
10304EOF
27ca5dad 10305if { (eval echo configure:10306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10306 rm -rf conftest*
10307 am_cv_lib_iconv=yes
10308 am_cv_func_iconv=yes
10309else
10310 echo "configure: failed program was:" >&5
10311 cat conftest.$ac_ext >&5
10312fi
10313rm -f conftest*
10314 LIBS="$am_save_LIBS"
10315 fi
10316
10317fi
10318
10319echo "$ac_t""$am_cv_func_iconv" 1>&6
10320 if test "$am_cv_func_iconv" = yes; then
10321 cat >> confdefs.h <<\EOF
10322#define HAVE_ICONV 1
10323EOF
10324
10325 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
27ca5dad 10326echo "configure:10327: checking for iconv declaration" >&5
234b45d4
KB
10327 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10328 echo $ac_n "(cached) $ac_c" 1>&6
10329else
10330
10331 cat > conftest.$ac_ext <<EOF
27ca5dad 10332#line 10333 "configure"
234b45d4
KB
10333#include "confdefs.h"
10334
10335#include <stdlib.h>
10336#include <iconv.h>
10337extern
10338#ifdef __cplusplus
10339"C"
10340#endif
10341#if defined(__STDC__) || defined(__cplusplus)
10342size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10343#else
10344size_t iconv();
10345#endif
10346
10347int main() {
10348
10349; return 0; }
10350EOF
27ca5dad 10351if { (eval echo configure:10352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10352 rm -rf conftest*
10353 am_cv_proto_iconv_arg1=""
10354else
10355 echo "configure: failed program was:" >&5
10356 cat conftest.$ac_ext >&5
10357 rm -rf conftest*
10358 am_cv_proto_iconv_arg1="const"
10359fi
10360rm -f conftest*
10361 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);"
10362fi
10363
10364 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10365 echo "$ac_t""${ac_t:-
10366 }$am_cv_proto_iconv" 1>&6
10367 cat >> confdefs.h <<EOF
10368#define ICONV_CONST $am_cv_proto_iconv_arg1
10369EOF
10370
10371 fi
10372 LIBICONV=
10373 if test "$am_cv_lib_iconv" = yes; then
10374 LIBICONV="-liconv"
10375 fi
10376
10377
10378
c906108c
SS
10379trap '' 1 2 15
10380cat > confcache <<\EOF
10381# This file is a shell script that caches the results of configure
10382# tests run on this system so they can be shared between configure
10383# scripts and configure runs. It is not useful on other systems.
10384# If it contains results you don't want to keep, you may remove or edit it.
10385#
10386# By default, configure uses ./config.cache as the cache file,
10387# creating it if it does not exist already. You can give configure
10388# the --cache-file=FILE option to use a different cache file; that is
10389# what configure does when it calls configure scripts in
10390# subdirectories, so they share the cache.
10391# Giving --cache-file=/dev/null disables caching, for debugging configure.
10392# config.status only pays attention to the cache file if you give it the
10393# --recheck option to rerun configure.
10394#
10395EOF
10396# The following way of writing the cache mishandles newlines in values,
10397# but we know of no workaround that is simple, portable, and efficient.
10398# So, don't put newlines in cache variables' values.
10399# Ultrix sh set writes to stderr and can't be redirected directly,
10400# and sets the high bit in the cache file unless we assign to the vars.
10401(set) 2>&1 |
10402 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10403 *ac_space=\ *)
10404 # `set' does not quote correctly, so add quotes (double-quote substitution
10405 # turns \\\\ into \\, and sed turns \\ into \).
10406 sed -n \
10407 -e "s/'/'\\\\''/g" \
10408 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10409 ;;
10410 *)
10411 # `set' quotes correctly as required by POSIX, so do not add quotes.
10412 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10413 ;;
10414 esac >> confcache
10415if cmp -s $cache_file confcache; then
10416 :
10417else
10418 if test -w $cache_file; then
10419 echo "updating cache $cache_file"
10420 cat confcache > $cache_file
10421 else
10422 echo "not updating unwritable cache $cache_file"
10423 fi
10424fi
10425rm -f confcache
10426
10427trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10428
10429test "x$prefix" = xNONE && prefix=$ac_default_prefix
10430# Let make expand exec_prefix.
10431test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10432
10433# Any assignment to VPATH causes Sun make to only execute
10434# the first set of double-colon rules, so remove it if not needed.
10435# If there is a colon in the path, we need to keep it.
10436if test "x$srcdir" = x.; then
10437 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10438fi
10439
10440trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10441
10442DEFS=-DHAVE_CONFIG_H
10443
10444# Without the "./", some shells look in PATH for config.status.
10445: ${CONFIG_STATUS=./config.status}
10446
10447echo creating $CONFIG_STATUS
10448rm -f $CONFIG_STATUS
10449cat > $CONFIG_STATUS <<EOF
10450#! /bin/sh
10451# Generated automatically by configure.
10452# Run this file to recreate the current configuration.
10453# This directory was configured as follows,
10454# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10455#
10456# $0 $ac_configure_args
10457#
10458# Compiler output produced by configure, useful for debugging
10459# configure, is in ./config.log if it exists.
10460
10461ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10462for ac_option
10463do
10464 case "\$ac_option" in
10465 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10466 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10467 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10468 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10469 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10470 exit 0 ;;
10471 -help | --help | --hel | --he | --h)
10472 echo "\$ac_cs_usage"; exit 0 ;;
10473 *) echo "\$ac_cs_usage"; exit 1 ;;
10474 esac
10475done
10476
10477ac_given_srcdir=$srcdir
10478ac_given_INSTALL="$INSTALL"
10479
ed952ac5 10480trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10481EOF
10482cat >> $CONFIG_STATUS <<EOF
10483
10484# Protect against being on the right side of a sed subst in config.status.
10485sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10486 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10487$ac_vpsub
10488$extrasub
10489s%@SHELL@%$SHELL%g
10490s%@CFLAGS@%$CFLAGS%g
10491s%@CPPFLAGS@%$CPPFLAGS%g
10492s%@CXXFLAGS@%$CXXFLAGS%g
10493s%@FFLAGS@%$FFLAGS%g
10494s%@DEFS@%$DEFS%g
10495s%@LDFLAGS@%$LDFLAGS%g
10496s%@LIBS@%$LIBS%g
10497s%@exec_prefix@%$exec_prefix%g
10498s%@prefix@%$prefix%g
10499s%@program_transform_name@%$program_transform_name%g
10500s%@bindir@%$bindir%g
10501s%@sbindir@%$sbindir%g
10502s%@libexecdir@%$libexecdir%g
10503s%@datadir@%$datadir%g
10504s%@sysconfdir@%$sysconfdir%g
10505s%@sharedstatedir@%$sharedstatedir%g
10506s%@localstatedir@%$localstatedir%g
10507s%@libdir@%$libdir%g
10508s%@includedir@%$includedir%g
10509s%@oldincludedir@%$oldincludedir%g
10510s%@infodir@%$infodir%g
10511s%@mandir@%$mandir%g
413ccac7
AC
10512s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10513s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10514s%@MAINT@%$MAINT%g
c906108c
SS
10515s%@CC@%$CC%g
10516s%@CPP@%$CPP%g
10517s%@host@%$host%g
10518s%@host_alias@%$host_alias%g
10519s%@host_cpu@%$host_cpu%g
10520s%@host_vendor@%$host_vendor%g
10521s%@host_os@%$host_os%g
10522s%@target@%$target%g
10523s%@target_alias@%$target_alias%g
10524s%@target_cpu@%$target_cpu%g
10525s%@target_vendor@%$target_vendor%g
10526s%@target_os@%$target_os%g
10527s%@build@%$build%g
10528s%@build_alias@%$build_alias%g
10529s%@build_cpu@%$build_cpu%g
10530s%@build_vendor@%$build_vendor%g
10531s%@build_os@%$build_os%g
c906108c 10532s%@RANLIB@%$RANLIB%g
8bb2c122 10533s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10534s%@ALLOCA@%$ALLOCA%g
10535s%@USE_NLS@%$USE_NLS%g
10536s%@MSGFMT@%$MSGFMT%g
10537s%@GMSGFMT@%$GMSGFMT%g
10538s%@XGETTEXT@%$XGETTEXT%g
10539s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10540s%@CATALOGS@%$CATALOGS%g
10541s%@CATOBJEXT@%$CATOBJEXT%g
10542s%@DATADIRNAME@%$DATADIRNAME%g
10543s%@GMOFILES@%$GMOFILES%g
10544s%@INSTOBJEXT@%$INSTOBJEXT%g
10545s%@INTLDEPS@%$INTLDEPS%g
10546s%@INTLLIBS@%$INTLLIBS%g
10547s%@INTLOBJS@%$INTLOBJS%g
10548s%@POFILES@%$POFILES%g
10549s%@POSUB@%$POSUB%g
10550s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10551s%@GT_NO@%$GT_NO%g
10552s%@GT_YES@%$GT_YES%g
10553s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10554s%@l@%$l%g
8dcde887 10555s%@subdirs@%$subdirs%g
7a292a7a 10556s%@AWK@%$AWK%g
c906108c
SS
10557s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10558s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10559s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10560s%@LN_S@%$LN_S%g
10561s%@YACC@%$YACC%g
c906108c 10562s%@AR@%$AR%g
95ca63c4
CF
10563s%@DLLTOOL@%$DLLTOOL%g
10564s%@WINDRES@%$WINDRES%g
75c6e08a 10565s%@MIG@%$MIG%g
c906108c 10566s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10567s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10568s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10569s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10570s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10571s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10572s%@MMALLOC@%$MMALLOC%g
aff38e61 10573s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10574s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10575s%@LIBGUI@%$LIBGUI%g
10576s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10577s%@WIN32LDAPP@%$WIN32LDAPP%g
10578s%@TCL_VERSION@%$TCL_VERSION%g
10579s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10580s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10581s%@TCL_CC@%$TCL_CC%g
10582s%@TCL_DEFS@%$TCL_DEFS%g
10583s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10584s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10585s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10586s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10587s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10588s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10589s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 10590s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
10591s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10592s%@TCL_RANLIB@%$TCL_RANLIB%g
10593s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10594s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10595s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10596s%@TK_VERSION@%$TK_VERSION%g
10597s%@TK_DEFS@%$TK_DEFS%g
10598s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10599s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10600s%@TK_XLIBSW@%$TK_XLIBSW%g
10601s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10602s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10603s%@TCLHDIR@%$TCLHDIR%g
10604s%@TKHDIR@%$TKHDIR%g
10605s%@ITCLHDIR@%$ITCLHDIR%g
10606s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10607s%@ITCL_VERSION@%$ITCL_VERSION%g
10608s%@ITCL_DEFS@%$ITCL_DEFS%g
10609s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10610s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10611s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10612s%@ITK_VERSION@%$ITK_VERSION%g
10613s%@ITK_DEFS@%$ITK_DEFS%g
10614s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10615s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10616s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10617s%@X_CFLAGS@%$X_CFLAGS%g
10618s%@X_LDFLAGS@%$X_LDFLAGS%g
10619s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10620s%@TCL_DEPS@%$TCL_DEPS%g
10621s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10622s%@ITCLLIB@%$ITCLLIB%g
10623s%@ITCL_DEPS@%$ITCL_DEPS%g
10624s%@ITKLIB@%$ITKLIB%g
10625s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10626s%@GDBTKLIBS@%$GDBTKLIBS%g
10627s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10628s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10629s%@IGNORE_SIM@%$IGNORE_SIM%g
10630s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 10631s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 10632s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 10633s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10634s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10635s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10636s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10637s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10638s%@CONFIG_ALL@%$CONFIG_ALL%g
10639s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10640s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10641s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10642s%@target_subdir@%$target_subdir%g
10643/@host_makefile_frag@/r $host_makefile_frag
10644s%@host_makefile_frag@%%g
10645/@target_makefile_frag@/r $target_makefile_frag
10646s%@target_makefile_frag@%%g
10647s%@frags@%$frags%g
5a2402b8
AC
10648s%@xm_h@%$xm_h%g
10649s%@tm_h@%$tm_h%g
10650s%@nm_h@%$nm_h%g
c906108c 10651s%@EXEEXT@%$EXEEXT%g
234b45d4 10652s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10653
10654CEOF
10655EOF
10656
10657cat >> $CONFIG_STATUS <<\EOF
10658
10659# Split the substitutions into bite-sized pieces for seds with
10660# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10661ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10662ac_file=1 # Number of current file.
10663ac_beg=1 # First line for current file.
10664ac_end=$ac_max_sed_cmds # Line after last line for current file.
10665ac_more_lines=:
10666ac_sed_cmds=""
10667while $ac_more_lines; do
10668 if test $ac_beg -gt 1; then
10669 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10670 else
10671 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10672 fi
10673 if test ! -s conftest.s$ac_file; then
10674 ac_more_lines=false
10675 rm -f conftest.s$ac_file
10676 else
10677 if test -z "$ac_sed_cmds"; then
10678 ac_sed_cmds="sed -f conftest.s$ac_file"
10679 else
10680 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10681 fi
10682 ac_file=`expr $ac_file + 1`
10683 ac_beg=$ac_end
10684 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10685 fi
10686done
10687if test -z "$ac_sed_cmds"; then
10688 ac_sed_cmds=cat
10689fi
10690EOF
10691
10692cat >> $CONFIG_STATUS <<EOF
10693
ed952ac5 10694CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10695EOF
10696cat >> $CONFIG_STATUS <<\EOF
10697for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10698 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10699 case "$ac_file" in
10700 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10701 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10702 *) ac_file_in="${ac_file}.in" ;;
10703 esac
10704
10705 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10706
10707 # Remove last slash and all that follows it. Not all systems have dirname.
10708 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10709 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10710 # The file is in a subdirectory.
10711 test ! -d "$ac_dir" && mkdir "$ac_dir"
10712 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10713 # A "../" for each directory in $ac_dir_suffix.
10714 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10715 else
10716 ac_dir_suffix= ac_dots=
10717 fi
10718
10719 case "$ac_given_srcdir" in
10720 .) srcdir=.
10721 if test -z "$ac_dots"; then top_srcdir=.
10722 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10723 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10724 *) # Relative path.
10725 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10726 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10727 esac
10728
10729 case "$ac_given_INSTALL" in
10730 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10731 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10732 esac
10733
10734 echo creating "$ac_file"
10735 rm -f "$ac_file"
10736 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10737 case "$ac_file" in
10738 *Makefile*) ac_comsub="1i\\
10739# $configure_input" ;;
10740 *) ac_comsub= ;;
10741 esac
10742
10743 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10744 sed -e "$ac_comsub
10745s%@configure_input@%$configure_input%g
10746s%@srcdir@%$srcdir%g
10747s%@top_srcdir@%$top_srcdir%g
10748s%@INSTALL@%$INSTALL%g
10749" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10750fi; done
10751rm -f conftest.s*
10752
10753# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10754# NAME is the cpp macro being defined and VALUE is the value it is being given.
10755#
10756# ac_d sets the value in "#define NAME VALUE" lines.
10757ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10758ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10759ac_dC='\3'
10760ac_dD='%g'
10761# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10762ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10763ac_uB='\([ ]\)%\1#\2define\3'
10764ac_uC=' '
10765ac_uD='\4%g'
10766# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10767ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10768ac_eB='$%\1#\2define\3'
10769ac_eC=' '
10770ac_eD='%g'
10771
10772if test "${CONFIG_HEADERS+set}" != set; then
10773EOF
10774cat >> $CONFIG_STATUS <<EOF
10775 CONFIG_HEADERS="config.h:config.in"
10776EOF
10777cat >> $CONFIG_STATUS <<\EOF
10778fi
10779for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10780 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10781 case "$ac_file" in
10782 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10783 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10784 *) ac_file_in="${ac_file}.in" ;;
10785 esac
10786
10787 echo creating $ac_file
10788
10789 rm -f conftest.frag conftest.in conftest.out
10790 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10791 cat $ac_file_inputs > conftest.in
10792
10793EOF
10794
10795# Transform confdefs.h into a sed script conftest.vals that substitutes
10796# the proper values into config.h.in to produce config.h. And first:
10797# Protect against being on the right side of a sed subst in config.status.
10798# Protect against being in an unquoted here document in config.status.
10799rm -f conftest.vals
10800cat > conftest.hdr <<\EOF
10801s/[\\&%]/\\&/g
10802s%[\\$`]%\\&%g
10803s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10804s%ac_d%ac_u%gp
10805s%ac_u%ac_e%gp
10806EOF
10807sed -n -f conftest.hdr confdefs.h > conftest.vals
10808rm -f conftest.hdr
10809
10810# This sed command replaces #undef with comments. This is necessary, for
10811# example, in the case of _POSIX_SOURCE, which is predefined and required
10812# on some systems where configure will not decide to define it.
10813cat >> conftest.vals <<\EOF
10814s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10815EOF
10816
10817# Break up conftest.vals because some shells have a limit on
10818# the size of here documents, and old seds have small limits too.
10819
10820rm -f conftest.tail
10821while :
10822do
10823 ac_lines=`grep -c . conftest.vals`
10824 # grep -c gives empty output for an empty file on some AIX systems.
10825 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10826 # Write a limited-size here document to conftest.frag.
10827 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10828 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10829 echo 'CEOF
10830 sed -f conftest.frag conftest.in > conftest.out
10831 rm -f conftest.in
10832 mv conftest.out conftest.in
10833' >> $CONFIG_STATUS
10834 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10835 rm -f conftest.vals
10836 mv conftest.tail conftest.vals
10837done
10838rm -f conftest.vals
10839
10840cat >> $CONFIG_STATUS <<\EOF
10841 rm -f conftest.frag conftest.h
10842 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10843 cat conftest.in >> conftest.h
10844 rm -f conftest.in
10845 if cmp -s $ac_file conftest.h 2>/dev/null; then
10846 echo "$ac_file is unchanged"
10847 rm -f conftest.h
10848 else
10849 # Remove last slash and all that follows it. Not all systems have dirname.
10850 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10851 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10852 # The file is in a subdirectory.
10853 test ! -d "$ac_dir" && mkdir "$ac_dir"
10854 fi
10855 rm -f $ac_file
10856 mv conftest.h $ac_file
10857 fi
10858fi; done
10859
10860EOF
10861
10862cat >> $CONFIG_STATUS <<EOF
10863ac_sources="$files"
10864ac_dests="$links"
10865EOF
10866
10867cat >> $CONFIG_STATUS <<\EOF
10868srcdir=$ac_given_srcdir
10869while test -n "$ac_sources"; do
10870 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10871 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10872
10873 echo "linking $srcdir/$ac_source to $ac_dest"
10874
10875 if test ! -r $srcdir/$ac_source; then
10876 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10877 fi
10878 rm -f $ac_dest
10879
10880 # Make relative symlinks.
10881 # Remove last slash and all that follows it. Not all systems have dirname.
10882 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10883 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10884 # The dest file is in a subdirectory.
10885 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10886 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10887 # A "../" for each directory in $ac_dest_dir_suffix.
10888 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10889 else
10890 ac_dest_dir_suffix= ac_dots=
10891 fi
10892
10893 case "$srcdir" in
10894 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10895 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10896 esac
10897
10898 # Make a symlink if possible; otherwise try a hard link.
10899 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10900 ln $srcdir/$ac_source $ac_dest; then :
10901 else
10902 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10903 fi
10904done
10905EOF
10906cat >> $CONFIG_STATUS <<EOF
10907
10908gdb_host_cpu=$gdb_host_cpu
10909gdb_target_cpu=$gdb_target_cpu
10910nativefile=$nativefile
10911
10912EOF
10913cat >> $CONFIG_STATUS <<\EOF
10914
7ee6d7eb 10915if test "${nativefile}" = ""; then
c4620205 10916 < Makefile \
e27da16d
JT
10917 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10918 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10919 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10920 > Makefile.tem
c906108c
SS
10921mv -f Makefile.tem Makefile
10922fi
10923
10924sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10925/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10926/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10927mv -f Makefile.tmp Makefile
10928
2acceee2 10929
c906108c
SS
10930case x$CONFIG_HEADERS in
10931xconfig.h:config.in)
10932echo > stamp-h ;;
10933esac
10934
10935exit 0
10936EOF
10937chmod +x $CONFIG_STATUS
10938rm -fr confdefs* $ac_clean_files
10939test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10940
10941if test "$no_recursion" != yes; then
10942
10943 # Remove --cache-file and --srcdir arguments so they do not pile up.
10944 ac_sub_configure_args=
10945 ac_prev=
10946 for ac_arg in $ac_configure_args; do
10947 if test -n "$ac_prev"; then
10948 ac_prev=
10949 continue
10950 fi
10951 case "$ac_arg" in
10952 -cache-file | --cache-file | --cache-fil | --cache-fi \
10953 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10954 ac_prev=cache_file ;;
10955 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10956 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10957 ;;
10958 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10959 ac_prev=srcdir ;;
10960 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10961 ;;
10962 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10963 esac
10964 done
10965
8dcde887 10966 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10967
10968 # Do not complain, so a configure script can configure whichever
10969 # parts of a large source tree are present.
10970 if test ! -d $srcdir/$ac_config_dir; then
10971 continue
10972 fi
10973
10974 echo configuring in $ac_config_dir
10975
10976 case "$srcdir" in
10977 .) ;;
10978 *)
10979 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10980 else
10981 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10982 fi
10983 ;;
10984 esac
10985
10986 ac_popdir=`pwd`
10987 cd $ac_config_dir
10988
10989 # A "../" for each directory in /$ac_config_dir.
10990 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10991
10992 case "$srcdir" in
10993 .) # No --srcdir option. We are building in place.
10994 ac_sub_srcdir=$srcdir ;;
10995 /*) # Absolute path.
10996 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10997 *) # Relative path.
10998 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10999 esac
11000
11001 # Check for guested configure; otherwise get Cygnus style configure.
11002 if test -f $ac_sub_srcdir/configure; then
11003 ac_sub_configure=$ac_sub_srcdir/configure
11004 elif test -f $ac_sub_srcdir/configure.in; then
11005 ac_sub_configure=$ac_configure
11006 else
11007 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11008 ac_sub_configure=
11009 fi
11010
11011 # The recursion is here.
11012 if test -n "$ac_sub_configure"; then
11013
11014 # Make the cache file name correct relative to the subdirectory.
11015 case "$cache_file" in
11016 /*) ac_sub_cache_file=$cache_file ;;
11017 *) # Relative path.
11018 ac_sub_cache_file="$ac_dots$cache_file" ;;
11019 esac
11020 case "$ac_given_INSTALL" in
11021 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11022 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11023 esac
11024
11025 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11026 # The eval makes quoting arguments work.
11027 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11028 then :
11029 else
11030 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11031 fi
11032 fi
11033
11034 cd $ac_popdir
11035 done
11036fi
11037
11038
11039exit 0
This page took 0.873105 seconds and 4 git commands to generate.