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