2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
[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 30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
0e5d83e3
JJ
31ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
d28f9cdf
DJ
33ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
06825bd1
MK
35ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
030292b7
DJ
39ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
41ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
43ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
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=
d836ee13 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
d836ee13 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
d836ee13
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
d836ee13
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
d836ee13
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d836ee13 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d836ee13 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
d836ee13 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
d836ee13 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d836ee13 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d836ee13 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
d836ee13 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d836ee13 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d836ee13 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
d836ee13 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
d836ee13 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
d836ee13 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
d836ee13 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
d836ee13 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d836ee13 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d836ee13 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
d836ee13 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
d836ee13 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
d836ee13 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
d836ee13 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
d836ee13 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
f6e85fc8 1158# AC_PROG_RANLIB. This can be removed when we switch to Autoconf
8bb2c122
MK
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d836ee13 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d836ee13 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
d836ee13 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
d836ee13 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
d836ee13 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
d836ee13 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
d836ee13 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
d836ee13 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
d836ee13 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
d836ee13 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
d836ee13 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
d836ee13 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
d836ee13 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
d836ee13 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
d836ee13 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
d836ee13 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
d836ee13 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d836ee13 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
d836ee13 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
d836ee13 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
d836ee13 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
d836ee13 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
d836ee13 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d836ee13 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
d836ee13 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
d836ee13 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
d836ee13 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d836ee13 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
d836ee13 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
d836ee13 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
d836ee13 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
d836ee13 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
d836ee13 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
d836ee13 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d836ee13 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
d836ee13 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
d836ee13
AC
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
d836ee13 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d836ee13 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
d836ee13 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
d836ee13 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
d836ee13 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
d836ee13 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
d836ee13 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d836ee13 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
d836ee13 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
d836ee13 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d836ee13 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d836ee13 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d836ee13 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
d836ee13 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d836ee13 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
d836ee13 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
d836ee13 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d836ee13 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
d836ee13 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
d836ee13 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d836ee13 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
d836ee13 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
d836ee13 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d836ee13 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
d836ee13 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
d836ee13 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
d836ee13 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
d836ee13 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d836ee13 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d836ee13 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d836ee13 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
d836ee13 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d836ee13 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
2928CONFIG_DEPS=
2929CONFIG_SRCS=
fb40c209 2930ENABLE_CFLAGS=
b3a90332
AC
2931CONFIG_ALL=
2932CONFIG_CLEAN=
e56ac5c3
AC
2933CONFIG_INSTALL=
2934CONFIG_UNINSTALL=
c906108c 2935
8dcde887 2936subdirs="doc testsuite"
96baa820 2937
8dcde887 2938configdirs=
96baa820 2939
27e9bf90 2940. $srcdir/configure.host
c906108c 2941
27e9bf90 2942. $srcdir/configure.tgt
c906108c 2943
27e9bf90
MK
2944# Fetch the default architecture and default target vector from BFD.
2945targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2946
27e9bf90
MK
2947# We only want the first architecture, so strip off the others if
2948# there is more than one.
2949targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2950
27e9bf90
MK
2951if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2954EOF
2955
2956fi
27e9bf90
MK
2957if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2960EOF
2961
2962fi
c906108c 2963
8bb2c122
MK
2964if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969s,\\,\\\\,g; s,\$,$$,g
2970EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973fi
2974test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976# Use a double $ so make ignores it.
2977test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980# sed with no file args requires a program.
2981test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
627af7ea
MK
2984# The CLI cannot be disabled yet, but may be in the future.
2985
2986# Enable CLI.
2987# Check whether --enable-gdbcli or --disable-gdbcli was given.
2988if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998else
2999 enable_gdbcli=yes
3000fi
3001
3002if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
627af7ea 3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
627af7ea
MK
3008 fi
3009fi
3010
3011# Enable MI.
3012# Check whether --enable-gdbmi or --disable-gdbmi was given.
3013if test "${enable_gdbmi+set}" = set; then
3014 enableval="$enable_gdbmi"
3015 case $enableval in
3016 yes | no)
3017 ;;
3018 *)
3019 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3020 esac
3021else
3022 enable_gdbmi=yes
3023fi
3024
3025if test x"$enable_gdbmi" = xyes; then
3026 if test -d $srcdir/mi; then
3027 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3028 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3029 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
627af7ea 3030 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
627af7ea
MK
3031 fi
3032fi
3033
06825bd1
MK
3034# Enable TUI.
3035# Check whether --enable-tui or --disable-tui was given.
3036if test "${enable_tui+set}" = set; then
3037 enableval="$enable_tui"
3038 case $enableval in
3039 yes | no)
3040 ;;
3041 *)
3042 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3043 esac
c324d747
AC
3044else
3045 enable_tui=yes
06825bd1
MK
3046fi
3047
3048if test x"$enable_tui" = xyes; then
3049 if test -d $srcdir/tui; then
7613d933 3050 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
c324d747
AC
3051 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3052 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3053 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3054 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3055 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3056 CONFIG_ALL="${CONFIG_ALL} all-tui"
3057 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3058 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3059 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3060 fi
06825bd1
MK
3061 fi
3062fi
3063
8ee53726
MK
3064# Enable gdbtk.
3065# Check whether --enable-gdbtk or --disable-gdbtk was given.
3066if test "${enable_gdbtk+set}" = set; then
3067 enableval="$enable_gdbtk"
3068 case $enableval in
3069 yes | no)
3070 ;;
3071 *)
3072 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3073 esac
3074else
3075 if test -d $srcdir/gdbtk; then
3076 enable_gdbtk=yes
3077 else
3078 enable_gdbtk=no
3079 fi
3080fi
3081
3082# We unconditionally disable gdbtk tests on selected platforms.
3083case $host_os in
3084 go32* | windows*)
3085 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3086 enable_gdbtk=no ;;
3087esac
3088
0e5d83e3
JJ
3089# Libunwind support.
3090# Check whether --with-libunwind or --without-libunwind was given.
3091if test "${with_libunwind+set}" = set; then
3092 withval="$with_libunwind"
3093 case "${withval}" in
3094 yes) enable_libunwind=yes ;;
3095 no) enable_libunwind=no ;;
3096 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3097esac
3098else
3099
3100 for ac_hdr in libunwind.h
3101do
3102ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3103echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 3104echo "configure:3105: checking for $ac_hdr" >&5
0e5d83e3
JJ
3105if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3106 echo $ac_n "(cached) $ac_c" 1>&6
3107else
3108 cat > conftest.$ac_ext <<EOF
02d62932 3109#line 3110 "configure"
0e5d83e3
JJ
3110#include "confdefs.h"
3111#include <$ac_hdr>
3112EOF
3113ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 3114{ (eval echo configure:3115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3115ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3116if test -z "$ac_err"; then
3117 rm -rf conftest*
3118 eval "ac_cv_header_$ac_safe=yes"
3119else
3120 echo "$ac_err" >&5
3121 echo "configure: failed program was:" >&5
3122 cat conftest.$ac_ext >&5
3123 rm -rf conftest*
3124 eval "ac_cv_header_$ac_safe=no"
3125fi
3126rm -f conftest*
3127fi
3128if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3129 echo "$ac_t""yes" 1>&6
3130 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3131 cat >> confdefs.h <<EOF
3132#define $ac_tr_hdr 1
3133EOF
3134
3135else
3136 echo "$ac_t""no" 1>&6
3137fi
3138done
3139
3140 for ac_hdr in libunwind-ia64.h
3141do
3142ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3143echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 3144echo "configure:3145: checking for $ac_hdr" >&5
0e5d83e3
JJ
3145if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3147else
3148 cat > conftest.$ac_ext <<EOF
02d62932 3149#line 3150 "configure"
0e5d83e3
JJ
3150#include "confdefs.h"
3151#include <$ac_hdr>
3152EOF
3153ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 3154{ (eval echo configure:3155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3155ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3156if test -z "$ac_err"; then
3157 rm -rf conftest*
3158 eval "ac_cv_header_$ac_safe=yes"
3159else
3160 echo "$ac_err" >&5
3161 echo "configure: failed program was:" >&5
3162 cat conftest.$ac_ext >&5
3163 rm -rf conftest*
3164 eval "ac_cv_header_$ac_safe=no"
3165fi
3166rm -f conftest*
3167fi
3168if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3169 echo "$ac_t""yes" 1>&6
3170 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3171 cat >> confdefs.h <<EOF
3172#define $ac_tr_hdr 1
3173EOF
3174
3175else
3176 echo "$ac_t""no" 1>&6
3177fi
3178done
3179
3180 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3181 enable_libunwind=yes;
3182 fi
3183
3184fi
3185
3186
3187if test x"$enable_libunwind" = xyes; then
3188 for ac_hdr in libunwind.h
3189do
3190ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3191echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 3192echo "configure:3193: checking for $ac_hdr" >&5
0e5d83e3
JJ
3193if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3194 echo $ac_n "(cached) $ac_c" 1>&6
3195else
3196 cat > conftest.$ac_ext <<EOF
02d62932 3197#line 3198 "configure"
0e5d83e3
JJ
3198#include "confdefs.h"
3199#include <$ac_hdr>
3200EOF
3201ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 3202{ (eval echo configure:3203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3203ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3204if test -z "$ac_err"; then
3205 rm -rf conftest*
3206 eval "ac_cv_header_$ac_safe=yes"
3207else
3208 echo "$ac_err" >&5
3209 echo "configure: failed program was:" >&5
3210 cat conftest.$ac_ext >&5
3211 rm -rf conftest*
3212 eval "ac_cv_header_$ac_safe=no"
3213fi
3214rm -f conftest*
3215fi
3216if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3217 echo "$ac_t""yes" 1>&6
3218 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3219 cat >> confdefs.h <<EOF
3220#define $ac_tr_hdr 1
3221EOF
3222
3223else
3224 echo "$ac_t""no" 1>&6
3225fi
3226done
3227
3228 for ac_hdr in libunwind-ia64.h
3229do
3230ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3231echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 3232echo "configure:3233: checking for $ac_hdr" >&5
0e5d83e3
JJ
3233if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
3235else
3236 cat > conftest.$ac_ext <<EOF
02d62932 3237#line 3238 "configure"
0e5d83e3
JJ
3238#include "confdefs.h"
3239#include <$ac_hdr>
3240EOF
3241ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 3242{ (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3243ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3244if test -z "$ac_err"; then
3245 rm -rf conftest*
3246 eval "ac_cv_header_$ac_safe=yes"
3247else
3248 echo "$ac_err" >&5
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3251 rm -rf conftest*
3252 eval "ac_cv_header_$ac_safe=no"
3253fi
3254rm -f conftest*
3255fi
3256if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3257 echo "$ac_t""yes" 1>&6
3258 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3259 cat >> confdefs.h <<EOF
3260#define $ac_tr_hdr 1
3261EOF
3262
3263else
3264 echo "$ac_t""no" 1>&6
3265fi
3266done
3267
3268 cat >> confdefs.h <<\EOF
3269#define HAVE_LIBUNWIND 1
3270EOF
3271
3272 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3273 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3274 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3275fi
3276
d28f9cdf
DJ
3277# Profiling support.
3278# Check whether --enable-profiling or --disable-profiling was given.
3279if test "${enable_profiling+set}" = set; then
3280 enableval="$enable_profiling"
3281 case $enableval in
3282 yes | no)
3283 ;;
3284 *)
3285 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3286 esac
3287else
3288 enable_profiling=no
3289fi
3290
3291
d9feb4e7
DJ
3292for ac_func in monstartup _mcleanup
3293do
3294echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 3295echo "configure:3296: checking for $ac_func" >&5
d9feb4e7 3296if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3297 echo $ac_n "(cached) $ac_c" 1>&6
3298else
3299 cat > conftest.$ac_ext <<EOF
02d62932 3300#line 3301 "configure"
d28f9cdf
DJ
3301#include "confdefs.h"
3302/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3303 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3304#include <assert.h>
3305/* Override any gcc2 internal prototype to avoid an error. */
3306/* We use char because int might match the return type of a gcc2
3307 builtin and then its argument prototype would still apply. */
d9feb4e7 3308char $ac_func();
d28f9cdf
DJ
3309
3310int main() {
3311
3312/* The GNU C library defines this for functions which it implements
3313 to always fail with ENOSYS. Some functions are actually named
3314 something starting with __ and the normal name is an alias. */
d9feb4e7 3315#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3316choke me
3317#else
d9feb4e7 3318$ac_func();
d28f9cdf
DJ
3319#endif
3320
3321; return 0; }
3322EOF
02d62932 3323if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3324 rm -rf conftest*
d9feb4e7 3325 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3326else
3327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3329 rm -rf conftest*
d9feb4e7 3330 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3331fi
3332rm -f conftest*
3333fi
3334
d9feb4e7 3335if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3336 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3337 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3338 cat >> confdefs.h <<EOF
3339#define $ac_tr_func 1
3340EOF
3341
d28f9cdf
DJ
3342else
3343 echo "$ac_t""no" 1>&6
d28f9cdf 3344fi
d9feb4e7 3345done
d28f9cdf 3346
b0b1c2c0 3347echo $ac_n "checking for _etext""... $ac_c" 1>&6
02d62932 3348echo "configure:3349: checking for _etext" >&5
b0b1c2c0
MK
3349if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3350 echo $ac_n "(cached) $ac_c" 1>&6
3351else
3352 cat > conftest.$ac_ext <<EOF
02d62932 3353#line 3354 "configure"
b0b1c2c0
MK
3354#include "confdefs.h"
3355#include <stdlib.h>
3356extern char _etext;
3357
3358int main() {
3359free (&_etext);
3360; return 0; }
3361EOF
02d62932 3362if { (eval echo configure:3363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3363 rm -rf conftest*
3364 ac_cv_var__etext=yes
3365else
3366 echo "configure: failed program was:" >&5
3367 cat conftest.$ac_ext >&5
3368 rm -rf conftest*
3369 ac_cv_var__etext=no
3370fi
3371rm -f conftest*
3372fi
3373
3374echo "$ac_t""$ac_cv_var__etext" 1>&6
3375if test $ac_cv_var__etext = yes; then
3376 cat >> confdefs.h <<\EOF
3377#define HAVE__ETEXT 1
3378EOF
3379
3380fi
d9feb4e7
DJ
3381if test "$enable_profiling" = yes ; then
3382 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3383 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3384 fi
3385 PROFILE_CFLAGS=-pg
3386 OLD_CFLAGS="$CFLAGS"
3387 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3388
d9feb4e7 3389 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
02d62932 3390echo "configure:3391: checking whether $CC supports -pg" >&5
d9feb4e7 3391if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3392 echo $ac_n "(cached) $ac_c" 1>&6
3393else
3394 cat > conftest.$ac_ext <<EOF
02d62932 3395#line 3396 "configure"
d28f9cdf 3396#include "confdefs.h"
d28f9cdf
DJ
3397
3398int main() {
d9feb4e7 3399int x;
d28f9cdf
DJ
3400; return 0; }
3401EOF
02d62932 3402if { (eval echo configure:3403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3403 rm -rf conftest*
d9feb4e7 3404 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3405else
3406 echo "configure: failed program was:" >&5
3407 cat conftest.$ac_ext >&5
3408 rm -rf conftest*
d9feb4e7 3409 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3410fi
3411rm -f conftest*
3412fi
3413
d9feb4e7 3414echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3415
d9feb4e7
DJ
3416 if test $ac_cv_cc_supports_pg = no; then
3417 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3418 fi
d28f9cdf
DJ
3419
3420 CFLAGS="$OLD_CFLAGS"
3421fi
3422
8bb2c122
MK
3423# --------------------- #
3424# Checks for programs. #
3425# --------------------- #
3426
d836ee13 3427for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3428do
3429# Extract the first word of "$ac_prog", so it can be a program name with args.
3430set dummy $ac_prog; ac_word=$2
3431echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3432echo "configure:3433: checking for $ac_word" >&5
7a292a7a
SS
3433if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3434 echo $ac_n "(cached) $ac_c" 1>&6
3435else
3436 if test -n "$AWK"; then
3437 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3438else
3439 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3440 ac_dummy="$PATH"
3441 for ac_dir in $ac_dummy; do
3442 test -z "$ac_dir" && ac_dir=.
3443 if test -f $ac_dir/$ac_word; then
3444 ac_cv_prog_AWK="$ac_prog"
3445 break
3446 fi
3447 done
3448 IFS="$ac_save_ifs"
3449fi
3450fi
3451AWK="$ac_cv_prog_AWK"
3452if test -n "$AWK"; then
3453 echo "$ac_t""$AWK" 1>&6
3454else
3455 echo "$ac_t""no" 1>&6
3456fi
3457
3458test -n "$AWK" && break
3459done
3460
c906108c
SS
3461# Find a good install program. We prefer a C program (faster),
3462# so one script is as good as another. But avoid the broken or
3463# incompatible versions:
3464# SysV /etc/install, /usr/sbin/install
3465# SunOS /usr/etc/install
3466# IRIX /sbin/install
3467# AIX /bin/install
3468# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3469# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3470# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3471# ./install, which can be erroneously created by make from ./install.sh.
3472echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
02d62932 3473echo "configure:3474: checking for a BSD compatible install" >&5
c906108c
SS
3474if test -z "$INSTALL"; then
3475if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3476 echo $ac_n "(cached) $ac_c" 1>&6
3477else
3478 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3479 for ac_dir in $PATH; do
3480 # Account for people who put trailing slashes in PATH elements.
3481 case "$ac_dir/" in
3482 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3483 *)
3484 # OSF1 and SCO ODT 3.0 have their own names for install.
3485 # Don't use installbsd from OSF since it installs stuff as root
3486 # by default.
3487 for ac_prog in ginstall scoinst install; do
3488 if test -f $ac_dir/$ac_prog; then
3489 if test $ac_prog = install &&
3490 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3491 # AIX install. It has an incompatible calling convention.
3492 :
3493 else
3494 ac_cv_path_install="$ac_dir/$ac_prog -c"
3495 break 2
3496 fi
3497 fi
3498 done
3499 ;;
3500 esac
3501 done
3502 IFS="$ac_save_IFS"
3503
3504fi
3505 if test "${ac_cv_path_install+set}" = set; then
3506 INSTALL="$ac_cv_path_install"
3507 else
3508 # As a last resort, use the slow shell script. We don't cache a
3509 # path for INSTALL within a source directory, because that will
3510 # break other packages using the cache if that directory is
3511 # removed, or if the path is relative.
3512 INSTALL="$ac_install_sh"
3513 fi
3514fi
3515echo "$ac_t""$INSTALL" 1>&6
3516
3517# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3518# It thinks the first close brace ends the variable substitution.
3519test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3520
3521test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3522
3523test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3524
8bb2c122 3525echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
02d62932 3526echo "configure:3527: checking whether ln -s works" >&5
8bb2c122
MK
3527if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3528 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3529else
8bb2c122
MK
3530 rm -f conftestdata
3531if ln -s X conftestdata 2>/dev/null
3532then
3533 rm -f conftestdata
3534 ac_cv_prog_LN_S="ln -s"
3535else
3536 ac_cv_prog_LN_S=ln
3537fi
3538fi
3539LN_S="$ac_cv_prog_LN_S"
3540if test "$ac_cv_prog_LN_S" = "ln -s"; then
3541 echo "$ac_t""yes" 1>&6
3542else
3543 echo "$ac_t""no" 1>&6
c906108c
SS
3544fi
3545
8bb2c122
MK
3546# Extract the first word of "ranlib", so it can be a program name with args.
3547set dummy ranlib; ac_word=$2
c906108c 3548echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3549echo "configure:3550: checking for $ac_word" >&5
8bb2c122 3550if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3551 echo $ac_n "(cached) $ac_c" 1>&6
3552else
8bb2c122
MK
3553 if test -n "$RANLIB"; then
3554 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3555else
3556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3557 ac_dummy="$PATH"
3558 for ac_dir in $ac_dummy; do
3559 test -z "$ac_dir" && ac_dir=.
3560 if test -f $ac_dir/$ac_word; then
8bb2c122 3561 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3562 break
3563 fi
3564 done
3565 IFS="$ac_save_ifs"
8bb2c122 3566 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3567fi
3568fi
8bb2c122
MK
3569RANLIB="$ac_cv_prog_RANLIB"
3570if test -n "$RANLIB"; then
3571 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3572else
3573 echo "$ac_t""no" 1>&6
3574fi
3575
8bb2c122
MK
3576for ac_prog in 'bison -y' byacc
3577do
3578# Extract the first word of "$ac_prog", so it can be a program name with args.
3579set dummy $ac_prog; ac_word=$2
c906108c 3580echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3581echo "configure:3582: checking for $ac_word" >&5
8bb2c122 3582if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3583 echo $ac_n "(cached) $ac_c" 1>&6
3584else
8bb2c122
MK
3585 if test -n "$YACC"; then
3586 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3587else
3588 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3589 ac_dummy="$PATH"
3590 for ac_dir in $ac_dummy; do
3591 test -z "$ac_dir" && ac_dir=.
3592 if test -f $ac_dir/$ac_word; then
8bb2c122 3593 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3594 break
3595 fi
3596 done
3597 IFS="$ac_save_ifs"
3598fi
3599fi
8bb2c122
MK
3600YACC="$ac_cv_prog_YACC"
3601if test -n "$YACC"; then
3602 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3603else
3604 echo "$ac_t""no" 1>&6
3605fi
3606
8bb2c122
MK
3607test -n "$YACC" && break
3608done
3609test -n "$YACC" || YACC="yacc"
c906108c 3610
8bb2c122
MK
3611
3612# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3613set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3614echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3615echo "configure:3616: checking for $ac_word" >&5
8bb2c122 3616if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618else
8bb2c122
MK
3619 if test -n "$AR"; then
3620 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3621else
3622 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625 test -z "$ac_dir" && ac_dir=.
3626 if test -f $ac_dir/$ac_word; then
8bb2c122 3627 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3628 break
3629 fi
3630 done
3631 IFS="$ac_save_ifs"
8bb2c122 3632 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3633fi
3634fi
8bb2c122
MK
3635AR="$ac_cv_prog_AR"
3636if test -n "$AR"; then
3637 echo "$ac_t""$AR" 1>&6
c906108c
SS
3638else
3639 echo "$ac_t""no" 1>&6
3640fi
3641
8bb2c122 3642
c906108c 3643
95ca63c4
CF
3644# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3645set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3646echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3647echo "configure:3648: checking for $ac_word" >&5
95ca63c4
CF
3648if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3649 echo $ac_n "(cached) $ac_c" 1>&6
3650else
3651 if test -n "$DLLTOOL"; then
3652 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3653else
3654 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3655 ac_dummy="$PATH"
3656 for ac_dir in $ac_dummy; do
3657 test -z "$ac_dir" && ac_dir=.
3658 if test -f $ac_dir/$ac_word; then
3659 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3660 break
3661 fi
3662 done
3663 IFS="$ac_save_ifs"
3664 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3665fi
3666fi
3667DLLTOOL="$ac_cv_prog_DLLTOOL"
3668if test -n "$DLLTOOL"; then
3669 echo "$ac_t""$DLLTOOL" 1>&6
3670else
3671 echo "$ac_t""no" 1>&6
3672fi
3673
3674
3675
3676# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3677set dummy ${ac_tool_prefix}windres; ac_word=$2
3678echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3679echo "configure:3680: checking for $ac_word" >&5
95ca63c4
CF
3680if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3681 echo $ac_n "(cached) $ac_c" 1>&6
3682else
3683 if test -n "$WINDRES"; then
3684 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3685else
3686 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3687 ac_dummy="$PATH"
3688 for ac_dir in $ac_dummy; do
3689 test -z "$ac_dir" && ac_dir=.
3690 if test -f $ac_dir/$ac_word; then
3691 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3692 break
3693 fi
3694 done
3695 IFS="$ac_save_ifs"
3696 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3697fi
3698fi
3699WINDRES="$ac_cv_prog_WINDRES"
3700if test -n "$WINDRES"; then
3701 echo "$ac_t""$WINDRES" 1>&6
3702else
3703 echo "$ac_t""no" 1>&6
3704fi
3705
3706
3707
c906108c 3708
8bb2c122 3709# Needed for GNU/Hurd.
75c6e08a
MK
3710# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3711set dummy ${ac_tool_prefix}mig; ac_word=$2
3712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
02d62932 3713echo "configure:3714: checking for $ac_word" >&5
75c6e08a
MK
3714if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716else
3717 if test -n "$MIG"; then
3718 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3719else
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 ac_dummy="$PATH"
3722 for ac_dir in $ac_dummy; do
3723 test -z "$ac_dir" && ac_dir=.
3724 if test -f $ac_dir/$ac_word; then
3725 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3726 break
3727 fi
3728 done
3729 IFS="$ac_save_ifs"
3730 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3731fi
3732fi
3733MIG="$ac_cv_prog_MIG"
3734if test -n "$MIG"; then
3735 echo "$ac_t""$MIG" 1>&6
3736else
3737 echo "$ac_t""no" 1>&6
3738fi
3739
3740
3741
3742
9a156167
MK
3743# ---------------------- #
3744# Checks for libraries. #
3745# ---------------------- #
3746
3747# We might need to link with -lm; most simulators need it.
3748echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
02d62932 3749echo "configure:3750: checking for main in -lm" >&5
9a156167
MK
3750ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3751if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3752 echo $ac_n "(cached) $ac_c" 1>&6
3753else
3754 ac_save_LIBS="$LIBS"
3755LIBS="-lm $LIBS"
3756cat > conftest.$ac_ext <<EOF
02d62932 3757#line 3758 "configure"
9a156167
MK
3758#include "confdefs.h"
3759
3760int main() {
3761main()
3762; return 0; }
3763EOF
02d62932 3764if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3765 rm -rf conftest*
3766 eval "ac_cv_lib_$ac_lib_var=yes"
3767else
3768 echo "configure: failed program was:" >&5
3769 cat conftest.$ac_ext >&5
3770 rm -rf conftest*
3771 eval "ac_cv_lib_$ac_lib_var=no"
3772fi
3773rm -f conftest*
3774LIBS="$ac_save_LIBS"
3775
3776fi
3777if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3778 echo "$ac_t""yes" 1>&6
3779 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3780 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3781 cat >> confdefs.h <<EOF
3782#define $ac_tr_lib 1
3783EOF
3784
3785 LIBS="-lm $LIBS"
3786
3787else
3788 echo "$ac_t""no" 1>&6
3789fi
3790
3791
3792# We need to link with -lw to get `wctype' on Solaris before Solaris
3793# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3794# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3795# is known to have this problem). Therefore we avoid libw if we can.
3796echo $ac_n "checking for wctype""... $ac_c" 1>&6
02d62932 3797echo "configure:3798: checking for wctype" >&5
9a156167
MK
3798if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 cat > conftest.$ac_ext <<EOF
02d62932 3802#line 3803 "configure"
9a156167
MK
3803#include "confdefs.h"
3804/* System header to define __stub macros and hopefully few prototypes,
3805 which can conflict with char wctype(); below. */
3806#include <assert.h>
3807/* Override any gcc2 internal prototype to avoid an error. */
3808/* We use char because int might match the return type of a gcc2
3809 builtin and then its argument prototype would still apply. */
3810char wctype();
3811
3812int main() {
3813
3814/* The GNU C library defines this for functions which it implements
3815 to always fail with ENOSYS. Some functions are actually named
3816 something starting with __ and the normal name is an alias. */
3817#if defined (__stub_wctype) || defined (__stub___wctype)
3818choke me
3819#else
3820wctype();
3821#endif
3822
3823; return 0; }
3824EOF
02d62932 3825if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3826 rm -rf conftest*
3827 eval "ac_cv_func_wctype=yes"
3828else
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 rm -rf conftest*
3832 eval "ac_cv_func_wctype=no"
3833fi
3834rm -f conftest*
3835fi
3836
3837if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3838 echo "$ac_t""yes" 1>&6
3839 :
3840else
3841 echo "$ac_t""no" 1>&6
3842echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
02d62932 3843echo "configure:3844: checking for wctype in -lw" >&5
9a156167
MK
3844ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3845if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3846 echo $ac_n "(cached) $ac_c" 1>&6
3847else
3848 ac_save_LIBS="$LIBS"
3849LIBS="-lw $LIBS"
3850cat > conftest.$ac_ext <<EOF
02d62932 3851#line 3852 "configure"
9a156167
MK
3852#include "confdefs.h"
3853/* Override any gcc2 internal prototype to avoid an error. */
3854/* We use char because int might match the return type of a gcc2
3855 builtin and then its argument prototype would still apply. */
3856char wctype();
3857
3858int main() {
3859wctype()
3860; return 0; }
3861EOF
02d62932 3862if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3863 rm -rf conftest*
3864 eval "ac_cv_lib_$ac_lib_var=yes"
3865else
3866 echo "configure: failed program was:" >&5
3867 cat conftest.$ac_ext >&5
3868 rm -rf conftest*
3869 eval "ac_cv_lib_$ac_lib_var=no"
3870fi
3871rm -f conftest*
3872LIBS="$ac_save_LIBS"
3873
3874fi
3875if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3876 echo "$ac_t""yes" 1>&6
3877 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3878 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3879 cat >> confdefs.h <<EOF
3880#define $ac_tr_lib 1
3881EOF
3882
3883 LIBS="-lw $LIBS"
3884
3885else
3886 echo "$ac_t""no" 1>&6
3887fi
3888
3889fi
3890
3891
c890192f
MK
3892# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3893
3894echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
02d62932 3895echo "configure:3896: checking for library containing gethostbyname" >&5
c890192f
MK
3896if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3897 echo $ac_n "(cached) $ac_c" 1>&6
3898else
3899 ac_func_search_save_LIBS="$LIBS"
3900ac_cv_search_gethostbyname="no"
3901cat > conftest.$ac_ext <<EOF
02d62932 3902#line 3903 "configure"
c890192f
MK
3903#include "confdefs.h"
3904/* Override any gcc2 internal prototype to avoid an error. */
3905/* We use char because int might match the return type of a gcc2
3906 builtin and then its argument prototype would still apply. */
3907char gethostbyname();
3908
3909int main() {
3910gethostbyname()
3911; return 0; }
3912EOF
02d62932 3913if { (eval echo configure:3914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3914 rm -rf conftest*
3915 ac_cv_search_gethostbyname="none required"
3916else
3917 echo "configure: failed program was:" >&5
3918 cat conftest.$ac_ext >&5
3919fi
3920rm -f conftest*
3921test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3922LIBS="-l$i $ac_func_search_save_LIBS"
3923cat > conftest.$ac_ext <<EOF
02d62932 3924#line 3925 "configure"
c890192f
MK
3925#include "confdefs.h"
3926/* Override any gcc2 internal prototype to avoid an error. */
3927/* We use char because int might match the return type of a gcc2
3928 builtin and then its argument prototype would still apply. */
3929char gethostbyname();
3930
3931int main() {
3932gethostbyname()
3933; return 0; }
3934EOF
02d62932 3935if { (eval echo configure:3936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
3936 rm -rf conftest*
3937 ac_cv_search_gethostbyname="-l$i"
3938break
3939else
3940 echo "configure: failed program was:" >&5
3941 cat conftest.$ac_ext >&5
3942fi
3943rm -f conftest*
3944done
3945LIBS="$ac_func_search_save_LIBS"
3946fi
3947
3948echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3949if test "$ac_cv_search_gethostbyname" != "no"; then
3950 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3951
3952else :
3953
3954fi
3955
9a156167
MK
3956# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3957
3958echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
02d62932 3959echo "configure:3960: checking for library containing socketpair" >&5
9a156167
MK
3960if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3961 echo $ac_n "(cached) $ac_c" 1>&6
3962else
3963 ac_func_search_save_LIBS="$LIBS"
3964ac_cv_search_socketpair="no"
3965cat > conftest.$ac_ext <<EOF
02d62932 3966#line 3967 "configure"
9a156167
MK
3967#include "confdefs.h"
3968/* Override any gcc2 internal prototype to avoid an error. */
3969/* We use char because int might match the return type of a gcc2
3970 builtin and then its argument prototype would still apply. */
3971char socketpair();
3972
3973int main() {
3974socketpair()
3975; return 0; }
3976EOF
02d62932 3977if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3978 rm -rf conftest*
3979 ac_cv_search_socketpair="none required"
3980else
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3983fi
3984rm -f conftest*
3985test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3986LIBS="-l$i $ac_func_search_save_LIBS"
3987cat > conftest.$ac_ext <<EOF
02d62932 3988#line 3989 "configure"
9a156167
MK
3989#include "confdefs.h"
3990/* Override any gcc2 internal prototype to avoid an error. */
3991/* We use char because int might match the return type of a gcc2
3992 builtin and then its argument prototype would still apply. */
3993char socketpair();
3994
3995int main() {
3996socketpair()
3997; return 0; }
3998EOF
02d62932 3999if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4000 rm -rf conftest*
4001 ac_cv_search_socketpair="-l$i"
4002break
4003else
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006fi
4007rm -f conftest*
4008done
4009LIBS="$ac_func_search_save_LIBS"
4010fi
4011
4012echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4013if test "$ac_cv_search_socketpair" != "no"; then
4014 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4015
4016else :
4017
4018fi
4019
06825bd1
MK
4020# Since GDB uses Readline, we need termcap functionality, so we need
4021# to find a library that provides that. When GDB is configured with
c324d747 4022# the TUI, we need full curses functionality.
06825bd1
MK
4023
4024case $host_os in
4025 cygwin*)
4026 if test -d $srcdir/libtermcap; then
4027 LIBS="../libtermcap/libtermcap.a $LIBS"
4028 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4029 fi ;;
40a7debc 4030 go32* | *djgpp*)
06825bd1
MK
4031 ac_cv_search_tgetent="none required"
4032 ;;
4033 aix*)
4034 # Readline prefers curses over termcap on AIX.
4035 # ??? Why?
4036
4037echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
02d62932 4038echo "configure:4039: checking for library containing tgetent" >&5
06825bd1
MK
4039if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 ac_func_search_save_LIBS="$LIBS"
4043ac_cv_search_tgetent="no"
4044cat > conftest.$ac_ext <<EOF
02d62932 4045#line 4046 "configure"
06825bd1
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 tgetent();
4051
4052int main() {
4053tgetent()
4054; return 0; }
4055EOF
02d62932 4056if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4057 rm -rf conftest*
4058 ac_cv_search_tgetent="none required"
4059else
4060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062fi
4063rm -f conftest*
4064test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4065LIBS="-l$i $ac_func_search_save_LIBS"
4066cat > conftest.$ac_ext <<EOF
02d62932 4067#line 4068 "configure"
06825bd1
MK
4068#include "confdefs.h"
4069/* Override any gcc2 internal prototype to avoid an error. */
4070/* We use char because int might match the return type of a gcc2
4071 builtin and then its argument prototype would still apply. */
4072char tgetent();
4073
4074int main() {
4075tgetent()
4076; return 0; }
4077EOF
02d62932 4078if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4079 rm -rf conftest*
4080 ac_cv_search_tgetent="-l$i"
4081break
4082else
4083 echo "configure: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
4085fi
4086rm -f conftest*
4087done
4088LIBS="$ac_func_search_save_LIBS"
4089fi
4090
4091echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4092if test "$ac_cv_search_tgetent" != "no"; then
4093 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4094
4095else :
4096
4097fi
4098 ;;
4099esac
4100
4101# Note: We used to check for libtermlib and libterminfo too, but
4102# Readline doesn't, so I think we're safe with leaving them out.
4103
4104echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
02d62932 4105echo "configure:4106: checking for library containing tgetent" >&5
06825bd1
MK
4106if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108else
4109 ac_func_search_save_LIBS="$LIBS"
4110ac_cv_search_tgetent="no"
4111cat > conftest.$ac_ext <<EOF
02d62932 4112#line 4113 "configure"
06825bd1
MK
4113#include "confdefs.h"
4114/* Override any gcc2 internal prototype to avoid an error. */
4115/* We use char because int might match the return type of a gcc2
4116 builtin and then its argument prototype would still apply. */
4117char tgetent();
4118
4119int main() {
4120tgetent()
4121; return 0; }
4122EOF
02d62932 4123if { (eval echo configure:4124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4124 rm -rf conftest*
4125 ac_cv_search_tgetent="none required"
4126else
4127 echo "configure: failed program was:" >&5
4128 cat conftest.$ac_ext >&5
4129fi
4130rm -f conftest*
4131test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4132LIBS="-l$i $ac_func_search_save_LIBS"
4133cat > conftest.$ac_ext <<EOF
02d62932 4134#line 4135 "configure"
06825bd1
MK
4135#include "confdefs.h"
4136/* Override any gcc2 internal prototype to avoid an error. */
4137/* We use char because int might match the return type of a gcc2
4138 builtin and then its argument prototype would still apply. */
4139char tgetent();
4140
4141int main() {
4142tgetent()
4143; return 0; }
4144EOF
02d62932 4145if { (eval echo configure:4146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4146 rm -rf conftest*
4147 ac_cv_search_tgetent="-l$i"
4148break
4149else
4150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4152fi
4153rm -f conftest*
4154done
4155LIBS="$ac_func_search_save_LIBS"
4156fi
4157
4158echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4159if test "$ac_cv_search_tgetent" != "no"; then
4160 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4161
4162else :
4163
4164fi
4165
4166if test "$ac_cv_search_tgetent" = no; then
4167 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4168fi
4169
02d62932
MC
4170# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4171# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4172# Makefile fragments. That's why we need to have `Hcurses' before
4173# `curses'. I don't see why we should use HP curses if a more
4174# standard curses is available, except that according to HP's
4175# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4176# HP-UX 10.10 and 10.20.
4177
4178case $host_os in
4179 osf5.*)
4180 # ncurses does not work on native alphaev68-dec-osf5.1
4181 # -- chastain 2004-04-24
4182
4183echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4184echo "configure:4185: checking for library containing initscr" >&5
4185if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4186 echo $ac_n "(cached) $ac_c" 1>&6
4187else
4188 ac_func_search_save_LIBS="$LIBS"
4189ac_cv_search_initscr="no"
4190cat > conftest.$ac_ext <<EOF
4191#line 4192 "configure"
4192#include "confdefs.h"
4193/* Override any gcc2 internal prototype to avoid an error. */
4194/* We use char because int might match the return type of a gcc2
4195 builtin and then its argument prototype would still apply. */
4196char initscr();
4197
4198int main() {
4199initscr()
4200; return 0; }
4201EOF
4202if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4203 rm -rf conftest*
4204 ac_cv_search_initscr="none required"
4205else
4206 echo "configure: failed program was:" >&5
4207 cat conftest.$ac_ext >&5
4208fi
4209rm -f conftest*
4210test "$ac_cv_search_initscr" = "no" && for i in curses; do
4211LIBS="-l$i $ac_func_search_save_LIBS"
4212cat > conftest.$ac_ext <<EOF
4213#line 4214 "configure"
4214#include "confdefs.h"
4215/* Override any gcc2 internal prototype to avoid an error. */
4216/* We use char because int might match the return type of a gcc2
4217 builtin and then its argument prototype would still apply. */
4218char initscr();
4219
4220int main() {
4221initscr()
4222; return 0; }
4223EOF
4224if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4225 rm -rf conftest*
4226 ac_cv_search_initscr="-l$i"
4227break
4228else
4229 echo "configure: failed program was:" >&5
4230 cat conftest.$ac_ext >&5
4231fi
4232rm -f conftest*
4233done
4234LIBS="$ac_func_search_save_LIBS"
4235fi
4236
4237echo "$ac_t""$ac_cv_search_initscr" 1>&6
4238if test "$ac_cv_search_initscr" != "no"; then
4239 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4240
4241else :
4242 echo "configure: warning: no curses library found" 1>&2
4243fi
4244 ;;
4245 *)
4246
4247echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4248echo "configure:4249: checking for library containing initscr" >&5
4249if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
4251else
4252 ac_func_search_save_LIBS="$LIBS"
4253ac_cv_search_initscr="no"
4254cat > conftest.$ac_ext <<EOF
4255#line 4256 "configure"
4256#include "confdefs.h"
4257/* Override any gcc2 internal prototype to avoid an error. */
4258/* We use char because int might match the return type of a gcc2
4259 builtin and then its argument prototype would still apply. */
4260char initscr();
4261
4262int main() {
4263initscr()
4264; return 0; }
4265EOF
4266if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4267 rm -rf conftest*
4268 ac_cv_search_initscr="none required"
4269else
4270 echo "configure: failed program was:" >&5
4271 cat conftest.$ac_ext >&5
4272fi
4273rm -f conftest*
4274test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
4275LIBS="-l$i $ac_func_search_save_LIBS"
4276cat > conftest.$ac_ext <<EOF
4277#line 4278 "configure"
4278#include "confdefs.h"
4279/* Override any gcc2 internal prototype to avoid an error. */
4280/* We use char because int might match the return type of a gcc2
4281 builtin and then its argument prototype would still apply. */
4282char initscr();
4283
4284int main() {
4285initscr()
4286; return 0; }
4287EOF
4288if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4289 rm -rf conftest*
4290 ac_cv_search_initscr="-l$i"
4291break
4292else
4293 echo "configure: failed program was:" >&5
4294 cat conftest.$ac_ext >&5
4295fi
4296rm -f conftest*
4297done
4298LIBS="$ac_func_search_save_LIBS"
4299fi
4300
4301echo "$ac_t""$ac_cv_search_initscr" 1>&6
4302if test "$ac_cv_search_initscr" != "no"; then
4303 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4304
4305else :
4306 echo "configure: warning: no curses library found" 1>&2
4307fi
4308 ;;
4309esac
4310
4311# Check whether the wborder function is provided by the curses
4312# library detected above. In certain implementations such as
4313# the HP/UX Hcurses for instance, this function is provided by an
4314# additional library. So if we did not find this function inside
4315# the curses library, try some alternate libraries we know might
4316# provide it.
4317
4318echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
4319echo "configure:4320: checking for library containing wborder" >&5
4320if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 ac_func_search_save_LIBS="$LIBS"
4324ac_cv_search_wborder="no"
4325cat > conftest.$ac_ext <<EOF
4326#line 4327 "configure"
4327#include "confdefs.h"
4328/* Override any gcc2 internal prototype to avoid an error. */
4329/* We use char because int might match the return type of a gcc2
4330 builtin and then its argument prototype would still apply. */
4331char wborder();
4332
4333int main() {
4334wborder()
4335; return 0; }
4336EOF
4337if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4338 rm -rf conftest*
4339 ac_cv_search_wborder="none required"
4340else
4341 echo "configure: failed program was:" >&5
4342 cat conftest.$ac_ext >&5
4343fi
4344rm -f conftest*
4345test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4346LIBS="-l$i $ac_func_search_save_LIBS"
4347cat > conftest.$ac_ext <<EOF
4348#line 4349 "configure"
4349#include "confdefs.h"
4350/* Override any gcc2 internal prototype to avoid an error. */
4351/* We use char because int might match the return type of a gcc2
4352 builtin and then its argument prototype would still apply. */
4353char wborder();
4354
4355int main() {
4356wborder()
4357; return 0; }
4358EOF
4359if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4360 rm -rf conftest*
4361 ac_cv_search_wborder="-l$i"
4362break
4363else
4364 echo "configure: failed program was:" >&5
4365 cat conftest.$ac_ext >&5
4366fi
4367rm -f conftest*
4368done
4369LIBS="$ac_func_search_save_LIBS"
4370fi
4371
4372echo "$ac_t""$ac_cv_search_wborder" 1>&6
4373if test "$ac_cv_search_wborder" != "no"; then
4374 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4375
4376else :
4377 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4378fi
4379
5ee754fc
MK
4380# ------------------------- #
4381# Checks for header files. #
4382# ------------------------- #
4383
4384ac_header_dirent=no
4385for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4386do
4387ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4388echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
02d62932 4389echo "configure:4390: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4390if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4391 echo $ac_n "(cached) $ac_c" 1>&6
4392else
4393 cat > conftest.$ac_ext <<EOF
02d62932 4394#line 4395 "configure"
c906108c
SS
4395#include "confdefs.h"
4396#include <sys/types.h>
5ee754fc
MK
4397#include <$ac_hdr>
4398int main() {
4399DIR *dirp = 0;
4400; return 0; }
4401EOF
02d62932 4402if { (eval echo configure:4403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4403 rm -rf conftest*
4404 eval "ac_cv_header_dirent_$ac_safe=yes"
4405else
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 rm -rf conftest*
4409 eval "ac_cv_header_dirent_$ac_safe=no"
4410fi
4411rm -f conftest*
4412fi
4413if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4414 echo "$ac_t""yes" 1>&6
4415 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4416 cat >> confdefs.h <<EOF
4417#define $ac_tr_hdr 1
4418EOF
4419 ac_header_dirent=$ac_hdr; break
4420else
4421 echo "$ac_t""no" 1>&6
4422fi
4423done
4424# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4425if test $ac_header_dirent = dirent.h; then
4426echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
02d62932 4427echo "configure:4428: checking for opendir in -ldir" >&5
5ee754fc
MK
4428ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4429if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4430 echo $ac_n "(cached) $ac_c" 1>&6
4431else
4432 ac_save_LIBS="$LIBS"
4433LIBS="-ldir $LIBS"
4434cat > conftest.$ac_ext <<EOF
02d62932 4435#line 4436 "configure"
5ee754fc
MK
4436#include "confdefs.h"
4437/* Override any gcc2 internal prototype to avoid an error. */
4438/* We use char because int might match the return type of a gcc2
4439 builtin and then its argument prototype would still apply. */
4440char opendir();
c906108c
SS
4441
4442int main() {
5ee754fc 4443opendir()
c906108c
SS
4444; return 0; }
4445EOF
02d62932 4446if { (eval echo configure:4447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4447 rm -rf conftest*
5ee754fc 4448 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4449else
4450 echo "configure: failed program was:" >&5
4451 cat conftest.$ac_ext >&5
4452 rm -rf conftest*
5ee754fc 4453 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4454fi
4455rm -f conftest*
5ee754fc
MK
4456LIBS="$ac_save_LIBS"
4457
4458fi
4459if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 LIBS="$LIBS -ldir"
4462else
4463 echo "$ac_t""no" 1>&6
c906108c
SS
4464fi
4465
5ee754fc
MK
4466else
4467echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
02d62932 4468echo "configure:4469: checking for opendir in -lx" >&5
5ee754fc
MK
4469ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4470if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4471 echo $ac_n "(cached) $ac_c" 1>&6
4472else
4473 ac_save_LIBS="$LIBS"
4474LIBS="-lx $LIBS"
4475cat > conftest.$ac_ext <<EOF
02d62932 4476#line 4477 "configure"
5ee754fc
MK
4477#include "confdefs.h"
4478/* Override any gcc2 internal prototype to avoid an error. */
4479/* We use char because int might match the return type of a gcc2
4480 builtin and then its argument prototype would still apply. */
4481char opendir();
4482
4483int main() {
4484opendir()
4485; return 0; }
c906108c 4486EOF
02d62932 4487if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4488 rm -rf conftest*
4489 eval "ac_cv_lib_$ac_lib_var=yes"
4490else
4491 echo "configure: failed program was:" >&5
4492 cat conftest.$ac_ext >&5
4493 rm -rf conftest*
4494 eval "ac_cv_lib_$ac_lib_var=no"
4495fi
4496rm -f conftest*
4497LIBS="$ac_save_LIBS"
c906108c 4498
5ee754fc
MK
4499fi
4500if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4501 echo "$ac_t""yes" 1>&6
4502 LIBS="$LIBS -lx"
4503else
4504 echo "$ac_t""no" 1>&6
4505fi
c906108c 4506
5ee754fc 4507fi
c906108c 4508
5ee754fc 4509echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
02d62932 4510echo "configure:4511: checking whether stat file-mode macros are broken" >&5
5ee754fc 4511if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4512 echo $ac_n "(cached) $ac_c" 1>&6
4513else
4514 cat > conftest.$ac_ext <<EOF
02d62932 4515#line 4516 "configure"
9608ab8b
MK
4516#include "confdefs.h"
4517#include <sys/types.h>
5ee754fc
MK
4518#include <sys/stat.h>
4519
4520#if defined(S_ISBLK) && defined(S_IFDIR)
4521# if S_ISBLK (S_IFDIR)
4522You lose.
4523# endif
4524#endif
4525
4526#if defined(S_ISBLK) && defined(S_IFCHR)
4527# if S_ISBLK (S_IFCHR)
4528You lose.
4529# endif
4530#endif
4531
4532#if defined(S_ISLNK) && defined(S_IFREG)
4533# if S_ISLNK (S_IFREG)
4534You lose.
4535# endif
4536#endif
4537
4538#if defined(S_ISSOCK) && defined(S_IFREG)
4539# if S_ISSOCK (S_IFREG)
4540You lose.
4541# endif
4542#endif
4543
9608ab8b 4544EOF
5ee754fc
MK
4545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4546 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4547 rm -rf conftest*
5ee754fc
MK
4548 ac_cv_header_stat_broken=yes
4549else
4550 rm -rf conftest*
4551 ac_cv_header_stat_broken=no
4552fi
4553rm -f conftest*
4554
4555fi
4556
4557echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4558if test $ac_cv_header_stat_broken = yes; then
4559 cat >> confdefs.h <<\EOF
4560#define STAT_MACROS_BROKEN 1
4561EOF
4562
4563fi
4564
4565echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
02d62932 4566echo "configure:4567: checking for ANSI C header files" >&5
5ee754fc
MK
4567if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4568 echo $ac_n "(cached) $ac_c" 1>&6
4569else
4570 cat > conftest.$ac_ext <<EOF
02d62932 4571#line 4572 "configure"
5ee754fc
MK
4572#include "confdefs.h"
4573#include <stdlib.h>
4574#include <stdarg.h>
4575#include <string.h>
4576#include <float.h>
4577EOF
4578ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4579{ (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4580ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4581if test -z "$ac_err"; then
4582 rm -rf conftest*
4583 ac_cv_header_stdc=yes
4584else
4585 echo "$ac_err" >&5
4586 echo "configure: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 rm -rf conftest*
4589 ac_cv_header_stdc=no
4590fi
4591rm -f conftest*
4592
4593if test $ac_cv_header_stdc = yes; then
4594 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4595cat > conftest.$ac_ext <<EOF
02d62932 4596#line 4597 "configure"
5ee754fc
MK
4597#include "confdefs.h"
4598#include <string.h>
4599EOF
4600if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4601 egrep "memchr" >/dev/null 2>&1; then
4602 :
4603else
4604 rm -rf conftest*
4605 ac_cv_header_stdc=no
4606fi
4607rm -f conftest*
4608
4609fi
4610
4611if test $ac_cv_header_stdc = yes; then
4612 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4613cat > conftest.$ac_ext <<EOF
02d62932 4614#line 4615 "configure"
5ee754fc
MK
4615#include "confdefs.h"
4616#include <stdlib.h>
4617EOF
4618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4619 egrep "free" >/dev/null 2>&1; then
4620 :
4621else
4622 rm -rf conftest*
4623 ac_cv_header_stdc=no
4624fi
4625rm -f conftest*
4626
4627fi
4628
4629if test $ac_cv_header_stdc = yes; then
4630 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4631if test "$cross_compiling" = yes; then
4632 :
4633else
4634 cat > conftest.$ac_ext <<EOF
02d62932 4635#line 4636 "configure"
5ee754fc
MK
4636#include "confdefs.h"
4637#include <ctype.h>
4638#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4639#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4640#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4641int main () { int i; for (i = 0; i < 256; i++)
4642if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4643exit (0); }
4644
4645EOF
02d62932 4646if { (eval echo configure:4647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4647then
4648 :
9608ab8b 4649else
5ee754fc
MK
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4652 rm -fr conftest*
4653 ac_cv_header_stdc=no
4654fi
4655rm -fr conftest*
4656fi
4657
4658fi
4659fi
4660
4661echo "$ac_t""$ac_cv_header_stdc" 1>&6
4662if test $ac_cv_header_stdc = yes; then
4663 cat >> confdefs.h <<\EOF
4664#define STDC_HEADERS 1
4665EOF
4666
4667fi
4668
4669for ac_hdr in link.h
4670do
4671ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4672echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4673echo "configure:4674: checking for $ac_hdr" >&5
5ee754fc
MK
4674if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4675 echo $ac_n "(cached) $ac_c" 1>&6
4676else
4677 cat > conftest.$ac_ext <<EOF
02d62932 4678#line 4679 "configure"
5ee754fc
MK
4679#include "confdefs.h"
4680#include <$ac_hdr>
4681EOF
4682ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4683{ (eval echo configure:4684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4684ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4685if test -z "$ac_err"; then
4686 rm -rf conftest*
4687 eval "ac_cv_header_$ac_safe=yes"
4688else
4689 echo "$ac_err" >&5
4690 echo "configure: failed program was:" >&5
4691 cat conftest.$ac_ext >&5
4692 rm -rf conftest*
4693 eval "ac_cv_header_$ac_safe=no"
4694fi
4695rm -f conftest*
4696fi
4697if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4698 echo "$ac_t""yes" 1>&6
4699 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4700 cat >> confdefs.h <<EOF
4701#define $ac_tr_hdr 1
4702EOF
4703
4704else
4705 echo "$ac_t""no" 1>&6
4706fi
4707done
4708
78434e59 4709for ac_hdr in machine/reg.h
5ee754fc
MK
4710do
4711ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4712echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4713echo "configure:4714: checking for $ac_hdr" >&5
5ee754fc
MK
4714if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4715 echo $ac_n "(cached) $ac_c" 1>&6
4716else
4717 cat > conftest.$ac_ext <<EOF
02d62932 4718#line 4719 "configure"
5ee754fc
MK
4719#include "confdefs.h"
4720#include <$ac_hdr>
4721EOF
4722ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4723{ (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4724ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4725if test -z "$ac_err"; then
4726 rm -rf conftest*
4727 eval "ac_cv_header_$ac_safe=yes"
4728else
4729 echo "$ac_err" >&5
4730 echo "configure: failed program was:" >&5
4731 cat conftest.$ac_ext >&5
4732 rm -rf conftest*
4733 eval "ac_cv_header_$ac_safe=no"
4734fi
4735rm -f conftest*
4736fi
4737if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4738 echo "$ac_t""yes" 1>&6
4739 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4740 cat >> confdefs.h <<EOF
4741#define $ac_tr_hdr 1
4742EOF
4743
4744else
4745 echo "$ac_t""no" 1>&6
4746fi
4747done
4748
78434e59 4749for ac_hdr in nlist.h
5ee754fc
MK
4750do
4751ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4752echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4753echo "configure:4754: checking for $ac_hdr" >&5
5ee754fc
MK
4754if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4755 echo $ac_n "(cached) $ac_c" 1>&6
4756else
4757 cat > conftest.$ac_ext <<EOF
02d62932 4758#line 4759 "configure"
5ee754fc
MK
4759#include "confdefs.h"
4760#include <$ac_hdr>
4761EOF
4762ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4763{ (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4764ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4765if test -z "$ac_err"; then
4766 rm -rf conftest*
4767 eval "ac_cv_header_$ac_safe=yes"
4768else
4769 echo "$ac_err" >&5
4770 echo "configure: failed program was:" >&5
4771 cat conftest.$ac_ext >&5
4772 rm -rf conftest*
4773 eval "ac_cv_header_$ac_safe=no"
4774fi
4775rm -f conftest*
4776fi
4777if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4778 echo "$ac_t""yes" 1>&6
4779 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4780 cat >> confdefs.h <<EOF
4781#define $ac_tr_hdr 1
4782EOF
4783
4784else
4785 echo "$ac_t""no" 1>&6
4786fi
4787done
4788
78434e59 4789for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4790do
4791ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4793echo "configure:4794: checking for $ac_hdr" >&5
5ee754fc
MK
4794if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795 echo $ac_n "(cached) $ac_c" 1>&6
4796else
4797 cat > conftest.$ac_ext <<EOF
02d62932 4798#line 4799 "configure"
5ee754fc
MK
4799#include "confdefs.h"
4800#include <$ac_hdr>
4801EOF
4802ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4803{ (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4804ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805if test -z "$ac_err"; then
4806 rm -rf conftest*
4807 eval "ac_cv_header_$ac_safe=yes"
4808else
4809 echo "$ac_err" >&5
4810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
4812 rm -rf conftest*
4813 eval "ac_cv_header_$ac_safe=no"
4814fi
4815rm -f conftest*
4816fi
4817if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818 echo "$ac_t""yes" 1>&6
4819 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820 cat >> confdefs.h <<EOF
4821#define $ac_tr_hdr 1
4822EOF
4823
4824else
4825 echo "$ac_t""no" 1>&6
4826fi
4827done
4828
a2f23071 4829for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
5ee754fc
MK
4830do
4831ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4832echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4833echo "configure:4834: checking for $ac_hdr" >&5
5ee754fc
MK
4834if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4835 echo $ac_n "(cached) $ac_c" 1>&6
4836else
4837 cat > conftest.$ac_ext <<EOF
02d62932 4838#line 4839 "configure"
5ee754fc
MK
4839#include "confdefs.h"
4840#include <$ac_hdr>
4841EOF
4842ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4843{ (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4844ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4845if test -z "$ac_err"; then
4846 rm -rf conftest*
4847 eval "ac_cv_header_$ac_safe=yes"
4848else
4849 echo "$ac_err" >&5
4850 echo "configure: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 rm -rf conftest*
4853 eval "ac_cv_header_$ac_safe=no"
4854fi
4855rm -f conftest*
4856fi
4857if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4858 echo "$ac_t""yes" 1>&6
4859 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4860 cat >> confdefs.h <<EOF
4861#define $ac_tr_hdr 1
4862EOF
4863
4864else
4865 echo "$ac_t""no" 1>&6
4866fi
4867done
4868
78434e59 4869for ac_hdr in stddef.h
5ee754fc
MK
4870do
4871ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4872echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4873echo "configure:4874: checking for $ac_hdr" >&5
5ee754fc
MK
4874if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876else
4877 cat > conftest.$ac_ext <<EOF
02d62932 4878#line 4879 "configure"
5ee754fc
MK
4879#include "confdefs.h"
4880#include <$ac_hdr>
4881EOF
4882ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4883{ (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4884ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4885if test -z "$ac_err"; then
4886 rm -rf conftest*
4887 eval "ac_cv_header_$ac_safe=yes"
4888else
4889 echo "$ac_err" >&5
4890 echo "configure: failed program was:" >&5
4891 cat conftest.$ac_ext >&5
4892 rm -rf conftest*
4893 eval "ac_cv_header_$ac_safe=no"
4894fi
4895rm -f conftest*
4896fi
4897if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4898 echo "$ac_t""yes" 1>&6
4899 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4900 cat >> confdefs.h <<EOF
4901#define $ac_tr_hdr 1
4902EOF
4903
4904else
4905 echo "$ac_t""no" 1>&6
4906fi
4907done
4908
78434e59 4909for ac_hdr in stdlib.h
5ee754fc
MK
4910do
4911ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4912echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4913echo "configure:4914: checking for $ac_hdr" >&5
5ee754fc
MK
4914if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4915 echo $ac_n "(cached) $ac_c" 1>&6
4916else
4917 cat > conftest.$ac_ext <<EOF
02d62932 4918#line 4919 "configure"
5ee754fc
MK
4919#include "confdefs.h"
4920#include <$ac_hdr>
4921EOF
4922ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4923{ (eval echo configure:4924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4924ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4925if test -z "$ac_err"; then
4926 rm -rf conftest*
4927 eval "ac_cv_header_$ac_safe=yes"
4928else
4929 echo "$ac_err" >&5
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 rm -rf conftest*
4933 eval "ac_cv_header_$ac_safe=no"
4934fi
4935rm -f conftest*
4936fi
4937if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6
4939 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4940 cat >> confdefs.h <<EOF
4941#define $ac_tr_hdr 1
4942EOF
4943
4944else
4945 echo "$ac_t""no" 1>&6
4946fi
4947done
4948
78434e59 4949for ac_hdr in stdint.h
5ee754fc
MK
4950do
4951ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4952echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4953echo "configure:4954: checking for $ac_hdr" >&5
5ee754fc
MK
4954if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4955 echo $ac_n "(cached) $ac_c" 1>&6
4956else
4957 cat > conftest.$ac_ext <<EOF
02d62932 4958#line 4959 "configure"
5ee754fc
MK
4959#include "confdefs.h"
4960#include <$ac_hdr>
4961EOF
4962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 4963{ (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4964ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4965if test -z "$ac_err"; then
4966 rm -rf conftest*
4967 eval "ac_cv_header_$ac_safe=yes"
4968else
4969 echo "$ac_err" >&5
4970 echo "configure: failed program was:" >&5
4971 cat conftest.$ac_ext >&5
4972 rm -rf conftest*
4973 eval "ac_cv_header_$ac_safe=no"
4974fi
4975rm -f conftest*
4976fi
4977if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4978 echo "$ac_t""yes" 1>&6
4979 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4980 cat >> confdefs.h <<EOF
4981#define $ac_tr_hdr 1
4982EOF
4983
4984else
4985 echo "$ac_t""no" 1>&6
4986fi
4987done
4988
78434e59 4989for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4990do
4991ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 4993echo "configure:4994: checking for $ac_hdr" >&5
5ee754fc
MK
4994if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4995 echo $ac_n "(cached) $ac_c" 1>&6
4996else
4997 cat > conftest.$ac_ext <<EOF
02d62932 4998#line 4999 "configure"
5ee754fc
MK
4999#include "confdefs.h"
5000#include <$ac_hdr>
5001EOF
5002ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5003{ (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5004ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005if test -z "$ac_err"; then
5006 rm -rf conftest*
5007 eval "ac_cv_header_$ac_safe=yes"
5008else
5009 echo "$ac_err" >&5
5010 echo "configure: failed program was:" >&5
5011 cat conftest.$ac_ext >&5
5012 rm -rf conftest*
5013 eval "ac_cv_header_$ac_safe=no"
5014fi
5015rm -f conftest*
5016fi
5017if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018 echo "$ac_t""yes" 1>&6
5019 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020 cat >> confdefs.h <<EOF
5021#define $ac_tr_hdr 1
5022EOF
5023
5024else
5025 echo "$ac_t""no" 1>&6
5026fi
5027done
5028
78434e59 5029for ac_hdr in sys/fault.h
5ee754fc
MK
5030do
5031ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5032echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5033echo "configure:5034: checking for $ac_hdr" >&5
5ee754fc
MK
5034if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5035 echo $ac_n "(cached) $ac_c" 1>&6
5036else
5037 cat > conftest.$ac_ext <<EOF
02d62932 5038#line 5039 "configure"
5ee754fc
MK
5039#include "confdefs.h"
5040#include <$ac_hdr>
5041EOF
5042ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5043{ (eval echo configure:5044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5044ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5045if test -z "$ac_err"; then
5046 rm -rf conftest*
5047 eval "ac_cv_header_$ac_safe=yes"
5048else
5049 echo "$ac_err" >&5
5050 echo "configure: failed program was:" >&5
5051 cat conftest.$ac_ext >&5
5052 rm -rf conftest*
5053 eval "ac_cv_header_$ac_safe=no"
5054fi
5055rm -f conftest*
5056fi
5057if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5058 echo "$ac_t""yes" 1>&6
5059 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5060 cat >> confdefs.h <<EOF
5061#define $ac_tr_hdr 1
5062EOF
5063
5064else
5065 echo "$ac_t""no" 1>&6
5066fi
5067done
5068
78434e59 5069for ac_hdr in sys/file.h
5ee754fc
MK
5070do
5071ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5072echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5073echo "configure:5074: checking for $ac_hdr" >&5
5ee754fc
MK
5074if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5075 echo $ac_n "(cached) $ac_c" 1>&6
5076else
5077 cat > conftest.$ac_ext <<EOF
02d62932 5078#line 5079 "configure"
5ee754fc
MK
5079#include "confdefs.h"
5080#include <$ac_hdr>
5081EOF
5082ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5083{ (eval echo configure:5084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5084ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5085if test -z "$ac_err"; then
5086 rm -rf conftest*
5087 eval "ac_cv_header_$ac_safe=yes"
5088else
5089 echo "$ac_err" >&5
5090 echo "configure: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092 rm -rf conftest*
5093 eval "ac_cv_header_$ac_safe=no"
5094fi
5095rm -f conftest*
5096fi
5097if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5098 echo "$ac_t""yes" 1>&6
5099 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5100 cat >> confdefs.h <<EOF
5101#define $ac_tr_hdr 1
5102EOF
5103
5104else
5105 echo "$ac_t""no" 1>&6
5106fi
5107done
5108
78434e59 5109for ac_hdr in sys/filio.h
5ee754fc
MK
5110do
5111ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5112echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5113echo "configure:5114: checking for $ac_hdr" >&5
5ee754fc
MK
5114if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5115 echo $ac_n "(cached) $ac_c" 1>&6
5116else
5117 cat > conftest.$ac_ext <<EOF
02d62932 5118#line 5119 "configure"
5ee754fc
MK
5119#include "confdefs.h"
5120#include <$ac_hdr>
5121EOF
5122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5123{ (eval echo configure:5124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5125if test -z "$ac_err"; then
5126 rm -rf conftest*
5127 eval "ac_cv_header_$ac_safe=yes"
5128else
5129 echo "$ac_err" >&5
5130 echo "configure: failed program was:" >&5
5131 cat conftest.$ac_ext >&5
5132 rm -rf conftest*
5133 eval "ac_cv_header_$ac_safe=no"
5134fi
5135rm -f conftest*
5136fi
5137if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5138 echo "$ac_t""yes" 1>&6
5139 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5140 cat >> confdefs.h <<EOF
5141#define $ac_tr_hdr 1
5142EOF
5143
5144else
5145 echo "$ac_t""no" 1>&6
5146fi
5147done
5148
78434e59 5149for ac_hdr in sys/ioctl.h
5ee754fc
MK
5150do
5151ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5152echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5153echo "configure:5154: checking for $ac_hdr" >&5
5ee754fc
MK
5154if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5156else
5157 cat > conftest.$ac_ext <<EOF
02d62932 5158#line 5159 "configure"
5ee754fc
MK
5159#include "confdefs.h"
5160#include <$ac_hdr>
5161EOF
5162ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5163{ (eval echo configure:5164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5164ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5165if test -z "$ac_err"; then
5166 rm -rf conftest*
5167 eval "ac_cv_header_$ac_safe=yes"
5168else
5169 echo "$ac_err" >&5
5170 echo "configure: failed program was:" >&5
5171 cat conftest.$ac_ext >&5
5172 rm -rf conftest*
5173 eval "ac_cv_header_$ac_safe=no"
5174fi
5175rm -f conftest*
5176fi
5177if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5178 echo "$ac_t""yes" 1>&6
5179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5180 cat >> confdefs.h <<EOF
5181#define $ac_tr_hdr 1
5182EOF
5183
5184else
5185 echo "$ac_t""no" 1>&6
5186fi
5187done
5188
78434e59 5189for ac_hdr in sys/param.h
5ee754fc
MK
5190do
5191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5193echo "configure:5194: checking for $ac_hdr" >&5
5ee754fc
MK
5194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 cat > conftest.$ac_ext <<EOF
02d62932 5198#line 5199 "configure"
5ee754fc
MK
5199#include "confdefs.h"
5200#include <$ac_hdr>
5201EOF
5202ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5203{ (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5205if test -z "$ac_err"; then
5206 rm -rf conftest*
5207 eval "ac_cv_header_$ac_safe=yes"
5208else
5209 echo "$ac_err" >&5
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5213 eval "ac_cv_header_$ac_safe=no"
5214fi
5215rm -f conftest*
5216fi
5217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5218 echo "$ac_t""yes" 1>&6
5219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5220 cat >> confdefs.h <<EOF
5221#define $ac_tr_hdr 1
5222EOF
5223
5224else
5225 echo "$ac_t""no" 1>&6
5226fi
5227done
5228
78434e59 5229for ac_hdr in sys/proc.h
5ee754fc
MK
5230do
5231ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5232echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5233echo "configure:5234: checking for $ac_hdr" >&5
5ee754fc
MK
5234if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5235 echo $ac_n "(cached) $ac_c" 1>&6
5236else
5237 cat > conftest.$ac_ext <<EOF
02d62932 5238#line 5239 "configure"
5ee754fc
MK
5239#include "confdefs.h"
5240#include <$ac_hdr>
5241EOF
5242ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5243{ (eval echo configure:5244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5244ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5245if test -z "$ac_err"; then
5246 rm -rf conftest*
5247 eval "ac_cv_header_$ac_safe=yes"
5248else
5249 echo "$ac_err" >&5
5250 echo "configure: failed program was:" >&5
5251 cat conftest.$ac_ext >&5
5252 rm -rf conftest*
5253 eval "ac_cv_header_$ac_safe=no"
5254fi
5255rm -f conftest*
5256fi
5257if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5258 echo "$ac_t""yes" 1>&6
5259 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5260 cat >> confdefs.h <<EOF
5261#define $ac_tr_hdr 1
5262EOF
5263
5264else
5265 echo "$ac_t""no" 1>&6
5266fi
5267done
5268
78434e59 5269for ac_hdr in sys/procfs.h
5ee754fc
MK
5270do
5271ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5272echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5273echo "configure:5274: checking for $ac_hdr" >&5
5ee754fc
MK
5274if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5275 echo $ac_n "(cached) $ac_c" 1>&6
5276else
5277 cat > conftest.$ac_ext <<EOF
02d62932 5278#line 5279 "configure"
5ee754fc
MK
5279#include "confdefs.h"
5280#include <$ac_hdr>
5281EOF
5282ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5283{ (eval echo configure:5284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5284ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5285if test -z "$ac_err"; then
5286 rm -rf conftest*
5287 eval "ac_cv_header_$ac_safe=yes"
5288else
5289 echo "$ac_err" >&5
5290 echo "configure: failed program was:" >&5
5291 cat conftest.$ac_ext >&5
5292 rm -rf conftest*
5293 eval "ac_cv_header_$ac_safe=no"
5294fi
5295rm -f conftest*
5296fi
5297if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5298 echo "$ac_t""yes" 1>&6
5299 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5300 cat >> confdefs.h <<EOF
5301#define $ac_tr_hdr 1
5302EOF
5303
5304else
5305 echo "$ac_t""no" 1>&6
5306fi
5307done
5308
78434e59 5309for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5310do
5311ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5312echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5313echo "configure:5314: checking for $ac_hdr" >&5
5ee754fc
MK
5314if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5316else
5317 cat > conftest.$ac_ext <<EOF
02d62932 5318#line 5319 "configure"
5ee754fc
MK
5319#include "confdefs.h"
5320#include <$ac_hdr>
5321EOF
5322ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5323{ (eval echo configure:5324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5324ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5325if test -z "$ac_err"; then
5326 rm -rf conftest*
5327 eval "ac_cv_header_$ac_safe=yes"
5328else
5329 echo "$ac_err" >&5
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5332 rm -rf conftest*
5333 eval "ac_cv_header_$ac_safe=no"
5334fi
5335rm -f conftest*
5336fi
5337if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5338 echo "$ac_t""yes" 1>&6
5339 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5340 cat >> confdefs.h <<EOF
5341#define $ac_tr_hdr 1
5342EOF
5343
5344else
5345 echo "$ac_t""no" 1>&6
5346fi
5347done
5348
78434e59 5349for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5350do
5351ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5352echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5353echo "configure:5354: checking for $ac_hdr" >&5
5ee754fc
MK
5354if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5355 echo $ac_n "(cached) $ac_c" 1>&6
5356else
5357 cat > conftest.$ac_ext <<EOF
02d62932 5358#line 5359 "configure"
5ee754fc
MK
5359#include "confdefs.h"
5360#include <$ac_hdr>
5361EOF
5362ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5363{ (eval echo configure:5364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5364ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5365if test -z "$ac_err"; then
5366 rm -rf conftest*
5367 eval "ac_cv_header_$ac_safe=yes"
5368else
5369 echo "$ac_err" >&5
5370 echo "configure: failed program was:" >&5
5371 cat conftest.$ac_ext >&5
5372 rm -rf conftest*
5373 eval "ac_cv_header_$ac_safe=no"
5374fi
5375rm -f conftest*
5376fi
5377if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5378 echo "$ac_t""yes" 1>&6
5379 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5380 cat >> confdefs.h <<EOF
5381#define $ac_tr_hdr 1
5382EOF
5383
5384else
5385 echo "$ac_t""no" 1>&6
5386fi
5387done
5388
78434e59 5389for ac_hdr in sys/select.h
5ee754fc
MK
5390do
5391ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5392echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5393echo "configure:5394: checking for $ac_hdr" >&5
5ee754fc
MK
5394if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396else
5397 cat > conftest.$ac_ext <<EOF
02d62932 5398#line 5399 "configure"
5ee754fc
MK
5399#include "confdefs.h"
5400#include <$ac_hdr>
5401EOF
5402ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5403{ (eval echo configure:5404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5404ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5405if test -z "$ac_err"; then
5406 rm -rf conftest*
5407 eval "ac_cv_header_$ac_safe=yes"
5408else
5409 echo "$ac_err" >&5
5410 echo "configure: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 rm -rf conftest*
5413 eval "ac_cv_header_$ac_safe=no"
5414fi
5415rm -f conftest*
5416fi
5417if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5418 echo "$ac_t""yes" 1>&6
5419 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5420 cat >> confdefs.h <<EOF
5421#define $ac_tr_hdr 1
5422EOF
5423
5424else
5425 echo "$ac_t""no" 1>&6
5426fi
5427done
5428
78434e59 5429for ac_hdr in sys/syscall.h
5ee754fc
MK
5430do
5431ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5432echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5433echo "configure:5434: checking for $ac_hdr" >&5
5ee754fc
MK
5434if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5435 echo $ac_n "(cached) $ac_c" 1>&6
5436else
5437 cat > conftest.$ac_ext <<EOF
02d62932 5438#line 5439 "configure"
5ee754fc
MK
5439#include "confdefs.h"
5440#include <$ac_hdr>
5441EOF
5442ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5443{ (eval echo configure:5444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5444ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5445if test -z "$ac_err"; then
5446 rm -rf conftest*
5447 eval "ac_cv_header_$ac_safe=yes"
5448else
5449 echo "$ac_err" >&5
5450 echo "configure: failed program was:" >&5
5451 cat conftest.$ac_ext >&5
5452 rm -rf conftest*
5453 eval "ac_cv_header_$ac_safe=no"
5454fi
5455rm -f conftest*
5456fi
5457if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5458 echo "$ac_t""yes" 1>&6
5459 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5460 cat >> confdefs.h <<EOF
5461#define $ac_tr_hdr 1
5462EOF
5463
5464else
5465 echo "$ac_t""no" 1>&6
5466fi
5467done
5468
78434e59 5469for ac_hdr in sys/user.h
5ee754fc
MK
5470do
5471ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5472echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5473echo "configure:5474: checking for $ac_hdr" >&5
5ee754fc
MK
5474if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5475 echo $ac_n "(cached) $ac_c" 1>&6
5476else
5477 cat > conftest.$ac_ext <<EOF
02d62932 5478#line 5479 "configure"
5ee754fc
MK
5479#include "confdefs.h"
5480#include <$ac_hdr>
5481EOF
5482ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5483{ (eval echo configure:5484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5484ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5485if test -z "$ac_err"; then
5486 rm -rf conftest*
5487 eval "ac_cv_header_$ac_safe=yes"
5488else
5489 echo "$ac_err" >&5
9608ab8b
MK
5490 echo "configure: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
5492 rm -rf conftest*
5ee754fc 5493 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5494fi
5495rm -f conftest*
5496fi
5ee754fc 5497if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5498 echo "$ac_t""yes" 1>&6
5499 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5500 cat >> confdefs.h <<EOF
5501#define $ac_tr_hdr 1
5502EOF
5ee754fc 5503
9608ab8b
MK
5504else
5505 echo "$ac_t""no" 1>&6
5506fi
5507done
5ee754fc 5508
78434e59 5509for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5510do
5511ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5512echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5513echo "configure:5514: checking for $ac_hdr" >&5
5ee754fc 5514if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516else
5ee754fc 5517 cat > conftest.$ac_ext <<EOF
02d62932 5518#line 5519 "configure"
9608ab8b 5519#include "confdefs.h"
5ee754fc 5520#include <$ac_hdr>
9608ab8b 5521EOF
5ee754fc 5522ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5523{ (eval echo configure:5524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5524ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5525if test -z "$ac_err"; then
9608ab8b 5526 rm -rf conftest*
5ee754fc 5527 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5528else
5ee754fc 5529 echo "$ac_err" >&5
9608ab8b
MK
5530 echo "configure: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 rm -rf conftest*
5ee754fc 5533 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5534fi
5535rm -f conftest*
9608ab8b 5536fi
5ee754fc 5537if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5538 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5539 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5540 cat >> confdefs.h <<EOF
5541#define $ac_tr_hdr 1
5542EOF
5543
9608ab8b
MK
5544else
5545 echo "$ac_t""no" 1>&6
5546fi
5ee754fc 5547done
9608ab8b 5548
78434e59 5549for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5550do
5551ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5552echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5553echo "configure:5554: checking for $ac_hdr" >&5
5ee754fc 5554if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5555 echo $ac_n "(cached) $ac_c" 1>&6
5556else
5ee754fc 5557 cat > conftest.$ac_ext <<EOF
02d62932 5558#line 5559 "configure"
9608ab8b 5559#include "confdefs.h"
5ee754fc 5560#include <$ac_hdr>
9608ab8b 5561EOF
5ee754fc 5562ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5563{ (eval echo configure:5564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5564ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5565if test -z "$ac_err"; then
9608ab8b 5566 rm -rf conftest*
5ee754fc 5567 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5568else
5ee754fc 5569 echo "$ac_err" >&5
9608ab8b
MK
5570 echo "configure: failed program was:" >&5
5571 cat conftest.$ac_ext >&5
5572 rm -rf conftest*
5ee754fc 5573 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5574fi
5575rm -f conftest*
9608ab8b 5576fi
5ee754fc 5577if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5578 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5579 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5580 cat >> confdefs.h <<EOF
5581#define $ac_tr_hdr 1
5582EOF
5583
9608ab8b
MK
5584else
5585 echo "$ac_t""no" 1>&6
5586fi
5ee754fc 5587done
9608ab8b 5588
78434e59
MK
5589for ac_hdr in unistd.h
5590do
5591ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5592echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5593echo "configure:5594: checking for $ac_hdr" >&5
78434e59
MK
5594if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5595 echo $ac_n "(cached) $ac_c" 1>&6
5596else
5597 cat > conftest.$ac_ext <<EOF
02d62932 5598#line 5599 "configure"
78434e59
MK
5599#include "confdefs.h"
5600#include <$ac_hdr>
5601EOF
5602ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5603{ (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5604ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5605if test -z "$ac_err"; then
5606 rm -rf conftest*
5607 eval "ac_cv_header_$ac_safe=yes"
5608else
5609 echo "$ac_err" >&5
5610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 rm -rf conftest*
5613 eval "ac_cv_header_$ac_safe=no"
5614fi
5615rm -f conftest*
5616fi
5617if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5618 echo "$ac_t""yes" 1>&6
5619 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5620 cat >> confdefs.h <<EOF
5621#define $ac_tr_hdr 1
5622EOF
5623
5624else
5625 echo "$ac_t""no" 1>&6
5626fi
5627done
5628
9608ab8b 5629
5ee754fc
MK
5630# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5631# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5632# think that we don't have <curses.h> if we're using GCC.
5633case $host_os in
5634 solaris2.[78])
5635 if test "$GCC" = yes; then
5636 cat >> confdefs.h <<\EOF
5637#define _MSE_INT_H 1
5638EOF
5639
5640 fi ;;
5641esac
5642for ac_hdr in curses.h ncurses.h term.h
5643do
5644ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5645echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5646echo "configure:5647: checking for $ac_hdr" >&5
5ee754fc 5647if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5648 echo $ac_n "(cached) $ac_c" 1>&6
5649else
5650 cat > conftest.$ac_ext <<EOF
02d62932 5651#line 5652 "configure"
c906108c 5652#include "confdefs.h"
5ee754fc 5653#include <$ac_hdr>
c906108c
SS
5654EOF
5655ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5656{ (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5657ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5658if test -z "$ac_err"; then
5659 rm -rf conftest*
5ee754fc 5660 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5661else
5662 echo "$ac_err" >&5
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -rf conftest*
5ee754fc 5666 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5667fi
5668rm -f conftest*
c906108c 5669fi
5ee754fc
MK
5670if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5671 echo "$ac_t""yes" 1>&6
5672 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5673 cat >> confdefs.h <<EOF
5674#define $ac_tr_hdr 1
c906108c 5675EOF
5ee754fc 5676
c906108c 5677else
5ee754fc 5678 echo "$ac_t""no" 1>&6
c906108c 5679fi
5ee754fc 5680done
c906108c
SS
5681
5682
5ee754fc
MK
5683# FIXME: kettenis/20030102: In most cases we include these
5684# unconditionally, so what's the point in checking these?
5685for ac_hdr in ctype.h time.h
c906108c
SS
5686do
5687ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5688echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 5689echo "configure:5690: checking for $ac_hdr" >&5
c906108c
SS
5690if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5691 echo $ac_n "(cached) $ac_c" 1>&6
5692else
5693 cat > conftest.$ac_ext <<EOF
02d62932 5694#line 5695 "configure"
c906108c
SS
5695#include "confdefs.h"
5696#include <$ac_hdr>
5697EOF
5698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 5699{ (eval echo configure:5700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5700ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5701if test -z "$ac_err"; then
5702 rm -rf conftest*
5703 eval "ac_cv_header_$ac_safe=yes"
5704else
5705 echo "$ac_err" >&5
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 rm -rf conftest*
5709 eval "ac_cv_header_$ac_safe=no"
5710fi
5711rm -f conftest*
5712fi
5713if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5714 echo "$ac_t""yes" 1>&6
5715 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5716 cat >> confdefs.h <<EOF
5717#define $ac_tr_hdr 1
5718EOF
5719
5720else
5721 echo "$ac_t""no" 1>&6
5722fi
5723done
5724
5ee754fc 5725
40a7debc 5726echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
02d62932 5727echo "configure:5728: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5728if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5729 echo $ac_n "(cached) $ac_c" 1>&6
5730else
5731 cat > conftest.$ac_ext <<EOF
02d62932 5732#line 5733 "configure"
40a7debc
EZ
5733#include "confdefs.h"
5734#include <sys/types.h>
5735#include <sys/stat.h>
5736int main() {
5737struct stat st; (void) st.st_blocks;
5738; return 0; }
5739EOF
02d62932 5740if { (eval echo configure:5741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5741 rm -rf conftest*
5742 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5743else
5744 echo "configure: failed program was:" >&5
5745 cat conftest.$ac_ext >&5
5746 rm -rf conftest*
5747 gdb_cv_have_struct_stat_with_st_blocks_member=no
5748fi
5749rm -f conftest*
5750fi
5751
5752echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5753if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5754 cat >> confdefs.h <<\EOF
5755#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5756EOF
5757
5758fi
b9362cc7
AC
5759# ------------------------- #
5760# Checks for declarations. #
5761# ------------------------- #
5762
5763for ac_func in getopt
5764do
5765 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5766echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
02d62932 5767echo "configure:5768: checking whether $ac_func is declared" >&5
b9362cc7
AC
5768if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5769 echo $ac_n "(cached) $ac_c" 1>&6
5770else
5771 cat > conftest.$ac_ext <<EOF
02d62932 5772#line 5773 "configure"
b9362cc7
AC
5773#include "confdefs.h"
5774#undef $ac_tr_decl
5775#define $ac_tr_decl 1
5776
5777
5778int main() {
5779#ifndef $ac_func
5780char *(*pfn) = (char *(*)) $ac_func ;
5781#endif
5782; return 0; }
5783EOF
02d62932 5784if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5785 rm -rf conftest*
5786 eval "gcc_cv_have_decl_$ac_func=yes"
5787else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
5791 eval "gcc_cv_have_decl_$ac_func=no"
5792fi
5793rm -f conftest*
5794fi
5795
5796if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5797 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5798#define $ac_tr_decl 1
5799EOF
5800
5801else
5802 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5803#define $ac_tr_decl 0
5804EOF
5805
5806fi
5807
5808done
5809if test x = y ; then
5810 cat >> confdefs.h <<\EOF
5811#define HAVE_DECL_GETOPT 1
5812EOF
5813fi
5814
5815
5ee754fc
MK
5816# ------------------ #
5817# Checks for types. #
5818# ------------------ #
5819
5820echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
02d62932 5821echo "configure:5822: checking return type of signal handlers" >&5
5ee754fc 5822if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5823 echo $ac_n "(cached) $ac_c" 1>&6
5824else
5825 cat > conftest.$ac_ext <<EOF
02d62932 5826#line 5827 "configure"
c906108c
SS
5827#include "confdefs.h"
5828#include <sys/types.h>
5ee754fc
MK
5829#include <signal.h>
5830#ifdef signal
5831#undef signal
c906108c 5832#endif
5ee754fc
MK
5833#ifdef __cplusplus
5834extern "C" void (*signal (int, void (*)(int)))(int);
5835#else
5836void (*signal ()) ();
c906108c
SS
5837#endif
5838
5ee754fc
MK
5839int main() {
5840int i;
5841; return 0; }
c906108c 5842EOF
02d62932 5843if { (eval echo configure:5844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5844 rm -rf conftest*
5ee754fc 5845 ac_cv_type_signal=void
c906108c 5846else
5ee754fc
MK
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
c906108c 5849 rm -rf conftest*
5ee754fc 5850 ac_cv_type_signal=int
c906108c
SS
5851fi
5852rm -f conftest*
c906108c
SS
5853fi
5854
5ee754fc
MK
5855echo "$ac_t""$ac_cv_type_signal" 1>&6
5856cat >> confdefs.h <<EOF
5857#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5858EOF
5859
c906108c
SS
5860
5861
5ee754fc
MK
5862# ------------------------------------- #
5863# Checks for compiler characteristics. #
5864# ------------------------------------- #
5865
c906108c 5866echo $ac_n "checking for working const""... $ac_c" 1>&6
02d62932 5867echo "configure:5868: checking for working const" >&5
c906108c
SS
5868if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5869 echo $ac_n "(cached) $ac_c" 1>&6
5870else
5871 cat > conftest.$ac_ext <<EOF
02d62932 5872#line 5873 "configure"
c906108c
SS
5873#include "confdefs.h"
5874
5875int main() {
5876
5877/* Ultrix mips cc rejects this. */
5878typedef int charset[2]; const charset x;
5879/* SunOS 4.1.1 cc rejects this. */
5880char const *const *ccp;
5881char **p;
5882/* NEC SVR4.0.2 mips cc rejects this. */
5883struct point {int x, y;};
5884static struct point const zero = {0,0};
5885/* AIX XL C 1.02.0.0 rejects this.
5886 It does not let you subtract one const X* pointer from another in an arm
5887 of an if-expression whose if-part is not a constant expression */
5888const char *g = "string";
5889ccp = &g + (g ? g-g : 0);
5890/* HPUX 7.0 cc rejects these. */
5891++ccp;
5892p = (char**) ccp;
5893ccp = (char const *const *) p;
5894{ /* SCO 3.2v4 cc rejects this. */
5895 char *t;
5896 char const *s = 0 ? (char *) 0 : (char const *) 0;
5897
5898 *t++ = 0;
5899}
5900{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5901 int x[] = {25, 17};
5902 const int *foo = &x[0];
5903 ++foo;
5904}
5905{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5906 typedef const int *iptr;
5907 iptr p = 0;
5908 ++p;
5909}
5910{ /* AIX XL C 1.02.0.0 rejects this saying
5911 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5912 struct s { int j; const int *ap[3]; };
5913 struct s *b; b->j = 5;
5914}
5915{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5916 const int foo = 10;
5917}
5918
5919; return 0; }
5920EOF
02d62932 5921if { (eval echo configure:5922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5922 rm -rf conftest*
5923 ac_cv_c_const=yes
5924else
5925 echo "configure: failed program was:" >&5
5926 cat conftest.$ac_ext >&5
5927 rm -rf conftest*
5928 ac_cv_c_const=no
5929fi
5930rm -f conftest*
5931fi
5932
5933echo "$ac_t""$ac_cv_c_const" 1>&6
5934if test $ac_cv_c_const = no; then
5935 cat >> confdefs.h <<\EOF
5936#define const
5937EOF
5938
5939fi
5940
bce58c09 5941echo $ac_n "checking for inline""... $ac_c" 1>&6
02d62932 5942echo "configure:5943: checking for inline" >&5
bce58c09
JB
5943if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5944 echo $ac_n "(cached) $ac_c" 1>&6
5945else
5946 ac_cv_c_inline=no
5947for ac_kw in inline __inline__ __inline; do
5948 cat > conftest.$ac_ext <<EOF
02d62932 5949#line 5950 "configure"
bce58c09
JB
5950#include "confdefs.h"
5951
5952int main() {
5953} $ac_kw foo() {
5954; return 0; }
5955EOF
02d62932 5956if { (eval echo configure:5957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5957 rm -rf conftest*
5958 ac_cv_c_inline=$ac_kw; break
5959else
5960 echo "configure: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5962fi
5963rm -f conftest*
5964done
5965
5966fi
5967
5968echo "$ac_t""$ac_cv_c_inline" 1>&6
5969case "$ac_cv_c_inline" in
5970 inline | yes) ;;
5971 no) cat >> confdefs.h <<\EOF
5972#define inline
5973EOF
5974 ;;
5975 *) cat >> confdefs.h <<EOF
5976#define inline $ac_cv_c_inline
5977EOF
5978 ;;
5979esac
5980
c906108c 5981
5ee754fc
MK
5982# ------------------------------ #
5983# Checks for library functions. #
5984# ------------------------------ #
5985
46711df8
MK
5986# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5987# for constant arguments. Useless!
5988echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
02d62932 5989echo "configure:5990: checking for working alloca.h" >&5
46711df8
MK
5990if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992else
5993 cat > conftest.$ac_ext <<EOF
02d62932 5994#line 5995 "configure"
46711df8
MK
5995#include "confdefs.h"
5996#include <alloca.h>
5997int main() {
5998char *p = alloca(2 * sizeof(int));
5999; return 0; }
6000EOF
02d62932 6001if { (eval echo configure:6002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6002 rm -rf conftest*
6003 ac_cv_header_alloca_h=yes
6004else
6005 echo "configure: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
6007 rm -rf conftest*
6008 ac_cv_header_alloca_h=no
6009fi
6010rm -f conftest*
6011fi
6012
6013echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
6014if test $ac_cv_header_alloca_h = yes; then
6015 cat >> confdefs.h <<\EOF
6016#define HAVE_ALLOCA_H 1
6017EOF
6018
6019fi
6020
6021echo $ac_n "checking for alloca""... $ac_c" 1>&6
02d62932 6022echo "configure:6023: checking for alloca" >&5
46711df8
MK
6023if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6024 echo $ac_n "(cached) $ac_c" 1>&6
6025else
6026 cat > conftest.$ac_ext <<EOF
02d62932 6027#line 6028 "configure"
46711df8
MK
6028#include "confdefs.h"
6029
6030#ifdef __GNUC__
6031# define alloca __builtin_alloca
6032#else
6033# ifdef _MSC_VER
6034# include <malloc.h>
6035# define alloca _alloca
6036# else
6037# if HAVE_ALLOCA_H
6038# include <alloca.h>
6039# else
6040# ifdef _AIX
6041 #pragma alloca
6042# else
6043# ifndef alloca /* predefined by HP cc +Olibcalls */
6044char *alloca ();
6045# endif
6046# endif
6047# endif
6048# endif
6049#endif
6050
6051int main() {
6052char *p = (char *) alloca(1);
6053; return 0; }
6054EOF
02d62932 6055if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6056 rm -rf conftest*
6057 ac_cv_func_alloca_works=yes
6058else
6059 echo "configure: failed program was:" >&5
6060 cat conftest.$ac_ext >&5
6061 rm -rf conftest*
6062 ac_cv_func_alloca_works=no
6063fi
6064rm -f conftest*
6065fi
6066
6067echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6068if test $ac_cv_func_alloca_works = yes; then
6069 cat >> confdefs.h <<\EOF
6070#define HAVE_ALLOCA 1
6071EOF
6072
6073fi
6074
6075if test $ac_cv_func_alloca_works = no; then
6076 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6077 # that cause trouble. Some versions do not even contain alloca or
6078 # contain a buggy version. If you still want to use their alloca,
6079 # use ar to extract alloca.o from them instead of compiling alloca.c.
6080 ALLOCA=alloca.${ac_objext}
6081 cat >> confdefs.h <<\EOF
6082#define C_ALLOCA 1
6083EOF
6084
6085
6086echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
02d62932 6087echo "configure:6088: checking whether alloca needs Cray hooks" >&5
46711df8
MK
6088if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6089 echo $ac_n "(cached) $ac_c" 1>&6
6090else
6091 cat > conftest.$ac_ext <<EOF
02d62932 6092#line 6093 "configure"
46711df8
MK
6093#include "confdefs.h"
6094#if defined(CRAY) && ! defined(CRAY2)
6095webecray
6096#else
6097wenotbecray
6098#endif
6099
6100EOF
6101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6102 egrep "webecray" >/dev/null 2>&1; then
6103 rm -rf conftest*
6104 ac_cv_os_cray=yes
6105else
6106 rm -rf conftest*
6107 ac_cv_os_cray=no
6108fi
6109rm -f conftest*
6110
6111fi
6112
6113echo "$ac_t""$ac_cv_os_cray" 1>&6
6114if test $ac_cv_os_cray = yes; then
6115for ac_func in _getb67 GETB67 getb67; do
6116 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6117echo "configure:6118: checking for $ac_func" >&5
46711df8
MK
6118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6119 echo $ac_n "(cached) $ac_c" 1>&6
6120else
6121 cat > conftest.$ac_ext <<EOF
02d62932 6122#line 6123 "configure"
46711df8
MK
6123#include "confdefs.h"
6124/* System header to define __stub macros and hopefully few prototypes,
6125 which can conflict with char $ac_func(); below. */
6126#include <assert.h>
6127/* Override any gcc2 internal prototype to avoid an error. */
6128/* We use char because int might match the return type of a gcc2
6129 builtin and then its argument prototype would still apply. */
6130char $ac_func();
6131
6132int main() {
6133
6134/* The GNU C library defines this for functions which it implements
6135 to always fail with ENOSYS. Some functions are actually named
6136 something starting with __ and the normal name is an alias. */
6137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6138choke me
6139#else
6140$ac_func();
6141#endif
6142
6143; return 0; }
6144EOF
02d62932 6145if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6146 rm -rf conftest*
6147 eval "ac_cv_func_$ac_func=yes"
6148else
6149 echo "configure: failed program was:" >&5
6150 cat conftest.$ac_ext >&5
6151 rm -rf conftest*
6152 eval "ac_cv_func_$ac_func=no"
6153fi
6154rm -f conftest*
6155fi
6156
6157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6158 echo "$ac_t""yes" 1>&6
6159 cat >> confdefs.h <<EOF
6160#define CRAY_STACKSEG_END $ac_func
6161EOF
6162
6163 break
6164else
6165 echo "$ac_t""no" 1>&6
6166fi
6167
6168done
6169fi
6170
6171echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
02d62932 6172echo "configure:6173: checking stack direction for C alloca" >&5
46711df8
MK
6173if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6174 echo $ac_n "(cached) $ac_c" 1>&6
6175else
6176 if test "$cross_compiling" = yes; then
6177 ac_cv_c_stack_direction=0
6178else
6179 cat > conftest.$ac_ext <<EOF
02d62932 6180#line 6181 "configure"
46711df8
MK
6181#include "confdefs.h"
6182find_stack_direction ()
6183{
6184 static char *addr = 0;
6185 auto char dummy;
6186 if (addr == 0)
6187 {
6188 addr = &dummy;
6189 return find_stack_direction ();
6190 }
6191 else
6192 return (&dummy > addr) ? 1 : -1;
6193}
6194main ()
6195{
6196 exit (find_stack_direction() < 0);
6197}
6198EOF
02d62932 6199if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6200then
6201 ac_cv_c_stack_direction=1
6202else
6203 echo "configure: failed program was:" >&5
6204 cat conftest.$ac_ext >&5
6205 rm -fr conftest*
6206 ac_cv_c_stack_direction=-1
6207fi
6208rm -fr conftest*
6209fi
6210
6211fi
6212
6213echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6214cat >> confdefs.h <<EOF
6215#define STACK_DIRECTION $ac_cv_c_stack_direction
6216EOF
6217
6218fi
6219
d836ee13 6220for ac_hdr in unistd.h
97bf5e38
MK
6221do
6222ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6223echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
02d62932 6224echo "configure:6225: checking for $ac_hdr" >&5
74c1b268
AC
6225if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6226 echo $ac_n "(cached) $ac_c" 1>&6
6227else
6228 cat > conftest.$ac_ext <<EOF
02d62932 6229#line 6230 "configure"
74c1b268 6230#include "confdefs.h"
97bf5e38 6231#include <$ac_hdr>
74c1b268
AC
6232EOF
6233ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 6234{ (eval echo configure:6235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6235ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6236if test -z "$ac_err"; then
6237 rm -rf conftest*
6238 eval "ac_cv_header_$ac_safe=yes"
6239else
6240 echo "$ac_err" >&5
6241 echo "configure: failed program was:" >&5
6242 cat conftest.$ac_ext >&5
6243 rm -rf conftest*
6244 eval "ac_cv_header_$ac_safe=no"
6245fi
6246rm -f conftest*
6247fi
6248if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6249 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6250 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6251 cat >> confdefs.h <<EOF
6252#define $ac_tr_hdr 1
74c1b268 6253EOF
97bf5e38 6254
74c1b268
AC
6255else
6256 echo "$ac_t""no" 1>&6
6257fi
97bf5e38 6258done
74c1b268 6259
97bf5e38
MK
6260for ac_func in getpagesize
6261do
6262echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6263echo "configure:6264: checking for $ac_func" >&5
97bf5e38 6264if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6265 echo $ac_n "(cached) $ac_c" 1>&6
6266else
6267 cat > conftest.$ac_ext <<EOF
02d62932 6268#line 6269 "configure"
74c1b268
AC
6269#include "confdefs.h"
6270/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6271 which can conflict with char $ac_func(); below. */
74c1b268
AC
6272#include <assert.h>
6273/* Override any gcc2 internal prototype to avoid an error. */
6274/* We use char because int might match the return type of a gcc2
6275 builtin and then its argument prototype would still apply. */
97bf5e38 6276char $ac_func();
74c1b268
AC
6277
6278int main() {
6279
6280/* The GNU C library defines this for functions which it implements
6281 to always fail with ENOSYS. Some functions are actually named
6282 something starting with __ and the normal name is an alias. */
97bf5e38 6283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6284choke me
6285#else
97bf5e38 6286$ac_func();
74c1b268
AC
6287#endif
6288
6289; return 0; }
6290EOF
02d62932 6291if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6292 rm -rf conftest*
97bf5e38 6293 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6294else
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6297 rm -rf conftest*
97bf5e38 6298 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6299fi
6300rm -f conftest*
6301fi
6302
97bf5e38 6303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6304 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6306 cat >> confdefs.h <<EOF
6307#define $ac_tr_func 1
6308EOF
6309
74c1b268
AC
6310else
6311 echo "$ac_t""no" 1>&6
6312fi
97bf5e38 6313done
74c1b268 6314
97bf5e38 6315echo $ac_n "checking for working mmap""... $ac_c" 1>&6
02d62932 6316echo "configure:6317: checking for working mmap" >&5
97bf5e38
MK
6317if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6318 echo $ac_n "(cached) $ac_c" 1>&6
6319else
6320 if test "$cross_compiling" = yes; then
6321 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6322else
6323 cat > conftest.$ac_ext <<EOF
02d62932 6324#line 6325 "configure"
74c1b268 6325#include "confdefs.h"
97bf5e38
MK
6326
6327/* Thanks to Mike Haertel and Jim Avera for this test.
6328 Here is a matrix of mmap possibilities:
6329 mmap private not fixed
6330 mmap private fixed at somewhere currently unmapped
6331 mmap private fixed at somewhere already mapped
6332 mmap shared not fixed
6333 mmap shared fixed at somewhere currently unmapped
6334 mmap shared fixed at somewhere already mapped
6335 For private mappings, we should verify that changes cannot be read()
6336 back from the file, nor mmap's back from the file at a different
6337 address. (There have been systems where private was not correctly
6338 implemented like the infamous i386 svr4.0, and systems where the
6339 VM page cache was not coherent with the filesystem buffer cache
6340 like early versions of FreeBSD and possibly contemporary NetBSD.)
6341 For shared mappings, we should conversely verify that changes get
6342 propogated back to all the places they're supposed to be.
6343
6344 Grep wants private fixed already mapped.
6345 The main things grep needs to know about mmap are:
6346 * does it exist and is it safe to write into the mmap'd area
6347 * how to use it (BSD variants) */
74c1b268 6348#include <sys/types.h>
97bf5e38
MK
6349#include <fcntl.h>
6350#include <sys/mman.h>
6351
6352/* This mess was copied from the GNU getpagesize.h. */
6353#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6354# ifdef HAVE_UNISTD_H
6355# include <unistd.h>
6356# endif
97bf5e38
MK
6357
6358/* Assume that all systems that can run configure have sys/param.h. */
6359# ifndef HAVE_SYS_PARAM_H
6360# define HAVE_SYS_PARAM_H 1
6361# endif
6362
6363# ifdef _SC_PAGESIZE
6364# define getpagesize() sysconf(_SC_PAGESIZE)
6365# else /* no _SC_PAGESIZE */
6366# ifdef HAVE_SYS_PARAM_H
6367# include <sys/param.h>
6368# ifdef EXEC_PAGESIZE
6369# define getpagesize() EXEC_PAGESIZE
6370# else /* no EXEC_PAGESIZE */
6371# ifdef NBPG
6372# define getpagesize() NBPG * CLSIZE
6373# ifndef CLSIZE
6374# define CLSIZE 1
6375# endif /* no CLSIZE */
6376# else /* no NBPG */
6377# ifdef NBPC
6378# define getpagesize() NBPC
6379# else /* no NBPC */
6380# ifdef PAGESIZE
6381# define getpagesize() PAGESIZE
6382# endif /* PAGESIZE */
6383# endif /* no NBPC */
6384# endif /* no NBPG */
6385# endif /* no EXEC_PAGESIZE */
6386# else /* no HAVE_SYS_PARAM_H */
6387# define getpagesize() 8192 /* punt totally */
6388# endif /* no HAVE_SYS_PARAM_H */
6389# endif /* no _SC_PAGESIZE */
6390
6391#endif /* no HAVE_GETPAGESIZE */
6392
74c1b268 6393#ifdef __cplusplus
97bf5e38 6394extern "C" { void *malloc(unsigned); }
74c1b268 6395#else
97bf5e38 6396char *malloc();
74c1b268 6397#endif
74c1b268 6398
97bf5e38
MK
6399int
6400main()
6401{
6402 char *data, *data2, *data3;
6403 int i, pagesize;
6404 int fd;
74c1b268 6405
97bf5e38 6406 pagesize = getpagesize();
74c1b268 6407
97bf5e38
MK
6408 /*
6409 * First, make a file with some known garbage in it.
6410 */
6411 data = malloc(pagesize);
6412 if (!data)
6413 exit(1);
6414 for (i = 0; i < pagesize; ++i)
6415 *(data + i) = rand();
6416 umask(0);
6417 fd = creat("conftestmmap", 0600);
6418 if (fd < 0)
6419 exit(1);
6420 if (write(fd, data, pagesize) != pagesize)
6421 exit(1);
6422 close(fd);
74c1b268 6423
97bf5e38
MK
6424 /*
6425 * Next, try to mmap the file at a fixed address which
6426 * already has something else allocated at it. If we can,
6427 * also make sure that we see the same garbage.
6428 */
6429 fd = open("conftestmmap", O_RDWR);
6430 if (fd < 0)
6431 exit(1);
6432 data2 = malloc(2 * pagesize);
6433 if (!data2)
6434 exit(1);
6435 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6436 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6437 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6438 exit(1);
6439 for (i = 0; i < pagesize; ++i)
6440 if (*(data + i) != *(data2 + i))
6441 exit(1);
74c1b268 6442
97bf5e38
MK
6443 /*
6444 * Finally, make sure that changes to the mapped area
6445 * do not percolate back to the file as seen by read().
6446 * (This is a bug on some variants of i386 svr4.0.)
6447 */
6448 for (i = 0; i < pagesize; ++i)
6449 *(data2 + i) = *(data2 + i) + 1;
6450 data3 = malloc(pagesize);
6451 if (!data3)
6452 exit(1);
6453 if (read(fd, data3, pagesize) != pagesize)
6454 exit(1);
6455 for (i = 0; i < pagesize; ++i)
6456 if (*(data + i) != *(data3 + i))
6457 exit(1);
6458 close(fd);
6459 unlink("conftestmmap");
6460 exit(0);
74c1b268 6461}
97bf5e38 6462
74c1b268 6463EOF
02d62932 6464if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6465then
97bf5e38 6466 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6467else
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
6470 rm -fr conftest*
97bf5e38 6471 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6472fi
6473rm -fr conftest*
6474fi
6475
6476fi
6477
97bf5e38
MK
6478echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6479if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6480 cat >> confdefs.h <<\EOF
97bf5e38 6481#define HAVE_MMAP 1
74c1b268
AC
6482EOF
6483
6484fi
6485
97bf5e38 6486echo $ac_n "checking for pid_t""... $ac_c" 1>&6
02d62932 6487echo "configure:6488: checking for pid_t" >&5
97bf5e38 6488if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6489 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6490else
6491 cat > conftest.$ac_ext <<EOF
02d62932 6492#line 6493 "configure"
0200359f 6493#include "confdefs.h"
97bf5e38
MK
6494#include <sys/types.h>
6495#if STDC_HEADERS
6496#include <stdlib.h>
6497#include <stddef.h>
0200359f 6498#endif
0200359f 6499EOF
97bf5e38
MK
6500if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6501 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6502 rm -rf conftest*
6503 ac_cv_type_pid_t=yes
0200359f 6504else
97bf5e38
MK
6505 rm -rf conftest*
6506 ac_cv_type_pid_t=no
0200359f 6507fi
97bf5e38 6508rm -f conftest*
0200359f
MK
6509
6510fi
97bf5e38
MK
6511echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6512if test $ac_cv_type_pid_t = no; then
0200359f 6513 cat >> confdefs.h <<\EOF
97bf5e38 6514#define pid_t int
0200359f
MK
6515EOF
6516
6517fi
6518
97bf5e38
MK
6519ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6520echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
02d62932 6521echo "configure:6522: checking for vfork.h" >&5
97bf5e38 6522if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6523 echo $ac_n "(cached) $ac_c" 1>&6
6524else
6525 cat > conftest.$ac_ext <<EOF
02d62932 6526#line 6527 "configure"
72473524 6527#include "confdefs.h"
97bf5e38 6528#include <vfork.h>
72473524 6529EOF
97bf5e38 6530ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
02d62932 6531{ (eval echo configure:6532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6532ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6533if test -z "$ac_err"; then
72473524 6534 rm -rf conftest*
97bf5e38 6535 eval "ac_cv_header_$ac_safe=yes"
72473524 6536else
97bf5e38 6537 echo "$ac_err" >&5
72473524
DJ
6538 echo "configure: failed program was:" >&5
6539 cat conftest.$ac_ext >&5
6540 rm -rf conftest*
97bf5e38 6541 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6542fi
6543rm -f conftest*
6544fi
97bf5e38
MK
6545if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6546 echo "$ac_t""yes" 1>&6
72473524 6547 cat >> confdefs.h <<\EOF
97bf5e38 6548#define HAVE_VFORK_H 1
72473524
DJ
6549EOF
6550
97bf5e38
MK
6551else
6552 echo "$ac_t""no" 1>&6
72473524 6553fi
c906108c 6554
97bf5e38 6555echo $ac_n "checking for working vfork""... $ac_c" 1>&6
02d62932 6556echo "configure:6557: checking for working vfork" >&5
97bf5e38
MK
6557if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6558 echo $ac_n "(cached) $ac_c" 1>&6
6559else
6560 if test "$cross_compiling" = yes; then
6561 echo $ac_n "checking for vfork""... $ac_c" 1>&6
02d62932 6562echo "configure:6563: checking for vfork" >&5
97bf5e38 6563if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6564 echo $ac_n "(cached) $ac_c" 1>&6
6565else
6566 cat > conftest.$ac_ext <<EOF
02d62932 6567#line 6568 "configure"
2b2d558c 6568#include "confdefs.h"
97bf5e38
MK
6569/* System header to define __stub macros and hopefully few prototypes,
6570 which can conflict with char vfork(); below. */
6571#include <assert.h>
6572/* Override any gcc2 internal prototype to avoid an error. */
6573/* We use char because int might match the return type of a gcc2
6574 builtin and then its argument prototype would still apply. */
6575char vfork();
2b2d558c
MK
6576
6577int main() {
97bf5e38
MK
6578
6579/* The GNU C library defines this for functions which it implements
6580 to always fail with ENOSYS. Some functions are actually named
6581 something starting with __ and the normal name is an alias. */
6582#if defined (__stub_vfork) || defined (__stub___vfork)
6583choke me
6584#else
6585vfork();
6586#endif
6587
2b2d558c
MK
6588; return 0; }
6589EOF
02d62932 6590if { (eval echo configure:6591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6591 rm -rf conftest*
97bf5e38 6592 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6593else
6594 echo "configure: failed program was:" >&5
6595 cat conftest.$ac_ext >&5
6596 rm -rf conftest*
97bf5e38 6597 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6598fi
6599rm -f conftest*
6600fi
6601
97bf5e38
MK
6602if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6603 echo "$ac_t""yes" 1>&6
6604 :
6605else
6606 echo "$ac_t""no" 1>&6
2b2d558c
MK
6607fi
6608
97bf5e38 6609ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6610else
6611 cat > conftest.$ac_ext <<EOF
02d62932 6612#line 6613 "configure"
7dfa765c 6613#include "confdefs.h"
97bf5e38
MK
6614/* Thanks to Paul Eggert for this test. */
6615#include <stdio.h>
6616#include <sys/types.h>
6617#include <sys/stat.h>
6618#ifdef HAVE_UNISTD_H
6619#include <unistd.h>
6620#endif
6621#ifdef HAVE_VFORK_H
6622#include <vfork.h>
6623#endif
6624/* On some sparc systems, changes by the child to local and incoming
6625 argument registers are propagated back to the parent.
6626 The compiler is told about this with #include <vfork.h>,
6627 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6628 Test for this by using a static variable whose address
6629 is put into a register that is clobbered by the vfork. */
6630static
6631#ifdef __cplusplus
6632sparc_address_test (int arg)
6633#else
6634sparc_address_test (arg) int arg;
6635#endif
6636{
6637 static pid_t child;
6638 if (!child) {
6639 child = vfork ();
6640 if (child < 0) {
6641 perror ("vfork");
6642 _exit(2);
6643 }
6644 if (!child) {
6645 arg = getpid();
6646 write(-1, "", 0);
6647 _exit (arg);
6648 }
6649 }
6650}
6651main() {
6652 pid_t parent = getpid ();
6653 pid_t child;
7dfa765c 6654
97bf5e38 6655 sparc_address_test ();
7dfa765c 6656
97bf5e38 6657 child = vfork ();
7dfa765c 6658
97bf5e38
MK
6659 if (child == 0) {
6660 /* Here is another test for sparc vfork register problems.
6661 This test uses lots of local variables, at least
6662 as many local variables as main has allocated so far
6663 including compiler temporaries. 4 locals are enough for
6664 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6665 A buggy compiler should reuse the register of parent
6666 for one of the local variables, since it will think that
6667 parent can't possibly be used any more in this routine.
6668 Assigning to the local variable will thus munge parent
6669 in the parent process. */
6670 pid_t
6671 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6672 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6673 /* Convince the compiler that p..p7 are live; otherwise, it might
6674 use the same hardware register for all 8 local variables. */
6675 if (p != p1 || p != p2 || p != p3 || p != p4
6676 || p != p5 || p != p6 || p != p7)
6677 _exit(1);
7dfa765c 6678
97bf5e38
MK
6679 /* On some systems (e.g. IRIX 3.3),
6680 vfork doesn't separate parent from child file descriptors.
6681 If the child closes a descriptor before it execs or exits,
6682 this munges the parent's descriptor as well.
6683 Test for this by closing stdout in the child. */
6684 _exit(close(fileno(stdout)) != 0);
6685 } else {
6686 int status;
6687 struct stat st;
64bb1671 6688
97bf5e38
MK
6689 while (wait(&status) != child)
6690 ;
6691 exit(
6692 /* Was there some problem with vforking? */
6693 child < 0
64bb1671 6694
97bf5e38
MK
6695 /* Did the child fail? (This shouldn't happen.) */
6696 || status
64bb1671 6697
97bf5e38
MK
6698 /* Did the vfork/compiler bug occur? */
6699 || parent != getpid()
6700
6701 /* Did the file descriptor bug occur? */
6702 || fstat(fileno(stdout), &st) != 0
6703 );
6704 }
6705}
5c44784c 6706EOF
02d62932 6707if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6708then
6709 ac_cv_func_vfork_works=yes
5c44784c
JM
6710else
6711 echo "configure: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
97bf5e38
MK
6713 rm -fr conftest*
6714 ac_cv_func_vfork_works=no
5c44784c 6715fi
97bf5e38 6716rm -fr conftest*
5c44784c
JM
6717fi
6718
0afdd437
MK
6719fi
6720
97bf5e38
MK
6721echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6722if test $ac_cv_func_vfork_works = no; then
0afdd437 6723 cat >> confdefs.h <<\EOF
97bf5e38 6724#define vfork fork
0afdd437
MK
6725EOF
6726
6727fi
6728
97bf5e38
MK
6729for ac_func in canonicalize_file_name realpath
6730do
6731echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6732echo "configure:6733: checking for $ac_func" >&5
97bf5e38 6733if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6734 echo $ac_n "(cached) $ac_c" 1>&6
6735else
6736 cat > conftest.$ac_ext <<EOF
02d62932 6737#line 6738 "configure"
7e89e357 6738#include "confdefs.h"
97bf5e38
MK
6739/* System header to define __stub macros and hopefully few prototypes,
6740 which can conflict with char $ac_func(); below. */
6741#include <assert.h>
6742/* Override any gcc2 internal prototype to avoid an error. */
6743/* We use char because int might match the return type of a gcc2
6744 builtin and then its argument prototype would still apply. */
6745char $ac_func();
6746
7e89e357 6747int main() {
97bf5e38
MK
6748
6749/* The GNU C library defines this for functions which it implements
6750 to always fail with ENOSYS. Some functions are actually named
6751 something starting with __ and the normal name is an alias. */
6752#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6753choke me
6754#else
6755$ac_func();
6756#endif
6757
7e89e357
JT
6758; return 0; }
6759EOF
02d62932 6760if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6761 rm -rf conftest*
97bf5e38 6762 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6763else
6764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6766 rm -rf conftest*
97bf5e38 6767 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6768fi
6769rm -f conftest*
6770fi
6771
97bf5e38
MK
6772if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6773 echo "$ac_t""yes" 1>&6
6774 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6775 cat >> confdefs.h <<EOF
6776#define $ac_tr_func 1
7e89e357 6777EOF
97bf5e38
MK
6778
6779else
6780 echo "$ac_t""no" 1>&6
7e89e357 6781fi
97bf5e38 6782done
7e89e357 6783
97bf5e38 6784for ac_func in poll
7be570e7
JM
6785do
6786echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6787echo "configure:6788: checking for $ac_func" >&5
7be570e7
JM
6788if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6789 echo $ac_n "(cached) $ac_c" 1>&6
6790else
6791 cat > conftest.$ac_ext <<EOF
02d62932 6792#line 6793 "configure"
7be570e7
JM
6793#include "confdefs.h"
6794/* System header to define __stub macros and hopefully few prototypes,
6795 which can conflict with char $ac_func(); below. */
6796#include <assert.h>
6797/* Override any gcc2 internal prototype to avoid an error. */
6798/* We use char because int might match the return type of a gcc2
6799 builtin and then its argument prototype would still apply. */
6800char $ac_func();
6801
6802int main() {
6803
6804/* The GNU C library defines this for functions which it implements
6805 to always fail with ENOSYS. Some functions are actually named
6806 something starting with __ and the normal name is an alias. */
6807#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6808choke me
6809#else
6810$ac_func();
6811#endif
6812
6813; return 0; }
6814EOF
02d62932 6815if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6816 rm -rf conftest*
6817 eval "ac_cv_func_$ac_func=yes"
6818else
6819 echo "configure: failed program was:" >&5
6820 cat conftest.$ac_ext >&5
6821 rm -rf conftest*
6822 eval "ac_cv_func_$ac_func=no"
6823fi
6824rm -f conftest*
6825fi
6826
6827if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6828 echo "$ac_t""yes" 1>&6
6829 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6830 cat >> confdefs.h <<EOF
6831#define $ac_tr_func 1
6832EOF
6833
6834else
6835 echo "$ac_t""no" 1>&6
6836fi
6837done
6838
6839for ac_func in pread64
6840do
6841echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6842echo "configure:6843: checking for $ac_func" >&5
14abd0fb
MK
6843if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6844 echo $ac_n "(cached) $ac_c" 1>&6
6845else
6846 cat > conftest.$ac_ext <<EOF
02d62932 6847#line 6848 "configure"
14abd0fb
MK
6848#include "confdefs.h"
6849/* System header to define __stub macros and hopefully few prototypes,
6850 which can conflict with char $ac_func(); below. */
6851#include <assert.h>
6852/* Override any gcc2 internal prototype to avoid an error. */
6853/* We use char because int might match the return type of a gcc2
6854 builtin and then its argument prototype would still apply. */
6855char $ac_func();
6856
6857int main() {
6858
6859/* The GNU C library defines this for functions which it implements
6860 to always fail with ENOSYS. Some functions are actually named
6861 something starting with __ and the normal name is an alias. */
6862#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6863choke me
6864#else
6865$ac_func();
6866#endif
6867
6868; return 0; }
6869EOF
02d62932 6870if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6871 rm -rf conftest*
6872 eval "ac_cv_func_$ac_func=yes"
6873else
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 rm -rf conftest*
6877 eval "ac_cv_func_$ac_func=no"
6878fi
6879rm -f conftest*
6880fi
6881
6882if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6883 echo "$ac_t""yes" 1>&6
6884 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6885 cat >> confdefs.h <<EOF
6886#define $ac_tr_func 1
6887EOF
6888
6889else
6890 echo "$ac_t""no" 1>&6
6891fi
6892done
6893
97bf5e38
MK
6894for ac_func in sbrk
6895do
6896echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6897echo "configure:6898: checking for $ac_func" >&5
97bf5e38 6898if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6899 echo $ac_n "(cached) $ac_c" 1>&6
6900else
6901 cat > conftest.$ac_ext <<EOF
02d62932 6902#line 6903 "configure"
c906108c 6903#include "confdefs.h"
97bf5e38
MK
6904/* System header to define __stub macros and hopefully few prototypes,
6905 which can conflict with char $ac_func(); below. */
6906#include <assert.h>
6907/* Override any gcc2 internal prototype to avoid an error. */
6908/* We use char because int might match the return type of a gcc2
6909 builtin and then its argument prototype would still apply. */
6910char $ac_func();
c906108c 6911
97bf5e38
MK
6912int main() {
6913
6914/* The GNU C library defines this for functions which it implements
6915 to always fail with ENOSYS. Some functions are actually named
6916 something starting with __ and the normal name is an alias. */
6917#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6918choke me
c906108c 6919#else
97bf5e38 6920$ac_func();
c906108c 6921#endif
97bf5e38 6922
c906108c
SS
6923; return 0; }
6924EOF
02d62932 6925if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6926 rm -rf conftest*
97bf5e38 6927 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6928else
6929 echo "configure: failed program was:" >&5
6930 cat conftest.$ac_ext >&5
6931 rm -rf conftest*
97bf5e38 6932 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6933fi
6934rm -f conftest*
6935fi
6936
97bf5e38
MK
6937if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6938 echo "$ac_t""yes" 1>&6
6939 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6940 cat >> confdefs.h <<EOF
6941#define $ac_tr_func 1
c906108c 6942EOF
97bf5e38
MK
6943
6944else
6945 echo "$ac_t""no" 1>&6
c906108c 6946fi
97bf5e38 6947done
c906108c 6948
97bf5e38
MK
6949for ac_func in setpgid setpgrp
6950do
6951echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 6952echo "configure:6953: checking for $ac_func" >&5
97bf5e38 6953if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6954 echo $ac_n "(cached) $ac_c" 1>&6
6955else
6956 cat > conftest.$ac_ext <<EOF
02d62932 6957#line 6958 "configure"
c906108c 6958#include "confdefs.h"
97bf5e38
MK
6959/* System header to define __stub macros and hopefully few prototypes,
6960 which can conflict with char $ac_func(); below. */
6961#include <assert.h>
6962/* Override any gcc2 internal prototype to avoid an error. */
6963/* We use char because int might match the return type of a gcc2
6964 builtin and then its argument prototype would still apply. */
6965char $ac_func();
c906108c 6966
97bf5e38
MK
6967int main() {
6968
6969/* The GNU C library defines this for functions which it implements
6970 to always fail with ENOSYS. Some functions are actually named
6971 something starting with __ and the normal name is an alias. */
6972#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6973choke me
c906108c 6974#else
97bf5e38 6975$ac_func();
c906108c 6976#endif
97bf5e38 6977
c906108c
SS
6978; return 0; }
6979EOF
02d62932 6980if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6981 rm -rf conftest*
97bf5e38 6982 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6983else
6984 echo "configure: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6986 rm -rf conftest*
97bf5e38 6987 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6988fi
6989rm -f conftest*
6990fi
6991
97bf5e38
MK
6992if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993 echo "$ac_t""yes" 1>&6
6994 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995 cat >> confdefs.h <<EOF
6996#define $ac_tr_func 1
c906108c 6997EOF
97bf5e38
MK
6998
6999else
7000 echo "$ac_t""no" 1>&6
c906108c 7001fi
97bf5e38 7002done
c906108c 7003
e1ea1d75 7004for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
7005do
7006echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7007echo "configure:7008: checking for $ac_func" >&5
97bf5e38 7008if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7009 echo $ac_n "(cached) $ac_c" 1>&6
7010else
7011 cat > conftest.$ac_ext <<EOF
02d62932 7012#line 7013 "configure"
c906108c 7013#include "confdefs.h"
97bf5e38
MK
7014/* System header to define __stub macros and hopefully few prototypes,
7015 which can conflict with char $ac_func(); below. */
7016#include <assert.h>
7017/* Override any gcc2 internal prototype to avoid an error. */
7018/* We use char because int might match the return type of a gcc2
7019 builtin and then its argument prototype would still apply. */
7020char $ac_func();
c906108c 7021
97bf5e38
MK
7022int main() {
7023
7024/* The GNU C library defines this for functions which it implements
7025 to always fail with ENOSYS. Some functions are actually named
7026 something starting with __ and the normal name is an alias. */
7027#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7028choke me
c906108c 7029#else
97bf5e38 7030$ac_func();
c906108c 7031#endif
97bf5e38 7032
c906108c
SS
7033; return 0; }
7034EOF
02d62932 7035if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7036 rm -rf conftest*
97bf5e38 7037 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7038else
7039 echo "configure: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7041 rm -rf conftest*
97bf5e38 7042 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7043fi
7044rm -f conftest*
7045fi
7046
97bf5e38
MK
7047if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7048 echo "$ac_t""yes" 1>&6
7049 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7050 cat >> confdefs.h <<EOF
7051#define $ac_tr_func 1
c906108c 7052EOF
e1ea1d75 7053
97bf5e38
MK
7054else
7055 echo "$ac_t""no" 1>&6
c906108c 7056fi
97bf5e38 7057done
c906108c 7058
97bf5e38
MK
7059for ac_func in socketpair
7060do
7061echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7062echo "configure:7063: checking for $ac_func" >&5
97bf5e38 7063if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
7064 echo $ac_n "(cached) $ac_c" 1>&6
7065else
7066 cat > conftest.$ac_ext <<EOF
02d62932 7067#line 7068 "configure"
c906108c 7068#include "confdefs.h"
97bf5e38
MK
7069/* System header to define __stub macros and hopefully few prototypes,
7070 which can conflict with char $ac_func(); below. */
7071#include <assert.h>
7072/* Override any gcc2 internal prototype to avoid an error. */
7073/* We use char because int might match the return type of a gcc2
7074 builtin and then its argument prototype would still apply. */
7075char $ac_func();
c906108c 7076
97bf5e38
MK
7077int main() {
7078
7079/* The GNU C library defines this for functions which it implements
7080 to always fail with ENOSYS. Some functions are actually named
7081 something starting with __ and the normal name is an alias. */
7082#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7083choke me
c906108c 7084#else
97bf5e38 7085$ac_func();
c906108c 7086#endif
97bf5e38 7087
c906108c
SS
7088; return 0; }
7089EOF
02d62932 7090if { (eval echo configure:7091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7091 rm -rf conftest*
97bf5e38 7092 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7093else
7094 echo "configure: failed program was:" >&5
7095 cat conftest.$ac_ext >&5
7096 rm -rf conftest*
97bf5e38 7097 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7098fi
7099rm -f conftest*
7100fi
7101
97bf5e38
MK
7102if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7103 echo "$ac_t""yes" 1>&6
7104 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7105 cat >> confdefs.h <<EOF
7106#define $ac_tr_func 1
c906108c 7107EOF
97bf5e38
MK
7108
7109else
7110 echo "$ac_t""no" 1>&6
c906108c 7111fi
97bf5e38 7112done
c906108c 7113
b757528f
JJ
7114for ac_func in syscall
7115do
7116echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
02d62932 7117echo "configure:7118: checking for $ac_func" >&5
b757528f
JJ
7118if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7119 echo $ac_n "(cached) $ac_c" 1>&6
7120else
7121 cat > conftest.$ac_ext <<EOF
02d62932 7122#line 7123 "configure"
b757528f
JJ
7123#include "confdefs.h"
7124/* System header to define __stub macros and hopefully few prototypes,
7125 which can conflict with char $ac_func(); below. */
7126#include <assert.h>
7127/* Override any gcc2 internal prototype to avoid an error. */
7128/* We use char because int might match the return type of a gcc2
7129 builtin and then its argument prototype would still apply. */
7130char $ac_func();
7131
7132int main() {
7133
7134/* The GNU C library defines this for functions which it implements
7135 to always fail with ENOSYS. Some functions are actually named
7136 something starting with __ and the normal name is an alias. */
7137#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7138choke me
7139#else
7140$ac_func();
7141#endif
7142
7143; return 0; }
7144EOF
02d62932 7145if { (eval echo configure:7146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7146 rm -rf conftest*
7147 eval "ac_cv_func_$ac_func=yes"
7148else
7149 echo "configure: failed program was:" >&5
7150 cat conftest.$ac_ext >&5
7151 rm -rf conftest*
7152 eval "ac_cv_func_$ac_func=no"
7153fi
7154rm -f conftest*
7155fi
7156
7157if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7158 echo "$ac_t""yes" 1>&6
7159 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7160 cat >> confdefs.h <<EOF
7161#define $ac_tr_func 1
7162EOF
7163
7164else
7165 echo "$ac_t""no" 1>&6
7166fi
7167done
7168
97bf5e38
MK
7169
7170if test "$cross_compiling" = no; then
7171 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
02d62932 7172echo "configure:7173: checking whether setpgrp takes no argument" >&5
97bf5e38 7173if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7174 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7175else
7176 if test "$cross_compiling" = yes; then
7177 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7178else
7179 cat > conftest.$ac_ext <<EOF
02d62932 7180#line 7181 "configure"
c906108c
SS
7181#include "confdefs.h"
7182
c906108c
SS
7183#ifdef HAVE_UNISTD_H
7184#include <unistd.h>
7185#endif
97bf5e38
MK
7186
7187/*
7188 * If this system has a BSD-style setpgrp, which takes arguments, exit
7189 * successfully.
7190 */
7191main()
7192{
7193 if (setpgrp(1,1) == -1)
7194 exit(0);
7195 else
7196 exit(1);
7197}
7198
c906108c 7199EOF
02d62932 7200if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7201then
7202 ac_cv_func_setpgrp_void=no
c906108c
SS
7203else
7204 echo "configure: failed program was:" >&5
7205 cat conftest.$ac_ext >&5
97bf5e38
MK
7206 rm -fr conftest*
7207 ac_cv_func_setpgrp_void=yes
c906108c 7208fi
97bf5e38 7209rm -fr conftest*
c906108c
SS
7210fi
7211
97bf5e38
MK
7212
7213fi
7214
7215echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7216if test $ac_cv_func_setpgrp_void = yes; then
7217 cat >> confdefs.h <<\EOF
7218#define SETPGRP_VOID 1
c906108c
SS
7219EOF
7220
7221fi
7222
97bf5e38
MK
7223else
7224 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
02d62932 7225echo "configure:7226: checking whether setpgrp takes no argument" >&5
97bf5e38 7226if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7227 echo $ac_n "(cached) $ac_c" 1>&6
7228else
7229 cat > conftest.$ac_ext <<EOF
02d62932 7230#line 7231 "configure"
b83266a0
SS
7231#include "confdefs.h"
7232
b83266a0 7233#include <unistd.h>
97bf5e38 7234
b83266a0 7235int main() {
97bf5e38
MK
7236
7237 if (setpgrp(1,1) == -1)
7238 exit (0);
7239 else
7240 exit (1);
7241
b83266a0
SS
7242; return 0; }
7243EOF
02d62932 7244if { (eval echo configure:7245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7245 rm -rf conftest*
97bf5e38 7246 ac_cv_func_setpgrp_void=no
b83266a0
SS
7247else
7248 echo "configure: failed program was:" >&5
7249 cat conftest.$ac_ext >&5
7250 rm -rf conftest*
97bf5e38 7251 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7252fi
7253rm -f conftest*
7254fi
7255
97bf5e38
MK
7256echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7257if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7258 cat >> confdefs.h <<\EOF
97bf5e38 7259#define SETPGRP_VOID 1
b83266a0
SS
7260EOF
7261
97bf5e38 7262fi
b83266a0
SS
7263fi
7264
97bf5e38
MK
7265# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7266# since sigsetjmp might only be defined as a macro.
7267echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
02d62932 7268echo "configure:7269: checking for sigsetjmp" >&5
97bf5e38 7269if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7270 echo $ac_n "(cached) $ac_c" 1>&6
7271else
7272 cat > conftest.$ac_ext <<EOF
02d62932 7273#line 7274 "configure"
a4db0f07
RH
7274#include "confdefs.h"
7275
97bf5e38
MK
7276#include <setjmp.h>
7277
a4db0f07 7278int main() {
97bf5e38 7279sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7280; return 0; }
7281EOF
02d62932 7282if { (eval echo configure:7283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7283 rm -rf conftest*
97bf5e38 7284 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7285else
7286 echo "configure: failed program was:" >&5
7287 cat conftest.$ac_ext >&5
7288 rm -rf conftest*
97bf5e38 7289 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7290fi
7291rm -f conftest*
7292fi
7293
97bf5e38
MK
7294echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7295if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7296 cat >> confdefs.h <<\EOF
97bf5e38 7297#define HAVE_SIGSETJMP 1
a4db0f07
RH
7298EOF
7299
7300fi
c906108c 7301
06825bd1
MK
7302# Assume we'll default to using the included libiberty regex.
7303gdb_use_included_regex=yes
7304
7305# However, if the system regex is GNU regex, then default to *not*
7306# using the included regex.
7307echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
02d62932 7308echo "configure:7309: checking for GNU regex" >&5
06825bd1
MK
7309if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7310 echo $ac_n "(cached) $ac_c" 1>&6
7311else
7312 cat > conftest.$ac_ext <<EOF
02d62932 7313#line 7314 "configure"
06825bd1
MK
7314#include "confdefs.h"
7315#include <gnu-versions.h>
7316int main() {
7317#define REGEX_INTERFACE_VERSION 1
7318#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7319# error "Version mismatch"
7320#endif
7321; return 0; }
7322EOF
02d62932 7323if { (eval echo configure:7324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7324 rm -rf conftest*
7325 gdb_cv_have_gnu_regex=yes
7326else
7327 echo "configure: failed program was:" >&5
7328 cat conftest.$ac_ext >&5
7329 rm -rf conftest*
7330 gdb_cv_have_gnu_regex=no
7331fi
7332rm -f conftest*
7333fi
7334
7335echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7336if test $gdb_cv_have_gnu_regex = yes; then
7337 gdb_use_included_regex=no
7338fi
7339
7340# Check whether --with-included-regex or --without-included-regex was given.
7341if test "${with_included_regex+set}" = set; then
7342 withval="$with_included_regex"
7343 gdb_with_regex=$withval
7344else
7345 gdb_with_regex=$gdb_use_included_regex
7346fi
7347
7348if test "$gdb_with_regex" = yes; then
7349 cat >> confdefs.h <<\EOF
7350#define USE_INCLUDED_REGEX 1
7351EOF
7352
7353fi
7354
78434e59
MK
7355# See if <machine/reg.h> degines `struct reg'.
7356echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
02d62932 7357echo "configure:7358: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7358if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7359 echo $ac_n "(cached) $ac_c" 1>&6
7360else
7361 cat > conftest.$ac_ext <<EOF
02d62932 7362#line 7363 "configure"
78434e59
MK
7363#include "confdefs.h"
7364#include <sys/types.h>
7365#include <machine/reg.h>
7366int main() {
7367struct reg r;
7368; return 0; }
7369EOF
02d62932 7370if { (eval echo configure:7371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7371 rm -rf conftest*
7372 gdb_cv_struct_reg=yes
7373else
7374 echo "configure: failed program was:" >&5
7375 cat conftest.$ac_ext >&5
7376 rm -rf conftest*
7377 gdb_cv_struct_reg=no
7378fi
7379rm -f conftest*
7380fi
7381
7382echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7383if test $gdb_cv_struct_reg = yes; then
7384 cat >> confdefs.h <<\EOF
7385#define HAVE_STRUCT_REG 1
7386EOF
7387
7388fi
7389
97bf5e38
MK
7390# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7391# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7392echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
02d62932 7393echo "configure:7394: checking for r_fs in struct reg" >&5
97bf5e38
MK
7394if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7395 echo $ac_n "(cached) $ac_c" 1>&6
7396else
7397 cat > conftest.$ac_ext <<EOF
02d62932 7398#line 7399 "configure"
c906108c 7399#include "confdefs.h"
97bf5e38
MK
7400#include <machine/reg.h>
7401int main() {
7402struct reg r; r.r_fs;
7403; return 0; }
c906108c 7404EOF
02d62932 7405if { (eval echo configure:7406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7406 rm -rf conftest*
97bf5e38 7407 gdb_cv_struct_reg_r_fs=yes
c906108c 7408else
97bf5e38
MK
7409 echo "configure: failed program was:" >&5
7410 cat conftest.$ac_ext >&5
c906108c 7411 rm -rf conftest*
97bf5e38 7412 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7413fi
7414rm -f conftest*
97bf5e38 7415fi
c906108c 7416
97bf5e38
MK
7417echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7418if test $gdb_cv_struct_reg_r_fs = yes; then
7419 cat >> confdefs.h <<\EOF
7420#define HAVE_STRUCT_REG_R_FS 1
7421EOF
7422
7423fi
7424echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
02d62932 7425echo "configure:7426: checking for r_gs in struct reg" >&5
97bf5e38
MK
7426if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7427 echo $ac_n "(cached) $ac_c" 1>&6
7428else
7429 cat > conftest.$ac_ext <<EOF
02d62932 7430#line 7431 "configure"
c906108c 7431#include "confdefs.h"
97bf5e38
MK
7432#include <machine/reg.h>
7433int main() {
7434struct reg r; r.r_gs;
7435; return 0; }
c906108c 7436EOF
02d62932 7437if { (eval echo configure:7438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7438 rm -rf conftest*
97bf5e38 7439 gdb_cv_struct_reg_r_gs=yes
c906108c 7440else
97bf5e38
MK
7441 echo "configure: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
c906108c 7443 rm -rf conftest*
97bf5e38 7444 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7445fi
7446rm -f conftest*
c906108c 7447fi
c906108c 7448
97bf5e38
MK
7449echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7450if test $gdb_cv_struct_reg_r_gs = yes; then
7451 cat >> confdefs.h <<\EOF
7452#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7453EOF
7454
c906108c
SS
7455fi
7456
97bf5e38
MK
7457# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7458echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
02d62932 7459echo "configure:7460: checking for PTRACE_GETREGS" >&5
97bf5e38 7460if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7461 echo $ac_n "(cached) $ac_c" 1>&6
7462else
7463 cat > conftest.$ac_ext <<EOF
02d62932 7464#line 7465 "configure"
c906108c 7465#include "confdefs.h"
97bf5e38 7466#include <sys/ptrace.h>
c906108c 7467int main() {
97bf5e38 7468PTRACE_GETREGS;
c906108c
SS
7469; return 0; }
7470EOF
02d62932 7471if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7472 rm -rf conftest*
97bf5e38 7473 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7474else
7475 echo "configure: failed program was:" >&5
7476 cat conftest.$ac_ext >&5
7477 rm -rf conftest*
97bf5e38 7478 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7479fi
7480rm -f conftest*
7481fi
7482
97bf5e38
MK
7483echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7484if test $gdb_cv_have_ptrace_getregs = yes; then
7485 cat >> confdefs.h <<\EOF
7486#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7487EOF
7488
97bf5e38 7489fi
c906108c 7490
97bf5e38
MK
7491# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7492echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
02d62932 7493echo "configure:7494: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7494if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7495 echo $ac_n "(cached) $ac_c" 1>&6
7496else
7497 cat > conftest.$ac_ext <<EOF
02d62932 7498#line 7499 "configure"
c906108c 7499#include "confdefs.h"
97bf5e38 7500#include <sys/ptrace.h>
c906108c 7501int main() {
97bf5e38 7502PTRACE_GETFPXREGS;
c906108c
SS
7503; return 0; }
7504EOF
02d62932 7505if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7506 rm -rf conftest*
97bf5e38 7507 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7508else
7509 echo "configure: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 rm -rf conftest*
97bf5e38 7512 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7513fi
7514rm -f conftest*
7515fi
7516
97bf5e38
MK
7517echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7518if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7519 cat >> confdefs.h <<\EOF
7520#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7521EOF
7522
97bf5e38 7523fi
c906108c 7524
97bf5e38
MK
7525# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7526echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
02d62932 7527echo "configure:7528: checking for PT_GETDBREGS" >&5
97bf5e38 7528if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7529 echo $ac_n "(cached) $ac_c" 1>&6
7530else
7531 cat > conftest.$ac_ext <<EOF
02d62932 7532#line 7533 "configure"
c906108c 7533#include "confdefs.h"
97bf5e38
MK
7534#include <sys/types.h>
7535#include <sys/ptrace.h>
c906108c 7536int main() {
97bf5e38 7537PT_GETDBREGS;
c906108c
SS
7538; return 0; }
7539EOF
02d62932 7540if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7541 rm -rf conftest*
97bf5e38 7542 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7543else
7544 echo "configure: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 rm -rf conftest*
97bf5e38 7547 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7548fi
7549rm -f conftest*
7550fi
7551
97bf5e38
MK
7552echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7553if test $gdb_cv_have_pt_getdbregs = yes; then
7554 cat >> confdefs.h <<\EOF
7555#define HAVE_PT_GETDBREGS 1
c906108c
SS
7556EOF
7557
97bf5e38 7558fi
c906108c 7559
97bf5e38
MK
7560# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7561echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
02d62932 7562echo "configure:7563: checking for PT_GETXMMREGS" >&5
97bf5e38 7563if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7564 echo $ac_n "(cached) $ac_c" 1>&6
7565else
7566 cat > conftest.$ac_ext <<EOF
02d62932 7567#line 7568 "configure"
c906108c 7568#include "confdefs.h"
97bf5e38
MK
7569#include <sys/types.h>
7570#include <sys/ptrace.h>
c906108c 7571int main() {
97bf5e38 7572PT_GETXMMREGS;
c906108c
SS
7573; return 0; }
7574EOF
02d62932 7575if { (eval echo configure:7576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7576 rm -rf conftest*
97bf5e38 7577 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
7578else
7579 echo "configure: failed program was:" >&5
7580 cat conftest.$ac_ext >&5
7581 rm -rf conftest*
97bf5e38 7582 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
7583fi
7584rm -f conftest*
7585fi
7586
97bf5e38
MK
7587echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7588if test $gdb_cv_have_pt_getxmmregs = yes; then
7589 cat >> confdefs.h <<\EOF
7590#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7591EOF
7592
97bf5e38 7593fi
c906108c 7594
27ca5dad 7595# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7596# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7597echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
02d62932 7598echo "configure:7599: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7599if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7600 echo $ac_n "(cached) $ac_c" 1>&6
7601else
7602 cat > conftest.$ac_ext <<EOF
02d62932 7603#line 7604 "configure"
27ca5dad
MC
7604#include "confdefs.h"
7605#include <stdint.h>
7606int main() {
7607uintptr_t foo = 0;
7608; return 0; }
7609EOF
02d62932 7610if { (eval echo configure:7611: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7611 rm -rf conftest*
7612 gdb_cv_have_uintptr_t=yes
7613else
7614 echo "configure: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 rm -rf conftest*
7617 gdb_cv_have_uintptr_t=no
7618fi
7619rm -f conftest*
7620fi
7621
7622echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7623if test $gdb_cv_have_uintptr_t = yes; then
7624 cat >> confdefs.h <<\EOF
7625#define HAVE_UINTPTR_T 1
7626EOF
7627
7628fi
97bf5e38
MK
7629
7630echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
02d62932 7631echo "configure:7632: checking whether malloc must be declared" >&5
97bf5e38 7632if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7633 echo $ac_n "(cached) $ac_c" 1>&6
7634else
7635 cat > conftest.$ac_ext <<EOF
02d62932 7636#line 7637 "configure"
3862412b 7637#include "confdefs.h"
e17bf198 7638
97bf5e38
MK
7639#include <stdio.h>
7640#ifdef HAVE_STRING_H
7641#include <string.h>
7642#else
7643#ifdef HAVE_STRINGS_H
7644#include <strings.h>
7645#endif
7646#endif
7647#ifdef HAVE_STDLIB_H
7648#include <stdlib.h>
7649#endif
7650#ifdef HAVE_UNISTD_H
7651#include <unistd.h>
7652#endif
3862412b 7653int main() {
97bf5e38 7654char *(*pfn) = (char *(*)) malloc
3862412b
MK
7655; return 0; }
7656EOF
02d62932 7657if { (eval echo configure:7658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7658 rm -rf conftest*
97bf5e38 7659 bfd_cv_decl_needed_malloc=no
3862412b
MK
7660else
7661 echo "configure: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7663 rm -rf conftest*
97bf5e38 7664 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7665fi
7666rm -f conftest*
7667fi
7668
97bf5e38
MK
7669echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7670if test $bfd_cv_decl_needed_malloc = yes; then
7671 cat >> confdefs.h <<\EOF
7672#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7673EOF
7674
97bf5e38 7675fi
3862412b 7676
97bf5e38 7677echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
02d62932 7678echo "configure:7679: checking whether realloc must be declared" >&5
97bf5e38 7679if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7680 echo $ac_n "(cached) $ac_c" 1>&6
7681else
7682 cat > conftest.$ac_ext <<EOF
02d62932 7683#line 7684 "configure"
3862412b 7684#include "confdefs.h"
e17bf198 7685
97bf5e38
MK
7686#include <stdio.h>
7687#ifdef HAVE_STRING_H
7688#include <string.h>
7689#else
7690#ifdef HAVE_STRINGS_H
7691#include <strings.h>
7692#endif
7693#endif
7694#ifdef HAVE_STDLIB_H
7695#include <stdlib.h>
7696#endif
7697#ifdef HAVE_UNISTD_H
7698#include <unistd.h>
7699#endif
3862412b 7700int main() {
97bf5e38 7701char *(*pfn) = (char *(*)) realloc
3862412b
MK
7702; return 0; }
7703EOF
02d62932 7704if { (eval echo configure:7705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7705 rm -rf conftest*
97bf5e38 7706 bfd_cv_decl_needed_realloc=no
3862412b
MK
7707else
7708 echo "configure: failed program was:" >&5
7709 cat conftest.$ac_ext >&5
7710 rm -rf conftest*
97bf5e38 7711 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7712fi
7713rm -f conftest*
7714fi
7715
97bf5e38
MK
7716echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7717if test $bfd_cv_decl_needed_realloc = yes; then
7718 cat >> confdefs.h <<\EOF
7719#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7720EOF
7721
97bf5e38 7722fi
3862412b 7723
97bf5e38 7724echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
02d62932 7725echo "configure:7726: checking whether free must be declared" >&5
97bf5e38 7726if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7727 echo $ac_n "(cached) $ac_c" 1>&6
7728else
7729 cat > conftest.$ac_ext <<EOF
02d62932 7730#line 7731 "configure"
451928c5 7731#include "confdefs.h"
e17bf198 7732
97bf5e38
MK
7733#include <stdio.h>
7734#ifdef HAVE_STRING_H
7735#include <string.h>
7736#else
7737#ifdef HAVE_STRINGS_H
7738#include <strings.h>
7739#endif
7740#endif
7741#ifdef HAVE_STDLIB_H
7742#include <stdlib.h>
7743#endif
7744#ifdef HAVE_UNISTD_H
7745#include <unistd.h>
7746#endif
451928c5 7747int main() {
97bf5e38 7748char *(*pfn) = (char *(*)) free
451928c5
AC
7749; return 0; }
7750EOF
02d62932 7751if { (eval echo configure:7752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7752 rm -rf conftest*
97bf5e38 7753 bfd_cv_decl_needed_free=no
451928c5
AC
7754else
7755 echo "configure: failed program was:" >&5
7756 cat conftest.$ac_ext >&5
7757 rm -rf conftest*
97bf5e38 7758 bfd_cv_decl_needed_free=yes
451928c5
AC
7759fi
7760rm -f conftest*
7761fi
7762
97bf5e38
MK
7763echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7764if test $bfd_cv_decl_needed_free = yes; then
7765 cat >> confdefs.h <<\EOF
7766#define NEED_DECLARATION_FREE 1
451928c5
AC
7767EOF
7768
97bf5e38 7769fi
451928c5 7770
97bf5e38 7771echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
02d62932 7772echo "configure:7773: checking whether strerror must be declared" >&5
97bf5e38 7773if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7774 echo $ac_n "(cached) $ac_c" 1>&6
7775else
7776 cat > conftest.$ac_ext <<EOF
02d62932 7777#line 7778 "configure"
451928c5 7778#include "confdefs.h"
e17bf198 7779
97bf5e38
MK
7780#include <stdio.h>
7781#ifdef HAVE_STRING_H
7782#include <string.h>
7783#else
7784#ifdef HAVE_STRINGS_H
7785#include <strings.h>
7786#endif
7787#endif
7788#ifdef HAVE_STDLIB_H
7789#include <stdlib.h>
7790#endif
7791#ifdef HAVE_UNISTD_H
7792#include <unistd.h>
7793#endif
451928c5 7794int main() {
97bf5e38 7795char *(*pfn) = (char *(*)) strerror
451928c5
AC
7796; return 0; }
7797EOF
02d62932 7798if { (eval echo configure:7799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7799 rm -rf conftest*
97bf5e38 7800 bfd_cv_decl_needed_strerror=no
451928c5
AC
7801else
7802 echo "configure: failed program was:" >&5
7803 cat conftest.$ac_ext >&5
7804 rm -rf conftest*
97bf5e38 7805 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7806fi
7807rm -f conftest*
7808fi
7809
97bf5e38
MK
7810echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7811if test $bfd_cv_decl_needed_strerror = yes; then
7812 cat >> confdefs.h <<\EOF
7813#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7814EOF
7815
97bf5e38 7816fi
451928c5 7817
97bf5e38 7818echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
02d62932 7819echo "configure:7820: checking whether strdup must be declared" >&5
97bf5e38 7820if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7821 echo $ac_n "(cached) $ac_c" 1>&6
7822else
7823 cat > conftest.$ac_ext <<EOF
02d62932 7824#line 7825 "configure"
3862412b 7825#include "confdefs.h"
e17bf198 7826
97bf5e38
MK
7827#include <stdio.h>
7828#ifdef HAVE_STRING_H
7829#include <string.h>
7830#else
7831#ifdef HAVE_STRINGS_H
7832#include <strings.h>
7833#endif
7834#endif
7835#ifdef HAVE_STDLIB_H
7836#include <stdlib.h>
7837#endif
7838#ifdef HAVE_UNISTD_H
7839#include <unistd.h>
7840#endif
3862412b 7841int main() {
97bf5e38 7842char *(*pfn) = (char *(*)) strdup
3862412b
MK
7843; return 0; }
7844EOF
02d62932 7845if { (eval echo configure:7846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7846 rm -rf conftest*
97bf5e38 7847 bfd_cv_decl_needed_strdup=no
3862412b
MK
7848else
7849 echo "configure: failed program was:" >&5
7850 cat conftest.$ac_ext >&5
7851 rm -rf conftest*
97bf5e38 7852 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7853fi
7854rm -f conftest*
7855fi
7856
97bf5e38
MK
7857echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7858if test $bfd_cv_decl_needed_strdup = yes; then
7859 cat >> confdefs.h <<\EOF
7860#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7861EOF
7862
97bf5e38 7863fi
3862412b 7864
97bf5e38 7865echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
02d62932 7866echo "configure:7867: checking whether strstr must be declared" >&5
97bf5e38 7867if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7868 echo $ac_n "(cached) $ac_c" 1>&6
7869else
7870 cat > conftest.$ac_ext <<EOF
02d62932 7871#line 7872 "configure"
3862412b 7872#include "confdefs.h"
e17bf198 7873
97bf5e38
MK
7874#include <stdio.h>
7875#ifdef HAVE_STRING_H
7876#include <string.h>
7877#else
7878#ifdef HAVE_STRINGS_H
7879#include <strings.h>
7880#endif
7881#endif
7882#ifdef HAVE_STDLIB_H
7883#include <stdlib.h>
7884#endif
7885#ifdef HAVE_UNISTD_H
7886#include <unistd.h>
7887#endif
3862412b 7888int main() {
97bf5e38 7889char *(*pfn) = (char *(*)) strstr
3862412b
MK
7890; return 0; }
7891EOF
02d62932 7892if { (eval echo configure:7893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7893 rm -rf conftest*
97bf5e38 7894 bfd_cv_decl_needed_strstr=no
3862412b
MK
7895else
7896 echo "configure: failed program was:" >&5
7897 cat conftest.$ac_ext >&5
7898 rm -rf conftest*
97bf5e38 7899 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7900fi
7901rm -f conftest*
7902fi
7903
97bf5e38
MK
7904echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7905if test $bfd_cv_decl_needed_strstr = yes; then
7906 cat >> confdefs.h <<\EOF
7907#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7908EOF
7909
97bf5e38 7910fi
3862412b 7911
97bf5e38 7912echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
02d62932 7913echo "configure:7914: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7914if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7915 echo $ac_n "(cached) $ac_c" 1>&6
7916else
7917 cat > conftest.$ac_ext <<EOF
02d62932 7918#line 7919 "configure"
596c9d4b
KB
7919#include "confdefs.h"
7920
97bf5e38
MK
7921#include <stdio.h>
7922#ifdef HAVE_STRING_H
7923#include <string.h>
7924#else
7925#ifdef HAVE_STRINGS_H
7926#include <strings.h>
7927#endif
7928#endif
7929#ifdef HAVE_STDLIB_H
7930#include <stdlib.h>
7931#endif
7932#ifdef HAVE_UNISTD_H
7933#include <unistd.h>
7934#endif
596c9d4b 7935int main() {
97bf5e38 7936char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7937; return 0; }
7938EOF
02d62932 7939if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7940 rm -rf conftest*
97bf5e38 7941 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7942else
7943 echo "configure: failed program was:" >&5
7944 cat conftest.$ac_ext >&5
7945 rm -rf conftest*
97bf5e38 7946 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7947fi
7948rm -f conftest*
7949fi
7950
97bf5e38
MK
7951echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7952if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7953 cat >> confdefs.h <<\EOF
7954#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7955EOF
7956
97bf5e38 7957fi
596c9d4b 7958
97bf5e38
MK
7959
7960# The following save_state_t checkery is only necessary for HPUX
7961# versions earlier than 10.20. When those fade from memory, this
7962# could be expunged. --jsm 1999-03-22
7963
7964echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
02d62932 7965echo "configure:7966: checking for HPUX save_state structure" >&5
97bf5e38 7966cat > conftest.$ac_ext <<EOF
02d62932 7967#line 7968 "configure"
97bf5e38
MK
7968#include "confdefs.h"
7969#include <machine/save_state.h>
7970EOF
7971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7972 egrep "save_state_t" >/dev/null 2>&1; then
7973 rm -rf conftest*
7974 gdb_cv_hpux_savestate=yes
7975else
7976 rm -rf conftest*
7977 gdb_cv_hpux_savestate=no
7978fi
7979rm -f conftest*
7980
7981cat > conftest.$ac_ext <<EOF
02d62932 7982#line 7983 "configure"
97bf5e38
MK
7983#include "confdefs.h"
7984#include <machine/save_state.h>
7985EOF
7986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7987 egrep "ss_wide" >/dev/null 2>&1; then
7988 rm -rf conftest*
7989 gdb_cv_hpux_sswide=yes
7990else
7991 rm -rf conftest*
7992 gdb_cv_hpux_sswide=no
7993fi
7994rm -f conftest*
7995
7996if test $gdb_cv_hpux_savestate = yes
7997then
7998 cat >> confdefs.h <<\EOF
7999#define HAVE_STRUCT_SAVE_STATE_T 1
8000EOF
8001
8002fi
8003if test $gdb_cv_hpux_sswide = yes
8004then
8005 cat >> confdefs.h <<\EOF
8006#define HAVE_STRUCT_MEMBER_SS_WIDE 1
8007EOF
8008
8009fi
8010echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8011
8012
8013# If we are configured native on GNU/Linux, work around problems with
8014# sys/procfs.h
8015# Also detect which type of /proc is in use, such as for Unixware or Solaris.
8016
8017if test "${target}" = "${host}"; then
8018 case "${host}" in
8019 i[3456]86-*-linux*)
8020 cat >> confdefs.h <<\EOF
8021#define START_INFERIOR_TRAPS_EXPECTED 2
8022EOF
8023
8024 cat >> confdefs.h <<\EOF
8025#define sys_quotactl 1
8026EOF
8027
8028 ;;
8029 ia64-*-aix*)
8030 cat >> confdefs.h <<\EOF
8031#define NEW_PROC_API 1
8032EOF
8033
8034 ;;
8035 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8036 cat >> confdefs.h <<\EOF
8037#define NEW_PROC_API 1
8038EOF
8039
8040 ;;
e7c61be3 8041 *-*-solaris2.[6789])
97bf5e38
MK
8042 cat >> confdefs.h <<\EOF
8043#define NEW_PROC_API 1
c960c18f
AC
8044EOF
8045
8046 ;;
8047 mips-sgi-irix5*)
8048 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8049 cat >> confdefs.h <<\EOF
8050#define _KMEMUSER 1
97bf5e38
MK
8051EOF
8052
8053 ;;
8054 esac
8055fi
8056
8057if test "$ac_cv_header_sys_procfs_h" = yes; then
8058 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8059echo "configure:8060: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 8060 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
8061 echo $ac_n "(cached) $ac_c" 1>&6
8062else
8063 cat > conftest.$ac_ext <<EOF
c960c18f 8064#line 8065 "configure"
596c9d4b
KB
8065#include "confdefs.h"
8066
8067#define _SYSCALL32
8068#include <sys/procfs.h>
8069int main() {
97bf5e38 8070pstatus_t avar
596c9d4b
KB
8071; return 0; }
8072EOF
c960c18f 8073if { (eval echo configure:8074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8074 rm -rf conftest*
97bf5e38 8075 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
8076else
8077 echo "configure: failed program was:" >&5
8078 cat conftest.$ac_ext >&5
8079 rm -rf conftest*
97bf5e38 8080 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8081
8082fi
8083rm -f conftest*
8084fi
8085
97bf5e38 8086 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8087 cat >> confdefs.h <<\EOF
97bf5e38 8088#define HAVE_PSTATUS_T 1
596c9d4b
KB
8089EOF
8090
8091 fi
97bf5e38 8092 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8093
97bf5e38 8094 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8095echo "configure:8096: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8096 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8097 echo $ac_n "(cached) $ac_c" 1>&6
8098else
8099 cat > conftest.$ac_ext <<EOF
c960c18f 8100#line 8101 "configure"
596c9d4b
KB
8101#include "confdefs.h"
8102
8103#define _SYSCALL32
8104#include <sys/procfs.h>
8105int main() {
97bf5e38 8106prrun_t avar
596c9d4b
KB
8107; return 0; }
8108EOF
c960c18f 8109if { (eval echo configure:8110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8110 rm -rf conftest*
97bf5e38 8111 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8112else
8113 echo "configure: failed program was:" >&5
8114 cat conftest.$ac_ext >&5
8115 rm -rf conftest*
97bf5e38 8116 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8117
8118fi
8119rm -f conftest*
8120fi
8121
97bf5e38 8122 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8123 cat >> confdefs.h <<\EOF
97bf5e38 8124#define HAVE_PRRUN_T 1
596c9d4b
KB
8125EOF
8126
8127 fi
97bf5e38 8128 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8129
97bf5e38 8130 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8131echo "configure:8132: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8132 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8133 echo $ac_n "(cached) $ac_c" 1>&6
8134else
8135 cat > conftest.$ac_ext <<EOF
c960c18f 8136#line 8137 "configure"
596c9d4b
KB
8137#include "confdefs.h"
8138
8139#define _SYSCALL32
8140#include <sys/procfs.h>
8141int main() {
97bf5e38 8142gregset_t avar
596c9d4b
KB
8143; return 0; }
8144EOF
c960c18f 8145if { (eval echo configure:8146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8146 rm -rf conftest*
97bf5e38 8147 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8148else
8149 echo "configure: failed program was:" >&5
8150 cat conftest.$ac_ext >&5
8151 rm -rf conftest*
97bf5e38 8152 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8153
8154fi
8155rm -f conftest*
8156fi
8157
97bf5e38 8158 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8159 cat >> confdefs.h <<\EOF
97bf5e38 8160#define HAVE_GREGSET_T 1
596c9d4b
KB
8161EOF
8162
8163 fi
97bf5e38 8164 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8165
97bf5e38 8166 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8167echo "configure:8168: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8168 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8169 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8170else
8171 cat > conftest.$ac_ext <<EOF
c960c18f 8172#line 8173 "configure"
d84dd0c5 8173#include "confdefs.h"
97bf5e38
MK
8174
8175#define _SYSCALL32
d84dd0c5 8176#include <sys/procfs.h>
97bf5e38
MK
8177int main() {
8178fpregset_t avar
8179; return 0; }
d84dd0c5 8180EOF
c960c18f 8181if { (eval echo configure:8182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8182 rm -rf conftest*
8183 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8184else
8185 echo "configure: failed program was:" >&5
8186 cat conftest.$ac_ext >&5
97bf5e38
MK
8187 rm -rf conftest*
8188 bfd_cv_have_sys_procfs_type_fpregset_t=no
8189
d84dd0c5 8190fi
97bf5e38 8191rm -f conftest*
d84dd0c5
MK
8192fi
8193
97bf5e38
MK
8194 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8195 cat >> confdefs.h <<\EOF
8196#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8197EOF
8198
97bf5e38
MK
8199 fi
8200 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8201
97bf5e38 8202 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8203echo "configure:8204: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8204 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8205 echo $ac_n "(cached) $ac_c" 1>&6
8206else
8207 cat > conftest.$ac_ext <<EOF
c960c18f 8208#line 8209 "configure"
c906108c 8209#include "confdefs.h"
c906108c 8210
97bf5e38
MK
8211#define _SYSCALL32
8212#include <sys/procfs.h>
c906108c 8213int main() {
97bf5e38 8214prgregset_t avar
c906108c
SS
8215; return 0; }
8216EOF
c960c18f 8217if { (eval echo configure:8218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8218 rm -rf conftest*
97bf5e38 8219 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8220else
8221 echo "configure: failed program was:" >&5
8222 cat conftest.$ac_ext >&5
8223 rm -rf conftest*
97bf5e38
MK
8224 bfd_cv_have_sys_procfs_type_prgregset_t=no
8225
c906108c
SS
8226fi
8227rm -f conftest*
8228fi
8229
97bf5e38
MK
8230 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8231 cat >> confdefs.h <<\EOF
8232#define HAVE_PRGREGSET_T 1
c906108c
SS
8233EOF
8234
97bf5e38
MK
8235 fi
8236 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8237
97bf5e38 8238 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8239echo "configure:8240: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8240 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8241 echo $ac_n "(cached) $ac_c" 1>&6
8242else
8243 cat > conftest.$ac_ext <<EOF
c960c18f 8244#line 8245 "configure"
d45fe813 8245#include "confdefs.h"
97bf5e38
MK
8246
8247#define _SYSCALL32
8248#include <sys/procfs.h>
d45fe813 8249int main() {
97bf5e38 8250prfpregset_t avar
d45fe813
KB
8251; return 0; }
8252EOF
c960c18f 8253if { (eval echo configure:8254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8254 rm -rf conftest*
97bf5e38 8255 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8256else
8257 echo "configure: failed program was:" >&5
8258 cat conftest.$ac_ext >&5
8259 rm -rf conftest*
97bf5e38
MK
8260 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8261
d45fe813
KB
8262fi
8263rm -f conftest*
8264fi
8265
97bf5e38
MK
8266 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8267 cat >> confdefs.h <<\EOF
8268#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8269EOF
8270
97bf5e38
MK
8271 fi
8272 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8273
97bf5e38 8274 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8275echo "configure:8276: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8276 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8277 echo $ac_n "(cached) $ac_c" 1>&6
8278else
8279 cat > conftest.$ac_ext <<EOF
c960c18f 8280#line 8281 "configure"
d45fe813 8281#include "confdefs.h"
97bf5e38
MK
8282
8283#define _SYSCALL32
8284#include <sys/procfs.h>
d45fe813 8285int main() {
97bf5e38 8286prgregset32_t avar
d45fe813
KB
8287; return 0; }
8288EOF
c960c18f 8289if { (eval echo configure:8290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8290 rm -rf conftest*
97bf5e38 8291 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8292else
8293 echo "configure: failed program was:" >&5
8294 cat conftest.$ac_ext >&5
8295 rm -rf conftest*
97bf5e38
MK
8296 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8297
d45fe813
KB
8298fi
8299rm -f conftest*
8300fi
8301
97bf5e38
MK
8302 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8303 cat >> confdefs.h <<\EOF
8304#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8305EOF
8306
97bf5e38
MK
8307 fi
8308 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8309
97bf5e38 8310 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8311echo "configure:8312: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8312 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8313 echo $ac_n "(cached) $ac_c" 1>&6
8314else
8315 cat > conftest.$ac_ext <<EOF
c960c18f 8316#line 8317 "configure"
d45fe813 8317#include "confdefs.h"
97bf5e38
MK
8318
8319#define _SYSCALL32
8320#include <sys/procfs.h>
d45fe813 8321int main() {
97bf5e38 8322prfpregset32_t avar
d45fe813
KB
8323; return 0; }
8324EOF
c960c18f 8325if { (eval echo configure:8326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8326 rm -rf conftest*
97bf5e38 8327 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8328else
8329 echo "configure: failed program was:" >&5
8330 cat conftest.$ac_ext >&5
8331 rm -rf conftest*
97bf5e38
MK
8332 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8333
d45fe813
KB
8334fi
8335rm -f conftest*
8336fi
8337
97bf5e38
MK
8338 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8339 cat >> confdefs.h <<\EOF
8340#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8341EOF
8342
97bf5e38
MK
8343 fi
8344 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8345
97bf5e38 8346 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8347echo "configure:8348: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8348 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8349 echo $ac_n "(cached) $ac_c" 1>&6
8350else
8351 cat > conftest.$ac_ext <<EOF
c960c18f 8352#line 8353 "configure"
d45fe813 8353#include "confdefs.h"
97bf5e38 8354
d45fe813 8355#define _SYSCALL32
97bf5e38 8356#include <sys/procfs.h>
d45fe813 8357int main() {
97bf5e38 8358lwpid_t avar
d45fe813
KB
8359; return 0; }
8360EOF
c960c18f 8361if { (eval echo configure:8362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8362 rm -rf conftest*
97bf5e38 8363 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8364else
8365 echo "configure: failed program was:" >&5
8366 cat conftest.$ac_ext >&5
8367 rm -rf conftest*
97bf5e38
MK
8368 bfd_cv_have_sys_procfs_type_lwpid_t=no
8369
d45fe813
KB
8370fi
8371rm -f conftest*
8372fi
8373
97bf5e38
MK
8374 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8375 cat >> confdefs.h <<\EOF
8376#define HAVE_LWPID_T 1
d45fe813
KB
8377EOF
8378
97bf5e38
MK
8379 fi
8380 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8381
97bf5e38 8382 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8383echo "configure:8384: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8384 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8385 echo $ac_n "(cached) $ac_c" 1>&6
8386else
8387 cat > conftest.$ac_ext <<EOF
c960c18f 8388#line 8389 "configure"
c906108c
SS
8389#include "confdefs.h"
8390
97bf5e38
MK
8391#define _SYSCALL32
8392#include <sys/procfs.h>
c906108c 8393int main() {
97bf5e38 8394psaddr_t avar
c906108c
SS
8395; return 0; }
8396EOF
c960c18f 8397if { (eval echo configure:8398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8398 rm -rf conftest*
97bf5e38 8399 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8400else
8401 echo "configure: failed program was:" >&5
8402 cat conftest.$ac_ext >&5
8403 rm -rf conftest*
97bf5e38
MK
8404 bfd_cv_have_sys_procfs_type_psaddr_t=no
8405
c906108c
SS
8406fi
8407rm -f conftest*
8408fi
8409
97bf5e38
MK
8410 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8411 cat >> confdefs.h <<\EOF
8412#define HAVE_PSADDR_T 1
c906108c
SS
8413EOF
8414
97bf5e38
MK
8415 fi
8416 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8417
97bf5e38 8418 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8419echo "configure:8420: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8420 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8421 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8422else
8423 cat > conftest.$ac_ext <<EOF
c960c18f 8424#line 8425 "configure"
c906108c
SS
8425#include "confdefs.h"
8426
97bf5e38
MK
8427#define _SYSCALL32
8428#include <sys/procfs.h>
8429int main() {
8430prsysent_t avar
8431; return 0; }
c906108c 8432EOF
c960c18f 8433if { (eval echo configure:8434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8434 rm -rf conftest*
8435 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8436else
8437 echo "configure: failed program was:" >&5
8438 cat conftest.$ac_ext >&5
97bf5e38
MK
8439 rm -rf conftest*
8440 bfd_cv_have_sys_procfs_type_prsysent_t=no
8441
c906108c 8442fi
97bf5e38 8443rm -f conftest*
c906108c
SS
8444fi
8445
97bf5e38
MK
8446 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8447 cat >> confdefs.h <<\EOF
8448#define HAVE_PRSYSENT_T 1
c906108c
SS
8449EOF
8450
97bf5e38
MK
8451 fi
8452 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8453
97bf5e38 8454 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8455echo "configure:8456: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8456 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8457 echo $ac_n "(cached) $ac_c" 1>&6
8458else
8459 cat > conftest.$ac_ext <<EOF
c960c18f 8460#line 8461 "configure"
c906108c
SS
8461#include "confdefs.h"
8462
97bf5e38
MK
8463#define _SYSCALL32
8464#include <sys/procfs.h>
c906108c 8465int main() {
97bf5e38 8466pr_sigset_t avar
c906108c
SS
8467; return 0; }
8468EOF
c960c18f 8469if { (eval echo configure:8470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8470 rm -rf conftest*
97bf5e38 8471 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8472else
8473 echo "configure: failed program was:" >&5
8474 cat conftest.$ac_ext >&5
8475 rm -rf conftest*
97bf5e38
MK
8476 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8477
c906108c
SS
8478fi
8479rm -f conftest*
8480fi
8481
97bf5e38
MK
8482 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8483 cat >> confdefs.h <<\EOF
8484#define HAVE_PR_SIGSET_T 1
c906108c
SS
8485EOF
8486
97bf5e38
MK
8487 fi
8488 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8489
97bf5e38 8490 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8491echo "configure:8492: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8492 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8493 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8494else
8495 cat > conftest.$ac_ext <<EOF
c960c18f 8496#line 8497 "configure"
c906108c
SS
8497#include "confdefs.h"
8498
97bf5e38
MK
8499#define _SYSCALL32
8500#include <sys/procfs.h>
8501int main() {
8502pr_sigaction64_t avar
8503; return 0; }
c906108c 8504EOF
c960c18f 8505if { (eval echo configure:8506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8506 rm -rf conftest*
8507 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8508else
8509 echo "configure: failed program was:" >&5
8510 cat conftest.$ac_ext >&5
97bf5e38
MK
8511 rm -rf conftest*
8512 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8513
c906108c 8514fi
97bf5e38 8515rm -f conftest*
c906108c
SS
8516fi
8517
97bf5e38
MK
8518 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8519 cat >> confdefs.h <<\EOF
8520#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8521EOF
8522
97bf5e38
MK
8523 fi
8524 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8525
8526 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8527echo "configure:8528: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8528 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8529 echo $ac_n "(cached) $ac_c" 1>&6
8530else
8531 cat > conftest.$ac_ext <<EOF
c960c18f 8532#line 8533 "configure"
97bf5e38
MK
8533#include "confdefs.h"
8534
8535#define _SYSCALL32
8536#include <sys/procfs.h>
8537int main() {
8538pr_siginfo64_t avar
8539; return 0; }
8540EOF
c960c18f 8541if { (eval echo configure:8542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8542 rm -rf conftest*
8543 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8544else
8545 echo "configure: failed program was:" >&5
8546 cat conftest.$ac_ext >&5
8547 rm -rf conftest*
8548 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8549
8550fi
8551rm -f conftest*
c906108c 8552fi
c906108c 8553
97bf5e38
MK
8554 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8555 cat >> confdefs.h <<\EOF
8556#define HAVE_PR_SIGINFO64_T 1
8557EOF
c906108c 8558
97bf5e38
MK
8559 fi
8560 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8561
8562
8563
8564
8565
8566 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8567 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
c960c18f 8568echo "configure:8569: checking whether prfpregset_t type is broken" >&5
97bf5e38 8569 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8570 echo $ac_n "(cached) $ac_c" 1>&6
8571else
8572 if test "$cross_compiling" = yes; then
97bf5e38 8573 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8574else
8575 cat > conftest.$ac_ext <<EOF
c960c18f 8576#line 8577 "configure"
c906108c 8577#include "confdefs.h"
97bf5e38
MK
8578#include <sys/procfs.h>
8579 int main ()
8580 {
8581 if (sizeof (prfpregset_t) == sizeof (void *))
8582 return 1;
8583 return 0;
8584 }
c906108c 8585EOF
c960c18f 8586if { (eval echo configure:8587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8587then
97bf5e38 8588 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8589else
8590 echo "configure: failed program was:" >&5
8591 cat conftest.$ac_ext >&5
8592 rm -fr conftest*
97bf5e38 8593 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8594fi
8595rm -fr conftest*
8596fi
8597
8598fi
8599
97bf5e38
MK
8600 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8601 if test $gdb_cv_prfpregset_t_broken = yes; then
8602 cat >> confdefs.h <<\EOF
8603#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8604EOF
8605
97bf5e38
MK
8606 fi
8607 fi
c906108c 8608
97bf5e38
MK
8609
8610 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
c960c18f 8611echo "configure:8612: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8612 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8613 echo $ac_n "(cached) $ac_c" 1>&6
8614else
8615 cat > conftest.$ac_ext <<EOF
c960c18f 8616#line 8617 "configure"
c906108c 8617#include "confdefs.h"
97bf5e38
MK
8618#include <unistd.h>
8619#include <sys/types.h>
8620#include <sys/procfs.h>
8621
8622int main() {
8623
8624 int dummy;;
8625 dummy = ioctl(0, PIOCSET, &dummy);
8626
8627; return 0; }
c906108c 8628EOF
c960c18f 8629if { (eval echo configure:8630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8630 rm -rf conftest*
97bf5e38 8631 gdb_cv_have_procfs_piocset=yes
c906108c 8632else
c906108c
SS
8633 echo "configure: failed program was:" >&5
8634 cat conftest.$ac_ext >&5
8635 rm -rf conftest*
97bf5e38 8636 gdb_cv_have_procfs_piocset=no
c906108c
SS
8637fi
8638rm -f conftest*
8639fi
97bf5e38
MK
8640
8641 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8642 if test $gdb_cv_have_procfs_piocset = yes; then
8643 cat >> confdefs.h <<\EOF
8644#define HAVE_PROCFS_PIOCSET 1
c906108c 8645EOF
97bf5e38
MK
8646
8647 fi
c906108c 8648fi
c906108c 8649
97bf5e38
MK
8650if test ${host} = ${target} ; then
8651
8652 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
c960c18f 8653echo "configure:8654: checking for member l_addr in struct link_map" >&5
97bf5e38 8654 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8655 echo $ac_n "(cached) $ac_c" 1>&6
8656else
8657 cat > conftest.$ac_ext <<EOF
c960c18f 8658#line 8659 "configure"
c906108c 8659#include "confdefs.h"
97bf5e38 8660#include <link.h>
c906108c 8661int main() {
97bf5e38 8662struct link_map lm; (void) lm.l_addr;
c906108c
SS
8663; return 0; }
8664EOF
c960c18f 8665if { (eval echo configure:8666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8666 rm -rf conftest*
97bf5e38 8667 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8668else
8669 echo "configure: failed program was:" >&5
8670 cat conftest.$ac_ext >&5
8671 rm -rf conftest*
97bf5e38 8672 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8673fi
8674rm -f conftest*
8675fi
8676
97bf5e38
MK
8677 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8678 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8679 cat >> confdefs.h <<\EOF
8680#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8681EOF
97bf5e38
MK
8682
8683 fi
8684
8685
8686 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
c960c18f 8687echo "configure:8688: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8688 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8689 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8690else
97bf5e38 8691 cat > conftest.$ac_ext <<EOF
c960c18f 8692#line 8693 "configure"
97bf5e38
MK
8693#include "confdefs.h"
8694#include <sys/types.h>
8695#include <link.h>
8696int main() {
8697struct link_map lm; (void) lm.lm_addr;
8698; return 0; }
8699EOF
c960c18f 8700if { (eval echo configure:8701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8701 rm -rf conftest*
8702 gdb_cv_have_struct_link_map_with_lm_members=yes
8703else
8704 echo "configure: failed program was:" >&5
8705 cat conftest.$ac_ext >&5
8706 rm -rf conftest*
8707 gdb_cv_have_struct_link_map_with_lm_members=no
8708fi
8709rm -f conftest*
c906108c 8710fi
c906108c 8711
97bf5e38
MK
8712 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8713 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8714 cat >> confdefs.h <<\EOF
8715#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8716EOF
8717
8718 fi
8719
8720
8721 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
c960c18f 8722echo "configure:8723: checking for member som_addr in struct so_map" >&5
97bf5e38 8723 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8724 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8725else
8726 cat > conftest.$ac_ext <<EOF
c960c18f 8727#line 8728 "configure"
c906108c 8728#include "confdefs.h"
97bf5e38
MK
8729#include <sys/types.h>
8730#ifdef HAVE_NLIST_H
8731#include <nlist.h>
8732#endif
8733#include <link.h>
8734int main() {
8735struct so_map lm; (void) lm.som_addr;
8736; return 0; }
8737EOF
c960c18f 8738if { (eval echo configure:8739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8739 rm -rf conftest*
8740 gdb_cv_have_struct_so_map_with_som_members=yes
8741else
8742 echo "configure: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 rm -rf conftest*
8745 gdb_cv_have_struct_so_map_with_som_members=no
8746fi
8747rm -f conftest*
8748fi
c906108c 8749
97bf5e38
MK
8750 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8751 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8752 cat >> confdefs.h <<\EOF
8753#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8754EOF
c906108c 8755
97bf5e38 8756 fi
c906108c 8757
97bf5e38
MK
8758
8759 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
c960c18f 8760echo "configure:8761: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8761 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8762 echo $ac_n "(cached) $ac_c" 1>&6
8763else
8764 cat > conftest.$ac_ext <<EOF
c960c18f 8765#line 8766 "configure"
97bf5e38
MK
8766#include "confdefs.h"
8767#define _SYSCALL32
8768#include <sys/link.h>
8769int main() {
8770struct link_map32 l;
8771; return 0; }
8772EOF
c960c18f 8773if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8774 rm -rf conftest*
8775 gdb_cv_have_struct_link_map32=yes
8776else
8777 echo "configure: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8779 rm -rf conftest*
8780 gdb_cv_have_struct_link_map32=no
8781fi
8782rm -f conftest*
8783fi
c906108c 8784
97bf5e38
MK
8785 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8786 if test $gdb_cv_have_struct_link_map32 = yes; then
8787 cat >> confdefs.h <<\EOF
8788#define HAVE_STRUCT_LINK_MAP32 1
8789EOF
c906108c 8790
97bf5e38
MK
8791 cat >> confdefs.h <<\EOF
8792#define _SYSCALL32 1
8793EOF
c906108c 8794
97bf5e38
MK
8795 fi
8796fi
c906108c 8797
c906108c 8798
97bf5e38 8799echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
c960c18f 8800echo "configure:8801: checking for long long support in compiler" >&5
97bf5e38
MK
8801if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8802 echo $ac_n "(cached) $ac_c" 1>&6
8803else
8804 cat > conftest.$ac_ext <<EOF
c960c18f 8805#line 8806 "configure"
97bf5e38 8806#include "confdefs.h"
c906108c 8807
97bf5e38 8808int main() {
c906108c 8809
97bf5e38
MK
8810 extern long long foo;
8811 switch (foo & 2) { case 0: return 1; }
c906108c 8812
97bf5e38
MK
8813; return 0; }
8814EOF
c960c18f 8815if { (eval echo configure:8816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8816 rm -rf conftest*
8817 gdb_cv_c_long_long=yes
8818else
8819 echo "configure: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 rm -rf conftest*
8822 gdb_cv_c_long_long=no
8823fi
8824rm -f conftest*
8825fi
c906108c 8826
97bf5e38
MK
8827echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8828if test $gdb_cv_c_long_long = yes; then
8829 cat >> confdefs.h <<\EOF
8830#define CC_HAS_LONG_LONG 1
8831EOF
8832
8833fi
8834
8835
8836echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
c960c18f 8837echo "configure:8838: checking for long long support in printf" >&5
97bf5e38
MK
8838if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8839 echo $ac_n "(cached) $ac_c" 1>&6
8840else
8841 if test "$cross_compiling" = yes; then
8842 gdb_cv_printf_has_long_long=no
8843else
8844 cat > conftest.$ac_ext <<EOF
c960c18f 8845#line 8846 "configure"
97bf5e38
MK
8846#include "confdefs.h"
8847
8848int main () {
8849 char buf[32];
8850 long long l = 0;
8851 l = (l << 16) + 0x0123;
8852 l = (l << 16) + 0x4567;
8853 l = (l << 16) + 0x89ab;
8854 l = (l << 16) + 0xcdef;
8855 sprintf (buf, "0x%016llx", l);
8856 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8857}
97bf5e38 8858EOF
c960c18f 8859if { (eval echo configure:8860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8860then
8861 gdb_cv_printf_has_long_long=yes
8862else
8863 echo "configure: failed program was:" >&5
8864 cat conftest.$ac_ext >&5
8865 rm -fr conftest*
8866 gdb_cv_printf_has_long_long=no
8867fi
8868rm -fr conftest*
8869fi
8870
8871fi
8872
8873if test $gdb_cv_printf_has_long_long = yes; then
8874 cat >> confdefs.h <<\EOF
8875#define PRINTF_HAS_LONG_LONG 1
8876EOF
8877
8878fi
8879echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8880
8881
8882echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
c960c18f 8883echo "configure:8884: checking for long double support in compiler" >&5
97bf5e38
MK
8884if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8885 echo $ac_n "(cached) $ac_c" 1>&6
8886else
8887 cat > conftest.$ac_ext <<EOF
c960c18f 8888#line 8889 "configure"
97bf5e38
MK
8889#include "confdefs.h"
8890
8891int main() {
8892long double foo;
8893; return 0; }
8894EOF
c960c18f 8895if { (eval echo configure:8896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8896 rm -rf conftest*
8897 ac_cv_c_long_double=yes
8898else
8899 echo "configure: failed program was:" >&5
8900 cat conftest.$ac_ext >&5
8901 rm -rf conftest*
8902 ac_cv_c_long_double=no
8903fi
8904rm -f conftest*
8905fi
c906108c 8906
97bf5e38
MK
8907echo "$ac_t""$ac_cv_c_long_double" 1>&6
8908if test $ac_cv_c_long_double = yes; then
8909 cat >> confdefs.h <<\EOF
8910#define HAVE_LONG_DOUBLE 1
c906108c 8911EOF
97bf5e38
MK
8912
8913fi
8914
8915
8916echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
c960c18f 8917echo "configure:8918: checking for long double support in printf" >&5
97bf5e38
MK
8918if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8919 echo $ac_n "(cached) $ac_c" 1>&6
8920else
8921 if test "$cross_compiling" = yes; then
8922 gdb_cv_printf_has_long_double=no
8923else
8924 cat > conftest.$ac_ext <<EOF
c960c18f 8925#line 8926 "configure"
97bf5e38
MK
8926#include "confdefs.h"
8927
8928int main () {
8929 char buf[16];
8930 long double f = 3.141592653;
8931 sprintf (buf, "%Lg", f);
8932 return (strncmp ("3.14159", buf, 7));
8933}
8934EOF
c960c18f 8935if { (eval echo configure:8936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8936then
97bf5e38 8937 gdb_cv_printf_has_long_double=yes
c906108c
SS
8938else
8939 echo "configure: failed program was:" >&5
8940 cat conftest.$ac_ext >&5
8941 rm -fr conftest*
97bf5e38 8942 gdb_cv_printf_has_long_double=no
c906108c
SS
8943fi
8944rm -fr conftest*
8945fi
8946
8947fi
8948
97bf5e38 8949if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8950 cat >> confdefs.h <<\EOF
97bf5e38
MK
8951#define PRINTF_HAS_LONG_DOUBLE 1
8952EOF
8953
8954fi
8955echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8956
8957
8958echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
c960c18f 8959echo "configure:8960: checking for long double support in scanf" >&5
97bf5e38
MK
8960if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8961 echo $ac_n "(cached) $ac_c" 1>&6
8962else
8963 if test "$cross_compiling" = yes; then
8964 gdb_cv_scanf_has_long_double=no
8965else
8966 cat > conftest.$ac_ext <<EOF
c960c18f 8967#line 8968 "configure"
97bf5e38
MK
8968#include "confdefs.h"
8969
8970int main () {
8971 char *buf = "3.141592653";
8972 long double f = 0;
8973 sscanf (buf, "%Lg", &f);
8974 return !(f > 3.14159 && f < 3.14160);
8975}
c906108c 8976EOF
c960c18f 8977if { (eval echo configure:8978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8978then
8979 gdb_cv_scanf_has_long_double=yes
8980else
8981 echo "configure: failed program was:" >&5
8982 cat conftest.$ac_ext >&5
8983 rm -fr conftest*
8984 gdb_cv_scanf_has_long_double=no
8985fi
8986rm -fr conftest*
8987fi
c906108c
SS
8988
8989fi
8990
97bf5e38
MK
8991if test $gdb_cv_scanf_has_long_double = yes; then
8992 cat >> confdefs.h <<\EOF
8993#define SCANF_HAS_LONG_DOUBLE 1
8994EOF
8995
8996fi
8997echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8998
438013df
AO
8999case ${host_os} in
9000aix*)
9001 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
c960c18f 9002echo "configure:9003: checking for -bbigtoc option" >&5
438013df
AO
9003if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9004 echo $ac_n "(cached) $ac_c" 1>&6
9005else
9006
9007 SAVE_LDFLAGS=$LDFLAGS
9008
9009 case $GCC in
9010 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9011 *) gdb_cv_bigtoc=-bbigtoc ;;
9012 esac
9013
9014 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9015 cat > conftest.$ac_ext <<EOF
c960c18f 9016#line 9017 "configure"
438013df
AO
9017#include "confdefs.h"
9018
9019int main() {
9020int i;
9021; return 0; }
9022EOF
c960c18f 9023if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
9024 :
9025else
9026 echo "configure: failed program was:" >&5
9027 cat conftest.$ac_ext >&5
9028 rm -rf conftest*
9029 gdb_cv_bigtoc=
9030fi
9031rm -f conftest*
9032
9033fi
9034
9035echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9036 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9037 ;;
9038esac
9039
c906108c
SS
9040
9041
9042if test ${build} = ${host} -a ${host} = ${target} ; then
9043 case ${host_os} in
9044 hpux*)
9045 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
c960c18f 9046echo "configure:9047: checking for HPUX/OSF thread support" >&5
c906108c
SS
9047 if test -f /usr/include/dce/cma_config.h ; then
9048 if test "$GCC" = "yes" ; then
9049 echo "$ac_t""yes" 1>&6
9050 cat >> confdefs.h <<\EOF
9051#define HAVE_HPUX_THREAD_SUPPORT 1
9052EOF
9053
3483b318 9054 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
9055 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9056 else
9057 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9058 fi
9059 else
9060 echo "$ac_t""no" 1>&6
9061 fi
9062 ;;
9063 solaris*)
d92419e5
JB
9064 # See if thread_db library is around for Solaris thread debugging.
9065 # Note that we must explicitly test for version 1 of the library
9066 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9067 # the same API.
c906108c 9068 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
c960c18f 9069echo "configure:9070: checking for Solaris thread debugging library" >&5
c906108c
SS
9070 if test -f /usr/lib/libthread_db.so.1 ; then
9071 echo "$ac_t""yes" 1>&6
9072 cat >> confdefs.h <<\EOF
9073#define HAVE_THREAD_DB_LIB 1
9074EOF
9075
3483b318 9076 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9077 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9078 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
c960c18f 9079echo "configure:9080: checking for dlopen in -ldl" >&5
c906108c
SS
9080ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9081if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9082 echo $ac_n "(cached) $ac_c" 1>&6
9083else
9084 ac_save_LIBS="$LIBS"
9085LIBS="-ldl $LIBS"
9086cat > conftest.$ac_ext <<EOF
c960c18f 9087#line 9088 "configure"
c906108c
SS
9088#include "confdefs.h"
9089/* Override any gcc2 internal prototype to avoid an error. */
9090/* We use char because int might match the return type of a gcc2
9091 builtin and then its argument prototype would still apply. */
9092char dlopen();
9093
9094int main() {
9095dlopen()
9096; return 0; }
9097EOF
c960c18f 9098if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9099 rm -rf conftest*
9100 eval "ac_cv_lib_$ac_lib_var=yes"
9101else
9102 echo "configure: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9104 rm -rf conftest*
9105 eval "ac_cv_lib_$ac_lib_var=no"
9106fi
9107rm -f conftest*
9108LIBS="$ac_save_LIBS"
9109
9110fi
9111if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9112 echo "$ac_t""yes" 1>&6
9113 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9114 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9115 cat >> confdefs.h <<EOF
9116#define $ac_tr_lib 1
9117EOF
9118
9119 LIBS="-ldl $LIBS"
9120
9121else
9122 echo "$ac_t""no" 1>&6
9123fi
9124
9125 if test "$GCC" = "yes" ; then
9126 # The GNU linker requires the -export-dynamic option to make
9127 # all symbols visible in the dynamic symbol table.
9128 hold_ldflags=$LDFLAGS
9129 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
c960c18f 9130echo "configure:9131: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9131 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9132 cat > conftest.$ac_ext <<EOF
c960c18f 9133#line 9134 "configure"
c906108c
SS
9134#include "confdefs.h"
9135
9136int main() {
9137int i;
9138; return 0; }
9139EOF
c960c18f 9140if { (eval echo configure:9141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9141 rm -rf conftest*
9142 found=yes
9143else
9144 echo "configure: failed program was:" >&5
9145 cat conftest.$ac_ext >&5
9146 rm -rf conftest*
9147 found=no
9148fi
9149rm -f conftest*
9150 LDFLAGS=$hold_ldflags
9151 echo "$ac_t""$found" 1>&6
9152 if test $found = yes; then
9153 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9154 fi
9155 fi
9156 # Sun randomly tweaked the prototypes in <proc_service.h>
9157 # at one point.
9158 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
c960c18f 9159echo "configure:9160: checking if <proc_service.h> is old" >&5
c906108c
SS
9160 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9161 echo $ac_n "(cached) $ac_c" 1>&6
9162else
9163
9164 cat > conftest.$ac_ext <<EOF
c960c18f 9165#line 9166 "configure"
c906108c
SS
9166#include "confdefs.h"
9167
9168 #include <proc_service.h>
9169 ps_err_e ps_pdwrite
9170 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9171
9172int main() {
9173
9174; return 0; }
9175EOF
c960c18f 9176if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9177 rm -rf conftest*
9178 gdb_cv_proc_service_is_old=no
9179else
9180 echo "configure: failed program was:" >&5
9181 cat conftest.$ac_ext >&5
9182 rm -rf conftest*
9183 gdb_cv_proc_service_is_old=yes
9184fi
9185rm -f conftest*
9186
9187fi
9188
9189 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9190 if test $gdb_cv_proc_service_is_old = yes; then
9191 cat >> confdefs.h <<\EOF
9192#define PROC_SERVICE_IS_OLD 1
9193EOF
9194
9195 fi
9196 else
9197 echo "$ac_t""no" 1>&6
9198 fi
9199 ;;
d92419e5
JB
9200 aix*)
9201 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
c960c18f 9202echo "configure:9203: checking for AiX thread debugging library" >&5
d92419e5
JB
9203 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9204 echo $ac_n "(cached) $ac_c" 1>&6
9205else
9206 cat > conftest.$ac_ext <<EOF
c960c18f 9207#line 9208 "configure"
d92419e5
JB
9208#include "confdefs.h"
9209#include <sys/pthdebug.h>
9210int main() {
9211#ifndef PTHDB_VERSION_3
9212 #error
9213 #endif
9214; return 0; }
9215EOF
c960c18f 9216if { (eval echo configure:9217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9217 rm -rf conftest*
9218 gdb_cv_have_aix_thread_debug=yes
9219else
9220 echo "configure: failed program was:" >&5
9221 cat conftest.$ac_ext >&5
9222 rm -rf conftest*
9223 gdb_cv_have_aix_thread_debug=no
9224fi
9225rm -f conftest*
9226fi
9227
9228 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9229 if test $gdb_cv_have_aix_thread_debug = yes; then
9230 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9231 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9232 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9233 fi
9234 ;;
c906108c
SS
9235 esac
9236
9237fi
9238
3f47be5c
EZ
9239if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9240 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
c960c18f 9241echo "configure:9242: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9242if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9243 echo $ac_n "(cached) $ac_c" 1>&6
9244else
9245 cat > conftest.$ac_ext <<EOF
c960c18f 9246#line 9247 "configure"
3f47be5c
EZ
9247#include "confdefs.h"
9248#include <thread_db.h>
9249int main() {
9250int i = TD_NOTALLOC;
9251; return 0; }
9252EOF
c960c18f 9253if { (eval echo configure:9254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9254 rm -rf conftest*
9255 gdb_cv_thread_db_h_has_td_notalloc=yes
9256else
9257 echo "configure: failed program was:" >&5
9258 cat conftest.$ac_ext >&5
9259 rm -rf conftest*
9260 gdb_cv_thread_db_h_has_td_notalloc=no
9261
9262fi
9263rm -f conftest*
9264
9265fi
9266
9267echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9268fi
9269if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9270 cat >> confdefs.h <<\EOF
9271#define THREAD_DB_HAS_TD_NOTALLOC 1
9272EOF
9273
9274fi
9275
b757528f
JJ
9276if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9277 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
c960c18f 9278echo "configure:9279: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9279if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9280 echo $ac_n "(cached) $ac_c" 1>&6
9281else
9282 cat > conftest.$ac_ext <<EOF
c960c18f 9283#line 9284 "configure"
b757528f
JJ
9284#include "confdefs.h"
9285#include <sys/syscall.h>
9286int main() {
9287int i = __NR_tkill;
9288; return 0; }
9289EOF
c960c18f 9290if { (eval echo configure:9291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9291 rm -rf conftest*
9292 gdb_cv_sys_syscall_h_has_tkill=yes
9293else
9294 echo "configure: failed program was:" >&5
9295 cat conftest.$ac_ext >&5
9296 rm -rf conftest*
9297 gdb_cv_sys_syscall_h_has_tkill=no
9298
9299fi
9300rm -f conftest*
9301
9302fi
9303
9304echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9305fi
9306if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9307 cat >> confdefs.h <<\EOF
9308#define HAVE_TKILL_SYSCALL 1
9309EOF
9310
9311fi
9312
fb40c209 9313
030292b7
DJ
9314# Check whether --with-sysroot or --without-sysroot was given.
9315if test "${with_sysroot+set}" = set; then
9316 withval="$with_sysroot"
9317
9318 case ${with_sysroot} in
715d1656 9319 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9320 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9321 esac
9322
9323 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9324
9325 if test "x$exec_prefix" = xNONE; then
9326 if test "x$prefix" = xNONE; then
9327 test_prefix=/usr/local
9328 else
9329 test_prefix=$prefix
9330 fi
9331 else
9332 test_prefix=$exec_prefix
9333 fi
9334 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9335 "${test_prefix}"|"${test_prefix}/"*|\
9336 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9337 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9338 TARGET_SYSTEM_ROOT_DEFINE="$t"
9339 ;;
9340 esac
9341
9342else
9343
9344 TARGET_SYSTEM_ROOT=
9345 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9346
9347fi
9348
9349
9350
9351
3b851bce
AC
9352# NOTE: Don't add -Wall or -Wunused, they both include
9353# -Wunused-parameter which reports bogus warnings.
9354# NOTE: If you add to this list, remember to update
9355# gdb/doc/gdbint.texinfo.
1decb323 9356build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9357-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9358-Wunused-label -Wunused-function"
d8038014 9359# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9360# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9361# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9362# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9363# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9364# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9365# Check whether --enable-build-warnings or --disable-build-warnings was given.
9366if test "${enable_build_warnings+set}" = set; then
9367 enableval="$enable_build_warnings"
1decb323 9368 case "${enableval}" in
c906108c
SS
9369 yes) ;;
9370 no) build_warnings="-w";;
9371 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9372 build_warnings="${build_warnings} ${t}";;
9373 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9374 build_warnings="${t} ${build_warnings}";;
9375 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9376esac
d4f3574e 9377if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9378 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9379fi
1decb323 9380fi
3b851bce
AC
9381# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9382if test "${enable_gdb_build_warnings+set}" = set; then
9383 enableval="$enable_gdb_build_warnings"
9384 case "${enableval}" in
9385 yes) ;;
9386 no) build_warnings="-w";;
9387 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9388 build_warnings="${build_warnings} ${t}";;
9389 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9390 build_warnings="${t} ${build_warnings}";;
9391 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9392esac
9393if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9394 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9395fi
9396fi
104c1213
JM
9397WARN_CFLAGS=""
9398WERROR_CFLAGS=""
c906108c
SS
9399if test "x${build_warnings}" != x -a "x$GCC" = xyes
9400then
746a987d 9401 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
c960c18f 9402echo "configure:9403: checking compiler warning flags" >&5
746a987d
AC
9403 # Separate out the -Werror flag as some files just cannot be
9404 # compiled with it enabled.
9405 for w in ${build_warnings}; do
9406 case $w in
9407 -Werr*) WERROR_CFLAGS=-Werror ;;
9408 *) # Check that GCC accepts it
4536bbc6
AC
9409 saved_CFLAGS="$CFLAGS"
9410 CFLAGS="$CFLAGS $w"
9411 cat > conftest.$ac_ext <<EOF
c960c18f 9412#line 9413 "configure"
4536bbc6
AC
9413#include "confdefs.h"
9414
9415int main() {
9416
9417; return 0; }
9418EOF
c960c18f 9419if { (eval echo configure:9420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9420 rm -rf conftest*
9421 WARN_CFLAGS="${WARN_CFLAGS} $w"
9422else
9423 echo "configure: failed program was:" >&5
9424 cat conftest.$ac_ext >&5
9425fi
9426rm -f conftest*
9427 CFLAGS="$saved_CFLAGS"
746a987d
AC
9428 esac
9429 done
9430 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9431fi
9432
9433
104c1213 9434
7a292a7a
SS
9435# In the Cygwin environment, we need some additional flags.
9436echo $ac_n "checking for cygwin""... $ac_c" 1>&6
c960c18f 9437echo "configure:9438: checking for cygwin" >&5
7a292a7a
SS
9438if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9439 echo $ac_n "(cached) $ac_c" 1>&6
9440else
9441 cat > conftest.$ac_ext <<EOF
c960c18f 9442#line 9443 "configure"
7a292a7a
SS
9443#include "confdefs.h"
9444
9445#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9446lose
9447#endif
9448EOF
9449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9450 egrep "lose" >/dev/null 2>&1; then
9451 rm -rf conftest*
9452 gdb_cv_os_cygwin=yes
9453else
9454 rm -rf conftest*
9455 gdb_cv_os_cygwin=no
9456fi
9457rm -f conftest*
9458
9459fi
9460
9461echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9462
aff38e61
AC
9463
9464SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9465case ${host} in
95cbc983
AC
9466 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9467 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9468esac
9469
9470
cd0fc7c3
SS
9471# libreadline needs libuser32.a in a cygwin environment
9472WIN32LIBS=
9473if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9474 WIN32LIBS="-luser32"
9475 case "${target}" in
9476 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9477 ;;
9478 esac
cd0fc7c3 9479fi
c906108c 9480
7a292a7a 9481
3fc11d3e
JM
9482LIBGUI="../libgui/src/libgui.a"
9483GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9484
9485
7a292a7a 9486
3fc11d3e
JM
9487WIN32LDAPP=
9488
9489
9490
9491configdir="unix"
9492
9493GDBTKLIBS=
9494if test "${enable_gdbtk}" = "yes"; then
9495
d1c3b63a
KS
9496 # Gdbtk must have an absolute path to srcdir in order to run
9497 # properly when not installed.
9498 here=`pwd`
9499 cd ${srcdir}
9500 GDBTK_SRC_DIR=`pwd`
9501 cd $here
9502
3fc11d3e
JM
9503
9504#
9505# Ok, lets find the tcl configuration
9506# First, look for one uninstalled.
9507# the alternative search directory is invoked by --with-tclconfig
9508#
9509
9510if test x"${no_tcl}" = x ; then
9511 # we reset no_tcl in case something fails here
9512 no_tcl=true
9513 # Check whether --with-tclconfig or --without-tclconfig was given.
9514if test "${with_tclconfig+set}" = set; then
9515 withval="$with_tclconfig"
9516 with_tclconfig=${withval}
9517fi
9518
9519 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
c960c18f 9520echo "configure:9521: checking for Tcl configuration" >&5
3fc11d3e
JM
9521 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9522 echo $ac_n "(cached) $ac_c" 1>&6
9523else
9524
9525
9526 # First check to see if --with-tclconfig was specified.
9527 if test x"${with_tclconfig}" != x ; then
9528 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9529 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9530 else
9531 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9532 fi
9533 fi
9534
9535 # then check for a private Tcl installation
9536 if test x"${ac_cv_c_tclconfig}" = x ; then
9537 for i in \
9538 ../tcl \
9539 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9540 ../../tcl \
9541 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9542 ../../../tcl \
9543 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9544 if test -f "$i/${configdir}/tclConfig.sh" ; then
9545 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9546 break
9547 fi
9548 done
9549 fi
9550 # check in a few common install locations
9551 if test x"${ac_cv_c_tclconfig}" = x ; then
9552 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9553 if test -f "$i/tclConfig.sh" ; then
9554 ac_cv_c_tclconfig=`(cd $i; pwd)`
9555 break
9556 fi
9557 done
9558 fi
9559 # check in a few other private locations
9560 if test x"${ac_cv_c_tclconfig}" = x ; then
9561 for i in \
9562 ${srcdir}/../tcl \
9563 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9564 if test -f "$i/${configdir}/tclConfig.sh" ; then
9565 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9566 break
9567 fi
9568 done
9569 fi
9570
9571fi
9572
9573 if test x"${ac_cv_c_tclconfig}" = x ; then
9574 TCLCONFIG="# no Tcl configs found"
9575 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9576 else
9577 no_tcl=
9578 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9579 echo "$ac_t""found $TCLCONFIG" 1>&6
9580 fi
9581fi
9582
9583 if test -z "${no_tcl}"; then
9584
9585 . $TCLCONFIG
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
033afc63 9606
3fc11d3e
JM
9607
9608
9609
9610
9611
9612
9613#
9614# Ok, lets find the tk configuration
9615# First, look for one uninstalled.
9616# the alternative search directory is invoked by --with-tkconfig
9617#
9618
9619if test x"${no_tk}" = x ; then
9620 # we reset no_tk in case something fails here
9621 no_tk=true
9622 # Check whether --with-tkconfig or --without-tkconfig was given.
9623if test "${with_tkconfig+set}" = set; then
9624 withval="$with_tkconfig"
9625 with_tkconfig=${withval}
9626fi
9627
9628 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
c960c18f 9629echo "configure:9630: checking for Tk configuration" >&5
3fc11d3e
JM
9630 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9631 echo $ac_n "(cached) $ac_c" 1>&6
9632else
9633
9634
9635 # First check to see if --with-tkconfig was specified.
9636 if test x"${with_tkconfig}" != x ; then
9637 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9638 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9639 else
9640 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9641 fi
9642 fi
9643
9644 # then check for a private Tk library
9645 if test x"${ac_cv_c_tkconfig}" = x ; then
9646 for i in \
9647 ../tk \
9648 `ls -dr ../tk[4-9]* 2>/dev/null` \
9649 ../../tk \
9650 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9651 ../../../tk \
9652 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9653 if test -f "$i/${configdir}/tkConfig.sh" ; then
9654 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9655 break
9656 fi
9657 done
9658 fi
9659 # check in a few common install locations
9660 if test x"${ac_cv_c_tkconfig}" = x ; then
9661 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9662 if test -f "$i/tkConfig.sh" ; then
9663 ac_cv_c_tkconfig=`(cd $i; pwd)`
9664 break
9665 fi
9666 done
9667 fi
9668 # check in a few other private locations
9669 if test x"${ac_cv_c_tkconfig}" = x ; then
9670 for i in \
9671 ${srcdir}/../tk \
9672 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9673 if test -f "$i/${configdir}/tkConfig.sh" ; then
9674 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9675 break
9676 fi
9677 done
9678 fi
9679
9680fi
9681
9682 if test x"${ac_cv_c_tkconfig}" = x ; then
9683 TKCONFIG="# no Tk configs found"
9684 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9685 else
9686 no_tk=
9687 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9688 echo "$ac_t""found $TKCONFIG" 1>&6
9689 fi
9690fi
9691
9692
9693
dd2504ab
JM
9694 # now look for Tcl library stuff
9695
9696 case "${host}" in
9697 *-*-cygwin*)
9698 tcldir=../tcl/win/
9699 ;;
9700 *)
9701 tcldir=../tcl/unix/
9702 ;;
9703 esac
9704
9705 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9706
3fc11d3e
JM
9707 # If $no_tk is nonempty, then we can't do Tk, and there is no
9708 # point to doing Tcl.
9709 if test -z "${no_tk}"; then
9710
9711 if test -f "$TKCONFIG" ; then
9712 . $TKCONFIG
9713 fi
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728#
9729# Ok, lets find the tcl source trees so we can use the headers
9730# Warning: transition of version 9 to 10 will break this algorithm
9731# because 10 sorts before 9. We also look for just tcl. We have to
9732# be careful that we don't match stuff like tclX by accident.
9733# the alternative search directory is involked by --with-tclinclude
9734#
9735
9736no_tcl=true
9737echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
c960c18f 9738echo "configure:9739: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9739# Check whether --with-tclinclude or --without-tclinclude was given.
9740if test "${with_tclinclude+set}" = set; then
9741 withval="$with_tclinclude"
9742 with_tclinclude=${withval}
9743fi
9744
9745if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9746 echo $ac_n "(cached) $ac_c" 1>&6
9747else
9748
9749# first check to see if --with-tclinclude was specified
9750if test x"${with_tclinclude}" != x ; then
9751 if test -f ${with_tclinclude}/tclInt.h ; then
9752 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9753 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9754 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9755 else
9756 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9757 fi
9758fi
9759
9760# next check if it came with Tcl configuration file
9761if test x"${ac_cv_c_tclconfig}" = x ; then
9762 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9763 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9764 fi
9765fi
9766
9767# next check in private source directory
9768#
9769# since ls returns lowest version numbers first, reverse its output
9770if test x"${ac_cv_c_tclh}" = x ; then
9771 for i in \
9772 ${srcdir}/../tcl \
9773 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9774 ${srcdir}/../../tcl \
9775 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9776 ${srcdir}/../../../tcl \
9777 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9778 if test -f $i/generic/tclInt.h ; then
9779 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9780 break
9781 fi
9782 done
9783fi
9784# finally check in a few common install locations
9785#
9786# since ls returns lowest version numbers first, reverse its output
9787if test x"${ac_cv_c_tclh}" = x ; then
9788 for i in \
9789 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9790 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9791 /usr/local/src/tcl \
9792 /usr/local/lib/tcl \
9793 ${prefix}/include ; do
9794 if test -f $i/generic/tclInt.h ; then
9795 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9796 break
9797 fi
9798 done
9799fi
9800# see if one is installed
9801if test x"${ac_cv_c_tclh}" = x ; then
9802 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9803echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
c960c18f 9804echo "configure:9805: checking for tclInt.h" >&5
3fc11d3e
JM
9805if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9806 echo $ac_n "(cached) $ac_c" 1>&6
9807else
9808 cat > conftest.$ac_ext <<EOF
c960c18f 9809#line 9810 "configure"
3fc11d3e
JM
9810#include "confdefs.h"
9811#include <tclInt.h>
9812EOF
9813ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c960c18f 9814{ (eval echo configure:9815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9815ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9816if test -z "$ac_err"; then
9817 rm -rf conftest*
9818 eval "ac_cv_header_$ac_safe=yes"
9819else
9820 echo "$ac_err" >&5
9821 echo "configure: failed program was:" >&5
9822 cat conftest.$ac_ext >&5
9823 rm -rf conftest*
9824 eval "ac_cv_header_$ac_safe=no"
9825fi
9826rm -f conftest*
9827fi
9828if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9829 echo "$ac_t""yes" 1>&6
9830 ac_cv_c_tclh=installed
9831else
9832 echo "$ac_t""no" 1>&6
9833ac_cv_c_tclh=""
9834fi
9835
9836fi
9837
9838fi
9839
9840if test x"${ac_cv_c_tclh}" = x ; then
9841 TCLHDIR="# no Tcl private headers found"
9842 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9843fi
9844if test x"${ac_cv_c_tclh}" != x ; then
9845 no_tcl=""
9846 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9847 echo "$ac_t""is installed" 1>&6
9848 TCLHDIR=""
9849 else
9850 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9851 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9852 TCLHDIR="-I${ac_cv_c_tclh}"
9853 fi
9854fi
9855
9856
9857
9858
9859#
9860# Ok, lets find the tk source trees so we can use the headers
9861# If the directory (presumably symlink) named "tk" exists, use that one
9862# in preference to any others. Same logic is used when choosing library
9863# and again with Tcl. The search order is the best place to look first, then in
9864# decreasing significance. The loop breaks if the trigger file is found.
9865# Note the gross little conversion here of srcdir by cd'ing to the found
9866# directory. This converts the path from a relative to an absolute, so
9867# recursive cache variables for the path will work right. We check all
9868# the possible paths in one loop rather than many seperate loops to speed
9869# things up.
9870# the alternative search directory is involked by --with-tkinclude
9871#
9872no_tk=true
9873echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
c960c18f 9874echo "configure:9875: checking for Tk private headers" >&5
3fc11d3e
JM
9875# Check whether --with-tkinclude or --without-tkinclude was given.
9876if test "${with_tkinclude+set}" = set; then
9877 withval="$with_tkinclude"
9878 with_tkinclude=${withval}
9879fi
9880
9881if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9882 echo $ac_n "(cached) $ac_c" 1>&6
9883else
9884
9885# first check to see if --with-tkinclude was specified
9886if test x"${with_tkinclude}" != x ; then
9887 if test -f ${with_tkinclude}/tk.h ; then
9888 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9889 elif test -f ${with_tkinclude}/generic/tk.h ; then
9890 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9891 else
9892 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9893 fi
9894fi
9895
9896# next check if it came with Tk configuration file
9897if test x"${ac_cv_c_tkconfig}" = x ; then
9898 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9899 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9900 fi
9901fi
9902
9903# next check in private source directory
9904#
9905# since ls returns lowest version numbers first, reverse its output
9906if test x"${ac_cv_c_tkh}" = x ; then
9907 for i in \
9908 ${srcdir}/../tk \
9909 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9910 ${srcdir}/../../tk \
9911 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9912 ${srcdir}/../../../tk \
9913 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9914 if test -f $i/generic/tk.h ; then
9915 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9916 break
9917 fi
9918 done
9919fi
9920# finally check in a few common install locations
9921#
9922# since ls returns lowest version numbers first, reverse its output
9923if test x"${ac_cv_c_tkh}" = x ; then
9924 for i in \
9925 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9926 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9927 /usr/local/src/tk \
9928 /usr/local/lib/tk \
9929 ${prefix}/include ; do
9930 if test -f $i/generic/tk.h ; then
9931 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9932 break
9933 fi
9934 done
9935fi
9936# see if one is installed
9937if test x"${ac_cv_c_tkh}" = x ; then
9938 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9939echo $ac_n "checking for tk.h""... $ac_c" 1>&6
c960c18f 9940echo "configure:9941: checking for tk.h" >&5
3fc11d3e
JM
9941if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9942 echo $ac_n "(cached) $ac_c" 1>&6
9943else
9944 cat > conftest.$ac_ext <<EOF
c960c18f 9945#line 9946 "configure"
3fc11d3e
JM
9946#include "confdefs.h"
9947#include <tk.h>
9948EOF
9949ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c960c18f 9950{ (eval echo configure:9951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9951ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9952if test -z "$ac_err"; then
9953 rm -rf conftest*
9954 eval "ac_cv_header_$ac_safe=yes"
9955else
9956 echo "$ac_err" >&5
9957 echo "configure: failed program was:" >&5
9958 cat conftest.$ac_ext >&5
9959 rm -rf conftest*
9960 eval "ac_cv_header_$ac_safe=no"
9961fi
9962rm -f conftest*
9963fi
9964if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9965 echo "$ac_t""yes" 1>&6
9966 ac_cv_c_tkh=installed
9967else
9968 echo "$ac_t""no" 1>&6
9969ac_cv_c_tkh=""
9970fi
9971
9972fi
9973
9974fi
9975
9976if test x"${ac_cv_c_tkh}" != x ; then
9977 no_tk=""
9978 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9979 echo "$ac_t""is installed" 1>&6
9980 TKHDIR=""
9981 else
9982 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9983 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9984 TKHDIR="-I${ac_cv_c_tkh}"
9985 fi
9986else
9987 TKHDIR="# no Tk directory found"
9988 echo "configure: warning: Can't find Tk private headers" 1>&2
9989 no_tk=true
9990fi
9991
9992
9993
9994
9995echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
c960c18f 9996echo "configure:9997: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9997if test x"${ac_cv_c_itclh}" = x ; then
9998 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9999 if test -f $i/generic/itcl.h ; then
10000 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10001 break
10002 fi
10003 done
10004fi
10005if test x"${ac_cv_c_itclh}" = x ; then
10006 ITCLHDIR="# no Itcl private headers found"
10007 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10008fi
10009if test x"${ac_cv_c_itclh}" != x ; then
10010 ITCLHDIR="-I${ac_cv_c_itclh}"
10011fi
10012# should always be here
10013# ITCLLIB="../itcl/itcl/unix/libitcl.a"
10014
10015#AC_SUBST(ITCLLIB)
10016
10017
10018echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
c960c18f 10019echo "configure:10020: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
10020if test x"${ac_cv_c_itkh}" = x ; then
10021 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10022 if test -f $i/generic/itk.h ; then
10023 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10024 break
10025 fi
10026 done
10027fi
10028if test x"${ac_cv_c_itkh}" = x ; then
10029 ITKHDIR="# no Itk private headers found"
10030 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10031fi
10032if test x"${ac_cv_c_itkh}" != x ; then
10033 ITKHDIR="-I${ac_cv_c_itkh}"
10034fi
10035# should always be here
10036# ITKLIB="../itcl/itk/unix/libitk.a"
10037
10038#AC_SUBST(ITKLIB)
10039
3fc11d3e 10040
dd2504ab
JM
10041
10042 # now look for Tk library stuff
10043
10044 case "${host}" in
10045 *-*-cygwin*)
10046 tkdir=../tk/win/
10047 ;;
10048 *)
10049 tkdir=../tk/unix/
10050 ;;
10051 esac
10052
10053 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10054
3fc11d3e
JM
10055 # now look for Itcl library stuff
10056
10057
10058#
10059# Ok, lets find the itcl configuration
10060# First, look for one uninstalled.
10061# the alternative search directory is invoked by --with-itclconfig
10062#
10063
10064if test x"${no_itcl}" = x ; then
10065 # we reset no_itcl in case something fails here
10066 no_itcl=true
10067 # Check whether --with-itclconfig or --without-itclconfig was given.
10068if test "${with_itclconfig+set}" = set; then
10069 withval="$with_itclconfig"
10070 with_itclconfig=${withval}
10071fi
10072
10073 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
c960c18f 10074echo "configure:10075: checking for Itcl configuration" >&5
3fc11d3e
JM
10075 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10076 echo $ac_n "(cached) $ac_c" 1>&6
10077else
10078
10079
10080 # First check to see if --with-itclconfig was specified.
10081 if test x"${with_itclconfig}" != x ; then
10082 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10083 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10084 else
10085 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10086 fi
10087 fi
10088
10089 # then check for a private Itcl library
10090 if test x"${ac_cv_c_itclconfig}" = x ; then
10091 for i in \
10092 ../itcl/itcl \
10093 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10094 ../../itcl \
10095 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10096 ../../../itcl \
10097 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10098 if test -f "$i/itclConfig.sh" ; then
10099 ac_cv_c_itclconfig=`(cd $i; pwd)`
10100 break
10101 fi
10102 done
10103 fi
10104 # check in a few common install locations
10105 if test x"${ac_cv_c_itclconfig}" = x ; then
10106 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10107 if test -f "$i/itclConfig.sh" ; then
10108 ac_cv_c_itclconfig=`(cd $i; pwd)`
10109 break
10110 fi
10111 done
10112 fi
10113 # check in a few other private locations
10114 if test x"${ac_cv_c_itclconfig}" = x ; then
10115 for i in \
10116 ${srcdir}/../itcl/itcl \
10117 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10118 if test -f "$i/itclConfig.sh" ; then
10119 ac_cv_c_itclconfig=`(cd $i; pwd)`
10120 break
10121 fi
10122 done
10123 fi
10124
10125fi
10126
10127 if test x"${ac_cv_c_itclconfig}" = x ; then
10128 ITCLCONFIG="# no Itcl configs found"
10129 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10130 else
10131 no_itcl=
10132 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10133 echo "$ac_t""found $ITCLCONFIG" 1>&6
10134 fi
10135fi
10136
10137 if test -z "${no_itcl}"; then
10138
10139 if test -f "$ITCLCONFIG" ; then
10140 . $ITCLCONFIG
10141 fi
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
3fc11d3e
JM
10152
10153
10154 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10155 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10156 fi
10157
10158
10159 # now look for Itk library stuff
10160
10161#
10162# Ok, lets find the itk configuration
10163# First, look for one uninstalled.
10164# the alternative search directory is invoked by --with-itkconfig
10165#
10166
10167if test x"${no_itk}" = x ; then
10168 # we reset no_itk in case something fails here
10169 no_itk=true
10170 # Check whether --with-itkconfig or --without-itkconfig was given.
10171if test "${with_itkconfig+set}" = set; then
10172 withval="$with_itkconfig"
10173 with_itkconfig=${withval}
10174fi
10175
10176 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
c960c18f 10177echo "configure:10178: checking for Itk configuration" >&5
3fc11d3e
JM
10178 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10179 echo $ac_n "(cached) $ac_c" 1>&6
10180else
10181
10182
10183 # First check to see if --with-itkconfig was specified.
10184 if test x"${with_itkconfig}" != x ; then
10185 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10186 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10187 else
10188 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10189 fi
10190 fi
10191
10192 # then check for a private Itk library
10193 if test x"${ac_cv_c_itkconfig}" = x ; then
10194 for i in \
10195 ../itcl/itk \
10196 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10197 ../../itk \
10198 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10199 ../../../itk \
10200 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10201 if test -f "$i/itkConfig.sh" ; then
10202 ac_cv_c_itkconfig=`(cd $i; pwd)`
10203 break
10204 fi
10205 done
10206 fi
10207 # check in a few common install locations
10208 if test x"${ac_cv_c_itkconfig}" = x ; then
10209 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10210 if test -f "$i/itkConfig.sh" ; then
10211 ac_cv_c_itkconfig=`(cd $i; pwd)`
10212 break
10213 fi
10214 done
10215 fi
10216 # check in a few other private locations
10217 if test x"${ac_cv_c_itkconfig}" = x ; then
10218 for i in \
10219 ${srcdir}/../itcl/itk \
10220 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10221 if test -f "$i/itkConfig.sh" ; then
10222 ac_cv_c_itkconfig=`(cd $i; pwd)`
10223 break
10224 fi
10225 done
10226 fi
10227
10228fi
10229
10230 if test x"${ac_cv_c_itkconfig}" = x ; then
10231 ITKCONFIG="# no Itk configs found"
10232 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10233 else
10234 no_itk=
10235 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10236 echo "$ac_t""found $ITKCONFIG" 1>&6
10237 fi
10238fi
10239
10240
10241 if test -z "${no_itcl}"; then
10242
10243 if test -f "$ITKCONFIG" ; then
10244 . $ITKCONFIG
10245 fi
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
3fc11d3e 10258 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10259 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10260 fi
10261
4226a5a5 10262 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10263 # Tcl/Tk 8.1 require -fwritable strings. I don't
10264 # know whether 8.2 will or not, but I bet it will.
10265 # I don't have to worry about 7.x since we don't support it.
10266 GDBTK_CFLAGS=""
10267 if test "$GCC" = "yes"; then
10268 if test "$TCL_VERSION" != "8.0" ; then
10269 GDBTK_CFLAGS="-fwritable-strings"
10270 fi
10271 fi
10272
10273 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10274 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10275 # Yes, the ordering seems wrong here. But it isn't.
10276 # TK_LIBS is the list of libraries that need to be linked
10277 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10278 # were in LIBS then any link tests after this point would
10279 # try to include things like `$(LIBGUI)', which wouldn't work.
10280 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10281
10282 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10283 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10284 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10285 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10286 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10287 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10288 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10289
10290 if test x$gdb_cv_os_cygwin = xyes; then
10291 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10292 WIN32LDAPP="-Wl,--subsystem,console"
10293 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10294 fi
10295 fi
10296 fi
ffc6a242 10297
ffc6a242 10298 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10299fi
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
dd2504ab 10313
c906108c
SS
10314# If we find X, set shell vars x_includes and x_libraries to the
10315# paths, otherwise set no_x=yes.
10316# Uses ac_ vars as temps to allow command line to override cache and checks.
10317# --without-x overrides everything else, but does not touch the cache.
10318echo $ac_n "checking for X""... $ac_c" 1>&6
c960c18f 10319echo "configure:10320: checking for X" >&5
c906108c
SS
10320
10321# Check whether --with-x or --without-x was given.
10322if test "${with_x+set}" = set; then
10323 withval="$with_x"
10324 :
10325fi
10326
10327# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10328if test "x$with_x" = xno; then
10329 # The user explicitly disabled X.
10330 have_x=disabled
10331else
10332 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10333 # Both variables are already set.
10334 have_x=yes
10335 else
10336if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10337 echo $ac_n "(cached) $ac_c" 1>&6
10338else
10339 # One or both of the vars are not set, and there is no cached value.
10340ac_x_includes=NO ac_x_libraries=NO
10341rm -fr conftestdir
10342if mkdir conftestdir; then
10343 cd conftestdir
10344 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10345 cat > Imakefile <<'EOF'
10346acfindx:
10347 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10348EOF
10349 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10350 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10351 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10352 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10353 for ac_extension in a so sl; do
10354 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10355 test -f $ac_im_libdir/libX11.$ac_extension; then
10356 ac_im_usrlibdir=$ac_im_libdir; break
10357 fi
10358 done
10359 # Screen out bogus values from the imake configuration. They are
10360 # bogus both because they are the default anyway, and because
10361 # using them would break gcc on systems where it needs fixed includes.
10362 case "$ac_im_incroot" in
10363 /usr/include) ;;
10364 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10365 esac
10366 case "$ac_im_usrlibdir" in
10367 /usr/lib | /lib) ;;
10368 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10369 esac
10370 fi
10371 cd ..
10372 rm -fr conftestdir
10373fi
10374
10375if test "$ac_x_includes" = NO; then
10376 # Guess where to find include files, by looking for this one X11 .h file.
10377 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10378
10379 # First, try using that file with no special directory specified.
10380cat > conftest.$ac_ext <<EOF
c960c18f 10381#line 10382 "configure"
c906108c
SS
10382#include "confdefs.h"
10383#include <$x_direct_test_include>
10384EOF
10385ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
c960c18f 10386{ (eval echo configure:10387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10387ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10388if test -z "$ac_err"; then
10389 rm -rf conftest*
10390 # We can compile using X headers with no special include directory.
10391ac_x_includes=
10392else
10393 echo "$ac_err" >&5
10394 echo "configure: failed program was:" >&5
10395 cat conftest.$ac_ext >&5
10396 rm -rf conftest*
10397 # Look for the header file in a standard set of common directories.
10398# Check X11 before X11Rn because it is often a symlink to the current release.
10399 for ac_dir in \
10400 /usr/X11/include \
10401 /usr/X11R6/include \
10402 /usr/X11R5/include \
10403 /usr/X11R4/include \
10404 \
10405 /usr/include/X11 \
10406 /usr/include/X11R6 \
10407 /usr/include/X11R5 \
10408 /usr/include/X11R4 \
10409 \
10410 /usr/local/X11/include \
10411 /usr/local/X11R6/include \
10412 /usr/local/X11R5/include \
10413 /usr/local/X11R4/include \
10414 \
10415 /usr/local/include/X11 \
10416 /usr/local/include/X11R6 \
10417 /usr/local/include/X11R5 \
10418 /usr/local/include/X11R4 \
10419 \
10420 /usr/X386/include \
10421 /usr/x386/include \
10422 /usr/XFree86/include/X11 \
10423 \
10424 /usr/include \
10425 /usr/local/include \
10426 /usr/unsupported/include \
10427 /usr/athena/include \
10428 /usr/local/x11r5/include \
10429 /usr/lpp/Xamples/include \
10430 \
10431 /usr/openwin/include \
10432 /usr/openwin/share/include \
10433 ; \
10434 do
10435 if test -r "$ac_dir/$x_direct_test_include"; then
10436 ac_x_includes=$ac_dir
10437 break
10438 fi
10439 done
10440fi
10441rm -f conftest*
10442fi # $ac_x_includes = NO
10443
10444if test "$ac_x_libraries" = NO; then
10445 # Check for the libraries.
10446
10447 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10448 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10449
10450 # See if we find them without any special options.
10451 # Don't add to $LIBS permanently.
10452 ac_save_LIBS="$LIBS"
10453 LIBS="-l$x_direct_test_library $LIBS"
10454cat > conftest.$ac_ext <<EOF
c960c18f 10455#line 10456 "configure"
c906108c
SS
10456#include "confdefs.h"
10457
10458int main() {
10459${x_direct_test_function}()
10460; return 0; }
10461EOF
c960c18f 10462if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10463 rm -rf conftest*
10464 LIBS="$ac_save_LIBS"
10465# We can link X programs with no special library path.
10466ac_x_libraries=
10467else
10468 echo "configure: failed program was:" >&5
10469 cat conftest.$ac_ext >&5
10470 rm -rf conftest*
10471 LIBS="$ac_save_LIBS"
10472# First see if replacing the include by lib works.
10473# Check X11 before X11Rn because it is often a symlink to the current release.
10474for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10475 /usr/X11/lib \
10476 /usr/X11R6/lib \
10477 /usr/X11R5/lib \
10478 /usr/X11R4/lib \
10479 \
10480 /usr/lib/X11 \
10481 /usr/lib/X11R6 \
10482 /usr/lib/X11R5 \
10483 /usr/lib/X11R4 \
10484 \
10485 /usr/local/X11/lib \
10486 /usr/local/X11R6/lib \
10487 /usr/local/X11R5/lib \
10488 /usr/local/X11R4/lib \
10489 \
10490 /usr/local/lib/X11 \
10491 /usr/local/lib/X11R6 \
10492 /usr/local/lib/X11R5 \
10493 /usr/local/lib/X11R4 \
10494 \
10495 /usr/X386/lib \
10496 /usr/x386/lib \
10497 /usr/XFree86/lib/X11 \
10498 \
10499 /usr/lib \
10500 /usr/local/lib \
10501 /usr/unsupported/lib \
10502 /usr/athena/lib \
10503 /usr/local/x11r5/lib \
10504 /usr/lpp/Xamples/lib \
10505 /lib/usr/lib/X11 \
10506 \
10507 /usr/openwin/lib \
10508 /usr/openwin/share/lib \
10509 ; \
10510do
10511 for ac_extension in a so sl; do
10512 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10513 ac_x_libraries=$ac_dir
10514 break 2
10515 fi
10516 done
10517done
10518fi
10519rm -f conftest*
10520fi # $ac_x_libraries = NO
10521
10522if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10523 # Didn't find X anywhere. Cache the known absence of X.
10524 ac_cv_have_x="have_x=no"
10525else
10526 # Record where we found X for the cache.
10527 ac_cv_have_x="have_x=yes \
10528 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10529fi
10530fi
10531 fi
10532 eval "$ac_cv_have_x"
10533fi # $with_x != no
10534
10535if test "$have_x" != yes; then
10536 echo "$ac_t""$have_x" 1>&6
10537 no_x=yes
10538else
10539 # If each of the values was on the command line, it overrides each guess.
10540 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10541 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10542 # Update the cache value to reflect the command line values.
10543 ac_cv_have_x="have_x=yes \
10544 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10545 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10546fi
10547
10548
7a292a7a
SS
10549
10550# Unlike the sim directory, whether a simulator is linked is controlled by
10551# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10552# This code just checks for a few cases where we'd like to ignore those
10553# definitions, even when they're present in the '.mt' file. These cases
10554# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10555# not part of the source tree.
7a292a7a
SS
10556#
10557# Check whether --enable-sim or --disable-sim was given.
10558if test "${enable_sim+set}" = set; then
10559 enableval="$enable_sim"
10560 echo "enable_sim = $enable_sim";
10561 echo "enableval = ${enableval}";
10562 case "${enableval}" in
10563 yes) ignore_sim=false ;;
10564 no) ignore_sim=true ;;
10565 *) ignore_sim=false ;;
10566 esac
10567else
10568 ignore_sim=false
10569fi
10570
10571
10572if test ! -d "${srcdir}/../sim"; then
10573 ignore_sim=true
10574fi
10575
10576if test "${ignore_sim}" = "true"; then
10577 IGNORE_SIM="SIM="
10578 IGNORE_SIM_OBS="SIM_OBS="
10579else
10580 IGNORE_SIM=""
10581 IGNORE_SIM_OBS=""
10582 cat >> confdefs.h <<\EOF
10583#define WITH_SIM 1
10584EOF
10585
10586fi
10587
10588
10589
c906108c
SS
10590
10591
10592
10593
10594
10595
dfcd3bfb 10596
e56ac5c3
AC
10597
10598
b3a90332
AC
10599
10600
c906108c
SS
10601# target_subdir is used by the testsuite to find the target libraries.
10602target_subdir=
10603if test "${host}" != "${target}"; then
10604 target_subdir="${target_alias}/"
10605fi
10606
10607
10608frags=
10609host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10610if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10611 # When building a native debuger the .mh file containing things
10612 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10613 # since it no longer contains anything useful.
10614 if test "${target}" = "${host}"; then
10615 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10616 else
10617 host_makefile_frag=/dev/null
10618 fi
c906108c
SS
10619fi
10620frags="$frags $host_makefile_frag"
10621
10622target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10623if test ! -f ${target_makefile_frag}; then
10624{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10625fi
10626frags="$frags $target_makefile_frag"
10627
10628
10629
10630
10631
10632hostfile=`sed -n '
10633s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10634' ${host_makefile_frag}`
10635
10636targetfile=`sed -n '
10637s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10638' ${target_makefile_frag}`
10639
c906108c 10640if test "${target}" = "${host}"; then
a85f51e7
DJ
10641# We pick this up from the host configuration file (.mh) because we
10642# do not have a native configuration Makefile fragment.
c906108c
SS
10643nativefile=`sed -n '
10644s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10645' ${host_makefile_frag}`
c906108c
SS
10646fi
10647
10648
b00a8037
DJ
10649if test x"${gdb_osabi}" != x ; then
10650 cat >> confdefs.h <<EOF
10651#define GDB_OSABI_DEFAULT $gdb_osabi
10652EOF
10653
10654fi
10655
8dcde887
MK
10656# Enable multi-ice-gdb-server.
10657# Check whether --enable-multi-ice or --disable-multi-ice was given.
10658if test "${enable_multi_ice+set}" = set; then
10659 enableval="$enable_multi_ice"
10660 case $enableval in
10661 yes | no)
10662 ;;
10663 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10664 esac
96baa820
JM
10665fi
10666
8dcde887
MK
10667if test "x$enable_multi_ice" = xyes; then
10668 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10669fi
10670
8dcde887
MK
10671# We only build gdbserver automatically if host and target are the same.
10672if test "x$target" = "x$host"; then
10673 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
c960c18f 10674echo "configure:10675: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10675 if test "x$build_gdbserver" = xyes; then
10676 configdirs="$configdirs gdbserver"
10677 echo "$ac_t""yes" 1>&6
10678 else
10679 echo "$ac_t""no" 1>&6
10680 fi
10681fi
10682
10683subdirs="doc testsuite $configdirs"
10684
96baa820 10685
c906108c 10686# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10687# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10688# version.
c906108c
SS
10689
10690files=
10691links=
5a2402b8 10692
c906108c 10693rm -f xm.h
5a2402b8 10694xm_h=""
c906108c 10695if test "${hostfile}" != ""; then
5a2402b8
AC
10696 xm_h=xm.h
10697 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10698 files="${files} ${GDB_XM_FILE}"
10699 links="${links} xm.h"
10700 cat >> confdefs.h <<EOF
10701#define GDB_XM_FILE ${GDB_XM_FILE}
10702EOF
10703
c906108c 10704fi
5a2402b8
AC
10705
10706
c906108c 10707rm -f tm.h
5a2402b8 10708tm_h=""
c906108c 10709if test "${targetfile}" != ""; then
5a2402b8
AC
10710 tm_h=tm.h
10711 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10712 files="${files} ${GDB_TM_FILE}"
10713 links="${links} tm.h"
10714 cat >> confdefs.h <<EOF
10715#define GDB_TM_FILE ${GDB_TM_FILE}
10716EOF
10717
c906108c 10718fi
5a2402b8
AC
10719
10720
c906108c 10721rm -f nm.h
5a2402b8 10722nm_h=""
c906108c 10723if test "${nativefile}" != ""; then
5a2402b8
AC
10724 nm_h=nm.h
10725 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10726 files="${files} ${GDB_NM_FILE}"
10727 links="${links} nm.h"
10728 cat >> confdefs.h <<EOF
10729#define GDB_NM_FILE ${GDB_NM_FILE}
10730EOF
10731
c906108c 10732fi
5a2402b8
AC
10733
10734
c906108c
SS
10735
10736
10737echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
c960c18f 10738echo "configure:10739: checking for Cygwin environment" >&5
c906108c
SS
10739if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10740 echo $ac_n "(cached) $ac_c" 1>&6
10741else
10742 cat > conftest.$ac_ext <<EOF
c960c18f 10743#line 10744 "configure"
c906108c
SS
10744#include "confdefs.h"
10745
10746int main() {
10747
10748#ifndef __CYGWIN__
10749#define __CYGWIN__ __CYGWIN32__
10750#endif
10751return __CYGWIN__;
10752; return 0; }
10753EOF
c960c18f 10754if { (eval echo configure:10755: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10755 rm -rf conftest*
10756 ac_cv_cygwin=yes
10757else
10758 echo "configure: failed program was:" >&5
10759 cat conftest.$ac_ext >&5
10760 rm -rf conftest*
10761 ac_cv_cygwin=no
10762fi
10763rm -f conftest*
10764rm -f conftest*
10765fi
10766
10767echo "$ac_t""$ac_cv_cygwin" 1>&6
10768CYGWIN=
10769test "$ac_cv_cygwin" = yes && CYGWIN=yes
10770echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
c960c18f 10771echo "configure:10772: checking for mingw32 environment" >&5
c906108c
SS
10772if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10773 echo $ac_n "(cached) $ac_c" 1>&6
10774else
10775 cat > conftest.$ac_ext <<EOF
c960c18f 10776#line 10777 "configure"
c906108c
SS
10777#include "confdefs.h"
10778
10779int main() {
10780return __MINGW32__;
10781; return 0; }
10782EOF
c960c18f 10783if { (eval echo configure:10784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10784 rm -rf conftest*
10785 ac_cv_mingw32=yes
10786else
10787 echo "configure: failed program was:" >&5
10788 cat conftest.$ac_ext >&5
10789 rm -rf conftest*
10790 ac_cv_mingw32=no
10791fi
10792rm -f conftest*
10793rm -f conftest*
10794fi
10795
10796echo "$ac_t""$ac_cv_mingw32" 1>&6
10797MINGW32=
10798test "$ac_cv_mingw32" = yes && MINGW32=yes
10799
10800
10801echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
c960c18f 10802echo "configure:10803: checking for executable suffix" >&5
c906108c
SS
10803if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10804 echo $ac_n "(cached) $ac_c" 1>&6
10805else
10806 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10807 ac_cv_exeext=.exe
10808else
10809 rm -f conftest*
10810 echo 'int main () { return 0; }' > conftest.$ac_ext
10811 ac_cv_exeext=
c960c18f 10812 if { (eval echo configure:10813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10813 for file in conftest.*; do
10814 case $file in
d836ee13 10815 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10816 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10817 esac
10818 done
10819 else
10820 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10821 fi
10822 rm -f conftest*
10823 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10824fi
10825fi
10826
10827EXEEXT=""
10828test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10829echo "$ac_t""${ac_cv_exeext}" 1>&6
10830ac_exeext=$EXEEXT
10831
10832
234b45d4
KB
10833
10834cat >> confdefs.h <<\EOF
10835#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10836EOF
10837
10838
10839
10840
10841 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10842if test "${with_libiconv_prefix+set}" = set; then
10843 withval="$with_libiconv_prefix"
10844
10845 for dir in `echo "$withval" | tr : ' '`; do
10846 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10847 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10848 done
10849
10850fi
10851
10852
10853 echo $ac_n "checking for iconv""... $ac_c" 1>&6
c960c18f 10854echo "configure:10855: checking for iconv" >&5
234b45d4
KB
10855if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10856 echo $ac_n "(cached) $ac_c" 1>&6
10857else
10858
10859 am_cv_func_iconv="no, consider installing GNU libiconv"
10860 am_cv_lib_iconv=no
10861 cat > conftest.$ac_ext <<EOF
c960c18f 10862#line 10863 "configure"
234b45d4
KB
10863#include "confdefs.h"
10864#include <stdlib.h>
10865#include <iconv.h>
10866int main() {
10867iconv_t cd = iconv_open("","");
10868 iconv(cd,NULL,NULL,NULL,NULL);
10869 iconv_close(cd);
10870; return 0; }
10871EOF
c960c18f 10872if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10873 rm -rf conftest*
10874 am_cv_func_iconv=yes
10875else
10876 echo "configure: failed program was:" >&5
10877 cat conftest.$ac_ext >&5
10878fi
10879rm -f conftest*
10880 if test "$am_cv_func_iconv" != yes; then
10881 am_save_LIBS="$LIBS"
10882 LIBS="$LIBS -liconv"
10883 cat > conftest.$ac_ext <<EOF
c960c18f 10884#line 10885 "configure"
234b45d4
KB
10885#include "confdefs.h"
10886#include <stdlib.h>
10887#include <iconv.h>
10888int main() {
10889iconv_t cd = iconv_open("","");
10890 iconv(cd,NULL,NULL,NULL,NULL);
10891 iconv_close(cd);
10892; return 0; }
10893EOF
c960c18f 10894if { (eval echo configure:10895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10895 rm -rf conftest*
10896 am_cv_lib_iconv=yes
10897 am_cv_func_iconv=yes
10898else
10899 echo "configure: failed program was:" >&5
10900 cat conftest.$ac_ext >&5
10901fi
10902rm -f conftest*
10903 LIBS="$am_save_LIBS"
10904 fi
10905
10906fi
10907
10908echo "$ac_t""$am_cv_func_iconv" 1>&6
10909 if test "$am_cv_func_iconv" = yes; then
10910 cat >> confdefs.h <<\EOF
10911#define HAVE_ICONV 1
10912EOF
10913
10914 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
c960c18f 10915echo "configure:10916: checking for iconv declaration" >&5
234b45d4
KB
10916 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10917 echo $ac_n "(cached) $ac_c" 1>&6
10918else
10919
10920 cat > conftest.$ac_ext <<EOF
c960c18f 10921#line 10922 "configure"
234b45d4
KB
10922#include "confdefs.h"
10923
10924#include <stdlib.h>
10925#include <iconv.h>
10926extern
10927#ifdef __cplusplus
10928"C"
10929#endif
10930#if defined(__STDC__) || defined(__cplusplus)
10931size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10932#else
10933size_t iconv();
10934#endif
10935
10936int main() {
10937
10938; return 0; }
10939EOF
c960c18f 10940if { (eval echo configure:10941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10941 rm -rf conftest*
10942 am_cv_proto_iconv_arg1=""
10943else
10944 echo "configure: failed program was:" >&5
10945 cat conftest.$ac_ext >&5
10946 rm -rf conftest*
10947 am_cv_proto_iconv_arg1="const"
10948fi
10949rm -f conftest*
10950 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);"
10951fi
10952
10953 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10954 echo "$ac_t""${ac_t:-
10955 }$am_cv_proto_iconv" 1>&6
10956 cat >> confdefs.h <<EOF
10957#define ICONV_CONST $am_cv_proto_iconv_arg1
10958EOF
10959
10960 fi
10961 LIBICONV=
10962 if test "$am_cv_lib_iconv" = yes; then
10963 LIBICONV="-liconv"
10964 fi
10965
10966
10967
c906108c
SS
10968trap '' 1 2 15
10969cat > confcache <<\EOF
10970# This file is a shell script that caches the results of configure
10971# tests run on this system so they can be shared between configure
10972# scripts and configure runs. It is not useful on other systems.
10973# If it contains results you don't want to keep, you may remove or edit it.
10974#
10975# By default, configure uses ./config.cache as the cache file,
10976# creating it if it does not exist already. You can give configure
10977# the --cache-file=FILE option to use a different cache file; that is
10978# what configure does when it calls configure scripts in
10979# subdirectories, so they share the cache.
10980# Giving --cache-file=/dev/null disables caching, for debugging configure.
10981# config.status only pays attention to the cache file if you give it the
10982# --recheck option to rerun configure.
10983#
10984EOF
10985# The following way of writing the cache mishandles newlines in values,
10986# but we know of no workaround that is simple, portable, and efficient.
10987# So, don't put newlines in cache variables' values.
10988# Ultrix sh set writes to stderr and can't be redirected directly,
10989# and sets the high bit in the cache file unless we assign to the vars.
10990(set) 2>&1 |
10991 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10992 *ac_space=\ *)
10993 # `set' does not quote correctly, so add quotes (double-quote substitution
10994 # turns \\\\ into \\, and sed turns \\ into \).
10995 sed -n \
10996 -e "s/'/'\\\\''/g" \
10997 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10998 ;;
10999 *)
11000 # `set' quotes correctly as required by POSIX, so do not add quotes.
11001 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11002 ;;
11003 esac >> confcache
11004if cmp -s $cache_file confcache; then
11005 :
11006else
11007 if test -w $cache_file; then
11008 echo "updating cache $cache_file"
11009 cat confcache > $cache_file
11010 else
11011 echo "not updating unwritable cache $cache_file"
11012 fi
11013fi
11014rm -f confcache
11015
11016trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11017
11018test "x$prefix" = xNONE && prefix=$ac_default_prefix
11019# Let make expand exec_prefix.
11020test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11021
11022# Any assignment to VPATH causes Sun make to only execute
11023# the first set of double-colon rules, so remove it if not needed.
11024# If there is a colon in the path, we need to keep it.
11025if test "x$srcdir" = x.; then
11026 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11027fi
11028
11029trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11030
11031DEFS=-DHAVE_CONFIG_H
11032
11033# Without the "./", some shells look in PATH for config.status.
11034: ${CONFIG_STATUS=./config.status}
11035
11036echo creating $CONFIG_STATUS
11037rm -f $CONFIG_STATUS
11038cat > $CONFIG_STATUS <<EOF
11039#! /bin/sh
11040# Generated automatically by configure.
11041# Run this file to recreate the current configuration.
11042# This directory was configured as follows,
11043# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11044#
11045# $0 $ac_configure_args
11046#
11047# Compiler output produced by configure, useful for debugging
11048# configure, is in ./config.log if it exists.
11049
11050ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11051for ac_option
11052do
11053 case "\$ac_option" in
11054 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11055 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11056 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11057 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11058 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11059 exit 0 ;;
11060 -help | --help | --hel | --he | --h)
11061 echo "\$ac_cs_usage"; exit 0 ;;
11062 *) echo "\$ac_cs_usage"; exit 1 ;;
11063 esac
11064done
11065
11066ac_given_srcdir=$srcdir
11067ac_given_INSTALL="$INSTALL"
11068
ed952ac5 11069trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
11070EOF
11071cat >> $CONFIG_STATUS <<EOF
11072
11073# Protect against being on the right side of a sed subst in config.status.
11074sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11075 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11076$ac_vpsub
11077$extrasub
11078s%@SHELL@%$SHELL%g
11079s%@CFLAGS@%$CFLAGS%g
11080s%@CPPFLAGS@%$CPPFLAGS%g
11081s%@CXXFLAGS@%$CXXFLAGS%g
11082s%@FFLAGS@%$FFLAGS%g
11083s%@DEFS@%$DEFS%g
11084s%@LDFLAGS@%$LDFLAGS%g
11085s%@LIBS@%$LIBS%g
11086s%@exec_prefix@%$exec_prefix%g
11087s%@prefix@%$prefix%g
11088s%@program_transform_name@%$program_transform_name%g
11089s%@bindir@%$bindir%g
11090s%@sbindir@%$sbindir%g
11091s%@libexecdir@%$libexecdir%g
11092s%@datadir@%$datadir%g
11093s%@sysconfdir@%$sysconfdir%g
11094s%@sharedstatedir@%$sharedstatedir%g
11095s%@localstatedir@%$localstatedir%g
11096s%@libdir@%$libdir%g
11097s%@includedir@%$includedir%g
11098s%@oldincludedir@%$oldincludedir%g
11099s%@infodir@%$infodir%g
11100s%@mandir@%$mandir%g
413ccac7
AC
11101s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11102s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11103s%@MAINT@%$MAINT%g
c906108c
SS
11104s%@CC@%$CC%g
11105s%@CPP@%$CPP%g
11106s%@host@%$host%g
11107s%@host_alias@%$host_alias%g
11108s%@host_cpu@%$host_cpu%g
11109s%@host_vendor@%$host_vendor%g
11110s%@host_os@%$host_os%g
11111s%@target@%$target%g
11112s%@target_alias@%$target_alias%g
11113s%@target_cpu@%$target_cpu%g
11114s%@target_vendor@%$target_vendor%g
11115s%@target_os@%$target_os%g
11116s%@build@%$build%g
11117s%@build_alias@%$build_alias%g
11118s%@build_cpu@%$build_cpu%g
11119s%@build_vendor@%$build_vendor%g
11120s%@build_os@%$build_os%g
c906108c 11121s%@RANLIB@%$RANLIB%g
8bb2c122 11122s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11123s%@ALLOCA@%$ALLOCA%g
11124s%@USE_NLS@%$USE_NLS%g
11125s%@MSGFMT@%$MSGFMT%g
11126s%@GMSGFMT@%$GMSGFMT%g
11127s%@XGETTEXT@%$XGETTEXT%g
11128s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11129s%@CATALOGS@%$CATALOGS%g
11130s%@CATOBJEXT@%$CATOBJEXT%g
11131s%@DATADIRNAME@%$DATADIRNAME%g
11132s%@GMOFILES@%$GMOFILES%g
11133s%@INSTOBJEXT@%$INSTOBJEXT%g
11134s%@INTLDEPS@%$INTLDEPS%g
11135s%@INTLLIBS@%$INTLLIBS%g
11136s%@INTLOBJS@%$INTLOBJS%g
11137s%@POFILES@%$POFILES%g
11138s%@POSUB@%$POSUB%g
11139s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11140s%@GT_NO@%$GT_NO%g
11141s%@GT_YES@%$GT_YES%g
11142s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11143s%@l@%$l%g
8dcde887 11144s%@subdirs@%$subdirs%g
7a292a7a 11145s%@AWK@%$AWK%g
c906108c
SS
11146s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11147s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11148s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11149s%@LN_S@%$LN_S%g
11150s%@YACC@%$YACC%g
c906108c 11151s%@AR@%$AR%g
95ca63c4
CF
11152s%@DLLTOOL@%$DLLTOOL%g
11153s%@WINDRES@%$WINDRES%g
75c6e08a 11154s%@MIG@%$MIG%g
c906108c 11155s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11156s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11157s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11158s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11159s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11160s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11161s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11162s%@LIBGUI@%$LIBGUI%g
11163s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11164s%@WIN32LDAPP@%$WIN32LDAPP%g
11165s%@TCL_VERSION@%$TCL_VERSION%g
11166s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11167s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11168s%@TCL_CC@%$TCL_CC%g
11169s%@TCL_DEFS@%$TCL_DEFS%g
11170s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11171s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11172s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11173s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11174s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11175s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11176s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11177s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11178s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11179s%@TCL_RANLIB@%$TCL_RANLIB%g
11180s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11181s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11182s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11183s%@TK_VERSION@%$TK_VERSION%g
11184s%@TK_DEFS@%$TK_DEFS%g
11185s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11186s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11187s%@TK_XLIBSW@%$TK_XLIBSW%g
11188s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11189s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11190s%@TCLHDIR@%$TCLHDIR%g
11191s%@TKHDIR@%$TKHDIR%g
11192s%@ITCLHDIR@%$ITCLHDIR%g
11193s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11194s%@ITCL_VERSION@%$ITCL_VERSION%g
11195s%@ITCL_DEFS@%$ITCL_DEFS%g
11196s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11197s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11198s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11199s%@ITK_VERSION@%$ITK_VERSION%g
11200s%@ITK_DEFS@%$ITK_DEFS%g
11201s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11202s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11203s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11204s%@X_CFLAGS@%$X_CFLAGS%g
11205s%@X_LDFLAGS@%$X_LDFLAGS%g
11206s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11207s%@TCL_DEPS@%$TCL_DEPS%g
11208s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11209s%@ITCLLIB@%$ITCLLIB%g
11210s%@ITCL_DEPS@%$ITCL_DEPS%g
11211s%@ITKLIB@%$ITKLIB%g
11212s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11213s%@GDBTKLIBS@%$GDBTKLIBS%g
11214s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11215s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11216s%@IGNORE_SIM@%$IGNORE_SIM%g
11217s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11218s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11219s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11220s%@CONFIG_OBS@%$CONFIG_OBS%g
11221s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11222s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11223s%@CONFIG_ALL@%$CONFIG_ALL%g
11224s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11225s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11226s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11227s%@target_subdir@%$target_subdir%g
11228/@host_makefile_frag@/r $host_makefile_frag
11229s%@host_makefile_frag@%%g
11230/@target_makefile_frag@/r $target_makefile_frag
11231s%@target_makefile_frag@%%g
11232s%@frags@%$frags%g
5a2402b8
AC
11233s%@xm_h@%$xm_h%g
11234s%@tm_h@%$tm_h%g
11235s%@nm_h@%$nm_h%g
c906108c 11236s%@EXEEXT@%$EXEEXT%g
234b45d4 11237s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11238
11239CEOF
11240EOF
11241
11242cat >> $CONFIG_STATUS <<\EOF
11243
11244# Split the substitutions into bite-sized pieces for seds with
11245# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11246ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11247ac_file=1 # Number of current file.
11248ac_beg=1 # First line for current file.
11249ac_end=$ac_max_sed_cmds # Line after last line for current file.
11250ac_more_lines=:
11251ac_sed_cmds=""
11252while $ac_more_lines; do
11253 if test $ac_beg -gt 1; then
11254 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11255 else
11256 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11257 fi
11258 if test ! -s conftest.s$ac_file; then
11259 ac_more_lines=false
11260 rm -f conftest.s$ac_file
11261 else
11262 if test -z "$ac_sed_cmds"; then
11263 ac_sed_cmds="sed -f conftest.s$ac_file"
11264 else
11265 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11266 fi
11267 ac_file=`expr $ac_file + 1`
11268 ac_beg=$ac_end
11269 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11270 fi
11271done
11272if test -z "$ac_sed_cmds"; then
11273 ac_sed_cmds=cat
11274fi
11275EOF
11276
11277cat >> $CONFIG_STATUS <<EOF
11278
ed952ac5 11279CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11280EOF
11281cat >> $CONFIG_STATUS <<\EOF
11282for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11283 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11284 case "$ac_file" in
11285 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11286 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11287 *) ac_file_in="${ac_file}.in" ;;
11288 esac
11289
11290 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11291
11292 # Remove last slash and all that follows it. Not all systems have dirname.
11293 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11294 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11295 # The file is in a subdirectory.
11296 test ! -d "$ac_dir" && mkdir "$ac_dir"
11297 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11298 # A "../" for each directory in $ac_dir_suffix.
11299 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11300 else
11301 ac_dir_suffix= ac_dots=
11302 fi
11303
11304 case "$ac_given_srcdir" in
11305 .) srcdir=.
11306 if test -z "$ac_dots"; then top_srcdir=.
11307 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11308 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11309 *) # Relative path.
11310 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11311 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11312 esac
11313
11314 case "$ac_given_INSTALL" in
11315 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11316 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11317 esac
11318
11319 echo creating "$ac_file"
11320 rm -f "$ac_file"
11321 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11322 case "$ac_file" in
11323 *Makefile*) ac_comsub="1i\\
11324# $configure_input" ;;
11325 *) ac_comsub= ;;
11326 esac
11327
11328 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11329 sed -e "$ac_comsub
11330s%@configure_input@%$configure_input%g
11331s%@srcdir@%$srcdir%g
11332s%@top_srcdir@%$top_srcdir%g
11333s%@INSTALL@%$INSTALL%g
11334" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11335fi; done
11336rm -f conftest.s*
11337
11338# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11339# NAME is the cpp macro being defined and VALUE is the value it is being given.
11340#
11341# ac_d sets the value in "#define NAME VALUE" lines.
11342ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11343ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11344ac_dC='\3'
11345ac_dD='%g'
11346# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11347ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11348ac_uB='\([ ]\)%\1#\2define\3'
11349ac_uC=' '
11350ac_uD='\4%g'
11351# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11352ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11353ac_eB='$%\1#\2define\3'
11354ac_eC=' '
11355ac_eD='%g'
11356
11357if test "${CONFIG_HEADERS+set}" != set; then
11358EOF
11359cat >> $CONFIG_STATUS <<EOF
11360 CONFIG_HEADERS="config.h:config.in"
11361EOF
11362cat >> $CONFIG_STATUS <<\EOF
11363fi
11364for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11365 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11366 case "$ac_file" in
11367 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11368 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11369 *) ac_file_in="${ac_file}.in" ;;
11370 esac
11371
11372 echo creating $ac_file
11373
11374 rm -f conftest.frag conftest.in conftest.out
11375 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11376 cat $ac_file_inputs > conftest.in
11377
11378EOF
11379
11380# Transform confdefs.h into a sed script conftest.vals that substitutes
11381# the proper values into config.h.in to produce config.h. And first:
11382# Protect against being on the right side of a sed subst in config.status.
11383# Protect against being in an unquoted here document in config.status.
11384rm -f conftest.vals
11385cat > conftest.hdr <<\EOF
11386s/[\\&%]/\\&/g
11387s%[\\$`]%\\&%g
11388s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11389s%ac_d%ac_u%gp
11390s%ac_u%ac_e%gp
11391EOF
11392sed -n -f conftest.hdr confdefs.h > conftest.vals
11393rm -f conftest.hdr
11394
11395# This sed command replaces #undef with comments. This is necessary, for
11396# example, in the case of _POSIX_SOURCE, which is predefined and required
11397# on some systems where configure will not decide to define it.
11398cat >> conftest.vals <<\EOF
11399s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11400EOF
11401
11402# Break up conftest.vals because some shells have a limit on
11403# the size of here documents, and old seds have small limits too.
11404
11405rm -f conftest.tail
11406while :
11407do
11408 ac_lines=`grep -c . conftest.vals`
11409 # grep -c gives empty output for an empty file on some AIX systems.
11410 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11411 # Write a limited-size here document to conftest.frag.
11412 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11413 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11414 echo 'CEOF
11415 sed -f conftest.frag conftest.in > conftest.out
11416 rm -f conftest.in
11417 mv conftest.out conftest.in
11418' >> $CONFIG_STATUS
11419 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11420 rm -f conftest.vals
11421 mv conftest.tail conftest.vals
11422done
11423rm -f conftest.vals
11424
11425cat >> $CONFIG_STATUS <<\EOF
11426 rm -f conftest.frag conftest.h
11427 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11428 cat conftest.in >> conftest.h
11429 rm -f conftest.in
11430 if cmp -s $ac_file conftest.h 2>/dev/null; then
11431 echo "$ac_file is unchanged"
11432 rm -f conftest.h
11433 else
11434 # Remove last slash and all that follows it. Not all systems have dirname.
11435 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11436 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11437 # The file is in a subdirectory.
11438 test ! -d "$ac_dir" && mkdir "$ac_dir"
11439 fi
11440 rm -f $ac_file
11441 mv conftest.h $ac_file
11442 fi
11443fi; done
11444
11445EOF
11446
11447cat >> $CONFIG_STATUS <<EOF
11448ac_sources="$files"
11449ac_dests="$links"
11450EOF
11451
11452cat >> $CONFIG_STATUS <<\EOF
11453srcdir=$ac_given_srcdir
11454while test -n "$ac_sources"; do
11455 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11456 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11457
11458 echo "linking $srcdir/$ac_source to $ac_dest"
11459
11460 if test ! -r $srcdir/$ac_source; then
11461 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11462 fi
11463 rm -f $ac_dest
11464
11465 # Make relative symlinks.
11466 # Remove last slash and all that follows it. Not all systems have dirname.
11467 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11468 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11469 # The dest file is in a subdirectory.
11470 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11471 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11472 # A "../" for each directory in $ac_dest_dir_suffix.
11473 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11474 else
11475 ac_dest_dir_suffix= ac_dots=
11476 fi
11477
11478 case "$srcdir" in
11479 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11480 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11481 esac
11482
11483 # Make a symlink if possible; otherwise try a hard link.
11484 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11485 ln $srcdir/$ac_source $ac_dest; then :
11486 else
11487 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11488 fi
11489done
11490EOF
11491cat >> $CONFIG_STATUS <<EOF
11492
11493gdb_host_cpu=$gdb_host_cpu
11494gdb_target_cpu=$gdb_target_cpu
11495nativefile=$nativefile
11496
11497EOF
11498cat >> $CONFIG_STATUS <<\EOF
11499
7ee6d7eb 11500if test "${nativefile}" = ""; then
c4620205 11501 < Makefile \
e27da16d
JT
11502 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11503 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11504 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11505 > Makefile.tem
c906108c
SS
11506mv -f Makefile.tem Makefile
11507fi
11508
11509sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11510/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11511/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11512mv -f Makefile.tmp Makefile
11513
2acceee2 11514
c906108c
SS
11515case x$CONFIG_HEADERS in
11516xconfig.h:config.in)
11517echo > stamp-h ;;
11518esac
11519
11520exit 0
11521EOF
11522chmod +x $CONFIG_STATUS
11523rm -fr confdefs* $ac_clean_files
11524test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11525
11526if test "$no_recursion" != yes; then
11527
11528 # Remove --cache-file and --srcdir arguments so they do not pile up.
11529 ac_sub_configure_args=
11530 ac_prev=
11531 for ac_arg in $ac_configure_args; do
11532 if test -n "$ac_prev"; then
11533 ac_prev=
11534 continue
11535 fi
11536 case "$ac_arg" in
11537 -cache-file | --cache-file | --cache-fil | --cache-fi \
11538 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11539 ac_prev=cache_file ;;
11540 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11541 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11542 ;;
11543 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11544 ac_prev=srcdir ;;
11545 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11546 ;;
11547 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11548 esac
11549 done
11550
8dcde887 11551 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11552
11553 # Do not complain, so a configure script can configure whichever
11554 # parts of a large source tree are present.
11555 if test ! -d $srcdir/$ac_config_dir; then
11556 continue
11557 fi
11558
11559 echo configuring in $ac_config_dir
11560
11561 case "$srcdir" in
11562 .) ;;
11563 *)
11564 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11565 else
11566 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11567 fi
11568 ;;
11569 esac
11570
11571 ac_popdir=`pwd`
11572 cd $ac_config_dir
11573
11574 # A "../" for each directory in /$ac_config_dir.
11575 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11576
11577 case "$srcdir" in
11578 .) # No --srcdir option. We are building in place.
11579 ac_sub_srcdir=$srcdir ;;
11580 /*) # Absolute path.
11581 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11582 *) # Relative path.
11583 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11584 esac
11585
11586 # Check for guested configure; otherwise get Cygnus style configure.
11587 if test -f $ac_sub_srcdir/configure; then
11588 ac_sub_configure=$ac_sub_srcdir/configure
11589 elif test -f $ac_sub_srcdir/configure.in; then
11590 ac_sub_configure=$ac_configure
11591 else
11592 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11593 ac_sub_configure=
11594 fi
11595
11596 # The recursion is here.
11597 if test -n "$ac_sub_configure"; then
11598
11599 # Make the cache file name correct relative to the subdirectory.
11600 case "$cache_file" in
11601 /*) ac_sub_cache_file=$cache_file ;;
11602 *) # Relative path.
11603 ac_sub_cache_file="$ac_dots$cache_file" ;;
11604 esac
11605 case "$ac_given_INSTALL" in
11606 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11607 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11608 esac
11609
11610 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11611 # The eval makes quoting arguments work.
11612 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11613 then :
11614 else
11615 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11616 fi
11617 fi
11618
11619 cd $ac_popdir
11620 done
11621fi
11622
11623
11624exit 0
This page took 1.148495 seconds and 4 git commands to generate.