* arm-tdep.c (arm_use_struct_convention): Look through typedefs.
[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
c324d747
AC
3034# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3035# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3036# Makefile fragments. That's why we need to have `Hcurses' before
3037# `curses'. I don't see why we should use HP curses if a more
3038# standard curses is available, except that according to HP's
3039# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3040# HP-UX 10.10 and 10.20.
3041
3042
3043echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
3044echo "configure:3045: checking for library containing initscr" >&5
3045if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
3047else
3048 ac_func_search_save_LIBS="$LIBS"
3049ac_cv_search_initscr="no"
3050cat > conftest.$ac_ext <<EOF
3051#line 3052 "configure"
3052#include "confdefs.h"
3053/* Override any gcc2 internal prototype to avoid an error. */
3054/* We use char because int might match the return type of a gcc2
3055 builtin and then its argument prototype would still apply. */
3056char initscr();
3057
3058int main() {
3059initscr()
3060; return 0; }
3061EOF
3062if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3063 rm -rf conftest*
3064 ac_cv_search_initscr="none required"
3065else
3066 echo "configure: failed program was:" >&5
3067 cat conftest.$ac_ext >&5
3068fi
3069rm -f conftest*
3070test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
3071LIBS="-l$i $ac_func_search_save_LIBS"
3072cat > conftest.$ac_ext <<EOF
3073#line 3074 "configure"
3074#include "confdefs.h"
3075/* Override any gcc2 internal prototype to avoid an error. */
3076/* We use char because int might match the return type of a gcc2
3077 builtin and then its argument prototype would still apply. */
3078char initscr();
3079
3080int main() {
3081initscr()
3082; return 0; }
3083EOF
3084if { (eval echo configure:3085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3085 rm -rf conftest*
3086 ac_cv_search_initscr="-l$i"
3087break
3088else
3089 echo "configure: failed program was:" >&5
3090 cat conftest.$ac_ext >&5
3091fi
3092rm -f conftest*
3093done
3094LIBS="$ac_func_search_save_LIBS"
3095fi
3096
3097echo "$ac_t""$ac_cv_search_initscr" 1>&6
3098if test "$ac_cv_search_initscr" != "no"; then
3099 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3100
3101else :
3102 echo "configure: warning: no curses library found" 1>&2
3103fi
3104
66745969
JB
3105# Check whether the wborder function is provided by the curses
3106# library detected above. In certain implementations such as
3107# the HP/UX Hcurses for instance, this function is provided by an
3108# additional library. So if we did not find this function inside
3109# the curses library, try some alternate libraries we know might
3110# provide it.
66745969
JB
3111
3112echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
7613d933 3113echo "configure:3114: checking for library containing wborder" >&5
66745969
JB
3114if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3116else
3117 ac_func_search_save_LIBS="$LIBS"
3118ac_cv_search_wborder="no"
3119cat > conftest.$ac_ext <<EOF
7613d933 3120#line 3121 "configure"
66745969
JB
3121#include "confdefs.h"
3122/* Override any gcc2 internal prototype to avoid an error. */
3123/* We use char because int might match the return type of a gcc2
3124 builtin and then its argument prototype would still apply. */
3125char wborder();
3126
3127int main() {
3128wborder()
3129; return 0; }
3130EOF
7613d933 3131if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
66745969
JB
3132 rm -rf conftest*
3133 ac_cv_search_wborder="none required"
3134else
3135 echo "configure: failed program was:" >&5
3136 cat conftest.$ac_ext >&5
3137fi
3138rm -f conftest*
3139test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
3140LIBS="-l$i $ac_func_search_save_LIBS"
3141cat > conftest.$ac_ext <<EOF
7613d933 3142#line 3143 "configure"
66745969
JB
3143#include "confdefs.h"
3144/* Override any gcc2 internal prototype to avoid an error. */
3145/* We use char because int might match the return type of a gcc2
3146 builtin and then its argument prototype would still apply. */
3147char wborder();
3148
3149int main() {
3150wborder()
3151; return 0; }
3152EOF
7613d933 3153if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
66745969
JB
3154 rm -rf conftest*
3155 ac_cv_search_wborder="-l$i"
3156break
3157else
3158 echo "configure: failed program was:" >&5
3159 cat conftest.$ac_ext >&5
3160fi
3161rm -f conftest*
3162done
3163LIBS="$ac_func_search_save_LIBS"
3164fi
3165
3166echo "$ac_t""$ac_cv_search_wborder" 1>&6
3167if test "$ac_cv_search_wborder" != "no"; then
3168 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
7613d933 3169
66745969 3170else :
7613d933 3171 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
66745969
JB
3172fi
3173
06825bd1
MK
3174# Enable TUI.
3175# Check whether --enable-tui or --disable-tui was given.
3176if test "${enable_tui+set}" = set; then
3177 enableval="$enable_tui"
3178 case $enableval in
3179 yes | no)
3180 ;;
3181 *)
3182 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3183 esac
c324d747
AC
3184else
3185 enable_tui=yes
06825bd1
MK
3186fi
3187
3188if test x"$enable_tui" = xyes; then
3189 if test -d $srcdir/tui; then
7613d933 3190 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
c324d747
AC
3191 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3192 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3193 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3194 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3195 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
226361c4
AC
3196 CONFIG_ALL="${CONFIG_ALL} all-tui"
3197 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3198 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3199 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
c324d747 3200 fi
06825bd1
MK
3201 fi
3202fi
3203
8ee53726
MK
3204# Enable gdbtk.
3205# Check whether --enable-gdbtk or --disable-gdbtk was given.
3206if test "${enable_gdbtk+set}" = set; then
3207 enableval="$enable_gdbtk"
3208 case $enableval in
3209 yes | no)
3210 ;;
3211 *)
3212 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3213 esac
3214else
3215 if test -d $srcdir/gdbtk; then
3216 enable_gdbtk=yes
3217 else
3218 enable_gdbtk=no
3219 fi
3220fi
3221
3222# We unconditionally disable gdbtk tests on selected platforms.
3223case $host_os in
3224 go32* | windows*)
3225 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3226 enable_gdbtk=no ;;
3227esac
3228
0e5d83e3
JJ
3229# Libunwind support.
3230# Check whether --with-libunwind or --without-libunwind was given.
3231if test "${with_libunwind+set}" = set; then
3232 withval="$with_libunwind"
3233 case "${withval}" in
3234 yes) enable_libunwind=yes ;;
3235 no) enable_libunwind=no ;;
3236 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3237esac
3238else
3239
3240 for ac_hdr in libunwind.h
3241do
3242ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3243echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 3244echo "configure:3245: checking for $ac_hdr" >&5
0e5d83e3
JJ
3245if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3246 echo $ac_n "(cached) $ac_c" 1>&6
3247else
3248 cat > conftest.$ac_ext <<EOF
7613d933 3249#line 3250 "configure"
0e5d83e3
JJ
3250#include "confdefs.h"
3251#include <$ac_hdr>
3252EOF
3253ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 3254{ (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3255ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3256if test -z "$ac_err"; then
3257 rm -rf conftest*
3258 eval "ac_cv_header_$ac_safe=yes"
3259else
3260 echo "$ac_err" >&5
3261 echo "configure: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 rm -rf conftest*
3264 eval "ac_cv_header_$ac_safe=no"
3265fi
3266rm -f conftest*
3267fi
3268if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3269 echo "$ac_t""yes" 1>&6
3270 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3271 cat >> confdefs.h <<EOF
3272#define $ac_tr_hdr 1
3273EOF
3274
3275else
3276 echo "$ac_t""no" 1>&6
3277fi
3278done
3279
3280 for ac_hdr in libunwind-ia64.h
3281do
3282ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3283echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 3284echo "configure:3285: checking for $ac_hdr" >&5
0e5d83e3
JJ
3285if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3286 echo $ac_n "(cached) $ac_c" 1>&6
3287else
3288 cat > conftest.$ac_ext <<EOF
7613d933 3289#line 3290 "configure"
0e5d83e3
JJ
3290#include "confdefs.h"
3291#include <$ac_hdr>
3292EOF
3293ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 3294{ (eval echo configure:3295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3295ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3296if test -z "$ac_err"; then
3297 rm -rf conftest*
3298 eval "ac_cv_header_$ac_safe=yes"
3299else
3300 echo "$ac_err" >&5
3301 echo "configure: failed program was:" >&5
3302 cat conftest.$ac_ext >&5
3303 rm -rf conftest*
3304 eval "ac_cv_header_$ac_safe=no"
3305fi
3306rm -f conftest*
3307fi
3308if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3309 echo "$ac_t""yes" 1>&6
3310 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3311 cat >> confdefs.h <<EOF
3312#define $ac_tr_hdr 1
3313EOF
3314
3315else
3316 echo "$ac_t""no" 1>&6
3317fi
3318done
3319
3320 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3321 enable_libunwind=yes;
3322 fi
3323
3324fi
3325
3326
3327if test x"$enable_libunwind" = xyes; then
3328 for ac_hdr in libunwind.h
3329do
3330ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3331echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 3332echo "configure:3333: checking for $ac_hdr" >&5
0e5d83e3
JJ
3333if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3334 echo $ac_n "(cached) $ac_c" 1>&6
3335else
3336 cat > conftest.$ac_ext <<EOF
7613d933 3337#line 3338 "configure"
0e5d83e3
JJ
3338#include "confdefs.h"
3339#include <$ac_hdr>
3340EOF
3341ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 3342{ (eval echo configure:3343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3343ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3344if test -z "$ac_err"; then
3345 rm -rf conftest*
3346 eval "ac_cv_header_$ac_safe=yes"
3347else
3348 echo "$ac_err" >&5
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3351 rm -rf conftest*
3352 eval "ac_cv_header_$ac_safe=no"
3353fi
3354rm -f conftest*
3355fi
3356if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3357 echo "$ac_t""yes" 1>&6
3358 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3359 cat >> confdefs.h <<EOF
3360#define $ac_tr_hdr 1
3361EOF
3362
3363else
3364 echo "$ac_t""no" 1>&6
3365fi
3366done
3367
3368 for ac_hdr in libunwind-ia64.h
3369do
3370ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3371echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 3372echo "configure:3373: checking for $ac_hdr" >&5
0e5d83e3
JJ
3373if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3374 echo $ac_n "(cached) $ac_c" 1>&6
3375else
3376 cat > conftest.$ac_ext <<EOF
7613d933 3377#line 3378 "configure"
0e5d83e3
JJ
3378#include "confdefs.h"
3379#include <$ac_hdr>
3380EOF
3381ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 3382{ (eval echo configure:3383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
0e5d83e3
JJ
3383ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3384if test -z "$ac_err"; then
3385 rm -rf conftest*
3386 eval "ac_cv_header_$ac_safe=yes"
3387else
3388 echo "$ac_err" >&5
3389 echo "configure: failed program was:" >&5
3390 cat conftest.$ac_ext >&5
3391 rm -rf conftest*
3392 eval "ac_cv_header_$ac_safe=no"
3393fi
3394rm -f conftest*
3395fi
3396if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3397 echo "$ac_t""yes" 1>&6
3398 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3399 cat >> confdefs.h <<EOF
3400#define $ac_tr_hdr 1
3401EOF
3402
3403else
3404 echo "$ac_t""no" 1>&6
3405fi
3406done
3407
3408 cat >> confdefs.h <<\EOF
3409#define HAVE_LIBUNWIND 1
3410EOF
3411
3412 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3413 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3414 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3415fi
3416
d28f9cdf
DJ
3417# Profiling support.
3418# Check whether --enable-profiling or --disable-profiling was given.
3419if test "${enable_profiling+set}" = set; then
3420 enableval="$enable_profiling"
3421 case $enableval in
3422 yes | no)
3423 ;;
3424 *)
3425 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3426 esac
3427else
3428 enable_profiling=no
3429fi
3430
3431
d9feb4e7
DJ
3432for ac_func in monstartup _mcleanup
3433do
3434echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 3435echo "configure:3436: checking for $ac_func" >&5
d9feb4e7 3436if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3437 echo $ac_n "(cached) $ac_c" 1>&6
3438else
3439 cat > conftest.$ac_ext <<EOF
7613d933 3440#line 3441 "configure"
d28f9cdf
DJ
3441#include "confdefs.h"
3442/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3443 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3444#include <assert.h>
3445/* Override any gcc2 internal prototype to avoid an error. */
3446/* We use char because int might match the return type of a gcc2
3447 builtin and then its argument prototype would still apply. */
d9feb4e7 3448char $ac_func();
d28f9cdf
DJ
3449
3450int main() {
3451
3452/* The GNU C library defines this for functions which it implements
3453 to always fail with ENOSYS. Some functions are actually named
3454 something starting with __ and the normal name is an alias. */
d9feb4e7 3455#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3456choke me
3457#else
d9feb4e7 3458$ac_func();
d28f9cdf
DJ
3459#endif
3460
3461; return 0; }
3462EOF
7613d933 3463if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3464 rm -rf conftest*
d9feb4e7 3465 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3466else
3467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
3469 rm -rf conftest*
d9feb4e7 3470 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3471fi
3472rm -f conftest*
3473fi
3474
d9feb4e7 3475if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3476 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3477 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3478 cat >> confdefs.h <<EOF
3479#define $ac_tr_func 1
3480EOF
3481
d28f9cdf
DJ
3482else
3483 echo "$ac_t""no" 1>&6
d28f9cdf 3484fi
d9feb4e7 3485done
d28f9cdf 3486
b0b1c2c0 3487echo $ac_n "checking for _etext""... $ac_c" 1>&6
7613d933 3488echo "configure:3489: checking for _etext" >&5
b0b1c2c0
MK
3489if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3490 echo $ac_n "(cached) $ac_c" 1>&6
3491else
3492 cat > conftest.$ac_ext <<EOF
7613d933 3493#line 3494 "configure"
b0b1c2c0
MK
3494#include "confdefs.h"
3495#include <stdlib.h>
3496extern char _etext;
3497
3498int main() {
3499free (&_etext);
3500; return 0; }
3501EOF
7613d933 3502if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b0b1c2c0
MK
3503 rm -rf conftest*
3504 ac_cv_var__etext=yes
3505else
3506 echo "configure: failed program was:" >&5
3507 cat conftest.$ac_ext >&5
3508 rm -rf conftest*
3509 ac_cv_var__etext=no
3510fi
3511rm -f conftest*
3512fi
3513
3514echo "$ac_t""$ac_cv_var__etext" 1>&6
3515if test $ac_cv_var__etext = yes; then
3516 cat >> confdefs.h <<\EOF
3517#define HAVE__ETEXT 1
3518EOF
3519
3520fi
d9feb4e7
DJ
3521if test "$enable_profiling" = yes ; then
3522 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3523 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3524 fi
3525 PROFILE_CFLAGS=-pg
3526 OLD_CFLAGS="$CFLAGS"
3527 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3528
d9feb4e7 3529 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
7613d933 3530echo "configure:3531: checking whether $CC supports -pg" >&5
d9feb4e7 3531if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3532 echo $ac_n "(cached) $ac_c" 1>&6
3533else
3534 cat > conftest.$ac_ext <<EOF
7613d933 3535#line 3536 "configure"
d28f9cdf 3536#include "confdefs.h"
d28f9cdf
DJ
3537
3538int main() {
d9feb4e7 3539int x;
d28f9cdf
DJ
3540; return 0; }
3541EOF
7613d933 3542if { (eval echo configure:3543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3543 rm -rf conftest*
d9feb4e7 3544 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3545else
3546 echo "configure: failed program was:" >&5
3547 cat conftest.$ac_ext >&5
3548 rm -rf conftest*
d9feb4e7 3549 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3550fi
3551rm -f conftest*
3552fi
3553
d9feb4e7 3554echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3555
d9feb4e7
DJ
3556 if test $ac_cv_cc_supports_pg = no; then
3557 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3558 fi
d28f9cdf
DJ
3559
3560 CFLAGS="$OLD_CFLAGS"
3561fi
3562
8bb2c122
MK
3563# --------------------- #
3564# Checks for programs. #
3565# --------------------- #
3566
d836ee13 3567for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3568do
3569# Extract the first word of "$ac_prog", so it can be a program name with args.
3570set dummy $ac_prog; ac_word=$2
3571echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3572echo "configure:3573: checking for $ac_word" >&5
7a292a7a
SS
3573if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3574 echo $ac_n "(cached) $ac_c" 1>&6
3575else
3576 if test -n "$AWK"; then
3577 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3578else
3579 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3580 ac_dummy="$PATH"
3581 for ac_dir in $ac_dummy; do
3582 test -z "$ac_dir" && ac_dir=.
3583 if test -f $ac_dir/$ac_word; then
3584 ac_cv_prog_AWK="$ac_prog"
3585 break
3586 fi
3587 done
3588 IFS="$ac_save_ifs"
3589fi
3590fi
3591AWK="$ac_cv_prog_AWK"
3592if test -n "$AWK"; then
3593 echo "$ac_t""$AWK" 1>&6
3594else
3595 echo "$ac_t""no" 1>&6
3596fi
3597
3598test -n "$AWK" && break
3599done
3600
c906108c
SS
3601# Find a good install program. We prefer a C program (faster),
3602# so one script is as good as another. But avoid the broken or
3603# incompatible versions:
3604# SysV /etc/install, /usr/sbin/install
3605# SunOS /usr/etc/install
3606# IRIX /sbin/install
3607# AIX /bin/install
3608# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3609# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3610# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3611# ./install, which can be erroneously created by make from ./install.sh.
3612echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
7613d933 3613echo "configure:3614: checking for a BSD compatible install" >&5
c906108c
SS
3614if test -z "$INSTALL"; then
3615if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3616 echo $ac_n "(cached) $ac_c" 1>&6
3617else
3618 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3619 for ac_dir in $PATH; do
3620 # Account for people who put trailing slashes in PATH elements.
3621 case "$ac_dir/" in
3622 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3623 *)
3624 # OSF1 and SCO ODT 3.0 have their own names for install.
3625 # Don't use installbsd from OSF since it installs stuff as root
3626 # by default.
3627 for ac_prog in ginstall scoinst install; do
3628 if test -f $ac_dir/$ac_prog; then
3629 if test $ac_prog = install &&
3630 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3631 # AIX install. It has an incompatible calling convention.
3632 :
3633 else
3634 ac_cv_path_install="$ac_dir/$ac_prog -c"
3635 break 2
3636 fi
3637 fi
3638 done
3639 ;;
3640 esac
3641 done
3642 IFS="$ac_save_IFS"
3643
3644fi
3645 if test "${ac_cv_path_install+set}" = set; then
3646 INSTALL="$ac_cv_path_install"
3647 else
3648 # As a last resort, use the slow shell script. We don't cache a
3649 # path for INSTALL within a source directory, because that will
3650 # break other packages using the cache if that directory is
3651 # removed, or if the path is relative.
3652 INSTALL="$ac_install_sh"
3653 fi
3654fi
3655echo "$ac_t""$INSTALL" 1>&6
3656
3657# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3658# It thinks the first close brace ends the variable substitution.
3659test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3660
3661test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3662
3663test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3664
8bb2c122 3665echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7613d933 3666echo "configure:3667: checking whether ln -s works" >&5
8bb2c122
MK
3667if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3668 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3669else
8bb2c122
MK
3670 rm -f conftestdata
3671if ln -s X conftestdata 2>/dev/null
3672then
3673 rm -f conftestdata
3674 ac_cv_prog_LN_S="ln -s"
3675else
3676 ac_cv_prog_LN_S=ln
3677fi
3678fi
3679LN_S="$ac_cv_prog_LN_S"
3680if test "$ac_cv_prog_LN_S" = "ln -s"; then
3681 echo "$ac_t""yes" 1>&6
3682else
3683 echo "$ac_t""no" 1>&6
c906108c
SS
3684fi
3685
8bb2c122
MK
3686# Extract the first word of "ranlib", so it can be a program name with args.
3687set dummy ranlib; ac_word=$2
c906108c 3688echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3689echo "configure:3690: checking for $ac_word" >&5
8bb2c122 3690if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3691 echo $ac_n "(cached) $ac_c" 1>&6
3692else
8bb2c122
MK
3693 if test -n "$RANLIB"; then
3694 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3695else
3696 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3697 ac_dummy="$PATH"
3698 for ac_dir in $ac_dummy; do
3699 test -z "$ac_dir" && ac_dir=.
3700 if test -f $ac_dir/$ac_word; then
8bb2c122 3701 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3702 break
3703 fi
3704 done
3705 IFS="$ac_save_ifs"
8bb2c122 3706 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3707fi
3708fi
8bb2c122
MK
3709RANLIB="$ac_cv_prog_RANLIB"
3710if test -n "$RANLIB"; then
3711 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3712else
3713 echo "$ac_t""no" 1>&6
3714fi
3715
8bb2c122
MK
3716for ac_prog in 'bison -y' byacc
3717do
3718# Extract the first word of "$ac_prog", so it can be a program name with args.
3719set dummy $ac_prog; ac_word=$2
c906108c 3720echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3721echo "configure:3722: checking for $ac_word" >&5
8bb2c122 3722if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3723 echo $ac_n "(cached) $ac_c" 1>&6
3724else
8bb2c122
MK
3725 if test -n "$YACC"; then
3726 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3727else
3728 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731 test -z "$ac_dir" && ac_dir=.
3732 if test -f $ac_dir/$ac_word; then
8bb2c122 3733 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3734 break
3735 fi
3736 done
3737 IFS="$ac_save_ifs"
3738fi
3739fi
8bb2c122
MK
3740YACC="$ac_cv_prog_YACC"
3741if test -n "$YACC"; then
3742 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3743else
3744 echo "$ac_t""no" 1>&6
3745fi
3746
8bb2c122
MK
3747test -n "$YACC" && break
3748done
3749test -n "$YACC" || YACC="yacc"
c906108c 3750
8bb2c122
MK
3751
3752# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3753set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3754echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3755echo "configure:3756: checking for $ac_word" >&5
8bb2c122 3756if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3757 echo $ac_n "(cached) $ac_c" 1>&6
3758else
8bb2c122
MK
3759 if test -n "$AR"; then
3760 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3761else
3762 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3763 ac_dummy="$PATH"
3764 for ac_dir in $ac_dummy; do
3765 test -z "$ac_dir" && ac_dir=.
3766 if test -f $ac_dir/$ac_word; then
8bb2c122 3767 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3768 break
3769 fi
3770 done
3771 IFS="$ac_save_ifs"
8bb2c122 3772 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3773fi
3774fi
8bb2c122
MK
3775AR="$ac_cv_prog_AR"
3776if test -n "$AR"; then
3777 echo "$ac_t""$AR" 1>&6
c906108c
SS
3778else
3779 echo "$ac_t""no" 1>&6
3780fi
3781
8bb2c122 3782
c906108c 3783
95ca63c4
CF
3784# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3785set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3786echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3787echo "configure:3788: checking for $ac_word" >&5
95ca63c4
CF
3788if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3789 echo $ac_n "(cached) $ac_c" 1>&6
3790else
3791 if test -n "$DLLTOOL"; then
3792 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3793else
3794 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3795 ac_dummy="$PATH"
3796 for ac_dir in $ac_dummy; do
3797 test -z "$ac_dir" && ac_dir=.
3798 if test -f $ac_dir/$ac_word; then
3799 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3800 break
3801 fi
3802 done
3803 IFS="$ac_save_ifs"
3804 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3805fi
3806fi
3807DLLTOOL="$ac_cv_prog_DLLTOOL"
3808if test -n "$DLLTOOL"; then
3809 echo "$ac_t""$DLLTOOL" 1>&6
3810else
3811 echo "$ac_t""no" 1>&6
3812fi
3813
3814
3815
3816# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3817set dummy ${ac_tool_prefix}windres; ac_word=$2
3818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3819echo "configure:3820: checking for $ac_word" >&5
95ca63c4
CF
3820if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3821 echo $ac_n "(cached) $ac_c" 1>&6
3822else
3823 if test -n "$WINDRES"; then
3824 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3825else
3826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3827 ac_dummy="$PATH"
3828 for ac_dir in $ac_dummy; do
3829 test -z "$ac_dir" && ac_dir=.
3830 if test -f $ac_dir/$ac_word; then
3831 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3832 break
3833 fi
3834 done
3835 IFS="$ac_save_ifs"
3836 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3837fi
3838fi
3839WINDRES="$ac_cv_prog_WINDRES"
3840if test -n "$WINDRES"; then
3841 echo "$ac_t""$WINDRES" 1>&6
3842else
3843 echo "$ac_t""no" 1>&6
3844fi
3845
3846
3847
c906108c 3848
8bb2c122 3849# Needed for GNU/Hurd.
75c6e08a
MK
3850# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3851set dummy ${ac_tool_prefix}mig; ac_word=$2
3852echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7613d933 3853echo "configure:3854: checking for $ac_word" >&5
75c6e08a
MK
3854if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
3856else
3857 if test -n "$MIG"; then
3858 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3859else
3860 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3861 ac_dummy="$PATH"
3862 for ac_dir in $ac_dummy; do
3863 test -z "$ac_dir" && ac_dir=.
3864 if test -f $ac_dir/$ac_word; then
3865 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3866 break
3867 fi
3868 done
3869 IFS="$ac_save_ifs"
3870 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3871fi
3872fi
3873MIG="$ac_cv_prog_MIG"
3874if test -n "$MIG"; then
3875 echo "$ac_t""$MIG" 1>&6
3876else
3877 echo "$ac_t""no" 1>&6
3878fi
3879
3880
3881
3882
9a156167
MK
3883# ---------------------- #
3884# Checks for libraries. #
3885# ---------------------- #
3886
3887# We might need to link with -lm; most simulators need it.
3888echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
7613d933 3889echo "configure:3890: checking for main in -lm" >&5
9a156167
MK
3890ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3891if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3892 echo $ac_n "(cached) $ac_c" 1>&6
3893else
3894 ac_save_LIBS="$LIBS"
3895LIBS="-lm $LIBS"
3896cat > conftest.$ac_ext <<EOF
7613d933 3897#line 3898 "configure"
9a156167
MK
3898#include "confdefs.h"
3899
3900int main() {
3901main()
3902; return 0; }
3903EOF
7613d933 3904if { (eval echo configure:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3905 rm -rf conftest*
3906 eval "ac_cv_lib_$ac_lib_var=yes"
3907else
3908 echo "configure: failed program was:" >&5
3909 cat conftest.$ac_ext >&5
3910 rm -rf conftest*
3911 eval "ac_cv_lib_$ac_lib_var=no"
3912fi
3913rm -f conftest*
3914LIBS="$ac_save_LIBS"
3915
3916fi
3917if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3918 echo "$ac_t""yes" 1>&6
3919 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3920 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3921 cat >> confdefs.h <<EOF
3922#define $ac_tr_lib 1
3923EOF
3924
3925 LIBS="-lm $LIBS"
3926
3927else
3928 echo "$ac_t""no" 1>&6
3929fi
3930
3931
3932# We need to link with -lw to get `wctype' on Solaris before Solaris
3933# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3934# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3935# is known to have this problem). Therefore we avoid libw if we can.
3936echo $ac_n "checking for wctype""... $ac_c" 1>&6
7613d933 3937echo "configure:3938: checking for wctype" >&5
9a156167
MK
3938if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3939 echo $ac_n "(cached) $ac_c" 1>&6
3940else
3941 cat > conftest.$ac_ext <<EOF
7613d933 3942#line 3943 "configure"
9a156167
MK
3943#include "confdefs.h"
3944/* System header to define __stub macros and hopefully few prototypes,
3945 which can conflict with char wctype(); below. */
3946#include <assert.h>
3947/* Override any gcc2 internal prototype to avoid an error. */
3948/* We use char because int might match the return type of a gcc2
3949 builtin and then its argument prototype would still apply. */
3950char wctype();
3951
3952int main() {
3953
3954/* The GNU C library defines this for functions which it implements
3955 to always fail with ENOSYS. Some functions are actually named
3956 something starting with __ and the normal name is an alias. */
3957#if defined (__stub_wctype) || defined (__stub___wctype)
3958choke me
3959#else
3960wctype();
3961#endif
3962
3963; return 0; }
3964EOF
7613d933 3965if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3966 rm -rf conftest*
3967 eval "ac_cv_func_wctype=yes"
3968else
3969 echo "configure: failed program was:" >&5
3970 cat conftest.$ac_ext >&5
3971 rm -rf conftest*
3972 eval "ac_cv_func_wctype=no"
3973fi
3974rm -f conftest*
3975fi
3976
3977if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 :
3980else
3981 echo "$ac_t""no" 1>&6
3982echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
7613d933 3983echo "configure:3984: checking for wctype in -lw" >&5
9a156167
MK
3984ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3985if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3986 echo $ac_n "(cached) $ac_c" 1>&6
3987else
3988 ac_save_LIBS="$LIBS"
3989LIBS="-lw $LIBS"
3990cat > conftest.$ac_ext <<EOF
7613d933 3991#line 3992 "configure"
9a156167
MK
3992#include "confdefs.h"
3993/* Override any gcc2 internal prototype to avoid an error. */
3994/* We use char because int might match the return type of a gcc2
3995 builtin and then its argument prototype would still apply. */
3996char wctype();
3997
3998int main() {
3999wctype()
4000; return 0; }
4001EOF
7613d933 4002if { (eval echo configure:4003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4003 rm -rf conftest*
4004 eval "ac_cv_lib_$ac_lib_var=yes"
4005else
4006 echo "configure: failed program was:" >&5
4007 cat conftest.$ac_ext >&5
4008 rm -rf conftest*
4009 eval "ac_cv_lib_$ac_lib_var=no"
4010fi
4011rm -f conftest*
4012LIBS="$ac_save_LIBS"
4013
4014fi
4015if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4016 echo "$ac_t""yes" 1>&6
4017 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4018 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4019 cat >> confdefs.h <<EOF
4020#define $ac_tr_lib 1
4021EOF
4022
4023 LIBS="-lw $LIBS"
4024
4025else
4026 echo "$ac_t""no" 1>&6
4027fi
4028
4029fi
4030
4031
c890192f
MK
4032# Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
4033
4034echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
7613d933 4035echo "configure:4036: checking for library containing gethostbyname" >&5
c890192f
MK
4036if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
4037 echo $ac_n "(cached) $ac_c" 1>&6
4038else
4039 ac_func_search_save_LIBS="$LIBS"
4040ac_cv_search_gethostbyname="no"
4041cat > conftest.$ac_ext <<EOF
7613d933 4042#line 4043 "configure"
c890192f
MK
4043#include "confdefs.h"
4044/* Override any gcc2 internal prototype to avoid an error. */
4045/* We use char because int might match the return type of a gcc2
4046 builtin and then its argument prototype would still apply. */
4047char gethostbyname();
4048
4049int main() {
4050gethostbyname()
4051; return 0; }
4052EOF
7613d933 4053if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
4054 rm -rf conftest*
4055 ac_cv_search_gethostbyname="none required"
4056else
4057 echo "configure: failed program was:" >&5
4058 cat conftest.$ac_ext >&5
4059fi
4060rm -f conftest*
4061test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
4062LIBS="-l$i $ac_func_search_save_LIBS"
4063cat > conftest.$ac_ext <<EOF
7613d933 4064#line 4065 "configure"
c890192f
MK
4065#include "confdefs.h"
4066/* Override any gcc2 internal prototype to avoid an error. */
4067/* We use char because int might match the return type of a gcc2
4068 builtin and then its argument prototype would still apply. */
4069char gethostbyname();
4070
4071int main() {
4072gethostbyname()
4073; return 0; }
4074EOF
7613d933 4075if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c890192f
MK
4076 rm -rf conftest*
4077 ac_cv_search_gethostbyname="-l$i"
4078break
4079else
4080 echo "configure: failed program was:" >&5
4081 cat conftest.$ac_ext >&5
4082fi
4083rm -f conftest*
4084done
4085LIBS="$ac_func_search_save_LIBS"
4086fi
4087
4088echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
4089if test "$ac_cv_search_gethostbyname" != "no"; then
4090 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4091
4092else :
4093
4094fi
4095
9a156167
MK
4096# Some systems (e.g. Solaris) have `socketpair' in libsocket.
4097
4098echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
7613d933 4099echo "configure:4100: checking for library containing socketpair" >&5
9a156167
MK
4100if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4101 echo $ac_n "(cached) $ac_c" 1>&6
4102else
4103 ac_func_search_save_LIBS="$LIBS"
4104ac_cv_search_socketpair="no"
4105cat > conftest.$ac_ext <<EOF
7613d933 4106#line 4107 "configure"
9a156167
MK
4107#include "confdefs.h"
4108/* Override any gcc2 internal prototype to avoid an error. */
4109/* We use char because int might match the return type of a gcc2
4110 builtin and then its argument prototype would still apply. */
4111char socketpair();
4112
4113int main() {
4114socketpair()
4115; return 0; }
4116EOF
7613d933 4117if { (eval echo configure:4118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4118 rm -rf conftest*
4119 ac_cv_search_socketpair="none required"
4120else
4121 echo "configure: failed program was:" >&5
4122 cat conftest.$ac_ext >&5
4123fi
4124rm -f conftest*
4125test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4126LIBS="-l$i $ac_func_search_save_LIBS"
4127cat > conftest.$ac_ext <<EOF
7613d933 4128#line 4129 "configure"
9a156167
MK
4129#include "confdefs.h"
4130/* Override any gcc2 internal prototype to avoid an error. */
4131/* We use char because int might match the return type of a gcc2
4132 builtin and then its argument prototype would still apply. */
4133char socketpair();
4134
4135int main() {
4136socketpair()
4137; return 0; }
4138EOF
7613d933 4139if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
4140 rm -rf conftest*
4141 ac_cv_search_socketpair="-l$i"
4142break
4143else
4144 echo "configure: failed program was:" >&5
4145 cat conftest.$ac_ext >&5
4146fi
4147rm -f conftest*
4148done
4149LIBS="$ac_func_search_save_LIBS"
4150fi
4151
4152echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4153if test "$ac_cv_search_socketpair" != "no"; then
4154 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4155
4156else :
4157
4158fi
4159
06825bd1
MK
4160# Since GDB uses Readline, we need termcap functionality, so we need
4161# to find a library that provides that. When GDB is configured with
c324d747 4162# the TUI, we need full curses functionality.
06825bd1
MK
4163
4164case $host_os in
4165 cygwin*)
4166 if test -d $srcdir/libtermcap; then
4167 LIBS="../libtermcap/libtermcap.a $LIBS"
4168 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4169 fi ;;
40a7debc 4170 go32* | *djgpp*)
06825bd1
MK
4171 ac_cv_search_tgetent="none required"
4172 ;;
4173 aix*)
4174 # Readline prefers curses over termcap on AIX.
4175 # ??? Why?
4176
4177echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
7613d933 4178echo "configure:4179: checking for library containing tgetent" >&5
06825bd1
MK
4179if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4180 echo $ac_n "(cached) $ac_c" 1>&6
4181else
4182 ac_func_search_save_LIBS="$LIBS"
4183ac_cv_search_tgetent="no"
4184cat > conftest.$ac_ext <<EOF
7613d933 4185#line 4186 "configure"
06825bd1
MK
4186#include "confdefs.h"
4187/* Override any gcc2 internal prototype to avoid an error. */
4188/* We use char because int might match the return type of a gcc2
4189 builtin and then its argument prototype would still apply. */
4190char tgetent();
4191
4192int main() {
4193tgetent()
4194; return 0; }
4195EOF
7613d933 4196if { (eval echo configure:4197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4197 rm -rf conftest*
4198 ac_cv_search_tgetent="none required"
4199else
4200 echo "configure: failed program was:" >&5
4201 cat conftest.$ac_ext >&5
4202fi
4203rm -f conftest*
4204test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4205LIBS="-l$i $ac_func_search_save_LIBS"
4206cat > conftest.$ac_ext <<EOF
7613d933 4207#line 4208 "configure"
06825bd1
MK
4208#include "confdefs.h"
4209/* Override any gcc2 internal prototype to avoid an error. */
4210/* We use char because int might match the return type of a gcc2
4211 builtin and then its argument prototype would still apply. */
4212char tgetent();
4213
4214int main() {
4215tgetent()
4216; return 0; }
4217EOF
7613d933 4218if { (eval echo configure:4219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4219 rm -rf conftest*
4220 ac_cv_search_tgetent="-l$i"
4221break
4222else
4223 echo "configure: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4225fi
4226rm -f conftest*
4227done
4228LIBS="$ac_func_search_save_LIBS"
4229fi
4230
4231echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4232if test "$ac_cv_search_tgetent" != "no"; then
4233 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4234
4235else :
4236
4237fi
4238 ;;
4239esac
4240
4241# Note: We used to check for libtermlib and libterminfo too, but
4242# Readline doesn't, so I think we're safe with leaving them out.
4243
4244echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
7613d933 4245echo "configure:4246: checking for library containing tgetent" >&5
06825bd1
MK
4246if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4247 echo $ac_n "(cached) $ac_c" 1>&6
4248else
4249 ac_func_search_save_LIBS="$LIBS"
4250ac_cv_search_tgetent="no"
4251cat > conftest.$ac_ext <<EOF
7613d933 4252#line 4253 "configure"
06825bd1
MK
4253#include "confdefs.h"
4254/* Override any gcc2 internal prototype to avoid an error. */
4255/* We use char because int might match the return type of a gcc2
4256 builtin and then its argument prototype would still apply. */
4257char tgetent();
4258
4259int main() {
4260tgetent()
4261; return 0; }
4262EOF
7613d933 4263if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4264 rm -rf conftest*
4265 ac_cv_search_tgetent="none required"
4266else
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4269fi
4270rm -f conftest*
4271test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4272LIBS="-l$i $ac_func_search_save_LIBS"
4273cat > conftest.$ac_ext <<EOF
7613d933 4274#line 4275 "configure"
06825bd1
MK
4275#include "confdefs.h"
4276/* Override any gcc2 internal prototype to avoid an error. */
4277/* We use char because int might match the return type of a gcc2
4278 builtin and then its argument prototype would still apply. */
4279char tgetent();
4280
4281int main() {
4282tgetent()
4283; return 0; }
4284EOF
7613d933 4285if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
4286 rm -rf conftest*
4287 ac_cv_search_tgetent="-l$i"
4288break
4289else
4290 echo "configure: failed program was:" >&5
4291 cat conftest.$ac_ext >&5
4292fi
4293rm -f conftest*
4294done
4295LIBS="$ac_func_search_save_LIBS"
4296fi
4297
4298echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4299if test "$ac_cv_search_tgetent" != "no"; then
4300 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4301
4302else :
4303
4304fi
4305
4306if test "$ac_cv_search_tgetent" = no; then
4307 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4308fi
4309
5ee754fc
MK
4310# ------------------------- #
4311# Checks for header files. #
4312# ------------------------- #
4313
4314ac_header_dirent=no
4315for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4316do
4317ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4318echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
7613d933 4319echo "configure:4320: checking for $ac_hdr that defines DIR" >&5
5ee754fc 4320if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322else
4323 cat > conftest.$ac_ext <<EOF
7613d933 4324#line 4325 "configure"
c906108c
SS
4325#include "confdefs.h"
4326#include <sys/types.h>
5ee754fc
MK
4327#include <$ac_hdr>
4328int main() {
4329DIR *dirp = 0;
4330; return 0; }
4331EOF
7613d933 4332if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
4333 rm -rf conftest*
4334 eval "ac_cv_header_dirent_$ac_safe=yes"
4335else
4336 echo "configure: failed program was:" >&5
4337 cat conftest.$ac_ext >&5
4338 rm -rf conftest*
4339 eval "ac_cv_header_dirent_$ac_safe=no"
4340fi
4341rm -f conftest*
4342fi
4343if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4344 echo "$ac_t""yes" 1>&6
4345 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4346 cat >> confdefs.h <<EOF
4347#define $ac_tr_hdr 1
4348EOF
4349 ac_header_dirent=$ac_hdr; break
4350else
4351 echo "$ac_t""no" 1>&6
4352fi
4353done
4354# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4355if test $ac_header_dirent = dirent.h; then
4356echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
7613d933 4357echo "configure:4358: checking for opendir in -ldir" >&5
5ee754fc
MK
4358ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4359if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4360 echo $ac_n "(cached) $ac_c" 1>&6
4361else
4362 ac_save_LIBS="$LIBS"
4363LIBS="-ldir $LIBS"
4364cat > conftest.$ac_ext <<EOF
7613d933 4365#line 4366 "configure"
5ee754fc
MK
4366#include "confdefs.h"
4367/* Override any gcc2 internal prototype to avoid an error. */
4368/* We use char because int might match the return type of a gcc2
4369 builtin and then its argument prototype would still apply. */
4370char opendir();
c906108c
SS
4371
4372int main() {
5ee754fc 4373opendir()
c906108c
SS
4374; return 0; }
4375EOF
7613d933 4376if { (eval echo configure:4377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4377 rm -rf conftest*
5ee754fc 4378 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4379else
4380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
4382 rm -rf conftest*
5ee754fc 4383 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4384fi
4385rm -f conftest*
5ee754fc
MK
4386LIBS="$ac_save_LIBS"
4387
4388fi
4389if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4390 echo "$ac_t""yes" 1>&6
4391 LIBS="$LIBS -ldir"
4392else
4393 echo "$ac_t""no" 1>&6
c906108c
SS
4394fi
4395
5ee754fc
MK
4396else
4397echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
7613d933 4398echo "configure:4399: checking for opendir in -lx" >&5
5ee754fc
MK
4399ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4400if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4401 echo $ac_n "(cached) $ac_c" 1>&6
4402else
4403 ac_save_LIBS="$LIBS"
4404LIBS="-lx $LIBS"
4405cat > conftest.$ac_ext <<EOF
7613d933 4406#line 4407 "configure"
5ee754fc
MK
4407#include "confdefs.h"
4408/* Override any gcc2 internal prototype to avoid an error. */
4409/* We use char because int might match the return type of a gcc2
4410 builtin and then its argument prototype would still apply. */
4411char opendir();
4412
4413int main() {
4414opendir()
4415; return 0; }
c906108c 4416EOF
7613d933 4417if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4418 rm -rf conftest*
4419 eval "ac_cv_lib_$ac_lib_var=yes"
4420else
4421 echo "configure: failed program was:" >&5
4422 cat conftest.$ac_ext >&5
4423 rm -rf conftest*
4424 eval "ac_cv_lib_$ac_lib_var=no"
4425fi
4426rm -f conftest*
4427LIBS="$ac_save_LIBS"
c906108c 4428
5ee754fc
MK
4429fi
4430if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4431 echo "$ac_t""yes" 1>&6
4432 LIBS="$LIBS -lx"
4433else
4434 echo "$ac_t""no" 1>&6
4435fi
c906108c 4436
5ee754fc 4437fi
c906108c 4438
5ee754fc 4439echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
7613d933 4440echo "configure:4441: checking whether stat file-mode macros are broken" >&5
5ee754fc 4441if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4442 echo $ac_n "(cached) $ac_c" 1>&6
4443else
4444 cat > conftest.$ac_ext <<EOF
7613d933 4445#line 4446 "configure"
9608ab8b
MK
4446#include "confdefs.h"
4447#include <sys/types.h>
5ee754fc
MK
4448#include <sys/stat.h>
4449
4450#if defined(S_ISBLK) && defined(S_IFDIR)
4451# if S_ISBLK (S_IFDIR)
4452You lose.
4453# endif
4454#endif
4455
4456#if defined(S_ISBLK) && defined(S_IFCHR)
4457# if S_ISBLK (S_IFCHR)
4458You lose.
4459# endif
4460#endif
4461
4462#if defined(S_ISLNK) && defined(S_IFREG)
4463# if S_ISLNK (S_IFREG)
4464You lose.
4465# endif
4466#endif
4467
4468#if defined(S_ISSOCK) && defined(S_IFREG)
4469# if S_ISSOCK (S_IFREG)
4470You lose.
4471# endif
4472#endif
4473
9608ab8b 4474EOF
5ee754fc
MK
4475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4476 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4477 rm -rf conftest*
5ee754fc
MK
4478 ac_cv_header_stat_broken=yes
4479else
4480 rm -rf conftest*
4481 ac_cv_header_stat_broken=no
4482fi
4483rm -f conftest*
4484
4485fi
4486
4487echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4488if test $ac_cv_header_stat_broken = yes; then
4489 cat >> confdefs.h <<\EOF
4490#define STAT_MACROS_BROKEN 1
4491EOF
4492
4493fi
4494
4495echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7613d933 4496echo "configure:4497: checking for ANSI C header files" >&5
5ee754fc
MK
4497if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4498 echo $ac_n "(cached) $ac_c" 1>&6
4499else
4500 cat > conftest.$ac_ext <<EOF
7613d933 4501#line 4502 "configure"
5ee754fc
MK
4502#include "confdefs.h"
4503#include <stdlib.h>
4504#include <stdarg.h>
4505#include <string.h>
4506#include <float.h>
4507EOF
4508ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4509{ (eval echo configure:4510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4510ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4511if test -z "$ac_err"; then
4512 rm -rf conftest*
4513 ac_cv_header_stdc=yes
4514else
4515 echo "$ac_err" >&5
4516 echo "configure: failed program was:" >&5
4517 cat conftest.$ac_ext >&5
4518 rm -rf conftest*
4519 ac_cv_header_stdc=no
4520fi
4521rm -f conftest*
4522
4523if test $ac_cv_header_stdc = yes; then
4524 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4525cat > conftest.$ac_ext <<EOF
7613d933 4526#line 4527 "configure"
5ee754fc
MK
4527#include "confdefs.h"
4528#include <string.h>
4529EOF
4530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4531 egrep "memchr" >/dev/null 2>&1; then
4532 :
4533else
4534 rm -rf conftest*
4535 ac_cv_header_stdc=no
4536fi
4537rm -f conftest*
4538
4539fi
4540
4541if test $ac_cv_header_stdc = yes; then
4542 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4543cat > conftest.$ac_ext <<EOF
7613d933 4544#line 4545 "configure"
5ee754fc
MK
4545#include "confdefs.h"
4546#include <stdlib.h>
4547EOF
4548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4549 egrep "free" >/dev/null 2>&1; then
4550 :
4551else
4552 rm -rf conftest*
4553 ac_cv_header_stdc=no
4554fi
4555rm -f conftest*
4556
4557fi
4558
4559if test $ac_cv_header_stdc = yes; then
4560 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4561if test "$cross_compiling" = yes; then
4562 :
4563else
4564 cat > conftest.$ac_ext <<EOF
7613d933 4565#line 4566 "configure"
5ee754fc
MK
4566#include "confdefs.h"
4567#include <ctype.h>
4568#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4569#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4570#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4571int main () { int i; for (i = 0; i < 256; i++)
4572if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4573exit (0); }
4574
4575EOF
7613d933 4576if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4577then
4578 :
9608ab8b 4579else
5ee754fc
MK
4580 echo "configure: failed program was:" >&5
4581 cat conftest.$ac_ext >&5
4582 rm -fr conftest*
4583 ac_cv_header_stdc=no
4584fi
4585rm -fr conftest*
4586fi
4587
4588fi
4589fi
4590
4591echo "$ac_t""$ac_cv_header_stdc" 1>&6
4592if test $ac_cv_header_stdc = yes; then
4593 cat >> confdefs.h <<\EOF
4594#define STDC_HEADERS 1
4595EOF
4596
4597fi
4598
4599for ac_hdr in link.h
4600do
4601ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4602echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4603echo "configure:4604: checking for $ac_hdr" >&5
5ee754fc
MK
4604if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4605 echo $ac_n "(cached) $ac_c" 1>&6
4606else
4607 cat > conftest.$ac_ext <<EOF
7613d933 4608#line 4609 "configure"
5ee754fc
MK
4609#include "confdefs.h"
4610#include <$ac_hdr>
4611EOF
4612ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4613{ (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4614ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4615if test -z "$ac_err"; then
4616 rm -rf conftest*
4617 eval "ac_cv_header_$ac_safe=yes"
4618else
4619 echo "$ac_err" >&5
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
4623 eval "ac_cv_header_$ac_safe=no"
4624fi
4625rm -f conftest*
4626fi
4627if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4628 echo "$ac_t""yes" 1>&6
4629 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4630 cat >> confdefs.h <<EOF
4631#define $ac_tr_hdr 1
4632EOF
4633
4634else
4635 echo "$ac_t""no" 1>&6
4636fi
4637done
4638
78434e59 4639for ac_hdr in machine/reg.h
5ee754fc
MK
4640do
4641ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4642echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4643echo "configure:4644: checking for $ac_hdr" >&5
5ee754fc
MK
4644if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4645 echo $ac_n "(cached) $ac_c" 1>&6
4646else
4647 cat > conftest.$ac_ext <<EOF
7613d933 4648#line 4649 "configure"
5ee754fc
MK
4649#include "confdefs.h"
4650#include <$ac_hdr>
4651EOF
4652ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4653{ (eval echo configure:4654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4654ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4655if test -z "$ac_err"; then
4656 rm -rf conftest*
4657 eval "ac_cv_header_$ac_safe=yes"
4658else
4659 echo "$ac_err" >&5
4660 echo "configure: failed program was:" >&5
4661 cat conftest.$ac_ext >&5
4662 rm -rf conftest*
4663 eval "ac_cv_header_$ac_safe=no"
4664fi
4665rm -f conftest*
4666fi
4667if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4668 echo "$ac_t""yes" 1>&6
4669 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4670 cat >> confdefs.h <<EOF
4671#define $ac_tr_hdr 1
4672EOF
4673
4674else
4675 echo "$ac_t""no" 1>&6
4676fi
4677done
4678
78434e59 4679for ac_hdr in nlist.h
5ee754fc
MK
4680do
4681ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4682echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4683echo "configure:4684: checking for $ac_hdr" >&5
5ee754fc
MK
4684if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4685 echo $ac_n "(cached) $ac_c" 1>&6
4686else
4687 cat > conftest.$ac_ext <<EOF
7613d933 4688#line 4689 "configure"
5ee754fc
MK
4689#include "confdefs.h"
4690#include <$ac_hdr>
4691EOF
4692ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4693{ (eval echo configure:4694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4694ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4695if test -z "$ac_err"; then
4696 rm -rf conftest*
4697 eval "ac_cv_header_$ac_safe=yes"
4698else
4699 echo "$ac_err" >&5
4700 echo "configure: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 rm -rf conftest*
4703 eval "ac_cv_header_$ac_safe=no"
4704fi
4705rm -f conftest*
4706fi
4707if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4708 echo "$ac_t""yes" 1>&6
4709 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4710 cat >> confdefs.h <<EOF
4711#define $ac_tr_hdr 1
4712EOF
4713
4714else
4715 echo "$ac_t""no" 1>&6
4716fi
4717done
4718
78434e59 4719for ac_hdr in poll.h sys/poll.h
5ee754fc
MK
4720do
4721ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4722echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4723echo "configure:4724: checking for $ac_hdr" >&5
5ee754fc
MK
4724if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4725 echo $ac_n "(cached) $ac_c" 1>&6
4726else
4727 cat > conftest.$ac_ext <<EOF
7613d933 4728#line 4729 "configure"
5ee754fc
MK
4729#include "confdefs.h"
4730#include <$ac_hdr>
4731EOF
4732ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4733{ (eval echo configure:4734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4734ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4735if test -z "$ac_err"; then
4736 rm -rf conftest*
4737 eval "ac_cv_header_$ac_safe=yes"
4738else
4739 echo "$ac_err" >&5
4740 echo "configure: failed program was:" >&5
4741 cat conftest.$ac_ext >&5
4742 rm -rf conftest*
4743 eval "ac_cv_header_$ac_safe=no"
4744fi
4745rm -f conftest*
4746fi
4747if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4748 echo "$ac_t""yes" 1>&6
4749 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4750 cat >> confdefs.h <<EOF
4751#define $ac_tr_hdr 1
4752EOF
4753
4754else
4755 echo "$ac_t""no" 1>&6
4756fi
4757done
4758
78434e59 4759for ac_hdr in proc_service.h thread_db.h
5ee754fc
MK
4760do
4761ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4762echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4763echo "configure:4764: checking for $ac_hdr" >&5
5ee754fc
MK
4764if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4765 echo $ac_n "(cached) $ac_c" 1>&6
4766else
4767 cat > conftest.$ac_ext <<EOF
7613d933 4768#line 4769 "configure"
5ee754fc
MK
4769#include "confdefs.h"
4770#include <$ac_hdr>
4771EOF
4772ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4773{ (eval echo configure:4774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4774ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4775if test -z "$ac_err"; then
4776 rm -rf conftest*
4777 eval "ac_cv_header_$ac_safe=yes"
4778else
4779 echo "$ac_err" >&5
4780 echo "configure: failed program was:" >&5
4781 cat conftest.$ac_ext >&5
4782 rm -rf conftest*
4783 eval "ac_cv_header_$ac_safe=no"
4784fi
4785rm -f conftest*
4786fi
4787if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4788 echo "$ac_t""yes" 1>&6
4789 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4790 cat >> confdefs.h <<EOF
4791#define $ac_tr_hdr 1
4792EOF
4793
4794else
4795 echo "$ac_t""no" 1>&6
4796fi
4797done
4798
78434e59 4799for ac_hdr in stddef.h
5ee754fc
MK
4800do
4801ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4802echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4803echo "configure:4804: checking for $ac_hdr" >&5
5ee754fc
MK
4804if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4805 echo $ac_n "(cached) $ac_c" 1>&6
4806else
4807 cat > conftest.$ac_ext <<EOF
7613d933 4808#line 4809 "configure"
5ee754fc
MK
4809#include "confdefs.h"
4810#include <$ac_hdr>
4811EOF
4812ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4813{ (eval echo configure:4814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4814ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4815if test -z "$ac_err"; then
4816 rm -rf conftest*
4817 eval "ac_cv_header_$ac_safe=yes"
4818else
4819 echo "$ac_err" >&5
4820 echo "configure: failed program was:" >&5
4821 cat conftest.$ac_ext >&5
4822 rm -rf conftest*
4823 eval "ac_cv_header_$ac_safe=no"
4824fi
4825rm -f conftest*
4826fi
4827if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4828 echo "$ac_t""yes" 1>&6
4829 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4830 cat >> confdefs.h <<EOF
4831#define $ac_tr_hdr 1
4832EOF
4833
4834else
4835 echo "$ac_t""no" 1>&6
4836fi
4837done
4838
78434e59 4839for ac_hdr in stdlib.h
5ee754fc
MK
4840do
4841ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4842echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4843echo "configure:4844: checking for $ac_hdr" >&5
5ee754fc
MK
4844if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4845 echo $ac_n "(cached) $ac_c" 1>&6
4846else
4847 cat > conftest.$ac_ext <<EOF
7613d933 4848#line 4849 "configure"
5ee754fc
MK
4849#include "confdefs.h"
4850#include <$ac_hdr>
4851EOF
4852ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4853{ (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4854ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4855if test -z "$ac_err"; then
4856 rm -rf conftest*
4857 eval "ac_cv_header_$ac_safe=yes"
4858else
4859 echo "$ac_err" >&5
4860 echo "configure: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4862 rm -rf conftest*
4863 eval "ac_cv_header_$ac_safe=no"
4864fi
4865rm -f conftest*
4866fi
4867if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4868 echo "$ac_t""yes" 1>&6
4869 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4870 cat >> confdefs.h <<EOF
4871#define $ac_tr_hdr 1
4872EOF
4873
4874else
4875 echo "$ac_t""no" 1>&6
4876fi
4877done
4878
78434e59 4879for ac_hdr in stdint.h
5ee754fc
MK
4880do
4881ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4882echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4883echo "configure:4884: checking for $ac_hdr" >&5
5ee754fc
MK
4884if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4885 echo $ac_n "(cached) $ac_c" 1>&6
4886else
4887 cat > conftest.$ac_ext <<EOF
7613d933 4888#line 4889 "configure"
5ee754fc
MK
4889#include "confdefs.h"
4890#include <$ac_hdr>
4891EOF
4892ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4893{ (eval echo configure:4894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4894ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4895if test -z "$ac_err"; then
4896 rm -rf conftest*
4897 eval "ac_cv_header_$ac_safe=yes"
4898else
4899 echo "$ac_err" >&5
4900 echo "configure: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
4902 rm -rf conftest*
4903 eval "ac_cv_header_$ac_safe=no"
4904fi
4905rm -f conftest*
4906fi
4907if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4908 echo "$ac_t""yes" 1>&6
4909 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4910 cat >> confdefs.h <<EOF
4911#define $ac_tr_hdr 1
4912EOF
4913
4914else
4915 echo "$ac_t""no" 1>&6
4916fi
4917done
4918
78434e59 4919for ac_hdr in string.h memory.h strings.h
5ee754fc
MK
4920do
4921ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4922echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4923echo "configure:4924: checking for $ac_hdr" >&5
5ee754fc
MK
4924if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4925 echo $ac_n "(cached) $ac_c" 1>&6
4926else
4927 cat > conftest.$ac_ext <<EOF
7613d933 4928#line 4929 "configure"
5ee754fc
MK
4929#include "confdefs.h"
4930#include <$ac_hdr>
4931EOF
4932ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4933{ (eval echo configure:4934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4934ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4935if test -z "$ac_err"; then
4936 rm -rf conftest*
4937 eval "ac_cv_header_$ac_safe=yes"
4938else
4939 echo "$ac_err" >&5
4940 echo "configure: failed program was:" >&5
4941 cat conftest.$ac_ext >&5
4942 rm -rf conftest*
4943 eval "ac_cv_header_$ac_safe=no"
4944fi
4945rm -f conftest*
4946fi
4947if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4948 echo "$ac_t""yes" 1>&6
4949 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4950 cat >> confdefs.h <<EOF
4951#define $ac_tr_hdr 1
4952EOF
4953
4954else
4955 echo "$ac_t""no" 1>&6
4956fi
4957done
4958
78434e59 4959for ac_hdr in sys/fault.h
5ee754fc
MK
4960do
4961ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4962echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 4963echo "configure:4964: checking for $ac_hdr" >&5
5ee754fc
MK
4964if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
4966else
4967 cat > conftest.$ac_ext <<EOF
7613d933 4968#line 4969 "configure"
5ee754fc
MK
4969#include "confdefs.h"
4970#include <$ac_hdr>
4971EOF
4972ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 4973{ (eval echo configure:4974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4974ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4975if test -z "$ac_err"; then
4976 rm -rf conftest*
4977 eval "ac_cv_header_$ac_safe=yes"
4978else
4979 echo "$ac_err" >&5
4980 echo "configure: failed program was:" >&5
4981 cat conftest.$ac_ext >&5
4982 rm -rf conftest*
4983 eval "ac_cv_header_$ac_safe=no"
4984fi
4985rm -f conftest*
4986fi
4987if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4988 echo "$ac_t""yes" 1>&6
4989 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4990 cat >> confdefs.h <<EOF
4991#define $ac_tr_hdr 1
4992EOF
4993
4994else
4995 echo "$ac_t""no" 1>&6
4996fi
4997done
4998
78434e59 4999for ac_hdr in sys/file.h
5ee754fc
MK
5000do
5001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5003echo "configure:5004: checking for $ac_hdr" >&5
5ee754fc
MK
5004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5005 echo $ac_n "(cached) $ac_c" 1>&6
5006else
5007 cat > conftest.$ac_ext <<EOF
7613d933 5008#line 5009 "configure"
5ee754fc
MK
5009#include "confdefs.h"
5010#include <$ac_hdr>
5011EOF
5012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5013{ (eval echo configure:5014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5014ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5015if test -z "$ac_err"; then
5016 rm -rf conftest*
5017 eval "ac_cv_header_$ac_safe=yes"
5018else
5019 echo "$ac_err" >&5
5020 echo "configure: failed program was:" >&5
5021 cat conftest.$ac_ext >&5
5022 rm -rf conftest*
5023 eval "ac_cv_header_$ac_safe=no"
5024fi
5025rm -f conftest*
5026fi
5027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5028 echo "$ac_t""yes" 1>&6
5029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5030 cat >> confdefs.h <<EOF
5031#define $ac_tr_hdr 1
5032EOF
5033
5034else
5035 echo "$ac_t""no" 1>&6
5036fi
5037done
5038
78434e59 5039for ac_hdr in sys/filio.h
5ee754fc
MK
5040do
5041ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5042echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5043echo "configure:5044: checking for $ac_hdr" >&5
5ee754fc
MK
5044if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5045 echo $ac_n "(cached) $ac_c" 1>&6
5046else
5047 cat > conftest.$ac_ext <<EOF
7613d933 5048#line 5049 "configure"
5ee754fc
MK
5049#include "confdefs.h"
5050#include <$ac_hdr>
5051EOF
5052ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5053{ (eval echo configure:5054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5054ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5055if test -z "$ac_err"; then
5056 rm -rf conftest*
5057 eval "ac_cv_header_$ac_safe=yes"
5058else
5059 echo "$ac_err" >&5
5060 echo "configure: failed program was:" >&5
5061 cat conftest.$ac_ext >&5
5062 rm -rf conftest*
5063 eval "ac_cv_header_$ac_safe=no"
5064fi
5065rm -f conftest*
5066fi
5067if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5068 echo "$ac_t""yes" 1>&6
5069 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5070 cat >> confdefs.h <<EOF
5071#define $ac_tr_hdr 1
5072EOF
5073
5074else
5075 echo "$ac_t""no" 1>&6
5076fi
5077done
5078
78434e59 5079for ac_hdr in sys/ioctl.h
5ee754fc
MK
5080do
5081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5083echo "configure:5084: checking for $ac_hdr" >&5
5ee754fc
MK
5084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5085 echo $ac_n "(cached) $ac_c" 1>&6
5086else
5087 cat > conftest.$ac_ext <<EOF
7613d933 5088#line 5089 "configure"
5ee754fc
MK
5089#include "confdefs.h"
5090#include <$ac_hdr>
5091EOF
5092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5093{ (eval echo configure:5094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5095if test -z "$ac_err"; then
5096 rm -rf conftest*
5097 eval "ac_cv_header_$ac_safe=yes"
5098else
5099 echo "$ac_err" >&5
5100 echo "configure: failed program was:" >&5
5101 cat conftest.$ac_ext >&5
5102 rm -rf conftest*
5103 eval "ac_cv_header_$ac_safe=no"
5104fi
5105rm -f conftest*
5106fi
5107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5108 echo "$ac_t""yes" 1>&6
5109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5110 cat >> confdefs.h <<EOF
5111#define $ac_tr_hdr 1
5112EOF
5113
5114else
5115 echo "$ac_t""no" 1>&6
5116fi
5117done
5118
78434e59 5119for ac_hdr in sys/param.h
5ee754fc
MK
5120do
5121ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5122echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5123echo "configure:5124: checking for $ac_hdr" >&5
5ee754fc
MK
5124if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5125 echo $ac_n "(cached) $ac_c" 1>&6
5126else
5127 cat > conftest.$ac_ext <<EOF
7613d933 5128#line 5129 "configure"
5ee754fc
MK
5129#include "confdefs.h"
5130#include <$ac_hdr>
5131EOF
5132ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5133{ (eval echo configure:5134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5134ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5135if test -z "$ac_err"; then
5136 rm -rf conftest*
5137 eval "ac_cv_header_$ac_safe=yes"
5138else
5139 echo "$ac_err" >&5
5140 echo "configure: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 rm -rf conftest*
5143 eval "ac_cv_header_$ac_safe=no"
5144fi
5145rm -f conftest*
5146fi
5147if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5148 echo "$ac_t""yes" 1>&6
5149 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5150 cat >> confdefs.h <<EOF
5151#define $ac_tr_hdr 1
5152EOF
5153
5154else
5155 echo "$ac_t""no" 1>&6
5156fi
5157done
5158
78434e59 5159for ac_hdr in sys/proc.h
5ee754fc
MK
5160do
5161ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5162echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5163echo "configure:5164: checking for $ac_hdr" >&5
5ee754fc
MK
5164if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5165 echo $ac_n "(cached) $ac_c" 1>&6
5166else
5167 cat > conftest.$ac_ext <<EOF
7613d933 5168#line 5169 "configure"
5ee754fc
MK
5169#include "confdefs.h"
5170#include <$ac_hdr>
5171EOF
5172ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5173{ (eval echo configure:5174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5174ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5175if test -z "$ac_err"; then
5176 rm -rf conftest*
5177 eval "ac_cv_header_$ac_safe=yes"
5178else
5179 echo "$ac_err" >&5
5180 echo "configure: failed program was:" >&5
5181 cat conftest.$ac_ext >&5
5182 rm -rf conftest*
5183 eval "ac_cv_header_$ac_safe=no"
5184fi
5185rm -f conftest*
5186fi
5187if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5188 echo "$ac_t""yes" 1>&6
5189 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5190 cat >> confdefs.h <<EOF
5191#define $ac_tr_hdr 1
5192EOF
5193
5194else
5195 echo "$ac_t""no" 1>&6
5196fi
5197done
5198
78434e59 5199for ac_hdr in sys/procfs.h
5ee754fc
MK
5200do
5201ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5202echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5203echo "configure:5204: checking for $ac_hdr" >&5
5ee754fc
MK
5204if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5205 echo $ac_n "(cached) $ac_c" 1>&6
5206else
5207 cat > conftest.$ac_ext <<EOF
7613d933 5208#line 5209 "configure"
5ee754fc
MK
5209#include "confdefs.h"
5210#include <$ac_hdr>
5211EOF
5212ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5213{ (eval echo configure:5214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5214ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5215if test -z "$ac_err"; then
5216 rm -rf conftest*
5217 eval "ac_cv_header_$ac_safe=yes"
5218else
5219 echo "$ac_err" >&5
5220 echo "configure: failed program was:" >&5
5221 cat conftest.$ac_ext >&5
5222 rm -rf conftest*
5223 eval "ac_cv_header_$ac_safe=no"
5224fi
5225rm -f conftest*
5226fi
5227if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5228 echo "$ac_t""yes" 1>&6
5229 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5230 cat >> confdefs.h <<EOF
5231#define $ac_tr_hdr 1
5232EOF
5233
5234else
5235 echo "$ac_t""no" 1>&6
5236fi
5237done
5238
78434e59 5239for ac_hdr in sys/ptrace.h ptrace.h
5ee754fc
MK
5240do
5241ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5242echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5243echo "configure:5244: checking for $ac_hdr" >&5
5ee754fc
MK
5244if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5245 echo $ac_n "(cached) $ac_c" 1>&6
5246else
5247 cat > conftest.$ac_ext <<EOF
7613d933 5248#line 5249 "configure"
5ee754fc
MK
5249#include "confdefs.h"
5250#include <$ac_hdr>
5251EOF
5252ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5253{ (eval echo configure:5254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5254ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5255if test -z "$ac_err"; then
5256 rm -rf conftest*
5257 eval "ac_cv_header_$ac_safe=yes"
5258else
5259 echo "$ac_err" >&5
5260 echo "configure: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
5262 rm -rf conftest*
5263 eval "ac_cv_header_$ac_safe=no"
5264fi
5265rm -f conftest*
5266fi
5267if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5268 echo "$ac_t""yes" 1>&6
5269 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5270 cat >> confdefs.h <<EOF
5271#define $ac_tr_hdr 1
5272EOF
5273
5274else
5275 echo "$ac_t""no" 1>&6
5276fi
5277done
5278
78434e59 5279for ac_hdr in sys/reg.h sys/debugreg.h
5ee754fc
MK
5280do
5281ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5282echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5283echo "configure:5284: checking for $ac_hdr" >&5
5ee754fc
MK
5284if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5285 echo $ac_n "(cached) $ac_c" 1>&6
5286else
5287 cat > conftest.$ac_ext <<EOF
7613d933 5288#line 5289 "configure"
5ee754fc
MK
5289#include "confdefs.h"
5290#include <$ac_hdr>
5291EOF
5292ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5293{ (eval echo configure:5294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5294ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5295if test -z "$ac_err"; then
5296 rm -rf conftest*
5297 eval "ac_cv_header_$ac_safe=yes"
5298else
5299 echo "$ac_err" >&5
5300 echo "configure: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 rm -rf conftest*
5303 eval "ac_cv_header_$ac_safe=no"
5304fi
5305rm -f conftest*
5306fi
5307if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5308 echo "$ac_t""yes" 1>&6
5309 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5310 cat >> confdefs.h <<EOF
5311#define $ac_tr_hdr 1
5312EOF
5313
5314else
5315 echo "$ac_t""no" 1>&6
5316fi
5317done
5318
78434e59 5319for ac_hdr in sys/select.h
5ee754fc
MK
5320do
5321ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5322echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5323echo "configure:5324: checking for $ac_hdr" >&5
5ee754fc
MK
5324if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5325 echo $ac_n "(cached) $ac_c" 1>&6
5326else
5327 cat > conftest.$ac_ext <<EOF
7613d933 5328#line 5329 "configure"
5ee754fc
MK
5329#include "confdefs.h"
5330#include <$ac_hdr>
5331EOF
5332ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5333{ (eval echo configure:5334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5334ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5335if test -z "$ac_err"; then
5336 rm -rf conftest*
5337 eval "ac_cv_header_$ac_safe=yes"
5338else
5339 echo "$ac_err" >&5
5340 echo "configure: failed program was:" >&5
5341 cat conftest.$ac_ext >&5
5342 rm -rf conftest*
5343 eval "ac_cv_header_$ac_safe=no"
5344fi
5345rm -f conftest*
5346fi
5347if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5348 echo "$ac_t""yes" 1>&6
5349 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5350 cat >> confdefs.h <<EOF
5351#define $ac_tr_hdr 1
5352EOF
5353
5354else
5355 echo "$ac_t""no" 1>&6
5356fi
5357done
5358
78434e59 5359for ac_hdr in sys/syscall.h
5ee754fc
MK
5360do
5361ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5362echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5363echo "configure:5364: checking for $ac_hdr" >&5
5ee754fc
MK
5364if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5365 echo $ac_n "(cached) $ac_c" 1>&6
5366else
5367 cat > conftest.$ac_ext <<EOF
7613d933 5368#line 5369 "configure"
5ee754fc
MK
5369#include "confdefs.h"
5370#include <$ac_hdr>
5371EOF
5372ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5373{ (eval echo configure:5374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5374ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5375if test -z "$ac_err"; then
5376 rm -rf conftest*
5377 eval "ac_cv_header_$ac_safe=yes"
5378else
5379 echo "$ac_err" >&5
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
5382 rm -rf conftest*
5383 eval "ac_cv_header_$ac_safe=no"
5384fi
5385rm -f conftest*
5386fi
5387if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5388 echo "$ac_t""yes" 1>&6
5389 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5390 cat >> confdefs.h <<EOF
5391#define $ac_tr_hdr 1
5392EOF
5393
5394else
5395 echo "$ac_t""no" 1>&6
5396fi
5397done
5398
78434e59 5399for ac_hdr in sys/user.h
5ee754fc
MK
5400do
5401ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5402echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5403echo "configure:5404: checking for $ac_hdr" >&5
5ee754fc
MK
5404if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5405 echo $ac_n "(cached) $ac_c" 1>&6
5406else
5407 cat > conftest.$ac_ext <<EOF
7613d933 5408#line 5409 "configure"
5ee754fc
MK
5409#include "confdefs.h"
5410#include <$ac_hdr>
5411EOF
5412ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5413{ (eval echo configure:5414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5414ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5415if test -z "$ac_err"; then
5416 rm -rf conftest*
5417 eval "ac_cv_header_$ac_safe=yes"
5418else
5419 echo "$ac_err" >&5
9608ab8b
MK
5420 echo "configure: failed program was:" >&5
5421 cat conftest.$ac_ext >&5
5422 rm -rf conftest*
5ee754fc 5423 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5424fi
5425rm -f conftest*
5426fi
5ee754fc 5427if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5428 echo "$ac_t""yes" 1>&6
5429 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5430 cat >> confdefs.h <<EOF
5431#define $ac_tr_hdr 1
5432EOF
5ee754fc 5433
9608ab8b
MK
5434else
5435 echo "$ac_t""no" 1>&6
5436fi
5437done
5ee754fc 5438
78434e59 5439for ac_hdr in sys/wait.h wait.h
5ee754fc
MK
5440do
5441ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5442echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5443echo "configure:5444: checking for $ac_hdr" >&5
5ee754fc 5444if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5445 echo $ac_n "(cached) $ac_c" 1>&6
5446else
5ee754fc 5447 cat > conftest.$ac_ext <<EOF
7613d933 5448#line 5449 "configure"
9608ab8b 5449#include "confdefs.h"
5ee754fc 5450#include <$ac_hdr>
9608ab8b 5451EOF
5ee754fc 5452ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5453{ (eval echo configure:5454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5454ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5455if test -z "$ac_err"; then
9608ab8b 5456 rm -rf conftest*
5ee754fc 5457 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5458else
5ee754fc 5459 echo "$ac_err" >&5
9608ab8b
MK
5460 echo "configure: failed program was:" >&5
5461 cat conftest.$ac_ext >&5
5462 rm -rf conftest*
5ee754fc 5463 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5464fi
5465rm -f conftest*
9608ab8b 5466fi
5ee754fc 5467if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5468 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5469 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5470 cat >> confdefs.h <<EOF
5471#define $ac_tr_hdr 1
5472EOF
5473
9608ab8b
MK
5474else
5475 echo "$ac_t""no" 1>&6
5476fi
5ee754fc 5477done
9608ab8b 5478
78434e59 5479for ac_hdr in termios.h termio.h sgtty.h
5ee754fc
MK
5480do
5481ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5482echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5483echo "configure:5484: checking for $ac_hdr" >&5
5ee754fc 5484if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5485 echo $ac_n "(cached) $ac_c" 1>&6
5486else
5ee754fc 5487 cat > conftest.$ac_ext <<EOF
7613d933 5488#line 5489 "configure"
9608ab8b 5489#include "confdefs.h"
5ee754fc 5490#include <$ac_hdr>
9608ab8b 5491EOF
5ee754fc 5492ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5493{ (eval echo configure:5494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5494ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5495if test -z "$ac_err"; then
9608ab8b 5496 rm -rf conftest*
5ee754fc 5497 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5498else
5ee754fc 5499 echo "$ac_err" >&5
9608ab8b
MK
5500 echo "configure: failed program was:" >&5
5501 cat conftest.$ac_ext >&5
5502 rm -rf conftest*
5ee754fc 5503 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5504fi
5505rm -f conftest*
9608ab8b 5506fi
5ee754fc 5507if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5508 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5509 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5510 cat >> confdefs.h <<EOF
5511#define $ac_tr_hdr 1
5512EOF
5513
9608ab8b
MK
5514else
5515 echo "$ac_t""no" 1>&6
5516fi
5ee754fc 5517done
9608ab8b 5518
78434e59
MK
5519for ac_hdr in unistd.h
5520do
5521ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5522echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5523echo "configure:5524: checking for $ac_hdr" >&5
78434e59
MK
5524if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5525 echo $ac_n "(cached) $ac_c" 1>&6
5526else
5527 cat > conftest.$ac_ext <<EOF
7613d933 5528#line 5529 "configure"
78434e59
MK
5529#include "confdefs.h"
5530#include <$ac_hdr>
5531EOF
5532ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5533{ (eval echo configure:5534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78434e59
MK
5534ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5535if test -z "$ac_err"; then
5536 rm -rf conftest*
5537 eval "ac_cv_header_$ac_safe=yes"
5538else
5539 echo "$ac_err" >&5
5540 echo "configure: failed program was:" >&5
5541 cat conftest.$ac_ext >&5
5542 rm -rf conftest*
5543 eval "ac_cv_header_$ac_safe=no"
5544fi
5545rm -f conftest*
5546fi
5547if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5548 echo "$ac_t""yes" 1>&6
5549 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5550 cat >> confdefs.h <<EOF
5551#define $ac_tr_hdr 1
5552EOF
5553
5554else
5555 echo "$ac_t""no" 1>&6
5556fi
5557done
5558
9608ab8b 5559
5ee754fc
MK
5560# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5561# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5562# think that we don't have <curses.h> if we're using GCC.
5563case $host_os in
5564 solaris2.[78])
5565 if test "$GCC" = yes; then
5566 cat >> confdefs.h <<\EOF
5567#define _MSE_INT_H 1
5568EOF
5569
5570 fi ;;
5571esac
5572for ac_hdr in curses.h ncurses.h term.h
5573do
5574ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5575echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5576echo "configure:5577: checking for $ac_hdr" >&5
5ee754fc 5577if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5578 echo $ac_n "(cached) $ac_c" 1>&6
5579else
5580 cat > conftest.$ac_ext <<EOF
7613d933 5581#line 5582 "configure"
c906108c 5582#include "confdefs.h"
5ee754fc 5583#include <$ac_hdr>
c906108c
SS
5584EOF
5585ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5586{ (eval echo configure:5587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5587ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5588if test -z "$ac_err"; then
5589 rm -rf conftest*
5ee754fc 5590 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5591else
5592 echo "$ac_err" >&5
5593 echo "configure: failed program was:" >&5
5594 cat conftest.$ac_ext >&5
5595 rm -rf conftest*
5ee754fc 5596 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5597fi
5598rm -f conftest*
c906108c 5599fi
5ee754fc
MK
5600if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5601 echo "$ac_t""yes" 1>&6
5602 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5603 cat >> confdefs.h <<EOF
5604#define $ac_tr_hdr 1
c906108c 5605EOF
5ee754fc 5606
c906108c 5607else
5ee754fc 5608 echo "$ac_t""no" 1>&6
c906108c 5609fi
5ee754fc 5610done
c906108c
SS
5611
5612
5ee754fc
MK
5613# FIXME: kettenis/20030102: In most cases we include these
5614# unconditionally, so what's the point in checking these?
5615for ac_hdr in ctype.h time.h
c906108c
SS
5616do
5617ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5618echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 5619echo "configure:5620: checking for $ac_hdr" >&5
c906108c
SS
5620if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5621 echo $ac_n "(cached) $ac_c" 1>&6
5622else
5623 cat > conftest.$ac_ext <<EOF
7613d933 5624#line 5625 "configure"
c906108c
SS
5625#include "confdefs.h"
5626#include <$ac_hdr>
5627EOF
5628ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 5629{ (eval echo configure:5630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5630ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5631if test -z "$ac_err"; then
5632 rm -rf conftest*
5633 eval "ac_cv_header_$ac_safe=yes"
5634else
5635 echo "$ac_err" >&5
5636 echo "configure: failed program was:" >&5
5637 cat conftest.$ac_ext >&5
5638 rm -rf conftest*
5639 eval "ac_cv_header_$ac_safe=no"
5640fi
5641rm -f conftest*
5642fi
5643if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5644 echo "$ac_t""yes" 1>&6
5645 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5646 cat >> confdefs.h <<EOF
5647#define $ac_tr_hdr 1
5648EOF
5649
5650else
5651 echo "$ac_t""no" 1>&6
5652fi
5653done
5654
5ee754fc 5655
40a7debc 5656echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
7613d933 5657echo "configure:5658: checking for member st_blocks in struct stat" >&5
40a7debc
EZ
5658if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5659 echo $ac_n "(cached) $ac_c" 1>&6
5660else
5661 cat > conftest.$ac_ext <<EOF
7613d933 5662#line 5663 "configure"
40a7debc
EZ
5663#include "confdefs.h"
5664#include <sys/types.h>
5665#include <sys/stat.h>
5666int main() {
5667struct stat st; (void) st.st_blocks;
5668; return 0; }
5669EOF
7613d933 5670if { (eval echo configure:5671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
40a7debc
EZ
5671 rm -rf conftest*
5672 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5673else
5674 echo "configure: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5676 rm -rf conftest*
5677 gdb_cv_have_struct_stat_with_st_blocks_member=no
5678fi
5679rm -f conftest*
5680fi
5681
5682echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5683if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5684 cat >> confdefs.h <<\EOF
5685#define HAVE_STRUCT_STAT_ST_BLOCKS 1
5686EOF
5687
5688fi
b9362cc7
AC
5689# ------------------------- #
5690# Checks for declarations. #
5691# ------------------------- #
5692
5693for ac_func in getopt
5694do
5695 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5696echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
7613d933 5697echo "configure:5698: checking whether $ac_func is declared" >&5
b9362cc7
AC
5698if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5699 echo $ac_n "(cached) $ac_c" 1>&6
5700else
5701 cat > conftest.$ac_ext <<EOF
7613d933 5702#line 5703 "configure"
b9362cc7
AC
5703#include "confdefs.h"
5704#undef $ac_tr_decl
5705#define $ac_tr_decl 1
5706
5707
5708int main() {
5709#ifndef $ac_func
5710char *(*pfn) = (char *(*)) $ac_func ;
5711#endif
5712; return 0; }
5713EOF
7613d933 5714if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b9362cc7
AC
5715 rm -rf conftest*
5716 eval "gcc_cv_have_decl_$ac_func=yes"
5717else
5718 echo "configure: failed program was:" >&5
5719 cat conftest.$ac_ext >&5
5720 rm -rf conftest*
5721 eval "gcc_cv_have_decl_$ac_func=no"
5722fi
5723rm -f conftest*
5724fi
5725
5726if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5727 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5728#define $ac_tr_decl 1
5729EOF
5730
5731else
5732 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5733#define $ac_tr_decl 0
5734EOF
5735
5736fi
5737
5738done
5739if test x = y ; then
5740 cat >> confdefs.h <<\EOF
5741#define HAVE_DECL_GETOPT 1
5742EOF
5743fi
5744
5745
5ee754fc
MK
5746# ------------------ #
5747# Checks for types. #
5748# ------------------ #
5749
5750echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7613d933 5751echo "configure:5752: checking return type of signal handlers" >&5
5ee754fc 5752if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5753 echo $ac_n "(cached) $ac_c" 1>&6
5754else
5755 cat > conftest.$ac_ext <<EOF
7613d933 5756#line 5757 "configure"
c906108c
SS
5757#include "confdefs.h"
5758#include <sys/types.h>
5ee754fc
MK
5759#include <signal.h>
5760#ifdef signal
5761#undef signal
c906108c 5762#endif
5ee754fc
MK
5763#ifdef __cplusplus
5764extern "C" void (*signal (int, void (*)(int)))(int);
5765#else
5766void (*signal ()) ();
c906108c
SS
5767#endif
5768
5ee754fc
MK
5769int main() {
5770int i;
5771; return 0; }
c906108c 5772EOF
7613d933 5773if { (eval echo configure:5774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5774 rm -rf conftest*
5ee754fc 5775 ac_cv_type_signal=void
c906108c 5776else
5ee754fc
MK
5777 echo "configure: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
c906108c 5779 rm -rf conftest*
5ee754fc 5780 ac_cv_type_signal=int
c906108c
SS
5781fi
5782rm -f conftest*
c906108c
SS
5783fi
5784
5ee754fc
MK
5785echo "$ac_t""$ac_cv_type_signal" 1>&6
5786cat >> confdefs.h <<EOF
5787#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5788EOF
5789
c906108c
SS
5790
5791
5ee754fc
MK
5792# ------------------------------------- #
5793# Checks for compiler characteristics. #
5794# ------------------------------------- #
5795
c906108c 5796echo $ac_n "checking for working const""... $ac_c" 1>&6
7613d933 5797echo "configure:5798: checking for working const" >&5
c906108c
SS
5798if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5799 echo $ac_n "(cached) $ac_c" 1>&6
5800else
5801 cat > conftest.$ac_ext <<EOF
7613d933 5802#line 5803 "configure"
c906108c
SS
5803#include "confdefs.h"
5804
5805int main() {
5806
5807/* Ultrix mips cc rejects this. */
5808typedef int charset[2]; const charset x;
5809/* SunOS 4.1.1 cc rejects this. */
5810char const *const *ccp;
5811char **p;
5812/* NEC SVR4.0.2 mips cc rejects this. */
5813struct point {int x, y;};
5814static struct point const zero = {0,0};
5815/* AIX XL C 1.02.0.0 rejects this.
5816 It does not let you subtract one const X* pointer from another in an arm
5817 of an if-expression whose if-part is not a constant expression */
5818const char *g = "string";
5819ccp = &g + (g ? g-g : 0);
5820/* HPUX 7.0 cc rejects these. */
5821++ccp;
5822p = (char**) ccp;
5823ccp = (char const *const *) p;
5824{ /* SCO 3.2v4 cc rejects this. */
5825 char *t;
5826 char const *s = 0 ? (char *) 0 : (char const *) 0;
5827
5828 *t++ = 0;
5829}
5830{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5831 int x[] = {25, 17};
5832 const int *foo = &x[0];
5833 ++foo;
5834}
5835{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5836 typedef const int *iptr;
5837 iptr p = 0;
5838 ++p;
5839}
5840{ /* AIX XL C 1.02.0.0 rejects this saying
5841 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5842 struct s { int j; const int *ap[3]; };
5843 struct s *b; b->j = 5;
5844}
5845{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5846 const int foo = 10;
5847}
5848
5849; return 0; }
5850EOF
7613d933 5851if { (eval echo configure:5852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5852 rm -rf conftest*
5853 ac_cv_c_const=yes
5854else
5855 echo "configure: failed program was:" >&5
5856 cat conftest.$ac_ext >&5
5857 rm -rf conftest*
5858 ac_cv_c_const=no
5859fi
5860rm -f conftest*
5861fi
5862
5863echo "$ac_t""$ac_cv_c_const" 1>&6
5864if test $ac_cv_c_const = no; then
5865 cat >> confdefs.h <<\EOF
5866#define const
5867EOF
5868
5869fi
5870
bce58c09 5871echo $ac_n "checking for inline""... $ac_c" 1>&6
7613d933 5872echo "configure:5873: checking for inline" >&5
bce58c09
JB
5873if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5874 echo $ac_n "(cached) $ac_c" 1>&6
5875else
5876 ac_cv_c_inline=no
5877for ac_kw in inline __inline__ __inline; do
5878 cat > conftest.$ac_ext <<EOF
7613d933 5879#line 5880 "configure"
bce58c09
JB
5880#include "confdefs.h"
5881
5882int main() {
5883} $ac_kw foo() {
5884; return 0; }
5885EOF
7613d933 5886if { (eval echo configure:5887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5887 rm -rf conftest*
5888 ac_cv_c_inline=$ac_kw; break
5889else
5890 echo "configure: failed program was:" >&5
5891 cat conftest.$ac_ext >&5
5892fi
5893rm -f conftest*
5894done
5895
5896fi
5897
5898echo "$ac_t""$ac_cv_c_inline" 1>&6
5899case "$ac_cv_c_inline" in
5900 inline | yes) ;;
5901 no) cat >> confdefs.h <<\EOF
5902#define inline
5903EOF
5904 ;;
5905 *) cat >> confdefs.h <<EOF
5906#define inline $ac_cv_c_inline
5907EOF
5908 ;;
5909esac
5910
c906108c 5911
5ee754fc
MK
5912# ------------------------------ #
5913# Checks for library functions. #
5914# ------------------------------ #
5915
46711df8
MK
5916# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5917# for constant arguments. Useless!
5918echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
7613d933 5919echo "configure:5920: checking for working alloca.h" >&5
46711df8
MK
5920if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5921 echo $ac_n "(cached) $ac_c" 1>&6
5922else
5923 cat > conftest.$ac_ext <<EOF
7613d933 5924#line 5925 "configure"
46711df8
MK
5925#include "confdefs.h"
5926#include <alloca.h>
5927int main() {
5928char *p = alloca(2 * sizeof(int));
5929; return 0; }
5930EOF
7613d933 5931if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5932 rm -rf conftest*
5933 ac_cv_header_alloca_h=yes
5934else
5935 echo "configure: failed program was:" >&5
5936 cat conftest.$ac_ext >&5
5937 rm -rf conftest*
5938 ac_cv_header_alloca_h=no
5939fi
5940rm -f conftest*
5941fi
5942
5943echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5944if test $ac_cv_header_alloca_h = yes; then
5945 cat >> confdefs.h <<\EOF
5946#define HAVE_ALLOCA_H 1
5947EOF
5948
5949fi
5950
5951echo $ac_n "checking for alloca""... $ac_c" 1>&6
7613d933 5952echo "configure:5953: checking for alloca" >&5
46711df8
MK
5953if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5954 echo $ac_n "(cached) $ac_c" 1>&6
5955else
5956 cat > conftest.$ac_ext <<EOF
7613d933 5957#line 5958 "configure"
46711df8
MK
5958#include "confdefs.h"
5959
5960#ifdef __GNUC__
5961# define alloca __builtin_alloca
5962#else
5963# ifdef _MSC_VER
5964# include <malloc.h>
5965# define alloca _alloca
5966# else
5967# if HAVE_ALLOCA_H
5968# include <alloca.h>
5969# else
5970# ifdef _AIX
5971 #pragma alloca
5972# else
5973# ifndef alloca /* predefined by HP cc +Olibcalls */
5974char *alloca ();
5975# endif
5976# endif
5977# endif
5978# endif
5979#endif
5980
5981int main() {
5982char *p = (char *) alloca(1);
5983; return 0; }
5984EOF
7613d933 5985if { (eval echo configure:5986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5986 rm -rf conftest*
5987 ac_cv_func_alloca_works=yes
5988else
5989 echo "configure: failed program was:" >&5
5990 cat conftest.$ac_ext >&5
5991 rm -rf conftest*
5992 ac_cv_func_alloca_works=no
5993fi
5994rm -f conftest*
5995fi
5996
5997echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5998if test $ac_cv_func_alloca_works = yes; then
5999 cat >> confdefs.h <<\EOF
6000#define HAVE_ALLOCA 1
6001EOF
6002
6003fi
6004
6005if test $ac_cv_func_alloca_works = no; then
6006 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6007 # that cause trouble. Some versions do not even contain alloca or
6008 # contain a buggy version. If you still want to use their alloca,
6009 # use ar to extract alloca.o from them instead of compiling alloca.c.
6010 ALLOCA=alloca.${ac_objext}
6011 cat >> confdefs.h <<\EOF
6012#define C_ALLOCA 1
6013EOF
6014
6015
6016echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
7613d933 6017echo "configure:6018: checking whether alloca needs Cray hooks" >&5
46711df8
MK
6018if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6019 echo $ac_n "(cached) $ac_c" 1>&6
6020else
6021 cat > conftest.$ac_ext <<EOF
7613d933 6022#line 6023 "configure"
46711df8
MK
6023#include "confdefs.h"
6024#if defined(CRAY) && ! defined(CRAY2)
6025webecray
6026#else
6027wenotbecray
6028#endif
6029
6030EOF
6031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6032 egrep "webecray" >/dev/null 2>&1; then
6033 rm -rf conftest*
6034 ac_cv_os_cray=yes
6035else
6036 rm -rf conftest*
6037 ac_cv_os_cray=no
6038fi
6039rm -f conftest*
6040
6041fi
6042
6043echo "$ac_t""$ac_cv_os_cray" 1>&6
6044if test $ac_cv_os_cray = yes; then
6045for ac_func in _getb67 GETB67 getb67; do
6046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6047echo "configure:6048: checking for $ac_func" >&5
46711df8
MK
6048if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6049 echo $ac_n "(cached) $ac_c" 1>&6
6050else
6051 cat > conftest.$ac_ext <<EOF
7613d933 6052#line 6053 "configure"
46711df8
MK
6053#include "confdefs.h"
6054/* System header to define __stub macros and hopefully few prototypes,
6055 which can conflict with char $ac_func(); below. */
6056#include <assert.h>
6057/* Override any gcc2 internal prototype to avoid an error. */
6058/* We use char because int might match the return type of a gcc2
6059 builtin and then its argument prototype would still apply. */
6060char $ac_func();
6061
6062int main() {
6063
6064/* The GNU C library defines this for functions which it implements
6065 to always fail with ENOSYS. Some functions are actually named
6066 something starting with __ and the normal name is an alias. */
6067#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6068choke me
6069#else
6070$ac_func();
6071#endif
6072
6073; return 0; }
6074EOF
7613d933 6075if { (eval echo configure:6076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
6076 rm -rf conftest*
6077 eval "ac_cv_func_$ac_func=yes"
6078else
6079 echo "configure: failed program was:" >&5
6080 cat conftest.$ac_ext >&5
6081 rm -rf conftest*
6082 eval "ac_cv_func_$ac_func=no"
6083fi
6084rm -f conftest*
6085fi
6086
6087if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6088 echo "$ac_t""yes" 1>&6
6089 cat >> confdefs.h <<EOF
6090#define CRAY_STACKSEG_END $ac_func
6091EOF
6092
6093 break
6094else
6095 echo "$ac_t""no" 1>&6
6096fi
6097
6098done
6099fi
6100
6101echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
7613d933 6102echo "configure:6103: checking stack direction for C alloca" >&5
46711df8
MK
6103if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6104 echo $ac_n "(cached) $ac_c" 1>&6
6105else
6106 if test "$cross_compiling" = yes; then
6107 ac_cv_c_stack_direction=0
6108else
6109 cat > conftest.$ac_ext <<EOF
7613d933 6110#line 6111 "configure"
46711df8
MK
6111#include "confdefs.h"
6112find_stack_direction ()
6113{
6114 static char *addr = 0;
6115 auto char dummy;
6116 if (addr == 0)
6117 {
6118 addr = &dummy;
6119 return find_stack_direction ();
6120 }
6121 else
6122 return (&dummy > addr) ? 1 : -1;
6123}
6124main ()
6125{
6126 exit (find_stack_direction() < 0);
6127}
6128EOF
7613d933 6129if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
6130then
6131 ac_cv_c_stack_direction=1
6132else
6133 echo "configure: failed program was:" >&5
6134 cat conftest.$ac_ext >&5
6135 rm -fr conftest*
6136 ac_cv_c_stack_direction=-1
6137fi
6138rm -fr conftest*
6139fi
6140
6141fi
6142
6143echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6144cat >> confdefs.h <<EOF
6145#define STACK_DIRECTION $ac_cv_c_stack_direction
6146EOF
6147
6148fi
6149
d836ee13 6150for ac_hdr in unistd.h
97bf5e38
MK
6151do
6152ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6153echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7613d933 6154echo "configure:6155: checking for $ac_hdr" >&5
74c1b268
AC
6155if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6156 echo $ac_n "(cached) $ac_c" 1>&6
6157else
6158 cat > conftest.$ac_ext <<EOF
7613d933 6159#line 6160 "configure"
74c1b268 6160#include "confdefs.h"
97bf5e38 6161#include <$ac_hdr>
74c1b268
AC
6162EOF
6163ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 6164{ (eval echo configure:6165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
6165ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6166if test -z "$ac_err"; then
6167 rm -rf conftest*
6168 eval "ac_cv_header_$ac_safe=yes"
6169else
6170 echo "$ac_err" >&5
6171 echo "configure: failed program was:" >&5
6172 cat conftest.$ac_ext >&5
6173 rm -rf conftest*
6174 eval "ac_cv_header_$ac_safe=no"
6175fi
6176rm -f conftest*
6177fi
6178if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6179 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6180 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6181 cat >> confdefs.h <<EOF
6182#define $ac_tr_hdr 1
74c1b268 6183EOF
97bf5e38 6184
74c1b268
AC
6185else
6186 echo "$ac_t""no" 1>&6
6187fi
97bf5e38 6188done
74c1b268 6189
97bf5e38
MK
6190for ac_func in getpagesize
6191do
6192echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6193echo "configure:6194: checking for $ac_func" >&5
97bf5e38 6194if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
6195 echo $ac_n "(cached) $ac_c" 1>&6
6196else
6197 cat > conftest.$ac_ext <<EOF
7613d933 6198#line 6199 "configure"
74c1b268
AC
6199#include "confdefs.h"
6200/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 6201 which can conflict with char $ac_func(); below. */
74c1b268
AC
6202#include <assert.h>
6203/* Override any gcc2 internal prototype to avoid an error. */
6204/* We use char because int might match the return type of a gcc2
6205 builtin and then its argument prototype would still apply. */
97bf5e38 6206char $ac_func();
74c1b268
AC
6207
6208int main() {
6209
6210/* The GNU C library defines this for functions which it implements
6211 to always fail with ENOSYS. Some functions are actually named
6212 something starting with __ and the normal name is an alias. */
97bf5e38 6213#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
6214choke me
6215#else
97bf5e38 6216$ac_func();
74c1b268
AC
6217#endif
6218
6219; return 0; }
6220EOF
7613d933 6221if { (eval echo configure:6222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 6222 rm -rf conftest*
97bf5e38 6223 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
6224else
6225 echo "configure: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6227 rm -rf conftest*
97bf5e38 6228 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
6229fi
6230rm -f conftest*
6231fi
6232
97bf5e38 6233if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 6234 echo "$ac_t""yes" 1>&6
97bf5e38
MK
6235 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6236 cat >> confdefs.h <<EOF
6237#define $ac_tr_func 1
6238EOF
6239
74c1b268
AC
6240else
6241 echo "$ac_t""no" 1>&6
6242fi
97bf5e38 6243done
74c1b268 6244
97bf5e38 6245echo $ac_n "checking for working mmap""... $ac_c" 1>&6
7613d933 6246echo "configure:6247: checking for working mmap" >&5
97bf5e38
MK
6247if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6248 echo $ac_n "(cached) $ac_c" 1>&6
6249else
6250 if test "$cross_compiling" = yes; then
6251 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6252else
6253 cat > conftest.$ac_ext <<EOF
7613d933 6254#line 6255 "configure"
74c1b268 6255#include "confdefs.h"
97bf5e38
MK
6256
6257/* Thanks to Mike Haertel and Jim Avera for this test.
6258 Here is a matrix of mmap possibilities:
6259 mmap private not fixed
6260 mmap private fixed at somewhere currently unmapped
6261 mmap private fixed at somewhere already mapped
6262 mmap shared not fixed
6263 mmap shared fixed at somewhere currently unmapped
6264 mmap shared fixed at somewhere already mapped
6265 For private mappings, we should verify that changes cannot be read()
6266 back from the file, nor mmap's back from the file at a different
6267 address. (There have been systems where private was not correctly
6268 implemented like the infamous i386 svr4.0, and systems where the
6269 VM page cache was not coherent with the filesystem buffer cache
6270 like early versions of FreeBSD and possibly contemporary NetBSD.)
6271 For shared mappings, we should conversely verify that changes get
6272 propogated back to all the places they're supposed to be.
6273
6274 Grep wants private fixed already mapped.
6275 The main things grep needs to know about mmap are:
6276 * does it exist and is it safe to write into the mmap'd area
6277 * how to use it (BSD variants) */
74c1b268 6278#include <sys/types.h>
97bf5e38
MK
6279#include <fcntl.h>
6280#include <sys/mman.h>
6281
6282/* This mess was copied from the GNU getpagesize.h. */
6283#ifndef HAVE_GETPAGESIZE
d836ee13
AC
6284# ifdef HAVE_UNISTD_H
6285# include <unistd.h>
6286# endif
97bf5e38
MK
6287
6288/* Assume that all systems that can run configure have sys/param.h. */
6289# ifndef HAVE_SYS_PARAM_H
6290# define HAVE_SYS_PARAM_H 1
6291# endif
6292
6293# ifdef _SC_PAGESIZE
6294# define getpagesize() sysconf(_SC_PAGESIZE)
6295# else /* no _SC_PAGESIZE */
6296# ifdef HAVE_SYS_PARAM_H
6297# include <sys/param.h>
6298# ifdef EXEC_PAGESIZE
6299# define getpagesize() EXEC_PAGESIZE
6300# else /* no EXEC_PAGESIZE */
6301# ifdef NBPG
6302# define getpagesize() NBPG * CLSIZE
6303# ifndef CLSIZE
6304# define CLSIZE 1
6305# endif /* no CLSIZE */
6306# else /* no NBPG */
6307# ifdef NBPC
6308# define getpagesize() NBPC
6309# else /* no NBPC */
6310# ifdef PAGESIZE
6311# define getpagesize() PAGESIZE
6312# endif /* PAGESIZE */
6313# endif /* no NBPC */
6314# endif /* no NBPG */
6315# endif /* no EXEC_PAGESIZE */
6316# else /* no HAVE_SYS_PARAM_H */
6317# define getpagesize() 8192 /* punt totally */
6318# endif /* no HAVE_SYS_PARAM_H */
6319# endif /* no _SC_PAGESIZE */
6320
6321#endif /* no HAVE_GETPAGESIZE */
6322
74c1b268 6323#ifdef __cplusplus
97bf5e38 6324extern "C" { void *malloc(unsigned); }
74c1b268 6325#else
97bf5e38 6326char *malloc();
74c1b268 6327#endif
74c1b268 6328
97bf5e38
MK
6329int
6330main()
6331{
6332 char *data, *data2, *data3;
6333 int i, pagesize;
6334 int fd;
74c1b268 6335
97bf5e38 6336 pagesize = getpagesize();
74c1b268 6337
97bf5e38
MK
6338 /*
6339 * First, make a file with some known garbage in it.
6340 */
6341 data = malloc(pagesize);
6342 if (!data)
6343 exit(1);
6344 for (i = 0; i < pagesize; ++i)
6345 *(data + i) = rand();
6346 umask(0);
6347 fd = creat("conftestmmap", 0600);
6348 if (fd < 0)
6349 exit(1);
6350 if (write(fd, data, pagesize) != pagesize)
6351 exit(1);
6352 close(fd);
74c1b268 6353
97bf5e38
MK
6354 /*
6355 * Next, try to mmap the file at a fixed address which
6356 * already has something else allocated at it. If we can,
6357 * also make sure that we see the same garbage.
6358 */
6359 fd = open("conftestmmap", O_RDWR);
6360 if (fd < 0)
6361 exit(1);
6362 data2 = malloc(2 * pagesize);
6363 if (!data2)
6364 exit(1);
6365 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6366 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6367 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6368 exit(1);
6369 for (i = 0; i < pagesize; ++i)
6370 if (*(data + i) != *(data2 + i))
6371 exit(1);
74c1b268 6372
97bf5e38
MK
6373 /*
6374 * Finally, make sure that changes to the mapped area
6375 * do not percolate back to the file as seen by read().
6376 * (This is a bug on some variants of i386 svr4.0.)
6377 */
6378 for (i = 0; i < pagesize; ++i)
6379 *(data2 + i) = *(data2 + i) + 1;
6380 data3 = malloc(pagesize);
6381 if (!data3)
6382 exit(1);
6383 if (read(fd, data3, pagesize) != pagesize)
6384 exit(1);
6385 for (i = 0; i < pagesize; ++i)
6386 if (*(data + i) != *(data3 + i))
6387 exit(1);
6388 close(fd);
6389 unlink("conftestmmap");
6390 exit(0);
74c1b268 6391}
97bf5e38 6392
74c1b268 6393EOF
7613d933 6394if { (eval echo configure:6395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 6395then
97bf5e38 6396 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
6397else
6398 echo "configure: failed program was:" >&5
6399 cat conftest.$ac_ext >&5
6400 rm -fr conftest*
97bf5e38 6401 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
6402fi
6403rm -fr conftest*
6404fi
6405
6406fi
6407
97bf5e38
MK
6408echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6409if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 6410 cat >> confdefs.h <<\EOF
97bf5e38 6411#define HAVE_MMAP 1
74c1b268
AC
6412EOF
6413
6414fi
6415
97bf5e38 6416echo $ac_n "checking for pid_t""... $ac_c" 1>&6
7613d933 6417echo "configure:6418: checking for pid_t" >&5
97bf5e38 6418if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 6419 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
6420else
6421 cat > conftest.$ac_ext <<EOF
7613d933 6422#line 6423 "configure"
0200359f 6423#include "confdefs.h"
97bf5e38
MK
6424#include <sys/types.h>
6425#if STDC_HEADERS
6426#include <stdlib.h>
6427#include <stddef.h>
0200359f 6428#endif
0200359f 6429EOF
97bf5e38
MK
6430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6431 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6432 rm -rf conftest*
6433 ac_cv_type_pid_t=yes
0200359f 6434else
97bf5e38
MK
6435 rm -rf conftest*
6436 ac_cv_type_pid_t=no
0200359f 6437fi
97bf5e38 6438rm -f conftest*
0200359f
MK
6439
6440fi
97bf5e38
MK
6441echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6442if test $ac_cv_type_pid_t = no; then
0200359f 6443 cat >> confdefs.h <<\EOF
97bf5e38 6444#define pid_t int
0200359f
MK
6445EOF
6446
6447fi
6448
97bf5e38
MK
6449ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6450echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
7613d933 6451echo "configure:6452: checking for vfork.h" >&5
97bf5e38 6452if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
6453 echo $ac_n "(cached) $ac_c" 1>&6
6454else
6455 cat > conftest.$ac_ext <<EOF
7613d933 6456#line 6457 "configure"
72473524 6457#include "confdefs.h"
97bf5e38 6458#include <vfork.h>
72473524 6459EOF
97bf5e38 6460ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 6461{ (eval echo configure:6462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
6462ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6463if test -z "$ac_err"; then
72473524 6464 rm -rf conftest*
97bf5e38 6465 eval "ac_cv_header_$ac_safe=yes"
72473524 6466else
97bf5e38 6467 echo "$ac_err" >&5
72473524
DJ
6468 echo "configure: failed program was:" >&5
6469 cat conftest.$ac_ext >&5
6470 rm -rf conftest*
97bf5e38 6471 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
6472fi
6473rm -f conftest*
6474fi
97bf5e38
MK
6475if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6476 echo "$ac_t""yes" 1>&6
72473524 6477 cat >> confdefs.h <<\EOF
97bf5e38 6478#define HAVE_VFORK_H 1
72473524
DJ
6479EOF
6480
97bf5e38
MK
6481else
6482 echo "$ac_t""no" 1>&6
72473524 6483fi
c906108c 6484
97bf5e38 6485echo $ac_n "checking for working vfork""... $ac_c" 1>&6
7613d933 6486echo "configure:6487: checking for working vfork" >&5
97bf5e38
MK
6487if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6488 echo $ac_n "(cached) $ac_c" 1>&6
6489else
6490 if test "$cross_compiling" = yes; then
6491 echo $ac_n "checking for vfork""... $ac_c" 1>&6
7613d933 6492echo "configure:6493: checking for vfork" >&5
97bf5e38 6493if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6494 echo $ac_n "(cached) $ac_c" 1>&6
6495else
6496 cat > conftest.$ac_ext <<EOF
7613d933 6497#line 6498 "configure"
2b2d558c 6498#include "confdefs.h"
97bf5e38
MK
6499/* System header to define __stub macros and hopefully few prototypes,
6500 which can conflict with char vfork(); below. */
6501#include <assert.h>
6502/* Override any gcc2 internal prototype to avoid an error. */
6503/* We use char because int might match the return type of a gcc2
6504 builtin and then its argument prototype would still apply. */
6505char vfork();
2b2d558c
MK
6506
6507int main() {
97bf5e38
MK
6508
6509/* The GNU C library defines this for functions which it implements
6510 to always fail with ENOSYS. Some functions are actually named
6511 something starting with __ and the normal name is an alias. */
6512#if defined (__stub_vfork) || defined (__stub___vfork)
6513choke me
6514#else
6515vfork();
6516#endif
6517
2b2d558c
MK
6518; return 0; }
6519EOF
7613d933 6520if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6521 rm -rf conftest*
97bf5e38 6522 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6523else
6524 echo "configure: failed program was:" >&5
6525 cat conftest.$ac_ext >&5
6526 rm -rf conftest*
97bf5e38 6527 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6528fi
6529rm -f conftest*
6530fi
6531
97bf5e38
MK
6532if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6533 echo "$ac_t""yes" 1>&6
6534 :
6535else
6536 echo "$ac_t""no" 1>&6
2b2d558c
MK
6537fi
6538
97bf5e38 6539ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6540else
6541 cat > conftest.$ac_ext <<EOF
7613d933 6542#line 6543 "configure"
7dfa765c 6543#include "confdefs.h"
97bf5e38
MK
6544/* Thanks to Paul Eggert for this test. */
6545#include <stdio.h>
6546#include <sys/types.h>
6547#include <sys/stat.h>
6548#ifdef HAVE_UNISTD_H
6549#include <unistd.h>
6550#endif
6551#ifdef HAVE_VFORK_H
6552#include <vfork.h>
6553#endif
6554/* On some sparc systems, changes by the child to local and incoming
6555 argument registers are propagated back to the parent.
6556 The compiler is told about this with #include <vfork.h>,
6557 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6558 Test for this by using a static variable whose address
6559 is put into a register that is clobbered by the vfork. */
6560static
6561#ifdef __cplusplus
6562sparc_address_test (int arg)
6563#else
6564sparc_address_test (arg) int arg;
6565#endif
6566{
6567 static pid_t child;
6568 if (!child) {
6569 child = vfork ();
6570 if (child < 0) {
6571 perror ("vfork");
6572 _exit(2);
6573 }
6574 if (!child) {
6575 arg = getpid();
6576 write(-1, "", 0);
6577 _exit (arg);
6578 }
6579 }
6580}
6581main() {
6582 pid_t parent = getpid ();
6583 pid_t child;
7dfa765c 6584
97bf5e38 6585 sparc_address_test ();
7dfa765c 6586
97bf5e38 6587 child = vfork ();
7dfa765c 6588
97bf5e38
MK
6589 if (child == 0) {
6590 /* Here is another test for sparc vfork register problems.
6591 This test uses lots of local variables, at least
6592 as many local variables as main has allocated so far
6593 including compiler temporaries. 4 locals are enough for
6594 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6595 A buggy compiler should reuse the register of parent
6596 for one of the local variables, since it will think that
6597 parent can't possibly be used any more in this routine.
6598 Assigning to the local variable will thus munge parent
6599 in the parent process. */
6600 pid_t
6601 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6602 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6603 /* Convince the compiler that p..p7 are live; otherwise, it might
6604 use the same hardware register for all 8 local variables. */
6605 if (p != p1 || p != p2 || p != p3 || p != p4
6606 || p != p5 || p != p6 || p != p7)
6607 _exit(1);
7dfa765c 6608
97bf5e38
MK
6609 /* On some systems (e.g. IRIX 3.3),
6610 vfork doesn't separate parent from child file descriptors.
6611 If the child closes a descriptor before it execs or exits,
6612 this munges the parent's descriptor as well.
6613 Test for this by closing stdout in the child. */
6614 _exit(close(fileno(stdout)) != 0);
6615 } else {
6616 int status;
6617 struct stat st;
64bb1671 6618
97bf5e38
MK
6619 while (wait(&status) != child)
6620 ;
6621 exit(
6622 /* Was there some problem with vforking? */
6623 child < 0
64bb1671 6624
97bf5e38
MK
6625 /* Did the child fail? (This shouldn't happen.) */
6626 || status
64bb1671 6627
97bf5e38
MK
6628 /* Did the vfork/compiler bug occur? */
6629 || parent != getpid()
6630
6631 /* Did the file descriptor bug occur? */
6632 || fstat(fileno(stdout), &st) != 0
6633 );
6634 }
6635}
5c44784c 6636EOF
7613d933 6637if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6638then
6639 ac_cv_func_vfork_works=yes
5c44784c
JM
6640else
6641 echo "configure: failed program was:" >&5
6642 cat conftest.$ac_ext >&5
97bf5e38
MK
6643 rm -fr conftest*
6644 ac_cv_func_vfork_works=no
5c44784c 6645fi
97bf5e38 6646rm -fr conftest*
5c44784c
JM
6647fi
6648
0afdd437
MK
6649fi
6650
97bf5e38
MK
6651echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6652if test $ac_cv_func_vfork_works = no; then
0afdd437 6653 cat >> confdefs.h <<\EOF
97bf5e38 6654#define vfork fork
0afdd437
MK
6655EOF
6656
6657fi
6658
97bf5e38
MK
6659for ac_func in canonicalize_file_name realpath
6660do
6661echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6662echo "configure:6663: checking for $ac_func" >&5
97bf5e38 6663if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6664 echo $ac_n "(cached) $ac_c" 1>&6
6665else
6666 cat > conftest.$ac_ext <<EOF
7613d933 6667#line 6668 "configure"
7e89e357 6668#include "confdefs.h"
97bf5e38
MK
6669/* System header to define __stub macros and hopefully few prototypes,
6670 which can conflict with char $ac_func(); below. */
6671#include <assert.h>
6672/* Override any gcc2 internal prototype to avoid an error. */
6673/* We use char because int might match the return type of a gcc2
6674 builtin and then its argument prototype would still apply. */
6675char $ac_func();
6676
7e89e357 6677int main() {
97bf5e38
MK
6678
6679/* The GNU C library defines this for functions which it implements
6680 to always fail with ENOSYS. Some functions are actually named
6681 something starting with __ and the normal name is an alias. */
6682#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6683choke me
6684#else
6685$ac_func();
6686#endif
6687
7e89e357
JT
6688; return 0; }
6689EOF
7613d933 6690if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6691 rm -rf conftest*
97bf5e38 6692 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6693else
6694 echo "configure: failed program was:" >&5
6695 cat conftest.$ac_ext >&5
6696 rm -rf conftest*
97bf5e38 6697 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6698fi
6699rm -f conftest*
6700fi
6701
97bf5e38
MK
6702if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6703 echo "$ac_t""yes" 1>&6
6704 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6705 cat >> confdefs.h <<EOF
6706#define $ac_tr_func 1
7e89e357 6707EOF
97bf5e38
MK
6708
6709else
6710 echo "$ac_t""no" 1>&6
7e89e357 6711fi
97bf5e38 6712done
7e89e357 6713
97bf5e38 6714for ac_func in poll
7be570e7
JM
6715do
6716echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6717echo "configure:6718: checking for $ac_func" >&5
7be570e7
JM
6718if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6719 echo $ac_n "(cached) $ac_c" 1>&6
6720else
6721 cat > conftest.$ac_ext <<EOF
7613d933 6722#line 6723 "configure"
7be570e7
JM
6723#include "confdefs.h"
6724/* System header to define __stub macros and hopefully few prototypes,
6725 which can conflict with char $ac_func(); below. */
6726#include <assert.h>
6727/* Override any gcc2 internal prototype to avoid an error. */
6728/* We use char because int might match the return type of a gcc2
6729 builtin and then its argument prototype would still apply. */
6730char $ac_func();
6731
6732int main() {
6733
6734/* The GNU C library defines this for functions which it implements
6735 to always fail with ENOSYS. Some functions are actually named
6736 something starting with __ and the normal name is an alias. */
6737#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6738choke me
6739#else
6740$ac_func();
6741#endif
6742
6743; return 0; }
6744EOF
7613d933 6745if { (eval echo configure:6746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6746 rm -rf conftest*
6747 eval "ac_cv_func_$ac_func=yes"
6748else
6749 echo "configure: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 rm -rf conftest*
6752 eval "ac_cv_func_$ac_func=no"
6753fi
6754rm -f conftest*
6755fi
6756
6757if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6758 echo "$ac_t""yes" 1>&6
6759 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6760 cat >> confdefs.h <<EOF
6761#define $ac_tr_func 1
6762EOF
6763
6764else
6765 echo "$ac_t""no" 1>&6
6766fi
6767done
6768
6769for ac_func in pread64
6770do
6771echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6772echo "configure:6773: checking for $ac_func" >&5
14abd0fb
MK
6773if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6774 echo $ac_n "(cached) $ac_c" 1>&6
6775else
6776 cat > conftest.$ac_ext <<EOF
7613d933 6777#line 6778 "configure"
14abd0fb
MK
6778#include "confdefs.h"
6779/* System header to define __stub macros and hopefully few prototypes,
6780 which can conflict with char $ac_func(); below. */
6781#include <assert.h>
6782/* Override any gcc2 internal prototype to avoid an error. */
6783/* We use char because int might match the return type of a gcc2
6784 builtin and then its argument prototype would still apply. */
6785char $ac_func();
6786
6787int main() {
6788
6789/* The GNU C library defines this for functions which it implements
6790 to always fail with ENOSYS. Some functions are actually named
6791 something starting with __ and the normal name is an alias. */
6792#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6793choke me
6794#else
6795$ac_func();
6796#endif
6797
6798; return 0; }
6799EOF
7613d933 6800if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6801 rm -rf conftest*
6802 eval "ac_cv_func_$ac_func=yes"
6803else
6804 echo "configure: failed program was:" >&5
6805 cat conftest.$ac_ext >&5
6806 rm -rf conftest*
6807 eval "ac_cv_func_$ac_func=no"
6808fi
6809rm -f conftest*
6810fi
6811
6812if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6813 echo "$ac_t""yes" 1>&6
6814 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6815 cat >> confdefs.h <<EOF
6816#define $ac_tr_func 1
6817EOF
6818
6819else
6820 echo "$ac_t""no" 1>&6
6821fi
6822done
6823
97bf5e38
MK
6824for ac_func in sbrk
6825do
6826echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6827echo "configure:6828: checking for $ac_func" >&5
97bf5e38 6828if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6829 echo $ac_n "(cached) $ac_c" 1>&6
6830else
6831 cat > conftest.$ac_ext <<EOF
7613d933 6832#line 6833 "configure"
c906108c 6833#include "confdefs.h"
97bf5e38
MK
6834/* System header to define __stub macros and hopefully few prototypes,
6835 which can conflict with char $ac_func(); below. */
6836#include <assert.h>
6837/* Override any gcc2 internal prototype to avoid an error. */
6838/* We use char because int might match the return type of a gcc2
6839 builtin and then its argument prototype would still apply. */
6840char $ac_func();
c906108c 6841
97bf5e38
MK
6842int main() {
6843
6844/* The GNU C library defines this for functions which it implements
6845 to always fail with ENOSYS. Some functions are actually named
6846 something starting with __ and the normal name is an alias. */
6847#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6848choke me
c906108c 6849#else
97bf5e38 6850$ac_func();
c906108c 6851#endif
97bf5e38 6852
c906108c
SS
6853; return 0; }
6854EOF
7613d933 6855if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6856 rm -rf conftest*
97bf5e38 6857 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6858else
6859 echo "configure: failed program was:" >&5
6860 cat conftest.$ac_ext >&5
6861 rm -rf conftest*
97bf5e38 6862 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6863fi
6864rm -f conftest*
6865fi
6866
97bf5e38
MK
6867if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6868 echo "$ac_t""yes" 1>&6
6869 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6870 cat >> confdefs.h <<EOF
6871#define $ac_tr_func 1
c906108c 6872EOF
97bf5e38
MK
6873
6874else
6875 echo "$ac_t""no" 1>&6
c906108c 6876fi
97bf5e38 6877done
c906108c 6878
97bf5e38
MK
6879for ac_func in setpgid setpgrp
6880do
6881echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6882echo "configure:6883: checking for $ac_func" >&5
97bf5e38 6883if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6884 echo $ac_n "(cached) $ac_c" 1>&6
6885else
6886 cat > conftest.$ac_ext <<EOF
7613d933 6887#line 6888 "configure"
c906108c 6888#include "confdefs.h"
97bf5e38
MK
6889/* System header to define __stub macros and hopefully few prototypes,
6890 which can conflict with char $ac_func(); below. */
6891#include <assert.h>
6892/* Override any gcc2 internal prototype to avoid an error. */
6893/* We use char because int might match the return type of a gcc2
6894 builtin and then its argument prototype would still apply. */
6895char $ac_func();
c906108c 6896
97bf5e38
MK
6897int main() {
6898
6899/* The GNU C library defines this for functions which it implements
6900 to always fail with ENOSYS. Some functions are actually named
6901 something starting with __ and the normal name is an alias. */
6902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6903choke me
c906108c 6904#else
97bf5e38 6905$ac_func();
c906108c 6906#endif
97bf5e38 6907
c906108c
SS
6908; return 0; }
6909EOF
7613d933 6910if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6911 rm -rf conftest*
97bf5e38 6912 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6913else
6914 echo "configure: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 rm -rf conftest*
97bf5e38 6917 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6918fi
6919rm -f conftest*
6920fi
6921
97bf5e38
MK
6922if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6923 echo "$ac_t""yes" 1>&6
6924 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6925 cat >> confdefs.h <<EOF
6926#define $ac_tr_func 1
c906108c 6927EOF
97bf5e38
MK
6928
6929else
6930 echo "$ac_t""no" 1>&6
c906108c 6931fi
97bf5e38 6932done
c906108c 6933
e1ea1d75 6934for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6935do
6936echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6937echo "configure:6938: checking for $ac_func" >&5
97bf5e38 6938if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6939 echo $ac_n "(cached) $ac_c" 1>&6
6940else
6941 cat > conftest.$ac_ext <<EOF
7613d933 6942#line 6943 "configure"
c906108c 6943#include "confdefs.h"
97bf5e38
MK
6944/* System header to define __stub macros and hopefully few prototypes,
6945 which can conflict with char $ac_func(); below. */
6946#include <assert.h>
6947/* Override any gcc2 internal prototype to avoid an error. */
6948/* We use char because int might match the return type of a gcc2
6949 builtin and then its argument prototype would still apply. */
6950char $ac_func();
c906108c 6951
97bf5e38
MK
6952int main() {
6953
6954/* The GNU C library defines this for functions which it implements
6955 to always fail with ENOSYS. Some functions are actually named
6956 something starting with __ and the normal name is an alias. */
6957#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6958choke me
c906108c 6959#else
97bf5e38 6960$ac_func();
c906108c 6961#endif
97bf5e38 6962
c906108c
SS
6963; return 0; }
6964EOF
7613d933 6965if { (eval echo configure:6966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6966 rm -rf conftest*
97bf5e38 6967 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6968else
6969 echo "configure: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 rm -rf conftest*
97bf5e38 6972 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6973fi
6974rm -f conftest*
6975fi
6976
97bf5e38
MK
6977if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6978 echo "$ac_t""yes" 1>&6
6979 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6980 cat >> confdefs.h <<EOF
6981#define $ac_tr_func 1
c906108c 6982EOF
e1ea1d75 6983
97bf5e38
MK
6984else
6985 echo "$ac_t""no" 1>&6
c906108c 6986fi
97bf5e38 6987done
c906108c 6988
97bf5e38
MK
6989for ac_func in socketpair
6990do
6991echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 6992echo "configure:6993: checking for $ac_func" >&5
97bf5e38 6993if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6994 echo $ac_n "(cached) $ac_c" 1>&6
6995else
6996 cat > conftest.$ac_ext <<EOF
7613d933 6997#line 6998 "configure"
c906108c 6998#include "confdefs.h"
97bf5e38
MK
6999/* System header to define __stub macros and hopefully few prototypes,
7000 which can conflict with char $ac_func(); below. */
7001#include <assert.h>
7002/* Override any gcc2 internal prototype to avoid an error. */
7003/* We use char because int might match the return type of a gcc2
7004 builtin and then its argument prototype would still apply. */
7005char $ac_func();
c906108c 7006
97bf5e38
MK
7007int main() {
7008
7009/* The GNU C library defines this for functions which it implements
7010 to always fail with ENOSYS. Some functions are actually named
7011 something starting with __ and the normal name is an alias. */
7012#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7013choke me
c906108c 7014#else
97bf5e38 7015$ac_func();
c906108c 7016#endif
97bf5e38 7017
c906108c
SS
7018; return 0; }
7019EOF
7613d933 7020if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 7021 rm -rf conftest*
97bf5e38 7022 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
7023else
7024 echo "configure: failed program was:" >&5
7025 cat conftest.$ac_ext >&5
7026 rm -rf conftest*
97bf5e38 7027 eval "ac_cv_func_$ac_func=no"
c906108c
SS
7028fi
7029rm -f conftest*
7030fi
7031
97bf5e38
MK
7032if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7033 echo "$ac_t""yes" 1>&6
7034 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7035 cat >> confdefs.h <<EOF
7036#define $ac_tr_func 1
c906108c 7037EOF
97bf5e38
MK
7038
7039else
7040 echo "$ac_t""no" 1>&6
c906108c 7041fi
97bf5e38 7042done
c906108c 7043
b757528f
JJ
7044for ac_func in syscall
7045do
7046echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7613d933 7047echo "configure:7048: checking for $ac_func" >&5
b757528f
JJ
7048if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7049 echo $ac_n "(cached) $ac_c" 1>&6
7050else
7051 cat > conftest.$ac_ext <<EOF
7613d933 7052#line 7053 "configure"
b757528f
JJ
7053#include "confdefs.h"
7054/* System header to define __stub macros and hopefully few prototypes,
7055 which can conflict with char $ac_func(); below. */
7056#include <assert.h>
7057/* Override any gcc2 internal prototype to avoid an error. */
7058/* We use char because int might match the return type of a gcc2
7059 builtin and then its argument prototype would still apply. */
7060char $ac_func();
7061
7062int main() {
7063
7064/* The GNU C library defines this for functions which it implements
7065 to always fail with ENOSYS. Some functions are actually named
7066 something starting with __ and the normal name is an alias. */
7067#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7068choke me
7069#else
7070$ac_func();
7071#endif
7072
7073; return 0; }
7074EOF
7613d933 7075if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b757528f
JJ
7076 rm -rf conftest*
7077 eval "ac_cv_func_$ac_func=yes"
7078else
7079 echo "configure: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081 rm -rf conftest*
7082 eval "ac_cv_func_$ac_func=no"
7083fi
7084rm -f conftest*
7085fi
7086
7087if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7088 echo "$ac_t""yes" 1>&6
7089 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7090 cat >> confdefs.h <<EOF
7091#define $ac_tr_func 1
7092EOF
7093
7094else
7095 echo "$ac_t""no" 1>&6
7096fi
7097done
7098
97bf5e38
MK
7099
7100if test "$cross_compiling" = no; then
7101 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7613d933 7102echo "configure:7103: checking whether setpgrp takes no argument" >&5
97bf5e38 7103if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 7104 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
7105else
7106 if test "$cross_compiling" = yes; then
7107 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
7108else
7109 cat > conftest.$ac_ext <<EOF
7613d933 7110#line 7111 "configure"
c906108c
SS
7111#include "confdefs.h"
7112
c906108c
SS
7113#ifdef HAVE_UNISTD_H
7114#include <unistd.h>
7115#endif
97bf5e38
MK
7116
7117/*
7118 * If this system has a BSD-style setpgrp, which takes arguments, exit
7119 * successfully.
7120 */
7121main()
7122{
7123 if (setpgrp(1,1) == -1)
7124 exit(0);
7125 else
7126 exit(1);
7127}
7128
c906108c 7129EOF
7613d933 7130if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7131then
7132 ac_cv_func_setpgrp_void=no
c906108c
SS
7133else
7134 echo "configure: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
97bf5e38
MK
7136 rm -fr conftest*
7137 ac_cv_func_setpgrp_void=yes
c906108c 7138fi
97bf5e38 7139rm -fr conftest*
c906108c
SS
7140fi
7141
97bf5e38
MK
7142
7143fi
7144
7145echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7146if test $ac_cv_func_setpgrp_void = yes; then
7147 cat >> confdefs.h <<\EOF
7148#define SETPGRP_VOID 1
c906108c
SS
7149EOF
7150
7151fi
7152
97bf5e38
MK
7153else
7154 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7613d933 7155echo "configure:7156: checking whether setpgrp takes no argument" >&5
97bf5e38 7156if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
7157 echo $ac_n "(cached) $ac_c" 1>&6
7158else
7159 cat > conftest.$ac_ext <<EOF
7613d933 7160#line 7161 "configure"
b83266a0
SS
7161#include "confdefs.h"
7162
b83266a0 7163#include <unistd.h>
97bf5e38 7164
b83266a0 7165int main() {
97bf5e38
MK
7166
7167 if (setpgrp(1,1) == -1)
7168 exit (0);
7169 else
7170 exit (1);
7171
b83266a0
SS
7172; return 0; }
7173EOF
7613d933 7174if { (eval echo configure:7175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 7175 rm -rf conftest*
97bf5e38 7176 ac_cv_func_setpgrp_void=no
b83266a0
SS
7177else
7178 echo "configure: failed program was:" >&5
7179 cat conftest.$ac_ext >&5
7180 rm -rf conftest*
97bf5e38 7181 ac_cv_func_setpgrp_void=yes
b83266a0
SS
7182fi
7183rm -f conftest*
7184fi
7185
97bf5e38
MK
7186echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7187if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 7188 cat >> confdefs.h <<\EOF
97bf5e38 7189#define SETPGRP_VOID 1
b83266a0
SS
7190EOF
7191
97bf5e38 7192fi
b83266a0
SS
7193fi
7194
97bf5e38
MK
7195# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7196# since sigsetjmp might only be defined as a macro.
7197echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7613d933 7198echo "configure:7199: checking for sigsetjmp" >&5
97bf5e38 7199if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
7200 echo $ac_n "(cached) $ac_c" 1>&6
7201else
7202 cat > conftest.$ac_ext <<EOF
7613d933 7203#line 7204 "configure"
a4db0f07
RH
7204#include "confdefs.h"
7205
97bf5e38
MK
7206#include <setjmp.h>
7207
a4db0f07 7208int main() {
97bf5e38 7209sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
7210; return 0; }
7211EOF
7613d933 7212if { (eval echo configure:7213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 7213 rm -rf conftest*
97bf5e38 7214 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
7215else
7216 echo "configure: failed program was:" >&5
7217 cat conftest.$ac_ext >&5
7218 rm -rf conftest*
97bf5e38 7219 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
7220fi
7221rm -f conftest*
7222fi
7223
97bf5e38
MK
7224echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7225if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 7226 cat >> confdefs.h <<\EOF
97bf5e38 7227#define HAVE_SIGSETJMP 1
a4db0f07
RH
7228EOF
7229
7230fi
c906108c 7231
06825bd1
MK
7232# Assume we'll default to using the included libiberty regex.
7233gdb_use_included_regex=yes
7234
7235# However, if the system regex is GNU regex, then default to *not*
7236# using the included regex.
7237echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7613d933 7238echo "configure:7239: checking for GNU regex" >&5
06825bd1
MK
7239if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7240 echo $ac_n "(cached) $ac_c" 1>&6
7241else
7242 cat > conftest.$ac_ext <<EOF
7613d933 7243#line 7244 "configure"
06825bd1
MK
7244#include "confdefs.h"
7245#include <gnu-versions.h>
7246int main() {
7247#define REGEX_INTERFACE_VERSION 1
7248#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7249# error "Version mismatch"
7250#endif
7251; return 0; }
7252EOF
7613d933 7253if { (eval echo configure:7254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
7254 rm -rf conftest*
7255 gdb_cv_have_gnu_regex=yes
7256else
7257 echo "configure: failed program was:" >&5
7258 cat conftest.$ac_ext >&5
7259 rm -rf conftest*
7260 gdb_cv_have_gnu_regex=no
7261fi
7262rm -f conftest*
7263fi
7264
7265echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7266if test $gdb_cv_have_gnu_regex = yes; then
7267 gdb_use_included_regex=no
7268fi
7269
7270# Check whether --with-included-regex or --without-included-regex was given.
7271if test "${with_included_regex+set}" = set; then
7272 withval="$with_included_regex"
7273 gdb_with_regex=$withval
7274else
7275 gdb_with_regex=$gdb_use_included_regex
7276fi
7277
7278if test "$gdb_with_regex" = yes; then
7279 cat >> confdefs.h <<\EOF
7280#define USE_INCLUDED_REGEX 1
7281EOF
7282
7283fi
7284
78434e59
MK
7285# See if <machine/reg.h> degines `struct reg'.
7286echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7613d933 7287echo "configure:7288: checking for struct reg in machine/reg.h" >&5
78434e59
MK
7288if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7289 echo $ac_n "(cached) $ac_c" 1>&6
7290else
7291 cat > conftest.$ac_ext <<EOF
7613d933 7292#line 7293 "configure"
78434e59
MK
7293#include "confdefs.h"
7294#include <sys/types.h>
7295#include <machine/reg.h>
7296int main() {
7297struct reg r;
7298; return 0; }
7299EOF
7613d933 7300if { (eval echo configure:7301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78434e59
MK
7301 rm -rf conftest*
7302 gdb_cv_struct_reg=yes
7303else
7304 echo "configure: failed program was:" >&5
7305 cat conftest.$ac_ext >&5
7306 rm -rf conftest*
7307 gdb_cv_struct_reg=no
7308fi
7309rm -f conftest*
7310fi
7311
7312echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7313if test $gdb_cv_struct_reg = yes; then
7314 cat >> confdefs.h <<\EOF
7315#define HAVE_STRUCT_REG 1
7316EOF
7317
7318fi
7319
97bf5e38
MK
7320# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7321# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7322echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7613d933 7323echo "configure:7324: checking for r_fs in struct reg" >&5
97bf5e38
MK
7324if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7325 echo $ac_n "(cached) $ac_c" 1>&6
7326else
7327 cat > conftest.$ac_ext <<EOF
7613d933 7328#line 7329 "configure"
c906108c 7329#include "confdefs.h"
97bf5e38
MK
7330#include <machine/reg.h>
7331int main() {
7332struct reg r; r.r_fs;
7333; return 0; }
c906108c 7334EOF
7613d933 7335if { (eval echo configure:7336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7336 rm -rf conftest*
97bf5e38 7337 gdb_cv_struct_reg_r_fs=yes
c906108c 7338else
97bf5e38
MK
7339 echo "configure: failed program was:" >&5
7340 cat conftest.$ac_ext >&5
c906108c 7341 rm -rf conftest*
97bf5e38 7342 gdb_cv_struct_reg_r_fs=no
c906108c
SS
7343fi
7344rm -f conftest*
97bf5e38 7345fi
c906108c 7346
97bf5e38
MK
7347echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7348if test $gdb_cv_struct_reg_r_fs = yes; then
7349 cat >> confdefs.h <<\EOF
7350#define HAVE_STRUCT_REG_R_FS 1
7351EOF
7352
7353fi
7354echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7613d933 7355echo "configure:7356: checking for r_gs in struct reg" >&5
97bf5e38
MK
7356if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7357 echo $ac_n "(cached) $ac_c" 1>&6
7358else
7359 cat > conftest.$ac_ext <<EOF
7613d933 7360#line 7361 "configure"
c906108c 7361#include "confdefs.h"
97bf5e38
MK
7362#include <machine/reg.h>
7363int main() {
7364struct reg r; r.r_gs;
7365; return 0; }
c906108c 7366EOF
7613d933 7367if { (eval echo configure:7368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7368 rm -rf conftest*
97bf5e38 7369 gdb_cv_struct_reg_r_gs=yes
c906108c 7370else
97bf5e38
MK
7371 echo "configure: failed program was:" >&5
7372 cat conftest.$ac_ext >&5
c906108c 7373 rm -rf conftest*
97bf5e38 7374 gdb_cv_struct_reg_r_gs=no
c906108c
SS
7375fi
7376rm -f conftest*
c906108c 7377fi
c906108c 7378
97bf5e38
MK
7379echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7380if test $gdb_cv_struct_reg_r_gs = yes; then
7381 cat >> confdefs.h <<\EOF
7382#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
7383EOF
7384
c906108c
SS
7385fi
7386
97bf5e38
MK
7387# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7388echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7613d933 7389echo "configure:7390: checking for PTRACE_GETREGS" >&5
97bf5e38 7390if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
7391 echo $ac_n "(cached) $ac_c" 1>&6
7392else
7393 cat > conftest.$ac_ext <<EOF
7613d933 7394#line 7395 "configure"
c906108c 7395#include "confdefs.h"
97bf5e38 7396#include <sys/ptrace.h>
c906108c 7397int main() {
97bf5e38 7398PTRACE_GETREGS;
c906108c
SS
7399; return 0; }
7400EOF
7613d933 7401if { (eval echo configure:7402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7402 rm -rf conftest*
97bf5e38 7403 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
7404else
7405 echo "configure: failed program was:" >&5
7406 cat conftest.$ac_ext >&5
7407 rm -rf conftest*
97bf5e38 7408 gdb_cv_have_ptrace_getregs=no
c906108c
SS
7409fi
7410rm -f conftest*
7411fi
7412
97bf5e38
MK
7413echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7414if test $gdb_cv_have_ptrace_getregs = yes; then
7415 cat >> confdefs.h <<\EOF
7416#define HAVE_PTRACE_GETREGS 1
c906108c
SS
7417EOF
7418
97bf5e38 7419fi
c906108c 7420
97bf5e38
MK
7421# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7422echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7613d933 7423echo "configure:7424: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 7424if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
7425 echo $ac_n "(cached) $ac_c" 1>&6
7426else
7427 cat > conftest.$ac_ext <<EOF
7613d933 7428#line 7429 "configure"
c906108c 7429#include "confdefs.h"
97bf5e38 7430#include <sys/ptrace.h>
c906108c 7431int main() {
97bf5e38 7432PTRACE_GETFPXREGS;
c906108c
SS
7433; return 0; }
7434EOF
7613d933 7435if { (eval echo configure:7436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7436 rm -rf conftest*
97bf5e38 7437 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
7438else
7439 echo "configure: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 rm -rf conftest*
97bf5e38 7442 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
7443fi
7444rm -f conftest*
7445fi
7446
97bf5e38
MK
7447echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7448if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7449 cat >> confdefs.h <<\EOF
7450#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
7451EOF
7452
97bf5e38 7453fi
c906108c 7454
97bf5e38
MK
7455# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7456echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7613d933 7457echo "configure:7458: checking for PT_GETDBREGS" >&5
97bf5e38 7458if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
7459 echo $ac_n "(cached) $ac_c" 1>&6
7460else
7461 cat > conftest.$ac_ext <<EOF
7613d933 7462#line 7463 "configure"
c906108c 7463#include "confdefs.h"
97bf5e38
MK
7464#include <sys/types.h>
7465#include <sys/ptrace.h>
c906108c 7466int main() {
97bf5e38 7467PT_GETDBREGS;
c906108c
SS
7468; return 0; }
7469EOF
7613d933 7470if { (eval echo configure:7471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7471 rm -rf conftest*
97bf5e38 7472 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
7473else
7474 echo "configure: failed program was:" >&5
7475 cat conftest.$ac_ext >&5
7476 rm -rf conftest*
97bf5e38 7477 gdb_cv_have_pt_getdbregs=no
c906108c
SS
7478fi
7479rm -f conftest*
7480fi
7481
97bf5e38
MK
7482echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7483if test $gdb_cv_have_pt_getdbregs = yes; then
7484 cat >> confdefs.h <<\EOF
7485#define HAVE_PT_GETDBREGS 1
c906108c
SS
7486EOF
7487
97bf5e38 7488fi
c906108c 7489
97bf5e38
MK
7490# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7491echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7613d933 7492echo "configure:7493: checking for PT_GETXMMREGS" >&5
97bf5e38 7493if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
7494 echo $ac_n "(cached) $ac_c" 1>&6
7495else
7496 cat > conftest.$ac_ext <<EOF
7613d933 7497#line 7498 "configure"
c906108c 7498#include "confdefs.h"
97bf5e38
MK
7499#include <sys/types.h>
7500#include <sys/ptrace.h>
c906108c 7501int main() {
97bf5e38 7502PT_GETXMMREGS;
c906108c
SS
7503; return 0; }
7504EOF
7613d933 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_pt_getxmmregs=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_pt_getxmmregs=no
c906108c
SS
7513fi
7514rm -f conftest*
7515fi
7516
97bf5e38
MK
7517echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7518if test $gdb_cv_have_pt_getxmmregs = yes; then
7519 cat >> confdefs.h <<\EOF
7520#define HAVE_PT_GETXMMREGS 1
c906108c
SS
7521EOF
7522
97bf5e38 7523fi
c906108c 7524
27ca5dad 7525# See if stdint.h provides the uintptr_t type.
d3e0a5bf 7526# Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
27ca5dad 7527echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7613d933 7528echo "configure:7529: checking for uintptr_t in stdint.h" >&5
27ca5dad
MC
7529if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7530 echo $ac_n "(cached) $ac_c" 1>&6
7531else
7532 cat > conftest.$ac_ext <<EOF
7613d933 7533#line 7534 "configure"
27ca5dad
MC
7534#include "confdefs.h"
7535#include <stdint.h>
7536int main() {
7537uintptr_t foo = 0;
7538; return 0; }
7539EOF
7613d933 7540if { (eval echo configure:7541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
27ca5dad
MC
7541 rm -rf conftest*
7542 gdb_cv_have_uintptr_t=yes
7543else
7544 echo "configure: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 rm -rf conftest*
7547 gdb_cv_have_uintptr_t=no
7548fi
7549rm -f conftest*
7550fi
7551
7552echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7553if test $gdb_cv_have_uintptr_t = yes; then
7554 cat >> confdefs.h <<\EOF
7555#define HAVE_UINTPTR_T 1
7556EOF
7557
7558fi
97bf5e38
MK
7559
7560echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7613d933 7561echo "configure:7562: checking whether malloc must be declared" >&5
97bf5e38 7562if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
7563 echo $ac_n "(cached) $ac_c" 1>&6
7564else
7565 cat > conftest.$ac_ext <<EOF
7613d933 7566#line 7567 "configure"
3862412b 7567#include "confdefs.h"
e17bf198 7568
97bf5e38
MK
7569#include <stdio.h>
7570#ifdef HAVE_STRING_H
7571#include <string.h>
7572#else
7573#ifdef HAVE_STRINGS_H
7574#include <strings.h>
7575#endif
7576#endif
7577#ifdef HAVE_STDLIB_H
7578#include <stdlib.h>
7579#endif
7580#ifdef HAVE_UNISTD_H
7581#include <unistd.h>
7582#endif
3862412b 7583int main() {
97bf5e38 7584char *(*pfn) = (char *(*)) malloc
3862412b
MK
7585; return 0; }
7586EOF
7613d933 7587if { (eval echo configure:7588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7588 rm -rf conftest*
97bf5e38 7589 bfd_cv_decl_needed_malloc=no
3862412b
MK
7590else
7591 echo "configure: failed program was:" >&5
7592 cat conftest.$ac_ext >&5
7593 rm -rf conftest*
97bf5e38 7594 bfd_cv_decl_needed_malloc=yes
3862412b
MK
7595fi
7596rm -f conftest*
7597fi
7598
97bf5e38
MK
7599echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7600if test $bfd_cv_decl_needed_malloc = yes; then
7601 cat >> confdefs.h <<\EOF
7602#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7603EOF
7604
97bf5e38 7605fi
3862412b 7606
97bf5e38 7607echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7613d933 7608echo "configure:7609: checking whether realloc must be declared" >&5
97bf5e38 7609if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7610 echo $ac_n "(cached) $ac_c" 1>&6
7611else
7612 cat > conftest.$ac_ext <<EOF
7613d933 7613#line 7614 "configure"
3862412b 7614#include "confdefs.h"
e17bf198 7615
97bf5e38
MK
7616#include <stdio.h>
7617#ifdef HAVE_STRING_H
7618#include <string.h>
7619#else
7620#ifdef HAVE_STRINGS_H
7621#include <strings.h>
7622#endif
7623#endif
7624#ifdef HAVE_STDLIB_H
7625#include <stdlib.h>
7626#endif
7627#ifdef HAVE_UNISTD_H
7628#include <unistd.h>
7629#endif
3862412b 7630int main() {
97bf5e38 7631char *(*pfn) = (char *(*)) realloc
3862412b
MK
7632; return 0; }
7633EOF
7613d933 7634if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7635 rm -rf conftest*
97bf5e38 7636 bfd_cv_decl_needed_realloc=no
3862412b
MK
7637else
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 rm -rf conftest*
97bf5e38 7641 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7642fi
7643rm -f conftest*
7644fi
7645
97bf5e38
MK
7646echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7647if test $bfd_cv_decl_needed_realloc = yes; then
7648 cat >> confdefs.h <<\EOF
7649#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7650EOF
7651
97bf5e38 7652fi
3862412b 7653
97bf5e38 7654echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7613d933 7655echo "configure:7656: checking whether free must be declared" >&5
97bf5e38 7656if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7657 echo $ac_n "(cached) $ac_c" 1>&6
7658else
7659 cat > conftest.$ac_ext <<EOF
7613d933 7660#line 7661 "configure"
451928c5 7661#include "confdefs.h"
e17bf198 7662
97bf5e38
MK
7663#include <stdio.h>
7664#ifdef HAVE_STRING_H
7665#include <string.h>
7666#else
7667#ifdef HAVE_STRINGS_H
7668#include <strings.h>
7669#endif
7670#endif
7671#ifdef HAVE_STDLIB_H
7672#include <stdlib.h>
7673#endif
7674#ifdef HAVE_UNISTD_H
7675#include <unistd.h>
7676#endif
451928c5 7677int main() {
97bf5e38 7678char *(*pfn) = (char *(*)) free
451928c5
AC
7679; return 0; }
7680EOF
7613d933 7681if { (eval echo configure:7682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7682 rm -rf conftest*
97bf5e38 7683 bfd_cv_decl_needed_free=no
451928c5
AC
7684else
7685 echo "configure: failed program was:" >&5
7686 cat conftest.$ac_ext >&5
7687 rm -rf conftest*
97bf5e38 7688 bfd_cv_decl_needed_free=yes
451928c5
AC
7689fi
7690rm -f conftest*
7691fi
7692
97bf5e38
MK
7693echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7694if test $bfd_cv_decl_needed_free = yes; then
7695 cat >> confdefs.h <<\EOF
7696#define NEED_DECLARATION_FREE 1
451928c5
AC
7697EOF
7698
97bf5e38 7699fi
451928c5 7700
97bf5e38 7701echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
7613d933 7702echo "configure:7703: checking whether strerror must be declared" >&5
97bf5e38 7703if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7704 echo $ac_n "(cached) $ac_c" 1>&6
7705else
7706 cat > conftest.$ac_ext <<EOF
7613d933 7707#line 7708 "configure"
451928c5 7708#include "confdefs.h"
e17bf198 7709
97bf5e38
MK
7710#include <stdio.h>
7711#ifdef HAVE_STRING_H
7712#include <string.h>
7713#else
7714#ifdef HAVE_STRINGS_H
7715#include <strings.h>
7716#endif
7717#endif
7718#ifdef HAVE_STDLIB_H
7719#include <stdlib.h>
7720#endif
7721#ifdef HAVE_UNISTD_H
7722#include <unistd.h>
7723#endif
451928c5 7724int main() {
97bf5e38 7725char *(*pfn) = (char *(*)) strerror
451928c5
AC
7726; return 0; }
7727EOF
7613d933 7728if { (eval echo configure:7729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7729 rm -rf conftest*
97bf5e38 7730 bfd_cv_decl_needed_strerror=no
451928c5
AC
7731else
7732 echo "configure: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734 rm -rf conftest*
97bf5e38 7735 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7736fi
7737rm -f conftest*
7738fi
7739
97bf5e38
MK
7740echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7741if test $bfd_cv_decl_needed_strerror = yes; then
7742 cat >> confdefs.h <<\EOF
7743#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7744EOF
7745
97bf5e38 7746fi
451928c5 7747
97bf5e38 7748echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
7613d933 7749echo "configure:7750: checking whether strdup must be declared" >&5
97bf5e38 7750if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7751 echo $ac_n "(cached) $ac_c" 1>&6
7752else
7753 cat > conftest.$ac_ext <<EOF
7613d933 7754#line 7755 "configure"
3862412b 7755#include "confdefs.h"
e17bf198 7756
97bf5e38
MK
7757#include <stdio.h>
7758#ifdef HAVE_STRING_H
7759#include <string.h>
7760#else
7761#ifdef HAVE_STRINGS_H
7762#include <strings.h>
7763#endif
7764#endif
7765#ifdef HAVE_STDLIB_H
7766#include <stdlib.h>
7767#endif
7768#ifdef HAVE_UNISTD_H
7769#include <unistd.h>
7770#endif
3862412b 7771int main() {
97bf5e38 7772char *(*pfn) = (char *(*)) strdup
3862412b
MK
7773; return 0; }
7774EOF
7613d933 7775if { (eval echo configure:7776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7776 rm -rf conftest*
97bf5e38 7777 bfd_cv_decl_needed_strdup=no
3862412b
MK
7778else
7779 echo "configure: failed program was:" >&5
7780 cat conftest.$ac_ext >&5
7781 rm -rf conftest*
97bf5e38 7782 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7783fi
7784rm -f conftest*
7785fi
7786
97bf5e38
MK
7787echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7788if test $bfd_cv_decl_needed_strdup = yes; then
7789 cat >> confdefs.h <<\EOF
7790#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7791EOF
7792
97bf5e38 7793fi
3862412b 7794
97bf5e38 7795echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
7613d933 7796echo "configure:7797: checking whether strstr must be declared" >&5
97bf5e38 7797if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7798 echo $ac_n "(cached) $ac_c" 1>&6
7799else
7800 cat > conftest.$ac_ext <<EOF
7613d933 7801#line 7802 "configure"
3862412b 7802#include "confdefs.h"
e17bf198 7803
97bf5e38
MK
7804#include <stdio.h>
7805#ifdef HAVE_STRING_H
7806#include <string.h>
7807#else
7808#ifdef HAVE_STRINGS_H
7809#include <strings.h>
7810#endif
7811#endif
7812#ifdef HAVE_STDLIB_H
7813#include <stdlib.h>
7814#endif
7815#ifdef HAVE_UNISTD_H
7816#include <unistd.h>
7817#endif
3862412b 7818int main() {
97bf5e38 7819char *(*pfn) = (char *(*)) strstr
3862412b
MK
7820; return 0; }
7821EOF
7613d933 7822if { (eval echo configure:7823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7823 rm -rf conftest*
97bf5e38 7824 bfd_cv_decl_needed_strstr=no
3862412b
MK
7825else
7826 echo "configure: failed program was:" >&5
7827 cat conftest.$ac_ext >&5
7828 rm -rf conftest*
97bf5e38 7829 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7830fi
7831rm -f conftest*
7832fi
7833
97bf5e38
MK
7834echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7835if test $bfd_cv_decl_needed_strstr = yes; then
7836 cat >> confdefs.h <<\EOF
7837#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7838EOF
7839
97bf5e38 7840fi
3862412b 7841
97bf5e38 7842echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7613d933 7843echo "configure:7844: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7844if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7845 echo $ac_n "(cached) $ac_c" 1>&6
7846else
7847 cat > conftest.$ac_ext <<EOF
7613d933 7848#line 7849 "configure"
596c9d4b
KB
7849#include "confdefs.h"
7850
97bf5e38
MK
7851#include <stdio.h>
7852#ifdef HAVE_STRING_H
7853#include <string.h>
7854#else
7855#ifdef HAVE_STRINGS_H
7856#include <strings.h>
7857#endif
7858#endif
7859#ifdef HAVE_STDLIB_H
7860#include <stdlib.h>
7861#endif
7862#ifdef HAVE_UNISTD_H
7863#include <unistd.h>
7864#endif
596c9d4b 7865int main() {
97bf5e38 7866char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7867; return 0; }
7868EOF
7613d933 7869if { (eval echo configure:7870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7870 rm -rf conftest*
97bf5e38 7871 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7872else
7873 echo "configure: failed program was:" >&5
7874 cat conftest.$ac_ext >&5
7875 rm -rf conftest*
97bf5e38 7876 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7877fi
7878rm -f conftest*
7879fi
7880
97bf5e38
MK
7881echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7882if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7883 cat >> confdefs.h <<\EOF
7884#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7885EOF
7886
97bf5e38 7887fi
596c9d4b 7888
97bf5e38
MK
7889
7890# The following save_state_t checkery is only necessary for HPUX
7891# versions earlier than 10.20. When those fade from memory, this
7892# could be expunged. --jsm 1999-03-22
7893
7894echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
7613d933 7895echo "configure:7896: checking for HPUX save_state structure" >&5
97bf5e38 7896cat > conftest.$ac_ext <<EOF
7613d933 7897#line 7898 "configure"
97bf5e38
MK
7898#include "confdefs.h"
7899#include <machine/save_state.h>
7900EOF
7901if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7902 egrep "save_state_t" >/dev/null 2>&1; then
7903 rm -rf conftest*
7904 gdb_cv_hpux_savestate=yes
7905else
7906 rm -rf conftest*
7907 gdb_cv_hpux_savestate=no
7908fi
7909rm -f conftest*
7910
7911cat > conftest.$ac_ext <<EOF
7613d933 7912#line 7913 "configure"
97bf5e38
MK
7913#include "confdefs.h"
7914#include <machine/save_state.h>
7915EOF
7916if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7917 egrep "ss_wide" >/dev/null 2>&1; then
7918 rm -rf conftest*
7919 gdb_cv_hpux_sswide=yes
7920else
7921 rm -rf conftest*
7922 gdb_cv_hpux_sswide=no
7923fi
7924rm -f conftest*
7925
7926if test $gdb_cv_hpux_savestate = yes
7927then
7928 cat >> confdefs.h <<\EOF
7929#define HAVE_STRUCT_SAVE_STATE_T 1
7930EOF
7931
7932fi
7933if test $gdb_cv_hpux_sswide = yes
7934then
7935 cat >> confdefs.h <<\EOF
7936#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7937EOF
7938
7939fi
7940echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7941
7942
7943# If we are configured native on GNU/Linux, work around problems with
7944# sys/procfs.h
7945# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7946
7947if test "${target}" = "${host}"; then
7948 case "${host}" in
7949 i[3456]86-*-linux*)
7950 cat >> confdefs.h <<\EOF
7951#define START_INFERIOR_TRAPS_EXPECTED 2
7952EOF
7953
7954 cat >> confdefs.h <<\EOF
7955#define sys_quotactl 1
7956EOF
7957
7958 ;;
7959 ia64-*-aix*)
7960 cat >> confdefs.h <<\EOF
7961#define NEW_PROC_API 1
7962EOF
7963
7964 ;;
7965 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7966 cat >> confdefs.h <<\EOF
7967#define NEW_PROC_API 1
7968EOF
7969
7970 ;;
e7c61be3 7971 *-*-solaris2.[6789])
97bf5e38
MK
7972 cat >> confdefs.h <<\EOF
7973#define NEW_PROC_API 1
7974EOF
7975
7976 ;;
7977 esac
7978fi
7979
7980if test "$ac_cv_header_sys_procfs_h" = yes; then
7981 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 7982echo "configure:7983: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7983 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7984 echo $ac_n "(cached) $ac_c" 1>&6
7985else
7986 cat > conftest.$ac_ext <<EOF
7613d933 7987#line 7988 "configure"
596c9d4b
KB
7988#include "confdefs.h"
7989
7990#define _SYSCALL32
7991#include <sys/procfs.h>
7992int main() {
97bf5e38 7993pstatus_t avar
596c9d4b
KB
7994; return 0; }
7995EOF
7613d933 7996if { (eval echo configure:7997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7997 rm -rf conftest*
97bf5e38 7998 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7999else
8000 echo "configure: failed program was:" >&5
8001 cat conftest.$ac_ext >&5
8002 rm -rf conftest*
97bf5e38 8003 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
8004
8005fi
8006rm -f conftest*
8007fi
8008
97bf5e38 8009 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 8010 cat >> confdefs.h <<\EOF
97bf5e38 8011#define HAVE_PSTATUS_T 1
596c9d4b
KB
8012EOF
8013
8014 fi
97bf5e38 8015 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 8016
97bf5e38 8017 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8018echo "configure:8019: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 8019 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
8020 echo $ac_n "(cached) $ac_c" 1>&6
8021else
8022 cat > conftest.$ac_ext <<EOF
7613d933 8023#line 8024 "configure"
596c9d4b
KB
8024#include "confdefs.h"
8025
8026#define _SYSCALL32
8027#include <sys/procfs.h>
8028int main() {
97bf5e38 8029prrun_t avar
596c9d4b
KB
8030; return 0; }
8031EOF
7613d933 8032if { (eval echo configure:8033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8033 rm -rf conftest*
97bf5e38 8034 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
8035else
8036 echo "configure: failed program was:" >&5
8037 cat conftest.$ac_ext >&5
8038 rm -rf conftest*
97bf5e38 8039 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
8040
8041fi
8042rm -f conftest*
8043fi
8044
97bf5e38 8045 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 8046 cat >> confdefs.h <<\EOF
97bf5e38 8047#define HAVE_PRRUN_T 1
596c9d4b
KB
8048EOF
8049
8050 fi
97bf5e38 8051 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 8052
97bf5e38 8053 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8054echo "configure:8055: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 8055 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
8056 echo $ac_n "(cached) $ac_c" 1>&6
8057else
8058 cat > conftest.$ac_ext <<EOF
7613d933 8059#line 8060 "configure"
596c9d4b
KB
8060#include "confdefs.h"
8061
8062#define _SYSCALL32
8063#include <sys/procfs.h>
8064int main() {
97bf5e38 8065gregset_t avar
596c9d4b
KB
8066; return 0; }
8067EOF
7613d933 8068if { (eval echo configure:8069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 8069 rm -rf conftest*
97bf5e38 8070 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
8071else
8072 echo "configure: failed program was:" >&5
8073 cat conftest.$ac_ext >&5
8074 rm -rf conftest*
97bf5e38 8075 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
8076
8077fi
8078rm -f conftest*
8079fi
8080
97bf5e38 8081 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 8082 cat >> confdefs.h <<\EOF
97bf5e38 8083#define HAVE_GREGSET_T 1
596c9d4b
KB
8084EOF
8085
8086 fi
97bf5e38 8087 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 8088
97bf5e38 8089 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8090echo "configure:8091: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 8091 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 8092 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
8093else
8094 cat > conftest.$ac_ext <<EOF
7613d933 8095#line 8096 "configure"
d84dd0c5 8096#include "confdefs.h"
97bf5e38
MK
8097
8098#define _SYSCALL32
d84dd0c5 8099#include <sys/procfs.h>
97bf5e38
MK
8100int main() {
8101fpregset_t avar
8102; return 0; }
d84dd0c5 8103EOF
7613d933 8104if { (eval echo configure:8105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8105 rm -rf conftest*
8106 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
8107else
8108 echo "configure: failed program was:" >&5
8109 cat conftest.$ac_ext >&5
97bf5e38
MK
8110 rm -rf conftest*
8111 bfd_cv_have_sys_procfs_type_fpregset_t=no
8112
d84dd0c5 8113fi
97bf5e38 8114rm -f conftest*
d84dd0c5
MK
8115fi
8116
97bf5e38
MK
8117 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8118 cat >> confdefs.h <<\EOF
8119#define HAVE_FPREGSET_T 1
d84dd0c5
MK
8120EOF
8121
97bf5e38
MK
8122 fi
8123 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 8124
97bf5e38 8125 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8126echo "configure:8127: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 8127 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
8128 echo $ac_n "(cached) $ac_c" 1>&6
8129else
8130 cat > conftest.$ac_ext <<EOF
7613d933 8131#line 8132 "configure"
c906108c 8132#include "confdefs.h"
c906108c 8133
97bf5e38
MK
8134#define _SYSCALL32
8135#include <sys/procfs.h>
c906108c 8136int main() {
97bf5e38 8137prgregset_t avar
c906108c
SS
8138; return 0; }
8139EOF
7613d933 8140if { (eval echo configure:8141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8141 rm -rf conftest*
97bf5e38 8142 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
8143else
8144 echo "configure: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 rm -rf conftest*
97bf5e38
MK
8147 bfd_cv_have_sys_procfs_type_prgregset_t=no
8148
c906108c
SS
8149fi
8150rm -f conftest*
8151fi
8152
97bf5e38
MK
8153 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8154 cat >> confdefs.h <<\EOF
8155#define HAVE_PRGREGSET_T 1
c906108c
SS
8156EOF
8157
97bf5e38
MK
8158 fi
8159 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 8160
97bf5e38 8161 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8162echo "configure:8163: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 8163 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
8164 echo $ac_n "(cached) $ac_c" 1>&6
8165else
8166 cat > conftest.$ac_ext <<EOF
7613d933 8167#line 8168 "configure"
d45fe813 8168#include "confdefs.h"
97bf5e38
MK
8169
8170#define _SYSCALL32
8171#include <sys/procfs.h>
d45fe813 8172int main() {
97bf5e38 8173prfpregset_t avar
d45fe813
KB
8174; return 0; }
8175EOF
7613d933 8176if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8177 rm -rf conftest*
97bf5e38 8178 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
8179else
8180 echo "configure: failed program was:" >&5
8181 cat conftest.$ac_ext >&5
8182 rm -rf conftest*
97bf5e38
MK
8183 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8184
d45fe813
KB
8185fi
8186rm -f conftest*
8187fi
8188
97bf5e38
MK
8189 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8190 cat >> confdefs.h <<\EOF
8191#define HAVE_PRFPREGSET_T 1
d45fe813
KB
8192EOF
8193
97bf5e38
MK
8194 fi
8195 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 8196
97bf5e38 8197 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8198echo "configure:8199: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 8199 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
8200 echo $ac_n "(cached) $ac_c" 1>&6
8201else
8202 cat > conftest.$ac_ext <<EOF
7613d933 8203#line 8204 "configure"
d45fe813 8204#include "confdefs.h"
97bf5e38
MK
8205
8206#define _SYSCALL32
8207#include <sys/procfs.h>
d45fe813 8208int main() {
97bf5e38 8209prgregset32_t avar
d45fe813
KB
8210; return 0; }
8211EOF
7613d933 8212if { (eval echo configure:8213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8213 rm -rf conftest*
97bf5e38 8214 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
8215else
8216 echo "configure: failed program was:" >&5
8217 cat conftest.$ac_ext >&5
8218 rm -rf conftest*
97bf5e38
MK
8219 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8220
d45fe813
KB
8221fi
8222rm -f conftest*
8223fi
8224
97bf5e38
MK
8225 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8226 cat >> confdefs.h <<\EOF
8227#define HAVE_PRGREGSET32_T 1
d45fe813
KB
8228EOF
8229
97bf5e38
MK
8230 fi
8231 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 8232
97bf5e38 8233 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8234echo "configure:8235: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 8235 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
8236 echo $ac_n "(cached) $ac_c" 1>&6
8237else
8238 cat > conftest.$ac_ext <<EOF
7613d933 8239#line 8240 "configure"
d45fe813 8240#include "confdefs.h"
97bf5e38
MK
8241
8242#define _SYSCALL32
8243#include <sys/procfs.h>
d45fe813 8244int main() {
97bf5e38 8245prfpregset32_t avar
d45fe813
KB
8246; return 0; }
8247EOF
7613d933 8248if { (eval echo configure:8249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8249 rm -rf conftest*
97bf5e38 8250 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
8251else
8252 echo "configure: failed program was:" >&5
8253 cat conftest.$ac_ext >&5
8254 rm -rf conftest*
97bf5e38
MK
8255 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8256
d45fe813
KB
8257fi
8258rm -f conftest*
8259fi
8260
97bf5e38
MK
8261 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8262 cat >> confdefs.h <<\EOF
8263#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
8264EOF
8265
97bf5e38
MK
8266 fi
8267 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 8268
97bf5e38 8269 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8270echo "configure:8271: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 8271 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
8272 echo $ac_n "(cached) $ac_c" 1>&6
8273else
8274 cat > conftest.$ac_ext <<EOF
7613d933 8275#line 8276 "configure"
d45fe813 8276#include "confdefs.h"
97bf5e38 8277
d45fe813 8278#define _SYSCALL32
97bf5e38 8279#include <sys/procfs.h>
d45fe813 8280int main() {
97bf5e38 8281lwpid_t avar
d45fe813
KB
8282; return 0; }
8283EOF
7613d933 8284if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 8285 rm -rf conftest*
97bf5e38 8286 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
8287else
8288 echo "configure: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 rm -rf conftest*
97bf5e38
MK
8291 bfd_cv_have_sys_procfs_type_lwpid_t=no
8292
d45fe813
KB
8293fi
8294rm -f conftest*
8295fi
8296
97bf5e38
MK
8297 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8298 cat >> confdefs.h <<\EOF
8299#define HAVE_LWPID_T 1
d45fe813
KB
8300EOF
8301
97bf5e38
MK
8302 fi
8303 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 8304
97bf5e38 8305 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8306echo "configure:8307: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 8307 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
8308 echo $ac_n "(cached) $ac_c" 1>&6
8309else
8310 cat > conftest.$ac_ext <<EOF
7613d933 8311#line 8312 "configure"
c906108c
SS
8312#include "confdefs.h"
8313
97bf5e38
MK
8314#define _SYSCALL32
8315#include <sys/procfs.h>
c906108c 8316int main() {
97bf5e38 8317psaddr_t avar
c906108c
SS
8318; return 0; }
8319EOF
7613d933 8320if { (eval echo configure:8321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8321 rm -rf conftest*
97bf5e38 8322 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
8323else
8324 echo "configure: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 rm -rf conftest*
97bf5e38
MK
8327 bfd_cv_have_sys_procfs_type_psaddr_t=no
8328
c906108c
SS
8329fi
8330rm -f conftest*
8331fi
8332
97bf5e38
MK
8333 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8334 cat >> confdefs.h <<\EOF
8335#define HAVE_PSADDR_T 1
c906108c
SS
8336EOF
8337
97bf5e38
MK
8338 fi
8339 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 8340
97bf5e38 8341 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8342echo "configure:8343: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 8343 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 8344 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8345else
8346 cat > conftest.$ac_ext <<EOF
7613d933 8347#line 8348 "configure"
c906108c
SS
8348#include "confdefs.h"
8349
97bf5e38
MK
8350#define _SYSCALL32
8351#include <sys/procfs.h>
8352int main() {
8353prsysent_t avar
8354; return 0; }
c906108c 8355EOF
7613d933 8356if { (eval echo configure:8357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8357 rm -rf conftest*
8358 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
8359else
8360 echo "configure: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
97bf5e38
MK
8362 rm -rf conftest*
8363 bfd_cv_have_sys_procfs_type_prsysent_t=no
8364
c906108c 8365fi
97bf5e38 8366rm -f conftest*
c906108c
SS
8367fi
8368
97bf5e38
MK
8369 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8370 cat >> confdefs.h <<\EOF
8371#define HAVE_PRSYSENT_T 1
c906108c
SS
8372EOF
8373
97bf5e38
MK
8374 fi
8375 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 8376
97bf5e38 8377 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8378echo "configure:8379: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 8379 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
8380 echo $ac_n "(cached) $ac_c" 1>&6
8381else
8382 cat > conftest.$ac_ext <<EOF
7613d933 8383#line 8384 "configure"
c906108c
SS
8384#include "confdefs.h"
8385
97bf5e38
MK
8386#define _SYSCALL32
8387#include <sys/procfs.h>
c906108c 8388int main() {
97bf5e38 8389pr_sigset_t avar
c906108c
SS
8390; return 0; }
8391EOF
7613d933 8392if { (eval echo configure:8393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8393 rm -rf conftest*
97bf5e38 8394 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
8395else
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 rm -rf conftest*
97bf5e38
MK
8399 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8400
c906108c
SS
8401fi
8402rm -f conftest*
8403fi
8404
97bf5e38
MK
8405 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8406 cat >> confdefs.h <<\EOF
8407#define HAVE_PR_SIGSET_T 1
c906108c
SS
8408EOF
8409
97bf5e38
MK
8410 fi
8411 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 8412
97bf5e38 8413 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8414echo "configure:8415: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 8415 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 8416 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8417else
8418 cat > conftest.$ac_ext <<EOF
7613d933 8419#line 8420 "configure"
c906108c
SS
8420#include "confdefs.h"
8421
97bf5e38
MK
8422#define _SYSCALL32
8423#include <sys/procfs.h>
8424int main() {
8425pr_sigaction64_t avar
8426; return 0; }
c906108c 8427EOF
7613d933 8428if { (eval echo configure:8429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8429 rm -rf conftest*
8430 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
8431else
8432 echo "configure: failed program was:" >&5
8433 cat conftest.$ac_ext >&5
97bf5e38
MK
8434 rm -rf conftest*
8435 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8436
c906108c 8437fi
97bf5e38 8438rm -f conftest*
c906108c
SS
8439fi
8440
97bf5e38
MK
8441 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8442 cat >> confdefs.h <<\EOF
8443#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
8444EOF
8445
97bf5e38
MK
8446 fi
8447 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8448
8449 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
7613d933 8450echo "configure:8451: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
8451 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8452 echo $ac_n "(cached) $ac_c" 1>&6
8453else
8454 cat > conftest.$ac_ext <<EOF
7613d933 8455#line 8456 "configure"
97bf5e38
MK
8456#include "confdefs.h"
8457
8458#define _SYSCALL32
8459#include <sys/procfs.h>
8460int main() {
8461pr_siginfo64_t avar
8462; return 0; }
8463EOF
7613d933 8464if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8465 rm -rf conftest*
8466 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8467else
8468 echo "configure: failed program was:" >&5
8469 cat conftest.$ac_ext >&5
8470 rm -rf conftest*
8471 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8472
8473fi
8474rm -f conftest*
c906108c 8475fi
c906108c 8476
97bf5e38
MK
8477 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8478 cat >> confdefs.h <<\EOF
8479#define HAVE_PR_SIGINFO64_T 1
8480EOF
c906108c 8481
97bf5e38
MK
8482 fi
8483 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8484
8485
8486
8487
8488
8489 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8490 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
7613d933 8491echo "configure:8492: checking whether prfpregset_t type is broken" >&5
97bf5e38 8492 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
8493 echo $ac_n "(cached) $ac_c" 1>&6
8494else
8495 if test "$cross_compiling" = yes; then
97bf5e38 8496 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8497else
8498 cat > conftest.$ac_ext <<EOF
7613d933 8499#line 8500 "configure"
c906108c 8500#include "confdefs.h"
97bf5e38
MK
8501#include <sys/procfs.h>
8502 int main ()
8503 {
8504 if (sizeof (prfpregset_t) == sizeof (void *))
8505 return 1;
8506 return 0;
8507 }
c906108c 8508EOF
7613d933 8509if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8510then
97bf5e38 8511 gdb_cv_prfpregset_t_broken=no
c906108c
SS
8512else
8513 echo "configure: failed program was:" >&5
8514 cat conftest.$ac_ext >&5
8515 rm -fr conftest*
97bf5e38 8516 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
8517fi
8518rm -fr conftest*
8519fi
8520
8521fi
8522
97bf5e38
MK
8523 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8524 if test $gdb_cv_prfpregset_t_broken = yes; then
8525 cat >> confdefs.h <<\EOF
8526#define PRFPREGSET_T_BROKEN 1
c906108c
SS
8527EOF
8528
97bf5e38
MK
8529 fi
8530 fi
c906108c 8531
97bf5e38
MK
8532
8533 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
7613d933 8534echo "configure:8535: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 8535 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
8536 echo $ac_n "(cached) $ac_c" 1>&6
8537else
8538 cat > conftest.$ac_ext <<EOF
7613d933 8539#line 8540 "configure"
c906108c 8540#include "confdefs.h"
97bf5e38
MK
8541#include <unistd.h>
8542#include <sys/types.h>
8543#include <sys/procfs.h>
8544
8545int main() {
8546
8547 int dummy;;
8548 dummy = ioctl(0, PIOCSET, &dummy);
8549
8550; return 0; }
c906108c 8551EOF
7613d933 8552if { (eval echo configure:8553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8553 rm -rf conftest*
97bf5e38 8554 gdb_cv_have_procfs_piocset=yes
c906108c 8555else
c906108c
SS
8556 echo "configure: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558 rm -rf conftest*
97bf5e38 8559 gdb_cv_have_procfs_piocset=no
c906108c
SS
8560fi
8561rm -f conftest*
8562fi
97bf5e38
MK
8563
8564 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8565 if test $gdb_cv_have_procfs_piocset = yes; then
8566 cat >> confdefs.h <<\EOF
8567#define HAVE_PROCFS_PIOCSET 1
c906108c 8568EOF
97bf5e38
MK
8569
8570 fi
c906108c 8571fi
c906108c 8572
97bf5e38
MK
8573if test ${host} = ${target} ; then
8574
8575 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
7613d933 8576echo "configure:8577: checking for member l_addr in struct link_map" >&5
97bf5e38 8577 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
8578 echo $ac_n "(cached) $ac_c" 1>&6
8579else
8580 cat > conftest.$ac_ext <<EOF
7613d933 8581#line 8582 "configure"
c906108c 8582#include "confdefs.h"
97bf5e38 8583#include <link.h>
c906108c 8584int main() {
97bf5e38 8585struct link_map lm; (void) lm.l_addr;
c906108c
SS
8586; return 0; }
8587EOF
7613d933 8588if { (eval echo configure:8589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 8589 rm -rf conftest*
97bf5e38 8590 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
8591else
8592 echo "configure: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 rm -rf conftest*
97bf5e38 8595 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
8596fi
8597rm -f conftest*
8598fi
8599
97bf5e38
MK
8600 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8601 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8602 cat >> confdefs.h <<\EOF
8603#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8604EOF
97bf5e38
MK
8605
8606 fi
8607
8608
8609 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
7613d933 8610echo "configure:8611: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8611 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8612 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8613else
97bf5e38 8614 cat > conftest.$ac_ext <<EOF
7613d933 8615#line 8616 "configure"
97bf5e38
MK
8616#include "confdefs.h"
8617#include <sys/types.h>
8618#include <link.h>
8619int main() {
8620struct link_map lm; (void) lm.lm_addr;
8621; return 0; }
8622EOF
7613d933 8623if { (eval echo configure:8624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8624 rm -rf conftest*
8625 gdb_cv_have_struct_link_map_with_lm_members=yes
8626else
8627 echo "configure: failed program was:" >&5
8628 cat conftest.$ac_ext >&5
8629 rm -rf conftest*
8630 gdb_cv_have_struct_link_map_with_lm_members=no
8631fi
8632rm -f conftest*
c906108c 8633fi
c906108c 8634
97bf5e38
MK
8635 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8636 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8637 cat >> confdefs.h <<\EOF
8638#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8639EOF
8640
8641 fi
8642
8643
8644 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
7613d933 8645echo "configure:8646: checking for member som_addr in struct so_map" >&5
97bf5e38 8646 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8647 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8648else
8649 cat > conftest.$ac_ext <<EOF
7613d933 8650#line 8651 "configure"
c906108c 8651#include "confdefs.h"
97bf5e38
MK
8652#include <sys/types.h>
8653#ifdef HAVE_NLIST_H
8654#include <nlist.h>
8655#endif
8656#include <link.h>
8657int main() {
8658struct so_map lm; (void) lm.som_addr;
8659; return 0; }
8660EOF
7613d933 8661if { (eval echo configure:8662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8662 rm -rf conftest*
8663 gdb_cv_have_struct_so_map_with_som_members=yes
8664else
8665 echo "configure: failed program was:" >&5
8666 cat conftest.$ac_ext >&5
8667 rm -rf conftest*
8668 gdb_cv_have_struct_so_map_with_som_members=no
8669fi
8670rm -f conftest*
8671fi
c906108c 8672
97bf5e38
MK
8673 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8674 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8675 cat >> confdefs.h <<\EOF
8676#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8677EOF
c906108c 8678
97bf5e38 8679 fi
c906108c 8680
97bf5e38
MK
8681
8682 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
7613d933 8683echo "configure:8684: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8684 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8685 echo $ac_n "(cached) $ac_c" 1>&6
8686else
8687 cat > conftest.$ac_ext <<EOF
7613d933 8688#line 8689 "configure"
97bf5e38
MK
8689#include "confdefs.h"
8690#define _SYSCALL32
8691#include <sys/link.h>
8692int main() {
8693struct link_map32 l;
8694; return 0; }
8695EOF
7613d933 8696if { (eval echo configure:8697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8697 rm -rf conftest*
8698 gdb_cv_have_struct_link_map32=yes
8699else
8700 echo "configure: failed program was:" >&5
8701 cat conftest.$ac_ext >&5
8702 rm -rf conftest*
8703 gdb_cv_have_struct_link_map32=no
8704fi
8705rm -f conftest*
8706fi
c906108c 8707
97bf5e38
MK
8708 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8709 if test $gdb_cv_have_struct_link_map32 = yes; then
8710 cat >> confdefs.h <<\EOF
8711#define HAVE_STRUCT_LINK_MAP32 1
8712EOF
c906108c 8713
97bf5e38
MK
8714 cat >> confdefs.h <<\EOF
8715#define _SYSCALL32 1
8716EOF
c906108c 8717
97bf5e38
MK
8718 fi
8719fi
c906108c 8720
c906108c 8721
97bf5e38 8722echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
7613d933 8723echo "configure:8724: checking for long long support in compiler" >&5
97bf5e38
MK
8724if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8725 echo $ac_n "(cached) $ac_c" 1>&6
8726else
8727 cat > conftest.$ac_ext <<EOF
7613d933 8728#line 8729 "configure"
97bf5e38 8729#include "confdefs.h"
c906108c 8730
97bf5e38 8731int main() {
c906108c 8732
97bf5e38
MK
8733 extern long long foo;
8734 switch (foo & 2) { case 0: return 1; }
c906108c 8735
97bf5e38
MK
8736; return 0; }
8737EOF
7613d933 8738if { (eval echo configure:8739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8739 rm -rf conftest*
8740 gdb_cv_c_long_long=yes
8741else
8742 echo "configure: failed program was:" >&5
8743 cat conftest.$ac_ext >&5
8744 rm -rf conftest*
8745 gdb_cv_c_long_long=no
8746fi
8747rm -f conftest*
8748fi
c906108c 8749
97bf5e38
MK
8750echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8751if test $gdb_cv_c_long_long = yes; then
8752 cat >> confdefs.h <<\EOF
8753#define CC_HAS_LONG_LONG 1
8754EOF
8755
8756fi
8757
8758
8759echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
7613d933 8760echo "configure:8761: checking for long long support in printf" >&5
97bf5e38
MK
8761if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8762 echo $ac_n "(cached) $ac_c" 1>&6
8763else
8764 if test "$cross_compiling" = yes; then
8765 gdb_cv_printf_has_long_long=no
8766else
8767 cat > conftest.$ac_ext <<EOF
7613d933 8768#line 8769 "configure"
97bf5e38
MK
8769#include "confdefs.h"
8770
8771int main () {
8772 char buf[32];
8773 long long l = 0;
8774 l = (l << 16) + 0x0123;
8775 l = (l << 16) + 0x4567;
8776 l = (l << 16) + 0x89ab;
8777 l = (l << 16) + 0xcdef;
8778 sprintf (buf, "0x%016llx", l);
8779 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8780}
97bf5e38 8781EOF
7613d933 8782if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8783then
8784 gdb_cv_printf_has_long_long=yes
8785else
8786 echo "configure: failed program was:" >&5
8787 cat conftest.$ac_ext >&5
8788 rm -fr conftest*
8789 gdb_cv_printf_has_long_long=no
8790fi
8791rm -fr conftest*
8792fi
8793
8794fi
8795
8796if test $gdb_cv_printf_has_long_long = yes; then
8797 cat >> confdefs.h <<\EOF
8798#define PRINTF_HAS_LONG_LONG 1
8799EOF
8800
8801fi
8802echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8803
8804
8805echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
7613d933 8806echo "configure:8807: checking for long double support in compiler" >&5
97bf5e38
MK
8807if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8808 echo $ac_n "(cached) $ac_c" 1>&6
8809else
8810 cat > conftest.$ac_ext <<EOF
7613d933 8811#line 8812 "configure"
97bf5e38
MK
8812#include "confdefs.h"
8813
8814int main() {
8815long double foo;
8816; return 0; }
8817EOF
7613d933 8818if { (eval echo configure:8819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8819 rm -rf conftest*
8820 ac_cv_c_long_double=yes
8821else
8822 echo "configure: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 rm -rf conftest*
8825 ac_cv_c_long_double=no
8826fi
8827rm -f conftest*
8828fi
c906108c 8829
97bf5e38
MK
8830echo "$ac_t""$ac_cv_c_long_double" 1>&6
8831if test $ac_cv_c_long_double = yes; then
8832 cat >> confdefs.h <<\EOF
8833#define HAVE_LONG_DOUBLE 1
c906108c 8834EOF
97bf5e38
MK
8835
8836fi
8837
8838
8839echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
7613d933 8840echo "configure:8841: checking for long double support in printf" >&5
97bf5e38
MK
8841if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8842 echo $ac_n "(cached) $ac_c" 1>&6
8843else
8844 if test "$cross_compiling" = yes; then
8845 gdb_cv_printf_has_long_double=no
8846else
8847 cat > conftest.$ac_ext <<EOF
7613d933 8848#line 8849 "configure"
97bf5e38
MK
8849#include "confdefs.h"
8850
8851int main () {
8852 char buf[16];
8853 long double f = 3.141592653;
8854 sprintf (buf, "%Lg", f);
8855 return (strncmp ("3.14159", buf, 7));
8856}
8857EOF
7613d933 8858if { (eval echo configure:8859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8859then
97bf5e38 8860 gdb_cv_printf_has_long_double=yes
c906108c
SS
8861else
8862 echo "configure: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864 rm -fr conftest*
97bf5e38 8865 gdb_cv_printf_has_long_double=no
c906108c
SS
8866fi
8867rm -fr conftest*
8868fi
8869
8870fi
8871
97bf5e38 8872if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8873 cat >> confdefs.h <<\EOF
97bf5e38
MK
8874#define PRINTF_HAS_LONG_DOUBLE 1
8875EOF
8876
8877fi
8878echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8879
8880
8881echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
7613d933 8882echo "configure:8883: checking for long double support in scanf" >&5
97bf5e38
MK
8883if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8884 echo $ac_n "(cached) $ac_c" 1>&6
8885else
8886 if test "$cross_compiling" = yes; then
8887 gdb_cv_scanf_has_long_double=no
8888else
8889 cat > conftest.$ac_ext <<EOF
7613d933 8890#line 8891 "configure"
97bf5e38
MK
8891#include "confdefs.h"
8892
8893int main () {
8894 char *buf = "3.141592653";
8895 long double f = 0;
8896 sscanf (buf, "%Lg", &f);
8897 return !(f > 3.14159 && f < 3.14160);
8898}
c906108c 8899EOF
7613d933 8900if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8901then
8902 gdb_cv_scanf_has_long_double=yes
8903else
8904 echo "configure: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 rm -fr conftest*
8907 gdb_cv_scanf_has_long_double=no
8908fi
8909rm -fr conftest*
8910fi
c906108c
SS
8911
8912fi
8913
97bf5e38
MK
8914if test $gdb_cv_scanf_has_long_double = yes; then
8915 cat >> confdefs.h <<\EOF
8916#define SCANF_HAS_LONG_DOUBLE 1
8917EOF
8918
8919fi
8920echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8921
438013df
AO
8922case ${host_os} in
8923aix*)
8924 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
7613d933 8925echo "configure:8926: checking for -bbigtoc option" >&5
438013df
AO
8926if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8927 echo $ac_n "(cached) $ac_c" 1>&6
8928else
8929
8930 SAVE_LDFLAGS=$LDFLAGS
8931
8932 case $GCC in
8933 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8934 *) gdb_cv_bigtoc=-bbigtoc ;;
8935 esac
8936
8937 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8938 cat > conftest.$ac_ext <<EOF
7613d933 8939#line 8940 "configure"
438013df
AO
8940#include "confdefs.h"
8941
8942int main() {
8943int i;
8944; return 0; }
8945EOF
7613d933 8946if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8947 :
8948else
8949 echo "configure: failed program was:" >&5
8950 cat conftest.$ac_ext >&5
8951 rm -rf conftest*
8952 gdb_cv_bigtoc=
8953fi
8954rm -f conftest*
8955
8956fi
8957
8958echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8959 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8960 ;;
8961esac
8962
c906108c
SS
8963
8964
8965if test ${build} = ${host} -a ${host} = ${target} ; then
8966 case ${host_os} in
8967 hpux*)
8968 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
7613d933 8969echo "configure:8970: checking for HPUX/OSF thread support" >&5
c906108c
SS
8970 if test -f /usr/include/dce/cma_config.h ; then
8971 if test "$GCC" = "yes" ; then
8972 echo "$ac_t""yes" 1>&6
8973 cat >> confdefs.h <<\EOF
8974#define HAVE_HPUX_THREAD_SUPPORT 1
8975EOF
8976
3483b318 8977 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
c906108c
SS
8978 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8979 else
8980 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8981 fi
8982 else
8983 echo "$ac_t""no" 1>&6
8984 fi
8985 ;;
8986 solaris*)
d92419e5
JB
8987 # See if thread_db library is around for Solaris thread debugging.
8988 # Note that we must explicitly test for version 1 of the library
8989 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8990 # the same API.
c906108c 8991 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
7613d933 8992echo "configure:8993: checking for Solaris thread debugging library" >&5
c906108c
SS
8993 if test -f /usr/lib/libthread_db.so.1 ; then
8994 echo "$ac_t""yes" 1>&6
8995 cat >> confdefs.h <<\EOF
8996#define HAVE_THREAD_DB_LIB 1
8997EOF
8998
3483b318 8999 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
c906108c
SS
9000 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9001 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
7613d933 9002echo "configure:9003: checking for dlopen in -ldl" >&5
c906108c
SS
9003ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9004if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9005 echo $ac_n "(cached) $ac_c" 1>&6
9006else
9007 ac_save_LIBS="$LIBS"
9008LIBS="-ldl $LIBS"
9009cat > conftest.$ac_ext <<EOF
7613d933 9010#line 9011 "configure"
c906108c
SS
9011#include "confdefs.h"
9012/* Override any gcc2 internal prototype to avoid an error. */
9013/* We use char because int might match the return type of a gcc2
9014 builtin and then its argument prototype would still apply. */
9015char dlopen();
9016
9017int main() {
9018dlopen()
9019; return 0; }
9020EOF
7613d933 9021if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9022 rm -rf conftest*
9023 eval "ac_cv_lib_$ac_lib_var=yes"
9024else
9025 echo "configure: failed program was:" >&5
9026 cat conftest.$ac_ext >&5
9027 rm -rf conftest*
9028 eval "ac_cv_lib_$ac_lib_var=no"
9029fi
9030rm -f conftest*
9031LIBS="$ac_save_LIBS"
9032
9033fi
9034if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9035 echo "$ac_t""yes" 1>&6
9036 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9037 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9038 cat >> confdefs.h <<EOF
9039#define $ac_tr_lib 1
9040EOF
9041
9042 LIBS="-ldl $LIBS"
9043
9044else
9045 echo "$ac_t""no" 1>&6
9046fi
9047
9048 if test "$GCC" = "yes" ; then
9049 # The GNU linker requires the -export-dynamic option to make
9050 # all symbols visible in the dynamic symbol table.
9051 hold_ldflags=$LDFLAGS
9052 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
7613d933 9053echo "configure:9054: checking for the ld -export-dynamic flag" >&5
c906108c
SS
9054 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9055 cat > conftest.$ac_ext <<EOF
7613d933 9056#line 9057 "configure"
c906108c
SS
9057#include "confdefs.h"
9058
9059int main() {
9060int i;
9061; return 0; }
9062EOF
7613d933 9063if { (eval echo configure:9064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9064 rm -rf conftest*
9065 found=yes
9066else
9067 echo "configure: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9069 rm -rf conftest*
9070 found=no
9071fi
9072rm -f conftest*
9073 LDFLAGS=$hold_ldflags
9074 echo "$ac_t""$found" 1>&6
9075 if test $found = yes; then
9076 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9077 fi
9078 fi
9079 # Sun randomly tweaked the prototypes in <proc_service.h>
9080 # at one point.
9081 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
7613d933 9082echo "configure:9083: checking if <proc_service.h> is old" >&5
c906108c
SS
9083 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9084 echo $ac_n "(cached) $ac_c" 1>&6
9085else
9086
9087 cat > conftest.$ac_ext <<EOF
7613d933 9088#line 9089 "configure"
c906108c
SS
9089#include "confdefs.h"
9090
9091 #include <proc_service.h>
9092 ps_err_e ps_pdwrite
9093 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9094
9095int main() {
9096
9097; return 0; }
9098EOF
7613d933 9099if { (eval echo configure:9100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9100 rm -rf conftest*
9101 gdb_cv_proc_service_is_old=no
9102else
9103 echo "configure: failed program was:" >&5
9104 cat conftest.$ac_ext >&5
9105 rm -rf conftest*
9106 gdb_cv_proc_service_is_old=yes
9107fi
9108rm -f conftest*
9109
9110fi
9111
9112 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9113 if test $gdb_cv_proc_service_is_old = yes; then
9114 cat >> confdefs.h <<\EOF
9115#define PROC_SERVICE_IS_OLD 1
9116EOF
9117
9118 fi
9119 else
9120 echo "$ac_t""no" 1>&6
9121 fi
9122 ;;
d92419e5
JB
9123 aix*)
9124 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
7613d933 9125echo "configure:9126: checking for AiX thread debugging library" >&5
d92419e5
JB
9126 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9127 echo $ac_n "(cached) $ac_c" 1>&6
9128else
9129 cat > conftest.$ac_ext <<EOF
7613d933 9130#line 9131 "configure"
d92419e5
JB
9131#include "confdefs.h"
9132#include <sys/pthdebug.h>
9133int main() {
9134#ifndef PTHDB_VERSION_3
9135 #error
9136 #endif
9137; return 0; }
9138EOF
7613d933 9139if { (eval echo configure:9140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
9140 rm -rf conftest*
9141 gdb_cv_have_aix_thread_debug=yes
9142else
9143 echo "configure: failed program was:" >&5
9144 cat conftest.$ac_ext >&5
9145 rm -rf conftest*
9146 gdb_cv_have_aix_thread_debug=no
9147fi
9148rm -f conftest*
9149fi
9150
9151 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9152 if test $gdb_cv_have_aix_thread_debug = yes; then
9153 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
3483b318 9154 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
d92419e5
JB
9155 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9156 fi
9157 ;;
c906108c
SS
9158 esac
9159
9160fi
9161
3f47be5c
EZ
9162if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9163 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
7613d933 9164echo "configure:9165: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
9165if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9166 echo $ac_n "(cached) $ac_c" 1>&6
9167else
9168 cat > conftest.$ac_ext <<EOF
7613d933 9169#line 9170 "configure"
3f47be5c
EZ
9170#include "confdefs.h"
9171#include <thread_db.h>
9172int main() {
9173int i = TD_NOTALLOC;
9174; return 0; }
9175EOF
7613d933 9176if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
9177 rm -rf conftest*
9178 gdb_cv_thread_db_h_has_td_notalloc=yes
9179else
9180 echo "configure: failed program was:" >&5
9181 cat conftest.$ac_ext >&5
9182 rm -rf conftest*
9183 gdb_cv_thread_db_h_has_td_notalloc=no
9184
9185fi
9186rm -f conftest*
9187
9188fi
9189
9190echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9191fi
9192if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9193 cat >> confdefs.h <<\EOF
9194#define THREAD_DB_HAS_TD_NOTALLOC 1
9195EOF
9196
9197fi
9198
b757528f
JJ
9199if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9200 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
7613d933 9201echo "configure:9202: checking whether <sys/syscall.h> has __NR_tkill" >&5
b757528f
JJ
9202if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9203 echo $ac_n "(cached) $ac_c" 1>&6
9204else
9205 cat > conftest.$ac_ext <<EOF
7613d933 9206#line 9207 "configure"
b757528f
JJ
9207#include "confdefs.h"
9208#include <sys/syscall.h>
9209int main() {
9210int i = __NR_tkill;
9211; return 0; }
9212EOF
7613d933 9213if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b757528f
JJ
9214 rm -rf conftest*
9215 gdb_cv_sys_syscall_h_has_tkill=yes
9216else
9217 echo "configure: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 rm -rf conftest*
9220 gdb_cv_sys_syscall_h_has_tkill=no
9221
9222fi
9223rm -f conftest*
9224
9225fi
9226
9227echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9228fi
9229if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9230 cat >> confdefs.h <<\EOF
9231#define HAVE_TKILL_SYSCALL 1
9232EOF
9233
9234fi
9235
fb40c209 9236
030292b7
DJ
9237# Check whether --with-sysroot or --without-sysroot was given.
9238if test "${with_sysroot+set}" = set; then
9239 withval="$with_sysroot"
9240
9241 case ${with_sysroot} in
715d1656 9242 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
030292b7
DJ
9243 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9244 esac
9245
9246 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9247
9248 if test "x$exec_prefix" = xNONE; then
9249 if test "x$prefix" = xNONE; then
9250 test_prefix=/usr/local
9251 else
9252 test_prefix=$prefix
9253 fi
9254 else
9255 test_prefix=$exec_prefix
9256 fi
9257 case ${TARGET_SYSTEM_ROOT} in
715d1656
AO
9258 "${test_prefix}"|"${test_prefix}/"*|\
9259 '${exec_prefix}'|'${exec_prefix}/'*)
030292b7
DJ
9260 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9261 TARGET_SYSTEM_ROOT_DEFINE="$t"
9262 ;;
9263 esac
9264
9265else
9266
9267 TARGET_SYSTEM_ROOT=
9268 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9269
9270fi
9271
9272
9273
9274
3b851bce
AC
9275# NOTE: Don't add -Wall or -Wunused, they both include
9276# -Wunused-parameter which reports bogus warnings.
9277# NOTE: If you add to this list, remember to update
9278# gdb/doc/gdbint.texinfo.
1decb323 9279build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
0f0cffd2 9280-Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
4566dfcf 9281-Wunused-label -Wunused-function"
d8038014 9282# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
0f0cffd2 9283# -Wunused-function -Wunused-variable -Wunused-value
93d56215 9284# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
9285# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9286# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9287# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
9288# Check whether --enable-build-warnings or --disable-build-warnings was given.
9289if test "${enable_build_warnings+set}" = set; then
9290 enableval="$enable_build_warnings"
1decb323 9291 case "${enableval}" in
c906108c
SS
9292 yes) ;;
9293 no) build_warnings="-w";;
9294 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9295 build_warnings="${build_warnings} ${t}";;
9296 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9297 build_warnings="${t} ${build_warnings}";;
9298 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9299esac
d4f3574e 9300if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 9301 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 9302fi
1decb323 9303fi
3b851bce
AC
9304# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9305if test "${enable_gdb_build_warnings+set}" = set; then
9306 enableval="$enable_gdb_build_warnings"
9307 case "${enableval}" in
9308 yes) ;;
9309 no) build_warnings="-w";;
9310 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9311 build_warnings="${build_warnings} ${t}";;
9312 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9313 build_warnings="${t} ${build_warnings}";;
9314 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9315esac
9316if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9317 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9318fi
9319fi
104c1213
JM
9320WARN_CFLAGS=""
9321WERROR_CFLAGS=""
c906108c
SS
9322if test "x${build_warnings}" != x -a "x$GCC" = xyes
9323then
746a987d 9324 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
7613d933 9325echo "configure:9326: checking compiler warning flags" >&5
746a987d
AC
9326 # Separate out the -Werror flag as some files just cannot be
9327 # compiled with it enabled.
9328 for w in ${build_warnings}; do
9329 case $w in
9330 -Werr*) WERROR_CFLAGS=-Werror ;;
9331 *) # Check that GCC accepts it
4536bbc6
AC
9332 saved_CFLAGS="$CFLAGS"
9333 CFLAGS="$CFLAGS $w"
9334 cat > conftest.$ac_ext <<EOF
7613d933 9335#line 9336 "configure"
4536bbc6
AC
9336#include "confdefs.h"
9337
9338int main() {
9339
9340; return 0; }
9341EOF
7613d933 9342if { (eval echo configure:9343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
9343 rm -rf conftest*
9344 WARN_CFLAGS="${WARN_CFLAGS} $w"
9345else
9346 echo "configure: failed program was:" >&5
9347 cat conftest.$ac_ext >&5
9348fi
9349rm -f conftest*
9350 CFLAGS="$saved_CFLAGS"
746a987d
AC
9351 esac
9352 done
9353 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
9354fi
9355
9356
104c1213 9357
7a292a7a
SS
9358# In the Cygwin environment, we need some additional flags.
9359echo $ac_n "checking for cygwin""... $ac_c" 1>&6
7613d933 9360echo "configure:9361: checking for cygwin" >&5
7a292a7a
SS
9361if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9362 echo $ac_n "(cached) $ac_c" 1>&6
9363else
9364 cat > conftest.$ac_ext <<EOF
7613d933 9365#line 9366 "configure"
7a292a7a
SS
9366#include "confdefs.h"
9367
9368#if defined (__CYGWIN__) || defined (__CYGWIN32__)
9369lose
9370#endif
9371EOF
9372if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9373 egrep "lose" >/dev/null 2>&1; then
9374 rm -rf conftest*
9375 gdb_cv_os_cygwin=yes
9376else
9377 rm -rf conftest*
9378 gdb_cv_os_cygwin=no
9379fi
9380rm -f conftest*
9381
9382fi
9383
9384echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9385
aff38e61
AC
9386
9387SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9388case ${host} in
95cbc983
AC
9389 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9390 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
9391esac
9392
9393
cd0fc7c3
SS
9394# libreadline needs libuser32.a in a cygwin environment
9395WIN32LIBS=
9396if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
9397 WIN32LIBS="-luser32"
9398 case "${target}" in
9399 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9400 ;;
9401 esac
cd0fc7c3 9402fi
c906108c 9403
7a292a7a 9404
3fc11d3e
JM
9405LIBGUI="../libgui/src/libgui.a"
9406GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9407
9408
7a292a7a 9409
3fc11d3e
JM
9410WIN32LDAPP=
9411
9412
9413
9414configdir="unix"
9415
9416GDBTKLIBS=
9417if test "${enable_gdbtk}" = "yes"; then
9418
d1c3b63a
KS
9419 # Gdbtk must have an absolute path to srcdir in order to run
9420 # properly when not installed.
9421 here=`pwd`
9422 cd ${srcdir}
9423 GDBTK_SRC_DIR=`pwd`
9424 cd $here
9425
3fc11d3e
JM
9426
9427#
9428# Ok, lets find the tcl configuration
9429# First, look for one uninstalled.
9430# the alternative search directory is invoked by --with-tclconfig
9431#
9432
9433if test x"${no_tcl}" = x ; then
9434 # we reset no_tcl in case something fails here
9435 no_tcl=true
9436 # Check whether --with-tclconfig or --without-tclconfig was given.
9437if test "${with_tclconfig+set}" = set; then
9438 withval="$with_tclconfig"
9439 with_tclconfig=${withval}
9440fi
9441
9442 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
7613d933 9443echo "configure:9444: checking for Tcl configuration" >&5
3fc11d3e
JM
9444 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9445 echo $ac_n "(cached) $ac_c" 1>&6
9446else
9447
9448
9449 # First check to see if --with-tclconfig was specified.
9450 if test x"${with_tclconfig}" != x ; then
9451 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9452 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9453 else
9454 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9455 fi
9456 fi
9457
9458 # then check for a private Tcl installation
9459 if test x"${ac_cv_c_tclconfig}" = x ; then
9460 for i in \
9461 ../tcl \
9462 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9463 ../../tcl \
9464 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9465 ../../../tcl \
9466 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9467 if test -f "$i/${configdir}/tclConfig.sh" ; then
9468 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9469 break
9470 fi
9471 done
9472 fi
9473 # check in a few common install locations
9474 if test x"${ac_cv_c_tclconfig}" = x ; then
9475 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9476 if test -f "$i/tclConfig.sh" ; then
9477 ac_cv_c_tclconfig=`(cd $i; pwd)`
9478 break
9479 fi
9480 done
9481 fi
9482 # check in a few other private locations
9483 if test x"${ac_cv_c_tclconfig}" = x ; then
9484 for i in \
9485 ${srcdir}/../tcl \
9486 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9487 if test -f "$i/${configdir}/tclConfig.sh" ; then
9488 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9489 break
9490 fi
9491 done
9492 fi
9493
9494fi
9495
9496 if test x"${ac_cv_c_tclconfig}" = x ; then
9497 TCLCONFIG="# no Tcl configs found"
9498 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9499 else
9500 no_tcl=
9501 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9502 echo "$ac_t""found $TCLCONFIG" 1>&6
9503 fi
9504fi
9505
9506 if test -z "${no_tcl}"; then
9507
9508 . $TCLCONFIG
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
033afc63 9529
3fc11d3e
JM
9530
9531
9532
9533
9534
9535
9536#
9537# Ok, lets find the tk configuration
9538# First, look for one uninstalled.
9539# the alternative search directory is invoked by --with-tkconfig
9540#
9541
9542if test x"${no_tk}" = x ; then
9543 # we reset no_tk in case something fails here
9544 no_tk=true
9545 # Check whether --with-tkconfig or --without-tkconfig was given.
9546if test "${with_tkconfig+set}" = set; then
9547 withval="$with_tkconfig"
9548 with_tkconfig=${withval}
9549fi
9550
9551 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
7613d933 9552echo "configure:9553: checking for Tk configuration" >&5
3fc11d3e
JM
9553 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9554 echo $ac_n "(cached) $ac_c" 1>&6
9555else
9556
9557
9558 # First check to see if --with-tkconfig was specified.
9559 if test x"${with_tkconfig}" != x ; then
9560 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9561 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9562 else
9563 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9564 fi
9565 fi
9566
9567 # then check for a private Tk library
9568 if test x"${ac_cv_c_tkconfig}" = x ; then
9569 for i in \
9570 ../tk \
9571 `ls -dr ../tk[4-9]* 2>/dev/null` \
9572 ../../tk \
9573 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9574 ../../../tk \
9575 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9576 if test -f "$i/${configdir}/tkConfig.sh" ; then
9577 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9578 break
9579 fi
9580 done
9581 fi
9582 # check in a few common install locations
9583 if test x"${ac_cv_c_tkconfig}" = x ; then
9584 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9585 if test -f "$i/tkConfig.sh" ; then
9586 ac_cv_c_tkconfig=`(cd $i; pwd)`
9587 break
9588 fi
9589 done
9590 fi
9591 # check in a few other private locations
9592 if test x"${ac_cv_c_tkconfig}" = x ; then
9593 for i in \
9594 ${srcdir}/../tk \
9595 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9596 if test -f "$i/${configdir}/tkConfig.sh" ; then
9597 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9598 break
9599 fi
9600 done
9601 fi
9602
9603fi
9604
9605 if test x"${ac_cv_c_tkconfig}" = x ; then
9606 TKCONFIG="# no Tk configs found"
9607 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9608 else
9609 no_tk=
9610 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9611 echo "$ac_t""found $TKCONFIG" 1>&6
9612 fi
9613fi
9614
9615
9616
dd2504ab
JM
9617 # now look for Tcl library stuff
9618
9619 case "${host}" in
9620 *-*-cygwin*)
9621 tcldir=../tcl/win/
9622 ;;
9623 *)
9624 tcldir=../tcl/unix/
9625 ;;
9626 esac
9627
9628 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9629
3fc11d3e
JM
9630 # If $no_tk is nonempty, then we can't do Tk, and there is no
9631 # point to doing Tcl.
9632 if test -z "${no_tk}"; then
9633
9634 if test -f "$TKCONFIG" ; then
9635 . $TKCONFIG
9636 fi
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651#
9652# Ok, lets find the tcl source trees so we can use the headers
9653# Warning: transition of version 9 to 10 will break this algorithm
9654# because 10 sorts before 9. We also look for just tcl. We have to
9655# be careful that we don't match stuff like tclX by accident.
9656# the alternative search directory is involked by --with-tclinclude
9657#
9658
9659no_tcl=true
9660echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
7613d933 9661echo "configure:9662: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9662# Check whether --with-tclinclude or --without-tclinclude was given.
9663if test "${with_tclinclude+set}" = set; then
9664 withval="$with_tclinclude"
9665 with_tclinclude=${withval}
9666fi
9667
9668if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9669 echo $ac_n "(cached) $ac_c" 1>&6
9670else
9671
9672# first check to see if --with-tclinclude was specified
9673if test x"${with_tclinclude}" != x ; then
9674 if test -f ${with_tclinclude}/tclInt.h ; then
9675 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9676 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9677 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9678 else
9679 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9680 fi
9681fi
9682
9683# next check if it came with Tcl configuration file
9684if test x"${ac_cv_c_tclconfig}" = x ; then
9685 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9686 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9687 fi
9688fi
9689
9690# next check in private source directory
9691#
9692# since ls returns lowest version numbers first, reverse its output
9693if test x"${ac_cv_c_tclh}" = x ; then
9694 for i in \
9695 ${srcdir}/../tcl \
9696 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9697 ${srcdir}/../../tcl \
9698 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9699 ${srcdir}/../../../tcl \
9700 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9701 if test -f $i/generic/tclInt.h ; then
9702 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9703 break
9704 fi
9705 done
9706fi
9707# finally check in a few common install locations
9708#
9709# since ls returns lowest version numbers first, reverse its output
9710if test x"${ac_cv_c_tclh}" = x ; then
9711 for i in \
9712 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9713 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9714 /usr/local/src/tcl \
9715 /usr/local/lib/tcl \
9716 ${prefix}/include ; do
9717 if test -f $i/generic/tclInt.h ; then
9718 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9719 break
9720 fi
9721 done
9722fi
9723# see if one is installed
9724if test x"${ac_cv_c_tclh}" = x ; then
9725 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9726echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
7613d933 9727echo "configure:9728: checking for tclInt.h" >&5
3fc11d3e
JM
9728if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9729 echo $ac_n "(cached) $ac_c" 1>&6
9730else
9731 cat > conftest.$ac_ext <<EOF
7613d933 9732#line 9733 "configure"
3fc11d3e
JM
9733#include "confdefs.h"
9734#include <tclInt.h>
9735EOF
9736ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 9737{ (eval echo configure:9738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9738ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9739if test -z "$ac_err"; then
9740 rm -rf conftest*
9741 eval "ac_cv_header_$ac_safe=yes"
9742else
9743 echo "$ac_err" >&5
9744 echo "configure: failed program was:" >&5
9745 cat conftest.$ac_ext >&5
9746 rm -rf conftest*
9747 eval "ac_cv_header_$ac_safe=no"
9748fi
9749rm -f conftest*
9750fi
9751if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9752 echo "$ac_t""yes" 1>&6
9753 ac_cv_c_tclh=installed
9754else
9755 echo "$ac_t""no" 1>&6
9756ac_cv_c_tclh=""
9757fi
9758
9759fi
9760
9761fi
9762
9763if test x"${ac_cv_c_tclh}" = x ; then
9764 TCLHDIR="# no Tcl private headers found"
9765 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9766fi
9767if test x"${ac_cv_c_tclh}" != x ; then
9768 no_tcl=""
9769 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9770 echo "$ac_t""is installed" 1>&6
9771 TCLHDIR=""
9772 else
9773 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9774 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9775 TCLHDIR="-I${ac_cv_c_tclh}"
9776 fi
9777fi
9778
9779
9780
9781
9782#
9783# Ok, lets find the tk source trees so we can use the headers
9784# If the directory (presumably symlink) named "tk" exists, use that one
9785# in preference to any others. Same logic is used when choosing library
9786# and again with Tcl. The search order is the best place to look first, then in
9787# decreasing significance. The loop breaks if the trigger file is found.
9788# Note the gross little conversion here of srcdir by cd'ing to the found
9789# directory. This converts the path from a relative to an absolute, so
9790# recursive cache variables for the path will work right. We check all
9791# the possible paths in one loop rather than many seperate loops to speed
9792# things up.
9793# the alternative search directory is involked by --with-tkinclude
9794#
9795no_tk=true
9796echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
7613d933 9797echo "configure:9798: checking for Tk private headers" >&5
3fc11d3e
JM
9798# Check whether --with-tkinclude or --without-tkinclude was given.
9799if test "${with_tkinclude+set}" = set; then
9800 withval="$with_tkinclude"
9801 with_tkinclude=${withval}
9802fi
9803
9804if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9805 echo $ac_n "(cached) $ac_c" 1>&6
9806else
9807
9808# first check to see if --with-tkinclude was specified
9809if test x"${with_tkinclude}" != x ; then
9810 if test -f ${with_tkinclude}/tk.h ; then
9811 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9812 elif test -f ${with_tkinclude}/generic/tk.h ; then
9813 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9814 else
9815 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9816 fi
9817fi
9818
9819# next check if it came with Tk configuration file
9820if test x"${ac_cv_c_tkconfig}" = x ; then
9821 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9822 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9823 fi
9824fi
9825
9826# next check in private source directory
9827#
9828# since ls returns lowest version numbers first, reverse its output
9829if test x"${ac_cv_c_tkh}" = x ; then
9830 for i in \
9831 ${srcdir}/../tk \
9832 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9833 ${srcdir}/../../tk \
9834 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9835 ${srcdir}/../../../tk \
9836 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9837 if test -f $i/generic/tk.h ; then
9838 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9839 break
9840 fi
9841 done
9842fi
9843# finally check in a few common install locations
9844#
9845# since ls returns lowest version numbers first, reverse its output
9846if test x"${ac_cv_c_tkh}" = x ; then
9847 for i in \
9848 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9849 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9850 /usr/local/src/tk \
9851 /usr/local/lib/tk \
9852 ${prefix}/include ; do
9853 if test -f $i/generic/tk.h ; then
9854 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9855 break
9856 fi
9857 done
9858fi
9859# see if one is installed
9860if test x"${ac_cv_c_tkh}" = x ; then
9861 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9862echo $ac_n "checking for tk.h""... $ac_c" 1>&6
7613d933 9863echo "configure:9864: checking for tk.h" >&5
3fc11d3e
JM
9864if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9865 echo $ac_n "(cached) $ac_c" 1>&6
9866else
9867 cat > conftest.$ac_ext <<EOF
7613d933 9868#line 9869 "configure"
3fc11d3e
JM
9869#include "confdefs.h"
9870#include <tk.h>
9871EOF
9872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 9873{ (eval echo configure:9874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9874ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9875if test -z "$ac_err"; then
9876 rm -rf conftest*
9877 eval "ac_cv_header_$ac_safe=yes"
9878else
9879 echo "$ac_err" >&5
9880 echo "configure: failed program was:" >&5
9881 cat conftest.$ac_ext >&5
9882 rm -rf conftest*
9883 eval "ac_cv_header_$ac_safe=no"
9884fi
9885rm -f conftest*
9886fi
9887if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9888 echo "$ac_t""yes" 1>&6
9889 ac_cv_c_tkh=installed
9890else
9891 echo "$ac_t""no" 1>&6
9892ac_cv_c_tkh=""
9893fi
9894
9895fi
9896
9897fi
9898
9899if test x"${ac_cv_c_tkh}" != x ; then
9900 no_tk=""
9901 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9902 echo "$ac_t""is installed" 1>&6
9903 TKHDIR=""
9904 else
9905 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9906 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9907 TKHDIR="-I${ac_cv_c_tkh}"
9908 fi
9909else
9910 TKHDIR="# no Tk directory found"
9911 echo "configure: warning: Can't find Tk private headers" 1>&2
9912 no_tk=true
9913fi
9914
9915
9916
9917
9918echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7613d933 9919echo "configure:9920: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9920if test x"${ac_cv_c_itclh}" = x ; then
9921 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9922 if test -f $i/generic/itcl.h ; then
9923 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9924 break
9925 fi
9926 done
9927fi
9928if test x"${ac_cv_c_itclh}" = x ; then
9929 ITCLHDIR="# no Itcl private headers found"
9930 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9931fi
9932if test x"${ac_cv_c_itclh}" != x ; then
9933 ITCLHDIR="-I${ac_cv_c_itclh}"
9934fi
9935# should always be here
9936# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9937
9938#AC_SUBST(ITCLLIB)
9939
9940
9941echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7613d933 9942echo "configure:9943: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9943if test x"${ac_cv_c_itkh}" = x ; then
9944 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9945 if test -f $i/generic/itk.h ; then
9946 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9947 break
9948 fi
9949 done
9950fi
9951if test x"${ac_cv_c_itkh}" = x ; then
9952 ITKHDIR="# no Itk private headers found"
9953 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9954fi
9955if test x"${ac_cv_c_itkh}" != x ; then
9956 ITKHDIR="-I${ac_cv_c_itkh}"
9957fi
9958# should always be here
9959# ITKLIB="../itcl/itk/unix/libitk.a"
9960
9961#AC_SUBST(ITKLIB)
9962
3fc11d3e 9963
dd2504ab
JM
9964
9965 # now look for Tk library stuff
9966
9967 case "${host}" in
9968 *-*-cygwin*)
9969 tkdir=../tk/win/
9970 ;;
9971 *)
9972 tkdir=../tk/unix/
9973 ;;
9974 esac
9975
9976 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9977
3fc11d3e
JM
9978 # now look for Itcl library stuff
9979
9980
9981#
9982# Ok, lets find the itcl configuration
9983# First, look for one uninstalled.
9984# the alternative search directory is invoked by --with-itclconfig
9985#
9986
9987if test x"${no_itcl}" = x ; then
9988 # we reset no_itcl in case something fails here
9989 no_itcl=true
9990 # Check whether --with-itclconfig or --without-itclconfig was given.
9991if test "${with_itclconfig+set}" = set; then
9992 withval="$with_itclconfig"
9993 with_itclconfig=${withval}
9994fi
9995
9996 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
7613d933 9997echo "configure:9998: checking for Itcl configuration" >&5
3fc11d3e
JM
9998 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9999 echo $ac_n "(cached) $ac_c" 1>&6
10000else
10001
10002
10003 # First check to see if --with-itclconfig was specified.
10004 if test x"${with_itclconfig}" != x ; then
10005 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10006 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10007 else
10008 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10009 fi
10010 fi
10011
10012 # then check for a private Itcl library
10013 if test x"${ac_cv_c_itclconfig}" = x ; then
10014 for i in \
10015 ../itcl/itcl \
10016 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10017 ../../itcl \
10018 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10019 ../../../itcl \
10020 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10021 if test -f "$i/itclConfig.sh" ; then
10022 ac_cv_c_itclconfig=`(cd $i; pwd)`
10023 break
10024 fi
10025 done
10026 fi
10027 # check in a few common install locations
10028 if test x"${ac_cv_c_itclconfig}" = x ; then
10029 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10030 if test -f "$i/itclConfig.sh" ; then
10031 ac_cv_c_itclconfig=`(cd $i; pwd)`
10032 break
10033 fi
10034 done
10035 fi
10036 # check in a few other private locations
10037 if test x"${ac_cv_c_itclconfig}" = x ; then
10038 for i in \
10039 ${srcdir}/../itcl/itcl \
10040 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10041 if test -f "$i/itclConfig.sh" ; then
10042 ac_cv_c_itclconfig=`(cd $i; pwd)`
10043 break
10044 fi
10045 done
10046 fi
10047
10048fi
10049
10050 if test x"${ac_cv_c_itclconfig}" = x ; then
10051 ITCLCONFIG="# no Itcl configs found"
10052 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10053 else
10054 no_itcl=
10055 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10056 echo "$ac_t""found $ITCLCONFIG" 1>&6
10057 fi
10058fi
10059
10060 if test -z "${no_itcl}"; then
10061
10062 if test -f "$ITCLCONFIG" ; then
10063 . $ITCLCONFIG
10064 fi
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
3fc11d3e
JM
10075
10076
10077 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 10078 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
10079 fi
10080
10081
10082 # now look for Itk library stuff
10083
10084#
10085# Ok, lets find the itk configuration
10086# First, look for one uninstalled.
10087# the alternative search directory is invoked by --with-itkconfig
10088#
10089
10090if test x"${no_itk}" = x ; then
10091 # we reset no_itk in case something fails here
10092 no_itk=true
10093 # Check whether --with-itkconfig or --without-itkconfig was given.
10094if test "${with_itkconfig+set}" = set; then
10095 withval="$with_itkconfig"
10096 with_itkconfig=${withval}
10097fi
10098
10099 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
7613d933 10100echo "configure:10101: checking for Itk configuration" >&5
3fc11d3e
JM
10101 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10102 echo $ac_n "(cached) $ac_c" 1>&6
10103else
10104
10105
10106 # First check to see if --with-itkconfig was specified.
10107 if test x"${with_itkconfig}" != x ; then
10108 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10109 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10110 else
10111 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10112 fi
10113 fi
10114
10115 # then check for a private Itk library
10116 if test x"${ac_cv_c_itkconfig}" = x ; then
10117 for i in \
10118 ../itcl/itk \
10119 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10120 ../../itk \
10121 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10122 ../../../itk \
10123 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10124 if test -f "$i/itkConfig.sh" ; then
10125 ac_cv_c_itkconfig=`(cd $i; pwd)`
10126 break
10127 fi
10128 done
10129 fi
10130 # check in a few common install locations
10131 if test x"${ac_cv_c_itkconfig}" = x ; then
10132 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10133 if test -f "$i/itkConfig.sh" ; then
10134 ac_cv_c_itkconfig=`(cd $i; pwd)`
10135 break
10136 fi
10137 done
10138 fi
10139 # check in a few other private locations
10140 if test x"${ac_cv_c_itkconfig}" = x ; then
10141 for i in \
10142 ${srcdir}/../itcl/itk \
10143 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10144 if test -f "$i/itkConfig.sh" ; then
10145 ac_cv_c_itkconfig=`(cd $i; pwd)`
10146 break
10147 fi
10148 done
10149 fi
10150
10151fi
10152
10153 if test x"${ac_cv_c_itkconfig}" = x ; then
10154 ITKCONFIG="# no Itk configs found"
10155 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10156 else
10157 no_itk=
10158 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10159 echo "$ac_t""found $ITKCONFIG" 1>&6
10160 fi
10161fi
10162
10163
10164 if test -z "${no_itcl}"; then
10165
10166 if test -f "$ITKCONFIG" ; then
10167 . $ITKCONFIG
10168 fi
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
3fc11d3e 10181 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 10182 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
10183 fi
10184
4226a5a5 10185 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
10186 # Tcl/Tk 8.1 require -fwritable strings. I don't
10187 # know whether 8.2 will or not, but I bet it will.
10188 # I don't have to worry about 7.x since we don't support it.
10189 GDBTK_CFLAGS=""
10190 if test "$GCC" = "yes"; then
10191 if test "$TCL_VERSION" != "8.0" ; then
10192 GDBTK_CFLAGS="-fwritable-strings"
10193 fi
10194 fi
10195
10196 # Include some libraries that Tcl and Tk want.
b2a1bd4f 10197 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
10198 # Yes, the ordering seems wrong here. But it isn't.
10199 # TK_LIBS is the list of libraries that need to be linked
10200 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10201 # were in LIBS then any link tests after this point would
10202 # try to include things like `$(LIBGUI)', which wouldn't work.
10203 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
10204
10205 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10206 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10207 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
33f8ca73
AC
10208 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10209 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10210 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10211 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
3fc11d3e
JM
10212
10213 if test x$gdb_cv_os_cygwin = xyes; then
10214 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10215 WIN32LDAPP="-Wl,--subsystem,console"
10216 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10217 fi
10218 fi
10219 fi
ffc6a242 10220
ffc6a242 10221 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
10222fi
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
dd2504ab 10236
c906108c
SS
10237# If we find X, set shell vars x_includes and x_libraries to the
10238# paths, otherwise set no_x=yes.
10239# Uses ac_ vars as temps to allow command line to override cache and checks.
10240# --without-x overrides everything else, but does not touch the cache.
10241echo $ac_n "checking for X""... $ac_c" 1>&6
7613d933 10242echo "configure:10243: checking for X" >&5
c906108c
SS
10243
10244# Check whether --with-x or --without-x was given.
10245if test "${with_x+set}" = set; then
10246 withval="$with_x"
10247 :
10248fi
10249
10250# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10251if test "x$with_x" = xno; then
10252 # The user explicitly disabled X.
10253 have_x=disabled
10254else
10255 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10256 # Both variables are already set.
10257 have_x=yes
10258 else
10259if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10260 echo $ac_n "(cached) $ac_c" 1>&6
10261else
10262 # One or both of the vars are not set, and there is no cached value.
10263ac_x_includes=NO ac_x_libraries=NO
10264rm -fr conftestdir
10265if mkdir conftestdir; then
10266 cd conftestdir
10267 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10268 cat > Imakefile <<'EOF'
10269acfindx:
10270 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10271EOF
10272 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10273 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10274 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10275 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10276 for ac_extension in a so sl; do
10277 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10278 test -f $ac_im_libdir/libX11.$ac_extension; then
10279 ac_im_usrlibdir=$ac_im_libdir; break
10280 fi
10281 done
10282 # Screen out bogus values from the imake configuration. They are
10283 # bogus both because they are the default anyway, and because
10284 # using them would break gcc on systems where it needs fixed includes.
10285 case "$ac_im_incroot" in
10286 /usr/include) ;;
10287 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10288 esac
10289 case "$ac_im_usrlibdir" in
10290 /usr/lib | /lib) ;;
10291 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10292 esac
10293 fi
10294 cd ..
10295 rm -fr conftestdir
10296fi
10297
10298if test "$ac_x_includes" = NO; then
10299 # Guess where to find include files, by looking for this one X11 .h file.
10300 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10301
10302 # First, try using that file with no special directory specified.
10303cat > conftest.$ac_ext <<EOF
7613d933 10304#line 10305 "configure"
c906108c
SS
10305#include "confdefs.h"
10306#include <$x_direct_test_include>
10307EOF
10308ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7613d933 10309{ (eval echo configure:10310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
10310ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10311if test -z "$ac_err"; then
10312 rm -rf conftest*
10313 # We can compile using X headers with no special include directory.
10314ac_x_includes=
10315else
10316 echo "$ac_err" >&5
10317 echo "configure: failed program was:" >&5
10318 cat conftest.$ac_ext >&5
10319 rm -rf conftest*
10320 # Look for the header file in a standard set of common directories.
10321# Check X11 before X11Rn because it is often a symlink to the current release.
10322 for ac_dir in \
10323 /usr/X11/include \
10324 /usr/X11R6/include \
10325 /usr/X11R5/include \
10326 /usr/X11R4/include \
10327 \
10328 /usr/include/X11 \
10329 /usr/include/X11R6 \
10330 /usr/include/X11R5 \
10331 /usr/include/X11R4 \
10332 \
10333 /usr/local/X11/include \
10334 /usr/local/X11R6/include \
10335 /usr/local/X11R5/include \
10336 /usr/local/X11R4/include \
10337 \
10338 /usr/local/include/X11 \
10339 /usr/local/include/X11R6 \
10340 /usr/local/include/X11R5 \
10341 /usr/local/include/X11R4 \
10342 \
10343 /usr/X386/include \
10344 /usr/x386/include \
10345 /usr/XFree86/include/X11 \
10346 \
10347 /usr/include \
10348 /usr/local/include \
10349 /usr/unsupported/include \
10350 /usr/athena/include \
10351 /usr/local/x11r5/include \
10352 /usr/lpp/Xamples/include \
10353 \
10354 /usr/openwin/include \
10355 /usr/openwin/share/include \
10356 ; \
10357 do
10358 if test -r "$ac_dir/$x_direct_test_include"; then
10359 ac_x_includes=$ac_dir
10360 break
10361 fi
10362 done
10363fi
10364rm -f conftest*
10365fi # $ac_x_includes = NO
10366
10367if test "$ac_x_libraries" = NO; then
10368 # Check for the libraries.
10369
10370 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10371 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10372
10373 # See if we find them without any special options.
10374 # Don't add to $LIBS permanently.
10375 ac_save_LIBS="$LIBS"
10376 LIBS="-l$x_direct_test_library $LIBS"
10377cat > conftest.$ac_ext <<EOF
7613d933 10378#line 10379 "configure"
c906108c
SS
10379#include "confdefs.h"
10380
10381int main() {
10382${x_direct_test_function}()
10383; return 0; }
10384EOF
7613d933 10385if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
10386 rm -rf conftest*
10387 LIBS="$ac_save_LIBS"
10388# We can link X programs with no special library path.
10389ac_x_libraries=
10390else
10391 echo "configure: failed program was:" >&5
10392 cat conftest.$ac_ext >&5
10393 rm -rf conftest*
10394 LIBS="$ac_save_LIBS"
10395# First see if replacing the include by lib works.
10396# Check X11 before X11Rn because it is often a symlink to the current release.
10397for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10398 /usr/X11/lib \
10399 /usr/X11R6/lib \
10400 /usr/X11R5/lib \
10401 /usr/X11R4/lib \
10402 \
10403 /usr/lib/X11 \
10404 /usr/lib/X11R6 \
10405 /usr/lib/X11R5 \
10406 /usr/lib/X11R4 \
10407 \
10408 /usr/local/X11/lib \
10409 /usr/local/X11R6/lib \
10410 /usr/local/X11R5/lib \
10411 /usr/local/X11R4/lib \
10412 \
10413 /usr/local/lib/X11 \
10414 /usr/local/lib/X11R6 \
10415 /usr/local/lib/X11R5 \
10416 /usr/local/lib/X11R4 \
10417 \
10418 /usr/X386/lib \
10419 /usr/x386/lib \
10420 /usr/XFree86/lib/X11 \
10421 \
10422 /usr/lib \
10423 /usr/local/lib \
10424 /usr/unsupported/lib \
10425 /usr/athena/lib \
10426 /usr/local/x11r5/lib \
10427 /usr/lpp/Xamples/lib \
10428 /lib/usr/lib/X11 \
10429 \
10430 /usr/openwin/lib \
10431 /usr/openwin/share/lib \
10432 ; \
10433do
10434 for ac_extension in a so sl; do
10435 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10436 ac_x_libraries=$ac_dir
10437 break 2
10438 fi
10439 done
10440done
10441fi
10442rm -f conftest*
10443fi # $ac_x_libraries = NO
10444
10445if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10446 # Didn't find X anywhere. Cache the known absence of X.
10447 ac_cv_have_x="have_x=no"
10448else
10449 # Record where we found X for the cache.
10450 ac_cv_have_x="have_x=yes \
10451 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10452fi
10453fi
10454 fi
10455 eval "$ac_cv_have_x"
10456fi # $with_x != no
10457
10458if test "$have_x" != yes; then
10459 echo "$ac_t""$have_x" 1>&6
10460 no_x=yes
10461else
10462 # If each of the values was on the command line, it overrides each guess.
10463 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10464 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10465 # Update the cache value to reflect the command line values.
10466 ac_cv_have_x="have_x=yes \
10467 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10468 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10469fi
10470
10471
7a292a7a
SS
10472
10473# Unlike the sim directory, whether a simulator is linked is controlled by
10474# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10475# This code just checks for a few cases where we'd like to ignore those
10476# definitions, even when they're present in the '.mt' file. These cases
10477# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 10478# not part of the source tree.
7a292a7a
SS
10479#
10480# Check whether --enable-sim or --disable-sim was given.
10481if test "${enable_sim+set}" = set; then
10482 enableval="$enable_sim"
10483 echo "enable_sim = $enable_sim";
10484 echo "enableval = ${enableval}";
10485 case "${enableval}" in
10486 yes) ignore_sim=false ;;
10487 no) ignore_sim=true ;;
10488 *) ignore_sim=false ;;
10489 esac
10490else
10491 ignore_sim=false
10492fi
10493
10494
10495if test ! -d "${srcdir}/../sim"; then
10496 ignore_sim=true
10497fi
10498
10499if test "${ignore_sim}" = "true"; then
10500 IGNORE_SIM="SIM="
10501 IGNORE_SIM_OBS="SIM_OBS="
10502else
10503 IGNORE_SIM=""
10504 IGNORE_SIM_OBS=""
10505 cat >> confdefs.h <<\EOF
10506#define WITH_SIM 1
10507EOF
10508
10509fi
10510
10511
10512
c906108c
SS
10513
10514
10515
10516
10517
10518
dfcd3bfb 10519
e56ac5c3
AC
10520
10521
b3a90332
AC
10522
10523
c906108c
SS
10524# target_subdir is used by the testsuite to find the target libraries.
10525target_subdir=
10526if test "${host}" != "${target}"; then
10527 target_subdir="${target_alias}/"
10528fi
10529
10530
10531frags=
10532host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10533if test ! -f ${host_makefile_frag}; then
7fd60527
AC
10534 # When building a native debuger the .mh file containing things
10535 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10536 # since it no longer contains anything useful.
10537 if test "${target}" = "${host}"; then
10538 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10539 else
10540 host_makefile_frag=/dev/null
10541 fi
c906108c
SS
10542fi
10543frags="$frags $host_makefile_frag"
10544
10545target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10546if test ! -f ${target_makefile_frag}; then
10547{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10548fi
10549frags="$frags $target_makefile_frag"
10550
10551
10552
10553
10554
10555hostfile=`sed -n '
10556s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10557' ${host_makefile_frag}`
10558
10559targetfile=`sed -n '
10560s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10561' ${target_makefile_frag}`
10562
c906108c 10563if test "${target}" = "${host}"; then
a85f51e7
DJ
10564# We pick this up from the host configuration file (.mh) because we
10565# do not have a native configuration Makefile fragment.
c906108c
SS
10566nativefile=`sed -n '
10567s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10568' ${host_makefile_frag}`
c906108c
SS
10569fi
10570
10571
b00a8037
DJ
10572if test x"${gdb_osabi}" != x ; then
10573 cat >> confdefs.h <<EOF
10574#define GDB_OSABI_DEFAULT $gdb_osabi
10575EOF
10576
10577fi
10578
8dcde887
MK
10579# Enable multi-ice-gdb-server.
10580# Check whether --enable-multi-ice or --disable-multi-ice was given.
10581if test "${enable_multi_ice+set}" = set; then
10582 enableval="$enable_multi_ice"
10583 case $enableval in
10584 yes | no)
10585 ;;
10586 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10587 esac
96baa820
JM
10588fi
10589
8dcde887
MK
10590if test "x$enable_multi_ice" = xyes; then
10591 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10592fi
10593
8dcde887
MK
10594# We only build gdbserver automatically if host and target are the same.
10595if test "x$target" = "x$host"; then
10596 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
7613d933 10597echo "configure:10598: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10598 if test "x$build_gdbserver" = xyes; then
10599 configdirs="$configdirs gdbserver"
10600 echo "$ac_t""yes" 1>&6
10601 else
10602 echo "$ac_t""no" 1>&6
10603 fi
10604fi
10605
10606subdirs="doc testsuite $configdirs"
10607
96baa820 10608
c906108c 10609# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10610# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10611# version.
c906108c
SS
10612
10613files=
10614links=
5a2402b8 10615
c906108c 10616rm -f xm.h
5a2402b8 10617xm_h=""
c906108c 10618if test "${hostfile}" != ""; then
5a2402b8
AC
10619 xm_h=xm.h
10620 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10621 files="${files} ${GDB_XM_FILE}"
10622 links="${links} xm.h"
10623 cat >> confdefs.h <<EOF
10624#define GDB_XM_FILE ${GDB_XM_FILE}
10625EOF
10626
c906108c 10627fi
5a2402b8
AC
10628
10629
c906108c 10630rm -f tm.h
5a2402b8 10631tm_h=""
c906108c 10632if test "${targetfile}" != ""; then
5a2402b8
AC
10633 tm_h=tm.h
10634 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10635 files="${files} ${GDB_TM_FILE}"
10636 links="${links} tm.h"
10637 cat >> confdefs.h <<EOF
10638#define GDB_TM_FILE ${GDB_TM_FILE}
10639EOF
10640
c906108c 10641fi
5a2402b8
AC
10642
10643
c906108c 10644rm -f nm.h
5a2402b8 10645nm_h=""
c906108c 10646if test "${nativefile}" != ""; then
5a2402b8
AC
10647 nm_h=nm.h
10648 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10649 files="${files} ${GDB_NM_FILE}"
10650 links="${links} nm.h"
10651 cat >> confdefs.h <<EOF
10652#define GDB_NM_FILE ${GDB_NM_FILE}
10653EOF
10654
c906108c 10655fi
5a2402b8
AC
10656
10657
c906108c
SS
10658
10659
10660echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7613d933 10661echo "configure:10662: checking for Cygwin environment" >&5
c906108c
SS
10662if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10663 echo $ac_n "(cached) $ac_c" 1>&6
10664else
10665 cat > conftest.$ac_ext <<EOF
7613d933 10666#line 10667 "configure"
c906108c
SS
10667#include "confdefs.h"
10668
10669int main() {
10670
10671#ifndef __CYGWIN__
10672#define __CYGWIN__ __CYGWIN32__
10673#endif
10674return __CYGWIN__;
10675; return 0; }
10676EOF
7613d933 10677if { (eval echo configure:10678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10678 rm -rf conftest*
10679 ac_cv_cygwin=yes
10680else
10681 echo "configure: failed program was:" >&5
10682 cat conftest.$ac_ext >&5
10683 rm -rf conftest*
10684 ac_cv_cygwin=no
10685fi
10686rm -f conftest*
10687rm -f conftest*
10688fi
10689
10690echo "$ac_t""$ac_cv_cygwin" 1>&6
10691CYGWIN=
10692test "$ac_cv_cygwin" = yes && CYGWIN=yes
10693echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7613d933 10694echo "configure:10695: checking for mingw32 environment" >&5
c906108c
SS
10695if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10696 echo $ac_n "(cached) $ac_c" 1>&6
10697else
10698 cat > conftest.$ac_ext <<EOF
7613d933 10699#line 10700 "configure"
c906108c
SS
10700#include "confdefs.h"
10701
10702int main() {
10703return __MINGW32__;
10704; return 0; }
10705EOF
7613d933 10706if { (eval echo configure:10707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10707 rm -rf conftest*
10708 ac_cv_mingw32=yes
10709else
10710 echo "configure: failed program was:" >&5
10711 cat conftest.$ac_ext >&5
10712 rm -rf conftest*
10713 ac_cv_mingw32=no
10714fi
10715rm -f conftest*
10716rm -f conftest*
10717fi
10718
10719echo "$ac_t""$ac_cv_mingw32" 1>&6
10720MINGW32=
10721test "$ac_cv_mingw32" = yes && MINGW32=yes
10722
10723
10724echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7613d933 10725echo "configure:10726: checking for executable suffix" >&5
c906108c
SS
10726if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10727 echo $ac_n "(cached) $ac_c" 1>&6
10728else
10729 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10730 ac_cv_exeext=.exe
10731else
10732 rm -f conftest*
10733 echo 'int main () { return 0; }' > conftest.$ac_ext
10734 ac_cv_exeext=
7613d933 10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10736 for file in conftest.*; do
10737 case $file in
d836ee13 10738 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10739 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10740 esac
10741 done
10742 else
10743 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10744 fi
10745 rm -f conftest*
10746 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10747fi
10748fi
10749
10750EXEEXT=""
10751test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10752echo "$ac_t""${ac_cv_exeext}" 1>&6
10753ac_exeext=$EXEEXT
10754
10755
234b45d4
KB
10756
10757cat >> confdefs.h <<\EOF
10758#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10759EOF
10760
10761
10762
10763
10764 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10765if test "${with_libiconv_prefix+set}" = set; then
10766 withval="$with_libiconv_prefix"
10767
10768 for dir in `echo "$withval" | tr : ' '`; do
10769 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10770 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10771 done
10772
10773fi
10774
10775
10776 echo $ac_n "checking for iconv""... $ac_c" 1>&6
7613d933 10777echo "configure:10778: checking for iconv" >&5
234b45d4
KB
10778if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10779 echo $ac_n "(cached) $ac_c" 1>&6
10780else
10781
10782 am_cv_func_iconv="no, consider installing GNU libiconv"
10783 am_cv_lib_iconv=no
10784 cat > conftest.$ac_ext <<EOF
7613d933 10785#line 10786 "configure"
234b45d4
KB
10786#include "confdefs.h"
10787#include <stdlib.h>
10788#include <iconv.h>
10789int main() {
10790iconv_t cd = iconv_open("","");
10791 iconv(cd,NULL,NULL,NULL,NULL);
10792 iconv_close(cd);
10793; return 0; }
10794EOF
7613d933 10795if { (eval echo configure:10796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10796 rm -rf conftest*
10797 am_cv_func_iconv=yes
10798else
10799 echo "configure: failed program was:" >&5
10800 cat conftest.$ac_ext >&5
10801fi
10802rm -f conftest*
10803 if test "$am_cv_func_iconv" != yes; then
10804 am_save_LIBS="$LIBS"
10805 LIBS="$LIBS -liconv"
10806 cat > conftest.$ac_ext <<EOF
7613d933 10807#line 10808 "configure"
234b45d4
KB
10808#include "confdefs.h"
10809#include <stdlib.h>
10810#include <iconv.h>
10811int main() {
10812iconv_t cd = iconv_open("","");
10813 iconv(cd,NULL,NULL,NULL,NULL);
10814 iconv_close(cd);
10815; return 0; }
10816EOF
7613d933 10817if { (eval echo configure:10818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10818 rm -rf conftest*
10819 am_cv_lib_iconv=yes
10820 am_cv_func_iconv=yes
10821else
10822 echo "configure: failed program was:" >&5
10823 cat conftest.$ac_ext >&5
10824fi
10825rm -f conftest*
10826 LIBS="$am_save_LIBS"
10827 fi
10828
10829fi
10830
10831echo "$ac_t""$am_cv_func_iconv" 1>&6
10832 if test "$am_cv_func_iconv" = yes; then
10833 cat >> confdefs.h <<\EOF
10834#define HAVE_ICONV 1
10835EOF
10836
10837 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
7613d933 10838echo "configure:10839: checking for iconv declaration" >&5
234b45d4
KB
10839 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10840 echo $ac_n "(cached) $ac_c" 1>&6
10841else
10842
10843 cat > conftest.$ac_ext <<EOF
7613d933 10844#line 10845 "configure"
234b45d4
KB
10845#include "confdefs.h"
10846
10847#include <stdlib.h>
10848#include <iconv.h>
10849extern
10850#ifdef __cplusplus
10851"C"
10852#endif
10853#if defined(__STDC__) || defined(__cplusplus)
10854size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10855#else
10856size_t iconv();
10857#endif
10858
10859int main() {
10860
10861; return 0; }
10862EOF
7613d933 10863if { (eval echo configure:10864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10864 rm -rf conftest*
10865 am_cv_proto_iconv_arg1=""
10866else
10867 echo "configure: failed program was:" >&5
10868 cat conftest.$ac_ext >&5
10869 rm -rf conftest*
10870 am_cv_proto_iconv_arg1="const"
10871fi
10872rm -f conftest*
10873 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);"
10874fi
10875
10876 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10877 echo "$ac_t""${ac_t:-
10878 }$am_cv_proto_iconv" 1>&6
10879 cat >> confdefs.h <<EOF
10880#define ICONV_CONST $am_cv_proto_iconv_arg1
10881EOF
10882
10883 fi
10884 LIBICONV=
10885 if test "$am_cv_lib_iconv" = yes; then
10886 LIBICONV="-liconv"
10887 fi
10888
10889
10890
c906108c
SS
10891trap '' 1 2 15
10892cat > confcache <<\EOF
10893# This file is a shell script that caches the results of configure
10894# tests run on this system so they can be shared between configure
10895# scripts and configure runs. It is not useful on other systems.
10896# If it contains results you don't want to keep, you may remove or edit it.
10897#
10898# By default, configure uses ./config.cache as the cache file,
10899# creating it if it does not exist already. You can give configure
10900# the --cache-file=FILE option to use a different cache file; that is
10901# what configure does when it calls configure scripts in
10902# subdirectories, so they share the cache.
10903# Giving --cache-file=/dev/null disables caching, for debugging configure.
10904# config.status only pays attention to the cache file if you give it the
10905# --recheck option to rerun configure.
10906#
10907EOF
10908# The following way of writing the cache mishandles newlines in values,
10909# but we know of no workaround that is simple, portable, and efficient.
10910# So, don't put newlines in cache variables' values.
10911# Ultrix sh set writes to stderr and can't be redirected directly,
10912# and sets the high bit in the cache file unless we assign to the vars.
10913(set) 2>&1 |
10914 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10915 *ac_space=\ *)
10916 # `set' does not quote correctly, so add quotes (double-quote substitution
10917 # turns \\\\ into \\, and sed turns \\ into \).
10918 sed -n \
10919 -e "s/'/'\\\\''/g" \
10920 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10921 ;;
10922 *)
10923 # `set' quotes correctly as required by POSIX, so do not add quotes.
10924 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10925 ;;
10926 esac >> confcache
10927if cmp -s $cache_file confcache; then
10928 :
10929else
10930 if test -w $cache_file; then
10931 echo "updating cache $cache_file"
10932 cat confcache > $cache_file
10933 else
10934 echo "not updating unwritable cache $cache_file"
10935 fi
10936fi
10937rm -f confcache
10938
10939trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10940
10941test "x$prefix" = xNONE && prefix=$ac_default_prefix
10942# Let make expand exec_prefix.
10943test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10944
10945# Any assignment to VPATH causes Sun make to only execute
10946# the first set of double-colon rules, so remove it if not needed.
10947# If there is a colon in the path, we need to keep it.
10948if test "x$srcdir" = x.; then
10949 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10950fi
10951
10952trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10953
10954DEFS=-DHAVE_CONFIG_H
10955
10956# Without the "./", some shells look in PATH for config.status.
10957: ${CONFIG_STATUS=./config.status}
10958
10959echo creating $CONFIG_STATUS
10960rm -f $CONFIG_STATUS
10961cat > $CONFIG_STATUS <<EOF
10962#! /bin/sh
10963# Generated automatically by configure.
10964# Run this file to recreate the current configuration.
10965# This directory was configured as follows,
10966# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10967#
10968# $0 $ac_configure_args
10969#
10970# Compiler output produced by configure, useful for debugging
10971# configure, is in ./config.log if it exists.
10972
10973ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10974for ac_option
10975do
10976 case "\$ac_option" in
10977 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10978 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10979 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10980 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10981 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10982 exit 0 ;;
10983 -help | --help | --hel | --he | --h)
10984 echo "\$ac_cs_usage"; exit 0 ;;
10985 *) echo "\$ac_cs_usage"; exit 1 ;;
10986 esac
10987done
10988
10989ac_given_srcdir=$srcdir
10990ac_given_INSTALL="$INSTALL"
10991
ed952ac5 10992trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10993EOF
10994cat >> $CONFIG_STATUS <<EOF
10995
10996# Protect against being on the right side of a sed subst in config.status.
10997sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10998 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10999$ac_vpsub
11000$extrasub
11001s%@SHELL@%$SHELL%g
11002s%@CFLAGS@%$CFLAGS%g
11003s%@CPPFLAGS@%$CPPFLAGS%g
11004s%@CXXFLAGS@%$CXXFLAGS%g
11005s%@FFLAGS@%$FFLAGS%g
11006s%@DEFS@%$DEFS%g
11007s%@LDFLAGS@%$LDFLAGS%g
11008s%@LIBS@%$LIBS%g
11009s%@exec_prefix@%$exec_prefix%g
11010s%@prefix@%$prefix%g
11011s%@program_transform_name@%$program_transform_name%g
11012s%@bindir@%$bindir%g
11013s%@sbindir@%$sbindir%g
11014s%@libexecdir@%$libexecdir%g
11015s%@datadir@%$datadir%g
11016s%@sysconfdir@%$sysconfdir%g
11017s%@sharedstatedir@%$sharedstatedir%g
11018s%@localstatedir@%$localstatedir%g
11019s%@libdir@%$libdir%g
11020s%@includedir@%$includedir%g
11021s%@oldincludedir@%$oldincludedir%g
11022s%@infodir@%$infodir%g
11023s%@mandir@%$mandir%g
413ccac7
AC
11024s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11025s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11026s%@MAINT@%$MAINT%g
c906108c
SS
11027s%@CC@%$CC%g
11028s%@CPP@%$CPP%g
11029s%@host@%$host%g
11030s%@host_alias@%$host_alias%g
11031s%@host_cpu@%$host_cpu%g
11032s%@host_vendor@%$host_vendor%g
11033s%@host_os@%$host_os%g
11034s%@target@%$target%g
11035s%@target_alias@%$target_alias%g
11036s%@target_cpu@%$target_cpu%g
11037s%@target_vendor@%$target_vendor%g
11038s%@target_os@%$target_os%g
11039s%@build@%$build%g
11040s%@build_alias@%$build_alias%g
11041s%@build_cpu@%$build_cpu%g
11042s%@build_vendor@%$build_vendor%g
11043s%@build_os@%$build_os%g
c906108c 11044s%@RANLIB@%$RANLIB%g
8bb2c122 11045s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
11046s%@ALLOCA@%$ALLOCA%g
11047s%@USE_NLS@%$USE_NLS%g
11048s%@MSGFMT@%$MSGFMT%g
11049s%@GMSGFMT@%$GMSGFMT%g
11050s%@XGETTEXT@%$XGETTEXT%g
11051s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11052s%@CATALOGS@%$CATALOGS%g
11053s%@CATOBJEXT@%$CATOBJEXT%g
11054s%@DATADIRNAME@%$DATADIRNAME%g
11055s%@GMOFILES@%$GMOFILES%g
11056s%@INSTOBJEXT@%$INSTOBJEXT%g
11057s%@INTLDEPS@%$INTLDEPS%g
11058s%@INTLLIBS@%$INTLLIBS%g
11059s%@INTLOBJS@%$INTLOBJS%g
11060s%@POFILES@%$POFILES%g
11061s%@POSUB@%$POSUB%g
11062s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11063s%@GT_NO@%$GT_NO%g
11064s%@GT_YES@%$GT_YES%g
11065s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11066s%@l@%$l%g
8dcde887 11067s%@subdirs@%$subdirs%g
7a292a7a 11068s%@AWK@%$AWK%g
c906108c
SS
11069s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11070s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11071s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
11072s%@LN_S@%$LN_S%g
11073s%@YACC@%$YACC%g
c906108c 11074s%@AR@%$AR%g
95ca63c4
CF
11075s%@DLLTOOL@%$DLLTOOL%g
11076s%@WINDRES@%$WINDRES%g
75c6e08a 11077s%@MIG@%$MIG%g
c906108c 11078s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
11079s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11080s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 11081s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 11082s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
aff38e61 11083s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 11084s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
11085s%@LIBGUI@%$LIBGUI%g
11086s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
11087s%@WIN32LDAPP@%$WIN32LDAPP%g
11088s%@TCL_VERSION@%$TCL_VERSION%g
11089s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11090s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11091s%@TCL_CC@%$TCL_CC%g
11092s%@TCL_DEFS@%$TCL_DEFS%g
11093s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11094s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11095s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11096s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11097s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11098s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11099s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
033afc63 11100s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
7a292a7a
SS
11101s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11102s%@TCL_RANLIB@%$TCL_RANLIB%g
11103s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11104s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11105s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11106s%@TK_VERSION@%$TK_VERSION%g
11107s%@TK_DEFS@%$TK_DEFS%g
11108s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11109s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11110s%@TK_XLIBSW@%$TK_XLIBSW%g
11111s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11112s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11113s%@TCLHDIR@%$TCLHDIR%g
11114s%@TKHDIR@%$TKHDIR%g
11115s%@ITCLHDIR@%$ITCLHDIR%g
11116s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
11117s%@ITCL_VERSION@%$ITCL_VERSION%g
11118s%@ITCL_DEFS@%$ITCL_DEFS%g
11119s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11120s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11121s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11122s%@ITK_VERSION@%$ITK_VERSION%g
11123s%@ITK_DEFS@%$ITK_DEFS%g
11124s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11125s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11126s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
11127s%@X_CFLAGS@%$X_CFLAGS%g
11128s%@X_LDFLAGS@%$X_LDFLAGS%g
11129s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
11130s%@TCL_DEPS@%$TCL_DEPS%g
11131s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
11132s%@ITCLLIB@%$ITCLLIB%g
11133s%@ITCL_DEPS@%$ITCL_DEPS%g
11134s%@ITKLIB@%$ITKLIB%g
11135s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
11136s%@GDBTKLIBS@%$GDBTKLIBS%g
11137s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 11138s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
11139s%@IGNORE_SIM@%$IGNORE_SIM%g
11140s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 11141s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 11142s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c
SS
11143s%@CONFIG_OBS@%$CONFIG_OBS%g
11144s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11145s%@CONFIG_SRCS@%$CONFIG_SRCS%g
b3a90332
AC
11146s%@CONFIG_ALL@%$CONFIG_ALL%g
11147s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
11148s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11149s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
11150s%@target_subdir@%$target_subdir%g
11151/@host_makefile_frag@/r $host_makefile_frag
11152s%@host_makefile_frag@%%g
11153/@target_makefile_frag@/r $target_makefile_frag
11154s%@target_makefile_frag@%%g
11155s%@frags@%$frags%g
5a2402b8
AC
11156s%@xm_h@%$xm_h%g
11157s%@tm_h@%$tm_h%g
11158s%@nm_h@%$nm_h%g
c906108c 11159s%@EXEEXT@%$EXEEXT%g
234b45d4 11160s%@LIBICONV@%$LIBICONV%g
c906108c
SS
11161
11162CEOF
11163EOF
11164
11165cat >> $CONFIG_STATUS <<\EOF
11166
11167# Split the substitutions into bite-sized pieces for seds with
11168# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 11169ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
11170ac_file=1 # Number of current file.
11171ac_beg=1 # First line for current file.
11172ac_end=$ac_max_sed_cmds # Line after last line for current file.
11173ac_more_lines=:
11174ac_sed_cmds=""
11175while $ac_more_lines; do
11176 if test $ac_beg -gt 1; then
11177 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11178 else
11179 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11180 fi
11181 if test ! -s conftest.s$ac_file; then
11182 ac_more_lines=false
11183 rm -f conftest.s$ac_file
11184 else
11185 if test -z "$ac_sed_cmds"; then
11186 ac_sed_cmds="sed -f conftest.s$ac_file"
11187 else
11188 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11189 fi
11190 ac_file=`expr $ac_file + 1`
11191 ac_beg=$ac_end
11192 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11193 fi
11194done
11195if test -z "$ac_sed_cmds"; then
11196 ac_sed_cmds=cat
11197fi
11198EOF
11199
11200cat >> $CONFIG_STATUS <<EOF
11201
ed952ac5 11202CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
11203EOF
11204cat >> $CONFIG_STATUS <<\EOF
11205for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11206 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11207 case "$ac_file" in
11208 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11209 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11210 *) ac_file_in="${ac_file}.in" ;;
11211 esac
11212
11213 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11214
11215 # Remove last slash and all that follows it. Not all systems have dirname.
11216 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11217 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11218 # The file is in a subdirectory.
11219 test ! -d "$ac_dir" && mkdir "$ac_dir"
11220 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11221 # A "../" for each directory in $ac_dir_suffix.
11222 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11223 else
11224 ac_dir_suffix= ac_dots=
11225 fi
11226
11227 case "$ac_given_srcdir" in
11228 .) srcdir=.
11229 if test -z "$ac_dots"; then top_srcdir=.
11230 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11231 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11232 *) # Relative path.
11233 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11234 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11235 esac
11236
11237 case "$ac_given_INSTALL" in
11238 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11239 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11240 esac
11241
11242 echo creating "$ac_file"
11243 rm -f "$ac_file"
11244 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11245 case "$ac_file" in
11246 *Makefile*) ac_comsub="1i\\
11247# $configure_input" ;;
11248 *) ac_comsub= ;;
11249 esac
11250
11251 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11252 sed -e "$ac_comsub
11253s%@configure_input@%$configure_input%g
11254s%@srcdir@%$srcdir%g
11255s%@top_srcdir@%$top_srcdir%g
11256s%@INSTALL@%$INSTALL%g
11257" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11258fi; done
11259rm -f conftest.s*
11260
11261# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11262# NAME is the cpp macro being defined and VALUE is the value it is being given.
11263#
11264# ac_d sets the value in "#define NAME VALUE" lines.
11265ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11266ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11267ac_dC='\3'
11268ac_dD='%g'
11269# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11270ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11271ac_uB='\([ ]\)%\1#\2define\3'
11272ac_uC=' '
11273ac_uD='\4%g'
11274# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11275ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11276ac_eB='$%\1#\2define\3'
11277ac_eC=' '
11278ac_eD='%g'
11279
11280if test "${CONFIG_HEADERS+set}" != set; then
11281EOF
11282cat >> $CONFIG_STATUS <<EOF
11283 CONFIG_HEADERS="config.h:config.in"
11284EOF
11285cat >> $CONFIG_STATUS <<\EOF
11286fi
11287for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11288 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11289 case "$ac_file" in
11290 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11291 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11292 *) ac_file_in="${ac_file}.in" ;;
11293 esac
11294
11295 echo creating $ac_file
11296
11297 rm -f conftest.frag conftest.in conftest.out
11298 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11299 cat $ac_file_inputs > conftest.in
11300
11301EOF
11302
11303# Transform confdefs.h into a sed script conftest.vals that substitutes
11304# the proper values into config.h.in to produce config.h. And first:
11305# Protect against being on the right side of a sed subst in config.status.
11306# Protect against being in an unquoted here document in config.status.
11307rm -f conftest.vals
11308cat > conftest.hdr <<\EOF
11309s/[\\&%]/\\&/g
11310s%[\\$`]%\\&%g
11311s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11312s%ac_d%ac_u%gp
11313s%ac_u%ac_e%gp
11314EOF
11315sed -n -f conftest.hdr confdefs.h > conftest.vals
11316rm -f conftest.hdr
11317
11318# This sed command replaces #undef with comments. This is necessary, for
11319# example, in the case of _POSIX_SOURCE, which is predefined and required
11320# on some systems where configure will not decide to define it.
11321cat >> conftest.vals <<\EOF
11322s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11323EOF
11324
11325# Break up conftest.vals because some shells have a limit on
11326# the size of here documents, and old seds have small limits too.
11327
11328rm -f conftest.tail
11329while :
11330do
11331 ac_lines=`grep -c . conftest.vals`
11332 # grep -c gives empty output for an empty file on some AIX systems.
11333 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11334 # Write a limited-size here document to conftest.frag.
11335 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11336 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11337 echo 'CEOF
11338 sed -f conftest.frag conftest.in > conftest.out
11339 rm -f conftest.in
11340 mv conftest.out conftest.in
11341' >> $CONFIG_STATUS
11342 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11343 rm -f conftest.vals
11344 mv conftest.tail conftest.vals
11345done
11346rm -f conftest.vals
11347
11348cat >> $CONFIG_STATUS <<\EOF
11349 rm -f conftest.frag conftest.h
11350 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11351 cat conftest.in >> conftest.h
11352 rm -f conftest.in
11353 if cmp -s $ac_file conftest.h 2>/dev/null; then
11354 echo "$ac_file is unchanged"
11355 rm -f conftest.h
11356 else
11357 # Remove last slash and all that follows it. Not all systems have dirname.
11358 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11359 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11360 # The file is in a subdirectory.
11361 test ! -d "$ac_dir" && mkdir "$ac_dir"
11362 fi
11363 rm -f $ac_file
11364 mv conftest.h $ac_file
11365 fi
11366fi; done
11367
11368EOF
11369
11370cat >> $CONFIG_STATUS <<EOF
11371ac_sources="$files"
11372ac_dests="$links"
11373EOF
11374
11375cat >> $CONFIG_STATUS <<\EOF
11376srcdir=$ac_given_srcdir
11377while test -n "$ac_sources"; do
11378 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11379 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11380
11381 echo "linking $srcdir/$ac_source to $ac_dest"
11382
11383 if test ! -r $srcdir/$ac_source; then
11384 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11385 fi
11386 rm -f $ac_dest
11387
11388 # Make relative symlinks.
11389 # Remove last slash and all that follows it. Not all systems have dirname.
11390 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11391 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11392 # The dest file is in a subdirectory.
11393 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11394 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11395 # A "../" for each directory in $ac_dest_dir_suffix.
11396 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11397 else
11398 ac_dest_dir_suffix= ac_dots=
11399 fi
11400
11401 case "$srcdir" in
11402 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11403 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11404 esac
11405
11406 # Make a symlink if possible; otherwise try a hard link.
11407 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11408 ln $srcdir/$ac_source $ac_dest; then :
11409 else
11410 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11411 fi
11412done
11413EOF
11414cat >> $CONFIG_STATUS <<EOF
11415
11416gdb_host_cpu=$gdb_host_cpu
11417gdb_target_cpu=$gdb_target_cpu
11418nativefile=$nativefile
11419
11420EOF
11421cat >> $CONFIG_STATUS <<\EOF
11422
7ee6d7eb 11423if test "${nativefile}" = ""; then
c4620205 11424 < Makefile \
e27da16d
JT
11425 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11426 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
11427 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11428 > Makefile.tem
c906108c
SS
11429mv -f Makefile.tem Makefile
11430fi
11431
11432sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11433/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11434/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11435mv -f Makefile.tmp Makefile
11436
2acceee2 11437
c906108c
SS
11438case x$CONFIG_HEADERS in
11439xconfig.h:config.in)
11440echo > stamp-h ;;
11441esac
11442
11443exit 0
11444EOF
11445chmod +x $CONFIG_STATUS
11446rm -fr confdefs* $ac_clean_files
11447test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11448
11449if test "$no_recursion" != yes; then
11450
11451 # Remove --cache-file and --srcdir arguments so they do not pile up.
11452 ac_sub_configure_args=
11453 ac_prev=
11454 for ac_arg in $ac_configure_args; do
11455 if test -n "$ac_prev"; then
11456 ac_prev=
11457 continue
11458 fi
11459 case "$ac_arg" in
11460 -cache-file | --cache-file | --cache-fil | --cache-fi \
11461 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11462 ac_prev=cache_file ;;
11463 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11464 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11465 ;;
11466 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11467 ac_prev=srcdir ;;
11468 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11469 ;;
11470 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11471 esac
11472 done
11473
8dcde887 11474 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
11475
11476 # Do not complain, so a configure script can configure whichever
11477 # parts of a large source tree are present.
11478 if test ! -d $srcdir/$ac_config_dir; then
11479 continue
11480 fi
11481
11482 echo configuring in $ac_config_dir
11483
11484 case "$srcdir" in
11485 .) ;;
11486 *)
11487 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11488 else
11489 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11490 fi
11491 ;;
11492 esac
11493
11494 ac_popdir=`pwd`
11495 cd $ac_config_dir
11496
11497 # A "../" for each directory in /$ac_config_dir.
11498 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11499
11500 case "$srcdir" in
11501 .) # No --srcdir option. We are building in place.
11502 ac_sub_srcdir=$srcdir ;;
11503 /*) # Absolute path.
11504 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11505 *) # Relative path.
11506 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11507 esac
11508
11509 # Check for guested configure; otherwise get Cygnus style configure.
11510 if test -f $ac_sub_srcdir/configure; then
11511 ac_sub_configure=$ac_sub_srcdir/configure
11512 elif test -f $ac_sub_srcdir/configure.in; then
11513 ac_sub_configure=$ac_configure
11514 else
11515 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11516 ac_sub_configure=
11517 fi
11518
11519 # The recursion is here.
11520 if test -n "$ac_sub_configure"; then
11521
11522 # Make the cache file name correct relative to the subdirectory.
11523 case "$cache_file" in
11524 /*) ac_sub_cache_file=$cache_file ;;
11525 *) # Relative path.
11526 ac_sub_cache_file="$ac_dots$cache_file" ;;
11527 esac
11528 case "$ac_given_INSTALL" in
11529 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11530 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11531 esac
11532
11533 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11534 # The eval makes quoting arguments work.
11535 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11536 then :
11537 else
11538 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11539 fi
11540 fi
11541
11542 cd $ac_popdir
11543 done
11544fi
11545
11546
11547exit 0
This page took 0.983492 seconds and 4 git commands to generate.