daily update
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
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)"
8ee53726 27ac_help="$ac_help
d28f9cdf
DJ
28 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
29ac_help="$ac_help
30 --enable-profiling enable profiling of GDB"
06825bd1
MK
31ac_help="$ac_help
32 --without-included-regex don't use included regex; this is the default
33 on systems with version 2 of the GNU C library
34 (use with caution on other system)"
030292b7
DJ
35ac_help="$ac_help
36 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
c906108c
SS
37ac_help="$ac_help
38 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
39ac_help="$ac_help
40 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
41ac_help="$ac_help
42 --with-mmalloc Use memory mapped malloc package"
7a292a7a
SS
43ac_help="$ac_help
44 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
45ac_help="$ac_help
46 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
47ac_help="$ac_help
48 --with-tclinclude=DIR Directory where tcl private headers are"
49ac_help="$ac_help
50 --with-tkinclude=DIR Directory where tk private headers are"
51ac_help="$ac_help
52 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
53ac_help="$ac_help
54 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
c906108c
SS
55ac_help="$ac_help
56 --with-x use the X Window System"
7a292a7a
SS
57ac_help="$ac_help
58 --enable-sim Link gdb with simulator"
8dcde887
MK
59ac_help="$ac_help
60 --enable-multi-ice build the multi-ice-gdb-server"
234b45d4
KB
61ac_help="$ac_help
62 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
c906108c
SS
63
64# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
67build=NONE
68cache_file=./config.cache
69exec_prefix=NONE
70host=NONE
71no_create=
72nonopt=NONE
73no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
78silent=
79site=
c41b7eb1 80sitefile=
c906108c
SS
81srcdir=
82target=NONE
83verbose=
84x_includes=NONE
85x_libraries=NONE
86bindir='${exec_prefix}/bin'
87sbindir='${exec_prefix}/sbin'
88libexecdir='${exec_prefix}/libexec'
89datadir='${prefix}/share'
90sysconfdir='${prefix}/etc'
91sharedstatedir='${prefix}/com'
92localstatedir='${prefix}/var'
93libdir='${exec_prefix}/lib'
94includedir='${prefix}/include'
95oldincludedir='/usr/include'
96infodir='${prefix}/info'
97mandir='${prefix}/man'
98
99# Initialize some other variables.
100subdirs=
101MFLAGS= MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103# Maximum number of lines to put in a shell here document.
104ac_max_here_lines=12
105
106ac_prev=
107for ac_option
108do
109
110 # If the previous option needs an argument, assign it.
111 if test -n "$ac_prev"; then
112 eval "$ac_prev=\$ac_option"
113 ac_prev=
114 continue
115 fi
116
117 case "$ac_option" in
118 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
119 *) ac_optarg= ;;
120 esac
121
122 # Accept the important Cygnus configure options, so we can diagnose typos.
123
124 case "$ac_option" in
125
126 -bindir | --bindir | --bindi | --bind | --bin | --bi)
127 ac_prev=bindir ;;
128 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
129 bindir="$ac_optarg" ;;
130
131 -build | --build | --buil | --bui | --bu)
132 ac_prev=build ;;
133 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
134 build="$ac_optarg" ;;
135
136 -cache-file | --cache-file | --cache-fil | --cache-fi \
137 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
138 ac_prev=cache_file ;;
139 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
140 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
141 cache_file="$ac_optarg" ;;
142
143 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
144 ac_prev=datadir ;;
145 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
146 | --da=*)
147 datadir="$ac_optarg" ;;
148
149 -disable-* | --disable-*)
150 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
151 # Reject names that are not valid shell variable names.
152 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
153 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
154 fi
155 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
156 eval "enable_${ac_feature}=no" ;;
157
158 -enable-* | --enable-*)
159 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
160 # Reject names that are not valid shell variable names.
161 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
162 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
163 fi
164 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
165 case "$ac_option" in
166 *=*) ;;
167 *) ac_optarg=yes ;;
168 esac
169 eval "enable_${ac_feature}='$ac_optarg'" ;;
170
171 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
172 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
173 | --exec | --exe | --ex)
174 ac_prev=exec_prefix ;;
175 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
176 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
177 | --exec=* | --exe=* | --ex=*)
178 exec_prefix="$ac_optarg" ;;
179
180 -gas | --gas | --ga | --g)
181 # Obsolete; use --with-gas.
182 with_gas=yes ;;
183
184 -help | --help | --hel | --he)
185 # Omit some internal or obsolete options to make the list less imposing.
186 # This message is too long to be a string in the A/UX 3.1 sh.
187 cat << EOF
188Usage: configure [options] [host]
189Options: [defaults in brackets after descriptions]
190Configuration:
191 --cache-file=FILE cache test results in FILE
192 --help print this message
193 --no-create do not create output files
194 --quiet, --silent do not print \`checking...' messages
c41b7eb1 195 --site-file=FILE use FILE as the site file
c906108c
SS
196 --version print the version of autoconf that created configure
197Directory and file names:
198 --prefix=PREFIX install architecture-independent files in PREFIX
199 [$ac_default_prefix]
200 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
201 [same as prefix]
202 --bindir=DIR user executables in DIR [EPREFIX/bin]
203 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
204 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
205 --datadir=DIR read-only architecture-independent data in DIR
206 [PREFIX/share]
207 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
208 --sharedstatedir=DIR modifiable architecture-independent data in DIR
209 [PREFIX/com]
210 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
211 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
212 --includedir=DIR C header files in DIR [PREFIX/include]
213 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
214 --infodir=DIR info documentation in DIR [PREFIX/info]
215 --mandir=DIR man documentation in DIR [PREFIX/man]
216 --srcdir=DIR find the sources in DIR [configure dir or ..]
217 --program-prefix=PREFIX prepend PREFIX to installed program names
218 --program-suffix=SUFFIX append SUFFIX to installed program names
219 --program-transform-name=PROGRAM
220 run sed PROGRAM on installed program names
221EOF
222 cat << EOF
223Host type:
224 --build=BUILD configure for building on BUILD [BUILD=HOST]
225 --host=HOST configure for HOST [guessed]
226 --target=TARGET configure for TARGET [TARGET=HOST]
227Features and packages:
228 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
229 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
230 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
231 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
232 --x-includes=DIR X include files are in DIR
233 --x-libraries=DIR X library files are in DIR
234EOF
235 if test -n "$ac_help"; then
236 echo "--enable and --with options recognized:$ac_help"
237 fi
238 exit 0 ;;
239
240 -host | --host | --hos | --ho)
241 ac_prev=host ;;
242 -host=* | --host=* | --hos=* | --ho=*)
243 host="$ac_optarg" ;;
244
245 -includedir | --includedir | --includedi | --included | --include \
246 | --includ | --inclu | --incl | --inc)
247 ac_prev=includedir ;;
248 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249 | --includ=* | --inclu=* | --incl=* | --inc=*)
250 includedir="$ac_optarg" ;;
251
252 -infodir | --infodir | --infodi | --infod | --info | --inf)
253 ac_prev=infodir ;;
254 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255 infodir="$ac_optarg" ;;
256
257 -libdir | --libdir | --libdi | --libd)
258 ac_prev=libdir ;;
259 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 libdir="$ac_optarg" ;;
261
262 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263 | --libexe | --libex | --libe)
264 ac_prev=libexecdir ;;
265 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266 | --libexe=* | --libex=* | --libe=*)
267 libexecdir="$ac_optarg" ;;
268
269 -localstatedir | --localstatedir | --localstatedi | --localstated \
270 | --localstate | --localstat | --localsta | --localst \
271 | --locals | --local | --loca | --loc | --lo)
272 ac_prev=localstatedir ;;
273 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276 localstatedir="$ac_optarg" ;;
277
278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279 ac_prev=mandir ;;
280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281 mandir="$ac_optarg" ;;
282
283 -nfp | --nfp | --nf)
284 # Obsolete; use --without-fp.
285 with_fp=no ;;
286
287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288 | --no-cr | --no-c)
289 no_create=yes ;;
290
291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 no_recursion=yes ;;
294
295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297 | --oldin | --oldi | --old | --ol | --o)
298 ac_prev=oldincludedir ;;
299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302 oldincludedir="$ac_optarg" ;;
303
304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305 ac_prev=prefix ;;
306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 prefix="$ac_optarg" ;;
308
309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
310 | --program-pre | --program-pr | --program-p)
311 ac_prev=program_prefix ;;
312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314 program_prefix="$ac_optarg" ;;
315
316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
317 | --program-suf | --program-su | --program-s)
318 ac_prev=program_suffix ;;
319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321 program_suffix="$ac_optarg" ;;
322
323 -program-transform-name | --program-transform-name \
324 | --program-transform-nam | --program-transform-na \
325 | --program-transform-n | --program-transform- \
326 | --program-transform | --program-transfor \
327 | --program-transfo | --program-transf \
328 | --program-trans | --program-tran \
329 | --progr-tra | --program-tr | --program-t)
330 ac_prev=program_transform_name ;;
331 -program-transform-name=* | --program-transform-name=* \
332 | --program-transform-nam=* | --program-transform-na=* \
333 | --program-transform-n=* | --program-transform-=* \
334 | --program-transform=* | --program-transfor=* \
335 | --program-transfo=* | --program-transf=* \
336 | --program-trans=* | --program-tran=* \
337 | --progr-tra=* | --program-tr=* | --program-t=*)
338 program_transform_name="$ac_optarg" ;;
339
340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341 | -silent | --silent | --silen | --sile | --sil)
342 silent=yes ;;
343
344 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345 ac_prev=sbindir ;;
346 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347 | --sbi=* | --sb=*)
348 sbindir="$ac_optarg" ;;
349
350 -sharedstatedir | --sharedstatedir | --sharedstatedi \
351 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352 | --sharedst | --shareds | --shared | --share | --shar \
353 | --sha | --sh)
354 ac_prev=sharedstatedir ;;
355 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358 | --sha=* | --sh=*)
359 sharedstatedir="$ac_optarg" ;;
360
361 -site | --site | --sit)
362 ac_prev=site ;;
363 -site=* | --site=* | --sit=*)
364 site="$ac_optarg" ;;
365
c41b7eb1
JB
366 -site-file | --site-file | --site-fil | --site-fi | --site-f)
367 ac_prev=sitefile ;;
368 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
369 sitefile="$ac_optarg" ;;
370
c906108c
SS
371 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
372 ac_prev=srcdir ;;
373 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
374 srcdir="$ac_optarg" ;;
375
376 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
377 | --syscon | --sysco | --sysc | --sys | --sy)
378 ac_prev=sysconfdir ;;
379 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
380 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
381 sysconfdir="$ac_optarg" ;;
382
383 -target | --target | --targe | --targ | --tar | --ta | --t)
384 ac_prev=target ;;
385 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
386 target="$ac_optarg" ;;
387
388 -v | -verbose | --verbose | --verbos | --verbo | --verb)
389 verbose=yes ;;
390
391 -version | --version | --versio | --versi | --vers)
392 echo "configure generated by autoconf version 2.13"
393 exit 0 ;;
394
395 -with-* | --with-*)
396 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
397 # Reject names that are not valid shell variable names.
398 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
399 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
400 fi
401 ac_package=`echo $ac_package| sed 's/-/_/g'`
402 case "$ac_option" in
403 *=*) ;;
404 *) ac_optarg=yes ;;
405 esac
406 eval "with_${ac_package}='$ac_optarg'" ;;
407
408 -without-* | --without-*)
409 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
410 # Reject names that are not valid shell variable names.
411 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
412 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
413 fi
414 ac_package=`echo $ac_package| sed 's/-/_/g'`
415 eval "with_${ac_package}=no" ;;
416
417 --x)
418 # Obsolete; use --with-x.
419 with_x=yes ;;
420
421 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
422 | --x-incl | --x-inc | --x-in | --x-i)
423 ac_prev=x_includes ;;
424 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
425 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
426 x_includes="$ac_optarg" ;;
427
428 -x-libraries | --x-libraries | --x-librarie | --x-librari \
429 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
430 ac_prev=x_libraries ;;
431 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
432 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
433 x_libraries="$ac_optarg" ;;
434
435 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
436 ;;
437
438 *)
439 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
440 echo "configure: warning: $ac_option: invalid host type" 1>&2
441 fi
442 if test "x$nonopt" != xNONE; then
443 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
444 fi
445 nonopt="$ac_option"
446 ;;
447
448 esac
449done
450
451if test -n "$ac_prev"; then
452 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453fi
454
455trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
456
457# File descriptor usage:
458# 0 standard input
459# 1 file creation
460# 2 errors and warnings
461# 3 some systems may open it to /dev/tty
462# 4 used on the Kubota Titan
463# 6 checking for... messages and results
464# 5 compiler messages saved in config.log
465if test "$silent" = yes; then
466 exec 6>/dev/null
467else
468 exec 6>&1
469fi
470exec 5>./config.log
471
472echo "\
473This file contains any messages produced by compilers while
474running configure, to aid debugging if configure makes a mistake.
475" 1>&5
476
477# Strip out --no-create and --no-recursion so they do not pile up.
478# Also quote any args containing shell metacharacters.
479ac_configure_args=
480for ac_arg
481do
482 case "$ac_arg" in
483 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
484 | --no-cr | --no-c) ;;
485 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
486 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
487 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
488 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
489 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
490 esac
491done
492
493# NLS nuisances.
494# Only set these to C if already set. These must not be set unconditionally
495# because not all systems understand e.g. LANG=C (notably SCO).
496# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
497# Non-C LC_CTYPE values break the ctype check.
498if test "${LANG+set}" = set; then LANG=C; export LANG; fi
499if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
500if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
501if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
502
503# confdefs.h avoids OS command line length limits that DEFS can exceed.
504rm -rf conftest* confdefs.h
505# AIX cpp loses on an empty file, so make sure it contains at least a newline.
506echo > confdefs.h
507
508# A filename unique to this package, relative to the directory that
509# configure is in, which we can look for to find out if srcdir is correct.
510ac_unique_file=main.c
511
512# Find the source files, if location was not specified.
513if test -z "$srcdir"; then
514 ac_srcdir_defaulted=yes
515 # Try the directory containing this script, then its parent.
516 ac_prog=$0
517 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
518 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
519 srcdir=$ac_confdir
520 if test ! -r $srcdir/$ac_unique_file; then
521 srcdir=..
522 fi
523else
524 ac_srcdir_defaulted=no
525fi
526if test ! -r $srcdir/$ac_unique_file; then
527 if test "$ac_srcdir_defaulted" = yes; then
528 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
529 else
530 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531 fi
532fi
533srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
534
535# Prefer explicitly selected file to automatically selected ones.
c41b7eb1
JB
536if test -z "$sitefile"; then
537 if test -z "$CONFIG_SITE"; then
538 if test "x$prefix" != xNONE; then
539 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
540 else
541 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
542 fi
c906108c 543 fi
c41b7eb1
JB
544else
545 CONFIG_SITE="$sitefile"
c906108c
SS
546fi
547for ac_site_file in $CONFIG_SITE; do
548 if test -r "$ac_site_file"; then
549 echo "loading site script $ac_site_file"
550 . "$ac_site_file"
551 fi
552done
553
554if test -r "$cache_file"; then
555 echo "loading cache $cache_file"
556 . $cache_file
557else
558 echo "creating cache $cache_file"
559 > $cache_file
560fi
561
562ac_ext=c
563# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
564ac_cpp='$CPP $CPPFLAGS'
565ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
566ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
567cross_compiling=$ac_cv_prog_cc_cross
568
569ac_exeext=
570ac_objext=o
571if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
572 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
573 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
574 ac_n= ac_c='
575' ac_t=' '
576 else
577 ac_n=-n ac_c= ac_t=
578 fi
579else
580 ac_n= ac_c='\c' ac_t=
581fi
582
583
584
413ccac7 585echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
d28f9cdf 586echo "configure:587: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
587 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
588if test "${enable_maintainer_mode+set}" = set; then
589 enableval="$enable_maintainer_mode"
590 USE_MAINTAINER_MODE=$enableval
591else
592 USE_MAINTAINER_MODE=no
593fi
594
595 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
596
597
598if test $USE_MAINTAINER_MODE = yes; then
599 MAINTAINER_MODE_TRUE=
600 MAINTAINER_MODE_FALSE='#'
601else
602 MAINTAINER_MODE_TRUE='#'
603 MAINTAINER_MODE_FALSE=
604fi
605 MAINT=$MAINTAINER_MODE_TRUE
606
607
c906108c
SS
608
609# Extract the first word of "gcc", so it can be a program name with args.
610set dummy gcc; ac_word=$2
611echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 612echo "configure:613: checking for $ac_word" >&5
c906108c
SS
613if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
615else
616 if test -n "$CC"; then
617 ac_cv_prog_CC="$CC" # Let the user override the test.
618else
619 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
620 ac_dummy="$PATH"
621 for ac_dir in $ac_dummy; do
622 test -z "$ac_dir" && ac_dir=.
623 if test -f $ac_dir/$ac_word; then
624 ac_cv_prog_CC="gcc"
625 break
626 fi
627 done
628 IFS="$ac_save_ifs"
629fi
630fi
631CC="$ac_cv_prog_CC"
632if test -n "$CC"; then
633 echo "$ac_t""$CC" 1>&6
634else
635 echo "$ac_t""no" 1>&6
636fi
637
638if test -z "$CC"; then
639 # Extract the first word of "cc", so it can be a program name with args.
640set dummy cc; ac_word=$2
641echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 642echo "configure:643: checking for $ac_word" >&5
c906108c
SS
643if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
644 echo $ac_n "(cached) $ac_c" 1>&6
645else
646 if test -n "$CC"; then
647 ac_cv_prog_CC="$CC" # Let the user override the test.
648else
649 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
650 ac_prog_rejected=no
651 ac_dummy="$PATH"
652 for ac_dir in $ac_dummy; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
655 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
656 ac_prog_rejected=yes
657 continue
658 fi
659 ac_cv_prog_CC="cc"
660 break
661 fi
662 done
663 IFS="$ac_save_ifs"
664if test $ac_prog_rejected = yes; then
665 # We found a bogon in the path, so make sure we never use it.
666 set dummy $ac_cv_prog_CC
667 shift
668 if test $# -gt 0; then
669 # We chose a different compiler from the bogus one.
670 # However, it has the same basename, so the bogon will be chosen
671 # first if we set CC to just the basename; use the full file name.
672 shift
673 set dummy "$ac_dir/$ac_word" "$@"
674 shift
675 ac_cv_prog_CC="$@"
676 fi
677fi
678fi
679fi
680CC="$ac_cv_prog_CC"
681if test -n "$CC"; then
682 echo "$ac_t""$CC" 1>&6
683else
684 echo "$ac_t""no" 1>&6
685fi
686
687 if test -z "$CC"; then
688 case "`uname -s`" in
689 *win32* | *WIN32*)
690 # Extract the first word of "cl", so it can be a program name with args.
691set dummy cl; ac_word=$2
692echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 693echo "configure:694: checking for $ac_word" >&5
c906108c
SS
694if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
695 echo $ac_n "(cached) $ac_c" 1>&6
696else
697 if test -n "$CC"; then
698 ac_cv_prog_CC="$CC" # Let the user override the test.
699else
700 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
701 ac_dummy="$PATH"
702 for ac_dir in $ac_dummy; do
703 test -z "$ac_dir" && ac_dir=.
704 if test -f $ac_dir/$ac_word; then
705 ac_cv_prog_CC="cl"
706 break
707 fi
708 done
709 IFS="$ac_save_ifs"
710fi
711fi
712CC="$ac_cv_prog_CC"
713if test -n "$CC"; then
714 echo "$ac_t""$CC" 1>&6
715else
716 echo "$ac_t""no" 1>&6
717fi
718 ;;
719 esac
720 fi
721 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
722fi
723
724echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
d28f9cdf 725echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
726
727ac_ext=c
728# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
729ac_cpp='$CPP $CPPFLAGS'
730ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
731ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
732cross_compiling=$ac_cv_prog_cc_cross
733
734cat > conftest.$ac_ext << EOF
735
d28f9cdf 736#line 737 "configure"
c906108c
SS
737#include "confdefs.h"
738
739main(){return(0);}
740EOF
d28f9cdf 741if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
742 ac_cv_prog_cc_works=yes
743 # If we can't run a trivial program, we are probably using a cross compiler.
744 if (./conftest; exit) 2>/dev/null; then
745 ac_cv_prog_cc_cross=no
746 else
747 ac_cv_prog_cc_cross=yes
748 fi
749else
750 echo "configure: failed program was:" >&5
751 cat conftest.$ac_ext >&5
752 ac_cv_prog_cc_works=no
753fi
754rm -fr conftest*
755ac_ext=c
756# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
757ac_cpp='$CPP $CPPFLAGS'
758ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
759ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
760cross_compiling=$ac_cv_prog_cc_cross
761
762echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
763if test $ac_cv_prog_cc_works = no; then
764 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
765fi
766echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
d28f9cdf 767echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
768echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
769cross_compiling=$ac_cv_prog_cc_cross
770
771echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
d28f9cdf 772echo "configure:773: checking whether we are using GNU C" >&5
c906108c
SS
773if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
774 echo $ac_n "(cached) $ac_c" 1>&6
775else
776 cat > conftest.c <<EOF
777#ifdef __GNUC__
778 yes;
779#endif
780EOF
d28f9cdf 781if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
782 ac_cv_prog_gcc=yes
783else
784 ac_cv_prog_gcc=no
785fi
786fi
787
788echo "$ac_t""$ac_cv_prog_gcc" 1>&6
789
790if test $ac_cv_prog_gcc = yes; then
791 GCC=yes
792else
793 GCC=
794fi
795
796ac_test_CFLAGS="${CFLAGS+set}"
797ac_save_CFLAGS="$CFLAGS"
798CFLAGS=
799echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
d28f9cdf 800echo "configure:801: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
801if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
802 echo $ac_n "(cached) $ac_c" 1>&6
803else
804 echo 'void f(){}' > conftest.c
805if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
806 ac_cv_prog_cc_g=yes
807else
808 ac_cv_prog_cc_g=no
809fi
810rm -f conftest*
811
812fi
813
814echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
815if test "$ac_test_CFLAGS" = set; then
816 CFLAGS="$ac_save_CFLAGS"
817elif test $ac_cv_prog_cc_g = yes; then
818 if test "$GCC" = yes; then
819 CFLAGS="-g -O2"
820 else
821 CFLAGS="-g"
822 fi
823else
824 if test "$GCC" = yes; then
825 CFLAGS="-O2"
826 else
827 CFLAGS=
828 fi
829fi
830
14abd0fb
MK
831cat >> confdefs.h <<\EOF
832#define _GNU_SOURCE 1
833EOF
834
835
c906108c 836echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
d28f9cdf 837echo "configure:838: checking how to run the C preprocessor" >&5
c906108c
SS
838# On Suns, sometimes $CPP names a directory.
839if test -n "$CPP" && test -d "$CPP"; then
840 CPP=
841fi
842if test -z "$CPP"; then
843if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
844 echo $ac_n "(cached) $ac_c" 1>&6
845else
846 # This must be in double quotes, not single quotes, because CPP may get
847 # substituted into the Makefile and "${CC-cc}" will confuse make.
848 CPP="${CC-cc} -E"
849 # On the NeXT, cc -E runs the code through the compiler's parser,
850 # not just through cpp.
851 cat > conftest.$ac_ext <<EOF
d28f9cdf 852#line 853 "configure"
c906108c
SS
853#include "confdefs.h"
854#include <assert.h>
855Syntax Error
856EOF
857ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 858{ (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
859ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
860if test -z "$ac_err"; then
861 :
862else
863 echo "$ac_err" >&5
864 echo "configure: failed program was:" >&5
865 cat conftest.$ac_ext >&5
866 rm -rf conftest*
867 CPP="${CC-cc} -E -traditional-cpp"
868 cat > conftest.$ac_ext <<EOF
d28f9cdf 869#line 870 "configure"
c906108c
SS
870#include "confdefs.h"
871#include <assert.h>
872Syntax Error
873EOF
874ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 875{ (eval echo configure:876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
876ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
877if test -z "$ac_err"; then
878 :
879else
880 echo "$ac_err" >&5
881 echo "configure: failed program was:" >&5
882 cat conftest.$ac_ext >&5
883 rm -rf conftest*
884 CPP="${CC-cc} -nologo -E"
885 cat > conftest.$ac_ext <<EOF
d28f9cdf 886#line 887 "configure"
c906108c
SS
887#include "confdefs.h"
888#include <assert.h>
889Syntax Error
890EOF
891ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 892{ (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
893ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
894if test -z "$ac_err"; then
895 :
896else
897 echo "$ac_err" >&5
898 echo "configure: failed program was:" >&5
899 cat conftest.$ac_ext >&5
900 rm -rf conftest*
901 CPP=/lib/cpp
902fi
903rm -f conftest*
904fi
905rm -f conftest*
906fi
907rm -f conftest*
908 ac_cv_prog_CPP="$CPP"
909fi
910 CPP="$ac_cv_prog_CPP"
911else
912 ac_cv_prog_CPP="$CPP"
913fi
914echo "$ac_t""$CPP" 1>&6
915
916echo $ac_n "checking for AIX""... $ac_c" 1>&6
d28f9cdf 917echo "configure:918: checking for AIX" >&5
c906108c 918cat > conftest.$ac_ext <<EOF
d28f9cdf 919#line 920 "configure"
c906108c
SS
920#include "confdefs.h"
921#ifdef _AIX
922 yes
923#endif
924
925EOF
926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
927 egrep "yes" >/dev/null 2>&1; then
928 rm -rf conftest*
929 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
930#define _ALL_SOURCE 1
931EOF
932
933else
934 rm -rf conftest*
935 echo "$ac_t""no" 1>&6
936fi
937rm -f conftest*
938
939
56157b4a 940echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
d28f9cdf 941echo "configure:942: checking for POSIXized ISC" >&5
56157b4a
AC
942if test -d /etc/conf/kconfig.d &&
943 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
944then
945 echo "$ac_t""yes" 1>&6
946 ISC=yes # If later tests want to check for ISC.
947 cat >> confdefs.h <<\EOF
948#define _POSIX_SOURCE 1
c906108c
SS
949EOF
950
56157b4a
AC
951 if test "$GCC" = yes; then
952 CC="$CC -posix"
953 else
954 CC="$CC -Xp"
955 fi
c906108c
SS
956else
957 echo "$ac_t""no" 1>&6
56157b4a 958 ISC=
c906108c
SS
959fi
960
961
962
963
964echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
d28f9cdf 965echo "configure:966: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
966if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
968else
969 am_cv_prog_cc_stdc=no
970ac_save_CC="$CC"
971# Don't try gcc -ansi; that turns off useful extensions and
972# breaks some systems' header files.
973# AIX -qlanglvl=ansi
974# Ultrix and OSF/1 -std1
56157b4a
AC
975# HP-UX 10.20 and later -Ae
976# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 977# SVR4 -Xc -D__EXTENSIONS__
56157b4a 978for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
979do
980 CC="$ac_save_CC $ac_arg"
981 cat > conftest.$ac_ext <<EOF
d28f9cdf 982#line 983 "configure"
c906108c
SS
983#include "confdefs.h"
984#include <stdarg.h>
985#include <stdio.h>
986#include <sys/types.h>
987#include <sys/stat.h>
988/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
989struct buf { int x; };
990FILE * (*rcsopen) (struct buf *, struct stat *, int);
991static char *e (p, i)
992 char **p;
993 int i;
994{
995 return p[i];
996}
997static char *f (char * (*g) (char **, int), char **p, ...)
998{
999 char *s;
1000 va_list v;
1001 va_start (v,p);
1002 s = g (p, va_arg (v,int));
1003 va_end (v);
1004 return s;
1005}
1006int test (int i, double x);
1007struct s1 {int (*f) (int a);};
1008struct s2 {int (*f) (double a);};
1009int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1010int argc;
1011char **argv;
1012
1013int main() {
1014
1015return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1016
1017; return 0; }
1018EOF
d28f9cdf 1019if { (eval echo configure:1020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1020 rm -rf conftest*
1021 am_cv_prog_cc_stdc="$ac_arg"; break
1022else
1023 echo "configure: failed program was:" >&5
1024 cat conftest.$ac_ext >&5
1025fi
1026rm -f conftest*
1027done
1028CC="$ac_save_CC"
1029
1030fi
1031
1032if test -z "$am_cv_prog_cc_stdc"; then
1033 echo "$ac_t""none needed" 1>&6
1034else
1035 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1036fi
1037case "x$am_cv_prog_cc_stdc" in
1038 x|xno) ;;
1039 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1040esac
1041
1042
1043ac_aux_dir=
1044for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1045 if test -f $ac_dir/install-sh; then
1046 ac_aux_dir=$ac_dir
1047 ac_install_sh="$ac_aux_dir/install-sh -c"
1048 break
1049 elif test -f $ac_dir/install.sh; then
1050 ac_aux_dir=$ac_dir
1051 ac_install_sh="$ac_aux_dir/install.sh -c"
1052 break
1053 fi
1054done
1055if test -z "$ac_aux_dir"; then
1056 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1057fi
1058ac_config_guess=$ac_aux_dir/config.guess
1059ac_config_sub=$ac_aux_dir/config.sub
1060ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1061
1062
1063# Do some error checking and defaulting for the host and target type.
1064# The inputs are:
1065# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1066#
1067# The rules are:
1068# 1. You are not allowed to specify --host, --target, and nonopt at the
1069# same time.
1070# 2. Host defaults to nonopt.
1071# 3. If nonopt is not specified, then host defaults to the current host,
1072# as determined by config.guess.
1073# 4. Target and build default to nonopt.
1074# 5. If nonopt is not specified, then target and build default to host.
1075
1076# The aliases save the names the user supplied, while $host etc.
1077# will get canonicalized.
1078case $host---$target---$nonopt in
1079NONE---*---* | *---NONE---* | *---*---NONE) ;;
1080*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1081esac
1082
1083
1084# Make sure we can run config.sub.
1085if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1086else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1087fi
1088
1089echo $ac_n "checking host system type""... $ac_c" 1>&6
d28f9cdf 1090echo "configure:1091: checking host system type" >&5
c906108c
SS
1091
1092host_alias=$host
1093case "$host_alias" in
1094NONE)
1095 case $nonopt in
1096 NONE)
1097 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1098 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1099 fi ;;
1100 *) host_alias=$nonopt ;;
1101 esac ;;
1102esac
1103
1104host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1105host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1106host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1107host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1108echo "$ac_t""$host" 1>&6
1109
1110echo $ac_n "checking target system type""... $ac_c" 1>&6
d28f9cdf 1111echo "configure:1112: checking target system type" >&5
c906108c
SS
1112
1113target_alias=$target
1114case "$target_alias" in
1115NONE)
1116 case $nonopt in
1117 NONE) target_alias=$host_alias ;;
1118 *) target_alias=$nonopt ;;
1119 esac ;;
1120esac
1121
1122target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1123target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1124target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1125target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1126echo "$ac_t""$target" 1>&6
1127
1128echo $ac_n "checking build system type""... $ac_c" 1>&6
d28f9cdf 1129echo "configure:1130: checking build system type" >&5
c906108c
SS
1130
1131build_alias=$build
1132case "$build_alias" in
1133NONE)
1134 case $nonopt in
1135 NONE) build_alias=$host_alias ;;
1136 *) build_alias=$nonopt ;;
1137 esac ;;
1138esac
1139
1140build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1141build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1142build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1143build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1144echo "$ac_t""$build" 1>&6
1145
1146test "$host_alias" != "$target_alias" &&
1147 test "$program_prefix$program_suffix$program_transform_name" = \
1148 NONENONEs,x,x, &&
1149 program_prefix=${target_alias}-
1150
1151
8bb2c122
MK
1152# FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1153# doesn't support cross-compilation, but the one from Autoconf 2.5x
1154# does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1155# deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1156# AC_PROG_RANLIB. This can be removed when we switch to # Autoconf
1157# 2.5x.
1158if test $host != $build; then
1159 ac_tool_prefix=${host_alias}-
1160else
1161 ac_tool_prefix=
1162fi
1163
1164# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1165set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1166echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 1167echo "configure:1168: checking for $ac_word" >&5
8bb2c122
MK
1168if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1169 echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171 if test -n "$RANLIB"; then
1172 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1173else
1174 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1175 ac_dummy="$PATH"
1176 for ac_dir in $ac_dummy; do
1177 test -z "$ac_dir" && ac_dir=.
1178 if test -f $ac_dir/$ac_word; then
1179 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1180 break
1181 fi
1182 done
1183 IFS="$ac_save_ifs"
1184fi
1185fi
1186RANLIB="$ac_cv_prog_RANLIB"
1187if test -n "$RANLIB"; then
1188 echo "$ac_t""$RANLIB" 1>&6
1189else
1190 echo "$ac_t""no" 1>&6
1191fi
1192
1193
1194if test -z "$ac_cv_prog_RANLIB"; then
1195if test -n "$ac_tool_prefix"; then
1196 # Extract the first word of "ranlib", so it can be a program name with args.
1197set dummy ranlib; ac_word=$2
1198echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 1199echo "configure:1200: checking for $ac_word" >&5
8bb2c122
MK
1200if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1201 echo $ac_n "(cached) $ac_c" 1>&6
1202else
1203 if test -n "$RANLIB"; then
1204 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1205else
1206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1207 ac_dummy="$PATH"
1208 for ac_dir in $ac_dummy; do
1209 test -z "$ac_dir" && ac_dir=.
1210 if test -f $ac_dir/$ac_word; then
1211 ac_cv_prog_RANLIB="ranlib"
1212 break
1213 fi
1214 done
1215 IFS="$ac_save_ifs"
1216 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1217fi
1218fi
1219RANLIB="$ac_cv_prog_RANLIB"
1220if test -n "$RANLIB"; then
1221 echo "$ac_t""$RANLIB" 1>&6
1222else
1223 echo "$ac_t""no" 1>&6
1224fi
1225
1226else
1227 RANLIB=":"
1228fi
1229fi
1230
1231
c906108c
SS
1232ALL_LINGUAS=
1233echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
d28f9cdf 1234echo "configure:1235: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1235set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1236if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1237 echo $ac_n "(cached) $ac_c" 1>&6
1238else
1239 cat > conftestmake <<\EOF
1240all:
1241 @echo 'ac_maketemp="${MAKE}"'
1242EOF
1243# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1244eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1245if test -n "$ac_maketemp"; then
1246 eval ac_cv_prog_make_${ac_make}_set=yes
1247else
1248 eval ac_cv_prog_make_${ac_make}_set=no
1249fi
1250rm -f conftestmake
1251fi
1252if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1253 echo "$ac_t""yes" 1>&6
1254 SET_MAKE=
1255else
1256 echo "$ac_t""no" 1>&6
1257 SET_MAKE="MAKE=${MAKE-make}"
1258fi
1259
1260# Extract the first word of "ranlib", so it can be a program name with args.
1261set dummy ranlib; ac_word=$2
1262echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 1263echo "configure:1264: checking for $ac_word" >&5
c906108c
SS
1264if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266else
1267 if test -n "$RANLIB"; then
1268 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1269else
1270 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1271 ac_dummy="$PATH"
1272 for ac_dir in $ac_dummy; do
1273 test -z "$ac_dir" && ac_dir=.
1274 if test -f $ac_dir/$ac_word; then
1275 ac_cv_prog_RANLIB="ranlib"
1276 break
1277 fi
1278 done
1279 IFS="$ac_save_ifs"
1280 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1281fi
1282fi
1283RANLIB="$ac_cv_prog_RANLIB"
1284if test -n "$RANLIB"; then
1285 echo "$ac_t""$RANLIB" 1>&6
1286else
1287 echo "$ac_t""no" 1>&6
1288fi
1289
1290echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d28f9cdf 1291echo "configure:1292: checking for ANSI C header files" >&5
c906108c
SS
1292if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1293 echo $ac_n "(cached) $ac_c" 1>&6
1294else
1295 cat > conftest.$ac_ext <<EOF
d28f9cdf 1296#line 1297 "configure"
c906108c
SS
1297#include "confdefs.h"
1298#include <stdlib.h>
1299#include <stdarg.h>
1300#include <string.h>
1301#include <float.h>
1302EOF
1303ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 1304{ (eval echo configure:1305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1305ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1306if test -z "$ac_err"; then
1307 rm -rf conftest*
1308 ac_cv_header_stdc=yes
1309else
1310 echo "$ac_err" >&5
1311 echo "configure: failed program was:" >&5
1312 cat conftest.$ac_ext >&5
1313 rm -rf conftest*
1314 ac_cv_header_stdc=no
1315fi
1316rm -f conftest*
1317
1318if test $ac_cv_header_stdc = yes; then
1319 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1320cat > conftest.$ac_ext <<EOF
d28f9cdf 1321#line 1322 "configure"
c906108c
SS
1322#include "confdefs.h"
1323#include <string.h>
1324EOF
1325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1326 egrep "memchr" >/dev/null 2>&1; then
1327 :
1328else
1329 rm -rf conftest*
1330 ac_cv_header_stdc=no
1331fi
1332rm -f conftest*
1333
1334fi
1335
1336if test $ac_cv_header_stdc = yes; then
1337 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1338cat > conftest.$ac_ext <<EOF
d28f9cdf 1339#line 1340 "configure"
c906108c
SS
1340#include "confdefs.h"
1341#include <stdlib.h>
1342EOF
1343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1344 egrep "free" >/dev/null 2>&1; then
1345 :
1346else
1347 rm -rf conftest*
1348 ac_cv_header_stdc=no
1349fi
1350rm -f conftest*
1351
1352fi
1353
1354if test $ac_cv_header_stdc = yes; then
1355 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1356if test "$cross_compiling" = yes; then
1357 :
1358else
1359 cat > conftest.$ac_ext <<EOF
d28f9cdf 1360#line 1361 "configure"
c906108c
SS
1361#include "confdefs.h"
1362#include <ctype.h>
1363#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1364#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1365#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1366int main () { int i; for (i = 0; i < 256; i++)
1367if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1368exit (0); }
1369
1370EOF
d28f9cdf 1371if { (eval echo configure:1372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1372then
1373 :
1374else
1375 echo "configure: failed program was:" >&5
1376 cat conftest.$ac_ext >&5
1377 rm -fr conftest*
1378 ac_cv_header_stdc=no
1379fi
1380rm -fr conftest*
1381fi
1382
1383fi
1384fi
1385
1386echo "$ac_t""$ac_cv_header_stdc" 1>&6
1387if test $ac_cv_header_stdc = yes; then
1388 cat >> confdefs.h <<\EOF
1389#define STDC_HEADERS 1
1390EOF
1391
1392fi
1393
1394echo $ac_n "checking for working const""... $ac_c" 1>&6
d28f9cdf 1395echo "configure:1396: checking for working const" >&5
c906108c
SS
1396if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1397 echo $ac_n "(cached) $ac_c" 1>&6
1398else
1399 cat > conftest.$ac_ext <<EOF
d28f9cdf 1400#line 1401 "configure"
c906108c
SS
1401#include "confdefs.h"
1402
1403int main() {
1404
1405/* Ultrix mips cc rejects this. */
1406typedef int charset[2]; const charset x;
1407/* SunOS 4.1.1 cc rejects this. */
1408char const *const *ccp;
1409char **p;
1410/* NEC SVR4.0.2 mips cc rejects this. */
1411struct point {int x, y;};
1412static struct point const zero = {0,0};
1413/* AIX XL C 1.02.0.0 rejects this.
1414 It does not let you subtract one const X* pointer from another in an arm
1415 of an if-expression whose if-part is not a constant expression */
1416const char *g = "string";
1417ccp = &g + (g ? g-g : 0);
1418/* HPUX 7.0 cc rejects these. */
1419++ccp;
1420p = (char**) ccp;
1421ccp = (char const *const *) p;
1422{ /* SCO 3.2v4 cc rejects this. */
1423 char *t;
1424 char const *s = 0 ? (char *) 0 : (char const *) 0;
1425
1426 *t++ = 0;
1427}
1428{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1429 int x[] = {25, 17};
1430 const int *foo = &x[0];
1431 ++foo;
1432}
1433{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1434 typedef const int *iptr;
1435 iptr p = 0;
1436 ++p;
1437}
1438{ /* AIX XL C 1.02.0.0 rejects this saying
1439 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1440 struct s { int j; const int *ap[3]; };
1441 struct s *b; b->j = 5;
1442}
1443{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1444 const int foo = 10;
1445}
1446
1447; return 0; }
1448EOF
d28f9cdf 1449if { (eval echo configure:1450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1450 rm -rf conftest*
1451 ac_cv_c_const=yes
1452else
1453 echo "configure: failed program was:" >&5
1454 cat conftest.$ac_ext >&5
1455 rm -rf conftest*
1456 ac_cv_c_const=no
1457fi
1458rm -f conftest*
1459fi
1460
1461echo "$ac_t""$ac_cv_c_const" 1>&6
1462if test $ac_cv_c_const = no; then
1463 cat >> confdefs.h <<\EOF
1464#define const
1465EOF
1466
1467fi
1468
1469echo $ac_n "checking for inline""... $ac_c" 1>&6
d28f9cdf 1470echo "configure:1471: checking for inline" >&5
c906108c
SS
1471if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
1473else
1474 ac_cv_c_inline=no
1475for ac_kw in inline __inline__ __inline; do
1476 cat > conftest.$ac_ext <<EOF
d28f9cdf 1477#line 1478 "configure"
c906108c
SS
1478#include "confdefs.h"
1479
1480int main() {
1481} $ac_kw foo() {
1482; return 0; }
1483EOF
d28f9cdf 1484if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1485 rm -rf conftest*
1486 ac_cv_c_inline=$ac_kw; break
1487else
1488 echo "configure: failed program was:" >&5
1489 cat conftest.$ac_ext >&5
1490fi
1491rm -f conftest*
1492done
1493
1494fi
1495
1496echo "$ac_t""$ac_cv_c_inline" 1>&6
1497case "$ac_cv_c_inline" in
1498 inline | yes) ;;
1499 no) cat >> confdefs.h <<\EOF
1500#define inline
1501EOF
1502 ;;
1503 *) cat >> confdefs.h <<EOF
1504#define inline $ac_cv_c_inline
1505EOF
1506 ;;
1507esac
1508
1509echo $ac_n "checking for off_t""... $ac_c" 1>&6
d28f9cdf 1510echo "configure:1511: checking for off_t" >&5
c906108c
SS
1511if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1512 echo $ac_n "(cached) $ac_c" 1>&6
1513else
1514 cat > conftest.$ac_ext <<EOF
d28f9cdf 1515#line 1516 "configure"
c906108c
SS
1516#include "confdefs.h"
1517#include <sys/types.h>
1518#if STDC_HEADERS
1519#include <stdlib.h>
1520#include <stddef.h>
1521#endif
1522EOF
1523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1524 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1525 rm -rf conftest*
1526 ac_cv_type_off_t=yes
1527else
1528 rm -rf conftest*
1529 ac_cv_type_off_t=no
1530fi
1531rm -f conftest*
1532
1533fi
1534echo "$ac_t""$ac_cv_type_off_t" 1>&6
1535if test $ac_cv_type_off_t = no; then
1536 cat >> confdefs.h <<\EOF
1537#define off_t long
1538EOF
1539
1540fi
1541
1542echo $ac_n "checking for size_t""... $ac_c" 1>&6
d28f9cdf 1543echo "configure:1544: checking for size_t" >&5
c906108c
SS
1544if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1545 echo $ac_n "(cached) $ac_c" 1>&6
1546else
1547 cat > conftest.$ac_ext <<EOF
d28f9cdf 1548#line 1549 "configure"
c906108c
SS
1549#include "confdefs.h"
1550#include <sys/types.h>
1551#if STDC_HEADERS
1552#include <stdlib.h>
1553#include <stddef.h>
1554#endif
1555EOF
1556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1557 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1558 rm -rf conftest*
1559 ac_cv_type_size_t=yes
1560else
1561 rm -rf conftest*
1562 ac_cv_type_size_t=no
1563fi
1564rm -f conftest*
1565
1566fi
1567echo "$ac_t""$ac_cv_type_size_t" 1>&6
1568if test $ac_cv_type_size_t = no; then
1569 cat >> confdefs.h <<\EOF
1570#define size_t unsigned
1571EOF
1572
1573fi
1574
1575# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1576# for constant arguments. Useless!
1577echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d28f9cdf 1578echo "configure:1579: checking for working alloca.h" >&5
c906108c
SS
1579if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1580 echo $ac_n "(cached) $ac_c" 1>&6
1581else
1582 cat > conftest.$ac_ext <<EOF
d28f9cdf 1583#line 1584 "configure"
c906108c
SS
1584#include "confdefs.h"
1585#include <alloca.h>
1586int main() {
1587char *p = alloca(2 * sizeof(int));
1588; return 0; }
1589EOF
d28f9cdf 1590if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1591 rm -rf conftest*
1592 ac_cv_header_alloca_h=yes
1593else
1594 echo "configure: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1596 rm -rf conftest*
1597 ac_cv_header_alloca_h=no
1598fi
1599rm -f conftest*
1600fi
1601
1602echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1603if test $ac_cv_header_alloca_h = yes; then
1604 cat >> confdefs.h <<\EOF
1605#define HAVE_ALLOCA_H 1
1606EOF
1607
1608fi
1609
1610echo $ac_n "checking for alloca""... $ac_c" 1>&6
d28f9cdf 1611echo "configure:1612: checking for alloca" >&5
c906108c
SS
1612if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1613 echo $ac_n "(cached) $ac_c" 1>&6
1614else
1615 cat > conftest.$ac_ext <<EOF
d28f9cdf 1616#line 1617 "configure"
c906108c
SS
1617#include "confdefs.h"
1618
1619#ifdef __GNUC__
1620# define alloca __builtin_alloca
1621#else
1622# ifdef _MSC_VER
1623# include <malloc.h>
1624# define alloca _alloca
1625# else
1626# if HAVE_ALLOCA_H
1627# include <alloca.h>
1628# else
1629# ifdef _AIX
1630 #pragma alloca
1631# else
1632# ifndef alloca /* predefined by HP cc +Olibcalls */
1633char *alloca ();
1634# endif
1635# endif
1636# endif
1637# endif
1638#endif
1639
1640int main() {
1641char *p = (char *) alloca(1);
1642; return 0; }
1643EOF
d28f9cdf 1644if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1645 rm -rf conftest*
1646 ac_cv_func_alloca_works=yes
1647else
1648 echo "configure: failed program was:" >&5
1649 cat conftest.$ac_ext >&5
1650 rm -rf conftest*
1651 ac_cv_func_alloca_works=no
1652fi
1653rm -f conftest*
1654fi
1655
1656echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1657if test $ac_cv_func_alloca_works = yes; then
1658 cat >> confdefs.h <<\EOF
1659#define HAVE_ALLOCA 1
1660EOF
1661
1662fi
1663
1664if test $ac_cv_func_alloca_works = no; then
1665 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1666 # that cause trouble. Some versions do not even contain alloca or
1667 # contain a buggy version. If you still want to use their alloca,
1668 # use ar to extract alloca.o from them instead of compiling alloca.c.
1669 ALLOCA=alloca.${ac_objext}
1670 cat >> confdefs.h <<\EOF
1671#define C_ALLOCA 1
1672EOF
1673
1674
1675echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d28f9cdf 1676echo "configure:1677: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1677if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1678 echo $ac_n "(cached) $ac_c" 1>&6
1679else
1680 cat > conftest.$ac_ext <<EOF
d28f9cdf 1681#line 1682 "configure"
c906108c
SS
1682#include "confdefs.h"
1683#if defined(CRAY) && ! defined(CRAY2)
1684webecray
1685#else
1686wenotbecray
1687#endif
1688
1689EOF
1690if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1691 egrep "webecray" >/dev/null 2>&1; then
1692 rm -rf conftest*
1693 ac_cv_os_cray=yes
1694else
1695 rm -rf conftest*
1696 ac_cv_os_cray=no
1697fi
1698rm -f conftest*
1699
1700fi
1701
1702echo "$ac_t""$ac_cv_os_cray" 1>&6
1703if test $ac_cv_os_cray = yes; then
1704for ac_func in _getb67 GETB67 getb67; do
1705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 1706echo "configure:1707: checking for $ac_func" >&5
c906108c
SS
1707if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1708 echo $ac_n "(cached) $ac_c" 1>&6
1709else
1710 cat > conftest.$ac_ext <<EOF
d28f9cdf 1711#line 1712 "configure"
c906108c
SS
1712#include "confdefs.h"
1713/* System header to define __stub macros and hopefully few prototypes,
1714 which can conflict with char $ac_func(); below. */
1715#include <assert.h>
1716/* Override any gcc2 internal prototype to avoid an error. */
1717/* We use char because int might match the return type of a gcc2
1718 builtin and then its argument prototype would still apply. */
1719char $ac_func();
1720
1721int main() {
1722
1723/* The GNU C library defines this for functions which it implements
1724 to always fail with ENOSYS. Some functions are actually named
1725 something starting with __ and the normal name is an alias. */
1726#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1727choke me
1728#else
1729$ac_func();
1730#endif
1731
1732; return 0; }
1733EOF
d28f9cdf 1734if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1735 rm -rf conftest*
1736 eval "ac_cv_func_$ac_func=yes"
1737else
1738 echo "configure: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 rm -rf conftest*
1741 eval "ac_cv_func_$ac_func=no"
1742fi
1743rm -f conftest*
1744fi
1745
1746if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1747 echo "$ac_t""yes" 1>&6
1748 cat >> confdefs.h <<EOF
1749#define CRAY_STACKSEG_END $ac_func
1750EOF
1751
1752 break
1753else
1754 echo "$ac_t""no" 1>&6
1755fi
1756
1757done
1758fi
1759
1760echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d28f9cdf 1761echo "configure:1762: checking stack direction for C alloca" >&5
c906108c
SS
1762if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1763 echo $ac_n "(cached) $ac_c" 1>&6
1764else
1765 if test "$cross_compiling" = yes; then
1766 ac_cv_c_stack_direction=0
1767else
1768 cat > conftest.$ac_ext <<EOF
d28f9cdf 1769#line 1770 "configure"
c906108c
SS
1770#include "confdefs.h"
1771find_stack_direction ()
1772{
1773 static char *addr = 0;
1774 auto char dummy;
1775 if (addr == 0)
1776 {
1777 addr = &dummy;
1778 return find_stack_direction ();
1779 }
1780 else
1781 return (&dummy > addr) ? 1 : -1;
1782}
1783main ()
1784{
1785 exit (find_stack_direction() < 0);
1786}
1787EOF
d28f9cdf 1788if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1789then
1790 ac_cv_c_stack_direction=1
1791else
1792 echo "configure: failed program was:" >&5
1793 cat conftest.$ac_ext >&5
1794 rm -fr conftest*
1795 ac_cv_c_stack_direction=-1
1796fi
1797rm -fr conftest*
1798fi
1799
1800fi
1801
1802echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1803cat >> confdefs.h <<EOF
1804#define STACK_DIRECTION $ac_cv_c_stack_direction
1805EOF
1806
1807fi
1808
c41b7eb1 1809for ac_hdr in unistd.h
c906108c
SS
1810do
1811ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1812echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 1813echo "configure:1814: checking for $ac_hdr" >&5
c906108c
SS
1814if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1815 echo $ac_n "(cached) $ac_c" 1>&6
1816else
1817 cat > conftest.$ac_ext <<EOF
d28f9cdf 1818#line 1819 "configure"
c906108c
SS
1819#include "confdefs.h"
1820#include <$ac_hdr>
1821EOF
1822ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 1823{ (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1824ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1825if test -z "$ac_err"; then
1826 rm -rf conftest*
1827 eval "ac_cv_header_$ac_safe=yes"
1828else
1829 echo "$ac_err" >&5
1830 echo "configure: failed program was:" >&5
1831 cat conftest.$ac_ext >&5
1832 rm -rf conftest*
1833 eval "ac_cv_header_$ac_safe=no"
1834fi
1835rm -f conftest*
1836fi
1837if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1838 echo "$ac_t""yes" 1>&6
1839 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1840 cat >> confdefs.h <<EOF
1841#define $ac_tr_hdr 1
1842EOF
1843
1844else
1845 echo "$ac_t""no" 1>&6
1846fi
1847done
1848
1849for ac_func in getpagesize
1850do
1851echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 1852echo "configure:1853: checking for $ac_func" >&5
c906108c
SS
1853if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1854 echo $ac_n "(cached) $ac_c" 1>&6
1855else
1856 cat > conftest.$ac_ext <<EOF
d28f9cdf 1857#line 1858 "configure"
c906108c
SS
1858#include "confdefs.h"
1859/* System header to define __stub macros and hopefully few prototypes,
1860 which can conflict with char $ac_func(); below. */
1861#include <assert.h>
1862/* Override any gcc2 internal prototype to avoid an error. */
1863/* We use char because int might match the return type of a gcc2
1864 builtin and then its argument prototype would still apply. */
1865char $ac_func();
1866
1867int main() {
1868
1869/* The GNU C library defines this for functions which it implements
1870 to always fail with ENOSYS. Some functions are actually named
1871 something starting with __ and the normal name is an alias. */
1872#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1873choke me
1874#else
1875$ac_func();
1876#endif
1877
1878; return 0; }
1879EOF
d28f9cdf 1880if { (eval echo configure:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1881 rm -rf conftest*
1882 eval "ac_cv_func_$ac_func=yes"
1883else
1884 echo "configure: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
1886 rm -rf conftest*
1887 eval "ac_cv_func_$ac_func=no"
1888fi
1889rm -f conftest*
1890fi
1891
1892if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1893 echo "$ac_t""yes" 1>&6
1894 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1895 cat >> confdefs.h <<EOF
1896#define $ac_tr_func 1
1897EOF
1898
1899else
1900 echo "$ac_t""no" 1>&6
1901fi
1902done
1903
1904echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d28f9cdf 1905echo "configure:1906: checking for working mmap" >&5
c906108c
SS
1906if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1908else
1909 if test "$cross_compiling" = yes; then
1910 ac_cv_func_mmap_fixed_mapped=no
1911else
1912 cat > conftest.$ac_ext <<EOF
d28f9cdf 1913#line 1914 "configure"
c906108c
SS
1914#include "confdefs.h"
1915
1916/* Thanks to Mike Haertel and Jim Avera for this test.
1917 Here is a matrix of mmap possibilities:
1918 mmap private not fixed
1919 mmap private fixed at somewhere currently unmapped
1920 mmap private fixed at somewhere already mapped
1921 mmap shared not fixed
1922 mmap shared fixed at somewhere currently unmapped
1923 mmap shared fixed at somewhere already mapped
1924 For private mappings, we should verify that changes cannot be read()
1925 back from the file, nor mmap's back from the file at a different
1926 address. (There have been systems where private was not correctly
1927 implemented like the infamous i386 svr4.0, and systems where the
1928 VM page cache was not coherent with the filesystem buffer cache
1929 like early versions of FreeBSD and possibly contemporary NetBSD.)
1930 For shared mappings, we should conversely verify that changes get
1931 propogated back to all the places they're supposed to be.
1932
1933 Grep wants private fixed already mapped.
1934 The main things grep needs to know about mmap are:
1935 * does it exist and is it safe to write into the mmap'd area
1936 * how to use it (BSD variants) */
1937#include <sys/types.h>
1938#include <fcntl.h>
1939#include <sys/mman.h>
1940
1941/* This mess was copied from the GNU getpagesize.h. */
1942#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
1943# ifdef HAVE_UNISTD_H
1944# include <unistd.h>
1945# endif
c906108c
SS
1946
1947/* Assume that all systems that can run configure have sys/param.h. */
1948# ifndef HAVE_SYS_PARAM_H
1949# define HAVE_SYS_PARAM_H 1
1950# endif
1951
1952# ifdef _SC_PAGESIZE
1953# define getpagesize() sysconf(_SC_PAGESIZE)
1954# else /* no _SC_PAGESIZE */
1955# ifdef HAVE_SYS_PARAM_H
1956# include <sys/param.h>
1957# ifdef EXEC_PAGESIZE
1958# define getpagesize() EXEC_PAGESIZE
1959# else /* no EXEC_PAGESIZE */
1960# ifdef NBPG
1961# define getpagesize() NBPG * CLSIZE
1962# ifndef CLSIZE
1963# define CLSIZE 1
1964# endif /* no CLSIZE */
1965# else /* no NBPG */
1966# ifdef NBPC
1967# define getpagesize() NBPC
1968# else /* no NBPC */
1969# ifdef PAGESIZE
1970# define getpagesize() PAGESIZE
1971# endif /* PAGESIZE */
1972# endif /* no NBPC */
1973# endif /* no NBPG */
1974# endif /* no EXEC_PAGESIZE */
1975# else /* no HAVE_SYS_PARAM_H */
1976# define getpagesize() 8192 /* punt totally */
1977# endif /* no HAVE_SYS_PARAM_H */
1978# endif /* no _SC_PAGESIZE */
1979
1980#endif /* no HAVE_GETPAGESIZE */
1981
1982#ifdef __cplusplus
1983extern "C" { void *malloc(unsigned); }
1984#else
1985char *malloc();
1986#endif
1987
1988int
1989main()
1990{
1991 char *data, *data2, *data3;
1992 int i, pagesize;
1993 int fd;
1994
1995 pagesize = getpagesize();
1996
1997 /*
1998 * First, make a file with some known garbage in it.
1999 */
2000 data = malloc(pagesize);
2001 if (!data)
2002 exit(1);
2003 for (i = 0; i < pagesize; ++i)
2004 *(data + i) = rand();
2005 umask(0);
2006 fd = creat("conftestmmap", 0600);
2007 if (fd < 0)
2008 exit(1);
2009 if (write(fd, data, pagesize) != pagesize)
2010 exit(1);
2011 close(fd);
2012
2013 /*
2014 * Next, try to mmap the file at a fixed address which
2015 * already has something else allocated at it. If we can,
2016 * also make sure that we see the same garbage.
2017 */
2018 fd = open("conftestmmap", O_RDWR);
2019 if (fd < 0)
2020 exit(1);
2021 data2 = malloc(2 * pagesize);
2022 if (!data2)
2023 exit(1);
2024 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2025 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2026 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2027 exit(1);
2028 for (i = 0; i < pagesize; ++i)
2029 if (*(data + i) != *(data2 + i))
2030 exit(1);
2031
2032 /*
2033 * Finally, make sure that changes to the mapped area
2034 * do not percolate back to the file as seen by read().
2035 * (This is a bug on some variants of i386 svr4.0.)
2036 */
2037 for (i = 0; i < pagesize; ++i)
2038 *(data2 + i) = *(data2 + i) + 1;
2039 data3 = malloc(pagesize);
2040 if (!data3)
2041 exit(1);
2042 if (read(fd, data3, pagesize) != pagesize)
2043 exit(1);
2044 for (i = 0; i < pagesize; ++i)
2045 if (*(data + i) != *(data3 + i))
2046 exit(1);
2047 close(fd);
2048 unlink("conftestmmap");
2049 exit(0);
2050}
2051
2052EOF
d28f9cdf 2053if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
2054then
2055 ac_cv_func_mmap_fixed_mapped=yes
2056else
2057 echo "configure: failed program was:" >&5
2058 cat conftest.$ac_ext >&5
2059 rm -fr conftest*
2060 ac_cv_func_mmap_fixed_mapped=no
2061fi
2062rm -fr conftest*
2063fi
2064
2065fi
2066
2067echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2068if test $ac_cv_func_mmap_fixed_mapped = yes; then
2069 cat >> confdefs.h <<\EOF
2070#define HAVE_MMAP 1
2071EOF
2072
2073fi
2074
2075
2076 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2077unistd.h values.h sys/param.h
2078do
2079ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2080echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 2081echo "configure:2082: checking for $ac_hdr" >&5
c906108c
SS
2082if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
2084else
2085 cat > conftest.$ac_ext <<EOF
d28f9cdf 2086#line 2087 "configure"
c906108c
SS
2087#include "confdefs.h"
2088#include <$ac_hdr>
2089EOF
2090ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 2091{ (eval echo configure:2092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2092ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2093if test -z "$ac_err"; then
2094 rm -rf conftest*
2095 eval "ac_cv_header_$ac_safe=yes"
2096else
2097 echo "$ac_err" >&5
2098 echo "configure: failed program was:" >&5
2099 cat conftest.$ac_ext >&5
2100 rm -rf conftest*
2101 eval "ac_cv_header_$ac_safe=no"
2102fi
2103rm -f conftest*
2104fi
2105if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2106 echo "$ac_t""yes" 1>&6
2107 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2108 cat >> confdefs.h <<EOF
2109#define $ac_tr_hdr 1
2110EOF
2111
2112else
2113 echo "$ac_t""no" 1>&6
2114fi
2115done
2116
2117 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2118__argz_count __argz_stringify __argz_next
2119do
2120echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 2121echo "configure:2122: checking for $ac_func" >&5
c906108c
SS
2122if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2123 echo $ac_n "(cached) $ac_c" 1>&6
2124else
2125 cat > conftest.$ac_ext <<EOF
d28f9cdf 2126#line 2127 "configure"
c906108c
SS
2127#include "confdefs.h"
2128/* System header to define __stub macros and hopefully few prototypes,
2129 which can conflict with char $ac_func(); below. */
2130#include <assert.h>
2131/* Override any gcc2 internal prototype to avoid an error. */
2132/* We use char because int might match the return type of a gcc2
2133 builtin and then its argument prototype would still apply. */
2134char $ac_func();
2135
2136int main() {
2137
2138/* The GNU C library defines this for functions which it implements
2139 to always fail with ENOSYS. Some functions are actually named
2140 something starting with __ and the normal name is an alias. */
2141#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2142choke me
2143#else
2144$ac_func();
2145#endif
2146
2147; return 0; }
2148EOF
d28f9cdf 2149if { (eval echo configure:2150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2150 rm -rf conftest*
2151 eval "ac_cv_func_$ac_func=yes"
2152else
2153 echo "configure: failed program was:" >&5
2154 cat conftest.$ac_ext >&5
2155 rm -rf conftest*
2156 eval "ac_cv_func_$ac_func=no"
2157fi
2158rm -f conftest*
2159fi
2160
2161if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2162 echo "$ac_t""yes" 1>&6
2163 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2164 cat >> confdefs.h <<EOF
2165#define $ac_tr_func 1
2166EOF
2167
2168else
2169 echo "$ac_t""no" 1>&6
2170fi
2171done
2172
2173
2174 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2175 for ac_func in stpcpy
2176do
2177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 2178echo "configure:2179: checking for $ac_func" >&5
c906108c
SS
2179if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
2181else
2182 cat > conftest.$ac_ext <<EOF
d28f9cdf 2183#line 2184 "configure"
c906108c
SS
2184#include "confdefs.h"
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $ac_func(); below. */
2187#include <assert.h>
2188/* Override any gcc2 internal prototype to avoid an error. */
2189/* We use char because int might match the return type of a gcc2
2190 builtin and then its argument prototype would still apply. */
2191char $ac_func();
2192
2193int main() {
2194
2195/* The GNU C library defines this for functions which it implements
2196 to always fail with ENOSYS. Some functions are actually named
2197 something starting with __ and the normal name is an alias. */
2198#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2199choke me
2200#else
2201$ac_func();
2202#endif
2203
2204; return 0; }
2205EOF
d28f9cdf 2206if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2207 rm -rf conftest*
2208 eval "ac_cv_func_$ac_func=yes"
2209else
2210 echo "configure: failed program was:" >&5
2211 cat conftest.$ac_ext >&5
2212 rm -rf conftest*
2213 eval "ac_cv_func_$ac_func=no"
2214fi
2215rm -f conftest*
2216fi
2217
2218if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2219 echo "$ac_t""yes" 1>&6
2220 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2221 cat >> confdefs.h <<EOF
2222#define $ac_tr_func 1
2223EOF
2224
2225else
2226 echo "$ac_t""no" 1>&6
2227fi
2228done
2229
2230 fi
2231 if test "${ac_cv_func_stpcpy}" = "yes"; then
2232 cat >> confdefs.h <<\EOF
2233#define HAVE_STPCPY 1
2234EOF
2235
2236 fi
2237
2238 if test $ac_cv_header_locale_h = yes; then
2239 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
d28f9cdf 2240echo "configure:2241: checking for LC_MESSAGES" >&5
c906108c
SS
2241if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2242 echo $ac_n "(cached) $ac_c" 1>&6
2243else
2244 cat > conftest.$ac_ext <<EOF
d28f9cdf 2245#line 2246 "configure"
c906108c
SS
2246#include "confdefs.h"
2247#include <locale.h>
2248int main() {
2249return LC_MESSAGES
2250; return 0; }
2251EOF
d28f9cdf 2252if { (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2253 rm -rf conftest*
2254 am_cv_val_LC_MESSAGES=yes
2255else
2256 echo "configure: failed program was:" >&5
2257 cat conftest.$ac_ext >&5
2258 rm -rf conftest*
2259 am_cv_val_LC_MESSAGES=no
2260fi
2261rm -f conftest*
2262fi
2263
2264echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2265 if test $am_cv_val_LC_MESSAGES = yes; then
2266 cat >> confdefs.h <<\EOF
2267#define HAVE_LC_MESSAGES 1
2268EOF
2269
2270 fi
2271 fi
2272 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
d28f9cdf 2273echo "configure:2274: checking whether NLS is requested" >&5
c906108c
SS
2274 # Check whether --enable-nls or --disable-nls was given.
2275if test "${enable_nls+set}" = set; then
2276 enableval="$enable_nls"
2277 USE_NLS=$enableval
2278else
2279 USE_NLS=yes
2280fi
2281
2282 echo "$ac_t""$USE_NLS" 1>&6
2283
2284
2285 USE_INCLUDED_LIBINTL=no
2286
2287 if test "$USE_NLS" = "yes"; then
2288 cat >> confdefs.h <<\EOF
2289#define ENABLE_NLS 1
2290EOF
2291
2292 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
d28f9cdf 2293echo "configure:2294: checking whether included gettext is requested" >&5
c906108c
SS
2294 # Check whether --with-included-gettext or --without-included-gettext was given.
2295if test "${with_included_gettext+set}" = set; then
2296 withval="$with_included_gettext"
2297 nls_cv_force_use_gnu_gettext=$withval
2298else
2299 nls_cv_force_use_gnu_gettext=no
2300fi
2301
2302 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2303
2304 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2305 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2306 nls_cv_header_intl=
2307 nls_cv_header_libgt=
2308 CATOBJEXT=NONE
2309
2310 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2311echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
d28f9cdf 2312echo "configure:2313: checking for libintl.h" >&5
c906108c
SS
2313if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2314 echo $ac_n "(cached) $ac_c" 1>&6
2315else
2316 cat > conftest.$ac_ext <<EOF
d28f9cdf 2317#line 2318 "configure"
c906108c
SS
2318#include "confdefs.h"
2319#include <libintl.h>
2320EOF
2321ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 2322{ (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2323ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2324if test -z "$ac_err"; then
2325 rm -rf conftest*
2326 eval "ac_cv_header_$ac_safe=yes"
2327else
2328 echo "$ac_err" >&5
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -rf conftest*
2332 eval "ac_cv_header_$ac_safe=no"
2333fi
2334rm -f conftest*
2335fi
2336if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2337 echo "$ac_t""yes" 1>&6
2338 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
d28f9cdf 2339echo "configure:2340: checking for gettext in libc" >&5
c906108c
SS
2340if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2341 echo $ac_n "(cached) $ac_c" 1>&6
2342else
2343 cat > conftest.$ac_ext <<EOF
d28f9cdf 2344#line 2345 "configure"
c906108c
SS
2345#include "confdefs.h"
2346#include <libintl.h>
2347int main() {
2348return (int) gettext ("")
2349; return 0; }
2350EOF
d28f9cdf 2351if { (eval echo configure:2352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2352 rm -rf conftest*
2353 gt_cv_func_gettext_libc=yes
2354else
2355 echo "configure: failed program was:" >&5
2356 cat conftest.$ac_ext >&5
2357 rm -rf conftest*
2358 gt_cv_func_gettext_libc=no
2359fi
2360rm -f conftest*
2361fi
2362
2363echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2364
2365 if test "$gt_cv_func_gettext_libc" != "yes"; then
2366 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
d28f9cdf 2367echo "configure:2368: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2368ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2369if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2370 echo $ac_n "(cached) $ac_c" 1>&6
2371else
2372 ac_save_LIBS="$LIBS"
2373LIBS="-lintl $LIBS"
2374cat > conftest.$ac_ext <<EOF
d28f9cdf 2375#line 2376 "configure"
c906108c
SS
2376#include "confdefs.h"
2377/* Override any gcc2 internal prototype to avoid an error. */
2378/* We use char because int might match the return type of a gcc2
2379 builtin and then its argument prototype would still apply. */
2380char bindtextdomain();
2381
2382int main() {
2383bindtextdomain()
2384; return 0; }
2385EOF
d28f9cdf 2386if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2387 rm -rf conftest*
2388 eval "ac_cv_lib_$ac_lib_var=yes"
2389else
2390 echo "configure: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
2392 rm -rf conftest*
2393 eval "ac_cv_lib_$ac_lib_var=no"
2394fi
2395rm -f conftest*
2396LIBS="$ac_save_LIBS"
2397
2398fi
2399if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2400 echo "$ac_t""yes" 1>&6
2401 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
d28f9cdf 2402echo "configure:2403: checking for gettext in libintl" >&5
c906108c
SS
2403if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2404 echo $ac_n "(cached) $ac_c" 1>&6
2405else
2406 cat > conftest.$ac_ext <<EOF
d28f9cdf 2407#line 2408 "configure"
c906108c
SS
2408#include "confdefs.h"
2409
2410int main() {
2411return (int) gettext ("")
2412; return 0; }
2413EOF
d28f9cdf 2414if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2415 rm -rf conftest*
2416 gt_cv_func_gettext_libintl=yes
2417else
2418 echo "configure: failed program was:" >&5
2419 cat conftest.$ac_ext >&5
2420 rm -rf conftest*
2421 gt_cv_func_gettext_libintl=no
2422fi
2423rm -f conftest*
2424fi
2425
2426echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2427else
2428 echo "$ac_t""no" 1>&6
2429fi
2430
2431 fi
2432
2433 if test "$gt_cv_func_gettext_libc" = "yes" \
2434 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2435 cat >> confdefs.h <<\EOF
2436#define HAVE_GETTEXT 1
2437EOF
2438
2439 # Extract the first word of "msgfmt", so it can be a program name with args.
2440set dummy msgfmt; ac_word=$2
2441echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2442echo "configure:2443: checking for $ac_word" >&5
c906108c
SS
2443if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445else
2446 case "$MSGFMT" in
2447 /*)
2448 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2449 ;;
2450 *)
2451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2452 for ac_dir in $PATH; do
2453 test -z "$ac_dir" && ac_dir=.
2454 if test -f $ac_dir/$ac_word; then
2455 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2456 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2457 break
2458 fi
2459 fi
2460 done
2461 IFS="$ac_save_ifs"
2462 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2463 ;;
2464esac
2465fi
2466MSGFMT="$ac_cv_path_MSGFMT"
2467if test -n "$MSGFMT"; then
2468 echo "$ac_t""$MSGFMT" 1>&6
2469else
2470 echo "$ac_t""no" 1>&6
2471fi
2472 if test "$MSGFMT" != "no"; then
2473 for ac_func in dcgettext
2474do
2475echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 2476echo "configure:2477: checking for $ac_func" >&5
c906108c
SS
2477if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2478 echo $ac_n "(cached) $ac_c" 1>&6
2479else
2480 cat > conftest.$ac_ext <<EOF
d28f9cdf 2481#line 2482 "configure"
c906108c
SS
2482#include "confdefs.h"
2483/* System header to define __stub macros and hopefully few prototypes,
2484 which can conflict with char $ac_func(); below. */
2485#include <assert.h>
2486/* Override any gcc2 internal prototype to avoid an error. */
2487/* We use char because int might match the return type of a gcc2
2488 builtin and then its argument prototype would still apply. */
2489char $ac_func();
2490
2491int main() {
2492
2493/* The GNU C library defines this for functions which it implements
2494 to always fail with ENOSYS. Some functions are actually named
2495 something starting with __ and the normal name is an alias. */
2496#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2497choke me
2498#else
2499$ac_func();
2500#endif
2501
2502; return 0; }
2503EOF
d28f9cdf 2504if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2505 rm -rf conftest*
2506 eval "ac_cv_func_$ac_func=yes"
2507else
2508 echo "configure: failed program was:" >&5
2509 cat conftest.$ac_ext >&5
2510 rm -rf conftest*
2511 eval "ac_cv_func_$ac_func=no"
2512fi
2513rm -f conftest*
2514fi
2515
2516if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2517 echo "$ac_t""yes" 1>&6
2518 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2519 cat >> confdefs.h <<EOF
2520#define $ac_tr_func 1
2521EOF
2522
2523else
2524 echo "$ac_t""no" 1>&6
2525fi
2526done
2527
2528 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2529set dummy gmsgfmt; ac_word=$2
2530echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2531echo "configure:2532: checking for $ac_word" >&5
c906108c
SS
2532if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2533 echo $ac_n "(cached) $ac_c" 1>&6
2534else
2535 case "$GMSGFMT" in
2536 /*)
2537 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2538 ;;
2539 ?:/*)
2540 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2541 ;;
2542 *)
2543 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2544 ac_dummy="$PATH"
2545 for ac_dir in $ac_dummy; do
2546 test -z "$ac_dir" && ac_dir=.
2547 if test -f $ac_dir/$ac_word; then
2548 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2549 break
2550 fi
2551 done
2552 IFS="$ac_save_ifs"
2553 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2554 ;;
2555esac
2556fi
2557GMSGFMT="$ac_cv_path_GMSGFMT"
2558if test -n "$GMSGFMT"; then
2559 echo "$ac_t""$GMSGFMT" 1>&6
2560else
2561 echo "$ac_t""no" 1>&6
2562fi
2563
2564 # Extract the first word of "xgettext", so it can be a program name with args.
2565set dummy xgettext; ac_word=$2
2566echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2567echo "configure:2568: checking for $ac_word" >&5
c906108c
SS
2568if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2569 echo $ac_n "(cached) $ac_c" 1>&6
2570else
2571 case "$XGETTEXT" in
2572 /*)
2573 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2574 ;;
2575 *)
2576 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2577 for ac_dir in $PATH; do
2578 test -z "$ac_dir" && ac_dir=.
2579 if test -f $ac_dir/$ac_word; then
2580 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2581 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2582 break
2583 fi
2584 fi
2585 done
2586 IFS="$ac_save_ifs"
2587 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2588 ;;
2589esac
2590fi
2591XGETTEXT="$ac_cv_path_XGETTEXT"
2592if test -n "$XGETTEXT"; then
2593 echo "$ac_t""$XGETTEXT" 1>&6
2594else
2595 echo "$ac_t""no" 1>&6
2596fi
2597
2598 cat > conftest.$ac_ext <<EOF
d28f9cdf 2599#line 2600 "configure"
c906108c
SS
2600#include "confdefs.h"
2601
2602int main() {
2603extern int _nl_msg_cat_cntr;
2604 return _nl_msg_cat_cntr
2605; return 0; }
2606EOF
d28f9cdf 2607if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2608 rm -rf conftest*
2609 CATOBJEXT=.gmo
2610 DATADIRNAME=share
2611else
2612 echo "configure: failed program was:" >&5
2613 cat conftest.$ac_ext >&5
2614 rm -rf conftest*
2615 CATOBJEXT=.mo
2616 DATADIRNAME=lib
2617fi
2618rm -f conftest*
2619 INSTOBJEXT=.mo
2620 fi
2621 fi
2622
2623else
2624 echo "$ac_t""no" 1>&6
2625fi
2626
2627
2628
2629 if test "$CATOBJEXT" = "NONE"; then
2630 nls_cv_use_gnu_gettext=yes
2631 fi
2632 fi
2633
2634 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2635 INTLOBJS="\$(GETTOBJS)"
2636 # Extract the first word of "msgfmt", so it can be a program name with args.
2637set dummy msgfmt; ac_word=$2
2638echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2639echo "configure:2640: checking for $ac_word" >&5
c906108c
SS
2640if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2641 echo $ac_n "(cached) $ac_c" 1>&6
2642else
2643 case "$MSGFMT" in
2644 /*)
2645 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2646 ;;
2647 *)
2648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2649 for ac_dir in $PATH; do
2650 test -z "$ac_dir" && ac_dir=.
2651 if test -f $ac_dir/$ac_word; then
2652 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2653 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2654 break
2655 fi
2656 fi
2657 done
2658 IFS="$ac_save_ifs"
2659 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2660 ;;
2661esac
2662fi
2663MSGFMT="$ac_cv_path_MSGFMT"
2664if test -n "$MSGFMT"; then
2665 echo "$ac_t""$MSGFMT" 1>&6
2666else
2667 echo "$ac_t""no" 1>&6
2668fi
2669
2670 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2671set dummy gmsgfmt; ac_word=$2
2672echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2673echo "configure:2674: checking for $ac_word" >&5
c906108c
SS
2674if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
2676else
2677 case "$GMSGFMT" in
2678 /*)
2679 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2680 ;;
2681 ?:/*)
2682 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2683 ;;
2684 *)
2685 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2686 ac_dummy="$PATH"
2687 for ac_dir in $ac_dummy; do
2688 test -z "$ac_dir" && ac_dir=.
2689 if test -f $ac_dir/$ac_word; then
2690 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2691 break
2692 fi
2693 done
2694 IFS="$ac_save_ifs"
2695 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2696 ;;
2697esac
2698fi
2699GMSGFMT="$ac_cv_path_GMSGFMT"
2700if test -n "$GMSGFMT"; then
2701 echo "$ac_t""$GMSGFMT" 1>&6
2702else
2703 echo "$ac_t""no" 1>&6
2704fi
2705
2706 # Extract the first word of "xgettext", so it can be a program name with args.
2707set dummy xgettext; ac_word=$2
2708echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 2709echo "configure:2710: checking for $ac_word" >&5
c906108c
SS
2710if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2711 echo $ac_n "(cached) $ac_c" 1>&6
2712else
2713 case "$XGETTEXT" in
2714 /*)
2715 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2716 ;;
2717 *)
2718 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2719 for ac_dir in $PATH; do
2720 test -z "$ac_dir" && ac_dir=.
2721 if test -f $ac_dir/$ac_word; then
2722 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2723 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2724 break
2725 fi
2726 fi
2727 done
2728 IFS="$ac_save_ifs"
2729 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2730 ;;
2731esac
2732fi
2733XGETTEXT="$ac_cv_path_XGETTEXT"
2734if test -n "$XGETTEXT"; then
2735 echo "$ac_t""$XGETTEXT" 1>&6
2736else
2737 echo "$ac_t""no" 1>&6
2738fi
2739
2740
2741 USE_INCLUDED_LIBINTL=yes
2742 CATOBJEXT=.gmo
2743 INSTOBJEXT=.mo
2744 DATADIRNAME=share
2745 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2746 INTLLIBS=$INTLDEPS
2747 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2748 nls_cv_header_intl=libintl.h
2749 nls_cv_header_libgt=libgettext.h
2750 fi
2751
2752 if test "$XGETTEXT" != ":"; then
2753 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2754 : ;
2755 else
2756 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2757 XGETTEXT=":"
2758 fi
2759 fi
2760
2761 # We need to process the po/ directory.
2762 POSUB=po
2763 else
2764 DATADIRNAME=share
2765 nls_cv_header_intl=libintl.h
2766 nls_cv_header_libgt=libgettext.h
2767 fi
2768
2769 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2770 # because some of the sources are only built for this goal.
2771 if test "$PACKAGE" = gettext; then
2772 USE_NLS=yes
2773 USE_INCLUDED_LIBINTL=yes
2774 fi
2775
2776 for lang in $ALL_LINGUAS; do
2777 GMOFILES="$GMOFILES $lang.gmo"
2778 POFILES="$POFILES $lang.po"
2779 done
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794 if test "x$CATOBJEXT" != "x"; then
2795 if test "x$ALL_LINGUAS" = "x"; then
2796 LINGUAS=
2797 else
2798 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
d28f9cdf 2799echo "configure:2800: checking for catalogs to be installed" >&5
c906108c
SS
2800 NEW_LINGUAS=
2801 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2802 case "$ALL_LINGUAS" in
2803 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2804 esac
2805 done
2806 LINGUAS=$NEW_LINGUAS
2807 echo "$ac_t""$LINGUAS" 1>&6
2808 fi
2809
2810 if test -n "$LINGUAS"; then
2811 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2812 fi
2813 fi
2814
2815 if test $ac_cv_header_locale_h = yes; then
2816 INCLUDE_LOCALE_H="#include <locale.h>"
2817 else
2818 INCLUDE_LOCALE_H="\
2819/* The system does not provide the header <locale.h>. Take care yourself. */"
2820 fi
2821
2822
2823 if test -f $srcdir/po2tbl.sed.in; then
2824 if test "$CATOBJEXT" = ".cat"; then
2825 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2826echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
d28f9cdf 2827echo "configure:2828: checking for linux/version.h" >&5
c906108c
SS
2828if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2829 echo $ac_n "(cached) $ac_c" 1>&6
2830else
2831 cat > conftest.$ac_ext <<EOF
d28f9cdf 2832#line 2833 "configure"
c906108c
SS
2833#include "confdefs.h"
2834#include <linux/version.h>
2835EOF
2836ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 2837{ (eval echo configure:2838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2838ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2839if test -z "$ac_err"; then
2840 rm -rf conftest*
2841 eval "ac_cv_header_$ac_safe=yes"
2842else
2843 echo "$ac_err" >&5
2844 echo "configure: failed program was:" >&5
2845 cat conftest.$ac_ext >&5
2846 rm -rf conftest*
2847 eval "ac_cv_header_$ac_safe=no"
2848fi
2849rm -f conftest*
2850fi
2851if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2852 echo "$ac_t""yes" 1>&6
2853 msgformat=linux
2854else
2855 echo "$ac_t""no" 1>&6
2856msgformat=xopen
2857fi
2858
2859
2860 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2861 fi
2862 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2863 $srcdir/po2tbl.sed.in > po2tbl.sed
2864 fi
2865
2866 if test "$PACKAGE" = "gettext"; then
2867 GT_NO="#NO#"
2868 GT_YES=
2869 else
2870 GT_NO=
2871 GT_YES="#YES#"
2872 fi
2873
2874
2875
2876 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2877
2878
2879 l=
2880
2881
4536bbc6 2882 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2883 test -d po || mkdir po
2884 if test "x$srcdir" != "x."; then
2885 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2886 posrcprefix="$srcdir/"
2887 else
2888 posrcprefix="../$srcdir/"
2889 fi
2890 else
2891 posrcprefix="../"
2892 fi
2893 rm -f po/POTFILES
2894 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2895 < $srcdir/po/POTFILES.in > po/POTFILES
2896 fi
2897
0fbb3da7
TT
2898cat >> confdefs.h <<\EOF
2899#define PACKAGE "gdb"
2900EOF
2901
2902
c906108c
SS
2903
2904
2905CONFIG_OBS=
66b965bb 2906CONFIG_LIB_OBS=
c906108c
SS
2907CONFIG_DEPS=
2908CONFIG_SRCS=
fb40c209
AC
2909CONFIG_INITS=
2910ENABLE_CFLAGS=
b3a90332
AC
2911CONFIG_ALL=
2912CONFIG_CLEAN=
e56ac5c3
AC
2913CONFIG_INSTALL=
2914CONFIG_UNINSTALL=
c906108c 2915
8dcde887 2916subdirs="doc testsuite"
96baa820 2917
8dcde887 2918configdirs=
96baa820 2919
27e9bf90 2920. $srcdir/configure.host
c906108c 2921
27e9bf90 2922. $srcdir/configure.tgt
c906108c 2923
27e9bf90
MK
2924# Fetch the default architecture and default target vector from BFD.
2925targ=$target; . $srcdir/../bfd/config.bfd
c906108c 2926
27e9bf90
MK
2927# We only want the first architecture, so strip off the others if
2928# there is more than one.
2929targ_archs=`echo $targ_archs | sed 's/ .*//'`
1ba607ad 2930
27e9bf90
MK
2931if test "x$targ_archs" != x; then
2932 cat >> confdefs.h <<EOF
2933#define DEFAULT_BFD_ARCH $targ_archs
1ba607ad
AC
2934EOF
2935
2936fi
27e9bf90
MK
2937if test "x$targ_defvec" != x; then
2938 cat >> confdefs.h <<EOF
2939#define DEFAULT_BFD_VEC $targ_defvec
1ba607ad
AC
2940EOF
2941
2942fi
c906108c 2943
8bb2c122
MK
2944if test "$program_transform_name" = s,x,x,; then
2945 program_transform_name=
2946else
2947 # Double any \ or $. echo might interpret backslashes.
2948 cat <<\EOF_SED > conftestsed
2949s,\\,\\\\,g; s,\$,$$,g
2950EOF_SED
2951 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2952 rm -f conftestsed
2953fi
2954test "$program_prefix" != NONE &&
2955 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2956# Use a double $ so make ignores it.
2957test "$program_suffix" != NONE &&
2958 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2959
2960# sed with no file args requires a program.
2961test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2962
2963
627af7ea
MK
2964# The CLI cannot be disabled yet, but may be in the future.
2965
2966# Enable CLI.
2967# Check whether --enable-gdbcli or --disable-gdbcli was given.
2968if test "${enable_gdbcli+set}" = set; then
2969 enableval="$enable_gdbcli"
2970 case $enableval in
2971 yes)
2972 ;;
2973 no)
2974 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2975 *)
2976 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2977 esac
2978else
2979 enable_gdbcli=yes
2980fi
2981
2982if test x"$enable_gdbcli" = xyes; then
2983 if test -d $srcdir/cli; then
2984 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2985 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2986 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2987 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
2988 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2989 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
2990 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
2991 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
2992 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
2993 fi
2994fi
2995
2996# Enable MI.
2997# Check whether --enable-gdbmi or --disable-gdbmi was given.
2998if test "${enable_gdbmi+set}" = set; then
2999 enableval="$enable_gdbmi"
3000 case $enableval in
3001 yes | no)
3002 ;;
3003 *)
3004 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3005 esac
3006else
3007 enable_gdbmi=yes
3008fi
3009
3010if test x"$enable_gdbmi" = xyes; then
3011 if test -d $srcdir/mi; then
3012 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3013 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3014 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3015 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3016 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3017 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3018 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3019 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3020 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3021 fi
3022fi
3023
06825bd1
MK
3024# Enable TUI.
3025# Check whether --enable-tui or --disable-tui was given.
3026if test "${enable_tui+set}" = set; then
3027 enableval="$enable_tui"
3028 case $enableval in
3029 yes | no)
3030 ;;
3031 *)
3032 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3033 esac
3034fi
3035
3036if test x"$enable_tui" = xyes; then
3037 if test -d $srcdir/tui; then
3038 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3039 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3040 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3041 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3042 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3043 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3044 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3045 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3046 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3047 need_curses=yes
3048 fi
3049fi
3050
8ee53726
MK
3051# Enable gdbtk.
3052# Check whether --enable-gdbtk or --disable-gdbtk was given.
3053if test "${enable_gdbtk+set}" = set; then
3054 enableval="$enable_gdbtk"
3055 case $enableval in
3056 yes | no)
3057 ;;
3058 *)
3059 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3060 esac
3061else
3062 if test -d $srcdir/gdbtk; then
3063 enable_gdbtk=yes
3064 else
3065 enable_gdbtk=no
3066 fi
3067fi
3068
3069# We unconditionally disable gdbtk tests on selected platforms.
3070case $host_os in
3071 go32* | windows*)
3072 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3073 enable_gdbtk=no ;;
3074esac
3075
d28f9cdf
DJ
3076# Profiling support.
3077# Check whether --enable-profiling or --disable-profiling was given.
3078if test "${enable_profiling+set}" = set; then
3079 enableval="$enable_profiling"
3080 case $enableval in
3081 yes | no)
3082 ;;
3083 *)
3084 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3085 esac
3086else
3087 enable_profiling=no
3088fi
3089
3090
3091if test "$enable_profiling" = yes ; then
3092 PROFILE_CFLAGS=-pg
3093 OLD_CFLAGS="$CFLAGS"
3094 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3095
3096 echo $ac_n "checking for monstartup""... $ac_c" 1>&6
3097echo "configure:3098: checking for monstartup" >&5
3098if eval "test \"`echo '$''{'ac_cv_func_monstartup'+set}'`\" = set"; then
3099 echo $ac_n "(cached) $ac_c" 1>&6
3100else
3101 cat > conftest.$ac_ext <<EOF
3102#line 3103 "configure"
3103#include "confdefs.h"
3104/* System header to define __stub macros and hopefully few prototypes,
3105 which can conflict with char monstartup(); below. */
3106#include <assert.h>
3107/* Override any gcc2 internal prototype to avoid an error. */
3108/* We use char because int might match the return type of a gcc2
3109 builtin and then its argument prototype would still apply. */
3110char monstartup();
3111
3112int main() {
3113
3114/* The GNU C library defines this for functions which it implements
3115 to always fail with ENOSYS. Some functions are actually named
3116 something starting with __ and the normal name is an alias. */
3117#if defined (__stub_monstartup) || defined (__stub___monstartup)
3118choke me
3119#else
3120monstartup();
3121#endif
3122
3123; return 0; }
3124EOF
3125if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3126 rm -rf conftest*
3127 eval "ac_cv_func_monstartup=yes"
3128else
3129 echo "configure: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3131 rm -rf conftest*
3132 eval "ac_cv_func_monstartup=no"
3133fi
3134rm -f conftest*
3135fi
3136
3137if eval "test \"`echo '$ac_cv_func_'monstartup`\" = yes"; then
3138 echo "$ac_t""yes" 1>&6
3139 :
3140else
3141 echo "$ac_t""no" 1>&6
3142{ echo "configure: error: monstartup necessary to use --enable-profiling." 1>&2; exit 1; }
3143fi
3144
3145
3146 echo $ac_n "checking for _mcleanup""... $ac_c" 1>&6
3147echo "configure:3148: checking for _mcleanup" >&5
3148if eval "test \"`echo '$''{'ac_cv_func__mcleanup'+set}'`\" = set"; then
3149 echo $ac_n "(cached) $ac_c" 1>&6
3150else
3151 cat > conftest.$ac_ext <<EOF
3152#line 3153 "configure"
3153#include "confdefs.h"
3154/* System header to define __stub macros and hopefully few prototypes,
3155 which can conflict with char _mcleanup(); below. */
3156#include <assert.h>
3157/* Override any gcc2 internal prototype to avoid an error. */
3158/* We use char because int might match the return type of a gcc2
3159 builtin and then its argument prototype would still apply. */
3160char _mcleanup();
3161
3162int main() {
3163
3164/* The GNU C library defines this for functions which it implements
3165 to always fail with ENOSYS. Some functions are actually named
3166 something starting with __ and the normal name is an alias. */
3167#if defined (__stub__mcleanup) || defined (__stub____mcleanup)
3168choke me
3169#else
3170_mcleanup();
3171#endif
3172
3173; return 0; }
3174EOF
3175if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3176 rm -rf conftest*
3177 eval "ac_cv_func__mcleanup=yes"
3178else
3179 echo "configure: failed program was:" >&5
3180 cat conftest.$ac_ext >&5
3181 rm -rf conftest*
3182 eval "ac_cv_func__mcleanup=no"
3183fi
3184rm -f conftest*
3185fi
3186
3187if eval "test \"`echo '$ac_cv_func_'_mcleanup`\" = yes"; then
3188 echo "$ac_t""yes" 1>&6
3189 :
3190else
3191 echo "$ac_t""no" 1>&6
3192{ echo "configure: error: _mcleanup necessary to use --enable-profiling." 1>&2; exit 1; }
3193fi
3194
3195
3196 CFLAGS="$OLD_CFLAGS"
3197fi
3198
8bb2c122
MK
3199# --------------------- #
3200# Checks for programs. #
3201# --------------------- #
3202
c41b7eb1 3203for ac_prog in mawk gawk nawk awk
7a292a7a
SS
3204do
3205# Extract the first word of "$ac_prog", so it can be a program name with args.
3206set dummy $ac_prog; ac_word=$2
3207echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3208echo "configure:3209: checking for $ac_word" >&5
7a292a7a
SS
3209if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3210 echo $ac_n "(cached) $ac_c" 1>&6
3211else
3212 if test -n "$AWK"; then
3213 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3214else
3215 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3216 ac_dummy="$PATH"
3217 for ac_dir in $ac_dummy; do
3218 test -z "$ac_dir" && ac_dir=.
3219 if test -f $ac_dir/$ac_word; then
3220 ac_cv_prog_AWK="$ac_prog"
3221 break
3222 fi
3223 done
3224 IFS="$ac_save_ifs"
3225fi
3226fi
3227AWK="$ac_cv_prog_AWK"
3228if test -n "$AWK"; then
3229 echo "$ac_t""$AWK" 1>&6
3230else
3231 echo "$ac_t""no" 1>&6
3232fi
3233
3234test -n "$AWK" && break
3235done
3236
c906108c
SS
3237# Find a good install program. We prefer a C program (faster),
3238# so one script is as good as another. But avoid the broken or
3239# incompatible versions:
3240# SysV /etc/install, /usr/sbin/install
3241# SunOS /usr/etc/install
3242# IRIX /sbin/install
3243# AIX /bin/install
3244# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3245# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3246# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3247# ./install, which can be erroneously created by make from ./install.sh.
3248echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
d28f9cdf 3249echo "configure:3250: checking for a BSD compatible install" >&5
c906108c
SS
3250if test -z "$INSTALL"; then
3251if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3252 echo $ac_n "(cached) $ac_c" 1>&6
3253else
3254 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3255 for ac_dir in $PATH; do
3256 # Account for people who put trailing slashes in PATH elements.
3257 case "$ac_dir/" in
3258 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3259 *)
3260 # OSF1 and SCO ODT 3.0 have their own names for install.
3261 # Don't use installbsd from OSF since it installs stuff as root
3262 # by default.
3263 for ac_prog in ginstall scoinst install; do
3264 if test -f $ac_dir/$ac_prog; then
3265 if test $ac_prog = install &&
3266 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3267 # AIX install. It has an incompatible calling convention.
3268 :
3269 else
3270 ac_cv_path_install="$ac_dir/$ac_prog -c"
3271 break 2
3272 fi
3273 fi
3274 done
3275 ;;
3276 esac
3277 done
3278 IFS="$ac_save_IFS"
3279
3280fi
3281 if test "${ac_cv_path_install+set}" = set; then
3282 INSTALL="$ac_cv_path_install"
3283 else
3284 # As a last resort, use the slow shell script. We don't cache a
3285 # path for INSTALL within a source directory, because that will
3286 # break other packages using the cache if that directory is
3287 # removed, or if the path is relative.
3288 INSTALL="$ac_install_sh"
3289 fi
3290fi
3291echo "$ac_t""$INSTALL" 1>&6
3292
3293# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3294# It thinks the first close brace ends the variable substitution.
3295test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3296
3297test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3298
3299test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3300
8bb2c122 3301echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
d28f9cdf 3302echo "configure:3303: checking whether ln -s works" >&5
8bb2c122
MK
3303if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3304 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 3305else
8bb2c122
MK
3306 rm -f conftestdata
3307if ln -s X conftestdata 2>/dev/null
3308then
3309 rm -f conftestdata
3310 ac_cv_prog_LN_S="ln -s"
3311else
3312 ac_cv_prog_LN_S=ln
3313fi
3314fi
3315LN_S="$ac_cv_prog_LN_S"
3316if test "$ac_cv_prog_LN_S" = "ln -s"; then
3317 echo "$ac_t""yes" 1>&6
3318else
3319 echo "$ac_t""no" 1>&6
c906108c
SS
3320fi
3321
8bb2c122
MK
3322# Extract the first word of "ranlib", so it can be a program name with args.
3323set dummy ranlib; ac_word=$2
c906108c 3324echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3325echo "configure:3326: checking for $ac_word" >&5
8bb2c122 3326if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
c906108c
SS
3327 echo $ac_n "(cached) $ac_c" 1>&6
3328else
8bb2c122
MK
3329 if test -n "$RANLIB"; then
3330 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
c906108c
SS
3331else
3332 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3333 ac_dummy="$PATH"
3334 for ac_dir in $ac_dummy; do
3335 test -z "$ac_dir" && ac_dir=.
3336 if test -f $ac_dir/$ac_word; then
8bb2c122 3337 ac_cv_prog_RANLIB="ranlib"
c906108c
SS
3338 break
3339 fi
3340 done
3341 IFS="$ac_save_ifs"
8bb2c122 3342 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
c906108c
SS
3343fi
3344fi
8bb2c122
MK
3345RANLIB="$ac_cv_prog_RANLIB"
3346if test -n "$RANLIB"; then
3347 echo "$ac_t""$RANLIB" 1>&6
c906108c
SS
3348else
3349 echo "$ac_t""no" 1>&6
3350fi
3351
8bb2c122
MK
3352for ac_prog in 'bison -y' byacc
3353do
3354# Extract the first word of "$ac_prog", so it can be a program name with args.
3355set dummy $ac_prog; ac_word=$2
c906108c 3356echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3357echo "configure:3358: checking for $ac_word" >&5
8bb2c122 3358if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
c906108c
SS
3359 echo $ac_n "(cached) $ac_c" 1>&6
3360else
8bb2c122
MK
3361 if test -n "$YACC"; then
3362 ac_cv_prog_YACC="$YACC" # Let the user override the test.
c906108c
SS
3363else
3364 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3365 ac_dummy="$PATH"
3366 for ac_dir in $ac_dummy; do
3367 test -z "$ac_dir" && ac_dir=.
3368 if test -f $ac_dir/$ac_word; then
8bb2c122 3369 ac_cv_prog_YACC="$ac_prog"
c906108c
SS
3370 break
3371 fi
3372 done
3373 IFS="$ac_save_ifs"
3374fi
3375fi
8bb2c122
MK
3376YACC="$ac_cv_prog_YACC"
3377if test -n "$YACC"; then
3378 echo "$ac_t""$YACC" 1>&6
c906108c
SS
3379else
3380 echo "$ac_t""no" 1>&6
3381fi
3382
8bb2c122
MK
3383test -n "$YACC" && break
3384done
3385test -n "$YACC" || YACC="yacc"
c906108c 3386
8bb2c122
MK
3387
3388# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3389set dummy ${ac_tool_prefix}ar; ac_word=$2
c906108c 3390echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3391echo "configure:3392: checking for $ac_word" >&5
8bb2c122 3392if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
c906108c
SS
3393 echo $ac_n "(cached) $ac_c" 1>&6
3394else
8bb2c122
MK
3395 if test -n "$AR"; then
3396 ac_cv_prog_AR="$AR" # Let the user override the test.
c906108c
SS
3397else
3398 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3399 ac_dummy="$PATH"
3400 for ac_dir in $ac_dummy; do
3401 test -z "$ac_dir" && ac_dir=.
3402 if test -f $ac_dir/$ac_word; then
8bb2c122 3403 ac_cv_prog_AR="${ac_tool_prefix}ar"
c906108c
SS
3404 break
3405 fi
3406 done
3407 IFS="$ac_save_ifs"
8bb2c122 3408 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
c906108c
SS
3409fi
3410fi
8bb2c122
MK
3411AR="$ac_cv_prog_AR"
3412if test -n "$AR"; then
3413 echo "$ac_t""$AR" 1>&6
c906108c
SS
3414else
3415 echo "$ac_t""no" 1>&6
3416fi
3417
8bb2c122 3418
c906108c 3419
95ca63c4
CF
3420# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3421set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3422echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3423echo "configure:3424: checking for $ac_word" >&5
95ca63c4
CF
3424if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3425 echo $ac_n "(cached) $ac_c" 1>&6
3426else
3427 if test -n "$DLLTOOL"; then
3428 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3429else
3430 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3431 ac_dummy="$PATH"
3432 for ac_dir in $ac_dummy; do
3433 test -z "$ac_dir" && ac_dir=.
3434 if test -f $ac_dir/$ac_word; then
3435 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3436 break
3437 fi
3438 done
3439 IFS="$ac_save_ifs"
3440 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3441fi
3442fi
3443DLLTOOL="$ac_cv_prog_DLLTOOL"
3444if test -n "$DLLTOOL"; then
3445 echo "$ac_t""$DLLTOOL" 1>&6
3446else
3447 echo "$ac_t""no" 1>&6
3448fi
3449
3450
3451
3452# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3453set dummy ${ac_tool_prefix}windres; ac_word=$2
3454echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3455echo "configure:3456: checking for $ac_word" >&5
95ca63c4
CF
3456if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3457 echo $ac_n "(cached) $ac_c" 1>&6
3458else
3459 if test -n "$WINDRES"; then
3460 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3461else
3462 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3463 ac_dummy="$PATH"
3464 for ac_dir in $ac_dummy; do
3465 test -z "$ac_dir" && ac_dir=.
3466 if test -f $ac_dir/$ac_word; then
3467 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3468 break
3469 fi
3470 done
3471 IFS="$ac_save_ifs"
3472 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3473fi
3474fi
3475WINDRES="$ac_cv_prog_WINDRES"
3476if test -n "$WINDRES"; then
3477 echo "$ac_t""$WINDRES" 1>&6
3478else
3479 echo "$ac_t""no" 1>&6
3480fi
3481
3482
3483
c906108c 3484
8bb2c122 3485# Needed for GNU/Hurd.
75c6e08a
MK
3486# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3487set dummy ${ac_tool_prefix}mig; ac_word=$2
3488echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
d28f9cdf 3489echo "configure:3490: checking for $ac_word" >&5
75c6e08a
MK
3490if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3491 echo $ac_n "(cached) $ac_c" 1>&6
3492else
3493 if test -n "$MIG"; then
3494 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3495else
3496 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3497 ac_dummy="$PATH"
3498 for ac_dir in $ac_dummy; do
3499 test -z "$ac_dir" && ac_dir=.
3500 if test -f $ac_dir/$ac_word; then
3501 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3502 break
3503 fi
3504 done
3505 IFS="$ac_save_ifs"
3506 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3507fi
3508fi
3509MIG="$ac_cv_prog_MIG"
3510if test -n "$MIG"; then
3511 echo "$ac_t""$MIG" 1>&6
3512else
3513 echo "$ac_t""no" 1>&6
3514fi
3515
3516
3517
3518
9a156167
MK
3519# ---------------------- #
3520# Checks for libraries. #
3521# ---------------------- #
3522
3523# We might need to link with -lm; most simulators need it.
3524echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
d28f9cdf 3525echo "configure:3526: checking for main in -lm" >&5
9a156167
MK
3526ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3527if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3528 echo $ac_n "(cached) $ac_c" 1>&6
3529else
3530 ac_save_LIBS="$LIBS"
3531LIBS="-lm $LIBS"
3532cat > conftest.$ac_ext <<EOF
d28f9cdf 3533#line 3534 "configure"
9a156167
MK
3534#include "confdefs.h"
3535
3536int main() {
3537main()
3538; return 0; }
3539EOF
d28f9cdf 3540if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3541 rm -rf conftest*
3542 eval "ac_cv_lib_$ac_lib_var=yes"
3543else
3544 echo "configure: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3546 rm -rf conftest*
3547 eval "ac_cv_lib_$ac_lib_var=no"
3548fi
3549rm -f conftest*
3550LIBS="$ac_save_LIBS"
3551
3552fi
3553if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3554 echo "$ac_t""yes" 1>&6
3555 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3556 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3557 cat >> confdefs.h <<EOF
3558#define $ac_tr_lib 1
3559EOF
3560
3561 LIBS="-lm $LIBS"
3562
3563else
3564 echo "$ac_t""no" 1>&6
3565fi
3566
3567
3568# We need to link with -lw to get `wctype' on Solaris before Solaris
3569# 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3570# libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3571# is known to have this problem). Therefore we avoid libw if we can.
3572echo $ac_n "checking for wctype""... $ac_c" 1>&6
d28f9cdf 3573echo "configure:3574: checking for wctype" >&5
9a156167
MK
3574if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3575 echo $ac_n "(cached) $ac_c" 1>&6
3576else
3577 cat > conftest.$ac_ext <<EOF
d28f9cdf 3578#line 3579 "configure"
9a156167
MK
3579#include "confdefs.h"
3580/* System header to define __stub macros and hopefully few prototypes,
3581 which can conflict with char wctype(); below. */
3582#include <assert.h>
3583/* Override any gcc2 internal prototype to avoid an error. */
3584/* We use char because int might match the return type of a gcc2
3585 builtin and then its argument prototype would still apply. */
3586char wctype();
3587
3588int main() {
3589
3590/* The GNU C library defines this for functions which it implements
3591 to always fail with ENOSYS. Some functions are actually named
3592 something starting with __ and the normal name is an alias. */
3593#if defined (__stub_wctype) || defined (__stub___wctype)
3594choke me
3595#else
3596wctype();
3597#endif
3598
3599; return 0; }
3600EOF
d28f9cdf 3601if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3602 rm -rf conftest*
3603 eval "ac_cv_func_wctype=yes"
3604else
3605 echo "configure: failed program was:" >&5
3606 cat conftest.$ac_ext >&5
3607 rm -rf conftest*
3608 eval "ac_cv_func_wctype=no"
3609fi
3610rm -f conftest*
3611fi
3612
3613if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3614 echo "$ac_t""yes" 1>&6
3615 :
3616else
3617 echo "$ac_t""no" 1>&6
3618echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
d28f9cdf 3619echo "configure:3620: checking for wctype in -lw" >&5
9a156167
MK
3620ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3621if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3623else
3624 ac_save_LIBS="$LIBS"
3625LIBS="-lw $LIBS"
3626cat > conftest.$ac_ext <<EOF
d28f9cdf 3627#line 3628 "configure"
9a156167
MK
3628#include "confdefs.h"
3629/* Override any gcc2 internal prototype to avoid an error. */
3630/* We use char because int might match the return type of a gcc2
3631 builtin and then its argument prototype would still apply. */
3632char wctype();
3633
3634int main() {
3635wctype()
3636; return 0; }
3637EOF
d28f9cdf 3638if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3639 rm -rf conftest*
3640 eval "ac_cv_lib_$ac_lib_var=yes"
3641else
3642 echo "configure: failed program was:" >&5
3643 cat conftest.$ac_ext >&5
3644 rm -rf conftest*
3645 eval "ac_cv_lib_$ac_lib_var=no"
3646fi
3647rm -f conftest*
3648LIBS="$ac_save_LIBS"
3649
3650fi
3651if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3652 echo "$ac_t""yes" 1>&6
3653 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3654 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3655 cat >> confdefs.h <<EOF
3656#define $ac_tr_lib 1
3657EOF
3658
3659 LIBS="-lw $LIBS"
3660
3661else
3662 echo "$ac_t""no" 1>&6
3663fi
3664
3665fi
3666
3667
3668# Some systems (e.g. Solaris) have `socketpair' in libsocket.
3669
3670echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
d28f9cdf 3671echo "configure:3672: checking for library containing socketpair" >&5
9a156167
MK
3672if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3673 echo $ac_n "(cached) $ac_c" 1>&6
3674else
3675 ac_func_search_save_LIBS="$LIBS"
3676ac_cv_search_socketpair="no"
3677cat > conftest.$ac_ext <<EOF
d28f9cdf 3678#line 3679 "configure"
9a156167
MK
3679#include "confdefs.h"
3680/* Override any gcc2 internal prototype to avoid an error. */
3681/* We use char because int might match the return type of a gcc2
3682 builtin and then its argument prototype would still apply. */
3683char socketpair();
3684
3685int main() {
3686socketpair()
3687; return 0; }
3688EOF
d28f9cdf 3689if { (eval echo configure:3690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3690 rm -rf conftest*
3691 ac_cv_search_socketpair="none required"
3692else
3693 echo "configure: failed program was:" >&5
3694 cat conftest.$ac_ext >&5
3695fi
3696rm -f conftest*
3697test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3698LIBS="-l$i $ac_func_search_save_LIBS"
3699cat > conftest.$ac_ext <<EOF
d28f9cdf 3700#line 3701 "configure"
9a156167
MK
3701#include "confdefs.h"
3702/* Override any gcc2 internal prototype to avoid an error. */
3703/* We use char because int might match the return type of a gcc2
3704 builtin and then its argument prototype would still apply. */
3705char socketpair();
3706
3707int main() {
3708socketpair()
3709; return 0; }
3710EOF
d28f9cdf 3711if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9a156167
MK
3712 rm -rf conftest*
3713 ac_cv_search_socketpair="-l$i"
3714break
3715else
3716 echo "configure: failed program was:" >&5
3717 cat conftest.$ac_ext >&5
3718fi
3719rm -f conftest*
3720done
3721LIBS="$ac_func_search_save_LIBS"
3722fi
3723
3724echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3725if test "$ac_cv_search_socketpair" != "no"; then
3726 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3727
3728else :
3729
3730fi
3731
06825bd1
MK
3732# Since GDB uses Readline, we need termcap functionality, so we need
3733# to find a library that provides that. When GDB is configured with
3734# --enable-tui, we need full curses functionality.
3735#
3736# FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3737# Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3738# Makefile fragments. That's why we need to have `Hcurses' before
3739# `curses'. I don't see why we should use HP curses if a more
3740# standard curses is available, except that according to HP's
3741# documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3742# HP-UX 10.10 and 10.20.
3743
3744if test "$need_curses" = yes; then
3745
3746echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
d28f9cdf 3747echo "configure:3748: checking for library containing initscr" >&5
06825bd1
MK
3748if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3749 echo $ac_n "(cached) $ac_c" 1>&6
3750else
3751 ac_func_search_save_LIBS="$LIBS"
3752ac_cv_search_initscr="no"
3753cat > conftest.$ac_ext <<EOF
d28f9cdf 3754#line 3755 "configure"
06825bd1
MK
3755#include "confdefs.h"
3756/* Override any gcc2 internal prototype to avoid an error. */
3757/* We use char because int might match the return type of a gcc2
3758 builtin and then its argument prototype would still apply. */
3759char initscr();
3760
3761int main() {
3762initscr()
3763; return 0; }
3764EOF
d28f9cdf 3765if { (eval echo configure:3766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3766 rm -rf conftest*
3767 ac_cv_search_initscr="none required"
3768else
3769 echo "configure: failed program was:" >&5
3770 cat conftest.$ac_ext >&5
3771fi
3772rm -f conftest*
3773test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3774LIBS="-l$i $ac_func_search_save_LIBS"
3775cat > conftest.$ac_ext <<EOF
d28f9cdf 3776#line 3777 "configure"
06825bd1
MK
3777#include "confdefs.h"
3778/* Override any gcc2 internal prototype to avoid an error. */
3779/* We use char because int might match the return type of a gcc2
3780 builtin and then its argument prototype would still apply. */
3781char initscr();
3782
3783int main() {
3784initscr()
3785; return 0; }
3786EOF
d28f9cdf 3787if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3788 rm -rf conftest*
3789 ac_cv_search_initscr="-l$i"
3790break
3791else
3792 echo "configure: failed program was:" >&5
3793 cat conftest.$ac_ext >&5
3794fi
3795rm -f conftest*
3796done
3797LIBS="$ac_func_search_save_LIBS"
3798fi
3799
3800echo "$ac_t""$ac_cv_search_initscr" 1>&6
3801if test "$ac_cv_search_initscr" != "no"; then
3802 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3803
3804else :
3805 { echo "configure: error: no curses library found" 1>&2; exit 1; }
3806fi
3807fi
3808
3809case $host_os in
3810 cygwin*)
3811 if test -d $srcdir/libtermcap; then
3812 LIBS="../libtermcap/libtermcap.a $LIBS"
3813 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3814 fi ;;
3815 go32*)
3816 # ??? Is this really true?
3817 ac_cv_search_tgetent="none required"
3818 ;;
3819 aix*)
3820 # Readline prefers curses over termcap on AIX.
3821 # ??? Why?
3822
3823echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d28f9cdf 3824echo "configure:3825: checking for library containing tgetent" >&5
06825bd1
MK
3825if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3826 echo $ac_n "(cached) $ac_c" 1>&6
3827else
3828 ac_func_search_save_LIBS="$LIBS"
3829ac_cv_search_tgetent="no"
3830cat > conftest.$ac_ext <<EOF
d28f9cdf 3831#line 3832 "configure"
06825bd1
MK
3832#include "confdefs.h"
3833/* Override any gcc2 internal prototype to avoid an error. */
3834/* We use char because int might match the return type of a gcc2
3835 builtin and then its argument prototype would still apply. */
3836char tgetent();
3837
3838int main() {
3839tgetent()
3840; return 0; }
3841EOF
d28f9cdf 3842if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3843 rm -rf conftest*
3844 ac_cv_search_tgetent="none required"
3845else
3846 echo "configure: failed program was:" >&5
3847 cat conftest.$ac_ext >&5
3848fi
3849rm -f conftest*
3850test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3851LIBS="-l$i $ac_func_search_save_LIBS"
3852cat > conftest.$ac_ext <<EOF
d28f9cdf 3853#line 3854 "configure"
06825bd1
MK
3854#include "confdefs.h"
3855/* Override any gcc2 internal prototype to avoid an error. */
3856/* We use char because int might match the return type of a gcc2
3857 builtin and then its argument prototype would still apply. */
3858char tgetent();
3859
3860int main() {
3861tgetent()
3862; return 0; }
3863EOF
d28f9cdf 3864if { (eval echo configure:3865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3865 rm -rf conftest*
3866 ac_cv_search_tgetent="-l$i"
3867break
3868else
3869 echo "configure: failed program was:" >&5
3870 cat conftest.$ac_ext >&5
3871fi
3872rm -f conftest*
3873done
3874LIBS="$ac_func_search_save_LIBS"
3875fi
3876
3877echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3878if test "$ac_cv_search_tgetent" != "no"; then
3879 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3880
3881else :
3882
3883fi
3884 ;;
3885esac
3886
3887# Note: We used to check for libtermlib and libterminfo too, but
3888# Readline doesn't, so I think we're safe with leaving them out.
3889
3890echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
d28f9cdf 3891echo "configure:3892: checking for library containing tgetent" >&5
06825bd1
MK
3892if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3893 echo $ac_n "(cached) $ac_c" 1>&6
3894else
3895 ac_func_search_save_LIBS="$LIBS"
3896ac_cv_search_tgetent="no"
3897cat > conftest.$ac_ext <<EOF
d28f9cdf 3898#line 3899 "configure"
06825bd1
MK
3899#include "confdefs.h"
3900/* Override any gcc2 internal prototype to avoid an error. */
3901/* We use char because int might match the return type of a gcc2
3902 builtin and then its argument prototype would still apply. */
3903char tgetent();
3904
3905int main() {
3906tgetent()
3907; return 0; }
3908EOF
d28f9cdf 3909if { (eval echo configure:3910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3910 rm -rf conftest*
3911 ac_cv_search_tgetent="none required"
3912else
3913 echo "configure: failed program was:" >&5
3914 cat conftest.$ac_ext >&5
3915fi
3916rm -f conftest*
3917test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3918LIBS="-l$i $ac_func_search_save_LIBS"
3919cat > conftest.$ac_ext <<EOF
d28f9cdf 3920#line 3921 "configure"
06825bd1
MK
3921#include "confdefs.h"
3922/* Override any gcc2 internal prototype to avoid an error. */
3923/* We use char because int might match the return type of a gcc2
3924 builtin and then its argument prototype would still apply. */
3925char tgetent();
3926
3927int main() {
3928tgetent()
3929; return 0; }
3930EOF
d28f9cdf 3931if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
06825bd1
MK
3932 rm -rf conftest*
3933 ac_cv_search_tgetent="-l$i"
3934break
3935else
3936 echo "configure: failed program was:" >&5
3937 cat conftest.$ac_ext >&5
3938fi
3939rm -f conftest*
3940done
3941LIBS="$ac_func_search_save_LIBS"
3942fi
3943
3944echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3945if test "$ac_cv_search_tgetent" != "no"; then
3946 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3947
3948else :
3949
3950fi
3951
3952if test "$ac_cv_search_tgetent" = no; then
3953 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3954fi
3955
5ee754fc
MK
3956# ------------------------- #
3957# Checks for header files. #
3958# ------------------------- #
3959
3960ac_header_dirent=no
3961for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3962do
3963ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3964echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
d28f9cdf 3965echo "configure:3966: checking for $ac_hdr that defines DIR" >&5
5ee754fc 3966if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
c906108c
SS
3967 echo $ac_n "(cached) $ac_c" 1>&6
3968else
3969 cat > conftest.$ac_ext <<EOF
d28f9cdf 3970#line 3971 "configure"
c906108c
SS
3971#include "confdefs.h"
3972#include <sys/types.h>
5ee754fc
MK
3973#include <$ac_hdr>
3974int main() {
3975DIR *dirp = 0;
3976; return 0; }
3977EOF
d28f9cdf 3978if { (eval echo configure:3979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5ee754fc
MK
3979 rm -rf conftest*
3980 eval "ac_cv_header_dirent_$ac_safe=yes"
3981else
3982 echo "configure: failed program was:" >&5
3983 cat conftest.$ac_ext >&5
3984 rm -rf conftest*
3985 eval "ac_cv_header_dirent_$ac_safe=no"
3986fi
3987rm -f conftest*
3988fi
3989if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3990 echo "$ac_t""yes" 1>&6
3991 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3992 cat >> confdefs.h <<EOF
3993#define $ac_tr_hdr 1
3994EOF
3995 ac_header_dirent=$ac_hdr; break
3996else
3997 echo "$ac_t""no" 1>&6
3998fi
3999done
4000# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4001if test $ac_header_dirent = dirent.h; then
4002echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
d28f9cdf 4003echo "configure:4004: checking for opendir in -ldir" >&5
5ee754fc
MK
4004ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4005if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4006 echo $ac_n "(cached) $ac_c" 1>&6
4007else
4008 ac_save_LIBS="$LIBS"
4009LIBS="-ldir $LIBS"
4010cat > conftest.$ac_ext <<EOF
d28f9cdf 4011#line 4012 "configure"
5ee754fc
MK
4012#include "confdefs.h"
4013/* Override any gcc2 internal prototype to avoid an error. */
4014/* We use char because int might match the return type of a gcc2
4015 builtin and then its argument prototype would still apply. */
4016char opendir();
c906108c
SS
4017
4018int main() {
5ee754fc 4019opendir()
c906108c
SS
4020; return 0; }
4021EOF
d28f9cdf 4022if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 4023 rm -rf conftest*
5ee754fc 4024 eval "ac_cv_lib_$ac_lib_var=yes"
c906108c
SS
4025else
4026 echo "configure: failed program was:" >&5
4027 cat conftest.$ac_ext >&5
4028 rm -rf conftest*
5ee754fc 4029 eval "ac_cv_lib_$ac_lib_var=no"
c906108c
SS
4030fi
4031rm -f conftest*
5ee754fc
MK
4032LIBS="$ac_save_LIBS"
4033
4034fi
4035if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4036 echo "$ac_t""yes" 1>&6
4037 LIBS="$LIBS -ldir"
4038else
4039 echo "$ac_t""no" 1>&6
c906108c
SS
4040fi
4041
5ee754fc
MK
4042else
4043echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
d28f9cdf 4044echo "configure:4045: checking for opendir in -lx" >&5
5ee754fc
MK
4045ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4046if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4047 echo $ac_n "(cached) $ac_c" 1>&6
4048else
4049 ac_save_LIBS="$LIBS"
4050LIBS="-lx $LIBS"
4051cat > conftest.$ac_ext <<EOF
d28f9cdf 4052#line 4053 "configure"
5ee754fc
MK
4053#include "confdefs.h"
4054/* Override any gcc2 internal prototype to avoid an error. */
4055/* We use char because int might match the return type of a gcc2
4056 builtin and then its argument prototype would still apply. */
4057char opendir();
4058
4059int main() {
4060opendir()
4061; return 0; }
c906108c 4062EOF
d28f9cdf 4063if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5ee754fc
MK
4064 rm -rf conftest*
4065 eval "ac_cv_lib_$ac_lib_var=yes"
4066else
4067 echo "configure: failed program was:" >&5
4068 cat conftest.$ac_ext >&5
4069 rm -rf conftest*
4070 eval "ac_cv_lib_$ac_lib_var=no"
4071fi
4072rm -f conftest*
4073LIBS="$ac_save_LIBS"
c906108c 4074
5ee754fc
MK
4075fi
4076if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4077 echo "$ac_t""yes" 1>&6
4078 LIBS="$LIBS -lx"
4079else
4080 echo "$ac_t""no" 1>&6
4081fi
c906108c 4082
5ee754fc 4083fi
c906108c 4084
5ee754fc 4085echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
d28f9cdf 4086echo "configure:4087: checking whether stat file-mode macros are broken" >&5
5ee754fc 4087if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
9608ab8b
MK
4088 echo $ac_n "(cached) $ac_c" 1>&6
4089else
4090 cat > conftest.$ac_ext <<EOF
d28f9cdf 4091#line 4092 "configure"
9608ab8b
MK
4092#include "confdefs.h"
4093#include <sys/types.h>
5ee754fc
MK
4094#include <sys/stat.h>
4095
4096#if defined(S_ISBLK) && defined(S_IFDIR)
4097# if S_ISBLK (S_IFDIR)
4098You lose.
4099# endif
4100#endif
4101
4102#if defined(S_ISBLK) && defined(S_IFCHR)
4103# if S_ISBLK (S_IFCHR)
4104You lose.
4105# endif
4106#endif
4107
4108#if defined(S_ISLNK) && defined(S_IFREG)
4109# if S_ISLNK (S_IFREG)
4110You lose.
4111# endif
4112#endif
4113
4114#if defined(S_ISSOCK) && defined(S_IFREG)
4115# if S_ISSOCK (S_IFREG)
4116You lose.
4117# endif
4118#endif
4119
9608ab8b 4120EOF
5ee754fc
MK
4121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4122 egrep "You lose" >/dev/null 2>&1; then
9608ab8b 4123 rm -rf conftest*
5ee754fc
MK
4124 ac_cv_header_stat_broken=yes
4125else
4126 rm -rf conftest*
4127 ac_cv_header_stat_broken=no
4128fi
4129rm -f conftest*
4130
4131fi
4132
4133echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4134if test $ac_cv_header_stat_broken = yes; then
4135 cat >> confdefs.h <<\EOF
4136#define STAT_MACROS_BROKEN 1
4137EOF
4138
4139fi
4140
4141echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
d28f9cdf 4142echo "configure:4143: checking for ANSI C header files" >&5
5ee754fc
MK
4143if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4144 echo $ac_n "(cached) $ac_c" 1>&6
4145else
4146 cat > conftest.$ac_ext <<EOF
d28f9cdf 4147#line 4148 "configure"
5ee754fc
MK
4148#include "confdefs.h"
4149#include <stdlib.h>
4150#include <stdarg.h>
4151#include <string.h>
4152#include <float.h>
4153EOF
4154ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4155{ (eval echo configure:4156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4156ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4157if test -z "$ac_err"; then
4158 rm -rf conftest*
4159 ac_cv_header_stdc=yes
4160else
4161 echo "$ac_err" >&5
4162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -rf conftest*
4165 ac_cv_header_stdc=no
4166fi
4167rm -f conftest*
4168
4169if test $ac_cv_header_stdc = yes; then
4170 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4171cat > conftest.$ac_ext <<EOF
d28f9cdf 4172#line 4173 "configure"
5ee754fc
MK
4173#include "confdefs.h"
4174#include <string.h>
4175EOF
4176if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4177 egrep "memchr" >/dev/null 2>&1; then
4178 :
4179else
4180 rm -rf conftest*
4181 ac_cv_header_stdc=no
4182fi
4183rm -f conftest*
4184
4185fi
4186
4187if test $ac_cv_header_stdc = yes; then
4188 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4189cat > conftest.$ac_ext <<EOF
d28f9cdf 4190#line 4191 "configure"
5ee754fc
MK
4191#include "confdefs.h"
4192#include <stdlib.h>
4193EOF
4194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4195 egrep "free" >/dev/null 2>&1; then
4196 :
4197else
4198 rm -rf conftest*
4199 ac_cv_header_stdc=no
4200fi
4201rm -f conftest*
4202
4203fi
4204
4205if test $ac_cv_header_stdc = yes; then
4206 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4207if test "$cross_compiling" = yes; then
4208 :
4209else
4210 cat > conftest.$ac_ext <<EOF
d28f9cdf 4211#line 4212 "configure"
5ee754fc
MK
4212#include "confdefs.h"
4213#include <ctype.h>
4214#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4215#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4216#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4217int main () { int i; for (i = 0; i < 256; i++)
4218if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4219exit (0); }
4220
4221EOF
d28f9cdf 4222if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5ee754fc
MK
4223then
4224 :
9608ab8b 4225else
5ee754fc
MK
4226 echo "configure: failed program was:" >&5
4227 cat conftest.$ac_ext >&5
4228 rm -fr conftest*
4229 ac_cv_header_stdc=no
4230fi
4231rm -fr conftest*
4232fi
4233
4234fi
4235fi
4236
4237echo "$ac_t""$ac_cv_header_stdc" 1>&6
4238if test $ac_cv_header_stdc = yes; then
4239 cat >> confdefs.h <<\EOF
4240#define STDC_HEADERS 1
4241EOF
4242
4243fi
4244
4245for ac_hdr in link.h
4246do
4247ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4248echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4249echo "configure:4250: checking for $ac_hdr" >&5
5ee754fc
MK
4250if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4251 echo $ac_n "(cached) $ac_c" 1>&6
4252else
4253 cat > conftest.$ac_ext <<EOF
d28f9cdf 4254#line 4255 "configure"
5ee754fc
MK
4255#include "confdefs.h"
4256#include <$ac_hdr>
4257EOF
4258ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4259{ (eval echo configure:4260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4260ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4261if test -z "$ac_err"; then
4262 rm -rf conftest*
4263 eval "ac_cv_header_$ac_safe=yes"
4264else
4265 echo "$ac_err" >&5
4266 echo "configure: failed program was:" >&5
4267 cat conftest.$ac_ext >&5
4268 rm -rf conftest*
4269 eval "ac_cv_header_$ac_safe=no"
4270fi
4271rm -f conftest*
4272fi
4273if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4274 echo "$ac_t""yes" 1>&6
4275 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4276 cat >> confdefs.h <<EOF
4277#define $ac_tr_hdr 1
4278EOF
4279
4280else
4281 echo "$ac_t""no" 1>&6
4282fi
4283done
4284
4285for ac_hdr in nlist.h
4286do
4287ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4288echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4289echo "configure:4290: checking for $ac_hdr" >&5
5ee754fc
MK
4290if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4291 echo $ac_n "(cached) $ac_c" 1>&6
4292else
4293 cat > conftest.$ac_ext <<EOF
d28f9cdf 4294#line 4295 "configure"
5ee754fc
MK
4295#include "confdefs.h"
4296#include <$ac_hdr>
4297EOF
4298ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4299{ (eval echo configure:4300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4300ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4301if test -z "$ac_err"; then
4302 rm -rf conftest*
4303 eval "ac_cv_header_$ac_safe=yes"
4304else
4305 echo "$ac_err" >&5
4306 echo "configure: failed program was:" >&5
4307 cat conftest.$ac_ext >&5
4308 rm -rf conftest*
4309 eval "ac_cv_header_$ac_safe=no"
4310fi
4311rm -f conftest*
4312fi
4313if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4314 echo "$ac_t""yes" 1>&6
4315 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4316 cat >> confdefs.h <<EOF
4317#define $ac_tr_hdr 1
4318EOF
4319
4320else
4321 echo "$ac_t""no" 1>&6
4322fi
4323done
4324
4325for ac_hdr in poll.h sys/poll.h
4326do
4327ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4328echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4329echo "configure:4330: checking for $ac_hdr" >&5
5ee754fc
MK
4330if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4331 echo $ac_n "(cached) $ac_c" 1>&6
4332else
4333 cat > conftest.$ac_ext <<EOF
d28f9cdf 4334#line 4335 "configure"
5ee754fc
MK
4335#include "confdefs.h"
4336#include <$ac_hdr>
4337EOF
4338ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4339{ (eval echo configure:4340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4340ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4341if test -z "$ac_err"; then
4342 rm -rf conftest*
4343 eval "ac_cv_header_$ac_safe=yes"
4344else
4345 echo "$ac_err" >&5
4346 echo "configure: failed program was:" >&5
4347 cat conftest.$ac_ext >&5
4348 rm -rf conftest*
4349 eval "ac_cv_header_$ac_safe=no"
4350fi
4351rm -f conftest*
4352fi
4353if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4354 echo "$ac_t""yes" 1>&6
4355 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4356 cat >> confdefs.h <<EOF
4357#define $ac_tr_hdr 1
4358EOF
4359
4360else
4361 echo "$ac_t""no" 1>&6
4362fi
4363done
4364
4365for ac_hdr in proc_service.h thread_db.h
4366do
4367ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4368echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4369echo "configure:4370: checking for $ac_hdr" >&5
5ee754fc
MK
4370if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4371 echo $ac_n "(cached) $ac_c" 1>&6
4372else
4373 cat > conftest.$ac_ext <<EOF
d28f9cdf 4374#line 4375 "configure"
5ee754fc
MK
4375#include "confdefs.h"
4376#include <$ac_hdr>
4377EOF
4378ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4379{ (eval echo configure:4380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4380ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4381if test -z "$ac_err"; then
4382 rm -rf conftest*
4383 eval "ac_cv_header_$ac_safe=yes"
4384else
4385 echo "$ac_err" >&5
4386 echo "configure: failed program was:" >&5
4387 cat conftest.$ac_ext >&5
4388 rm -rf conftest*
4389 eval "ac_cv_header_$ac_safe=no"
4390fi
4391rm -f conftest*
4392fi
4393if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4394 echo "$ac_t""yes" 1>&6
4395 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4396 cat >> confdefs.h <<EOF
4397#define $ac_tr_hdr 1
4398EOF
4399
4400else
4401 echo "$ac_t""no" 1>&6
4402fi
4403done
4404
4405for ac_hdr in stddef.h
4406do
4407ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4408echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4409echo "configure:4410: checking for $ac_hdr" >&5
5ee754fc
MK
4410if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4411 echo $ac_n "(cached) $ac_c" 1>&6
4412else
4413 cat > conftest.$ac_ext <<EOF
d28f9cdf 4414#line 4415 "configure"
5ee754fc
MK
4415#include "confdefs.h"
4416#include <$ac_hdr>
4417EOF
4418ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4419{ (eval echo configure:4420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4420ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4421if test -z "$ac_err"; then
4422 rm -rf conftest*
4423 eval "ac_cv_header_$ac_safe=yes"
4424else
4425 echo "$ac_err" >&5
4426 echo "configure: failed program was:" >&5
4427 cat conftest.$ac_ext >&5
4428 rm -rf conftest*
4429 eval "ac_cv_header_$ac_safe=no"
4430fi
4431rm -f conftest*
4432fi
4433if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4434 echo "$ac_t""yes" 1>&6
4435 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4436 cat >> confdefs.h <<EOF
4437#define $ac_tr_hdr 1
4438EOF
4439
4440else
4441 echo "$ac_t""no" 1>&6
4442fi
4443done
4444
4445for ac_hdr in stdlib.h
4446do
4447ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4448echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4449echo "configure:4450: checking for $ac_hdr" >&5
5ee754fc
MK
4450if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4451 echo $ac_n "(cached) $ac_c" 1>&6
4452else
4453 cat > conftest.$ac_ext <<EOF
d28f9cdf 4454#line 4455 "configure"
5ee754fc
MK
4455#include "confdefs.h"
4456#include <$ac_hdr>
4457EOF
4458ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4459{ (eval echo configure:4460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4460ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4461if test -z "$ac_err"; then
4462 rm -rf conftest*
4463 eval "ac_cv_header_$ac_safe=yes"
4464else
4465 echo "$ac_err" >&5
4466 echo "configure: failed program was:" >&5
4467 cat conftest.$ac_ext >&5
4468 rm -rf conftest*
4469 eval "ac_cv_header_$ac_safe=no"
4470fi
4471rm -f conftest*
4472fi
4473if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4474 echo "$ac_t""yes" 1>&6
4475 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4476 cat >> confdefs.h <<EOF
4477#define $ac_tr_hdr 1
4478EOF
4479
4480else
4481 echo "$ac_t""no" 1>&6
4482fi
4483done
4484
4485for ac_hdr in stdint.h
4486do
4487ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4488echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4489echo "configure:4490: checking for $ac_hdr" >&5
5ee754fc
MK
4490if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4491 echo $ac_n "(cached) $ac_c" 1>&6
4492else
4493 cat > conftest.$ac_ext <<EOF
d28f9cdf 4494#line 4495 "configure"
5ee754fc
MK
4495#include "confdefs.h"
4496#include <$ac_hdr>
4497EOF
4498ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4499{ (eval echo configure:4500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4500ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4501if test -z "$ac_err"; then
4502 rm -rf conftest*
4503 eval "ac_cv_header_$ac_safe=yes"
4504else
4505 echo "$ac_err" >&5
4506 echo "configure: failed program was:" >&5
4507 cat conftest.$ac_ext >&5
4508 rm -rf conftest*
4509 eval "ac_cv_header_$ac_safe=no"
4510fi
4511rm -f conftest*
4512fi
4513if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4514 echo "$ac_t""yes" 1>&6
4515 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4516 cat >> confdefs.h <<EOF
4517#define $ac_tr_hdr 1
4518EOF
4519
4520else
4521 echo "$ac_t""no" 1>&6
4522fi
4523done
4524
4525for ac_hdr in string.h memory.h strings.h
4526do
4527ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4528echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4529echo "configure:4530: checking for $ac_hdr" >&5
5ee754fc
MK
4530if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4531 echo $ac_n "(cached) $ac_c" 1>&6
4532else
4533 cat > conftest.$ac_ext <<EOF
d28f9cdf 4534#line 4535 "configure"
5ee754fc
MK
4535#include "confdefs.h"
4536#include <$ac_hdr>
4537EOF
4538ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4539{ (eval echo configure:4540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4540ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4541if test -z "$ac_err"; then
4542 rm -rf conftest*
4543 eval "ac_cv_header_$ac_safe=yes"
4544else
4545 echo "$ac_err" >&5
4546 echo "configure: failed program was:" >&5
4547 cat conftest.$ac_ext >&5
4548 rm -rf conftest*
4549 eval "ac_cv_header_$ac_safe=no"
4550fi
4551rm -f conftest*
4552fi
4553if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4554 echo "$ac_t""yes" 1>&6
4555 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4556 cat >> confdefs.h <<EOF
4557#define $ac_tr_hdr 1
4558EOF
4559
4560else
4561 echo "$ac_t""no" 1>&6
4562fi
4563done
4564
4565for ac_hdr in sys/fault.h
4566do
4567ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4568echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4569echo "configure:4570: checking for $ac_hdr" >&5
5ee754fc
MK
4570if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4571 echo $ac_n "(cached) $ac_c" 1>&6
4572else
4573 cat > conftest.$ac_ext <<EOF
d28f9cdf 4574#line 4575 "configure"
5ee754fc
MK
4575#include "confdefs.h"
4576#include <$ac_hdr>
4577EOF
4578ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4579{ (eval echo configure:4580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4580ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4581if test -z "$ac_err"; then
4582 rm -rf conftest*
4583 eval "ac_cv_header_$ac_safe=yes"
4584else
4585 echo "$ac_err" >&5
4586 echo "configure: failed program was:" >&5
4587 cat conftest.$ac_ext >&5
4588 rm -rf conftest*
4589 eval "ac_cv_header_$ac_safe=no"
4590fi
4591rm -f conftest*
4592fi
4593if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4594 echo "$ac_t""yes" 1>&6
4595 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4596 cat >> confdefs.h <<EOF
4597#define $ac_tr_hdr 1
4598EOF
4599
4600else
4601 echo "$ac_t""no" 1>&6
4602fi
4603done
4604
4605for ac_hdr in sys/file.h
4606do
4607ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4608echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4609echo "configure:4610: checking for $ac_hdr" >&5
5ee754fc
MK
4610if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4611 echo $ac_n "(cached) $ac_c" 1>&6
4612else
4613 cat > conftest.$ac_ext <<EOF
d28f9cdf 4614#line 4615 "configure"
5ee754fc
MK
4615#include "confdefs.h"
4616#include <$ac_hdr>
4617EOF
4618ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4619{ (eval echo configure:4620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4620ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4621if test -z "$ac_err"; then
4622 rm -rf conftest*
4623 eval "ac_cv_header_$ac_safe=yes"
4624else
4625 echo "$ac_err" >&5
4626 echo "configure: failed program was:" >&5
4627 cat conftest.$ac_ext >&5
4628 rm -rf conftest*
4629 eval "ac_cv_header_$ac_safe=no"
4630fi
4631rm -f conftest*
4632fi
4633if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4634 echo "$ac_t""yes" 1>&6
4635 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4636 cat >> confdefs.h <<EOF
4637#define $ac_tr_hdr 1
4638EOF
4639
4640else
4641 echo "$ac_t""no" 1>&6
4642fi
4643done
4644
4645for ac_hdr in sys/filio.h
4646do
4647ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4648echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4649echo "configure:4650: checking for $ac_hdr" >&5
5ee754fc
MK
4650if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4651 echo $ac_n "(cached) $ac_c" 1>&6
4652else
4653 cat > conftest.$ac_ext <<EOF
d28f9cdf 4654#line 4655 "configure"
5ee754fc
MK
4655#include "confdefs.h"
4656#include <$ac_hdr>
4657EOF
4658ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4659{ (eval echo configure:4660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4660ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4661if test -z "$ac_err"; then
4662 rm -rf conftest*
4663 eval "ac_cv_header_$ac_safe=yes"
4664else
4665 echo "$ac_err" >&5
4666 echo "configure: failed program was:" >&5
4667 cat conftest.$ac_ext >&5
4668 rm -rf conftest*
4669 eval "ac_cv_header_$ac_safe=no"
4670fi
4671rm -f conftest*
4672fi
4673if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4674 echo "$ac_t""yes" 1>&6
4675 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4676 cat >> confdefs.h <<EOF
4677#define $ac_tr_hdr 1
4678EOF
4679
4680else
4681 echo "$ac_t""no" 1>&6
4682fi
4683done
4684
4685for ac_hdr in sys/ioctl.h
4686do
4687ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4688echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4689echo "configure:4690: checking for $ac_hdr" >&5
5ee754fc
MK
4690if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4691 echo $ac_n "(cached) $ac_c" 1>&6
4692else
4693 cat > conftest.$ac_ext <<EOF
d28f9cdf 4694#line 4695 "configure"
5ee754fc
MK
4695#include "confdefs.h"
4696#include <$ac_hdr>
4697EOF
4698ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4699{ (eval echo configure:4700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4700ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4701if test -z "$ac_err"; then
4702 rm -rf conftest*
4703 eval "ac_cv_header_$ac_safe=yes"
4704else
4705 echo "$ac_err" >&5
4706 echo "configure: failed program was:" >&5
4707 cat conftest.$ac_ext >&5
4708 rm -rf conftest*
4709 eval "ac_cv_header_$ac_safe=no"
4710fi
4711rm -f conftest*
4712fi
4713if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4714 echo "$ac_t""yes" 1>&6
4715 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4716 cat >> confdefs.h <<EOF
4717#define $ac_tr_hdr 1
4718EOF
4719
4720else
4721 echo "$ac_t""no" 1>&6
4722fi
4723done
4724
4725for ac_hdr in sys/param.h
4726do
4727ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4728echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4729echo "configure:4730: checking for $ac_hdr" >&5
5ee754fc
MK
4730if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4731 echo $ac_n "(cached) $ac_c" 1>&6
4732else
4733 cat > conftest.$ac_ext <<EOF
d28f9cdf 4734#line 4735 "configure"
5ee754fc
MK
4735#include "confdefs.h"
4736#include <$ac_hdr>
4737EOF
4738ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4739{ (eval echo configure:4740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4740ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4741if test -z "$ac_err"; then
4742 rm -rf conftest*
4743 eval "ac_cv_header_$ac_safe=yes"
4744else
4745 echo "$ac_err" >&5
4746 echo "configure: failed program was:" >&5
4747 cat conftest.$ac_ext >&5
4748 rm -rf conftest*
4749 eval "ac_cv_header_$ac_safe=no"
4750fi
4751rm -f conftest*
4752fi
4753if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4754 echo "$ac_t""yes" 1>&6
4755 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4756 cat >> confdefs.h <<EOF
4757#define $ac_tr_hdr 1
4758EOF
4759
4760else
4761 echo "$ac_t""no" 1>&6
4762fi
4763done
4764
4765for ac_hdr in sys/proc.h
4766do
4767ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4768echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4769echo "configure:4770: checking for $ac_hdr" >&5
5ee754fc
MK
4770if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4772else
4773 cat > conftest.$ac_ext <<EOF
d28f9cdf 4774#line 4775 "configure"
5ee754fc
MK
4775#include "confdefs.h"
4776#include <$ac_hdr>
4777EOF
4778ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4779{ (eval echo configure:4780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4780ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4781if test -z "$ac_err"; then
4782 rm -rf conftest*
4783 eval "ac_cv_header_$ac_safe=yes"
4784else
4785 echo "$ac_err" >&5
4786 echo "configure: failed program was:" >&5
4787 cat conftest.$ac_ext >&5
4788 rm -rf conftest*
4789 eval "ac_cv_header_$ac_safe=no"
4790fi
4791rm -f conftest*
4792fi
4793if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4794 echo "$ac_t""yes" 1>&6
4795 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4796 cat >> confdefs.h <<EOF
4797#define $ac_tr_hdr 1
4798EOF
4799
4800else
4801 echo "$ac_t""no" 1>&6
4802fi
4803done
4804
4805for ac_hdr in sys/procfs.h
4806do
4807ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4808echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4809echo "configure:4810: checking for $ac_hdr" >&5
5ee754fc
MK
4810if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4811 echo $ac_n "(cached) $ac_c" 1>&6
4812else
4813 cat > conftest.$ac_ext <<EOF
d28f9cdf 4814#line 4815 "configure"
5ee754fc
MK
4815#include "confdefs.h"
4816#include <$ac_hdr>
4817EOF
4818ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4819{ (eval echo configure:4820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4820ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4821if test -z "$ac_err"; then
4822 rm -rf conftest*
4823 eval "ac_cv_header_$ac_safe=yes"
4824else
4825 echo "$ac_err" >&5
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -rf conftest*
4829 eval "ac_cv_header_$ac_safe=no"
4830fi
4831rm -f conftest*
4832fi
4833if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4834 echo "$ac_t""yes" 1>&6
4835 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4836 cat >> confdefs.h <<EOF
4837#define $ac_tr_hdr 1
4838EOF
4839
4840else
4841 echo "$ac_t""no" 1>&6
4842fi
4843done
4844
4845for ac_hdr in sys/ptrace.h ptrace.h
4846do
4847ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4848echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4849echo "configure:4850: checking for $ac_hdr" >&5
5ee754fc
MK
4850if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4851 echo $ac_n "(cached) $ac_c" 1>&6
4852else
4853 cat > conftest.$ac_ext <<EOF
d28f9cdf 4854#line 4855 "configure"
5ee754fc
MK
4855#include "confdefs.h"
4856#include <$ac_hdr>
4857EOF
4858ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4859{ (eval echo configure:4860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4860ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4861if test -z "$ac_err"; then
4862 rm -rf conftest*
4863 eval "ac_cv_header_$ac_safe=yes"
4864else
4865 echo "$ac_err" >&5
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4868 rm -rf conftest*
4869 eval "ac_cv_header_$ac_safe=no"
4870fi
4871rm -f conftest*
4872fi
4873if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4874 echo "$ac_t""yes" 1>&6
4875 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4876 cat >> confdefs.h <<EOF
4877#define $ac_tr_hdr 1
4878EOF
4879
4880else
4881 echo "$ac_t""no" 1>&6
4882fi
4883done
4884
4885for ac_hdr in sys/reg.h sys/debugreg.h
4886do
4887ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4888echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4889echo "configure:4890: checking for $ac_hdr" >&5
5ee754fc
MK
4890if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4891 echo $ac_n "(cached) $ac_c" 1>&6
4892else
4893 cat > conftest.$ac_ext <<EOF
d28f9cdf 4894#line 4895 "configure"
5ee754fc
MK
4895#include "confdefs.h"
4896#include <$ac_hdr>
4897EOF
4898ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4899{ (eval echo configure:4900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4900ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4901if test -z "$ac_err"; then
4902 rm -rf conftest*
4903 eval "ac_cv_header_$ac_safe=yes"
4904else
4905 echo "$ac_err" >&5
4906 echo "configure: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908 rm -rf conftest*
4909 eval "ac_cv_header_$ac_safe=no"
4910fi
4911rm -f conftest*
4912fi
4913if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4914 echo "$ac_t""yes" 1>&6
4915 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4916 cat >> confdefs.h <<EOF
4917#define $ac_tr_hdr 1
4918EOF
4919
4920else
4921 echo "$ac_t""no" 1>&6
4922fi
4923done
4924
4925for ac_hdr in sys/select.h
4926do
4927ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4928echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4929echo "configure:4930: checking for $ac_hdr" >&5
5ee754fc
MK
4930if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4931 echo $ac_n "(cached) $ac_c" 1>&6
4932else
4933 cat > conftest.$ac_ext <<EOF
d28f9cdf 4934#line 4935 "configure"
5ee754fc
MK
4935#include "confdefs.h"
4936#include <$ac_hdr>
4937EOF
4938ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4939{ (eval echo configure:4940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4940ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4941if test -z "$ac_err"; then
4942 rm -rf conftest*
4943 eval "ac_cv_header_$ac_safe=yes"
4944else
4945 echo "$ac_err" >&5
4946 echo "configure: failed program was:" >&5
4947 cat conftest.$ac_ext >&5
4948 rm -rf conftest*
4949 eval "ac_cv_header_$ac_safe=no"
4950fi
4951rm -f conftest*
4952fi
4953if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4954 echo "$ac_t""yes" 1>&6
4955 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4956 cat >> confdefs.h <<EOF
4957#define $ac_tr_hdr 1
4958EOF
4959
4960else
4961 echo "$ac_t""no" 1>&6
4962fi
4963done
4964
4965for ac_hdr in sys/syscall.h
4966do
4967ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4968echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 4969echo "configure:4970: checking for $ac_hdr" >&5
5ee754fc
MK
4970if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4971 echo $ac_n "(cached) $ac_c" 1>&6
4972else
4973 cat > conftest.$ac_ext <<EOF
d28f9cdf 4974#line 4975 "configure"
5ee754fc
MK
4975#include "confdefs.h"
4976#include <$ac_hdr>
4977EOF
4978ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 4979{ (eval echo configure:4980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
4980ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4981if test -z "$ac_err"; then
4982 rm -rf conftest*
4983 eval "ac_cv_header_$ac_safe=yes"
4984else
4985 echo "$ac_err" >&5
4986 echo "configure: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 rm -rf conftest*
4989 eval "ac_cv_header_$ac_safe=no"
4990fi
4991rm -f conftest*
4992fi
4993if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4994 echo "$ac_t""yes" 1>&6
4995 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4996 cat >> confdefs.h <<EOF
4997#define $ac_tr_hdr 1
4998EOF
4999
5000else
5001 echo "$ac_t""no" 1>&6
5002fi
5003done
5004
5005for ac_hdr in sys/user.h
5006do
5007ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5008echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5009echo "configure:5010: checking for $ac_hdr" >&5
5ee754fc
MK
5010if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5011 echo $ac_n "(cached) $ac_c" 1>&6
5012else
5013 cat > conftest.$ac_ext <<EOF
d28f9cdf 5014#line 5015 "configure"
5ee754fc
MK
5015#include "confdefs.h"
5016#include <$ac_hdr>
5017EOF
5018ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5019{ (eval echo configure:5020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5020ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5021if test -z "$ac_err"; then
5022 rm -rf conftest*
5023 eval "ac_cv_header_$ac_safe=yes"
5024else
5025 echo "$ac_err" >&5
5026 echo "configure: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 rm -rf conftest*
5029 eval "ac_cv_header_$ac_safe=no"
5030fi
5031rm -f conftest*
5032fi
5033if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5034 echo "$ac_t""yes" 1>&6
5035 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5036 cat >> confdefs.h <<EOF
5037#define $ac_tr_hdr 1
5038EOF
5039
5040else
5041 echo "$ac_t""no" 1>&6
5042fi
5043done
5044
5045for ac_hdr in sys/wait.h wait.h
5046do
5047ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5048echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5049echo "configure:5050: checking for $ac_hdr" >&5
5ee754fc
MK
5050if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5051 echo $ac_n "(cached) $ac_c" 1>&6
5052else
5053 cat > conftest.$ac_ext <<EOF
d28f9cdf 5054#line 5055 "configure"
5ee754fc
MK
5055#include "confdefs.h"
5056#include <$ac_hdr>
5057EOF
5058ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5059{ (eval echo configure:5060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5060ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5061if test -z "$ac_err"; then
5062 rm -rf conftest*
5063 eval "ac_cv_header_$ac_safe=yes"
5064else
5065 echo "$ac_err" >&5
9608ab8b
MK
5066 echo "configure: failed program was:" >&5
5067 cat conftest.$ac_ext >&5
5068 rm -rf conftest*
5ee754fc 5069 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5070fi
5071rm -f conftest*
5072fi
5ee754fc 5073if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b
MK
5074 echo "$ac_t""yes" 1>&6
5075 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5076 cat >> confdefs.h <<EOF
5077#define $ac_tr_hdr 1
5078EOF
5ee754fc 5079
9608ab8b
MK
5080else
5081 echo "$ac_t""no" 1>&6
5082fi
5083done
5ee754fc
MK
5084
5085for ac_hdr in termios.h termio.h sgtty.h
5086do
5087ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5088echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5089echo "configure:5090: checking for $ac_hdr" >&5
5ee754fc 5090if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5091 echo $ac_n "(cached) $ac_c" 1>&6
5092else
5ee754fc 5093 cat > conftest.$ac_ext <<EOF
d28f9cdf 5094#line 5095 "configure"
9608ab8b 5095#include "confdefs.h"
5ee754fc 5096#include <$ac_hdr>
9608ab8b 5097EOF
5ee754fc 5098ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5099{ (eval echo configure:5100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5100ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5101if test -z "$ac_err"; then
9608ab8b 5102 rm -rf conftest*
5ee754fc 5103 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5104else
5ee754fc 5105 echo "$ac_err" >&5
9608ab8b
MK
5106 echo "configure: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5108 rm -rf conftest*
5ee754fc 5109 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5110fi
5111rm -f conftest*
9608ab8b 5112fi
5ee754fc 5113if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5114 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5115 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5116 cat >> confdefs.h <<EOF
5117#define $ac_tr_hdr 1
5118EOF
5119
9608ab8b
MK
5120else
5121 echo "$ac_t""no" 1>&6
5122fi
5ee754fc 5123done
9608ab8b 5124
5ee754fc
MK
5125for ac_hdr in unistd.h
5126do
5127ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5128echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5129echo "configure:5130: checking for $ac_hdr" >&5
5ee754fc 5130if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9608ab8b
MK
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132else
5ee754fc 5133 cat > conftest.$ac_ext <<EOF
d28f9cdf 5134#line 5135 "configure"
9608ab8b 5135#include "confdefs.h"
5ee754fc 5136#include <$ac_hdr>
9608ab8b 5137EOF
5ee754fc 5138ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5139{ (eval echo configure:5140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5ee754fc
MK
5140ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5141if test -z "$ac_err"; then
9608ab8b 5142 rm -rf conftest*
5ee754fc 5143 eval "ac_cv_header_$ac_safe=yes"
9608ab8b 5144else
5ee754fc 5145 echo "$ac_err" >&5
9608ab8b
MK
5146 echo "configure: failed program was:" >&5
5147 cat conftest.$ac_ext >&5
5148 rm -rf conftest*
5ee754fc 5149 eval "ac_cv_header_$ac_safe=no"
9608ab8b
MK
5150fi
5151rm -f conftest*
9608ab8b 5152fi
5ee754fc 5153if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9608ab8b 5154 echo "$ac_t""yes" 1>&6
5ee754fc
MK
5155 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5156 cat >> confdefs.h <<EOF
5157#define $ac_tr_hdr 1
5158EOF
5159
9608ab8b
MK
5160else
5161 echo "$ac_t""no" 1>&6
5162fi
5ee754fc 5163done
9608ab8b 5164
9608ab8b 5165
5ee754fc
MK
5166# On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5167# between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5168# think that we don't have <curses.h> if we're using GCC.
5169case $host_os in
5170 solaris2.[78])
5171 if test "$GCC" = yes; then
5172 cat >> confdefs.h <<\EOF
5173#define _MSE_INT_H 1
5174EOF
5175
5176 fi ;;
5177esac
5178for ac_hdr in curses.h ncurses.h term.h
5179do
5180ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5181echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5182echo "configure:5183: checking for $ac_hdr" >&5
5ee754fc 5183if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
c906108c
SS
5184 echo $ac_n "(cached) $ac_c" 1>&6
5185else
5186 cat > conftest.$ac_ext <<EOF
d28f9cdf 5187#line 5188 "configure"
c906108c 5188#include "confdefs.h"
5ee754fc 5189#include <$ac_hdr>
c906108c
SS
5190EOF
5191ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5192{ (eval echo configure:5193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5193ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5194if test -z "$ac_err"; then
5195 rm -rf conftest*
5ee754fc 5196 eval "ac_cv_header_$ac_safe=yes"
c906108c
SS
5197else
5198 echo "$ac_err" >&5
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5201 rm -rf conftest*
5ee754fc 5202 eval "ac_cv_header_$ac_safe=no"
c906108c
SS
5203fi
5204rm -f conftest*
c906108c 5205fi
5ee754fc
MK
5206if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5207 echo "$ac_t""yes" 1>&6
5208 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5209 cat >> confdefs.h <<EOF
5210#define $ac_tr_hdr 1
c906108c 5211EOF
5ee754fc 5212
c906108c 5213else
5ee754fc 5214 echo "$ac_t""no" 1>&6
c906108c 5215fi
5ee754fc 5216done
c906108c
SS
5217
5218
5ee754fc
MK
5219# FIXME: kettenis/20030102: In most cases we include these
5220# unconditionally, so what's the point in checking these?
5221for ac_hdr in ctype.h time.h
c906108c
SS
5222do
5223ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5224echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5225echo "configure:5226: checking for $ac_hdr" >&5
c906108c
SS
5226if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5228else
5229 cat > conftest.$ac_ext <<EOF
d28f9cdf 5230#line 5231 "configure"
c906108c
SS
5231#include "confdefs.h"
5232#include <$ac_hdr>
5233EOF
5234ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5235{ (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
5236ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5237if test -z "$ac_err"; then
5238 rm -rf conftest*
5239 eval "ac_cv_header_$ac_safe=yes"
5240else
5241 echo "$ac_err" >&5
5242 echo "configure: failed program was:" >&5
5243 cat conftest.$ac_ext >&5
5244 rm -rf conftest*
5245 eval "ac_cv_header_$ac_safe=no"
5246fi
5247rm -f conftest*
5248fi
5249if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5250 echo "$ac_t""yes" 1>&6
5251 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5252 cat >> confdefs.h <<EOF
5253#define $ac_tr_hdr 1
5254EOF
5255
5256else
5257 echo "$ac_t""no" 1>&6
5258fi
5259done
5260
5ee754fc
MK
5261
5262# ------------------ #
5263# Checks for types. #
5264# ------------------ #
5265
5266echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
d28f9cdf 5267echo "configure:5268: checking return type of signal handlers" >&5
5ee754fc 5268if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
c906108c
SS
5269 echo $ac_n "(cached) $ac_c" 1>&6
5270else
5271 cat > conftest.$ac_ext <<EOF
d28f9cdf 5272#line 5273 "configure"
c906108c
SS
5273#include "confdefs.h"
5274#include <sys/types.h>
5ee754fc
MK
5275#include <signal.h>
5276#ifdef signal
5277#undef signal
c906108c 5278#endif
5ee754fc
MK
5279#ifdef __cplusplus
5280extern "C" void (*signal (int, void (*)(int)))(int);
5281#else
5282void (*signal ()) ();
c906108c
SS
5283#endif
5284
5ee754fc
MK
5285int main() {
5286int i;
5287; return 0; }
c906108c 5288EOF
d28f9cdf 5289if { (eval echo configure:5290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 5290 rm -rf conftest*
5ee754fc 5291 ac_cv_type_signal=void
c906108c 5292else
5ee754fc
MK
5293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
c906108c 5295 rm -rf conftest*
5ee754fc 5296 ac_cv_type_signal=int
c906108c
SS
5297fi
5298rm -f conftest*
c906108c
SS
5299fi
5300
5ee754fc
MK
5301echo "$ac_t""$ac_cv_type_signal" 1>&6
5302cat >> confdefs.h <<EOF
5303#define RETSIGTYPE $ac_cv_type_signal
c906108c
SS
5304EOF
5305
c906108c
SS
5306
5307
5ee754fc
MK
5308# ------------------------------------- #
5309# Checks for compiler characteristics. #
5310# ------------------------------------- #
5311
c906108c 5312echo $ac_n "checking for working const""... $ac_c" 1>&6
d28f9cdf 5313echo "configure:5314: checking for working const" >&5
c906108c
SS
5314if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5316else
5317 cat > conftest.$ac_ext <<EOF
d28f9cdf 5318#line 5319 "configure"
c906108c
SS
5319#include "confdefs.h"
5320
5321int main() {
5322
5323/* Ultrix mips cc rejects this. */
5324typedef int charset[2]; const charset x;
5325/* SunOS 4.1.1 cc rejects this. */
5326char const *const *ccp;
5327char **p;
5328/* NEC SVR4.0.2 mips cc rejects this. */
5329struct point {int x, y;};
5330static struct point const zero = {0,0};
5331/* AIX XL C 1.02.0.0 rejects this.
5332 It does not let you subtract one const X* pointer from another in an arm
5333 of an if-expression whose if-part is not a constant expression */
5334const char *g = "string";
5335ccp = &g + (g ? g-g : 0);
5336/* HPUX 7.0 cc rejects these. */
5337++ccp;
5338p = (char**) ccp;
5339ccp = (char const *const *) p;
5340{ /* SCO 3.2v4 cc rejects this. */
5341 char *t;
5342 char const *s = 0 ? (char *) 0 : (char const *) 0;
5343
5344 *t++ = 0;
5345}
5346{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5347 int x[] = {25, 17};
5348 const int *foo = &x[0];
5349 ++foo;
5350}
5351{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5352 typedef const int *iptr;
5353 iptr p = 0;
5354 ++p;
5355}
5356{ /* AIX XL C 1.02.0.0 rejects this saying
5357 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5358 struct s { int j; const int *ap[3]; };
5359 struct s *b; b->j = 5;
5360}
5361{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5362 const int foo = 10;
5363}
5364
5365; return 0; }
5366EOF
d28f9cdf 5367if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5368 rm -rf conftest*
5369 ac_cv_c_const=yes
5370else
5371 echo "configure: failed program was:" >&5
5372 cat conftest.$ac_ext >&5
5373 rm -rf conftest*
5374 ac_cv_c_const=no
5375fi
5376rm -f conftest*
5377fi
5378
5379echo "$ac_t""$ac_cv_c_const" 1>&6
5380if test $ac_cv_c_const = no; then
5381 cat >> confdefs.h <<\EOF
5382#define const
5383EOF
5384
5385fi
5386
bce58c09 5387echo $ac_n "checking for inline""... $ac_c" 1>&6
d28f9cdf 5388echo "configure:5389: checking for inline" >&5
bce58c09
JB
5389if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5390 echo $ac_n "(cached) $ac_c" 1>&6
5391else
5392 ac_cv_c_inline=no
5393for ac_kw in inline __inline__ __inline; do
5394 cat > conftest.$ac_ext <<EOF
d28f9cdf 5395#line 5396 "configure"
bce58c09
JB
5396#include "confdefs.h"
5397
5398int main() {
5399} $ac_kw foo() {
5400; return 0; }
5401EOF
d28f9cdf 5402if { (eval echo configure:5403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
5403 rm -rf conftest*
5404 ac_cv_c_inline=$ac_kw; break
5405else
5406 echo "configure: failed program was:" >&5
5407 cat conftest.$ac_ext >&5
5408fi
5409rm -f conftest*
5410done
5411
5412fi
5413
5414echo "$ac_t""$ac_cv_c_inline" 1>&6
5415case "$ac_cv_c_inline" in
5416 inline | yes) ;;
5417 no) cat >> confdefs.h <<\EOF
5418#define inline
5419EOF
5420 ;;
5421 *) cat >> confdefs.h <<EOF
5422#define inline $ac_cv_c_inline
5423EOF
5424 ;;
5425esac
5426
c906108c 5427
5ee754fc
MK
5428# ------------------------------ #
5429# Checks for library functions. #
5430# ------------------------------ #
5431
46711df8
MK
5432# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5433# for constant arguments. Useless!
5434echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
d28f9cdf 5435echo "configure:5436: checking for working alloca.h" >&5
46711df8
MK
5436if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5437 echo $ac_n "(cached) $ac_c" 1>&6
5438else
5439 cat > conftest.$ac_ext <<EOF
d28f9cdf 5440#line 5441 "configure"
46711df8
MK
5441#include "confdefs.h"
5442#include <alloca.h>
5443int main() {
5444char *p = alloca(2 * sizeof(int));
5445; return 0; }
5446EOF
d28f9cdf 5447if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5448 rm -rf conftest*
5449 ac_cv_header_alloca_h=yes
5450else
5451 echo "configure: failed program was:" >&5
5452 cat conftest.$ac_ext >&5
5453 rm -rf conftest*
5454 ac_cv_header_alloca_h=no
5455fi
5456rm -f conftest*
5457fi
5458
5459echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5460if test $ac_cv_header_alloca_h = yes; then
5461 cat >> confdefs.h <<\EOF
5462#define HAVE_ALLOCA_H 1
5463EOF
5464
5465fi
5466
5467echo $ac_n "checking for alloca""... $ac_c" 1>&6
d28f9cdf 5468echo "configure:5469: checking for alloca" >&5
46711df8
MK
5469if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5470 echo $ac_n "(cached) $ac_c" 1>&6
5471else
5472 cat > conftest.$ac_ext <<EOF
d28f9cdf 5473#line 5474 "configure"
46711df8
MK
5474#include "confdefs.h"
5475
5476#ifdef __GNUC__
5477# define alloca __builtin_alloca
5478#else
5479# ifdef _MSC_VER
5480# include <malloc.h>
5481# define alloca _alloca
5482# else
5483# if HAVE_ALLOCA_H
5484# include <alloca.h>
5485# else
5486# ifdef _AIX
5487 #pragma alloca
5488# else
5489# ifndef alloca /* predefined by HP cc +Olibcalls */
5490char *alloca ();
5491# endif
5492# endif
5493# endif
5494# endif
5495#endif
5496
5497int main() {
5498char *p = (char *) alloca(1);
5499; return 0; }
5500EOF
d28f9cdf 5501if { (eval echo configure:5502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5502 rm -rf conftest*
5503 ac_cv_func_alloca_works=yes
5504else
5505 echo "configure: failed program was:" >&5
5506 cat conftest.$ac_ext >&5
5507 rm -rf conftest*
5508 ac_cv_func_alloca_works=no
5509fi
5510rm -f conftest*
5511fi
5512
5513echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5514if test $ac_cv_func_alloca_works = yes; then
5515 cat >> confdefs.h <<\EOF
5516#define HAVE_ALLOCA 1
5517EOF
5518
5519fi
5520
5521if test $ac_cv_func_alloca_works = no; then
5522 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5523 # that cause trouble. Some versions do not even contain alloca or
5524 # contain a buggy version. If you still want to use their alloca,
5525 # use ar to extract alloca.o from them instead of compiling alloca.c.
5526 ALLOCA=alloca.${ac_objext}
5527 cat >> confdefs.h <<\EOF
5528#define C_ALLOCA 1
5529EOF
5530
5531
5532echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
d28f9cdf 5533echo "configure:5534: checking whether alloca needs Cray hooks" >&5
46711df8
MK
5534if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5535 echo $ac_n "(cached) $ac_c" 1>&6
5536else
5537 cat > conftest.$ac_ext <<EOF
d28f9cdf 5538#line 5539 "configure"
46711df8
MK
5539#include "confdefs.h"
5540#if defined(CRAY) && ! defined(CRAY2)
5541webecray
5542#else
5543wenotbecray
5544#endif
5545
5546EOF
5547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5548 egrep "webecray" >/dev/null 2>&1; then
5549 rm -rf conftest*
5550 ac_cv_os_cray=yes
5551else
5552 rm -rf conftest*
5553 ac_cv_os_cray=no
5554fi
5555rm -f conftest*
5556
5557fi
5558
5559echo "$ac_t""$ac_cv_os_cray" 1>&6
5560if test $ac_cv_os_cray = yes; then
5561for ac_func in _getb67 GETB67 getb67; do
5562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 5563echo "configure:5564: checking for $ac_func" >&5
46711df8
MK
5564if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5565 echo $ac_n "(cached) $ac_c" 1>&6
5566else
5567 cat > conftest.$ac_ext <<EOF
d28f9cdf 5568#line 5569 "configure"
46711df8
MK
5569#include "confdefs.h"
5570/* System header to define __stub macros and hopefully few prototypes,
5571 which can conflict with char $ac_func(); below. */
5572#include <assert.h>
5573/* Override any gcc2 internal prototype to avoid an error. */
5574/* We use char because int might match the return type of a gcc2
5575 builtin and then its argument prototype would still apply. */
5576char $ac_func();
5577
5578int main() {
5579
5580/* The GNU C library defines this for functions which it implements
5581 to always fail with ENOSYS. Some functions are actually named
5582 something starting with __ and the normal name is an alias. */
5583#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5584choke me
5585#else
5586$ac_func();
5587#endif
5588
5589; return 0; }
5590EOF
d28f9cdf 5591if { (eval echo configure:5592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
5592 rm -rf conftest*
5593 eval "ac_cv_func_$ac_func=yes"
5594else
5595 echo "configure: failed program was:" >&5
5596 cat conftest.$ac_ext >&5
5597 rm -rf conftest*
5598 eval "ac_cv_func_$ac_func=no"
5599fi
5600rm -f conftest*
5601fi
5602
5603if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5604 echo "$ac_t""yes" 1>&6
5605 cat >> confdefs.h <<EOF
5606#define CRAY_STACKSEG_END $ac_func
5607EOF
5608
5609 break
5610else
5611 echo "$ac_t""no" 1>&6
5612fi
5613
5614done
5615fi
5616
5617echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
d28f9cdf 5618echo "configure:5619: checking stack direction for C alloca" >&5
46711df8
MK
5619if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5620 echo $ac_n "(cached) $ac_c" 1>&6
5621else
5622 if test "$cross_compiling" = yes; then
5623 ac_cv_c_stack_direction=0
5624else
5625 cat > conftest.$ac_ext <<EOF
d28f9cdf 5626#line 5627 "configure"
46711df8
MK
5627#include "confdefs.h"
5628find_stack_direction ()
5629{
5630 static char *addr = 0;
5631 auto char dummy;
5632 if (addr == 0)
5633 {
5634 addr = &dummy;
5635 return find_stack_direction ();
5636 }
5637 else
5638 return (&dummy > addr) ? 1 : -1;
5639}
5640main ()
5641{
5642 exit (find_stack_direction() < 0);
5643}
5644EOF
d28f9cdf 5645if { (eval echo configure:5646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
5646then
5647 ac_cv_c_stack_direction=1
5648else
5649 echo "configure: failed program was:" >&5
5650 cat conftest.$ac_ext >&5
5651 rm -fr conftest*
5652 ac_cv_c_stack_direction=-1
5653fi
5654rm -fr conftest*
5655fi
5656
5657fi
5658
5659echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5660cat >> confdefs.h <<EOF
5661#define STACK_DIRECTION $ac_cv_c_stack_direction
5662EOF
5663
5664fi
5665
97bf5e38
MK
5666for ac_hdr in unistd.h
5667do
5668ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5669echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
d28f9cdf 5670echo "configure:5671: checking for $ac_hdr" >&5
74c1b268
AC
5671if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5672 echo $ac_n "(cached) $ac_c" 1>&6
5673else
5674 cat > conftest.$ac_ext <<EOF
d28f9cdf 5675#line 5676 "configure"
74c1b268 5676#include "confdefs.h"
97bf5e38 5677#include <$ac_hdr>
74c1b268
AC
5678EOF
5679ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5680{ (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
5681ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5682if test -z "$ac_err"; then
5683 rm -rf conftest*
5684 eval "ac_cv_header_$ac_safe=yes"
5685else
5686 echo "$ac_err" >&5
5687 echo "configure: failed program was:" >&5
5688 cat conftest.$ac_ext >&5
5689 rm -rf conftest*
5690 eval "ac_cv_header_$ac_safe=no"
5691fi
5692rm -f conftest*
5693fi
5694if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5695 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5696 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5697 cat >> confdefs.h <<EOF
5698#define $ac_tr_hdr 1
74c1b268 5699EOF
97bf5e38 5700
74c1b268
AC
5701else
5702 echo "$ac_t""no" 1>&6
5703fi
97bf5e38 5704done
74c1b268 5705
97bf5e38
MK
5706for ac_func in getpagesize
5707do
5708echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 5709echo "configure:5710: checking for $ac_func" >&5
97bf5e38 5710if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
74c1b268
AC
5711 echo $ac_n "(cached) $ac_c" 1>&6
5712else
5713 cat > conftest.$ac_ext <<EOF
d28f9cdf 5714#line 5715 "configure"
74c1b268
AC
5715#include "confdefs.h"
5716/* System header to define __stub macros and hopefully few prototypes,
97bf5e38 5717 which can conflict with char $ac_func(); below. */
74c1b268
AC
5718#include <assert.h>
5719/* Override any gcc2 internal prototype to avoid an error. */
5720/* We use char because int might match the return type of a gcc2
5721 builtin and then its argument prototype would still apply. */
97bf5e38 5722char $ac_func();
74c1b268
AC
5723
5724int main() {
5725
5726/* The GNU C library defines this for functions which it implements
5727 to always fail with ENOSYS. Some functions are actually named
5728 something starting with __ and the normal name is an alias. */
97bf5e38 5729#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
74c1b268
AC
5730choke me
5731#else
97bf5e38 5732$ac_func();
74c1b268
AC
5733#endif
5734
5735; return 0; }
5736EOF
d28f9cdf 5737if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268 5738 rm -rf conftest*
97bf5e38 5739 eval "ac_cv_func_$ac_func=yes"
74c1b268
AC
5740else
5741 echo "configure: failed program was:" >&5
5742 cat conftest.$ac_ext >&5
5743 rm -rf conftest*
97bf5e38 5744 eval "ac_cv_func_$ac_func=no"
74c1b268
AC
5745fi
5746rm -f conftest*
5747fi
5748
97bf5e38 5749if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
74c1b268 5750 echo "$ac_t""yes" 1>&6
97bf5e38
MK
5751 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5752 cat >> confdefs.h <<EOF
5753#define $ac_tr_func 1
5754EOF
5755
74c1b268
AC
5756else
5757 echo "$ac_t""no" 1>&6
5758fi
97bf5e38 5759done
74c1b268 5760
97bf5e38 5761echo $ac_n "checking for working mmap""... $ac_c" 1>&6
d28f9cdf 5762echo "configure:5763: checking for working mmap" >&5
97bf5e38
MK
5763if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5764 echo $ac_n "(cached) $ac_c" 1>&6
5765else
5766 if test "$cross_compiling" = yes; then
5767 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5768else
5769 cat > conftest.$ac_ext <<EOF
d28f9cdf 5770#line 5771 "configure"
74c1b268 5771#include "confdefs.h"
97bf5e38
MK
5772
5773/* Thanks to Mike Haertel and Jim Avera for this test.
5774 Here is a matrix of mmap possibilities:
5775 mmap private not fixed
5776 mmap private fixed at somewhere currently unmapped
5777 mmap private fixed at somewhere already mapped
5778 mmap shared not fixed
5779 mmap shared fixed at somewhere currently unmapped
5780 mmap shared fixed at somewhere already mapped
5781 For private mappings, we should verify that changes cannot be read()
5782 back from the file, nor mmap's back from the file at a different
5783 address. (There have been systems where private was not correctly
5784 implemented like the infamous i386 svr4.0, and systems where the
5785 VM page cache was not coherent with the filesystem buffer cache
5786 like early versions of FreeBSD and possibly contemporary NetBSD.)
5787 For shared mappings, we should conversely verify that changes get
5788 propogated back to all the places they're supposed to be.
5789
5790 Grep wants private fixed already mapped.
5791 The main things grep needs to know about mmap are:
5792 * does it exist and is it safe to write into the mmap'd area
5793 * how to use it (BSD variants) */
74c1b268 5794#include <sys/types.h>
97bf5e38
MK
5795#include <fcntl.h>
5796#include <sys/mman.h>
5797
5798/* This mess was copied from the GNU getpagesize.h. */
5799#ifndef HAVE_GETPAGESIZE
5800# ifdef HAVE_UNISTD_H
5801# include <unistd.h>
5802# endif
5803
5804/* Assume that all systems that can run configure have sys/param.h. */
5805# ifndef HAVE_SYS_PARAM_H
5806# define HAVE_SYS_PARAM_H 1
5807# endif
5808
5809# ifdef _SC_PAGESIZE
5810# define getpagesize() sysconf(_SC_PAGESIZE)
5811# else /* no _SC_PAGESIZE */
5812# ifdef HAVE_SYS_PARAM_H
5813# include <sys/param.h>
5814# ifdef EXEC_PAGESIZE
5815# define getpagesize() EXEC_PAGESIZE
5816# else /* no EXEC_PAGESIZE */
5817# ifdef NBPG
5818# define getpagesize() NBPG * CLSIZE
5819# ifndef CLSIZE
5820# define CLSIZE 1
5821# endif /* no CLSIZE */
5822# else /* no NBPG */
5823# ifdef NBPC
5824# define getpagesize() NBPC
5825# else /* no NBPC */
5826# ifdef PAGESIZE
5827# define getpagesize() PAGESIZE
5828# endif /* PAGESIZE */
5829# endif /* no NBPC */
5830# endif /* no NBPG */
5831# endif /* no EXEC_PAGESIZE */
5832# else /* no HAVE_SYS_PARAM_H */
5833# define getpagesize() 8192 /* punt totally */
5834# endif /* no HAVE_SYS_PARAM_H */
5835# endif /* no _SC_PAGESIZE */
5836
5837#endif /* no HAVE_GETPAGESIZE */
5838
74c1b268 5839#ifdef __cplusplus
97bf5e38 5840extern "C" { void *malloc(unsigned); }
74c1b268 5841#else
97bf5e38 5842char *malloc();
74c1b268 5843#endif
74c1b268 5844
97bf5e38
MK
5845int
5846main()
5847{
5848 char *data, *data2, *data3;
5849 int i, pagesize;
5850 int fd;
74c1b268 5851
97bf5e38 5852 pagesize = getpagesize();
74c1b268 5853
97bf5e38
MK
5854 /*
5855 * First, make a file with some known garbage in it.
5856 */
5857 data = malloc(pagesize);
5858 if (!data)
5859 exit(1);
5860 for (i = 0; i < pagesize; ++i)
5861 *(data + i) = rand();
5862 umask(0);
5863 fd = creat("conftestmmap", 0600);
5864 if (fd < 0)
5865 exit(1);
5866 if (write(fd, data, pagesize) != pagesize)
5867 exit(1);
5868 close(fd);
74c1b268 5869
97bf5e38
MK
5870 /*
5871 * Next, try to mmap the file at a fixed address which
5872 * already has something else allocated at it. If we can,
5873 * also make sure that we see the same garbage.
5874 */
5875 fd = open("conftestmmap", O_RDWR);
5876 if (fd < 0)
5877 exit(1);
5878 data2 = malloc(2 * pagesize);
5879 if (!data2)
5880 exit(1);
5881 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5882 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5883 MAP_PRIVATE | MAP_FIXED, fd, 0L))
5884 exit(1);
5885 for (i = 0; i < pagesize; ++i)
5886 if (*(data + i) != *(data2 + i))
5887 exit(1);
74c1b268 5888
97bf5e38
MK
5889 /*
5890 * Finally, make sure that changes to the mapped area
5891 * do not percolate back to the file as seen by read().
5892 * (This is a bug on some variants of i386 svr4.0.)
5893 */
5894 for (i = 0; i < pagesize; ++i)
5895 *(data2 + i) = *(data2 + i) + 1;
5896 data3 = malloc(pagesize);
5897 if (!data3)
5898 exit(1);
5899 if (read(fd, data3, pagesize) != pagesize)
5900 exit(1);
5901 for (i = 0; i < pagesize; ++i)
5902 if (*(data + i) != *(data3 + i))
5903 exit(1);
5904 close(fd);
5905 unlink("conftestmmap");
5906 exit(0);
74c1b268 5907}
97bf5e38 5908
74c1b268 5909EOF
d28f9cdf 5910if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268 5911then
97bf5e38 5912 ac_cv_func_mmap_fixed_mapped=yes
74c1b268
AC
5913else
5914 echo "configure: failed program was:" >&5
5915 cat conftest.$ac_ext >&5
5916 rm -fr conftest*
97bf5e38 5917 ac_cv_func_mmap_fixed_mapped=no
74c1b268
AC
5918fi
5919rm -fr conftest*
5920fi
5921
5922fi
5923
97bf5e38
MK
5924echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5925if test $ac_cv_func_mmap_fixed_mapped = yes; then
74c1b268 5926 cat >> confdefs.h <<\EOF
97bf5e38 5927#define HAVE_MMAP 1
74c1b268
AC
5928EOF
5929
5930fi
5931
97bf5e38 5932echo $ac_n "checking for pid_t""... $ac_c" 1>&6
d28f9cdf 5933echo "configure:5934: checking for pid_t" >&5
97bf5e38 5934if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
0200359f 5935 echo $ac_n "(cached) $ac_c" 1>&6
0200359f
MK
5936else
5937 cat > conftest.$ac_ext <<EOF
d28f9cdf 5938#line 5939 "configure"
0200359f 5939#include "confdefs.h"
97bf5e38
MK
5940#include <sys/types.h>
5941#if STDC_HEADERS
5942#include <stdlib.h>
5943#include <stddef.h>
0200359f 5944#endif
0200359f 5945EOF
97bf5e38
MK
5946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5947 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5948 rm -rf conftest*
5949 ac_cv_type_pid_t=yes
0200359f 5950else
97bf5e38
MK
5951 rm -rf conftest*
5952 ac_cv_type_pid_t=no
0200359f 5953fi
97bf5e38 5954rm -f conftest*
0200359f
MK
5955
5956fi
97bf5e38
MK
5957echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5958if test $ac_cv_type_pid_t = no; then
0200359f 5959 cat >> confdefs.h <<\EOF
97bf5e38 5960#define pid_t int
0200359f
MK
5961EOF
5962
5963fi
5964
97bf5e38
MK
5965ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5966echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
d28f9cdf 5967echo "configure:5968: checking for vfork.h" >&5
97bf5e38 5968if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
72473524
DJ
5969 echo $ac_n "(cached) $ac_c" 1>&6
5970else
5971 cat > conftest.$ac_ext <<EOF
d28f9cdf 5972#line 5973 "configure"
72473524 5973#include "confdefs.h"
97bf5e38 5974#include <vfork.h>
72473524 5975EOF
97bf5e38 5976ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 5977{ (eval echo configure:5978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
97bf5e38
MK
5978ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5979if test -z "$ac_err"; then
72473524 5980 rm -rf conftest*
97bf5e38 5981 eval "ac_cv_header_$ac_safe=yes"
72473524 5982else
97bf5e38 5983 echo "$ac_err" >&5
72473524
DJ
5984 echo "configure: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5986 rm -rf conftest*
97bf5e38 5987 eval "ac_cv_header_$ac_safe=no"
72473524
DJ
5988fi
5989rm -f conftest*
5990fi
97bf5e38
MK
5991if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5992 echo "$ac_t""yes" 1>&6
72473524 5993 cat >> confdefs.h <<\EOF
97bf5e38 5994#define HAVE_VFORK_H 1
72473524
DJ
5995EOF
5996
97bf5e38
MK
5997else
5998 echo "$ac_t""no" 1>&6
72473524 5999fi
c906108c 6000
97bf5e38 6001echo $ac_n "checking for working vfork""... $ac_c" 1>&6
d28f9cdf 6002echo "configure:6003: checking for working vfork" >&5
97bf5e38
MK
6003if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6004 echo $ac_n "(cached) $ac_c" 1>&6
6005else
6006 if test "$cross_compiling" = yes; then
6007 echo $ac_n "checking for vfork""... $ac_c" 1>&6
d28f9cdf 6008echo "configure:6009: checking for vfork" >&5
97bf5e38 6009if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
2b2d558c
MK
6010 echo $ac_n "(cached) $ac_c" 1>&6
6011else
6012 cat > conftest.$ac_ext <<EOF
d28f9cdf 6013#line 6014 "configure"
2b2d558c 6014#include "confdefs.h"
97bf5e38
MK
6015/* System header to define __stub macros and hopefully few prototypes,
6016 which can conflict with char vfork(); below. */
6017#include <assert.h>
6018/* Override any gcc2 internal prototype to avoid an error. */
6019/* We use char because int might match the return type of a gcc2
6020 builtin and then its argument prototype would still apply. */
6021char vfork();
2b2d558c
MK
6022
6023int main() {
97bf5e38
MK
6024
6025/* The GNU C library defines this for functions which it implements
6026 to always fail with ENOSYS. Some functions are actually named
6027 something starting with __ and the normal name is an alias. */
6028#if defined (__stub_vfork) || defined (__stub___vfork)
6029choke me
6030#else
6031vfork();
6032#endif
6033
2b2d558c
MK
6034; return 0; }
6035EOF
d28f9cdf 6036if { (eval echo configure:6037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2b2d558c 6037 rm -rf conftest*
97bf5e38 6038 eval "ac_cv_func_vfork=yes"
2b2d558c
MK
6039else
6040 echo "configure: failed program was:" >&5
6041 cat conftest.$ac_ext >&5
6042 rm -rf conftest*
97bf5e38 6043 eval "ac_cv_func_vfork=no"
2b2d558c
MK
6044fi
6045rm -f conftest*
6046fi
6047
97bf5e38
MK
6048if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6049 echo "$ac_t""yes" 1>&6
6050 :
6051else
6052 echo "$ac_t""no" 1>&6
2b2d558c
MK
6053fi
6054
97bf5e38 6055ac_cv_func_vfork_works=$ac_cv_func_vfork
7dfa765c
MK
6056else
6057 cat > conftest.$ac_ext <<EOF
d28f9cdf 6058#line 6059 "configure"
7dfa765c 6059#include "confdefs.h"
97bf5e38
MK
6060/* Thanks to Paul Eggert for this test. */
6061#include <stdio.h>
6062#include <sys/types.h>
6063#include <sys/stat.h>
6064#ifdef HAVE_UNISTD_H
6065#include <unistd.h>
6066#endif
6067#ifdef HAVE_VFORK_H
6068#include <vfork.h>
6069#endif
6070/* On some sparc systems, changes by the child to local and incoming
6071 argument registers are propagated back to the parent.
6072 The compiler is told about this with #include <vfork.h>,
6073 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6074 Test for this by using a static variable whose address
6075 is put into a register that is clobbered by the vfork. */
6076static
6077#ifdef __cplusplus
6078sparc_address_test (int arg)
6079#else
6080sparc_address_test (arg) int arg;
6081#endif
6082{
6083 static pid_t child;
6084 if (!child) {
6085 child = vfork ();
6086 if (child < 0) {
6087 perror ("vfork");
6088 _exit(2);
6089 }
6090 if (!child) {
6091 arg = getpid();
6092 write(-1, "", 0);
6093 _exit (arg);
6094 }
6095 }
6096}
6097main() {
6098 pid_t parent = getpid ();
6099 pid_t child;
7dfa765c 6100
97bf5e38 6101 sparc_address_test ();
7dfa765c 6102
97bf5e38 6103 child = vfork ();
7dfa765c 6104
97bf5e38
MK
6105 if (child == 0) {
6106 /* Here is another test for sparc vfork register problems.
6107 This test uses lots of local variables, at least
6108 as many local variables as main has allocated so far
6109 including compiler temporaries. 4 locals are enough for
6110 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6111 A buggy compiler should reuse the register of parent
6112 for one of the local variables, since it will think that
6113 parent can't possibly be used any more in this routine.
6114 Assigning to the local variable will thus munge parent
6115 in the parent process. */
6116 pid_t
6117 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6118 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6119 /* Convince the compiler that p..p7 are live; otherwise, it might
6120 use the same hardware register for all 8 local variables. */
6121 if (p != p1 || p != p2 || p != p3 || p != p4
6122 || p != p5 || p != p6 || p != p7)
6123 _exit(1);
7dfa765c 6124
97bf5e38
MK
6125 /* On some systems (e.g. IRIX 3.3),
6126 vfork doesn't separate parent from child file descriptors.
6127 If the child closes a descriptor before it execs or exits,
6128 this munges the parent's descriptor as well.
6129 Test for this by closing stdout in the child. */
6130 _exit(close(fileno(stdout)) != 0);
6131 } else {
6132 int status;
6133 struct stat st;
64bb1671 6134
97bf5e38
MK
6135 while (wait(&status) != child)
6136 ;
6137 exit(
6138 /* Was there some problem with vforking? */
6139 child < 0
64bb1671 6140
97bf5e38
MK
6141 /* Did the child fail? (This shouldn't happen.) */
6142 || status
64bb1671 6143
97bf5e38
MK
6144 /* Did the vfork/compiler bug occur? */
6145 || parent != getpid()
6146
6147 /* Did the file descriptor bug occur? */
6148 || fstat(fileno(stdout), &st) != 0
6149 );
6150 }
6151}
5c44784c 6152EOF
d28f9cdf 6153if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6154then
6155 ac_cv_func_vfork_works=yes
5c44784c
JM
6156else
6157 echo "configure: failed program was:" >&5
6158 cat conftest.$ac_ext >&5
97bf5e38
MK
6159 rm -fr conftest*
6160 ac_cv_func_vfork_works=no
5c44784c 6161fi
97bf5e38 6162rm -fr conftest*
5c44784c
JM
6163fi
6164
0afdd437
MK
6165fi
6166
97bf5e38
MK
6167echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6168if test $ac_cv_func_vfork_works = no; then
0afdd437 6169 cat >> confdefs.h <<\EOF
97bf5e38 6170#define vfork fork
0afdd437
MK
6171EOF
6172
6173fi
6174
97bf5e38
MK
6175for ac_func in canonicalize_file_name realpath
6176do
6177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6178echo "configure:6179: checking for $ac_func" >&5
97bf5e38 6179if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7e89e357
JT
6180 echo $ac_n "(cached) $ac_c" 1>&6
6181else
6182 cat > conftest.$ac_ext <<EOF
d28f9cdf 6183#line 6184 "configure"
7e89e357 6184#include "confdefs.h"
97bf5e38
MK
6185/* System header to define __stub macros and hopefully few prototypes,
6186 which can conflict with char $ac_func(); below. */
6187#include <assert.h>
6188/* Override any gcc2 internal prototype to avoid an error. */
6189/* We use char because int might match the return type of a gcc2
6190 builtin and then its argument prototype would still apply. */
6191char $ac_func();
6192
7e89e357 6193int main() {
97bf5e38
MK
6194
6195/* The GNU C library defines this for functions which it implements
6196 to always fail with ENOSYS. Some functions are actually named
6197 something starting with __ and the normal name is an alias. */
6198#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6199choke me
6200#else
6201$ac_func();
6202#endif
6203
7e89e357
JT
6204; return 0; }
6205EOF
d28f9cdf 6206if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7e89e357 6207 rm -rf conftest*
97bf5e38 6208 eval "ac_cv_func_$ac_func=yes"
7e89e357
JT
6209else
6210 echo "configure: failed program was:" >&5
6211 cat conftest.$ac_ext >&5
6212 rm -rf conftest*
97bf5e38 6213 eval "ac_cv_func_$ac_func=no"
7e89e357
JT
6214fi
6215rm -f conftest*
6216fi
6217
97bf5e38
MK
6218if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6219 echo "$ac_t""yes" 1>&6
6220 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6221 cat >> confdefs.h <<EOF
6222#define $ac_tr_func 1
7e89e357 6223EOF
97bf5e38
MK
6224
6225else
6226 echo "$ac_t""no" 1>&6
7e89e357 6227fi
97bf5e38 6228done
7e89e357 6229
97bf5e38 6230for ac_func in poll
7be570e7
JM
6231do
6232echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6233echo "configure:6234: checking for $ac_func" >&5
7be570e7
JM
6234if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6235 echo $ac_n "(cached) $ac_c" 1>&6
6236else
6237 cat > conftest.$ac_ext <<EOF
d28f9cdf 6238#line 6239 "configure"
7be570e7
JM
6239#include "confdefs.h"
6240/* System header to define __stub macros and hopefully few prototypes,
6241 which can conflict with char $ac_func(); below. */
6242#include <assert.h>
6243/* Override any gcc2 internal prototype to avoid an error. */
6244/* We use char because int might match the return type of a gcc2
6245 builtin and then its argument prototype would still apply. */
6246char $ac_func();
6247
6248int main() {
6249
6250/* The GNU C library defines this for functions which it implements
6251 to always fail with ENOSYS. Some functions are actually named
6252 something starting with __ and the normal name is an alias. */
6253#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6254choke me
6255#else
6256$ac_func();
6257#endif
6258
6259; return 0; }
6260EOF
d28f9cdf 6261if { (eval echo configure:6262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14abd0fb
MK
6262 rm -rf conftest*
6263 eval "ac_cv_func_$ac_func=yes"
6264else
6265 echo "configure: failed program was:" >&5
6266 cat conftest.$ac_ext >&5
6267 rm -rf conftest*
6268 eval "ac_cv_func_$ac_func=no"
6269fi
6270rm -f conftest*
6271fi
6272
6273if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6274 echo "$ac_t""yes" 1>&6
6275 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6276 cat >> confdefs.h <<EOF
6277#define $ac_tr_func 1
6278EOF
6279
6280else
6281 echo "$ac_t""no" 1>&6
6282fi
6283done
6284
6285for ac_func in pread64
6286do
6287echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6288echo "configure:6289: checking for $ac_func" >&5
14abd0fb
MK
6289if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6290 echo $ac_n "(cached) $ac_c" 1>&6
6291else
6292 cat > conftest.$ac_ext <<EOF
d28f9cdf 6293#line 6294 "configure"
14abd0fb
MK
6294#include "confdefs.h"
6295/* System header to define __stub macros and hopefully few prototypes,
6296 which can conflict with char $ac_func(); below. */
6297#include <assert.h>
6298/* Override any gcc2 internal prototype to avoid an error. */
6299/* We use char because int might match the return type of a gcc2
6300 builtin and then its argument prototype would still apply. */
6301char $ac_func();
6302
6303int main() {
6304
6305/* The GNU C library defines this for functions which it implements
6306 to always fail with ENOSYS. Some functions are actually named
6307 something starting with __ and the normal name is an alias. */
6308#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6309choke me
6310#else
6311$ac_func();
6312#endif
6313
6314; return 0; }
6315EOF
d28f9cdf 6316if { (eval echo configure:6317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
6317 rm -rf conftest*
6318 eval "ac_cv_func_$ac_func=yes"
6319else
6320 echo "configure: failed program was:" >&5
6321 cat conftest.$ac_ext >&5
6322 rm -rf conftest*
6323 eval "ac_cv_func_$ac_func=no"
6324fi
6325rm -f conftest*
6326fi
6327
6328if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6329 echo "$ac_t""yes" 1>&6
6330 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6331 cat >> confdefs.h <<EOF
6332#define $ac_tr_func 1
6333EOF
6334
6335else
6336 echo "$ac_t""no" 1>&6
6337fi
6338done
6339
97bf5e38
MK
6340for ac_func in sbrk
6341do
6342echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6343echo "configure:6344: checking for $ac_func" >&5
97bf5e38 6344if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6345 echo $ac_n "(cached) $ac_c" 1>&6
6346else
6347 cat > conftest.$ac_ext <<EOF
d28f9cdf 6348#line 6349 "configure"
c906108c 6349#include "confdefs.h"
97bf5e38
MK
6350/* System header to define __stub macros and hopefully few prototypes,
6351 which can conflict with char $ac_func(); below. */
6352#include <assert.h>
6353/* Override any gcc2 internal prototype to avoid an error. */
6354/* We use char because int might match the return type of a gcc2
6355 builtin and then its argument prototype would still apply. */
6356char $ac_func();
c906108c 6357
97bf5e38
MK
6358int main() {
6359
6360/* The GNU C library defines this for functions which it implements
6361 to always fail with ENOSYS. Some functions are actually named
6362 something starting with __ and the normal name is an alias. */
6363#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6364choke me
c906108c 6365#else
97bf5e38 6366$ac_func();
c906108c 6367#endif
97bf5e38 6368
c906108c
SS
6369; return 0; }
6370EOF
d28f9cdf 6371if { (eval echo configure:6372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6372 rm -rf conftest*
97bf5e38 6373 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6374else
6375 echo "configure: failed program was:" >&5
6376 cat conftest.$ac_ext >&5
6377 rm -rf conftest*
97bf5e38 6378 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6379fi
6380rm -f conftest*
6381fi
6382
97bf5e38
MK
6383if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6384 echo "$ac_t""yes" 1>&6
6385 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6386 cat >> confdefs.h <<EOF
6387#define $ac_tr_func 1
c906108c 6388EOF
97bf5e38
MK
6389
6390else
6391 echo "$ac_t""no" 1>&6
c906108c 6392fi
97bf5e38 6393done
c906108c 6394
97bf5e38
MK
6395for ac_func in setpgid setpgrp
6396do
6397echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6398echo "configure:6399: checking for $ac_func" >&5
97bf5e38 6399if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6400 echo $ac_n "(cached) $ac_c" 1>&6
6401else
6402 cat > conftest.$ac_ext <<EOF
d28f9cdf 6403#line 6404 "configure"
c906108c 6404#include "confdefs.h"
97bf5e38
MK
6405/* System header to define __stub macros and hopefully few prototypes,
6406 which can conflict with char $ac_func(); below. */
6407#include <assert.h>
6408/* Override any gcc2 internal prototype to avoid an error. */
6409/* We use char because int might match the return type of a gcc2
6410 builtin and then its argument prototype would still apply. */
6411char $ac_func();
c906108c 6412
97bf5e38
MK
6413int main() {
6414
6415/* The GNU C library defines this for functions which it implements
6416 to always fail with ENOSYS. Some functions are actually named
6417 something starting with __ and the normal name is an alias. */
6418#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6419choke me
c906108c 6420#else
97bf5e38 6421$ac_func();
c906108c 6422#endif
97bf5e38 6423
c906108c
SS
6424; return 0; }
6425EOF
d28f9cdf 6426if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6427 rm -rf conftest*
97bf5e38 6428 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6429else
6430 echo "configure: failed program was:" >&5
6431 cat conftest.$ac_ext >&5
6432 rm -rf conftest*
97bf5e38 6433 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6434fi
6435rm -f conftest*
6436fi
6437
97bf5e38
MK
6438if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6439 echo "$ac_t""yes" 1>&6
6440 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6441 cat >> confdefs.h <<EOF
6442#define $ac_tr_func 1
c906108c 6443EOF
97bf5e38
MK
6444
6445else
6446 echo "$ac_t""no" 1>&6
c906108c 6447fi
97bf5e38 6448done
c906108c 6449
e1ea1d75 6450for ac_func in sigaction sigprocmask sigsetmask
97bf5e38
MK
6451do
6452echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6453echo "configure:6454: checking for $ac_func" >&5
97bf5e38 6454if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6455 echo $ac_n "(cached) $ac_c" 1>&6
6456else
6457 cat > conftest.$ac_ext <<EOF
d28f9cdf 6458#line 6459 "configure"
c906108c 6459#include "confdefs.h"
97bf5e38
MK
6460/* System header to define __stub macros and hopefully few prototypes,
6461 which can conflict with char $ac_func(); below. */
6462#include <assert.h>
6463/* Override any gcc2 internal prototype to avoid an error. */
6464/* We use char because int might match the return type of a gcc2
6465 builtin and then its argument prototype would still apply. */
6466char $ac_func();
c906108c 6467
97bf5e38
MK
6468int main() {
6469
6470/* The GNU C library defines this for functions which it implements
6471 to always fail with ENOSYS. Some functions are actually named
6472 something starting with __ and the normal name is an alias. */
6473#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6474choke me
c906108c 6475#else
97bf5e38 6476$ac_func();
c906108c 6477#endif
97bf5e38 6478
c906108c
SS
6479; return 0; }
6480EOF
d28f9cdf 6481if { (eval echo configure:6482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6482 rm -rf conftest*
97bf5e38 6483 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6484else
6485 echo "configure: failed program was:" >&5
6486 cat conftest.$ac_ext >&5
6487 rm -rf conftest*
97bf5e38 6488 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6489fi
6490rm -f conftest*
6491fi
6492
97bf5e38
MK
6493if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6494 echo "$ac_t""yes" 1>&6
6495 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6496 cat >> confdefs.h <<EOF
6497#define $ac_tr_func 1
c906108c 6498EOF
e1ea1d75 6499
97bf5e38
MK
6500else
6501 echo "$ac_t""no" 1>&6
c906108c 6502fi
97bf5e38 6503done
c906108c 6504
97bf5e38
MK
6505for ac_func in socketpair
6506do
6507echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
d28f9cdf 6508echo "configure:6509: checking for $ac_func" >&5
97bf5e38 6509if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
c906108c
SS
6510 echo $ac_n "(cached) $ac_c" 1>&6
6511else
6512 cat > conftest.$ac_ext <<EOF
d28f9cdf 6513#line 6514 "configure"
c906108c 6514#include "confdefs.h"
97bf5e38
MK
6515/* System header to define __stub macros and hopefully few prototypes,
6516 which can conflict with char $ac_func(); below. */
6517#include <assert.h>
6518/* Override any gcc2 internal prototype to avoid an error. */
6519/* We use char because int might match the return type of a gcc2
6520 builtin and then its argument prototype would still apply. */
6521char $ac_func();
c906108c 6522
97bf5e38
MK
6523int main() {
6524
6525/* The GNU C library defines this for functions which it implements
6526 to always fail with ENOSYS. Some functions are actually named
6527 something starting with __ and the normal name is an alias. */
6528#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6529choke me
c906108c 6530#else
97bf5e38 6531$ac_func();
c906108c 6532#endif
97bf5e38 6533
c906108c
SS
6534; return 0; }
6535EOF
d28f9cdf 6536if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c 6537 rm -rf conftest*
97bf5e38 6538 eval "ac_cv_func_$ac_func=yes"
c906108c
SS
6539else
6540 echo "configure: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 rm -rf conftest*
97bf5e38 6543 eval "ac_cv_func_$ac_func=no"
c906108c
SS
6544fi
6545rm -f conftest*
6546fi
6547
97bf5e38
MK
6548if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6549 echo "$ac_t""yes" 1>&6
6550 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6551 cat >> confdefs.h <<EOF
6552#define $ac_tr_func 1
c906108c 6553EOF
97bf5e38
MK
6554
6555else
6556 echo "$ac_t""no" 1>&6
c906108c 6557fi
97bf5e38 6558done
c906108c 6559
97bf5e38
MK
6560
6561if test "$cross_compiling" = no; then
6562 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d28f9cdf 6563echo "configure:6564: checking whether setpgrp takes no argument" >&5
97bf5e38 6564if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
c906108c 6565 echo $ac_n "(cached) $ac_c" 1>&6
97bf5e38
MK
6566else
6567 if test "$cross_compiling" = yes; then
6568 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
c906108c
SS
6569else
6570 cat > conftest.$ac_ext <<EOF
d28f9cdf 6571#line 6572 "configure"
c906108c
SS
6572#include "confdefs.h"
6573
c906108c
SS
6574#ifdef HAVE_UNISTD_H
6575#include <unistd.h>
6576#endif
97bf5e38
MK
6577
6578/*
6579 * If this system has a BSD-style setpgrp, which takes arguments, exit
6580 * successfully.
6581 */
6582main()
6583{
6584 if (setpgrp(1,1) == -1)
6585 exit(0);
6586 else
6587 exit(1);
6588}
6589
c906108c 6590EOF
d28f9cdf 6591if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
6592then
6593 ac_cv_func_setpgrp_void=no
c906108c
SS
6594else
6595 echo "configure: failed program was:" >&5
6596 cat conftest.$ac_ext >&5
97bf5e38
MK
6597 rm -fr conftest*
6598 ac_cv_func_setpgrp_void=yes
c906108c 6599fi
97bf5e38 6600rm -fr conftest*
c906108c
SS
6601fi
6602
97bf5e38
MK
6603
6604fi
6605
6606echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6607if test $ac_cv_func_setpgrp_void = yes; then
6608 cat >> confdefs.h <<\EOF
6609#define SETPGRP_VOID 1
c906108c
SS
6610EOF
6611
6612fi
6613
97bf5e38
MK
6614else
6615 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
d28f9cdf 6616echo "configure:6617: checking whether setpgrp takes no argument" >&5
97bf5e38 6617if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
b83266a0
SS
6618 echo $ac_n "(cached) $ac_c" 1>&6
6619else
6620 cat > conftest.$ac_ext <<EOF
d28f9cdf 6621#line 6622 "configure"
b83266a0
SS
6622#include "confdefs.h"
6623
b83266a0 6624#include <unistd.h>
97bf5e38 6625
b83266a0 6626int main() {
97bf5e38
MK
6627
6628 if (setpgrp(1,1) == -1)
6629 exit (0);
6630 else
6631 exit (1);
6632
b83266a0
SS
6633; return 0; }
6634EOF
d28f9cdf 6635if { (eval echo configure:6636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0 6636 rm -rf conftest*
97bf5e38 6637 ac_cv_func_setpgrp_void=no
b83266a0
SS
6638else
6639 echo "configure: failed program was:" >&5
6640 cat conftest.$ac_ext >&5
6641 rm -rf conftest*
97bf5e38 6642 ac_cv_func_setpgrp_void=yes
b83266a0
SS
6643fi
6644rm -f conftest*
6645fi
6646
97bf5e38
MK
6647echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6648if test $ac_cv_func_setpgrp_void = yes; then
b83266a0 6649 cat >> confdefs.h <<\EOF
97bf5e38 6650#define SETPGRP_VOID 1
b83266a0
SS
6651EOF
6652
97bf5e38 6653fi
b83266a0
SS
6654fi
6655
97bf5e38
MK
6656# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
6657# since sigsetjmp might only be defined as a macro.
6658echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
d28f9cdf 6659echo "configure:6660: checking for sigsetjmp" >&5
97bf5e38 6660if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
a4db0f07
RH
6661 echo $ac_n "(cached) $ac_c" 1>&6
6662else
6663 cat > conftest.$ac_ext <<EOF
d28f9cdf 6664#line 6665 "configure"
a4db0f07
RH
6665#include "confdefs.h"
6666
97bf5e38
MK
6667#include <setjmp.h>
6668
a4db0f07 6669int main() {
97bf5e38 6670sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
a4db0f07
RH
6671; return 0; }
6672EOF
d28f9cdf 6673if { (eval echo configure:6674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07 6674 rm -rf conftest*
97bf5e38 6675 gdb_cv_func_sigsetjmp=yes
a4db0f07
RH
6676else
6677 echo "configure: failed program was:" >&5
6678 cat conftest.$ac_ext >&5
6679 rm -rf conftest*
97bf5e38 6680 gdb_cv_func_sigsetjmp=no
a4db0f07
RH
6681fi
6682rm -f conftest*
6683fi
6684
97bf5e38
MK
6685echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6686if test $gdb_cv_func_sigsetjmp = yes; then
a4db0f07 6687 cat >> confdefs.h <<\EOF
97bf5e38 6688#define HAVE_SIGSETJMP 1
a4db0f07
RH
6689EOF
6690
6691fi
c906108c 6692
06825bd1
MK
6693# Assume we'll default to using the included libiberty regex.
6694gdb_use_included_regex=yes
6695
6696# However, if the system regex is GNU regex, then default to *not*
6697# using the included regex.
6698echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
d28f9cdf 6699echo "configure:6700: checking for GNU regex" >&5
06825bd1
MK
6700if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6701 echo $ac_n "(cached) $ac_c" 1>&6
6702else
6703 cat > conftest.$ac_ext <<EOF
d28f9cdf 6704#line 6705 "configure"
06825bd1
MK
6705#include "confdefs.h"
6706#include <gnu-versions.h>
6707int main() {
6708#define REGEX_INTERFACE_VERSION 1
6709#if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6710# error "Version mismatch"
6711#endif
6712; return 0; }
6713EOF
d28f9cdf 6714if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
06825bd1
MK
6715 rm -rf conftest*
6716 gdb_cv_have_gnu_regex=yes
6717else
6718 echo "configure: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6720 rm -rf conftest*
6721 gdb_cv_have_gnu_regex=no
6722fi
6723rm -f conftest*
6724fi
6725
6726echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6727if test $gdb_cv_have_gnu_regex = yes; then
6728 gdb_use_included_regex=no
6729fi
6730
6731# Check whether --with-included-regex or --without-included-regex was given.
6732if test "${with_included_regex+set}" = set; then
6733 withval="$with_included_regex"
6734 gdb_with_regex=$withval
6735else
6736 gdb_with_regex=$gdb_use_included_regex
6737fi
6738
6739if test "$gdb_with_regex" = yes; then
6740 cat >> confdefs.h <<\EOF
6741#define USE_INCLUDED_REGEX 1
6742EOF
6743
6744fi
6745
97bf5e38
MK
6746# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6747# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6748echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
d28f9cdf 6749echo "configure:6750: checking for r_fs in struct reg" >&5
97bf5e38
MK
6750if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6751 echo $ac_n "(cached) $ac_c" 1>&6
6752else
6753 cat > conftest.$ac_ext <<EOF
d28f9cdf 6754#line 6755 "configure"
c906108c 6755#include "confdefs.h"
97bf5e38
MK
6756#include <machine/reg.h>
6757int main() {
6758struct reg r; r.r_fs;
6759; return 0; }
c906108c 6760EOF
d28f9cdf 6761if { (eval echo configure:6762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6762 rm -rf conftest*
97bf5e38 6763 gdb_cv_struct_reg_r_fs=yes
c906108c 6764else
97bf5e38
MK
6765 echo "configure: failed program was:" >&5
6766 cat conftest.$ac_ext >&5
c906108c 6767 rm -rf conftest*
97bf5e38 6768 gdb_cv_struct_reg_r_fs=no
c906108c
SS
6769fi
6770rm -f conftest*
97bf5e38 6771fi
c906108c 6772
97bf5e38
MK
6773echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6774if test $gdb_cv_struct_reg_r_fs = yes; then
6775 cat >> confdefs.h <<\EOF
6776#define HAVE_STRUCT_REG_R_FS 1
6777EOF
6778
6779fi
6780echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
d28f9cdf 6781echo "configure:6782: checking for r_gs in struct reg" >&5
97bf5e38
MK
6782if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6783 echo $ac_n "(cached) $ac_c" 1>&6
6784else
6785 cat > conftest.$ac_ext <<EOF
d28f9cdf 6786#line 6787 "configure"
c906108c 6787#include "confdefs.h"
97bf5e38
MK
6788#include <machine/reg.h>
6789int main() {
6790struct reg r; r.r_gs;
6791; return 0; }
c906108c 6792EOF
d28f9cdf 6793if { (eval echo configure:6794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6794 rm -rf conftest*
97bf5e38 6795 gdb_cv_struct_reg_r_gs=yes
c906108c 6796else
97bf5e38
MK
6797 echo "configure: failed program was:" >&5
6798 cat conftest.$ac_ext >&5
c906108c 6799 rm -rf conftest*
97bf5e38 6800 gdb_cv_struct_reg_r_gs=no
c906108c
SS
6801fi
6802rm -f conftest*
c906108c 6803fi
c906108c 6804
97bf5e38
MK
6805echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6806if test $gdb_cv_struct_reg_r_gs = yes; then
6807 cat >> confdefs.h <<\EOF
6808#define HAVE_STRUCT_REG_R_GS 1
c3f6f71d
JM
6809EOF
6810
c906108c
SS
6811fi
6812
97bf5e38
MK
6813# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6814echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
d28f9cdf 6815echo "configure:6816: checking for PTRACE_GETREGS" >&5
97bf5e38 6816if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
c906108c
SS
6817 echo $ac_n "(cached) $ac_c" 1>&6
6818else
6819 cat > conftest.$ac_ext <<EOF
d28f9cdf 6820#line 6821 "configure"
c906108c 6821#include "confdefs.h"
97bf5e38 6822#include <sys/ptrace.h>
c906108c 6823int main() {
97bf5e38 6824PTRACE_GETREGS;
c906108c
SS
6825; return 0; }
6826EOF
d28f9cdf 6827if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6828 rm -rf conftest*
97bf5e38 6829 gdb_cv_have_ptrace_getregs=yes
c906108c
SS
6830else
6831 echo "configure: failed program was:" >&5
6832 cat conftest.$ac_ext >&5
6833 rm -rf conftest*
97bf5e38 6834 gdb_cv_have_ptrace_getregs=no
c906108c
SS
6835fi
6836rm -f conftest*
6837fi
6838
97bf5e38
MK
6839echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6840if test $gdb_cv_have_ptrace_getregs = yes; then
6841 cat >> confdefs.h <<\EOF
6842#define HAVE_PTRACE_GETREGS 1
c906108c
SS
6843EOF
6844
97bf5e38 6845fi
c906108c 6846
97bf5e38
MK
6847# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6848echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
d28f9cdf 6849echo "configure:6850: checking for PTRACE_GETFPXREGS" >&5
97bf5e38 6850if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
c906108c
SS
6851 echo $ac_n "(cached) $ac_c" 1>&6
6852else
6853 cat > conftest.$ac_ext <<EOF
d28f9cdf 6854#line 6855 "configure"
c906108c 6855#include "confdefs.h"
97bf5e38 6856#include <sys/ptrace.h>
c906108c 6857int main() {
97bf5e38 6858PTRACE_GETFPXREGS;
c906108c
SS
6859; return 0; }
6860EOF
d28f9cdf 6861if { (eval echo configure:6862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6862 rm -rf conftest*
97bf5e38 6863 gdb_cv_have_ptrace_getfpxregs=yes
c906108c
SS
6864else
6865 echo "configure: failed program was:" >&5
6866 cat conftest.$ac_ext >&5
6867 rm -rf conftest*
97bf5e38 6868 gdb_cv_have_ptrace_getfpxregs=no
c906108c
SS
6869fi
6870rm -f conftest*
6871fi
6872
97bf5e38
MK
6873echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6874if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6875 cat >> confdefs.h <<\EOF
6876#define HAVE_PTRACE_GETFPXREGS 1
c906108c
SS
6877EOF
6878
97bf5e38 6879fi
c906108c 6880
97bf5e38
MK
6881# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6882echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
d28f9cdf 6883echo "configure:6884: checking for PT_GETDBREGS" >&5
97bf5e38 6884if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
c906108c
SS
6885 echo $ac_n "(cached) $ac_c" 1>&6
6886else
6887 cat > conftest.$ac_ext <<EOF
d28f9cdf 6888#line 6889 "configure"
c906108c 6889#include "confdefs.h"
97bf5e38
MK
6890#include <sys/types.h>
6891#include <sys/ptrace.h>
c906108c 6892int main() {
97bf5e38 6893PT_GETDBREGS;
c906108c
SS
6894; return 0; }
6895EOF
d28f9cdf 6896if { (eval echo configure:6897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6897 rm -rf conftest*
97bf5e38 6898 gdb_cv_have_pt_getdbregs=yes
c906108c
SS
6899else
6900 echo "configure: failed program was:" >&5
6901 cat conftest.$ac_ext >&5
6902 rm -rf conftest*
97bf5e38 6903 gdb_cv_have_pt_getdbregs=no
c906108c
SS
6904fi
6905rm -f conftest*
6906fi
6907
97bf5e38
MK
6908echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6909if test $gdb_cv_have_pt_getdbregs = yes; then
6910 cat >> confdefs.h <<\EOF
6911#define HAVE_PT_GETDBREGS 1
c906108c
SS
6912EOF
6913
97bf5e38 6914fi
c906108c 6915
97bf5e38
MK
6916# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6917echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
d28f9cdf 6918echo "configure:6919: checking for PT_GETXMMREGS" >&5
97bf5e38 6919if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
c906108c
SS
6920 echo $ac_n "(cached) $ac_c" 1>&6
6921else
6922 cat > conftest.$ac_ext <<EOF
d28f9cdf 6923#line 6924 "configure"
c906108c 6924#include "confdefs.h"
97bf5e38
MK
6925#include <sys/types.h>
6926#include <sys/ptrace.h>
c906108c 6927int main() {
97bf5e38 6928PT_GETXMMREGS;
c906108c
SS
6929; return 0; }
6930EOF
d28f9cdf 6931if { (eval echo configure:6932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 6932 rm -rf conftest*
97bf5e38 6933 gdb_cv_have_pt_getxmmregs=yes
c906108c
SS
6934else
6935 echo "configure: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 rm -rf conftest*
97bf5e38 6938 gdb_cv_have_pt_getxmmregs=no
c906108c
SS
6939fi
6940rm -f conftest*
6941fi
6942
97bf5e38
MK
6943echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6944if test $gdb_cv_have_pt_getxmmregs = yes; then
6945 cat >> confdefs.h <<\EOF
6946#define HAVE_PT_GETXMMREGS 1
c906108c
SS
6947EOF
6948
97bf5e38 6949fi
c906108c 6950
97bf5e38
MK
6951
6952echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
d28f9cdf 6953echo "configure:6954: checking whether malloc must be declared" >&5
97bf5e38 6954if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3862412b
MK
6955 echo $ac_n "(cached) $ac_c" 1>&6
6956else
6957 cat > conftest.$ac_ext <<EOF
d28f9cdf 6958#line 6959 "configure"
3862412b 6959#include "confdefs.h"
e17bf198 6960
97bf5e38
MK
6961#include <stdio.h>
6962#ifdef HAVE_STRING_H
6963#include <string.h>
6964#else
6965#ifdef HAVE_STRINGS_H
6966#include <strings.h>
6967#endif
6968#endif
6969#ifdef HAVE_STDLIB_H
6970#include <stdlib.h>
6971#endif
6972#ifdef HAVE_UNISTD_H
6973#include <unistd.h>
6974#endif
3862412b 6975int main() {
97bf5e38 6976char *(*pfn) = (char *(*)) malloc
3862412b
MK
6977; return 0; }
6978EOF
d28f9cdf 6979if { (eval echo configure:6980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 6980 rm -rf conftest*
97bf5e38 6981 bfd_cv_decl_needed_malloc=no
3862412b
MK
6982else
6983 echo "configure: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 rm -rf conftest*
97bf5e38 6986 bfd_cv_decl_needed_malloc=yes
3862412b
MK
6987fi
6988rm -f conftest*
6989fi
6990
97bf5e38
MK
6991echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6992if test $bfd_cv_decl_needed_malloc = yes; then
6993 cat >> confdefs.h <<\EOF
6994#define NEED_DECLARATION_MALLOC 1
3862412b
MK
6995EOF
6996
97bf5e38 6997fi
3862412b 6998
97bf5e38 6999echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
d28f9cdf 7000echo "configure:7001: checking whether realloc must be declared" >&5
97bf5e38 7001if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3862412b
MK
7002 echo $ac_n "(cached) $ac_c" 1>&6
7003else
7004 cat > conftest.$ac_ext <<EOF
d28f9cdf 7005#line 7006 "configure"
3862412b 7006#include "confdefs.h"
e17bf198 7007
97bf5e38
MK
7008#include <stdio.h>
7009#ifdef HAVE_STRING_H
7010#include <string.h>
7011#else
7012#ifdef HAVE_STRINGS_H
7013#include <strings.h>
7014#endif
7015#endif
7016#ifdef HAVE_STDLIB_H
7017#include <stdlib.h>
7018#endif
7019#ifdef HAVE_UNISTD_H
7020#include <unistd.h>
7021#endif
3862412b 7022int main() {
97bf5e38 7023char *(*pfn) = (char *(*)) realloc
3862412b
MK
7024; return 0; }
7025EOF
d28f9cdf 7026if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7027 rm -rf conftest*
97bf5e38 7028 bfd_cv_decl_needed_realloc=no
3862412b
MK
7029else
7030 echo "configure: failed program was:" >&5
7031 cat conftest.$ac_ext >&5
7032 rm -rf conftest*
97bf5e38 7033 bfd_cv_decl_needed_realloc=yes
3862412b
MK
7034fi
7035rm -f conftest*
7036fi
7037
97bf5e38
MK
7038echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7039if test $bfd_cv_decl_needed_realloc = yes; then
7040 cat >> confdefs.h <<\EOF
7041#define NEED_DECLARATION_REALLOC 1
3862412b
MK
7042EOF
7043
97bf5e38 7044fi
3862412b 7045
97bf5e38 7046echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
d28f9cdf 7047echo "configure:7048: checking whether free must be declared" >&5
97bf5e38 7048if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
451928c5
AC
7049 echo $ac_n "(cached) $ac_c" 1>&6
7050else
7051 cat > conftest.$ac_ext <<EOF
d28f9cdf 7052#line 7053 "configure"
451928c5 7053#include "confdefs.h"
e17bf198 7054
97bf5e38
MK
7055#include <stdio.h>
7056#ifdef HAVE_STRING_H
7057#include <string.h>
7058#else
7059#ifdef HAVE_STRINGS_H
7060#include <strings.h>
7061#endif
7062#endif
7063#ifdef HAVE_STDLIB_H
7064#include <stdlib.h>
7065#endif
7066#ifdef HAVE_UNISTD_H
7067#include <unistd.h>
7068#endif
451928c5 7069int main() {
97bf5e38 7070char *(*pfn) = (char *(*)) free
451928c5
AC
7071; return 0; }
7072EOF
d28f9cdf 7073if { (eval echo configure:7074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7074 rm -rf conftest*
97bf5e38 7075 bfd_cv_decl_needed_free=no
451928c5
AC
7076else
7077 echo "configure: failed program was:" >&5
7078 cat conftest.$ac_ext >&5
7079 rm -rf conftest*
97bf5e38 7080 bfd_cv_decl_needed_free=yes
451928c5
AC
7081fi
7082rm -f conftest*
7083fi
7084
97bf5e38
MK
7085echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7086if test $bfd_cv_decl_needed_free = yes; then
7087 cat >> confdefs.h <<\EOF
7088#define NEED_DECLARATION_FREE 1
451928c5
AC
7089EOF
7090
97bf5e38 7091fi
451928c5 7092
97bf5e38 7093echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
d28f9cdf 7094echo "configure:7095: checking whether strerror must be declared" >&5
97bf5e38 7095if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
451928c5
AC
7096 echo $ac_n "(cached) $ac_c" 1>&6
7097else
7098 cat > conftest.$ac_ext <<EOF
d28f9cdf 7099#line 7100 "configure"
451928c5 7100#include "confdefs.h"
e17bf198 7101
97bf5e38
MK
7102#include <stdio.h>
7103#ifdef HAVE_STRING_H
7104#include <string.h>
7105#else
7106#ifdef HAVE_STRINGS_H
7107#include <strings.h>
7108#endif
7109#endif
7110#ifdef HAVE_STDLIB_H
7111#include <stdlib.h>
7112#endif
7113#ifdef HAVE_UNISTD_H
7114#include <unistd.h>
7115#endif
451928c5 7116int main() {
97bf5e38 7117char *(*pfn) = (char *(*)) strerror
451928c5
AC
7118; return 0; }
7119EOF
d28f9cdf 7120if { (eval echo configure:7121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5 7121 rm -rf conftest*
97bf5e38 7122 bfd_cv_decl_needed_strerror=no
451928c5
AC
7123else
7124 echo "configure: failed program was:" >&5
7125 cat conftest.$ac_ext >&5
7126 rm -rf conftest*
97bf5e38 7127 bfd_cv_decl_needed_strerror=yes
451928c5
AC
7128fi
7129rm -f conftest*
7130fi
7131
97bf5e38
MK
7132echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7133if test $bfd_cv_decl_needed_strerror = yes; then
7134 cat >> confdefs.h <<\EOF
7135#define NEED_DECLARATION_STRERROR 1
451928c5
AC
7136EOF
7137
97bf5e38 7138fi
451928c5 7139
97bf5e38 7140echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
d28f9cdf 7141echo "configure:7142: checking whether strdup must be declared" >&5
97bf5e38 7142if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3862412b
MK
7143 echo $ac_n "(cached) $ac_c" 1>&6
7144else
7145 cat > conftest.$ac_ext <<EOF
d28f9cdf 7146#line 7147 "configure"
3862412b 7147#include "confdefs.h"
e17bf198 7148
97bf5e38
MK
7149#include <stdio.h>
7150#ifdef HAVE_STRING_H
7151#include <string.h>
7152#else
7153#ifdef HAVE_STRINGS_H
7154#include <strings.h>
7155#endif
7156#endif
7157#ifdef HAVE_STDLIB_H
7158#include <stdlib.h>
7159#endif
7160#ifdef HAVE_UNISTD_H
7161#include <unistd.h>
7162#endif
3862412b 7163int main() {
97bf5e38 7164char *(*pfn) = (char *(*)) strdup
3862412b
MK
7165; return 0; }
7166EOF
d28f9cdf 7167if { (eval echo configure:7168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7168 rm -rf conftest*
97bf5e38 7169 bfd_cv_decl_needed_strdup=no
3862412b
MK
7170else
7171 echo "configure: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173 rm -rf conftest*
97bf5e38 7174 bfd_cv_decl_needed_strdup=yes
3862412b
MK
7175fi
7176rm -f conftest*
7177fi
7178
97bf5e38
MK
7179echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7180if test $bfd_cv_decl_needed_strdup = yes; then
7181 cat >> confdefs.h <<\EOF
7182#define NEED_DECLARATION_STRDUP 1
3862412b
MK
7183EOF
7184
97bf5e38 7185fi
3862412b 7186
97bf5e38 7187echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
d28f9cdf 7188echo "configure:7189: checking whether strstr must be declared" >&5
97bf5e38 7189if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
3862412b
MK
7190 echo $ac_n "(cached) $ac_c" 1>&6
7191else
7192 cat > conftest.$ac_ext <<EOF
d28f9cdf 7193#line 7194 "configure"
3862412b 7194#include "confdefs.h"
e17bf198 7195
97bf5e38
MK
7196#include <stdio.h>
7197#ifdef HAVE_STRING_H
7198#include <string.h>
7199#else
7200#ifdef HAVE_STRINGS_H
7201#include <strings.h>
7202#endif
7203#endif
7204#ifdef HAVE_STDLIB_H
7205#include <stdlib.h>
7206#endif
7207#ifdef HAVE_UNISTD_H
7208#include <unistd.h>
7209#endif
3862412b 7210int main() {
97bf5e38 7211char *(*pfn) = (char *(*)) strstr
3862412b
MK
7212; return 0; }
7213EOF
d28f9cdf 7214if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b 7215 rm -rf conftest*
97bf5e38 7216 bfd_cv_decl_needed_strstr=no
3862412b
MK
7217else
7218 echo "configure: failed program was:" >&5
7219 cat conftest.$ac_ext >&5
7220 rm -rf conftest*
97bf5e38 7221 bfd_cv_decl_needed_strstr=yes
3862412b
MK
7222fi
7223rm -f conftest*
7224fi
7225
97bf5e38
MK
7226echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7227if test $bfd_cv_decl_needed_strstr = yes; then
7228 cat >> confdefs.h <<\EOF
7229#define NEED_DECLARATION_STRSTR 1
3862412b
MK
7230EOF
7231
97bf5e38 7232fi
3862412b 7233
97bf5e38 7234echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
d28f9cdf 7235echo "configure:7236: checking whether canonicalize_file_name must be declared" >&5
97bf5e38 7236if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
596c9d4b
KB
7237 echo $ac_n "(cached) $ac_c" 1>&6
7238else
7239 cat > conftest.$ac_ext <<EOF
d28f9cdf 7240#line 7241 "configure"
596c9d4b
KB
7241#include "confdefs.h"
7242
97bf5e38
MK
7243#include <stdio.h>
7244#ifdef HAVE_STRING_H
7245#include <string.h>
7246#else
7247#ifdef HAVE_STRINGS_H
7248#include <strings.h>
7249#endif
7250#endif
7251#ifdef HAVE_STDLIB_H
7252#include <stdlib.h>
7253#endif
7254#ifdef HAVE_UNISTD_H
7255#include <unistd.h>
7256#endif
596c9d4b 7257int main() {
97bf5e38 7258char *(*pfn) = (char *(*)) canonicalize_file_name
596c9d4b
KB
7259; return 0; }
7260EOF
d28f9cdf 7261if { (eval echo configure:7262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7262 rm -rf conftest*
97bf5e38 7263 bfd_cv_decl_needed_canonicalize_file_name=no
596c9d4b
KB
7264else
7265 echo "configure: failed program was:" >&5
7266 cat conftest.$ac_ext >&5
7267 rm -rf conftest*
97bf5e38 7268 bfd_cv_decl_needed_canonicalize_file_name=yes
596c9d4b
KB
7269fi
7270rm -f conftest*
7271fi
7272
97bf5e38
MK
7273echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7274if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7275 cat >> confdefs.h <<\EOF
7276#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
596c9d4b
KB
7277EOF
7278
97bf5e38 7279fi
596c9d4b 7280
97bf5e38
MK
7281
7282# The following save_state_t checkery is only necessary for HPUX
7283# versions earlier than 10.20. When those fade from memory, this
7284# could be expunged. --jsm 1999-03-22
7285
7286echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
d28f9cdf 7287echo "configure:7288: checking for HPUX save_state structure" >&5
97bf5e38 7288cat > conftest.$ac_ext <<EOF
d28f9cdf 7289#line 7290 "configure"
97bf5e38
MK
7290#include "confdefs.h"
7291#include <machine/save_state.h>
7292EOF
7293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7294 egrep "save_state_t" >/dev/null 2>&1; then
7295 rm -rf conftest*
7296 gdb_cv_hpux_savestate=yes
7297else
7298 rm -rf conftest*
7299 gdb_cv_hpux_savestate=no
7300fi
7301rm -f conftest*
7302
7303cat > conftest.$ac_ext <<EOF
d28f9cdf 7304#line 7305 "configure"
97bf5e38
MK
7305#include "confdefs.h"
7306#include <machine/save_state.h>
7307EOF
7308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7309 egrep "ss_wide" >/dev/null 2>&1; then
7310 rm -rf conftest*
7311 gdb_cv_hpux_sswide=yes
7312else
7313 rm -rf conftest*
7314 gdb_cv_hpux_sswide=no
7315fi
7316rm -f conftest*
7317
7318if test $gdb_cv_hpux_savestate = yes
7319then
7320 cat >> confdefs.h <<\EOF
7321#define HAVE_STRUCT_SAVE_STATE_T 1
7322EOF
7323
7324fi
7325if test $gdb_cv_hpux_sswide = yes
7326then
7327 cat >> confdefs.h <<\EOF
7328#define HAVE_STRUCT_MEMBER_SS_WIDE 1
7329EOF
7330
7331fi
7332echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7333
7334
7335# If we are configured native on GNU/Linux, work around problems with
7336# sys/procfs.h
7337# Also detect which type of /proc is in use, such as for Unixware or Solaris.
7338
7339if test "${target}" = "${host}"; then
7340 case "${host}" in
7341 i[3456]86-*-linux*)
7342 cat >> confdefs.h <<\EOF
7343#define START_INFERIOR_TRAPS_EXPECTED 2
7344EOF
7345
7346 cat >> confdefs.h <<\EOF
7347#define sys_quotactl 1
7348EOF
7349
7350 ;;
7351 ia64-*-aix*)
7352 cat >> confdefs.h <<\EOF
7353#define NEW_PROC_API 1
7354EOF
7355
7356 ;;
7357 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7358 cat >> confdefs.h <<\EOF
7359#define NEW_PROC_API 1
7360EOF
7361
7362 ;;
7363 *-*-solaris2.[678])
7364 cat >> confdefs.h <<\EOF
7365#define NEW_PROC_API 1
7366EOF
7367
7368 ;;
7369 esac
7370fi
7371
7372if test "$ac_cv_header_sys_procfs_h" = yes; then
7373 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7374echo "configure:7375: checking for pstatus_t in sys/procfs.h" >&5
97bf5e38 7375 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
596c9d4b
KB
7376 echo $ac_n "(cached) $ac_c" 1>&6
7377else
7378 cat > conftest.$ac_ext <<EOF
d28f9cdf 7379#line 7380 "configure"
596c9d4b
KB
7380#include "confdefs.h"
7381
7382#define _SYSCALL32
7383#include <sys/procfs.h>
7384int main() {
97bf5e38 7385pstatus_t avar
596c9d4b
KB
7386; return 0; }
7387EOF
d28f9cdf 7388if { (eval echo configure:7389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7389 rm -rf conftest*
97bf5e38 7390 bfd_cv_have_sys_procfs_type_pstatus_t=yes
596c9d4b
KB
7391else
7392 echo "configure: failed program was:" >&5
7393 cat conftest.$ac_ext >&5
7394 rm -rf conftest*
97bf5e38 7395 bfd_cv_have_sys_procfs_type_pstatus_t=no
596c9d4b
KB
7396
7397fi
7398rm -f conftest*
7399fi
7400
97bf5e38 7401 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
596c9d4b 7402 cat >> confdefs.h <<\EOF
97bf5e38 7403#define HAVE_PSTATUS_T 1
596c9d4b
KB
7404EOF
7405
7406 fi
97bf5e38 7407 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
596c9d4b 7408
97bf5e38 7409 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7410echo "configure:7411: checking for prrun_t in sys/procfs.h" >&5
97bf5e38 7411 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
596c9d4b
KB
7412 echo $ac_n "(cached) $ac_c" 1>&6
7413else
7414 cat > conftest.$ac_ext <<EOF
d28f9cdf 7415#line 7416 "configure"
596c9d4b
KB
7416#include "confdefs.h"
7417
7418#define _SYSCALL32
7419#include <sys/procfs.h>
7420int main() {
97bf5e38 7421prrun_t avar
596c9d4b
KB
7422; return 0; }
7423EOF
d28f9cdf 7424if { (eval echo configure:7425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7425 rm -rf conftest*
97bf5e38 7426 bfd_cv_have_sys_procfs_type_prrun_t=yes
596c9d4b
KB
7427else
7428 echo "configure: failed program was:" >&5
7429 cat conftest.$ac_ext >&5
7430 rm -rf conftest*
97bf5e38 7431 bfd_cv_have_sys_procfs_type_prrun_t=no
596c9d4b
KB
7432
7433fi
7434rm -f conftest*
7435fi
7436
97bf5e38 7437 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
596c9d4b 7438 cat >> confdefs.h <<\EOF
97bf5e38 7439#define HAVE_PRRUN_T 1
596c9d4b
KB
7440EOF
7441
7442 fi
97bf5e38 7443 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
596c9d4b 7444
97bf5e38 7445 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7446echo "configure:7447: checking for gregset_t in sys/procfs.h" >&5
97bf5e38 7447 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
596c9d4b
KB
7448 echo $ac_n "(cached) $ac_c" 1>&6
7449else
7450 cat > conftest.$ac_ext <<EOF
d28f9cdf 7451#line 7452 "configure"
596c9d4b
KB
7452#include "confdefs.h"
7453
7454#define _SYSCALL32
7455#include <sys/procfs.h>
7456int main() {
97bf5e38 7457gregset_t avar
596c9d4b
KB
7458; return 0; }
7459EOF
d28f9cdf 7460if { (eval echo configure:7461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b 7461 rm -rf conftest*
97bf5e38 7462 bfd_cv_have_sys_procfs_type_gregset_t=yes
596c9d4b
KB
7463else
7464 echo "configure: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 rm -rf conftest*
97bf5e38 7467 bfd_cv_have_sys_procfs_type_gregset_t=no
596c9d4b
KB
7468
7469fi
7470rm -f conftest*
7471fi
7472
97bf5e38 7473 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
596c9d4b 7474 cat >> confdefs.h <<\EOF
97bf5e38 7475#define HAVE_GREGSET_T 1
596c9d4b
KB
7476EOF
7477
7478 fi
97bf5e38 7479 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
451928c5 7480
97bf5e38 7481 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7482echo "configure:7483: checking for fpregset_t in sys/procfs.h" >&5
97bf5e38 7483 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
d84dd0c5 7484 echo $ac_n "(cached) $ac_c" 1>&6
d84dd0c5
MK
7485else
7486 cat > conftest.$ac_ext <<EOF
d28f9cdf 7487#line 7488 "configure"
d84dd0c5 7488#include "confdefs.h"
97bf5e38
MK
7489
7490#define _SYSCALL32
d84dd0c5 7491#include <sys/procfs.h>
97bf5e38
MK
7492int main() {
7493fpregset_t avar
7494; return 0; }
d84dd0c5 7495EOF
d28f9cdf 7496if { (eval echo configure:7497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7497 rm -rf conftest*
7498 bfd_cv_have_sys_procfs_type_fpregset_t=yes
d84dd0c5
MK
7499else
7500 echo "configure: failed program was:" >&5
7501 cat conftest.$ac_ext >&5
97bf5e38
MK
7502 rm -rf conftest*
7503 bfd_cv_have_sys_procfs_type_fpregset_t=no
7504
d84dd0c5 7505fi
97bf5e38 7506rm -f conftest*
d84dd0c5
MK
7507fi
7508
97bf5e38
MK
7509 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7510 cat >> confdefs.h <<\EOF
7511#define HAVE_FPREGSET_T 1
d84dd0c5
MK
7512EOF
7513
97bf5e38
MK
7514 fi
7515 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
d84dd0c5 7516
97bf5e38 7517 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7518echo "configure:7519: checking for prgregset_t in sys/procfs.h" >&5
97bf5e38 7519 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
c906108c
SS
7520 echo $ac_n "(cached) $ac_c" 1>&6
7521else
7522 cat > conftest.$ac_ext <<EOF
d28f9cdf 7523#line 7524 "configure"
c906108c 7524#include "confdefs.h"
c906108c 7525
97bf5e38
MK
7526#define _SYSCALL32
7527#include <sys/procfs.h>
c906108c 7528int main() {
97bf5e38 7529prgregset_t avar
c906108c
SS
7530; return 0; }
7531EOF
d28f9cdf 7532if { (eval echo configure:7533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7533 rm -rf conftest*
97bf5e38 7534 bfd_cv_have_sys_procfs_type_prgregset_t=yes
c906108c
SS
7535else
7536 echo "configure: failed program was:" >&5
7537 cat conftest.$ac_ext >&5
7538 rm -rf conftest*
97bf5e38
MK
7539 bfd_cv_have_sys_procfs_type_prgregset_t=no
7540
c906108c
SS
7541fi
7542rm -f conftest*
7543fi
7544
97bf5e38
MK
7545 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7546 cat >> confdefs.h <<\EOF
7547#define HAVE_PRGREGSET_T 1
c906108c
SS
7548EOF
7549
97bf5e38
MK
7550 fi
7551 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
c906108c 7552
97bf5e38 7553 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7554echo "configure:7555: checking for prfpregset_t in sys/procfs.h" >&5
97bf5e38 7555 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
d45fe813
KB
7556 echo $ac_n "(cached) $ac_c" 1>&6
7557else
7558 cat > conftest.$ac_ext <<EOF
d28f9cdf 7559#line 7560 "configure"
d45fe813 7560#include "confdefs.h"
97bf5e38
MK
7561
7562#define _SYSCALL32
7563#include <sys/procfs.h>
d45fe813 7564int main() {
97bf5e38 7565prfpregset_t avar
d45fe813
KB
7566; return 0; }
7567EOF
d28f9cdf 7568if { (eval echo configure:7569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7569 rm -rf conftest*
97bf5e38 7570 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
d45fe813
KB
7571else
7572 echo "configure: failed program was:" >&5
7573 cat conftest.$ac_ext >&5
7574 rm -rf conftest*
97bf5e38
MK
7575 bfd_cv_have_sys_procfs_type_prfpregset_t=no
7576
d45fe813
KB
7577fi
7578rm -f conftest*
7579fi
7580
97bf5e38
MK
7581 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7582 cat >> confdefs.h <<\EOF
7583#define HAVE_PRFPREGSET_T 1
d45fe813
KB
7584EOF
7585
97bf5e38
MK
7586 fi
7587 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
d45fe813 7588
97bf5e38 7589 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7590echo "configure:7591: checking for prgregset32_t in sys/procfs.h" >&5
97bf5e38 7591 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
d45fe813
KB
7592 echo $ac_n "(cached) $ac_c" 1>&6
7593else
7594 cat > conftest.$ac_ext <<EOF
d28f9cdf 7595#line 7596 "configure"
d45fe813 7596#include "confdefs.h"
97bf5e38
MK
7597
7598#define _SYSCALL32
7599#include <sys/procfs.h>
d45fe813 7600int main() {
97bf5e38 7601prgregset32_t avar
d45fe813
KB
7602; return 0; }
7603EOF
d28f9cdf 7604if { (eval echo configure:7605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7605 rm -rf conftest*
97bf5e38 7606 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
d45fe813
KB
7607else
7608 echo "configure: failed program was:" >&5
7609 cat conftest.$ac_ext >&5
7610 rm -rf conftest*
97bf5e38
MK
7611 bfd_cv_have_sys_procfs_type_prgregset32_t=no
7612
d45fe813
KB
7613fi
7614rm -f conftest*
7615fi
7616
97bf5e38
MK
7617 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7618 cat >> confdefs.h <<\EOF
7619#define HAVE_PRGREGSET32_T 1
d45fe813
KB
7620EOF
7621
97bf5e38
MK
7622 fi
7623 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
d45fe813 7624
97bf5e38 7625 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7626echo "configure:7627: checking for prfpregset32_t in sys/procfs.h" >&5
97bf5e38 7627 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
d45fe813
KB
7628 echo $ac_n "(cached) $ac_c" 1>&6
7629else
7630 cat > conftest.$ac_ext <<EOF
d28f9cdf 7631#line 7632 "configure"
d45fe813 7632#include "confdefs.h"
97bf5e38
MK
7633
7634#define _SYSCALL32
7635#include <sys/procfs.h>
d45fe813 7636int main() {
97bf5e38 7637prfpregset32_t avar
d45fe813
KB
7638; return 0; }
7639EOF
d28f9cdf 7640if { (eval echo configure:7641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7641 rm -rf conftest*
97bf5e38 7642 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
d45fe813
KB
7643else
7644 echo "configure: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646 rm -rf conftest*
97bf5e38
MK
7647 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7648
d45fe813
KB
7649fi
7650rm -f conftest*
7651fi
7652
97bf5e38
MK
7653 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7654 cat >> confdefs.h <<\EOF
7655#define HAVE_PRFPREGSET32_T 1
d45fe813
KB
7656EOF
7657
97bf5e38
MK
7658 fi
7659 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
d45fe813 7660
97bf5e38 7661 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7662echo "configure:7663: checking for lwpid_t in sys/procfs.h" >&5
97bf5e38 7663 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
d45fe813
KB
7664 echo $ac_n "(cached) $ac_c" 1>&6
7665else
7666 cat > conftest.$ac_ext <<EOF
d28f9cdf 7667#line 7668 "configure"
d45fe813 7668#include "confdefs.h"
97bf5e38 7669
d45fe813 7670#define _SYSCALL32
97bf5e38 7671#include <sys/procfs.h>
d45fe813 7672int main() {
97bf5e38 7673lwpid_t avar
d45fe813
KB
7674; return 0; }
7675EOF
d28f9cdf 7676if { (eval echo configure:7677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813 7677 rm -rf conftest*
97bf5e38 7678 bfd_cv_have_sys_procfs_type_lwpid_t=yes
d45fe813
KB
7679else
7680 echo "configure: failed program was:" >&5
7681 cat conftest.$ac_ext >&5
7682 rm -rf conftest*
97bf5e38
MK
7683 bfd_cv_have_sys_procfs_type_lwpid_t=no
7684
d45fe813
KB
7685fi
7686rm -f conftest*
7687fi
7688
97bf5e38
MK
7689 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7690 cat >> confdefs.h <<\EOF
7691#define HAVE_LWPID_T 1
d45fe813
KB
7692EOF
7693
97bf5e38
MK
7694 fi
7695 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
c906108c 7696
97bf5e38 7697 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7698echo "configure:7699: checking for psaddr_t in sys/procfs.h" >&5
97bf5e38 7699 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
c906108c
SS
7700 echo $ac_n "(cached) $ac_c" 1>&6
7701else
7702 cat > conftest.$ac_ext <<EOF
d28f9cdf 7703#line 7704 "configure"
c906108c
SS
7704#include "confdefs.h"
7705
97bf5e38
MK
7706#define _SYSCALL32
7707#include <sys/procfs.h>
c906108c 7708int main() {
97bf5e38 7709psaddr_t avar
c906108c
SS
7710; return 0; }
7711EOF
d28f9cdf 7712if { (eval echo configure:7713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7713 rm -rf conftest*
97bf5e38 7714 bfd_cv_have_sys_procfs_type_psaddr_t=yes
c906108c
SS
7715else
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 rm -rf conftest*
97bf5e38
MK
7719 bfd_cv_have_sys_procfs_type_psaddr_t=no
7720
c906108c
SS
7721fi
7722rm -f conftest*
7723fi
7724
97bf5e38
MK
7725 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7726 cat >> confdefs.h <<\EOF
7727#define HAVE_PSADDR_T 1
c906108c
SS
7728EOF
7729
97bf5e38
MK
7730 fi
7731 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
c906108c 7732
97bf5e38 7733 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7734echo "configure:7735: checking for prsysent_t in sys/procfs.h" >&5
97bf5e38 7735 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
c906108c 7736 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7737else
7738 cat > conftest.$ac_ext <<EOF
d28f9cdf 7739#line 7740 "configure"
c906108c
SS
7740#include "confdefs.h"
7741
97bf5e38
MK
7742#define _SYSCALL32
7743#include <sys/procfs.h>
7744int main() {
7745prsysent_t avar
7746; return 0; }
c906108c 7747EOF
d28f9cdf 7748if { (eval echo configure:7749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7749 rm -rf conftest*
7750 bfd_cv_have_sys_procfs_type_prsysent_t=yes
c906108c
SS
7751else
7752 echo "configure: failed program was:" >&5
7753 cat conftest.$ac_ext >&5
97bf5e38
MK
7754 rm -rf conftest*
7755 bfd_cv_have_sys_procfs_type_prsysent_t=no
7756
c906108c 7757fi
97bf5e38 7758rm -f conftest*
c906108c
SS
7759fi
7760
97bf5e38
MK
7761 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7762 cat >> confdefs.h <<\EOF
7763#define HAVE_PRSYSENT_T 1
c906108c
SS
7764EOF
7765
97bf5e38
MK
7766 fi
7767 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
c906108c 7768
97bf5e38 7769 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7770echo "configure:7771: checking for pr_sigset_t in sys/procfs.h" >&5
97bf5e38 7771 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
c906108c
SS
7772 echo $ac_n "(cached) $ac_c" 1>&6
7773else
7774 cat > conftest.$ac_ext <<EOF
d28f9cdf 7775#line 7776 "configure"
c906108c
SS
7776#include "confdefs.h"
7777
97bf5e38
MK
7778#define _SYSCALL32
7779#include <sys/procfs.h>
c906108c 7780int main() {
97bf5e38 7781pr_sigset_t avar
c906108c
SS
7782; return 0; }
7783EOF
d28f9cdf 7784if { (eval echo configure:7785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7785 rm -rf conftest*
97bf5e38 7786 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
c906108c
SS
7787else
7788 echo "configure: failed program was:" >&5
7789 cat conftest.$ac_ext >&5
7790 rm -rf conftest*
97bf5e38
MK
7791 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7792
c906108c
SS
7793fi
7794rm -f conftest*
7795fi
7796
97bf5e38
MK
7797 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7798 cat >> confdefs.h <<\EOF
7799#define HAVE_PR_SIGSET_T 1
c906108c
SS
7800EOF
7801
97bf5e38
MK
7802 fi
7803 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
c906108c 7804
97bf5e38 7805 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7806echo "configure:7807: checking for pr_sigaction64_t in sys/procfs.h" >&5
97bf5e38 7807 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
c906108c 7808 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
7809else
7810 cat > conftest.$ac_ext <<EOF
d28f9cdf 7811#line 7812 "configure"
c906108c
SS
7812#include "confdefs.h"
7813
97bf5e38
MK
7814#define _SYSCALL32
7815#include <sys/procfs.h>
7816int main() {
7817pr_sigaction64_t avar
7818; return 0; }
c906108c 7819EOF
d28f9cdf 7820if { (eval echo configure:7821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7821 rm -rf conftest*
7822 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
c906108c
SS
7823else
7824 echo "configure: failed program was:" >&5
7825 cat conftest.$ac_ext >&5
97bf5e38
MK
7826 rm -rf conftest*
7827 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7828
c906108c 7829fi
97bf5e38 7830rm -f conftest*
c906108c
SS
7831fi
7832
97bf5e38
MK
7833 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7834 cat >> confdefs.h <<\EOF
7835#define HAVE_PR_SIGACTION64_T 1
c906108c
SS
7836EOF
7837
97bf5e38
MK
7838 fi
7839 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7840
7841 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7842echo "configure:7843: checking for pr_siginfo64_t in sys/procfs.h" >&5
97bf5e38
MK
7843 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7844 echo $ac_n "(cached) $ac_c" 1>&6
7845else
7846 cat > conftest.$ac_ext <<EOF
d28f9cdf 7847#line 7848 "configure"
97bf5e38
MK
7848#include "confdefs.h"
7849
7850#define _SYSCALL32
7851#include <sys/procfs.h>
7852int main() {
7853pr_siginfo64_t avar
7854; return 0; }
7855EOF
d28f9cdf 7856if { (eval echo configure:7857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
7857 rm -rf conftest*
7858 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7859else
7860 echo "configure: failed program was:" >&5
7861 cat conftest.$ac_ext >&5
7862 rm -rf conftest*
7863 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7864
7865fi
7866rm -f conftest*
c906108c 7867fi
c906108c 7868
97bf5e38
MK
7869 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7870 cat >> confdefs.h <<\EOF
7871#define HAVE_PR_SIGINFO64_T 1
7872EOF
c906108c 7873
97bf5e38
MK
7874 fi
7875 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7876
7877
7878
7879
7880
7881 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7882 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
d28f9cdf 7883echo "configure:7884: checking whether prfpregset_t type is broken" >&5
97bf5e38 7884 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
c906108c
SS
7885 echo $ac_n "(cached) $ac_c" 1>&6
7886else
7887 if test "$cross_compiling" = yes; then
97bf5e38 7888 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7889else
7890 cat > conftest.$ac_ext <<EOF
d28f9cdf 7891#line 7892 "configure"
c906108c 7892#include "confdefs.h"
97bf5e38
MK
7893#include <sys/procfs.h>
7894 int main ()
7895 {
7896 if (sizeof (prfpregset_t) == sizeof (void *))
7897 return 1;
7898 return 0;
7899 }
c906108c 7900EOF
d28f9cdf 7901if { (eval echo configure:7902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 7902then
97bf5e38 7903 gdb_cv_prfpregset_t_broken=no
c906108c
SS
7904else
7905 echo "configure: failed program was:" >&5
7906 cat conftest.$ac_ext >&5
7907 rm -fr conftest*
97bf5e38 7908 gdb_cv_prfpregset_t_broken=yes
c906108c
SS
7909fi
7910rm -fr conftest*
7911fi
7912
7913fi
7914
97bf5e38
MK
7915 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7916 if test $gdb_cv_prfpregset_t_broken = yes; then
7917 cat >> confdefs.h <<\EOF
7918#define PRFPREGSET_T_BROKEN 1
c906108c
SS
7919EOF
7920
97bf5e38
MK
7921 fi
7922 fi
c906108c 7923
97bf5e38
MK
7924
7925 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
d28f9cdf 7926echo "configure:7927: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
97bf5e38 7927 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
c906108c
SS
7928 echo $ac_n "(cached) $ac_c" 1>&6
7929else
7930 cat > conftest.$ac_ext <<EOF
d28f9cdf 7931#line 7932 "configure"
c906108c 7932#include "confdefs.h"
97bf5e38
MK
7933#include <unistd.h>
7934#include <sys/types.h>
7935#include <sys/procfs.h>
7936
7937int main() {
7938
7939 int dummy;;
7940 dummy = ioctl(0, PIOCSET, &dummy);
7941
7942; return 0; }
c906108c 7943EOF
d28f9cdf 7944if { (eval echo configure:7945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7945 rm -rf conftest*
97bf5e38 7946 gdb_cv_have_procfs_piocset=yes
c906108c 7947else
c906108c
SS
7948 echo "configure: failed program was:" >&5
7949 cat conftest.$ac_ext >&5
7950 rm -rf conftest*
97bf5e38 7951 gdb_cv_have_procfs_piocset=no
c906108c
SS
7952fi
7953rm -f conftest*
7954fi
97bf5e38
MK
7955
7956 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7957 if test $gdb_cv_have_procfs_piocset = yes; then
7958 cat >> confdefs.h <<\EOF
7959#define HAVE_PROCFS_PIOCSET 1
c906108c 7960EOF
97bf5e38
MK
7961
7962 fi
c906108c 7963fi
c906108c 7964
97bf5e38
MK
7965if test ${host} = ${target} ; then
7966
7967 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
d28f9cdf 7968echo "configure:7969: checking for member l_addr in struct link_map" >&5
97bf5e38 7969 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
c906108c
SS
7970 echo $ac_n "(cached) $ac_c" 1>&6
7971else
7972 cat > conftest.$ac_ext <<EOF
d28f9cdf 7973#line 7974 "configure"
c906108c 7974#include "confdefs.h"
97bf5e38 7975#include <link.h>
c906108c 7976int main() {
97bf5e38 7977struct link_map lm; (void) lm.l_addr;
c906108c
SS
7978; return 0; }
7979EOF
d28f9cdf 7980if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c 7981 rm -rf conftest*
97bf5e38 7982 gdb_cv_have_struct_link_map_with_l_members=yes
c906108c
SS
7983else
7984 echo "configure: failed program was:" >&5
7985 cat conftest.$ac_ext >&5
7986 rm -rf conftest*
97bf5e38 7987 gdb_cv_have_struct_link_map_with_l_members=no
c906108c
SS
7988fi
7989rm -f conftest*
7990fi
7991
97bf5e38
MK
7992 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7993 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7994 cat >> confdefs.h <<\EOF
7995#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
c906108c 7996EOF
97bf5e38
MK
7997
7998 fi
7999
8000
8001 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
d28f9cdf 8002echo "configure:8003: checking for member lm_addr in struct link_map" >&5
97bf5e38
MK
8003 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8004 echo $ac_n "(cached) $ac_c" 1>&6
c906108c 8005else
97bf5e38 8006 cat > conftest.$ac_ext <<EOF
d28f9cdf 8007#line 8008 "configure"
97bf5e38
MK
8008#include "confdefs.h"
8009#include <sys/types.h>
8010#include <link.h>
8011int main() {
8012struct link_map lm; (void) lm.lm_addr;
8013; return 0; }
8014EOF
d28f9cdf 8015if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8016 rm -rf conftest*
8017 gdb_cv_have_struct_link_map_with_lm_members=yes
8018else
8019 echo "configure: failed program was:" >&5
8020 cat conftest.$ac_ext >&5
8021 rm -rf conftest*
8022 gdb_cv_have_struct_link_map_with_lm_members=no
8023fi
8024rm -f conftest*
c906108c 8025fi
c906108c 8026
97bf5e38
MK
8027 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8028 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8029 cat >> confdefs.h <<\EOF
8030#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8031EOF
8032
8033 fi
8034
8035
8036 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
d28f9cdf 8037echo "configure:8038: checking for member som_addr in struct so_map" >&5
97bf5e38 8038 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
c906108c 8039 echo $ac_n "(cached) $ac_c" 1>&6
c906108c
SS
8040else
8041 cat > conftest.$ac_ext <<EOF
d28f9cdf 8042#line 8043 "configure"
c906108c 8043#include "confdefs.h"
97bf5e38
MK
8044#include <sys/types.h>
8045#ifdef HAVE_NLIST_H
8046#include <nlist.h>
8047#endif
8048#include <link.h>
8049int main() {
8050struct so_map lm; (void) lm.som_addr;
8051; return 0; }
8052EOF
d28f9cdf 8053if { (eval echo configure:8054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8054 rm -rf conftest*
8055 gdb_cv_have_struct_so_map_with_som_members=yes
8056else
8057 echo "configure: failed program was:" >&5
8058 cat conftest.$ac_ext >&5
8059 rm -rf conftest*
8060 gdb_cv_have_struct_so_map_with_som_members=no
8061fi
8062rm -f conftest*
8063fi
c906108c 8064
97bf5e38
MK
8065 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8066 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8067 cat >> confdefs.h <<\EOF
8068#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8069EOF
c906108c 8070
97bf5e38 8071 fi
c906108c 8072
97bf5e38
MK
8073
8074 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
d28f9cdf 8075echo "configure:8076: checking for struct link_map32 in sys/link.h" >&5
97bf5e38
MK
8076 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8077 echo $ac_n "(cached) $ac_c" 1>&6
8078else
8079 cat > conftest.$ac_ext <<EOF
d28f9cdf 8080#line 8081 "configure"
97bf5e38
MK
8081#include "confdefs.h"
8082#define _SYSCALL32
8083#include <sys/link.h>
8084int main() {
8085struct link_map32 l;
8086; return 0; }
8087EOF
d28f9cdf 8088if { (eval echo configure:8089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8089 rm -rf conftest*
8090 gdb_cv_have_struct_link_map32=yes
8091else
8092 echo "configure: failed program was:" >&5
8093 cat conftest.$ac_ext >&5
8094 rm -rf conftest*
8095 gdb_cv_have_struct_link_map32=no
8096fi
8097rm -f conftest*
8098fi
c906108c 8099
97bf5e38
MK
8100 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8101 if test $gdb_cv_have_struct_link_map32 = yes; then
8102 cat >> confdefs.h <<\EOF
8103#define HAVE_STRUCT_LINK_MAP32 1
8104EOF
c906108c 8105
97bf5e38
MK
8106 cat >> confdefs.h <<\EOF
8107#define _SYSCALL32 1
8108EOF
c906108c 8109
97bf5e38
MK
8110 fi
8111fi
c906108c 8112
c906108c 8113
97bf5e38 8114echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
d28f9cdf 8115echo "configure:8116: checking for long long support in compiler" >&5
97bf5e38
MK
8116if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8117 echo $ac_n "(cached) $ac_c" 1>&6
8118else
8119 cat > conftest.$ac_ext <<EOF
d28f9cdf 8120#line 8121 "configure"
97bf5e38 8121#include "confdefs.h"
c906108c 8122
97bf5e38 8123int main() {
c906108c 8124
97bf5e38
MK
8125 extern long long foo;
8126 switch (foo & 2) { case 0: return 1; }
c906108c 8127
97bf5e38
MK
8128; return 0; }
8129EOF
d28f9cdf 8130if { (eval echo configure:8131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8131 rm -rf conftest*
8132 gdb_cv_c_long_long=yes
8133else
8134 echo "configure: failed program was:" >&5
8135 cat conftest.$ac_ext >&5
8136 rm -rf conftest*
8137 gdb_cv_c_long_long=no
8138fi
8139rm -f conftest*
8140fi
c906108c 8141
97bf5e38
MK
8142echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8143if test $gdb_cv_c_long_long = yes; then
8144 cat >> confdefs.h <<\EOF
8145#define CC_HAS_LONG_LONG 1
8146EOF
8147
8148fi
8149
8150
8151echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
d28f9cdf 8152echo "configure:8153: checking for long long support in printf" >&5
97bf5e38
MK
8153if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8154 echo $ac_n "(cached) $ac_c" 1>&6
8155else
8156 if test "$cross_compiling" = yes; then
8157 gdb_cv_printf_has_long_long=no
8158else
8159 cat > conftest.$ac_ext <<EOF
d28f9cdf 8160#line 8161 "configure"
97bf5e38
MK
8161#include "confdefs.h"
8162
8163int main () {
8164 char buf[32];
8165 long long l = 0;
8166 l = (l << 16) + 0x0123;
8167 l = (l << 16) + 0x4567;
8168 l = (l << 16) + 0x89ab;
8169 l = (l << 16) + 0xcdef;
8170 sprintf (buf, "0x%016llx", l);
8171 return (strcmp ("0x0123456789abcdef", buf));
c906108c 8172}
97bf5e38 8173EOF
d28f9cdf 8174if { (eval echo configure:8175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8175then
8176 gdb_cv_printf_has_long_long=yes
8177else
8178 echo "configure: failed program was:" >&5
8179 cat conftest.$ac_ext >&5
8180 rm -fr conftest*
8181 gdb_cv_printf_has_long_long=no
8182fi
8183rm -fr conftest*
8184fi
8185
8186fi
8187
8188if test $gdb_cv_printf_has_long_long = yes; then
8189 cat >> confdefs.h <<\EOF
8190#define PRINTF_HAS_LONG_LONG 1
8191EOF
8192
8193fi
8194echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8195
8196
8197echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
d28f9cdf 8198echo "configure:8199: checking for long double support in compiler" >&5
97bf5e38
MK
8199if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8200 echo $ac_n "(cached) $ac_c" 1>&6
8201else
8202 cat > conftest.$ac_ext <<EOF
d28f9cdf 8203#line 8204 "configure"
97bf5e38
MK
8204#include "confdefs.h"
8205
8206int main() {
8207long double foo;
8208; return 0; }
8209EOF
d28f9cdf 8210if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
97bf5e38
MK
8211 rm -rf conftest*
8212 ac_cv_c_long_double=yes
8213else
8214 echo "configure: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 rm -rf conftest*
8217 ac_cv_c_long_double=no
8218fi
8219rm -f conftest*
8220fi
c906108c 8221
97bf5e38
MK
8222echo "$ac_t""$ac_cv_c_long_double" 1>&6
8223if test $ac_cv_c_long_double = yes; then
8224 cat >> confdefs.h <<\EOF
8225#define HAVE_LONG_DOUBLE 1
c906108c 8226EOF
97bf5e38
MK
8227
8228fi
8229
8230
8231echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
d28f9cdf 8232echo "configure:8233: checking for long double support in printf" >&5
97bf5e38
MK
8233if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8234 echo $ac_n "(cached) $ac_c" 1>&6
8235else
8236 if test "$cross_compiling" = yes; then
8237 gdb_cv_printf_has_long_double=no
8238else
8239 cat > conftest.$ac_ext <<EOF
d28f9cdf 8240#line 8241 "configure"
97bf5e38
MK
8241#include "confdefs.h"
8242
8243int main () {
8244 char buf[16];
8245 long double f = 3.141592653;
8246 sprintf (buf, "%Lg", f);
8247 return (strncmp ("3.14159", buf, 7));
8248}
8249EOF
d28f9cdf 8250if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c 8251then
97bf5e38 8252 gdb_cv_printf_has_long_double=yes
c906108c
SS
8253else
8254 echo "configure: failed program was:" >&5
8255 cat conftest.$ac_ext >&5
8256 rm -fr conftest*
97bf5e38 8257 gdb_cv_printf_has_long_double=no
c906108c
SS
8258fi
8259rm -fr conftest*
8260fi
8261
8262fi
8263
97bf5e38 8264if test $gdb_cv_printf_has_long_double = yes; then
c906108c 8265 cat >> confdefs.h <<\EOF
97bf5e38
MK
8266#define PRINTF_HAS_LONG_DOUBLE 1
8267EOF
8268
8269fi
8270echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8271
8272
8273echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
d28f9cdf 8274echo "configure:8275: checking for long double support in scanf" >&5
97bf5e38
MK
8275if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8276 echo $ac_n "(cached) $ac_c" 1>&6
8277else
8278 if test "$cross_compiling" = yes; then
8279 gdb_cv_scanf_has_long_double=no
8280else
8281 cat > conftest.$ac_ext <<EOF
d28f9cdf 8282#line 8283 "configure"
97bf5e38
MK
8283#include "confdefs.h"
8284
8285int main () {
8286 char *buf = "3.141592653";
8287 long double f = 0;
8288 sscanf (buf, "%Lg", &f);
8289 return !(f > 3.14159 && f < 3.14160);
8290}
c906108c 8291EOF
d28f9cdf 8292if { (eval echo configure:8293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
97bf5e38
MK
8293then
8294 gdb_cv_scanf_has_long_double=yes
8295else
8296 echo "configure: failed program was:" >&5
8297 cat conftest.$ac_ext >&5
8298 rm -fr conftest*
8299 gdb_cv_scanf_has_long_double=no
8300fi
8301rm -fr conftest*
8302fi
c906108c
SS
8303
8304fi
8305
97bf5e38
MK
8306if test $gdb_cv_scanf_has_long_double = yes; then
8307 cat >> confdefs.h <<\EOF
8308#define SCANF_HAS_LONG_DOUBLE 1
8309EOF
8310
8311fi
8312echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
c906108c 8313
438013df
AO
8314case ${host_os} in
8315aix*)
8316 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
d28f9cdf 8317echo "configure:8318: checking for -bbigtoc option" >&5
438013df
AO
8318if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8319 echo $ac_n "(cached) $ac_c" 1>&6
8320else
8321
8322 SAVE_LDFLAGS=$LDFLAGS
8323
8324 case $GCC in
8325 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8326 *) gdb_cv_bigtoc=-bbigtoc ;;
8327 esac
8328
8329 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8330 cat > conftest.$ac_ext <<EOF
d28f9cdf 8331#line 8332 "configure"
438013df
AO
8332#include "confdefs.h"
8333
8334int main() {
8335int i;
8336; return 0; }
8337EOF
d28f9cdf 8338if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
8339 :
8340else
8341 echo "configure: failed program was:" >&5
8342 cat conftest.$ac_ext >&5
8343 rm -rf conftest*
8344 gdb_cv_bigtoc=
8345fi
8346rm -f conftest*
8347
8348fi
8349
8350echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8351 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8352 ;;
8353esac
8354
c906108c
SS
8355
8356
8357if test ${build} = ${host} -a ${host} = ${target} ; then
8358 case ${host_os} in
8359 hpux*)
8360 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
d28f9cdf 8361echo "configure:8362: checking for HPUX/OSF thread support" >&5
c906108c
SS
8362 if test -f /usr/include/dce/cma_config.h ; then
8363 if test "$GCC" = "yes" ; then
8364 echo "$ac_t""yes" 1>&6
8365 cat >> confdefs.h <<\EOF
8366#define HAVE_HPUX_THREAD_SUPPORT 1
8367EOF
8368
66b965bb 8369 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
8370 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8371 else
8372 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8373 fi
8374 else
8375 echo "$ac_t""no" 1>&6
8376 fi
8377 ;;
8378 solaris*)
d92419e5
JB
8379 # See if thread_db library is around for Solaris thread debugging.
8380 # Note that we must explicitly test for version 1 of the library
8381 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8382 # the same API.
c906108c 8383 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
d28f9cdf 8384echo "configure:8385: checking for Solaris thread debugging library" >&5
c906108c
SS
8385 if test -f /usr/lib/libthread_db.so.1 ; then
8386 echo "$ac_t""yes" 1>&6
8387 cat >> confdefs.h <<\EOF
8388#define HAVE_THREAD_DB_LIB 1
8389EOF
8390
66b965bb 8391 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
8392 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8393 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
d28f9cdf 8394echo "configure:8395: checking for dlopen in -ldl" >&5
c906108c
SS
8395ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8396if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8397 echo $ac_n "(cached) $ac_c" 1>&6
8398else
8399 ac_save_LIBS="$LIBS"
8400LIBS="-ldl $LIBS"
8401cat > conftest.$ac_ext <<EOF
d28f9cdf 8402#line 8403 "configure"
c906108c
SS
8403#include "confdefs.h"
8404/* Override any gcc2 internal prototype to avoid an error. */
8405/* We use char because int might match the return type of a gcc2
8406 builtin and then its argument prototype would still apply. */
8407char dlopen();
8408
8409int main() {
8410dlopen()
8411; return 0; }
8412EOF
d28f9cdf 8413if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8414 rm -rf conftest*
8415 eval "ac_cv_lib_$ac_lib_var=yes"
8416else
8417 echo "configure: failed program was:" >&5
8418 cat conftest.$ac_ext >&5
8419 rm -rf conftest*
8420 eval "ac_cv_lib_$ac_lib_var=no"
8421fi
8422rm -f conftest*
8423LIBS="$ac_save_LIBS"
8424
8425fi
8426if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8427 echo "$ac_t""yes" 1>&6
8428 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8429 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8430 cat >> confdefs.h <<EOF
8431#define $ac_tr_lib 1
8432EOF
8433
8434 LIBS="-ldl $LIBS"
8435
8436else
8437 echo "$ac_t""no" 1>&6
8438fi
8439
8440 if test "$GCC" = "yes" ; then
8441 # The GNU linker requires the -export-dynamic option to make
8442 # all symbols visible in the dynamic symbol table.
8443 hold_ldflags=$LDFLAGS
8444 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
d28f9cdf 8445echo "configure:8446: checking for the ld -export-dynamic flag" >&5
c906108c
SS
8446 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8447 cat > conftest.$ac_ext <<EOF
d28f9cdf 8448#line 8449 "configure"
c906108c
SS
8449#include "confdefs.h"
8450
8451int main() {
8452int i;
8453; return 0; }
8454EOF
d28f9cdf 8455if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8456 rm -rf conftest*
8457 found=yes
8458else
8459 echo "configure: failed program was:" >&5
8460 cat conftest.$ac_ext >&5
8461 rm -rf conftest*
8462 found=no
8463fi
8464rm -f conftest*
8465 LDFLAGS=$hold_ldflags
8466 echo "$ac_t""$found" 1>&6
8467 if test $found = yes; then
8468 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8469 fi
8470 fi
8471 # Sun randomly tweaked the prototypes in <proc_service.h>
8472 # at one point.
8473 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
d28f9cdf 8474echo "configure:8475: checking if <proc_service.h> is old" >&5
c906108c
SS
8475 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8476 echo $ac_n "(cached) $ac_c" 1>&6
8477else
8478
8479 cat > conftest.$ac_ext <<EOF
d28f9cdf 8480#line 8481 "configure"
c906108c
SS
8481#include "confdefs.h"
8482
8483 #include <proc_service.h>
8484 ps_err_e ps_pdwrite
8485 (struct ps_prochandle*, psaddr_t, const void*, size_t);
8486
8487int main() {
8488
8489; return 0; }
8490EOF
d28f9cdf 8491if { (eval echo configure:8492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8492 rm -rf conftest*
8493 gdb_cv_proc_service_is_old=no
8494else
8495 echo "configure: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8497 rm -rf conftest*
8498 gdb_cv_proc_service_is_old=yes
8499fi
8500rm -f conftest*
8501
8502fi
8503
8504 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8505 if test $gdb_cv_proc_service_is_old = yes; then
8506 cat >> confdefs.h <<\EOF
8507#define PROC_SERVICE_IS_OLD 1
8508EOF
8509
8510 fi
8511 else
8512 echo "$ac_t""no" 1>&6
8513 fi
8514 ;;
d92419e5
JB
8515 aix*)
8516 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
d28f9cdf 8517echo "configure:8518: checking for AiX thread debugging library" >&5
d92419e5
JB
8518 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8519 echo $ac_n "(cached) $ac_c" 1>&6
8520else
8521 cat > conftest.$ac_ext <<EOF
d28f9cdf 8522#line 8523 "configure"
d92419e5
JB
8523#include "confdefs.h"
8524#include <sys/pthdebug.h>
8525int main() {
8526#ifndef PTHDB_VERSION_3
8527 #error
8528 #endif
8529; return 0; }
8530EOF
d28f9cdf 8531if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
8532 rm -rf conftest*
8533 gdb_cv_have_aix_thread_debug=yes
8534else
8535 echo "configure: failed program was:" >&5
8536 cat conftest.$ac_ext >&5
8537 rm -rf conftest*
8538 gdb_cv_have_aix_thread_debug=no
8539fi
8540rm -f conftest*
8541fi
8542
8543 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8544 if test $gdb_cv_have_aix_thread_debug = yes; then
8545 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8546 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8547 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8548 fi
8549 ;;
c906108c
SS
8550 esac
8551
8552fi
8553
3f47be5c
EZ
8554if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8555 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
d28f9cdf 8556echo "configure:8557: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
8557if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8558 echo $ac_n "(cached) $ac_c" 1>&6
8559else
8560 cat > conftest.$ac_ext <<EOF
d28f9cdf 8561#line 8562 "configure"
3f47be5c
EZ
8562#include "confdefs.h"
8563#include <thread_db.h>
8564int main() {
8565int i = TD_NOTALLOC;
8566; return 0; }
8567EOF
d28f9cdf 8568if { (eval echo configure:8569: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
8569 rm -rf conftest*
8570 gdb_cv_thread_db_h_has_td_notalloc=yes
8571else
8572 echo "configure: failed program was:" >&5
8573 cat conftest.$ac_ext >&5
8574 rm -rf conftest*
8575 gdb_cv_thread_db_h_has_td_notalloc=no
8576
8577fi
8578rm -f conftest*
8579
8580fi
8581
8582echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8583fi
8584if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8585 cat >> confdefs.h <<\EOF
8586#define THREAD_DB_HAS_TD_NOTALLOC 1
8587EOF
8588
8589fi
8590
fb40c209 8591
030292b7
DJ
8592# Check whether --with-sysroot or --without-sysroot was given.
8593if test "${with_sysroot+set}" = set; then
8594 withval="$with_sysroot"
8595
8596 case ${with_sysroot} in
8597 yes) { echo "configure: error: with-sysroot must specify path" 1>&2; exit 1; } ;;
8598 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
8599 esac
8600
8601 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
8602
8603 if test "x$exec_prefix" = xNONE; then
8604 if test "x$prefix" = xNONE; then
8605 test_prefix=/usr/local
8606 else
8607 test_prefix=$prefix
8608 fi
8609 else
8610 test_prefix=$exec_prefix
8611 fi
8612 case ${TARGET_SYSTEM_ROOT} in
8613 ${test_prefix}*)
8614 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
8615 TARGET_SYSTEM_ROOT_DEFINE="$t"
8616 ;;
8617 esac
8618
8619else
8620
8621 TARGET_SYSTEM_ROOT=
8622 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
8623
8624fi
8625
8626
8627
8628
3b851bce
AC
8629# NOTE: Don't add -Wall or -Wunused, they both include
8630# -Wunused-parameter which reports bogus warnings.
8631# NOTE: If you add to this list, remember to update
8632# gdb/doc/gdbint.texinfo.
1decb323 8633build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 8634-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
8635# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8636# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 8637# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
8638# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8639# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8640# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
8641# Check whether --enable-build-warnings or --disable-build-warnings was given.
8642if test "${enable_build_warnings+set}" = set; then
8643 enableval="$enable_build_warnings"
1decb323 8644 case "${enableval}" in
c906108c
SS
8645 yes) ;;
8646 no) build_warnings="-w";;
8647 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8648 build_warnings="${build_warnings} ${t}";;
8649 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8650 build_warnings="${t} ${build_warnings}";;
8651 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8652esac
d4f3574e 8653if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 8654 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 8655fi
1decb323 8656fi
3b851bce
AC
8657# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8658if test "${enable_gdb_build_warnings+set}" = set; then
8659 enableval="$enable_gdb_build_warnings"
8660 case "${enableval}" in
8661 yes) ;;
8662 no) build_warnings="-w";;
8663 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8664 build_warnings="${build_warnings} ${t}";;
8665 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
8666 build_warnings="${t} ${build_warnings}";;
8667 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8668esac
8669if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8670 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8671fi
8672fi
104c1213
JM
8673WARN_CFLAGS=""
8674WERROR_CFLAGS=""
c906108c
SS
8675if test "x${build_warnings}" != x -a "x$GCC" = xyes
8676then
746a987d 8677 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
d28f9cdf 8678echo "configure:8679: checking compiler warning flags" >&5
746a987d
AC
8679 # Separate out the -Werror flag as some files just cannot be
8680 # compiled with it enabled.
8681 for w in ${build_warnings}; do
8682 case $w in
8683 -Werr*) WERROR_CFLAGS=-Werror ;;
8684 *) # Check that GCC accepts it
4536bbc6
AC
8685 saved_CFLAGS="$CFLAGS"
8686 CFLAGS="$CFLAGS $w"
8687 cat > conftest.$ac_ext <<EOF
d28f9cdf 8688#line 8689 "configure"
4536bbc6
AC
8689#include "confdefs.h"
8690
8691int main() {
8692
8693; return 0; }
8694EOF
d28f9cdf 8695if { (eval echo configure:8696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
8696 rm -rf conftest*
8697 WARN_CFLAGS="${WARN_CFLAGS} $w"
8698else
8699 echo "configure: failed program was:" >&5
8700 cat conftest.$ac_ext >&5
8701fi
8702rm -f conftest*
8703 CFLAGS="$saved_CFLAGS"
746a987d
AC
8704 esac
8705 done
8706 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
8707fi
8708
8709
104c1213 8710
c906108c
SS
8711MMALLOC_CFLAGS=
8712MMALLOC=
8713
8714
8715
8716# Check whether --with-mmalloc or --without-mmalloc was given.
8717if test "${with_mmalloc+set}" = set; then
8718 withval="$with_mmalloc"
8719 case "${withval}" in
8720 yes) want_mmalloc=true ;;
8721 no) want_mmalloc=false;;
8722 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8723esac
8724else
8725 want_mmalloc=false
8726fi
8727
8728if test x$want_mmalloc = xtrue; then
8729 cat >> confdefs.h <<\EOF
8730#define USE_MMALLOC 1
8731EOF
8732
8733 cat >> confdefs.h <<\EOF
8734#define MMCHECK_FORCE 1
8735EOF
8736
8737 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8738 MMALLOC='../mmalloc/libmmalloc.a'
8739fi
8740
7a292a7a
SS
8741# In the Cygwin environment, we need some additional flags.
8742echo $ac_n "checking for cygwin""... $ac_c" 1>&6
d28f9cdf 8743echo "configure:8744: checking for cygwin" >&5
7a292a7a
SS
8744if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8745 echo $ac_n "(cached) $ac_c" 1>&6
8746else
8747 cat > conftest.$ac_ext <<EOF
d28f9cdf 8748#line 8749 "configure"
7a292a7a
SS
8749#include "confdefs.h"
8750
8751#if defined (__CYGWIN__) || defined (__CYGWIN32__)
8752lose
8753#endif
8754EOF
8755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8756 egrep "lose" >/dev/null 2>&1; then
8757 rm -rf conftest*
8758 gdb_cv_os_cygwin=yes
8759else
8760 rm -rf conftest*
8761 gdb_cv_os_cygwin=no
8762fi
8763rm -f conftest*
8764
8765fi
8766
8767echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8768
aff38e61
AC
8769
8770SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8771case ${host} in
95cbc983
AC
8772 *go32* ) SER_HARDWIRE=ser-go32.o ;;
8773 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
8774esac
8775
8776
cd0fc7c3
SS
8777# libreadline needs libuser32.a in a cygwin environment
8778WIN32LIBS=
8779if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
8780 WIN32LIBS="-luser32"
8781 case "${target}" in
8782 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8783 ;;
8784 esac
cd0fc7c3 8785fi
c906108c 8786
7a292a7a 8787
3fc11d3e
JM
8788LIBGUI="../libgui/src/libgui.a"
8789GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8790
8791
7a292a7a 8792
3fc11d3e
JM
8793WIN32LDAPP=
8794
8795
8796
8797configdir="unix"
8798
8799GDBTKLIBS=
8800if test "${enable_gdbtk}" = "yes"; then
8801
d1c3b63a
KS
8802 # Gdbtk must have an absolute path to srcdir in order to run
8803 # properly when not installed.
8804 here=`pwd`
8805 cd ${srcdir}
8806 GDBTK_SRC_DIR=`pwd`
8807 cd $here
8808
3fc11d3e
JM
8809
8810#
8811# Ok, lets find the tcl configuration
8812# First, look for one uninstalled.
8813# the alternative search directory is invoked by --with-tclconfig
8814#
8815
8816if test x"${no_tcl}" = x ; then
8817 # we reset no_tcl in case something fails here
8818 no_tcl=true
8819 # Check whether --with-tclconfig or --without-tclconfig was given.
8820if test "${with_tclconfig+set}" = set; then
8821 withval="$with_tclconfig"
8822 with_tclconfig=${withval}
8823fi
8824
8825 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
d28f9cdf 8826echo "configure:8827: checking for Tcl configuration" >&5
3fc11d3e
JM
8827 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8828 echo $ac_n "(cached) $ac_c" 1>&6
8829else
8830
8831
8832 # First check to see if --with-tclconfig was specified.
8833 if test x"${with_tclconfig}" != x ; then
8834 if test -f "${with_tclconfig}/tclConfig.sh" ; then
8835 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8836 else
8837 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8838 fi
8839 fi
8840
8841 # then check for a private Tcl installation
8842 if test x"${ac_cv_c_tclconfig}" = x ; then
8843 for i in \
8844 ../tcl \
8845 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8846 ../../tcl \
8847 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8848 ../../../tcl \
8849 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8850 if test -f "$i/${configdir}/tclConfig.sh" ; then
8851 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8852 break
8853 fi
8854 done
8855 fi
8856 # check in a few common install locations
8857 if test x"${ac_cv_c_tclconfig}" = x ; then
8858 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8859 if test -f "$i/tclConfig.sh" ; then
8860 ac_cv_c_tclconfig=`(cd $i; pwd)`
8861 break
8862 fi
8863 done
8864 fi
8865 # check in a few other private locations
8866 if test x"${ac_cv_c_tclconfig}" = x ; then
8867 for i in \
8868 ${srcdir}/../tcl \
8869 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8870 if test -f "$i/${configdir}/tclConfig.sh" ; then
8871 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8872 break
8873 fi
8874 done
8875 fi
8876
8877fi
8878
8879 if test x"${ac_cv_c_tclconfig}" = x ; then
8880 TCLCONFIG="# no Tcl configs found"
8881 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8882 else
8883 no_tcl=
8884 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8885 echo "$ac_t""found $TCLCONFIG" 1>&6
8886 fi
8887fi
8888
8889 if test -z "${no_tcl}"; then
8890
8891 . $TCLCONFIG
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918#
8919# Ok, lets find the tk configuration
8920# First, look for one uninstalled.
8921# the alternative search directory is invoked by --with-tkconfig
8922#
8923
8924if test x"${no_tk}" = x ; then
8925 # we reset no_tk in case something fails here
8926 no_tk=true
8927 # Check whether --with-tkconfig or --without-tkconfig was given.
8928if test "${with_tkconfig+set}" = set; then
8929 withval="$with_tkconfig"
8930 with_tkconfig=${withval}
8931fi
8932
8933 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
d28f9cdf 8934echo "configure:8935: checking for Tk configuration" >&5
3fc11d3e
JM
8935 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8936 echo $ac_n "(cached) $ac_c" 1>&6
8937else
8938
8939
8940 # First check to see if --with-tkconfig was specified.
8941 if test x"${with_tkconfig}" != x ; then
8942 if test -f "${with_tkconfig}/tkConfig.sh" ; then
8943 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8944 else
8945 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8946 fi
8947 fi
8948
8949 # then check for a private Tk library
8950 if test x"${ac_cv_c_tkconfig}" = x ; then
8951 for i in \
8952 ../tk \
8953 `ls -dr ../tk[4-9]* 2>/dev/null` \
8954 ../../tk \
8955 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8956 ../../../tk \
8957 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8958 if test -f "$i/${configdir}/tkConfig.sh" ; then
8959 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8960 break
8961 fi
8962 done
8963 fi
8964 # check in a few common install locations
8965 if test x"${ac_cv_c_tkconfig}" = x ; then
8966 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8967 if test -f "$i/tkConfig.sh" ; then
8968 ac_cv_c_tkconfig=`(cd $i; pwd)`
8969 break
8970 fi
8971 done
8972 fi
8973 # check in a few other private locations
8974 if test x"${ac_cv_c_tkconfig}" = x ; then
8975 for i in \
8976 ${srcdir}/../tk \
8977 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8978 if test -f "$i/${configdir}/tkConfig.sh" ; then
8979 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8980 break
8981 fi
8982 done
8983 fi
8984
8985fi
8986
8987 if test x"${ac_cv_c_tkconfig}" = x ; then
8988 TKCONFIG="# no Tk configs found"
8989 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8990 else
8991 no_tk=
8992 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8993 echo "$ac_t""found $TKCONFIG" 1>&6
8994 fi
8995fi
8996
8997
8998
dd2504ab
JM
8999 # now look for Tcl library stuff
9000
9001 case "${host}" in
9002 *-*-cygwin*)
9003 tcldir=../tcl/win/
9004 ;;
9005 *)
9006 tcldir=../tcl/unix/
9007 ;;
9008 esac
9009
9010 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9011
3fc11d3e
JM
9012 # If $no_tk is nonempty, then we can't do Tk, and there is no
9013 # point to doing Tcl.
9014 if test -z "${no_tk}"; then
9015
9016 if test -f "$TKCONFIG" ; then
9017 . $TKCONFIG
9018 fi
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033#
9034# Ok, lets find the tcl source trees so we can use the headers
9035# Warning: transition of version 9 to 10 will break this algorithm
9036# because 10 sorts before 9. We also look for just tcl. We have to
9037# be careful that we don't match stuff like tclX by accident.
9038# the alternative search directory is involked by --with-tclinclude
9039#
9040
9041no_tcl=true
9042echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
d28f9cdf 9043echo "configure:9044: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
9044# Check whether --with-tclinclude or --without-tclinclude was given.
9045if test "${with_tclinclude+set}" = set; then
9046 withval="$with_tclinclude"
9047 with_tclinclude=${withval}
9048fi
9049
9050if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9051 echo $ac_n "(cached) $ac_c" 1>&6
9052else
9053
9054# first check to see if --with-tclinclude was specified
9055if test x"${with_tclinclude}" != x ; then
9056 if test -f ${with_tclinclude}/tclInt.h ; then
9057 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9058 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9059 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9060 else
9061 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9062 fi
9063fi
9064
9065# next check if it came with Tcl configuration file
9066if test x"${ac_cv_c_tclconfig}" = x ; then
9067 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9068 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9069 fi
9070fi
9071
9072# next check in private source directory
9073#
9074# since ls returns lowest version numbers first, reverse its output
9075if test x"${ac_cv_c_tclh}" = x ; then
9076 for i in \
9077 ${srcdir}/../tcl \
9078 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9079 ${srcdir}/../../tcl \
9080 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9081 ${srcdir}/../../../tcl \
9082 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9083 if test -f $i/generic/tclInt.h ; then
9084 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9085 break
9086 fi
9087 done
9088fi
9089# finally check in a few common install locations
9090#
9091# since ls returns lowest version numbers first, reverse its output
9092if test x"${ac_cv_c_tclh}" = x ; then
9093 for i in \
9094 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9095 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9096 /usr/local/src/tcl \
9097 /usr/local/lib/tcl \
9098 ${prefix}/include ; do
9099 if test -f $i/generic/tclInt.h ; then
9100 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9101 break
9102 fi
9103 done
9104fi
9105# see if one is installed
9106if test x"${ac_cv_c_tclh}" = x ; then
9107 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9108echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
d28f9cdf 9109echo "configure:9110: checking for tclInt.h" >&5
3fc11d3e
JM
9110if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9111 echo $ac_n "(cached) $ac_c" 1>&6
9112else
9113 cat > conftest.$ac_ext <<EOF
d28f9cdf 9114#line 9115 "configure"
3fc11d3e
JM
9115#include "confdefs.h"
9116#include <tclInt.h>
9117EOF
9118ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 9119{ (eval echo configure:9120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9120ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9121if test -z "$ac_err"; then
9122 rm -rf conftest*
9123 eval "ac_cv_header_$ac_safe=yes"
9124else
9125 echo "$ac_err" >&5
9126 echo "configure: failed program was:" >&5
9127 cat conftest.$ac_ext >&5
9128 rm -rf conftest*
9129 eval "ac_cv_header_$ac_safe=no"
9130fi
9131rm -f conftest*
9132fi
9133if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9134 echo "$ac_t""yes" 1>&6
9135 ac_cv_c_tclh=installed
9136else
9137 echo "$ac_t""no" 1>&6
9138ac_cv_c_tclh=""
9139fi
9140
9141fi
9142
9143fi
9144
9145if test x"${ac_cv_c_tclh}" = x ; then
9146 TCLHDIR="# no Tcl private headers found"
9147 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9148fi
9149if test x"${ac_cv_c_tclh}" != x ; then
9150 no_tcl=""
9151 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9152 echo "$ac_t""is installed" 1>&6
9153 TCLHDIR=""
9154 else
9155 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9156 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9157 TCLHDIR="-I${ac_cv_c_tclh}"
9158 fi
9159fi
9160
9161
9162
9163
9164#
9165# Ok, lets find the tk source trees so we can use the headers
9166# If the directory (presumably symlink) named "tk" exists, use that one
9167# in preference to any others. Same logic is used when choosing library
9168# and again with Tcl. The search order is the best place to look first, then in
9169# decreasing significance. The loop breaks if the trigger file is found.
9170# Note the gross little conversion here of srcdir by cd'ing to the found
9171# directory. This converts the path from a relative to an absolute, so
9172# recursive cache variables for the path will work right. We check all
9173# the possible paths in one loop rather than many seperate loops to speed
9174# things up.
9175# the alternative search directory is involked by --with-tkinclude
9176#
9177no_tk=true
9178echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
d28f9cdf 9179echo "configure:9180: checking for Tk private headers" >&5
3fc11d3e
JM
9180# Check whether --with-tkinclude or --without-tkinclude was given.
9181if test "${with_tkinclude+set}" = set; then
9182 withval="$with_tkinclude"
9183 with_tkinclude=${withval}
9184fi
9185
9186if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9187 echo $ac_n "(cached) $ac_c" 1>&6
9188else
9189
9190# first check to see if --with-tkinclude was specified
9191if test x"${with_tkinclude}" != x ; then
9192 if test -f ${with_tkinclude}/tk.h ; then
9193 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9194 elif test -f ${with_tkinclude}/generic/tk.h ; then
9195 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9196 else
9197 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9198 fi
9199fi
9200
9201# next check if it came with Tk configuration file
9202if test x"${ac_cv_c_tkconfig}" = x ; then
9203 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9204 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9205 fi
9206fi
9207
9208# next check in private source directory
9209#
9210# since ls returns lowest version numbers first, reverse its output
9211if test x"${ac_cv_c_tkh}" = x ; then
9212 for i in \
9213 ${srcdir}/../tk \
9214 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9215 ${srcdir}/../../tk \
9216 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9217 ${srcdir}/../../../tk \
9218 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9219 if test -f $i/generic/tk.h ; then
9220 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9221 break
9222 fi
9223 done
9224fi
9225# finally check in a few common install locations
9226#
9227# since ls returns lowest version numbers first, reverse its output
9228if test x"${ac_cv_c_tkh}" = x ; then
9229 for i in \
9230 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9231 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9232 /usr/local/src/tk \
9233 /usr/local/lib/tk \
9234 ${prefix}/include ; do
9235 if test -f $i/generic/tk.h ; then
9236 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9237 break
9238 fi
9239 done
9240fi
9241# see if one is installed
9242if test x"${ac_cv_c_tkh}" = x ; then
9243 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9244echo $ac_n "checking for tk.h""... $ac_c" 1>&6
d28f9cdf 9245echo "configure:9246: checking for tk.h" >&5
3fc11d3e
JM
9246if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9247 echo $ac_n "(cached) $ac_c" 1>&6
9248else
9249 cat > conftest.$ac_ext <<EOF
d28f9cdf 9250#line 9251 "configure"
3fc11d3e
JM
9251#include "confdefs.h"
9252#include <tk.h>
9253EOF
9254ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 9255{ (eval echo configure:9256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
9256ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9257if test -z "$ac_err"; then
9258 rm -rf conftest*
9259 eval "ac_cv_header_$ac_safe=yes"
9260else
9261 echo "$ac_err" >&5
9262 echo "configure: failed program was:" >&5
9263 cat conftest.$ac_ext >&5
9264 rm -rf conftest*
9265 eval "ac_cv_header_$ac_safe=no"
9266fi
9267rm -f conftest*
9268fi
9269if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9270 echo "$ac_t""yes" 1>&6
9271 ac_cv_c_tkh=installed
9272else
9273 echo "$ac_t""no" 1>&6
9274ac_cv_c_tkh=""
9275fi
9276
9277fi
9278
9279fi
9280
9281if test x"${ac_cv_c_tkh}" != x ; then
9282 no_tk=""
9283 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9284 echo "$ac_t""is installed" 1>&6
9285 TKHDIR=""
9286 else
9287 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9288 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9289 TKHDIR="-I${ac_cv_c_tkh}"
9290 fi
9291else
9292 TKHDIR="# no Tk directory found"
9293 echo "configure: warning: Can't find Tk private headers" 1>&2
9294 no_tk=true
9295fi
9296
9297
9298
9299
9300echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d28f9cdf 9301echo "configure:9302: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9302if test x"${ac_cv_c_itclh}" = x ; then
9303 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9304 if test -f $i/generic/itcl.h ; then
9305 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9306 break
9307 fi
9308 done
9309fi
9310if test x"${ac_cv_c_itclh}" = x ; then
9311 ITCLHDIR="# no Itcl private headers found"
9312 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9313fi
9314if test x"${ac_cv_c_itclh}" != x ; then
9315 ITCLHDIR="-I${ac_cv_c_itclh}"
9316fi
9317# should always be here
9318# ITCLLIB="../itcl/itcl/unix/libitcl.a"
9319
9320#AC_SUBST(ITCLLIB)
9321
9322
9323echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
d28f9cdf 9324echo "configure:9325: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
9325if test x"${ac_cv_c_itkh}" = x ; then
9326 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9327 if test -f $i/generic/itk.h ; then
9328 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9329 break
9330 fi
9331 done
9332fi
9333if test x"${ac_cv_c_itkh}" = x ; then
9334 ITKHDIR="# no Itk private headers found"
9335 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9336fi
9337if test x"${ac_cv_c_itkh}" != x ; then
9338 ITKHDIR="-I${ac_cv_c_itkh}"
9339fi
9340# should always be here
9341# ITKLIB="../itcl/itk/unix/libitk.a"
9342
9343#AC_SUBST(ITKLIB)
9344
3fc11d3e 9345
dd2504ab
JM
9346
9347 # now look for Tk library stuff
9348
9349 case "${host}" in
9350 *-*-cygwin*)
9351 tkdir=../tk/win/
9352 ;;
9353 *)
9354 tkdir=../tk/unix/
9355 ;;
9356 esac
9357
9358 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9359
3fc11d3e
JM
9360 # now look for Itcl library stuff
9361
9362
9363#
9364# Ok, lets find the itcl configuration
9365# First, look for one uninstalled.
9366# the alternative search directory is invoked by --with-itclconfig
9367#
9368
9369if test x"${no_itcl}" = x ; then
9370 # we reset no_itcl in case something fails here
9371 no_itcl=true
9372 # Check whether --with-itclconfig or --without-itclconfig was given.
9373if test "${with_itclconfig+set}" = set; then
9374 withval="$with_itclconfig"
9375 with_itclconfig=${withval}
9376fi
9377
9378 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
d28f9cdf 9379echo "configure:9380: checking for Itcl configuration" >&5
3fc11d3e
JM
9380 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9381 echo $ac_n "(cached) $ac_c" 1>&6
9382else
9383
9384
9385 # First check to see if --with-itclconfig was specified.
9386 if test x"${with_itclconfig}" != x ; then
9387 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9388 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9389 else
9390 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9391 fi
9392 fi
9393
9394 # then check for a private Itcl library
9395 if test x"${ac_cv_c_itclconfig}" = x ; then
9396 for i in \
9397 ../itcl/itcl \
9398 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9399 ../../itcl \
9400 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9401 ../../../itcl \
9402 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9403 if test -f "$i/itclConfig.sh" ; then
9404 ac_cv_c_itclconfig=`(cd $i; pwd)`
9405 break
9406 fi
9407 done
9408 fi
9409 # check in a few common install locations
9410 if test x"${ac_cv_c_itclconfig}" = x ; then
9411 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9412 if test -f "$i/itclConfig.sh" ; then
9413 ac_cv_c_itclconfig=`(cd $i; pwd)`
9414 break
9415 fi
9416 done
9417 fi
9418 # check in a few other private locations
9419 if test x"${ac_cv_c_itclconfig}" = x ; then
9420 for i in \
9421 ${srcdir}/../itcl/itcl \
9422 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9423 if test -f "$i/itclConfig.sh" ; then
9424 ac_cv_c_itclconfig=`(cd $i; pwd)`
9425 break
9426 fi
9427 done
9428 fi
9429
9430fi
9431
9432 if test x"${ac_cv_c_itclconfig}" = x ; then
9433 ITCLCONFIG="# no Itcl configs found"
9434 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9435 else
9436 no_itcl=
9437 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9438 echo "$ac_t""found $ITCLCONFIG" 1>&6
9439 fi
9440fi
9441
9442 if test -z "${no_itcl}"; then
9443
9444 if test -f "$ITCLCONFIG" ; then
9445 . $ITCLCONFIG
9446 fi
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
3fc11d3e
JM
9457
9458
9459 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 9460 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
9461 fi
9462
9463
9464 # now look for Itk library stuff
9465
9466#
9467# Ok, lets find the itk configuration
9468# First, look for one uninstalled.
9469# the alternative search directory is invoked by --with-itkconfig
9470#
9471
9472if test x"${no_itk}" = x ; then
9473 # we reset no_itk in case something fails here
9474 no_itk=true
9475 # Check whether --with-itkconfig or --without-itkconfig was given.
9476if test "${with_itkconfig+set}" = set; then
9477 withval="$with_itkconfig"
9478 with_itkconfig=${withval}
9479fi
9480
9481 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
d28f9cdf 9482echo "configure:9483: checking for Itk configuration" >&5
3fc11d3e
JM
9483 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9484 echo $ac_n "(cached) $ac_c" 1>&6
9485else
9486
9487
9488 # First check to see if --with-itkconfig was specified.
9489 if test x"${with_itkconfig}" != x ; then
9490 if test -f "${with_itkconfig}/itkConfig.sh" ; then
9491 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9492 else
9493 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9494 fi
9495 fi
9496
9497 # then check for a private Itk library
9498 if test x"${ac_cv_c_itkconfig}" = x ; then
9499 for i in \
9500 ../itcl/itk \
9501 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9502 ../../itk \
9503 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9504 ../../../itk \
9505 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9506 if test -f "$i/itkConfig.sh" ; then
9507 ac_cv_c_itkconfig=`(cd $i; pwd)`
9508 break
9509 fi
9510 done
9511 fi
9512 # check in a few common install locations
9513 if test x"${ac_cv_c_itkconfig}" = x ; then
9514 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9515 if test -f "$i/itkConfig.sh" ; then
9516 ac_cv_c_itkconfig=`(cd $i; pwd)`
9517 break
9518 fi
9519 done
9520 fi
9521 # check in a few other private locations
9522 if test x"${ac_cv_c_itkconfig}" = x ; then
9523 for i in \
9524 ${srcdir}/../itcl/itk \
9525 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9526 if test -f "$i/itkConfig.sh" ; then
9527 ac_cv_c_itkconfig=`(cd $i; pwd)`
9528 break
9529 fi
9530 done
9531 fi
9532
9533fi
9534
9535 if test x"${ac_cv_c_itkconfig}" = x ; then
9536 ITKCONFIG="# no Itk configs found"
9537 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9538 else
9539 no_itk=
9540 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9541 echo "$ac_t""found $ITKCONFIG" 1>&6
9542 fi
9543fi
9544
9545
9546 if test -z "${no_itcl}"; then
9547
9548 if test -f "$ITKCONFIG" ; then
9549 . $ITKCONFIG
9550 fi
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
3fc11d3e 9563 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 9564 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
9565 fi
9566
4226a5a5 9567 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
9568 # Tcl/Tk 8.1 require -fwritable strings. I don't
9569 # know whether 8.2 will or not, but I bet it will.
9570 # I don't have to worry about 7.x since we don't support it.
9571 GDBTK_CFLAGS=""
9572 if test "$GCC" = "yes"; then
9573 if test "$TCL_VERSION" != "8.0" ; then
9574 GDBTK_CFLAGS="-fwritable-strings"
9575 fi
9576 fi
9577
9578 # Include some libraries that Tcl and Tk want.
b2a1bd4f 9579 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
9580 # Yes, the ordering seems wrong here. But it isn't.
9581 # TK_LIBS is the list of libraries that need to be linked
9582 # after Tcl/Tk. Note that this isn't put into LIBS. If it
9583 # were in LIBS then any link tests after this point would
9584 # try to include things like `$(LIBGUI)', which wouldn't work.
9585 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
9586
9587 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9588 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9589 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9590 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 9591 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 9592 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
9593 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9594 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
9595
9596 if test x$gdb_cv_os_cygwin = xyes; then
9597 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9598 WIN32LDAPP="-Wl,--subsystem,console"
9599 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9600 fi
9601 fi
9602 fi
ffc6a242 9603
ffc6a242 9604 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
9605fi
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
dd2504ab 9619
c906108c
SS
9620# If we find X, set shell vars x_includes and x_libraries to the
9621# paths, otherwise set no_x=yes.
9622# Uses ac_ vars as temps to allow command line to override cache and checks.
9623# --without-x overrides everything else, but does not touch the cache.
9624echo $ac_n "checking for X""... $ac_c" 1>&6
d28f9cdf 9625echo "configure:9626: checking for X" >&5
c906108c
SS
9626
9627# Check whether --with-x or --without-x was given.
9628if test "${with_x+set}" = set; then
9629 withval="$with_x"
9630 :
9631fi
9632
9633# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9634if test "x$with_x" = xno; then
9635 # The user explicitly disabled X.
9636 have_x=disabled
9637else
9638 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9639 # Both variables are already set.
9640 have_x=yes
9641 else
9642if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9643 echo $ac_n "(cached) $ac_c" 1>&6
9644else
9645 # One or both of the vars are not set, and there is no cached value.
9646ac_x_includes=NO ac_x_libraries=NO
9647rm -fr conftestdir
9648if mkdir conftestdir; then
9649 cd conftestdir
9650 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9651 cat > Imakefile <<'EOF'
9652acfindx:
9653 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9654EOF
9655 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9656 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9657 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9658 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9659 for ac_extension in a so sl; do
9660 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9661 test -f $ac_im_libdir/libX11.$ac_extension; then
9662 ac_im_usrlibdir=$ac_im_libdir; break
9663 fi
9664 done
9665 # Screen out bogus values from the imake configuration. They are
9666 # bogus both because they are the default anyway, and because
9667 # using them would break gcc on systems where it needs fixed includes.
9668 case "$ac_im_incroot" in
9669 /usr/include) ;;
9670 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9671 esac
9672 case "$ac_im_usrlibdir" in
9673 /usr/lib | /lib) ;;
9674 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9675 esac
9676 fi
9677 cd ..
9678 rm -fr conftestdir
9679fi
9680
9681if test "$ac_x_includes" = NO; then
9682 # Guess where to find include files, by looking for this one X11 .h file.
9683 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9684
9685 # First, try using that file with no special directory specified.
9686cat > conftest.$ac_ext <<EOF
d28f9cdf 9687#line 9688 "configure"
c906108c
SS
9688#include "confdefs.h"
9689#include <$x_direct_test_include>
9690EOF
9691ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
d28f9cdf 9692{ (eval echo configure:9693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
9693ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9694if test -z "$ac_err"; then
9695 rm -rf conftest*
9696 # We can compile using X headers with no special include directory.
9697ac_x_includes=
9698else
9699 echo "$ac_err" >&5
9700 echo "configure: failed program was:" >&5
9701 cat conftest.$ac_ext >&5
9702 rm -rf conftest*
9703 # Look for the header file in a standard set of common directories.
9704# Check X11 before X11Rn because it is often a symlink to the current release.
9705 for ac_dir in \
9706 /usr/X11/include \
9707 /usr/X11R6/include \
9708 /usr/X11R5/include \
9709 /usr/X11R4/include \
9710 \
9711 /usr/include/X11 \
9712 /usr/include/X11R6 \
9713 /usr/include/X11R5 \
9714 /usr/include/X11R4 \
9715 \
9716 /usr/local/X11/include \
9717 /usr/local/X11R6/include \
9718 /usr/local/X11R5/include \
9719 /usr/local/X11R4/include \
9720 \
9721 /usr/local/include/X11 \
9722 /usr/local/include/X11R6 \
9723 /usr/local/include/X11R5 \
9724 /usr/local/include/X11R4 \
9725 \
9726 /usr/X386/include \
9727 /usr/x386/include \
9728 /usr/XFree86/include/X11 \
9729 \
9730 /usr/include \
9731 /usr/local/include \
9732 /usr/unsupported/include \
9733 /usr/athena/include \
9734 /usr/local/x11r5/include \
9735 /usr/lpp/Xamples/include \
9736 \
9737 /usr/openwin/include \
9738 /usr/openwin/share/include \
9739 ; \
9740 do
9741 if test -r "$ac_dir/$x_direct_test_include"; then
9742 ac_x_includes=$ac_dir
9743 break
9744 fi
9745 done
9746fi
9747rm -f conftest*
9748fi # $ac_x_includes = NO
9749
9750if test "$ac_x_libraries" = NO; then
9751 # Check for the libraries.
9752
9753 test -z "$x_direct_test_library" && x_direct_test_library=Xt
9754 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9755
9756 # See if we find them without any special options.
9757 # Don't add to $LIBS permanently.
9758 ac_save_LIBS="$LIBS"
9759 LIBS="-l$x_direct_test_library $LIBS"
9760cat > conftest.$ac_ext <<EOF
d28f9cdf 9761#line 9762 "configure"
c906108c
SS
9762#include "confdefs.h"
9763
9764int main() {
9765${x_direct_test_function}()
9766; return 0; }
9767EOF
d28f9cdf 9768if { (eval echo configure:9769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
9769 rm -rf conftest*
9770 LIBS="$ac_save_LIBS"
9771# We can link X programs with no special library path.
9772ac_x_libraries=
9773else
9774 echo "configure: failed program was:" >&5
9775 cat conftest.$ac_ext >&5
9776 rm -rf conftest*
9777 LIBS="$ac_save_LIBS"
9778# First see if replacing the include by lib works.
9779# Check X11 before X11Rn because it is often a symlink to the current release.
9780for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9781 /usr/X11/lib \
9782 /usr/X11R6/lib \
9783 /usr/X11R5/lib \
9784 /usr/X11R4/lib \
9785 \
9786 /usr/lib/X11 \
9787 /usr/lib/X11R6 \
9788 /usr/lib/X11R5 \
9789 /usr/lib/X11R4 \
9790 \
9791 /usr/local/X11/lib \
9792 /usr/local/X11R6/lib \
9793 /usr/local/X11R5/lib \
9794 /usr/local/X11R4/lib \
9795 \
9796 /usr/local/lib/X11 \
9797 /usr/local/lib/X11R6 \
9798 /usr/local/lib/X11R5 \
9799 /usr/local/lib/X11R4 \
9800 \
9801 /usr/X386/lib \
9802 /usr/x386/lib \
9803 /usr/XFree86/lib/X11 \
9804 \
9805 /usr/lib \
9806 /usr/local/lib \
9807 /usr/unsupported/lib \
9808 /usr/athena/lib \
9809 /usr/local/x11r5/lib \
9810 /usr/lpp/Xamples/lib \
9811 /lib/usr/lib/X11 \
9812 \
9813 /usr/openwin/lib \
9814 /usr/openwin/share/lib \
9815 ; \
9816do
9817 for ac_extension in a so sl; do
9818 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9819 ac_x_libraries=$ac_dir
9820 break 2
9821 fi
9822 done
9823done
9824fi
9825rm -f conftest*
9826fi # $ac_x_libraries = NO
9827
9828if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9829 # Didn't find X anywhere. Cache the known absence of X.
9830 ac_cv_have_x="have_x=no"
9831else
9832 # Record where we found X for the cache.
9833 ac_cv_have_x="have_x=yes \
9834 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9835fi
9836fi
9837 fi
9838 eval "$ac_cv_have_x"
9839fi # $with_x != no
9840
9841if test "$have_x" != yes; then
9842 echo "$ac_t""$have_x" 1>&6
9843 no_x=yes
9844else
9845 # If each of the values was on the command line, it overrides each guess.
9846 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9847 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9848 # Update the cache value to reflect the command line values.
9849 ac_cv_have_x="have_x=yes \
9850 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9851 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9852fi
9853
9854
7a292a7a
SS
9855
9856# Unlike the sim directory, whether a simulator is linked is controlled by
9857# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
9858# This code just checks for a few cases where we'd like to ignore those
9859# definitions, even when they're present in the '.mt' file. These cases
9860# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 9861# not part of the source tree.
7a292a7a
SS
9862#
9863# Check whether --enable-sim or --disable-sim was given.
9864if test "${enable_sim+set}" = set; then
9865 enableval="$enable_sim"
9866 echo "enable_sim = $enable_sim";
9867 echo "enableval = ${enableval}";
9868 case "${enableval}" in
9869 yes) ignore_sim=false ;;
9870 no) ignore_sim=true ;;
9871 *) ignore_sim=false ;;
9872 esac
9873else
9874 ignore_sim=false
9875fi
9876
9877
9878if test ! -d "${srcdir}/../sim"; then
9879 ignore_sim=true
9880fi
9881
9882if test "${ignore_sim}" = "true"; then
9883 IGNORE_SIM="SIM="
9884 IGNORE_SIM_OBS="SIM_OBS="
9885else
9886 IGNORE_SIM=""
9887 IGNORE_SIM_OBS=""
9888 cat >> confdefs.h <<\EOF
9889#define WITH_SIM 1
9890EOF
9891
9892fi
9893
9894
9895
c906108c
SS
9896
9897
9898
9899
9900
9901
dfcd3bfb 9902
e56ac5c3
AC
9903
9904
b3a90332
AC
9905
9906
b46cd165 9907
d28f9cdf 9908
c906108c
SS
9909# target_subdir is used by the testsuite to find the target libraries.
9910target_subdir=
9911if test "${host}" != "${target}"; then
9912 target_subdir="${target_alias}/"
9913fi
9914
9915
9916frags=
9917host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9918if test ! -f ${host_makefile_frag}; then
7fd60527
AC
9919 # When building a native debuger the .mh file containing things
9920 # like NATDEPFILES is needed. Cross debuggers don't need .mh
9921 # since it no longer contains anything useful.
9922 if test "${target}" = "${host}"; then
9923 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9924 else
9925 host_makefile_frag=/dev/null
9926 fi
c906108c
SS
9927fi
9928frags="$frags $host_makefile_frag"
9929
9930target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9931if test ! -f ${target_makefile_frag}; then
9932{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9933fi
9934frags="$frags $target_makefile_frag"
9935
9936
9937
9938
9939
9940hostfile=`sed -n '
9941s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9942' ${host_makefile_frag}`
9943
9944targetfile=`sed -n '
9945s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9946' ${target_makefile_frag}`
9947
6166d547
AC
9948GDB_MULTI_ARCH=`sed -n '
9949s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
9950' ${target_makefile_frag}`
9951
c906108c 9952if test "${target}" = "${host}"; then
a85f51e7
DJ
9953# We pick this up from the host configuration file (.mh) because we
9954# do not have a native configuration Makefile fragment.
c906108c
SS
9955nativefile=`sed -n '
9956s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
9957' ${host_makefile_frag}`
c906108c
SS
9958fi
9959
9960
6166d547
AC
9961# New targets should just set gdb_multi_arch=yes in configure.tgt.
9962# Old targets being converted can either do that or set GDB_MULTI_ARCH
9963# in the target specific makefile frag. Eventually gdb_multi_arch=yes
9964# will be the default.
9965if test x"${GDB_MULTI_ARCH}" = x ; then
9966 case "${gdb_multi_arch}" in
9967 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9968 no ) GDB_MULTI_ARCH=0 ;;
9969 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9970 esac
9971fi
9972if test x"${GDB_MULTI_ARCH}" != x ; then
9973 cat >> confdefs.h <<EOF
9974#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9975EOF
9976
9977fi
6c5cfe5b 9978# Warn the user when they use an old practice
6166d547
AC
9979case "${GDB_MULTI_ARCH}" in
9980 "" ) ;;
9981 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9982 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9983 GDB_MULTI_ARCH_PURE )
9984 if test x"${targetfile}" != x ; then
6c5cfe5b 9985 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 9986 targetfile=""
6166d547
AC
9987 fi ;;
9988 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9989esac
9990
b00a8037
DJ
9991if test x"${gdb_osabi}" != x ; then
9992 cat >> confdefs.h <<EOF
9993#define GDB_OSABI_DEFAULT $gdb_osabi
9994EOF
9995
9996fi
9997
8dcde887
MK
9998# Enable multi-ice-gdb-server.
9999# Check whether --enable-multi-ice or --disable-multi-ice was given.
10000if test "${enable_multi_ice+set}" = set; then
10001 enableval="$enable_multi_ice"
10002 case $enableval in
10003 yes | no)
10004 ;;
10005 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10006 esac
96baa820
JM
10007fi
10008
8dcde887
MK
10009if test "x$enable_multi_ice" = xyes; then
10010 configdirs="$configdirs multi-ice"
a85f51e7
DJ
10011fi
10012
8dcde887
MK
10013# We only build gdbserver automatically if host and target are the same.
10014if test "x$target" = "x$host"; then
10015 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
d28f9cdf 10016echo "configure:10017: checking whether gdbserver is supported on this host" >&5
8dcde887
MK
10017 if test "x$build_gdbserver" = xyes; then
10018 configdirs="$configdirs gdbserver"
10019 echo "$ac_t""yes" 1>&6
10020 else
10021 echo "$ac_t""no" 1>&6
10022 fi
10023fi
10024
10025subdirs="doc testsuite $configdirs"
10026
96baa820 10027
c906108c 10028# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
10029# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10030# version.
c906108c
SS
10031
10032files=
10033links=
5a2402b8 10034
c906108c 10035rm -f xm.h
5a2402b8 10036xm_h=""
c906108c 10037if test "${hostfile}" != ""; then
5a2402b8
AC
10038 xm_h=xm.h
10039 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10040 files="${files} ${GDB_XM_FILE}"
10041 links="${links} xm.h"
10042 cat >> confdefs.h <<EOF
10043#define GDB_XM_FILE ${GDB_XM_FILE}
10044EOF
10045
c906108c 10046fi
5a2402b8
AC
10047
10048
c906108c 10049rm -f tm.h
5a2402b8 10050tm_h=""
c906108c 10051if test "${targetfile}" != ""; then
5a2402b8
AC
10052 tm_h=tm.h
10053 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10054 files="${files} ${GDB_TM_FILE}"
10055 links="${links} tm.h"
10056 cat >> confdefs.h <<EOF
10057#define GDB_TM_FILE ${GDB_TM_FILE}
10058EOF
10059
c906108c 10060fi
5a2402b8
AC
10061
10062
c906108c 10063rm -f nm.h
5a2402b8 10064nm_h=""
c906108c 10065if test "${nativefile}" != ""; then
5a2402b8
AC
10066 nm_h=nm.h
10067 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10068 files="${files} ${GDB_NM_FILE}"
10069 links="${links} nm.h"
10070 cat >> confdefs.h <<EOF
10071#define GDB_NM_FILE ${GDB_NM_FILE}
10072EOF
10073
c906108c 10074fi
5a2402b8
AC
10075
10076
c906108c
SS
10077
10078
10079echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
d28f9cdf 10080echo "configure:10081: checking for Cygwin environment" >&5
c906108c
SS
10081if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10082 echo $ac_n "(cached) $ac_c" 1>&6
10083else
10084 cat > conftest.$ac_ext <<EOF
d28f9cdf 10085#line 10086 "configure"
c906108c
SS
10086#include "confdefs.h"
10087
10088int main() {
10089
10090#ifndef __CYGWIN__
10091#define __CYGWIN__ __CYGWIN32__
10092#endif
10093return __CYGWIN__;
10094; return 0; }
10095EOF
d28f9cdf 10096if { (eval echo configure:10097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10097 rm -rf conftest*
10098 ac_cv_cygwin=yes
10099else
10100 echo "configure: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 rm -rf conftest*
10103 ac_cv_cygwin=no
10104fi
10105rm -f conftest*
10106rm -f conftest*
10107fi
10108
10109echo "$ac_t""$ac_cv_cygwin" 1>&6
10110CYGWIN=
10111test "$ac_cv_cygwin" = yes && CYGWIN=yes
10112echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
d28f9cdf 10113echo "configure:10114: checking for mingw32 environment" >&5
c906108c
SS
10114if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10115 echo $ac_n "(cached) $ac_c" 1>&6
10116else
10117 cat > conftest.$ac_ext <<EOF
d28f9cdf 10118#line 10119 "configure"
c906108c
SS
10119#include "confdefs.h"
10120
10121int main() {
10122return __MINGW32__;
10123; return 0; }
10124EOF
d28f9cdf 10125if { (eval echo configure:10126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
10126 rm -rf conftest*
10127 ac_cv_mingw32=yes
10128else
10129 echo "configure: failed program was:" >&5
10130 cat conftest.$ac_ext >&5
10131 rm -rf conftest*
10132 ac_cv_mingw32=no
10133fi
10134rm -f conftest*
10135rm -f conftest*
10136fi
10137
10138echo "$ac_t""$ac_cv_mingw32" 1>&6
10139MINGW32=
10140test "$ac_cv_mingw32" = yes && MINGW32=yes
10141
10142
10143echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
d28f9cdf 10144echo "configure:10145: checking for executable suffix" >&5
c906108c
SS
10145if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10146 echo $ac_n "(cached) $ac_c" 1>&6
10147else
10148 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10149 ac_cv_exeext=.exe
10150else
10151 rm -f conftest*
10152 echo 'int main () { return 0; }' > conftest.$ac_ext
10153 ac_cv_exeext=
d28f9cdf 10154 if { (eval echo configure:10155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
10155 for file in conftest.*; do
10156 case $file in
b00a8037 10157 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
10158 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10159 esac
10160 done
10161 else
10162 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10163 fi
10164 rm -f conftest*
10165 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10166fi
10167fi
10168
10169EXEEXT=""
10170test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10171echo "$ac_t""${ac_cv_exeext}" 1>&6
10172ac_exeext=$EXEEXT
10173
10174
234b45d4
KB
10175
10176cat >> confdefs.h <<\EOF
10177#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10178EOF
10179
10180
10181
10182
10183 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10184if test "${with_libiconv_prefix+set}" = set; then
10185 withval="$with_libiconv_prefix"
10186
10187 for dir in `echo "$withval" | tr : ' '`; do
10188 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10189 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10190 done
10191
10192fi
10193
10194
10195 echo $ac_n "checking for iconv""... $ac_c" 1>&6
d28f9cdf 10196echo "configure:10197: checking for iconv" >&5
234b45d4
KB
10197if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10198 echo $ac_n "(cached) $ac_c" 1>&6
10199else
10200
10201 am_cv_func_iconv="no, consider installing GNU libiconv"
10202 am_cv_lib_iconv=no
10203 cat > conftest.$ac_ext <<EOF
d28f9cdf 10204#line 10205 "configure"
234b45d4
KB
10205#include "confdefs.h"
10206#include <stdlib.h>
10207#include <iconv.h>
10208int main() {
10209iconv_t cd = iconv_open("","");
10210 iconv(cd,NULL,NULL,NULL,NULL);
10211 iconv_close(cd);
10212; return 0; }
10213EOF
d28f9cdf 10214if { (eval echo configure:10215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10215 rm -rf conftest*
10216 am_cv_func_iconv=yes
10217else
10218 echo "configure: failed program was:" >&5
10219 cat conftest.$ac_ext >&5
10220fi
10221rm -f conftest*
10222 if test "$am_cv_func_iconv" != yes; then
10223 am_save_LIBS="$LIBS"
10224 LIBS="$LIBS -liconv"
10225 cat > conftest.$ac_ext <<EOF
d28f9cdf 10226#line 10227 "configure"
234b45d4
KB
10227#include "confdefs.h"
10228#include <stdlib.h>
10229#include <iconv.h>
10230int main() {
10231iconv_t cd = iconv_open("","");
10232 iconv(cd,NULL,NULL,NULL,NULL);
10233 iconv_close(cd);
10234; return 0; }
10235EOF
d28f9cdf 10236if { (eval echo configure:10237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
10237 rm -rf conftest*
10238 am_cv_lib_iconv=yes
10239 am_cv_func_iconv=yes
10240else
10241 echo "configure: failed program was:" >&5
10242 cat conftest.$ac_ext >&5
10243fi
10244rm -f conftest*
10245 LIBS="$am_save_LIBS"
10246 fi
10247
10248fi
10249
10250echo "$ac_t""$am_cv_func_iconv" 1>&6
10251 if test "$am_cv_func_iconv" = yes; then
10252 cat >> confdefs.h <<\EOF
10253#define HAVE_ICONV 1
10254EOF
10255
10256 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
d28f9cdf 10257echo "configure:10258: checking for iconv declaration" >&5
234b45d4
KB
10258 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10259 echo $ac_n "(cached) $ac_c" 1>&6
10260else
10261
10262 cat > conftest.$ac_ext <<EOF
d28f9cdf 10263#line 10264 "configure"
234b45d4
KB
10264#include "confdefs.h"
10265
10266#include <stdlib.h>
10267#include <iconv.h>
10268extern
10269#ifdef __cplusplus
10270"C"
10271#endif
10272#if defined(__STDC__) || defined(__cplusplus)
10273size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10274#else
10275size_t iconv();
10276#endif
10277
10278int main() {
10279
10280; return 0; }
10281EOF
d28f9cdf 10282if { (eval echo configure:10283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
10283 rm -rf conftest*
10284 am_cv_proto_iconv_arg1=""
10285else
10286 echo "configure: failed program was:" >&5
10287 cat conftest.$ac_ext >&5
10288 rm -rf conftest*
10289 am_cv_proto_iconv_arg1="const"
10290fi
10291rm -f conftest*
10292 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);"
10293fi
10294
10295 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10296 echo "$ac_t""${ac_t:-
10297 }$am_cv_proto_iconv" 1>&6
10298 cat >> confdefs.h <<EOF
10299#define ICONV_CONST $am_cv_proto_iconv_arg1
10300EOF
10301
10302 fi
10303 LIBICONV=
10304 if test "$am_cv_lib_iconv" = yes; then
10305 LIBICONV="-liconv"
10306 fi
10307
10308
10309
c906108c
SS
10310trap '' 1 2 15
10311cat > confcache <<\EOF
10312# This file is a shell script that caches the results of configure
10313# tests run on this system so they can be shared between configure
10314# scripts and configure runs. It is not useful on other systems.
10315# If it contains results you don't want to keep, you may remove or edit it.
10316#
10317# By default, configure uses ./config.cache as the cache file,
10318# creating it if it does not exist already. You can give configure
10319# the --cache-file=FILE option to use a different cache file; that is
10320# what configure does when it calls configure scripts in
10321# subdirectories, so they share the cache.
10322# Giving --cache-file=/dev/null disables caching, for debugging configure.
10323# config.status only pays attention to the cache file if you give it the
10324# --recheck option to rerun configure.
10325#
10326EOF
10327# The following way of writing the cache mishandles newlines in values,
10328# but we know of no workaround that is simple, portable, and efficient.
10329# So, don't put newlines in cache variables' values.
10330# Ultrix sh set writes to stderr and can't be redirected directly,
10331# and sets the high bit in the cache file unless we assign to the vars.
10332(set) 2>&1 |
10333 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10334 *ac_space=\ *)
10335 # `set' does not quote correctly, so add quotes (double-quote substitution
10336 # turns \\\\ into \\, and sed turns \\ into \).
10337 sed -n \
10338 -e "s/'/'\\\\''/g" \
10339 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10340 ;;
10341 *)
10342 # `set' quotes correctly as required by POSIX, so do not add quotes.
10343 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10344 ;;
10345 esac >> confcache
10346if cmp -s $cache_file confcache; then
10347 :
10348else
10349 if test -w $cache_file; then
10350 echo "updating cache $cache_file"
10351 cat confcache > $cache_file
10352 else
10353 echo "not updating unwritable cache $cache_file"
10354 fi
10355fi
10356rm -f confcache
10357
10358trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10359
10360test "x$prefix" = xNONE && prefix=$ac_default_prefix
10361# Let make expand exec_prefix.
10362test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10363
10364# Any assignment to VPATH causes Sun make to only execute
10365# the first set of double-colon rules, so remove it if not needed.
10366# If there is a colon in the path, we need to keep it.
10367if test "x$srcdir" = x.; then
10368 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10369fi
10370
10371trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10372
10373DEFS=-DHAVE_CONFIG_H
10374
10375# Without the "./", some shells look in PATH for config.status.
10376: ${CONFIG_STATUS=./config.status}
10377
10378echo creating $CONFIG_STATUS
10379rm -f $CONFIG_STATUS
10380cat > $CONFIG_STATUS <<EOF
10381#! /bin/sh
10382# Generated automatically by configure.
10383# Run this file to recreate the current configuration.
10384# This directory was configured as follows,
10385# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10386#
10387# $0 $ac_configure_args
10388#
10389# Compiler output produced by configure, useful for debugging
10390# configure, is in ./config.log if it exists.
10391
10392ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10393for ac_option
10394do
10395 case "\$ac_option" in
10396 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10397 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10398 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10399 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10400 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10401 exit 0 ;;
10402 -help | --help | --hel | --he | --h)
10403 echo "\$ac_cs_usage"; exit 0 ;;
10404 *) echo "\$ac_cs_usage"; exit 1 ;;
10405 esac
10406done
10407
10408ac_given_srcdir=$srcdir
10409ac_given_INSTALL="$INSTALL"
10410
ed952ac5 10411trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
10412EOF
10413cat >> $CONFIG_STATUS <<EOF
10414
10415# Protect against being on the right side of a sed subst in config.status.
10416sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10417 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10418$ac_vpsub
10419$extrasub
10420s%@SHELL@%$SHELL%g
10421s%@CFLAGS@%$CFLAGS%g
10422s%@CPPFLAGS@%$CPPFLAGS%g
10423s%@CXXFLAGS@%$CXXFLAGS%g
10424s%@FFLAGS@%$FFLAGS%g
10425s%@DEFS@%$DEFS%g
10426s%@LDFLAGS@%$LDFLAGS%g
10427s%@LIBS@%$LIBS%g
10428s%@exec_prefix@%$exec_prefix%g
10429s%@prefix@%$prefix%g
10430s%@program_transform_name@%$program_transform_name%g
10431s%@bindir@%$bindir%g
10432s%@sbindir@%$sbindir%g
10433s%@libexecdir@%$libexecdir%g
10434s%@datadir@%$datadir%g
10435s%@sysconfdir@%$sysconfdir%g
10436s%@sharedstatedir@%$sharedstatedir%g
10437s%@localstatedir@%$localstatedir%g
10438s%@libdir@%$libdir%g
10439s%@includedir@%$includedir%g
10440s%@oldincludedir@%$oldincludedir%g
10441s%@infodir@%$infodir%g
10442s%@mandir@%$mandir%g
413ccac7
AC
10443s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10444s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10445s%@MAINT@%$MAINT%g
c906108c
SS
10446s%@CC@%$CC%g
10447s%@CPP@%$CPP%g
10448s%@host@%$host%g
10449s%@host_alias@%$host_alias%g
10450s%@host_cpu@%$host_cpu%g
10451s%@host_vendor@%$host_vendor%g
10452s%@host_os@%$host_os%g
10453s%@target@%$target%g
10454s%@target_alias@%$target_alias%g
10455s%@target_cpu@%$target_cpu%g
10456s%@target_vendor@%$target_vendor%g
10457s%@target_os@%$target_os%g
10458s%@build@%$build%g
10459s%@build_alias@%$build_alias%g
10460s%@build_cpu@%$build_cpu%g
10461s%@build_vendor@%$build_vendor%g
10462s%@build_os@%$build_os%g
c906108c 10463s%@RANLIB@%$RANLIB%g
8bb2c122 10464s%@SET_MAKE@%$SET_MAKE%g
c906108c
SS
10465s%@ALLOCA@%$ALLOCA%g
10466s%@USE_NLS@%$USE_NLS%g
10467s%@MSGFMT@%$MSGFMT%g
10468s%@GMSGFMT@%$GMSGFMT%g
10469s%@XGETTEXT@%$XGETTEXT%g
10470s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10471s%@CATALOGS@%$CATALOGS%g
10472s%@CATOBJEXT@%$CATOBJEXT%g
10473s%@DATADIRNAME@%$DATADIRNAME%g
10474s%@GMOFILES@%$GMOFILES%g
10475s%@INSTOBJEXT@%$INSTOBJEXT%g
10476s%@INTLDEPS@%$INTLDEPS%g
10477s%@INTLLIBS@%$INTLLIBS%g
10478s%@INTLOBJS@%$INTLOBJS%g
10479s%@POFILES@%$POFILES%g
10480s%@POSUB@%$POSUB%g
10481s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10482s%@GT_NO@%$GT_NO%g
10483s%@GT_YES@%$GT_YES%g
10484s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10485s%@l@%$l%g
8dcde887 10486s%@subdirs@%$subdirs%g
7a292a7a 10487s%@AWK@%$AWK%g
c906108c
SS
10488s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10489s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10490s%@INSTALL_DATA@%$INSTALL_DATA%g
8bb2c122
MK
10491s%@LN_S@%$LN_S%g
10492s%@YACC@%$YACC%g
c906108c 10493s%@AR@%$AR%g
95ca63c4
CF
10494s%@DLLTOOL@%$DLLTOOL%g
10495s%@WINDRES@%$WINDRES%g
75c6e08a 10496s%@MIG@%$MIG%g
c906108c 10497s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
030292b7
DJ
10498s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
10499s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
c906108c 10500s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 10501s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
10502s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10503s%@MMALLOC@%$MMALLOC%g
aff38e61 10504s%@SER_HARDWIRE@%$SER_HARDWIRE%g
cd0fc7c3 10505s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
10506s%@LIBGUI@%$LIBGUI%g
10507s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
10508s%@WIN32LDAPP@%$WIN32LDAPP%g
10509s%@TCL_VERSION@%$TCL_VERSION%g
10510s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10511s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10512s%@TCL_CC@%$TCL_CC%g
10513s%@TCL_DEFS@%$TCL_DEFS%g
10514s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10515s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10516s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10517s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10518s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10519s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10520s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10521s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10522s%@TCL_RANLIB@%$TCL_RANLIB%g
10523s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10524s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10525s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10526s%@TK_VERSION@%$TK_VERSION%g
10527s%@TK_DEFS@%$TK_DEFS%g
10528s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10529s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10530s%@TK_XLIBSW@%$TK_XLIBSW%g
10531s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10532s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10533s%@TCLHDIR@%$TCLHDIR%g
10534s%@TKHDIR@%$TKHDIR%g
10535s%@ITCLHDIR@%$ITCLHDIR%g
10536s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
10537s%@ITCL_VERSION@%$ITCL_VERSION%g
10538s%@ITCL_DEFS@%$ITCL_DEFS%g
10539s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10540s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10541s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10542s%@ITK_VERSION@%$ITK_VERSION%g
10543s%@ITK_DEFS@%$ITK_DEFS%g
10544s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10545s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10546s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
10547s%@X_CFLAGS@%$X_CFLAGS%g
10548s%@X_LDFLAGS@%$X_LDFLAGS%g
10549s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
10550s%@TCL_DEPS@%$TCL_DEPS%g
10551s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
10552s%@ITCLLIB@%$ITCLLIB%g
10553s%@ITCL_DEPS@%$ITCL_DEPS%g
10554s%@ITKLIB@%$ITKLIB%g
10555s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
10556s%@GDBTKLIBS@%$GDBTKLIBS%g
10557s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 10558s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
10559s%@IGNORE_SIM@%$IGNORE_SIM%g
10560s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c 10561s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
d28f9cdf 10562s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
c906108c 10563s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 10564s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
10565s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10566s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 10567s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
10568s%@CONFIG_ALL@%$CONFIG_ALL%g
10569s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
10570s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10571s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
10572s%@target_subdir@%$target_subdir%g
10573/@host_makefile_frag@/r $host_makefile_frag
10574s%@host_makefile_frag@%%g
10575/@target_makefile_frag@/r $target_makefile_frag
10576s%@target_makefile_frag@%%g
10577s%@frags@%$frags%g
5a2402b8
AC
10578s%@xm_h@%$xm_h%g
10579s%@tm_h@%$tm_h%g
10580s%@nm_h@%$nm_h%g
c906108c 10581s%@EXEEXT@%$EXEEXT%g
234b45d4 10582s%@LIBICONV@%$LIBICONV%g
c906108c
SS
10583
10584CEOF
10585EOF
10586
10587cat >> $CONFIG_STATUS <<\EOF
10588
10589# Split the substitutions into bite-sized pieces for seds with
10590# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 10591ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
10592ac_file=1 # Number of current file.
10593ac_beg=1 # First line for current file.
10594ac_end=$ac_max_sed_cmds # Line after last line for current file.
10595ac_more_lines=:
10596ac_sed_cmds=""
10597while $ac_more_lines; do
10598 if test $ac_beg -gt 1; then
10599 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10600 else
10601 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10602 fi
10603 if test ! -s conftest.s$ac_file; then
10604 ac_more_lines=false
10605 rm -f conftest.s$ac_file
10606 else
10607 if test -z "$ac_sed_cmds"; then
10608 ac_sed_cmds="sed -f conftest.s$ac_file"
10609 else
10610 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10611 fi
10612 ac_file=`expr $ac_file + 1`
10613 ac_beg=$ac_end
10614 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10615 fi
10616done
10617if test -z "$ac_sed_cmds"; then
10618 ac_sed_cmds=cat
10619fi
10620EOF
10621
10622cat >> $CONFIG_STATUS <<EOF
10623
ed952ac5 10624CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
10625EOF
10626cat >> $CONFIG_STATUS <<\EOF
10627for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10628 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10629 case "$ac_file" in
10630 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10631 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10632 *) ac_file_in="${ac_file}.in" ;;
10633 esac
10634
10635 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10636
10637 # Remove last slash and all that follows it. Not all systems have dirname.
10638 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10639 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10640 # The file is in a subdirectory.
10641 test ! -d "$ac_dir" && mkdir "$ac_dir"
10642 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10643 # A "../" for each directory in $ac_dir_suffix.
10644 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10645 else
10646 ac_dir_suffix= ac_dots=
10647 fi
10648
10649 case "$ac_given_srcdir" in
10650 .) srcdir=.
10651 if test -z "$ac_dots"; then top_srcdir=.
10652 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10653 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10654 *) # Relative path.
10655 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10656 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10657 esac
10658
10659 case "$ac_given_INSTALL" in
10660 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10661 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10662 esac
10663
10664 echo creating "$ac_file"
10665 rm -f "$ac_file"
10666 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10667 case "$ac_file" in
10668 *Makefile*) ac_comsub="1i\\
10669# $configure_input" ;;
10670 *) ac_comsub= ;;
10671 esac
10672
10673 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10674 sed -e "$ac_comsub
10675s%@configure_input@%$configure_input%g
10676s%@srcdir@%$srcdir%g
10677s%@top_srcdir@%$top_srcdir%g
10678s%@INSTALL@%$INSTALL%g
10679" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10680fi; done
10681rm -f conftest.s*
10682
10683# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10684# NAME is the cpp macro being defined and VALUE is the value it is being given.
10685#
10686# ac_d sets the value in "#define NAME VALUE" lines.
10687ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10688ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10689ac_dC='\3'
10690ac_dD='%g'
10691# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10692ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10693ac_uB='\([ ]\)%\1#\2define\3'
10694ac_uC=' '
10695ac_uD='\4%g'
10696# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10697ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10698ac_eB='$%\1#\2define\3'
10699ac_eC=' '
10700ac_eD='%g'
10701
10702if test "${CONFIG_HEADERS+set}" != set; then
10703EOF
10704cat >> $CONFIG_STATUS <<EOF
10705 CONFIG_HEADERS="config.h:config.in"
10706EOF
10707cat >> $CONFIG_STATUS <<\EOF
10708fi
10709for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10710 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10711 case "$ac_file" in
10712 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10713 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10714 *) ac_file_in="${ac_file}.in" ;;
10715 esac
10716
10717 echo creating $ac_file
10718
10719 rm -f conftest.frag conftest.in conftest.out
10720 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10721 cat $ac_file_inputs > conftest.in
10722
10723EOF
10724
10725# Transform confdefs.h into a sed script conftest.vals that substitutes
10726# the proper values into config.h.in to produce config.h. And first:
10727# Protect against being on the right side of a sed subst in config.status.
10728# Protect against being in an unquoted here document in config.status.
10729rm -f conftest.vals
10730cat > conftest.hdr <<\EOF
10731s/[\\&%]/\\&/g
10732s%[\\$`]%\\&%g
10733s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10734s%ac_d%ac_u%gp
10735s%ac_u%ac_e%gp
10736EOF
10737sed -n -f conftest.hdr confdefs.h > conftest.vals
10738rm -f conftest.hdr
10739
10740# This sed command replaces #undef with comments. This is necessary, for
10741# example, in the case of _POSIX_SOURCE, which is predefined and required
10742# on some systems where configure will not decide to define it.
10743cat >> conftest.vals <<\EOF
10744s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10745EOF
10746
10747# Break up conftest.vals because some shells have a limit on
10748# the size of here documents, and old seds have small limits too.
10749
10750rm -f conftest.tail
10751while :
10752do
10753 ac_lines=`grep -c . conftest.vals`
10754 # grep -c gives empty output for an empty file on some AIX systems.
10755 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10756 # Write a limited-size here document to conftest.frag.
10757 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10758 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10759 echo 'CEOF
10760 sed -f conftest.frag conftest.in > conftest.out
10761 rm -f conftest.in
10762 mv conftest.out conftest.in
10763' >> $CONFIG_STATUS
10764 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10765 rm -f conftest.vals
10766 mv conftest.tail conftest.vals
10767done
10768rm -f conftest.vals
10769
10770cat >> $CONFIG_STATUS <<\EOF
10771 rm -f conftest.frag conftest.h
10772 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10773 cat conftest.in >> conftest.h
10774 rm -f conftest.in
10775 if cmp -s $ac_file conftest.h 2>/dev/null; then
10776 echo "$ac_file is unchanged"
10777 rm -f conftest.h
10778 else
10779 # Remove last slash and all that follows it. Not all systems have dirname.
10780 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10781 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10782 # The file is in a subdirectory.
10783 test ! -d "$ac_dir" && mkdir "$ac_dir"
10784 fi
10785 rm -f $ac_file
10786 mv conftest.h $ac_file
10787 fi
10788fi; done
10789
10790EOF
10791
10792cat >> $CONFIG_STATUS <<EOF
10793ac_sources="$files"
10794ac_dests="$links"
10795EOF
10796
10797cat >> $CONFIG_STATUS <<\EOF
10798srcdir=$ac_given_srcdir
10799while test -n "$ac_sources"; do
10800 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10801 set $ac_sources; ac_source=$1; shift; ac_sources=$*
10802
10803 echo "linking $srcdir/$ac_source to $ac_dest"
10804
10805 if test ! -r $srcdir/$ac_source; then
10806 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10807 fi
10808 rm -f $ac_dest
10809
10810 # Make relative symlinks.
10811 # Remove last slash and all that follows it. Not all systems have dirname.
10812 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10813 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10814 # The dest file is in a subdirectory.
10815 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10816 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10817 # A "../" for each directory in $ac_dest_dir_suffix.
10818 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10819 else
10820 ac_dest_dir_suffix= ac_dots=
10821 fi
10822
10823 case "$srcdir" in
10824 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10825 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10826 esac
10827
10828 # Make a symlink if possible; otherwise try a hard link.
10829 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10830 ln $srcdir/$ac_source $ac_dest; then :
10831 else
10832 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10833 fi
10834done
10835EOF
10836cat >> $CONFIG_STATUS <<EOF
10837
10838gdb_host_cpu=$gdb_host_cpu
10839gdb_target_cpu=$gdb_target_cpu
10840nativefile=$nativefile
10841
10842EOF
10843cat >> $CONFIG_STATUS <<\EOF
10844
10845if test "${nativefile}" = ""; then
c4620205 10846 < Makefile \
e27da16d
JT
10847 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
10848 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
10849 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
10850 > Makefile.tem
c906108c
SS
10851mv -f Makefile.tem Makefile
10852fi
10853
10854sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
10855/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
10856/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10857mv -f Makefile.tmp Makefile
10858
2acceee2 10859
c906108c
SS
10860case x$CONFIG_HEADERS in
10861xconfig.h:config.in)
10862echo > stamp-h ;;
10863esac
10864
10865exit 0
10866EOF
10867chmod +x $CONFIG_STATUS
10868rm -fr confdefs* $ac_clean_files
10869test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10870
10871if test "$no_recursion" != yes; then
10872
10873 # Remove --cache-file and --srcdir arguments so they do not pile up.
10874 ac_sub_configure_args=
10875 ac_prev=
10876 for ac_arg in $ac_configure_args; do
10877 if test -n "$ac_prev"; then
10878 ac_prev=
10879 continue
10880 fi
10881 case "$ac_arg" in
10882 -cache-file | --cache-file | --cache-fil | --cache-fi \
10883 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10884 ac_prev=cache_file ;;
10885 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10886 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10887 ;;
10888 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10889 ac_prev=srcdir ;;
10890 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10891 ;;
10892 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10893 esac
10894 done
10895
8dcde887 10896 for ac_config_dir in doc testsuite $configdirs; do
c906108c
SS
10897
10898 # Do not complain, so a configure script can configure whichever
10899 # parts of a large source tree are present.
10900 if test ! -d $srcdir/$ac_config_dir; then
10901 continue
10902 fi
10903
10904 echo configuring in $ac_config_dir
10905
10906 case "$srcdir" in
10907 .) ;;
10908 *)
10909 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10910 else
10911 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10912 fi
10913 ;;
10914 esac
10915
10916 ac_popdir=`pwd`
10917 cd $ac_config_dir
10918
10919 # A "../" for each directory in /$ac_config_dir.
10920 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10921
10922 case "$srcdir" in
10923 .) # No --srcdir option. We are building in place.
10924 ac_sub_srcdir=$srcdir ;;
10925 /*) # Absolute path.
10926 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10927 *) # Relative path.
10928 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10929 esac
10930
10931 # Check for guested configure; otherwise get Cygnus style configure.
10932 if test -f $ac_sub_srcdir/configure; then
10933 ac_sub_configure=$ac_sub_srcdir/configure
10934 elif test -f $ac_sub_srcdir/configure.in; then
10935 ac_sub_configure=$ac_configure
10936 else
10937 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10938 ac_sub_configure=
10939 fi
10940
10941 # The recursion is here.
10942 if test -n "$ac_sub_configure"; then
10943
10944 # Make the cache file name correct relative to the subdirectory.
10945 case "$cache_file" in
10946 /*) ac_sub_cache_file=$cache_file ;;
10947 *) # Relative path.
10948 ac_sub_cache_file="$ac_dots$cache_file" ;;
10949 esac
10950 case "$ac_given_INSTALL" in
10951 [/$]*) INSTALL="$ac_given_INSTALL" ;;
10952 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10953 esac
10954
10955 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10956 # The eval makes quoting arguments work.
10957 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10958 then :
10959 else
10960 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10961 fi
10962 fi
10963
10964 cd $ac_popdir
10965 done
10966fi
10967
10968
10969exit 0
This page took 0.832803 seconds and 4 git commands to generate.