* compile.c (sim_resume): Fix the handling of bxor.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
5b5d99cf
JB
21ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
627af7ea
MK
23ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
06825bd1
MK
27ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
8ee53726 29ac_help="$ac_help
d28f9cdf
DJ
30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
31ac_help="$ac_help
32 --enable-profiling enable profiling of GDB"
06825bd1
MK
33ac_help="$ac_help
34 --without-included-regex don't use included regex; this is the default
35 on systems with version 2 of the GNU C library
36 (use with caution on other system)"
030292b7
DJ
37ac_help="$ac_help
38 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
39ac_help="$ac_help
40 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
41ac_help="$ac_help
42 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
43ac_help="$ac_help
44 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
57ac_help="$ac_help
58 --with-x use the X Window System"
7a292a7a
SS
59ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
8dcde887
MK
61ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
63ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
c41b7eb1 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
c41b7eb1 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
c41b7eb1
JB
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
c41b7eb1
JB
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
5b5d99cf 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
5b5d99cf 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
5b5d99cf 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
5b5d99cf 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
5b5d99cf 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
5b5d99cf 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
5b5d99cf 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
5b5d99cf 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
14abd0fb
MK
833cat >> confdefs.h <<\EOF
834#define _GNU_SOURCE 1
835EOF
836
837
c906108c 838echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
5b5d99cf 839echo "configure:840: checking how to run the C preprocessor" >&5
c906108c
SS
840# On Suns, sometimes $CPP names a directory.
841if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843fi
844if test -z "$CPP"; then
845if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
5b5d99cf 854#line 855 "configure"
c906108c
SS
855#include "confdefs.h"
856#include <assert.h>
857Syntax Error
858EOF
859ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 860{ (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
861ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862if test -z "$ac_err"; then
863 :
864else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
5b5d99cf 871#line 872 "configure"
c906108c
SS
872#include "confdefs.h"
873#include <assert.h>
874Syntax Error
875EOF
876ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 877{ (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
878ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879if test -z "$ac_err"; then
880 :
881else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
5b5d99cf 888#line 889 "configure"
c906108c
SS
889#include "confdefs.h"
890#include <assert.h>
891Syntax Error
892EOF
893ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 894{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
895ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896if test -z "$ac_err"; then
897 :
898else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908fi
909rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911fi
912 CPP="$ac_cv_prog_CPP"
913else
914 ac_cv_prog_CPP="$CPP"
915fi
916echo "$ac_t""$CPP" 1>&6
917
918echo $ac_n "checking for AIX""... $ac_c" 1>&6
5b5d99cf 919echo "configure:920: checking for AIX" >&5
c906108c 920cat > conftest.$ac_ext <<EOF
5b5d99cf 921#line 922 "configure"
c906108c
SS
922#include "confdefs.h"
923#ifdef _AIX
924 yes
925#endif
926
927EOF
928if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932#define _ALL_SOURCE 1
933EOF
934
935else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938fi
939rm -f conftest*
940
941
56157b4a 942echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
5b5d99cf 943echo "configure:944: checking for POSIXized ISC" >&5
56157b4a
AC
944if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950#define _POSIX_SOURCE 1
c906108c
SS
951EOF
952
56157b4a
AC
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
c906108c
SS
958else
959 echo "$ac_t""no" 1>&6
56157b4a 960 ISC=
c906108c
SS
961fi
962
963
964
965
966echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
5b5d99cf 967echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
968if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970else
971 am_cv_prog_cc_stdc=no
972ac_save_CC="$CC"
973# Don't try gcc -ansi; that turns off useful extensions and
974# breaks some systems' header files.
975# AIX -qlanglvl=ansi
976# Ultrix and OSF/1 -std1
56157b4a
AC
977# HP-UX 10.20 and later -Ae
978# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 979# SVR4 -Xc -D__EXTENSIONS__
56157b4a 980for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
981do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
5b5d99cf 984#line 985 "configure"
c906108c
SS
985#include "confdefs.h"
986#include <stdarg.h>
987#include <stdio.h>
988#include <sys/types.h>
989#include <sys/stat.h>
990/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991struct buf { int x; };
992FILE * (*rcsopen) (struct buf *, struct stat *, int);
993static char *e (p, i)
994 char **p;
995 int i;
996{
997 return p[i];
998}
999static char *f (char * (*g) (char **, int), char **p, ...)
1000{
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007}
1008int test (int i, double x);
1009struct s1 {int (*f) (int a);};
1010struct s2 {int (*f) (double a);};
1011int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012int argc;
1013char **argv;
1014
1015int main() {
1016
1017return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019; return 0; }
1020EOF
5b5d99cf 1021if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027fi
1028rm -f conftest*
1029done
1030CC="$ac_save_CC"
1031
1032fi
1033
1034if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038fi
1039case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042esac
1043
1044
1045ac_aux_dir=
1046for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056done
1057if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059fi
1060ac_config_guess=$ac_aux_dir/config.guess
1061ac_config_sub=$ac_aux_dir/config.sub
1062ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065# Do some error checking and defaulting for the host and target type.
1066# The inputs are:
1067# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068#
1069# The rules are:
1070# 1. You are not allowed to specify --host, --target, and nonopt at the
1071# same time.
1072# 2. Host defaults to nonopt.
1073# 3. If nonopt is not specified, then host defaults to the current host,
1074# as determined by config.guess.
1075# 4. Target and build default to nonopt.
1076# 5. If nonopt is not specified, then target and build default to host.
1077
1078# The aliases save the names the user supplied, while $host etc.
1079# will get canonicalized.
1080case $host---$target---$nonopt in
1081NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083esac
1084
1085
1086# Make sure we can run config.sub.
1087if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089fi
1090
1091echo $ac_n "checking host system type""... $ac_c" 1>&6
5b5d99cf 1092echo "configure:1093: checking host system type" >&5
c906108c
SS
1093
1094host_alias=$host
1095case "$host_alias" in
1096NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104esac
1105
1106host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110echo "$ac_t""$host" 1>&6
1111
1112echo $ac_n "checking target system type""... $ac_c" 1>&6
5b5d99cf 1113echo "configure:1114: checking target system type" >&5
c906108c
SS
1114
1115target_alias=$target
1116case "$target_alias" in
1117NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122esac
1123
1124target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128echo "$ac_t""$target" 1>&6
1129
1130echo $ac_n "checking build system type""... $ac_c" 1>&6
5b5d99cf 1131echo "configure:1132: checking build system type" >&5
c906108c
SS
1132
1133build_alias=$build
1134case "$build_alias" in
1135NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140esac
1141
1142build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146echo "$ac_t""$build" 1>&6
1147
1148test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
8bb2c122
MK
1154# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155# doesn't support cross-compilation, but the one from Autoconf 2.5x
1156# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1158# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1159# 2.5x.
1160if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162else
1163 ac_tool_prefix=
1164fi
1165
1166# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1169echo "configure:1170: checking for $ac_word" >&5
8bb2c122
MK
1170if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186fi
1187fi
1188RANLIB="$ac_cv_prog_RANLIB"
1189if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191else
1192 echo "$ac_t""no" 1>&6
1193fi
1194
1195
1196if test -z "$ac_cv_prog_RANLIB"; then
1197if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199set dummy ranlib; ac_word=$2
1200echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1201echo "configure:1202: checking for $ac_word" >&5
8bb2c122
MK
1202if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219fi
1220fi
1221RANLIB="$ac_cv_prog_RANLIB"
1222if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227
1228else
1229 RANLIB=":"
1230fi
1231fi
1232
1233
c906108c
SS
1234ALL_LINGUAS=
1235echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
5b5d99cf 1236echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1237set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240else
1241 cat > conftestmake <<\EOF
1242all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244EOF
1245# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251fi
1252rm -f conftestmake
1253fi
1254if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260fi
1261
1262# Extract the first word of "ranlib", so it can be a program name with args.
1263set dummy ranlib; ac_word=$2
1264echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 1265echo "configure:1266: checking for $ac_word" >&5
c906108c
SS
1266if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283fi
1284fi
1285RANLIB="$ac_cv_prog_RANLIB"
1286if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288else
1289 echo "$ac_t""no" 1>&6
1290fi
1291
1292echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5b5d99cf 1293echo "configure:1294: checking for ANSI C header files" >&5
c906108c
SS
1294if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296else
1297 cat > conftest.$ac_ext <<EOF
5b5d99cf 1298#line 1299 "configure"
c906108c
SS
1299#include "confdefs.h"
1300#include <stdlib.h>
1301#include <stdarg.h>
1302#include <string.h>
1303#include <float.h>
1304EOF
1305ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 1306{ (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1307ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317fi
1318rm -f conftest*
1319
1320if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322cat > conftest.$ac_ext <<EOF
5b5d99cf 1323#line 1324 "configure"
c906108c
SS
1324#include "confdefs.h"
1325#include <string.h>
1326EOF
1327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333fi
1334rm -f conftest*
1335
1336fi
1337
1338if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340cat > conftest.$ac_ext <<EOF
5b5d99cf 1341#line 1342 "configure"
c906108c
SS
1342#include "confdefs.h"
1343#include <stdlib.h>
1344EOF
1345if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351fi
1352rm -f conftest*
1353
1354fi
1355
1356if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358if test "$cross_compiling" = yes; then
1359 :
1360else
1361 cat > conftest.$ac_ext <<EOF
5b5d99cf 1362#line 1363 "configure"
c906108c
SS
1363#include "confdefs.h"
1364#include <ctype.h>
1365#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368int main () { int i; for (i = 0; i < 256; i++)
1369if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370exit (0); }
1371
1372EOF
5b5d99cf 1373if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1374then
1375 :
1376else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381fi
1382rm -fr conftest*
1383fi
1384
1385fi
1386fi
1387
1388echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391#define STDC_HEADERS 1
1392EOF
1393
1394fi
1395
1396echo $ac_n "checking for working const""... $ac_c" 1>&6
5b5d99cf 1397echo "configure:1398: checking for working const" >&5
c906108c
SS
1398if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400else
1401 cat > conftest.$ac_ext <<EOF
5b5d99cf 1402#line 1403 "configure"
c906108c
SS
1403#include "confdefs.h"
1404
1405int main() {
1406
1407/* Ultrix mips cc rejects this. */
1408typedef int charset[2]; const charset x;
1409/* SunOS 4.1.1 cc rejects this. */
1410char const *const *ccp;
1411char **p;
1412/* NEC SVR4.0.2 mips cc rejects this. */
1413struct point {int x, y;};
1414static struct point const zero = {0,0};
1415/* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418const char *g = "string";
1419ccp = &g + (g ? g-g : 0);
1420/* HPUX 7.0 cc rejects these. */
1421++ccp;
1422p = (char**) ccp;
1423ccp = (char const *const *) p;
1424{ /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429}
1430{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434}
1435{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439}
1440{ /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444}
1445{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447}
1448
1449; return 0; }
1450EOF
5b5d99cf 1451if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459fi
1460rm -f conftest*
1461fi
1462
1463echo "$ac_t""$ac_cv_c_const" 1>&6
1464if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466#define const
1467EOF
1468
1469fi
1470
1471echo $ac_n "checking for inline""... $ac_c" 1>&6
5b5d99cf 1472echo "configure:1473: checking for inline" >&5
c906108c
SS
1473if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475else
1476 ac_cv_c_inline=no
1477for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
5b5d99cf 1479#line 1480 "configure"
c906108c
SS
1480#include "confdefs.h"
1481
1482int main() {
1483} $ac_kw foo() {
1484; return 0; }
1485EOF
5b5d99cf 1486if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492fi
1493rm -f conftest*
1494done
1495
1496fi
1497
1498echo "$ac_t""$ac_cv_c_inline" 1>&6
1499case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502#define inline
1503EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506#define inline $ac_cv_c_inline
1507EOF
1508 ;;
1509esac
1510
1511echo $ac_n "checking for off_t""... $ac_c" 1>&6
5b5d99cf 1512echo "configure:1513: checking for off_t" >&5
c906108c
SS
1513if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515else
1516 cat > conftest.$ac_ext <<EOF
5b5d99cf 1517#line 1518 "configure"
c906108c
SS
1518#include "confdefs.h"
1519#include <sys/types.h>
1520#if STDC_HEADERS
1521#include <stdlib.h>
1522#include <stddef.h>
1523#endif
1524EOF
1525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532fi
1533rm -f conftest*
1534
1535fi
1536echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539#define off_t long
1540EOF
1541
1542fi
1543
1544echo $ac_n "checking for size_t""... $ac_c" 1>&6
5b5d99cf 1545echo "configure:1546: checking for size_t" >&5
c906108c
SS
1546if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548else
1549 cat > conftest.$ac_ext <<EOF
5b5d99cf 1550#line 1551 "configure"
c906108c
SS
1551#include "confdefs.h"
1552#include <sys/types.h>
1553#if STDC_HEADERS
1554#include <stdlib.h>
1555#include <stddef.h>
1556#endif
1557EOF
1558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565fi
1566rm -f conftest*
1567
1568fi
1569echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572#define size_t unsigned
1573EOF
1574
1575fi
1576
1577# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578# for constant arguments. Useless!
1579echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5b5d99cf 1580echo "configure:1581: checking for working alloca.h" >&5
c906108c
SS
1581if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583else
1584 cat > conftest.$ac_ext <<EOF
5b5d99cf 1585#line 1586 "configure"
c906108c
SS
1586#include "confdefs.h"
1587#include <alloca.h>
1588int main() {
1589char *p = alloca(2 * sizeof(int));
1590; return 0; }
1591EOF
5b5d99cf 1592if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600fi
1601rm -f conftest*
1602fi
1603
1604echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607#define HAVE_ALLOCA_H 1
1608EOF
1609
1610fi
1611
1612echo $ac_n "checking for alloca""... $ac_c" 1>&6
5b5d99cf 1613echo "configure:1614: checking for alloca" >&5
c906108c
SS
1614if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616else
1617 cat > conftest.$ac_ext <<EOF
5b5d99cf 1618#line 1619 "configure"
c906108c
SS
1619#include "confdefs.h"
1620
1621#ifdef __GNUC__
1622# define alloca __builtin_alloca
1623#else
1624# ifdef _MSC_VER
1625# include <malloc.h>
1626# define alloca _alloca
1627# else
1628# if HAVE_ALLOCA_H
1629# include <alloca.h>
1630# else
1631# ifdef _AIX
1632 #pragma alloca
1633# else
1634# ifndef alloca /* predefined by HP cc +Olibcalls */
1635char *alloca ();
1636# endif
1637# endif
1638# endif
1639# endif
1640#endif
1641
1642int main() {
1643char *p = (char *) alloca(1);
1644; return 0; }
1645EOF
5b5d99cf 1646if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654fi
1655rm -f conftest*
1656fi
1657
1658echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661#define HAVE_ALLOCA 1
1662EOF
1663
1664fi
1665
1666if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673#define C_ALLOCA 1
1674EOF
1675
1676
1677echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5b5d99cf 1678echo "configure:1679: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 cat > conftest.$ac_ext <<EOF
5b5d99cf 1683#line 1684 "configure"
c906108c
SS
1684#include "confdefs.h"
1685#if defined(CRAY) && ! defined(CRAY2)
1686webecray
1687#else
1688wenotbecray
1689#endif
1690
1691EOF
1692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699fi
1700rm -f conftest*
1701
1702fi
1703
1704echo "$ac_t""$ac_cv_os_cray" 1>&6
1705if test $ac_cv_os_cray = yes; then
1706for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 1708echo "configure:1709: checking for $ac_func" >&5
c906108c
SS
1709if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711else
1712 cat > conftest.$ac_ext <<EOF
5b5d99cf 1713#line 1714 "configure"
c906108c
SS
1714#include "confdefs.h"
1715/* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717#include <assert.h>
1718/* Override any gcc2 internal prototype to avoid an error. */
1719/* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721char $ac_func();
1722
1723int main() {
1724
1725/* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729choke me
1730#else
1731$ac_func();
1732#endif
1733
1734; return 0; }
1735EOF
5b5d99cf 1736if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744fi
1745rm -f conftest*
1746fi
1747
1748if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751#define CRAY_STACKSEG_END $ac_func
1752EOF
1753
1754 break
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759done
1760fi
1761
1762echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5b5d99cf 1763echo "configure:1764: checking stack direction for C alloca" >&5
c906108c
SS
1764if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769else
1770 cat > conftest.$ac_ext <<EOF
5b5d99cf 1771#line 1772 "configure"
c906108c
SS
1772#include "confdefs.h"
1773find_stack_direction ()
1774{
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784}
1785main ()
1786{
1787 exit (find_stack_direction() < 0);
1788}
1789EOF
5b5d99cf 1790if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1791then
1792 ac_cv_c_stack_direction=1
1793else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798fi
1799rm -fr conftest*
1800fi
1801
1802fi
1803
1804echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805cat >> confdefs.h <<EOF
1806#define STACK_DIRECTION $ac_cv_c_stack_direction
1807EOF
1808
1809fi
1810
c41b7eb1 1811for ac_hdr in unistd.h
c906108c
SS
1812do
1813ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5b5d99cf 1815echo "configure:1816: checking for $ac_hdr" >&5
c906108c
SS
1816if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818else
1819 cat > conftest.$ac_ext <<EOF
5b5d99cf 1820#line 1821 "configure"
c906108c
SS
1821#include "confdefs.h"
1822#include <$ac_hdr>
1823EOF
1824ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 1825{ (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1826ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836fi
1837rm -f conftest*
1838fi
1839if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843#define $ac_tr_hdr 1
1844EOF
1845
1846else
1847 echo "$ac_t""no" 1>&6
1848fi
1849done
1850
1851for ac_func in getpagesize
1852do
1853echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 1854echo "configure:1855: checking for $ac_func" >&5
c906108c
SS
1855if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857else
1858 cat > conftest.$ac_ext <<EOF
5b5d99cf 1859#line 1860 "configure"
c906108c
SS
1860#include "confdefs.h"
1861/* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863#include <assert.h>
1864/* Override any gcc2 internal prototype to avoid an error. */
1865/* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867char $ac_func();
1868
1869int main() {
1870
1871/* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875choke me
1876#else
1877$ac_func();
1878#endif
1879
1880; return 0; }
1881EOF
5b5d99cf 1882if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890fi
1891rm -f conftest*
1892fi
1893
1894if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898#define $ac_tr_func 1
1899EOF
1900
1901else
1902 echo "$ac_t""no" 1>&6
1903fi
1904done
1905
1906echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5b5d99cf 1907echo "configure:1908: checking for working mmap" >&5
c906108c
SS
1908if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913else
1914 cat > conftest.$ac_ext <<EOF
5b5d99cf 1915#line 1916 "configure"
c906108c
SS
1916#include "confdefs.h"
1917
1918/* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939#include <sys/types.h>
1940#include <fcntl.h>
1941#include <sys/mman.h>
1942
1943/* This mess was copied from the GNU getpagesize.h. */
1944#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1945# ifdef HAVE_UNISTD_H
1946# include <unistd.h>
1947# endif
c906108c
SS
1948
1949/* Assume that all systems that can run configure have sys/param.h. */
1950# ifndef HAVE_SYS_PARAM_H
1951# define HAVE_SYS_PARAM_H 1
1952# endif
1953
1954# ifdef _SC_PAGESIZE
1955# define getpagesize() sysconf(_SC_PAGESIZE)
1956# else /* no _SC_PAGESIZE */
1957# ifdef HAVE_SYS_PARAM_H
1958# include <sys/param.h>
1959# ifdef EXEC_PAGESIZE
1960# define getpagesize() EXEC_PAGESIZE
1961# else /* no EXEC_PAGESIZE */
1962# ifdef NBPG
1963# define getpagesize() NBPG * CLSIZE
1964# ifndef CLSIZE
1965# define CLSIZE 1
1966# endif /* no CLSIZE */
1967# else /* no NBPG */
1968# ifdef NBPC
1969# define getpagesize() NBPC
1970# else /* no NBPC */
1971# ifdef PAGESIZE
1972# define getpagesize() PAGESIZE
1973# endif /* PAGESIZE */
1974# endif /* no NBPC */
1975# endif /* no NBPG */
1976# endif /* no EXEC_PAGESIZE */
1977# else /* no HAVE_SYS_PARAM_H */
1978# define getpagesize() 8192 /* punt totally */
1979# endif /* no HAVE_SYS_PARAM_H */
1980# endif /* no _SC_PAGESIZE */
1981
1982#endif /* no HAVE_GETPAGESIZE */
1983
1984#ifdef __cplusplus
1985extern "C" { void *malloc(unsigned); }
1986#else
1987char *malloc();
1988#endif
1989
1990int
1991main()
1992{
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052}
2053
2054EOF
5b5d99cf 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2056then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063fi
2064rm -fr conftest*
2065fi
2066
2067fi
2068
2069echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072#define HAVE_MMAP 1
2073EOF
2074
2075fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079unistd.h values.h sys/param.h
2080do
2081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5b5d99cf 2083echo "configure:2084: checking for $ac_hdr" >&5
c906108c
SS
2084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
5b5d99cf 2088#line 2089 "configure"
c906108c
SS
2089#include "confdefs.h"
2090#include <$ac_hdr>
2091EOF
2092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2093{ (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104fi
2105rm -f conftest*
2106fi
2107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111#define $ac_tr_hdr 1
2112EOF
2113
2114else
2115 echo "$ac_t""no" 1>&6
2116fi
2117done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120__argz_count __argz_stringify __argz_next
2121do
2122echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2123echo "configure:2124: checking for $ac_func" >&5
c906108c
SS
2124if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126else
2127 cat > conftest.$ac_ext <<EOF
5b5d99cf 2128#line 2129 "configure"
c906108c
SS
2129#include "confdefs.h"
2130/* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132#include <assert.h>
2133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136char $ac_func();
2137
2138int main() {
2139
2140/* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144choke me
2145#else
2146$ac_func();
2147#endif
2148
2149; return 0; }
2150EOF
5b5d99cf 2151if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159fi
2160rm -f conftest*
2161fi
2162
2163if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167#define $ac_tr_func 1
2168EOF
2169
2170else
2171 echo "$ac_t""no" 1>&6
2172fi
2173done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178do
2179echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2180echo "configure:2181: checking for $ac_func" >&5
c906108c
SS
2181if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183else
2184 cat > conftest.$ac_ext <<EOF
5b5d99cf 2185#line 2186 "configure"
c906108c
SS
2186#include "confdefs.h"
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189#include <assert.h>
2190/* Override any gcc2 internal prototype to avoid an error. */
2191/* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193char $ac_func();
2194
2195int main() {
2196
2197/* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201choke me
2202#else
2203$ac_func();
2204#endif
2205
2206; return 0; }
2207EOF
5b5d99cf 2208if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216fi
2217rm -f conftest*
2218fi
2219
2220if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224#define $ac_tr_func 1
2225EOF
2226
2227else
2228 echo "$ac_t""no" 1>&6
2229fi
2230done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235#define HAVE_STPCPY 1
2236EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5b5d99cf 2242echo "configure:2243: checking for LC_MESSAGES" >&5
c906108c
SS
2243if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245else
2246 cat > conftest.$ac_ext <<EOF
5b5d99cf 2247#line 2248 "configure"
c906108c
SS
2248#include "confdefs.h"
2249#include <locale.h>
2250int main() {
2251return LC_MESSAGES
2252; return 0; }
2253EOF
5b5d99cf 2254if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262fi
2263rm -f conftest*
2264fi
2265
2266echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269#define HAVE_LC_MESSAGES 1
2270EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5b5d99cf 2275echo "configure:2276: checking whether NLS is requested" >&5
c906108c
SS
2276 # Check whether --enable-nls or --disable-nls was given.
2277if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280else
2281 USE_NLS=yes
2282fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291#define ENABLE_NLS 1
2292EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5b5d99cf 2295echo "configure:2296: checking whether included gettext is requested" >&5
c906108c
SS
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300else
2301 nls_cv_force_use_gnu_gettext=no
2302fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5b5d99cf 2314echo "configure:2315: checking for libintl.h" >&5
c906108c
SS
2315if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317else
2318 cat > conftest.$ac_ext <<EOF
5b5d99cf 2319#line 2320 "configure"
c906108c
SS
2320#include "confdefs.h"
2321#include <libintl.h>
2322EOF
2323ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2324{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2325ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335fi
2336rm -f conftest*
2337fi
2338if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5b5d99cf 2341echo "configure:2342: checking for gettext in libc" >&5
c906108c
SS
2342if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344else
2345 cat > conftest.$ac_ext <<EOF
5b5d99cf 2346#line 2347 "configure"
c906108c
SS
2347#include "confdefs.h"
2348#include <libintl.h>
2349int main() {
2350return (int) gettext ("")
2351; return 0; }
2352EOF
5b5d99cf 2353if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361fi
2362rm -f conftest*
2363fi
2364
2365echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5b5d99cf 2369echo "configure:2370: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2370ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373else
2374 ac_save_LIBS="$LIBS"
2375LIBS="-lintl $LIBS"
2376cat > conftest.$ac_ext <<EOF
5b5d99cf 2377#line 2378 "configure"
c906108c
SS
2378#include "confdefs.h"
2379/* Override any gcc2 internal prototype to avoid an error. */
2380/* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382char bindtextdomain();
2383
2384int main() {
2385bindtextdomain()
2386; return 0; }
2387EOF
5b5d99cf 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396fi
2397rm -f conftest*
2398LIBS="$ac_save_LIBS"
2399
2400fi
2401if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5b5d99cf 2404echo "configure:2405: checking for gettext in libintl" >&5
c906108c
SS
2405if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 cat > conftest.$ac_ext <<EOF
5b5d99cf 2409#line 2410 "configure"
c906108c
SS
2410#include "confdefs.h"
2411
2412int main() {
2413return (int) gettext ("")
2414; return 0; }
2415EOF
5b5d99cf 2416if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424fi
2425rm -f conftest*
2426fi
2427
2428echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429else
2430 echo "$ac_t""no" 1>&6
2431fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438#define HAVE_GETTEXT 1
2439EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442set dummy msgfmt; ac_word=$2
2443echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2444echo "configure:2445: checking for $ac_word" >&5
c906108c
SS
2445if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466esac
2467fi
2468MSGFMT="$ac_cv_path_MSGFMT"
2469if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471else
2472 echo "$ac_t""no" 1>&6
2473fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476do
2477echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5b5d99cf 2478echo "configure:2479: checking for $ac_func" >&5
c906108c
SS
2479if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481else
2482 cat > conftest.$ac_ext <<EOF
5b5d99cf 2483#line 2484 "configure"
c906108c
SS
2484#include "confdefs.h"
2485/* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487#include <assert.h>
2488/* Override any gcc2 internal prototype to avoid an error. */
2489/* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491char $ac_func();
2492
2493int main() {
2494
2495/* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499choke me
2500#else
2501$ac_func();
2502#endif
2503
2504; return 0; }
2505EOF
5b5d99cf 2506if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514fi
2515rm -f conftest*
2516fi
2517
2518if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522#define $ac_tr_func 1
2523EOF
2524
2525else
2526 echo "$ac_t""no" 1>&6
2527fi
2528done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531set dummy gmsgfmt; ac_word=$2
2532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2533echo "configure:2534: checking for $ac_word" >&5
c906108c
SS
2534if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557esac
2558fi
2559GMSGFMT="$ac_cv_path_GMSGFMT"
2560if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562else
2563 echo "$ac_t""no" 1>&6
2564fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567set dummy xgettext; ac_word=$2
2568echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2569echo "configure:2570: checking for $ac_word" >&5
c906108c
SS
2570if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591esac
2592fi
2593XGETTEXT="$ac_cv_path_XGETTEXT"
2594if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596else
2597 echo "$ac_t""no" 1>&6
2598fi
2599
2600 cat > conftest.$ac_ext <<EOF
5b5d99cf 2601#line 2602 "configure"
c906108c
SS
2602#include "confdefs.h"
2603
2604int main() {
2605extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607; return 0; }
2608EOF
5b5d99cf 2609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619fi
2620rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639set dummy msgfmt; ac_word=$2
2640echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2641echo "configure:2642: checking for $ac_word" >&5
c906108c
SS
2642if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663esac
2664fi
2665MSGFMT="$ac_cv_path_MSGFMT"
2666if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668else
2669 echo "$ac_t""no" 1>&6
2670fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673set dummy gmsgfmt; ac_word=$2
2674echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2675echo "configure:2676: checking for $ac_word" >&5
c906108c
SS
2676if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699esac
2700fi
2701GMSGFMT="$ac_cv_path_GMSGFMT"
2702if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704else
2705 echo "$ac_t""no" 1>&6
2706fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709set dummy xgettext; ac_word=$2
2710echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5b5d99cf 2711echo "configure:2712: checking for $ac_word" >&5
c906108c
SS
2712if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733esac
2734fi
2735XGETTEXT="$ac_cv_path_XGETTEXT"
2736if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738else
2739 echo "$ac_t""no" 1>&6
2740fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5b5d99cf 2801echo "configure:2802: checking for catalogs to be installed" >&5
c906108c
SS
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821/* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5b5d99cf 2829echo "configure:2830: checking for linux/version.h" >&5
c906108c
SS
2830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832else
2833 cat > conftest.$ac_ext <<EOF
5b5d99cf 2834#line 2835 "configure"
c906108c
SS
2835#include "confdefs.h"
2836#include <linux/version.h>
2837EOF
2838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5b5d99cf 2839{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850fi
2851rm -f conftest*
2852fi
2853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856else
2857 echo "$ac_t""no" 1>&6
2858msgformat=xopen
2859fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
4536bbc6 2884 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
0fbb3da7
TT
2900cat >> confdefs.h <<\EOF
2901#define PACKAGE "gdb"
2902EOF
2903
2904
5b5d99cf
JB
2905debugdir=${libdir}/debug
2906
2907# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920#define DEBUGDIR "$ac_define_dir"
2921EOF
2922
2923
2924#AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
c906108c
SS
2925
2926
2927CONFIG_OBS=
66b965bb 2928CONFIG_LIB_OBS=
c906108c
SS
2929CONFIG_DEPS=
2930CONFIG_SRCS=
fb40c209
AC
2931CONFIG_INITS=
2932ENABLE_CFLAGS=
b3a90332
AC
2933CONFIG_ALL=
2934CONFIG_CLEAN=
e56ac5c3
AC
2935CONFIG_INSTALL=
2936CONFIG_UNINSTALL=
c906108c 2937
8dcde887 2938subdirs="doc testsuite"
96baa820 2939
8dcde887 2940configdirs=
96baa820 2941
27e9bf90 2942. $srcdir/configure.host
c906108c 2943
27e9bf90 2944. $srcdir/configure.tgt
c906108c 2945
27e9bf90
MK
2946# Fetch the default architecture and default target vector from BFD.
2947targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2948
27e9bf90
MK
2949# We only want the first architecture, so strip off the others if
2950# there is more than one.
2951targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2952
27e9bf90
MK
2953if test "x$targ_archs" != x; then
2954 cat >> confdefs.h <<EOF
2955#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2956EOF
2957
2958fi
27e9bf90
MK
2959if test "x$targ_defvec" != x; then
2960 cat >> confdefs.h <<EOF
2961#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2962EOF
2963
2964fi
c906108c 2965
8bb2c122
MK
2966if test "$program_transform_name" = s,x,x,; then
2967 program_transform_name=
2968else
2969 # Double any \ or $. echo might interpret backslashes.
2970 cat <<\EOF_SED > conftestsed
2971s,\\,\\\\,g; s,\$,$$,g
2972EOF_SED
2973 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2974 rm -f conftestsed
2975fi
2976test "$program_prefix" != NONE &&
2977 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2978# Use a double $ so make ignores it.
2979test "$program_suffix" != NONE &&
2980 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2981
2982# sed with no file args requires a program.
2983test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2984
2985
627af7ea
MK
2986# The CLI cannot be disabled yet, but may be in the future.
2987
2988# Enable CLI.
2989# Check whether --enable-gdbcli or --disable-gdbcli was given.
2990if test "${enable_gdbcli+set}" = set; then
2991 enableval="$enable_gdbcli"
2992 case $enableval in
2993 yes)
2994 ;;
2995 no)
2996 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2997 *)
2998 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2999 esac
3000else
3001 enable_gdbcli=yes
3002fi
3003
3004if test x"$enable_gdbcli" = xyes; then
3005 if test -d $srcdir/cli; then
3006 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3007 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3008 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3009 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3010 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3011 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3012 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3013 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3014 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3015 fi
3016fi
3017
3018# Enable MI.
3019# Check whether --enable-gdbmi or --disable-gdbmi was given.
3020if test "${enable_gdbmi+set}" = set; then
3021 enableval="$enable_gdbmi"
3022 case $enableval in
3023 yes | no)
3024 ;;
3025 *)
3026 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3027 esac
3028else
3029 enable_gdbmi=yes
3030fi
3031
3032if test x"$enable_gdbmi" = xyes; then
3033 if test -d $srcdir/mi; then
3034 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3035 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3036 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3037 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3038 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3039 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3040 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3041 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3042 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3043 fi
3044fi
3045
06825bd1
MK
3046# Enable TUI.
3047# Check whether --enable-tui or --disable-tui was given.
3048if test "${enable_tui+set}" = set; then
3049 enableval="$enable_tui"
3050 case $enableval in
3051 yes | no)
3052 ;;
3053 *)
3054 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3055 esac
3056fi
3057
3058if test x"$enable_tui" = xyes; then
3059 if test -d $srcdir/tui; then
3060 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3061 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3062 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3063 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3064 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3065 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3066 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3067 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3068 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3069 need_curses=yes
3070 fi
3071fi
3072
8ee53726
MK
3073# Enable gdbtk.
3074# Check whether --enable-gdbtk or --disable-gdbtk was given.
3075if test "${enable_gdbtk+set}" = set; then
3076 enableval="$enable_gdbtk"
3077 case $enableval in
3078 yes | no)
3079 ;;
3080 *)
3081 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3082 esac
3083else
3084 if test -d $srcdir/gdbtk; then
3085 enable_gdbtk=yes
3086 else
3087 enable_gdbtk=no
3088 fi
3089fi
3090
3091# We unconditionally disable gdbtk tests on selected platforms.
3092case $host_os in
3093 go32* | windows*)
3094 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3095 enable_gdbtk=no ;;
3096esac
3097
d28f9cdf
DJ
3098# Profiling support.
3099# Check whether --enable-profiling or --disable-profiling was given.
3100if test "${enable_profiling+set}" = set; then
3101 enableval="$enable_profiling"
3102 case $enableval in
3103 yes | no)
3104 ;;
3105 *)
3106 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3107 esac
3108else
3109 enable_profiling=no
3110fi
3111
3112
d9feb4e7
DJ
3113for ac_func in monstartup _mcleanup
3114do
3115echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3116echo "configure:3117: checking for $ac_func" >&5
3117if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
d28f9cdf
DJ
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 cat > conftest.$ac_ext <<EOF
d9feb4e7 3121#line 3122 "configure"
d28f9cdf
DJ
3122#include "confdefs.h"
3123/* System header to define __stub macros and hopefully few prototypes,
d9feb4e7 3124 which can conflict with char $ac_func(); below. */
d28f9cdf
DJ
3125#include <assert.h>
3126/* Override any gcc2 internal prototype to avoid an error. */
3127/* We use char because int might match the return type of a gcc2
3128 builtin and then its argument prototype would still apply. */
d9feb4e7 3129char $ac_func();
d28f9cdf
DJ
3130
3131int main() {
3132
3133/* The GNU C library defines this for functions which it implements
3134 to always fail with ENOSYS. Some functions are actually named
3135 something starting with __ and the normal name is an alias. */
d9feb4e7 3136#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
d28f9cdf
DJ
3137choke me
3138#else
d9feb4e7 3139$ac_func();
d28f9cdf
DJ
3140#endif
3141
3142; return 0; }
3143EOF
d9feb4e7 3144if { (eval echo configure:3145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
d28f9cdf 3145 rm -rf conftest*
d9feb4e7 3146 eval "ac_cv_func_$ac_func=yes"
d28f9cdf
DJ
3147else
3148 echo "configure: failed program was:" >&5
3149 cat conftest.$ac_ext >&5
3150 rm -rf conftest*
d9feb4e7 3151 eval "ac_cv_func_$ac_func=no"
d28f9cdf
DJ
3152fi
3153rm -f conftest*
3154fi
3155
d9feb4e7 3156if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
d28f9cdf 3157 echo "$ac_t""yes" 1>&6
d9feb4e7
DJ
3158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3159 cat >> confdefs.h <<EOF
3160#define $ac_tr_func 1
3161EOF
3162
d28f9cdf
DJ
3163else
3164 echo "$ac_t""no" 1>&6
d28f9cdf 3165fi
d9feb4e7 3166done
d28f9cdf 3167
d9feb4e7
DJ
3168if test "$enable_profiling" = yes ; then
3169 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3170 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3171 fi
3172 PROFILE_CFLAGS=-pg
3173 OLD_CFLAGS="$CFLAGS"
3174 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
d28f9cdf 3175
d9feb4e7
DJ
3176 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3177echo "configure:3178: checking whether $CC supports -pg" >&5
3178if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
d28f9cdf
DJ
3179 echo $ac_n "(cached) $ac_c" 1>&6
3180else
3181 cat > conftest.$ac_ext <<EOF
d9feb4e7 3182#line 3183 "configure"
d28f9cdf 3183#include "confdefs.h"
d28f9cdf
DJ
3184
3185int main() {
d9feb4e7 3186int x;
d28f9cdf
DJ
3187; return 0; }
3188EOF
d9feb4e7 3189if { (eval echo configure:3190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d28f9cdf 3190 rm -rf conftest*
d9feb4e7 3191 ac_cv_cc_supports_pg=yes
d28f9cdf
DJ
3192else
3193 echo "configure: failed program was:" >&5
3194 cat conftest.$ac_ext >&5
3195 rm -rf conftest*
d9feb4e7 3196 ac_cv_cc_supports_pg=no
d28f9cdf
DJ
3197fi
3198rm -f conftest*
3199fi
3200
d9feb4e7 3201echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
d28f9cdf 3202
d9feb4e7
DJ
3203 if test $ac_cv_cc_supports_pg = no; then
3204 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3205 fi
d28f9cdf
DJ
3206
3207 CFLAGS="$OLD_CFLAGS"
3208fi
3209
8bb2c122
MK
3210# --------------------- #
3211# Checks for programs. #
3212# --------------------- #
3213
c41b7eb1 3214for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3215do
3216# Extract the first word of "$ac_prog", so it can be a program name with args.
3217set dummy $ac_prog; ac_word=$2
3218echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3219echo "configure:3220: checking for $ac_word" >&5
7a292a7a
SS
3220if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3221 echo $ac_n "(cached) $ac_c" 1>&6
3222else
3223 if test -n "$AWK"; then
3224 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3225else
3226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3227 ac_dummy="$PATH"
3228 for ac_dir in $ac_dummy; do
3229 test -z "$ac_dir" && ac_dir=.
3230 if test -f $ac_dir/$ac_word; then
3231 ac_cv_prog_AWK="$ac_prog"
3232 break
3233 fi
3234 done
3235 IFS="$ac_save_ifs"
3236fi
3237fi
3238AWK="$ac_cv_prog_AWK"
3239if test -n "$AWK"; then
3240 echo "$ac_t""$AWK" 1>&6
3241else
3242 echo "$ac_t""no" 1>&6
3243fi
3244
3245test -n "$AWK" && break
3246done
3247
c906108c
SS
3248# Find a good install program. We prefer a C program (faster),
3249# so one script is as good as another. But avoid the broken or
3250# incompatible versions:
3251# SysV /etc/install, /usr/sbin/install
3252# SunOS /usr/etc/install
3253# IRIX /sbin/install
3254# AIX /bin/install
3255# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3256# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3257# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3258# ./install, which can be erroneously created by make from ./install.sh.
3259echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
d9feb4e7 3260echo "configure:3261: checking for a BSD compatible install" >&5
c906108c
SS
3261if test -z "$INSTALL"; then
3262if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3263 echo $ac_n "(cached) $ac_c" 1>&6
3264else
3265 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3266 for ac_dir in $PATH; do
3267 # Account for people who put trailing slashes in PATH elements.
3268 case "$ac_dir/" in
3269 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3270 *)
3271 # OSF1 and SCO ODT 3.0 have their own names for install.
3272 # Don't use installbsd from OSF since it installs stuff as root
3273 # by default.
3274 for ac_prog in ginstall scoinst install; do
3275 if test -f $ac_dir/$ac_prog; then
3276 if test $ac_prog = install &&
3277 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3278 # AIX install. It has an incompatible calling convention.
3279 :
3280 else
3281 ac_cv_path_install="$ac_dir/$ac_prog -c"
3282 break 2
3283 fi
3284 fi
3285 done
3286 ;;
3287 esac
3288 done
3289 IFS="$ac_save_IFS"
3290
3291fi
3292 if test "${ac_cv_path_install+set}" = set; then
3293 INSTALL="$ac_cv_path_install"
3294 else
3295 # As a last resort, use the slow shell script. We don't cache a
3296 # path for INSTALL within a source directory, because that will
3297 # break other packages using the cache if that directory is
3298 # removed, or if the path is relative.
3299 INSTALL="$ac_install_sh"
3300 fi
3301fi
3302echo "$ac_t""$INSTALL" 1>&6
3303
3304# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3305# It thinks the first close brace ends the variable substitution.
3306test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3307
3308test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3309
3310test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3311
8bb2c122 3312echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
d9feb4e7 3313echo "configure:3314: checking whether ln -s works" >&5
8bb2c122
MK
3314if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3315 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3316else
8bb2c122
MK
3317 rm -f conftestdata
3318if ln -s X conftestdata 2>/dev/null
3319then
3320 rm -f conftestdata
3321 ac_cv_prog_LN_S="ln -s"
3322else
3323 ac_cv_prog_LN_S=ln
3324fi
3325fi
3326LN_S="$ac_cv_prog_LN_S"
3327if test "$ac_cv_prog_LN_S" = "ln -s"; then
3328 echo "$ac_t""yes" 1>&6
3329else
3330 echo "$ac_t""no" 1>&6
c906108c
SS
3331fi
3332
8bb2c122
MK
3333# Extract the first word of "ranlib", so it can be a program name with args.
3334set dummy ranlib; ac_word=$2
c906108c 3335echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3336echo "configure:3337: checking for $ac_word" >&5
8bb2c122 3337if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3338 echo $ac_n "(cached) $ac_c" 1>&6
3339else
8bb2c122
MK
3340 if test -n "$RANLIB"; then
3341 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3342else
3343 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3344 ac_dummy="$PATH"
3345 for ac_dir in $ac_dummy; do
3346 test -z "$ac_dir" && ac_dir=.
3347 if test -f $ac_dir/$ac_word; then
8bb2c122 3348 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3349 break
3350 fi
3351 done
3352 IFS="$ac_save_ifs"
8bb2c122 3353 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3354fi
3355fi
8bb2c122
MK
3356RANLIB="$ac_cv_prog_RANLIB"
3357if test -n "$RANLIB"; then
3358 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3359else
3360 echo "$ac_t""no" 1>&6
3361fi
3362
8bb2c122
MK
3363for ac_prog in 'bison -y' byacc
3364do
3365# Extract the first word of "$ac_prog", so it can be a program name with args.
3366set dummy $ac_prog; ac_word=$2
c906108c 3367echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3368echo "configure:3369: checking for $ac_word" >&5
8bb2c122 3369if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3370 echo $ac_n "(cached) $ac_c" 1>&6
3371else
8bb2c122
MK
3372 if test -n "$YACC"; then
3373 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3374else
3375 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3376 ac_dummy="$PATH"
3377 for ac_dir in $ac_dummy; do
3378 test -z "$ac_dir" && ac_dir=.
3379 if test -f $ac_dir/$ac_word; then
8bb2c122 3380 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3381 break
3382 fi
3383 done
3384 IFS="$ac_save_ifs"
3385fi
3386fi
8bb2c122
MK
3387YACC="$ac_cv_prog_YACC"
3388if test -n "$YACC"; then
3389 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3390else
3391 echo "$ac_t""no" 1>&6
3392fi
3393
8bb2c122
MK
3394test -n "$YACC" && break
3395done
3396test -n "$YACC" || YACC="yacc"
c906108c 3397
8bb2c122
MK
3398
3399# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3400set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3401echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3402echo "configure:3403: checking for $ac_word" >&5
8bb2c122 3403if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
8bb2c122
MK
3406 if test -n "$AR"; then
3407 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3408else
3409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3410 ac_dummy="$PATH"
3411 for ac_dir in $ac_dummy; do
3412 test -z "$ac_dir" && ac_dir=.
3413 if test -f $ac_dir/$ac_word; then
8bb2c122 3414 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3415 break
3416 fi
3417 done
3418 IFS="$ac_save_ifs"
8bb2c122 3419 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3420fi
3421fi
8bb2c122
MK
3422AR="$ac_cv_prog_AR"
3423if test -n "$AR"; then
3424 echo "$ac_t""$AR" 1>&6
c906108c
SS
3425else
3426 echo "$ac_t""no" 1>&6
3427fi
3428
8bb2c122 3429
c906108c 3430
95ca63c4
CF
3431# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3432set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3433echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3434echo "configure:3435: checking for $ac_word" >&5
95ca63c4
CF
3435if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3436 echo $ac_n "(cached) $ac_c" 1>&6
3437else
3438 if test -n "$DLLTOOL"; then
3439 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3440else
3441 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3442 ac_dummy="$PATH"
3443 for ac_dir in $ac_dummy; do
3444 test -z "$ac_dir" && ac_dir=.
3445 if test -f $ac_dir/$ac_word; then
3446 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3447 break
3448 fi
3449 done
3450 IFS="$ac_save_ifs"
3451 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3452fi
3453fi
3454DLLTOOL="$ac_cv_prog_DLLTOOL"
3455if test -n "$DLLTOOL"; then
3456 echo "$ac_t""$DLLTOOL" 1>&6
3457else
3458 echo "$ac_t""no" 1>&6
3459fi
3460
3461
3462
3463# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3464set dummy ${ac_tool_prefix}windres; ac_word=$2
3465echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3466echo "configure:3467: checking for $ac_word" >&5
95ca63c4
CF
3467if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3469else
3470 if test -n "$WINDRES"; then
3471 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3472else
3473 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3474 ac_dummy="$PATH"
3475 for ac_dir in $ac_dummy; do
3476 test -z "$ac_dir" && ac_dir=.
3477 if test -f $ac_dir/$ac_word; then
3478 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3479 break
3480 fi
3481 done
3482 IFS="$ac_save_ifs"
3483 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3484fi
3485fi
3486WINDRES="$ac_cv_prog_WINDRES"
3487if test -n "$WINDRES"; then
3488 echo "$ac_t""$WINDRES" 1>&6
3489else
3490 echo "$ac_t""no" 1>&6
3491fi
3492
3493
3494
c906108c 3495
8bb2c122 3496# Needed for GNU/Hurd.
75c6e08a
MK
3497# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3498set dummy ${ac_tool_prefix}mig; ac_word=$2
3499echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d9feb4e7 3500echo "configure:3501: checking for $ac_word" >&5
75c6e08a
MK
3501if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3502 echo $ac_n "(cached) $ac_c" 1>&6
3503else
3504 if test -n "$MIG"; then
3505 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3506else
3507 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3508 ac_dummy="$PATH"
3509 for ac_dir in $ac_dummy; do
3510 test -z "$ac_dir" && ac_dir=.
3511 if test -f $ac_dir/$ac_word; then
3512 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3513 break
3514 fi
3515 done
3516 IFS="$ac_save_ifs"
3517 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3518fi
3519fi
3520MIG="$ac_cv_prog_MIG"
3521if test -n "$MIG"; then
3522 echo "$ac_t""$MIG" 1>&6
3523else
3524 echo "$ac_t""no" 1>&6
3525fi
3526
3527
3528
3529
9a156167
MK
3530# ---------------------- #
3531# Checks for libraries. #
3532# ---------------------- #
3533
3534# We might need to link with -lm; most simulators need it.
3535echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
d9feb4e7 3536echo "configure:3537: checking for main in -lm" >&5
9a156167
MK
3537ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3538if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3539 echo $ac_n "(cached) $ac_c" 1>&6
3540else
3541 ac_save_LIBS="$LIBS"
3542LIBS="-lm $LIBS"
3543cat > conftest.$ac_ext <<EOF
d9feb4e7 3544#line 3545 "configure"
9a156167
MK
3545#include "confdefs.h"
3546
3547int main() {
3548main()
3549; return 0; }
3550EOF
d9feb4e7 3551if { (eval echo configure:3552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3552 rm -rf conftest*
3553 eval "ac_cv_lib_$ac_lib_var=yes"
3554else
3555 echo "configure: failed program was:" >&5
3556 cat conftest.$ac_ext >&5
3557 rm -rf conftest*
3558 eval "ac_cv_lib_$ac_lib_var=no"
3559fi
3560rm -f conftest*
3561LIBS="$ac_save_LIBS"
3562
3563fi
3564if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3565 echo "$ac_t""yes" 1>&6
3566 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3567 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3568 cat >> confdefs.h <<EOF
3569#define $ac_tr_lib 1
3570EOF
3571
3572 LIBS="-lm $LIBS"
3573
3574else
3575 echo "$ac_t""no" 1>&6
3576fi
3577
3578
3579# We need to link with -lw to get `wctype' on Solaris before Solaris
3580# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3581# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3582# is known to have this problem). Therefore we avoid libw if we can.
3583echo $ac_n "checking for wctype""... $ac_c" 1>&6
d9feb4e7 3584echo "configure:3585: checking for wctype" >&5
9a156167
MK
3585if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3586 echo $ac_n "(cached) $ac_c" 1>&6
3587else
3588 cat > conftest.$ac_ext <<EOF
d9feb4e7 3589#line 3590 "configure"
9a156167
MK
3590#include "confdefs.h"
3591/* System header to define __stub macros and hopefully few prototypes,
3592 which can conflict with char wctype(); below. */
3593#include <assert.h>
3594/* Override any gcc2 internal prototype to avoid an error. */
3595/* We use char because int might match the return type of a gcc2
3596 builtin and then its argument prototype would still apply. */
3597char wctype();
3598
3599int main() {
3600
3601/* The GNU C library defines this for functions which it implements
3602 to always fail with ENOSYS. Some functions are actually named
3603 something starting with __ and the normal name is an alias. */
3604#if defined (__stub_wctype) || defined (__stub___wctype)
3605choke me
3606#else
3607wctype();
3608#endif
3609
3610; return 0; }
3611EOF
d9feb4e7 3612if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3613 rm -rf conftest*
3614 eval "ac_cv_func_wctype=yes"
3615else
3616 echo "configure: failed program was:" >&5
3617 cat conftest.$ac_ext >&5
3618 rm -rf conftest*
3619 eval "ac_cv_func_wctype=no"
3620fi
3621rm -f conftest*
3622fi
3623
3624if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3625 echo "$ac_t""yes" 1>&6
3626 :
3627else
3628 echo "$ac_t""no" 1>&6
3629echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
d9feb4e7 3630echo "configure:3631: checking for wctype in -lw" >&5
9a156167
MK
3631ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3632if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3633 echo $ac_n "(cached) $ac_c" 1>&6
3634else
3635 ac_save_LIBS="$LIBS"
3636LIBS="-lw $LIBS"
3637cat > conftest.$ac_ext <<EOF
d9feb4e7 3638#line 3639 "configure"
9a156167
MK
3639#include "confdefs.h"
3640/* Override any gcc2 internal prototype to avoid an error. */
3641/* We use char because int might match the return type of a gcc2
3642 builtin and then its argument prototype would still apply. */
3643char wctype();
3644
3645int main() {
3646wctype()
3647; return 0; }
3648EOF
d9feb4e7 3649if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3650 rm -rf conftest*
3651 eval "ac_cv_lib_$ac_lib_var=yes"
3652else
3653 echo "configure: failed program was:" >&5
3654 cat conftest.$ac_ext >&5
3655 rm -rf conftest*
3656 eval "ac_cv_lib_$ac_lib_var=no"
3657fi
3658rm -f conftest*
3659LIBS="$ac_save_LIBS"
3660
3661fi
3662if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3663 echo "$ac_t""yes" 1>&6
3664 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3665 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3666 cat >> confdefs.h <<EOF
3667#define $ac_tr_lib 1
3668EOF
3669
3670 LIBS="-lw $LIBS"
3671
3672else
3673 echo "$ac_t""no" 1>&6
3674fi
3675
3676fi
3677
3678
3679# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3680
3681echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
d9feb4e7 3682echo "configure:3683: checking for library containing socketpair" >&5
9a156167
MK
3683if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3684 echo $ac_n "(cached) $ac_c" 1>&6
3685else
3686 ac_func_search_save_LIBS="$LIBS"
3687ac_cv_search_socketpair="no"
3688cat > conftest.$ac_ext <<EOF
d9feb4e7 3689#line 3690 "configure"
9a156167
MK
3690#include "confdefs.h"
3691/* Override any gcc2 internal prototype to avoid an error. */
3692/* We use char because int might match the return type of a gcc2
3693 builtin and then its argument prototype would still apply. */
3694char socketpair();
3695
3696int main() {
3697socketpair()
3698; return 0; }
3699EOF
d9feb4e7 3700if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3701 rm -rf conftest*
3702 ac_cv_search_socketpair="none required"
3703else
3704 echo "configure: failed program was:" >&5
3705 cat conftest.$ac_ext >&5
3706fi
3707rm -f conftest*
3708test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3709LIBS="-l$i $ac_func_search_save_LIBS"
3710cat > conftest.$ac_ext <<EOF
d9feb4e7 3711#line 3712 "configure"
9a156167
MK
3712#include "confdefs.h"
3713/* Override any gcc2 internal prototype to avoid an error. */
3714/* We use char because int might match the return type of a gcc2
3715 builtin and then its argument prototype would still apply. */
3716char socketpair();
3717
3718int main() {
3719socketpair()
3720; return 0; }
3721EOF
d9feb4e7 3722if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3723 rm -rf conftest*
3724 ac_cv_search_socketpair="-l$i"
3725break
3726else
3727 echo "configure: failed program was:" >&5
3728 cat conftest.$ac_ext >&5
3729fi
3730rm -f conftest*
3731done
3732LIBS="$ac_func_search_save_LIBS"
3733fi
3734
3735echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3736if test "$ac_cv_search_socketpair" != "no"; then
3737 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3738
3739else :
3740
3741fi
3742
06825bd1
MK
3743# Since GDB uses Readline, we need termcap functionality, so we need
3744# to find a library that provides that. When GDB is configured with
3745# --enable-tui, we need full curses functionality.
3746#
3747# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3748# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3749# Makefile fragments. That's why we need to have `Hcurses' before
3750# `curses'. I don't see why we should use HP curses if a more
3751# standard curses is available, except that according to HP's
3752# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3753# HP-UX 10.10 and 10.20.
3754
3755if test "$need_curses" = yes; then
3756
3757echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
d9feb4e7 3758echo "configure:3759: checking for library containing initscr" >&5
06825bd1
MK
3759if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3760 echo $ac_n "(cached) $ac_c" 1>&6
3761else
3762 ac_func_search_save_LIBS="$LIBS"
3763ac_cv_search_initscr="no"
3764cat > conftest.$ac_ext <<EOF
d9feb4e7 3765#line 3766 "configure"
06825bd1
MK
3766#include "confdefs.h"
3767/* Override any gcc2 internal prototype to avoid an error. */
3768/* We use char because int might match the return type of a gcc2
3769 builtin and then its argument prototype would still apply. */
3770char initscr();
3771
3772int main() {
3773initscr()
3774; return 0; }
3775EOF
d9feb4e7 3776if { (eval echo configure:3777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3777 rm -rf conftest*
3778 ac_cv_search_initscr="none required"
3779else
3780 echo "configure: failed program was:" >&5
3781 cat conftest.$ac_ext >&5
3782fi
3783rm -f conftest*
3784test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3785LIBS="-l$i $ac_func_search_save_LIBS"
3786cat > conftest.$ac_ext <<EOF
d9feb4e7 3787#line 3788 "configure"
06825bd1
MK
3788#include "confdefs.h"
3789/* Override any gcc2 internal prototype to avoid an error. */
3790/* We use char because int might match the return type of a gcc2
3791 builtin and then its argument prototype would still apply. */
3792char initscr();
3793
3794int main() {
3795initscr()
3796; return 0; }
3797EOF
d9feb4e7 3798if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3799 rm -rf conftest*
3800 ac_cv_search_initscr="-l$i"
3801break
3802else
3803 echo "configure: failed program was:" >&5
3804 cat conftest.$ac_ext >&5
3805fi
3806rm -f conftest*
3807done
3808LIBS="$ac_func_search_save_LIBS"
3809fi
3810
3811echo "$ac_t""$ac_cv_search_initscr" 1>&6
3812if test "$ac_cv_search_initscr" != "no"; then
3813 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3814
3815else :
3816 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3817fi
3818fi
3819
3820case $host_os in
3821 cygwin*)
3822 if test -d $srcdir/libtermcap; then
3823 LIBS="../libtermcap/libtermcap.a $LIBS"
3824 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3825 fi ;;
3826 go32*)
3827 # ??? Is this really true?
3828 ac_cv_search_tgetent="none required"
3829 ;;
3830 aix*)
3831 # Readline prefers curses over termcap on AIX.
3832 # ??? Why?
3833
3834echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d9feb4e7 3835echo "configure:3836: checking for library containing tgetent" >&5
06825bd1
MK
3836if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3837 echo $ac_n "(cached) $ac_c" 1>&6
3838else
3839 ac_func_search_save_LIBS="$LIBS"
3840ac_cv_search_tgetent="no"
3841cat > conftest.$ac_ext <<EOF
d9feb4e7 3842#line 3843 "configure"
06825bd1
MK
3843#include "confdefs.h"
3844/* Override any gcc2 internal prototype to avoid an error. */
3845/* We use char because int might match the return type of a gcc2
3846 builtin and then its argument prototype would still apply. */
3847char tgetent();
3848
3849int main() {
3850tgetent()
3851; return 0; }
3852EOF
d9feb4e7 3853if { (eval echo configure:3854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3854 rm -rf conftest*
3855 ac_cv_search_tgetent="none required"
3856else
3857 echo "configure: failed program was:" >&5
3858 cat conftest.$ac_ext >&5
3859fi
3860rm -f conftest*
3861test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3862LIBS="-l$i $ac_func_search_save_LIBS"
3863cat > conftest.$ac_ext <<EOF
d9feb4e7 3864#line 3865 "configure"
06825bd1
MK
3865#include "confdefs.h"
3866/* Override any gcc2 internal prototype to avoid an error. */
3867/* We use char because int might match the return type of a gcc2
3868 builtin and then its argument prototype would still apply. */
3869char tgetent();
3870
3871int main() {
3872tgetent()
3873; return 0; }
3874EOF
d9feb4e7 3875if { (eval echo configure:3876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3876 rm -rf conftest*
3877 ac_cv_search_tgetent="-l$i"
3878break
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882fi
3883rm -f conftest*
3884done
3885LIBS="$ac_func_search_save_LIBS"
3886fi
3887
3888echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3889if test "$ac_cv_search_tgetent" != "no"; then
3890 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3891
3892else :
3893
3894fi
3895 ;;
3896esac
3897
3898# Note: We used to check for libtermlib and libterminfo too, but
3899# Readline doesn't, so I think we're safe with leaving them out.
3900
3901echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d9feb4e7 3902echo "configure:3903: checking for library containing tgetent" >&5
06825bd1
MK
3903if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3904 echo $ac_n "(cached) $ac_c" 1>&6
3905else
3906 ac_func_search_save_LIBS="$LIBS"
3907ac_cv_search_tgetent="no"
3908cat > conftest.$ac_ext <<EOF
d9feb4e7 3909#line 3910 "configure"
06825bd1
MK
3910#include "confdefs.h"
3911/* Override any gcc2 internal prototype to avoid an error. */
3912/* We use char because int might match the return type of a gcc2
3913 builtin and then its argument prototype would still apply. */
3914char tgetent();
3915
3916int main() {
3917tgetent()
3918; return 0; }
3919EOF
d9feb4e7 3920if { (eval echo configure:3921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3921 rm -rf conftest*
3922 ac_cv_search_tgetent="none required"
3923else
3924 echo "configure: failed program was:" >&5
3925 cat conftest.$ac_ext >&5
3926fi
3927rm -f conftest*
3928test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3929LIBS="-l$i $ac_func_search_save_LIBS"
3930cat > conftest.$ac_ext <<EOF
d9feb4e7 3931#line 3932 "configure"
06825bd1
MK
3932#include "confdefs.h"
3933/* Override any gcc2 internal prototype to avoid an error. */
3934/* We use char because int might match the return type of a gcc2
3935 builtin and then its argument prototype would still apply. */
3936char tgetent();
3937
3938int main() {
3939tgetent()
3940; return 0; }
3941EOF
d9feb4e7 3942if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3943 rm -rf conftest*
3944 ac_cv_search_tgetent="-l$i"
3945break
3946else
3947 echo "configure: failed program was:" >&5
3948 cat conftest.$ac_ext >&5
3949fi
3950rm -f conftest*
3951done
3952LIBS="$ac_func_search_save_LIBS"
3953fi
3954
3955echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3956if test "$ac_cv_search_tgetent" != "no"; then
3957 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3958
3959else :
3960
3961fi
3962
3963if test "$ac_cv_search_tgetent" = no; then
3964 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3965fi
3966
5ee754fc
MK
3967# ------------------------- #
3968# Checks for header files. #
3969# ------------------------- #
3970
3971ac_header_dirent=no
3972for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3973do
3974ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3975echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
d9feb4e7 3976echo "configure:3977: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3977if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3978 echo $ac_n "(cached) $ac_c" 1>&6
3979else
3980 cat > conftest.$ac_ext <<EOF
d9feb4e7 3981#line 3982 "configure"
c906108c
SS
3982#include "confdefs.h"
3983#include <sys/types.h>
5ee754fc
MK
3984#include <$ac_hdr>
3985int main() {
3986DIR *dirp = 0;
3987; return 0; }
3988EOF
d9feb4e7 3989if { (eval echo configure:3990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3990 rm -rf conftest*
3991 eval "ac_cv_header_dirent_$ac_safe=yes"
3992else
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 rm -rf conftest*
3996 eval "ac_cv_header_dirent_$ac_safe=no"
3997fi
3998rm -f conftest*
3999fi
4000if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4001 echo "$ac_t""yes" 1>&6
4002 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4003 cat >> confdefs.h <<EOF
4004#define $ac_tr_hdr 1
4005EOF
4006 ac_header_dirent=$ac_hdr; break
4007else
4008 echo "$ac_t""no" 1>&6
4009fi
4010done
4011# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4012if test $ac_header_dirent = dirent.h; then
4013echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
d9feb4e7 4014echo "configure:4015: checking for opendir in -ldir" >&5
5ee754fc
MK
4015ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4016if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4017 echo $ac_n "(cached) $ac_c" 1>&6
4018else
4019 ac_save_LIBS="$LIBS"
4020LIBS="-ldir $LIBS"
4021cat > conftest.$ac_ext <<EOF
d9feb4e7 4022#line 4023 "configure"
5ee754fc
MK
4023#include "confdefs.h"
4024/* Override any gcc2 internal prototype to avoid an error. */
4025/* We use char because int might match the return type of a gcc2
4026 builtin and then its argument prototype would still apply. */
4027char opendir();
c906108c
SS
4028
4029int main() {
5ee754fc 4030opendir()
c906108c
SS
4031; return 0; }
4032EOF
d9feb4e7 4033if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4034 rm -rf conftest*
5ee754fc 4035 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4036else
4037 echo "configure: failed program was:" >&5
4038 cat conftest.$ac_ext >&5
4039 rm -rf conftest*
5ee754fc 4040 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4041fi
4042rm -f conftest*
5ee754fc
MK
4043LIBS="$ac_save_LIBS"
4044
4045fi
4046if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4047 echo "$ac_t""yes" 1>&6
4048 LIBS="$LIBS -ldir"
4049else
4050 echo "$ac_t""no" 1>&6
c906108c
SS
4051fi
4052
5ee754fc
MK
4053else
4054echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
d9feb4e7 4055echo "configure:4056: checking for opendir in -lx" >&5
5ee754fc
MK
4056ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4057if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4058 echo $ac_n "(cached) $ac_c" 1>&6
4059else
4060 ac_save_LIBS="$LIBS"
4061LIBS="-lx $LIBS"
4062cat > conftest.$ac_ext <<EOF
d9feb4e7 4063#line 4064 "configure"
5ee754fc
MK
4064#include "confdefs.h"
4065/* Override any gcc2 internal prototype to avoid an error. */
4066/* We use char because int might match the return type of a gcc2
4067 builtin and then its argument prototype would still apply. */
4068char opendir();
4069
4070int main() {
4071opendir()
4072; return 0; }
c906108c 4073EOF
d9feb4e7 4074if { (eval echo configure:4075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4075 rm -rf conftest*
4076 eval "ac_cv_lib_$ac_lib_var=yes"
4077else
4078 echo "configure: failed program was:" >&5
4079 cat conftest.$ac_ext >&5
4080 rm -rf conftest*
4081 eval "ac_cv_lib_$ac_lib_var=no"
4082fi
4083rm -f conftest*
4084LIBS="$ac_save_LIBS"
c906108c 4085
5ee754fc
MK
4086fi
4087if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4088 echo "$ac_t""yes" 1>&6
4089 LIBS="$LIBS -lx"
4090else
4091 echo "$ac_t""no" 1>&6
4092fi
c906108c 4093
5ee754fc 4094fi
c906108c 4095
5ee754fc 4096echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
d9feb4e7 4097echo "configure:4098: checking whether stat file-mode macros are broken" >&5
5ee754fc 4098if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4099 echo $ac_n "(cached) $ac_c" 1>&6
4100else
4101 cat > conftest.$ac_ext <<EOF
d9feb4e7 4102#line 4103 "configure"
9608ab8b
MK
4103#include "confdefs.h"
4104#include <sys/types.h>
5ee754fc
MK
4105#include <sys/stat.h>
4106
4107#if defined(S_ISBLK) && defined(S_IFDIR)
4108# if S_ISBLK (S_IFDIR)
4109You lose.
4110# endif
4111#endif
4112
4113#if defined(S_ISBLK) && defined(S_IFCHR)
4114# if S_ISBLK (S_IFCHR)
4115You lose.
4116# endif
4117#endif
4118
4119#if defined(S_ISLNK) && defined(S_IFREG)
4120# if S_ISLNK (S_IFREG)
4121You lose.
4122# endif
4123#endif
4124
4125#if defined(S_ISSOCK) && defined(S_IFREG)
4126# if S_ISSOCK (S_IFREG)
4127You lose.
4128# endif
4129#endif
4130
9608ab8b 4131EOF
5ee754fc
MK
4132if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4133 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4134 rm -rf conftest*
5ee754fc
MK
4135 ac_cv_header_stat_broken=yes
4136else
4137 rm -rf conftest*
4138 ac_cv_header_stat_broken=no
4139fi
4140rm -f conftest*
4141
4142fi
4143
4144echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4145if test $ac_cv_header_stat_broken = yes; then
4146 cat >> confdefs.h <<\EOF
4147#define STAT_MACROS_BROKEN 1
4148EOF
4149
4150fi
4151
4152echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d9feb4e7 4153echo "configure:4154: checking for ANSI C header files" >&5
5ee754fc
MK
4154if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4155 echo $ac_n "(cached) $ac_c" 1>&6
4156else
4157 cat > conftest.$ac_ext <<EOF
d9feb4e7 4158#line 4159 "configure"
5ee754fc
MK
4159#include "confdefs.h"
4160#include <stdlib.h>
4161#include <stdarg.h>
4162#include <string.h>
4163#include <float.h>
4164EOF
4165ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4166{ (eval echo configure:4167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4167ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4168if test -z "$ac_err"; then
4169 rm -rf conftest*
4170 ac_cv_header_stdc=yes
4171else
4172 echo "$ac_err" >&5
4173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4175 rm -rf conftest*
4176 ac_cv_header_stdc=no
4177fi
4178rm -f conftest*
4179
4180if test $ac_cv_header_stdc = yes; then
4181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4182cat > conftest.$ac_ext <<EOF
d9feb4e7 4183#line 4184 "configure"
5ee754fc
MK
4184#include "confdefs.h"
4185#include <string.h>
4186EOF
4187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4188 egrep "memchr" >/dev/null 2>&1; then
4189 :
4190else
4191 rm -rf conftest*
4192 ac_cv_header_stdc=no
4193fi
4194rm -f conftest*
4195
4196fi
4197
4198if test $ac_cv_header_stdc = yes; then
4199 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4200cat > conftest.$ac_ext <<EOF
d9feb4e7 4201#line 4202 "configure"
5ee754fc
MK
4202#include "confdefs.h"
4203#include <stdlib.h>
4204EOF
4205if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4206 egrep "free" >/dev/null 2>&1; then
4207 :
4208else
4209 rm -rf conftest*
4210 ac_cv_header_stdc=no
4211fi
4212rm -f conftest*
4213
4214fi
4215
4216if test $ac_cv_header_stdc = yes; then
4217 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4218if test "$cross_compiling" = yes; then
4219 :
4220else
4221 cat > conftest.$ac_ext <<EOF
d9feb4e7 4222#line 4223 "configure"
5ee754fc
MK
4223#include "confdefs.h"
4224#include <ctype.h>
4225#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4226#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4227#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4228int main () { int i; for (i = 0; i < 256; i++)
4229if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4230exit (0); }
4231
4232EOF
d9feb4e7 4233if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4234then
4235 :
9608ab8b 4236else
5ee754fc
MK
4237 echo "configure: failed program was:" >&5
4238 cat conftest.$ac_ext >&5
4239 rm -fr conftest*
4240 ac_cv_header_stdc=no
4241fi
4242rm -fr conftest*
4243fi
4244
4245fi
4246fi
4247
4248echo "$ac_t""$ac_cv_header_stdc" 1>&6
4249if test $ac_cv_header_stdc = yes; then
4250 cat >> confdefs.h <<\EOF
4251#define STDC_HEADERS 1
4252EOF
4253
4254fi
4255
4256for ac_hdr in link.h
4257do
4258ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4259echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4260echo "configure:4261: checking for $ac_hdr" >&5
5ee754fc
MK
4261if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4262 echo $ac_n "(cached) $ac_c" 1>&6
4263else
4264 cat > conftest.$ac_ext <<EOF
d9feb4e7 4265#line 4266 "configure"
5ee754fc
MK
4266#include "confdefs.h"
4267#include <$ac_hdr>
4268EOF
4269ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4270{ (eval echo configure:4271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4271ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4272if test -z "$ac_err"; then
4273 rm -rf conftest*
4274 eval "ac_cv_header_$ac_safe=yes"
4275else
4276 echo "$ac_err" >&5
4277 echo "configure: failed program was:" >&5
4278 cat conftest.$ac_ext >&5
4279 rm -rf conftest*
4280 eval "ac_cv_header_$ac_safe=no"
4281fi
4282rm -f conftest*
4283fi
4284if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4285 echo "$ac_t""yes" 1>&6
4286 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4287 cat >> confdefs.h <<EOF
4288#define $ac_tr_hdr 1
4289EOF
4290
4291else
4292 echo "$ac_t""no" 1>&6
4293fi
4294done
4295
4296for ac_hdr in nlist.h
4297do
4298ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4299echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4300echo "configure:4301: checking for $ac_hdr" >&5
5ee754fc
MK
4301if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4302 echo $ac_n "(cached) $ac_c" 1>&6
4303else
4304 cat > conftest.$ac_ext <<EOF
d9feb4e7 4305#line 4306 "configure"
5ee754fc
MK
4306#include "confdefs.h"
4307#include <$ac_hdr>
4308EOF
4309ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4310{ (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4311ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4312if test -z "$ac_err"; then
4313 rm -rf conftest*
4314 eval "ac_cv_header_$ac_safe=yes"
4315else
4316 echo "$ac_err" >&5
4317 echo "configure: failed program was:" >&5
4318 cat conftest.$ac_ext >&5
4319 rm -rf conftest*
4320 eval "ac_cv_header_$ac_safe=no"
4321fi
4322rm -f conftest*
4323fi
4324if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4325 echo "$ac_t""yes" 1>&6
4326 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4327 cat >> confdefs.h <<EOF
4328#define $ac_tr_hdr 1
4329EOF
4330
4331else
4332 echo "$ac_t""no" 1>&6
4333fi
4334done
4335
4336for ac_hdr in poll.h sys/poll.h
4337do
4338ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4339echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4340echo "configure:4341: checking for $ac_hdr" >&5
5ee754fc
MK
4341if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4342 echo $ac_n "(cached) $ac_c" 1>&6
4343else
4344 cat > conftest.$ac_ext <<EOF
d9feb4e7 4345#line 4346 "configure"
5ee754fc
MK
4346#include "confdefs.h"
4347#include <$ac_hdr>
4348EOF
4349ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4350{ (eval echo configure:4351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4351ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4352if test -z "$ac_err"; then
4353 rm -rf conftest*
4354 eval "ac_cv_header_$ac_safe=yes"
4355else
4356 echo "$ac_err" >&5
4357 echo "configure: failed program was:" >&5
4358 cat conftest.$ac_ext >&5
4359 rm -rf conftest*
4360 eval "ac_cv_header_$ac_safe=no"
4361fi
4362rm -f conftest*
4363fi
4364if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4365 echo "$ac_t""yes" 1>&6
4366 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4367 cat >> confdefs.h <<EOF
4368#define $ac_tr_hdr 1
4369EOF
4370
4371else
4372 echo "$ac_t""no" 1>&6
4373fi
4374done
4375
4376for ac_hdr in proc_service.h thread_db.h
4377do
4378ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4379echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4380echo "configure:4381: checking for $ac_hdr" >&5
5ee754fc
MK
4381if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4382 echo $ac_n "(cached) $ac_c" 1>&6
4383else
4384 cat > conftest.$ac_ext <<EOF
d9feb4e7 4385#line 4386 "configure"
5ee754fc
MK
4386#include "confdefs.h"
4387#include <$ac_hdr>
4388EOF
4389ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4390{ (eval echo configure:4391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4391ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4392if test -z "$ac_err"; then
4393 rm -rf conftest*
4394 eval "ac_cv_header_$ac_safe=yes"
4395else
4396 echo "$ac_err" >&5
4397 echo "configure: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4399 rm -rf conftest*
4400 eval "ac_cv_header_$ac_safe=no"
4401fi
4402rm -f conftest*
4403fi
4404if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4405 echo "$ac_t""yes" 1>&6
4406 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4407 cat >> confdefs.h <<EOF
4408#define $ac_tr_hdr 1
4409EOF
4410
4411else
4412 echo "$ac_t""no" 1>&6
4413fi
4414done
4415
4416for ac_hdr in stddef.h
4417do
4418ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4419echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4420echo "configure:4421: checking for $ac_hdr" >&5
5ee754fc
MK
4421if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4422 echo $ac_n "(cached) $ac_c" 1>&6
4423else
4424 cat > conftest.$ac_ext <<EOF
d9feb4e7 4425#line 4426 "configure"
5ee754fc
MK
4426#include "confdefs.h"
4427#include <$ac_hdr>
4428EOF
4429ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4430{ (eval echo configure:4431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4431ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4432if test -z "$ac_err"; then
4433 rm -rf conftest*
4434 eval "ac_cv_header_$ac_safe=yes"
4435else
4436 echo "$ac_err" >&5
4437 echo "configure: failed program was:" >&5
4438 cat conftest.$ac_ext >&5
4439 rm -rf conftest*
4440 eval "ac_cv_header_$ac_safe=no"
4441fi
4442rm -f conftest*
4443fi
4444if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4445 echo "$ac_t""yes" 1>&6
4446 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4447 cat >> confdefs.h <<EOF
4448#define $ac_tr_hdr 1
4449EOF
4450
4451else
4452 echo "$ac_t""no" 1>&6
4453fi
4454done
4455
4456for ac_hdr in stdlib.h
4457do
4458ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4459echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4460echo "configure:4461: checking for $ac_hdr" >&5
5ee754fc
MK
4461if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4462 echo $ac_n "(cached) $ac_c" 1>&6
4463else
4464 cat > conftest.$ac_ext <<EOF
d9feb4e7 4465#line 4466 "configure"
5ee754fc
MK
4466#include "confdefs.h"
4467#include <$ac_hdr>
4468EOF
4469ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4470{ (eval echo configure:4471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4471ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4472if test -z "$ac_err"; then
4473 rm -rf conftest*
4474 eval "ac_cv_header_$ac_safe=yes"
4475else
4476 echo "$ac_err" >&5
4477 echo "configure: failed program was:" >&5
4478 cat conftest.$ac_ext >&5
4479 rm -rf conftest*
4480 eval "ac_cv_header_$ac_safe=no"
4481fi
4482rm -f conftest*
4483fi
4484if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4485 echo "$ac_t""yes" 1>&6
4486 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4487 cat >> confdefs.h <<EOF
4488#define $ac_tr_hdr 1
4489EOF
4490
4491else
4492 echo "$ac_t""no" 1>&6
4493fi
4494done
4495
4496for ac_hdr in stdint.h
4497do
4498ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4499echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4500echo "configure:4501: checking for $ac_hdr" >&5
5ee754fc
MK
4501if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4502 echo $ac_n "(cached) $ac_c" 1>&6
4503else
4504 cat > conftest.$ac_ext <<EOF
d9feb4e7 4505#line 4506 "configure"
5ee754fc
MK
4506#include "confdefs.h"
4507#include <$ac_hdr>
4508EOF
4509ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4510{ (eval echo configure:4511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4511ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4512if test -z "$ac_err"; then
4513 rm -rf conftest*
4514 eval "ac_cv_header_$ac_safe=yes"
4515else
4516 echo "$ac_err" >&5
4517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4519 rm -rf conftest*
4520 eval "ac_cv_header_$ac_safe=no"
4521fi
4522rm -f conftest*
4523fi
4524if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4525 echo "$ac_t""yes" 1>&6
4526 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4527 cat >> confdefs.h <<EOF
4528#define $ac_tr_hdr 1
4529EOF
4530
4531else
4532 echo "$ac_t""no" 1>&6
4533fi
4534done
4535
4536for ac_hdr in string.h memory.h strings.h
4537do
4538ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4539echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4540echo "configure:4541: checking for $ac_hdr" >&5
5ee754fc
MK
4541if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4542 echo $ac_n "(cached) $ac_c" 1>&6
4543else
4544 cat > conftest.$ac_ext <<EOF
d9feb4e7 4545#line 4546 "configure"
5ee754fc
MK
4546#include "confdefs.h"
4547#include <$ac_hdr>
4548EOF
4549ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4550{ (eval echo configure:4551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4551ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4552if test -z "$ac_err"; then
4553 rm -rf conftest*
4554 eval "ac_cv_header_$ac_safe=yes"
4555else
4556 echo "$ac_err" >&5
4557 echo "configure: failed program was:" >&5
4558 cat conftest.$ac_ext >&5
4559 rm -rf conftest*
4560 eval "ac_cv_header_$ac_safe=no"
4561fi
4562rm -f conftest*
4563fi
4564if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4565 echo "$ac_t""yes" 1>&6
4566 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4567 cat >> confdefs.h <<EOF
4568#define $ac_tr_hdr 1
4569EOF
4570
4571else
4572 echo "$ac_t""no" 1>&6
4573fi
4574done
4575
4576for ac_hdr in sys/fault.h
4577do
4578ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4579echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4580echo "configure:4581: checking for $ac_hdr" >&5
5ee754fc
MK
4581if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4582 echo $ac_n "(cached) $ac_c" 1>&6
4583else
4584 cat > conftest.$ac_ext <<EOF
d9feb4e7 4585#line 4586 "configure"
5ee754fc
MK
4586#include "confdefs.h"
4587#include <$ac_hdr>
4588EOF
4589ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4590{ (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4591ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4592if test -z "$ac_err"; then
4593 rm -rf conftest*
4594 eval "ac_cv_header_$ac_safe=yes"
4595else
4596 echo "$ac_err" >&5
4597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
4599 rm -rf conftest*
4600 eval "ac_cv_header_$ac_safe=no"
4601fi
4602rm -f conftest*
4603fi
4604if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4605 echo "$ac_t""yes" 1>&6
4606 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4607 cat >> confdefs.h <<EOF
4608#define $ac_tr_hdr 1
4609EOF
4610
4611else
4612 echo "$ac_t""no" 1>&6
4613fi
4614done
4615
4616for ac_hdr in sys/file.h
4617do
4618ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4619echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4620echo "configure:4621: checking for $ac_hdr" >&5
5ee754fc
MK
4621if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4622 echo $ac_n "(cached) $ac_c" 1>&6
4623else
4624 cat > conftest.$ac_ext <<EOF
d9feb4e7 4625#line 4626 "configure"
5ee754fc
MK
4626#include "confdefs.h"
4627#include <$ac_hdr>
4628EOF
4629ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4630{ (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4631ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4632if test -z "$ac_err"; then
4633 rm -rf conftest*
4634 eval "ac_cv_header_$ac_safe=yes"
4635else
4636 echo "$ac_err" >&5
4637 echo "configure: failed program was:" >&5
4638 cat conftest.$ac_ext >&5
4639 rm -rf conftest*
4640 eval "ac_cv_header_$ac_safe=no"
4641fi
4642rm -f conftest*
4643fi
4644if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4645 echo "$ac_t""yes" 1>&6
4646 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4647 cat >> confdefs.h <<EOF
4648#define $ac_tr_hdr 1
4649EOF
4650
4651else
4652 echo "$ac_t""no" 1>&6
4653fi
4654done
4655
4656for ac_hdr in sys/filio.h
4657do
4658ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4659echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4660echo "configure:4661: checking for $ac_hdr" >&5
5ee754fc
MK
4661if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4662 echo $ac_n "(cached) $ac_c" 1>&6
4663else
4664 cat > conftest.$ac_ext <<EOF
d9feb4e7 4665#line 4666 "configure"
5ee754fc
MK
4666#include "confdefs.h"
4667#include <$ac_hdr>
4668EOF
4669ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4670{ (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4671ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4672if test -z "$ac_err"; then
4673 rm -rf conftest*
4674 eval "ac_cv_header_$ac_safe=yes"
4675else
4676 echo "$ac_err" >&5
4677 echo "configure: failed program was:" >&5
4678 cat conftest.$ac_ext >&5
4679 rm -rf conftest*
4680 eval "ac_cv_header_$ac_safe=no"
4681fi
4682rm -f conftest*
4683fi
4684if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4685 echo "$ac_t""yes" 1>&6
4686 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4687 cat >> confdefs.h <<EOF
4688#define $ac_tr_hdr 1
4689EOF
4690
4691else
4692 echo "$ac_t""no" 1>&6
4693fi
4694done
4695
4696for ac_hdr in sys/ioctl.h
4697do
4698ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4699echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4700echo "configure:4701: checking for $ac_hdr" >&5
5ee754fc
MK
4701if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4702 echo $ac_n "(cached) $ac_c" 1>&6
4703else
4704 cat > conftest.$ac_ext <<EOF
d9feb4e7 4705#line 4706 "configure"
5ee754fc
MK
4706#include "confdefs.h"
4707#include <$ac_hdr>
4708EOF
4709ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4710{ (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4711ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4712if test -z "$ac_err"; then
4713 rm -rf conftest*
4714 eval "ac_cv_header_$ac_safe=yes"
4715else
4716 echo "$ac_err" >&5
4717 echo "configure: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4719 rm -rf conftest*
4720 eval "ac_cv_header_$ac_safe=no"
4721fi
4722rm -f conftest*
4723fi
4724if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4725 echo "$ac_t""yes" 1>&6
4726 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4727 cat >> confdefs.h <<EOF
4728#define $ac_tr_hdr 1
4729EOF
4730
4731else
4732 echo "$ac_t""no" 1>&6
4733fi
4734done
4735
4736for ac_hdr in sys/param.h
4737do
4738ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4739echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4740echo "configure:4741: checking for $ac_hdr" >&5
5ee754fc
MK
4741if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4742 echo $ac_n "(cached) $ac_c" 1>&6
4743else
4744 cat > conftest.$ac_ext <<EOF
d9feb4e7 4745#line 4746 "configure"
5ee754fc
MK
4746#include "confdefs.h"
4747#include <$ac_hdr>
4748EOF
4749ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4750{ (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4751ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4752if test -z "$ac_err"; then
4753 rm -rf conftest*
4754 eval "ac_cv_header_$ac_safe=yes"
4755else
4756 echo "$ac_err" >&5
4757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 rm -rf conftest*
4760 eval "ac_cv_header_$ac_safe=no"
4761fi
4762rm -f conftest*
4763fi
4764if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4765 echo "$ac_t""yes" 1>&6
4766 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4767 cat >> confdefs.h <<EOF
4768#define $ac_tr_hdr 1
4769EOF
4770
4771else
4772 echo "$ac_t""no" 1>&6
4773fi
4774done
4775
4776for ac_hdr in sys/proc.h
4777do
4778ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4779echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4780echo "configure:4781: checking for $ac_hdr" >&5
5ee754fc
MK
4781if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4782 echo $ac_n "(cached) $ac_c" 1>&6
4783else
4784 cat > conftest.$ac_ext <<EOF
d9feb4e7 4785#line 4786 "configure"
5ee754fc
MK
4786#include "confdefs.h"
4787#include <$ac_hdr>
4788EOF
4789ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4790{ (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4791ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4792if test -z "$ac_err"; then
4793 rm -rf conftest*
4794 eval "ac_cv_header_$ac_safe=yes"
4795else
4796 echo "$ac_err" >&5
4797 echo "configure: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4799 rm -rf conftest*
4800 eval "ac_cv_header_$ac_safe=no"
4801fi
4802rm -f conftest*
4803fi
4804if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4805 echo "$ac_t""yes" 1>&6
4806 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4807 cat >> confdefs.h <<EOF
4808#define $ac_tr_hdr 1
4809EOF
4810
4811else
4812 echo "$ac_t""no" 1>&6
4813fi
4814done
4815
4816for ac_hdr in sys/procfs.h
4817do
4818ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4819echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4820echo "configure:4821: checking for $ac_hdr" >&5
5ee754fc
MK
4821if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4822 echo $ac_n "(cached) $ac_c" 1>&6
4823else
4824 cat > conftest.$ac_ext <<EOF
d9feb4e7 4825#line 4826 "configure"
5ee754fc
MK
4826#include "confdefs.h"
4827#include <$ac_hdr>
4828EOF
4829ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4830{ (eval echo configure:4831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4831ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4832if test -z "$ac_err"; then
4833 rm -rf conftest*
4834 eval "ac_cv_header_$ac_safe=yes"
4835else
4836 echo "$ac_err" >&5
4837 echo "configure: failed program was:" >&5
4838 cat conftest.$ac_ext >&5
4839 rm -rf conftest*
4840 eval "ac_cv_header_$ac_safe=no"
4841fi
4842rm -f conftest*
4843fi
4844if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4845 echo "$ac_t""yes" 1>&6
4846 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4847 cat >> confdefs.h <<EOF
4848#define $ac_tr_hdr 1
4849EOF
4850
4851else
4852 echo "$ac_t""no" 1>&6
4853fi
4854done
4855
4856for ac_hdr in sys/ptrace.h ptrace.h
4857do
4858ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4859echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4860echo "configure:4861: checking for $ac_hdr" >&5
5ee754fc
MK
4861if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4862 echo $ac_n "(cached) $ac_c" 1>&6
4863else
4864 cat > conftest.$ac_ext <<EOF
d9feb4e7 4865#line 4866 "configure"
5ee754fc
MK
4866#include "confdefs.h"
4867#include <$ac_hdr>
4868EOF
4869ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4870{ (eval echo configure:4871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4871ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4872if test -z "$ac_err"; then
4873 rm -rf conftest*
4874 eval "ac_cv_header_$ac_safe=yes"
4875else
4876 echo "$ac_err" >&5
4877 echo "configure: failed program was:" >&5
4878 cat conftest.$ac_ext >&5
4879 rm -rf conftest*
4880 eval "ac_cv_header_$ac_safe=no"
4881fi
4882rm -f conftest*
4883fi
4884if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4885 echo "$ac_t""yes" 1>&6
4886 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4887 cat >> confdefs.h <<EOF
4888#define $ac_tr_hdr 1
4889EOF
4890
4891else
4892 echo "$ac_t""no" 1>&6
4893fi
4894done
4895
4896for ac_hdr in sys/reg.h sys/debugreg.h
4897do
4898ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4899echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4900echo "configure:4901: checking for $ac_hdr" >&5
5ee754fc
MK
4901if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4902 echo $ac_n "(cached) $ac_c" 1>&6
4903else
4904 cat > conftest.$ac_ext <<EOF
d9feb4e7 4905#line 4906 "configure"
5ee754fc
MK
4906#include "confdefs.h"
4907#include <$ac_hdr>
4908EOF
4909ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4910{ (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4911ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4912if test -z "$ac_err"; then
4913 rm -rf conftest*
4914 eval "ac_cv_header_$ac_safe=yes"
4915else
4916 echo "$ac_err" >&5
4917 echo "configure: failed program was:" >&5
4918 cat conftest.$ac_ext >&5
4919 rm -rf conftest*
4920 eval "ac_cv_header_$ac_safe=no"
4921fi
4922rm -f conftest*
4923fi
4924if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4925 echo "$ac_t""yes" 1>&6
4926 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4927 cat >> confdefs.h <<EOF
4928#define $ac_tr_hdr 1
4929EOF
4930
4931else
4932 echo "$ac_t""no" 1>&6
4933fi
4934done
4935
4936for ac_hdr in sys/select.h
4937do
4938ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4939echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4940echo "configure:4941: checking for $ac_hdr" >&5
5ee754fc
MK
4941if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4942 echo $ac_n "(cached) $ac_c" 1>&6
4943else
4944 cat > conftest.$ac_ext <<EOF
d9feb4e7 4945#line 4946 "configure"
5ee754fc
MK
4946#include "confdefs.h"
4947#include <$ac_hdr>
4948EOF
4949ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4950{ (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4951ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4952if test -z "$ac_err"; then
4953 rm -rf conftest*
4954 eval "ac_cv_header_$ac_safe=yes"
4955else
4956 echo "$ac_err" >&5
4957 echo "configure: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4959 rm -rf conftest*
4960 eval "ac_cv_header_$ac_safe=no"
4961fi
4962rm -f conftest*
4963fi
4964if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4965 echo "$ac_t""yes" 1>&6
4966 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4967 cat >> confdefs.h <<EOF
4968#define $ac_tr_hdr 1
4969EOF
4970
4971else
4972 echo "$ac_t""no" 1>&6
4973fi
4974done
4975
4976for ac_hdr in sys/syscall.h
4977do
4978ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4979echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 4980echo "configure:4981: checking for $ac_hdr" >&5
5ee754fc
MK
4981if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4982 echo $ac_n "(cached) $ac_c" 1>&6
4983else
4984 cat > conftest.$ac_ext <<EOF
d9feb4e7 4985#line 4986 "configure"
5ee754fc
MK
4986#include "confdefs.h"
4987#include <$ac_hdr>
4988EOF
4989ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 4990{ (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4991ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4992if test -z "$ac_err"; then
4993 rm -rf conftest*
4994 eval "ac_cv_header_$ac_safe=yes"
4995else
4996 echo "$ac_err" >&5
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 rm -rf conftest*
5000 eval "ac_cv_header_$ac_safe=no"
5001fi
5002rm -f conftest*
5003fi
5004if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5005 echo "$ac_t""yes" 1>&6
5006 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5007 cat >> confdefs.h <<EOF
5008#define $ac_tr_hdr 1
5009EOF
5010
5011else
5012 echo "$ac_t""no" 1>&6
5013fi
5014done
5015
5016for ac_hdr in sys/user.h
5017do
5018ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5019echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5020echo "configure:5021: checking for $ac_hdr" >&5
5ee754fc
MK
5021if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5022 echo $ac_n "(cached) $ac_c" 1>&6
5023else
5024 cat > conftest.$ac_ext <<EOF
d9feb4e7 5025#line 5026 "configure"
5ee754fc
MK
5026#include "confdefs.h"
5027#include <$ac_hdr>
5028EOF
5029ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5030{ (eval echo configure:5031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5031ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5032if test -z "$ac_err"; then
5033 rm -rf conftest*
5034 eval "ac_cv_header_$ac_safe=yes"
5035else
5036 echo "$ac_err" >&5
5037 echo "configure: failed program was:" >&5
5038 cat conftest.$ac_ext >&5
5039 rm -rf conftest*
5040 eval "ac_cv_header_$ac_safe=no"
5041fi
5042rm -f conftest*
5043fi
5044if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5045 echo "$ac_t""yes" 1>&6
5046 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5047 cat >> confdefs.h <<EOF
5048#define $ac_tr_hdr 1
5049EOF
5050
5051else
5052 echo "$ac_t""no" 1>&6
5053fi
5054done
5055
5056for ac_hdr in sys/wait.h wait.h
5057do
5058ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5059echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5060echo "configure:5061: checking for $ac_hdr" >&5
5ee754fc
MK
5061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5062 echo $ac_n "(cached) $ac_c" 1>&6
5063else
5064 cat > conftest.$ac_ext <<EOF
d9feb4e7 5065#line 5066 "configure"
5ee754fc
MK
5066#include "confdefs.h"
5067#include <$ac_hdr>
5068EOF
5069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5070{ (eval echo configure:5071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5071ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5072if test -z "$ac_err"; then
5073 rm -rf conftest*
5074 eval "ac_cv_header_$ac_safe=yes"
5075else
5076 echo "$ac_err" >&5
9608ab8b
MK
5077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
5079 rm -rf conftest*
5ee754fc 5080 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5081fi
5082rm -f conftest*
5083fi
5ee754fc 5084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5085 echo "$ac_t""yes" 1>&6
5086 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5087 cat >> confdefs.h <<EOF
5088#define $ac_tr_hdr 1
5089EOF
5ee754fc 5090
9608ab8b
MK
5091else
5092 echo "$ac_t""no" 1>&6
5093fi
5094done
5ee754fc
MK
5095
5096for ac_hdr in termios.h termio.h sgtty.h
5097do
5098ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5099echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5100echo "configure:5101: checking for $ac_hdr" >&5
5ee754fc 5101if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5102 echo $ac_n "(cached) $ac_c" 1>&6
5103else
5ee754fc 5104 cat > conftest.$ac_ext <<EOF
d9feb4e7 5105#line 5106 "configure"
9608ab8b 5106#include "confdefs.h"
5ee754fc 5107#include <$ac_hdr>
9608ab8b 5108EOF
5ee754fc 5109ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5110{ (eval echo configure:5111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5111ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5112if test -z "$ac_err"; then
9608ab8b 5113 rm -rf conftest*
5ee754fc 5114 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5115else
5ee754fc 5116 echo "$ac_err" >&5
9608ab8b
MK
5117 echo "configure: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 rm -rf conftest*
5ee754fc 5120 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5121fi
5122rm -f conftest*
9608ab8b 5123fi
5ee754fc 5124if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5125 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5126 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5127 cat >> confdefs.h <<EOF
5128#define $ac_tr_hdr 1
5129EOF
5130
9608ab8b
MK
5131else
5132 echo "$ac_t""no" 1>&6
5133fi
5ee754fc 5134done
9608ab8b 5135
5ee754fc
MK
5136for ac_hdr in unistd.h
5137do
5138ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5139echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5140echo "configure:5141: checking for $ac_hdr" >&5
5ee754fc 5141if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5142 echo $ac_n "(cached) $ac_c" 1>&6
5143else
5ee754fc 5144 cat > conftest.$ac_ext <<EOF
d9feb4e7 5145#line 5146 "configure"
9608ab8b 5146#include "confdefs.h"
5ee754fc 5147#include <$ac_hdr>
9608ab8b 5148EOF
5ee754fc 5149ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5150{ (eval echo configure:5151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5151ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5152if test -z "$ac_err"; then
9608ab8b 5153 rm -rf conftest*
5ee754fc 5154 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5155else
5ee754fc 5156 echo "$ac_err" >&5
9608ab8b
MK
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5159 rm -rf conftest*
5ee754fc 5160 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5161fi
5162rm -f conftest*
9608ab8b 5163fi
5ee754fc 5164if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5165 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5166 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5167 cat >> confdefs.h <<EOF
5168#define $ac_tr_hdr 1
5169EOF
5170
9608ab8b
MK
5171else
5172 echo "$ac_t""no" 1>&6
5173fi
5ee754fc 5174done
9608ab8b 5175
9608ab8b 5176
5ee754fc
MK
5177# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5178# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5179# think that we don't have <curses.h> if we're using GCC.
5180case $host_os in
5181 solaris2.[78])
5182 if test "$GCC" = yes; then
5183 cat >> confdefs.h <<\EOF
5184#define _MSE_INT_H 1
5185EOF
5186
5187 fi ;;
5188esac
5189for ac_hdr in curses.h ncurses.h term.h
5190do
5191ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5192echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5193echo "configure:5194: checking for $ac_hdr" >&5
5ee754fc 5194if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5195 echo $ac_n "(cached) $ac_c" 1>&6
5196else
5197 cat > conftest.$ac_ext <<EOF
d9feb4e7 5198#line 5199 "configure"
c906108c 5199#include "confdefs.h"
5ee754fc 5200#include <$ac_hdr>
c906108c
SS
5201EOF
5202ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5203{ (eval echo configure:5204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5204ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5205if test -z "$ac_err"; then
5206 rm -rf conftest*
5ee754fc 5207 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5208else
5209 echo "$ac_err" >&5
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5ee754fc 5213 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5214fi
5215rm -f conftest*
c906108c 5216fi
5ee754fc
MK
5217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5218 echo "$ac_t""yes" 1>&6
5219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5220 cat >> confdefs.h <<EOF
5221#define $ac_tr_hdr 1
c906108c 5222EOF
5ee754fc 5223
c906108c 5224else
5ee754fc 5225 echo "$ac_t""no" 1>&6
c906108c 5226fi
5ee754fc 5227done
c906108c
SS
5228
5229
5ee754fc
MK
5230# FIXME: kettenis/20030102: In most cases we include these
5231# unconditionally, so what's the point in checking these?
5232for ac_hdr in ctype.h time.h
c906108c
SS
5233do
5234ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5235echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5236echo "configure:5237: checking for $ac_hdr" >&5
c906108c
SS
5237if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5238 echo $ac_n "(cached) $ac_c" 1>&6
5239else
5240 cat > conftest.$ac_ext <<EOF
d9feb4e7 5241#line 5242 "configure"
c906108c
SS
5242#include "confdefs.h"
5243#include <$ac_hdr>
5244EOF
5245ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5246{ (eval echo configure:5247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5247ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5248if test -z "$ac_err"; then
5249 rm -rf conftest*
5250 eval "ac_cv_header_$ac_safe=yes"
5251else
5252 echo "$ac_err" >&5
5253 echo "configure: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 rm -rf conftest*
5256 eval "ac_cv_header_$ac_safe=no"
5257fi
5258rm -f conftest*
5259fi
5260if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5261 echo "$ac_t""yes" 1>&6
5262 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5263 cat >> confdefs.h <<EOF
5264#define $ac_tr_hdr 1
5265EOF
5266
5267else
5268 echo "$ac_t""no" 1>&6
5269fi
5270done
5271
5ee754fc
MK
5272
5273# ------------------ #
5274# Checks for types. #
5275# ------------------ #
5276
5277echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
d9feb4e7 5278echo "configure:5279: checking return type of signal handlers" >&5
5ee754fc 5279if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5280 echo $ac_n "(cached) $ac_c" 1>&6
5281else
5282 cat > conftest.$ac_ext <<EOF
d9feb4e7 5283#line 5284 "configure"
c906108c
SS
5284#include "confdefs.h"
5285#include <sys/types.h>
5ee754fc
MK
5286#include <signal.h>
5287#ifdef signal
5288#undef signal
c906108c 5289#endif
5ee754fc
MK
5290#ifdef __cplusplus
5291extern "C" void (*signal (int, void (*)(int)))(int);
5292#else
5293void (*signal ()) ();
c906108c
SS
5294#endif
5295
5ee754fc
MK
5296int main() {
5297int i;
5298; return 0; }
c906108c 5299EOF
d9feb4e7 5300if { (eval echo configure:5301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5301 rm -rf conftest*
5ee754fc 5302 ac_cv_type_signal=void
c906108c 5303else
5ee754fc
MK
5304 echo "configure: failed program was:" >&5
5305 cat conftest.$ac_ext >&5
c906108c 5306 rm -rf conftest*
5ee754fc 5307 ac_cv_type_signal=int
c906108c
SS
5308fi
5309rm -f conftest*
c906108c
SS
5310fi
5311
5ee754fc
MK
5312echo "$ac_t""$ac_cv_type_signal" 1>&6
5313cat >> confdefs.h <<EOF
5314#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5315EOF
5316
c906108c
SS
5317
5318
5ee754fc
MK
5319# ------------------------------------- #
5320# Checks for compiler characteristics. #
5321# ------------------------------------- #
5322
c906108c 5323echo $ac_n "checking for working const""... $ac_c" 1>&6
d9feb4e7 5324echo "configure:5325: checking for working const" >&5
c906108c
SS
5325if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5326 echo $ac_n "(cached) $ac_c" 1>&6
5327else
5328 cat > conftest.$ac_ext <<EOF
d9feb4e7 5329#line 5330 "configure"
c906108c
SS
5330#include "confdefs.h"
5331
5332int main() {
5333
5334/* Ultrix mips cc rejects this. */
5335typedef int charset[2]; const charset x;
5336/* SunOS 4.1.1 cc rejects this. */
5337char const *const *ccp;
5338char **p;
5339/* NEC SVR4.0.2 mips cc rejects this. */
5340struct point {int x, y;};
5341static struct point const zero = {0,0};
5342/* AIX XL C 1.02.0.0 rejects this.
5343 It does not let you subtract one const X* pointer from another in an arm
5344 of an if-expression whose if-part is not a constant expression */
5345const char *g = "string";
5346ccp = &g + (g ? g-g : 0);
5347/* HPUX 7.0 cc rejects these. */
5348++ccp;
5349p = (char**) ccp;
5350ccp = (char const *const *) p;
5351{ /* SCO 3.2v4 cc rejects this. */
5352 char *t;
5353 char const *s = 0 ? (char *) 0 : (char const *) 0;
5354
5355 *t++ = 0;
5356}
5357{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5358 int x[] = {25, 17};
5359 const int *foo = &x[0];
5360 ++foo;
5361}
5362{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5363 typedef const int *iptr;
5364 iptr p = 0;
5365 ++p;
5366}
5367{ /* AIX XL C 1.02.0.0 rejects this saying
5368 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5369 struct s { int j; const int *ap[3]; };
5370 struct s *b; b->j = 5;
5371}
5372{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5373 const int foo = 10;
5374}
5375
5376; return 0; }
5377EOF
d9feb4e7 5378if { (eval echo configure:5379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5379 rm -rf conftest*
5380 ac_cv_c_const=yes
5381else
5382 echo "configure: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
5384 rm -rf conftest*
5385 ac_cv_c_const=no
5386fi
5387rm -f conftest*
5388fi
5389
5390echo "$ac_t""$ac_cv_c_const" 1>&6
5391if test $ac_cv_c_const = no; then
5392 cat >> confdefs.h <<\EOF
5393#define const
5394EOF
5395
5396fi
5397
bce58c09 5398echo $ac_n "checking for inline""... $ac_c" 1>&6
d9feb4e7 5399echo "configure:5400: checking for inline" >&5
bce58c09
JB
5400if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5401 echo $ac_n "(cached) $ac_c" 1>&6
5402else
5403 ac_cv_c_inline=no
5404for ac_kw in inline __inline__ __inline; do
5405 cat > conftest.$ac_ext <<EOF
d9feb4e7 5406#line 5407 "configure"
bce58c09
JB
5407#include "confdefs.h"
5408
5409int main() {
5410} $ac_kw foo() {
5411; return 0; }
5412EOF
d9feb4e7 5413if { (eval echo configure:5414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5414 rm -rf conftest*
5415 ac_cv_c_inline=$ac_kw; break
5416else
5417 echo "configure: failed program was:" >&5
5418 cat conftest.$ac_ext >&5
5419fi
5420rm -f conftest*
5421done
5422
5423fi
5424
5425echo "$ac_t""$ac_cv_c_inline" 1>&6
5426case "$ac_cv_c_inline" in
5427 inline | yes) ;;
5428 no) cat >> confdefs.h <<\EOF
5429#define inline
5430EOF
5431 ;;
5432 *) cat >> confdefs.h <<EOF
5433#define inline $ac_cv_c_inline
5434EOF
5435 ;;
5436esac
5437
c906108c 5438
5ee754fc
MK
5439# ------------------------------ #
5440# Checks for library functions. #
5441# ------------------------------ #
5442
46711df8
MK
5443# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5444# for constant arguments. Useless!
5445echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d9feb4e7 5446echo "configure:5447: checking for working alloca.h" >&5
46711df8
MK
5447if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5448 echo $ac_n "(cached) $ac_c" 1>&6
5449else
5450 cat > conftest.$ac_ext <<EOF
d9feb4e7 5451#line 5452 "configure"
46711df8
MK
5452#include "confdefs.h"
5453#include <alloca.h>
5454int main() {
5455char *p = alloca(2 * sizeof(int));
5456; return 0; }
5457EOF
d9feb4e7 5458if { (eval echo configure:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5459 rm -rf conftest*
5460 ac_cv_header_alloca_h=yes
5461else
5462 echo "configure: failed program was:" >&5
5463 cat conftest.$ac_ext >&5
5464 rm -rf conftest*
5465 ac_cv_header_alloca_h=no
5466fi
5467rm -f conftest*
5468fi
5469
5470echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5471if test $ac_cv_header_alloca_h = yes; then
5472 cat >> confdefs.h <<\EOF
5473#define HAVE_ALLOCA_H 1
5474EOF
5475
5476fi
5477
5478echo $ac_n "checking for alloca""... $ac_c" 1>&6
d9feb4e7 5479echo "configure:5480: checking for alloca" >&5
46711df8
MK
5480if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5481 echo $ac_n "(cached) $ac_c" 1>&6
5482else
5483 cat > conftest.$ac_ext <<EOF
d9feb4e7 5484#line 5485 "configure"
46711df8
MK
5485#include "confdefs.h"
5486
5487#ifdef __GNUC__
5488# define alloca __builtin_alloca
5489#else
5490# ifdef _MSC_VER
5491# include <malloc.h>
5492# define alloca _alloca
5493# else
5494# if HAVE_ALLOCA_H
5495# include <alloca.h>
5496# else
5497# ifdef _AIX
5498 #pragma alloca
5499# else
5500# ifndef alloca /* predefined by HP cc +Olibcalls */
5501char *alloca ();
5502# endif
5503# endif
5504# endif
5505# endif
5506#endif
5507
5508int main() {
5509char *p = (char *) alloca(1);
5510; return 0; }
5511EOF
d9feb4e7 5512if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5513 rm -rf conftest*
5514 ac_cv_func_alloca_works=yes
5515else
5516 echo "configure: failed program was:" >&5
5517 cat conftest.$ac_ext >&5
5518 rm -rf conftest*
5519 ac_cv_func_alloca_works=no
5520fi
5521rm -f conftest*
5522fi
5523
5524echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5525if test $ac_cv_func_alloca_works = yes; then
5526 cat >> confdefs.h <<\EOF
5527#define HAVE_ALLOCA 1
5528EOF
5529
5530fi
5531
5532if test $ac_cv_func_alloca_works = no; then
5533 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5534 # that cause trouble. Some versions do not even contain alloca or
5535 # contain a buggy version. If you still want to use their alloca,
5536 # use ar to extract alloca.o from them instead of compiling alloca.c.
5537 ALLOCA=alloca.${ac_objext}
5538 cat >> confdefs.h <<\EOF
5539#define C_ALLOCA 1
5540EOF
5541
5542
5543echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d9feb4e7 5544echo "configure:5545: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5545if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5546 echo $ac_n "(cached) $ac_c" 1>&6
5547else
5548 cat > conftest.$ac_ext <<EOF
d9feb4e7 5549#line 5550 "configure"
46711df8
MK
5550#include "confdefs.h"
5551#if defined(CRAY) && ! defined(CRAY2)
5552webecray
5553#else
5554wenotbecray
5555#endif
5556
5557EOF
5558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5559 egrep "webecray" >/dev/null 2>&1; then
5560 rm -rf conftest*
5561 ac_cv_os_cray=yes
5562else
5563 rm -rf conftest*
5564 ac_cv_os_cray=no
5565fi
5566rm -f conftest*
5567
5568fi
5569
5570echo "$ac_t""$ac_cv_os_cray" 1>&6
5571if test $ac_cv_os_cray = yes; then
5572for ac_func in _getb67 GETB67 getb67; do
5573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 5574echo "configure:5575: checking for $ac_func" >&5
46711df8
MK
5575if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577else
5578 cat > conftest.$ac_ext <<EOF
d9feb4e7 5579#line 5580 "configure"
46711df8
MK
5580#include "confdefs.h"
5581/* System header to define __stub macros and hopefully few prototypes,
5582 which can conflict with char $ac_func(); below. */
5583#include <assert.h>
5584/* Override any gcc2 internal prototype to avoid an error. */
5585/* We use char because int might match the return type of a gcc2
5586 builtin and then its argument prototype would still apply. */
5587char $ac_func();
5588
5589int main() {
5590
5591/* The GNU C library defines this for functions which it implements
5592 to always fail with ENOSYS. Some functions are actually named
5593 something starting with __ and the normal name is an alias. */
5594#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5595choke me
5596#else
5597$ac_func();
5598#endif
5599
5600; return 0; }
5601EOF
d9feb4e7 5602if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5603 rm -rf conftest*
5604 eval "ac_cv_func_$ac_func=yes"
5605else
5606 echo "configure: failed program was:" >&5
5607 cat conftest.$ac_ext >&5
5608 rm -rf conftest*
5609 eval "ac_cv_func_$ac_func=no"
5610fi
5611rm -f conftest*
5612fi
5613
5614if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5615 echo "$ac_t""yes" 1>&6
5616 cat >> confdefs.h <<EOF
5617#define CRAY_STACKSEG_END $ac_func
5618EOF
5619
5620 break
5621else
5622 echo "$ac_t""no" 1>&6
5623fi
5624
5625done
5626fi
5627
5628echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d9feb4e7 5629echo "configure:5630: checking stack direction for C alloca" >&5
46711df8
MK
5630if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5631 echo $ac_n "(cached) $ac_c" 1>&6
5632else
5633 if test "$cross_compiling" = yes; then
5634 ac_cv_c_stack_direction=0
5635else
5636 cat > conftest.$ac_ext <<EOF
d9feb4e7 5637#line 5638 "configure"
46711df8
MK
5638#include "confdefs.h"
5639find_stack_direction ()
5640{
5641 static char *addr = 0;
5642 auto char dummy;
5643 if (addr == 0)
5644 {
5645 addr = &dummy;
5646 return find_stack_direction ();
5647 }
5648 else
5649 return (&dummy > addr) ? 1 : -1;
5650}
5651main ()
5652{
5653 exit (find_stack_direction() < 0);
5654}
5655EOF
d9feb4e7 5656if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5657then
5658 ac_cv_c_stack_direction=1
5659else
5660 echo "configure: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 rm -fr conftest*
5663 ac_cv_c_stack_direction=-1
5664fi
5665rm -fr conftest*
5666fi
5667
5668fi
5669
5670echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5671cat >> confdefs.h <<EOF
5672#define STACK_DIRECTION $ac_cv_c_stack_direction
5673EOF
5674
5675fi
5676
97bf5e38
MK
5677for ac_hdr in unistd.h
5678do
5679ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5680echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d9feb4e7 5681echo "configure:5682: checking for $ac_hdr" >&5
74c1b268
AC
5682if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5683 echo $ac_n "(cached) $ac_c" 1>&6
5684else
5685 cat > conftest.$ac_ext <<EOF
d9feb4e7 5686#line 5687 "configure"
74c1b268 5687#include "confdefs.h"
97bf5e38 5688#include <$ac_hdr>
74c1b268
AC
5689EOF
5690ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5691{ (eval echo configure:5692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5692ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5693if test -z "$ac_err"; then
5694 rm -rf conftest*
5695 eval "ac_cv_header_$ac_safe=yes"
5696else
5697 echo "$ac_err" >&5
5698 echo "configure: failed program was:" >&5
5699 cat conftest.$ac_ext >&5
5700 rm -rf conftest*
5701 eval "ac_cv_header_$ac_safe=no"
5702fi
5703rm -f conftest*
5704fi
5705if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5706 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5707 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5708 cat >> confdefs.h <<EOF
5709#define $ac_tr_hdr 1
74c1b268 5710EOF
97bf5e38 5711
74c1b268
AC
5712else
5713 echo "$ac_t""no" 1>&6
5714fi
97bf5e38 5715done
74c1b268 5716
97bf5e38
MK
5717for ac_func in getpagesize
5718do
5719echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 5720echo "configure:5721: checking for $ac_func" >&5
97bf5e38 5721if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5722 echo $ac_n "(cached) $ac_c" 1>&6
5723else
5724 cat > conftest.$ac_ext <<EOF
d9feb4e7 5725#line 5726 "configure"
74c1b268
AC
5726#include "confdefs.h"
5727/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5728 which can conflict with char $ac_func(); below. */
74c1b268
AC
5729#include <assert.h>
5730/* Override any gcc2 internal prototype to avoid an error. */
5731/* We use char because int might match the return type of a gcc2
5732 builtin and then its argument prototype would still apply. */
97bf5e38 5733char $ac_func();
74c1b268
AC
5734
5735int main() {
5736
5737/* The GNU C library defines this for functions which it implements
5738 to always fail with ENOSYS. Some functions are actually named
5739 something starting with __ and the normal name is an alias. */
97bf5e38 5740#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5741choke me
5742#else
97bf5e38 5743$ac_func();
74c1b268
AC
5744#endif
5745
5746; return 0; }
5747EOF
d9feb4e7 5748if { (eval echo configure:5749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5749 rm -rf conftest*
97bf5e38 5750 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5751else
5752 echo "configure: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 rm -rf conftest*
97bf5e38 5755 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5756fi
5757rm -f conftest*
5758fi
5759
97bf5e38 5760if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5761 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5762 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5763 cat >> confdefs.h <<EOF
5764#define $ac_tr_func 1
5765EOF
5766
74c1b268
AC
5767else
5768 echo "$ac_t""no" 1>&6
5769fi
97bf5e38 5770done
74c1b268 5771
97bf5e38 5772echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d9feb4e7 5773echo "configure:5774: checking for working mmap" >&5
97bf5e38
MK
5774if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5775 echo $ac_n "(cached) $ac_c" 1>&6
5776else
5777 if test "$cross_compiling" = yes; then
5778 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5779else
5780 cat > conftest.$ac_ext <<EOF
d9feb4e7 5781#line 5782 "configure"
74c1b268 5782#include "confdefs.h"
97bf5e38
MK
5783
5784/* Thanks to Mike Haertel and Jim Avera for this test.
5785 Here is a matrix of mmap possibilities:
5786 mmap private not fixed
5787 mmap private fixed at somewhere currently unmapped
5788 mmap private fixed at somewhere already mapped
5789 mmap shared not fixed
5790 mmap shared fixed at somewhere currently unmapped
5791 mmap shared fixed at somewhere already mapped
5792 For private mappings, we should verify that changes cannot be read()
5793 back from the file, nor mmap's back from the file at a different
5794 address. (There have been systems where private was not correctly
5795 implemented like the infamous i386 svr4.0, and systems where the
5796 VM page cache was not coherent with the filesystem buffer cache
5797 like early versions of FreeBSD and possibly contemporary NetBSD.)
5798 For shared mappings, we should conversely verify that changes get
5799 propogated back to all the places they're supposed to be.
5800
5801 Grep wants private fixed already mapped.
5802 The main things grep needs to know about mmap are:
5803 * does it exist and is it safe to write into the mmap'd area
5804 * how to use it (BSD variants) */
74c1b268 5805#include <sys/types.h>
97bf5e38
MK
5806#include <fcntl.h>
5807#include <sys/mman.h>
5808
5809/* This mess was copied from the GNU getpagesize.h. */
5810#ifndef HAVE_GETPAGESIZE
5811# ifdef HAVE_UNISTD_H
5812# include <unistd.h>
5813# endif
5814
5815/* Assume that all systems that can run configure have sys/param.h. */
5816# ifndef HAVE_SYS_PARAM_H
5817# define HAVE_SYS_PARAM_H 1
5818# endif
5819
5820# ifdef _SC_PAGESIZE
5821# define getpagesize() sysconf(_SC_PAGESIZE)
5822# else /* no _SC_PAGESIZE */
5823# ifdef HAVE_SYS_PARAM_H
5824# include <sys/param.h>
5825# ifdef EXEC_PAGESIZE
5826# define getpagesize() EXEC_PAGESIZE
5827# else /* no EXEC_PAGESIZE */
5828# ifdef NBPG
5829# define getpagesize() NBPG * CLSIZE
5830# ifndef CLSIZE
5831# define CLSIZE 1
5832# endif /* no CLSIZE */
5833# else /* no NBPG */
5834# ifdef NBPC
5835# define getpagesize() NBPC
5836# else /* no NBPC */
5837# ifdef PAGESIZE
5838# define getpagesize() PAGESIZE
5839# endif /* PAGESIZE */
5840# endif /* no NBPC */
5841# endif /* no NBPG */
5842# endif /* no EXEC_PAGESIZE */
5843# else /* no HAVE_SYS_PARAM_H */
5844# define getpagesize() 8192 /* punt totally */
5845# endif /* no HAVE_SYS_PARAM_H */
5846# endif /* no _SC_PAGESIZE */
5847
5848#endif /* no HAVE_GETPAGESIZE */
5849
74c1b268 5850#ifdef __cplusplus
97bf5e38 5851extern "C" { void *malloc(unsigned); }
74c1b268 5852#else
97bf5e38 5853char *malloc();
74c1b268 5854#endif
74c1b268 5855
97bf5e38
MK
5856int
5857main()
5858{
5859 char *data, *data2, *data3;
5860 int i, pagesize;
5861 int fd;
74c1b268 5862
97bf5e38 5863 pagesize = getpagesize();
74c1b268 5864
97bf5e38
MK
5865 /*
5866 * First, make a file with some known garbage in it.
5867 */
5868 data = malloc(pagesize);
5869 if (!data)
5870 exit(1);
5871 for (i = 0; i < pagesize; ++i)
5872 *(data + i) = rand();
5873 umask(0);
5874 fd = creat("conftestmmap", 0600);
5875 if (fd < 0)
5876 exit(1);
5877 if (write(fd, data, pagesize) != pagesize)
5878 exit(1);
5879 close(fd);
74c1b268 5880
97bf5e38
MK
5881 /*
5882 * Next, try to mmap the file at a fixed address which
5883 * already has something else allocated at it. If we can,
5884 * also make sure that we see the same garbage.
5885 */
5886 fd = open("conftestmmap", O_RDWR);
5887 if (fd < 0)
5888 exit(1);
5889 data2 = malloc(2 * pagesize);
5890 if (!data2)
5891 exit(1);
5892 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5893 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5894 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5895 exit(1);
5896 for (i = 0; i < pagesize; ++i)
5897 if (*(data + i) != *(data2 + i))
5898 exit(1);
74c1b268 5899
97bf5e38
MK
5900 /*
5901 * Finally, make sure that changes to the mapped area
5902 * do not percolate back to the file as seen by read().
5903 * (This is a bug on some variants of i386 svr4.0.)
5904 */
5905 for (i = 0; i < pagesize; ++i)
5906 *(data2 + i) = *(data2 + i) + 1;
5907 data3 = malloc(pagesize);
5908 if (!data3)
5909 exit(1);
5910 if (read(fd, data3, pagesize) != pagesize)
5911 exit(1);
5912 for (i = 0; i < pagesize; ++i)
5913 if (*(data + i) != *(data3 + i))
5914 exit(1);
5915 close(fd);
5916 unlink("conftestmmap");
5917 exit(0);
74c1b268 5918}
97bf5e38 5919
74c1b268 5920EOF
d9feb4e7 5921if { (eval echo configure:5922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5922then
97bf5e38 5923 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5924else
5925 echo "configure: failed program was:" >&5
5926 cat conftest.$ac_ext >&5
5927 rm -fr conftest*
97bf5e38 5928 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5929fi
5930rm -fr conftest*
5931fi
5932
5933fi
5934
97bf5e38
MK
5935echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5936if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5937 cat >> confdefs.h <<\EOF
97bf5e38 5938#define HAVE_MMAP 1
74c1b268
AC
5939EOF
5940
5941fi
5942
97bf5e38 5943echo $ac_n "checking for pid_t""... $ac_c" 1>&6
d9feb4e7 5944echo "configure:5945: checking for pid_t" >&5
97bf5e38 5945if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5946 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5947else
5948 cat > conftest.$ac_ext <<EOF
d9feb4e7 5949#line 5950 "configure"
0200359f 5950#include "confdefs.h"
97bf5e38
MK
5951#include <sys/types.h>
5952#if STDC_HEADERS
5953#include <stdlib.h>
5954#include <stddef.h>
0200359f 5955#endif
0200359f 5956EOF
97bf5e38
MK
5957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5958 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5959 rm -rf conftest*
5960 ac_cv_type_pid_t=yes
0200359f 5961else
97bf5e38
MK
5962 rm -rf conftest*
5963 ac_cv_type_pid_t=no
0200359f 5964fi
97bf5e38 5965rm -f conftest*
0200359f
MK
5966
5967fi
97bf5e38
MK
5968echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5969if test $ac_cv_type_pid_t = no; then
0200359f 5970 cat >> confdefs.h <<\EOF
97bf5e38 5971#define pid_t int
0200359f
MK
5972EOF
5973
5974fi
5975
97bf5e38
MK
5976ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5977echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
d9feb4e7 5978echo "configure:5979: checking for vfork.h" >&5
97bf5e38 5979if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5980 echo $ac_n "(cached) $ac_c" 1>&6
5981else
5982 cat > conftest.$ac_ext <<EOF
d9feb4e7 5983#line 5984 "configure"
72473524 5984#include "confdefs.h"
97bf5e38 5985#include <vfork.h>
72473524 5986EOF
97bf5e38 5987ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 5988{ (eval echo configure:5989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5989ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5990if test -z "$ac_err"; then
72473524 5991 rm -rf conftest*
97bf5e38 5992 eval "ac_cv_header_$ac_safe=yes"
72473524 5993else
97bf5e38 5994 echo "$ac_err" >&5
72473524
DJ
5995 echo "configure: failed program was:" >&5
5996 cat conftest.$ac_ext >&5
5997 rm -rf conftest*
97bf5e38 5998 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5999fi
6000rm -f conftest*
6001fi
97bf5e38
MK
6002if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6003 echo "$ac_t""yes" 1>&6
72473524 6004 cat >> confdefs.h <<\EOF
97bf5e38 6005#define HAVE_VFORK_H 1
72473524
DJ
6006EOF
6007
97bf5e38
MK
6008else
6009 echo "$ac_t""no" 1>&6
72473524 6010fi
c906108c 6011
97bf5e38 6012echo $ac_n "checking for working vfork""... $ac_c" 1>&6
d9feb4e7 6013echo "configure:6014: checking for working vfork" >&5
97bf5e38
MK
6014if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6015 echo $ac_n "(cached) $ac_c" 1>&6
6016else
6017 if test "$cross_compiling" = yes; then
6018 echo $ac_n "checking for vfork""... $ac_c" 1>&6
d9feb4e7 6019echo "configure:6020: checking for vfork" >&5
97bf5e38 6020if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6021 echo $ac_n "(cached) $ac_c" 1>&6
6022else
6023 cat > conftest.$ac_ext <<EOF
d9feb4e7 6024#line 6025 "configure"
2b2d558c 6025#include "confdefs.h"
97bf5e38
MK
6026/* System header to define __stub macros and hopefully few prototypes,
6027 which can conflict with char vfork(); below. */
6028#include <assert.h>
6029/* Override any gcc2 internal prototype to avoid an error. */
6030/* We use char because int might match the return type of a gcc2
6031 builtin and then its argument prototype would still apply. */
6032char vfork();
2b2d558c
MK
6033
6034int main() {
97bf5e38
MK
6035
6036/* The GNU C library defines this for functions which it implements
6037 to always fail with ENOSYS. Some functions are actually named
6038 something starting with __ and the normal name is an alias. */
6039#if defined (__stub_vfork) || defined (__stub___vfork)
6040choke me
6041#else
6042vfork();
6043#endif
6044
2b2d558c
MK
6045; return 0; }
6046EOF
d9feb4e7 6047if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6048 rm -rf conftest*
97bf5e38 6049 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6050else
6051 echo "configure: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6053 rm -rf conftest*
97bf5e38 6054 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6055fi
6056rm -f conftest*
6057fi
6058
97bf5e38
MK
6059if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6060 echo "$ac_t""yes" 1>&6
6061 :
6062else
6063 echo "$ac_t""no" 1>&6
2b2d558c
MK
6064fi
6065
97bf5e38 6066ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6067else
6068 cat > conftest.$ac_ext <<EOF
d9feb4e7 6069#line 6070 "configure"
7dfa765c 6070#include "confdefs.h"
97bf5e38
MK
6071/* Thanks to Paul Eggert for this test. */
6072#include <stdio.h>
6073#include <sys/types.h>
6074#include <sys/stat.h>
6075#ifdef HAVE_UNISTD_H
6076#include <unistd.h>
6077#endif
6078#ifdef HAVE_VFORK_H
6079#include <vfork.h>
6080#endif
6081/* On some sparc systems, changes by the child to local and incoming
6082 argument registers are propagated back to the parent.
6083 The compiler is told about this with #include <vfork.h>,
6084 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6085 Test for this by using a static variable whose address
6086 is put into a register that is clobbered by the vfork. */
6087static
6088#ifdef __cplusplus
6089sparc_address_test (int arg)
6090#else
6091sparc_address_test (arg) int arg;
6092#endif
6093{
6094 static pid_t child;
6095 if (!child) {
6096 child = vfork ();
6097 if (child < 0) {
6098 perror ("vfork");
6099 _exit(2);
6100 }
6101 if (!child) {
6102 arg = getpid();
6103 write(-1, "", 0);
6104 _exit (arg);
6105 }
6106 }
6107}
6108main() {
6109 pid_t parent = getpid ();
6110 pid_t child;
7dfa765c 6111
97bf5e38 6112 sparc_address_test ();
7dfa765c 6113
97bf5e38 6114 child = vfork ();
7dfa765c 6115
97bf5e38
MK
6116 if (child == 0) {
6117 /* Here is another test for sparc vfork register problems.
6118 This test uses lots of local variables, at least
6119 as many local variables as main has allocated so far
6120 including compiler temporaries. 4 locals are enough for
6121 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6122 A buggy compiler should reuse the register of parent
6123 for one of the local variables, since it will think that
6124 parent can't possibly be used any more in this routine.
6125 Assigning to the local variable will thus munge parent
6126 in the parent process. */
6127 pid_t
6128 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6129 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6130 /* Convince the compiler that p..p7 are live; otherwise, it might
6131 use the same hardware register for all 8 local variables. */
6132 if (p != p1 || p != p2 || p != p3 || p != p4
6133 || p != p5 || p != p6 || p != p7)
6134 _exit(1);
7dfa765c 6135
97bf5e38
MK
6136 /* On some systems (e.g. IRIX 3.3),
6137 vfork doesn't separate parent from child file descriptors.
6138 If the child closes a descriptor before it execs or exits,
6139 this munges the parent's descriptor as well.
6140 Test for this by closing stdout in the child. */
6141 _exit(close(fileno(stdout)) != 0);
6142 } else {
6143 int status;
6144 struct stat st;
64bb1671 6145
97bf5e38
MK
6146 while (wait(&status) != child)
6147 ;
6148 exit(
6149 /* Was there some problem with vforking? */
6150 child < 0
64bb1671 6151
97bf5e38
MK
6152 /* Did the child fail? (This shouldn't happen.) */
6153 || status
64bb1671 6154
97bf5e38
MK
6155 /* Did the vfork/compiler bug occur? */
6156 || parent != getpid()
6157
6158 /* Did the file descriptor bug occur? */
6159 || fstat(fileno(stdout), &st) != 0
6160 );
6161 }
6162}
5c44784c 6163EOF
d9feb4e7 6164if { (eval echo configure:6165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6165then
6166 ac_cv_func_vfork_works=yes
5c44784c
JM
6167else
6168 echo "configure: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
97bf5e38
MK
6170 rm -fr conftest*
6171 ac_cv_func_vfork_works=no
5c44784c 6172fi
97bf5e38 6173rm -fr conftest*
5c44784c
JM
6174fi
6175
0afdd437
MK
6176fi
6177
97bf5e38
MK
6178echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6179if test $ac_cv_func_vfork_works = no; then
0afdd437 6180 cat >> confdefs.h <<\EOF
97bf5e38 6181#define vfork fork
0afdd437
MK
6182EOF
6183
6184fi
6185
97bf5e38
MK
6186for ac_func in canonicalize_file_name realpath
6187do
6188echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6189echo "configure:6190: checking for $ac_func" >&5
97bf5e38 6190if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6191 echo $ac_n "(cached) $ac_c" 1>&6
6192else
6193 cat > conftest.$ac_ext <<EOF
d9feb4e7 6194#line 6195 "configure"
7e89e357 6195#include "confdefs.h"
97bf5e38
MK
6196/* System header to define __stub macros and hopefully few prototypes,
6197 which can conflict with char $ac_func(); below. */
6198#include <assert.h>
6199/* Override any gcc2 internal prototype to avoid an error. */
6200/* We use char because int might match the return type of a gcc2
6201 builtin and then its argument prototype would still apply. */
6202char $ac_func();
6203
7e89e357 6204int main() {
97bf5e38
MK
6205
6206/* The GNU C library defines this for functions which it implements
6207 to always fail with ENOSYS. Some functions are actually named
6208 something starting with __ and the normal name is an alias. */
6209#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6210choke me
6211#else
6212$ac_func();
6213#endif
6214
7e89e357
JT
6215; return 0; }
6216EOF
d9feb4e7 6217if { (eval echo configure:6218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6218 rm -rf conftest*
97bf5e38 6219 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6220else
6221 echo "configure: failed program was:" >&5
6222 cat conftest.$ac_ext >&5
6223 rm -rf conftest*
97bf5e38 6224 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6225fi
6226rm -f conftest*
6227fi
6228
97bf5e38
MK
6229if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6230 echo "$ac_t""yes" 1>&6
6231 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6232 cat >> confdefs.h <<EOF
6233#define $ac_tr_func 1
7e89e357 6234EOF
97bf5e38
MK
6235
6236else
6237 echo "$ac_t""no" 1>&6
7e89e357 6238fi
97bf5e38 6239done
7e89e357 6240
97bf5e38 6241for ac_func in poll
7be570e7
JM
6242do
6243echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6244echo "configure:6245: checking for $ac_func" >&5
7be570e7
JM
6245if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6246 echo $ac_n "(cached) $ac_c" 1>&6
6247else
6248 cat > conftest.$ac_ext <<EOF
d9feb4e7 6249#line 6250 "configure"
7be570e7
JM
6250#include "confdefs.h"
6251/* System header to define __stub macros and hopefully few prototypes,
6252 which can conflict with char $ac_func(); below. */
6253#include <assert.h>
6254/* Override any gcc2 internal prototype to avoid an error. */
6255/* We use char because int might match the return type of a gcc2
6256 builtin and then its argument prototype would still apply. */
6257char $ac_func();
6258
6259int main() {
6260
6261/* The GNU C library defines this for functions which it implements
6262 to always fail with ENOSYS. Some functions are actually named
6263 something starting with __ and the normal name is an alias. */
6264#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6265choke me
6266#else
6267$ac_func();
6268#endif
6269
6270; return 0; }
6271EOF
d9feb4e7 6272if { (eval echo configure:6273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6273 rm -rf conftest*
6274 eval "ac_cv_func_$ac_func=yes"
6275else
6276 echo "configure: failed program was:" >&5
6277 cat conftest.$ac_ext >&5
6278 rm -rf conftest*
6279 eval "ac_cv_func_$ac_func=no"
6280fi
6281rm -f conftest*
6282fi
6283
6284if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6285 echo "$ac_t""yes" 1>&6
6286 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6287 cat >> confdefs.h <<EOF
6288#define $ac_tr_func 1
6289EOF
6290
6291else
6292 echo "$ac_t""no" 1>&6
6293fi
6294done
6295
6296for ac_func in pread64
6297do
6298echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6299echo "configure:6300: checking for $ac_func" >&5
14abd0fb
MK
6300if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6301 echo $ac_n "(cached) $ac_c" 1>&6
6302else
6303 cat > conftest.$ac_ext <<EOF
d9feb4e7 6304#line 6305 "configure"
14abd0fb
MK
6305#include "confdefs.h"
6306/* System header to define __stub macros and hopefully few prototypes,
6307 which can conflict with char $ac_func(); below. */
6308#include <assert.h>
6309/* Override any gcc2 internal prototype to avoid an error. */
6310/* We use char because int might match the return type of a gcc2
6311 builtin and then its argument prototype would still apply. */
6312char $ac_func();
6313
6314int main() {
6315
6316/* The GNU C library defines this for functions which it implements
6317 to always fail with ENOSYS. Some functions are actually named
6318 something starting with __ and the normal name is an alias. */
6319#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6320choke me
6321#else
6322$ac_func();
6323#endif
6324
6325; return 0; }
6326EOF
d9feb4e7 6327if { (eval echo configure:6328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6328 rm -rf conftest*
6329 eval "ac_cv_func_$ac_func=yes"
6330else
6331 echo "configure: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 rm -rf conftest*
6334 eval "ac_cv_func_$ac_func=no"
6335fi
6336rm -f conftest*
6337fi
6338
6339if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6340 echo "$ac_t""yes" 1>&6
6341 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6342 cat >> confdefs.h <<EOF
6343#define $ac_tr_func 1
6344EOF
6345
6346else
6347 echo "$ac_t""no" 1>&6
6348fi
6349done
6350
97bf5e38
MK
6351for ac_func in sbrk
6352do
6353echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6354echo "configure:6355: checking for $ac_func" >&5
97bf5e38 6355if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6356 echo $ac_n "(cached) $ac_c" 1>&6
6357else
6358 cat > conftest.$ac_ext <<EOF
d9feb4e7 6359#line 6360 "configure"
c906108c 6360#include "confdefs.h"
97bf5e38
MK
6361/* System header to define __stub macros and hopefully few prototypes,
6362 which can conflict with char $ac_func(); below. */
6363#include <assert.h>
6364/* Override any gcc2 internal prototype to avoid an error. */
6365/* We use char because int might match the return type of a gcc2
6366 builtin and then its argument prototype would still apply. */
6367char $ac_func();
c906108c 6368
97bf5e38
MK
6369int main() {
6370
6371/* The GNU C library defines this for functions which it implements
6372 to always fail with ENOSYS. Some functions are actually named
6373 something starting with __ and the normal name is an alias. */
6374#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6375choke me
c906108c 6376#else
97bf5e38 6377$ac_func();
c906108c 6378#endif
97bf5e38 6379
c906108c
SS
6380; return 0; }
6381EOF
d9feb4e7 6382if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6383 rm -rf conftest*
97bf5e38 6384 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6385else
6386 echo "configure: failed program was:" >&5
6387 cat conftest.$ac_ext >&5
6388 rm -rf conftest*
97bf5e38 6389 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6390fi
6391rm -f conftest*
6392fi
6393
97bf5e38
MK
6394if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6395 echo "$ac_t""yes" 1>&6
6396 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6397 cat >> confdefs.h <<EOF
6398#define $ac_tr_func 1
c906108c 6399EOF
97bf5e38
MK
6400
6401else
6402 echo "$ac_t""no" 1>&6
c906108c 6403fi
97bf5e38 6404done
c906108c 6405
97bf5e38
MK
6406for ac_func in setpgid setpgrp
6407do
6408echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6409echo "configure:6410: checking for $ac_func" >&5
97bf5e38 6410if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6411 echo $ac_n "(cached) $ac_c" 1>&6
6412else
6413 cat > conftest.$ac_ext <<EOF
d9feb4e7 6414#line 6415 "configure"
c906108c 6415#include "confdefs.h"
97bf5e38
MK
6416/* System header to define __stub macros and hopefully few prototypes,
6417 which can conflict with char $ac_func(); below. */
6418#include <assert.h>
6419/* Override any gcc2 internal prototype to avoid an error. */
6420/* We use char because int might match the return type of a gcc2
6421 builtin and then its argument prototype would still apply. */
6422char $ac_func();
c906108c 6423
97bf5e38
MK
6424int main() {
6425
6426/* The GNU C library defines this for functions which it implements
6427 to always fail with ENOSYS. Some functions are actually named
6428 something starting with __ and the normal name is an alias. */
6429#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6430choke me
c906108c 6431#else
97bf5e38 6432$ac_func();
c906108c 6433#endif
97bf5e38 6434
c906108c
SS
6435; return 0; }
6436EOF
d9feb4e7 6437if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6438 rm -rf conftest*
97bf5e38 6439 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6440else
6441 echo "configure: failed program was:" >&5
6442 cat conftest.$ac_ext >&5
6443 rm -rf conftest*
97bf5e38 6444 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6445fi
6446rm -f conftest*
6447fi
6448
97bf5e38
MK
6449if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6450 echo "$ac_t""yes" 1>&6
6451 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6452 cat >> confdefs.h <<EOF
6453#define $ac_tr_func 1
c906108c 6454EOF
97bf5e38
MK
6455
6456else
6457 echo "$ac_t""no" 1>&6
c906108c 6458fi
97bf5e38 6459done
c906108c 6460
e1ea1d75 6461for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6462do
6463echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6464echo "configure:6465: checking for $ac_func" >&5
97bf5e38 6465if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6466 echo $ac_n "(cached) $ac_c" 1>&6
6467else
6468 cat > conftest.$ac_ext <<EOF
d9feb4e7 6469#line 6470 "configure"
c906108c 6470#include "confdefs.h"
97bf5e38
MK
6471/* System header to define __stub macros and hopefully few prototypes,
6472 which can conflict with char $ac_func(); below. */
6473#include <assert.h>
6474/* Override any gcc2 internal prototype to avoid an error. */
6475/* We use char because int might match the return type of a gcc2
6476 builtin and then its argument prototype would still apply. */
6477char $ac_func();
c906108c 6478
97bf5e38
MK
6479int main() {
6480
6481/* The GNU C library defines this for functions which it implements
6482 to always fail with ENOSYS. Some functions are actually named
6483 something starting with __ and the normal name is an alias. */
6484#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6485choke me
c906108c 6486#else
97bf5e38 6487$ac_func();
c906108c 6488#endif
97bf5e38 6489
c906108c
SS
6490; return 0; }
6491EOF
d9feb4e7 6492if { (eval echo configure:6493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6493 rm -rf conftest*
97bf5e38 6494 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6495else
6496 echo "configure: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6498 rm -rf conftest*
97bf5e38 6499 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6500fi
6501rm -f conftest*
6502fi
6503
97bf5e38
MK
6504if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6505 echo "$ac_t""yes" 1>&6
6506 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6507 cat >> confdefs.h <<EOF
6508#define $ac_tr_func 1
c906108c 6509EOF
e1ea1d75 6510
97bf5e38
MK
6511else
6512 echo "$ac_t""no" 1>&6
c906108c 6513fi
97bf5e38 6514done
c906108c 6515
97bf5e38
MK
6516for ac_func in socketpair
6517do
6518echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d9feb4e7 6519echo "configure:6520: checking for $ac_func" >&5
97bf5e38 6520if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6521 echo $ac_n "(cached) $ac_c" 1>&6
6522else
6523 cat > conftest.$ac_ext <<EOF
d9feb4e7 6524#line 6525 "configure"
c906108c 6525#include "confdefs.h"
97bf5e38
MK
6526/* System header to define __stub macros and hopefully few prototypes,
6527 which can conflict with char $ac_func(); below. */
6528#include <assert.h>
6529/* Override any gcc2 internal prototype to avoid an error. */
6530/* We use char because int might match the return type of a gcc2
6531 builtin and then its argument prototype would still apply. */
6532char $ac_func();
c906108c 6533
97bf5e38
MK
6534int main() {
6535
6536/* The GNU C library defines this for functions which it implements
6537 to always fail with ENOSYS. Some functions are actually named
6538 something starting with __ and the normal name is an alias. */
6539#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6540choke me
c906108c 6541#else
97bf5e38 6542$ac_func();
c906108c 6543#endif
97bf5e38 6544
c906108c
SS
6545; return 0; }
6546EOF
d9feb4e7 6547if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6548 rm -rf conftest*
97bf5e38 6549 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6550else
6551 echo "configure: failed program was:" >&5
6552 cat conftest.$ac_ext >&5
6553 rm -rf conftest*
97bf5e38 6554 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6555fi
6556rm -f conftest*
6557fi
6558
97bf5e38
MK
6559if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6560 echo "$ac_t""yes" 1>&6
6561 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6562 cat >> confdefs.h <<EOF
6563#define $ac_tr_func 1
c906108c 6564EOF
97bf5e38
MK
6565
6566else
6567 echo "$ac_t""no" 1>&6
c906108c 6568fi
97bf5e38 6569done
c906108c 6570
97bf5e38
MK
6571
6572if test "$cross_compiling" = no; then
6573 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d9feb4e7 6574echo "configure:6575: checking whether setpgrp takes no argument" >&5
97bf5e38 6575if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6576 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6577else
6578 if test "$cross_compiling" = yes; then
6579 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6580else
6581 cat > conftest.$ac_ext <<EOF
d9feb4e7 6582#line 6583 "configure"
c906108c
SS
6583#include "confdefs.h"
6584
c906108c
SS
6585#ifdef HAVE_UNISTD_H
6586#include <unistd.h>
6587#endif
97bf5e38
MK
6588
6589/*
6590 * If this system has a BSD-style setpgrp, which takes arguments, exit
6591 * successfully.
6592 */
6593main()
6594{
6595 if (setpgrp(1,1) == -1)
6596 exit(0);
6597 else
6598 exit(1);
6599}
6600
c906108c 6601EOF
d9feb4e7 6602if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6603then
6604 ac_cv_func_setpgrp_void=no
c906108c
SS
6605else
6606 echo "configure: failed program was:" >&5
6607 cat conftest.$ac_ext >&5
97bf5e38
MK
6608 rm -fr conftest*
6609 ac_cv_func_setpgrp_void=yes
c906108c 6610fi
97bf5e38 6611rm -fr conftest*
c906108c
SS
6612fi
6613
97bf5e38
MK
6614
6615fi
6616
6617echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6618if test $ac_cv_func_setpgrp_void = yes; then
6619 cat >> confdefs.h <<\EOF
6620#define SETPGRP_VOID 1
c906108c
SS
6621EOF
6622
6623fi
6624
97bf5e38
MK
6625else
6626 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d9feb4e7 6627echo "configure:6628: checking whether setpgrp takes no argument" >&5
97bf5e38 6628if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6629 echo $ac_n "(cached) $ac_c" 1>&6
6630else
6631 cat > conftest.$ac_ext <<EOF
d9feb4e7 6632#line 6633 "configure"
b83266a0
SS
6633#include "confdefs.h"
6634
b83266a0 6635#include <unistd.h>
97bf5e38 6636
b83266a0 6637int main() {
97bf5e38
MK
6638
6639 if (setpgrp(1,1) == -1)
6640 exit (0);
6641 else
6642 exit (1);
6643
b83266a0
SS
6644; return 0; }
6645EOF
d9feb4e7 6646if { (eval echo configure:6647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6647 rm -rf conftest*
97bf5e38 6648 ac_cv_func_setpgrp_void=no
b83266a0
SS
6649else
6650 echo "configure: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 rm -rf conftest*
97bf5e38 6653 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6654fi
6655rm -f conftest*
6656fi
6657
97bf5e38
MK
6658echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6659if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6660 cat >> confdefs.h <<\EOF
97bf5e38 6661#define SETPGRP_VOID 1
b83266a0
SS
6662EOF
6663
97bf5e38 6664fi
b83266a0
SS
6665fi
6666
97bf5e38
MK
6667# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6668# since sigsetjmp might only be defined as a macro.
6669echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
d9feb4e7 6670echo "configure:6671: checking for sigsetjmp" >&5
97bf5e38 6671if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6672 echo $ac_n "(cached) $ac_c" 1>&6
6673else
6674 cat > conftest.$ac_ext <<EOF
d9feb4e7 6675#line 6676 "configure"
a4db0f07
RH
6676#include "confdefs.h"
6677
97bf5e38
MK
6678#include <setjmp.h>
6679
a4db0f07 6680int main() {
97bf5e38 6681sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6682; return 0; }
6683EOF
d9feb4e7 6684if { (eval echo configure:6685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6685 rm -rf conftest*
97bf5e38 6686 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6687else
6688 echo "configure: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 rm -rf conftest*
97bf5e38 6691 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6692fi
6693rm -f conftest*
6694fi
6695
97bf5e38
MK
6696echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6697if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6698 cat >> confdefs.h <<\EOF
97bf5e38 6699#define HAVE_SIGSETJMP 1
a4db0f07
RH
6700EOF
6701
6702fi
c906108c 6703
06825bd1
MK
6704# Assume we'll default to using the included libiberty regex.
6705gdb_use_included_regex=yes
6706
6707# However, if the system regex is GNU regex, then default to *not*
6708# using the included regex.
6709echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
d9feb4e7 6710echo "configure:6711: checking for GNU regex" >&5
06825bd1
MK
6711if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6712 echo $ac_n "(cached) $ac_c" 1>&6
6713else
6714 cat > conftest.$ac_ext <<EOF
d9feb4e7 6715#line 6716 "configure"
06825bd1
MK
6716#include "confdefs.h"
6717#include <gnu-versions.h>
6718int main() {
6719#define REGEX_INTERFACE_VERSION 1
6720#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6721# error "Version mismatch"
6722#endif
6723; return 0; }
6724EOF
d9feb4e7 6725if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6726 rm -rf conftest*
6727 gdb_cv_have_gnu_regex=yes
6728else
6729 echo "configure: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 rm -rf conftest*
6732 gdb_cv_have_gnu_regex=no
6733fi
6734rm -f conftest*
6735fi
6736
6737echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6738if test $gdb_cv_have_gnu_regex = yes; then
6739 gdb_use_included_regex=no
6740fi
6741
6742# Check whether --with-included-regex or --without-included-regex was given.
6743if test "${with_included_regex+set}" = set; then
6744 withval="$with_included_regex"
6745 gdb_with_regex=$withval
6746else
6747 gdb_with_regex=$gdb_use_included_regex
6748fi
6749
6750if test "$gdb_with_regex" = yes; then
6751 cat >> confdefs.h <<\EOF
6752#define USE_INCLUDED_REGEX 1
6753EOF
6754
6755fi
6756
97bf5e38
MK
6757# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6758# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6759echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
d9feb4e7 6760echo "configure:6761: checking for r_fs in struct reg" >&5
97bf5e38
MK
6761if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
6763else
6764 cat > conftest.$ac_ext <<EOF
d9feb4e7 6765#line 6766 "configure"
c906108c 6766#include "confdefs.h"
97bf5e38
MK
6767#include <machine/reg.h>
6768int main() {
6769struct reg r; r.r_fs;
6770; return 0; }
c906108c 6771EOF
d9feb4e7 6772if { (eval echo configure:6773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6773 rm -rf conftest*
97bf5e38 6774 gdb_cv_struct_reg_r_fs=yes
c906108c 6775else
97bf5e38
MK
6776 echo "configure: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
c906108c 6778 rm -rf conftest*
97bf5e38 6779 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6780fi
6781rm -f conftest*
97bf5e38 6782fi
c906108c 6783
97bf5e38
MK
6784echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6785if test $gdb_cv_struct_reg_r_fs = yes; then
6786 cat >> confdefs.h <<\EOF
6787#define HAVE_STRUCT_REG_R_FS 1
6788EOF
6789
6790fi
6791echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
d9feb4e7 6792echo "configure:6793: checking for r_gs in struct reg" >&5
97bf5e38
MK
6793if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6794 echo $ac_n "(cached) $ac_c" 1>&6
6795else
6796 cat > conftest.$ac_ext <<EOF
d9feb4e7 6797#line 6798 "configure"
c906108c 6798#include "confdefs.h"
97bf5e38
MK
6799#include <machine/reg.h>
6800int main() {
6801struct reg r; r.r_gs;
6802; return 0; }
c906108c 6803EOF
d9feb4e7 6804if { (eval echo configure:6805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6805 rm -rf conftest*
97bf5e38 6806 gdb_cv_struct_reg_r_gs=yes
c906108c 6807else
97bf5e38
MK
6808 echo "configure: failed program was:" >&5
6809 cat conftest.$ac_ext >&5
c906108c 6810 rm -rf conftest*
97bf5e38 6811 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6812fi
6813rm -f conftest*
c906108c 6814fi
c906108c 6815
97bf5e38
MK
6816echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6817if test $gdb_cv_struct_reg_r_gs = yes; then
6818 cat >> confdefs.h <<\EOF
6819#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6820EOF
6821
c906108c
SS
6822fi
6823
97bf5e38
MK
6824# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6825echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
d9feb4e7 6826echo "configure:6827: checking for PTRACE_GETREGS" >&5
97bf5e38 6827if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6828 echo $ac_n "(cached) $ac_c" 1>&6
6829else
6830 cat > conftest.$ac_ext <<EOF
d9feb4e7 6831#line 6832 "configure"
c906108c 6832#include "confdefs.h"
97bf5e38 6833#include <sys/ptrace.h>
c906108c 6834int main() {
97bf5e38 6835PTRACE_GETREGS;
c906108c
SS
6836; return 0; }
6837EOF
d9feb4e7 6838if { (eval echo configure:6839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6839 rm -rf conftest*
97bf5e38 6840 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6841else
6842 echo "configure: failed program was:" >&5
6843 cat conftest.$ac_ext >&5
6844 rm -rf conftest*
97bf5e38 6845 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6846fi
6847rm -f conftest*
6848fi
6849
97bf5e38
MK
6850echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6851if test $gdb_cv_have_ptrace_getregs = yes; then
6852 cat >> confdefs.h <<\EOF
6853#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6854EOF
6855
97bf5e38 6856fi
c906108c 6857
97bf5e38
MK
6858# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6859echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
d9feb4e7 6860echo "configure:6861: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6861if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6862 echo $ac_n "(cached) $ac_c" 1>&6
6863else
6864 cat > conftest.$ac_ext <<EOF
d9feb4e7 6865#line 6866 "configure"
c906108c 6866#include "confdefs.h"
97bf5e38 6867#include <sys/ptrace.h>
c906108c 6868int main() {
97bf5e38 6869PTRACE_GETFPXREGS;
c906108c
SS
6870; return 0; }
6871EOF
d9feb4e7 6872if { (eval echo configure:6873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6873 rm -rf conftest*
97bf5e38 6874 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6875else
6876 echo "configure: failed program was:" >&5
6877 cat conftest.$ac_ext >&5
6878 rm -rf conftest*
97bf5e38 6879 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6880fi
6881rm -f conftest*
6882fi
6883
97bf5e38
MK
6884echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6885if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6886 cat >> confdefs.h <<\EOF
6887#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6888EOF
6889
97bf5e38 6890fi
c906108c 6891
97bf5e38
MK
6892# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6893echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
d9feb4e7 6894echo "configure:6895: checking for PT_GETDBREGS" >&5
97bf5e38 6895if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6896 echo $ac_n "(cached) $ac_c" 1>&6
6897else
6898 cat > conftest.$ac_ext <<EOF
d9feb4e7 6899#line 6900 "configure"
c906108c 6900#include "confdefs.h"
97bf5e38
MK
6901#include <sys/types.h>
6902#include <sys/ptrace.h>
c906108c 6903int main() {
97bf5e38 6904PT_GETDBREGS;
c906108c
SS
6905; return 0; }
6906EOF
d9feb4e7 6907if { (eval echo configure:6908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6908 rm -rf conftest*
97bf5e38 6909 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6910else
6911 echo "configure: failed program was:" >&5
6912 cat conftest.$ac_ext >&5
6913 rm -rf conftest*
97bf5e38 6914 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6915fi
6916rm -f conftest*
6917fi
6918
97bf5e38
MK
6919echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6920if test $gdb_cv_have_pt_getdbregs = yes; then
6921 cat >> confdefs.h <<\EOF
6922#define HAVE_PT_GETDBREGS 1
c906108c
SS
6923EOF
6924
97bf5e38 6925fi
c906108c 6926
97bf5e38
MK
6927# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6928echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
d9feb4e7 6929echo "configure:6930: checking for PT_GETXMMREGS" >&5
97bf5e38 6930if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6931 echo $ac_n "(cached) $ac_c" 1>&6
6932else
6933 cat > conftest.$ac_ext <<EOF
d9feb4e7 6934#line 6935 "configure"
c906108c 6935#include "confdefs.h"
97bf5e38
MK
6936#include <sys/types.h>
6937#include <sys/ptrace.h>
c906108c 6938int main() {
97bf5e38 6939PT_GETXMMREGS;
c906108c
SS
6940; return 0; }
6941EOF
d9feb4e7 6942if { (eval echo configure:6943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6943 rm -rf conftest*
97bf5e38 6944 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6945else
6946 echo "configure: failed program was:" >&5
6947 cat conftest.$ac_ext >&5
6948 rm -rf conftest*
97bf5e38 6949 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6950fi
6951rm -f conftest*
6952fi
6953
97bf5e38
MK
6954echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6955if test $gdb_cv_have_pt_getxmmregs = yes; then
6956 cat >> confdefs.h <<\EOF
6957#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6958EOF
6959
97bf5e38 6960fi
c906108c 6961
97bf5e38
MK
6962
6963echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
d9feb4e7 6964echo "configure:6965: checking whether malloc must be declared" >&5
97bf5e38 6965if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6966 echo $ac_n "(cached) $ac_c" 1>&6
6967else
6968 cat > conftest.$ac_ext <<EOF
d9feb4e7 6969#line 6970 "configure"
3862412b 6970#include "confdefs.h"
e17bf198 6971
97bf5e38
MK
6972#include <stdio.h>
6973#ifdef HAVE_STRING_H
6974#include <string.h>
6975#else
6976#ifdef HAVE_STRINGS_H
6977#include <strings.h>
6978#endif
6979#endif
6980#ifdef HAVE_STDLIB_H
6981#include <stdlib.h>
6982#endif
6983#ifdef HAVE_UNISTD_H
6984#include <unistd.h>
6985#endif
3862412b 6986int main() {
97bf5e38 6987char *(*pfn) = (char *(*)) malloc
3862412b
MK
6988; return 0; }
6989EOF
d9feb4e7 6990if { (eval echo configure:6991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6991 rm -rf conftest*
97bf5e38 6992 bfd_cv_decl_needed_malloc=no
3862412b
MK
6993else
6994 echo "configure: failed program was:" >&5
6995 cat conftest.$ac_ext >&5
6996 rm -rf conftest*
97bf5e38 6997 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6998fi
6999rm -f conftest*
7000fi
7001
97bf5e38
MK
7002echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7003if test $bfd_cv_decl_needed_malloc = yes; then
7004 cat >> confdefs.h <<\EOF
7005#define NEED_DECLARATION_MALLOC 1
3862412b
MK
7006EOF
7007
97bf5e38 7008fi
3862412b 7009
97bf5e38 7010echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
d9feb4e7 7011echo "configure:7012: checking whether realloc must be declared" >&5
97bf5e38 7012if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7013 echo $ac_n "(cached) $ac_c" 1>&6
7014else
7015 cat > conftest.$ac_ext <<EOF
d9feb4e7 7016#line 7017 "configure"
3862412b 7017#include "confdefs.h"
e17bf198 7018
97bf5e38
MK
7019#include <stdio.h>
7020#ifdef HAVE_STRING_H
7021#include <string.h>
7022#else
7023#ifdef HAVE_STRINGS_H
7024#include <strings.h>
7025#endif
7026#endif
7027#ifdef HAVE_STDLIB_H
7028#include <stdlib.h>
7029#endif
7030#ifdef HAVE_UNISTD_H
7031#include <unistd.h>
7032#endif
3862412b 7033int main() {
97bf5e38 7034char *(*pfn) = (char *(*)) realloc
3862412b
MK
7035; return 0; }
7036EOF
d9feb4e7 7037if { (eval echo configure:7038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7038 rm -rf conftest*
97bf5e38 7039 bfd_cv_decl_needed_realloc=no
3862412b
MK
7040else
7041 echo "configure: failed program was:" >&5
7042 cat conftest.$ac_ext >&5
7043 rm -rf conftest*
97bf5e38 7044 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7045fi
7046rm -f conftest*
7047fi
7048
97bf5e38
MK
7049echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7050if test $bfd_cv_decl_needed_realloc = yes; then
7051 cat >> confdefs.h <<\EOF
7052#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7053EOF
7054
97bf5e38 7055fi
3862412b 7056
97bf5e38 7057echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
d9feb4e7 7058echo "configure:7059: checking whether free must be declared" >&5
97bf5e38 7059if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7060 echo $ac_n "(cached) $ac_c" 1>&6
7061else
7062 cat > conftest.$ac_ext <<EOF
d9feb4e7 7063#line 7064 "configure"
451928c5 7064#include "confdefs.h"
e17bf198 7065
97bf5e38
MK
7066#include <stdio.h>
7067#ifdef HAVE_STRING_H
7068#include <string.h>
7069#else
7070#ifdef HAVE_STRINGS_H
7071#include <strings.h>
7072#endif
7073#endif
7074#ifdef HAVE_STDLIB_H
7075#include <stdlib.h>
7076#endif
7077#ifdef HAVE_UNISTD_H
7078#include <unistd.h>
7079#endif
451928c5 7080int main() {
97bf5e38 7081char *(*pfn) = (char *(*)) free
451928c5
AC
7082; return 0; }
7083EOF
d9feb4e7 7084if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7085 rm -rf conftest*
97bf5e38 7086 bfd_cv_decl_needed_free=no
451928c5
AC
7087else
7088 echo "configure: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7090 rm -rf conftest*
97bf5e38 7091 bfd_cv_decl_needed_free=yes
451928c5
AC
7092fi
7093rm -f conftest*
7094fi
7095
97bf5e38
MK
7096echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7097if test $bfd_cv_decl_needed_free = yes; then
7098 cat >> confdefs.h <<\EOF
7099#define NEED_DECLARATION_FREE 1
451928c5
AC
7100EOF
7101
97bf5e38 7102fi
451928c5 7103
97bf5e38 7104echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
d9feb4e7 7105echo "configure:7106: checking whether strerror must be declared" >&5
97bf5e38 7106if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7107 echo $ac_n "(cached) $ac_c" 1>&6
7108else
7109 cat > conftest.$ac_ext <<EOF
d9feb4e7 7110#line 7111 "configure"
451928c5 7111#include "confdefs.h"
e17bf198 7112
97bf5e38
MK
7113#include <stdio.h>
7114#ifdef HAVE_STRING_H
7115#include <string.h>
7116#else
7117#ifdef HAVE_STRINGS_H
7118#include <strings.h>
7119#endif
7120#endif
7121#ifdef HAVE_STDLIB_H
7122#include <stdlib.h>
7123#endif
7124#ifdef HAVE_UNISTD_H
7125#include <unistd.h>
7126#endif
451928c5 7127int main() {
97bf5e38 7128char *(*pfn) = (char *(*)) strerror
451928c5
AC
7129; return 0; }
7130EOF
d9feb4e7 7131if { (eval echo configure:7132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7132 rm -rf conftest*
97bf5e38 7133 bfd_cv_decl_needed_strerror=no
451928c5
AC
7134else
7135 echo "configure: failed program was:" >&5
7136 cat conftest.$ac_ext >&5
7137 rm -rf conftest*
97bf5e38 7138 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7139fi
7140rm -f conftest*
7141fi
7142
97bf5e38
MK
7143echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7144if test $bfd_cv_decl_needed_strerror = yes; then
7145 cat >> confdefs.h <<\EOF
7146#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7147EOF
7148
97bf5e38 7149fi
451928c5 7150
97bf5e38 7151echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
d9feb4e7 7152echo "configure:7153: checking whether strdup must be declared" >&5
97bf5e38 7153if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7154 echo $ac_n "(cached) $ac_c" 1>&6
7155else
7156 cat > conftest.$ac_ext <<EOF
d9feb4e7 7157#line 7158 "configure"
3862412b 7158#include "confdefs.h"
e17bf198 7159
97bf5e38
MK
7160#include <stdio.h>
7161#ifdef HAVE_STRING_H
7162#include <string.h>
7163#else
7164#ifdef HAVE_STRINGS_H
7165#include <strings.h>
7166#endif
7167#endif
7168#ifdef HAVE_STDLIB_H
7169#include <stdlib.h>
7170#endif
7171#ifdef HAVE_UNISTD_H
7172#include <unistd.h>
7173#endif
3862412b 7174int main() {
97bf5e38 7175char *(*pfn) = (char *(*)) strdup
3862412b
MK
7176; return 0; }
7177EOF
d9feb4e7 7178if { (eval echo configure:7179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7179 rm -rf conftest*
97bf5e38 7180 bfd_cv_decl_needed_strdup=no
3862412b
MK
7181else
7182 echo "configure: failed program was:" >&5
7183 cat conftest.$ac_ext >&5
7184 rm -rf conftest*
97bf5e38 7185 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7186fi
7187rm -f conftest*
7188fi
7189
97bf5e38
MK
7190echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7191if test $bfd_cv_decl_needed_strdup = yes; then
7192 cat >> confdefs.h <<\EOF
7193#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7194EOF
7195
97bf5e38 7196fi
3862412b 7197
97bf5e38 7198echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
d9feb4e7 7199echo "configure:7200: checking whether strstr must be declared" >&5
97bf5e38 7200if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7201 echo $ac_n "(cached) $ac_c" 1>&6
7202else
7203 cat > conftest.$ac_ext <<EOF
d9feb4e7 7204#line 7205 "configure"
3862412b 7205#include "confdefs.h"
e17bf198 7206
97bf5e38
MK
7207#include <stdio.h>
7208#ifdef HAVE_STRING_H
7209#include <string.h>
7210#else
7211#ifdef HAVE_STRINGS_H
7212#include <strings.h>
7213#endif
7214#endif
7215#ifdef HAVE_STDLIB_H
7216#include <stdlib.h>
7217#endif
7218#ifdef HAVE_UNISTD_H
7219#include <unistd.h>
7220#endif
3862412b 7221int main() {
97bf5e38 7222char *(*pfn) = (char *(*)) strstr
3862412b
MK
7223; return 0; }
7224EOF
d9feb4e7 7225if { (eval echo configure:7226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7226 rm -rf conftest*
97bf5e38 7227 bfd_cv_decl_needed_strstr=no
3862412b
MK
7228else
7229 echo "configure: failed program was:" >&5
7230 cat conftest.$ac_ext >&5
7231 rm -rf conftest*
97bf5e38 7232 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7233fi
7234rm -f conftest*
7235fi
7236
97bf5e38
MK
7237echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7238if test $bfd_cv_decl_needed_strstr = yes; then
7239 cat >> confdefs.h <<\EOF
7240#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7241EOF
7242
97bf5e38 7243fi
3862412b 7244
97bf5e38 7245echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
d9feb4e7 7246echo "configure:7247: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7247if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7248 echo $ac_n "(cached) $ac_c" 1>&6
7249else
7250 cat > conftest.$ac_ext <<EOF
d9feb4e7 7251#line 7252 "configure"
596c9d4b
KB
7252#include "confdefs.h"
7253
97bf5e38
MK
7254#include <stdio.h>
7255#ifdef HAVE_STRING_H
7256#include <string.h>
7257#else
7258#ifdef HAVE_STRINGS_H
7259#include <strings.h>
7260#endif
7261#endif
7262#ifdef HAVE_STDLIB_H
7263#include <stdlib.h>
7264#endif
7265#ifdef HAVE_UNISTD_H
7266#include <unistd.h>
7267#endif
596c9d4b 7268int main() {
97bf5e38 7269char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7270; return 0; }
7271EOF
d9feb4e7 7272if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7273 rm -rf conftest*
97bf5e38 7274 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7275else
7276 echo "configure: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7278 rm -rf conftest*
97bf5e38 7279 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7280fi
7281rm -f conftest*
7282fi
7283
97bf5e38
MK
7284echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7285if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7286 cat >> confdefs.h <<\EOF
7287#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7288EOF
7289
97bf5e38 7290fi
596c9d4b 7291
97bf5e38
MK
7292
7293# The following save_state_t checkery is only necessary for HPUX
7294# versions earlier than 10.20. When those fade from memory, this
7295# could be expunged. --jsm 1999-03-22
7296
7297echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
d9feb4e7 7298echo "configure:7299: checking for HPUX save_state structure" >&5
97bf5e38 7299cat > conftest.$ac_ext <<EOF
d9feb4e7 7300#line 7301 "configure"
97bf5e38
MK
7301#include "confdefs.h"
7302#include <machine/save_state.h>
7303EOF
7304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7305 egrep "save_state_t" >/dev/null 2>&1; then
7306 rm -rf conftest*
7307 gdb_cv_hpux_savestate=yes
7308else
7309 rm -rf conftest*
7310 gdb_cv_hpux_savestate=no
7311fi
7312rm -f conftest*
7313
7314cat > conftest.$ac_ext <<EOF
d9feb4e7 7315#line 7316 "configure"
97bf5e38
MK
7316#include "confdefs.h"
7317#include <machine/save_state.h>
7318EOF
7319if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7320 egrep "ss_wide" >/dev/null 2>&1; then
7321 rm -rf conftest*
7322 gdb_cv_hpux_sswide=yes
7323else
7324 rm -rf conftest*
7325 gdb_cv_hpux_sswide=no
7326fi
7327rm -f conftest*
7328
7329if test $gdb_cv_hpux_savestate = yes
7330then
7331 cat >> confdefs.h <<\EOF
7332#define HAVE_STRUCT_SAVE_STATE_T 1
7333EOF
7334
7335fi
7336if test $gdb_cv_hpux_sswide = yes
7337then
7338 cat >> confdefs.h <<\EOF
7339#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7340EOF
7341
7342fi
7343echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7344
7345
7346# If we are configured native on GNU/Linux, work around problems with
7347# sys/procfs.h
7348# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7349
7350if test "${target}" = "${host}"; then
7351 case "${host}" in
7352 i[3456]86-*-linux*)
7353 cat >> confdefs.h <<\EOF
7354#define START_INFERIOR_TRAPS_EXPECTED 2
7355EOF
7356
7357 cat >> confdefs.h <<\EOF
7358#define sys_quotactl 1
7359EOF
7360
7361 ;;
7362 ia64-*-aix*)
7363 cat >> confdefs.h <<\EOF
7364#define NEW_PROC_API 1
7365EOF
7366
7367 ;;
7368 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7369 cat >> confdefs.h <<\EOF
7370#define NEW_PROC_API 1
7371EOF
7372
7373 ;;
7374 *-*-solaris2.[678])
7375 cat >> confdefs.h <<\EOF
7376#define NEW_PROC_API 1
7377EOF
7378
7379 ;;
7380 esac
7381fi
7382
7383if test "$ac_cv_header_sys_procfs_h" = yes; then
7384 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7385echo "configure:7386: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7386 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7387 echo $ac_n "(cached) $ac_c" 1>&6
7388else
7389 cat > conftest.$ac_ext <<EOF
d9feb4e7 7390#line 7391 "configure"
596c9d4b
KB
7391#include "confdefs.h"
7392
7393#define _SYSCALL32
7394#include <sys/procfs.h>
7395int main() {
97bf5e38 7396pstatus_t avar
596c9d4b
KB
7397; return 0; }
7398EOF
d9feb4e7 7399if { (eval echo configure:7400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7400 rm -rf conftest*
97bf5e38 7401 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7402else
7403 echo "configure: failed program was:" >&5
7404 cat conftest.$ac_ext >&5
7405 rm -rf conftest*
97bf5e38 7406 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7407
7408fi
7409rm -f conftest*
7410fi
7411
97bf5e38 7412 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7413 cat >> confdefs.h <<\EOF
97bf5e38 7414#define HAVE_PSTATUS_T 1
596c9d4b
KB
7415EOF
7416
7417 fi
97bf5e38 7418 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7419
97bf5e38 7420 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7421echo "configure:7422: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7422 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7423 echo $ac_n "(cached) $ac_c" 1>&6
7424else
7425 cat > conftest.$ac_ext <<EOF
d9feb4e7 7426#line 7427 "configure"
596c9d4b
KB
7427#include "confdefs.h"
7428
7429#define _SYSCALL32
7430#include <sys/procfs.h>
7431int main() {
97bf5e38 7432prrun_t avar
596c9d4b
KB
7433; return 0; }
7434EOF
d9feb4e7 7435if { (eval echo configure:7436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7436 rm -rf conftest*
97bf5e38 7437 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7438else
7439 echo "configure: failed program was:" >&5
7440 cat conftest.$ac_ext >&5
7441 rm -rf conftest*
97bf5e38 7442 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7443
7444fi
7445rm -f conftest*
7446fi
7447
97bf5e38 7448 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7449 cat >> confdefs.h <<\EOF
97bf5e38 7450#define HAVE_PRRUN_T 1
596c9d4b
KB
7451EOF
7452
7453 fi
97bf5e38 7454 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7455
97bf5e38 7456 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7457echo "configure:7458: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7458 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7459 echo $ac_n "(cached) $ac_c" 1>&6
7460else
7461 cat > conftest.$ac_ext <<EOF
d9feb4e7 7462#line 7463 "configure"
596c9d4b
KB
7463#include "confdefs.h"
7464
7465#define _SYSCALL32
7466#include <sys/procfs.h>
7467int main() {
97bf5e38 7468gregset_t avar
596c9d4b
KB
7469; return 0; }
7470EOF
d9feb4e7 7471if { (eval echo configure:7472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7472 rm -rf conftest*
97bf5e38 7473 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7474else
7475 echo "configure: failed program was:" >&5
7476 cat conftest.$ac_ext >&5
7477 rm -rf conftest*
97bf5e38 7478 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7479
7480fi
7481rm -f conftest*
7482fi
7483
97bf5e38 7484 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7485 cat >> confdefs.h <<\EOF
97bf5e38 7486#define HAVE_GREGSET_T 1
596c9d4b
KB
7487EOF
7488
7489 fi
97bf5e38 7490 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7491
97bf5e38 7492 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7493echo "configure:7494: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7494 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7495 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7496else
7497 cat > conftest.$ac_ext <<EOF
d9feb4e7 7498#line 7499 "configure"
d84dd0c5 7499#include "confdefs.h"
97bf5e38
MK
7500
7501#define _SYSCALL32
d84dd0c5 7502#include <sys/procfs.h>
97bf5e38
MK
7503int main() {
7504fpregset_t avar
7505; return 0; }
d84dd0c5 7506EOF
d9feb4e7 7507if { (eval echo configure:7508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7508 rm -rf conftest*
7509 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7510else
7511 echo "configure: failed program was:" >&5
7512 cat conftest.$ac_ext >&5
97bf5e38
MK
7513 rm -rf conftest*
7514 bfd_cv_have_sys_procfs_type_fpregset_t=no
7515
d84dd0c5 7516fi
97bf5e38 7517rm -f conftest*
d84dd0c5
MK
7518fi
7519
97bf5e38
MK
7520 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7521 cat >> confdefs.h <<\EOF
7522#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7523EOF
7524
97bf5e38
MK
7525 fi
7526 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7527
97bf5e38 7528 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7529echo "configure:7530: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7530 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7531 echo $ac_n "(cached) $ac_c" 1>&6
7532else
7533 cat > conftest.$ac_ext <<EOF
d9feb4e7 7534#line 7535 "configure"
c906108c 7535#include "confdefs.h"
c906108c 7536
97bf5e38
MK
7537#define _SYSCALL32
7538#include <sys/procfs.h>
c906108c 7539int main() {
97bf5e38 7540prgregset_t avar
c906108c
SS
7541; return 0; }
7542EOF
d9feb4e7 7543if { (eval echo configure:7544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7544 rm -rf conftest*
97bf5e38 7545 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7546else
7547 echo "configure: failed program was:" >&5
7548 cat conftest.$ac_ext >&5
7549 rm -rf conftest*
97bf5e38
MK
7550 bfd_cv_have_sys_procfs_type_prgregset_t=no
7551
c906108c
SS
7552fi
7553rm -f conftest*
7554fi
7555
97bf5e38
MK
7556 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7557 cat >> confdefs.h <<\EOF
7558#define HAVE_PRGREGSET_T 1
c906108c
SS
7559EOF
7560
97bf5e38
MK
7561 fi
7562 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7563
97bf5e38 7564 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7565echo "configure:7566: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7566 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7567 echo $ac_n "(cached) $ac_c" 1>&6
7568else
7569 cat > conftest.$ac_ext <<EOF
d9feb4e7 7570#line 7571 "configure"
d45fe813 7571#include "confdefs.h"
97bf5e38
MK
7572
7573#define _SYSCALL32
7574#include <sys/procfs.h>
d45fe813 7575int main() {
97bf5e38 7576prfpregset_t avar
d45fe813
KB
7577; return 0; }
7578EOF
d9feb4e7 7579if { (eval echo configure:7580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7580 rm -rf conftest*
97bf5e38 7581 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7582else
7583 echo "configure: failed program was:" >&5
7584 cat conftest.$ac_ext >&5
7585 rm -rf conftest*
97bf5e38
MK
7586 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7587
d45fe813
KB
7588fi
7589rm -f conftest*
7590fi
7591
97bf5e38
MK
7592 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7593 cat >> confdefs.h <<\EOF
7594#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7595EOF
7596
97bf5e38
MK
7597 fi
7598 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7599
97bf5e38 7600 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7601echo "configure:7602: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7602 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7603 echo $ac_n "(cached) $ac_c" 1>&6
7604else
7605 cat > conftest.$ac_ext <<EOF
d9feb4e7 7606#line 7607 "configure"
d45fe813 7607#include "confdefs.h"
97bf5e38
MK
7608
7609#define _SYSCALL32
7610#include <sys/procfs.h>
d45fe813 7611int main() {
97bf5e38 7612prgregset32_t avar
d45fe813
KB
7613; return 0; }
7614EOF
d9feb4e7 7615if { (eval echo configure:7616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7616 rm -rf conftest*
97bf5e38 7617 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7618else
7619 echo "configure: failed program was:" >&5
7620 cat conftest.$ac_ext >&5
7621 rm -rf conftest*
97bf5e38
MK
7622 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7623
d45fe813
KB
7624fi
7625rm -f conftest*
7626fi
7627
97bf5e38
MK
7628 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7629 cat >> confdefs.h <<\EOF
7630#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7631EOF
7632
97bf5e38
MK
7633 fi
7634 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7635
97bf5e38 7636 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7637echo "configure:7638: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7638 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7639 echo $ac_n "(cached) $ac_c" 1>&6
7640else
7641 cat > conftest.$ac_ext <<EOF
d9feb4e7 7642#line 7643 "configure"
d45fe813 7643#include "confdefs.h"
97bf5e38
MK
7644
7645#define _SYSCALL32
7646#include <sys/procfs.h>
d45fe813 7647int main() {
97bf5e38 7648prfpregset32_t avar
d45fe813
KB
7649; return 0; }
7650EOF
d9feb4e7 7651if { (eval echo configure:7652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7652 rm -rf conftest*
97bf5e38 7653 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7654else
7655 echo "configure: failed program was:" >&5
7656 cat conftest.$ac_ext >&5
7657 rm -rf conftest*
97bf5e38
MK
7658 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7659
d45fe813
KB
7660fi
7661rm -f conftest*
7662fi
7663
97bf5e38
MK
7664 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7665 cat >> confdefs.h <<\EOF
7666#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7667EOF
7668
97bf5e38
MK
7669 fi
7670 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7671
97bf5e38 7672 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7673echo "configure:7674: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7674 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7675 echo $ac_n "(cached) $ac_c" 1>&6
7676else
7677 cat > conftest.$ac_ext <<EOF
d9feb4e7 7678#line 7679 "configure"
d45fe813 7679#include "confdefs.h"
97bf5e38 7680
d45fe813 7681#define _SYSCALL32
97bf5e38 7682#include <sys/procfs.h>
d45fe813 7683int main() {
97bf5e38 7684lwpid_t avar
d45fe813
KB
7685; return 0; }
7686EOF
d9feb4e7 7687if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7688 rm -rf conftest*
97bf5e38 7689 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7690else
7691 echo "configure: failed program was:" >&5
7692 cat conftest.$ac_ext >&5
7693 rm -rf conftest*
97bf5e38
MK
7694 bfd_cv_have_sys_procfs_type_lwpid_t=no
7695
d45fe813
KB
7696fi
7697rm -f conftest*
7698fi
7699
97bf5e38
MK
7700 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7701 cat >> confdefs.h <<\EOF
7702#define HAVE_LWPID_T 1
d45fe813
KB
7703EOF
7704
97bf5e38
MK
7705 fi
7706 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7707
97bf5e38 7708 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7709echo "configure:7710: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7710 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7711 echo $ac_n "(cached) $ac_c" 1>&6
7712else
7713 cat > conftest.$ac_ext <<EOF
d9feb4e7 7714#line 7715 "configure"
c906108c
SS
7715#include "confdefs.h"
7716
97bf5e38
MK
7717#define _SYSCALL32
7718#include <sys/procfs.h>
c906108c 7719int main() {
97bf5e38 7720psaddr_t avar
c906108c
SS
7721; return 0; }
7722EOF
d9feb4e7 7723if { (eval echo configure:7724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7724 rm -rf conftest*
97bf5e38 7725 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7726else
7727 echo "configure: failed program was:" >&5
7728 cat conftest.$ac_ext >&5
7729 rm -rf conftest*
97bf5e38
MK
7730 bfd_cv_have_sys_procfs_type_psaddr_t=no
7731
c906108c
SS
7732fi
7733rm -f conftest*
7734fi
7735
97bf5e38
MK
7736 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7737 cat >> confdefs.h <<\EOF
7738#define HAVE_PSADDR_T 1
c906108c
SS
7739EOF
7740
97bf5e38
MK
7741 fi
7742 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7743
97bf5e38 7744 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7745echo "configure:7746: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7746 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7747 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7748else
7749 cat > conftest.$ac_ext <<EOF
d9feb4e7 7750#line 7751 "configure"
c906108c
SS
7751#include "confdefs.h"
7752
97bf5e38
MK
7753#define _SYSCALL32
7754#include <sys/procfs.h>
7755int main() {
7756prsysent_t avar
7757; return 0; }
c906108c 7758EOF
d9feb4e7 7759if { (eval echo configure:7760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7760 rm -rf conftest*
7761 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7762else
7763 echo "configure: failed program was:" >&5
7764 cat conftest.$ac_ext >&5
97bf5e38
MK
7765 rm -rf conftest*
7766 bfd_cv_have_sys_procfs_type_prsysent_t=no
7767
c906108c 7768fi
97bf5e38 7769rm -f conftest*
c906108c
SS
7770fi
7771
97bf5e38
MK
7772 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7773 cat >> confdefs.h <<\EOF
7774#define HAVE_PRSYSENT_T 1
c906108c
SS
7775EOF
7776
97bf5e38
MK
7777 fi
7778 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7779
97bf5e38 7780 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7781echo "configure:7782: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7782 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7783 echo $ac_n "(cached) $ac_c" 1>&6
7784else
7785 cat > conftest.$ac_ext <<EOF
d9feb4e7 7786#line 7787 "configure"
c906108c
SS
7787#include "confdefs.h"
7788
97bf5e38
MK
7789#define _SYSCALL32
7790#include <sys/procfs.h>
c906108c 7791int main() {
97bf5e38 7792pr_sigset_t avar
c906108c
SS
7793; return 0; }
7794EOF
d9feb4e7 7795if { (eval echo configure:7796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7796 rm -rf conftest*
97bf5e38 7797 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7798else
7799 echo "configure: failed program was:" >&5
7800 cat conftest.$ac_ext >&5
7801 rm -rf conftest*
97bf5e38
MK
7802 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7803
c906108c
SS
7804fi
7805rm -f conftest*
7806fi
7807
97bf5e38
MK
7808 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7809 cat >> confdefs.h <<\EOF
7810#define HAVE_PR_SIGSET_T 1
c906108c
SS
7811EOF
7812
97bf5e38
MK
7813 fi
7814 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7815
97bf5e38 7816 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7817echo "configure:7818: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7818 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7819 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7820else
7821 cat > conftest.$ac_ext <<EOF
d9feb4e7 7822#line 7823 "configure"
c906108c
SS
7823#include "confdefs.h"
7824
97bf5e38
MK
7825#define _SYSCALL32
7826#include <sys/procfs.h>
7827int main() {
7828pr_sigaction64_t avar
7829; return 0; }
c906108c 7830EOF
d9feb4e7 7831if { (eval echo configure:7832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7832 rm -rf conftest*
7833 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7834else
7835 echo "configure: failed program was:" >&5
7836 cat conftest.$ac_ext >&5
97bf5e38
MK
7837 rm -rf conftest*
7838 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7839
c906108c 7840fi
97bf5e38 7841rm -f conftest*
c906108c
SS
7842fi
7843
97bf5e38
MK
7844 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7845 cat >> confdefs.h <<\EOF
7846#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7847EOF
7848
97bf5e38
MK
7849 fi
7850 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7851
7852 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7853echo "configure:7854: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7854 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7855 echo $ac_n "(cached) $ac_c" 1>&6
7856else
7857 cat > conftest.$ac_ext <<EOF
d9feb4e7 7858#line 7859 "configure"
97bf5e38
MK
7859#include "confdefs.h"
7860
7861#define _SYSCALL32
7862#include <sys/procfs.h>
7863int main() {
7864pr_siginfo64_t avar
7865; return 0; }
7866EOF
d9feb4e7 7867if { (eval echo configure:7868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7868 rm -rf conftest*
7869 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7870else
7871 echo "configure: failed program was:" >&5
7872 cat conftest.$ac_ext >&5
7873 rm -rf conftest*
7874 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7875
7876fi
7877rm -f conftest*
c906108c 7878fi
c906108c 7879
97bf5e38
MK
7880 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7881 cat >> confdefs.h <<\EOF
7882#define HAVE_PR_SIGINFO64_T 1
7883EOF
c906108c 7884
97bf5e38
MK
7885 fi
7886 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7887
7888
7889
7890
7891
7892 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7893 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
d9feb4e7 7894echo "configure:7895: checking whether prfpregset_t type is broken" >&5
97bf5e38 7895 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7896 echo $ac_n "(cached) $ac_c" 1>&6
7897else
7898 if test "$cross_compiling" = yes; then
97bf5e38 7899 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7900else
7901 cat > conftest.$ac_ext <<EOF
d9feb4e7 7902#line 7903 "configure"
c906108c 7903#include "confdefs.h"
97bf5e38
MK
7904#include <sys/procfs.h>
7905 int main ()
7906 {
7907 if (sizeof (prfpregset_t) == sizeof (void *))
7908 return 1;
7909 return 0;
7910 }
c906108c 7911EOF
d9feb4e7 7912if { (eval echo configure:7913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7913then
97bf5e38 7914 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7915else
7916 echo "configure: failed program was:" >&5
7917 cat conftest.$ac_ext >&5
7918 rm -fr conftest*
97bf5e38 7919 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7920fi
7921rm -fr conftest*
7922fi
7923
7924fi
7925
97bf5e38
MK
7926 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7927 if test $gdb_cv_prfpregset_t_broken = yes; then
7928 cat >> confdefs.h <<\EOF
7929#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7930EOF
7931
97bf5e38
MK
7932 fi
7933 fi
c906108c 7934
97bf5e38
MK
7935
7936 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
d9feb4e7 7937echo "configure:7938: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7938 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7939 echo $ac_n "(cached) $ac_c" 1>&6
7940else
7941 cat > conftest.$ac_ext <<EOF
d9feb4e7 7942#line 7943 "configure"
c906108c 7943#include "confdefs.h"
97bf5e38
MK
7944#include <unistd.h>
7945#include <sys/types.h>
7946#include <sys/procfs.h>
7947
7948int main() {
7949
7950 int dummy;;
7951 dummy = ioctl(0, PIOCSET, &dummy);
7952
7953; return 0; }
c906108c 7954EOF
d9feb4e7 7955if { (eval echo configure:7956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7956 rm -rf conftest*
97bf5e38 7957 gdb_cv_have_procfs_piocset=yes
c906108c 7958else
c906108c
SS
7959 echo "configure: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961 rm -rf conftest*
97bf5e38 7962 gdb_cv_have_procfs_piocset=no
c906108c
SS
7963fi
7964rm -f conftest*
7965fi
97bf5e38
MK
7966
7967 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7968 if test $gdb_cv_have_procfs_piocset = yes; then
7969 cat >> confdefs.h <<\EOF
7970#define HAVE_PROCFS_PIOCSET 1
c906108c 7971EOF
97bf5e38
MK
7972
7973 fi
c906108c 7974fi
c906108c 7975
97bf5e38
MK
7976if test ${host} = ${target} ; then
7977
7978 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
d9feb4e7 7979echo "configure:7980: checking for member l_addr in struct link_map" >&5
97bf5e38 7980 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7981 echo $ac_n "(cached) $ac_c" 1>&6
7982else
7983 cat > conftest.$ac_ext <<EOF
d9feb4e7 7984#line 7985 "configure"
c906108c 7985#include "confdefs.h"
97bf5e38 7986#include <link.h>
c906108c 7987int main() {
97bf5e38 7988struct link_map lm; (void) lm.l_addr;
c906108c
SS
7989; return 0; }
7990EOF
d9feb4e7 7991if { (eval echo configure:7992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7992 rm -rf conftest*
97bf5e38 7993 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7994else
7995 echo "configure: failed program was:" >&5
7996 cat conftest.$ac_ext >&5
7997 rm -rf conftest*
97bf5e38 7998 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7999fi
8000rm -f conftest*
8001fi
8002
97bf5e38
MK
8003 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8004 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8005 cat >> confdefs.h <<\EOF
8006#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 8007EOF
97bf5e38
MK
8008
8009 fi
8010
8011
8012 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
d9feb4e7 8013echo "configure:8014: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8014 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8015 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8016else
97bf5e38 8017 cat > conftest.$ac_ext <<EOF
d9feb4e7 8018#line 8019 "configure"
97bf5e38
MK
8019#include "confdefs.h"
8020#include <sys/types.h>
8021#include <link.h>
8022int main() {
8023struct link_map lm; (void) lm.lm_addr;
8024; return 0; }
8025EOF
d9feb4e7 8026if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8027 rm -rf conftest*
8028 gdb_cv_have_struct_link_map_with_lm_members=yes
8029else
8030 echo "configure: failed program was:" >&5
8031 cat conftest.$ac_ext >&5
8032 rm -rf conftest*
8033 gdb_cv_have_struct_link_map_with_lm_members=no
8034fi
8035rm -f conftest*
c906108c 8036fi
c906108c 8037
97bf5e38
MK
8038 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8039 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8040 cat >> confdefs.h <<\EOF
8041#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8042EOF
8043
8044 fi
8045
8046
8047 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
d9feb4e7 8048echo "configure:8049: checking for member som_addr in struct so_map" >&5
97bf5e38 8049 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8050 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8051else
8052 cat > conftest.$ac_ext <<EOF
d9feb4e7 8053#line 8054 "configure"
c906108c 8054#include "confdefs.h"
97bf5e38
MK
8055#include <sys/types.h>
8056#ifdef HAVE_NLIST_H
8057#include <nlist.h>
8058#endif
8059#include <link.h>
8060int main() {
8061struct so_map lm; (void) lm.som_addr;
8062; return 0; }
8063EOF
d9feb4e7 8064if { (eval echo configure:8065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8065 rm -rf conftest*
8066 gdb_cv_have_struct_so_map_with_som_members=yes
8067else
8068 echo "configure: failed program was:" >&5
8069 cat conftest.$ac_ext >&5
8070 rm -rf conftest*
8071 gdb_cv_have_struct_so_map_with_som_members=no
8072fi
8073rm -f conftest*
8074fi
c906108c 8075
97bf5e38
MK
8076 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8077 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8078 cat >> confdefs.h <<\EOF
8079#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8080EOF
c906108c 8081
97bf5e38 8082 fi
c906108c 8083
97bf5e38
MK
8084
8085 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
d9feb4e7 8086echo "configure:8087: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8087 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8088 echo $ac_n "(cached) $ac_c" 1>&6
8089else
8090 cat > conftest.$ac_ext <<EOF
d9feb4e7 8091#line 8092 "configure"
97bf5e38
MK
8092#include "confdefs.h"
8093#define _SYSCALL32
8094#include <sys/link.h>
8095int main() {
8096struct link_map32 l;
8097; return 0; }
8098EOF
d9feb4e7 8099if { (eval echo configure:8100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8100 rm -rf conftest*
8101 gdb_cv_have_struct_link_map32=yes
8102else
8103 echo "configure: failed program was:" >&5
8104 cat conftest.$ac_ext >&5
8105 rm -rf conftest*
8106 gdb_cv_have_struct_link_map32=no
8107fi
8108rm -f conftest*
8109fi
c906108c 8110
97bf5e38
MK
8111 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8112 if test $gdb_cv_have_struct_link_map32 = yes; then
8113 cat >> confdefs.h <<\EOF
8114#define HAVE_STRUCT_LINK_MAP32 1
8115EOF
c906108c 8116
97bf5e38
MK
8117 cat >> confdefs.h <<\EOF
8118#define _SYSCALL32 1
8119EOF
c906108c 8120
97bf5e38
MK
8121 fi
8122fi
c906108c 8123
c906108c 8124
97bf5e38 8125echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
d9feb4e7 8126echo "configure:8127: checking for long long support in compiler" >&5
97bf5e38
MK
8127if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8128 echo $ac_n "(cached) $ac_c" 1>&6
8129else
8130 cat > conftest.$ac_ext <<EOF
d9feb4e7 8131#line 8132 "configure"
97bf5e38 8132#include "confdefs.h"
c906108c 8133
97bf5e38 8134int main() {
c906108c 8135
97bf5e38
MK
8136 extern long long foo;
8137 switch (foo & 2) { case 0: return 1; }
c906108c 8138
97bf5e38
MK
8139; return 0; }
8140EOF
d9feb4e7 8141if { (eval echo configure:8142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8142 rm -rf conftest*
8143 gdb_cv_c_long_long=yes
8144else
8145 echo "configure: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 rm -rf conftest*
8148 gdb_cv_c_long_long=no
8149fi
8150rm -f conftest*
8151fi
c906108c 8152
97bf5e38
MK
8153echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8154if test $gdb_cv_c_long_long = yes; then
8155 cat >> confdefs.h <<\EOF
8156#define CC_HAS_LONG_LONG 1
8157EOF
8158
8159fi
8160
8161
8162echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
d9feb4e7 8163echo "configure:8164: checking for long long support in printf" >&5
97bf5e38
MK
8164if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8165 echo $ac_n "(cached) $ac_c" 1>&6
8166else
8167 if test "$cross_compiling" = yes; then
8168 gdb_cv_printf_has_long_long=no
8169else
8170 cat > conftest.$ac_ext <<EOF
d9feb4e7 8171#line 8172 "configure"
97bf5e38
MK
8172#include "confdefs.h"
8173
8174int main () {
8175 char buf[32];
8176 long long l = 0;
8177 l = (l << 16) + 0x0123;
8178 l = (l << 16) + 0x4567;
8179 l = (l << 16) + 0x89ab;
8180 l = (l << 16) + 0xcdef;
8181 sprintf (buf, "0x%016llx", l);
8182 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8183}
97bf5e38 8184EOF
d9feb4e7 8185if { (eval echo configure:8186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8186then
8187 gdb_cv_printf_has_long_long=yes
8188else
8189 echo "configure: failed program was:" >&5
8190 cat conftest.$ac_ext >&5
8191 rm -fr conftest*
8192 gdb_cv_printf_has_long_long=no
8193fi
8194rm -fr conftest*
8195fi
8196
8197fi
8198
8199if test $gdb_cv_printf_has_long_long = yes; then
8200 cat >> confdefs.h <<\EOF
8201#define PRINTF_HAS_LONG_LONG 1
8202EOF
8203
8204fi
8205echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8206
8207
8208echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
d9feb4e7 8209echo "configure:8210: checking for long double support in compiler" >&5
97bf5e38
MK
8210if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8211 echo $ac_n "(cached) $ac_c" 1>&6
8212else
8213 cat > conftest.$ac_ext <<EOF
d9feb4e7 8214#line 8215 "configure"
97bf5e38
MK
8215#include "confdefs.h"
8216
8217int main() {
8218long double foo;
8219; return 0; }
8220EOF
d9feb4e7 8221if { (eval echo configure:8222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8222 rm -rf conftest*
8223 ac_cv_c_long_double=yes
8224else
8225 echo "configure: failed program was:" >&5
8226 cat conftest.$ac_ext >&5
8227 rm -rf conftest*
8228 ac_cv_c_long_double=no
8229fi
8230rm -f conftest*
8231fi
c906108c 8232
97bf5e38
MK
8233echo "$ac_t""$ac_cv_c_long_double" 1>&6
8234if test $ac_cv_c_long_double = yes; then
8235 cat >> confdefs.h <<\EOF
8236#define HAVE_LONG_DOUBLE 1
c906108c 8237EOF
97bf5e38
MK
8238
8239fi
8240
8241
8242echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
d9feb4e7 8243echo "configure:8244: checking for long double support in printf" >&5
97bf5e38
MK
8244if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8245 echo $ac_n "(cached) $ac_c" 1>&6
8246else
8247 if test "$cross_compiling" = yes; then
8248 gdb_cv_printf_has_long_double=no
8249else
8250 cat > conftest.$ac_ext <<EOF
d9feb4e7 8251#line 8252 "configure"
97bf5e38
MK
8252#include "confdefs.h"
8253
8254int main () {
8255 char buf[16];
8256 long double f = 3.141592653;
8257 sprintf (buf, "%Lg", f);
8258 return (strncmp ("3.14159", buf, 7));
8259}
8260EOF
d9feb4e7 8261if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8262then
97bf5e38 8263 gdb_cv_printf_has_long_double=yes
c906108c
SS
8264else
8265 echo "configure: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 rm -fr conftest*
97bf5e38 8268 gdb_cv_printf_has_long_double=no
c906108c
SS
8269fi
8270rm -fr conftest*
8271fi
8272
8273fi
8274
97bf5e38 8275if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8276 cat >> confdefs.h <<\EOF
97bf5e38
MK
8277#define PRINTF_HAS_LONG_DOUBLE 1
8278EOF
8279
8280fi
8281echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8282
8283
8284echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
d9feb4e7 8285echo "configure:8286: checking for long double support in scanf" >&5
97bf5e38
MK
8286if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8287 echo $ac_n "(cached) $ac_c" 1>&6
8288else
8289 if test "$cross_compiling" = yes; then
8290 gdb_cv_scanf_has_long_double=no
8291else
8292 cat > conftest.$ac_ext <<EOF
d9feb4e7 8293#line 8294 "configure"
97bf5e38
MK
8294#include "confdefs.h"
8295
8296int main () {
8297 char *buf = "3.141592653";
8298 long double f = 0;
8299 sscanf (buf, "%Lg", &f);
8300 return !(f > 3.14159 && f < 3.14160);
8301}
c906108c 8302EOF
d9feb4e7 8303if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8304then
8305 gdb_cv_scanf_has_long_double=yes
8306else
8307 echo "configure: failed program was:" >&5
8308 cat conftest.$ac_ext >&5
8309 rm -fr conftest*
8310 gdb_cv_scanf_has_long_double=no
8311fi
8312rm -fr conftest*
8313fi
c906108c
SS
8314
8315fi
8316
97bf5e38
MK
8317if test $gdb_cv_scanf_has_long_double = yes; then
8318 cat >> confdefs.h <<\EOF
8319#define SCANF_HAS_LONG_DOUBLE 1
8320EOF
8321
8322fi
8323echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8324
438013df
AO
8325case ${host_os} in
8326aix*)
8327 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
d9feb4e7 8328echo "configure:8329: checking for -bbigtoc option" >&5
438013df
AO
8329if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8330 echo $ac_n "(cached) $ac_c" 1>&6
8331else
8332
8333 SAVE_LDFLAGS=$LDFLAGS
8334
8335 case $GCC in
8336 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8337 *) gdb_cv_bigtoc=-bbigtoc ;;
8338 esac
8339
8340 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8341 cat > conftest.$ac_ext <<EOF
d9feb4e7 8342#line 8343 "configure"
438013df
AO
8343#include "confdefs.h"
8344
8345int main() {
8346int i;
8347; return 0; }
8348EOF
d9feb4e7 8349if { (eval echo configure:8350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8350 :
8351else
8352 echo "configure: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8354 rm -rf conftest*
8355 gdb_cv_bigtoc=
8356fi
8357rm -f conftest*
8358
8359fi
8360
8361echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8362 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8363 ;;
8364esac
8365
c906108c
SS
8366
8367
8368if test ${build} = ${host} -a ${host} = ${target} ; then
8369 case ${host_os} in
8370 hpux*)
8371 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
d9feb4e7 8372echo "configure:8373: checking for HPUX/OSF thread support" >&5
c906108c
SS
8373 if test -f /usr/include/dce/cma_config.h ; then
8374 if test "$GCC" = "yes" ; then
8375 echo "$ac_t""yes" 1>&6
8376 cat >> confdefs.h <<\EOF
8377#define HAVE_HPUX_THREAD_SUPPORT 1
8378EOF
8379
66b965bb 8380 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8381 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8382 else
8383 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8384 fi
8385 else
8386 echo "$ac_t""no" 1>&6
8387 fi
8388 ;;
8389 solaris*)
d92419e5
JB
8390 # See if thread_db library is around for Solaris thread debugging.
8391 # Note that we must explicitly test for version 1 of the library
8392 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8393 # the same API.
c906108c 8394 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
d9feb4e7 8395echo "configure:8396: checking for Solaris thread debugging library" >&5
c906108c
SS
8396 if test -f /usr/lib/libthread_db.so.1 ; then
8397 echo "$ac_t""yes" 1>&6
8398 cat >> confdefs.h <<\EOF
8399#define HAVE_THREAD_DB_LIB 1
8400EOF
8401
66b965bb 8402 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8403 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8404 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
d9feb4e7 8405echo "configure:8406: checking for dlopen in -ldl" >&5
c906108c
SS
8406ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8407if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8408 echo $ac_n "(cached) $ac_c" 1>&6
8409else
8410 ac_save_LIBS="$LIBS"
8411LIBS="-ldl $LIBS"
8412cat > conftest.$ac_ext <<EOF
d9feb4e7 8413#line 8414 "configure"
c906108c
SS
8414#include "confdefs.h"
8415/* Override any gcc2 internal prototype to avoid an error. */
8416/* We use char because int might match the return type of a gcc2
8417 builtin and then its argument prototype would still apply. */
8418char dlopen();
8419
8420int main() {
8421dlopen()
8422; return 0; }
8423EOF
d9feb4e7 8424if { (eval echo configure:8425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8425 rm -rf conftest*
8426 eval "ac_cv_lib_$ac_lib_var=yes"
8427else
8428 echo "configure: failed program was:" >&5
8429 cat conftest.$ac_ext >&5
8430 rm -rf conftest*
8431 eval "ac_cv_lib_$ac_lib_var=no"
8432fi
8433rm -f conftest*
8434LIBS="$ac_save_LIBS"
8435
8436fi
8437if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8438 echo "$ac_t""yes" 1>&6
8439 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8440 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8441 cat >> confdefs.h <<EOF
8442#define $ac_tr_lib 1
8443EOF
8444
8445 LIBS="-ldl $LIBS"
8446
8447else
8448 echo "$ac_t""no" 1>&6
8449fi
8450
8451 if test "$GCC" = "yes" ; then
8452 # The GNU linker requires the -export-dynamic option to make
8453 # all symbols visible in the dynamic symbol table.
8454 hold_ldflags=$LDFLAGS
8455 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
d9feb4e7 8456echo "configure:8457: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8457 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8458 cat > conftest.$ac_ext <<EOF
d9feb4e7 8459#line 8460 "configure"
c906108c
SS
8460#include "confdefs.h"
8461
8462int main() {
8463int i;
8464; return 0; }
8465EOF
d9feb4e7 8466if { (eval echo configure:8467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8467 rm -rf conftest*
8468 found=yes
8469else
8470 echo "configure: failed program was:" >&5
8471 cat conftest.$ac_ext >&5
8472 rm -rf conftest*
8473 found=no
8474fi
8475rm -f conftest*
8476 LDFLAGS=$hold_ldflags
8477 echo "$ac_t""$found" 1>&6
8478 if test $found = yes; then
8479 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8480 fi
8481 fi
8482 # Sun randomly tweaked the prototypes in <proc_service.h>
8483 # at one point.
8484 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
d9feb4e7 8485echo "configure:8486: checking if <proc_service.h> is old" >&5
c906108c
SS
8486 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8487 echo $ac_n "(cached) $ac_c" 1>&6
8488else
8489
8490 cat > conftest.$ac_ext <<EOF
d9feb4e7 8491#line 8492 "configure"
c906108c
SS
8492#include "confdefs.h"
8493
8494 #include <proc_service.h>
8495 ps_err_e ps_pdwrite
8496 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8497
8498int main() {
8499
8500; return 0; }
8501EOF
d9feb4e7 8502if { (eval echo configure:8503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8503 rm -rf conftest*
8504 gdb_cv_proc_service_is_old=no
8505else
8506 echo "configure: failed program was:" >&5
8507 cat conftest.$ac_ext >&5
8508 rm -rf conftest*
8509 gdb_cv_proc_service_is_old=yes
8510fi
8511rm -f conftest*
8512
8513fi
8514
8515 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8516 if test $gdb_cv_proc_service_is_old = yes; then
8517 cat >> confdefs.h <<\EOF
8518#define PROC_SERVICE_IS_OLD 1
8519EOF
8520
8521 fi
8522 else
8523 echo "$ac_t""no" 1>&6
8524 fi
8525 ;;
d92419e5
JB
8526 aix*)
8527 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
d9feb4e7 8528echo "configure:8529: checking for AiX thread debugging library" >&5
d92419e5
JB
8529 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8530 echo $ac_n "(cached) $ac_c" 1>&6
8531else
8532 cat > conftest.$ac_ext <<EOF
d9feb4e7 8533#line 8534 "configure"
d92419e5
JB
8534#include "confdefs.h"
8535#include <sys/pthdebug.h>
8536int main() {
8537#ifndef PTHDB_VERSION_3
8538 #error
8539 #endif
8540; return 0; }
8541EOF
d9feb4e7 8542if { (eval echo configure:8543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8543 rm -rf conftest*
8544 gdb_cv_have_aix_thread_debug=yes
8545else
8546 echo "configure: failed program was:" >&5
8547 cat conftest.$ac_ext >&5
8548 rm -rf conftest*
8549 gdb_cv_have_aix_thread_debug=no
8550fi
8551rm -f conftest*
8552fi
8553
8554 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8555 if test $gdb_cv_have_aix_thread_debug = yes; then
8556 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8557 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8558 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8559 fi
8560 ;;
c906108c
SS
8561 esac
8562
8563fi
8564
3f47be5c
EZ
8565if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8566 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
d9feb4e7 8567echo "configure:8568: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8568if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8569 echo $ac_n "(cached) $ac_c" 1>&6
8570else
8571 cat > conftest.$ac_ext <<EOF
d9feb4e7 8572#line 8573 "configure"
3f47be5c
EZ
8573#include "confdefs.h"
8574#include <thread_db.h>
8575int main() {
8576int i = TD_NOTALLOC;
8577; return 0; }
8578EOF
d9feb4e7 8579if { (eval echo configure:8580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8580 rm -rf conftest*
8581 gdb_cv_thread_db_h_has_td_notalloc=yes
8582else
8583 echo "configure: failed program was:" >&5
8584 cat conftest.$ac_ext >&5
8585 rm -rf conftest*
8586 gdb_cv_thread_db_h_has_td_notalloc=no
8587
8588fi
8589rm -f conftest*
8590
8591fi
8592
8593echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8594fi
8595if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8596 cat >> confdefs.h <<\EOF
8597#define THREAD_DB_HAS_TD_NOTALLOC 1
8598EOF
8599
8600fi
8601
fb40c209 8602
030292b7
DJ
8603# Check whether --with-sysroot or --without-sysroot was given.
8604if test "${with_sysroot+set}" = set; then
8605 withval="$with_sysroot"
8606
8607 case ${with_sysroot} in
8608 yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;;
8609 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8610 esac
8611
8612 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8613
8614 if test "x$exec_prefix" = xNONE; then
8615 if test "x$prefix" = xNONE; then
8616 test_prefix=/usr/local
8617 else
8618 test_prefix=$prefix
8619 fi
8620 else
8621 test_prefix=$exec_prefix
8622 fi
8623 case ${TARGET_SYSTEM_ROOT} in
8624 ${test_prefix}*)
8625 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8626 TARGET_SYSTEM_ROOT_DEFINE="$t"
8627 ;;
8628 esac
8629
8630else
8631
8632 TARGET_SYSTEM_ROOT=
8633 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8634
8635fi
8636
8637
8638
8639
3b851bce
AC
8640# NOTE: Don't add -Wall or -Wunused, they both include
8641# -Wunused-parameter which reports bogus warnings.
8642# NOTE: If you add to this list, remember to update
8643# gdb/doc/gdbint.texinfo.
1decb323 8644build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8645-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8646# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8647# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8648# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8649# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8650# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8651# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8652# Check whether --enable-build-warnings or --disable-build-warnings was given.
8653if test "${enable_build_warnings+set}" = set; then
8654 enableval="$enable_build_warnings"
1decb323 8655 case "${enableval}" in
c906108c
SS
8656 yes) ;;
8657 no) build_warnings="-w";;
8658 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8659 build_warnings="${build_warnings} ${t}";;
8660 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8661 build_warnings="${t} ${build_warnings}";;
8662 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8663esac
d4f3574e 8664if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8665 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8666fi
1decb323 8667fi
3b851bce
AC
8668# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8669if test "${enable_gdb_build_warnings+set}" = set; then
8670 enableval="$enable_gdb_build_warnings"
8671 case "${enableval}" in
8672 yes) ;;
8673 no) build_warnings="-w";;
8674 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8675 build_warnings="${build_warnings} ${t}";;
8676 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8677 build_warnings="${t} ${build_warnings}";;
8678 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8679esac
8680if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8681 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8682fi
8683fi
104c1213
JM
8684WARN_CFLAGS=""
8685WERROR_CFLAGS=""
c906108c
SS
8686if test "x${build_warnings}" != x -a "x$GCC" = xyes
8687then
746a987d 8688 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
d9feb4e7 8689echo "configure:8690: checking compiler warning flags" >&5
746a987d
AC
8690 # Separate out the -Werror flag as some files just cannot be
8691 # compiled with it enabled.
8692 for w in ${build_warnings}; do
8693 case $w in
8694 -Werr*) WERROR_CFLAGS=-Werror ;;
8695 *) # Check that GCC accepts it
4536bbc6
AC
8696 saved_CFLAGS="$CFLAGS"
8697 CFLAGS="$CFLAGS $w"
8698 cat > conftest.$ac_ext <<EOF
d9feb4e7 8699#line 8700 "configure"
4536bbc6
AC
8700#include "confdefs.h"
8701
8702int main() {
8703
8704; return 0; }
8705EOF
d9feb4e7 8706if { (eval echo configure:8707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8707 rm -rf conftest*
8708 WARN_CFLAGS="${WARN_CFLAGS} $w"
8709else
8710 echo "configure: failed program was:" >&5
8711 cat conftest.$ac_ext >&5
8712fi
8713rm -f conftest*
8714 CFLAGS="$saved_CFLAGS"
746a987d
AC
8715 esac
8716 done
8717 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8718fi
8719
8720
104c1213 8721
c906108c
SS
8722MMALLOC_CFLAGS=
8723MMALLOC=
8724
8725
8726
8727# Check whether --with-mmalloc or --without-mmalloc was given.
8728if test "${with_mmalloc+set}" = set; then
8729 withval="$with_mmalloc"
8730 case "${withval}" in
8731 yes) want_mmalloc=true ;;
8732 no) want_mmalloc=false;;
8733 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8734esac
8735else
8736 want_mmalloc=false
8737fi
8738
8739if test x$want_mmalloc = xtrue; then
8740 cat >> confdefs.h <<\EOF
8741#define USE_MMALLOC 1
8742EOF
8743
8744 cat >> confdefs.h <<\EOF
8745#define MMCHECK_FORCE 1
8746EOF
8747
8748 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8749 MMALLOC='../mmalloc/libmmalloc.a'
8750fi
8751
7a292a7a
SS
8752# In the Cygwin environment, we need some additional flags.
8753echo $ac_n "checking for cygwin""... $ac_c" 1>&6
d9feb4e7 8754echo "configure:8755: checking for cygwin" >&5
7a292a7a
SS
8755if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8756 echo $ac_n "(cached) $ac_c" 1>&6
8757else
8758 cat > conftest.$ac_ext <<EOF
d9feb4e7 8759#line 8760 "configure"
7a292a7a
SS
8760#include "confdefs.h"
8761
8762#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8763lose
8764#endif
8765EOF
8766if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8767 egrep "lose" >/dev/null 2>&1; then
8768 rm -rf conftest*
8769 gdb_cv_os_cygwin=yes
8770else
8771 rm -rf conftest*
8772 gdb_cv_os_cygwin=no
8773fi
8774rm -f conftest*
8775
8776fi
8777
8778echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8779
aff38e61
AC
8780
8781SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8782case ${host} in
95cbc983
AC
8783 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8784 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8785esac
8786
8787
cd0fc7c3
SS
8788# libreadline needs libuser32.a in a cygwin environment
8789WIN32LIBS=
8790if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8791 WIN32LIBS="-luser32"
8792 case "${target}" in
8793 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8794 ;;
8795 esac
cd0fc7c3 8796fi
c906108c 8797
7a292a7a 8798
3fc11d3e
JM
8799LIBGUI="../libgui/src/libgui.a"
8800GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8801
8802
7a292a7a 8803
3fc11d3e
JM
8804WIN32LDAPP=
8805
8806
8807
8808configdir="unix"
8809
8810GDBTKLIBS=
8811if test "${enable_gdbtk}" = "yes"; then
8812
d1c3b63a
KS
8813 # Gdbtk must have an absolute path to srcdir in order to run
8814 # properly when not installed.
8815 here=`pwd`
8816 cd ${srcdir}
8817 GDBTK_SRC_DIR=`pwd`
8818 cd $here
8819
3fc11d3e
JM
8820
8821#
8822# Ok, lets find the tcl configuration
8823# First, look for one uninstalled.
8824# the alternative search directory is invoked by --with-tclconfig
8825#
8826
8827if test x"${no_tcl}" = x ; then
8828 # we reset no_tcl in case something fails here
8829 no_tcl=true
8830 # Check whether --with-tclconfig or --without-tclconfig was given.
8831if test "${with_tclconfig+set}" = set; then
8832 withval="$with_tclconfig"
8833 with_tclconfig=${withval}
8834fi
8835
8836 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
d9feb4e7 8837echo "configure:8838: checking for Tcl configuration" >&5
3fc11d3e
JM
8838 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8839 echo $ac_n "(cached) $ac_c" 1>&6
8840else
8841
8842
8843 # First check to see if --with-tclconfig was specified.
8844 if test x"${with_tclconfig}" != x ; then
8845 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8846 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8847 else
8848 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8849 fi
8850 fi
8851
8852 # then check for a private Tcl installation
8853 if test x"${ac_cv_c_tclconfig}" = x ; then
8854 for i in \
8855 ../tcl \
8856 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8857 ../../tcl \
8858 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8859 ../../../tcl \
8860 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8861 if test -f "$i/${configdir}/tclConfig.sh" ; then
8862 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8863 break
8864 fi
8865 done
8866 fi
8867 # check in a few common install locations
8868 if test x"${ac_cv_c_tclconfig}" = x ; then
8869 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8870 if test -f "$i/tclConfig.sh" ; then
8871 ac_cv_c_tclconfig=`(cd $i; pwd)`
8872 break
8873 fi
8874 done
8875 fi
8876 # check in a few other private locations
8877 if test x"${ac_cv_c_tclconfig}" = x ; then
8878 for i in \
8879 ${srcdir}/../tcl \
8880 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8881 if test -f "$i/${configdir}/tclConfig.sh" ; then
8882 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8883 break
8884 fi
8885 done
8886 fi
8887
8888fi
8889
8890 if test x"${ac_cv_c_tclconfig}" = x ; then
8891 TCLCONFIG="# no Tcl configs found"
8892 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8893 else
8894 no_tcl=
8895 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8896 echo "$ac_t""found $TCLCONFIG" 1>&6
8897 fi
8898fi
8899
8900 if test -z "${no_tcl}"; then
8901
8902 . $TCLCONFIG
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929#
8930# Ok, lets find the tk configuration
8931# First, look for one uninstalled.
8932# the alternative search directory is invoked by --with-tkconfig
8933#
8934
8935if test x"${no_tk}" = x ; then
8936 # we reset no_tk in case something fails here
8937 no_tk=true
8938 # Check whether --with-tkconfig or --without-tkconfig was given.
8939if test "${with_tkconfig+set}" = set; then
8940 withval="$with_tkconfig"
8941 with_tkconfig=${withval}
8942fi
8943
8944 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
d9feb4e7 8945echo "configure:8946: checking for Tk configuration" >&5
3fc11d3e
JM
8946 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8947 echo $ac_n "(cached) $ac_c" 1>&6
8948else
8949
8950
8951 # First check to see if --with-tkconfig was specified.
8952 if test x"${with_tkconfig}" != x ; then
8953 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8954 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8955 else
8956 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8957 fi
8958 fi
8959
8960 # then check for a private Tk library
8961 if test x"${ac_cv_c_tkconfig}" = x ; then
8962 for i in \
8963 ../tk \
8964 `ls -dr ../tk[4-9]* 2>/dev/null` \
8965 ../../tk \
8966 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8967 ../../../tk \
8968 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8969 if test -f "$i/${configdir}/tkConfig.sh" ; then
8970 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8971 break
8972 fi
8973 done
8974 fi
8975 # check in a few common install locations
8976 if test x"${ac_cv_c_tkconfig}" = x ; then
8977 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8978 if test -f "$i/tkConfig.sh" ; then
8979 ac_cv_c_tkconfig=`(cd $i; pwd)`
8980 break
8981 fi
8982 done
8983 fi
8984 # check in a few other private locations
8985 if test x"${ac_cv_c_tkconfig}" = x ; then
8986 for i in \
8987 ${srcdir}/../tk \
8988 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8989 if test -f "$i/${configdir}/tkConfig.sh" ; then
8990 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8991 break
8992 fi
8993 done
8994 fi
8995
8996fi
8997
8998 if test x"${ac_cv_c_tkconfig}" = x ; then
8999 TKCONFIG="# no Tk configs found"
9000 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9001 else
9002 no_tk=
9003 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9004 echo "$ac_t""found $TKCONFIG" 1>&6
9005 fi
9006fi
9007
9008
9009
dd2504ab
JM
9010 # now look for Tcl library stuff
9011
9012 case "${host}" in
9013 *-*-cygwin*)
9014 tcldir=../tcl/win/
9015 ;;
9016 *)
9017 tcldir=../tcl/unix/
9018 ;;
9019 esac
9020
9021 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9022
3fc11d3e
JM
9023 # If $no_tk is nonempty, then we can't do Tk, and there is no
9024 # point to doing Tcl.
9025 if test -z "${no_tk}"; then
9026
9027 if test -f "$TKCONFIG" ; then
9028 . $TKCONFIG
9029 fi
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044#
9045# Ok, lets find the tcl source trees so we can use the headers
9046# Warning: transition of version 9 to 10 will break this algorithm
9047# because 10 sorts before 9. We also look for just tcl. We have to
9048# be careful that we don't match stuff like tclX by accident.
9049# the alternative search directory is involked by --with-tclinclude
9050#
9051
9052no_tcl=true
9053echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
d9feb4e7 9054echo "configure:9055: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9055# Check whether --with-tclinclude or --without-tclinclude was given.
9056if test "${with_tclinclude+set}" = set; then
9057 withval="$with_tclinclude"
9058 with_tclinclude=${withval}
9059fi
9060
9061if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9062 echo $ac_n "(cached) $ac_c" 1>&6
9063else
9064
9065# first check to see if --with-tclinclude was specified
9066if test x"${with_tclinclude}" != x ; then
9067 if test -f ${with_tclinclude}/tclInt.h ; then
9068 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9069 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9070 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9071 else
9072 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9073 fi
9074fi
9075
9076# next check if it came with Tcl configuration file
9077if test x"${ac_cv_c_tclconfig}" = x ; then
9078 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9079 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9080 fi
9081fi
9082
9083# next check in private source directory
9084#
9085# since ls returns lowest version numbers first, reverse its output
9086if test x"${ac_cv_c_tclh}" = x ; then
9087 for i in \
9088 ${srcdir}/../tcl \
9089 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9090 ${srcdir}/../../tcl \
9091 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9092 ${srcdir}/../../../tcl \
9093 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9094 if test -f $i/generic/tclInt.h ; then
9095 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9096 break
9097 fi
9098 done
9099fi
9100# finally check in a few common install locations
9101#
9102# since ls returns lowest version numbers first, reverse its output
9103if test x"${ac_cv_c_tclh}" = x ; then
9104 for i in \
9105 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9106 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9107 /usr/local/src/tcl \
9108 /usr/local/lib/tcl \
9109 ${prefix}/include ; do
9110 if test -f $i/generic/tclInt.h ; then
9111 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9112 break
9113 fi
9114 done
9115fi
9116# see if one is installed
9117if test x"${ac_cv_c_tclh}" = x ; then
9118 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9119echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
d9feb4e7 9120echo "configure:9121: checking for tclInt.h" >&5
3fc11d3e
JM
9121if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9122 echo $ac_n "(cached) $ac_c" 1>&6
9123else
9124 cat > conftest.$ac_ext <<EOF
d9feb4e7 9125#line 9126 "configure"
3fc11d3e
JM
9126#include "confdefs.h"
9127#include <tclInt.h>
9128EOF
9129ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 9130{ (eval echo configure:9131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9131ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9132if test -z "$ac_err"; then
9133 rm -rf conftest*
9134 eval "ac_cv_header_$ac_safe=yes"
9135else
9136 echo "$ac_err" >&5
9137 echo "configure: failed program was:" >&5
9138 cat conftest.$ac_ext >&5
9139 rm -rf conftest*
9140 eval "ac_cv_header_$ac_safe=no"
9141fi
9142rm -f conftest*
9143fi
9144if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9145 echo "$ac_t""yes" 1>&6
9146 ac_cv_c_tclh=installed
9147else
9148 echo "$ac_t""no" 1>&6
9149ac_cv_c_tclh=""
9150fi
9151
9152fi
9153
9154fi
9155
9156if test x"${ac_cv_c_tclh}" = x ; then
9157 TCLHDIR="# no Tcl private headers found"
9158 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9159fi
9160if test x"${ac_cv_c_tclh}" != x ; then
9161 no_tcl=""
9162 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9163 echo "$ac_t""is installed" 1>&6
9164 TCLHDIR=""
9165 else
9166 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9167 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9168 TCLHDIR="-I${ac_cv_c_tclh}"
9169 fi
9170fi
9171
9172
9173
9174
9175#
9176# Ok, lets find the tk source trees so we can use the headers
9177# If the directory (presumably symlink) named "tk" exists, use that one
9178# in preference to any others. Same logic is used when choosing library
9179# and again with Tcl. The search order is the best place to look first, then in
9180# decreasing significance. The loop breaks if the trigger file is found.
9181# Note the gross little conversion here of srcdir by cd'ing to the found
9182# directory. This converts the path from a relative to an absolute, so
9183# recursive cache variables for the path will work right. We check all
9184# the possible paths in one loop rather than many seperate loops to speed
9185# things up.
9186# the alternative search directory is involked by --with-tkinclude
9187#
9188no_tk=true
9189echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
d9feb4e7 9190echo "configure:9191: checking for Tk private headers" >&5
3fc11d3e
JM
9191# Check whether --with-tkinclude or --without-tkinclude was given.
9192if test "${with_tkinclude+set}" = set; then
9193 withval="$with_tkinclude"
9194 with_tkinclude=${withval}
9195fi
9196
9197if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9198 echo $ac_n "(cached) $ac_c" 1>&6
9199else
9200
9201# first check to see if --with-tkinclude was specified
9202if test x"${with_tkinclude}" != x ; then
9203 if test -f ${with_tkinclude}/tk.h ; then
9204 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9205 elif test -f ${with_tkinclude}/generic/tk.h ; then
9206 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9207 else
9208 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9209 fi
9210fi
9211
9212# next check if it came with Tk configuration file
9213if test x"${ac_cv_c_tkconfig}" = x ; then
9214 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9215 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9216 fi
9217fi
9218
9219# next check in private source directory
9220#
9221# since ls returns lowest version numbers first, reverse its output
9222if test x"${ac_cv_c_tkh}" = x ; then
9223 for i in \
9224 ${srcdir}/../tk \
9225 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9226 ${srcdir}/../../tk \
9227 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9228 ${srcdir}/../../../tk \
9229 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9230 if test -f $i/generic/tk.h ; then
9231 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9232 break
9233 fi
9234 done
9235fi
9236# finally check in a few common install locations
9237#
9238# since ls returns lowest version numbers first, reverse its output
9239if test x"${ac_cv_c_tkh}" = x ; then
9240 for i in \
9241 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9242 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9243 /usr/local/src/tk \
9244 /usr/local/lib/tk \
9245 ${prefix}/include ; do
9246 if test -f $i/generic/tk.h ; then
9247 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9248 break
9249 fi
9250 done
9251fi
9252# see if one is installed
9253if test x"${ac_cv_c_tkh}" = x ; then
9254 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9255echo $ac_n "checking for tk.h""... $ac_c" 1>&6
d9feb4e7 9256echo "configure:9257: checking for tk.h" >&5
3fc11d3e
JM
9257if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9258 echo $ac_n "(cached) $ac_c" 1>&6
9259else
9260 cat > conftest.$ac_ext <<EOF
d9feb4e7 9261#line 9262 "configure"
3fc11d3e
JM
9262#include "confdefs.h"
9263#include <tk.h>
9264EOF
9265ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 9266{ (eval echo configure:9267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9267ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9268if test -z "$ac_err"; then
9269 rm -rf conftest*
9270 eval "ac_cv_header_$ac_safe=yes"
9271else
9272 echo "$ac_err" >&5
9273 echo "configure: failed program was:" >&5
9274 cat conftest.$ac_ext >&5
9275 rm -rf conftest*
9276 eval "ac_cv_header_$ac_safe=no"
9277fi
9278rm -f conftest*
9279fi
9280if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9281 echo "$ac_t""yes" 1>&6
9282 ac_cv_c_tkh=installed
9283else
9284 echo "$ac_t""no" 1>&6
9285ac_cv_c_tkh=""
9286fi
9287
9288fi
9289
9290fi
9291
9292if test x"${ac_cv_c_tkh}" != x ; then
9293 no_tk=""
9294 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9295 echo "$ac_t""is installed" 1>&6
9296 TKHDIR=""
9297 else
9298 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9299 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9300 TKHDIR="-I${ac_cv_c_tkh}"
9301 fi
9302else
9303 TKHDIR="# no Tk directory found"
9304 echo "configure: warning: Can't find Tk private headers" 1>&2
9305 no_tk=true
9306fi
9307
9308
9309
9310
9311echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d9feb4e7 9312echo "configure:9313: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9313if test x"${ac_cv_c_itclh}" = x ; then
9314 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9315 if test -f $i/generic/itcl.h ; then
9316 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9317 break
9318 fi
9319 done
9320fi
9321if test x"${ac_cv_c_itclh}" = x ; then
9322 ITCLHDIR="# no Itcl private headers found"
9323 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9324fi
9325if test x"${ac_cv_c_itclh}" != x ; then
9326 ITCLHDIR="-I${ac_cv_c_itclh}"
9327fi
9328# should always be here
9329# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9330
9331#AC_SUBST(ITCLLIB)
9332
9333
9334echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d9feb4e7 9335echo "configure:9336: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9336if test x"${ac_cv_c_itkh}" = x ; then
9337 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9338 if test -f $i/generic/itk.h ; then
9339 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9340 break
9341 fi
9342 done
9343fi
9344if test x"${ac_cv_c_itkh}" = x ; then
9345 ITKHDIR="# no Itk private headers found"
9346 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9347fi
9348if test x"${ac_cv_c_itkh}" != x ; then
9349 ITKHDIR="-I${ac_cv_c_itkh}"
9350fi
9351# should always be here
9352# ITKLIB="../itcl/itk/unix/libitk.a"
9353
9354#AC_SUBST(ITKLIB)
9355
3fc11d3e 9356
dd2504ab
JM
9357
9358 # now look for Tk library stuff
9359
9360 case "${host}" in
9361 *-*-cygwin*)
9362 tkdir=../tk/win/
9363 ;;
9364 *)
9365 tkdir=../tk/unix/
9366 ;;
9367 esac
9368
9369 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9370
3fc11d3e
JM
9371 # now look for Itcl library stuff
9372
9373
9374#
9375# Ok, lets find the itcl configuration
9376# First, look for one uninstalled.
9377# the alternative search directory is invoked by --with-itclconfig
9378#
9379
9380if test x"${no_itcl}" = x ; then
9381 # we reset no_itcl in case something fails here
9382 no_itcl=true
9383 # Check whether --with-itclconfig or --without-itclconfig was given.
9384if test "${with_itclconfig+set}" = set; then
9385 withval="$with_itclconfig"
9386 with_itclconfig=${withval}
9387fi
9388
9389 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
d9feb4e7 9390echo "configure:9391: checking for Itcl configuration" >&5
3fc11d3e
JM
9391 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9392 echo $ac_n "(cached) $ac_c" 1>&6
9393else
9394
9395
9396 # First check to see if --with-itclconfig was specified.
9397 if test x"${with_itclconfig}" != x ; then
9398 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9399 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9400 else
9401 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9402 fi
9403 fi
9404
9405 # then check for a private Itcl library
9406 if test x"${ac_cv_c_itclconfig}" = x ; then
9407 for i in \
9408 ../itcl/itcl \
9409 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9410 ../../itcl \
9411 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9412 ../../../itcl \
9413 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9414 if test -f "$i/itclConfig.sh" ; then
9415 ac_cv_c_itclconfig=`(cd $i; pwd)`
9416 break
9417 fi
9418 done
9419 fi
9420 # check in a few common install locations
9421 if test x"${ac_cv_c_itclconfig}" = x ; then
9422 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9423 if test -f "$i/itclConfig.sh" ; then
9424 ac_cv_c_itclconfig=`(cd $i; pwd)`
9425 break
9426 fi
9427 done
9428 fi
9429 # check in a few other private locations
9430 if test x"${ac_cv_c_itclconfig}" = x ; then
9431 for i in \
9432 ${srcdir}/../itcl/itcl \
9433 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9434 if test -f "$i/itclConfig.sh" ; then
9435 ac_cv_c_itclconfig=`(cd $i; pwd)`
9436 break
9437 fi
9438 done
9439 fi
9440
9441fi
9442
9443 if test x"${ac_cv_c_itclconfig}" = x ; then
9444 ITCLCONFIG="# no Itcl configs found"
9445 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9446 else
9447 no_itcl=
9448 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9449 echo "$ac_t""found $ITCLCONFIG" 1>&6
9450 fi
9451fi
9452
9453 if test -z "${no_itcl}"; then
9454
9455 if test -f "$ITCLCONFIG" ; then
9456 . $ITCLCONFIG
9457 fi
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
3fc11d3e
JM
9468
9469
9470 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9471 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9472 fi
9473
9474
9475 # now look for Itk library stuff
9476
9477#
9478# Ok, lets find the itk configuration
9479# First, look for one uninstalled.
9480# the alternative search directory is invoked by --with-itkconfig
9481#
9482
9483if test x"${no_itk}" = x ; then
9484 # we reset no_itk in case something fails here
9485 no_itk=true
9486 # Check whether --with-itkconfig or --without-itkconfig was given.
9487if test "${with_itkconfig+set}" = set; then
9488 withval="$with_itkconfig"
9489 with_itkconfig=${withval}
9490fi
9491
9492 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
d9feb4e7 9493echo "configure:9494: checking for Itk configuration" >&5
3fc11d3e
JM
9494 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9495 echo $ac_n "(cached) $ac_c" 1>&6
9496else
9497
9498
9499 # First check to see if --with-itkconfig was specified.
9500 if test x"${with_itkconfig}" != x ; then
9501 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9502 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9503 else
9504 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9505 fi
9506 fi
9507
9508 # then check for a private Itk library
9509 if test x"${ac_cv_c_itkconfig}" = x ; then
9510 for i in \
9511 ../itcl/itk \
9512 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9513 ../../itk \
9514 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9515 ../../../itk \
9516 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9517 if test -f "$i/itkConfig.sh" ; then
9518 ac_cv_c_itkconfig=`(cd $i; pwd)`
9519 break
9520 fi
9521 done
9522 fi
9523 # check in a few common install locations
9524 if test x"${ac_cv_c_itkconfig}" = x ; then
9525 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9526 if test -f "$i/itkConfig.sh" ; then
9527 ac_cv_c_itkconfig=`(cd $i; pwd)`
9528 break
9529 fi
9530 done
9531 fi
9532 # check in a few other private locations
9533 if test x"${ac_cv_c_itkconfig}" = x ; then
9534 for i in \
9535 ${srcdir}/../itcl/itk \
9536 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9537 if test -f "$i/itkConfig.sh" ; then
9538 ac_cv_c_itkconfig=`(cd $i; pwd)`
9539 break
9540 fi
9541 done
9542 fi
9543
9544fi
9545
9546 if test x"${ac_cv_c_itkconfig}" = x ; then
9547 ITKCONFIG="# no Itk configs found"
9548 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9549 else
9550 no_itk=
9551 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9552 echo "$ac_t""found $ITKCONFIG" 1>&6
9553 fi
9554fi
9555
9556
9557 if test -z "${no_itcl}"; then
9558
9559 if test -f "$ITKCONFIG" ; then
9560 . $ITKCONFIG
9561 fi
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
3fc11d3e 9574 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9575 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9576 fi
9577
4226a5a5 9578 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9579 # Tcl/Tk 8.1 require -fwritable strings. I don't
9580 # know whether 8.2 will or not, but I bet it will.
9581 # I don't have to worry about 7.x since we don't support it.
9582 GDBTK_CFLAGS=""
9583 if test "$GCC" = "yes"; then
9584 if test "$TCL_VERSION" != "8.0" ; then
9585 GDBTK_CFLAGS="-fwritable-strings"
9586 fi
9587 fi
9588
9589 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9590 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9591 # Yes, the ordering seems wrong here. But it isn't.
9592 # TK_LIBS is the list of libraries that need to be linked
9593 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9594 # were in LIBS then any link tests after this point would
9595 # try to include things like `$(LIBGUI)', which wouldn't work.
9596 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9597
9598 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9599 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9600 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9601 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9602 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9603 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9604 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9605 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9606
9607 if test x$gdb_cv_os_cygwin = xyes; then
9608 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9609 WIN32LDAPP="-Wl,--subsystem,console"
9610 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9611 fi
9612 fi
9613 fi
ffc6a242 9614
ffc6a242 9615 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9616fi
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
dd2504ab 9630
c906108c
SS
9631# If we find X, set shell vars x_includes and x_libraries to the
9632# paths, otherwise set no_x=yes.
9633# Uses ac_ vars as temps to allow command line to override cache and checks.
9634# --without-x overrides everything else, but does not touch the cache.
9635echo $ac_n "checking for X""... $ac_c" 1>&6
d9feb4e7 9636echo "configure:9637: checking for X" >&5
c906108c
SS
9637
9638# Check whether --with-x or --without-x was given.
9639if test "${with_x+set}" = set; then
9640 withval="$with_x"
9641 :
9642fi
9643
9644# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9645if test "x$with_x" = xno; then
9646 # The user explicitly disabled X.
9647 have_x=disabled
9648else
9649 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9650 # Both variables are already set.
9651 have_x=yes
9652 else
9653if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9654 echo $ac_n "(cached) $ac_c" 1>&6
9655else
9656 # One or both of the vars are not set, and there is no cached value.
9657ac_x_includes=NO ac_x_libraries=NO
9658rm -fr conftestdir
9659if mkdir conftestdir; then
9660 cd conftestdir
9661 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9662 cat > Imakefile <<'EOF'
9663acfindx:
9664 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9665EOF
9666 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9667 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9668 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9669 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9670 for ac_extension in a so sl; do
9671 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9672 test -f $ac_im_libdir/libX11.$ac_extension; then
9673 ac_im_usrlibdir=$ac_im_libdir; break
9674 fi
9675 done
9676 # Screen out bogus values from the imake configuration. They are
9677 # bogus both because they are the default anyway, and because
9678 # using them would break gcc on systems where it needs fixed includes.
9679 case "$ac_im_incroot" in
9680 /usr/include) ;;
9681 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9682 esac
9683 case "$ac_im_usrlibdir" in
9684 /usr/lib | /lib) ;;
9685 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9686 esac
9687 fi
9688 cd ..
9689 rm -fr conftestdir
9690fi
9691
9692if test "$ac_x_includes" = NO; then
9693 # Guess where to find include files, by looking for this one X11 .h file.
9694 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9695
9696 # First, try using that file with no special directory specified.
9697cat > conftest.$ac_ext <<EOF
d9feb4e7 9698#line 9699 "configure"
c906108c
SS
9699#include "confdefs.h"
9700#include <$x_direct_test_include>
9701EOF
9702ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d9feb4e7 9703{ (eval echo configure:9704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9704ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9705if test -z "$ac_err"; then
9706 rm -rf conftest*
9707 # We can compile using X headers with no special include directory.
9708ac_x_includes=
9709else
9710 echo "$ac_err" >&5
9711 echo "configure: failed program was:" >&5
9712 cat conftest.$ac_ext >&5
9713 rm -rf conftest*
9714 # Look for the header file in a standard set of common directories.
9715# Check X11 before X11Rn because it is often a symlink to the current release.
9716 for ac_dir in \
9717 /usr/X11/include \
9718 /usr/X11R6/include \
9719 /usr/X11R5/include \
9720 /usr/X11R4/include \
9721 \
9722 /usr/include/X11 \
9723 /usr/include/X11R6 \
9724 /usr/include/X11R5 \
9725 /usr/include/X11R4 \
9726 \
9727 /usr/local/X11/include \
9728 /usr/local/X11R6/include \
9729 /usr/local/X11R5/include \
9730 /usr/local/X11R4/include \
9731 \
9732 /usr/local/include/X11 \
9733 /usr/local/include/X11R6 \
9734 /usr/local/include/X11R5 \
9735 /usr/local/include/X11R4 \
9736 \
9737 /usr/X386/include \
9738 /usr/x386/include \
9739 /usr/XFree86/include/X11 \
9740 \
9741 /usr/include \
9742 /usr/local/include \
9743 /usr/unsupported/include \
9744 /usr/athena/include \
9745 /usr/local/x11r5/include \
9746 /usr/lpp/Xamples/include \
9747 \
9748 /usr/openwin/include \
9749 /usr/openwin/share/include \
9750 ; \
9751 do
9752 if test -r "$ac_dir/$x_direct_test_include"; then
9753 ac_x_includes=$ac_dir
9754 break
9755 fi
9756 done
9757fi
9758rm -f conftest*
9759fi # $ac_x_includes = NO
9760
9761if test "$ac_x_libraries" = NO; then
9762 # Check for the libraries.
9763
9764 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9765 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9766
9767 # See if we find them without any special options.
9768 # Don't add to $LIBS permanently.
9769 ac_save_LIBS="$LIBS"
9770 LIBS="-l$x_direct_test_library $LIBS"
9771cat > conftest.$ac_ext <<EOF
d9feb4e7 9772#line 9773 "configure"
c906108c
SS
9773#include "confdefs.h"
9774
9775int main() {
9776${x_direct_test_function}()
9777; return 0; }
9778EOF
d9feb4e7 9779if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9780 rm -rf conftest*
9781 LIBS="$ac_save_LIBS"
9782# We can link X programs with no special library path.
9783ac_x_libraries=
9784else
9785 echo "configure: failed program was:" >&5
9786 cat conftest.$ac_ext >&5
9787 rm -rf conftest*
9788 LIBS="$ac_save_LIBS"
9789# First see if replacing the include by lib works.
9790# Check X11 before X11Rn because it is often a symlink to the current release.
9791for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9792 /usr/X11/lib \
9793 /usr/X11R6/lib \
9794 /usr/X11R5/lib \
9795 /usr/X11R4/lib \
9796 \
9797 /usr/lib/X11 \
9798 /usr/lib/X11R6 \
9799 /usr/lib/X11R5 \
9800 /usr/lib/X11R4 \
9801 \
9802 /usr/local/X11/lib \
9803 /usr/local/X11R6/lib \
9804 /usr/local/X11R5/lib \
9805 /usr/local/X11R4/lib \
9806 \
9807 /usr/local/lib/X11 \
9808 /usr/local/lib/X11R6 \
9809 /usr/local/lib/X11R5 \
9810 /usr/local/lib/X11R4 \
9811 \
9812 /usr/X386/lib \
9813 /usr/x386/lib \
9814 /usr/XFree86/lib/X11 \
9815 \
9816 /usr/lib \
9817 /usr/local/lib \
9818 /usr/unsupported/lib \
9819 /usr/athena/lib \
9820 /usr/local/x11r5/lib \
9821 /usr/lpp/Xamples/lib \
9822 /lib/usr/lib/X11 \
9823 \
9824 /usr/openwin/lib \
9825 /usr/openwin/share/lib \
9826 ; \
9827do
9828 for ac_extension in a so sl; do
9829 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9830 ac_x_libraries=$ac_dir
9831 break 2
9832 fi
9833 done
9834done
9835fi
9836rm -f conftest*
9837fi # $ac_x_libraries = NO
9838
9839if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9840 # Didn't find X anywhere. Cache the known absence of X.
9841 ac_cv_have_x="have_x=no"
9842else
9843 # Record where we found X for the cache.
9844 ac_cv_have_x="have_x=yes \
9845 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9846fi
9847fi
9848 fi
9849 eval "$ac_cv_have_x"
9850fi # $with_x != no
9851
9852if test "$have_x" != yes; then
9853 echo "$ac_t""$have_x" 1>&6
9854 no_x=yes
9855else
9856 # If each of the values was on the command line, it overrides each guess.
9857 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9858 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9859 # Update the cache value to reflect the command line values.
9860 ac_cv_have_x="have_x=yes \
9861 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9862 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9863fi
9864
9865
7a292a7a
SS
9866
9867# Unlike the sim directory, whether a simulator is linked is controlled by
9868# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9869# This code just checks for a few cases where we'd like to ignore those
9870# definitions, even when they're present in the '.mt' file. These cases
9871# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9872# not part of the source tree.
7a292a7a
SS
9873#
9874# Check whether --enable-sim or --disable-sim was given.
9875if test "${enable_sim+set}" = set; then
9876 enableval="$enable_sim"
9877 echo "enable_sim = $enable_sim";
9878 echo "enableval = ${enableval}";
9879 case "${enableval}" in
9880 yes) ignore_sim=false ;;
9881 no) ignore_sim=true ;;
9882 *) ignore_sim=false ;;
9883 esac
9884else
9885 ignore_sim=false
9886fi
9887
9888
9889if test ! -d "${srcdir}/../sim"; then
9890 ignore_sim=true
9891fi
9892
9893if test "${ignore_sim}" = "true"; then
9894 IGNORE_SIM="SIM="
9895 IGNORE_SIM_OBS="SIM_OBS="
9896else
9897 IGNORE_SIM=""
9898 IGNORE_SIM_OBS=""
9899 cat >> confdefs.h <<\EOF
9900#define WITH_SIM 1
9901EOF
9902
9903fi
9904
9905
9906
c906108c
SS
9907
9908
9909
9910
9911
9912
dfcd3bfb 9913
e56ac5c3
AC
9914
9915
b3a90332
AC
9916
9917
b46cd165 9918
d28f9cdf 9919
c906108c
SS
9920# target_subdir is used by the testsuite to find the target libraries.
9921target_subdir=
9922if test "${host}" != "${target}"; then
9923 target_subdir="${target_alias}/"
9924fi
9925
9926
9927frags=
9928host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9929if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9930 # When building a native debuger the .mh file containing things
9931 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9932 # since it no longer contains anything useful.
9933 if test "${target}" = "${host}"; then
9934 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9935 else
9936 host_makefile_frag=/dev/null
9937 fi
c906108c
SS
9938fi
9939frags="$frags $host_makefile_frag"
9940
9941target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9942if test ! -f ${target_makefile_frag}; then
9943{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9944fi
9945frags="$frags $target_makefile_frag"
9946
9947
9948
9949
9950
9951hostfile=`sed -n '
9952s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9953' ${host_makefile_frag}`
9954
9955targetfile=`sed -n '
9956s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9957' ${target_makefile_frag}`
9958
6166d547
AC
9959GDB_MULTI_ARCH=`sed -n '
9960s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9961' ${target_makefile_frag}`
9962
c906108c 9963if test "${target}" = "${host}"; then
a85f51e7
DJ
9964# We pick this up from the host configuration file (.mh) because we
9965# do not have a native configuration Makefile fragment.
c906108c
SS
9966nativefile=`sed -n '
9967s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9968' ${host_makefile_frag}`
c906108c
SS
9969fi
9970
9971
6166d547
AC
9972# New targets should just set gdb_multi_arch=yes in configure.tgt.
9973# Old targets being converted can either do that or set GDB_MULTI_ARCH
9974# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9975# will be the default.
9976if test x"${GDB_MULTI_ARCH}" = x ; then
9977 case "${gdb_multi_arch}" in
9978 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9979 no ) GDB_MULTI_ARCH=0 ;;
9980 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9981 esac
9982fi
9983if test x"${GDB_MULTI_ARCH}" != x ; then
9984 cat >> confdefs.h <<EOF
9985#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9986EOF
9987
9988fi
6c5cfe5b 9989# Warn the user when they use an old practice
6166d547
AC
9990case "${GDB_MULTI_ARCH}" in
9991 "" ) ;;
9992 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9993 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9994 GDB_MULTI_ARCH_PURE )
9995 if test x"${targetfile}" != x ; then
6c5cfe5b 9996 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9997 targetfile=""
6166d547
AC
9998 fi ;;
9999 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
10000esac
10001
b00a8037
DJ
10002if test x"${gdb_osabi}" != x ; then
10003 cat >> confdefs.h <<EOF
10004#define GDB_OSABI_DEFAULT $gdb_osabi
10005EOF
10006
10007fi
10008
8dcde887
MK
10009# Enable multi-ice-gdb-server.
10010# Check whether --enable-multi-ice or --disable-multi-ice was given.
10011if test "${enable_multi_ice+set}" = set; then
10012 enableval="$enable_multi_ice"
10013 case $enableval in
10014 yes | no)
10015 ;;
10016 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10017 esac
96baa820
JM
10018fi
10019
8dcde887
MK
10020if test "x$enable_multi_ice" = xyes; then
10021 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10022fi
10023
8dcde887
MK
10024# We only build gdbserver automatically if host and target are the same.
10025if test "x$target" = "x$host"; then
10026 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
d9feb4e7 10027echo "configure:10028: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10028 if test "x$build_gdbserver" = xyes; then
10029 configdirs="$configdirs gdbserver"
10030 echo "$ac_t""yes" 1>&6
10031 else
10032 echo "$ac_t""no" 1>&6
10033 fi
10034fi
10035
10036subdirs="doc testsuite $configdirs"
10037
96baa820 10038
c906108c 10039# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10040# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10041# version.
c906108c
SS
10042
10043files=
10044links=
5a2402b8 10045
c906108c 10046rm -f xm.h
5a2402b8 10047xm_h=""
c906108c 10048if test "${hostfile}" != ""; then
5a2402b8
AC
10049 xm_h=xm.h
10050 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10051 files="${files} ${GDB_XM_FILE}"
10052 links="${links} xm.h"
10053 cat >> confdefs.h <<EOF
10054#define GDB_XM_FILE ${GDB_XM_FILE}
10055EOF
10056
c906108c 10057fi
5a2402b8
AC
10058
10059
c906108c 10060rm -f tm.h
5a2402b8 10061tm_h=""
c906108c 10062if test "${targetfile}" != ""; then
5a2402b8
AC
10063 tm_h=tm.h
10064 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10065 files="${files} ${GDB_TM_FILE}"
10066 links="${links} tm.h"
10067 cat >> confdefs.h <<EOF
10068#define GDB_TM_FILE ${GDB_TM_FILE}
10069EOF
10070
c906108c 10071fi
5a2402b8
AC
10072
10073
c906108c 10074rm -f nm.h
5a2402b8 10075nm_h=""
c906108c 10076if test "${nativefile}" != ""; then
5a2402b8
AC
10077 nm_h=nm.h
10078 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10079 files="${files} ${GDB_NM_FILE}"
10080 links="${links} nm.h"
10081 cat >> confdefs.h <<EOF
10082#define GDB_NM_FILE ${GDB_NM_FILE}
10083EOF
10084
c906108c 10085fi
5a2402b8
AC
10086
10087
c906108c
SS
10088
10089
10090echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
d9feb4e7 10091echo "configure:10092: checking for Cygwin environment" >&5
c906108c
SS
10092if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10093 echo $ac_n "(cached) $ac_c" 1>&6
10094else
10095 cat > conftest.$ac_ext <<EOF
d9feb4e7 10096#line 10097 "configure"
c906108c
SS
10097#include "confdefs.h"
10098
10099int main() {
10100
10101#ifndef __CYGWIN__
10102#define __CYGWIN__ __CYGWIN32__
10103#endif
10104return __CYGWIN__;
10105; return 0; }
10106EOF
d9feb4e7 10107if { (eval echo configure:10108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10108 rm -rf conftest*
10109 ac_cv_cygwin=yes
10110else
10111 echo "configure: failed program was:" >&5
10112 cat conftest.$ac_ext >&5
10113 rm -rf conftest*
10114 ac_cv_cygwin=no
10115fi
10116rm -f conftest*
10117rm -f conftest*
10118fi
10119
10120echo "$ac_t""$ac_cv_cygwin" 1>&6
10121CYGWIN=
10122test "$ac_cv_cygwin" = yes && CYGWIN=yes
10123echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
d9feb4e7 10124echo "configure:10125: checking for mingw32 environment" >&5
c906108c
SS
10125if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10126 echo $ac_n "(cached) $ac_c" 1>&6
10127else
10128 cat > conftest.$ac_ext <<EOF
d9feb4e7 10129#line 10130 "configure"
c906108c
SS
10130#include "confdefs.h"
10131
10132int main() {
10133return __MINGW32__;
10134; return 0; }
10135EOF
d9feb4e7 10136if { (eval echo configure:10137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10137 rm -rf conftest*
10138 ac_cv_mingw32=yes
10139else
10140 echo "configure: failed program was:" >&5
10141 cat conftest.$ac_ext >&5
10142 rm -rf conftest*
10143 ac_cv_mingw32=no
10144fi
10145rm -f conftest*
10146rm -f conftest*
10147fi
10148
10149echo "$ac_t""$ac_cv_mingw32" 1>&6
10150MINGW32=
10151test "$ac_cv_mingw32" = yes && MINGW32=yes
10152
10153
10154echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
d9feb4e7 10155echo "configure:10156: checking for executable suffix" >&5
c906108c
SS
10156if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10157 echo $ac_n "(cached) $ac_c" 1>&6
10158else
10159 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10160 ac_cv_exeext=.exe
10161else
10162 rm -f conftest*
10163 echo 'int main () { return 0; }' > conftest.$ac_ext
10164 ac_cv_exeext=
d9feb4e7 10165 if { (eval echo configure:10166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10166 for file in conftest.*; do
10167 case $file in
b00a8037 10168 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10169 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10170 esac
10171 done
10172 else
10173 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10174 fi
10175 rm -f conftest*
10176 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10177fi
10178fi
10179
10180EXEEXT=""
10181test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10182echo "$ac_t""${ac_cv_exeext}" 1>&6
10183ac_exeext=$EXEEXT
10184
10185
234b45d4
KB
10186
10187cat >> confdefs.h <<\EOF
10188#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10189EOF
10190
10191
10192
10193
10194 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10195if test "${with_libiconv_prefix+set}" = set; then
10196 withval="$with_libiconv_prefix"
10197
10198 for dir in `echo "$withval" | tr : ' '`; do
10199 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10200 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10201 done
10202
10203fi
10204
10205
10206 echo $ac_n "checking for iconv""... $ac_c" 1>&6
d9feb4e7 10207echo "configure:10208: checking for iconv" >&5
234b45d4
KB
10208if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10209 echo $ac_n "(cached) $ac_c" 1>&6
10210else
10211
10212 am_cv_func_iconv="no, consider installing GNU libiconv"
10213 am_cv_lib_iconv=no
10214 cat > conftest.$ac_ext <<EOF
d9feb4e7 10215#line 10216 "configure"
234b45d4
KB
10216#include "confdefs.h"
10217#include <stdlib.h>
10218#include <iconv.h>
10219int main() {
10220iconv_t cd = iconv_open("","");
10221 iconv(cd,NULL,NULL,NULL,NULL);
10222 iconv_close(cd);
10223; return 0; }
10224EOF
d9feb4e7 10225if { (eval echo configure:10226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10226 rm -rf conftest*
10227 am_cv_func_iconv=yes
10228else
10229 echo "configure: failed program was:" >&5
10230 cat conftest.$ac_ext >&5
10231fi
10232rm -f conftest*
10233 if test "$am_cv_func_iconv" != yes; then
10234 am_save_LIBS="$LIBS"
10235 LIBS="$LIBS -liconv"
10236 cat > conftest.$ac_ext <<EOF
d9feb4e7 10237#line 10238 "configure"
234b45d4
KB
10238#include "confdefs.h"
10239#include <stdlib.h>
10240#include <iconv.h>
10241int main() {
10242iconv_t cd = iconv_open("","");
10243 iconv(cd,NULL,NULL,NULL,NULL);
10244 iconv_close(cd);
10245; return 0; }
10246EOF
d9feb4e7 10247if { (eval echo configure:10248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10248 rm -rf conftest*
10249 am_cv_lib_iconv=yes
10250 am_cv_func_iconv=yes
10251else
10252 echo "configure: failed program was:" >&5
10253 cat conftest.$ac_ext >&5
10254fi
10255rm -f conftest*
10256 LIBS="$am_save_LIBS"
10257 fi
10258
10259fi
10260
10261echo "$ac_t""$am_cv_func_iconv" 1>&6
10262 if test "$am_cv_func_iconv" = yes; then
10263 cat >> confdefs.h <<\EOF
10264#define HAVE_ICONV 1
10265EOF
10266
10267 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
d9feb4e7 10268echo "configure:10269: checking for iconv declaration" >&5
234b45d4
KB
10269 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10270 echo $ac_n "(cached) $ac_c" 1>&6
10271else
10272
10273 cat > conftest.$ac_ext <<EOF
d9feb4e7 10274#line 10275 "configure"
234b45d4
KB
10275#include "confdefs.h"
10276
10277#include <stdlib.h>
10278#include <iconv.h>
10279extern
10280#ifdef __cplusplus
10281"C"
10282#endif
10283#if defined(__STDC__) || defined(__cplusplus)
10284size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10285#else
10286size_t iconv();
10287#endif
10288
10289int main() {
10290
10291; return 0; }
10292EOF
d9feb4e7 10293if { (eval echo configure:10294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10294 rm -rf conftest*
10295 am_cv_proto_iconv_arg1=""
10296else
10297 echo "configure: failed program was:" >&5
10298 cat conftest.$ac_ext >&5
10299 rm -rf conftest*
10300 am_cv_proto_iconv_arg1="const"
10301fi
10302rm -f conftest*
10303 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);"
10304fi
10305
10306 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10307 echo "$ac_t""${ac_t:-
10308 }$am_cv_proto_iconv" 1>&6
10309 cat >> confdefs.h <<EOF
10310#define ICONV_CONST $am_cv_proto_iconv_arg1
10311EOF
10312
10313 fi
10314 LIBICONV=
10315 if test "$am_cv_lib_iconv" = yes; then
10316 LIBICONV="-liconv"
10317 fi
10318
10319
10320
c906108c
SS
10321trap '' 1 2 15
10322cat > confcache <<\EOF
10323# This file is a shell script that caches the results of configure
10324# tests run on this system so they can be shared between configure
10325# scripts and configure runs. It is not useful on other systems.
10326# If it contains results you don't want to keep, you may remove or edit it.
10327#
10328# By default, configure uses ./config.cache as the cache file,
10329# creating it if it does not exist already. You can give configure
10330# the --cache-file=FILE option to use a different cache file; that is
10331# what configure does when it calls configure scripts in
10332# subdirectories, so they share the cache.
10333# Giving --cache-file=/dev/null disables caching, for debugging configure.
10334# config.status only pays attention to the cache file if you give it the
10335# --recheck option to rerun configure.
10336#
10337EOF
10338# The following way of writing the cache mishandles newlines in values,
10339# but we know of no workaround that is simple, portable, and efficient.
10340# So, don't put newlines in cache variables' values.
10341# Ultrix sh set writes to stderr and can't be redirected directly,
10342# and sets the high bit in the cache file unless we assign to the vars.
10343(set) 2>&1 |
10344 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10345 *ac_space=\ *)
10346 # `set' does not quote correctly, so add quotes (double-quote substitution
10347 # turns \\\\ into \\, and sed turns \\ into \).
10348 sed -n \
10349 -e "s/'/'\\\\''/g" \
10350 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10351 ;;
10352 *)
10353 # `set' quotes correctly as required by POSIX, so do not add quotes.
10354 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10355 ;;
10356 esac >> confcache
10357if cmp -s $cache_file confcache; then
10358 :
10359else
10360 if test -w $cache_file; then
10361 echo "updating cache $cache_file"
10362 cat confcache > $cache_file
10363 else
10364 echo "not updating unwritable cache $cache_file"
10365 fi
10366fi
10367rm -f confcache
10368
10369trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10370
10371test "x$prefix" = xNONE && prefix=$ac_default_prefix
10372# Let make expand exec_prefix.
10373test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10374
10375# Any assignment to VPATH causes Sun make to only execute
10376# the first set of double-colon rules, so remove it if not needed.
10377# If there is a colon in the path, we need to keep it.
10378if test "x$srcdir" = x.; then
10379 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10380fi
10381
10382trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10383
10384DEFS=-DHAVE_CONFIG_H
10385
10386# Without the "./", some shells look in PATH for config.status.
10387: ${CONFIG_STATUS=./config.status}
10388
10389echo creating $CONFIG_STATUS
10390rm -f $CONFIG_STATUS
10391cat > $CONFIG_STATUS <<EOF
10392#! /bin/sh
10393# Generated automatically by configure.
10394# Run this file to recreate the current configuration.
10395# This directory was configured as follows,
10396# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10397#
10398# $0 $ac_configure_args
10399#
10400# Compiler output produced by configure, useful for debugging
10401# configure, is in ./config.log if it exists.
10402
10403ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10404for ac_option
10405do
10406 case "\$ac_option" in
10407 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10408 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10409 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10410 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10411 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10412 exit 0 ;;
10413 -help | --help | --hel | --he | --h)
10414 echo "\$ac_cs_usage"; exit 0 ;;
10415 *) echo "\$ac_cs_usage"; exit 1 ;;
10416 esac
10417done
10418
10419ac_given_srcdir=$srcdir
10420ac_given_INSTALL="$INSTALL"
10421
ed952ac5 10422trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10423EOF
10424cat >> $CONFIG_STATUS <<EOF
10425
10426# Protect against being on the right side of a sed subst in config.status.
10427sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10428 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10429$ac_vpsub
10430$extrasub
10431s%@SHELL@%$SHELL%g
10432s%@CFLAGS@%$CFLAGS%g
10433s%@CPPFLAGS@%$CPPFLAGS%g
10434s%@CXXFLAGS@%$CXXFLAGS%g
10435s%@FFLAGS@%$FFLAGS%g
10436s%@DEFS@%$DEFS%g
10437s%@LDFLAGS@%$LDFLAGS%g
10438s%@LIBS@%$LIBS%g
10439s%@exec_prefix@%$exec_prefix%g
10440s%@prefix@%$prefix%g
10441s%@program_transform_name@%$program_transform_name%g
10442s%@bindir@%$bindir%g
10443s%@sbindir@%$sbindir%g
10444s%@libexecdir@%$libexecdir%g
10445s%@datadir@%$datadir%g
10446s%@sysconfdir@%$sysconfdir%g
10447s%@sharedstatedir@%$sharedstatedir%g
10448s%@localstatedir@%$localstatedir%g
10449s%@libdir@%$libdir%g
10450s%@includedir@%$includedir%g
10451s%@oldincludedir@%$oldincludedir%g
10452s%@infodir@%$infodir%g
10453s%@mandir@%$mandir%g
413ccac7
AC
10454s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10455s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10456s%@MAINT@%$MAINT%g
c906108c
SS
10457s%@CC@%$CC%g
10458s%@CPP@%$CPP%g
10459s%@host@%$host%g
10460s%@host_alias@%$host_alias%g
10461s%@host_cpu@%$host_cpu%g
10462s%@host_vendor@%$host_vendor%g
10463s%@host_os@%$host_os%g
10464s%@target@%$target%g
10465s%@target_alias@%$target_alias%g
10466s%@target_cpu@%$target_cpu%g
10467s%@target_vendor@%$target_vendor%g
10468s%@target_os@%$target_os%g
10469s%@build@%$build%g
10470s%@build_alias@%$build_alias%g
10471s%@build_cpu@%$build_cpu%g
10472s%@build_vendor@%$build_vendor%g
10473s%@build_os@%$build_os%g
c906108c 10474s%@RANLIB@%$RANLIB%g
8bb2c122 10475s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10476s%@ALLOCA@%$ALLOCA%g
10477s%@USE_NLS@%$USE_NLS%g
10478s%@MSGFMT@%$MSGFMT%g
10479s%@GMSGFMT@%$GMSGFMT%g
10480s%@XGETTEXT@%$XGETTEXT%g
10481s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10482s%@CATALOGS@%$CATALOGS%g
10483s%@CATOBJEXT@%$CATOBJEXT%g
10484s%@DATADIRNAME@%$DATADIRNAME%g
10485s%@GMOFILES@%$GMOFILES%g
10486s%@INSTOBJEXT@%$INSTOBJEXT%g
10487s%@INTLDEPS@%$INTLDEPS%g
10488s%@INTLLIBS@%$INTLLIBS%g
10489s%@INTLOBJS@%$INTLOBJS%g
10490s%@POFILES@%$POFILES%g
10491s%@POSUB@%$POSUB%g
10492s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10493s%@GT_NO@%$GT_NO%g
10494s%@GT_YES@%$GT_YES%g
10495s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10496s%@l@%$l%g
8dcde887 10497s%@subdirs@%$subdirs%g
7a292a7a 10498s%@AWK@%$AWK%g
c906108c
SS
10499s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10500s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10501s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10502s%@LN_S@%$LN_S%g
10503s%@YACC@%$YACC%g
c906108c 10504s%@AR@%$AR%g
95ca63c4
CF
10505s%@DLLTOOL@%$DLLTOOL%g
10506s%@WINDRES@%$WINDRES%g
75c6e08a 10507s%@MIG@%$MIG%g
c906108c 10508s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10509s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10510s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10511s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10512s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10513s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10514s%@MMALLOC@%$MMALLOC%g
aff38e61 10515s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10516s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10517s%@LIBGUI@%$LIBGUI%g
10518s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10519s%@WIN32LDAPP@%$WIN32LDAPP%g
10520s%@TCL_VERSION@%$TCL_VERSION%g
10521s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10522s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10523s%@TCL_CC@%$TCL_CC%g
10524s%@TCL_DEFS@%$TCL_DEFS%g
10525s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10526s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10527s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10528s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10529s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10530s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10531s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10532s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10533s%@TCL_RANLIB@%$TCL_RANLIB%g
10534s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10535s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10536s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10537s%@TK_VERSION@%$TK_VERSION%g
10538s%@TK_DEFS@%$TK_DEFS%g
10539s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10540s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10541s%@TK_XLIBSW@%$TK_XLIBSW%g
10542s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10543s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10544s%@TCLHDIR@%$TCLHDIR%g
10545s%@TKHDIR@%$TKHDIR%g
10546s%@ITCLHDIR@%$ITCLHDIR%g
10547s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10548s%@ITCL_VERSION@%$ITCL_VERSION%g
10549s%@ITCL_DEFS@%$ITCL_DEFS%g
10550s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10551s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10552s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10553s%@ITK_VERSION@%$ITK_VERSION%g
10554s%@ITK_DEFS@%$ITK_DEFS%g
10555s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10556s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10557s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10558s%@X_CFLAGS@%$X_CFLAGS%g
10559s%@X_LDFLAGS@%$X_LDFLAGS%g
10560s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10561s%@TCL_DEPS@%$TCL_DEPS%g
10562s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10563s%@ITCLLIB@%$ITCLLIB%g
10564s%@ITCL_DEPS@%$ITCL_DEPS%g
10565s%@ITKLIB@%$ITKLIB%g
10566s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10567s%@GDBTKLIBS@%$GDBTKLIBS%g
10568s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10569s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10570s%@IGNORE_SIM@%$IGNORE_SIM%g
10571s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 10572s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 10573s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 10574s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10575s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10576s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10577s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10578s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10579s%@CONFIG_ALL@%$CONFIG_ALL%g
10580s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10581s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10582s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10583s%@target_subdir@%$target_subdir%g
10584/@host_makefile_frag@/r $host_makefile_frag
10585s%@host_makefile_frag@%%g
10586/@target_makefile_frag@/r $target_makefile_frag
10587s%@target_makefile_frag@%%g
10588s%@frags@%$frags%g
5a2402b8
AC
10589s%@xm_h@%$xm_h%g
10590s%@tm_h@%$tm_h%g
10591s%@nm_h@%$nm_h%g
c906108c 10592s%@EXEEXT@%$EXEEXT%g
234b45d4 10593s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10594
10595CEOF
10596EOF
10597
10598cat >> $CONFIG_STATUS <<\EOF
10599
10600# Split the substitutions into bite-sized pieces for seds with
10601# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10602ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10603ac_file=1 # Number of current file.
10604ac_beg=1 # First line for current file.
10605ac_end=$ac_max_sed_cmds # Line after last line for current file.
10606ac_more_lines=:
10607ac_sed_cmds=""
10608while $ac_more_lines; do
10609 if test $ac_beg -gt 1; then
10610 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10611 else
10612 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10613 fi
10614 if test ! -s conftest.s$ac_file; then
10615 ac_more_lines=false
10616 rm -f conftest.s$ac_file
10617 else
10618 if test -z "$ac_sed_cmds"; then
10619 ac_sed_cmds="sed -f conftest.s$ac_file"
10620 else
10621 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10622 fi
10623 ac_file=`expr $ac_file + 1`
10624 ac_beg=$ac_end
10625 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10626 fi
10627done
10628if test -z "$ac_sed_cmds"; then
10629 ac_sed_cmds=cat
10630fi
10631EOF
10632
10633cat >> $CONFIG_STATUS <<EOF
10634
ed952ac5 10635CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10636EOF
10637cat >> $CONFIG_STATUS <<\EOF
10638for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10639 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10640 case "$ac_file" in
10641 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10642 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10643 *) ac_file_in="${ac_file}.in" ;;
10644 esac
10645
10646 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10647
10648 # Remove last slash and all that follows it. Not all systems have dirname.
10649 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10650 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10651 # The file is in a subdirectory.
10652 test ! -d "$ac_dir" && mkdir "$ac_dir"
10653 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10654 # A "../" for each directory in $ac_dir_suffix.
10655 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10656 else
10657 ac_dir_suffix= ac_dots=
10658 fi
10659
10660 case "$ac_given_srcdir" in
10661 .) srcdir=.
10662 if test -z "$ac_dots"; then top_srcdir=.
10663 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10664 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10665 *) # Relative path.
10666 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10667 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10668 esac
10669
10670 case "$ac_given_INSTALL" in
10671 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10672 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10673 esac
10674
10675 echo creating "$ac_file"
10676 rm -f "$ac_file"
10677 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10678 case "$ac_file" in
10679 *Makefile*) ac_comsub="1i\\
10680# $configure_input" ;;
10681 *) ac_comsub= ;;
10682 esac
10683
10684 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10685 sed -e "$ac_comsub
10686s%@configure_input@%$configure_input%g
10687s%@srcdir@%$srcdir%g
10688s%@top_srcdir@%$top_srcdir%g
10689s%@INSTALL@%$INSTALL%g
10690" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10691fi; done
10692rm -f conftest.s*
10693
10694# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10695# NAME is the cpp macro being defined and VALUE is the value it is being given.
10696#
10697# ac_d sets the value in "#define NAME VALUE" lines.
10698ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10699ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10700ac_dC='\3'
10701ac_dD='%g'
10702# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10703ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10704ac_uB='\([ ]\)%\1#\2define\3'
10705ac_uC=' '
10706ac_uD='\4%g'
10707# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10708ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10709ac_eB='$%\1#\2define\3'
10710ac_eC=' '
10711ac_eD='%g'
10712
10713if test "${CONFIG_HEADERS+set}" != set; then
10714EOF
10715cat >> $CONFIG_STATUS <<EOF
10716 CONFIG_HEADERS="config.h:config.in"
10717EOF
10718cat >> $CONFIG_STATUS <<\EOF
10719fi
10720for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10721 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10722 case "$ac_file" in
10723 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10724 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10725 *) ac_file_in="${ac_file}.in" ;;
10726 esac
10727
10728 echo creating $ac_file
10729
10730 rm -f conftest.frag conftest.in conftest.out
10731 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10732 cat $ac_file_inputs > conftest.in
10733
10734EOF
10735
10736# Transform confdefs.h into a sed script conftest.vals that substitutes
10737# the proper values into config.h.in to produce config.h. And first:
10738# Protect against being on the right side of a sed subst in config.status.
10739# Protect against being in an unquoted here document in config.status.
10740rm -f conftest.vals
10741cat > conftest.hdr <<\EOF
10742s/[\\&%]/\\&/g
10743s%[\\$`]%\\&%g
10744s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10745s%ac_d%ac_u%gp
10746s%ac_u%ac_e%gp
10747EOF
10748sed -n -f conftest.hdr confdefs.h > conftest.vals
10749rm -f conftest.hdr
10750
10751# This sed command replaces #undef with comments. This is necessary, for
10752# example, in the case of _POSIX_SOURCE, which is predefined and required
10753# on some systems where configure will not decide to define it.
10754cat >> conftest.vals <<\EOF
10755s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10756EOF
10757
10758# Break up conftest.vals because some shells have a limit on
10759# the size of here documents, and old seds have small limits too.
10760
10761rm -f conftest.tail
10762while :
10763do
10764 ac_lines=`grep -c . conftest.vals`
10765 # grep -c gives empty output for an empty file on some AIX systems.
10766 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10767 # Write a limited-size here document to conftest.frag.
10768 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10769 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10770 echo 'CEOF
10771 sed -f conftest.frag conftest.in > conftest.out
10772 rm -f conftest.in
10773 mv conftest.out conftest.in
10774' >> $CONFIG_STATUS
10775 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10776 rm -f conftest.vals
10777 mv conftest.tail conftest.vals
10778done
10779rm -f conftest.vals
10780
10781cat >> $CONFIG_STATUS <<\EOF
10782 rm -f conftest.frag conftest.h
10783 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10784 cat conftest.in >> conftest.h
10785 rm -f conftest.in
10786 if cmp -s $ac_file conftest.h 2>/dev/null; then
10787 echo "$ac_file is unchanged"
10788 rm -f conftest.h
10789 else
10790 # Remove last slash and all that follows it. Not all systems have dirname.
10791 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10792 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10793 # The file is in a subdirectory.
10794 test ! -d "$ac_dir" && mkdir "$ac_dir"
10795 fi
10796 rm -f $ac_file
10797 mv conftest.h $ac_file
10798 fi
10799fi; done
10800
10801EOF
10802
10803cat >> $CONFIG_STATUS <<EOF
10804ac_sources="$files"
10805ac_dests="$links"
10806EOF
10807
10808cat >> $CONFIG_STATUS <<\EOF
10809srcdir=$ac_given_srcdir
10810while test -n "$ac_sources"; do
10811 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10812 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10813
10814 echo "linking $srcdir/$ac_source to $ac_dest"
10815
10816 if test ! -r $srcdir/$ac_source; then
10817 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10818 fi
10819 rm -f $ac_dest
10820
10821 # Make relative symlinks.
10822 # Remove last slash and all that follows it. Not all systems have dirname.
10823 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10824 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10825 # The dest file is in a subdirectory.
10826 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10827 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10828 # A "../" for each directory in $ac_dest_dir_suffix.
10829 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10830 else
10831 ac_dest_dir_suffix= ac_dots=
10832 fi
10833
10834 case "$srcdir" in
10835 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10836 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10837 esac
10838
10839 # Make a symlink if possible; otherwise try a hard link.
10840 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10841 ln $srcdir/$ac_source $ac_dest; then :
10842 else
10843 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10844 fi
10845done
10846EOF
10847cat >> $CONFIG_STATUS <<EOF
10848
10849gdb_host_cpu=$gdb_host_cpu
10850gdb_target_cpu=$gdb_target_cpu
10851nativefile=$nativefile
10852
10853EOF
10854cat >> $CONFIG_STATUS <<\EOF
10855
10856if test "${nativefile}" = ""; then
c4620205 10857 < Makefile \
e27da16d
JT
10858 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10859 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10860 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10861 > Makefile.tem
c906108c
SS
10862mv -f Makefile.tem Makefile
10863fi
10864
10865sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10866/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10867/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10868mv -f Makefile.tmp Makefile
10869
2acceee2 10870
c906108c
SS
10871case x$CONFIG_HEADERS in
10872xconfig.h:config.in)
10873echo > stamp-h ;;
10874esac
10875
10876exit 0
10877EOF
10878chmod +x $CONFIG_STATUS
10879rm -fr confdefs* $ac_clean_files
10880test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10881
10882if test "$no_recursion" != yes; then
10883
10884 # Remove --cache-file and --srcdir arguments so they do not pile up.
10885 ac_sub_configure_args=
10886 ac_prev=
10887 for ac_arg in $ac_configure_args; do
10888 if test -n "$ac_prev"; then
10889 ac_prev=
10890 continue
10891 fi
10892 case "$ac_arg" in
10893 -cache-file | --cache-file | --cache-fil | --cache-fi \
10894 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10895 ac_prev=cache_file ;;
10896 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10897 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10898 ;;
10899 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10900 ac_prev=srcdir ;;
10901 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10902 ;;
10903 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10904 esac
10905 done
10906
8dcde887 10907 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10908
10909 # Do not complain, so a configure script can configure whichever
10910 # parts of a large source tree are present.
10911 if test ! -d $srcdir/$ac_config_dir; then
10912 continue
10913 fi
10914
10915 echo configuring in $ac_config_dir
10916
10917 case "$srcdir" in
10918 .) ;;
10919 *)
10920 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10921 else
10922 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10923 fi
10924 ;;
10925 esac
10926
10927 ac_popdir=`pwd`
10928 cd $ac_config_dir
10929
10930 # A "../" for each directory in /$ac_config_dir.
10931 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10932
10933 case "$srcdir" in
10934 .) # No --srcdir option. We are building in place.
10935 ac_sub_srcdir=$srcdir ;;
10936 /*) # Absolute path.
10937 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10938 *) # Relative path.
10939 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10940 esac
10941
10942 # Check for guested configure; otherwise get Cygnus style configure.
10943 if test -f $ac_sub_srcdir/configure; then
10944 ac_sub_configure=$ac_sub_srcdir/configure
10945 elif test -f $ac_sub_srcdir/configure.in; then
10946 ac_sub_configure=$ac_configure
10947 else
10948 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10949 ac_sub_configure=
10950 fi
10951
10952 # The recursion is here.
10953 if test -n "$ac_sub_configure"; then
10954
10955 # Make the cache file name correct relative to the subdirectory.
10956 case "$cache_file" in
10957 /*) ac_sub_cache_file=$cache_file ;;
10958 *) # Relative path.
10959 ac_sub_cache_file="$ac_dots$cache_file" ;;
10960 esac
10961 case "$ac_given_INSTALL" in
10962 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10963 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10964 esac
10965
10966 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10967 # The eval makes quoting arguments work.
10968 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10969 then :
10970 else
10971 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10972 fi
10973 fi
10974
10975 cd $ac_popdir
10976 done
10977fi
10978
10979
10980exit 0
This page took 0.835946 seconds and 4 git commands to generate.