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