daily update
[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"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
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)"
29ac_help="$ac_help
30 --without-included-regex don't use included regex; this is the default
31 on systems with version 2 of the GNU C library
32 (use with caution on other system)"
c906108c
SS
33ac_help="$ac_help
34 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
35ac_help="$ac_help
36 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
37ac_help="$ac_help
38 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
39ac_help="$ac_help
40 --enable-gdbtk Enable GDBTK GUI front end"
41ac_help="$ac_help
42 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
43ac_help="$ac_help
44 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
45ac_help="$ac_help
46 --with-tclinclude=DIR Directory where tcl private headers are"
47ac_help="$ac_help
48 --with-tkinclude=DIR Directory where tk private headers are"
49ac_help="$ac_help
50 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
51ac_help="$ac_help
52 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
53ac_help="$ac_help
54 --with-x use the X Window System"
7a292a7a
SS
55ac_help="$ac_help
56 --enable-sim Link gdb with simulator"
c906108c
SS
57ac_help="$ac_help
58 --enable-shared Use shared libraries"
234b45d4
KB
59ac_help="$ac_help
60 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
61
62# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
66cache_file=./config.cache
67exec_prefix=NONE
68host=NONE
69no_create=
70nonopt=NONE
71no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
76silent=
77site=
c41b7eb1 78sitefile=
c906108c
SS
79srcdir=
80target=NONE
81verbose=
82x_includes=NONE
83x_libraries=NONE
84bindir='${exec_prefix}/bin'
85sbindir='${exec_prefix}/sbin'
86libexecdir='${exec_prefix}/libexec'
87datadir='${prefix}/share'
88sysconfdir='${prefix}/etc'
89sharedstatedir='${prefix}/com'
90localstatedir='${prefix}/var'
91libdir='${exec_prefix}/lib'
92includedir='${prefix}/include'
93oldincludedir='/usr/include'
94infodir='${prefix}/info'
95mandir='${prefix}/man'
96
97# Initialize some other variables.
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101# Maximum number of lines to put in a shell here document.
102ac_max_here_lines=12
103
104ac_prev=
105for ac_option
106do
107
108 # If the previous option needs an argument, assign it.
109 if test -n "$ac_prev"; then
110 eval "$ac_prev=\$ac_option"
111 ac_prev=
112 continue
113 fi
114
115 case "$ac_option" in
116 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
117 *) ac_optarg= ;;
118 esac
119
120 # Accept the important Cygnus configure options, so we can diagnose typos.
121
122 case "$ac_option" in
123
124 -bindir | --bindir | --bindi | --bind | --bin | --bi)
125 ac_prev=bindir ;;
126 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
127 bindir="$ac_optarg" ;;
128
129 -build | --build | --buil | --bui | --bu)
130 ac_prev=build ;;
131 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
132 build="$ac_optarg" ;;
133
134 -cache-file | --cache-file | --cache-fil | --cache-fi \
135 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
136 ac_prev=cache_file ;;
137 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
138 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
139 cache_file="$ac_optarg" ;;
140
141 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
142 ac_prev=datadir ;;
143 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
144 | --da=*)
145 datadir="$ac_optarg" ;;
146
147 -disable-* | --disable-*)
148 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
149 # Reject names that are not valid shell variable names.
150 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
151 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
152 fi
153 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
154 eval "enable_${ac_feature}=no" ;;
155
156 -enable-* | --enable-*)
157 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
158 # Reject names that are not valid shell variable names.
159 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
160 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
161 fi
162 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
163 case "$ac_option" in
164 *=*) ;;
165 *) ac_optarg=yes ;;
166 esac
167 eval "enable_${ac_feature}='$ac_optarg'" ;;
168
169 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
170 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
171 | --exec | --exe | --ex)
172 ac_prev=exec_prefix ;;
173 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
174 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
175 | --exec=* | --exe=* | --ex=*)
176 exec_prefix="$ac_optarg" ;;
177
178 -gas | --gas | --ga | --g)
179 # Obsolete; use --with-gas.
180 with_gas=yes ;;
181
182 -help | --help | --hel | --he)
183 # Omit some internal or obsolete options to make the list less imposing.
184 # This message is too long to be a string in the A/UX 3.1 sh.
185 cat << EOF
186Usage: configure [options] [host]
187Options: [defaults in brackets after descriptions]
188Configuration:
189 --cache-file=FILE cache test results in FILE
190 --help print this message
191 --no-create do not create output files
192 --quiet, --silent do not print \`checking...' messages
c41b7eb1 193 --site-file=FILE use FILE as the site file
c906108c
SS
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
199 [same as prefix]
200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
232EOF
233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
236 exit 0 ;;
237
238 -host | --host | --hos | --ho)
239 ac_prev=host ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host="$ac_optarg" ;;
242
243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir="$ac_optarg" ;;
249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir="$ac_optarg" ;;
254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
258 libdir="$ac_optarg" ;;
259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir="$ac_optarg" ;;
266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir="$ac_optarg" ;;
275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
279 mandir="$ac_optarg" ;;
280
281 -nfp | --nfp | --nf)
282 # Obsolete; use --without-fp.
283 with_fp=no ;;
284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
292
293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir="$ac_optarg" ;;
301
302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
305 prefix="$ac_optarg" ;;
306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix="$ac_optarg" ;;
313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix="$ac_optarg" ;;
320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name="$ac_optarg" ;;
337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
346 sbindir="$ac_optarg" ;;
347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
357 sharedstatedir="$ac_optarg" ;;
358
359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
362 site="$ac_optarg" ;;
363
c41b7eb1
JB
364 -site-file | --site-file | --site-fil | --site-fi | --site-f)
365 ac_prev=sitefile ;;
366 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
367 sitefile="$ac_optarg" ;;
368
c906108c
SS
369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
370 ac_prev=srcdir ;;
371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372 srcdir="$ac_optarg" ;;
373
374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375 | --syscon | --sysco | --sysc | --sys | --sy)
376 ac_prev=sysconfdir ;;
377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379 sysconfdir="$ac_optarg" ;;
380
381 -target | --target | --targe | --targ | --tar | --ta | --t)
382 ac_prev=target ;;
383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384 target="$ac_optarg" ;;
385
386 -v | -verbose | --verbose | --verbos | --verbo | --verb)
387 verbose=yes ;;
388
389 -version | --version | --versio | --versi | --vers)
390 echo "configure generated by autoconf version 2.13"
391 exit 0 ;;
392
393 -with-* | --with-*)
394 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395 # Reject names that are not valid shell variable names.
396 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
398 fi
399 ac_package=`echo $ac_package| sed 's/-/_/g'`
400 case "$ac_option" in
401 *=*) ;;
402 *) ac_optarg=yes ;;
403 esac
404 eval "with_${ac_package}='$ac_optarg'" ;;
405
406 -without-* | --without-*)
407 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
411 fi
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 eval "with_${ac_package}=no" ;;
414
415 --x)
416 # Obsolete; use --with-x.
417 with_x=yes ;;
418
419 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420 | --x-incl | --x-inc | --x-in | --x-i)
421 ac_prev=x_includes ;;
422 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424 x_includes="$ac_optarg" ;;
425
426 -x-libraries | --x-libraries | --x-librarie | --x-librari \
427 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428 ac_prev=x_libraries ;;
429 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431 x_libraries="$ac_optarg" ;;
432
433 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
434 ;;
435
436 *)
437 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438 echo "configure: warning: $ac_option: invalid host type" 1>&2
439 fi
440 if test "x$nonopt" != xNONE; then
441 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
442 fi
443 nonopt="$ac_option"
444 ;;
445
446 esac
447done
448
449if test -n "$ac_prev"; then
450 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
451fi
452
453trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
454
455# File descriptor usage:
456# 0 standard input
457# 1 file creation
458# 2 errors and warnings
459# 3 some systems may open it to /dev/tty
460# 4 used on the Kubota Titan
461# 6 checking for... messages and results
462# 5 compiler messages saved in config.log
463if test "$silent" = yes; then
464 exec 6>/dev/null
465else
466 exec 6>&1
467fi
468exec 5>./config.log
469
470echo "\
471This file contains any messages produced by compilers while
472running configure, to aid debugging if configure makes a mistake.
473" 1>&5
474
475# Strip out --no-create and --no-recursion so they do not pile up.
476# Also quote any args containing shell metacharacters.
477ac_configure_args=
478for ac_arg
479do
480 case "$ac_arg" in
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482 | --no-cr | --no-c) ;;
483 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
488 esac
489done
490
491# NLS nuisances.
492# Only set these to C if already set. These must not be set unconditionally
493# because not all systems understand e.g. LANG=C (notably SCO).
494# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495# Non-C LC_CTYPE values break the ctype check.
496if test "${LANG+set}" = set; then LANG=C; export LANG; fi
497if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
500
501# confdefs.h avoids OS command line length limits that DEFS can exceed.
502rm -rf conftest* confdefs.h
503# AIX cpp loses on an empty file, so make sure it contains at least a newline.
504echo > confdefs.h
505
506# A filename unique to this package, relative to the directory that
507# configure is in, which we can look for to find out if srcdir is correct.
508ac_unique_file=main.c
509
510# Find the source files, if location was not specified.
511if test -z "$srcdir"; then
512 ac_srcdir_defaulted=yes
513 # Try the directory containing this script, then its parent.
514 ac_prog=$0
515 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
517 srcdir=$ac_confdir
518 if test ! -r $srcdir/$ac_unique_file; then
519 srcdir=..
520 fi
521else
522 ac_srcdir_defaulted=no
523fi
524if test ! -r $srcdir/$ac_unique_file; then
525 if test "$ac_srcdir_defaulted" = yes; then
526 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
527 else
528 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
529 fi
530fi
531srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
532
533# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
534if test -z "$sitefile"; then
535 if test -z "$CONFIG_SITE"; then
536 if test "x$prefix" != xNONE; then
537 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
538 else
539 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
540 fi
c906108c 541 fi
c41b7eb1
JB
542else
543 CONFIG_SITE="$sitefile"
c906108c
SS
544fi
545for ac_site_file in $CONFIG_SITE; do
546 if test -r "$ac_site_file"; then
547 echo "loading site script $ac_site_file"
548 . "$ac_site_file"
549 fi
550done
551
552if test -r "$cache_file"; then
553 echo "loading cache $cache_file"
554 . $cache_file
555else
556 echo "creating cache $cache_file"
557 > $cache_file
558fi
559
560ac_ext=c
561# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
562ac_cpp='$CPP $CPPFLAGS'
563ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
564ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
565cross_compiling=$ac_cv_prog_cc_cross
566
567ac_exeext=
568ac_objext=o
569if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
570 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
571 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
572 ac_n= ac_c='
573' ac_t=' '
574 else
575 ac_n=-n ac_c= ac_t=
576 fi
577else
578 ac_n= ac_c='\c' ac_t=
579fi
580
581
582
413ccac7 583echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
91151a06 584echo "configure:585: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
585 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
586if test "${enable_maintainer_mode+set}" = set; then
587 enableval="$enable_maintainer_mode"
588 USE_MAINTAINER_MODE=$enableval
589else
590 USE_MAINTAINER_MODE=no
591fi
592
593 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
594
595
596if test $USE_MAINTAINER_MODE = yes; then
597 MAINTAINER_MODE_TRUE=
598 MAINTAINER_MODE_FALSE='#'
599else
600 MAINTAINER_MODE_TRUE='#'
601 MAINTAINER_MODE_FALSE=
602fi
603 MAINT=$MAINTAINER_MODE_TRUE
604
605
c906108c
SS
606
607# Extract the first word of "gcc", so it can be a program name with args.
608set dummy gcc; ac_word=$2
609echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 610echo "configure:611: checking for $ac_word" >&5
c906108c
SS
611if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
612 echo $ac_n "(cached) $ac_c" 1>&6
613else
614 if test -n "$CC"; then
615 ac_cv_prog_CC="$CC" # Let the user override the test.
616else
617 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
618 ac_dummy="$PATH"
619 for ac_dir in $ac_dummy; do
620 test -z "$ac_dir" && ac_dir=.
621 if test -f $ac_dir/$ac_word; then
622 ac_cv_prog_CC="gcc"
623 break
624 fi
625 done
626 IFS="$ac_save_ifs"
627fi
628fi
629CC="$ac_cv_prog_CC"
630if test -n "$CC"; then
631 echo "$ac_t""$CC" 1>&6
632else
633 echo "$ac_t""no" 1>&6
634fi
635
636if test -z "$CC"; then
637 # Extract the first word of "cc", so it can be a program name with args.
638set dummy cc; ac_word=$2
639echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 640echo "configure:641: checking for $ac_word" >&5
c906108c
SS
641if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
642 echo $ac_n "(cached) $ac_c" 1>&6
643else
644 if test -n "$CC"; then
645 ac_cv_prog_CC="$CC" # Let the user override the test.
646else
647 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
648 ac_prog_rejected=no
649 ac_dummy="$PATH"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
653 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
654 ac_prog_rejected=yes
655 continue
656 fi
657 ac_cv_prog_CC="cc"
658 break
659 fi
660 done
661 IFS="$ac_save_ifs"
662if test $ac_prog_rejected = yes; then
663 # We found a bogon in the path, so make sure we never use it.
664 set dummy $ac_cv_prog_CC
665 shift
666 if test $# -gt 0; then
667 # We chose a different compiler from the bogus one.
668 # However, it has the same basename, so the bogon will be chosen
669 # first if we set CC to just the basename; use the full file name.
670 shift
671 set dummy "$ac_dir/$ac_word" "$@"
672 shift
673 ac_cv_prog_CC="$@"
674 fi
675fi
676fi
677fi
678CC="$ac_cv_prog_CC"
679if test -n "$CC"; then
680 echo "$ac_t""$CC" 1>&6
681else
682 echo "$ac_t""no" 1>&6
683fi
684
685 if test -z "$CC"; then
686 case "`uname -s`" in
687 *win32* | *WIN32*)
688 # Extract the first word of "cl", so it can be a program name with args.
689set dummy cl; ac_word=$2
690echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 691echo "configure:692: checking for $ac_word" >&5
c906108c
SS
692if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
693 echo $ac_n "(cached) $ac_c" 1>&6
694else
695 if test -n "$CC"; then
696 ac_cv_prog_CC="$CC" # Let the user override the test.
697else
698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
699 ac_dummy="$PATH"
700 for ac_dir in $ac_dummy; do
701 test -z "$ac_dir" && ac_dir=.
702 if test -f $ac_dir/$ac_word; then
703 ac_cv_prog_CC="cl"
704 break
705 fi
706 done
707 IFS="$ac_save_ifs"
708fi
709fi
710CC="$ac_cv_prog_CC"
711if test -n "$CC"; then
712 echo "$ac_t""$CC" 1>&6
713else
714 echo "$ac_t""no" 1>&6
715fi
716 ;;
717 esac
718 fi
719 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
720fi
721
722echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
91151a06 723echo "configure:724: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
724
725ac_ext=c
726# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
727ac_cpp='$CPP $CPPFLAGS'
728ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
729ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
730cross_compiling=$ac_cv_prog_cc_cross
731
732cat > conftest.$ac_ext << EOF
733
91151a06 734#line 735 "configure"
c906108c
SS
735#include "confdefs.h"
736
737main(){return(0);}
738EOF
91151a06 739if { (eval echo configure:740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
740 ac_cv_prog_cc_works=yes
741 # If we can't run a trivial program, we are probably using a cross compiler.
742 if (./conftest; exit) 2>/dev/null; then
743 ac_cv_prog_cc_cross=no
744 else
745 ac_cv_prog_cc_cross=yes
746 fi
747else
748 echo "configure: failed program was:" >&5
749 cat conftest.$ac_ext >&5
750 ac_cv_prog_cc_works=no
751fi
752rm -fr conftest*
753ac_ext=c
754# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
755ac_cpp='$CPP $CPPFLAGS'
756ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
757ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
758cross_compiling=$ac_cv_prog_cc_cross
759
760echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
761if test $ac_cv_prog_cc_works = no; then
762 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
763fi
764echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
91151a06 765echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
766echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
767cross_compiling=$ac_cv_prog_cc_cross
768
769echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
91151a06 770echo "configure:771: checking whether we are using GNU C" >&5
c906108c
SS
771if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 cat > conftest.c <<EOF
775#ifdef __GNUC__
776 yes;
777#endif
778EOF
91151a06 779if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
780 ac_cv_prog_gcc=yes
781else
782 ac_cv_prog_gcc=no
783fi
784fi
785
786echo "$ac_t""$ac_cv_prog_gcc" 1>&6
787
788if test $ac_cv_prog_gcc = yes; then
789 GCC=yes
790else
791 GCC=
792fi
793
794ac_test_CFLAGS="${CFLAGS+set}"
795ac_save_CFLAGS="$CFLAGS"
796CFLAGS=
797echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
91151a06 798echo "configure:799: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
799if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801else
802 echo 'void f(){}' > conftest.c
803if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
804 ac_cv_prog_cc_g=yes
805else
806 ac_cv_prog_cc_g=no
807fi
808rm -f conftest*
809
810fi
811
812echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
813if test "$ac_test_CFLAGS" = set; then
814 CFLAGS="$ac_save_CFLAGS"
815elif test $ac_cv_prog_cc_g = yes; then
816 if test "$GCC" = yes; then
817 CFLAGS="-g -O2"
818 else
819 CFLAGS="-g"
820 fi
821else
822 if test "$GCC" = yes; then
823 CFLAGS="-O2"
824 else
825 CFLAGS=
826 fi
827fi
828
829echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
91151a06 830echo "configure:831: checking how to run the C preprocessor" >&5
c906108c
SS
831# On Suns, sometimes $CPP names a directory.
832if test -n "$CPP" && test -d "$CPP"; then
833 CPP=
834fi
835if test -z "$CPP"; then
836if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
837 echo $ac_n "(cached) $ac_c" 1>&6
838else
839 # This must be in double quotes, not single quotes, because CPP may get
840 # substituted into the Makefile and "${CC-cc}" will confuse make.
841 CPP="${CC-cc} -E"
842 # On the NeXT, cc -E runs the code through the compiler's parser,
843 # not just through cpp.
844 cat > conftest.$ac_ext <<EOF
91151a06 845#line 846 "configure"
c906108c
SS
846#include "confdefs.h"
847#include <assert.h>
848Syntax Error
849EOF
850ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 851{ (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
852ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
853if test -z "$ac_err"; then
854 :
855else
856 echo "$ac_err" >&5
857 echo "configure: failed program was:" >&5
858 cat conftest.$ac_ext >&5
859 rm -rf conftest*
860 CPP="${CC-cc} -E -traditional-cpp"
861 cat > conftest.$ac_ext <<EOF
91151a06 862#line 863 "configure"
c906108c
SS
863#include "confdefs.h"
864#include <assert.h>
865Syntax Error
866EOF
867ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 868{ (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
870if test -z "$ac_err"; then
871 :
872else
873 echo "$ac_err" >&5
874 echo "configure: failed program was:" >&5
875 cat conftest.$ac_ext >&5
876 rm -rf conftest*
877 CPP="${CC-cc} -nologo -E"
878 cat > conftest.$ac_ext <<EOF
91151a06 879#line 880 "configure"
c906108c
SS
880#include "confdefs.h"
881#include <assert.h>
882Syntax Error
883EOF
884ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 885{ (eval echo configure:886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
886ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
887if test -z "$ac_err"; then
888 :
889else
890 echo "$ac_err" >&5
891 echo "configure: failed program was:" >&5
892 cat conftest.$ac_ext >&5
893 rm -rf conftest*
894 CPP=/lib/cpp
895fi
896rm -f conftest*
897fi
898rm -f conftest*
899fi
900rm -f conftest*
901 ac_cv_prog_CPP="$CPP"
902fi
903 CPP="$ac_cv_prog_CPP"
904else
905 ac_cv_prog_CPP="$CPP"
906fi
907echo "$ac_t""$CPP" 1>&6
908
909echo $ac_n "checking for AIX""... $ac_c" 1>&6
91151a06 910echo "configure:911: checking for AIX" >&5
c906108c 911cat > conftest.$ac_ext <<EOF
91151a06 912#line 913 "configure"
c906108c
SS
913#include "confdefs.h"
914#ifdef _AIX
915 yes
916#endif
917
918EOF
919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
920 egrep "yes" >/dev/null 2>&1; then
921 rm -rf conftest*
922 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
923#define _ALL_SOURCE 1
924EOF
925
926else
927 rm -rf conftest*
928 echo "$ac_t""no" 1>&6
929fi
930rm -f conftest*
931
932
56157b4a 933echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
91151a06 934echo "configure:935: checking for POSIXized ISC" >&5
56157b4a
AC
935if test -d /etc/conf/kconfig.d &&
936 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
937then
938 echo "$ac_t""yes" 1>&6
939 ISC=yes # If later tests want to check for ISC.
940 cat >> confdefs.h <<\EOF
941#define _POSIX_SOURCE 1
c906108c
SS
942EOF
943
56157b4a
AC
944 if test "$GCC" = yes; then
945 CC="$CC -posix"
946 else
947 CC="$CC -Xp"
948 fi
c906108c
SS
949else
950 echo "$ac_t""no" 1>&6
56157b4a 951 ISC=
c906108c
SS
952fi
953
954
955
956
957echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
91151a06 958echo "configure:959: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
959if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
960 echo $ac_n "(cached) $ac_c" 1>&6
961else
962 am_cv_prog_cc_stdc=no
963ac_save_CC="$CC"
964# Don't try gcc -ansi; that turns off useful extensions and
965# breaks some systems' header files.
966# AIX -qlanglvl=ansi
967# Ultrix and OSF/1 -std1
56157b4a
AC
968# HP-UX 10.20 and later -Ae
969# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 970# SVR4 -Xc -D__EXTENSIONS__
56157b4a 971for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
972do
973 CC="$ac_save_CC $ac_arg"
974 cat > conftest.$ac_ext <<EOF
91151a06 975#line 976 "configure"
c906108c
SS
976#include "confdefs.h"
977#include <stdarg.h>
978#include <stdio.h>
979#include <sys/types.h>
980#include <sys/stat.h>
981/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
982struct buf { int x; };
983FILE * (*rcsopen) (struct buf *, struct stat *, int);
984static char *e (p, i)
985 char **p;
986 int i;
987{
988 return p[i];
989}
990static char *f (char * (*g) (char **, int), char **p, ...)
991{
992 char *s;
993 va_list v;
994 va_start (v,p);
995 s = g (p, va_arg (v,int));
996 va_end (v);
997 return s;
998}
999int test (int i, double x);
1000struct s1 {int (*f) (int a);};
1001struct s2 {int (*f) (double a);};
1002int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1003int argc;
1004char **argv;
1005
1006int main() {
1007
1008return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1009
1010; return 0; }
1011EOF
91151a06 1012if { (eval echo configure:1013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1013 rm -rf conftest*
1014 am_cv_prog_cc_stdc="$ac_arg"; break
1015else
1016 echo "configure: failed program was:" >&5
1017 cat conftest.$ac_ext >&5
1018fi
1019rm -f conftest*
1020done
1021CC="$ac_save_CC"
1022
1023fi
1024
1025if test -z "$am_cv_prog_cc_stdc"; then
1026 echo "$ac_t""none needed" 1>&6
1027else
1028 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1029fi
1030case "x$am_cv_prog_cc_stdc" in
1031 x|xno) ;;
1032 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1033esac
1034
1035
1036ac_aux_dir=
1037for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1038 if test -f $ac_dir/install-sh; then
1039 ac_aux_dir=$ac_dir
1040 ac_install_sh="$ac_aux_dir/install-sh -c"
1041 break
1042 elif test -f $ac_dir/install.sh; then
1043 ac_aux_dir=$ac_dir
1044 ac_install_sh="$ac_aux_dir/install.sh -c"
1045 break
1046 fi
1047done
1048if test -z "$ac_aux_dir"; then
1049 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1050fi
1051ac_config_guess=$ac_aux_dir/config.guess
1052ac_config_sub=$ac_aux_dir/config.sub
1053ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1054
1055
1056# Do some error checking and defaulting for the host and target type.
1057# The inputs are:
1058# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1059#
1060# The rules are:
1061# 1. You are not allowed to specify --host, --target, and nonopt at the
1062# same time.
1063# 2. Host defaults to nonopt.
1064# 3. If nonopt is not specified, then host defaults to the current host,
1065# as determined by config.guess.
1066# 4. Target and build default to nonopt.
1067# 5. If nonopt is not specified, then target and build default to host.
1068
1069# The aliases save the names the user supplied, while $host etc.
1070# will get canonicalized.
1071case $host---$target---$nonopt in
1072NONE---*---* | *---NONE---* | *---*---NONE) ;;
1073*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1074esac
1075
1076
1077# Make sure we can run config.sub.
1078if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1079else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1080fi
1081
1082echo $ac_n "checking host system type""... $ac_c" 1>&6
91151a06 1083echo "configure:1084: checking host system type" >&5
c906108c
SS
1084
1085host_alias=$host
1086case "$host_alias" in
1087NONE)
1088 case $nonopt in
1089 NONE)
1090 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1091 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1092 fi ;;
1093 *) host_alias=$nonopt ;;
1094 esac ;;
1095esac
1096
1097host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1098host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1099host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1100host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1101echo "$ac_t""$host" 1>&6
1102
1103echo $ac_n "checking target system type""... $ac_c" 1>&6
91151a06 1104echo "configure:1105: checking target system type" >&5
c906108c
SS
1105
1106target_alias=$target
1107case "$target_alias" in
1108NONE)
1109 case $nonopt in
1110 NONE) target_alias=$host_alias ;;
1111 *) target_alias=$nonopt ;;
1112 esac ;;
1113esac
1114
1115target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1116target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1117target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1118target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1119echo "$ac_t""$target" 1>&6
1120
1121echo $ac_n "checking build system type""... $ac_c" 1>&6
91151a06 1122echo "configure:1123: checking build system type" >&5
c906108c
SS
1123
1124build_alias=$build
1125case "$build_alias" in
1126NONE)
1127 case $nonopt in
1128 NONE) build_alias=$host_alias ;;
1129 *) build_alias=$nonopt ;;
1130 esac ;;
1131esac
1132
1133build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1134build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1135build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1136build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1137echo "$ac_t""$build" 1>&6
1138
1139test "$host_alias" != "$target_alias" &&
1140 test "$program_prefix$program_suffix$program_transform_name" = \
1141 NONENONEs,x,x, &&
1142 program_prefix=${target_alias}-
1143
1144
8bb2c122
MK
1145# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1146# doesn't support cross-compilation, but the one from Autoconf 2.5x
1147# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1148# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1149# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1150# 2.5x.
1151if test $host != $build; then
1152 ac_tool_prefix=${host_alias}-
1153else
1154 ac_tool_prefix=
1155fi
1156
1157# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1158set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1159echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 1160echo "configure:1161: checking for $ac_word" >&5
8bb2c122
MK
1161if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1162 echo $ac_n "(cached) $ac_c" 1>&6
1163else
1164 if test -n "$RANLIB"; then
1165 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1166else
1167 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1168 ac_dummy="$PATH"
1169 for ac_dir in $ac_dummy; do
1170 test -z "$ac_dir" && ac_dir=.
1171 if test -f $ac_dir/$ac_word; then
1172 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1173 break
1174 fi
1175 done
1176 IFS="$ac_save_ifs"
1177fi
1178fi
1179RANLIB="$ac_cv_prog_RANLIB"
1180if test -n "$RANLIB"; then
1181 echo "$ac_t""$RANLIB" 1>&6
1182else
1183 echo "$ac_t""no" 1>&6
1184fi
1185
1186
1187if test -z "$ac_cv_prog_RANLIB"; then
1188if test -n "$ac_tool_prefix"; then
1189 # Extract the first word of "ranlib", so it can be a program name with args.
1190set dummy ranlib; ac_word=$2
1191echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 1192echo "configure:1193: checking for $ac_word" >&5
8bb2c122
MK
1193if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1195else
1196 if test -n "$RANLIB"; then
1197 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1198else
1199 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1200 ac_dummy="$PATH"
1201 for ac_dir in $ac_dummy; do
1202 test -z "$ac_dir" && ac_dir=.
1203 if test -f $ac_dir/$ac_word; then
1204 ac_cv_prog_RANLIB="ranlib"
1205 break
1206 fi
1207 done
1208 IFS="$ac_save_ifs"
1209 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1210fi
1211fi
1212RANLIB="$ac_cv_prog_RANLIB"
1213if test -n "$RANLIB"; then
1214 echo "$ac_t""$RANLIB" 1>&6
1215else
1216 echo "$ac_t""no" 1>&6
1217fi
1218
1219else
1220 RANLIB=":"
1221fi
1222fi
1223
1224
c906108c
SS
1225ALL_LINGUAS=
1226echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
91151a06 1227echo "configure:1228: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1228set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1229if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 cat > conftestmake <<\EOF
1233all:
1234 @echo 'ac_maketemp="${MAKE}"'
1235EOF
1236# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1237eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1238if test -n "$ac_maketemp"; then
1239 eval ac_cv_prog_make_${ac_make}_set=yes
1240else
1241 eval ac_cv_prog_make_${ac_make}_set=no
1242fi
1243rm -f conftestmake
1244fi
1245if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1246 echo "$ac_t""yes" 1>&6
1247 SET_MAKE=
1248else
1249 echo "$ac_t""no" 1>&6
1250 SET_MAKE="MAKE=${MAKE-make}"
1251fi
1252
1253# Extract the first word of "ranlib", so it can be a program name with args.
1254set dummy ranlib; ac_word=$2
1255echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 1256echo "configure:1257: checking for $ac_word" >&5
c906108c
SS
1257if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260 if test -n "$RANLIB"; then
1261 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1262else
1263 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1264 ac_dummy="$PATH"
1265 for ac_dir in $ac_dummy; do
1266 test -z "$ac_dir" && ac_dir=.
1267 if test -f $ac_dir/$ac_word; then
1268 ac_cv_prog_RANLIB="ranlib"
1269 break
1270 fi
1271 done
1272 IFS="$ac_save_ifs"
1273 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1274fi
1275fi
1276RANLIB="$ac_cv_prog_RANLIB"
1277if test -n "$RANLIB"; then
1278 echo "$ac_t""$RANLIB" 1>&6
1279else
1280 echo "$ac_t""no" 1>&6
1281fi
1282
1283echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
91151a06 1284echo "configure:1285: checking for ANSI C header files" >&5
c906108c
SS
1285if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287else
1288 cat > conftest.$ac_ext <<EOF
91151a06 1289#line 1290 "configure"
c906108c
SS
1290#include "confdefs.h"
1291#include <stdlib.h>
1292#include <stdarg.h>
1293#include <string.h>
1294#include <float.h>
1295EOF
1296ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 1297{ (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1298ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1299if test -z "$ac_err"; then
1300 rm -rf conftest*
1301 ac_cv_header_stdc=yes
1302else
1303 echo "$ac_err" >&5
1304 echo "configure: failed program was:" >&5
1305 cat conftest.$ac_ext >&5
1306 rm -rf conftest*
1307 ac_cv_header_stdc=no
1308fi
1309rm -f conftest*
1310
1311if test $ac_cv_header_stdc = yes; then
1312 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1313cat > conftest.$ac_ext <<EOF
91151a06 1314#line 1315 "configure"
c906108c
SS
1315#include "confdefs.h"
1316#include <string.h>
1317EOF
1318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1319 egrep "memchr" >/dev/null 2>&1; then
1320 :
1321else
1322 rm -rf conftest*
1323 ac_cv_header_stdc=no
1324fi
1325rm -f conftest*
1326
1327fi
1328
1329if test $ac_cv_header_stdc = yes; then
1330 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1331cat > conftest.$ac_ext <<EOF
91151a06 1332#line 1333 "configure"
c906108c
SS
1333#include "confdefs.h"
1334#include <stdlib.h>
1335EOF
1336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1337 egrep "free" >/dev/null 2>&1; then
1338 :
1339else
1340 rm -rf conftest*
1341 ac_cv_header_stdc=no
1342fi
1343rm -f conftest*
1344
1345fi
1346
1347if test $ac_cv_header_stdc = yes; then
1348 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1349if test "$cross_compiling" = yes; then
1350 :
1351else
1352 cat > conftest.$ac_ext <<EOF
91151a06 1353#line 1354 "configure"
c906108c
SS
1354#include "confdefs.h"
1355#include <ctype.h>
1356#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1357#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1358#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1359int main () { int i; for (i = 0; i < 256; i++)
1360if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1361exit (0); }
1362
1363EOF
91151a06 1364if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1365then
1366 :
1367else
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1370 rm -fr conftest*
1371 ac_cv_header_stdc=no
1372fi
1373rm -fr conftest*
1374fi
1375
1376fi
1377fi
1378
1379echo "$ac_t""$ac_cv_header_stdc" 1>&6
1380if test $ac_cv_header_stdc = yes; then
1381 cat >> confdefs.h <<\EOF
1382#define STDC_HEADERS 1
1383EOF
1384
1385fi
1386
1387echo $ac_n "checking for working const""... $ac_c" 1>&6
91151a06 1388echo "configure:1389: checking for working const" >&5
c906108c
SS
1389if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1391else
1392 cat > conftest.$ac_ext <<EOF
91151a06 1393#line 1394 "configure"
c906108c
SS
1394#include "confdefs.h"
1395
1396int main() {
1397
1398/* Ultrix mips cc rejects this. */
1399typedef int charset[2]; const charset x;
1400/* SunOS 4.1.1 cc rejects this. */
1401char const *const *ccp;
1402char **p;
1403/* NEC SVR4.0.2 mips cc rejects this. */
1404struct point {int x, y;};
1405static struct point const zero = {0,0};
1406/* AIX XL C 1.02.0.0 rejects this.
1407 It does not let you subtract one const X* pointer from another in an arm
1408 of an if-expression whose if-part is not a constant expression */
1409const char *g = "string";
1410ccp = &g + (g ? g-g : 0);
1411/* HPUX 7.0 cc rejects these. */
1412++ccp;
1413p = (char**) ccp;
1414ccp = (char const *const *) p;
1415{ /* SCO 3.2v4 cc rejects this. */
1416 char *t;
1417 char const *s = 0 ? (char *) 0 : (char const *) 0;
1418
1419 *t++ = 0;
1420}
1421{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1422 int x[] = {25, 17};
1423 const int *foo = &x[0];
1424 ++foo;
1425}
1426{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1427 typedef const int *iptr;
1428 iptr p = 0;
1429 ++p;
1430}
1431{ /* AIX XL C 1.02.0.0 rejects this saying
1432 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1433 struct s { int j; const int *ap[3]; };
1434 struct s *b; b->j = 5;
1435}
1436{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1437 const int foo = 10;
1438}
1439
1440; return 0; }
1441EOF
91151a06 1442if { (eval echo configure:1443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1443 rm -rf conftest*
1444 ac_cv_c_const=yes
1445else
1446 echo "configure: failed program was:" >&5
1447 cat conftest.$ac_ext >&5
1448 rm -rf conftest*
1449 ac_cv_c_const=no
1450fi
1451rm -f conftest*
1452fi
1453
1454echo "$ac_t""$ac_cv_c_const" 1>&6
1455if test $ac_cv_c_const = no; then
1456 cat >> confdefs.h <<\EOF
1457#define const
1458EOF
1459
1460fi
1461
1462echo $ac_n "checking for inline""... $ac_c" 1>&6
91151a06 1463echo "configure:1464: checking for inline" >&5
c906108c
SS
1464if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1465 echo $ac_n "(cached) $ac_c" 1>&6
1466else
1467 ac_cv_c_inline=no
1468for ac_kw in inline __inline__ __inline; do
1469 cat > conftest.$ac_ext <<EOF
91151a06 1470#line 1471 "configure"
c906108c
SS
1471#include "confdefs.h"
1472
1473int main() {
1474} $ac_kw foo() {
1475; return 0; }
1476EOF
91151a06 1477if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1478 rm -rf conftest*
1479 ac_cv_c_inline=$ac_kw; break
1480else
1481 echo "configure: failed program was:" >&5
1482 cat conftest.$ac_ext >&5
1483fi
1484rm -f conftest*
1485done
1486
1487fi
1488
1489echo "$ac_t""$ac_cv_c_inline" 1>&6
1490case "$ac_cv_c_inline" in
1491 inline | yes) ;;
1492 no) cat >> confdefs.h <<\EOF
1493#define inline
1494EOF
1495 ;;
1496 *) cat >> confdefs.h <<EOF
1497#define inline $ac_cv_c_inline
1498EOF
1499 ;;
1500esac
1501
1502echo $ac_n "checking for off_t""... $ac_c" 1>&6
91151a06 1503echo "configure:1504: checking for off_t" >&5
c906108c
SS
1504if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1505 echo $ac_n "(cached) $ac_c" 1>&6
1506else
1507 cat > conftest.$ac_ext <<EOF
91151a06 1508#line 1509 "configure"
c906108c
SS
1509#include "confdefs.h"
1510#include <sys/types.h>
1511#if STDC_HEADERS
1512#include <stdlib.h>
1513#include <stddef.h>
1514#endif
1515EOF
1516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1517 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1518 rm -rf conftest*
1519 ac_cv_type_off_t=yes
1520else
1521 rm -rf conftest*
1522 ac_cv_type_off_t=no
1523fi
1524rm -f conftest*
1525
1526fi
1527echo "$ac_t""$ac_cv_type_off_t" 1>&6
1528if test $ac_cv_type_off_t = no; then
1529 cat >> confdefs.h <<\EOF
1530#define off_t long
1531EOF
1532
1533fi
1534
1535echo $ac_n "checking for size_t""... $ac_c" 1>&6
91151a06 1536echo "configure:1537: checking for size_t" >&5
c906108c
SS
1537if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1538 echo $ac_n "(cached) $ac_c" 1>&6
1539else
1540 cat > conftest.$ac_ext <<EOF
91151a06 1541#line 1542 "configure"
c906108c
SS
1542#include "confdefs.h"
1543#include <sys/types.h>
1544#if STDC_HEADERS
1545#include <stdlib.h>
1546#include <stddef.h>
1547#endif
1548EOF
1549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1550 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1551 rm -rf conftest*
1552 ac_cv_type_size_t=yes
1553else
1554 rm -rf conftest*
1555 ac_cv_type_size_t=no
1556fi
1557rm -f conftest*
1558
1559fi
1560echo "$ac_t""$ac_cv_type_size_t" 1>&6
1561if test $ac_cv_type_size_t = no; then
1562 cat >> confdefs.h <<\EOF
1563#define size_t unsigned
1564EOF
1565
1566fi
1567
1568# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1569# for constant arguments. Useless!
1570echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
91151a06 1571echo "configure:1572: checking for working alloca.h" >&5
c906108c
SS
1572if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1573 echo $ac_n "(cached) $ac_c" 1>&6
1574else
1575 cat > conftest.$ac_ext <<EOF
91151a06 1576#line 1577 "configure"
c906108c
SS
1577#include "confdefs.h"
1578#include <alloca.h>
1579int main() {
1580char *p = alloca(2 * sizeof(int));
1581; return 0; }
1582EOF
91151a06 1583if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1584 rm -rf conftest*
1585 ac_cv_header_alloca_h=yes
1586else
1587 echo "configure: failed program was:" >&5
1588 cat conftest.$ac_ext >&5
1589 rm -rf conftest*
1590 ac_cv_header_alloca_h=no
1591fi
1592rm -f conftest*
1593fi
1594
1595echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1596if test $ac_cv_header_alloca_h = yes; then
1597 cat >> confdefs.h <<\EOF
1598#define HAVE_ALLOCA_H 1
1599EOF
1600
1601fi
1602
1603echo $ac_n "checking for alloca""... $ac_c" 1>&6
91151a06 1604echo "configure:1605: checking for alloca" >&5
c906108c
SS
1605if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1606 echo $ac_n "(cached) $ac_c" 1>&6
1607else
1608 cat > conftest.$ac_ext <<EOF
91151a06 1609#line 1610 "configure"
c906108c
SS
1610#include "confdefs.h"
1611
1612#ifdef __GNUC__
1613# define alloca __builtin_alloca
1614#else
1615# ifdef _MSC_VER
1616# include <malloc.h>
1617# define alloca _alloca
1618# else
1619# if HAVE_ALLOCA_H
1620# include <alloca.h>
1621# else
1622# ifdef _AIX
1623 #pragma alloca
1624# else
1625# ifndef alloca /* predefined by HP cc +Olibcalls */
1626char *alloca ();
1627# endif
1628# endif
1629# endif
1630# endif
1631#endif
1632
1633int main() {
1634char *p = (char *) alloca(1);
1635; return 0; }
1636EOF
91151a06 1637if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1638 rm -rf conftest*
1639 ac_cv_func_alloca_works=yes
1640else
1641 echo "configure: failed program was:" >&5
1642 cat conftest.$ac_ext >&5
1643 rm -rf conftest*
1644 ac_cv_func_alloca_works=no
1645fi
1646rm -f conftest*
1647fi
1648
1649echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1650if test $ac_cv_func_alloca_works = yes; then
1651 cat >> confdefs.h <<\EOF
1652#define HAVE_ALLOCA 1
1653EOF
1654
1655fi
1656
1657if test $ac_cv_func_alloca_works = no; then
1658 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1659 # that cause trouble. Some versions do not even contain alloca or
1660 # contain a buggy version. If you still want to use their alloca,
1661 # use ar to extract alloca.o from them instead of compiling alloca.c.
1662 ALLOCA=alloca.${ac_objext}
1663 cat >> confdefs.h <<\EOF
1664#define C_ALLOCA 1
1665EOF
1666
1667
1668echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
91151a06 1669echo "configure:1670: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1670if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1671 echo $ac_n "(cached) $ac_c" 1>&6
1672else
1673 cat > conftest.$ac_ext <<EOF
91151a06 1674#line 1675 "configure"
c906108c
SS
1675#include "confdefs.h"
1676#if defined(CRAY) && ! defined(CRAY2)
1677webecray
1678#else
1679wenotbecray
1680#endif
1681
1682EOF
1683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1684 egrep "webecray" >/dev/null 2>&1; then
1685 rm -rf conftest*
1686 ac_cv_os_cray=yes
1687else
1688 rm -rf conftest*
1689 ac_cv_os_cray=no
1690fi
1691rm -f conftest*
1692
1693fi
1694
1695echo "$ac_t""$ac_cv_os_cray" 1>&6
1696if test $ac_cv_os_cray = yes; then
1697for ac_func in _getb67 GETB67 getb67; do
1698 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 1699echo "configure:1700: checking for $ac_func" >&5
c906108c
SS
1700if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1701 echo $ac_n "(cached) $ac_c" 1>&6
1702else
1703 cat > conftest.$ac_ext <<EOF
91151a06 1704#line 1705 "configure"
c906108c
SS
1705#include "confdefs.h"
1706/* System header to define __stub macros and hopefully few prototypes,
1707 which can conflict with char $ac_func(); below. */
1708#include <assert.h>
1709/* Override any gcc2 internal prototype to avoid an error. */
1710/* We use char because int might match the return type of a gcc2
1711 builtin and then its argument prototype would still apply. */
1712char $ac_func();
1713
1714int main() {
1715
1716/* The GNU C library defines this for functions which it implements
1717 to always fail with ENOSYS. Some functions are actually named
1718 something starting with __ and the normal name is an alias. */
1719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1720choke me
1721#else
1722$ac_func();
1723#endif
1724
1725; return 0; }
1726EOF
91151a06 1727if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1728 rm -rf conftest*
1729 eval "ac_cv_func_$ac_func=yes"
1730else
1731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1733 rm -rf conftest*
1734 eval "ac_cv_func_$ac_func=no"
1735fi
1736rm -f conftest*
1737fi
1738
1739if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1740 echo "$ac_t""yes" 1>&6
1741 cat >> confdefs.h <<EOF
1742#define CRAY_STACKSEG_END $ac_func
1743EOF
1744
1745 break
1746else
1747 echo "$ac_t""no" 1>&6
1748fi
1749
1750done
1751fi
1752
1753echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
91151a06 1754echo "configure:1755: checking stack direction for C alloca" >&5
c906108c
SS
1755if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757else
1758 if test "$cross_compiling" = yes; then
1759 ac_cv_c_stack_direction=0
1760else
1761 cat > conftest.$ac_ext <<EOF
91151a06 1762#line 1763 "configure"
c906108c
SS
1763#include "confdefs.h"
1764find_stack_direction ()
1765{
1766 static char *addr = 0;
1767 auto char dummy;
1768 if (addr == 0)
1769 {
1770 addr = &dummy;
1771 return find_stack_direction ();
1772 }
1773 else
1774 return (&dummy > addr) ? 1 : -1;
1775}
1776main ()
1777{
1778 exit (find_stack_direction() < 0);
1779}
1780EOF
91151a06 1781if { (eval echo configure:1782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1782then
1783 ac_cv_c_stack_direction=1
1784else
1785 echo "configure: failed program was:" >&5
1786 cat conftest.$ac_ext >&5
1787 rm -fr conftest*
1788 ac_cv_c_stack_direction=-1
1789fi
1790rm -fr conftest*
1791fi
1792
1793fi
1794
1795echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1796cat >> confdefs.h <<EOF
1797#define STACK_DIRECTION $ac_cv_c_stack_direction
1798EOF
1799
1800fi
1801
c41b7eb1 1802for ac_hdr in unistd.h
c906108c
SS
1803do
1804ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1805echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 1806echo "configure:1807: checking for $ac_hdr" >&5
c906108c
SS
1807if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1809else
1810 cat > conftest.$ac_ext <<EOF
91151a06 1811#line 1812 "configure"
c906108c
SS
1812#include "confdefs.h"
1813#include <$ac_hdr>
1814EOF
1815ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 1816{ (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1817ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1818if test -z "$ac_err"; then
1819 rm -rf conftest*
1820 eval "ac_cv_header_$ac_safe=yes"
1821else
1822 echo "$ac_err" >&5
1823 echo "configure: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 rm -rf conftest*
1826 eval "ac_cv_header_$ac_safe=no"
1827fi
1828rm -f conftest*
1829fi
1830if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1831 echo "$ac_t""yes" 1>&6
1832 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1833 cat >> confdefs.h <<EOF
1834#define $ac_tr_hdr 1
1835EOF
1836
1837else
1838 echo "$ac_t""no" 1>&6
1839fi
1840done
1841
1842for ac_func in getpagesize
1843do
1844echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 1845echo "configure:1846: checking for $ac_func" >&5
c906108c
SS
1846if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1847 echo $ac_n "(cached) $ac_c" 1>&6
1848else
1849 cat > conftest.$ac_ext <<EOF
91151a06 1850#line 1851 "configure"
c906108c
SS
1851#include "confdefs.h"
1852/* System header to define __stub macros and hopefully few prototypes,
1853 which can conflict with char $ac_func(); below. */
1854#include <assert.h>
1855/* Override any gcc2 internal prototype to avoid an error. */
1856/* We use char because int might match the return type of a gcc2
1857 builtin and then its argument prototype would still apply. */
1858char $ac_func();
1859
1860int main() {
1861
1862/* The GNU C library defines this for functions which it implements
1863 to always fail with ENOSYS. Some functions are actually named
1864 something starting with __ and the normal name is an alias. */
1865#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1866choke me
1867#else
1868$ac_func();
1869#endif
1870
1871; return 0; }
1872EOF
91151a06 1873if { (eval echo configure:1874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1874 rm -rf conftest*
1875 eval "ac_cv_func_$ac_func=yes"
1876else
1877 echo "configure: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 rm -rf conftest*
1880 eval "ac_cv_func_$ac_func=no"
1881fi
1882rm -f conftest*
1883fi
1884
1885if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1886 echo "$ac_t""yes" 1>&6
1887 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1888 cat >> confdefs.h <<EOF
1889#define $ac_tr_func 1
1890EOF
1891
1892else
1893 echo "$ac_t""no" 1>&6
1894fi
1895done
1896
1897echo $ac_n "checking for working mmap""... $ac_c" 1>&6
91151a06 1898echo "configure:1899: checking for working mmap" >&5
c906108c
SS
1899if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
1901else
1902 if test "$cross_compiling" = yes; then
1903 ac_cv_func_mmap_fixed_mapped=no
1904else
1905 cat > conftest.$ac_ext <<EOF
91151a06 1906#line 1907 "configure"
c906108c
SS
1907#include "confdefs.h"
1908
1909/* Thanks to Mike Haertel and Jim Avera for this test.
1910 Here is a matrix of mmap possibilities:
1911 mmap private not fixed
1912 mmap private fixed at somewhere currently unmapped
1913 mmap private fixed at somewhere already mapped
1914 mmap shared not fixed
1915 mmap shared fixed at somewhere currently unmapped
1916 mmap shared fixed at somewhere already mapped
1917 For private mappings, we should verify that changes cannot be read()
1918 back from the file, nor mmap's back from the file at a different
1919 address. (There have been systems where private was not correctly
1920 implemented like the infamous i386 svr4.0, and systems where the
1921 VM page cache was not coherent with the filesystem buffer cache
1922 like early versions of FreeBSD and possibly contemporary NetBSD.)
1923 For shared mappings, we should conversely verify that changes get
1924 propogated back to all the places they're supposed to be.
1925
1926 Grep wants private fixed already mapped.
1927 The main things grep needs to know about mmap are:
1928 * does it exist and is it safe to write into the mmap'd area
1929 * how to use it (BSD variants) */
1930#include <sys/types.h>
1931#include <fcntl.h>
1932#include <sys/mman.h>
1933
1934/* This mess was copied from the GNU getpagesize.h. */
1935#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1936# ifdef HAVE_UNISTD_H
1937# include <unistd.h>
1938# endif
c906108c
SS
1939
1940/* Assume that all systems that can run configure have sys/param.h. */
1941# ifndef HAVE_SYS_PARAM_H
1942# define HAVE_SYS_PARAM_H 1
1943# endif
1944
1945# ifdef _SC_PAGESIZE
1946# define getpagesize() sysconf(_SC_PAGESIZE)
1947# else /* no _SC_PAGESIZE */
1948# ifdef HAVE_SYS_PARAM_H
1949# include <sys/param.h>
1950# ifdef EXEC_PAGESIZE
1951# define getpagesize() EXEC_PAGESIZE
1952# else /* no EXEC_PAGESIZE */
1953# ifdef NBPG
1954# define getpagesize() NBPG * CLSIZE
1955# ifndef CLSIZE
1956# define CLSIZE 1
1957# endif /* no CLSIZE */
1958# else /* no NBPG */
1959# ifdef NBPC
1960# define getpagesize() NBPC
1961# else /* no NBPC */
1962# ifdef PAGESIZE
1963# define getpagesize() PAGESIZE
1964# endif /* PAGESIZE */
1965# endif /* no NBPC */
1966# endif /* no NBPG */
1967# endif /* no EXEC_PAGESIZE */
1968# else /* no HAVE_SYS_PARAM_H */
1969# define getpagesize() 8192 /* punt totally */
1970# endif /* no HAVE_SYS_PARAM_H */
1971# endif /* no _SC_PAGESIZE */
1972
1973#endif /* no HAVE_GETPAGESIZE */
1974
1975#ifdef __cplusplus
1976extern "C" { void *malloc(unsigned); }
1977#else
1978char *malloc();
1979#endif
1980
1981int
1982main()
1983{
1984 char *data, *data2, *data3;
1985 int i, pagesize;
1986 int fd;
1987
1988 pagesize = getpagesize();
1989
1990 /*
1991 * First, make a file with some known garbage in it.
1992 */
1993 data = malloc(pagesize);
1994 if (!data)
1995 exit(1);
1996 for (i = 0; i < pagesize; ++i)
1997 *(data + i) = rand();
1998 umask(0);
1999 fd = creat("conftestmmap", 0600);
2000 if (fd < 0)
2001 exit(1);
2002 if (write(fd, data, pagesize) != pagesize)
2003 exit(1);
2004 close(fd);
2005
2006 /*
2007 * Next, try to mmap the file at a fixed address which
2008 * already has something else allocated at it. If we can,
2009 * also make sure that we see the same garbage.
2010 */
2011 fd = open("conftestmmap", O_RDWR);
2012 if (fd < 0)
2013 exit(1);
2014 data2 = malloc(2 * pagesize);
2015 if (!data2)
2016 exit(1);
2017 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2018 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2019 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2020 exit(1);
2021 for (i = 0; i < pagesize; ++i)
2022 if (*(data + i) != *(data2 + i))
2023 exit(1);
2024
2025 /*
2026 * Finally, make sure that changes to the mapped area
2027 * do not percolate back to the file as seen by read().
2028 * (This is a bug on some variants of i386 svr4.0.)
2029 */
2030 for (i = 0; i < pagesize; ++i)
2031 *(data2 + i) = *(data2 + i) + 1;
2032 data3 = malloc(pagesize);
2033 if (!data3)
2034 exit(1);
2035 if (read(fd, data3, pagesize) != pagesize)
2036 exit(1);
2037 for (i = 0; i < pagesize; ++i)
2038 if (*(data + i) != *(data3 + i))
2039 exit(1);
2040 close(fd);
2041 unlink("conftestmmap");
2042 exit(0);
2043}
2044
2045EOF
91151a06 2046if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2047then
2048 ac_cv_func_mmap_fixed_mapped=yes
2049else
2050 echo "configure: failed program was:" >&5
2051 cat conftest.$ac_ext >&5
2052 rm -fr conftest*
2053 ac_cv_func_mmap_fixed_mapped=no
2054fi
2055rm -fr conftest*
2056fi
2057
2058fi
2059
2060echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2061if test $ac_cv_func_mmap_fixed_mapped = yes; then
2062 cat >> confdefs.h <<\EOF
2063#define HAVE_MMAP 1
2064EOF
2065
2066fi
2067
2068
2069 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2070unistd.h values.h sys/param.h
2071do
2072ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2073echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 2074echo "configure:2075: checking for $ac_hdr" >&5
c906108c
SS
2075if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2076 echo $ac_n "(cached) $ac_c" 1>&6
2077else
2078 cat > conftest.$ac_ext <<EOF
91151a06 2079#line 2080 "configure"
c906108c
SS
2080#include "confdefs.h"
2081#include <$ac_hdr>
2082EOF
2083ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 2084{ (eval echo configure:2085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2085ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2086if test -z "$ac_err"; then
2087 rm -rf conftest*
2088 eval "ac_cv_header_$ac_safe=yes"
2089else
2090 echo "$ac_err" >&5
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 rm -rf conftest*
2094 eval "ac_cv_header_$ac_safe=no"
2095fi
2096rm -f conftest*
2097fi
2098if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2099 echo "$ac_t""yes" 1>&6
2100 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2101 cat >> confdefs.h <<EOF
2102#define $ac_tr_hdr 1
2103EOF
2104
2105else
2106 echo "$ac_t""no" 1>&6
2107fi
2108done
2109
2110 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2111__argz_count __argz_stringify __argz_next
2112do
2113echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 2114echo "configure:2115: checking for $ac_func" >&5
c906108c
SS
2115if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2116 echo $ac_n "(cached) $ac_c" 1>&6
2117else
2118 cat > conftest.$ac_ext <<EOF
91151a06 2119#line 2120 "configure"
c906108c
SS
2120#include "confdefs.h"
2121/* System header to define __stub macros and hopefully few prototypes,
2122 which can conflict with char $ac_func(); below. */
2123#include <assert.h>
2124/* Override any gcc2 internal prototype to avoid an error. */
2125/* We use char because int might match the return type of a gcc2
2126 builtin and then its argument prototype would still apply. */
2127char $ac_func();
2128
2129int main() {
2130
2131/* The GNU C library defines this for functions which it implements
2132 to always fail with ENOSYS. Some functions are actually named
2133 something starting with __ and the normal name is an alias. */
2134#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2135choke me
2136#else
2137$ac_func();
2138#endif
2139
2140; return 0; }
2141EOF
91151a06 2142if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2143 rm -rf conftest*
2144 eval "ac_cv_func_$ac_func=yes"
2145else
2146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 eval "ac_cv_func_$ac_func=no"
2150fi
2151rm -f conftest*
2152fi
2153
2154if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2155 echo "$ac_t""yes" 1>&6
2156 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2157 cat >> confdefs.h <<EOF
2158#define $ac_tr_func 1
2159EOF
2160
2161else
2162 echo "$ac_t""no" 1>&6
2163fi
2164done
2165
2166
2167 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2168 for ac_func in stpcpy
2169do
2170echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 2171echo "configure:2172: checking for $ac_func" >&5
c906108c
SS
2172if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2173 echo $ac_n "(cached) $ac_c" 1>&6
2174else
2175 cat > conftest.$ac_ext <<EOF
91151a06 2176#line 2177 "configure"
c906108c
SS
2177#include "confdefs.h"
2178/* System header to define __stub macros and hopefully few prototypes,
2179 which can conflict with char $ac_func(); below. */
2180#include <assert.h>
2181/* Override any gcc2 internal prototype to avoid an error. */
2182/* We use char because int might match the return type of a gcc2
2183 builtin and then its argument prototype would still apply. */
2184char $ac_func();
2185
2186int main() {
2187
2188/* The GNU C library defines this for functions which it implements
2189 to always fail with ENOSYS. Some functions are actually named
2190 something starting with __ and the normal name is an alias. */
2191#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2192choke me
2193#else
2194$ac_func();
2195#endif
2196
2197; return 0; }
2198EOF
91151a06 2199if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2200 rm -rf conftest*
2201 eval "ac_cv_func_$ac_func=yes"
2202else
2203 echo "configure: failed program was:" >&5
2204 cat conftest.$ac_ext >&5
2205 rm -rf conftest*
2206 eval "ac_cv_func_$ac_func=no"
2207fi
2208rm -f conftest*
2209fi
2210
2211if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2212 echo "$ac_t""yes" 1>&6
2213 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2214 cat >> confdefs.h <<EOF
2215#define $ac_tr_func 1
2216EOF
2217
2218else
2219 echo "$ac_t""no" 1>&6
2220fi
2221done
2222
2223 fi
2224 if test "${ac_cv_func_stpcpy}" = "yes"; then
2225 cat >> confdefs.h <<\EOF
2226#define HAVE_STPCPY 1
2227EOF
2228
2229 fi
2230
2231 if test $ac_cv_header_locale_h = yes; then
2232 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
91151a06 2233echo "configure:2234: checking for LC_MESSAGES" >&5
c906108c
SS
2234if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2235 echo $ac_n "(cached) $ac_c" 1>&6
2236else
2237 cat > conftest.$ac_ext <<EOF
91151a06 2238#line 2239 "configure"
c906108c
SS
2239#include "confdefs.h"
2240#include <locale.h>
2241int main() {
2242return LC_MESSAGES
2243; return 0; }
2244EOF
91151a06 2245if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2246 rm -rf conftest*
2247 am_cv_val_LC_MESSAGES=yes
2248else
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -rf conftest*
2252 am_cv_val_LC_MESSAGES=no
2253fi
2254rm -f conftest*
2255fi
2256
2257echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2258 if test $am_cv_val_LC_MESSAGES = yes; then
2259 cat >> confdefs.h <<\EOF
2260#define HAVE_LC_MESSAGES 1
2261EOF
2262
2263 fi
2264 fi
2265 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
91151a06 2266echo "configure:2267: checking whether NLS is requested" >&5
c906108c
SS
2267 # Check whether --enable-nls or --disable-nls was given.
2268if test "${enable_nls+set}" = set; then
2269 enableval="$enable_nls"
2270 USE_NLS=$enableval
2271else
2272 USE_NLS=yes
2273fi
2274
2275 echo "$ac_t""$USE_NLS" 1>&6
2276
2277
2278 USE_INCLUDED_LIBINTL=no
2279
2280 if test "$USE_NLS" = "yes"; then
2281 cat >> confdefs.h <<\EOF
2282#define ENABLE_NLS 1
2283EOF
2284
2285 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
91151a06 2286echo "configure:2287: checking whether included gettext is requested" >&5
c906108c
SS
2287 # Check whether --with-included-gettext or --without-included-gettext was given.
2288if test "${with_included_gettext+set}" = set; then
2289 withval="$with_included_gettext"
2290 nls_cv_force_use_gnu_gettext=$withval
2291else
2292 nls_cv_force_use_gnu_gettext=no
2293fi
2294
2295 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2296
2297 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2298 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2299 nls_cv_header_intl=
2300 nls_cv_header_libgt=
2301 CATOBJEXT=NONE
2302
2303 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2304echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
91151a06 2305echo "configure:2306: checking for libintl.h" >&5
c906108c
SS
2306if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2307 echo $ac_n "(cached) $ac_c" 1>&6
2308else
2309 cat > conftest.$ac_ext <<EOF
91151a06 2310#line 2311 "configure"
c906108c
SS
2311#include "confdefs.h"
2312#include <libintl.h>
2313EOF
2314ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 2315{ (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2316ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317if test -z "$ac_err"; then
2318 rm -rf conftest*
2319 eval "ac_cv_header_$ac_safe=yes"
2320else
2321 echo "$ac_err" >&5
2322 echo "configure: failed program was:" >&5
2323 cat conftest.$ac_ext >&5
2324 rm -rf conftest*
2325 eval "ac_cv_header_$ac_safe=no"
2326fi
2327rm -f conftest*
2328fi
2329if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2330 echo "$ac_t""yes" 1>&6
2331 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
91151a06 2332echo "configure:2333: checking for gettext in libc" >&5
c906108c
SS
2333if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2334 echo $ac_n "(cached) $ac_c" 1>&6
2335else
2336 cat > conftest.$ac_ext <<EOF
91151a06 2337#line 2338 "configure"
c906108c
SS
2338#include "confdefs.h"
2339#include <libintl.h>
2340int main() {
2341return (int) gettext ("")
2342; return 0; }
2343EOF
91151a06 2344if { (eval echo configure:2345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2345 rm -rf conftest*
2346 gt_cv_func_gettext_libc=yes
2347else
2348 echo "configure: failed program was:" >&5
2349 cat conftest.$ac_ext >&5
2350 rm -rf conftest*
2351 gt_cv_func_gettext_libc=no
2352fi
2353rm -f conftest*
2354fi
2355
2356echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2357
2358 if test "$gt_cv_func_gettext_libc" != "yes"; then
2359 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
91151a06 2360echo "configure:2361: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2361ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2362if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2363 echo $ac_n "(cached) $ac_c" 1>&6
2364else
2365 ac_save_LIBS="$LIBS"
2366LIBS="-lintl $LIBS"
2367cat > conftest.$ac_ext <<EOF
91151a06 2368#line 2369 "configure"
c906108c
SS
2369#include "confdefs.h"
2370/* Override any gcc2 internal prototype to avoid an error. */
2371/* We use char because int might match the return type of a gcc2
2372 builtin and then its argument prototype would still apply. */
2373char bindtextdomain();
2374
2375int main() {
2376bindtextdomain()
2377; return 0; }
2378EOF
91151a06 2379if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2380 rm -rf conftest*
2381 eval "ac_cv_lib_$ac_lib_var=yes"
2382else
2383 echo "configure: failed program was:" >&5
2384 cat conftest.$ac_ext >&5
2385 rm -rf conftest*
2386 eval "ac_cv_lib_$ac_lib_var=no"
2387fi
2388rm -f conftest*
2389LIBS="$ac_save_LIBS"
2390
2391fi
2392if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2393 echo "$ac_t""yes" 1>&6
2394 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
91151a06 2395echo "configure:2396: checking for gettext in libintl" >&5
c906108c
SS
2396if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2397 echo $ac_n "(cached) $ac_c" 1>&6
2398else
2399 cat > conftest.$ac_ext <<EOF
91151a06 2400#line 2401 "configure"
c906108c
SS
2401#include "confdefs.h"
2402
2403int main() {
2404return (int) gettext ("")
2405; return 0; }
2406EOF
91151a06 2407if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2408 rm -rf conftest*
2409 gt_cv_func_gettext_libintl=yes
2410else
2411 echo "configure: failed program was:" >&5
2412 cat conftest.$ac_ext >&5
2413 rm -rf conftest*
2414 gt_cv_func_gettext_libintl=no
2415fi
2416rm -f conftest*
2417fi
2418
2419echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2420else
2421 echo "$ac_t""no" 1>&6
2422fi
2423
2424 fi
2425
2426 if test "$gt_cv_func_gettext_libc" = "yes" \
2427 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2428 cat >> confdefs.h <<\EOF
2429#define HAVE_GETTEXT 1
2430EOF
2431
2432 # Extract the first word of "msgfmt", so it can be a program name with args.
2433set dummy msgfmt; ac_word=$2
2434echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2435echo "configure:2436: checking for $ac_word" >&5
c906108c
SS
2436if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2437 echo $ac_n "(cached) $ac_c" 1>&6
2438else
2439 case "$MSGFMT" in
2440 /*)
2441 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2442 ;;
2443 *)
2444 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2445 for ac_dir in $PATH; do
2446 test -z "$ac_dir" && ac_dir=.
2447 if test -f $ac_dir/$ac_word; then
2448 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2449 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2450 break
2451 fi
2452 fi
2453 done
2454 IFS="$ac_save_ifs"
2455 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2456 ;;
2457esac
2458fi
2459MSGFMT="$ac_cv_path_MSGFMT"
2460if test -n "$MSGFMT"; then
2461 echo "$ac_t""$MSGFMT" 1>&6
2462else
2463 echo "$ac_t""no" 1>&6
2464fi
2465 if test "$MSGFMT" != "no"; then
2466 for ac_func in dcgettext
2467do
2468echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 2469echo "configure:2470: checking for $ac_func" >&5
c906108c
SS
2470if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2472else
2473 cat > conftest.$ac_ext <<EOF
91151a06 2474#line 2475 "configure"
c906108c
SS
2475#include "confdefs.h"
2476/* System header to define __stub macros and hopefully few prototypes,
2477 which can conflict with char $ac_func(); below. */
2478#include <assert.h>
2479/* Override any gcc2 internal prototype to avoid an error. */
2480/* We use char because int might match the return type of a gcc2
2481 builtin and then its argument prototype would still apply. */
2482char $ac_func();
2483
2484int main() {
2485
2486/* The GNU C library defines this for functions which it implements
2487 to always fail with ENOSYS. Some functions are actually named
2488 something starting with __ and the normal name is an alias. */
2489#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2490choke me
2491#else
2492$ac_func();
2493#endif
2494
2495; return 0; }
2496EOF
91151a06 2497if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2498 rm -rf conftest*
2499 eval "ac_cv_func_$ac_func=yes"
2500else
2501 echo "configure: failed program was:" >&5
2502 cat conftest.$ac_ext >&5
2503 rm -rf conftest*
2504 eval "ac_cv_func_$ac_func=no"
2505fi
2506rm -f conftest*
2507fi
2508
2509if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2510 echo "$ac_t""yes" 1>&6
2511 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2512 cat >> confdefs.h <<EOF
2513#define $ac_tr_func 1
2514EOF
2515
2516else
2517 echo "$ac_t""no" 1>&6
2518fi
2519done
2520
2521 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2522set dummy gmsgfmt; ac_word=$2
2523echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2524echo "configure:2525: checking for $ac_word" >&5
c906108c
SS
2525if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2526 echo $ac_n "(cached) $ac_c" 1>&6
2527else
2528 case "$GMSGFMT" in
2529 /*)
2530 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2531 ;;
2532 ?:/*)
2533 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2534 ;;
2535 *)
2536 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2537 ac_dummy="$PATH"
2538 for ac_dir in $ac_dummy; do
2539 test -z "$ac_dir" && ac_dir=.
2540 if test -f $ac_dir/$ac_word; then
2541 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2542 break
2543 fi
2544 done
2545 IFS="$ac_save_ifs"
2546 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2547 ;;
2548esac
2549fi
2550GMSGFMT="$ac_cv_path_GMSGFMT"
2551if test -n "$GMSGFMT"; then
2552 echo "$ac_t""$GMSGFMT" 1>&6
2553else
2554 echo "$ac_t""no" 1>&6
2555fi
2556
2557 # Extract the first word of "xgettext", so it can be a program name with args.
2558set dummy xgettext; ac_word=$2
2559echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2560echo "configure:2561: checking for $ac_word" >&5
c906108c
SS
2561if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2562 echo $ac_n "(cached) $ac_c" 1>&6
2563else
2564 case "$XGETTEXT" in
2565 /*)
2566 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2567 ;;
2568 *)
2569 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2570 for ac_dir in $PATH; do
2571 test -z "$ac_dir" && ac_dir=.
2572 if test -f $ac_dir/$ac_word; then
2573 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2574 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2575 break
2576 fi
2577 fi
2578 done
2579 IFS="$ac_save_ifs"
2580 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2581 ;;
2582esac
2583fi
2584XGETTEXT="$ac_cv_path_XGETTEXT"
2585if test -n "$XGETTEXT"; then
2586 echo "$ac_t""$XGETTEXT" 1>&6
2587else
2588 echo "$ac_t""no" 1>&6
2589fi
2590
2591 cat > conftest.$ac_ext <<EOF
91151a06 2592#line 2593 "configure"
c906108c
SS
2593#include "confdefs.h"
2594
2595int main() {
2596extern int _nl_msg_cat_cntr;
2597 return _nl_msg_cat_cntr
2598; return 0; }
2599EOF
91151a06 2600if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2601 rm -rf conftest*
2602 CATOBJEXT=.gmo
2603 DATADIRNAME=share
2604else
2605 echo "configure: failed program was:" >&5
2606 cat conftest.$ac_ext >&5
2607 rm -rf conftest*
2608 CATOBJEXT=.mo
2609 DATADIRNAME=lib
2610fi
2611rm -f conftest*
2612 INSTOBJEXT=.mo
2613 fi
2614 fi
2615
2616else
2617 echo "$ac_t""no" 1>&6
2618fi
2619
2620
2621
2622 if test "$CATOBJEXT" = "NONE"; then
2623 nls_cv_use_gnu_gettext=yes
2624 fi
2625 fi
2626
2627 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2628 INTLOBJS="\$(GETTOBJS)"
2629 # Extract the first word of "msgfmt", so it can be a program name with args.
2630set dummy msgfmt; ac_word=$2
2631echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2632echo "configure:2633: checking for $ac_word" >&5
c906108c
SS
2633if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2634 echo $ac_n "(cached) $ac_c" 1>&6
2635else
2636 case "$MSGFMT" in
2637 /*)
2638 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2639 ;;
2640 *)
2641 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2642 for ac_dir in $PATH; do
2643 test -z "$ac_dir" && ac_dir=.
2644 if test -f $ac_dir/$ac_word; then
2645 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2646 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2647 break
2648 fi
2649 fi
2650 done
2651 IFS="$ac_save_ifs"
2652 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2653 ;;
2654esac
2655fi
2656MSGFMT="$ac_cv_path_MSGFMT"
2657if test -n "$MSGFMT"; then
2658 echo "$ac_t""$MSGFMT" 1>&6
2659else
2660 echo "$ac_t""no" 1>&6
2661fi
2662
2663 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2664set dummy gmsgfmt; ac_word=$2
2665echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2666echo "configure:2667: checking for $ac_word" >&5
c906108c
SS
2667if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2668 echo $ac_n "(cached) $ac_c" 1>&6
2669else
2670 case "$GMSGFMT" in
2671 /*)
2672 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2673 ;;
2674 ?:/*)
2675 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2676 ;;
2677 *)
2678 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2679 ac_dummy="$PATH"
2680 for ac_dir in $ac_dummy; do
2681 test -z "$ac_dir" && ac_dir=.
2682 if test -f $ac_dir/$ac_word; then
2683 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2684 break
2685 fi
2686 done
2687 IFS="$ac_save_ifs"
2688 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2689 ;;
2690esac
2691fi
2692GMSGFMT="$ac_cv_path_GMSGFMT"
2693if test -n "$GMSGFMT"; then
2694 echo "$ac_t""$GMSGFMT" 1>&6
2695else
2696 echo "$ac_t""no" 1>&6
2697fi
2698
2699 # Extract the first word of "xgettext", so it can be a program name with args.
2700set dummy xgettext; ac_word=$2
2701echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 2702echo "configure:2703: checking for $ac_word" >&5
c906108c
SS
2703if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2704 echo $ac_n "(cached) $ac_c" 1>&6
2705else
2706 case "$XGETTEXT" in
2707 /*)
2708 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2709 ;;
2710 *)
2711 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2712 for ac_dir in $PATH; do
2713 test -z "$ac_dir" && ac_dir=.
2714 if test -f $ac_dir/$ac_word; then
2715 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2716 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2717 break
2718 fi
2719 fi
2720 done
2721 IFS="$ac_save_ifs"
2722 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2723 ;;
2724esac
2725fi
2726XGETTEXT="$ac_cv_path_XGETTEXT"
2727if test -n "$XGETTEXT"; then
2728 echo "$ac_t""$XGETTEXT" 1>&6
2729else
2730 echo "$ac_t""no" 1>&6
2731fi
2732
2733
2734 USE_INCLUDED_LIBINTL=yes
2735 CATOBJEXT=.gmo
2736 INSTOBJEXT=.mo
2737 DATADIRNAME=share
2738 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2739 INTLLIBS=$INTLDEPS
2740 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2741 nls_cv_header_intl=libintl.h
2742 nls_cv_header_libgt=libgettext.h
2743 fi
2744
2745 if test "$XGETTEXT" != ":"; then
2746 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2747 : ;
2748 else
2749 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2750 XGETTEXT=":"
2751 fi
2752 fi
2753
2754 # We need to process the po/ directory.
2755 POSUB=po
2756 else
2757 DATADIRNAME=share
2758 nls_cv_header_intl=libintl.h
2759 nls_cv_header_libgt=libgettext.h
2760 fi
2761
2762 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2763 # because some of the sources are only built for this goal.
2764 if test "$PACKAGE" = gettext; then
2765 USE_NLS=yes
2766 USE_INCLUDED_LIBINTL=yes
2767 fi
2768
2769 for lang in $ALL_LINGUAS; do
2770 GMOFILES="$GMOFILES $lang.gmo"
2771 POFILES="$POFILES $lang.po"
2772 done
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787 if test "x$CATOBJEXT" != "x"; then
2788 if test "x$ALL_LINGUAS" = "x"; then
2789 LINGUAS=
2790 else
2791 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
91151a06 2792echo "configure:2793: checking for catalogs to be installed" >&5
c906108c
SS
2793 NEW_LINGUAS=
2794 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2795 case "$ALL_LINGUAS" in
2796 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2797 esac
2798 done
2799 LINGUAS=$NEW_LINGUAS
2800 echo "$ac_t""$LINGUAS" 1>&6
2801 fi
2802
2803 if test -n "$LINGUAS"; then
2804 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2805 fi
2806 fi
2807
2808 if test $ac_cv_header_locale_h = yes; then
2809 INCLUDE_LOCALE_H="#include <locale.h>"
2810 else
2811 INCLUDE_LOCALE_H="\
2812/* The system does not provide the header <locale.h>. Take care yourself. */"
2813 fi
2814
2815
2816 if test -f $srcdir/po2tbl.sed.in; then
2817 if test "$CATOBJEXT" = ".cat"; then
2818 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2819echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
91151a06 2820echo "configure:2821: checking for linux/version.h" >&5
c906108c
SS
2821if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
2823else
2824 cat > conftest.$ac_ext <<EOF
91151a06 2825#line 2826 "configure"
c906108c
SS
2826#include "confdefs.h"
2827#include <linux/version.h>
2828EOF
2829ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 2830{ (eval echo configure:2831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2831ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2832if test -z "$ac_err"; then
2833 rm -rf conftest*
2834 eval "ac_cv_header_$ac_safe=yes"
2835else
2836 echo "$ac_err" >&5
2837 echo "configure: failed program was:" >&5
2838 cat conftest.$ac_ext >&5
2839 rm -rf conftest*
2840 eval "ac_cv_header_$ac_safe=no"
2841fi
2842rm -f conftest*
2843fi
2844if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2845 echo "$ac_t""yes" 1>&6
2846 msgformat=linux
2847else
2848 echo "$ac_t""no" 1>&6
2849msgformat=xopen
2850fi
2851
2852
2853 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2854 fi
2855 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2856 $srcdir/po2tbl.sed.in > po2tbl.sed
2857 fi
2858
2859 if test "$PACKAGE" = "gettext"; then
2860 GT_NO="#NO#"
2861 GT_YES=
2862 else
2863 GT_NO=
2864 GT_YES="#YES#"
2865 fi
2866
2867
2868
2869 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2870
2871
2872 l=
2873
2874
4536bbc6 2875 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2876 test -d po || mkdir po
2877 if test "x$srcdir" != "x."; then
2878 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2879 posrcprefix="$srcdir/"
2880 else
2881 posrcprefix="../$srcdir/"
2882 fi
2883 else
2884 posrcprefix="../"
2885 fi
2886 rm -f po/POTFILES
2887 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2888 < $srcdir/po/POTFILES.in > po/POTFILES
2889 fi
2890
0fbb3da7
TT
2891cat >> confdefs.h <<\EOF
2892#define PACKAGE "gdb"
2893EOF
2894
2895
c906108c
SS
2896
2897
2898CONFIG_OBS=
66b965bb 2899CONFIG_LIB_OBS=
c906108c
SS
2900CONFIG_DEPS=
2901CONFIG_SRCS=
fb40c209
AC
2902CONFIG_INITS=
2903ENABLE_CFLAGS=
b3a90332
AC
2904CONFIG_ALL=
2905CONFIG_CLEAN=
e56ac5c3
AC
2906CONFIG_INSTALL=
2907CONFIG_UNINSTALL=
c906108c 2908
ffc6a242 2909SUBDIRS="doc testsuite nlm"
c906108c
SS
2910configdirs="doc testsuite"
2911
96baa820
JM
2912# Check whether --enable-multi-ice or --disable-multi-ice was given.
2913if test "${enable_multi_ice+set}" = set; then
2914 enableval="$enable_multi_ice"
2915 case "${enableval}" in
2916 yes ) enable_multi_ice="yes" ;;
2917 no) enable_multi_ice="no" ;;
2918 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2919 esac
2920
2921fi
2922
2923
2924if test "${enable_multi_ice}" = "yes"; then
2925 configdirs="${configdirs} multi-ice"
2926fi
2927
27e9bf90 2928. $srcdir/configure.host
c906108c 2929
27e9bf90 2930. $srcdir/configure.tgt
c906108c 2931
27e9bf90
MK
2932# Fetch the default architecture and default target vector from BFD.
2933targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2934
27e9bf90
MK
2935# We only want the first architecture, so strip off the others if
2936# there is more than one.
2937targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2938
27e9bf90
MK
2939if test "x$targ_archs" != x; then
2940 cat >> confdefs.h <<EOF
2941#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2942EOF
2943
2944fi
27e9bf90
MK
2945if test "x$targ_defvec" != x; then
2946 cat >> confdefs.h <<EOF
2947#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2948EOF
2949
2950fi
c906108c 2951
8bb2c122
MK
2952if test "$program_transform_name" = s,x,x,; then
2953 program_transform_name=
2954else
2955 # Double any \ or $. echo might interpret backslashes.
2956 cat <<\EOF_SED > conftestsed
2957s,\\,\\\\,g; s,\$,$$,g
2958EOF_SED
2959 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2960 rm -f conftestsed
2961fi
2962test "$program_prefix" != NONE &&
2963 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2964# Use a double $ so make ignores it.
2965test "$program_suffix" != NONE &&
2966 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2967
2968# sed with no file args requires a program.
2969test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2970
2971
627af7ea
MK
2972# The CLI cannot be disabled yet, but may be in the future.
2973
2974# Enable CLI.
2975# Check whether --enable-gdbcli or --disable-gdbcli was given.
2976if test "${enable_gdbcli+set}" = set; then
2977 enableval="$enable_gdbcli"
2978 case $enableval in
2979 yes)
2980 ;;
2981 no)
2982 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2983 *)
2984 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2985 esac
2986else
2987 enable_gdbcli=yes
2988fi
2989
2990if test x"$enable_gdbcli" = xyes; then
2991 if test -d $srcdir/cli; then
2992 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2993 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2994 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2995 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2996 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2997 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
2998 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
2999 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3000 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3001 fi
3002fi
3003
3004# Enable MI.
3005# Check whether --enable-gdbmi or --disable-gdbmi was given.
3006if test "${enable_gdbmi+set}" = set; then
3007 enableval="$enable_gdbmi"
3008 case $enableval in
3009 yes | no)
3010 ;;
3011 *)
3012 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3013 esac
3014else
3015 enable_gdbmi=yes
3016fi
3017
3018if test x"$enable_gdbmi" = xyes; then
3019 if test -d $srcdir/mi; then
3020 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3021 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3022 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3023 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3024 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3025 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3026 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3027 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3028 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3029 fi
3030fi
3031
06825bd1
MK
3032# Enable TUI.
3033# Check whether --enable-tui or --disable-tui was given.
3034if test "${enable_tui+set}" = set; then
3035 enableval="$enable_tui"
3036 case $enableval in
3037 yes | no)
3038 ;;
3039 *)
3040 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3041 esac
3042fi
3043
3044if test x"$enable_tui" = xyes; then
3045 if test -d $srcdir/tui; then
3046 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3047 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3048 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3049 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3050 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3051 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3052 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3053 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3054 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3055 need_curses=yes
3056 fi
3057fi
3058
8bb2c122
MK
3059# --------------------- #
3060# Checks for programs. #
3061# --------------------- #
3062
c41b7eb1 3063for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3064do
3065# Extract the first word of "$ac_prog", so it can be a program name with args.
3066set dummy $ac_prog; ac_word=$2
3067echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3068echo "configure:3069: checking for $ac_word" >&5
7a292a7a
SS
3069if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3070 echo $ac_n "(cached) $ac_c" 1>&6
3071else
3072 if test -n "$AWK"; then
3073 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3074else
3075 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3076 ac_dummy="$PATH"
3077 for ac_dir in $ac_dummy; do
3078 test -z "$ac_dir" && ac_dir=.
3079 if test -f $ac_dir/$ac_word; then
3080 ac_cv_prog_AWK="$ac_prog"
3081 break
3082 fi
3083 done
3084 IFS="$ac_save_ifs"
3085fi
3086fi
3087AWK="$ac_cv_prog_AWK"
3088if test -n "$AWK"; then
3089 echo "$ac_t""$AWK" 1>&6
3090else
3091 echo "$ac_t""no" 1>&6
3092fi
3093
3094test -n "$AWK" && break
3095done
3096
c906108c
SS
3097# Find a good install program. We prefer a C program (faster),
3098# so one script is as good as another. But avoid the broken or
3099# incompatible versions:
3100# SysV /etc/install, /usr/sbin/install
3101# SunOS /usr/etc/install
3102# IRIX /sbin/install
3103# AIX /bin/install
3104# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3105# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3106# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3107# ./install, which can be erroneously created by make from ./install.sh.
3108echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
91151a06 3109echo "configure:3110: checking for a BSD compatible install" >&5
c906108c
SS
3110if test -z "$INSTALL"; then
3111if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3112 echo $ac_n "(cached) $ac_c" 1>&6
3113else
3114 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3115 for ac_dir in $PATH; do
3116 # Account for people who put trailing slashes in PATH elements.
3117 case "$ac_dir/" in
3118 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3119 *)
3120 # OSF1 and SCO ODT 3.0 have their own names for install.
3121 # Don't use installbsd from OSF since it installs stuff as root
3122 # by default.
3123 for ac_prog in ginstall scoinst install; do
3124 if test -f $ac_dir/$ac_prog; then
3125 if test $ac_prog = install &&
3126 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3127 # AIX install. It has an incompatible calling convention.
3128 :
3129 else
3130 ac_cv_path_install="$ac_dir/$ac_prog -c"
3131 break 2
3132 fi
3133 fi
3134 done
3135 ;;
3136 esac
3137 done
3138 IFS="$ac_save_IFS"
3139
3140fi
3141 if test "${ac_cv_path_install+set}" = set; then
3142 INSTALL="$ac_cv_path_install"
3143 else
3144 # As a last resort, use the slow shell script. We don't cache a
3145 # path for INSTALL within a source directory, because that will
3146 # break other packages using the cache if that directory is
3147 # removed, or if the path is relative.
3148 INSTALL="$ac_install_sh"
3149 fi
3150fi
3151echo "$ac_t""$INSTALL" 1>&6
3152
3153# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3154# It thinks the first close brace ends the variable substitution.
3155test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3156
3157test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3158
3159test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3160
8bb2c122 3161echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
91151a06 3162echo "configure:3163: checking whether ln -s works" >&5
8bb2c122
MK
3163if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3164 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3165else
8bb2c122
MK
3166 rm -f conftestdata
3167if ln -s X conftestdata 2>/dev/null
3168then
3169 rm -f conftestdata
3170 ac_cv_prog_LN_S="ln -s"
3171else
3172 ac_cv_prog_LN_S=ln
3173fi
3174fi
3175LN_S="$ac_cv_prog_LN_S"
3176if test "$ac_cv_prog_LN_S" = "ln -s"; then
3177 echo "$ac_t""yes" 1>&6
3178else
3179 echo "$ac_t""no" 1>&6
c906108c
SS
3180fi
3181
8bb2c122
MK
3182# Extract the first word of "ranlib", so it can be a program name with args.
3183set dummy ranlib; ac_word=$2
c906108c 3184echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3185echo "configure:3186: checking for $ac_word" >&5
8bb2c122 3186if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3187 echo $ac_n "(cached) $ac_c" 1>&6
3188else
8bb2c122
MK
3189 if test -n "$RANLIB"; then
3190 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3191else
3192 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195 test -z "$ac_dir" && ac_dir=.
3196 if test -f $ac_dir/$ac_word; then
8bb2c122 3197 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3198 break
3199 fi
3200 done
3201 IFS="$ac_save_ifs"
8bb2c122 3202 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3203fi
3204fi
8bb2c122
MK
3205RANLIB="$ac_cv_prog_RANLIB"
3206if test -n "$RANLIB"; then
3207 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3208else
3209 echo "$ac_t""no" 1>&6
3210fi
3211
8bb2c122
MK
3212for ac_prog in 'bison -y' byacc
3213do
3214# Extract the first word of "$ac_prog", so it can be a program name with args.
3215set dummy $ac_prog; ac_word=$2
c906108c 3216echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3217echo "configure:3218: checking for $ac_word" >&5
8bb2c122 3218if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3219 echo $ac_n "(cached) $ac_c" 1>&6
3220else
8bb2c122
MK
3221 if test -n "$YACC"; then
3222 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3223else
3224 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3225 ac_dummy="$PATH"
3226 for ac_dir in $ac_dummy; do
3227 test -z "$ac_dir" && ac_dir=.
3228 if test -f $ac_dir/$ac_word; then
8bb2c122 3229 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3230 break
3231 fi
3232 done
3233 IFS="$ac_save_ifs"
3234fi
3235fi
8bb2c122
MK
3236YACC="$ac_cv_prog_YACC"
3237if test -n "$YACC"; then
3238 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3239else
3240 echo "$ac_t""no" 1>&6
3241fi
3242
8bb2c122
MK
3243test -n "$YACC" && break
3244done
3245test -n "$YACC" || YACC="yacc"
c906108c 3246
8bb2c122
MK
3247
3248# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3249set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3250echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3251echo "configure:3252: checking for $ac_word" >&5
8bb2c122 3252if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3253 echo $ac_n "(cached) $ac_c" 1>&6
3254else
8bb2c122
MK
3255 if test -n "$AR"; then
3256 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3257else
3258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3259 ac_dummy="$PATH"
3260 for ac_dir in $ac_dummy; do
3261 test -z "$ac_dir" && ac_dir=.
3262 if test -f $ac_dir/$ac_word; then
8bb2c122 3263 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3264 break
3265 fi
3266 done
3267 IFS="$ac_save_ifs"
8bb2c122 3268 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3269fi
3270fi
8bb2c122
MK
3271AR="$ac_cv_prog_AR"
3272if test -n "$AR"; then
3273 echo "$ac_t""$AR" 1>&6
c906108c
SS
3274else
3275 echo "$ac_t""no" 1>&6
3276fi
3277
8bb2c122 3278
c906108c 3279
95ca63c4
CF
3280# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3281set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3282echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3283echo "configure:3284: checking for $ac_word" >&5
95ca63c4
CF
3284if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3285 echo $ac_n "(cached) $ac_c" 1>&6
3286else
3287 if test -n "$DLLTOOL"; then
3288 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3289else
3290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3291 ac_dummy="$PATH"
3292 for ac_dir in $ac_dummy; do
3293 test -z "$ac_dir" && ac_dir=.
3294 if test -f $ac_dir/$ac_word; then
3295 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3296 break
3297 fi
3298 done
3299 IFS="$ac_save_ifs"
3300 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3301fi
3302fi
3303DLLTOOL="$ac_cv_prog_DLLTOOL"
3304if test -n "$DLLTOOL"; then
3305 echo "$ac_t""$DLLTOOL" 1>&6
3306else
3307 echo "$ac_t""no" 1>&6
3308fi
3309
3310
3311
3312# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3313set dummy ${ac_tool_prefix}windres; ac_word=$2
3314echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3315echo "configure:3316: checking for $ac_word" >&5
95ca63c4
CF
3316if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3317 echo $ac_n "(cached) $ac_c" 1>&6
3318else
3319 if test -n "$WINDRES"; then
3320 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3321else
3322 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325 test -z "$ac_dir" && ac_dir=.
3326 if test -f $ac_dir/$ac_word; then
3327 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3328 break
3329 fi
3330 done
3331 IFS="$ac_save_ifs"
3332 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3333fi
3334fi
3335WINDRES="$ac_cv_prog_WINDRES"
3336if test -n "$WINDRES"; then
3337 echo "$ac_t""$WINDRES" 1>&6
3338else
3339 echo "$ac_t""no" 1>&6
3340fi
3341
3342
3343
c906108c 3344
8bb2c122 3345# Needed for GNU/Hurd.
75c6e08a
MK
3346# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3347set dummy ${ac_tool_prefix}mig; ac_word=$2
3348echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
91151a06 3349echo "configure:3350: checking for $ac_word" >&5
75c6e08a
MK
3350if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3351 echo $ac_n "(cached) $ac_c" 1>&6
3352else
3353 if test -n "$MIG"; then
3354 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3355else
3356 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3357 ac_dummy="$PATH"
3358 for ac_dir in $ac_dummy; do
3359 test -z "$ac_dir" && ac_dir=.
3360 if test -f $ac_dir/$ac_word; then
3361 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3362 break
3363 fi
3364 done
3365 IFS="$ac_save_ifs"
3366 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3367fi
3368fi
3369MIG="$ac_cv_prog_MIG"
3370if test -n "$MIG"; then
3371 echo "$ac_t""$MIG" 1>&6
3372else
3373 echo "$ac_t""no" 1>&6
3374fi
3375
3376
3377
3378
9a156167
MK
3379# ---------------------- #
3380# Checks for libraries. #
3381# ---------------------- #
3382
3383# We might need to link with -lm; most simulators need it.
3384echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
91151a06 3385echo "configure:3386: checking for main in -lm" >&5
9a156167
MK
3386ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3387if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3388 echo $ac_n "(cached) $ac_c" 1>&6
3389else
3390 ac_save_LIBS="$LIBS"
3391LIBS="-lm $LIBS"
3392cat > conftest.$ac_ext <<EOF
91151a06 3393#line 3394 "configure"
9a156167
MK
3394#include "confdefs.h"
3395
3396int main() {
3397main()
3398; return 0; }
3399EOF
91151a06 3400if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3401 rm -rf conftest*
3402 eval "ac_cv_lib_$ac_lib_var=yes"
3403else
3404 echo "configure: failed program was:" >&5
3405 cat conftest.$ac_ext >&5
3406 rm -rf conftest*
3407 eval "ac_cv_lib_$ac_lib_var=no"
3408fi
3409rm -f conftest*
3410LIBS="$ac_save_LIBS"
3411
3412fi
3413if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3414 echo "$ac_t""yes" 1>&6
3415 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3416 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3417 cat >> confdefs.h <<EOF
3418#define $ac_tr_lib 1
3419EOF
3420
3421 LIBS="-lm $LIBS"
3422
3423else
3424 echo "$ac_t""no" 1>&6
3425fi
3426
3427
3428# We need to link with -lw to get `wctype' on Solaris before Solaris
3429# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3430# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3431# is known to have this problem). Therefore we avoid libw if we can.
3432echo $ac_n "checking for wctype""... $ac_c" 1>&6
91151a06 3433echo "configure:3434: checking for wctype" >&5
9a156167
MK
3434if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3435 echo $ac_n "(cached) $ac_c" 1>&6
3436else
3437 cat > conftest.$ac_ext <<EOF
91151a06 3438#line 3439 "configure"
9a156167
MK
3439#include "confdefs.h"
3440/* System header to define __stub macros and hopefully few prototypes,
3441 which can conflict with char wctype(); below. */
3442#include <assert.h>
3443/* Override any gcc2 internal prototype to avoid an error. */
3444/* We use char because int might match the return type of a gcc2
3445 builtin and then its argument prototype would still apply. */
3446char wctype();
3447
3448int main() {
3449
3450/* The GNU C library defines this for functions which it implements
3451 to always fail with ENOSYS. Some functions are actually named
3452 something starting with __ and the normal name is an alias. */
3453#if defined (__stub_wctype) || defined (__stub___wctype)
3454choke me
3455#else
3456wctype();
3457#endif
3458
3459; return 0; }
3460EOF
91151a06 3461if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3462 rm -rf conftest*
3463 eval "ac_cv_func_wctype=yes"
3464else
3465 echo "configure: failed program was:" >&5
3466 cat conftest.$ac_ext >&5
3467 rm -rf conftest*
3468 eval "ac_cv_func_wctype=no"
3469fi
3470rm -f conftest*
3471fi
3472
3473if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3474 echo "$ac_t""yes" 1>&6
3475 :
3476else
3477 echo "$ac_t""no" 1>&6
3478echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
91151a06 3479echo "configure:3480: checking for wctype in -lw" >&5
9a156167
MK
3480ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3481if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3482 echo $ac_n "(cached) $ac_c" 1>&6
3483else
3484 ac_save_LIBS="$LIBS"
3485LIBS="-lw $LIBS"
3486cat > conftest.$ac_ext <<EOF
91151a06 3487#line 3488 "configure"
9a156167
MK
3488#include "confdefs.h"
3489/* Override any gcc2 internal prototype to avoid an error. */
3490/* We use char because int might match the return type of a gcc2
3491 builtin and then its argument prototype would still apply. */
3492char wctype();
3493
3494int main() {
3495wctype()
3496; return 0; }
3497EOF
91151a06 3498if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3499 rm -rf conftest*
3500 eval "ac_cv_lib_$ac_lib_var=yes"
3501else
3502 echo "configure: failed program was:" >&5
3503 cat conftest.$ac_ext >&5
3504 rm -rf conftest*
3505 eval "ac_cv_lib_$ac_lib_var=no"
3506fi
3507rm -f conftest*
3508LIBS="$ac_save_LIBS"
3509
3510fi
3511if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3512 echo "$ac_t""yes" 1>&6
3513 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3514 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3515 cat >> confdefs.h <<EOF
3516#define $ac_tr_lib 1
3517EOF
3518
3519 LIBS="-lw $LIBS"
3520
3521else
3522 echo "$ac_t""no" 1>&6
3523fi
3524
3525fi
3526
3527
3528# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3529
3530echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
91151a06 3531echo "configure:3532: checking for library containing socketpair" >&5
9a156167
MK
3532if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3533 echo $ac_n "(cached) $ac_c" 1>&6
3534else
3535 ac_func_search_save_LIBS="$LIBS"
3536ac_cv_search_socketpair="no"
3537cat > conftest.$ac_ext <<EOF
91151a06 3538#line 3539 "configure"
9a156167
MK
3539#include "confdefs.h"
3540/* Override any gcc2 internal prototype to avoid an error. */
3541/* We use char because int might match the return type of a gcc2
3542 builtin and then its argument prototype would still apply. */
3543char socketpair();
3544
3545int main() {
3546socketpair()
3547; return 0; }
3548EOF
91151a06 3549if { (eval echo configure:3550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3550 rm -rf conftest*
3551 ac_cv_search_socketpair="none required"
3552else
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3555fi
3556rm -f conftest*
3557test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3558LIBS="-l$i $ac_func_search_save_LIBS"
3559cat > conftest.$ac_ext <<EOF
91151a06 3560#line 3561 "configure"
9a156167
MK
3561#include "confdefs.h"
3562/* Override any gcc2 internal prototype to avoid an error. */
3563/* We use char because int might match the return type of a gcc2
3564 builtin and then its argument prototype would still apply. */
3565char socketpair();
3566
3567int main() {
3568socketpair()
3569; return 0; }
3570EOF
91151a06 3571if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3572 rm -rf conftest*
3573 ac_cv_search_socketpair="-l$i"
3574break
3575else
3576 echo "configure: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578fi
3579rm -f conftest*
3580done
3581LIBS="$ac_func_search_save_LIBS"
3582fi
3583
3584echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3585if test "$ac_cv_search_socketpair" != "no"; then
3586 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3587
3588else :
3589
3590fi
3591
06825bd1
MK
3592# Since GDB uses Readline, we need termcap functionality, so we need
3593# to find a library that provides that. When GDB is configured with
3594# --enable-tui, we need full curses functionality.
3595#
3596# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3597# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3598# Makefile fragments. That's why we need to have `Hcurses' before
3599# `curses'. I don't see why we should use HP curses if a more
3600# standard curses is available, except that according to HP's
3601# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3602# HP-UX 10.10 and 10.20.
3603
3604if test "$need_curses" = yes; then
3605
3606echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
91151a06 3607echo "configure:3608: checking for library containing initscr" >&5
06825bd1
MK
3608if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3609 echo $ac_n "(cached) $ac_c" 1>&6
3610else
3611 ac_func_search_save_LIBS="$LIBS"
3612ac_cv_search_initscr="no"
3613cat > conftest.$ac_ext <<EOF
91151a06 3614#line 3615 "configure"
06825bd1
MK
3615#include "confdefs.h"
3616/* Override any gcc2 internal prototype to avoid an error. */
3617/* We use char because int might match the return type of a gcc2
3618 builtin and then its argument prototype would still apply. */
3619char initscr();
3620
3621int main() {
3622initscr()
3623; return 0; }
3624EOF
91151a06 3625if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3626 rm -rf conftest*
3627 ac_cv_search_initscr="none required"
3628else
3629 echo "configure: failed program was:" >&5
3630 cat conftest.$ac_ext >&5
3631fi
3632rm -f conftest*
3633test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3634LIBS="-l$i $ac_func_search_save_LIBS"
3635cat > conftest.$ac_ext <<EOF
91151a06 3636#line 3637 "configure"
06825bd1
MK
3637#include "confdefs.h"
3638/* Override any gcc2 internal prototype to avoid an error. */
3639/* We use char because int might match the return type of a gcc2
3640 builtin and then its argument prototype would still apply. */
3641char initscr();
3642
3643int main() {
3644initscr()
3645; return 0; }
3646EOF
91151a06 3647if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3648 rm -rf conftest*
3649 ac_cv_search_initscr="-l$i"
3650break
3651else
3652 echo "configure: failed program was:" >&5
3653 cat conftest.$ac_ext >&5
3654fi
3655rm -f conftest*
3656done
3657LIBS="$ac_func_search_save_LIBS"
3658fi
3659
3660echo "$ac_t""$ac_cv_search_initscr" 1>&6
3661if test "$ac_cv_search_initscr" != "no"; then
3662 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3663
3664else :
3665 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3666fi
3667fi
3668
3669case $host_os in
3670 cygwin*)
3671 if test -d $srcdir/libtermcap; then
3672 LIBS="../libtermcap/libtermcap.a $LIBS"
3673 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3674 fi ;;
3675 go32*)
3676 # ??? Is this really true?
3677 ac_cv_search_tgetent="none required"
3678 ;;
3679 aix*)
3680 # Readline prefers curses over termcap on AIX.
3681 # ??? Why?
3682
3683echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
91151a06 3684echo "configure:3685: checking for library containing tgetent" >&5
06825bd1
MK
3685if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3686 echo $ac_n "(cached) $ac_c" 1>&6
3687else
3688 ac_func_search_save_LIBS="$LIBS"
3689ac_cv_search_tgetent="no"
3690cat > conftest.$ac_ext <<EOF
91151a06 3691#line 3692 "configure"
06825bd1
MK
3692#include "confdefs.h"
3693/* Override any gcc2 internal prototype to avoid an error. */
3694/* We use char because int might match the return type of a gcc2
3695 builtin and then its argument prototype would still apply. */
3696char tgetent();
3697
3698int main() {
3699tgetent()
3700; return 0; }
3701EOF
91151a06 3702if { (eval echo configure:3703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3703 rm -rf conftest*
3704 ac_cv_search_tgetent="none required"
3705else
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3708fi
3709rm -f conftest*
3710test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3711LIBS="-l$i $ac_func_search_save_LIBS"
3712cat > conftest.$ac_ext <<EOF
91151a06 3713#line 3714 "configure"
06825bd1
MK
3714#include "confdefs.h"
3715/* Override any gcc2 internal prototype to avoid an error. */
3716/* We use char because int might match the return type of a gcc2
3717 builtin and then its argument prototype would still apply. */
3718char tgetent();
3719
3720int main() {
3721tgetent()
3722; return 0; }
3723EOF
91151a06 3724if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3725 rm -rf conftest*
3726 ac_cv_search_tgetent="-l$i"
3727break
3728else
3729 echo "configure: failed program was:" >&5
3730 cat conftest.$ac_ext >&5
3731fi
3732rm -f conftest*
3733done
3734LIBS="$ac_func_search_save_LIBS"
3735fi
3736
3737echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3738if test "$ac_cv_search_tgetent" != "no"; then
3739 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3740
3741else :
3742
3743fi
3744 ;;
3745esac
3746
3747# Note: We used to check for libtermlib and libterminfo too, but
3748# Readline doesn't, so I think we're safe with leaving them out.
3749
3750echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
91151a06 3751echo "configure:3752: checking for library containing tgetent" >&5
06825bd1
MK
3752if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3753 echo $ac_n "(cached) $ac_c" 1>&6
3754else
3755 ac_func_search_save_LIBS="$LIBS"
3756ac_cv_search_tgetent="no"
3757cat > conftest.$ac_ext <<EOF
91151a06 3758#line 3759 "configure"
06825bd1
MK
3759#include "confdefs.h"
3760/* Override any gcc2 internal prototype to avoid an error. */
3761/* We use char because int might match the return type of a gcc2
3762 builtin and then its argument prototype would still apply. */
3763char tgetent();
3764
3765int main() {
3766tgetent()
3767; return 0; }
3768EOF
91151a06 3769if { (eval echo configure:3770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3770 rm -rf conftest*
3771 ac_cv_search_tgetent="none required"
3772else
3773 echo "configure: failed program was:" >&5
3774 cat conftest.$ac_ext >&5
3775fi
3776rm -f conftest*
3777test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3778LIBS="-l$i $ac_func_search_save_LIBS"
3779cat > conftest.$ac_ext <<EOF
91151a06 3780#line 3781 "configure"
06825bd1
MK
3781#include "confdefs.h"
3782/* Override any gcc2 internal prototype to avoid an error. */
3783/* We use char because int might match the return type of a gcc2
3784 builtin and then its argument prototype would still apply. */
3785char tgetent();
3786
3787int main() {
3788tgetent()
3789; return 0; }
3790EOF
91151a06 3791if { (eval echo configure:3792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3792 rm -rf conftest*
3793 ac_cv_search_tgetent="-l$i"
3794break
3795else
3796 echo "configure: failed program was:" >&5
3797 cat conftest.$ac_ext >&5
3798fi
3799rm -f conftest*
3800done
3801LIBS="$ac_func_search_save_LIBS"
3802fi
3803
3804echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3805if test "$ac_cv_search_tgetent" != "no"; then
3806 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3807
3808else :
3809
3810fi
3811
3812if test "$ac_cv_search_tgetent" = no; then
3813 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3814fi
3815
5ee754fc
MK
3816# ------------------------- #
3817# Checks for header files. #
3818# ------------------------- #
3819
3820ac_header_dirent=no
3821for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3822do
3823ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3824echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
91151a06 3825echo "configure:3826: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3826if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3827 echo $ac_n "(cached) $ac_c" 1>&6
3828else
3829 cat > conftest.$ac_ext <<EOF
91151a06 3830#line 3831 "configure"
c906108c
SS
3831#include "confdefs.h"
3832#include <sys/types.h>
5ee754fc
MK
3833#include <$ac_hdr>
3834int main() {
3835DIR *dirp = 0;
3836; return 0; }
3837EOF
91151a06 3838if { (eval echo configure:3839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3839 rm -rf conftest*
3840 eval "ac_cv_header_dirent_$ac_safe=yes"
3841else
3842 echo "configure: failed program was:" >&5
3843 cat conftest.$ac_ext >&5
3844 rm -rf conftest*
3845 eval "ac_cv_header_dirent_$ac_safe=no"
3846fi
3847rm -f conftest*
3848fi
3849if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3850 echo "$ac_t""yes" 1>&6
3851 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3852 cat >> confdefs.h <<EOF
3853#define $ac_tr_hdr 1
3854EOF
3855 ac_header_dirent=$ac_hdr; break
3856else
3857 echo "$ac_t""no" 1>&6
3858fi
3859done
3860# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3861if test $ac_header_dirent = dirent.h; then
3862echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
91151a06 3863echo "configure:3864: checking for opendir in -ldir" >&5
5ee754fc
MK
3864ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3865if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3866 echo $ac_n "(cached) $ac_c" 1>&6
3867else
3868 ac_save_LIBS="$LIBS"
3869LIBS="-ldir $LIBS"
3870cat > conftest.$ac_ext <<EOF
91151a06 3871#line 3872 "configure"
5ee754fc
MK
3872#include "confdefs.h"
3873/* Override any gcc2 internal prototype to avoid an error. */
3874/* We use char because int might match the return type of a gcc2
3875 builtin and then its argument prototype would still apply. */
3876char opendir();
c906108c
SS
3877
3878int main() {
5ee754fc 3879opendir()
c906108c
SS
3880; return 0; }
3881EOF
91151a06 3882if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 3883 rm -rf conftest*
5ee754fc 3884 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
3885else
3886 echo "configure: failed program was:" >&5
3887 cat conftest.$ac_ext >&5
3888 rm -rf conftest*
5ee754fc 3889 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
3890fi
3891rm -f conftest*
5ee754fc
MK
3892LIBS="$ac_save_LIBS"
3893
3894fi
3895if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3896 echo "$ac_t""yes" 1>&6
3897 LIBS="$LIBS -ldir"
3898else
3899 echo "$ac_t""no" 1>&6
c906108c
SS
3900fi
3901
5ee754fc
MK
3902else
3903echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
91151a06 3904echo "configure:3905: checking for opendir in -lx" >&5
5ee754fc
MK
3905ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3906if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3907 echo $ac_n "(cached) $ac_c" 1>&6
3908else
3909 ac_save_LIBS="$LIBS"
3910LIBS="-lx $LIBS"
3911cat > conftest.$ac_ext <<EOF
91151a06 3912#line 3913 "configure"
5ee754fc
MK
3913#include "confdefs.h"
3914/* Override any gcc2 internal prototype to avoid an error. */
3915/* We use char because int might match the return type of a gcc2
3916 builtin and then its argument prototype would still apply. */
3917char opendir();
3918
3919int main() {
3920opendir()
3921; return 0; }
c906108c 3922EOF
91151a06 3923if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
3924 rm -rf conftest*
3925 eval "ac_cv_lib_$ac_lib_var=yes"
3926else
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -rf conftest*
3930 eval "ac_cv_lib_$ac_lib_var=no"
3931fi
3932rm -f conftest*
3933LIBS="$ac_save_LIBS"
c906108c 3934
5ee754fc
MK
3935fi
3936if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3937 echo "$ac_t""yes" 1>&6
3938 LIBS="$LIBS -lx"
3939else
3940 echo "$ac_t""no" 1>&6
3941fi
c906108c 3942
5ee754fc 3943fi
c906108c 3944
5ee754fc 3945echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
91151a06 3946echo "configure:3947: checking whether stat file-mode macros are broken" >&5
5ee754fc 3947if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
3948 echo $ac_n "(cached) $ac_c" 1>&6
3949else
3950 cat > conftest.$ac_ext <<EOF
91151a06 3951#line 3952 "configure"
9608ab8b
MK
3952#include "confdefs.h"
3953#include <sys/types.h>
5ee754fc
MK
3954#include <sys/stat.h>
3955
3956#if defined(S_ISBLK) && defined(S_IFDIR)
3957# if S_ISBLK (S_IFDIR)
3958You lose.
3959# endif
3960#endif
3961
3962#if defined(S_ISBLK) && defined(S_IFCHR)
3963# if S_ISBLK (S_IFCHR)
3964You lose.
3965# endif
3966#endif
3967
3968#if defined(S_ISLNK) && defined(S_IFREG)
3969# if S_ISLNK (S_IFREG)
3970You lose.
3971# endif
3972#endif
3973
3974#if defined(S_ISSOCK) && defined(S_IFREG)
3975# if S_ISSOCK (S_IFREG)
3976You lose.
3977# endif
3978#endif
3979
9608ab8b 3980EOF
5ee754fc
MK
3981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 3983 rm -rf conftest*
5ee754fc
MK
3984 ac_cv_header_stat_broken=yes
3985else
3986 rm -rf conftest*
3987 ac_cv_header_stat_broken=no
3988fi
3989rm -f conftest*
3990
3991fi
3992
3993echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3994if test $ac_cv_header_stat_broken = yes; then
3995 cat >> confdefs.h <<\EOF
3996#define STAT_MACROS_BROKEN 1
3997EOF
3998
3999fi
4000
4001echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
91151a06 4002echo "configure:4003: checking for ANSI C header files" >&5
5ee754fc
MK
4003if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4004 echo $ac_n "(cached) $ac_c" 1>&6
4005else
4006 cat > conftest.$ac_ext <<EOF
91151a06 4007#line 4008 "configure"
5ee754fc
MK
4008#include "confdefs.h"
4009#include <stdlib.h>
4010#include <stdarg.h>
4011#include <string.h>
4012#include <float.h>
4013EOF
4014ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4015{ (eval echo configure:4016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4016ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4017if test -z "$ac_err"; then
4018 rm -rf conftest*
4019 ac_cv_header_stdc=yes
4020else
4021 echo "$ac_err" >&5
4022 echo "configure: failed program was:" >&5
4023 cat conftest.$ac_ext >&5
4024 rm -rf conftest*
4025 ac_cv_header_stdc=no
4026fi
4027rm -f conftest*
4028
4029if test $ac_cv_header_stdc = yes; then
4030 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4031cat > conftest.$ac_ext <<EOF
91151a06 4032#line 4033 "configure"
5ee754fc
MK
4033#include "confdefs.h"
4034#include <string.h>
4035EOF
4036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4037 egrep "memchr" >/dev/null 2>&1; then
4038 :
4039else
4040 rm -rf conftest*
4041 ac_cv_header_stdc=no
4042fi
4043rm -f conftest*
4044
4045fi
4046
4047if test $ac_cv_header_stdc = yes; then
4048 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4049cat > conftest.$ac_ext <<EOF
91151a06 4050#line 4051 "configure"
5ee754fc
MK
4051#include "confdefs.h"
4052#include <stdlib.h>
4053EOF
4054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4055 egrep "free" >/dev/null 2>&1; then
4056 :
4057else
4058 rm -rf conftest*
4059 ac_cv_header_stdc=no
4060fi
4061rm -f conftest*
4062
4063fi
4064
4065if test $ac_cv_header_stdc = yes; then
4066 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4067if test "$cross_compiling" = yes; then
4068 :
4069else
4070 cat > conftest.$ac_ext <<EOF
91151a06 4071#line 4072 "configure"
5ee754fc
MK
4072#include "confdefs.h"
4073#include <ctype.h>
4074#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4075#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4076#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4077int main () { int i; for (i = 0; i < 256; i++)
4078if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4079exit (0); }
4080
4081EOF
91151a06 4082if { (eval echo configure:4083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4083then
4084 :
9608ab8b 4085else
5ee754fc
MK
4086 echo "configure: failed program was:" >&5
4087 cat conftest.$ac_ext >&5
4088 rm -fr conftest*
4089 ac_cv_header_stdc=no
4090fi
4091rm -fr conftest*
4092fi
4093
4094fi
4095fi
4096
4097echo "$ac_t""$ac_cv_header_stdc" 1>&6
4098if test $ac_cv_header_stdc = yes; then
4099 cat >> confdefs.h <<\EOF
4100#define STDC_HEADERS 1
4101EOF
4102
4103fi
4104
4105for ac_hdr in link.h
4106do
4107ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4108echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4109echo "configure:4110: checking for $ac_hdr" >&5
5ee754fc
MK
4110if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4111 echo $ac_n "(cached) $ac_c" 1>&6
4112else
4113 cat > conftest.$ac_ext <<EOF
91151a06 4114#line 4115 "configure"
5ee754fc
MK
4115#include "confdefs.h"
4116#include <$ac_hdr>
4117EOF
4118ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4119{ (eval echo configure:4120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4120ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4121if test -z "$ac_err"; then
4122 rm -rf conftest*
4123 eval "ac_cv_header_$ac_safe=yes"
4124else
4125 echo "$ac_err" >&5
4126 echo "configure: failed program was:" >&5
4127 cat conftest.$ac_ext >&5
4128 rm -rf conftest*
4129 eval "ac_cv_header_$ac_safe=no"
4130fi
4131rm -f conftest*
4132fi
4133if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4134 echo "$ac_t""yes" 1>&6
4135 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4136 cat >> confdefs.h <<EOF
4137#define $ac_tr_hdr 1
4138EOF
4139
4140else
4141 echo "$ac_t""no" 1>&6
4142fi
4143done
4144
4145for ac_hdr in nlist.h
4146do
4147ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4148echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4149echo "configure:4150: checking for $ac_hdr" >&5
5ee754fc
MK
4150if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4151 echo $ac_n "(cached) $ac_c" 1>&6
4152else
4153 cat > conftest.$ac_ext <<EOF
91151a06 4154#line 4155 "configure"
5ee754fc
MK
4155#include "confdefs.h"
4156#include <$ac_hdr>
4157EOF
4158ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4159{ (eval echo configure:4160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4160ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4161if test -z "$ac_err"; then
4162 rm -rf conftest*
4163 eval "ac_cv_header_$ac_safe=yes"
4164else
4165 echo "$ac_err" >&5
4166 echo "configure: failed program was:" >&5
4167 cat conftest.$ac_ext >&5
4168 rm -rf conftest*
4169 eval "ac_cv_header_$ac_safe=no"
4170fi
4171rm -f conftest*
4172fi
4173if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4174 echo "$ac_t""yes" 1>&6
4175 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4176 cat >> confdefs.h <<EOF
4177#define $ac_tr_hdr 1
4178EOF
4179
4180else
4181 echo "$ac_t""no" 1>&6
4182fi
4183done
4184
4185for ac_hdr in poll.h sys/poll.h
4186do
4187ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4188echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4189echo "configure:4190: checking for $ac_hdr" >&5
5ee754fc
MK
4190if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4191 echo $ac_n "(cached) $ac_c" 1>&6
4192else
4193 cat > conftest.$ac_ext <<EOF
91151a06 4194#line 4195 "configure"
5ee754fc
MK
4195#include "confdefs.h"
4196#include <$ac_hdr>
4197EOF
4198ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4199{ (eval echo configure:4200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4200ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4201if test -z "$ac_err"; then
4202 rm -rf conftest*
4203 eval "ac_cv_header_$ac_safe=yes"
4204else
4205 echo "$ac_err" >&5
4206 echo "configure: failed program was:" >&5
4207 cat conftest.$ac_ext >&5
4208 rm -rf conftest*
4209 eval "ac_cv_header_$ac_safe=no"
4210fi
4211rm -f conftest*
4212fi
4213if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4214 echo "$ac_t""yes" 1>&6
4215 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4216 cat >> confdefs.h <<EOF
4217#define $ac_tr_hdr 1
4218EOF
4219
4220else
4221 echo "$ac_t""no" 1>&6
4222fi
4223done
4224
4225for ac_hdr in proc_service.h thread_db.h
4226do
4227ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4228echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4229echo "configure:4230: checking for $ac_hdr" >&5
5ee754fc
MK
4230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4231 echo $ac_n "(cached) $ac_c" 1>&6
4232else
4233 cat > conftest.$ac_ext <<EOF
91151a06 4234#line 4235 "configure"
5ee754fc
MK
4235#include "confdefs.h"
4236#include <$ac_hdr>
4237EOF
4238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4239{ (eval echo configure:4240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4241if test -z "$ac_err"; then
4242 rm -rf conftest*
4243 eval "ac_cv_header_$ac_safe=yes"
4244else
4245 echo "$ac_err" >&5
4246 echo "configure: failed program was:" >&5
4247 cat conftest.$ac_ext >&5
4248 rm -rf conftest*
4249 eval "ac_cv_header_$ac_safe=no"
4250fi
4251rm -f conftest*
4252fi
4253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4254 echo "$ac_t""yes" 1>&6
4255 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4256 cat >> confdefs.h <<EOF
4257#define $ac_tr_hdr 1
4258EOF
4259
4260else
4261 echo "$ac_t""no" 1>&6
4262fi
4263done
4264
4265for ac_hdr in stddef.h
4266do
4267ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4268echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4269echo "configure:4270: checking for $ac_hdr" >&5
5ee754fc
MK
4270if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4271 echo $ac_n "(cached) $ac_c" 1>&6
4272else
4273 cat > conftest.$ac_ext <<EOF
91151a06 4274#line 4275 "configure"
5ee754fc
MK
4275#include "confdefs.h"
4276#include <$ac_hdr>
4277EOF
4278ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4279{ (eval echo configure:4280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4280ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4281if test -z "$ac_err"; then
4282 rm -rf conftest*
4283 eval "ac_cv_header_$ac_safe=yes"
4284else
4285 echo "$ac_err" >&5
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -rf conftest*
4289 eval "ac_cv_header_$ac_safe=no"
4290fi
4291rm -f conftest*
4292fi
4293if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4294 echo "$ac_t""yes" 1>&6
4295 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4296 cat >> confdefs.h <<EOF
4297#define $ac_tr_hdr 1
4298EOF
4299
4300else
4301 echo "$ac_t""no" 1>&6
4302fi
4303done
4304
4305for ac_hdr in stdlib.h
4306do
4307ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4308echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4309echo "configure:4310: checking for $ac_hdr" >&5
5ee754fc
MK
4310if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4311 echo $ac_n "(cached) $ac_c" 1>&6
4312else
4313 cat > conftest.$ac_ext <<EOF
91151a06 4314#line 4315 "configure"
5ee754fc
MK
4315#include "confdefs.h"
4316#include <$ac_hdr>
4317EOF
4318ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4319{ (eval echo configure:4320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4320ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4321if test -z "$ac_err"; then
4322 rm -rf conftest*
4323 eval "ac_cv_header_$ac_safe=yes"
4324else
4325 echo "$ac_err" >&5
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
4329 eval "ac_cv_header_$ac_safe=no"
4330fi
4331rm -f conftest*
4332fi
4333if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4334 echo "$ac_t""yes" 1>&6
4335 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4336 cat >> confdefs.h <<EOF
4337#define $ac_tr_hdr 1
4338EOF
4339
4340else
4341 echo "$ac_t""no" 1>&6
4342fi
4343done
4344
4345for ac_hdr in stdint.h
4346do
4347ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4348echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4349echo "configure:4350: checking for $ac_hdr" >&5
5ee754fc
MK
4350if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4351 echo $ac_n "(cached) $ac_c" 1>&6
4352else
4353 cat > conftest.$ac_ext <<EOF
91151a06 4354#line 4355 "configure"
5ee754fc
MK
4355#include "confdefs.h"
4356#include <$ac_hdr>
4357EOF
4358ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4359{ (eval echo configure:4360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4360ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4361if test -z "$ac_err"; then
4362 rm -rf conftest*
4363 eval "ac_cv_header_$ac_safe=yes"
4364else
4365 echo "$ac_err" >&5
4366 echo "configure: failed program was:" >&5
4367 cat conftest.$ac_ext >&5
4368 rm -rf conftest*
4369 eval "ac_cv_header_$ac_safe=no"
4370fi
4371rm -f conftest*
4372fi
4373if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4374 echo "$ac_t""yes" 1>&6
4375 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4376 cat >> confdefs.h <<EOF
4377#define $ac_tr_hdr 1
4378EOF
4379
4380else
4381 echo "$ac_t""no" 1>&6
4382fi
4383done
4384
4385for ac_hdr in string.h memory.h strings.h
4386do
4387ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4388echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4389echo "configure:4390: checking for $ac_hdr" >&5
5ee754fc
MK
4390if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4391 echo $ac_n "(cached) $ac_c" 1>&6
4392else
4393 cat > conftest.$ac_ext <<EOF
91151a06 4394#line 4395 "configure"
5ee754fc
MK
4395#include "confdefs.h"
4396#include <$ac_hdr>
4397EOF
4398ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4399{ (eval echo configure:4400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4400ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4401if test -z "$ac_err"; then
4402 rm -rf conftest*
4403 eval "ac_cv_header_$ac_safe=yes"
4404else
4405 echo "$ac_err" >&5
4406 echo "configure: failed program was:" >&5
4407 cat conftest.$ac_ext >&5
4408 rm -rf conftest*
4409 eval "ac_cv_header_$ac_safe=no"
4410fi
4411rm -f conftest*
4412fi
4413if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4414 echo "$ac_t""yes" 1>&6
4415 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4416 cat >> confdefs.h <<EOF
4417#define $ac_tr_hdr 1
4418EOF
4419
4420else
4421 echo "$ac_t""no" 1>&6
4422fi
4423done
4424
4425for ac_hdr in sys/fault.h
4426do
4427ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4428echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4429echo "configure:4430: checking for $ac_hdr" >&5
5ee754fc
MK
4430if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4431 echo $ac_n "(cached) $ac_c" 1>&6
4432else
4433 cat > conftest.$ac_ext <<EOF
91151a06 4434#line 4435 "configure"
5ee754fc
MK
4435#include "confdefs.h"
4436#include <$ac_hdr>
4437EOF
4438ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4439{ (eval echo configure:4440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4440ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4441if test -z "$ac_err"; then
4442 rm -rf conftest*
4443 eval "ac_cv_header_$ac_safe=yes"
4444else
4445 echo "$ac_err" >&5
4446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4448 rm -rf conftest*
4449 eval "ac_cv_header_$ac_safe=no"
4450fi
4451rm -f conftest*
4452fi
4453if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4454 echo "$ac_t""yes" 1>&6
4455 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4456 cat >> confdefs.h <<EOF
4457#define $ac_tr_hdr 1
4458EOF
4459
4460else
4461 echo "$ac_t""no" 1>&6
4462fi
4463done
4464
4465for ac_hdr in sys/file.h
4466do
4467ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4468echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4469echo "configure:4470: checking for $ac_hdr" >&5
5ee754fc
MK
4470if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4471 echo $ac_n "(cached) $ac_c" 1>&6
4472else
4473 cat > conftest.$ac_ext <<EOF
91151a06 4474#line 4475 "configure"
5ee754fc
MK
4475#include "confdefs.h"
4476#include <$ac_hdr>
4477EOF
4478ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4479{ (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4480ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4481if test -z "$ac_err"; then
4482 rm -rf conftest*
4483 eval "ac_cv_header_$ac_safe=yes"
4484else
4485 echo "$ac_err" >&5
4486 echo "configure: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4488 rm -rf conftest*
4489 eval "ac_cv_header_$ac_safe=no"
4490fi
4491rm -f conftest*
4492fi
4493if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4494 echo "$ac_t""yes" 1>&6
4495 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4496 cat >> confdefs.h <<EOF
4497#define $ac_tr_hdr 1
4498EOF
4499
4500else
4501 echo "$ac_t""no" 1>&6
4502fi
4503done
4504
4505for ac_hdr in sys/filio.h
4506do
4507ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4508echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4509echo "configure:4510: checking for $ac_hdr" >&5
5ee754fc
MK
4510if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4511 echo $ac_n "(cached) $ac_c" 1>&6
4512else
4513 cat > conftest.$ac_ext <<EOF
91151a06 4514#line 4515 "configure"
5ee754fc
MK
4515#include "confdefs.h"
4516#include <$ac_hdr>
4517EOF
4518ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4519{ (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4520ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4521if test -z "$ac_err"; then
4522 rm -rf conftest*
4523 eval "ac_cv_header_$ac_safe=yes"
4524else
4525 echo "$ac_err" >&5
4526 echo "configure: failed program was:" >&5
4527 cat conftest.$ac_ext >&5
4528 rm -rf conftest*
4529 eval "ac_cv_header_$ac_safe=no"
4530fi
4531rm -f conftest*
4532fi
4533if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4534 echo "$ac_t""yes" 1>&6
4535 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4536 cat >> confdefs.h <<EOF
4537#define $ac_tr_hdr 1
4538EOF
4539
4540else
4541 echo "$ac_t""no" 1>&6
4542fi
4543done
4544
4545for ac_hdr in sys/ioctl.h
4546do
4547ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4548echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4549echo "configure:4550: checking for $ac_hdr" >&5
5ee754fc
MK
4550if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4551 echo $ac_n "(cached) $ac_c" 1>&6
4552else
4553 cat > conftest.$ac_ext <<EOF
91151a06 4554#line 4555 "configure"
5ee754fc
MK
4555#include "confdefs.h"
4556#include <$ac_hdr>
4557EOF
4558ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4559{ (eval echo configure:4560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4560ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4561if test -z "$ac_err"; then
4562 rm -rf conftest*
4563 eval "ac_cv_header_$ac_safe=yes"
4564else
4565 echo "$ac_err" >&5
4566 echo "configure: failed program was:" >&5
4567 cat conftest.$ac_ext >&5
4568 rm -rf conftest*
4569 eval "ac_cv_header_$ac_safe=no"
4570fi
4571rm -f conftest*
4572fi
4573if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4574 echo "$ac_t""yes" 1>&6
4575 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4576 cat >> confdefs.h <<EOF
4577#define $ac_tr_hdr 1
4578EOF
4579
4580else
4581 echo "$ac_t""no" 1>&6
4582fi
4583done
4584
4585for ac_hdr in sys/param.h
4586do
4587ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4588echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4589echo "configure:4590: checking for $ac_hdr" >&5
5ee754fc
MK
4590if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4591 echo $ac_n "(cached) $ac_c" 1>&6
4592else
4593 cat > conftest.$ac_ext <<EOF
91151a06 4594#line 4595 "configure"
5ee754fc
MK
4595#include "confdefs.h"
4596#include <$ac_hdr>
4597EOF
4598ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4599{ (eval echo configure:4600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4600ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4601if test -z "$ac_err"; then
4602 rm -rf conftest*
4603 eval "ac_cv_header_$ac_safe=yes"
4604else
4605 echo "$ac_err" >&5
4606 echo "configure: failed program was:" >&5
4607 cat conftest.$ac_ext >&5
4608 rm -rf conftest*
4609 eval "ac_cv_header_$ac_safe=no"
4610fi
4611rm -f conftest*
4612fi
4613if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4614 echo "$ac_t""yes" 1>&6
4615 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4616 cat >> confdefs.h <<EOF
4617#define $ac_tr_hdr 1
4618EOF
4619
4620else
4621 echo "$ac_t""no" 1>&6
4622fi
4623done
4624
4625for ac_hdr in sys/proc.h
4626do
4627ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4628echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4629echo "configure:4630: checking for $ac_hdr" >&5
5ee754fc
MK
4630if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4632else
4633 cat > conftest.$ac_ext <<EOF
91151a06 4634#line 4635 "configure"
5ee754fc
MK
4635#include "confdefs.h"
4636#include <$ac_hdr>
4637EOF
4638ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4639{ (eval echo configure:4640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4640ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4641if test -z "$ac_err"; then
4642 rm -rf conftest*
4643 eval "ac_cv_header_$ac_safe=yes"
4644else
4645 echo "$ac_err" >&5
4646 echo "configure: failed program was:" >&5
4647 cat conftest.$ac_ext >&5
4648 rm -rf conftest*
4649 eval "ac_cv_header_$ac_safe=no"
4650fi
4651rm -f conftest*
4652fi
4653if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4654 echo "$ac_t""yes" 1>&6
4655 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4656 cat >> confdefs.h <<EOF
4657#define $ac_tr_hdr 1
4658EOF
4659
4660else
4661 echo "$ac_t""no" 1>&6
4662fi
4663done
4664
4665for ac_hdr in sys/procfs.h
4666do
4667ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4668echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4669echo "configure:4670: checking for $ac_hdr" >&5
5ee754fc
MK
4670if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4671 echo $ac_n "(cached) $ac_c" 1>&6
4672else
4673 cat > conftest.$ac_ext <<EOF
91151a06 4674#line 4675 "configure"
5ee754fc
MK
4675#include "confdefs.h"
4676#include <$ac_hdr>
4677EOF
4678ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4679{ (eval echo configure:4680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4680ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4681if test -z "$ac_err"; then
4682 rm -rf conftest*
4683 eval "ac_cv_header_$ac_safe=yes"
4684else
4685 echo "$ac_err" >&5
4686 echo "configure: failed program was:" >&5
4687 cat conftest.$ac_ext >&5
4688 rm -rf conftest*
4689 eval "ac_cv_header_$ac_safe=no"
4690fi
4691rm -f conftest*
4692fi
4693if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4694 echo "$ac_t""yes" 1>&6
4695 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4696 cat >> confdefs.h <<EOF
4697#define $ac_tr_hdr 1
4698EOF
4699
4700else
4701 echo "$ac_t""no" 1>&6
4702fi
4703done
4704
4705for ac_hdr in sys/ptrace.h ptrace.h
4706do
4707ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4708echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4709echo "configure:4710: checking for $ac_hdr" >&5
5ee754fc
MK
4710if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4711 echo $ac_n "(cached) $ac_c" 1>&6
4712else
4713 cat > conftest.$ac_ext <<EOF
91151a06 4714#line 4715 "configure"
5ee754fc
MK
4715#include "confdefs.h"
4716#include <$ac_hdr>
4717EOF
4718ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4719{ (eval echo configure:4720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4720ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4721if test -z "$ac_err"; then
4722 rm -rf conftest*
4723 eval "ac_cv_header_$ac_safe=yes"
4724else
4725 echo "$ac_err" >&5
4726 echo "configure: failed program was:" >&5
4727 cat conftest.$ac_ext >&5
4728 rm -rf conftest*
4729 eval "ac_cv_header_$ac_safe=no"
4730fi
4731rm -f conftest*
4732fi
4733if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4734 echo "$ac_t""yes" 1>&6
4735 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4736 cat >> confdefs.h <<EOF
4737#define $ac_tr_hdr 1
4738EOF
4739
4740else
4741 echo "$ac_t""no" 1>&6
4742fi
4743done
4744
4745for ac_hdr in sys/reg.h sys/debugreg.h
4746do
4747ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4748echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4749echo "configure:4750: checking for $ac_hdr" >&5
5ee754fc
MK
4750if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4751 echo $ac_n "(cached) $ac_c" 1>&6
4752else
4753 cat > conftest.$ac_ext <<EOF
91151a06 4754#line 4755 "configure"
5ee754fc
MK
4755#include "confdefs.h"
4756#include <$ac_hdr>
4757EOF
4758ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4759{ (eval echo configure:4760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4760ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4761if test -z "$ac_err"; then
4762 rm -rf conftest*
4763 eval "ac_cv_header_$ac_safe=yes"
4764else
4765 echo "$ac_err" >&5
4766 echo "configure: failed program was:" >&5
4767 cat conftest.$ac_ext >&5
4768 rm -rf conftest*
4769 eval "ac_cv_header_$ac_safe=no"
4770fi
4771rm -f conftest*
4772fi
4773if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4774 echo "$ac_t""yes" 1>&6
4775 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4776 cat >> confdefs.h <<EOF
4777#define $ac_tr_hdr 1
4778EOF
4779
4780else
4781 echo "$ac_t""no" 1>&6
4782fi
4783done
4784
4785for ac_hdr in sys/select.h
4786do
4787ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4788echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4789echo "configure:4790: checking for $ac_hdr" >&5
5ee754fc
MK
4790if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4791 echo $ac_n "(cached) $ac_c" 1>&6
4792else
4793 cat > conftest.$ac_ext <<EOF
91151a06 4794#line 4795 "configure"
5ee754fc
MK
4795#include "confdefs.h"
4796#include <$ac_hdr>
4797EOF
4798ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4799{ (eval echo configure:4800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4800ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4801if test -z "$ac_err"; then
4802 rm -rf conftest*
4803 eval "ac_cv_header_$ac_safe=yes"
4804else
4805 echo "$ac_err" >&5
4806 echo "configure: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4808 rm -rf conftest*
4809 eval "ac_cv_header_$ac_safe=no"
4810fi
4811rm -f conftest*
4812fi
4813if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4814 echo "$ac_t""yes" 1>&6
4815 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4816 cat >> confdefs.h <<EOF
4817#define $ac_tr_hdr 1
4818EOF
4819
4820else
4821 echo "$ac_t""no" 1>&6
4822fi
4823done
4824
4825for ac_hdr in sys/syscall.h
4826do
4827ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4828echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4829echo "configure:4830: checking for $ac_hdr" >&5
5ee754fc
MK
4830if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4831 echo $ac_n "(cached) $ac_c" 1>&6
4832else
4833 cat > conftest.$ac_ext <<EOF
91151a06 4834#line 4835 "configure"
5ee754fc
MK
4835#include "confdefs.h"
4836#include <$ac_hdr>
4837EOF
4838ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4839{ (eval echo configure:4840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4840ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4841if test -z "$ac_err"; then
4842 rm -rf conftest*
4843 eval "ac_cv_header_$ac_safe=yes"
4844else
4845 echo "$ac_err" >&5
4846 echo "configure: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 rm -rf conftest*
4849 eval "ac_cv_header_$ac_safe=no"
4850fi
4851rm -f conftest*
4852fi
4853if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4854 echo "$ac_t""yes" 1>&6
4855 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4856 cat >> confdefs.h <<EOF
4857#define $ac_tr_hdr 1
4858EOF
4859
4860else
4861 echo "$ac_t""no" 1>&6
4862fi
4863done
4864
4865for ac_hdr in sys/user.h
4866do
4867ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4868echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4869echo "configure:4870: checking for $ac_hdr" >&5
5ee754fc
MK
4870if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4871 echo $ac_n "(cached) $ac_c" 1>&6
4872else
4873 cat > conftest.$ac_ext <<EOF
91151a06 4874#line 4875 "configure"
5ee754fc
MK
4875#include "confdefs.h"
4876#include <$ac_hdr>
4877EOF
4878ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4879{ (eval echo configure:4880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4880ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4881if test -z "$ac_err"; then
4882 rm -rf conftest*
4883 eval "ac_cv_header_$ac_safe=yes"
4884else
4885 echo "$ac_err" >&5
4886 echo "configure: failed program was:" >&5
4887 cat conftest.$ac_ext >&5
4888 rm -rf conftest*
4889 eval "ac_cv_header_$ac_safe=no"
4890fi
4891rm -f conftest*
4892fi
4893if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4894 echo "$ac_t""yes" 1>&6
4895 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4896 cat >> confdefs.h <<EOF
4897#define $ac_tr_hdr 1
4898EOF
4899
4900else
4901 echo "$ac_t""no" 1>&6
4902fi
4903done
4904
4905for ac_hdr in sys/wait.h wait.h
4906do
4907ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4908echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4909echo "configure:4910: checking for $ac_hdr" >&5
5ee754fc
MK
4910if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4911 echo $ac_n "(cached) $ac_c" 1>&6
4912else
4913 cat > conftest.$ac_ext <<EOF
91151a06 4914#line 4915 "configure"
5ee754fc
MK
4915#include "confdefs.h"
4916#include <$ac_hdr>
4917EOF
4918ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4919{ (eval echo configure:4920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4920ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4921if test -z "$ac_err"; then
4922 rm -rf conftest*
4923 eval "ac_cv_header_$ac_safe=yes"
4924else
4925 echo "$ac_err" >&5
9608ab8b
MK
4926 echo "configure: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4928 rm -rf conftest*
5ee754fc 4929 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4930fi
4931rm -f conftest*
4932fi
5ee754fc 4933if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
4934 echo "$ac_t""yes" 1>&6
4935 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4936 cat >> confdefs.h <<EOF
4937#define $ac_tr_hdr 1
4938EOF
5ee754fc 4939
9608ab8b
MK
4940else
4941 echo "$ac_t""no" 1>&6
4942fi
4943done
5ee754fc
MK
4944
4945for ac_hdr in termios.h termio.h sgtty.h
4946do
4947ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4948echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4949echo "configure:4950: checking for $ac_hdr" >&5
5ee754fc 4950if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4951 echo $ac_n "(cached) $ac_c" 1>&6
4952else
5ee754fc 4953 cat > conftest.$ac_ext <<EOF
91151a06 4954#line 4955 "configure"
9608ab8b 4955#include "confdefs.h"
5ee754fc 4956#include <$ac_hdr>
9608ab8b 4957EOF
5ee754fc 4958ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4959{ (eval echo configure:4960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4960ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4961if test -z "$ac_err"; then
9608ab8b 4962 rm -rf conftest*
5ee754fc 4963 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 4964else
5ee754fc 4965 echo "$ac_err" >&5
9608ab8b
MK
4966 echo "configure: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968 rm -rf conftest*
5ee754fc 4969 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
4970fi
4971rm -f conftest*
9608ab8b 4972fi
5ee754fc 4973if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 4974 echo "$ac_t""yes" 1>&6
5ee754fc
MK
4975 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4976 cat >> confdefs.h <<EOF
4977#define $ac_tr_hdr 1
4978EOF
4979
9608ab8b
MK
4980else
4981 echo "$ac_t""no" 1>&6
4982fi
5ee754fc 4983done
9608ab8b 4984
5ee754fc
MK
4985for ac_hdr in unistd.h
4986do
4987ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4988echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 4989echo "configure:4990: checking for $ac_hdr" >&5
5ee754fc 4990if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
4991 echo $ac_n "(cached) $ac_c" 1>&6
4992else
5ee754fc 4993 cat > conftest.$ac_ext <<EOF
91151a06 4994#line 4995 "configure"
9608ab8b 4995#include "confdefs.h"
5ee754fc 4996#include <$ac_hdr>
9608ab8b 4997EOF
5ee754fc 4998ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 4999{ (eval echo configure:5000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5000ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5001if test -z "$ac_err"; then
9608ab8b 5002 rm -rf conftest*
5ee754fc 5003 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5004else
5ee754fc 5005 echo "$ac_err" >&5
9608ab8b
MK
5006 echo "configure: failed program was:" >&5
5007 cat conftest.$ac_ext >&5
5008 rm -rf conftest*
5ee754fc 5009 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5010fi
5011rm -f conftest*
9608ab8b 5012fi
5ee754fc 5013if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5014 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5015 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5016 cat >> confdefs.h <<EOF
5017#define $ac_tr_hdr 1
5018EOF
5019
9608ab8b
MK
5020else
5021 echo "$ac_t""no" 1>&6
5022fi
5ee754fc 5023done
9608ab8b 5024
9608ab8b 5025
5ee754fc
MK
5026# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5027# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5028# think that we don't have <curses.h> if we're using GCC.
5029case $host_os in
5030 solaris2.[78])
5031 if test "$GCC" = yes; then
5032 cat >> confdefs.h <<\EOF
5033#define _MSE_INT_H 1
5034EOF
5035
5036 fi ;;
5037esac
5038for ac_hdr in curses.h ncurses.h term.h
5039do
5040ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5041echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 5042echo "configure:5043: checking for $ac_hdr" >&5
5ee754fc 5043if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5044 echo $ac_n "(cached) $ac_c" 1>&6
5045else
5046 cat > conftest.$ac_ext <<EOF
91151a06 5047#line 5048 "configure"
c906108c 5048#include "confdefs.h"
5ee754fc 5049#include <$ac_hdr>
c906108c
SS
5050EOF
5051ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 5052{ (eval echo configure:5053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5053ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5054if test -z "$ac_err"; then
5055 rm -rf conftest*
5ee754fc 5056 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5057else
5058 echo "$ac_err" >&5
5059 echo "configure: failed program was:" >&5
5060 cat conftest.$ac_ext >&5
5061 rm -rf conftest*
5ee754fc 5062 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5063fi
5064rm -f conftest*
c906108c 5065fi
5ee754fc
MK
5066if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5067 echo "$ac_t""yes" 1>&6
5068 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5069 cat >> confdefs.h <<EOF
5070#define $ac_tr_hdr 1
c906108c 5071EOF
5ee754fc 5072
c906108c 5073else
5ee754fc 5074 echo "$ac_t""no" 1>&6
c906108c 5075fi
5ee754fc 5076done
c906108c
SS
5077
5078
5ee754fc
MK
5079# FIXME: kettenis/20030102: In most cases we include these
5080# unconditionally, so what's the point in checking these?
5081for ac_hdr in ctype.h time.h
c906108c
SS
5082do
5083ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5084echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 5085echo "configure:5086: checking for $ac_hdr" >&5
c906108c
SS
5086if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5087 echo $ac_n "(cached) $ac_c" 1>&6
5088else
5089 cat > conftest.$ac_ext <<EOF
91151a06 5090#line 5091 "configure"
c906108c
SS
5091#include "confdefs.h"
5092#include <$ac_hdr>
5093EOF
5094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 5095{ (eval echo configure:5096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5097if test -z "$ac_err"; then
5098 rm -rf conftest*
5099 eval "ac_cv_header_$ac_safe=yes"
5100else
5101 echo "$ac_err" >&5
5102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5104 rm -rf conftest*
5105 eval "ac_cv_header_$ac_safe=no"
5106fi
5107rm -f conftest*
5108fi
5109if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5110 echo "$ac_t""yes" 1>&6
5111 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5112 cat >> confdefs.h <<EOF
5113#define $ac_tr_hdr 1
5114EOF
5115
5116else
5117 echo "$ac_t""no" 1>&6
5118fi
5119done
5120
5ee754fc
MK
5121
5122# ------------------ #
5123# Checks for types. #
5124# ------------------ #
5125
5126echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
91151a06 5127echo "configure:5128: checking return type of signal handlers" >&5
5ee754fc 5128if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5129 echo $ac_n "(cached) $ac_c" 1>&6
5130else
5131 cat > conftest.$ac_ext <<EOF
91151a06 5132#line 5133 "configure"
c906108c
SS
5133#include "confdefs.h"
5134#include <sys/types.h>
5ee754fc
MK
5135#include <signal.h>
5136#ifdef signal
5137#undef signal
c906108c 5138#endif
5ee754fc
MK
5139#ifdef __cplusplus
5140extern "C" void (*signal (int, void (*)(int)))(int);
5141#else
5142void (*signal ()) ();
c906108c
SS
5143#endif
5144
5ee754fc
MK
5145int main() {
5146int i;
5147; return 0; }
c906108c 5148EOF
91151a06 5149if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5150 rm -rf conftest*
5ee754fc 5151 ac_cv_type_signal=void
c906108c 5152else
5ee754fc
MK
5153 echo "configure: failed program was:" >&5
5154 cat conftest.$ac_ext >&5
c906108c 5155 rm -rf conftest*
5ee754fc 5156 ac_cv_type_signal=int
c906108c
SS
5157fi
5158rm -f conftest*
c906108c
SS
5159fi
5160
5ee754fc
MK
5161echo "$ac_t""$ac_cv_type_signal" 1>&6
5162cat >> confdefs.h <<EOF
5163#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5164EOF
5165
c906108c
SS
5166
5167
5ee754fc
MK
5168# ------------------------------------- #
5169# Checks for compiler characteristics. #
5170# ------------------------------------- #
5171
c906108c 5172echo $ac_n "checking for working const""... $ac_c" 1>&6
91151a06 5173echo "configure:5174: checking for working const" >&5
c906108c
SS
5174if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5175 echo $ac_n "(cached) $ac_c" 1>&6
5176else
5177 cat > conftest.$ac_ext <<EOF
91151a06 5178#line 5179 "configure"
c906108c
SS
5179#include "confdefs.h"
5180
5181int main() {
5182
5183/* Ultrix mips cc rejects this. */
5184typedef int charset[2]; const charset x;
5185/* SunOS 4.1.1 cc rejects this. */
5186char const *const *ccp;
5187char **p;
5188/* NEC SVR4.0.2 mips cc rejects this. */
5189struct point {int x, y;};
5190static struct point const zero = {0,0};
5191/* AIX XL C 1.02.0.0 rejects this.
5192 It does not let you subtract one const X* pointer from another in an arm
5193 of an if-expression whose if-part is not a constant expression */
5194const char *g = "string";
5195ccp = &g + (g ? g-g : 0);
5196/* HPUX 7.0 cc rejects these. */
5197++ccp;
5198p = (char**) ccp;
5199ccp = (char const *const *) p;
5200{ /* SCO 3.2v4 cc rejects this. */
5201 char *t;
5202 char const *s = 0 ? (char *) 0 : (char const *) 0;
5203
5204 *t++ = 0;
5205}
5206{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5207 int x[] = {25, 17};
5208 const int *foo = &x[0];
5209 ++foo;
5210}
5211{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5212 typedef const int *iptr;
5213 iptr p = 0;
5214 ++p;
5215}
5216{ /* AIX XL C 1.02.0.0 rejects this saying
5217 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5218 struct s { int j; const int *ap[3]; };
5219 struct s *b; b->j = 5;
5220}
5221{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5222 const int foo = 10;
5223}
5224
5225; return 0; }
5226EOF
91151a06 5227if { (eval echo configure:5228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5228 rm -rf conftest*
5229 ac_cv_c_const=yes
5230else
5231 echo "configure: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233 rm -rf conftest*
5234 ac_cv_c_const=no
5235fi
5236rm -f conftest*
5237fi
5238
5239echo "$ac_t""$ac_cv_c_const" 1>&6
5240if test $ac_cv_c_const = no; then
5241 cat >> confdefs.h <<\EOF
5242#define const
5243EOF
5244
5245fi
5246
bce58c09 5247echo $ac_n "checking for inline""... $ac_c" 1>&6
91151a06 5248echo "configure:5249: checking for inline" >&5
bce58c09
JB
5249if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5250 echo $ac_n "(cached) $ac_c" 1>&6
5251else
5252 ac_cv_c_inline=no
5253for ac_kw in inline __inline__ __inline; do
5254 cat > conftest.$ac_ext <<EOF
91151a06 5255#line 5256 "configure"
bce58c09
JB
5256#include "confdefs.h"
5257
5258int main() {
5259} $ac_kw foo() {
5260; return 0; }
5261EOF
91151a06 5262if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5263 rm -rf conftest*
5264 ac_cv_c_inline=$ac_kw; break
5265else
5266 echo "configure: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5268fi
5269rm -f conftest*
5270done
5271
5272fi
5273
5274echo "$ac_t""$ac_cv_c_inline" 1>&6
5275case "$ac_cv_c_inline" in
5276 inline | yes) ;;
5277 no) cat >> confdefs.h <<\EOF
5278#define inline
5279EOF
5280 ;;
5281 *) cat >> confdefs.h <<EOF
5282#define inline $ac_cv_c_inline
5283EOF
5284 ;;
5285esac
5286
c906108c 5287
5ee754fc
MK
5288# ------------------------------ #
5289# Checks for library functions. #
5290# ------------------------------ #
5291
46711df8
MK
5292# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5293# for constant arguments. Useless!
5294echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
91151a06 5295echo "configure:5296: checking for working alloca.h" >&5
46711df8
MK
5296if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298else
5299 cat > conftest.$ac_ext <<EOF
91151a06 5300#line 5301 "configure"
46711df8
MK
5301#include "confdefs.h"
5302#include <alloca.h>
5303int main() {
5304char *p = alloca(2 * sizeof(int));
5305; return 0; }
5306EOF
91151a06 5307if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5308 rm -rf conftest*
5309 ac_cv_header_alloca_h=yes
5310else
5311 echo "configure: failed program was:" >&5
5312 cat conftest.$ac_ext >&5
5313 rm -rf conftest*
5314 ac_cv_header_alloca_h=no
5315fi
5316rm -f conftest*
5317fi
5318
5319echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5320if test $ac_cv_header_alloca_h = yes; then
5321 cat >> confdefs.h <<\EOF
5322#define HAVE_ALLOCA_H 1
5323EOF
5324
5325fi
5326
5327echo $ac_n "checking for alloca""... $ac_c" 1>&6
91151a06 5328echo "configure:5329: checking for alloca" >&5
46711df8
MK
5329if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5330 echo $ac_n "(cached) $ac_c" 1>&6
5331else
5332 cat > conftest.$ac_ext <<EOF
91151a06 5333#line 5334 "configure"
46711df8
MK
5334#include "confdefs.h"
5335
5336#ifdef __GNUC__
5337# define alloca __builtin_alloca
5338#else
5339# ifdef _MSC_VER
5340# include <malloc.h>
5341# define alloca _alloca
5342# else
5343# if HAVE_ALLOCA_H
5344# include <alloca.h>
5345# else
5346# ifdef _AIX
5347 #pragma alloca
5348# else
5349# ifndef alloca /* predefined by HP cc +Olibcalls */
5350char *alloca ();
5351# endif
5352# endif
5353# endif
5354# endif
5355#endif
5356
5357int main() {
5358char *p = (char *) alloca(1);
5359; return 0; }
5360EOF
91151a06 5361if { (eval echo configure:5362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5362 rm -rf conftest*
5363 ac_cv_func_alloca_works=yes
5364else
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5367 rm -rf conftest*
5368 ac_cv_func_alloca_works=no
5369fi
5370rm -f conftest*
5371fi
5372
5373echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5374if test $ac_cv_func_alloca_works = yes; then
5375 cat >> confdefs.h <<\EOF
5376#define HAVE_ALLOCA 1
5377EOF
5378
5379fi
5380
5381if test $ac_cv_func_alloca_works = no; then
5382 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5383 # that cause trouble. Some versions do not even contain alloca or
5384 # contain a buggy version. If you still want to use their alloca,
5385 # use ar to extract alloca.o from them instead of compiling alloca.c.
5386 ALLOCA=alloca.${ac_objext}
5387 cat >> confdefs.h <<\EOF
5388#define C_ALLOCA 1
5389EOF
5390
5391
5392echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
91151a06 5393echo "configure:5394: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5394if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5395 echo $ac_n "(cached) $ac_c" 1>&6
5396else
5397 cat > conftest.$ac_ext <<EOF
91151a06 5398#line 5399 "configure"
46711df8
MK
5399#include "confdefs.h"
5400#if defined(CRAY) && ! defined(CRAY2)
5401webecray
5402#else
5403wenotbecray
5404#endif
5405
5406EOF
5407if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5408 egrep "webecray" >/dev/null 2>&1; then
5409 rm -rf conftest*
5410 ac_cv_os_cray=yes
5411else
5412 rm -rf conftest*
5413 ac_cv_os_cray=no
5414fi
5415rm -f conftest*
5416
5417fi
5418
5419echo "$ac_t""$ac_cv_os_cray" 1>&6
5420if test $ac_cv_os_cray = yes; then
5421for ac_func in _getb67 GETB67 getb67; do
5422 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 5423echo "configure:5424: checking for $ac_func" >&5
46711df8
MK
5424if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5425 echo $ac_n "(cached) $ac_c" 1>&6
5426else
5427 cat > conftest.$ac_ext <<EOF
91151a06 5428#line 5429 "configure"
46711df8
MK
5429#include "confdefs.h"
5430/* System header to define __stub macros and hopefully few prototypes,
5431 which can conflict with char $ac_func(); below. */
5432#include <assert.h>
5433/* Override any gcc2 internal prototype to avoid an error. */
5434/* We use char because int might match the return type of a gcc2
5435 builtin and then its argument prototype would still apply. */
5436char $ac_func();
5437
5438int main() {
5439
5440/* The GNU C library defines this for functions which it implements
5441 to always fail with ENOSYS. Some functions are actually named
5442 something starting with __ and the normal name is an alias. */
5443#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5444choke me
5445#else
5446$ac_func();
5447#endif
5448
5449; return 0; }
5450EOF
91151a06 5451if { (eval echo configure:5452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5452 rm -rf conftest*
5453 eval "ac_cv_func_$ac_func=yes"
5454else
5455 echo "configure: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
5457 rm -rf conftest*
5458 eval "ac_cv_func_$ac_func=no"
5459fi
5460rm -f conftest*
5461fi
5462
5463if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5464 echo "$ac_t""yes" 1>&6
5465 cat >> confdefs.h <<EOF
5466#define CRAY_STACKSEG_END $ac_func
5467EOF
5468
5469 break
5470else
5471 echo "$ac_t""no" 1>&6
5472fi
5473
5474done
5475fi
5476
5477echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
91151a06 5478echo "configure:5479: checking stack direction for C alloca" >&5
46711df8
MK
5479if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481else
5482 if test "$cross_compiling" = yes; then
5483 ac_cv_c_stack_direction=0
5484else
5485 cat > conftest.$ac_ext <<EOF
91151a06 5486#line 5487 "configure"
46711df8
MK
5487#include "confdefs.h"
5488find_stack_direction ()
5489{
5490 static char *addr = 0;
5491 auto char dummy;
5492 if (addr == 0)
5493 {
5494 addr = &dummy;
5495 return find_stack_direction ();
5496 }
5497 else
5498 return (&dummy > addr) ? 1 : -1;
5499}
5500main ()
5501{
5502 exit (find_stack_direction() < 0);
5503}
5504EOF
91151a06 5505if { (eval echo configure:5506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5506then
5507 ac_cv_c_stack_direction=1
5508else
5509 echo "configure: failed program was:" >&5
5510 cat conftest.$ac_ext >&5
5511 rm -fr conftest*
5512 ac_cv_c_stack_direction=-1
5513fi
5514rm -fr conftest*
5515fi
5516
5517fi
5518
5519echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5520cat >> confdefs.h <<EOF
5521#define STACK_DIRECTION $ac_cv_c_stack_direction
5522EOF
5523
5524fi
5525
97bf5e38
MK
5526for ac_hdr in unistd.h
5527do
5528ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5529echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
91151a06 5530echo "configure:5531: checking for $ac_hdr" >&5
74c1b268
AC
5531if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5532 echo $ac_n "(cached) $ac_c" 1>&6
5533else
5534 cat > conftest.$ac_ext <<EOF
91151a06 5535#line 5536 "configure"
74c1b268 5536#include "confdefs.h"
97bf5e38 5537#include <$ac_hdr>
74c1b268
AC
5538EOF
5539ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 5540{ (eval echo configure:5541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5541ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5542if test -z "$ac_err"; then
5543 rm -rf conftest*
5544 eval "ac_cv_header_$ac_safe=yes"
5545else
5546 echo "$ac_err" >&5
5547 echo "configure: failed program was:" >&5
5548 cat conftest.$ac_ext >&5
5549 rm -rf conftest*
5550 eval "ac_cv_header_$ac_safe=no"
5551fi
5552rm -f conftest*
5553fi
5554if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5555 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5556 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5557 cat >> confdefs.h <<EOF
5558#define $ac_tr_hdr 1
74c1b268 5559EOF
97bf5e38 5560
74c1b268
AC
5561else
5562 echo "$ac_t""no" 1>&6
5563fi
97bf5e38 5564done
74c1b268 5565
97bf5e38
MK
5566for ac_func in getpagesize
5567do
5568echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 5569echo "configure:5570: checking for $ac_func" >&5
97bf5e38 5570if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5571 echo $ac_n "(cached) $ac_c" 1>&6
5572else
5573 cat > conftest.$ac_ext <<EOF
91151a06 5574#line 5575 "configure"
74c1b268
AC
5575#include "confdefs.h"
5576/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5577 which can conflict with char $ac_func(); below. */
74c1b268
AC
5578#include <assert.h>
5579/* Override any gcc2 internal prototype to avoid an error. */
5580/* We use char because int might match the return type of a gcc2
5581 builtin and then its argument prototype would still apply. */
97bf5e38 5582char $ac_func();
74c1b268
AC
5583
5584int main() {
5585
5586/* The GNU C library defines this for functions which it implements
5587 to always fail with ENOSYS. Some functions are actually named
5588 something starting with __ and the normal name is an alias. */
97bf5e38 5589#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5590choke me
5591#else
97bf5e38 5592$ac_func();
74c1b268
AC
5593#endif
5594
5595; return 0; }
5596EOF
91151a06 5597if { (eval echo configure:5598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5598 rm -rf conftest*
97bf5e38 5599 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5600else
5601 echo "configure: failed program was:" >&5
5602 cat conftest.$ac_ext >&5
5603 rm -rf conftest*
97bf5e38 5604 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5605fi
5606rm -f conftest*
5607fi
5608
97bf5e38 5609if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5610 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5611 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5612 cat >> confdefs.h <<EOF
5613#define $ac_tr_func 1
5614EOF
5615
74c1b268
AC
5616else
5617 echo "$ac_t""no" 1>&6
5618fi
97bf5e38 5619done
74c1b268 5620
97bf5e38 5621echo $ac_n "checking for working mmap""... $ac_c" 1>&6
91151a06 5622echo "configure:5623: checking for working mmap" >&5
97bf5e38
MK
5623if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5624 echo $ac_n "(cached) $ac_c" 1>&6
5625else
5626 if test "$cross_compiling" = yes; then
5627 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5628else
5629 cat > conftest.$ac_ext <<EOF
91151a06 5630#line 5631 "configure"
74c1b268 5631#include "confdefs.h"
97bf5e38
MK
5632
5633/* Thanks to Mike Haertel and Jim Avera for this test.
5634 Here is a matrix of mmap possibilities:
5635 mmap private not fixed
5636 mmap private fixed at somewhere currently unmapped
5637 mmap private fixed at somewhere already mapped
5638 mmap shared not fixed
5639 mmap shared fixed at somewhere currently unmapped
5640 mmap shared fixed at somewhere already mapped
5641 For private mappings, we should verify that changes cannot be read()
5642 back from the file, nor mmap's back from the file at a different
5643 address. (There have been systems where private was not correctly
5644 implemented like the infamous i386 svr4.0, and systems where the
5645 VM page cache was not coherent with the filesystem buffer cache
5646 like early versions of FreeBSD and possibly contemporary NetBSD.)
5647 For shared mappings, we should conversely verify that changes get
5648 propogated back to all the places they're supposed to be.
5649
5650 Grep wants private fixed already mapped.
5651 The main things grep needs to know about mmap are:
5652 * does it exist and is it safe to write into the mmap'd area
5653 * how to use it (BSD variants) */
74c1b268 5654#include <sys/types.h>
97bf5e38
MK
5655#include <fcntl.h>
5656#include <sys/mman.h>
5657
5658/* This mess was copied from the GNU getpagesize.h. */
5659#ifndef HAVE_GETPAGESIZE
5660# ifdef HAVE_UNISTD_H
5661# include <unistd.h>
5662# endif
5663
5664/* Assume that all systems that can run configure have sys/param.h. */
5665# ifndef HAVE_SYS_PARAM_H
5666# define HAVE_SYS_PARAM_H 1
5667# endif
5668
5669# ifdef _SC_PAGESIZE
5670# define getpagesize() sysconf(_SC_PAGESIZE)
5671# else /* no _SC_PAGESIZE */
5672# ifdef HAVE_SYS_PARAM_H
5673# include <sys/param.h>
5674# ifdef EXEC_PAGESIZE
5675# define getpagesize() EXEC_PAGESIZE
5676# else /* no EXEC_PAGESIZE */
5677# ifdef NBPG
5678# define getpagesize() NBPG * CLSIZE
5679# ifndef CLSIZE
5680# define CLSIZE 1
5681# endif /* no CLSIZE */
5682# else /* no NBPG */
5683# ifdef NBPC
5684# define getpagesize() NBPC
5685# else /* no NBPC */
5686# ifdef PAGESIZE
5687# define getpagesize() PAGESIZE
5688# endif /* PAGESIZE */
5689# endif /* no NBPC */
5690# endif /* no NBPG */
5691# endif /* no EXEC_PAGESIZE */
5692# else /* no HAVE_SYS_PARAM_H */
5693# define getpagesize() 8192 /* punt totally */
5694# endif /* no HAVE_SYS_PARAM_H */
5695# endif /* no _SC_PAGESIZE */
5696
5697#endif /* no HAVE_GETPAGESIZE */
5698
74c1b268 5699#ifdef __cplusplus
97bf5e38 5700extern "C" { void *malloc(unsigned); }
74c1b268 5701#else
97bf5e38 5702char *malloc();
74c1b268 5703#endif
74c1b268 5704
97bf5e38
MK
5705int
5706main()
5707{
5708 char *data, *data2, *data3;
5709 int i, pagesize;
5710 int fd;
74c1b268 5711
97bf5e38 5712 pagesize = getpagesize();
74c1b268 5713
97bf5e38
MK
5714 /*
5715 * First, make a file with some known garbage in it.
5716 */
5717 data = malloc(pagesize);
5718 if (!data)
5719 exit(1);
5720 for (i = 0; i < pagesize; ++i)
5721 *(data + i) = rand();
5722 umask(0);
5723 fd = creat("conftestmmap", 0600);
5724 if (fd < 0)
5725 exit(1);
5726 if (write(fd, data, pagesize) != pagesize)
5727 exit(1);
5728 close(fd);
74c1b268 5729
97bf5e38
MK
5730 /*
5731 * Next, try to mmap the file at a fixed address which
5732 * already has something else allocated at it. If we can,
5733 * also make sure that we see the same garbage.
5734 */
5735 fd = open("conftestmmap", O_RDWR);
5736 if (fd < 0)
5737 exit(1);
5738 data2 = malloc(2 * pagesize);
5739 if (!data2)
5740 exit(1);
5741 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5742 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5743 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5744 exit(1);
5745 for (i = 0; i < pagesize; ++i)
5746 if (*(data + i) != *(data2 + i))
5747 exit(1);
74c1b268 5748
97bf5e38
MK
5749 /*
5750 * Finally, make sure that changes to the mapped area
5751 * do not percolate back to the file as seen by read().
5752 * (This is a bug on some variants of i386 svr4.0.)
5753 */
5754 for (i = 0; i < pagesize; ++i)
5755 *(data2 + i) = *(data2 + i) + 1;
5756 data3 = malloc(pagesize);
5757 if (!data3)
5758 exit(1);
5759 if (read(fd, data3, pagesize) != pagesize)
5760 exit(1);
5761 for (i = 0; i < pagesize; ++i)
5762 if (*(data + i) != *(data3 + i))
5763 exit(1);
5764 close(fd);
5765 unlink("conftestmmap");
5766 exit(0);
74c1b268 5767}
97bf5e38 5768
74c1b268 5769EOF
91151a06 5770if { (eval echo configure:5771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5771then
97bf5e38 5772 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5773else
5774 echo "configure: failed program was:" >&5
5775 cat conftest.$ac_ext >&5
5776 rm -fr conftest*
97bf5e38 5777 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5778fi
5779rm -fr conftest*
5780fi
5781
5782fi
5783
97bf5e38
MK
5784echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5785if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5786 cat >> confdefs.h <<\EOF
97bf5e38 5787#define HAVE_MMAP 1
74c1b268
AC
5788EOF
5789
5790fi
5791
97bf5e38 5792echo $ac_n "checking for pid_t""... $ac_c" 1>&6
91151a06 5793echo "configure:5794: checking for pid_t" >&5
97bf5e38 5794if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5795 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5796else
5797 cat > conftest.$ac_ext <<EOF
91151a06 5798#line 5799 "configure"
0200359f 5799#include "confdefs.h"
97bf5e38
MK
5800#include <sys/types.h>
5801#if STDC_HEADERS
5802#include <stdlib.h>
5803#include <stddef.h>
0200359f 5804#endif
0200359f 5805EOF
97bf5e38
MK
5806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5807 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5808 rm -rf conftest*
5809 ac_cv_type_pid_t=yes
0200359f 5810else
97bf5e38
MK
5811 rm -rf conftest*
5812 ac_cv_type_pid_t=no
0200359f 5813fi
97bf5e38 5814rm -f conftest*
0200359f
MK
5815
5816fi
97bf5e38
MK
5817echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5818if test $ac_cv_type_pid_t = no; then
0200359f 5819 cat >> confdefs.h <<\EOF
97bf5e38 5820#define pid_t int
0200359f
MK
5821EOF
5822
5823fi
5824
97bf5e38
MK
5825ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5826echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
91151a06 5827echo "configure:5828: checking for vfork.h" >&5
97bf5e38 5828if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5829 echo $ac_n "(cached) $ac_c" 1>&6
5830else
5831 cat > conftest.$ac_ext <<EOF
91151a06 5832#line 5833 "configure"
72473524 5833#include "confdefs.h"
97bf5e38 5834#include <vfork.h>
72473524 5835EOF
97bf5e38 5836ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 5837{ (eval echo configure:5838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5838ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5839if test -z "$ac_err"; then
72473524 5840 rm -rf conftest*
97bf5e38 5841 eval "ac_cv_header_$ac_safe=yes"
72473524 5842else
97bf5e38 5843 echo "$ac_err" >&5
72473524
DJ
5844 echo "configure: failed program was:" >&5
5845 cat conftest.$ac_ext >&5
5846 rm -rf conftest*
97bf5e38 5847 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5848fi
5849rm -f conftest*
5850fi
97bf5e38
MK
5851if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5852 echo "$ac_t""yes" 1>&6
72473524 5853 cat >> confdefs.h <<\EOF
97bf5e38 5854#define HAVE_VFORK_H 1
72473524
DJ
5855EOF
5856
97bf5e38
MK
5857else
5858 echo "$ac_t""no" 1>&6
72473524 5859fi
c906108c 5860
97bf5e38 5861echo $ac_n "checking for working vfork""... $ac_c" 1>&6
91151a06 5862echo "configure:5863: checking for working vfork" >&5
97bf5e38
MK
5863if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5864 echo $ac_n "(cached) $ac_c" 1>&6
5865else
5866 if test "$cross_compiling" = yes; then
5867 echo $ac_n "checking for vfork""... $ac_c" 1>&6
91151a06 5868echo "configure:5869: checking for vfork" >&5
97bf5e38 5869if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
5870 echo $ac_n "(cached) $ac_c" 1>&6
5871else
5872 cat > conftest.$ac_ext <<EOF
91151a06 5873#line 5874 "configure"
2b2d558c 5874#include "confdefs.h"
97bf5e38
MK
5875/* System header to define __stub macros and hopefully few prototypes,
5876 which can conflict with char vfork(); below. */
5877#include <assert.h>
5878/* Override any gcc2 internal prototype to avoid an error. */
5879/* We use char because int might match the return type of a gcc2
5880 builtin and then its argument prototype would still apply. */
5881char vfork();
2b2d558c
MK
5882
5883int main() {
97bf5e38
MK
5884
5885/* The GNU C library defines this for functions which it implements
5886 to always fail with ENOSYS. Some functions are actually named
5887 something starting with __ and the normal name is an alias. */
5888#if defined (__stub_vfork) || defined (__stub___vfork)
5889choke me
5890#else
5891vfork();
5892#endif
5893
2b2d558c
MK
5894; return 0; }
5895EOF
91151a06 5896if { (eval echo configure:5897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 5897 rm -rf conftest*
97bf5e38 5898 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
5899else
5900 echo "configure: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 rm -rf conftest*
97bf5e38 5903 eval "ac_cv_func_vfork=no"
2b2d558c
MK
5904fi
5905rm -f conftest*
5906fi
5907
97bf5e38
MK
5908if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5909 echo "$ac_t""yes" 1>&6
5910 :
5911else
5912 echo "$ac_t""no" 1>&6
2b2d558c
MK
5913fi
5914
97bf5e38 5915ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
5916else
5917 cat > conftest.$ac_ext <<EOF
91151a06 5918#line 5919 "configure"
7dfa765c 5919#include "confdefs.h"
97bf5e38
MK
5920/* Thanks to Paul Eggert for this test. */
5921#include <stdio.h>
5922#include <sys/types.h>
5923#include <sys/stat.h>
5924#ifdef HAVE_UNISTD_H
5925#include <unistd.h>
5926#endif
5927#ifdef HAVE_VFORK_H
5928#include <vfork.h>
5929#endif
5930/* On some sparc systems, changes by the child to local and incoming
5931 argument registers are propagated back to the parent.
5932 The compiler is told about this with #include <vfork.h>,
5933 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5934 Test for this by using a static variable whose address
5935 is put into a register that is clobbered by the vfork. */
5936static
5937#ifdef __cplusplus
5938sparc_address_test (int arg)
5939#else
5940sparc_address_test (arg) int arg;
5941#endif
5942{
5943 static pid_t child;
5944 if (!child) {
5945 child = vfork ();
5946 if (child < 0) {
5947 perror ("vfork");
5948 _exit(2);
5949 }
5950 if (!child) {
5951 arg = getpid();
5952 write(-1, "", 0);
5953 _exit (arg);
5954 }
5955 }
5956}
5957main() {
5958 pid_t parent = getpid ();
5959 pid_t child;
7dfa765c 5960
97bf5e38 5961 sparc_address_test ();
7dfa765c 5962
97bf5e38 5963 child = vfork ();
7dfa765c 5964
97bf5e38
MK
5965 if (child == 0) {
5966 /* Here is another test for sparc vfork register problems.
5967 This test uses lots of local variables, at least
5968 as many local variables as main has allocated so far
5969 including compiler temporaries. 4 locals are enough for
5970 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5971 A buggy compiler should reuse the register of parent
5972 for one of the local variables, since it will think that
5973 parent can't possibly be used any more in this routine.
5974 Assigning to the local variable will thus munge parent
5975 in the parent process. */
5976 pid_t
5977 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5978 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5979 /* Convince the compiler that p..p7 are live; otherwise, it might
5980 use the same hardware register for all 8 local variables. */
5981 if (p != p1 || p != p2 || p != p3 || p != p4
5982 || p != p5 || p != p6 || p != p7)
5983 _exit(1);
7dfa765c 5984
97bf5e38
MK
5985 /* On some systems (e.g. IRIX 3.3),
5986 vfork doesn't separate parent from child file descriptors.
5987 If the child closes a descriptor before it execs or exits,
5988 this munges the parent's descriptor as well.
5989 Test for this by closing stdout in the child. */
5990 _exit(close(fileno(stdout)) != 0);
5991 } else {
5992 int status;
5993 struct stat st;
64bb1671 5994
97bf5e38
MK
5995 while (wait(&status) != child)
5996 ;
5997 exit(
5998 /* Was there some problem with vforking? */
5999 child < 0
64bb1671 6000
97bf5e38
MK
6001 /* Did the child fail? (This shouldn't happen.) */
6002 || status
64bb1671 6003
97bf5e38
MK
6004 /* Did the vfork/compiler bug occur? */
6005 || parent != getpid()
6006
6007 /* Did the file descriptor bug occur? */
6008 || fstat(fileno(stdout), &st) != 0
6009 );
6010 }
6011}
5c44784c 6012EOF
91151a06 6013if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6014then
6015 ac_cv_func_vfork_works=yes
5c44784c
JM
6016else
6017 echo "configure: failed program was:" >&5
6018 cat conftest.$ac_ext >&5
97bf5e38
MK
6019 rm -fr conftest*
6020 ac_cv_func_vfork_works=no
5c44784c 6021fi
97bf5e38 6022rm -fr conftest*
5c44784c
JM
6023fi
6024
0afdd437
MK
6025fi
6026
97bf5e38
MK
6027echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6028if test $ac_cv_func_vfork_works = no; then
0afdd437 6029 cat >> confdefs.h <<\EOF
97bf5e38 6030#define vfork fork
0afdd437
MK
6031EOF
6032
6033fi
6034
97bf5e38
MK
6035for ac_func in canonicalize_file_name realpath
6036do
6037echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6038echo "configure:6039: checking for $ac_func" >&5
97bf5e38 6039if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6040 echo $ac_n "(cached) $ac_c" 1>&6
6041else
6042 cat > conftest.$ac_ext <<EOF
91151a06 6043#line 6044 "configure"
7e89e357 6044#include "confdefs.h"
97bf5e38
MK
6045/* System header to define __stub macros and hopefully few prototypes,
6046 which can conflict with char $ac_func(); below. */
6047#include <assert.h>
6048/* Override any gcc2 internal prototype to avoid an error. */
6049/* We use char because int might match the return type of a gcc2
6050 builtin and then its argument prototype would still apply. */
6051char $ac_func();
6052
7e89e357 6053int main() {
97bf5e38
MK
6054
6055/* The GNU C library defines this for functions which it implements
6056 to always fail with ENOSYS. Some functions are actually named
6057 something starting with __ and the normal name is an alias. */
6058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6059choke me
6060#else
6061$ac_func();
6062#endif
6063
7e89e357
JT
6064; return 0; }
6065EOF
91151a06 6066if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6067 rm -rf conftest*
97bf5e38 6068 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6069else
6070 echo "configure: failed program was:" >&5
6071 cat conftest.$ac_ext >&5
6072 rm -rf conftest*
97bf5e38 6073 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6074fi
6075rm -f conftest*
6076fi
6077
97bf5e38
MK
6078if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6079 echo "$ac_t""yes" 1>&6
6080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6081 cat >> confdefs.h <<EOF
6082#define $ac_tr_func 1
7e89e357 6083EOF
97bf5e38
MK
6084
6085else
6086 echo "$ac_t""no" 1>&6
7e89e357 6087fi
97bf5e38 6088done
7e89e357 6089
97bf5e38 6090for ac_func in poll
7be570e7
JM
6091do
6092echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6093echo "configure:6094: checking for $ac_func" >&5
7be570e7
JM
6094if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6095 echo $ac_n "(cached) $ac_c" 1>&6
6096else
6097 cat > conftest.$ac_ext <<EOF
91151a06 6098#line 6099 "configure"
7be570e7
JM
6099#include "confdefs.h"
6100/* System header to define __stub macros and hopefully few prototypes,
6101 which can conflict with char $ac_func(); below. */
6102#include <assert.h>
6103/* Override any gcc2 internal prototype to avoid an error. */
6104/* We use char because int might match the return type of a gcc2
6105 builtin and then its argument prototype would still apply. */
6106char $ac_func();
6107
6108int main() {
6109
6110/* The GNU C library defines this for functions which it implements
6111 to always fail with ENOSYS. Some functions are actually named
6112 something starting with __ and the normal name is an alias. */
6113#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6114choke me
6115#else
6116$ac_func();
6117#endif
6118
6119; return 0; }
6120EOF
91151a06 6121if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6122 rm -rf conftest*
6123 eval "ac_cv_func_$ac_func=yes"
6124else
6125 echo "configure: failed program was:" >&5
6126 cat conftest.$ac_ext >&5
6127 rm -rf conftest*
6128 eval "ac_cv_func_$ac_func=no"
6129fi
6130rm -f conftest*
6131fi
6132
6133if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6134 echo "$ac_t""yes" 1>&6
6135 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6136 cat >> confdefs.h <<EOF
6137#define $ac_tr_func 1
6138EOF
6139
6140else
6141 echo "$ac_t""no" 1>&6
6142fi
6143done
6144
97bf5e38
MK
6145for ac_func in sbrk
6146do
6147echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6148echo "configure:6149: checking for $ac_func" >&5
97bf5e38 6149if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6150 echo $ac_n "(cached) $ac_c" 1>&6
6151else
6152 cat > conftest.$ac_ext <<EOF
91151a06 6153#line 6154 "configure"
c906108c 6154#include "confdefs.h"
97bf5e38
MK
6155/* System header to define __stub macros and hopefully few prototypes,
6156 which can conflict with char $ac_func(); below. */
6157#include <assert.h>
6158/* Override any gcc2 internal prototype to avoid an error. */
6159/* We use char because int might match the return type of a gcc2
6160 builtin and then its argument prototype would still apply. */
6161char $ac_func();
c906108c 6162
97bf5e38
MK
6163int main() {
6164
6165/* The GNU C library defines this for functions which it implements
6166 to always fail with ENOSYS. Some functions are actually named
6167 something starting with __ and the normal name is an alias. */
6168#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6169choke me
c906108c 6170#else
97bf5e38 6171$ac_func();
c906108c 6172#endif
97bf5e38 6173
c906108c
SS
6174; return 0; }
6175EOF
91151a06 6176if { (eval echo configure:6177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6177 rm -rf conftest*
97bf5e38 6178 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6179else
6180 echo "configure: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182 rm -rf conftest*
97bf5e38 6183 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6184fi
6185rm -f conftest*
6186fi
6187
97bf5e38
MK
6188if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6189 echo "$ac_t""yes" 1>&6
6190 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6191 cat >> confdefs.h <<EOF
6192#define $ac_tr_func 1
c906108c 6193EOF
97bf5e38
MK
6194
6195else
6196 echo "$ac_t""no" 1>&6
c906108c 6197fi
97bf5e38 6198done
c906108c 6199
97bf5e38
MK
6200for ac_func in setpgid setpgrp
6201do
6202echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6203echo "configure:6204: checking for $ac_func" >&5
97bf5e38 6204if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6205 echo $ac_n "(cached) $ac_c" 1>&6
6206else
6207 cat > conftest.$ac_ext <<EOF
91151a06 6208#line 6209 "configure"
c906108c 6209#include "confdefs.h"
97bf5e38
MK
6210/* System header to define __stub macros and hopefully few prototypes,
6211 which can conflict with char $ac_func(); below. */
6212#include <assert.h>
6213/* Override any gcc2 internal prototype to avoid an error. */
6214/* We use char because int might match the return type of a gcc2
6215 builtin and then its argument prototype would still apply. */
6216char $ac_func();
c906108c 6217
97bf5e38
MK
6218int main() {
6219
6220/* The GNU C library defines this for functions which it implements
6221 to always fail with ENOSYS. Some functions are actually named
6222 something starting with __ and the normal name is an alias. */
6223#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6224choke me
c906108c 6225#else
97bf5e38 6226$ac_func();
c906108c 6227#endif
97bf5e38 6228
c906108c
SS
6229; return 0; }
6230EOF
91151a06 6231if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6232 rm -rf conftest*
97bf5e38 6233 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6234else
6235 echo "configure: failed program was:" >&5
6236 cat conftest.$ac_ext >&5
6237 rm -rf conftest*
97bf5e38 6238 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6239fi
6240rm -f conftest*
6241fi
6242
97bf5e38
MK
6243if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6244 echo "$ac_t""yes" 1>&6
6245 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6246 cat >> confdefs.h <<EOF
6247#define $ac_tr_func 1
c906108c 6248EOF
97bf5e38
MK
6249
6250else
6251 echo "$ac_t""no" 1>&6
c906108c 6252fi
97bf5e38 6253done
c906108c 6254
e1ea1d75 6255for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6256do
6257echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6258echo "configure:6259: checking for $ac_func" >&5
97bf5e38 6259if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6260 echo $ac_n "(cached) $ac_c" 1>&6
6261else
6262 cat > conftest.$ac_ext <<EOF
91151a06 6263#line 6264 "configure"
c906108c 6264#include "confdefs.h"
97bf5e38
MK
6265/* System header to define __stub macros and hopefully few prototypes,
6266 which can conflict with char $ac_func(); below. */
6267#include <assert.h>
6268/* Override any gcc2 internal prototype to avoid an error. */
6269/* We use char because int might match the return type of a gcc2
6270 builtin and then its argument prototype would still apply. */
6271char $ac_func();
c906108c 6272
97bf5e38
MK
6273int main() {
6274
6275/* The GNU C library defines this for functions which it implements
6276 to always fail with ENOSYS. Some functions are actually named
6277 something starting with __ and the normal name is an alias. */
6278#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6279choke me
c906108c 6280#else
97bf5e38 6281$ac_func();
c906108c 6282#endif
97bf5e38 6283
c906108c
SS
6284; return 0; }
6285EOF
91151a06 6286if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6287 rm -rf conftest*
97bf5e38 6288 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6289else
6290 echo "configure: failed program was:" >&5
6291 cat conftest.$ac_ext >&5
6292 rm -rf conftest*
97bf5e38 6293 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6294fi
6295rm -f conftest*
6296fi
6297
97bf5e38
MK
6298if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6299 echo "$ac_t""yes" 1>&6
6300 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6301 cat >> confdefs.h <<EOF
6302#define $ac_tr_func 1
c906108c 6303EOF
e1ea1d75 6304
97bf5e38
MK
6305else
6306 echo "$ac_t""no" 1>&6
c906108c 6307fi
97bf5e38 6308done
c906108c 6309
97bf5e38
MK
6310for ac_func in socketpair
6311do
6312echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
91151a06 6313echo "configure:6314: checking for $ac_func" >&5
97bf5e38 6314if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6315 echo $ac_n "(cached) $ac_c" 1>&6
6316else
6317 cat > conftest.$ac_ext <<EOF
91151a06 6318#line 6319 "configure"
c906108c 6319#include "confdefs.h"
97bf5e38
MK
6320/* System header to define __stub macros and hopefully few prototypes,
6321 which can conflict with char $ac_func(); below. */
6322#include <assert.h>
6323/* Override any gcc2 internal prototype to avoid an error. */
6324/* We use char because int might match the return type of a gcc2
6325 builtin and then its argument prototype would still apply. */
6326char $ac_func();
c906108c 6327
97bf5e38
MK
6328int main() {
6329
6330/* The GNU C library defines this for functions which it implements
6331 to always fail with ENOSYS. Some functions are actually named
6332 something starting with __ and the normal name is an alias. */
6333#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6334choke me
c906108c 6335#else
97bf5e38 6336$ac_func();
c906108c 6337#endif
97bf5e38 6338
c906108c
SS
6339; return 0; }
6340EOF
91151a06 6341if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6342 rm -rf conftest*
97bf5e38 6343 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6344else
6345 echo "configure: failed program was:" >&5
6346 cat conftest.$ac_ext >&5
6347 rm -rf conftest*
97bf5e38 6348 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6349fi
6350rm -f conftest*
6351fi
6352
97bf5e38
MK
6353if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6354 echo "$ac_t""yes" 1>&6
6355 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6356 cat >> confdefs.h <<EOF
6357#define $ac_tr_func 1
c906108c 6358EOF
97bf5e38
MK
6359
6360else
6361 echo "$ac_t""no" 1>&6
c906108c 6362fi
97bf5e38 6363done
c906108c 6364
97bf5e38
MK
6365
6366if test "$cross_compiling" = no; then
6367 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
91151a06 6368echo "configure:6369: checking whether setpgrp takes no argument" >&5
97bf5e38 6369if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6370 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6371else
6372 if test "$cross_compiling" = yes; then
6373 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6374else
6375 cat > conftest.$ac_ext <<EOF
91151a06 6376#line 6377 "configure"
c906108c
SS
6377#include "confdefs.h"
6378
c906108c
SS
6379#ifdef HAVE_UNISTD_H
6380#include <unistd.h>
6381#endif
97bf5e38
MK
6382
6383/*
6384 * If this system has a BSD-style setpgrp, which takes arguments, exit
6385 * successfully.
6386 */
6387main()
6388{
6389 if (setpgrp(1,1) == -1)
6390 exit(0);
6391 else
6392 exit(1);
6393}
6394
c906108c 6395EOF
91151a06 6396if { (eval echo configure:6397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6397then
6398 ac_cv_func_setpgrp_void=no
c906108c
SS
6399else
6400 echo "configure: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
97bf5e38
MK
6402 rm -fr conftest*
6403 ac_cv_func_setpgrp_void=yes
c906108c 6404fi
97bf5e38 6405rm -fr conftest*
c906108c
SS
6406fi
6407
97bf5e38
MK
6408
6409fi
6410
6411echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6412if test $ac_cv_func_setpgrp_void = yes; then
6413 cat >> confdefs.h <<\EOF
6414#define SETPGRP_VOID 1
c906108c
SS
6415EOF
6416
6417fi
6418
97bf5e38
MK
6419else
6420 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
91151a06 6421echo "configure:6422: checking whether setpgrp takes no argument" >&5
97bf5e38 6422if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6423 echo $ac_n "(cached) $ac_c" 1>&6
6424else
6425 cat > conftest.$ac_ext <<EOF
91151a06 6426#line 6427 "configure"
b83266a0
SS
6427#include "confdefs.h"
6428
b83266a0 6429#include <unistd.h>
97bf5e38 6430
b83266a0 6431int main() {
97bf5e38
MK
6432
6433 if (setpgrp(1,1) == -1)
6434 exit (0);
6435 else
6436 exit (1);
6437
b83266a0
SS
6438; return 0; }
6439EOF
91151a06 6440if { (eval echo configure:6441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6441 rm -rf conftest*
97bf5e38 6442 ac_cv_func_setpgrp_void=no
b83266a0
SS
6443else
6444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 rm -rf conftest*
97bf5e38 6447 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6448fi
6449rm -f conftest*
6450fi
6451
97bf5e38
MK
6452echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6453if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6454 cat >> confdefs.h <<\EOF
97bf5e38 6455#define SETPGRP_VOID 1
b83266a0
SS
6456EOF
6457
97bf5e38 6458fi
b83266a0
SS
6459fi
6460
97bf5e38
MK
6461# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6462# since sigsetjmp might only be defined as a macro.
6463echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
91151a06 6464echo "configure:6465: checking for sigsetjmp" >&5
97bf5e38 6465if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6466 echo $ac_n "(cached) $ac_c" 1>&6
6467else
6468 cat > conftest.$ac_ext <<EOF
91151a06 6469#line 6470 "configure"
a4db0f07
RH
6470#include "confdefs.h"
6471
97bf5e38
MK
6472#include <setjmp.h>
6473
a4db0f07 6474int main() {
97bf5e38 6475sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6476; return 0; }
6477EOF
91151a06 6478if { (eval echo configure:6479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6479 rm -rf conftest*
97bf5e38 6480 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6481else
6482 echo "configure: failed program was:" >&5
6483 cat conftest.$ac_ext >&5
6484 rm -rf conftest*
97bf5e38 6485 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6486fi
6487rm -f conftest*
6488fi
6489
97bf5e38
MK
6490echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6491if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6492 cat >> confdefs.h <<\EOF
97bf5e38 6493#define HAVE_SIGSETJMP 1
a4db0f07
RH
6494EOF
6495
6496fi
c906108c 6497
06825bd1
MK
6498# Assume we'll default to using the included libiberty regex.
6499gdb_use_included_regex=yes
6500
6501# However, if the system regex is GNU regex, then default to *not*
6502# using the included regex.
6503echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
91151a06 6504echo "configure:6505: checking for GNU regex" >&5
06825bd1
MK
6505if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6506 echo $ac_n "(cached) $ac_c" 1>&6
6507else
6508 cat > conftest.$ac_ext <<EOF
91151a06 6509#line 6510 "configure"
06825bd1
MK
6510#include "confdefs.h"
6511#include <gnu-versions.h>
6512int main() {
6513#define REGEX_INTERFACE_VERSION 1
6514#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6515# error "Version mismatch"
6516#endif
6517; return 0; }
6518EOF
91151a06 6519if { (eval echo configure:6520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6520 rm -rf conftest*
6521 gdb_cv_have_gnu_regex=yes
6522else
6523 echo "configure: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
6525 rm -rf conftest*
6526 gdb_cv_have_gnu_regex=no
6527fi
6528rm -f conftest*
6529fi
6530
6531echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6532if test $gdb_cv_have_gnu_regex = yes; then
6533 gdb_use_included_regex=no
6534fi
6535
6536# Check whether --with-included-regex or --without-included-regex was given.
6537if test "${with_included_regex+set}" = set; then
6538 withval="$with_included_regex"
6539 gdb_with_regex=$withval
6540else
6541 gdb_with_regex=$gdb_use_included_regex
6542fi
6543
6544if test "$gdb_with_regex" = yes; then
6545 cat >> confdefs.h <<\EOF
6546#define USE_INCLUDED_REGEX 1
6547EOF
6548
6549fi
6550
97bf5e38
MK
6551# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6552# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6553echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
91151a06 6554echo "configure:6555: checking for r_fs in struct reg" >&5
97bf5e38
MK
6555if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6556 echo $ac_n "(cached) $ac_c" 1>&6
6557else
6558 cat > conftest.$ac_ext <<EOF
91151a06 6559#line 6560 "configure"
c906108c 6560#include "confdefs.h"
97bf5e38
MK
6561#include <machine/reg.h>
6562int main() {
6563struct reg r; r.r_fs;
6564; return 0; }
c906108c 6565EOF
91151a06 6566if { (eval echo configure:6567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6567 rm -rf conftest*
97bf5e38 6568 gdb_cv_struct_reg_r_fs=yes
c906108c 6569else
97bf5e38
MK
6570 echo "configure: failed program was:" >&5
6571 cat conftest.$ac_ext >&5
c906108c 6572 rm -rf conftest*
97bf5e38 6573 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6574fi
6575rm -f conftest*
97bf5e38 6576fi
c906108c 6577
97bf5e38
MK
6578echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6579if test $gdb_cv_struct_reg_r_fs = yes; then
6580 cat >> confdefs.h <<\EOF
6581#define HAVE_STRUCT_REG_R_FS 1
6582EOF
6583
6584fi
6585echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
91151a06 6586echo "configure:6587: checking for r_gs in struct reg" >&5
97bf5e38
MK
6587if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6588 echo $ac_n "(cached) $ac_c" 1>&6
6589else
6590 cat > conftest.$ac_ext <<EOF
91151a06 6591#line 6592 "configure"
c906108c 6592#include "confdefs.h"
97bf5e38
MK
6593#include <machine/reg.h>
6594int main() {
6595struct reg r; r.r_gs;
6596; return 0; }
c906108c 6597EOF
91151a06 6598if { (eval echo configure:6599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6599 rm -rf conftest*
97bf5e38 6600 gdb_cv_struct_reg_r_gs=yes
c906108c 6601else
97bf5e38
MK
6602 echo "configure: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
c906108c 6604 rm -rf conftest*
97bf5e38 6605 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6606fi
6607rm -f conftest*
c906108c 6608fi
c906108c 6609
97bf5e38
MK
6610echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6611if test $gdb_cv_struct_reg_r_gs = yes; then
6612 cat >> confdefs.h <<\EOF
6613#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6614EOF
6615
c906108c
SS
6616fi
6617
97bf5e38
MK
6618# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6619echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
91151a06 6620echo "configure:6621: checking for PTRACE_GETREGS" >&5
97bf5e38 6621if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6622 echo $ac_n "(cached) $ac_c" 1>&6
6623else
6624 cat > conftest.$ac_ext <<EOF
91151a06 6625#line 6626 "configure"
c906108c 6626#include "confdefs.h"
97bf5e38 6627#include <sys/ptrace.h>
c906108c 6628int main() {
97bf5e38 6629PTRACE_GETREGS;
c906108c
SS
6630; return 0; }
6631EOF
91151a06 6632if { (eval echo configure:6633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6633 rm -rf conftest*
97bf5e38 6634 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6635else
6636 echo "configure: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 rm -rf conftest*
97bf5e38 6639 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6640fi
6641rm -f conftest*
6642fi
6643
97bf5e38
MK
6644echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6645if test $gdb_cv_have_ptrace_getregs = yes; then
6646 cat >> confdefs.h <<\EOF
6647#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6648EOF
6649
97bf5e38 6650fi
c906108c 6651
97bf5e38
MK
6652# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6653echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
91151a06 6654echo "configure:6655: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6655if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6656 echo $ac_n "(cached) $ac_c" 1>&6
6657else
6658 cat > conftest.$ac_ext <<EOF
91151a06 6659#line 6660 "configure"
c906108c 6660#include "confdefs.h"
97bf5e38 6661#include <sys/ptrace.h>
c906108c 6662int main() {
97bf5e38 6663PTRACE_GETFPXREGS;
c906108c
SS
6664; return 0; }
6665EOF
91151a06 6666if { (eval echo configure:6667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6667 rm -rf conftest*
97bf5e38 6668 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6669else
6670 echo "configure: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 rm -rf conftest*
97bf5e38 6673 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6674fi
6675rm -f conftest*
6676fi
6677
97bf5e38
MK
6678echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6679if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6680 cat >> confdefs.h <<\EOF
6681#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6682EOF
6683
97bf5e38 6684fi
c906108c 6685
97bf5e38
MK
6686# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6687echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
91151a06 6688echo "configure:6689: checking for PT_GETDBREGS" >&5
97bf5e38 6689if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6690 echo $ac_n "(cached) $ac_c" 1>&6
6691else
6692 cat > conftest.$ac_ext <<EOF
91151a06 6693#line 6694 "configure"
c906108c 6694#include "confdefs.h"
97bf5e38
MK
6695#include <sys/types.h>
6696#include <sys/ptrace.h>
c906108c 6697int main() {
97bf5e38 6698PT_GETDBREGS;
c906108c
SS
6699; return 0; }
6700EOF
91151a06 6701if { (eval echo configure:6702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6702 rm -rf conftest*
97bf5e38 6703 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6704else
6705 echo "configure: failed program was:" >&5
6706 cat conftest.$ac_ext >&5
6707 rm -rf conftest*
97bf5e38 6708 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6709fi
6710rm -f conftest*
6711fi
6712
97bf5e38
MK
6713echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6714if test $gdb_cv_have_pt_getdbregs = yes; then
6715 cat >> confdefs.h <<\EOF
6716#define HAVE_PT_GETDBREGS 1
c906108c
SS
6717EOF
6718
97bf5e38 6719fi
c906108c 6720
97bf5e38
MK
6721# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6722echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
91151a06 6723echo "configure:6724: checking for PT_GETXMMREGS" >&5
97bf5e38 6724if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6725 echo $ac_n "(cached) $ac_c" 1>&6
6726else
6727 cat > conftest.$ac_ext <<EOF
91151a06 6728#line 6729 "configure"
c906108c 6729#include "confdefs.h"
97bf5e38
MK
6730#include <sys/types.h>
6731#include <sys/ptrace.h>
c906108c 6732int main() {
97bf5e38 6733PT_GETXMMREGS;
c906108c
SS
6734; return 0; }
6735EOF
91151a06 6736if { (eval echo configure:6737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6737 rm -rf conftest*
97bf5e38 6738 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6739else
6740 echo "configure: failed program was:" >&5
6741 cat conftest.$ac_ext >&5
6742 rm -rf conftest*
97bf5e38 6743 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6744fi
6745rm -f conftest*
6746fi
6747
97bf5e38
MK
6748echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6749if test $gdb_cv_have_pt_getxmmregs = yes; then
6750 cat >> confdefs.h <<\EOF
6751#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6752EOF
6753
97bf5e38 6754fi
c906108c 6755
97bf5e38
MK
6756
6757echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
91151a06 6758echo "configure:6759: checking whether malloc must be declared" >&5
97bf5e38 6759if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6760 echo $ac_n "(cached) $ac_c" 1>&6
6761else
6762 cat > conftest.$ac_ext <<EOF
91151a06 6763#line 6764 "configure"
3862412b 6764#include "confdefs.h"
e17bf198 6765
97bf5e38
MK
6766#include <stdio.h>
6767#ifdef HAVE_STRING_H
6768#include <string.h>
6769#else
6770#ifdef HAVE_STRINGS_H
6771#include <strings.h>
6772#endif
6773#endif
6774#ifdef HAVE_STDLIB_H
6775#include <stdlib.h>
6776#endif
6777#ifdef HAVE_UNISTD_H
6778#include <unistd.h>
6779#endif
3862412b 6780int main() {
97bf5e38 6781char *(*pfn) = (char *(*)) malloc
3862412b
MK
6782; return 0; }
6783EOF
91151a06 6784if { (eval echo configure:6785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6785 rm -rf conftest*
97bf5e38 6786 bfd_cv_decl_needed_malloc=no
3862412b
MK
6787else
6788 echo "configure: failed program was:" >&5
6789 cat conftest.$ac_ext >&5
6790 rm -rf conftest*
97bf5e38 6791 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6792fi
6793rm -f conftest*
6794fi
6795
97bf5e38
MK
6796echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6797if test $bfd_cv_decl_needed_malloc = yes; then
6798 cat >> confdefs.h <<\EOF
6799#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6800EOF
6801
97bf5e38 6802fi
3862412b 6803
97bf5e38 6804echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
91151a06 6805echo "configure:6806: checking whether realloc must be declared" >&5
97bf5e38 6806if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
6807 echo $ac_n "(cached) $ac_c" 1>&6
6808else
6809 cat > conftest.$ac_ext <<EOF
91151a06 6810#line 6811 "configure"
3862412b 6811#include "confdefs.h"
e17bf198 6812
97bf5e38
MK
6813#include <stdio.h>
6814#ifdef HAVE_STRING_H
6815#include <string.h>
6816#else
6817#ifdef HAVE_STRINGS_H
6818#include <strings.h>
6819#endif
6820#endif
6821#ifdef HAVE_STDLIB_H
6822#include <stdlib.h>
6823#endif
6824#ifdef HAVE_UNISTD_H
6825#include <unistd.h>
6826#endif
3862412b 6827int main() {
97bf5e38 6828char *(*pfn) = (char *(*)) realloc
3862412b
MK
6829; return 0; }
6830EOF
91151a06 6831if { (eval echo configure:6832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6832 rm -rf conftest*
97bf5e38 6833 bfd_cv_decl_needed_realloc=no
3862412b
MK
6834else
6835 echo "configure: failed program was:" >&5
6836 cat conftest.$ac_ext >&5
6837 rm -rf conftest*
97bf5e38 6838 bfd_cv_decl_needed_realloc=yes
3862412b
MK
6839fi
6840rm -f conftest*
6841fi
6842
97bf5e38
MK
6843echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6844if test $bfd_cv_decl_needed_realloc = yes; then
6845 cat >> confdefs.h <<\EOF
6846#define NEED_DECLARATION_REALLOC 1
3862412b
MK
6847EOF
6848
97bf5e38 6849fi
3862412b 6850
97bf5e38 6851echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
91151a06 6852echo "configure:6853: checking whether free must be declared" >&5
97bf5e38 6853if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
6854 echo $ac_n "(cached) $ac_c" 1>&6
6855else
6856 cat > conftest.$ac_ext <<EOF
91151a06 6857#line 6858 "configure"
451928c5 6858#include "confdefs.h"
e17bf198 6859
97bf5e38
MK
6860#include <stdio.h>
6861#ifdef HAVE_STRING_H
6862#include <string.h>
6863#else
6864#ifdef HAVE_STRINGS_H
6865#include <strings.h>
6866#endif
6867#endif
6868#ifdef HAVE_STDLIB_H
6869#include <stdlib.h>
6870#endif
6871#ifdef HAVE_UNISTD_H
6872#include <unistd.h>
6873#endif
451928c5 6874int main() {
97bf5e38 6875char *(*pfn) = (char *(*)) free
451928c5
AC
6876; return 0; }
6877EOF
91151a06 6878if { (eval echo configure:6879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6879 rm -rf conftest*
97bf5e38 6880 bfd_cv_decl_needed_free=no
451928c5
AC
6881else
6882 echo "configure: failed program was:" >&5
6883 cat conftest.$ac_ext >&5
6884 rm -rf conftest*
97bf5e38 6885 bfd_cv_decl_needed_free=yes
451928c5
AC
6886fi
6887rm -f conftest*
6888fi
6889
97bf5e38
MK
6890echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6891if test $bfd_cv_decl_needed_free = yes; then
6892 cat >> confdefs.h <<\EOF
6893#define NEED_DECLARATION_FREE 1
451928c5
AC
6894EOF
6895
97bf5e38 6896fi
451928c5 6897
97bf5e38 6898echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
91151a06 6899echo "configure:6900: checking whether strerror must be declared" >&5
97bf5e38 6900if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
6901 echo $ac_n "(cached) $ac_c" 1>&6
6902else
6903 cat > conftest.$ac_ext <<EOF
91151a06 6904#line 6905 "configure"
451928c5 6905#include "confdefs.h"
e17bf198 6906
97bf5e38
MK
6907#include <stdio.h>
6908#ifdef HAVE_STRING_H
6909#include <string.h>
6910#else
6911#ifdef HAVE_STRINGS_H
6912#include <strings.h>
6913#endif
6914#endif
6915#ifdef HAVE_STDLIB_H
6916#include <stdlib.h>
6917#endif
6918#ifdef HAVE_UNISTD_H
6919#include <unistd.h>
6920#endif
451928c5 6921int main() {
97bf5e38 6922char *(*pfn) = (char *(*)) strerror
451928c5
AC
6923; return 0; }
6924EOF
91151a06 6925if { (eval echo configure:6926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 6926 rm -rf conftest*
97bf5e38 6927 bfd_cv_decl_needed_strerror=no
451928c5
AC
6928else
6929 echo "configure: failed program was:" >&5
6930 cat conftest.$ac_ext >&5
6931 rm -rf conftest*
97bf5e38 6932 bfd_cv_decl_needed_strerror=yes
451928c5
AC
6933fi
6934rm -f conftest*
6935fi
6936
97bf5e38
MK
6937echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6938if test $bfd_cv_decl_needed_strerror = yes; then
6939 cat >> confdefs.h <<\EOF
6940#define NEED_DECLARATION_STRERROR 1
451928c5
AC
6941EOF
6942
97bf5e38 6943fi
451928c5 6944
97bf5e38 6945echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
91151a06 6946echo "configure:6947: checking whether strdup must be declared" >&5
97bf5e38 6947if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
6948 echo $ac_n "(cached) $ac_c" 1>&6
6949else
6950 cat > conftest.$ac_ext <<EOF
91151a06 6951#line 6952 "configure"
3862412b 6952#include "confdefs.h"
e17bf198 6953
97bf5e38
MK
6954#include <stdio.h>
6955#ifdef HAVE_STRING_H
6956#include <string.h>
6957#else
6958#ifdef HAVE_STRINGS_H
6959#include <strings.h>
6960#endif
6961#endif
6962#ifdef HAVE_STDLIB_H
6963#include <stdlib.h>
6964#endif
6965#ifdef HAVE_UNISTD_H
6966#include <unistd.h>
6967#endif
3862412b 6968int main() {
97bf5e38 6969char *(*pfn) = (char *(*)) strdup
3862412b
MK
6970; return 0; }
6971EOF
91151a06 6972if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6973 rm -rf conftest*
97bf5e38 6974 bfd_cv_decl_needed_strdup=no
3862412b
MK
6975else
6976 echo "configure: failed program was:" >&5
6977 cat conftest.$ac_ext >&5
6978 rm -rf conftest*
97bf5e38 6979 bfd_cv_decl_needed_strdup=yes
3862412b
MK
6980fi
6981rm -f conftest*
6982fi
6983
97bf5e38
MK
6984echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
6985if test $bfd_cv_decl_needed_strdup = yes; then
6986 cat >> confdefs.h <<\EOF
6987#define NEED_DECLARATION_STRDUP 1
3862412b
MK
6988EOF
6989
97bf5e38 6990fi
3862412b 6991
97bf5e38 6992echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
91151a06 6993echo "configure:6994: checking whether strstr must be declared" >&5
97bf5e38 6994if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
6995 echo $ac_n "(cached) $ac_c" 1>&6
6996else
6997 cat > conftest.$ac_ext <<EOF
91151a06 6998#line 6999 "configure"
3862412b 6999#include "confdefs.h"
e17bf198 7000
97bf5e38
MK
7001#include <stdio.h>
7002#ifdef HAVE_STRING_H
7003#include <string.h>
7004#else
7005#ifdef HAVE_STRINGS_H
7006#include <strings.h>
7007#endif
7008#endif
7009#ifdef HAVE_STDLIB_H
7010#include <stdlib.h>
7011#endif
7012#ifdef HAVE_UNISTD_H
7013#include <unistd.h>
7014#endif
3862412b 7015int main() {
97bf5e38 7016char *(*pfn) = (char *(*)) strstr
3862412b
MK
7017; return 0; }
7018EOF
91151a06 7019if { (eval echo configure:7020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7020 rm -rf conftest*
97bf5e38 7021 bfd_cv_decl_needed_strstr=no
3862412b
MK
7022else
7023 echo "configure: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 rm -rf conftest*
97bf5e38 7026 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7027fi
7028rm -f conftest*
7029fi
7030
97bf5e38
MK
7031echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7032if test $bfd_cv_decl_needed_strstr = yes; then
7033 cat >> confdefs.h <<\EOF
7034#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7035EOF
7036
97bf5e38 7037fi
3862412b 7038
97bf5e38 7039echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
91151a06 7040echo "configure:7041: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7041if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7042 echo $ac_n "(cached) $ac_c" 1>&6
7043else
7044 cat > conftest.$ac_ext <<EOF
91151a06 7045#line 7046 "configure"
596c9d4b
KB
7046#include "confdefs.h"
7047
97bf5e38
MK
7048#include <stdio.h>
7049#ifdef HAVE_STRING_H
7050#include <string.h>
7051#else
7052#ifdef HAVE_STRINGS_H
7053#include <strings.h>
7054#endif
7055#endif
7056#ifdef HAVE_STDLIB_H
7057#include <stdlib.h>
7058#endif
7059#ifdef HAVE_UNISTD_H
7060#include <unistd.h>
7061#endif
596c9d4b 7062int main() {
97bf5e38 7063char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7064; return 0; }
7065EOF
91151a06 7066if { (eval echo configure:7067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7067 rm -rf conftest*
97bf5e38 7068 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7069else
7070 echo "configure: failed program was:" >&5
7071 cat conftest.$ac_ext >&5
7072 rm -rf conftest*
97bf5e38 7073 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7074fi
7075rm -f conftest*
7076fi
7077
97bf5e38
MK
7078echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7079if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7080 cat >> confdefs.h <<\EOF
7081#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7082EOF
7083
97bf5e38 7084fi
596c9d4b 7085
97bf5e38
MK
7086
7087# The following save_state_t checkery is only necessary for HPUX
7088# versions earlier than 10.20. When those fade from memory, this
7089# could be expunged. --jsm 1999-03-22
7090
7091echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
91151a06 7092echo "configure:7093: checking for HPUX save_state structure" >&5
97bf5e38 7093cat > conftest.$ac_ext <<EOF
91151a06 7094#line 7095 "configure"
97bf5e38
MK
7095#include "confdefs.h"
7096#include <machine/save_state.h>
7097EOF
7098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7099 egrep "save_state_t" >/dev/null 2>&1; then
7100 rm -rf conftest*
7101 gdb_cv_hpux_savestate=yes
7102else
7103 rm -rf conftest*
7104 gdb_cv_hpux_savestate=no
7105fi
7106rm -f conftest*
7107
7108cat > conftest.$ac_ext <<EOF
91151a06 7109#line 7110 "configure"
97bf5e38
MK
7110#include "confdefs.h"
7111#include <machine/save_state.h>
7112EOF
7113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7114 egrep "ss_wide" >/dev/null 2>&1; then
7115 rm -rf conftest*
7116 gdb_cv_hpux_sswide=yes
7117else
7118 rm -rf conftest*
7119 gdb_cv_hpux_sswide=no
7120fi
7121rm -f conftest*
7122
7123if test $gdb_cv_hpux_savestate = yes
7124then
7125 cat >> confdefs.h <<\EOF
7126#define HAVE_STRUCT_SAVE_STATE_T 1
7127EOF
7128
7129fi
7130if test $gdb_cv_hpux_sswide = yes
7131then
7132 cat >> confdefs.h <<\EOF
7133#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7134EOF
7135
7136fi
7137echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7138
7139
7140# If we are configured native on GNU/Linux, work around problems with
7141# sys/procfs.h
7142# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7143
7144if test "${target}" = "${host}"; then
7145 case "${host}" in
7146 i[3456]86-*-linux*)
7147 cat >> confdefs.h <<\EOF
7148#define START_INFERIOR_TRAPS_EXPECTED 2
7149EOF
7150
7151 cat >> confdefs.h <<\EOF
7152#define sys_quotactl 1
7153EOF
7154
7155 ;;
7156 ia64-*-aix*)
7157 cat >> confdefs.h <<\EOF
7158#define NEW_PROC_API 1
7159EOF
7160
7161 ;;
7162 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7163 cat >> confdefs.h <<\EOF
7164#define NEW_PROC_API 1
7165EOF
7166
7167 ;;
7168 *-*-solaris2.[678])
7169 cat >> confdefs.h <<\EOF
7170#define NEW_PROC_API 1
7171EOF
7172
7173 ;;
7174 esac
7175fi
7176
7177if test "$ac_cv_header_sys_procfs_h" = yes; then
7178 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7179echo "configure:7180: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7180 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7181 echo $ac_n "(cached) $ac_c" 1>&6
7182else
7183 cat > conftest.$ac_ext <<EOF
91151a06 7184#line 7185 "configure"
596c9d4b
KB
7185#include "confdefs.h"
7186
7187#define _SYSCALL32
7188#include <sys/procfs.h>
7189int main() {
97bf5e38 7190pstatus_t avar
596c9d4b
KB
7191; return 0; }
7192EOF
91151a06 7193if { (eval echo configure:7194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7194 rm -rf conftest*
97bf5e38 7195 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7196else
7197 echo "configure: failed program was:" >&5
7198 cat conftest.$ac_ext >&5
7199 rm -rf conftest*
97bf5e38 7200 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7201
7202fi
7203rm -f conftest*
7204fi
7205
97bf5e38 7206 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7207 cat >> confdefs.h <<\EOF
97bf5e38 7208#define HAVE_PSTATUS_T 1
596c9d4b
KB
7209EOF
7210
7211 fi
97bf5e38 7212 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7213
97bf5e38 7214 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7215echo "configure:7216: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7216 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7217 echo $ac_n "(cached) $ac_c" 1>&6
7218else
7219 cat > conftest.$ac_ext <<EOF
91151a06 7220#line 7221 "configure"
596c9d4b
KB
7221#include "confdefs.h"
7222
7223#define _SYSCALL32
7224#include <sys/procfs.h>
7225int main() {
97bf5e38 7226prrun_t avar
596c9d4b
KB
7227; return 0; }
7228EOF
91151a06 7229if { (eval echo configure:7230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7230 rm -rf conftest*
97bf5e38 7231 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7232else
7233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7235 rm -rf conftest*
97bf5e38 7236 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7237
7238fi
7239rm -f conftest*
7240fi
7241
97bf5e38 7242 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7243 cat >> confdefs.h <<\EOF
97bf5e38 7244#define HAVE_PRRUN_T 1
596c9d4b
KB
7245EOF
7246
7247 fi
97bf5e38 7248 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7249
97bf5e38 7250 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7251echo "configure:7252: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7252 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7253 echo $ac_n "(cached) $ac_c" 1>&6
7254else
7255 cat > conftest.$ac_ext <<EOF
91151a06 7256#line 7257 "configure"
596c9d4b
KB
7257#include "confdefs.h"
7258
7259#define _SYSCALL32
7260#include <sys/procfs.h>
7261int main() {
97bf5e38 7262gregset_t avar
596c9d4b
KB
7263; return 0; }
7264EOF
91151a06 7265if { (eval echo configure:7266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7266 rm -rf conftest*
97bf5e38 7267 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7268else
7269 echo "configure: failed program was:" >&5
7270 cat conftest.$ac_ext >&5
7271 rm -rf conftest*
97bf5e38 7272 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7273
7274fi
7275rm -f conftest*
7276fi
7277
97bf5e38 7278 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7279 cat >> confdefs.h <<\EOF
97bf5e38 7280#define HAVE_GREGSET_T 1
596c9d4b
KB
7281EOF
7282
7283 fi
97bf5e38 7284 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7285
97bf5e38 7286 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7287echo "configure:7288: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7288 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7289 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7290else
7291 cat > conftest.$ac_ext <<EOF
91151a06 7292#line 7293 "configure"
d84dd0c5 7293#include "confdefs.h"
97bf5e38
MK
7294
7295#define _SYSCALL32
d84dd0c5 7296#include <sys/procfs.h>
97bf5e38
MK
7297int main() {
7298fpregset_t avar
7299; return 0; }
d84dd0c5 7300EOF
91151a06 7301if { (eval echo configure:7302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7302 rm -rf conftest*
7303 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7304else
7305 echo "configure: failed program was:" >&5
7306 cat conftest.$ac_ext >&5
97bf5e38
MK
7307 rm -rf conftest*
7308 bfd_cv_have_sys_procfs_type_fpregset_t=no
7309
d84dd0c5 7310fi
97bf5e38 7311rm -f conftest*
d84dd0c5
MK
7312fi
7313
97bf5e38
MK
7314 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7315 cat >> confdefs.h <<\EOF
7316#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7317EOF
7318
97bf5e38
MK
7319 fi
7320 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7321
97bf5e38 7322 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7323echo "configure:7324: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7324 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7325 echo $ac_n "(cached) $ac_c" 1>&6
7326else
7327 cat > conftest.$ac_ext <<EOF
91151a06 7328#line 7329 "configure"
c906108c 7329#include "confdefs.h"
c906108c 7330
97bf5e38
MK
7331#define _SYSCALL32
7332#include <sys/procfs.h>
c906108c 7333int main() {
97bf5e38 7334prgregset_t avar
c906108c
SS
7335; return 0; }
7336EOF
91151a06 7337if { (eval echo configure:7338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7338 rm -rf conftest*
97bf5e38 7339 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7340else
7341 echo "configure: failed program was:" >&5
7342 cat conftest.$ac_ext >&5
7343 rm -rf conftest*
97bf5e38
MK
7344 bfd_cv_have_sys_procfs_type_prgregset_t=no
7345
c906108c
SS
7346fi
7347rm -f conftest*
7348fi
7349
97bf5e38
MK
7350 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7351 cat >> confdefs.h <<\EOF
7352#define HAVE_PRGREGSET_T 1
c906108c
SS
7353EOF
7354
97bf5e38
MK
7355 fi
7356 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7357
97bf5e38 7358 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7359echo "configure:7360: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7360 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7361 echo $ac_n "(cached) $ac_c" 1>&6
7362else
7363 cat > conftest.$ac_ext <<EOF
91151a06 7364#line 7365 "configure"
d45fe813 7365#include "confdefs.h"
97bf5e38
MK
7366
7367#define _SYSCALL32
7368#include <sys/procfs.h>
d45fe813 7369int main() {
97bf5e38 7370prfpregset_t avar
d45fe813
KB
7371; return 0; }
7372EOF
91151a06 7373if { (eval echo configure:7374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7374 rm -rf conftest*
97bf5e38 7375 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7376else
7377 echo "configure: failed program was:" >&5
7378 cat conftest.$ac_ext >&5
7379 rm -rf conftest*
97bf5e38
MK
7380 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7381
d45fe813
KB
7382fi
7383rm -f conftest*
7384fi
7385
97bf5e38
MK
7386 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7387 cat >> confdefs.h <<\EOF
7388#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7389EOF
7390
97bf5e38
MK
7391 fi
7392 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7393
97bf5e38 7394 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7395echo "configure:7396: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7396 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7397 echo $ac_n "(cached) $ac_c" 1>&6
7398else
7399 cat > conftest.$ac_ext <<EOF
91151a06 7400#line 7401 "configure"
d45fe813 7401#include "confdefs.h"
97bf5e38
MK
7402
7403#define _SYSCALL32
7404#include <sys/procfs.h>
d45fe813 7405int main() {
97bf5e38 7406prgregset32_t avar
d45fe813
KB
7407; return 0; }
7408EOF
91151a06 7409if { (eval echo configure:7410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7410 rm -rf conftest*
97bf5e38 7411 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7412else
7413 echo "configure: failed program was:" >&5
7414 cat conftest.$ac_ext >&5
7415 rm -rf conftest*
97bf5e38
MK
7416 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7417
d45fe813
KB
7418fi
7419rm -f conftest*
7420fi
7421
97bf5e38
MK
7422 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7423 cat >> confdefs.h <<\EOF
7424#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7425EOF
7426
97bf5e38
MK
7427 fi
7428 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7429
97bf5e38 7430 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7431echo "configure:7432: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7432 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7433 echo $ac_n "(cached) $ac_c" 1>&6
7434else
7435 cat > conftest.$ac_ext <<EOF
91151a06 7436#line 7437 "configure"
d45fe813 7437#include "confdefs.h"
97bf5e38
MK
7438
7439#define _SYSCALL32
7440#include <sys/procfs.h>
d45fe813 7441int main() {
97bf5e38 7442prfpregset32_t avar
d45fe813
KB
7443; return 0; }
7444EOF
91151a06 7445if { (eval echo configure:7446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7446 rm -rf conftest*
97bf5e38 7447 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7448else
7449 echo "configure: failed program was:" >&5
7450 cat conftest.$ac_ext >&5
7451 rm -rf conftest*
97bf5e38
MK
7452 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7453
d45fe813
KB
7454fi
7455rm -f conftest*
7456fi
7457
97bf5e38
MK
7458 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7459 cat >> confdefs.h <<\EOF
7460#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7461EOF
7462
97bf5e38
MK
7463 fi
7464 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7465
97bf5e38 7466 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7467echo "configure:7468: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7468 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7469 echo $ac_n "(cached) $ac_c" 1>&6
7470else
7471 cat > conftest.$ac_ext <<EOF
91151a06 7472#line 7473 "configure"
d45fe813 7473#include "confdefs.h"
97bf5e38 7474
d45fe813 7475#define _SYSCALL32
97bf5e38 7476#include <sys/procfs.h>
d45fe813 7477int main() {
97bf5e38 7478lwpid_t avar
d45fe813
KB
7479; return 0; }
7480EOF
91151a06 7481if { (eval echo configure:7482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7482 rm -rf conftest*
97bf5e38 7483 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7484else
7485 echo "configure: failed program was:" >&5
7486 cat conftest.$ac_ext >&5
7487 rm -rf conftest*
97bf5e38
MK
7488 bfd_cv_have_sys_procfs_type_lwpid_t=no
7489
d45fe813
KB
7490fi
7491rm -f conftest*
7492fi
7493
97bf5e38
MK
7494 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7495 cat >> confdefs.h <<\EOF
7496#define HAVE_LWPID_T 1
d45fe813
KB
7497EOF
7498
97bf5e38
MK
7499 fi
7500 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7501
97bf5e38 7502 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7503echo "configure:7504: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7504 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7505 echo $ac_n "(cached) $ac_c" 1>&6
7506else
7507 cat > conftest.$ac_ext <<EOF
91151a06 7508#line 7509 "configure"
c906108c
SS
7509#include "confdefs.h"
7510
97bf5e38
MK
7511#define _SYSCALL32
7512#include <sys/procfs.h>
c906108c 7513int main() {
97bf5e38 7514psaddr_t avar
c906108c
SS
7515; return 0; }
7516EOF
91151a06 7517if { (eval echo configure:7518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7518 rm -rf conftest*
97bf5e38 7519 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7520else
7521 echo "configure: failed program was:" >&5
7522 cat conftest.$ac_ext >&5
7523 rm -rf conftest*
97bf5e38
MK
7524 bfd_cv_have_sys_procfs_type_psaddr_t=no
7525
c906108c
SS
7526fi
7527rm -f conftest*
7528fi
7529
97bf5e38
MK
7530 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7531 cat >> confdefs.h <<\EOF
7532#define HAVE_PSADDR_T 1
c906108c
SS
7533EOF
7534
97bf5e38
MK
7535 fi
7536 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7537
97bf5e38 7538 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7539echo "configure:7540: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7540 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7541 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7542else
7543 cat > conftest.$ac_ext <<EOF
91151a06 7544#line 7545 "configure"
c906108c
SS
7545#include "confdefs.h"
7546
97bf5e38
MK
7547#define _SYSCALL32
7548#include <sys/procfs.h>
7549int main() {
7550prsysent_t avar
7551; return 0; }
c906108c 7552EOF
91151a06 7553if { (eval echo configure:7554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7554 rm -rf conftest*
7555 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7556else
7557 echo "configure: failed program was:" >&5
7558 cat conftest.$ac_ext >&5
97bf5e38
MK
7559 rm -rf conftest*
7560 bfd_cv_have_sys_procfs_type_prsysent_t=no
7561
c906108c 7562fi
97bf5e38 7563rm -f conftest*
c906108c
SS
7564fi
7565
97bf5e38
MK
7566 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7567 cat >> confdefs.h <<\EOF
7568#define HAVE_PRSYSENT_T 1
c906108c
SS
7569EOF
7570
97bf5e38
MK
7571 fi
7572 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7573
97bf5e38 7574 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7575echo "configure:7576: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7576 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7577 echo $ac_n "(cached) $ac_c" 1>&6
7578else
7579 cat > conftest.$ac_ext <<EOF
91151a06 7580#line 7581 "configure"
c906108c
SS
7581#include "confdefs.h"
7582
97bf5e38
MK
7583#define _SYSCALL32
7584#include <sys/procfs.h>
c906108c 7585int main() {
97bf5e38 7586pr_sigset_t avar
c906108c
SS
7587; return 0; }
7588EOF
91151a06 7589if { (eval echo configure:7590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7590 rm -rf conftest*
97bf5e38 7591 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7592else
7593 echo "configure: failed program was:" >&5
7594 cat conftest.$ac_ext >&5
7595 rm -rf conftest*
97bf5e38
MK
7596 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7597
c906108c
SS
7598fi
7599rm -f conftest*
7600fi
7601
97bf5e38
MK
7602 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7603 cat >> confdefs.h <<\EOF
7604#define HAVE_PR_SIGSET_T 1
c906108c
SS
7605EOF
7606
97bf5e38
MK
7607 fi
7608 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7609
97bf5e38 7610 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7611echo "configure:7612: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7612 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7613 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7614else
7615 cat > conftest.$ac_ext <<EOF
91151a06 7616#line 7617 "configure"
c906108c
SS
7617#include "confdefs.h"
7618
97bf5e38
MK
7619#define _SYSCALL32
7620#include <sys/procfs.h>
7621int main() {
7622pr_sigaction64_t avar
7623; return 0; }
c906108c 7624EOF
91151a06 7625if { (eval echo configure:7626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7626 rm -rf conftest*
7627 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7628else
7629 echo "configure: failed program was:" >&5
7630 cat conftest.$ac_ext >&5
97bf5e38
MK
7631 rm -rf conftest*
7632 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7633
c906108c 7634fi
97bf5e38 7635rm -f conftest*
c906108c
SS
7636fi
7637
97bf5e38
MK
7638 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7639 cat >> confdefs.h <<\EOF
7640#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7641EOF
7642
97bf5e38
MK
7643 fi
7644 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7645
7646 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
91151a06 7647echo "configure:7648: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7648 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7649 echo $ac_n "(cached) $ac_c" 1>&6
7650else
7651 cat > conftest.$ac_ext <<EOF
91151a06 7652#line 7653 "configure"
97bf5e38
MK
7653#include "confdefs.h"
7654
7655#define _SYSCALL32
7656#include <sys/procfs.h>
7657int main() {
7658pr_siginfo64_t avar
7659; return 0; }
7660EOF
91151a06 7661if { (eval echo configure:7662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7662 rm -rf conftest*
7663 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7664else
7665 echo "configure: failed program was:" >&5
7666 cat conftest.$ac_ext >&5
7667 rm -rf conftest*
7668 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7669
7670fi
7671rm -f conftest*
c906108c 7672fi
c906108c 7673
97bf5e38
MK
7674 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7675 cat >> confdefs.h <<\EOF
7676#define HAVE_PR_SIGINFO64_T 1
7677EOF
c906108c 7678
97bf5e38
MK
7679 fi
7680 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7681
7682
7683
7684
7685
7686 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7687 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
91151a06 7688echo "configure:7689: checking whether prfpregset_t type is broken" >&5
97bf5e38 7689 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7690 echo $ac_n "(cached) $ac_c" 1>&6
7691else
7692 if test "$cross_compiling" = yes; then
97bf5e38 7693 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7694else
7695 cat > conftest.$ac_ext <<EOF
91151a06 7696#line 7697 "configure"
c906108c 7697#include "confdefs.h"
97bf5e38
MK
7698#include <sys/procfs.h>
7699 int main ()
7700 {
7701 if (sizeof (prfpregset_t) == sizeof (void *))
7702 return 1;
7703 return 0;
7704 }
c906108c 7705EOF
91151a06 7706if { (eval echo configure:7707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7707then
97bf5e38 7708 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7709else
7710 echo "configure: failed program was:" >&5
7711 cat conftest.$ac_ext >&5
7712 rm -fr conftest*
97bf5e38 7713 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7714fi
7715rm -fr conftest*
7716fi
7717
7718fi
7719
97bf5e38
MK
7720 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7721 if test $gdb_cv_prfpregset_t_broken = yes; then
7722 cat >> confdefs.h <<\EOF
7723#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7724EOF
7725
97bf5e38
MK
7726 fi
7727 fi
c906108c 7728
97bf5e38
MK
7729
7730 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
91151a06 7731echo "configure:7732: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7732 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7733 echo $ac_n "(cached) $ac_c" 1>&6
7734else
7735 cat > conftest.$ac_ext <<EOF
91151a06 7736#line 7737 "configure"
c906108c 7737#include "confdefs.h"
97bf5e38
MK
7738#include <unistd.h>
7739#include <sys/types.h>
7740#include <sys/procfs.h>
7741
7742int main() {
7743
7744 int dummy;;
7745 dummy = ioctl(0, PIOCSET, &dummy);
7746
7747; return 0; }
c906108c 7748EOF
91151a06 7749if { (eval echo configure:7750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7750 rm -rf conftest*
97bf5e38 7751 gdb_cv_have_procfs_piocset=yes
c906108c 7752else
c906108c
SS
7753 echo "configure: failed program was:" >&5
7754 cat conftest.$ac_ext >&5
7755 rm -rf conftest*
97bf5e38 7756 gdb_cv_have_procfs_piocset=no
c906108c
SS
7757fi
7758rm -f conftest*
7759fi
97bf5e38
MK
7760
7761 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7762 if test $gdb_cv_have_procfs_piocset = yes; then
7763 cat >> confdefs.h <<\EOF
7764#define HAVE_PROCFS_PIOCSET 1
c906108c 7765EOF
97bf5e38
MK
7766
7767 fi
c906108c 7768fi
c906108c 7769
97bf5e38
MK
7770if test ${host} = ${target} ; then
7771
7772 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
91151a06 7773echo "configure:7774: checking for member l_addr in struct link_map" >&5
97bf5e38 7774 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7775 echo $ac_n "(cached) $ac_c" 1>&6
7776else
7777 cat > conftest.$ac_ext <<EOF
91151a06 7778#line 7779 "configure"
c906108c 7779#include "confdefs.h"
97bf5e38 7780#include <link.h>
c906108c 7781int main() {
97bf5e38 7782struct link_map lm; (void) lm.l_addr;
c906108c
SS
7783; return 0; }
7784EOF
91151a06 7785if { (eval echo configure:7786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7786 rm -rf conftest*
97bf5e38 7787 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7788else
7789 echo "configure: failed program was:" >&5
7790 cat conftest.$ac_ext >&5
7791 rm -rf conftest*
97bf5e38 7792 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7793fi
7794rm -f conftest*
7795fi
7796
97bf5e38
MK
7797 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7798 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7799 cat >> confdefs.h <<\EOF
7800#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7801EOF
97bf5e38
MK
7802
7803 fi
7804
7805
7806 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
91151a06 7807echo "configure:7808: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
7808 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7809 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 7810else
97bf5e38 7811 cat > conftest.$ac_ext <<EOF
91151a06 7812#line 7813 "configure"
97bf5e38
MK
7813#include "confdefs.h"
7814#include <sys/types.h>
7815#include <link.h>
7816int main() {
7817struct link_map lm; (void) lm.lm_addr;
7818; return 0; }
7819EOF
91151a06 7820if { (eval echo configure:7821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7821 rm -rf conftest*
7822 gdb_cv_have_struct_link_map_with_lm_members=yes
7823else
7824 echo "configure: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
7826 rm -rf conftest*
7827 gdb_cv_have_struct_link_map_with_lm_members=no
7828fi
7829rm -f conftest*
c906108c 7830fi
c906108c 7831
97bf5e38
MK
7832 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7833 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7834 cat >> confdefs.h <<\EOF
7835#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7836EOF
7837
7838 fi
7839
7840
7841 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
91151a06 7842echo "configure:7843: checking for member som_addr in struct so_map" >&5
97bf5e38 7843 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 7844 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7845else
7846 cat > conftest.$ac_ext <<EOF
91151a06 7847#line 7848 "configure"
c906108c 7848#include "confdefs.h"
97bf5e38
MK
7849#include <sys/types.h>
7850#ifdef HAVE_NLIST_H
7851#include <nlist.h>
7852#endif
7853#include <link.h>
7854int main() {
7855struct so_map lm; (void) lm.som_addr;
7856; return 0; }
7857EOF
91151a06 7858if { (eval echo configure:7859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7859 rm -rf conftest*
7860 gdb_cv_have_struct_so_map_with_som_members=yes
7861else
7862 echo "configure: failed program was:" >&5
7863 cat conftest.$ac_ext >&5
7864 rm -rf conftest*
7865 gdb_cv_have_struct_so_map_with_som_members=no
7866fi
7867rm -f conftest*
7868fi
c906108c 7869
97bf5e38
MK
7870 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7871 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7872 cat >> confdefs.h <<\EOF
7873#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7874EOF
c906108c 7875
97bf5e38 7876 fi
c906108c 7877
97bf5e38
MK
7878
7879 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
91151a06 7880echo "configure:7881: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
7881 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7882 echo $ac_n "(cached) $ac_c" 1>&6
7883else
7884 cat > conftest.$ac_ext <<EOF
91151a06 7885#line 7886 "configure"
97bf5e38
MK
7886#include "confdefs.h"
7887#define _SYSCALL32
7888#include <sys/link.h>
7889int main() {
7890struct link_map32 l;
7891; return 0; }
7892EOF
91151a06 7893if { (eval echo configure:7894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7894 rm -rf conftest*
7895 gdb_cv_have_struct_link_map32=yes
7896else
7897 echo "configure: failed program was:" >&5
7898 cat conftest.$ac_ext >&5
7899 rm -rf conftest*
7900 gdb_cv_have_struct_link_map32=no
7901fi
7902rm -f conftest*
7903fi
c906108c 7904
97bf5e38
MK
7905 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7906 if test $gdb_cv_have_struct_link_map32 = yes; then
7907 cat >> confdefs.h <<\EOF
7908#define HAVE_STRUCT_LINK_MAP32 1
7909EOF
c906108c 7910
97bf5e38
MK
7911 cat >> confdefs.h <<\EOF
7912#define _SYSCALL32 1
7913EOF
c906108c 7914
97bf5e38
MK
7915 fi
7916fi
c906108c 7917
c906108c 7918
97bf5e38 7919echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
91151a06 7920echo "configure:7921: checking for long long support in compiler" >&5
97bf5e38
MK
7921if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7922 echo $ac_n "(cached) $ac_c" 1>&6
7923else
7924 cat > conftest.$ac_ext <<EOF
91151a06 7925#line 7926 "configure"
97bf5e38 7926#include "confdefs.h"
c906108c 7927
97bf5e38 7928int main() {
c906108c 7929
97bf5e38
MK
7930 extern long long foo;
7931 switch (foo & 2) { case 0: return 1; }
c906108c 7932
97bf5e38
MK
7933; return 0; }
7934EOF
91151a06 7935if { (eval echo configure:7936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7936 rm -rf conftest*
7937 gdb_cv_c_long_long=yes
7938else
7939 echo "configure: failed program was:" >&5
7940 cat conftest.$ac_ext >&5
7941 rm -rf conftest*
7942 gdb_cv_c_long_long=no
7943fi
7944rm -f conftest*
7945fi
c906108c 7946
97bf5e38
MK
7947echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7948if test $gdb_cv_c_long_long = yes; then
7949 cat >> confdefs.h <<\EOF
7950#define CC_HAS_LONG_LONG 1
7951EOF
7952
7953fi
7954
7955
7956echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
91151a06 7957echo "configure:7958: checking for long long support in printf" >&5
97bf5e38
MK
7958if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
7959 echo $ac_n "(cached) $ac_c" 1>&6
7960else
7961 if test "$cross_compiling" = yes; then
7962 gdb_cv_printf_has_long_long=no
7963else
7964 cat > conftest.$ac_ext <<EOF
91151a06 7965#line 7966 "configure"
97bf5e38
MK
7966#include "confdefs.h"
7967
7968int main () {
7969 char buf[32];
7970 long long l = 0;
7971 l = (l << 16) + 0x0123;
7972 l = (l << 16) + 0x4567;
7973 l = (l << 16) + 0x89ab;
7974 l = (l << 16) + 0xcdef;
7975 sprintf (buf, "0x%016llx", l);
7976 return (strcmp ("0x0123456789abcdef", buf));
c906108c 7977}
97bf5e38 7978EOF
91151a06 7979if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
7980then
7981 gdb_cv_printf_has_long_long=yes
7982else
7983 echo "configure: failed program was:" >&5
7984 cat conftest.$ac_ext >&5
7985 rm -fr conftest*
7986 gdb_cv_printf_has_long_long=no
7987fi
7988rm -fr conftest*
7989fi
7990
7991fi
7992
7993if test $gdb_cv_printf_has_long_long = yes; then
7994 cat >> confdefs.h <<\EOF
7995#define PRINTF_HAS_LONG_LONG 1
7996EOF
7997
7998fi
7999echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8000
8001
8002echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
91151a06 8003echo "configure:8004: checking for long double support in compiler" >&5
97bf5e38
MK
8004if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8005 echo $ac_n "(cached) $ac_c" 1>&6
8006else
8007 cat > conftest.$ac_ext <<EOF
91151a06 8008#line 8009 "configure"
97bf5e38
MK
8009#include "confdefs.h"
8010
8011int main() {
8012long double foo;
8013; return 0; }
8014EOF
91151a06 8015if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8016 rm -rf conftest*
8017 ac_cv_c_long_double=yes
8018else
8019 echo "configure: failed program was:" >&5
8020 cat conftest.$ac_ext >&5
8021 rm -rf conftest*
8022 ac_cv_c_long_double=no
8023fi
8024rm -f conftest*
8025fi
c906108c 8026
97bf5e38
MK
8027echo "$ac_t""$ac_cv_c_long_double" 1>&6
8028if test $ac_cv_c_long_double = yes; then
8029 cat >> confdefs.h <<\EOF
8030#define HAVE_LONG_DOUBLE 1
c906108c 8031EOF
97bf5e38
MK
8032
8033fi
8034
8035
8036echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
91151a06 8037echo "configure:8038: checking for long double support in printf" >&5
97bf5e38
MK
8038if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8039 echo $ac_n "(cached) $ac_c" 1>&6
8040else
8041 if test "$cross_compiling" = yes; then
8042 gdb_cv_printf_has_long_double=no
8043else
8044 cat > conftest.$ac_ext <<EOF
91151a06 8045#line 8046 "configure"
97bf5e38
MK
8046#include "confdefs.h"
8047
8048int main () {
8049 char buf[16];
8050 long double f = 3.141592653;
8051 sprintf (buf, "%Lg", f);
8052 return (strncmp ("3.14159", buf, 7));
8053}
8054EOF
91151a06 8055if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8056then
97bf5e38 8057 gdb_cv_printf_has_long_double=yes
c906108c
SS
8058else
8059 echo "configure: failed program was:" >&5
8060 cat conftest.$ac_ext >&5
8061 rm -fr conftest*
97bf5e38 8062 gdb_cv_printf_has_long_double=no
c906108c
SS
8063fi
8064rm -fr conftest*
8065fi
8066
8067fi
8068
97bf5e38 8069if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8070 cat >> confdefs.h <<\EOF
97bf5e38
MK
8071#define PRINTF_HAS_LONG_DOUBLE 1
8072EOF
8073
8074fi
8075echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8076
8077
8078echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
91151a06 8079echo "configure:8080: checking for long double support in scanf" >&5
97bf5e38
MK
8080if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8081 echo $ac_n "(cached) $ac_c" 1>&6
8082else
8083 if test "$cross_compiling" = yes; then
8084 gdb_cv_scanf_has_long_double=no
8085else
8086 cat > conftest.$ac_ext <<EOF
91151a06 8087#line 8088 "configure"
97bf5e38
MK
8088#include "confdefs.h"
8089
8090int main () {
8091 char *buf = "3.141592653";
8092 long double f = 0;
8093 sscanf (buf, "%Lg", &f);
8094 return !(f > 3.14159 && f < 3.14160);
8095}
c906108c 8096EOF
91151a06 8097if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8098then
8099 gdb_cv_scanf_has_long_double=yes
8100else
8101 echo "configure: failed program was:" >&5
8102 cat conftest.$ac_ext >&5
8103 rm -fr conftest*
8104 gdb_cv_scanf_has_long_double=no
8105fi
8106rm -fr conftest*
8107fi
c906108c
SS
8108
8109fi
8110
97bf5e38
MK
8111if test $gdb_cv_scanf_has_long_double = yes; then
8112 cat >> confdefs.h <<\EOF
8113#define SCANF_HAS_LONG_DOUBLE 1
8114EOF
8115
8116fi
8117echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8118
438013df
AO
8119case ${host_os} in
8120aix*)
8121 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
91151a06 8122echo "configure:8123: checking for -bbigtoc option" >&5
438013df
AO
8123if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8124 echo $ac_n "(cached) $ac_c" 1>&6
8125else
8126
8127 SAVE_LDFLAGS=$LDFLAGS
8128
8129 case $GCC in
8130 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8131 *) gdb_cv_bigtoc=-bbigtoc ;;
8132 esac
8133
8134 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8135 cat > conftest.$ac_ext <<EOF
91151a06 8136#line 8137 "configure"
438013df
AO
8137#include "confdefs.h"
8138
8139int main() {
8140int i;
8141; return 0; }
8142EOF
91151a06 8143if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8144 :
8145else
8146 echo "configure: failed program was:" >&5
8147 cat conftest.$ac_ext >&5
8148 rm -rf conftest*
8149 gdb_cv_bigtoc=
8150fi
8151rm -f conftest*
8152
8153fi
8154
8155echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8156 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8157 ;;
8158esac
8159
c906108c
SS
8160
8161
8162if test ${build} = ${host} -a ${host} = ${target} ; then
8163 case ${host_os} in
8164 hpux*)
8165 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
91151a06 8166echo "configure:8167: checking for HPUX/OSF thread support" >&5
c906108c
SS
8167 if test -f /usr/include/dce/cma_config.h ; then
8168 if test "$GCC" = "yes" ; then
8169 echo "$ac_t""yes" 1>&6
8170 cat >> confdefs.h <<\EOF
8171#define HAVE_HPUX_THREAD_SUPPORT 1
8172EOF
8173
66b965bb 8174 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8175 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8176 else
8177 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8178 fi
8179 else
8180 echo "$ac_t""no" 1>&6
8181 fi
8182 ;;
8183 solaris*)
d92419e5
JB
8184 # See if thread_db library is around for Solaris thread debugging.
8185 # Note that we must explicitly test for version 1 of the library
8186 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8187 # the same API.
c906108c 8188 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
91151a06 8189echo "configure:8190: checking for Solaris thread debugging library" >&5
c906108c
SS
8190 if test -f /usr/lib/libthread_db.so.1 ; then
8191 echo "$ac_t""yes" 1>&6
8192 cat >> confdefs.h <<\EOF
8193#define HAVE_THREAD_DB_LIB 1
8194EOF
8195
66b965bb 8196 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8197 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8198 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
91151a06 8199echo "configure:8200: checking for dlopen in -ldl" >&5
c906108c
SS
8200ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8201if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8202 echo $ac_n "(cached) $ac_c" 1>&6
8203else
8204 ac_save_LIBS="$LIBS"
8205LIBS="-ldl $LIBS"
8206cat > conftest.$ac_ext <<EOF
91151a06 8207#line 8208 "configure"
c906108c
SS
8208#include "confdefs.h"
8209/* Override any gcc2 internal prototype to avoid an error. */
8210/* We use char because int might match the return type of a gcc2
8211 builtin and then its argument prototype would still apply. */
8212char dlopen();
8213
8214int main() {
8215dlopen()
8216; return 0; }
8217EOF
91151a06 8218if { (eval echo configure:8219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8219 rm -rf conftest*
8220 eval "ac_cv_lib_$ac_lib_var=yes"
8221else
8222 echo "configure: failed program was:" >&5
8223 cat conftest.$ac_ext >&5
8224 rm -rf conftest*
8225 eval "ac_cv_lib_$ac_lib_var=no"
8226fi
8227rm -f conftest*
8228LIBS="$ac_save_LIBS"
8229
8230fi
8231if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8232 echo "$ac_t""yes" 1>&6
8233 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8234 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8235 cat >> confdefs.h <<EOF
8236#define $ac_tr_lib 1
8237EOF
8238
8239 LIBS="-ldl $LIBS"
8240
8241else
8242 echo "$ac_t""no" 1>&6
8243fi
8244
8245 if test "$GCC" = "yes" ; then
8246 # The GNU linker requires the -export-dynamic option to make
8247 # all symbols visible in the dynamic symbol table.
8248 hold_ldflags=$LDFLAGS
8249 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
91151a06 8250echo "configure:8251: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8251 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8252 cat > conftest.$ac_ext <<EOF
91151a06 8253#line 8254 "configure"
c906108c
SS
8254#include "confdefs.h"
8255
8256int main() {
8257int i;
8258; return 0; }
8259EOF
91151a06 8260if { (eval echo configure:8261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8261 rm -rf conftest*
8262 found=yes
8263else
8264 echo "configure: failed program was:" >&5
8265 cat conftest.$ac_ext >&5
8266 rm -rf conftest*
8267 found=no
8268fi
8269rm -f conftest*
8270 LDFLAGS=$hold_ldflags
8271 echo "$ac_t""$found" 1>&6
8272 if test $found = yes; then
8273 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8274 fi
8275 fi
8276 # Sun randomly tweaked the prototypes in <proc_service.h>
8277 # at one point.
8278 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
91151a06 8279echo "configure:8280: checking if <proc_service.h> is old" >&5
c906108c
SS
8280 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8281 echo $ac_n "(cached) $ac_c" 1>&6
8282else
8283
8284 cat > conftest.$ac_ext <<EOF
91151a06 8285#line 8286 "configure"
c906108c
SS
8286#include "confdefs.h"
8287
8288 #include <proc_service.h>
8289 ps_err_e ps_pdwrite
8290 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8291
8292int main() {
8293
8294; return 0; }
8295EOF
91151a06 8296if { (eval echo configure:8297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8297 rm -rf conftest*
8298 gdb_cv_proc_service_is_old=no
8299else
8300 echo "configure: failed program was:" >&5
8301 cat conftest.$ac_ext >&5
8302 rm -rf conftest*
8303 gdb_cv_proc_service_is_old=yes
8304fi
8305rm -f conftest*
8306
8307fi
8308
8309 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8310 if test $gdb_cv_proc_service_is_old = yes; then
8311 cat >> confdefs.h <<\EOF
8312#define PROC_SERVICE_IS_OLD 1
8313EOF
8314
8315 fi
8316 else
8317 echo "$ac_t""no" 1>&6
8318 fi
8319 ;;
d92419e5
JB
8320 aix*)
8321 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
91151a06 8322echo "configure:8323: checking for AiX thread debugging library" >&5
d92419e5
JB
8323 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8324 echo $ac_n "(cached) $ac_c" 1>&6
8325else
8326 cat > conftest.$ac_ext <<EOF
91151a06 8327#line 8328 "configure"
d92419e5
JB
8328#include "confdefs.h"
8329#include <sys/pthdebug.h>
8330int main() {
8331#ifndef PTHDB_VERSION_3
8332 #error
8333 #endif
8334; return 0; }
8335EOF
91151a06 8336if { (eval echo configure:8337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8337 rm -rf conftest*
8338 gdb_cv_have_aix_thread_debug=yes
8339else
8340 echo "configure: failed program was:" >&5
8341 cat conftest.$ac_ext >&5
8342 rm -rf conftest*
8343 gdb_cv_have_aix_thread_debug=no
8344fi
8345rm -f conftest*
8346fi
8347
8348 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8349 if test $gdb_cv_have_aix_thread_debug = yes; then
8350 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8351 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8352 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8353 fi
8354 ;;
c906108c
SS
8355 esac
8356
8357fi
8358
3f47be5c
EZ
8359if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8360 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
91151a06 8361echo "configure:8362: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8362if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8363 echo $ac_n "(cached) $ac_c" 1>&6
8364else
8365 cat > conftest.$ac_ext <<EOF
91151a06 8366#line 8367 "configure"
3f47be5c
EZ
8367#include "confdefs.h"
8368#include <thread_db.h>
8369int main() {
8370int i = TD_NOTALLOC;
8371; return 0; }
8372EOF
91151a06 8373if { (eval echo configure:8374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8374 rm -rf conftest*
8375 gdb_cv_thread_db_h_has_td_notalloc=yes
8376else
8377 echo "configure: failed program was:" >&5
8378 cat conftest.$ac_ext >&5
8379 rm -rf conftest*
8380 gdb_cv_thread_db_h_has_td_notalloc=no
8381
8382fi
8383rm -f conftest*
8384
8385fi
8386
8387echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8388fi
8389if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8390 cat >> confdefs.h <<\EOF
8391#define THREAD_DB_HAS_TD_NOTALLOC 1
8392EOF
8393
8394fi
8395
eb784848
DJ
8396if test $host = $target; then
8397 case $target in
8398 *-linux*)
8399 save_CFLAGS=$CFLAGS
8400 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8401 cat > conftest.$ac_ext <<EOF
91151a06 8402#line 8403 "configure"
eb784848
DJ
8403#include "confdefs.h"
8404#include <unistd.h>
8405int main() {
8406pread64 (0, NULL, 0, 0);
8407; return 0; }
8408EOF
91151a06 8409if { (eval echo configure:8410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
eb784848
DJ
8410 rm -rf conftest*
8411 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8412 cat >> confdefs.h <<\EOF
8413#define HAVE_PREAD64 1
8414EOF
8415
8416else
8417 echo "configure: failed program was:" >&5
8418 cat conftest.$ac_ext >&5
8419fi
8420rm -f conftest*
8421 CFLAGS=$save_CFLAGS
8422 ;;
8423 esac
8424fi
8425
fb40c209 8426
3b851bce
AC
8427# NOTE: Don't add -Wall or -Wunused, they both include
8428# -Wunused-parameter which reports bogus warnings.
8429# NOTE: If you add to this list, remember to update
8430# gdb/doc/gdbint.texinfo.
1decb323 8431build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8432-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8433# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8434# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8435# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8436# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8437# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8438# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8439# Check whether --enable-build-warnings or --disable-build-warnings was given.
8440if test "${enable_build_warnings+set}" = set; then
8441 enableval="$enable_build_warnings"
1decb323 8442 case "${enableval}" in
c906108c
SS
8443 yes) ;;
8444 no) build_warnings="-w";;
8445 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8446 build_warnings="${build_warnings} ${t}";;
8447 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8448 build_warnings="${t} ${build_warnings}";;
8449 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8450esac
d4f3574e 8451if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8452 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8453fi
1decb323 8454fi
3b851bce
AC
8455# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8456if test "${enable_gdb_build_warnings+set}" = set; then
8457 enableval="$enable_gdb_build_warnings"
8458 case "${enableval}" in
8459 yes) ;;
8460 no) build_warnings="-w";;
8461 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8462 build_warnings="${build_warnings} ${t}";;
8463 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8464 build_warnings="${t} ${build_warnings}";;
8465 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8466esac
8467if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8468 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8469fi
8470fi
104c1213
JM
8471WARN_CFLAGS=""
8472WERROR_CFLAGS=""
c906108c
SS
8473if test "x${build_warnings}" != x -a "x$GCC" = xyes
8474then
746a987d 8475 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
91151a06 8476echo "configure:8477: checking compiler warning flags" >&5
746a987d
AC
8477 # Separate out the -Werror flag as some files just cannot be
8478 # compiled with it enabled.
8479 for w in ${build_warnings}; do
8480 case $w in
8481 -Werr*) WERROR_CFLAGS=-Werror ;;
8482 *) # Check that GCC accepts it
4536bbc6
AC
8483 saved_CFLAGS="$CFLAGS"
8484 CFLAGS="$CFLAGS $w"
8485 cat > conftest.$ac_ext <<EOF
91151a06 8486#line 8487 "configure"
4536bbc6
AC
8487#include "confdefs.h"
8488
8489int main() {
8490
8491; return 0; }
8492EOF
91151a06 8493if { (eval echo configure:8494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8494 rm -rf conftest*
8495 WARN_CFLAGS="${WARN_CFLAGS} $w"
8496else
8497 echo "configure: failed program was:" >&5
8498 cat conftest.$ac_ext >&5
8499fi
8500rm -f conftest*
8501 CFLAGS="$saved_CFLAGS"
746a987d
AC
8502 esac
8503 done
8504 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8505fi
8506
8507
104c1213 8508
c906108c
SS
8509MMALLOC_CFLAGS=
8510MMALLOC=
8511
8512
8513
8514# Check whether --with-mmalloc or --without-mmalloc was given.
8515if test "${with_mmalloc+set}" = set; then
8516 withval="$with_mmalloc"
8517 case "${withval}" in
8518 yes) want_mmalloc=true ;;
8519 no) want_mmalloc=false;;
8520 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8521esac
8522else
8523 want_mmalloc=false
8524fi
8525
8526if test x$want_mmalloc = xtrue; then
8527 cat >> confdefs.h <<\EOF
8528#define USE_MMALLOC 1
8529EOF
8530
8531 cat >> confdefs.h <<\EOF
8532#define MMCHECK_FORCE 1
8533EOF
8534
8535 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8536 MMALLOC='../mmalloc/libmmalloc.a'
8537fi
8538
7a292a7a
SS
8539# In the Cygwin environment, we need some additional flags.
8540echo $ac_n "checking for cygwin""... $ac_c" 1>&6
91151a06 8541echo "configure:8542: checking for cygwin" >&5
7a292a7a
SS
8542if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8543 echo $ac_n "(cached) $ac_c" 1>&6
8544else
8545 cat > conftest.$ac_ext <<EOF
91151a06 8546#line 8547 "configure"
7a292a7a
SS
8547#include "confdefs.h"
8548
8549#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8550lose
8551#endif
8552EOF
8553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8554 egrep "lose" >/dev/null 2>&1; then
8555 rm -rf conftest*
8556 gdb_cv_os_cygwin=yes
8557else
8558 rm -rf conftest*
8559 gdb_cv_os_cygwin=no
8560fi
8561rm -f conftest*
8562
8563fi
8564
8565echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8566
aff38e61
AC
8567
8568SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8569case ${host} in
95cbc983
AC
8570 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8571 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8572esac
8573
8574
cd0fc7c3
SS
8575# libreadline needs libuser32.a in a cygwin environment
8576WIN32LIBS=
8577if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8578 WIN32LIBS="-luser32"
8579 case "${target}" in
8580 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8581 ;;
8582 esac
cd0fc7c3 8583fi
c906108c 8584
7a292a7a 8585
3fc11d3e
JM
8586LIBGUI="../libgui/src/libgui.a"
8587GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8588
8589
7a292a7a 8590
3fc11d3e
JM
8591# Check whether --enable-gdbtk or --disable-gdbtk was given.
8592if test "${enable_gdbtk+set}" = set; then
8593 enableval="$enable_gdbtk"
8594 case "${enableval}" in
8595 yes)
8596 case "$host" in
8597 *go32*)
8598 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8599 enable_gdbtk=no ;;
8600 *windows*)
8601 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
8602 enable_gdbtk=no ;;
8603 *)
8604 enable_gdbtk=yes ;;
8605 esac ;;
8606 no)
8607 enable_gdbtk=no ;;
8608 *)
8609 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8610esac
8611else
8612
8613# Default is on for everything but go32 and Cygwin
8614case "$host" in
8615 *go32* | *windows*)
8616 ;;
8617 *)
379d6434
AC
8618 if test -d "${srcdir}/gdbtk" ; then
8619 enable_gdbtk=yes
8620 fi
8621 ;;
8622esac
3fc11d3e
JM
8623
8624fi
8625
8626
8627WIN32LDAPP=
8628
8629
8630
8631configdir="unix"
8632
8633GDBTKLIBS=
8634if test "${enable_gdbtk}" = "yes"; then
8635
d1c3b63a
KS
8636 # Gdbtk must have an absolute path to srcdir in order to run
8637 # properly when not installed.
8638 here=`pwd`
8639 cd ${srcdir}
8640 GDBTK_SRC_DIR=`pwd`
8641 cd $here
8642
3fc11d3e
JM
8643
8644#
8645# Ok, lets find the tcl configuration
8646# First, look for one uninstalled.
8647# the alternative search directory is invoked by --with-tclconfig
8648#
8649
8650if test x"${no_tcl}" = x ; then
8651 # we reset no_tcl in case something fails here
8652 no_tcl=true
8653 # Check whether --with-tclconfig or --without-tclconfig was given.
8654if test "${with_tclconfig+set}" = set; then
8655 withval="$with_tclconfig"
8656 with_tclconfig=${withval}
8657fi
8658
8659 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
91151a06 8660echo "configure:8661: checking for Tcl configuration" >&5
3fc11d3e
JM
8661 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8662 echo $ac_n "(cached) $ac_c" 1>&6
8663else
8664
8665
8666 # First check to see if --with-tclconfig was specified.
8667 if test x"${with_tclconfig}" != x ; then
8668 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8669 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8670 else
8671 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8672 fi
8673 fi
8674
8675 # then check for a private Tcl installation
8676 if test x"${ac_cv_c_tclconfig}" = x ; then
8677 for i in \
8678 ../tcl \
8679 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8680 ../../tcl \
8681 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8682 ../../../tcl \
8683 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8684 if test -f "$i/${configdir}/tclConfig.sh" ; then
8685 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8686 break
8687 fi
8688 done
8689 fi
8690 # check in a few common install locations
8691 if test x"${ac_cv_c_tclconfig}" = x ; then
8692 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8693 if test -f "$i/tclConfig.sh" ; then
8694 ac_cv_c_tclconfig=`(cd $i; pwd)`
8695 break
8696 fi
8697 done
8698 fi
8699 # check in a few other private locations
8700 if test x"${ac_cv_c_tclconfig}" = x ; then
8701 for i in \
8702 ${srcdir}/../tcl \
8703 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8704 if test -f "$i/${configdir}/tclConfig.sh" ; then
8705 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8706 break
8707 fi
8708 done
8709 fi
8710
8711fi
8712
8713 if test x"${ac_cv_c_tclconfig}" = x ; then
8714 TCLCONFIG="# no Tcl configs found"
8715 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8716 else
8717 no_tcl=
8718 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8719 echo "$ac_t""found $TCLCONFIG" 1>&6
8720 fi
8721fi
8722
8723 if test -z "${no_tcl}"; then
8724
8725 . $TCLCONFIG
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752#
8753# Ok, lets find the tk configuration
8754# First, look for one uninstalled.
8755# the alternative search directory is invoked by --with-tkconfig
8756#
8757
8758if test x"${no_tk}" = x ; then
8759 # we reset no_tk in case something fails here
8760 no_tk=true
8761 # Check whether --with-tkconfig or --without-tkconfig was given.
8762if test "${with_tkconfig+set}" = set; then
8763 withval="$with_tkconfig"
8764 with_tkconfig=${withval}
8765fi
8766
8767 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
91151a06 8768echo "configure:8769: checking for Tk configuration" >&5
3fc11d3e
JM
8769 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8770 echo $ac_n "(cached) $ac_c" 1>&6
8771else
8772
8773
8774 # First check to see if --with-tkconfig was specified.
8775 if test x"${with_tkconfig}" != x ; then
8776 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8777 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8778 else
8779 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8780 fi
8781 fi
8782
8783 # then check for a private Tk library
8784 if test x"${ac_cv_c_tkconfig}" = x ; then
8785 for i in \
8786 ../tk \
8787 `ls -dr ../tk[4-9]* 2>/dev/null` \
8788 ../../tk \
8789 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8790 ../../../tk \
8791 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8792 if test -f "$i/${configdir}/tkConfig.sh" ; then
8793 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8794 break
8795 fi
8796 done
8797 fi
8798 # check in a few common install locations
8799 if test x"${ac_cv_c_tkconfig}" = x ; then
8800 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8801 if test -f "$i/tkConfig.sh" ; then
8802 ac_cv_c_tkconfig=`(cd $i; pwd)`
8803 break
8804 fi
8805 done
8806 fi
8807 # check in a few other private locations
8808 if test x"${ac_cv_c_tkconfig}" = x ; then
8809 for i in \
8810 ${srcdir}/../tk \
8811 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8812 if test -f "$i/${configdir}/tkConfig.sh" ; then
8813 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8814 break
8815 fi
8816 done
8817 fi
8818
8819fi
8820
8821 if test x"${ac_cv_c_tkconfig}" = x ; then
8822 TKCONFIG="# no Tk configs found"
8823 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8824 else
8825 no_tk=
8826 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8827 echo "$ac_t""found $TKCONFIG" 1>&6
8828 fi
8829fi
8830
8831
8832
dd2504ab
JM
8833 # now look for Tcl library stuff
8834
8835 case "${host}" in
8836 *-*-cygwin*)
8837 tcldir=../tcl/win/
8838 ;;
8839 *)
8840 tcldir=../tcl/unix/
8841 ;;
8842 esac
8843
8844 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8845
3fc11d3e
JM
8846 # If $no_tk is nonempty, then we can't do Tk, and there is no
8847 # point to doing Tcl.
8848 if test -z "${no_tk}"; then
8849
8850 if test -f "$TKCONFIG" ; then
8851 . $TKCONFIG
8852 fi
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867#
8868# Ok, lets find the tcl source trees so we can use the headers
8869# Warning: transition of version 9 to 10 will break this algorithm
8870# because 10 sorts before 9. We also look for just tcl. We have to
8871# be careful that we don't match stuff like tclX by accident.
8872# the alternative search directory is involked by --with-tclinclude
8873#
8874
8875no_tcl=true
8876echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
91151a06 8877echo "configure:8878: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
8878# Check whether --with-tclinclude or --without-tclinclude was given.
8879if test "${with_tclinclude+set}" = set; then
8880 withval="$with_tclinclude"
8881 with_tclinclude=${withval}
8882fi
8883
8884if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8885 echo $ac_n "(cached) $ac_c" 1>&6
8886else
8887
8888# first check to see if --with-tclinclude was specified
8889if test x"${with_tclinclude}" != x ; then
8890 if test -f ${with_tclinclude}/tclInt.h ; then
8891 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8892 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8893 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8894 else
8895 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8896 fi
8897fi
8898
8899# next check if it came with Tcl configuration file
8900if test x"${ac_cv_c_tclconfig}" = x ; then
8901 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8902 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8903 fi
8904fi
8905
8906# next check in private source directory
8907#
8908# since ls returns lowest version numbers first, reverse its output
8909if test x"${ac_cv_c_tclh}" = x ; then
8910 for i in \
8911 ${srcdir}/../tcl \
8912 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8913 ${srcdir}/../../tcl \
8914 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8915 ${srcdir}/../../../tcl \
8916 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8917 if test -f $i/generic/tclInt.h ; then
8918 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8919 break
8920 fi
8921 done
8922fi
8923# finally check in a few common install locations
8924#
8925# since ls returns lowest version numbers first, reverse its output
8926if test x"${ac_cv_c_tclh}" = x ; then
8927 for i in \
8928 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8929 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8930 /usr/local/src/tcl \
8931 /usr/local/lib/tcl \
8932 ${prefix}/include ; do
8933 if test -f $i/generic/tclInt.h ; then
8934 ac_cv_c_tclh=`(cd $i/generic; pwd)`
8935 break
8936 fi
8937 done
8938fi
8939# see if one is installed
8940if test x"${ac_cv_c_tclh}" = x ; then
8941 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
8942echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
91151a06 8943echo "configure:8944: checking for tclInt.h" >&5
3fc11d3e
JM
8944if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8945 echo $ac_n "(cached) $ac_c" 1>&6
8946else
8947 cat > conftest.$ac_ext <<EOF
91151a06 8948#line 8949 "configure"
3fc11d3e
JM
8949#include "confdefs.h"
8950#include <tclInt.h>
8951EOF
8952ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 8953{ (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
8954ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8955if test -z "$ac_err"; then
8956 rm -rf conftest*
8957 eval "ac_cv_header_$ac_safe=yes"
8958else
8959 echo "$ac_err" >&5
8960 echo "configure: failed program was:" >&5
8961 cat conftest.$ac_ext >&5
8962 rm -rf conftest*
8963 eval "ac_cv_header_$ac_safe=no"
8964fi
8965rm -f conftest*
8966fi
8967if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8968 echo "$ac_t""yes" 1>&6
8969 ac_cv_c_tclh=installed
8970else
8971 echo "$ac_t""no" 1>&6
8972ac_cv_c_tclh=""
8973fi
8974
8975fi
8976
8977fi
8978
8979if test x"${ac_cv_c_tclh}" = x ; then
8980 TCLHDIR="# no Tcl private headers found"
8981 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
8982fi
8983if test x"${ac_cv_c_tclh}" != x ; then
8984 no_tcl=""
8985 if test x"${ac_cv_c_tclh}" = x"installed" ; then
8986 echo "$ac_t""is installed" 1>&6
8987 TCLHDIR=""
8988 else
8989 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
8990 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
8991 TCLHDIR="-I${ac_cv_c_tclh}"
8992 fi
8993fi
8994
8995
8996
8997
8998#
8999# Ok, lets find the tk source trees so we can use the headers
9000# If the directory (presumably symlink) named "tk" exists, use that one
9001# in preference to any others. Same logic is used when choosing library
9002# and again with Tcl. The search order is the best place to look first, then in
9003# decreasing significance. The loop breaks if the trigger file is found.
9004# Note the gross little conversion here of srcdir by cd'ing to the found
9005# directory. This converts the path from a relative to an absolute, so
9006# recursive cache variables for the path will work right. We check all
9007# the possible paths in one loop rather than many seperate loops to speed
9008# things up.
9009# the alternative search directory is involked by --with-tkinclude
9010#
9011no_tk=true
9012echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
91151a06 9013echo "configure:9014: checking for Tk private headers" >&5
3fc11d3e
JM
9014# Check whether --with-tkinclude or --without-tkinclude was given.
9015if test "${with_tkinclude+set}" = set; then
9016 withval="$with_tkinclude"
9017 with_tkinclude=${withval}
9018fi
9019
9020if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9021 echo $ac_n "(cached) $ac_c" 1>&6
9022else
9023
9024# first check to see if --with-tkinclude was specified
9025if test x"${with_tkinclude}" != x ; then
9026 if test -f ${with_tkinclude}/tk.h ; then
9027 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9028 elif test -f ${with_tkinclude}/generic/tk.h ; then
9029 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9030 else
9031 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9032 fi
9033fi
9034
9035# next check if it came with Tk configuration file
9036if test x"${ac_cv_c_tkconfig}" = x ; then
9037 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9038 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9039 fi
9040fi
9041
9042# next check in private source directory
9043#
9044# since ls returns lowest version numbers first, reverse its output
9045if test x"${ac_cv_c_tkh}" = x ; then
9046 for i in \
9047 ${srcdir}/../tk \
9048 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9049 ${srcdir}/../../tk \
9050 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9051 ${srcdir}/../../../tk \
9052 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9053 if test -f $i/generic/tk.h ; then
9054 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9055 break
9056 fi
9057 done
9058fi
9059# finally check in a few common install locations
9060#
9061# since ls returns lowest version numbers first, reverse its output
9062if test x"${ac_cv_c_tkh}" = x ; then
9063 for i in \
9064 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9065 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9066 /usr/local/src/tk \
9067 /usr/local/lib/tk \
9068 ${prefix}/include ; do
9069 if test -f $i/generic/tk.h ; then
9070 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9071 break
9072 fi
9073 done
9074fi
9075# see if one is installed
9076if test x"${ac_cv_c_tkh}" = x ; then
9077 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9078echo $ac_n "checking for tk.h""... $ac_c" 1>&6
91151a06 9079echo "configure:9080: checking for tk.h" >&5
3fc11d3e
JM
9080if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9081 echo $ac_n "(cached) $ac_c" 1>&6
9082else
9083 cat > conftest.$ac_ext <<EOF
91151a06 9084#line 9085 "configure"
3fc11d3e
JM
9085#include "confdefs.h"
9086#include <tk.h>
9087EOF
9088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 9089{ (eval echo configure:9090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9090ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9091if test -z "$ac_err"; then
9092 rm -rf conftest*
9093 eval "ac_cv_header_$ac_safe=yes"
9094else
9095 echo "$ac_err" >&5
9096 echo "configure: failed program was:" >&5
9097 cat conftest.$ac_ext >&5
9098 rm -rf conftest*
9099 eval "ac_cv_header_$ac_safe=no"
9100fi
9101rm -f conftest*
9102fi
9103if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9104 echo "$ac_t""yes" 1>&6
9105 ac_cv_c_tkh=installed
9106else
9107 echo "$ac_t""no" 1>&6
9108ac_cv_c_tkh=""
9109fi
9110
9111fi
9112
9113fi
9114
9115if test x"${ac_cv_c_tkh}" != x ; then
9116 no_tk=""
9117 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9118 echo "$ac_t""is installed" 1>&6
9119 TKHDIR=""
9120 else
9121 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9122 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9123 TKHDIR="-I${ac_cv_c_tkh}"
9124 fi
9125else
9126 TKHDIR="# no Tk directory found"
9127 echo "configure: warning: Can't find Tk private headers" 1>&2
9128 no_tk=true
9129fi
9130
9131
9132
9133
9134echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
91151a06 9135echo "configure:9136: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9136if test x"${ac_cv_c_itclh}" = x ; then
9137 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9138 if test -f $i/generic/itcl.h ; then
9139 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9140 break
9141 fi
9142 done
9143fi
9144if test x"${ac_cv_c_itclh}" = x ; then
9145 ITCLHDIR="# no Itcl private headers found"
9146 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9147fi
9148if test x"${ac_cv_c_itclh}" != x ; then
9149 ITCLHDIR="-I${ac_cv_c_itclh}"
9150fi
9151# should always be here
9152# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9153
9154#AC_SUBST(ITCLLIB)
9155
9156
9157echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
91151a06 9158echo "configure:9159: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9159if test x"${ac_cv_c_itkh}" = x ; then
9160 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9161 if test -f $i/generic/itk.h ; then
9162 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9163 break
9164 fi
9165 done
9166fi
9167if test x"${ac_cv_c_itkh}" = x ; then
9168 ITKHDIR="# no Itk private headers found"
9169 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9170fi
9171if test x"${ac_cv_c_itkh}" != x ; then
9172 ITKHDIR="-I${ac_cv_c_itkh}"
9173fi
9174# should always be here
9175# ITKLIB="../itcl/itk/unix/libitk.a"
9176
9177#AC_SUBST(ITKLIB)
9178
3fc11d3e 9179
dd2504ab
JM
9180
9181 # now look for Tk library stuff
9182
9183 case "${host}" in
9184 *-*-cygwin*)
9185 tkdir=../tk/win/
9186 ;;
9187 *)
9188 tkdir=../tk/unix/
9189 ;;
9190 esac
9191
9192 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9193
3fc11d3e
JM
9194 # now look for Itcl library stuff
9195
9196
9197#
9198# Ok, lets find the itcl configuration
9199# First, look for one uninstalled.
9200# the alternative search directory is invoked by --with-itclconfig
9201#
9202
9203if test x"${no_itcl}" = x ; then
9204 # we reset no_itcl in case something fails here
9205 no_itcl=true
9206 # Check whether --with-itclconfig or --without-itclconfig was given.
9207if test "${with_itclconfig+set}" = set; then
9208 withval="$with_itclconfig"
9209 with_itclconfig=${withval}
9210fi
9211
9212 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
91151a06 9213echo "configure:9214: checking for Itcl configuration" >&5
3fc11d3e
JM
9214 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9215 echo $ac_n "(cached) $ac_c" 1>&6
9216else
9217
9218
9219 # First check to see if --with-itclconfig was specified.
9220 if test x"${with_itclconfig}" != x ; then
9221 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9222 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9223 else
9224 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9225 fi
9226 fi
9227
9228 # then check for a private Itcl library
9229 if test x"${ac_cv_c_itclconfig}" = x ; then
9230 for i in \
9231 ../itcl/itcl \
9232 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9233 ../../itcl \
9234 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9235 ../../../itcl \
9236 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9237 if test -f "$i/itclConfig.sh" ; then
9238 ac_cv_c_itclconfig=`(cd $i; pwd)`
9239 break
9240 fi
9241 done
9242 fi
9243 # check in a few common install locations
9244 if test x"${ac_cv_c_itclconfig}" = x ; then
9245 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9246 if test -f "$i/itclConfig.sh" ; then
9247 ac_cv_c_itclconfig=`(cd $i; pwd)`
9248 break
9249 fi
9250 done
9251 fi
9252 # check in a few other private locations
9253 if test x"${ac_cv_c_itclconfig}" = x ; then
9254 for i in \
9255 ${srcdir}/../itcl/itcl \
9256 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9257 if test -f "$i/itclConfig.sh" ; then
9258 ac_cv_c_itclconfig=`(cd $i; pwd)`
9259 break
9260 fi
9261 done
9262 fi
9263
9264fi
9265
9266 if test x"${ac_cv_c_itclconfig}" = x ; then
9267 ITCLCONFIG="# no Itcl configs found"
9268 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9269 else
9270 no_itcl=
9271 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9272 echo "$ac_t""found $ITCLCONFIG" 1>&6
9273 fi
9274fi
9275
9276 if test -z "${no_itcl}"; then
9277
9278 if test -f "$ITCLCONFIG" ; then
9279 . $ITCLCONFIG
9280 fi
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
3fc11d3e
JM
9291
9292
9293 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9294 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9295 fi
9296
9297
9298 # now look for Itk library stuff
9299
9300#
9301# Ok, lets find the itk configuration
9302# First, look for one uninstalled.
9303# the alternative search directory is invoked by --with-itkconfig
9304#
9305
9306if test x"${no_itk}" = x ; then
9307 # we reset no_itk in case something fails here
9308 no_itk=true
9309 # Check whether --with-itkconfig or --without-itkconfig was given.
9310if test "${with_itkconfig+set}" = set; then
9311 withval="$with_itkconfig"
9312 with_itkconfig=${withval}
9313fi
9314
9315 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
91151a06 9316echo "configure:9317: checking for Itk configuration" >&5
3fc11d3e
JM
9317 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9318 echo $ac_n "(cached) $ac_c" 1>&6
9319else
9320
9321
9322 # First check to see if --with-itkconfig was specified.
9323 if test x"${with_itkconfig}" != x ; then
9324 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9325 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9326 else
9327 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9328 fi
9329 fi
9330
9331 # then check for a private Itk library
9332 if test x"${ac_cv_c_itkconfig}" = x ; then
9333 for i in \
9334 ../itcl/itk \
9335 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9336 ../../itk \
9337 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9338 ../../../itk \
9339 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9340 if test -f "$i/itkConfig.sh" ; then
9341 ac_cv_c_itkconfig=`(cd $i; pwd)`
9342 break
9343 fi
9344 done
9345 fi
9346 # check in a few common install locations
9347 if test x"${ac_cv_c_itkconfig}" = x ; then
9348 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9349 if test -f "$i/itkConfig.sh" ; then
9350 ac_cv_c_itkconfig=`(cd $i; pwd)`
9351 break
9352 fi
9353 done
9354 fi
9355 # check in a few other private locations
9356 if test x"${ac_cv_c_itkconfig}" = x ; then
9357 for i in \
9358 ${srcdir}/../itcl/itk \
9359 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9360 if test -f "$i/itkConfig.sh" ; then
9361 ac_cv_c_itkconfig=`(cd $i; pwd)`
9362 break
9363 fi
9364 done
9365 fi
9366
9367fi
9368
9369 if test x"${ac_cv_c_itkconfig}" = x ; then
9370 ITKCONFIG="# no Itk configs found"
9371 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9372 else
9373 no_itk=
9374 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9375 echo "$ac_t""found $ITKCONFIG" 1>&6
9376 fi
9377fi
9378
9379
9380 if test -z "${no_itcl}"; then
9381
9382 if test -f "$ITKCONFIG" ; then
9383 . $ITKCONFIG
9384 fi
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
3fc11d3e 9397 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9398 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9399 fi
9400
4226a5a5 9401 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9402 # Tcl/Tk 8.1 require -fwritable strings. I don't
9403 # know whether 8.2 will or not, but I bet it will.
9404 # I don't have to worry about 7.x since we don't support it.
9405 GDBTK_CFLAGS=""
9406 if test "$GCC" = "yes"; then
9407 if test "$TCL_VERSION" != "8.0" ; then
9408 GDBTK_CFLAGS="-fwritable-strings"
9409 fi
9410 fi
9411
9412 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9413 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9414 # Yes, the ordering seems wrong here. But it isn't.
9415 # TK_LIBS is the list of libraries that need to be linked
9416 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9417 # were in LIBS then any link tests after this point would
9418 # try to include things like `$(LIBGUI)', which wouldn't work.
9419 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9420
9421 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9422 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9423 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9424 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9425 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9426 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9427 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9428 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9429
9430 if test x$gdb_cv_os_cygwin = xyes; then
9431 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9432 WIN32LDAPP="-Wl,--subsystem,console"
9433 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9434 fi
9435 fi
9436 fi
ffc6a242
KS
9437
9438 SUBDIRS="${SUBDIRS} gdbtk"
9439 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9440fi
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
dd2504ab 9454
c906108c
SS
9455# If we find X, set shell vars x_includes and x_libraries to the
9456# paths, otherwise set no_x=yes.
9457# Uses ac_ vars as temps to allow command line to override cache and checks.
9458# --without-x overrides everything else, but does not touch the cache.
9459echo $ac_n "checking for X""... $ac_c" 1>&6
91151a06 9460echo "configure:9461: checking for X" >&5
c906108c
SS
9461
9462# Check whether --with-x or --without-x was given.
9463if test "${with_x+set}" = set; then
9464 withval="$with_x"
9465 :
9466fi
9467
9468# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9469if test "x$with_x" = xno; then
9470 # The user explicitly disabled X.
9471 have_x=disabled
9472else
9473 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9474 # Both variables are already set.
9475 have_x=yes
9476 else
9477if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9478 echo $ac_n "(cached) $ac_c" 1>&6
9479else
9480 # One or both of the vars are not set, and there is no cached value.
9481ac_x_includes=NO ac_x_libraries=NO
9482rm -fr conftestdir
9483if mkdir conftestdir; then
9484 cd conftestdir
9485 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9486 cat > Imakefile <<'EOF'
9487acfindx:
9488 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9489EOF
9490 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9491 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9492 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9493 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9494 for ac_extension in a so sl; do
9495 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9496 test -f $ac_im_libdir/libX11.$ac_extension; then
9497 ac_im_usrlibdir=$ac_im_libdir; break
9498 fi
9499 done
9500 # Screen out bogus values from the imake configuration. They are
9501 # bogus both because they are the default anyway, and because
9502 # using them would break gcc on systems where it needs fixed includes.
9503 case "$ac_im_incroot" in
9504 /usr/include) ;;
9505 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9506 esac
9507 case "$ac_im_usrlibdir" in
9508 /usr/lib | /lib) ;;
9509 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9510 esac
9511 fi
9512 cd ..
9513 rm -fr conftestdir
9514fi
9515
9516if test "$ac_x_includes" = NO; then
9517 # Guess where to find include files, by looking for this one X11 .h file.
9518 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9519
9520 # First, try using that file with no special directory specified.
9521cat > conftest.$ac_ext <<EOF
91151a06 9522#line 9523 "configure"
c906108c
SS
9523#include "confdefs.h"
9524#include <$x_direct_test_include>
9525EOF
9526ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
91151a06 9527{ (eval echo configure:9528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9528ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9529if test -z "$ac_err"; then
9530 rm -rf conftest*
9531 # We can compile using X headers with no special include directory.
9532ac_x_includes=
9533else
9534 echo "$ac_err" >&5
9535 echo "configure: failed program was:" >&5
9536 cat conftest.$ac_ext >&5
9537 rm -rf conftest*
9538 # Look for the header file in a standard set of common directories.
9539# Check X11 before X11Rn because it is often a symlink to the current release.
9540 for ac_dir in \
9541 /usr/X11/include \
9542 /usr/X11R6/include \
9543 /usr/X11R5/include \
9544 /usr/X11R4/include \
9545 \
9546 /usr/include/X11 \
9547 /usr/include/X11R6 \
9548 /usr/include/X11R5 \
9549 /usr/include/X11R4 \
9550 \
9551 /usr/local/X11/include \
9552 /usr/local/X11R6/include \
9553 /usr/local/X11R5/include \
9554 /usr/local/X11R4/include \
9555 \
9556 /usr/local/include/X11 \
9557 /usr/local/include/X11R6 \
9558 /usr/local/include/X11R5 \
9559 /usr/local/include/X11R4 \
9560 \
9561 /usr/X386/include \
9562 /usr/x386/include \
9563 /usr/XFree86/include/X11 \
9564 \
9565 /usr/include \
9566 /usr/local/include \
9567 /usr/unsupported/include \
9568 /usr/athena/include \
9569 /usr/local/x11r5/include \
9570 /usr/lpp/Xamples/include \
9571 \
9572 /usr/openwin/include \
9573 /usr/openwin/share/include \
9574 ; \
9575 do
9576 if test -r "$ac_dir/$x_direct_test_include"; then
9577 ac_x_includes=$ac_dir
9578 break
9579 fi
9580 done
9581fi
9582rm -f conftest*
9583fi # $ac_x_includes = NO
9584
9585if test "$ac_x_libraries" = NO; then
9586 # Check for the libraries.
9587
9588 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9589 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9590
9591 # See if we find them without any special options.
9592 # Don't add to $LIBS permanently.
9593 ac_save_LIBS="$LIBS"
9594 LIBS="-l$x_direct_test_library $LIBS"
9595cat > conftest.$ac_ext <<EOF
91151a06 9596#line 9597 "configure"
c906108c
SS
9597#include "confdefs.h"
9598
9599int main() {
9600${x_direct_test_function}()
9601; return 0; }
9602EOF
91151a06 9603if { (eval echo configure:9604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9604 rm -rf conftest*
9605 LIBS="$ac_save_LIBS"
9606# We can link X programs with no special library path.
9607ac_x_libraries=
9608else
9609 echo "configure: failed program was:" >&5
9610 cat conftest.$ac_ext >&5
9611 rm -rf conftest*
9612 LIBS="$ac_save_LIBS"
9613# First see if replacing the include by lib works.
9614# Check X11 before X11Rn because it is often a symlink to the current release.
9615for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9616 /usr/X11/lib \
9617 /usr/X11R6/lib \
9618 /usr/X11R5/lib \
9619 /usr/X11R4/lib \
9620 \
9621 /usr/lib/X11 \
9622 /usr/lib/X11R6 \
9623 /usr/lib/X11R5 \
9624 /usr/lib/X11R4 \
9625 \
9626 /usr/local/X11/lib \
9627 /usr/local/X11R6/lib \
9628 /usr/local/X11R5/lib \
9629 /usr/local/X11R4/lib \
9630 \
9631 /usr/local/lib/X11 \
9632 /usr/local/lib/X11R6 \
9633 /usr/local/lib/X11R5 \
9634 /usr/local/lib/X11R4 \
9635 \
9636 /usr/X386/lib \
9637 /usr/x386/lib \
9638 /usr/XFree86/lib/X11 \
9639 \
9640 /usr/lib \
9641 /usr/local/lib \
9642 /usr/unsupported/lib \
9643 /usr/athena/lib \
9644 /usr/local/x11r5/lib \
9645 /usr/lpp/Xamples/lib \
9646 /lib/usr/lib/X11 \
9647 \
9648 /usr/openwin/lib \
9649 /usr/openwin/share/lib \
9650 ; \
9651do
9652 for ac_extension in a so sl; do
9653 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9654 ac_x_libraries=$ac_dir
9655 break 2
9656 fi
9657 done
9658done
9659fi
9660rm -f conftest*
9661fi # $ac_x_libraries = NO
9662
9663if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9664 # Didn't find X anywhere. Cache the known absence of X.
9665 ac_cv_have_x="have_x=no"
9666else
9667 # Record where we found X for the cache.
9668 ac_cv_have_x="have_x=yes \
9669 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9670fi
9671fi
9672 fi
9673 eval "$ac_cv_have_x"
9674fi # $with_x != no
9675
9676if test "$have_x" != yes; then
9677 echo "$ac_t""$have_x" 1>&6
9678 no_x=yes
9679else
9680 # If each of the values was on the command line, it overrides each guess.
9681 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9682 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9683 # Update the cache value to reflect the command line values.
9684 ac_cv_have_x="have_x=yes \
9685 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9686 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9687fi
9688
9689
7a292a7a
SS
9690
9691# Unlike the sim directory, whether a simulator is linked is controlled by
9692# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9693# This code just checks for a few cases where we'd like to ignore those
9694# definitions, even when they're present in the '.mt' file. These cases
9695# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9696# not part of the source tree.
7a292a7a
SS
9697#
9698# Check whether --enable-sim or --disable-sim was given.
9699if test "${enable_sim+set}" = set; then
9700 enableval="$enable_sim"
9701 echo "enable_sim = $enable_sim";
9702 echo "enableval = ${enableval}";
9703 case "${enableval}" in
9704 yes) ignore_sim=false ;;
9705 no) ignore_sim=true ;;
9706 *) ignore_sim=false ;;
9707 esac
9708else
9709 ignore_sim=false
9710fi
9711
9712
9713if test ! -d "${srcdir}/../sim"; then
9714 ignore_sim=true
9715fi
9716
9717if test "${ignore_sim}" = "true"; then
9718 IGNORE_SIM="SIM="
9719 IGNORE_SIM_OBS="SIM_OBS="
9720else
9721 IGNORE_SIM=""
9722 IGNORE_SIM_OBS=""
9723 cat >> confdefs.h <<\EOF
9724#define WITH_SIM 1
9725EOF
9726
9727fi
9728
9729
9730
c906108c
SS
9731
9732
9733
9734
9735
9736
dfcd3bfb 9737
e56ac5c3
AC
9738
9739
b3a90332
AC
9740
9741
b46cd165 9742
c906108c
SS
9743# Begin stuff to support --enable-shared
9744# Check whether --enable-shared or --disable-shared was given.
9745if test "${enable_shared+set}" = set; then
9746 enableval="$enable_shared"
9747 case "${enableval}" in
9748 yes) shared=true ;;
9749 no) shared=false ;;
9750 *) shared=true ;;
9751esac
9752fi
9753
9754HLDFLAGS=
9755HLDENV=
9756# If we have shared libraries, try to set rpath reasonably.
9757if test "${shared}" = "true"; then
9758 case "${host}" in
9759 *-*-hpux*)
9760 HLDFLAGS='-Wl,+s,+b,$(libdir)'
9761 ;;
9762 *-*-irix5* | *-*-irix6*)
9763 HLDFLAGS='-Wl,-rpath,$(libdir)'
9764 ;;
9765 *-*-linux*aout*)
9766 ;;
88987551 9767 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
9768 HLDFLAGS='-Wl,-rpath,$(libdir)'
9769 ;;
9770 *-*-solaris*)
9771 HLDFLAGS='-R $(libdir)'
9772 ;;
9773 *-*-sysv4*)
9774 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
9775 ;;
9776 esac
9777fi
9778
9779# On SunOS, if the linker supports the -rpath option, use it to
9780# prevent ../bfd and ../opcodes from being included in the run time
9781# search path.
9782case "${host}" in
9783 *-*-sunos*)
9784 echo 'main () { }' > conftest.c
9785 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9786 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9787 :
9788 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9789 :
9790 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9791 :
9792 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9793 :
9794 elif test "${shared}" = "true"; then
9795 HLDFLAGS='-Wl,-rpath=$(libdir)'
9796 else
9797 HLDFLAGS='-Wl,-rpath='
9798 fi
9799 rm -f conftest.t conftest.c conftest
9800 ;;
9801esac
9802
9803
9804# End stuff to support --enable-shared
9805
9806# target_subdir is used by the testsuite to find the target libraries.
9807target_subdir=
9808if test "${host}" != "${target}"; then
9809 target_subdir="${target_alias}/"
9810fi
9811
9812
9813frags=
9814host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9815if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9816 # When building a native debuger the .mh file containing things
9817 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9818 # since it no longer contains anything useful.
9819 if test "${target}" = "${host}"; then
9820 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9821 else
9822 host_makefile_frag=/dev/null
9823 fi
c906108c
SS
9824fi
9825frags="$frags $host_makefile_frag"
9826
9827target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9828if test ! -f ${target_makefile_frag}; then
9829{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9830fi
9831frags="$frags $target_makefile_frag"
9832
9833
9834
9835
9836
9837hostfile=`sed -n '
9838s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9839' ${host_makefile_frag}`
9840
9841targetfile=`sed -n '
9842s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9843' ${target_makefile_frag}`
9844
6166d547
AC
9845GDB_MULTI_ARCH=`sed -n '
9846s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9847' ${target_makefile_frag}`
9848
c906108c 9849if test "${target}" = "${host}"; then
a85f51e7
DJ
9850# We pick this up from the host configuration file (.mh) because we
9851# do not have a native configuration Makefile fragment.
c906108c
SS
9852nativefile=`sed -n '
9853s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9854' ${host_makefile_frag}`
c906108c
SS
9855fi
9856
9857
6166d547
AC
9858# New targets should just set gdb_multi_arch=yes in configure.tgt.
9859# Old targets being converted can either do that or set GDB_MULTI_ARCH
9860# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9861# will be the default.
9862if test x"${GDB_MULTI_ARCH}" = x ; then
9863 case "${gdb_multi_arch}" in
9864 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9865 no ) GDB_MULTI_ARCH=0 ;;
9866 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9867 esac
9868fi
9869if test x"${GDB_MULTI_ARCH}" != x ; then
9870 cat >> confdefs.h <<EOF
9871#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9872EOF
9873
9874fi
6c5cfe5b 9875# Warn the user when they use an old practice
6166d547
AC
9876case "${GDB_MULTI_ARCH}" in
9877 "" ) ;;
9878 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9879 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9880 GDB_MULTI_ARCH_PURE )
9881 if test x"${targetfile}" != x ; then
6c5cfe5b 9882 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9883 targetfile=""
6166d547
AC
9884 fi ;;
9885 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9886esac
9887
96baa820
JM
9888if test "${enable_multi_ice}" = "yes"; then
9889 SUBDIRS="${SUBDIRS} multi-ice"
9890fi
9891
a85f51e7
DJ
9892# ``gdbserver'' can only be built in a native configuration.
9893if test x"${target}" = x"${host}"; then
9894 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
91151a06 9895echo "configure:9896: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
9896 if test x"${build_gdbserver}" = xyes ; then
9897 configdirs="${configdirs} gdbserver"
9898 SUBDIRS="${SUBDIRS} gdbserver"
9899 echo "$ac_t""yes" 1>&6
9900 else
9901 echo "$ac_t""no" 1>&6
9902 fi
9903fi
9904
96baa820
JM
9905
9906
c906108c 9907# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
9908# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9909# version.
c906108c
SS
9910
9911files=
9912links=
5a2402b8 9913
c906108c 9914rm -f xm.h
5a2402b8 9915xm_h=""
c906108c 9916if test "${hostfile}" != ""; then
5a2402b8
AC
9917 xm_h=xm.h
9918 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9919 files="${files} ${GDB_XM_FILE}"
9920 links="${links} xm.h"
9921 cat >> confdefs.h <<EOF
9922#define GDB_XM_FILE ${GDB_XM_FILE}
9923EOF
9924
c906108c 9925fi
5a2402b8
AC
9926
9927
c906108c 9928rm -f tm.h
5a2402b8 9929tm_h=""
c906108c 9930if test "${targetfile}" != ""; then
5a2402b8
AC
9931 tm_h=tm.h
9932 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9933 files="${files} ${GDB_TM_FILE}"
9934 links="${links} tm.h"
9935 cat >> confdefs.h <<EOF
9936#define GDB_TM_FILE ${GDB_TM_FILE}
9937EOF
9938
c906108c 9939fi
5a2402b8
AC
9940
9941
c906108c 9942rm -f nm.h
5a2402b8 9943nm_h=""
c906108c 9944if test "${nativefile}" != ""; then
5a2402b8
AC
9945 nm_h=nm.h
9946 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
9947 files="${files} ${GDB_NM_FILE}"
9948 links="${links} nm.h"
9949 cat >> confdefs.h <<EOF
9950#define GDB_NM_FILE ${GDB_NM_FILE}
9951EOF
9952
c906108c 9953fi
5a2402b8
AC
9954
9955
c906108c
SS
9956
9957
9958echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
91151a06 9959echo "configure:9960: checking for Cygwin environment" >&5
c906108c
SS
9960if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
9961 echo $ac_n "(cached) $ac_c" 1>&6
9962else
9963 cat > conftest.$ac_ext <<EOF
91151a06 9964#line 9965 "configure"
c906108c
SS
9965#include "confdefs.h"
9966
9967int main() {
9968
9969#ifndef __CYGWIN__
9970#define __CYGWIN__ __CYGWIN32__
9971#endif
9972return __CYGWIN__;
9973; return 0; }
9974EOF
91151a06 9975if { (eval echo configure:9976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
9976 rm -rf conftest*
9977 ac_cv_cygwin=yes
9978else
9979 echo "configure: failed program was:" >&5
9980 cat conftest.$ac_ext >&5
9981 rm -rf conftest*
9982 ac_cv_cygwin=no
9983fi
9984rm -f conftest*
9985rm -f conftest*
9986fi
9987
9988echo "$ac_t""$ac_cv_cygwin" 1>&6
9989CYGWIN=
9990test "$ac_cv_cygwin" = yes && CYGWIN=yes
9991echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
91151a06 9992echo "configure:9993: checking for mingw32 environment" >&5
c906108c
SS
9993if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
9994 echo $ac_n "(cached) $ac_c" 1>&6
9995else
9996 cat > conftest.$ac_ext <<EOF
91151a06 9997#line 9998 "configure"
c906108c
SS
9998#include "confdefs.h"
9999
10000int main() {
10001return __MINGW32__;
10002; return 0; }
10003EOF
91151a06 10004if { (eval echo configure:10005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10005 rm -rf conftest*
10006 ac_cv_mingw32=yes
10007else
10008 echo "configure: failed program was:" >&5
10009 cat conftest.$ac_ext >&5
10010 rm -rf conftest*
10011 ac_cv_mingw32=no
10012fi
10013rm -f conftest*
10014rm -f conftest*
10015fi
10016
10017echo "$ac_t""$ac_cv_mingw32" 1>&6
10018MINGW32=
10019test "$ac_cv_mingw32" = yes && MINGW32=yes
10020
10021
10022echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
91151a06 10023echo "configure:10024: checking for executable suffix" >&5
c906108c
SS
10024if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10025 echo $ac_n "(cached) $ac_c" 1>&6
10026else
10027 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10028 ac_cv_exeext=.exe
10029else
10030 rm -f conftest*
10031 echo 'int main () { return 0; }' > conftest.$ac_ext
10032 ac_cv_exeext=
91151a06 10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10034 for file in conftest.*; do
10035 case $file in
9608ab8b 10036 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10037 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10038 esac
10039 done
10040 else
10041 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10042 fi
10043 rm -f conftest*
10044 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10045fi
10046fi
10047
10048EXEEXT=""
10049test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10050echo "$ac_t""${ac_cv_exeext}" 1>&6
10051ac_exeext=$EXEEXT
10052
10053
234b45d4
KB
10054
10055cat >> confdefs.h <<\EOF
10056#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10057EOF
10058
10059
10060
10061
10062 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10063if test "${with_libiconv_prefix+set}" = set; then
10064 withval="$with_libiconv_prefix"
10065
10066 for dir in `echo "$withval" | tr : ' '`; do
10067 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10068 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10069 done
10070
10071fi
10072
10073
10074 echo $ac_n "checking for iconv""... $ac_c" 1>&6
91151a06 10075echo "configure:10076: checking for iconv" >&5
234b45d4
KB
10076if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10077 echo $ac_n "(cached) $ac_c" 1>&6
10078else
10079
10080 am_cv_func_iconv="no, consider installing GNU libiconv"
10081 am_cv_lib_iconv=no
10082 cat > conftest.$ac_ext <<EOF
91151a06 10083#line 10084 "configure"
234b45d4
KB
10084#include "confdefs.h"
10085#include <stdlib.h>
10086#include <iconv.h>
10087int main() {
10088iconv_t cd = iconv_open("","");
10089 iconv(cd,NULL,NULL,NULL,NULL);
10090 iconv_close(cd);
10091; return 0; }
10092EOF
91151a06 10093if { (eval echo configure:10094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10094 rm -rf conftest*
10095 am_cv_func_iconv=yes
10096else
10097 echo "configure: failed program was:" >&5
10098 cat conftest.$ac_ext >&5
10099fi
10100rm -f conftest*
10101 if test "$am_cv_func_iconv" != yes; then
10102 am_save_LIBS="$LIBS"
10103 LIBS="$LIBS -liconv"
10104 cat > conftest.$ac_ext <<EOF
91151a06 10105#line 10106 "configure"
234b45d4
KB
10106#include "confdefs.h"
10107#include <stdlib.h>
10108#include <iconv.h>
10109int main() {
10110iconv_t cd = iconv_open("","");
10111 iconv(cd,NULL,NULL,NULL,NULL);
10112 iconv_close(cd);
10113; return 0; }
10114EOF
91151a06 10115if { (eval echo configure:10116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10116 rm -rf conftest*
10117 am_cv_lib_iconv=yes
10118 am_cv_func_iconv=yes
10119else
10120 echo "configure: failed program was:" >&5
10121 cat conftest.$ac_ext >&5
10122fi
10123rm -f conftest*
10124 LIBS="$am_save_LIBS"
10125 fi
10126
10127fi
10128
10129echo "$ac_t""$am_cv_func_iconv" 1>&6
10130 if test "$am_cv_func_iconv" = yes; then
10131 cat >> confdefs.h <<\EOF
10132#define HAVE_ICONV 1
10133EOF
10134
10135 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
91151a06 10136echo "configure:10137: checking for iconv declaration" >&5
234b45d4
KB
10137 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10138 echo $ac_n "(cached) $ac_c" 1>&6
10139else
10140
10141 cat > conftest.$ac_ext <<EOF
91151a06 10142#line 10143 "configure"
234b45d4
KB
10143#include "confdefs.h"
10144
10145#include <stdlib.h>
10146#include <iconv.h>
10147extern
10148#ifdef __cplusplus
10149"C"
10150#endif
10151#if defined(__STDC__) || defined(__cplusplus)
10152size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10153#else
10154size_t iconv();
10155#endif
10156
10157int main() {
10158
10159; return 0; }
10160EOF
91151a06 10161if { (eval echo configure:10162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10162 rm -rf conftest*
10163 am_cv_proto_iconv_arg1=""
10164else
10165 echo "configure: failed program was:" >&5
10166 cat conftest.$ac_ext >&5
10167 rm -rf conftest*
10168 am_cv_proto_iconv_arg1="const"
10169fi
10170rm -f conftest*
10171 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);"
10172fi
10173
10174 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10175 echo "$ac_t""${ac_t:-
10176 }$am_cv_proto_iconv" 1>&6
10177 cat >> confdefs.h <<EOF
10178#define ICONV_CONST $am_cv_proto_iconv_arg1
10179EOF
10180
10181 fi
10182 LIBICONV=
10183 if test "$am_cv_lib_iconv" = yes; then
10184 LIBICONV="-liconv"
10185 fi
10186
10187
10188
c906108c
SS
10189subdirs="$configdirs"
10190
10191trap '' 1 2 15
10192cat > confcache <<\EOF
10193# This file is a shell script that caches the results of configure
10194# tests run on this system so they can be shared between configure
10195# scripts and configure runs. It is not useful on other systems.
10196# If it contains results you don't want to keep, you may remove or edit it.
10197#
10198# By default, configure uses ./config.cache as the cache file,
10199# creating it if it does not exist already. You can give configure
10200# the --cache-file=FILE option to use a different cache file; that is
10201# what configure does when it calls configure scripts in
10202# subdirectories, so they share the cache.
10203# Giving --cache-file=/dev/null disables caching, for debugging configure.
10204# config.status only pays attention to the cache file if you give it the
10205# --recheck option to rerun configure.
10206#
10207EOF
10208# The following way of writing the cache mishandles newlines in values,
10209# but we know of no workaround that is simple, portable, and efficient.
10210# So, don't put newlines in cache variables' values.
10211# Ultrix sh set writes to stderr and can't be redirected directly,
10212# and sets the high bit in the cache file unless we assign to the vars.
10213(set) 2>&1 |
10214 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10215 *ac_space=\ *)
10216 # `set' does not quote correctly, so add quotes (double-quote substitution
10217 # turns \\\\ into \\, and sed turns \\ into \).
10218 sed -n \
10219 -e "s/'/'\\\\''/g" \
10220 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10221 ;;
10222 *)
10223 # `set' quotes correctly as required by POSIX, so do not add quotes.
10224 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10225 ;;
10226 esac >> confcache
10227if cmp -s $cache_file confcache; then
10228 :
10229else
10230 if test -w $cache_file; then
10231 echo "updating cache $cache_file"
10232 cat confcache > $cache_file
10233 else
10234 echo "not updating unwritable cache $cache_file"
10235 fi
10236fi
10237rm -f confcache
10238
10239trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10240
10241test "x$prefix" = xNONE && prefix=$ac_default_prefix
10242# Let make expand exec_prefix.
10243test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10244
10245# Any assignment to VPATH causes Sun make to only execute
10246# the first set of double-colon rules, so remove it if not needed.
10247# If there is a colon in the path, we need to keep it.
10248if test "x$srcdir" = x.; then
10249 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10250fi
10251
10252trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10253
10254DEFS=-DHAVE_CONFIG_H
10255
10256# Without the "./", some shells look in PATH for config.status.
10257: ${CONFIG_STATUS=./config.status}
10258
10259echo creating $CONFIG_STATUS
10260rm -f $CONFIG_STATUS
10261cat > $CONFIG_STATUS <<EOF
10262#! /bin/sh
10263# Generated automatically by configure.
10264# Run this file to recreate the current configuration.
10265# This directory was configured as follows,
10266# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10267#
10268# $0 $ac_configure_args
10269#
10270# Compiler output produced by configure, useful for debugging
10271# configure, is in ./config.log if it exists.
10272
10273ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10274for ac_option
10275do
10276 case "\$ac_option" in
10277 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10278 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10279 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10280 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10281 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10282 exit 0 ;;
10283 -help | --help | --hel | --he | --h)
10284 echo "\$ac_cs_usage"; exit 0 ;;
10285 *) echo "\$ac_cs_usage"; exit 1 ;;
10286 esac
10287done
10288
10289ac_given_srcdir=$srcdir
10290ac_given_INSTALL="$INSTALL"
10291
ed952ac5 10292trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10293EOF
10294cat >> $CONFIG_STATUS <<EOF
10295
10296# Protect against being on the right side of a sed subst in config.status.
10297sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10298 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10299$ac_vpsub
10300$extrasub
10301s%@SHELL@%$SHELL%g
10302s%@CFLAGS@%$CFLAGS%g
10303s%@CPPFLAGS@%$CPPFLAGS%g
10304s%@CXXFLAGS@%$CXXFLAGS%g
10305s%@FFLAGS@%$FFLAGS%g
10306s%@DEFS@%$DEFS%g
10307s%@LDFLAGS@%$LDFLAGS%g
10308s%@LIBS@%$LIBS%g
10309s%@exec_prefix@%$exec_prefix%g
10310s%@prefix@%$prefix%g
10311s%@program_transform_name@%$program_transform_name%g
10312s%@bindir@%$bindir%g
10313s%@sbindir@%$sbindir%g
10314s%@libexecdir@%$libexecdir%g
10315s%@datadir@%$datadir%g
10316s%@sysconfdir@%$sysconfdir%g
10317s%@sharedstatedir@%$sharedstatedir%g
10318s%@localstatedir@%$localstatedir%g
10319s%@libdir@%$libdir%g
10320s%@includedir@%$includedir%g
10321s%@oldincludedir@%$oldincludedir%g
10322s%@infodir@%$infodir%g
10323s%@mandir@%$mandir%g
413ccac7
AC
10324s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10325s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10326s%@MAINT@%$MAINT%g
c906108c
SS
10327s%@CC@%$CC%g
10328s%@CPP@%$CPP%g
10329s%@host@%$host%g
10330s%@host_alias@%$host_alias%g
10331s%@host_cpu@%$host_cpu%g
10332s%@host_vendor@%$host_vendor%g
10333s%@host_os@%$host_os%g
10334s%@target@%$target%g
10335s%@target_alias@%$target_alias%g
10336s%@target_cpu@%$target_cpu%g
10337s%@target_vendor@%$target_vendor%g
10338s%@target_os@%$target_os%g
10339s%@build@%$build%g
10340s%@build_alias@%$build_alias%g
10341s%@build_cpu@%$build_cpu%g
10342s%@build_vendor@%$build_vendor%g
10343s%@build_os@%$build_os%g
c906108c 10344s%@RANLIB@%$RANLIB%g
8bb2c122 10345s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10346s%@ALLOCA@%$ALLOCA%g
10347s%@USE_NLS@%$USE_NLS%g
10348s%@MSGFMT@%$MSGFMT%g
10349s%@GMSGFMT@%$GMSGFMT%g
10350s%@XGETTEXT@%$XGETTEXT%g
10351s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10352s%@CATALOGS@%$CATALOGS%g
10353s%@CATOBJEXT@%$CATOBJEXT%g
10354s%@DATADIRNAME@%$DATADIRNAME%g
10355s%@GMOFILES@%$GMOFILES%g
10356s%@INSTOBJEXT@%$INSTOBJEXT%g
10357s%@INTLDEPS@%$INTLDEPS%g
10358s%@INTLLIBS@%$INTLLIBS%g
10359s%@INTLOBJS@%$INTLOBJS%g
10360s%@POFILES@%$POFILES%g
10361s%@POSUB@%$POSUB%g
10362s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10363s%@GT_NO@%$GT_NO%g
10364s%@GT_YES@%$GT_YES%g
10365s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10366s%@l@%$l%g
7a292a7a 10367s%@AWK@%$AWK%g
c906108c
SS
10368s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10369s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10370s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10371s%@LN_S@%$LN_S%g
10372s%@YACC@%$YACC%g
c906108c 10373s%@AR@%$AR%g
95ca63c4
CF
10374s%@DLLTOOL@%$DLLTOOL%g
10375s%@WINDRES@%$WINDRES%g
75c6e08a 10376s%@MIG@%$MIG%g
c906108c 10377s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
c906108c 10378s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10379s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10380s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10381s%@MMALLOC@%$MMALLOC%g
aff38e61 10382s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10383s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10384s%@LIBGUI@%$LIBGUI%g
10385s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10386s%@WIN32LDAPP@%$WIN32LDAPP%g
10387s%@TCL_VERSION@%$TCL_VERSION%g
10388s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10389s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10390s%@TCL_CC@%$TCL_CC%g
10391s%@TCL_DEFS@%$TCL_DEFS%g
10392s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10393s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10394s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10395s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10396s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10397s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10398s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10399s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10400s%@TCL_RANLIB@%$TCL_RANLIB%g
10401s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10402s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10403s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10404s%@TK_VERSION@%$TK_VERSION%g
10405s%@TK_DEFS@%$TK_DEFS%g
10406s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10407s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10408s%@TK_XLIBSW@%$TK_XLIBSW%g
10409s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10410s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10411s%@TCLHDIR@%$TCLHDIR%g
10412s%@TKHDIR@%$TKHDIR%g
10413s%@ITCLHDIR@%$ITCLHDIR%g
10414s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10415s%@ITCL_VERSION@%$ITCL_VERSION%g
10416s%@ITCL_DEFS@%$ITCL_DEFS%g
10417s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10418s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10419s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10420s%@ITK_VERSION@%$ITK_VERSION%g
10421s%@ITK_DEFS@%$ITK_DEFS%g
10422s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10423s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10424s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10425s%@X_CFLAGS@%$X_CFLAGS%g
10426s%@X_LDFLAGS@%$X_LDFLAGS%g
10427s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10428s%@TCL_DEPS@%$TCL_DEPS%g
10429s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10430s%@ITCLLIB@%$ITCLLIB%g
10431s%@ITCL_DEPS@%$ITCL_DEPS%g
10432s%@ITKLIB@%$ITKLIB%g
10433s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10434s%@GDBTKLIBS@%$GDBTKLIBS%g
10435s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10436s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10437s%@IGNORE_SIM@%$IGNORE_SIM%g
10438s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
10439s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10440s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10441s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10442s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10443s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10444s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10445s%@CONFIG_ALL@%$CONFIG_ALL%g
10446s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10447s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10448s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10449s%@HLDFLAGS@%$HLDFLAGS%g
10450s%@HLDENV@%$HLDENV%g
10451s%@target_subdir@%$target_subdir%g
10452/@host_makefile_frag@/r $host_makefile_frag
10453s%@host_makefile_frag@%%g
10454/@target_makefile_frag@/r $target_makefile_frag
10455s%@target_makefile_frag@%%g
10456s%@frags@%$frags%g
96baa820 10457s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
10458s%@xm_h@%$xm_h%g
10459s%@tm_h@%$tm_h%g
10460s%@nm_h@%$nm_h%g
c906108c 10461s%@EXEEXT@%$EXEEXT%g
234b45d4 10462s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10463s%@subdirs@%$subdirs%g
10464
10465CEOF
10466EOF
10467
10468cat >> $CONFIG_STATUS <<\EOF
10469
10470# Split the substitutions into bite-sized pieces for seds with
10471# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10472ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10473ac_file=1 # Number of current file.
10474ac_beg=1 # First line for current file.
10475ac_end=$ac_max_sed_cmds # Line after last line for current file.
10476ac_more_lines=:
10477ac_sed_cmds=""
10478while $ac_more_lines; do
10479 if test $ac_beg -gt 1; then
10480 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10481 else
10482 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10483 fi
10484 if test ! -s conftest.s$ac_file; then
10485 ac_more_lines=false
10486 rm -f conftest.s$ac_file
10487 else
10488 if test -z "$ac_sed_cmds"; then
10489 ac_sed_cmds="sed -f conftest.s$ac_file"
10490 else
10491 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10492 fi
10493 ac_file=`expr $ac_file + 1`
10494 ac_beg=$ac_end
10495 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10496 fi
10497done
10498if test -z "$ac_sed_cmds"; then
10499 ac_sed_cmds=cat
10500fi
10501EOF
10502
10503cat >> $CONFIG_STATUS <<EOF
10504
ed952ac5 10505CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10506EOF
10507cat >> $CONFIG_STATUS <<\EOF
10508for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10509 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10510 case "$ac_file" in
10511 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10512 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10513 *) ac_file_in="${ac_file}.in" ;;
10514 esac
10515
10516 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10517
10518 # Remove last slash and all that follows it. Not all systems have dirname.
10519 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10520 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10521 # The file is in a subdirectory.
10522 test ! -d "$ac_dir" && mkdir "$ac_dir"
10523 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10524 # A "../" for each directory in $ac_dir_suffix.
10525 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10526 else
10527 ac_dir_suffix= ac_dots=
10528 fi
10529
10530 case "$ac_given_srcdir" in
10531 .) srcdir=.
10532 if test -z "$ac_dots"; then top_srcdir=.
10533 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10534 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10535 *) # Relative path.
10536 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10537 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10538 esac
10539
10540 case "$ac_given_INSTALL" in
10541 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10542 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10543 esac
10544
10545 echo creating "$ac_file"
10546 rm -f "$ac_file"
10547 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10548 case "$ac_file" in
10549 *Makefile*) ac_comsub="1i\\
10550# $configure_input" ;;
10551 *) ac_comsub= ;;
10552 esac
10553
10554 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10555 sed -e "$ac_comsub
10556s%@configure_input@%$configure_input%g
10557s%@srcdir@%$srcdir%g
10558s%@top_srcdir@%$top_srcdir%g
10559s%@INSTALL@%$INSTALL%g
10560" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10561fi; done
10562rm -f conftest.s*
10563
10564# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10565# NAME is the cpp macro being defined and VALUE is the value it is being given.
10566#
10567# ac_d sets the value in "#define NAME VALUE" lines.
10568ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10569ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10570ac_dC='\3'
10571ac_dD='%g'
10572# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10573ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10574ac_uB='\([ ]\)%\1#\2define\3'
10575ac_uC=' '
10576ac_uD='\4%g'
10577# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10578ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10579ac_eB='$%\1#\2define\3'
10580ac_eC=' '
10581ac_eD='%g'
10582
10583if test "${CONFIG_HEADERS+set}" != set; then
10584EOF
10585cat >> $CONFIG_STATUS <<EOF
10586 CONFIG_HEADERS="config.h:config.in"
10587EOF
10588cat >> $CONFIG_STATUS <<\EOF
10589fi
10590for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10591 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10592 case "$ac_file" in
10593 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10594 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10595 *) ac_file_in="${ac_file}.in" ;;
10596 esac
10597
10598 echo creating $ac_file
10599
10600 rm -f conftest.frag conftest.in conftest.out
10601 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10602 cat $ac_file_inputs > conftest.in
10603
10604EOF
10605
10606# Transform confdefs.h into a sed script conftest.vals that substitutes
10607# the proper values into config.h.in to produce config.h. And first:
10608# Protect against being on the right side of a sed subst in config.status.
10609# Protect against being in an unquoted here document in config.status.
10610rm -f conftest.vals
10611cat > conftest.hdr <<\EOF
10612s/[\\&%]/\\&/g
10613s%[\\$`]%\\&%g
10614s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10615s%ac_d%ac_u%gp
10616s%ac_u%ac_e%gp
10617EOF
10618sed -n -f conftest.hdr confdefs.h > conftest.vals
10619rm -f conftest.hdr
10620
10621# This sed command replaces #undef with comments. This is necessary, for
10622# example, in the case of _POSIX_SOURCE, which is predefined and required
10623# on some systems where configure will not decide to define it.
10624cat >> conftest.vals <<\EOF
10625s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10626EOF
10627
10628# Break up conftest.vals because some shells have a limit on
10629# the size of here documents, and old seds have small limits too.
10630
10631rm -f conftest.tail
10632while :
10633do
10634 ac_lines=`grep -c . conftest.vals`
10635 # grep -c gives empty output for an empty file on some AIX systems.
10636 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10637 # Write a limited-size here document to conftest.frag.
10638 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10639 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10640 echo 'CEOF
10641 sed -f conftest.frag conftest.in > conftest.out
10642 rm -f conftest.in
10643 mv conftest.out conftest.in
10644' >> $CONFIG_STATUS
10645 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10646 rm -f conftest.vals
10647 mv conftest.tail conftest.vals
10648done
10649rm -f conftest.vals
10650
10651cat >> $CONFIG_STATUS <<\EOF
10652 rm -f conftest.frag conftest.h
10653 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10654 cat conftest.in >> conftest.h
10655 rm -f conftest.in
10656 if cmp -s $ac_file conftest.h 2>/dev/null; then
10657 echo "$ac_file is unchanged"
10658 rm -f conftest.h
10659 else
10660 # Remove last slash and all that follows it. Not all systems have dirname.
10661 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10662 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10663 # The file is in a subdirectory.
10664 test ! -d "$ac_dir" && mkdir "$ac_dir"
10665 fi
10666 rm -f $ac_file
10667 mv conftest.h $ac_file
10668 fi
10669fi; done
10670
10671EOF
10672
10673cat >> $CONFIG_STATUS <<EOF
10674ac_sources="$files"
10675ac_dests="$links"
10676EOF
10677
10678cat >> $CONFIG_STATUS <<\EOF
10679srcdir=$ac_given_srcdir
10680while test -n "$ac_sources"; do
10681 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10682 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10683
10684 echo "linking $srcdir/$ac_source to $ac_dest"
10685
10686 if test ! -r $srcdir/$ac_source; then
10687 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10688 fi
10689 rm -f $ac_dest
10690
10691 # Make relative symlinks.
10692 # Remove last slash and all that follows it. Not all systems have dirname.
10693 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10694 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10695 # The dest file is in a subdirectory.
10696 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10697 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10698 # A "../" for each directory in $ac_dest_dir_suffix.
10699 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10700 else
10701 ac_dest_dir_suffix= ac_dots=
10702 fi
10703
10704 case "$srcdir" in
10705 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10706 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10707 esac
10708
10709 # Make a symlink if possible; otherwise try a hard link.
10710 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10711 ln $srcdir/$ac_source $ac_dest; then :
10712 else
10713 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10714 fi
10715done
10716EOF
10717cat >> $CONFIG_STATUS <<EOF
10718
10719gdb_host_cpu=$gdb_host_cpu
10720gdb_target_cpu=$gdb_target_cpu
10721nativefile=$nativefile
10722
10723EOF
10724cat >> $CONFIG_STATUS <<\EOF
10725
10726if test "${nativefile}" = ""; then
c4620205 10727 < Makefile \
e27da16d
JT
10728 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10729 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10730 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10731 > Makefile.tem
c906108c
SS
10732mv -f Makefile.tem Makefile
10733fi
10734
10735sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10736/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10737/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10738mv -f Makefile.tmp Makefile
10739
2acceee2 10740
c906108c
SS
10741case x$CONFIG_HEADERS in
10742xconfig.h:config.in)
10743echo > stamp-h ;;
10744esac
10745
10746exit 0
10747EOF
10748chmod +x $CONFIG_STATUS
10749rm -fr confdefs* $ac_clean_files
10750test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10751
10752if test "$no_recursion" != yes; then
10753
10754 # Remove --cache-file and --srcdir arguments so they do not pile up.
10755 ac_sub_configure_args=
10756 ac_prev=
10757 for ac_arg in $ac_configure_args; do
10758 if test -n "$ac_prev"; then
10759 ac_prev=
10760 continue
10761 fi
10762 case "$ac_arg" in
10763 -cache-file | --cache-file | --cache-fil | --cache-fi \
10764 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10765 ac_prev=cache_file ;;
10766 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10767 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10768 ;;
10769 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10770 ac_prev=srcdir ;;
10771 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10772 ;;
10773 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10774 esac
10775 done
10776
10777 for ac_config_dir in $configdirs; do
10778
10779 # Do not complain, so a configure script can configure whichever
10780 # parts of a large source tree are present.
10781 if test ! -d $srcdir/$ac_config_dir; then
10782 continue
10783 fi
10784
10785 echo configuring in $ac_config_dir
10786
10787 case "$srcdir" in
10788 .) ;;
10789 *)
10790 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10791 else
10792 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10793 fi
10794 ;;
10795 esac
10796
10797 ac_popdir=`pwd`
10798 cd $ac_config_dir
10799
10800 # A "../" for each directory in /$ac_config_dir.
10801 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10802
10803 case "$srcdir" in
10804 .) # No --srcdir option. We are building in place.
10805 ac_sub_srcdir=$srcdir ;;
10806 /*) # Absolute path.
10807 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10808 *) # Relative path.
10809 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10810 esac
10811
10812 # Check for guested configure; otherwise get Cygnus style configure.
10813 if test -f $ac_sub_srcdir/configure; then
10814 ac_sub_configure=$ac_sub_srcdir/configure
10815 elif test -f $ac_sub_srcdir/configure.in; then
10816 ac_sub_configure=$ac_configure
10817 else
10818 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10819 ac_sub_configure=
10820 fi
10821
10822 # The recursion is here.
10823 if test -n "$ac_sub_configure"; then
10824
10825 # Make the cache file name correct relative to the subdirectory.
10826 case "$cache_file" in
10827 /*) ac_sub_cache_file=$cache_file ;;
10828 *) # Relative path.
10829 ac_sub_cache_file="$ac_dots$cache_file" ;;
10830 esac
10831 case "$ac_given_INSTALL" in
10832 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10833 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10834 esac
10835
10836 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10837 # The eval makes quoting arguments work.
10838 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10839 then :
10840 else
10841 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10842 fi
10843 fi
10844
10845 cd $ac_popdir
10846 done
10847fi
10848
10849
10850exit 0
This page took 1.023721 seconds and 4 git commands to generate.