2002-08-14 Michael Snyder <msnyder@redhat.com>
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
c906108c
SS
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
413ccac7
AC
14ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
c906108c
SS
17ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
96baa820
JM
21ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
d318976c
FN
23ac_help="$ac_help
24 --enable-gdbcli Enable GDB-CLI interface"
fb40c209
AC
25ac_help="$ac_help
26 --enable-gdbmi Enable GDB-MI interface"
b4df4f68 27ac_help="$ac_help
6c5cfe5b 28 --with-uiout Use new uiout functions instead of *printf's"
c906108c
SS
29ac_help="$ac_help
30 --enable-tui Enable full-screen terminal user interface"
31ac_help="$ac_help
32 --enable-netrom Enable NetROM support"
33ac_help="$ac_help
34 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
3b851bce
AC
35ac_help="$ac_help
36 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
c906108c
SS
37ac_help="$ac_help
38 --with-mmalloc Use memory mapped malloc package"
88987551
L
39ac_help="$ac_help
40 --with-included-regex Use included regex"
7a292a7a
SS
41ac_help="$ac_help
42 --with-cpu=CPU Set the default CPU variant to debug"
43ac_help="$ac_help
44 --enable-gdbtk Enable GDBTK GUI front end"
45ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
57ac_help="$ac_help
58 --with-tixconfig Directory containing tix configuration (tixConfig.sh)"
c906108c
SS
59ac_help="$ac_help
60 --with-x use the X Window System"
7a292a7a
SS
61ac_help="$ac_help
62 --enable-sim Link gdb with simulator"
c906108c
SS
63ac_help="$ac_help
64 --enable-shared Use shared libraries"
65
66# Initialize some variables set by options.
67# The variables have the same names as the options, with
68# dashes changed to underlines.
69build=NONE
70cache_file=./config.cache
71exec_prefix=NONE
72host=NONE
73no_create=
74nonopt=NONE
75no_recursion=
76prefix=NONE
77program_prefix=NONE
78program_suffix=NONE
79program_transform_name=s,x,x,
80silent=
81site=
a534e424 82sitefile=
c906108c
SS
83srcdir=
84target=NONE
85verbose=
86x_includes=NONE
87x_libraries=NONE
88bindir='${exec_prefix}/bin'
89sbindir='${exec_prefix}/sbin'
90libexecdir='${exec_prefix}/libexec'
91datadir='${prefix}/share'
92sysconfdir='${prefix}/etc'
93sharedstatedir='${prefix}/com'
94localstatedir='${prefix}/var'
95libdir='${exec_prefix}/lib'
96includedir='${prefix}/include'
97oldincludedir='/usr/include'
98infodir='${prefix}/info'
99mandir='${prefix}/man'
100
101# Initialize some other variables.
102subdirs=
103MFLAGS= MAKEFLAGS=
104SHELL=${CONFIG_SHELL-/bin/sh}
105# Maximum number of lines to put in a shell here document.
106ac_max_here_lines=12
107
108ac_prev=
109for ac_option
110do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190Usage: configure [options] [host]
191Options: [defaults in brackets after descriptions]
192Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
a534e424 197 --site-file=FILE use FILE as the site file
c906108c
SS
198 --version print the version of autoconf that created configure
199Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223EOF
224 cat << EOF
225Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
a534e424
AC
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
c906108c
SS
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451done
452
453if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455fi
456
457trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459# File descriptor usage:
460# 0 standard input
461# 1 file creation
462# 2 errors and warnings
463# 3 some systems may open it to /dev/tty
464# 4 used on the Kubota Titan
465# 6 checking for... messages and results
466# 5 compiler messages saved in config.log
467if test "$silent" = yes; then
468 exec 6>/dev/null
469else
470 exec 6>&1
471fi
472exec 5>./config.log
473
474echo "\
475This file contains any messages produced by compilers while
476running configure, to aid debugging if configure makes a mistake.
477" 1>&5
478
479# Strip out --no-create and --no-recursion so they do not pile up.
480# Also quote any args containing shell metacharacters.
481ac_configure_args=
482for ac_arg
483do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493done
494
495# NLS nuisances.
496# Only set these to C if already set. These must not be set unconditionally
497# because not all systems understand e.g. LANG=C (notably SCO).
498# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499# Non-C LC_CTYPE values break the ctype check.
500if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505# confdefs.h avoids OS command line length limits that DEFS can exceed.
506rm -rf conftest* confdefs.h
507# AIX cpp loses on an empty file, so make sure it contains at least a newline.
508echo > confdefs.h
509
510# A filename unique to this package, relative to the directory that
511# configure is in, which we can look for to find out if srcdir is correct.
512ac_unique_file=main.c
513
514# Find the source files, if location was not specified.
515if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525else
526 ac_srcdir_defaulted=no
527fi
528if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534fi
535srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537# Prefer explicitly selected file to automatically selected ones.
a534e424
AC
538if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
c906108c 545 fi
a534e424
AC
546else
547 CONFIG_SITE="$sitefile"
c906108c
SS
548fi
549for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554done
555
556if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559else
560 echo "creating cache $cache_file"
561 > $cache_file
562fi
563
564ac_ext=c
565# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566ac_cpp='$CPP $CPPFLAGS'
567ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569cross_compiling=$ac_cv_prog_cc_cross
570
571ac_exeext=
572ac_objext=o
573if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581else
582 ac_n= ac_c='\c' ac_t=
583fi
584
585
586
413ccac7 587echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
a534e424 588echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
413ccac7
AC
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593else
594 USE_MAINTAINER_MODE=no
595fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
c906108c
SS
610
611# Extract the first word of "gcc", so it can be a program name with args.
612set dummy gcc; ac_word=$2
613echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 614echo "configure:615: checking for $ac_word" >&5
c906108c
SS
615if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631fi
632fi
633CC="$ac_cv_prog_CC"
634if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636else
637 echo "$ac_t""no" 1>&6
638fi
639
640if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642set dummy cc; ac_word=$2
643echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 644echo "configure:645: checking for $ac_word" >&5
c906108c
SS
645if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679fi
680fi
681fi
682CC="$ac_cv_prog_CC"
683if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685else
686 echo "$ac_t""no" 1>&6
687fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693set dummy cl; ac_word=$2
694echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 695echo "configure:696: checking for $ac_word" >&5
c906108c
SS
696if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712fi
713fi
714CC="$ac_cv_prog_CC"
715if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717else
718 echo "$ac_t""no" 1>&6
719fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724fi
725
726echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
a534e424 727echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
c906108c
SS
728
729ac_ext=c
730# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731ac_cpp='$CPP $CPPFLAGS'
732ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734cross_compiling=$ac_cv_prog_cc_cross
735
736cat > conftest.$ac_ext << EOF
737
a534e424 738#line 739 "configure"
c906108c
SS
739#include "confdefs.h"
740
741main(){return(0);}
742EOF
a534e424 743if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755fi
756rm -fr conftest*
757ac_ext=c
758# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759ac_cpp='$CPP $CPPFLAGS'
760ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767fi
768echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
a534e424 769echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
c906108c
SS
770echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771cross_compiling=$ac_cv_prog_cc_cross
772
773echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
a534e424 774echo "configure:775: checking whether we are using GNU C" >&5
c906108c
SS
775if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777else
778 cat > conftest.c <<EOF
779#ifdef __GNUC__
780 yes;
781#endif
782EOF
a534e424 783if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
c906108c
SS
784 ac_cv_prog_gcc=yes
785else
786 ac_cv_prog_gcc=no
787fi
788fi
789
790echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794else
795 GCC=
796fi
797
798ac_test_CFLAGS="${CFLAGS+set}"
799ac_save_CFLAGS="$CFLAGS"
800CFLAGS=
801echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
a534e424 802echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
c906108c
SS
803if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805else
806 echo 'void f(){}' > conftest.c
807if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809else
810 ac_cv_prog_cc_g=no
811fi
812rm -f conftest*
813
814fi
815
816echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831fi
832
833echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
a534e424 834echo "configure:835: checking how to run the C preprocessor" >&5
c906108c
SS
835# On Suns, sometimes $CPP names a directory.
836if test -n "$CPP" && test -d "$CPP"; then
837 CPP=
838fi
839if test -z "$CPP"; then
840if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842else
843 # This must be in double quotes, not single quotes, because CPP may get
844 # substituted into the Makefile and "${CC-cc}" will confuse make.
845 CPP="${CC-cc} -E"
846 # On the NeXT, cc -E runs the code through the compiler's parser,
847 # not just through cpp.
848 cat > conftest.$ac_ext <<EOF
a534e424 849#line 850 "configure"
c906108c
SS
850#include "confdefs.h"
851#include <assert.h>
852Syntax Error
853EOF
854ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 855{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
856ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
857if test -z "$ac_err"; then
858 :
859else
860 echo "$ac_err" >&5
861 echo "configure: failed program was:" >&5
862 cat conftest.$ac_ext >&5
863 rm -rf conftest*
864 CPP="${CC-cc} -E -traditional-cpp"
865 cat > conftest.$ac_ext <<EOF
a534e424 866#line 867 "configure"
c906108c
SS
867#include "confdefs.h"
868#include <assert.h>
869Syntax Error
870EOF
871ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 872{ (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
873ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
874if test -z "$ac_err"; then
875 :
876else
877 echo "$ac_err" >&5
878 echo "configure: failed program was:" >&5
879 cat conftest.$ac_ext >&5
880 rm -rf conftest*
881 CPP="${CC-cc} -nologo -E"
882 cat > conftest.$ac_ext <<EOF
a534e424 883#line 884 "configure"
c906108c
SS
884#include "confdefs.h"
885#include <assert.h>
886Syntax Error
887EOF
888ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 889{ (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
890ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
891if test -z "$ac_err"; then
892 :
893else
894 echo "$ac_err" >&5
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
897 rm -rf conftest*
898 CPP=/lib/cpp
899fi
900rm -f conftest*
901fi
902rm -f conftest*
903fi
904rm -f conftest*
905 ac_cv_prog_CPP="$CPP"
906fi
907 CPP="$ac_cv_prog_CPP"
908else
909 ac_cv_prog_CPP="$CPP"
910fi
911echo "$ac_t""$CPP" 1>&6
912
913echo $ac_n "checking for AIX""... $ac_c" 1>&6
a534e424 914echo "configure:915: checking for AIX" >&5
c906108c 915cat > conftest.$ac_ext <<EOF
a534e424 916#line 917 "configure"
c906108c
SS
917#include "confdefs.h"
918#ifdef _AIX
919 yes
920#endif
921
922EOF
923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
924 egrep "yes" >/dev/null 2>&1; then
925 rm -rf conftest*
926 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
927#define _ALL_SOURCE 1
928EOF
929
930else
931 rm -rf conftest*
932 echo "$ac_t""no" 1>&6
933fi
934rm -f conftest*
935
936
56157b4a 937echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
a534e424 938echo "configure:939: checking for POSIXized ISC" >&5
56157b4a
AC
939if test -d /etc/conf/kconfig.d &&
940 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
941then
942 echo "$ac_t""yes" 1>&6
943 ISC=yes # If later tests want to check for ISC.
944 cat >> confdefs.h <<\EOF
945#define _POSIX_SOURCE 1
c906108c
SS
946EOF
947
56157b4a
AC
948 if test "$GCC" = yes; then
949 CC="$CC -posix"
950 else
951 CC="$CC -Xp"
952 fi
c906108c
SS
953else
954 echo "$ac_t""no" 1>&6
56157b4a 955 ISC=
c906108c
SS
956fi
957
958
959
960
961echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
a534e424 962echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
c906108c
SS
963if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
964 echo $ac_n "(cached) $ac_c" 1>&6
965else
966 am_cv_prog_cc_stdc=no
967ac_save_CC="$CC"
968# Don't try gcc -ansi; that turns off useful extensions and
969# breaks some systems' header files.
970# AIX -qlanglvl=ansi
971# Ultrix and OSF/1 -std1
56157b4a
AC
972# HP-UX 10.20 and later -Ae
973# HP-UX older versions -Aa -D_HPUX_SOURCE
c906108c 974# SVR4 -Xc -D__EXTENSIONS__
56157b4a 975for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
c906108c
SS
976do
977 CC="$ac_save_CC $ac_arg"
978 cat > conftest.$ac_ext <<EOF
a534e424 979#line 980 "configure"
c906108c
SS
980#include "confdefs.h"
981#include <stdarg.h>
982#include <stdio.h>
983#include <sys/types.h>
984#include <sys/stat.h>
985/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
986struct buf { int x; };
987FILE * (*rcsopen) (struct buf *, struct stat *, int);
988static char *e (p, i)
989 char **p;
990 int i;
991{
992 return p[i];
993}
994static char *f (char * (*g) (char **, int), char **p, ...)
995{
996 char *s;
997 va_list v;
998 va_start (v,p);
999 s = g (p, va_arg (v,int));
1000 va_end (v);
1001 return s;
1002}
1003int test (int i, double x);
1004struct s1 {int (*f) (int a);};
1005struct s2 {int (*f) (double a);};
1006int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1007int argc;
1008char **argv;
1009
1010int main() {
1011
1012return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1013
1014; return 0; }
1015EOF
a534e424 1016if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1017 rm -rf conftest*
1018 am_cv_prog_cc_stdc="$ac_arg"; break
1019else
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022fi
1023rm -f conftest*
1024done
1025CC="$ac_save_CC"
1026
1027fi
1028
1029if test -z "$am_cv_prog_cc_stdc"; then
1030 echo "$ac_t""none needed" 1>&6
1031else
1032 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1033fi
1034case "x$am_cv_prog_cc_stdc" in
1035 x|xno) ;;
1036 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1037esac
1038
1039
1040ac_aux_dir=
1041for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1042 if test -f $ac_dir/install-sh; then
1043 ac_aux_dir=$ac_dir
1044 ac_install_sh="$ac_aux_dir/install-sh -c"
1045 break
1046 elif test -f $ac_dir/install.sh; then
1047 ac_aux_dir=$ac_dir
1048 ac_install_sh="$ac_aux_dir/install.sh -c"
1049 break
1050 fi
1051done
1052if test -z "$ac_aux_dir"; then
1053 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1054fi
1055ac_config_guess=$ac_aux_dir/config.guess
1056ac_config_sub=$ac_aux_dir/config.sub
1057ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1058
1059
1060# Do some error checking and defaulting for the host and target type.
1061# The inputs are:
1062# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1063#
1064# The rules are:
1065# 1. You are not allowed to specify --host, --target, and nonopt at the
1066# same time.
1067# 2. Host defaults to nonopt.
1068# 3. If nonopt is not specified, then host defaults to the current host,
1069# as determined by config.guess.
1070# 4. Target and build default to nonopt.
1071# 5. If nonopt is not specified, then target and build default to host.
1072
1073# The aliases save the names the user supplied, while $host etc.
1074# will get canonicalized.
1075case $host---$target---$nonopt in
1076NONE---*---* | *---NONE---* | *---*---NONE) ;;
1077*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1078esac
1079
1080
1081# Make sure we can run config.sub.
1082if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1083else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1084fi
1085
1086echo $ac_n "checking host system type""... $ac_c" 1>&6
a534e424 1087echo "configure:1088: checking host system type" >&5
c906108c
SS
1088
1089host_alias=$host
1090case "$host_alias" in
1091NONE)
1092 case $nonopt in
1093 NONE)
1094 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1095 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1096 fi ;;
1097 *) host_alias=$nonopt ;;
1098 esac ;;
1099esac
1100
1101host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1102host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1103host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1104host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1105echo "$ac_t""$host" 1>&6
1106
1107echo $ac_n "checking target system type""... $ac_c" 1>&6
a534e424 1108echo "configure:1109: checking target system type" >&5
c906108c
SS
1109
1110target_alias=$target
1111case "$target_alias" in
1112NONE)
1113 case $nonopt in
1114 NONE) target_alias=$host_alias ;;
1115 *) target_alias=$nonopt ;;
1116 esac ;;
1117esac
1118
1119target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1120target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123echo "$ac_t""$target" 1>&6
1124
1125echo $ac_n "checking build system type""... $ac_c" 1>&6
a534e424 1126echo "configure:1127: checking build system type" >&5
c906108c
SS
1127
1128build_alias=$build
1129case "$build_alias" in
1130NONE)
1131 case $nonopt in
1132 NONE) build_alias=$host_alias ;;
1133 *) build_alias=$nonopt ;;
1134 esac ;;
1135esac
1136
1137build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1138build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1139build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1140build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141echo "$ac_t""$build" 1>&6
1142
1143test "$host_alias" != "$target_alias" &&
1144 test "$program_prefix$program_suffix$program_transform_name" = \
1145 NONENONEs,x,x, &&
1146 program_prefix=${target_alias}-
1147
1148
1149ALL_LINGUAS=
1150echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
a534e424 1151echo "configure:1152: checking whether ${MAKE-make} sets \${MAKE}" >&5
c906108c
SS
1152set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1153if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1154 echo $ac_n "(cached) $ac_c" 1>&6
1155else
1156 cat > conftestmake <<\EOF
1157all:
1158 @echo 'ac_maketemp="${MAKE}"'
1159EOF
1160# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1161eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1162if test -n "$ac_maketemp"; then
1163 eval ac_cv_prog_make_${ac_make}_set=yes
1164else
1165 eval ac_cv_prog_make_${ac_make}_set=no
1166fi
1167rm -f conftestmake
1168fi
1169if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1170 echo "$ac_t""yes" 1>&6
1171 SET_MAKE=
1172else
1173 echo "$ac_t""no" 1>&6
1174 SET_MAKE="MAKE=${MAKE-make}"
1175fi
1176
1177# Extract the first word of "ranlib", so it can be a program name with args.
1178set dummy ranlib; ac_word=$2
1179echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 1180echo "configure:1181: checking for $ac_word" >&5
c906108c
SS
1181if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1182 echo $ac_n "(cached) $ac_c" 1>&6
1183else
1184 if test -n "$RANLIB"; then
1185 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1186else
1187 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1188 ac_dummy="$PATH"
1189 for ac_dir in $ac_dummy; do
1190 test -z "$ac_dir" && ac_dir=.
1191 if test -f $ac_dir/$ac_word; then
1192 ac_cv_prog_RANLIB="ranlib"
1193 break
1194 fi
1195 done
1196 IFS="$ac_save_ifs"
1197 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1198fi
1199fi
1200RANLIB="$ac_cv_prog_RANLIB"
1201if test -n "$RANLIB"; then
1202 echo "$ac_t""$RANLIB" 1>&6
1203else
1204 echo "$ac_t""no" 1>&6
1205fi
1206
1207echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
a534e424 1208echo "configure:1209: checking for ANSI C header files" >&5
c906108c
SS
1209if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1211else
1212 cat > conftest.$ac_ext <<EOF
a534e424 1213#line 1214 "configure"
c906108c
SS
1214#include "confdefs.h"
1215#include <stdlib.h>
1216#include <stdarg.h>
1217#include <string.h>
1218#include <float.h>
1219EOF
1220ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 1221{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1222ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1223if test -z "$ac_err"; then
1224 rm -rf conftest*
1225 ac_cv_header_stdc=yes
1226else
1227 echo "$ac_err" >&5
1228 echo "configure: failed program was:" >&5
1229 cat conftest.$ac_ext >&5
1230 rm -rf conftest*
1231 ac_cv_header_stdc=no
1232fi
1233rm -f conftest*
1234
1235if test $ac_cv_header_stdc = yes; then
1236 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1237cat > conftest.$ac_ext <<EOF
a534e424 1238#line 1239 "configure"
c906108c
SS
1239#include "confdefs.h"
1240#include <string.h>
1241EOF
1242if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1243 egrep "memchr" >/dev/null 2>&1; then
1244 :
1245else
1246 rm -rf conftest*
1247 ac_cv_header_stdc=no
1248fi
1249rm -f conftest*
1250
1251fi
1252
1253if test $ac_cv_header_stdc = yes; then
1254 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1255cat > conftest.$ac_ext <<EOF
a534e424 1256#line 1257 "configure"
c906108c
SS
1257#include "confdefs.h"
1258#include <stdlib.h>
1259EOF
1260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1261 egrep "free" >/dev/null 2>&1; then
1262 :
1263else
1264 rm -rf conftest*
1265 ac_cv_header_stdc=no
1266fi
1267rm -f conftest*
1268
1269fi
1270
1271if test $ac_cv_header_stdc = yes; then
1272 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1273if test "$cross_compiling" = yes; then
1274 :
1275else
1276 cat > conftest.$ac_ext <<EOF
a534e424 1277#line 1278 "configure"
c906108c
SS
1278#include "confdefs.h"
1279#include <ctype.h>
1280#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1281#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1282#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1283int main () { int i; for (i = 0; i < 256; i++)
1284if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1285exit (0); }
1286
1287EOF
a534e424 1288if { (eval echo configure:1289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1289then
1290 :
1291else
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -fr conftest*
1295 ac_cv_header_stdc=no
1296fi
1297rm -fr conftest*
1298fi
1299
1300fi
1301fi
1302
1303echo "$ac_t""$ac_cv_header_stdc" 1>&6
1304if test $ac_cv_header_stdc = yes; then
1305 cat >> confdefs.h <<\EOF
1306#define STDC_HEADERS 1
1307EOF
1308
1309fi
1310
1311echo $ac_n "checking for working const""... $ac_c" 1>&6
a534e424 1312echo "configure:1313: checking for working const" >&5
c906108c
SS
1313if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315else
1316 cat > conftest.$ac_ext <<EOF
a534e424 1317#line 1318 "configure"
c906108c
SS
1318#include "confdefs.h"
1319
1320int main() {
1321
1322/* Ultrix mips cc rejects this. */
1323typedef int charset[2]; const charset x;
1324/* SunOS 4.1.1 cc rejects this. */
1325char const *const *ccp;
1326char **p;
1327/* NEC SVR4.0.2 mips cc rejects this. */
1328struct point {int x, y;};
1329static struct point const zero = {0,0};
1330/* AIX XL C 1.02.0.0 rejects this.
1331 It does not let you subtract one const X* pointer from another in an arm
1332 of an if-expression whose if-part is not a constant expression */
1333const char *g = "string";
1334ccp = &g + (g ? g-g : 0);
1335/* HPUX 7.0 cc rejects these. */
1336++ccp;
1337p = (char**) ccp;
1338ccp = (char const *const *) p;
1339{ /* SCO 3.2v4 cc rejects this. */
1340 char *t;
1341 char const *s = 0 ? (char *) 0 : (char const *) 0;
1342
1343 *t++ = 0;
1344}
1345{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1346 int x[] = {25, 17};
1347 const int *foo = &x[0];
1348 ++foo;
1349}
1350{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1351 typedef const int *iptr;
1352 iptr p = 0;
1353 ++p;
1354}
1355{ /* AIX XL C 1.02.0.0 rejects this saying
1356 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1357 struct s { int j; const int *ap[3]; };
1358 struct s *b; b->j = 5;
1359}
1360{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1361 const int foo = 10;
1362}
1363
1364; return 0; }
1365EOF
a534e424 1366if { (eval echo configure:1367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1367 rm -rf conftest*
1368 ac_cv_c_const=yes
1369else
1370 echo "configure: failed program was:" >&5
1371 cat conftest.$ac_ext >&5
1372 rm -rf conftest*
1373 ac_cv_c_const=no
1374fi
1375rm -f conftest*
1376fi
1377
1378echo "$ac_t""$ac_cv_c_const" 1>&6
1379if test $ac_cv_c_const = no; then
1380 cat >> confdefs.h <<\EOF
1381#define const
1382EOF
1383
1384fi
1385
1386echo $ac_n "checking for inline""... $ac_c" 1>&6
a534e424 1387echo "configure:1388: checking for inline" >&5
c906108c
SS
1388if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1389 echo $ac_n "(cached) $ac_c" 1>&6
1390else
1391 ac_cv_c_inline=no
1392for ac_kw in inline __inline__ __inline; do
1393 cat > conftest.$ac_ext <<EOF
a534e424 1394#line 1395 "configure"
c906108c
SS
1395#include "confdefs.h"
1396
1397int main() {
1398} $ac_kw foo() {
1399; return 0; }
1400EOF
a534e424 1401if { (eval echo configure:1402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
1402 rm -rf conftest*
1403 ac_cv_c_inline=$ac_kw; break
1404else
1405 echo "configure: failed program was:" >&5
1406 cat conftest.$ac_ext >&5
1407fi
1408rm -f conftest*
1409done
1410
1411fi
1412
1413echo "$ac_t""$ac_cv_c_inline" 1>&6
1414case "$ac_cv_c_inline" in
1415 inline | yes) ;;
1416 no) cat >> confdefs.h <<\EOF
1417#define inline
1418EOF
1419 ;;
1420 *) cat >> confdefs.h <<EOF
1421#define inline $ac_cv_c_inline
1422EOF
1423 ;;
1424esac
1425
1426echo $ac_n "checking for off_t""... $ac_c" 1>&6
a534e424 1427echo "configure:1428: checking for off_t" >&5
c906108c
SS
1428if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1429 echo $ac_n "(cached) $ac_c" 1>&6
1430else
1431 cat > conftest.$ac_ext <<EOF
a534e424 1432#line 1433 "configure"
c906108c
SS
1433#include "confdefs.h"
1434#include <sys/types.h>
1435#if STDC_HEADERS
1436#include <stdlib.h>
1437#include <stddef.h>
1438#endif
1439EOF
1440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1441 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1442 rm -rf conftest*
1443 ac_cv_type_off_t=yes
1444else
1445 rm -rf conftest*
1446 ac_cv_type_off_t=no
1447fi
1448rm -f conftest*
1449
1450fi
1451echo "$ac_t""$ac_cv_type_off_t" 1>&6
1452if test $ac_cv_type_off_t = no; then
1453 cat >> confdefs.h <<\EOF
1454#define off_t long
1455EOF
1456
1457fi
1458
1459echo $ac_n "checking for size_t""... $ac_c" 1>&6
a534e424 1460echo "configure:1461: checking for size_t" >&5
c906108c
SS
1461if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1462 echo $ac_n "(cached) $ac_c" 1>&6
1463else
1464 cat > conftest.$ac_ext <<EOF
a534e424 1465#line 1466 "configure"
c906108c
SS
1466#include "confdefs.h"
1467#include <sys/types.h>
1468#if STDC_HEADERS
1469#include <stdlib.h>
1470#include <stddef.h>
1471#endif
1472EOF
1473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1474 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1475 rm -rf conftest*
1476 ac_cv_type_size_t=yes
1477else
1478 rm -rf conftest*
1479 ac_cv_type_size_t=no
1480fi
1481rm -f conftest*
1482
1483fi
1484echo "$ac_t""$ac_cv_type_size_t" 1>&6
1485if test $ac_cv_type_size_t = no; then
1486 cat >> confdefs.h <<\EOF
1487#define size_t unsigned
1488EOF
1489
1490fi
1491
1492# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1493# for constant arguments. Useless!
1494echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
a534e424 1495echo "configure:1496: checking for working alloca.h" >&5
c906108c
SS
1496if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1497 echo $ac_n "(cached) $ac_c" 1>&6
1498else
1499 cat > conftest.$ac_ext <<EOF
a534e424 1500#line 1501 "configure"
c906108c
SS
1501#include "confdefs.h"
1502#include <alloca.h>
1503int main() {
1504char *p = alloca(2 * sizeof(int));
1505; return 0; }
1506EOF
a534e424 1507if { (eval echo configure:1508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1508 rm -rf conftest*
1509 ac_cv_header_alloca_h=yes
1510else
1511 echo "configure: failed program was:" >&5
1512 cat conftest.$ac_ext >&5
1513 rm -rf conftest*
1514 ac_cv_header_alloca_h=no
1515fi
1516rm -f conftest*
1517fi
1518
1519echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1520if test $ac_cv_header_alloca_h = yes; then
1521 cat >> confdefs.h <<\EOF
1522#define HAVE_ALLOCA_H 1
1523EOF
1524
1525fi
1526
1527echo $ac_n "checking for alloca""... $ac_c" 1>&6
a534e424 1528echo "configure:1529: checking for alloca" >&5
c906108c
SS
1529if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1530 echo $ac_n "(cached) $ac_c" 1>&6
1531else
1532 cat > conftest.$ac_ext <<EOF
a534e424 1533#line 1534 "configure"
c906108c
SS
1534#include "confdefs.h"
1535
1536#ifdef __GNUC__
1537# define alloca __builtin_alloca
1538#else
1539# ifdef _MSC_VER
1540# include <malloc.h>
1541# define alloca _alloca
1542# else
1543# if HAVE_ALLOCA_H
1544# include <alloca.h>
1545# else
1546# ifdef _AIX
1547 #pragma alloca
1548# else
1549# ifndef alloca /* predefined by HP cc +Olibcalls */
1550char *alloca ();
1551# endif
1552# endif
1553# endif
1554# endif
1555#endif
1556
1557int main() {
1558char *p = (char *) alloca(1);
1559; return 0; }
1560EOF
a534e424 1561if { (eval echo configure:1562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1562 rm -rf conftest*
1563 ac_cv_func_alloca_works=yes
1564else
1565 echo "configure: failed program was:" >&5
1566 cat conftest.$ac_ext >&5
1567 rm -rf conftest*
1568 ac_cv_func_alloca_works=no
1569fi
1570rm -f conftest*
1571fi
1572
1573echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1574if test $ac_cv_func_alloca_works = yes; then
1575 cat >> confdefs.h <<\EOF
1576#define HAVE_ALLOCA 1
1577EOF
1578
1579fi
1580
1581if test $ac_cv_func_alloca_works = no; then
1582 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1583 # that cause trouble. Some versions do not even contain alloca or
1584 # contain a buggy version. If you still want to use their alloca,
1585 # use ar to extract alloca.o from them instead of compiling alloca.c.
1586 ALLOCA=alloca.${ac_objext}
1587 cat >> confdefs.h <<\EOF
1588#define C_ALLOCA 1
1589EOF
1590
1591
1592echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
a534e424 1593echo "configure:1594: checking whether alloca needs Cray hooks" >&5
c906108c
SS
1594if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1595 echo $ac_n "(cached) $ac_c" 1>&6
1596else
1597 cat > conftest.$ac_ext <<EOF
a534e424 1598#line 1599 "configure"
c906108c
SS
1599#include "confdefs.h"
1600#if defined(CRAY) && ! defined(CRAY2)
1601webecray
1602#else
1603wenotbecray
1604#endif
1605
1606EOF
1607if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1608 egrep "webecray" >/dev/null 2>&1; then
1609 rm -rf conftest*
1610 ac_cv_os_cray=yes
1611else
1612 rm -rf conftest*
1613 ac_cv_os_cray=no
1614fi
1615rm -f conftest*
1616
1617fi
1618
1619echo "$ac_t""$ac_cv_os_cray" 1>&6
1620if test $ac_cv_os_cray = yes; then
1621for ac_func in _getb67 GETB67 getb67; do
1622 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 1623echo "configure:1624: checking for $ac_func" >&5
c906108c
SS
1624if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
1626else
1627 cat > conftest.$ac_ext <<EOF
a534e424 1628#line 1629 "configure"
c906108c
SS
1629#include "confdefs.h"
1630/* System header to define __stub macros and hopefully few prototypes,
1631 which can conflict with char $ac_func(); below. */
1632#include <assert.h>
1633/* Override any gcc2 internal prototype to avoid an error. */
1634/* We use char because int might match the return type of a gcc2
1635 builtin and then its argument prototype would still apply. */
1636char $ac_func();
1637
1638int main() {
1639
1640/* The GNU C library defines this for functions which it implements
1641 to always fail with ENOSYS. Some functions are actually named
1642 something starting with __ and the normal name is an alias. */
1643#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1644choke me
1645#else
1646$ac_func();
1647#endif
1648
1649; return 0; }
1650EOF
a534e424 1651if { (eval echo configure:1652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1652 rm -rf conftest*
1653 eval "ac_cv_func_$ac_func=yes"
1654else
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1657 rm -rf conftest*
1658 eval "ac_cv_func_$ac_func=no"
1659fi
1660rm -f conftest*
1661fi
1662
1663if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1664 echo "$ac_t""yes" 1>&6
1665 cat >> confdefs.h <<EOF
1666#define CRAY_STACKSEG_END $ac_func
1667EOF
1668
1669 break
1670else
1671 echo "$ac_t""no" 1>&6
1672fi
1673
1674done
1675fi
1676
1677echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
a534e424 1678echo "configure:1679: checking stack direction for C alloca" >&5
c906108c
SS
1679if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681else
1682 if test "$cross_compiling" = yes; then
1683 ac_cv_c_stack_direction=0
1684else
1685 cat > conftest.$ac_ext <<EOF
a534e424 1686#line 1687 "configure"
c906108c
SS
1687#include "confdefs.h"
1688find_stack_direction ()
1689{
1690 static char *addr = 0;
1691 auto char dummy;
1692 if (addr == 0)
1693 {
1694 addr = &dummy;
1695 return find_stack_direction ();
1696 }
1697 else
1698 return (&dummy > addr) ? 1 : -1;
1699}
1700main ()
1701{
1702 exit (find_stack_direction() < 0);
1703}
1704EOF
a534e424 1705if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1706then
1707 ac_cv_c_stack_direction=1
1708else
1709 echo "configure: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 rm -fr conftest*
1712 ac_cv_c_stack_direction=-1
1713fi
1714rm -fr conftest*
1715fi
1716
1717fi
1718
1719echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1720cat >> confdefs.h <<EOF
1721#define STACK_DIRECTION $ac_cv_c_stack_direction
1722EOF
1723
1724fi
1725
a534e424 1726for ac_hdr in unistd.h
c906108c
SS
1727do
1728ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1729echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 1730echo "configure:1731: checking for $ac_hdr" >&5
c906108c
SS
1731if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1733else
1734 cat > conftest.$ac_ext <<EOF
a534e424 1735#line 1736 "configure"
c906108c
SS
1736#include "confdefs.h"
1737#include <$ac_hdr>
1738EOF
1739ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 1740{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
1741ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1742if test -z "$ac_err"; then
1743 rm -rf conftest*
1744 eval "ac_cv_header_$ac_safe=yes"
1745else
1746 echo "$ac_err" >&5
1747 echo "configure: failed program was:" >&5
1748 cat conftest.$ac_ext >&5
1749 rm -rf conftest*
1750 eval "ac_cv_header_$ac_safe=no"
1751fi
1752rm -f conftest*
1753fi
1754if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1755 echo "$ac_t""yes" 1>&6
1756 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1757 cat >> confdefs.h <<EOF
1758#define $ac_tr_hdr 1
1759EOF
1760
1761else
1762 echo "$ac_t""no" 1>&6
1763fi
1764done
1765
1766for ac_func in getpagesize
1767do
1768echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 1769echo "configure:1770: checking for $ac_func" >&5
c906108c
SS
1770if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1771 echo $ac_n "(cached) $ac_c" 1>&6
1772else
1773 cat > conftest.$ac_ext <<EOF
a534e424 1774#line 1775 "configure"
c906108c
SS
1775#include "confdefs.h"
1776/* System header to define __stub macros and hopefully few prototypes,
1777 which can conflict with char $ac_func(); below. */
1778#include <assert.h>
1779/* Override any gcc2 internal prototype to avoid an error. */
1780/* We use char because int might match the return type of a gcc2
1781 builtin and then its argument prototype would still apply. */
1782char $ac_func();
1783
1784int main() {
1785
1786/* The GNU C library defines this for functions which it implements
1787 to always fail with ENOSYS. Some functions are actually named
1788 something starting with __ and the normal name is an alias. */
1789#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1790choke me
1791#else
1792$ac_func();
1793#endif
1794
1795; return 0; }
1796EOF
a534e424 1797if { (eval echo configure:1798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
1798 rm -rf conftest*
1799 eval "ac_cv_func_$ac_func=yes"
1800else
1801 echo "configure: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 rm -rf conftest*
1804 eval "ac_cv_func_$ac_func=no"
1805fi
1806rm -f conftest*
1807fi
1808
1809if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1810 echo "$ac_t""yes" 1>&6
1811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1812 cat >> confdefs.h <<EOF
1813#define $ac_tr_func 1
1814EOF
1815
1816else
1817 echo "$ac_t""no" 1>&6
1818fi
1819done
1820
1821echo $ac_n "checking for working mmap""... $ac_c" 1>&6
a534e424 1822echo "configure:1823: checking for working mmap" >&5
c906108c
SS
1823if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825else
1826 if test "$cross_compiling" = yes; then
1827 ac_cv_func_mmap_fixed_mapped=no
1828else
1829 cat > conftest.$ac_ext <<EOF
a534e424 1830#line 1831 "configure"
c906108c
SS
1831#include "confdefs.h"
1832
1833/* Thanks to Mike Haertel and Jim Avera for this test.
1834 Here is a matrix of mmap possibilities:
1835 mmap private not fixed
1836 mmap private fixed at somewhere currently unmapped
1837 mmap private fixed at somewhere already mapped
1838 mmap shared not fixed
1839 mmap shared fixed at somewhere currently unmapped
1840 mmap shared fixed at somewhere already mapped
1841 For private mappings, we should verify that changes cannot be read()
1842 back from the file, nor mmap's back from the file at a different
1843 address. (There have been systems where private was not correctly
1844 implemented like the infamous i386 svr4.0, and systems where the
1845 VM page cache was not coherent with the filesystem buffer cache
1846 like early versions of FreeBSD and possibly contemporary NetBSD.)
1847 For shared mappings, we should conversely verify that changes get
1848 propogated back to all the places they're supposed to be.
1849
1850 Grep wants private fixed already mapped.
1851 The main things grep needs to know about mmap are:
1852 * does it exist and is it safe to write into the mmap'd area
1853 * how to use it (BSD variants) */
1854#include <sys/types.h>
1855#include <fcntl.h>
1856#include <sys/mman.h>
1857
1858/* This mess was copied from the GNU getpagesize.h. */
1859#ifndef HAVE_GETPAGESIZE
a534e424
AC
1860# ifdef HAVE_UNISTD_H
1861# include <unistd.h>
1862# endif
c906108c
SS
1863
1864/* Assume that all systems that can run configure have sys/param.h. */
1865# ifndef HAVE_SYS_PARAM_H
1866# define HAVE_SYS_PARAM_H 1
1867# endif
1868
1869# ifdef _SC_PAGESIZE
1870# define getpagesize() sysconf(_SC_PAGESIZE)
1871# else /* no _SC_PAGESIZE */
1872# ifdef HAVE_SYS_PARAM_H
1873# include <sys/param.h>
1874# ifdef EXEC_PAGESIZE
1875# define getpagesize() EXEC_PAGESIZE
1876# else /* no EXEC_PAGESIZE */
1877# ifdef NBPG
1878# define getpagesize() NBPG * CLSIZE
1879# ifndef CLSIZE
1880# define CLSIZE 1
1881# endif /* no CLSIZE */
1882# else /* no NBPG */
1883# ifdef NBPC
1884# define getpagesize() NBPC
1885# else /* no NBPC */
1886# ifdef PAGESIZE
1887# define getpagesize() PAGESIZE
1888# endif /* PAGESIZE */
1889# endif /* no NBPC */
1890# endif /* no NBPG */
1891# endif /* no EXEC_PAGESIZE */
1892# else /* no HAVE_SYS_PARAM_H */
1893# define getpagesize() 8192 /* punt totally */
1894# endif /* no HAVE_SYS_PARAM_H */
1895# endif /* no _SC_PAGESIZE */
1896
1897#endif /* no HAVE_GETPAGESIZE */
1898
1899#ifdef __cplusplus
1900extern "C" { void *malloc(unsigned); }
1901#else
1902char *malloc();
1903#endif
1904
1905int
1906main()
1907{
1908 char *data, *data2, *data3;
1909 int i, pagesize;
1910 int fd;
1911
1912 pagesize = getpagesize();
1913
1914 /*
1915 * First, make a file with some known garbage in it.
1916 */
1917 data = malloc(pagesize);
1918 if (!data)
1919 exit(1);
1920 for (i = 0; i < pagesize; ++i)
1921 *(data + i) = rand();
1922 umask(0);
1923 fd = creat("conftestmmap", 0600);
1924 if (fd < 0)
1925 exit(1);
1926 if (write(fd, data, pagesize) != pagesize)
1927 exit(1);
1928 close(fd);
1929
1930 /*
1931 * Next, try to mmap the file at a fixed address which
1932 * already has something else allocated at it. If we can,
1933 * also make sure that we see the same garbage.
1934 */
1935 fd = open("conftestmmap", O_RDWR);
1936 if (fd < 0)
1937 exit(1);
1938 data2 = malloc(2 * pagesize);
1939 if (!data2)
1940 exit(1);
1941 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1942 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1943 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1944 exit(1);
1945 for (i = 0; i < pagesize; ++i)
1946 if (*(data + i) != *(data2 + i))
1947 exit(1);
1948
1949 /*
1950 * Finally, make sure that changes to the mapped area
1951 * do not percolate back to the file as seen by read().
1952 * (This is a bug on some variants of i386 svr4.0.)
1953 */
1954 for (i = 0; i < pagesize; ++i)
1955 *(data2 + i) = *(data2 + i) + 1;
1956 data3 = malloc(pagesize);
1957 if (!data3)
1958 exit(1);
1959 if (read(fd, data3, pagesize) != pagesize)
1960 exit(1);
1961 for (i = 0; i < pagesize; ++i)
1962 if (*(data + i) != *(data3 + i))
1963 exit(1);
1964 close(fd);
1965 unlink("conftestmmap");
1966 exit(0);
1967}
1968
1969EOF
a534e424 1970if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
1971then
1972 ac_cv_func_mmap_fixed_mapped=yes
1973else
1974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -fr conftest*
1977 ac_cv_func_mmap_fixed_mapped=no
1978fi
1979rm -fr conftest*
1980fi
1981
1982fi
1983
1984echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1985if test $ac_cv_func_mmap_fixed_mapped = yes; then
1986 cat >> confdefs.h <<\EOF
1987#define HAVE_MMAP 1
1988EOF
1989
1990fi
1991
1992
1993 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1994unistd.h values.h sys/param.h
1995do
1996ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1997echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
a534e424 1998echo "configure:1999: checking for $ac_hdr" >&5
c906108c
SS
1999if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2000 echo $ac_n "(cached) $ac_c" 1>&6
2001else
2002 cat > conftest.$ac_ext <<EOF
a534e424 2003#line 2004 "configure"
c906108c
SS
2004#include "confdefs.h"
2005#include <$ac_hdr>
2006EOF
2007ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2008{ (eval echo configure:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2009ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2010if test -z "$ac_err"; then
2011 rm -rf conftest*
2012 eval "ac_cv_header_$ac_safe=yes"
2013else
2014 echo "$ac_err" >&5
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 rm -rf conftest*
2018 eval "ac_cv_header_$ac_safe=no"
2019fi
2020rm -f conftest*
2021fi
2022if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2023 echo "$ac_t""yes" 1>&6
2024 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2025 cat >> confdefs.h <<EOF
2026#define $ac_tr_hdr 1
2027EOF
2028
2029else
2030 echo "$ac_t""no" 1>&6
2031fi
2032done
2033
2034 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2035__argz_count __argz_stringify __argz_next
2036do
2037echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2038echo "configure:2039: checking for $ac_func" >&5
c906108c
SS
2039if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2040 echo $ac_n "(cached) $ac_c" 1>&6
2041else
2042 cat > conftest.$ac_ext <<EOF
a534e424 2043#line 2044 "configure"
c906108c
SS
2044#include "confdefs.h"
2045/* System header to define __stub macros and hopefully few prototypes,
2046 which can conflict with char $ac_func(); below. */
2047#include <assert.h>
2048/* Override any gcc2 internal prototype to avoid an error. */
2049/* We use char because int might match the return type of a gcc2
2050 builtin and then its argument prototype would still apply. */
2051char $ac_func();
2052
2053int main() {
2054
2055/* The GNU C library defines this for functions which it implements
2056 to always fail with ENOSYS. Some functions are actually named
2057 something starting with __ and the normal name is an alias. */
2058#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2059choke me
2060#else
2061$ac_func();
2062#endif
2063
2064; return 0; }
2065EOF
a534e424 2066if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2067 rm -rf conftest*
2068 eval "ac_cv_func_$ac_func=yes"
2069else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -rf conftest*
2073 eval "ac_cv_func_$ac_func=no"
2074fi
2075rm -f conftest*
2076fi
2077
2078if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2079 echo "$ac_t""yes" 1>&6
2080 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2081 cat >> confdefs.h <<EOF
2082#define $ac_tr_func 1
2083EOF
2084
2085else
2086 echo "$ac_t""no" 1>&6
2087fi
2088done
2089
2090
2091 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2092 for ac_func in stpcpy
2093do
2094echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2095echo "configure:2096: checking for $ac_func" >&5
c906108c
SS
2096if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2097 echo $ac_n "(cached) $ac_c" 1>&6
2098else
2099 cat > conftest.$ac_ext <<EOF
a534e424 2100#line 2101 "configure"
c906108c
SS
2101#include "confdefs.h"
2102/* System header to define __stub macros and hopefully few prototypes,
2103 which can conflict with char $ac_func(); below. */
2104#include <assert.h>
2105/* Override any gcc2 internal prototype to avoid an error. */
2106/* We use char because int might match the return type of a gcc2
2107 builtin and then its argument prototype would still apply. */
2108char $ac_func();
2109
2110int main() {
2111
2112/* The GNU C library defines this for functions which it implements
2113 to always fail with ENOSYS. Some functions are actually named
2114 something starting with __ and the normal name is an alias. */
2115#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2116choke me
2117#else
2118$ac_func();
2119#endif
2120
2121; return 0; }
2122EOF
a534e424 2123if { (eval echo configure:2124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2124 rm -rf conftest*
2125 eval "ac_cv_func_$ac_func=yes"
2126else
2127 echo "configure: failed program was:" >&5
2128 cat conftest.$ac_ext >&5
2129 rm -rf conftest*
2130 eval "ac_cv_func_$ac_func=no"
2131fi
2132rm -f conftest*
2133fi
2134
2135if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2136 echo "$ac_t""yes" 1>&6
2137 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2138 cat >> confdefs.h <<EOF
2139#define $ac_tr_func 1
2140EOF
2141
2142else
2143 echo "$ac_t""no" 1>&6
2144fi
2145done
2146
2147 fi
2148 if test "${ac_cv_func_stpcpy}" = "yes"; then
2149 cat >> confdefs.h <<\EOF
2150#define HAVE_STPCPY 1
2151EOF
2152
2153 fi
2154
2155 if test $ac_cv_header_locale_h = yes; then
2156 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
a534e424 2157echo "configure:2158: checking for LC_MESSAGES" >&5
c906108c
SS
2158if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2159 echo $ac_n "(cached) $ac_c" 1>&6
2160else
2161 cat > conftest.$ac_ext <<EOF
a534e424 2162#line 2163 "configure"
c906108c
SS
2163#include "confdefs.h"
2164#include <locale.h>
2165int main() {
2166return LC_MESSAGES
2167; return 0; }
2168EOF
a534e424 2169if { (eval echo configure:2170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2170 rm -rf conftest*
2171 am_cv_val_LC_MESSAGES=yes
2172else
2173 echo "configure: failed program was:" >&5
2174 cat conftest.$ac_ext >&5
2175 rm -rf conftest*
2176 am_cv_val_LC_MESSAGES=no
2177fi
2178rm -f conftest*
2179fi
2180
2181echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2182 if test $am_cv_val_LC_MESSAGES = yes; then
2183 cat >> confdefs.h <<\EOF
2184#define HAVE_LC_MESSAGES 1
2185EOF
2186
2187 fi
2188 fi
2189 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
a534e424 2190echo "configure:2191: checking whether NLS is requested" >&5
c906108c
SS
2191 # Check whether --enable-nls or --disable-nls was given.
2192if test "${enable_nls+set}" = set; then
2193 enableval="$enable_nls"
2194 USE_NLS=$enableval
2195else
2196 USE_NLS=yes
2197fi
2198
2199 echo "$ac_t""$USE_NLS" 1>&6
2200
2201
2202 USE_INCLUDED_LIBINTL=no
2203
2204 if test "$USE_NLS" = "yes"; then
2205 cat >> confdefs.h <<\EOF
2206#define ENABLE_NLS 1
2207EOF
2208
2209 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
a534e424 2210echo "configure:2211: checking whether included gettext is requested" >&5
c906108c
SS
2211 # Check whether --with-included-gettext or --without-included-gettext was given.
2212if test "${with_included_gettext+set}" = set; then
2213 withval="$with_included_gettext"
2214 nls_cv_force_use_gnu_gettext=$withval
2215else
2216 nls_cv_force_use_gnu_gettext=no
2217fi
2218
2219 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2220
2221 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2222 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2223 nls_cv_header_intl=
2224 nls_cv_header_libgt=
2225 CATOBJEXT=NONE
2226
2227 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2228echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
a534e424 2229echo "configure:2230: checking for libintl.h" >&5
c906108c
SS
2230if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2231 echo $ac_n "(cached) $ac_c" 1>&6
2232else
2233 cat > conftest.$ac_ext <<EOF
a534e424 2234#line 2235 "configure"
c906108c
SS
2235#include "confdefs.h"
2236#include <libintl.h>
2237EOF
2238ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2239{ (eval echo configure:2240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2240ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2241if test -z "$ac_err"; then
2242 rm -rf conftest*
2243 eval "ac_cv_header_$ac_safe=yes"
2244else
2245 echo "$ac_err" >&5
2246 echo "configure: failed program was:" >&5
2247 cat conftest.$ac_ext >&5
2248 rm -rf conftest*
2249 eval "ac_cv_header_$ac_safe=no"
2250fi
2251rm -f conftest*
2252fi
2253if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2254 echo "$ac_t""yes" 1>&6
2255 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
a534e424 2256echo "configure:2257: checking for gettext in libc" >&5
c906108c
SS
2257if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2258 echo $ac_n "(cached) $ac_c" 1>&6
2259else
2260 cat > conftest.$ac_ext <<EOF
a534e424 2261#line 2262 "configure"
c906108c
SS
2262#include "confdefs.h"
2263#include <libintl.h>
2264int main() {
2265return (int) gettext ("")
2266; return 0; }
2267EOF
a534e424 2268if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2269 rm -rf conftest*
2270 gt_cv_func_gettext_libc=yes
2271else
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2274 rm -rf conftest*
2275 gt_cv_func_gettext_libc=no
2276fi
2277rm -f conftest*
2278fi
2279
2280echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2281
2282 if test "$gt_cv_func_gettext_libc" != "yes"; then
2283 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
a534e424 2284echo "configure:2285: checking for bindtextdomain in -lintl" >&5
c906108c
SS
2285ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2287 echo $ac_n "(cached) $ac_c" 1>&6
2288else
2289 ac_save_LIBS="$LIBS"
2290LIBS="-lintl $LIBS"
2291cat > conftest.$ac_ext <<EOF
a534e424 2292#line 2293 "configure"
c906108c
SS
2293#include "confdefs.h"
2294/* Override any gcc2 internal prototype to avoid an error. */
2295/* We use char because int might match the return type of a gcc2
2296 builtin and then its argument prototype would still apply. */
2297char bindtextdomain();
2298
2299int main() {
2300bindtextdomain()
2301; return 0; }
2302EOF
a534e424 2303if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2304 rm -rf conftest*
2305 eval "ac_cv_lib_$ac_lib_var=yes"
2306else
2307 echo "configure: failed program was:" >&5
2308 cat conftest.$ac_ext >&5
2309 rm -rf conftest*
2310 eval "ac_cv_lib_$ac_lib_var=no"
2311fi
2312rm -f conftest*
2313LIBS="$ac_save_LIBS"
2314
2315fi
2316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2317 echo "$ac_t""yes" 1>&6
2318 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
a534e424 2319echo "configure:2320: checking for gettext in libintl" >&5
c906108c
SS
2320if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2321 echo $ac_n "(cached) $ac_c" 1>&6
2322else
2323 cat > conftest.$ac_ext <<EOF
a534e424 2324#line 2325 "configure"
c906108c
SS
2325#include "confdefs.h"
2326
2327int main() {
2328return (int) gettext ("")
2329; return 0; }
2330EOF
a534e424 2331if { (eval echo configure:2332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2332 rm -rf conftest*
2333 gt_cv_func_gettext_libintl=yes
2334else
2335 echo "configure: failed program was:" >&5
2336 cat conftest.$ac_ext >&5
2337 rm -rf conftest*
2338 gt_cv_func_gettext_libintl=no
2339fi
2340rm -f conftest*
2341fi
2342
2343echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2344else
2345 echo "$ac_t""no" 1>&6
2346fi
2347
2348 fi
2349
2350 if test "$gt_cv_func_gettext_libc" = "yes" \
2351 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2352 cat >> confdefs.h <<\EOF
2353#define HAVE_GETTEXT 1
2354EOF
2355
2356 # Extract the first word of "msgfmt", so it can be a program name with args.
2357set dummy msgfmt; ac_word=$2
2358echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2359echo "configure:2360: checking for $ac_word" >&5
c906108c
SS
2360if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362else
2363 case "$MSGFMT" in
2364 /*)
2365 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2366 ;;
2367 *)
2368 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2369 for ac_dir in $PATH; do
2370 test -z "$ac_dir" && ac_dir=.
2371 if test -f $ac_dir/$ac_word; then
2372 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2373 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2374 break
2375 fi
2376 fi
2377 done
2378 IFS="$ac_save_ifs"
2379 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2380 ;;
2381esac
2382fi
2383MSGFMT="$ac_cv_path_MSGFMT"
2384if test -n "$MSGFMT"; then
2385 echo "$ac_t""$MSGFMT" 1>&6
2386else
2387 echo "$ac_t""no" 1>&6
2388fi
2389 if test "$MSGFMT" != "no"; then
2390 for ac_func in dcgettext
2391do
2392echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
a534e424 2393echo "configure:2394: checking for $ac_func" >&5
c906108c
SS
2394if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2396else
2397 cat > conftest.$ac_ext <<EOF
a534e424 2398#line 2399 "configure"
c906108c
SS
2399#include "confdefs.h"
2400/* System header to define __stub macros and hopefully few prototypes,
2401 which can conflict with char $ac_func(); below. */
2402#include <assert.h>
2403/* Override any gcc2 internal prototype to avoid an error. */
2404/* We use char because int might match the return type of a gcc2
2405 builtin and then its argument prototype would still apply. */
2406char $ac_func();
2407
2408int main() {
2409
2410/* The GNU C library defines this for functions which it implements
2411 to always fail with ENOSYS. Some functions are actually named
2412 something starting with __ and the normal name is an alias. */
2413#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2414choke me
2415#else
2416$ac_func();
2417#endif
2418
2419; return 0; }
2420EOF
a534e424 2421if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2422 rm -rf conftest*
2423 eval "ac_cv_func_$ac_func=yes"
2424else
2425 echo "configure: failed program was:" >&5
2426 cat conftest.$ac_ext >&5
2427 rm -rf conftest*
2428 eval "ac_cv_func_$ac_func=no"
2429fi
2430rm -f conftest*
2431fi
2432
2433if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2434 echo "$ac_t""yes" 1>&6
2435 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2436 cat >> confdefs.h <<EOF
2437#define $ac_tr_func 1
2438EOF
2439
2440else
2441 echo "$ac_t""no" 1>&6
2442fi
2443done
2444
2445 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2446set dummy gmsgfmt; ac_word=$2
2447echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2448echo "configure:2449: checking for $ac_word" >&5
c906108c
SS
2449if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451else
2452 case "$GMSGFMT" in
2453 /*)
2454 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2455 ;;
2456 ?:/*)
2457 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2458 ;;
2459 *)
2460 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2461 ac_dummy="$PATH"
2462 for ac_dir in $ac_dummy; do
2463 test -z "$ac_dir" && ac_dir=.
2464 if test -f $ac_dir/$ac_word; then
2465 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2466 break
2467 fi
2468 done
2469 IFS="$ac_save_ifs"
2470 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2471 ;;
2472esac
2473fi
2474GMSGFMT="$ac_cv_path_GMSGFMT"
2475if test -n "$GMSGFMT"; then
2476 echo "$ac_t""$GMSGFMT" 1>&6
2477else
2478 echo "$ac_t""no" 1>&6
2479fi
2480
2481 # Extract the first word of "xgettext", so it can be a program name with args.
2482set dummy xgettext; ac_word=$2
2483echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2484echo "configure:2485: checking for $ac_word" >&5
c906108c
SS
2485if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2486 echo $ac_n "(cached) $ac_c" 1>&6
2487else
2488 case "$XGETTEXT" in
2489 /*)
2490 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2491 ;;
2492 *)
2493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2494 for ac_dir in $PATH; do
2495 test -z "$ac_dir" && ac_dir=.
2496 if test -f $ac_dir/$ac_word; then
2497 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2498 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2499 break
2500 fi
2501 fi
2502 done
2503 IFS="$ac_save_ifs"
2504 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2505 ;;
2506esac
2507fi
2508XGETTEXT="$ac_cv_path_XGETTEXT"
2509if test -n "$XGETTEXT"; then
2510 echo "$ac_t""$XGETTEXT" 1>&6
2511else
2512 echo "$ac_t""no" 1>&6
2513fi
2514
2515 cat > conftest.$ac_ext <<EOF
a534e424 2516#line 2517 "configure"
c906108c
SS
2517#include "confdefs.h"
2518
2519int main() {
2520extern int _nl_msg_cat_cntr;
2521 return _nl_msg_cat_cntr
2522; return 0; }
2523EOF
a534e424 2524if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
2525 rm -rf conftest*
2526 CATOBJEXT=.gmo
2527 DATADIRNAME=share
2528else
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2531 rm -rf conftest*
2532 CATOBJEXT=.mo
2533 DATADIRNAME=lib
2534fi
2535rm -f conftest*
2536 INSTOBJEXT=.mo
2537 fi
2538 fi
2539
2540else
2541 echo "$ac_t""no" 1>&6
2542fi
2543
2544
2545
2546 if test "$CATOBJEXT" = "NONE"; then
2547 nls_cv_use_gnu_gettext=yes
2548 fi
2549 fi
2550
2551 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2552 INTLOBJS="\$(GETTOBJS)"
2553 # Extract the first word of "msgfmt", so it can be a program name with args.
2554set dummy msgfmt; ac_word=$2
2555echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2556echo "configure:2557: checking for $ac_word" >&5
c906108c
SS
2557if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2558 echo $ac_n "(cached) $ac_c" 1>&6
2559else
2560 case "$MSGFMT" in
2561 /*)
2562 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2563 ;;
2564 *)
2565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2566 for ac_dir in $PATH; do
2567 test -z "$ac_dir" && ac_dir=.
2568 if test -f $ac_dir/$ac_word; then
2569 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2570 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2571 break
2572 fi
2573 fi
2574 done
2575 IFS="$ac_save_ifs"
2576 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2577 ;;
2578esac
2579fi
2580MSGFMT="$ac_cv_path_MSGFMT"
2581if test -n "$MSGFMT"; then
2582 echo "$ac_t""$MSGFMT" 1>&6
2583else
2584 echo "$ac_t""no" 1>&6
2585fi
2586
2587 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2588set dummy gmsgfmt; ac_word=$2
2589echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2590echo "configure:2591: checking for $ac_word" >&5
c906108c
SS
2591if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
2593else
2594 case "$GMSGFMT" in
2595 /*)
2596 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2597 ;;
2598 ?:/*)
2599 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2600 ;;
2601 *)
2602 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2603 ac_dummy="$PATH"
2604 for ac_dir in $ac_dummy; do
2605 test -z "$ac_dir" && ac_dir=.
2606 if test -f $ac_dir/$ac_word; then
2607 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2608 break
2609 fi
2610 done
2611 IFS="$ac_save_ifs"
2612 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2613 ;;
2614esac
2615fi
2616GMSGFMT="$ac_cv_path_GMSGFMT"
2617if test -n "$GMSGFMT"; then
2618 echo "$ac_t""$GMSGFMT" 1>&6
2619else
2620 echo "$ac_t""no" 1>&6
2621fi
2622
2623 # Extract the first word of "xgettext", so it can be a program name with args.
2624set dummy xgettext; ac_word=$2
2625echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
a534e424 2626echo "configure:2627: checking for $ac_word" >&5
c906108c
SS
2627if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2629else
2630 case "$XGETTEXT" in
2631 /*)
2632 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2633 ;;
2634 *)
2635 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2636 for ac_dir in $PATH; do
2637 test -z "$ac_dir" && ac_dir=.
2638 if test -f $ac_dir/$ac_word; then
2639 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2640 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2641 break
2642 fi
2643 fi
2644 done
2645 IFS="$ac_save_ifs"
2646 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2647 ;;
2648esac
2649fi
2650XGETTEXT="$ac_cv_path_XGETTEXT"
2651if test -n "$XGETTEXT"; then
2652 echo "$ac_t""$XGETTEXT" 1>&6
2653else
2654 echo "$ac_t""no" 1>&6
2655fi
2656
2657
2658 USE_INCLUDED_LIBINTL=yes
2659 CATOBJEXT=.gmo
2660 INSTOBJEXT=.mo
2661 DATADIRNAME=share
2662 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2663 INTLLIBS=$INTLDEPS
2664 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2665 nls_cv_header_intl=libintl.h
2666 nls_cv_header_libgt=libgettext.h
2667 fi
2668
2669 if test "$XGETTEXT" != ":"; then
2670 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2671 : ;
2672 else
2673 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2674 XGETTEXT=":"
2675 fi
2676 fi
2677
2678 # We need to process the po/ directory.
2679 POSUB=po
2680 else
2681 DATADIRNAME=share
2682 nls_cv_header_intl=libintl.h
2683 nls_cv_header_libgt=libgettext.h
2684 fi
2685
2686 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2687 # because some of the sources are only built for this goal.
2688 if test "$PACKAGE" = gettext; then
2689 USE_NLS=yes
2690 USE_INCLUDED_LIBINTL=yes
2691 fi
2692
2693 for lang in $ALL_LINGUAS; do
2694 GMOFILES="$GMOFILES $lang.gmo"
2695 POFILES="$POFILES $lang.po"
2696 done
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711 if test "x$CATOBJEXT" != "x"; then
2712 if test "x$ALL_LINGUAS" = "x"; then
2713 LINGUAS=
2714 else
2715 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
a534e424 2716echo "configure:2717: checking for catalogs to be installed" >&5
c906108c
SS
2717 NEW_LINGUAS=
2718 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2719 case "$ALL_LINGUAS" in
2720 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2721 esac
2722 done
2723 LINGUAS=$NEW_LINGUAS
2724 echo "$ac_t""$LINGUAS" 1>&6
2725 fi
2726
2727 if test -n "$LINGUAS"; then
2728 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2729 fi
2730 fi
2731
2732 if test $ac_cv_header_locale_h = yes; then
2733 INCLUDE_LOCALE_H="#include <locale.h>"
2734 else
2735 INCLUDE_LOCALE_H="\
2736/* The system does not provide the header <locale.h>. Take care yourself. */"
2737 fi
2738
2739
2740 if test -f $srcdir/po2tbl.sed.in; then
2741 if test "$CATOBJEXT" = ".cat"; then
2742 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2743echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
a534e424 2744echo "configure:2745: checking for linux/version.h" >&5
c906108c
SS
2745if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2746 echo $ac_n "(cached) $ac_c" 1>&6
2747else
2748 cat > conftest.$ac_ext <<EOF
a534e424 2749#line 2750 "configure"
c906108c
SS
2750#include "confdefs.h"
2751#include <linux/version.h>
2752EOF
2753ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
a534e424 2754{ (eval echo configure:2755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
2755ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2756if test -z "$ac_err"; then
2757 rm -rf conftest*
2758 eval "ac_cv_header_$ac_safe=yes"
2759else
2760 echo "$ac_err" >&5
2761 echo "configure: failed program was:" >&5
2762 cat conftest.$ac_ext >&5
2763 rm -rf conftest*
2764 eval "ac_cv_header_$ac_safe=no"
2765fi
2766rm -f conftest*
2767fi
2768if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2769 echo "$ac_t""yes" 1>&6
2770 msgformat=linux
2771else
2772 echo "$ac_t""no" 1>&6
2773msgformat=xopen
2774fi
2775
2776
2777 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2778 fi
2779 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2780 $srcdir/po2tbl.sed.in > po2tbl.sed
2781 fi
2782
2783 if test "$PACKAGE" = "gettext"; then
2784 GT_NO="#NO#"
2785 GT_YES=
2786 else
2787 GT_NO=
2788 GT_YES="#YES#"
2789 fi
2790
2791
2792
2793 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2794
2795
2796 l=
2797
2798
4536bbc6 2799 if test -f $srcdir/po/POTFILES.in; then
c906108c
SS
2800 test -d po || mkdir po
2801 if test "x$srcdir" != "x."; then
2802 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2803 posrcprefix="$srcdir/"
2804 else
2805 posrcprefix="../$srcdir/"
2806 fi
2807 else
2808 posrcprefix="../"
2809 fi
2810 rm -f po/POTFILES
2811 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2812 < $srcdir/po/POTFILES.in > po/POTFILES
2813 fi
2814
0fbb3da7
TT
2815cat >> confdefs.h <<\EOF
2816#define PACKAGE "gdb"
2817EOF
2818
2819
c906108c
SS
2820
2821
2822CONFIG_OBS=
66b965bb 2823CONFIG_LIB_OBS=
c906108c
SS
2824CONFIG_DEPS=
2825CONFIG_SRCS=
fb40c209
AC
2826CONFIG_INITS=
2827ENABLE_CFLAGS=
b3a90332
AC
2828CONFIG_ALL=
2829CONFIG_CLEAN=
e56ac5c3
AC
2830CONFIG_INSTALL=
2831CONFIG_UNINSTALL=
c906108c 2832
ffc6a242 2833SUBDIRS="doc testsuite nlm"
c906108c
SS
2834configdirs="doc testsuite"
2835
96baa820
JM
2836# Check whether --enable-multi-ice or --disable-multi-ice was given.
2837if test "${enable_multi_ice+set}" = set; then
2838 enableval="$enable_multi_ice"
2839 case "${enableval}" in
2840 yes ) enable_multi_ice="yes" ;;
2841 no) enable_multi_ice="no" ;;
2842 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2843 esac
2844
2845fi
2846
2847
2848if test "${enable_multi_ice}" = "yes"; then
2849 configdirs="${configdirs} multi-ice"
2850fi
2851
c906108c
SS
2852
2853. ${srcdir}/configure.host
2854
2855. ${srcdir}/configure.tgt
2856
1ba607ad
AC
2857targ=${target} ; . ${srcdir}/../bfd/config.bfd
2858
2859
2860targ=${target}
2861. ${srcdir}/../bfd/config.bfd
5c8cc331
AC
2862
2863targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2864
1ba607ad
AC
2865if test x"${targ_archs}" != x ; then
2866 cat >> confdefs.h <<EOF
2867#define DEFAULT_BFD_ARCH ${targ_archs}
2868EOF
2869
2870fi
2871if test x"${targ_defvec}" != x ; then
2872 cat >> confdefs.h <<EOF
2873#define DEFAULT_BFD_VEC ${targ_defvec}
2874EOF
2875
2876fi
c906108c 2877
a534e424 2878for ac_prog in mawk gawk nawk awk
7a292a7a
SS
2879do
2880# Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 2883echo "configure:2884: checking for $ac_word" >&5
7a292a7a
SS
2884if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2885 echo $ac_n "(cached) $ac_c" 1>&6
2886else
2887 if test -n "$AWK"; then
2888 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2889else
2890 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2891 ac_dummy="$PATH"
2892 for ac_dir in $ac_dummy; do
2893 test -z "$ac_dir" && ac_dir=.
2894 if test -f $ac_dir/$ac_word; then
2895 ac_cv_prog_AWK="$ac_prog"
2896 break
2897 fi
2898 done
2899 IFS="$ac_save_ifs"
2900fi
2901fi
2902AWK="$ac_cv_prog_AWK"
2903if test -n "$AWK"; then
2904 echo "$ac_t""$AWK" 1>&6
2905else
2906 echo "$ac_t""no" 1>&6
2907fi
2908
2909test -n "$AWK" && break
2910done
2911
c906108c
SS
2912# Find a good install program. We prefer a C program (faster),
2913# so one script is as good as another. But avoid the broken or
2914# incompatible versions:
2915# SysV /etc/install, /usr/sbin/install
2916# SunOS /usr/etc/install
2917# IRIX /sbin/install
2918# AIX /bin/install
2919# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2920# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2921# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2922# ./install, which can be erroneously created by make from ./install.sh.
2923echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
ffc6a242 2924echo "configure:2925: checking for a BSD compatible install" >&5
c906108c
SS
2925if test -z "$INSTALL"; then
2926if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2927 echo $ac_n "(cached) $ac_c" 1>&6
2928else
2929 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2930 for ac_dir in $PATH; do
2931 # Account for people who put trailing slashes in PATH elements.
2932 case "$ac_dir/" in
2933 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2934 *)
2935 # OSF1 and SCO ODT 3.0 have their own names for install.
2936 # Don't use installbsd from OSF since it installs stuff as root
2937 # by default.
2938 for ac_prog in ginstall scoinst install; do
2939 if test -f $ac_dir/$ac_prog; then
2940 if test $ac_prog = install &&
2941 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2942 # AIX install. It has an incompatible calling convention.
2943 :
2944 else
2945 ac_cv_path_install="$ac_dir/$ac_prog -c"
2946 break 2
2947 fi
2948 fi
2949 done
2950 ;;
2951 esac
2952 done
2953 IFS="$ac_save_IFS"
2954
2955fi
2956 if test "${ac_cv_path_install+set}" = set; then
2957 INSTALL="$ac_cv_path_install"
2958 else
2959 # As a last resort, use the slow shell script. We don't cache a
2960 # path for INSTALL within a source directory, because that will
2961 # break other packages using the cache if that directory is
2962 # removed, or if the path is relative.
2963 INSTALL="$ac_install_sh"
2964 fi
2965fi
2966echo "$ac_t""$INSTALL" 1>&6
2967
2968# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2969# It thinks the first close brace ends the variable substitution.
2970test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2971
2972test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2973
2974test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2975
2976if test $host != $build; then
2977 ac_tool_prefix=${host_alias}-
2978else
2979 ac_tool_prefix=
2980fi
2981
2982# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2983set dummy ${ac_tool_prefix}ar; ac_word=$2
2984echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 2985echo "configure:2986: checking for $ac_word" >&5
c906108c
SS
2986if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
2988else
2989 if test -n "$AR"; then
2990 ac_cv_prog_AR="$AR" # Let the user override the test.
2991else
2992 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2993 ac_dummy="$PATH"
2994 for ac_dir in $ac_dummy; do
2995 test -z "$ac_dir" && ac_dir=.
2996 if test -f $ac_dir/$ac_word; then
2997 ac_cv_prog_AR="${ac_tool_prefix}ar"
2998 break
2999 fi
3000 done
3001 IFS="$ac_save_ifs"
3002 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3003fi
3004fi
3005AR="$ac_cv_prog_AR"
3006if test -n "$AR"; then
3007 echo "$ac_t""$AR" 1>&6
3008else
3009 echo "$ac_t""no" 1>&6
3010fi
3011
3012
3013
3014# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3015set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3016echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3017echo "configure:3018: checking for $ac_word" >&5
c906108c
SS
3018if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3019 echo $ac_n "(cached) $ac_c" 1>&6
3020else
3021 if test -n "$RANLIB"; then
3022 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3023else
3024 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3025 ac_dummy="$PATH"
3026 for ac_dir in $ac_dummy; do
3027 test -z "$ac_dir" && ac_dir=.
3028 if test -f $ac_dir/$ac_word; then
3029 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3030 break
3031 fi
3032 done
3033 IFS="$ac_save_ifs"
3034fi
3035fi
3036RANLIB="$ac_cv_prog_RANLIB"
3037if test -n "$RANLIB"; then
3038 echo "$ac_t""$RANLIB" 1>&6
3039else
3040 echo "$ac_t""no" 1>&6
3041fi
3042
3043
3044if test -z "$ac_cv_prog_RANLIB"; then
3045if test -n "$ac_tool_prefix"; then
3046 # Extract the first word of "ranlib", so it can be a program name with args.
3047set dummy ranlib; ac_word=$2
3048echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3049echo "configure:3050: checking for $ac_word" >&5
c906108c
SS
3050if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3051 echo $ac_n "(cached) $ac_c" 1>&6
3052else
3053 if test -n "$RANLIB"; then
3054 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3055else
3056 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3057 ac_dummy="$PATH"
3058 for ac_dir in $ac_dummy; do
3059 test -z "$ac_dir" && ac_dir=.
3060 if test -f $ac_dir/$ac_word; then
3061 ac_cv_prog_RANLIB="ranlib"
3062 break
3063 fi
3064 done
3065 IFS="$ac_save_ifs"
3066 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3067fi
3068fi
3069RANLIB="$ac_cv_prog_RANLIB"
3070if test -n "$RANLIB"; then
3071 echo "$ac_t""$RANLIB" 1>&6
3072else
3073 echo "$ac_t""no" 1>&6
3074fi
3075
3076else
3077 RANLIB=":"
3078fi
3079fi
3080
95ca63c4
CF
3081# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3082set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3083echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3084echo "configure:3085: checking for $ac_word" >&5
95ca63c4
CF
3085if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3086 echo $ac_n "(cached) $ac_c" 1>&6
3087else
3088 if test -n "$DLLTOOL"; then
3089 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3090else
3091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3092 ac_dummy="$PATH"
3093 for ac_dir in $ac_dummy; do
3094 test -z "$ac_dir" && ac_dir=.
3095 if test -f $ac_dir/$ac_word; then
3096 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3097 break
3098 fi
3099 done
3100 IFS="$ac_save_ifs"
3101 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3102fi
3103fi
3104DLLTOOL="$ac_cv_prog_DLLTOOL"
3105if test -n "$DLLTOOL"; then
3106 echo "$ac_t""$DLLTOOL" 1>&6
3107else
3108 echo "$ac_t""no" 1>&6
3109fi
3110
3111
3112
3113# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3114set dummy ${ac_tool_prefix}windres; ac_word=$2
3115echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3116echo "configure:3117: checking for $ac_word" >&5
95ca63c4
CF
3117if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3118 echo $ac_n "(cached) $ac_c" 1>&6
3119else
3120 if test -n "$WINDRES"; then
3121 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3122else
3123 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3124 ac_dummy="$PATH"
3125 for ac_dir in $ac_dummy; do
3126 test -z "$ac_dir" && ac_dir=.
3127 if test -f $ac_dir/$ac_word; then
3128 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3129 break
3130 fi
3131 done
3132 IFS="$ac_save_ifs"
3133 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3134fi
3135fi
3136WINDRES="$ac_cv_prog_WINDRES"
3137if test -n "$WINDRES"; then
3138 echo "$ac_t""$WINDRES" 1>&6
3139else
3140 echo "$ac_t""no" 1>&6
3141fi
3142
3143
3144
c906108c
SS
3145for ac_prog in 'bison -y' byacc
3146do
3147# Extract the first word of "$ac_prog", so it can be a program name with args.
3148set dummy $ac_prog; ac_word=$2
3149echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3150echo "configure:3151: checking for $ac_word" >&5
c906108c
SS
3151if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3152 echo $ac_n "(cached) $ac_c" 1>&6
3153else
3154 if test -n "$YACC"; then
3155 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3156else
3157 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3158 ac_dummy="$PATH"
3159 for ac_dir in $ac_dummy; do
3160 test -z "$ac_dir" && ac_dir=.
3161 if test -f $ac_dir/$ac_word; then
3162 ac_cv_prog_YACC="$ac_prog"
3163 break
3164 fi
3165 done
3166 IFS="$ac_save_ifs"
3167fi
3168fi
3169YACC="$ac_cv_prog_YACC"
3170if test -n "$YACC"; then
3171 echo "$ac_t""$YACC" 1>&6
3172else
3173 echo "$ac_t""no" 1>&6
3174fi
3175
3176test -n "$YACC" && break
3177done
3178test -n "$YACC" || YACC="yacc"
3179
3180
75c6e08a
MK
3181# Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3182set dummy ${ac_tool_prefix}mig; ac_word=$2
3183echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
ffc6a242 3184echo "configure:3185: checking for $ac_word" >&5
75c6e08a
MK
3185if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3186 echo $ac_n "(cached) $ac_c" 1>&6
3187else
3188 if test -n "$MIG"; then
3189 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3190else
3191 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194 test -z "$ac_dir" && ac_dir=.
3195 if test -f $ac_dir/$ac_word; then
3196 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3197 break
3198 fi
3199 done
3200 IFS="$ac_save_ifs"
3201 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3202fi
3203fi
3204MIG="$ac_cv_prog_MIG"
3205if test -n "$MIG"; then
3206 echo "$ac_t""$MIG" 1>&6
3207else
3208 echo "$ac_t""no" 1>&6
3209fi
3210
3211
3212
3213
c906108c
SS
3214if test "$program_transform_name" = s,x,x,; then
3215 program_transform_name=
3216else
3217 # Double any \ or $. echo might interpret backslashes.
3218 cat <<\EOF_SED > conftestsed
3219s,\\,\\\\,g; s,\$,$$,g
3220EOF_SED
3221 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3222 rm -f conftestsed
3223fi
3224test "$program_prefix" != NONE &&
3225 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3226# Use a double $ so make ignores it.
3227test "$program_suffix" != NONE &&
3228 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3229
3230# sed with no file args requires a program.
3231test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3232
3233
3234echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
ffc6a242 3235echo "configure:3236: checking return type of signal handlers" >&5
c906108c
SS
3236if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3237 echo $ac_n "(cached) $ac_c" 1>&6
3238else
3239 cat > conftest.$ac_ext <<EOF
ffc6a242 3240#line 3241 "configure"
c906108c
SS
3241#include "confdefs.h"
3242#include <sys/types.h>
3243#include <signal.h>
3244#ifdef signal
3245#undef signal
3246#endif
3247#ifdef __cplusplus
3248extern "C" void (*signal (int, void (*)(int)))(int);
3249#else
3250void (*signal ()) ();
3251#endif
3252
3253int main() {
3254int i;
3255; return 0; }
3256EOF
ffc6a242 3257if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3258 rm -rf conftest*
3259 ac_cv_type_signal=void
3260else
3261 echo "configure: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 rm -rf conftest*
3264 ac_cv_type_signal=int
3265fi
3266rm -f conftest*
3267fi
3268
3269echo "$ac_t""$ac_cv_type_signal" 1>&6
3270cat >> confdefs.h <<EOF
3271#define RETSIGTYPE $ac_cv_type_signal
3272EOF
3273
3274
3275
3276echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
ffc6a242 3277echo "configure:3278: checking for ANSI C header files" >&5
c906108c
SS
3278if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3279 echo $ac_n "(cached) $ac_c" 1>&6
3280else
3281 cat > conftest.$ac_ext <<EOF
ffc6a242 3282#line 3283 "configure"
c906108c
SS
3283#include "confdefs.h"
3284#include <stdlib.h>
3285#include <stdarg.h>
3286#include <string.h>
3287#include <float.h>
3288EOF
3289ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 3290{ (eval echo configure:3291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3291ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3292if test -z "$ac_err"; then
3293 rm -rf conftest*
3294 ac_cv_header_stdc=yes
3295else
3296 echo "$ac_err" >&5
3297 echo "configure: failed program was:" >&5
3298 cat conftest.$ac_ext >&5
3299 rm -rf conftest*
3300 ac_cv_header_stdc=no
3301fi
3302rm -f conftest*
3303
3304if test $ac_cv_header_stdc = yes; then
3305 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3306cat > conftest.$ac_ext <<EOF
ffc6a242 3307#line 3308 "configure"
c906108c
SS
3308#include "confdefs.h"
3309#include <string.h>
3310EOF
3311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3312 egrep "memchr" >/dev/null 2>&1; then
3313 :
3314else
3315 rm -rf conftest*
3316 ac_cv_header_stdc=no
3317fi
3318rm -f conftest*
3319
3320fi
3321
3322if test $ac_cv_header_stdc = yes; then
3323 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3324cat > conftest.$ac_ext <<EOF
ffc6a242 3325#line 3326 "configure"
c906108c
SS
3326#include "confdefs.h"
3327#include <stdlib.h>
3328EOF
3329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3330 egrep "free" >/dev/null 2>&1; then
3331 :
3332else
3333 rm -rf conftest*
3334 ac_cv_header_stdc=no
3335fi
3336rm -f conftest*
3337
3338fi
3339
3340if test $ac_cv_header_stdc = yes; then
3341 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3342if test "$cross_compiling" = yes; then
3343 :
3344else
3345 cat > conftest.$ac_ext <<EOF
ffc6a242 3346#line 3347 "configure"
c906108c
SS
3347#include "confdefs.h"
3348#include <ctype.h>
3349#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3350#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3351#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3352int main () { int i; for (i = 0; i < 256; i++)
3353if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3354exit (0); }
3355
3356EOF
ffc6a242 3357if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3358then
3359 :
3360else
3361 echo "configure: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
3363 rm -fr conftest*
3364 ac_cv_header_stdc=no
3365fi
3366rm -fr conftest*
3367fi
3368
3369fi
3370fi
3371
3372echo "$ac_t""$ac_cv_header_stdc" 1>&6
3373if test $ac_cv_header_stdc = yes; then
3374 cat >> confdefs.h <<\EOF
3375#define STDC_HEADERS 1
3376EOF
3377
3378fi
3379
3380
6abadcf8 3381
3e0bf9f1 3382case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
6abadcf8
ND
3383 cat >> confdefs.h <<\EOF
3384#define _MSE_INT_H 1
3385EOF
3386
3387esac; esac
3388
9299404e 3389for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
c906108c 3390 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
f15f768e 3391 string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
c906108c 3392 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
104c1213 3393 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
596c9d4b 3394 time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
0cf3e697 3395 dirent.h sys/ndir.h sys/dir.h ndir.h sys/filio.h \
409a3f64
AC
3396 curses.h ncurses.h \
3397 poll.h sys/poll.h
c906108c
SS
3398do
3399ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3400echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ffc6a242 3401echo "configure:3402: checking for $ac_hdr" >&5
c906108c
SS
3402if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3403 echo $ac_n "(cached) $ac_c" 1>&6
3404else
3405 cat > conftest.$ac_ext <<EOF
ffc6a242 3406#line 3407 "configure"
c906108c
SS
3407#include "confdefs.h"
3408#include <$ac_hdr>
3409EOF
3410ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 3411{ (eval echo configure:3412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3412ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3413if test -z "$ac_err"; then
3414 rm -rf conftest*
3415 eval "ac_cv_header_$ac_safe=yes"
3416else
3417 echo "$ac_err" >&5
3418 echo "configure: failed program was:" >&5
3419 cat conftest.$ac_ext >&5
3420 rm -rf conftest*
3421 eval "ac_cv_header_$ac_safe=no"
3422fi
3423rm -f conftest*
3424fi
3425if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3426 echo "$ac_t""yes" 1>&6
3427 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3428 cat >> confdefs.h <<EOF
3429#define $ac_tr_hdr 1
3430EOF
3431
3432else
3433 echo "$ac_t""no" 1>&6
3434fi
3435done
3436
3437echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
ffc6a242 3438echo "configure:3439: checking whether stat file-mode macros are broken" >&5
c906108c
SS
3439if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3440 echo $ac_n "(cached) $ac_c" 1>&6
3441else
3442 cat > conftest.$ac_ext <<EOF
ffc6a242 3443#line 3444 "configure"
c906108c
SS
3444#include "confdefs.h"
3445#include <sys/types.h>
3446#include <sys/stat.h>
3447
3448#if defined(S_ISBLK) && defined(S_IFDIR)
3449# if S_ISBLK (S_IFDIR)
3450You lose.
3451# endif
3452#endif
3453
3454#if defined(S_ISBLK) && defined(S_IFCHR)
3455# if S_ISBLK (S_IFCHR)
3456You lose.
3457# endif
3458#endif
3459
3460#if defined(S_ISLNK) && defined(S_IFREG)
3461# if S_ISLNK (S_IFREG)
3462You lose.
3463# endif
3464#endif
3465
3466#if defined(S_ISSOCK) && defined(S_IFREG)
3467# if S_ISSOCK (S_IFREG)
3468You lose.
3469# endif
3470#endif
3471
3472EOF
3473if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3474 egrep "You lose" >/dev/null 2>&1; then
3475 rm -rf conftest*
3476 ac_cv_header_stat_broken=yes
3477else
3478 rm -rf conftest*
3479 ac_cv_header_stat_broken=no
3480fi
3481rm -f conftest*
3482
3483fi
3484
3485echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3486if test $ac_cv_header_stat_broken = yes; then
3487 cat >> confdefs.h <<\EOF
3488#define STAT_MACROS_BROKEN 1
3489EOF
3490
3491fi
3492
3493
3494echo $ac_n "checking for working const""... $ac_c" 1>&6
ffc6a242 3495echo "configure:3496: checking for working const" >&5
c906108c
SS
3496if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3497 echo $ac_n "(cached) $ac_c" 1>&6
3498else
3499 cat > conftest.$ac_ext <<EOF
ffc6a242 3500#line 3501 "configure"
c906108c
SS
3501#include "confdefs.h"
3502
3503int main() {
3504
3505/* Ultrix mips cc rejects this. */
3506typedef int charset[2]; const charset x;
3507/* SunOS 4.1.1 cc rejects this. */
3508char const *const *ccp;
3509char **p;
3510/* NEC SVR4.0.2 mips cc rejects this. */
3511struct point {int x, y;};
3512static struct point const zero = {0,0};
3513/* AIX XL C 1.02.0.0 rejects this.
3514 It does not let you subtract one const X* pointer from another in an arm
3515 of an if-expression whose if-part is not a constant expression */
3516const char *g = "string";
3517ccp = &g + (g ? g-g : 0);
3518/* HPUX 7.0 cc rejects these. */
3519++ccp;
3520p = (char**) ccp;
3521ccp = (char const *const *) p;
3522{ /* SCO 3.2v4 cc rejects this. */
3523 char *t;
3524 char const *s = 0 ? (char *) 0 : (char const *) 0;
3525
3526 *t++ = 0;
3527}
3528{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3529 int x[] = {25, 17};
3530 const int *foo = &x[0];
3531 ++foo;
3532}
3533{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3534 typedef const int *iptr;
3535 iptr p = 0;
3536 ++p;
3537}
3538{ /* AIX XL C 1.02.0.0 rejects this saying
3539 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3540 struct s { int j; const int *ap[3]; };
3541 struct s *b; b->j = 5;
3542}
3543{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3544 const int foo = 10;
3545}
3546
3547; return 0; }
3548EOF
ffc6a242 3549if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3550 rm -rf conftest*
3551 ac_cv_c_const=yes
3552else
3553 echo "configure: failed program was:" >&5
3554 cat conftest.$ac_ext >&5
3555 rm -rf conftest*
3556 ac_cv_c_const=no
3557fi
3558rm -f conftest*
3559fi
3560
3561echo "$ac_t""$ac_cv_c_const" 1>&6
3562if test $ac_cv_c_const = no; then
3563 cat >> confdefs.h <<\EOF
3564#define const
3565EOF
3566
3567fi
3568
bce58c09 3569echo $ac_n "checking for inline""... $ac_c" 1>&6
ffc6a242 3570echo "configure:3571: checking for inline" >&5
bce58c09
JB
3571if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573else
3574 ac_cv_c_inline=no
3575for ac_kw in inline __inline__ __inline; do
3576 cat > conftest.$ac_ext <<EOF
ffc6a242 3577#line 3578 "configure"
bce58c09
JB
3578#include "confdefs.h"
3579
3580int main() {
3581} $ac_kw foo() {
3582; return 0; }
3583EOF
ffc6a242 3584if { (eval echo configure:3585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
3585 rm -rf conftest*
3586 ac_cv_c_inline=$ac_kw; break
3587else
3588 echo "configure: failed program was:" >&5
3589 cat conftest.$ac_ext >&5
3590fi
3591rm -f conftest*
3592done
3593
3594fi
3595
3596echo "$ac_t""$ac_cv_c_inline" 1>&6
3597case "$ac_cv_c_inline" in
3598 inline | yes) ;;
3599 no) cat >> confdefs.h <<\EOF
3600#define inline
3601EOF
3602 ;;
3603 *) cat >> confdefs.h <<EOF
3604#define inline $ac_cv_c_inline
3605EOF
3606 ;;
3607esac
3608
c906108c 3609
27aac7ff
AC
3610for ac_func in bcopy btowc bzero canonicalize_file_name isascii poll \
3611 realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
c906108c
SS
3612do
3613echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ffc6a242 3614echo "configure:3615: checking for $ac_func" >&5
c906108c
SS
3615if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3616 echo $ac_n "(cached) $ac_c" 1>&6
3617else
3618 cat > conftest.$ac_ext <<EOF
ffc6a242 3619#line 3620 "configure"
c906108c
SS
3620#include "confdefs.h"
3621/* System header to define __stub macros and hopefully few prototypes,
3622 which can conflict with char $ac_func(); below. */
3623#include <assert.h>
3624/* Override any gcc2 internal prototype to avoid an error. */
3625/* We use char because int might match the return type of a gcc2
3626 builtin and then its argument prototype would still apply. */
3627char $ac_func();
3628
3629int main() {
3630
3631/* The GNU C library defines this for functions which it implements
3632 to always fail with ENOSYS. Some functions are actually named
3633 something starting with __ and the normal name is an alias. */
3634#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3635choke me
3636#else
3637$ac_func();
3638#endif
3639
3640; return 0; }
3641EOF
ffc6a242 3642if { (eval echo configure:3643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3643 rm -rf conftest*
3644 eval "ac_cv_func_$ac_func=yes"
3645else
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3648 rm -rf conftest*
3649 eval "ac_cv_func_$ac_func=no"
3650fi
3651rm -f conftest*
3652fi
3653
3654if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3655 echo "$ac_t""yes" 1>&6
3656 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3657 cat >> confdefs.h <<EOF
3658#define $ac_tr_func 1
3659EOF
3660
3661else
3662 echo "$ac_t""no" 1>&6
3663fi
3664done
3665
46711df8
MK
3666# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3667# for constant arguments. Useless!
3668echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
ffc6a242 3669echo "configure:3670: checking for working alloca.h" >&5
46711df8
MK
3670if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3671 echo $ac_n "(cached) $ac_c" 1>&6
3672else
3673 cat > conftest.$ac_ext <<EOF
ffc6a242 3674#line 3675 "configure"
46711df8
MK
3675#include "confdefs.h"
3676#include <alloca.h>
3677int main() {
3678char *p = alloca(2 * sizeof(int));
3679; return 0; }
3680EOF
ffc6a242 3681if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3682 rm -rf conftest*
3683 ac_cv_header_alloca_h=yes
3684else
3685 echo "configure: failed program was:" >&5
3686 cat conftest.$ac_ext >&5
3687 rm -rf conftest*
3688 ac_cv_header_alloca_h=no
3689fi
3690rm -f conftest*
3691fi
3692
3693echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3694if test $ac_cv_header_alloca_h = yes; then
3695 cat >> confdefs.h <<\EOF
3696#define HAVE_ALLOCA_H 1
3697EOF
3698
3699fi
3700
3701echo $ac_n "checking for alloca""... $ac_c" 1>&6
ffc6a242 3702echo "configure:3703: checking for alloca" >&5
46711df8
MK
3703if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3704 echo $ac_n "(cached) $ac_c" 1>&6
3705else
3706 cat > conftest.$ac_ext <<EOF
ffc6a242 3707#line 3708 "configure"
46711df8
MK
3708#include "confdefs.h"
3709
3710#ifdef __GNUC__
3711# define alloca __builtin_alloca
3712#else
3713# ifdef _MSC_VER
3714# include <malloc.h>
3715# define alloca _alloca
3716# else
3717# if HAVE_ALLOCA_H
3718# include <alloca.h>
3719# else
3720# ifdef _AIX
3721 #pragma alloca
3722# else
3723# ifndef alloca /* predefined by HP cc +Olibcalls */
3724char *alloca ();
3725# endif
3726# endif
3727# endif
3728# endif
3729#endif
3730
3731int main() {
3732char *p = (char *) alloca(1);
3733; return 0; }
3734EOF
ffc6a242 3735if { (eval echo configure:3736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3736 rm -rf conftest*
3737 ac_cv_func_alloca_works=yes
3738else
3739 echo "configure: failed program was:" >&5
3740 cat conftest.$ac_ext >&5
3741 rm -rf conftest*
3742 ac_cv_func_alloca_works=no
3743fi
3744rm -f conftest*
3745fi
3746
3747echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3748if test $ac_cv_func_alloca_works = yes; then
3749 cat >> confdefs.h <<\EOF
3750#define HAVE_ALLOCA 1
3751EOF
3752
3753fi
3754
3755if test $ac_cv_func_alloca_works = no; then
3756 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3757 # that cause trouble. Some versions do not even contain alloca or
3758 # contain a buggy version. If you still want to use their alloca,
3759 # use ar to extract alloca.o from them instead of compiling alloca.c.
3760 ALLOCA=alloca.${ac_objext}
3761 cat >> confdefs.h <<\EOF
3762#define C_ALLOCA 1
3763EOF
3764
3765
3766echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
ffc6a242 3767echo "configure:3768: checking whether alloca needs Cray hooks" >&5
46711df8
MK
3768if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3769 echo $ac_n "(cached) $ac_c" 1>&6
3770else
3771 cat > conftest.$ac_ext <<EOF
ffc6a242 3772#line 3773 "configure"
46711df8
MK
3773#include "confdefs.h"
3774#if defined(CRAY) && ! defined(CRAY2)
3775webecray
3776#else
3777wenotbecray
3778#endif
3779
3780EOF
3781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3782 egrep "webecray" >/dev/null 2>&1; then
3783 rm -rf conftest*
3784 ac_cv_os_cray=yes
3785else
3786 rm -rf conftest*
3787 ac_cv_os_cray=no
3788fi
3789rm -f conftest*
3790
3791fi
3792
3793echo "$ac_t""$ac_cv_os_cray" 1>&6
3794if test $ac_cv_os_cray = yes; then
3795for ac_func in _getb67 GETB67 getb67; do
3796 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ffc6a242 3797echo "configure:3798: checking for $ac_func" >&5
46711df8
MK
3798if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3799 echo $ac_n "(cached) $ac_c" 1>&6
3800else
3801 cat > conftest.$ac_ext <<EOF
ffc6a242 3802#line 3803 "configure"
46711df8
MK
3803#include "confdefs.h"
3804/* System header to define __stub macros and hopefully few prototypes,
3805 which can conflict with char $ac_func(); below. */
3806#include <assert.h>
3807/* Override any gcc2 internal prototype to avoid an error. */
3808/* We use char because int might match the return type of a gcc2
3809 builtin and then its argument prototype would still apply. */
3810char $ac_func();
3811
3812int main() {
3813
3814/* The GNU C library defines this for functions which it implements
3815 to always fail with ENOSYS. Some functions are actually named
3816 something starting with __ and the normal name is an alias. */
3817#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3818choke me
3819#else
3820$ac_func();
3821#endif
3822
3823; return 0; }
3824EOF
ffc6a242 3825if { (eval echo configure:3826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3826 rm -rf conftest*
3827 eval "ac_cv_func_$ac_func=yes"
3828else
3829 echo "configure: failed program was:" >&5
3830 cat conftest.$ac_ext >&5
3831 rm -rf conftest*
3832 eval "ac_cv_func_$ac_func=no"
3833fi
3834rm -f conftest*
3835fi
3836
3837if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3838 echo "$ac_t""yes" 1>&6
3839 cat >> confdefs.h <<EOF
3840#define CRAY_STACKSEG_END $ac_func
3841EOF
3842
3843 break
3844else
3845 echo "$ac_t""no" 1>&6
3846fi
3847
3848done
3849fi
3850
3851echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
ffc6a242 3852echo "configure:3853: checking stack direction for C alloca" >&5
46711df8
MK
3853if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3854 echo $ac_n "(cached) $ac_c" 1>&6
3855else
3856 if test "$cross_compiling" = yes; then
3857 ac_cv_c_stack_direction=0
3858else
3859 cat > conftest.$ac_ext <<EOF
ffc6a242 3860#line 3861 "configure"
46711df8
MK
3861#include "confdefs.h"
3862find_stack_direction ()
3863{
3864 static char *addr = 0;
3865 auto char dummy;
3866 if (addr == 0)
3867 {
3868 addr = &dummy;
3869 return find_stack_direction ();
3870 }
3871 else
3872 return (&dummy > addr) ? 1 : -1;
3873}
3874main ()
3875{
3876 exit (find_stack_direction() < 0);
3877}
3878EOF
ffc6a242 3879if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
3880then
3881 ac_cv_c_stack_direction=1
3882else
3883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
3885 rm -fr conftest*
3886 ac_cv_c_stack_direction=-1
3887fi
3888rm -fr conftest*
3889fi
3890
3891fi
3892
3893echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3894cat >> confdefs.h <<EOF
3895#define STACK_DIRECTION $ac_cv_c_stack_direction
3896EOF
3897
3898fi
3899
74c1b268 3900echo $ac_n "checking for pid_t""... $ac_c" 1>&6
ffc6a242 3901echo "configure:3902: checking for pid_t" >&5
74c1b268
AC
3902if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3903 echo $ac_n "(cached) $ac_c" 1>&6
3904else
3905 cat > conftest.$ac_ext <<EOF
ffc6a242 3906#line 3907 "configure"
74c1b268
AC
3907#include "confdefs.h"
3908#include <sys/types.h>
3909#if STDC_HEADERS
3910#include <stdlib.h>
3911#include <stddef.h>
3912#endif
3913EOF
3914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3915 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3916 rm -rf conftest*
3917 ac_cv_type_pid_t=yes
3918else
3919 rm -rf conftest*
3920 ac_cv_type_pid_t=no
3921fi
3922rm -f conftest*
3923
3924fi
3925echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3926if test $ac_cv_type_pid_t = no; then
3927 cat >> confdefs.h <<\EOF
3928#define pid_t int
3929EOF
3930
3931fi
3932
3933ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3934echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
ffc6a242 3935echo "configure:3936: checking for vfork.h" >&5
74c1b268
AC
3936if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3937 echo $ac_n "(cached) $ac_c" 1>&6
3938else
3939 cat > conftest.$ac_ext <<EOF
ffc6a242 3940#line 3941 "configure"
74c1b268
AC
3941#include "confdefs.h"
3942#include <vfork.h>
3943EOF
3944ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 3945{ (eval echo configure:3946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
3946ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3947if test -z "$ac_err"; then
3948 rm -rf conftest*
3949 eval "ac_cv_header_$ac_safe=yes"
3950else
3951 echo "$ac_err" >&5
3952 echo "configure: failed program was:" >&5
3953 cat conftest.$ac_ext >&5
3954 rm -rf conftest*
3955 eval "ac_cv_header_$ac_safe=no"
3956fi
3957rm -f conftest*
3958fi
3959if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3960 echo "$ac_t""yes" 1>&6
3961 cat >> confdefs.h <<\EOF
3962#define HAVE_VFORK_H 1
3963EOF
3964
3965else
3966 echo "$ac_t""no" 1>&6
3967fi
3968
3969echo $ac_n "checking for working vfork""... $ac_c" 1>&6
ffc6a242 3970echo "configure:3971: checking for working vfork" >&5
74c1b268
AC
3971if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3972 echo $ac_n "(cached) $ac_c" 1>&6
3973else
3974 if test "$cross_compiling" = yes; then
3975 echo $ac_n "checking for vfork""... $ac_c" 1>&6
ffc6a242 3976echo "configure:3977: checking for vfork" >&5
74c1b268
AC
3977if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3978 echo $ac_n "(cached) $ac_c" 1>&6
3979else
3980 cat > conftest.$ac_ext <<EOF
ffc6a242 3981#line 3982 "configure"
74c1b268
AC
3982#include "confdefs.h"
3983/* System header to define __stub macros and hopefully few prototypes,
3984 which can conflict with char vfork(); below. */
3985#include <assert.h>
3986/* Override any gcc2 internal prototype to avoid an error. */
3987/* We use char because int might match the return type of a gcc2
3988 builtin and then its argument prototype would still apply. */
3989char vfork();
3990
3991int main() {
3992
3993/* The GNU C library defines this for functions which it implements
3994 to always fail with ENOSYS. Some functions are actually named
3995 something starting with __ and the normal name is an alias. */
3996#if defined (__stub_vfork) || defined (__stub___vfork)
3997choke me
3998#else
3999vfork();
4000#endif
4001
4002; return 0; }
4003EOF
ffc6a242 4004if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268
AC
4005 rm -rf conftest*
4006 eval "ac_cv_func_vfork=yes"
4007else
4008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
4010 rm -rf conftest*
4011 eval "ac_cv_func_vfork=no"
4012fi
4013rm -f conftest*
4014fi
4015
4016if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4017 echo "$ac_t""yes" 1>&6
4018 :
4019else
4020 echo "$ac_t""no" 1>&6
4021fi
4022
4023ac_cv_func_vfork_works=$ac_cv_func_vfork
4024else
4025 cat > conftest.$ac_ext <<EOF
ffc6a242 4026#line 4027 "configure"
74c1b268
AC
4027#include "confdefs.h"
4028/* Thanks to Paul Eggert for this test. */
4029#include <stdio.h>
4030#include <sys/types.h>
4031#include <sys/stat.h>
4032#ifdef HAVE_UNISTD_H
4033#include <unistd.h>
4034#endif
4035#ifdef HAVE_VFORK_H
4036#include <vfork.h>
4037#endif
4038/* On some sparc systems, changes by the child to local and incoming
4039 argument registers are propagated back to the parent.
4040 The compiler is told about this with #include <vfork.h>,
4041 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4042 Test for this by using a static variable whose address
4043 is put into a register that is clobbered by the vfork. */
4044static
4045#ifdef __cplusplus
4046sparc_address_test (int arg)
4047#else
4048sparc_address_test (arg) int arg;
4049#endif
4050{
4051 static pid_t child;
4052 if (!child) {
4053 child = vfork ();
4054 if (child < 0) {
4055 perror ("vfork");
4056 _exit(2);
4057 }
4058 if (!child) {
4059 arg = getpid();
4060 write(-1, "", 0);
4061 _exit (arg);
4062 }
4063 }
4064}
4065main() {
4066 pid_t parent = getpid ();
4067 pid_t child;
4068
4069 sparc_address_test ();
4070
4071 child = vfork ();
4072
4073 if (child == 0) {
4074 /* Here is another test for sparc vfork register problems.
4075 This test uses lots of local variables, at least
4076 as many local variables as main has allocated so far
4077 including compiler temporaries. 4 locals are enough for
4078 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4079 A buggy compiler should reuse the register of parent
4080 for one of the local variables, since it will think that
4081 parent can't possibly be used any more in this routine.
4082 Assigning to the local variable will thus munge parent
4083 in the parent process. */
4084 pid_t
4085 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4086 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4087 /* Convince the compiler that p..p7 are live; otherwise, it might
4088 use the same hardware register for all 8 local variables. */
4089 if (p != p1 || p != p2 || p != p3 || p != p4
4090 || p != p5 || p != p6 || p != p7)
4091 _exit(1);
4092
4093 /* On some systems (e.g. IRIX 3.3),
4094 vfork doesn't separate parent from child file descriptors.
4095 If the child closes a descriptor before it execs or exits,
4096 this munges the parent's descriptor as well.
4097 Test for this by closing stdout in the child. */
4098 _exit(close(fileno(stdout)) != 0);
4099 } else {
4100 int status;
4101 struct stat st;
4102
4103 while (wait(&status) != child)
4104 ;
4105 exit(
4106 /* Was there some problem with vforking? */
4107 child < 0
4108
4109 /* Did the child fail? (This shouldn't happen.) */
4110 || status
4111
4112 /* Did the vfork/compiler bug occur? */
4113 || parent != getpid()
4114
4115 /* Did the file descriptor bug occur? */
4116 || fstat(fileno(stdout), &st) != 0
4117 );
4118 }
4119}
4120EOF
ffc6a242 4121if { (eval echo configure:4122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268
AC
4122then
4123 ac_cv_func_vfork_works=yes
4124else
4125 echo "configure: failed program was:" >&5
4126 cat conftest.$ac_ext >&5
4127 rm -fr conftest*
4128 ac_cv_func_vfork_works=no
4129fi
4130rm -fr conftest*
4131fi
4132
4133fi
4134
4135echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4136if test $ac_cv_func_vfork_works = no; then
4137 cat >> confdefs.h <<\EOF
4138#define vfork fork
4139EOF
4140
4141fi
4142
72473524
DJ
4143if test "$cross_compiling" = no; then
4144 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
ffc6a242 4145echo "configure:4146: checking whether setpgrp takes no argument" >&5
0200359f
MK
4146if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4147 echo $ac_n "(cached) $ac_c" 1>&6
4148else
4149 if test "$cross_compiling" = yes; then
4150 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4151else
4152 cat > conftest.$ac_ext <<EOF
ffc6a242 4153#line 4154 "configure"
0200359f
MK
4154#include "confdefs.h"
4155
4156#ifdef HAVE_UNISTD_H
4157#include <unistd.h>
4158#endif
4159
4160/*
4161 * If this system has a BSD-style setpgrp, which takes arguments, exit
4162 * successfully.
4163 */
4164main()
4165{
4166 if (setpgrp(1,1) == -1)
4167 exit(0);
4168 else
4169 exit(1);
4170}
4171
4172EOF
ffc6a242 4173if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0200359f
MK
4174then
4175 ac_cv_func_setpgrp_void=no
4176else
4177 echo "configure: failed program was:" >&5
4178 cat conftest.$ac_ext >&5
4179 rm -fr conftest*
4180 ac_cv_func_setpgrp_void=yes
4181fi
4182rm -fr conftest*
4183fi
4184
4185
4186fi
4187
4188echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4189if test $ac_cv_func_setpgrp_void = yes; then
4190 cat >> confdefs.h <<\EOF
4191#define SETPGRP_VOID 1
4192EOF
4193
4194fi
4195
72473524
DJ
4196else
4197 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
ffc6a242 4198echo "configure:4199: checking whether setpgrp takes no argument" >&5
72473524
DJ
4199if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4201else
4202 cat > conftest.$ac_ext <<EOF
ffc6a242 4203#line 4204 "configure"
72473524
DJ
4204#include "confdefs.h"
4205
4206#include <unistd.h>
4207
4208int main() {
4209
4210 if (setpgrp(1,1) == -1)
4211 exit (0);
4212 else
4213 exit (1);
4214
4215; return 0; }
4216EOF
ffc6a242 4217if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
72473524
DJ
4218 rm -rf conftest*
4219 ac_cv_func_setpgrp_void=no
4220else
4221 echo "configure: failed program was:" >&5
4222 cat conftest.$ac_ext >&5
4223 rm -rf conftest*
4224 ac_cv_func_setpgrp_void=yes
4225fi
4226rm -f conftest*
4227fi
4228
4229echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4230if test $ac_cv_func_setpgrp_void = yes; then
4231 cat >> confdefs.h <<\EOF
4232#define SETPGRP_VOID 1
4233EOF
4234
4235fi
4236fi
c906108c 4237
2b2d558c
MK
4238# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
4239# since sigsetjmp might only be defined as a macro.
4240echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
ffc6a242 4241echo "configure:4242: checking for sigsetjmp" >&5
2b2d558c
MK
4242if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4243 echo $ac_n "(cached) $ac_c" 1>&6
4244else
4245 cat > conftest.$ac_ext <<EOF
ffc6a242 4246#line 4247 "configure"
2b2d558c
MK
4247#include "confdefs.h"
4248
4249#include <setjmp.h>
4250
4251int main() {
4252sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4253; return 0; }
4254EOF
ffc6a242 4255if { (eval echo configure:4256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2b2d558c
MK
4256 rm -rf conftest*
4257 gdb_cv_func_sigsetjmp=yes
4258else
4259 echo "configure: failed program was:" >&5
4260 cat conftest.$ac_ext >&5
4261 rm -rf conftest*
4262 gdb_cv_func_sigsetjmp=no
4263fi
4264rm -f conftest*
4265fi
4266
4267echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4268if test $gdb_cv_func_sigsetjmp = yes; then
4269 cat >> confdefs.h <<\EOF
4270#define HAVE_SIGSETJMP 1
4271EOF
4272
4273fi
4274
0afdd437 4275# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7dfa765c
MK
4276# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4277echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
ffc6a242 4278echo "configure:4279: checking for r_fs in struct reg" >&5
422ea4b8 4279if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7dfa765c
MK
4280 echo $ac_n "(cached) $ac_c" 1>&6
4281else
4282 cat > conftest.$ac_ext <<EOF
ffc6a242 4283#line 4284 "configure"
7dfa765c
MK
4284#include "confdefs.h"
4285#include <machine/reg.h>
4286int main() {
4287struct reg r; r.r_fs;
4288; return 0; }
4289EOF
ffc6a242 4290if { (eval echo configure:4291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4291 rm -rf conftest*
422ea4b8 4292 gdb_cv_struct_reg_r_fs=yes
7dfa765c
MK
4293else
4294 echo "configure: failed program was:" >&5
4295 cat conftest.$ac_ext >&5
4296 rm -rf conftest*
422ea4b8 4297 gdb_cv_struct_reg_r_fs=no
7dfa765c
MK
4298fi
4299rm -f conftest*
4300fi
4301
422ea4b8
MK
4302echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4303if test $gdb_cv_struct_reg_r_fs = yes; then
7dfa765c 4304 cat >> confdefs.h <<\EOF
422ea4b8 4305#define HAVE_STRUCT_REG_R_FS 1
7dfa765c
MK
4306EOF
4307
4308fi
4309echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
ffc6a242 4310echo "configure:4311: checking for r_gs in struct reg" >&5
422ea4b8 4311if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7dfa765c
MK
4312 echo $ac_n "(cached) $ac_c" 1>&6
4313else
4314 cat > conftest.$ac_ext <<EOF
ffc6a242 4315#line 4316 "configure"
7dfa765c
MK
4316#include "confdefs.h"
4317#include <machine/reg.h>
4318int main() {
4319struct reg r; r.r_gs;
4320; return 0; }
4321EOF
ffc6a242 4322if { (eval echo configure:4323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4323 rm -rf conftest*
422ea4b8 4324 gdb_cv_struct_reg_r_gs=yes
7dfa765c
MK
4325else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
422ea4b8 4329 gdb_cv_struct_reg_r_gs=no
7dfa765c
MK
4330fi
4331rm -f conftest*
4332fi
4333
422ea4b8
MK
4334echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4335if test $gdb_cv_struct_reg_r_gs = yes; then
7dfa765c 4336 cat >> confdefs.h <<\EOF
422ea4b8 4337#define HAVE_STRUCT_REG_R_GS 1
7dfa765c
MK
4338EOF
4339
4340fi
4341
0afdd437 4342# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
64bb1671 4343echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
ffc6a242 4344echo "configure:4345: checking for PTRACE_GETREGS" >&5
64bb1671
MK
4345if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4346 echo $ac_n "(cached) $ac_c" 1>&6
4347else
4348 cat > conftest.$ac_ext <<EOF
ffc6a242 4349#line 4350 "configure"
64bb1671
MK
4350#include "confdefs.h"
4351#include <sys/ptrace.h>
4352int main() {
4353PTRACE_GETREGS;
4354; return 0; }
4355EOF
ffc6a242 4356if { (eval echo configure:4357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
64bb1671
MK
4357 rm -rf conftest*
4358 gdb_cv_have_ptrace_getregs=yes
4359else
4360 echo "configure: failed program was:" >&5
4361 cat conftest.$ac_ext >&5
4362 rm -rf conftest*
4363 gdb_cv_have_ptrace_getregs=no
4364fi
4365rm -f conftest*
4366fi
4367
4397a6ab 4368echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
64bb1671
MK
4369if test $gdb_cv_have_ptrace_getregs = yes; then
4370 cat >> confdefs.h <<\EOF
4371#define HAVE_PTRACE_GETREGS 1
4372EOF
4373
4374fi
4375
0afdd437 4376# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6ce2ac0b 4377echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
ffc6a242 4378echo "configure:4379: checking for PTRACE_GETFPXREGS" >&5
6ce2ac0b 4379if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
5c44784c
JM
4380 echo $ac_n "(cached) $ac_c" 1>&6
4381else
4382 cat > conftest.$ac_ext <<EOF
ffc6a242 4383#line 4384 "configure"
5c44784c
JM
4384#include "confdefs.h"
4385#include <sys/ptrace.h>
4386int main() {
6ce2ac0b 4387PTRACE_GETFPXREGS;
5c44784c
JM
4388; return 0; }
4389EOF
ffc6a242 4390if { (eval echo configure:4391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c44784c 4391 rm -rf conftest*
6ce2ac0b 4392 gdb_cv_have_ptrace_getfpxregs=yes
5c44784c
JM
4393else
4394 echo "configure: failed program was:" >&5
4395 cat conftest.$ac_ext >&5
4396 rm -rf conftest*
6ce2ac0b 4397 gdb_cv_have_ptrace_getfpxregs=no
5c44784c
JM
4398fi
4399rm -f conftest*
4400fi
4401
6ce2ac0b
MK
4402echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4403if test $gdb_cv_have_ptrace_getfpxregs = yes; then
5c44784c 4404 cat >> confdefs.h <<\EOF
6ce2ac0b 4405#define HAVE_PTRACE_GETFPXREGS 1
5c44784c
JM
4406EOF
4407
4408fi
4409
0afdd437
MK
4410# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4411echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
ffc6a242 4412echo "configure:4413: checking for PT_GETDBREGS" >&5
0afdd437
MK
4413if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
4414 echo $ac_n "(cached) $ac_c" 1>&6
4415else
4416 cat > conftest.$ac_ext <<EOF
ffc6a242 4417#line 4418 "configure"
0afdd437
MK
4418#include "confdefs.h"
4419#include <sys/types.h>
4420#include <sys/ptrace.h>
4421int main() {
4422PT_GETDBREGS;
4423; return 0; }
4424EOF
ffc6a242 4425if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0afdd437
MK
4426 rm -rf conftest*
4427 gdb_cv_have_pt_getdbregs=yes
4428else
4429 echo "configure: failed program was:" >&5
4430 cat conftest.$ac_ext >&5
4431 rm -rf conftest*
4432 gdb_cv_have_pt_getdbregs=no
4433fi
4434rm -f conftest*
4435fi
4436
4437echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4438if test $gdb_cv_have_pt_getdbregs = yes; then
4439 cat >> confdefs.h <<\EOF
4440#define HAVE_PT_GETDBREGS 1
4441EOF
4442
4443fi
4444
7e89e357
JT
4445# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
4446echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
ffc6a242 4447echo "configure:4448: checking for PT_GETXMMREGS" >&5
7e89e357
JT
4448if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
4449 echo $ac_n "(cached) $ac_c" 1>&6
4450else
4451 cat > conftest.$ac_ext <<EOF
ffc6a242 4452#line 4453 "configure"
7e89e357
JT
4453#include "confdefs.h"
4454#include <sys/types.h>
4455#include <sys/ptrace.h>
4456int main() {
4457PT_GETXMMREGS;
4458; return 0; }
4459EOF
ffc6a242 4460if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7e89e357
JT
4461 rm -rf conftest*
4462 gdb_cv_have_pt_getxmmregs=yes
4463else
4464 echo "configure: failed program was:" >&5
4465 cat conftest.$ac_ext >&5
4466 rm -rf conftest*
4467 gdb_cv_have_pt_getxmmregs=no
4468fi
4469rm -f conftest*
4470fi
4471
4472echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
4473if test $gdb_cv_have_pt_getxmmregs = yes; then
4474 cat >> confdefs.h <<\EOF
4475#define HAVE_PT_GETXMMREGS 1
4476EOF
4477
4478fi
4479
0afdd437 4480
7be570e7 4481echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
ffc6a242 4482echo "configure:4483: checking for socketpair in -lsocket" >&5
7be570e7
JM
4483ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
4484if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4485 echo $ac_n "(cached) $ac_c" 1>&6
4486else
4487 ac_save_LIBS="$LIBS"
4488LIBS="-lsocket $LIBS"
4489cat > conftest.$ac_ext <<EOF
ffc6a242 4490#line 4491 "configure"
7be570e7
JM
4491#include "confdefs.h"
4492/* Override any gcc2 internal prototype to avoid an error. */
4493/* We use char because int might match the return type of a gcc2
4494 builtin and then its argument prototype would still apply. */
4495char socketpair();
4496
4497int main() {
4498socketpair()
4499; return 0; }
4500EOF
ffc6a242 4501if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4502 rm -rf conftest*
4503 eval "ac_cv_lib_$ac_lib_var=yes"
4504else
4505 echo "configure: failed program was:" >&5
4506 cat conftest.$ac_ext >&5
4507 rm -rf conftest*
4508 eval "ac_cv_lib_$ac_lib_var=no"
4509fi
4510rm -f conftest*
4511LIBS="$ac_save_LIBS"
4512
4513fi
4514if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4515 echo "$ac_t""yes" 1>&6
4516 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4517 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4518 cat >> confdefs.h <<EOF
4519#define $ac_tr_lib 1
4520EOF
4521
4522 LIBS="-lsocket $LIBS"
4523
4524else
4525 echo "$ac_t""no" 1>&6
4526fi
4527
4528for ac_func in socketpair
4529do
4530echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ffc6a242 4531echo "configure:4532: checking for $ac_func" >&5
7be570e7
JM
4532if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4533 echo $ac_n "(cached) $ac_c" 1>&6
4534else
4535 cat > conftest.$ac_ext <<EOF
ffc6a242 4536#line 4537 "configure"
7be570e7
JM
4537#include "confdefs.h"
4538/* System header to define __stub macros and hopefully few prototypes,
4539 which can conflict with char $ac_func(); below. */
4540#include <assert.h>
4541/* Override any gcc2 internal prototype to avoid an error. */
4542/* We use char because int might match the return type of a gcc2
4543 builtin and then its argument prototype would still apply. */
4544char $ac_func();
4545
4546int main() {
4547
4548/* The GNU C library defines this for functions which it implements
4549 to always fail with ENOSYS. Some functions are actually named
4550 something starting with __ and the normal name is an alias. */
4551#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4552choke me
4553#else
4554$ac_func();
4555#endif
4556
4557; return 0; }
4558EOF
ffc6a242 4559if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4560 rm -rf conftest*
4561 eval "ac_cv_func_$ac_func=yes"
4562else
4563 echo "configure: failed program was:" >&5
4564 cat conftest.$ac_ext >&5
4565 rm -rf conftest*
4566 eval "ac_cv_func_$ac_func=no"
4567fi
4568rm -f conftest*
4569fi
4570
4571if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4572 echo "$ac_t""yes" 1>&6
4573 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4574 cat >> confdefs.h <<EOF
4575#define $ac_tr_func 1
4576EOF
4577
4578else
4579 echo "$ac_t""no" 1>&6
4580fi
4581done
4582
4583
4584
c906108c 4585echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
ffc6a242 4586echo "configure:4587: checking whether malloc must be declared" >&5
c906108c
SS
4587if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4588 echo $ac_n "(cached) $ac_c" 1>&6
4589else
4590 cat > conftest.$ac_ext <<EOF
ffc6a242 4591#line 4592 "configure"
c906108c
SS
4592#include "confdefs.h"
4593
4594#include <stdio.h>
4595#ifdef HAVE_STRING_H
4596#include <string.h>
4597#else
4598#ifdef HAVE_STRINGS_H
4599#include <strings.h>
4600#endif
4601#endif
4602#ifdef HAVE_STDLIB_H
4603#include <stdlib.h>
4604#endif
4605#ifdef HAVE_UNISTD_H
4606#include <unistd.h>
4607#endif
4608int main() {
4609char *(*pfn) = (char *(*)) malloc
4610; return 0; }
4611EOF
ffc6a242 4612if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4613 rm -rf conftest*
4614 bfd_cv_decl_needed_malloc=no
4615else
4616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618 rm -rf conftest*
4619 bfd_cv_decl_needed_malloc=yes
4620fi
4621rm -f conftest*
4622fi
4623
4624echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4625if test $bfd_cv_decl_needed_malloc = yes; then
4626 cat >> confdefs.h <<\EOF
4627#define NEED_DECLARATION_MALLOC 1
4628EOF
4629
4630fi
4631
4632echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
ffc6a242 4633echo "configure:4634: checking whether realloc must be declared" >&5
c906108c
SS
4634if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4635 echo $ac_n "(cached) $ac_c" 1>&6
4636else
4637 cat > conftest.$ac_ext <<EOF
ffc6a242 4638#line 4639 "configure"
c906108c
SS
4639#include "confdefs.h"
4640
4641#include <stdio.h>
4642#ifdef HAVE_STRING_H
4643#include <string.h>
4644#else
4645#ifdef HAVE_STRINGS_H
4646#include <strings.h>
4647#endif
4648#endif
4649#ifdef HAVE_STDLIB_H
4650#include <stdlib.h>
4651#endif
4652#ifdef HAVE_UNISTD_H
4653#include <unistd.h>
4654#endif
4655int main() {
4656char *(*pfn) = (char *(*)) realloc
4657; return 0; }
4658EOF
ffc6a242 4659if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4660 rm -rf conftest*
4661 bfd_cv_decl_needed_realloc=no
4662else
4663 echo "configure: failed program was:" >&5
4664 cat conftest.$ac_ext >&5
4665 rm -rf conftest*
4666 bfd_cv_decl_needed_realloc=yes
4667fi
4668rm -f conftest*
4669fi
4670
4671echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4672if test $bfd_cv_decl_needed_realloc = yes; then
4673 cat >> confdefs.h <<\EOF
4674#define NEED_DECLARATION_REALLOC 1
4675EOF
4676
4677fi
4678
4679echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
ffc6a242 4680echo "configure:4681: checking whether free must be declared" >&5
c906108c
SS
4681if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4682 echo $ac_n "(cached) $ac_c" 1>&6
4683else
4684 cat > conftest.$ac_ext <<EOF
ffc6a242 4685#line 4686 "configure"
c906108c
SS
4686#include "confdefs.h"
4687
4688#include <stdio.h>
4689#ifdef HAVE_STRING_H
4690#include <string.h>
4691#else
4692#ifdef HAVE_STRINGS_H
4693#include <strings.h>
4694#endif
4695#endif
4696#ifdef HAVE_STDLIB_H
4697#include <stdlib.h>
4698#endif
4699#ifdef HAVE_UNISTD_H
4700#include <unistd.h>
4701#endif
4702int main() {
4703char *(*pfn) = (char *(*)) free
4704; return 0; }
4705EOF
ffc6a242 4706if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4707 rm -rf conftest*
4708 bfd_cv_decl_needed_free=no
4709else
4710 echo "configure: failed program was:" >&5
4711 cat conftest.$ac_ext >&5
4712 rm -rf conftest*
4713 bfd_cv_decl_needed_free=yes
4714fi
4715rm -f conftest*
4716fi
4717
4718echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4719if test $bfd_cv_decl_needed_free = yes; then
4720 cat >> confdefs.h <<\EOF
4721#define NEED_DECLARATION_FREE 1
4722EOF
4723
4724fi
4725
4726echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
ffc6a242 4727echo "configure:4728: checking whether strerror must be declared" >&5
c906108c
SS
4728if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4729 echo $ac_n "(cached) $ac_c" 1>&6
4730else
4731 cat > conftest.$ac_ext <<EOF
ffc6a242 4732#line 4733 "configure"
c906108c
SS
4733#include "confdefs.h"
4734
4735#include <stdio.h>
4736#ifdef HAVE_STRING_H
4737#include <string.h>
4738#else
4739#ifdef HAVE_STRINGS_H
4740#include <strings.h>
4741#endif
4742#endif
4743#ifdef HAVE_STDLIB_H
4744#include <stdlib.h>
4745#endif
4746#ifdef HAVE_UNISTD_H
4747#include <unistd.h>
4748#endif
4749int main() {
4750char *(*pfn) = (char *(*)) strerror
4751; return 0; }
4752EOF
ffc6a242 4753if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4754 rm -rf conftest*
4755 bfd_cv_decl_needed_strerror=no
4756else
4757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 rm -rf conftest*
4760 bfd_cv_decl_needed_strerror=yes
4761fi
4762rm -f conftest*
4763fi
4764
4765echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4766if test $bfd_cv_decl_needed_strerror = yes; then
4767 cat >> confdefs.h <<\EOF
4768#define NEED_DECLARATION_STRERROR 1
4769EOF
4770
4771fi
4772
4773echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
ffc6a242 4774echo "configure:4775: checking whether strdup must be declared" >&5
c906108c
SS
4775if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4776 echo $ac_n "(cached) $ac_c" 1>&6
4777else
4778 cat > conftest.$ac_ext <<EOF
ffc6a242 4779#line 4780 "configure"
c906108c
SS
4780#include "confdefs.h"
4781
4782#include <stdio.h>
4783#ifdef HAVE_STRING_H
4784#include <string.h>
4785#else
4786#ifdef HAVE_STRINGS_H
4787#include <strings.h>
4788#endif
4789#endif
4790#ifdef HAVE_STDLIB_H
4791#include <stdlib.h>
4792#endif
4793#ifdef HAVE_UNISTD_H
4794#include <unistd.h>
4795#endif
4796int main() {
4797char *(*pfn) = (char *(*)) strdup
4798; return 0; }
4799EOF
ffc6a242 4800if { (eval echo configure:4801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4801 rm -rf conftest*
4802 bfd_cv_decl_needed_strdup=no
4803else
4804 echo "configure: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
4806 rm -rf conftest*
4807 bfd_cv_decl_needed_strdup=yes
4808fi
4809rm -f conftest*
4810fi
4811
4812echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4813if test $bfd_cv_decl_needed_strdup = yes; then
4814 cat >> confdefs.h <<\EOF
4815#define NEED_DECLARATION_STRDUP 1
4816EOF
4817
4818fi
4819
b83266a0 4820echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
ffc6a242 4821echo "configure:4822: checking whether strstr must be declared" >&5
b83266a0
SS
4822if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4823 echo $ac_n "(cached) $ac_c" 1>&6
4824else
4825 cat > conftest.$ac_ext <<EOF
ffc6a242 4826#line 4827 "configure"
b83266a0
SS
4827#include "confdefs.h"
4828
4829#include <stdio.h>
4830#ifdef HAVE_STRING_H
4831#include <string.h>
4832#else
4833#ifdef HAVE_STRINGS_H
4834#include <strings.h>
4835#endif
4836#endif
4837#ifdef HAVE_STDLIB_H
4838#include <stdlib.h>
4839#endif
4840#ifdef HAVE_UNISTD_H
4841#include <unistd.h>
4842#endif
4843int main() {
4844char *(*pfn) = (char *(*)) strstr
4845; return 0; }
4846EOF
ffc6a242 4847if { (eval echo configure:4848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0
SS
4848 rm -rf conftest*
4849 bfd_cv_decl_needed_strstr=no
4850else
4851 echo "configure: failed program was:" >&5
4852 cat conftest.$ac_ext >&5
4853 rm -rf conftest*
4854 bfd_cv_decl_needed_strstr=yes
4855fi
4856rm -f conftest*
4857fi
4858
4859echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4860if test $bfd_cv_decl_needed_strstr = yes; then
4861 cat >> confdefs.h <<\EOF
4862#define NEED_DECLARATION_STRSTR 1
4863EOF
4864
4865fi
4866
a4db0f07 4867echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
ffc6a242 4868echo "configure:4869: checking whether canonicalize_file_name must be declared" >&5
a4db0f07
RH
4869if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
4870 echo $ac_n "(cached) $ac_c" 1>&6
4871else
4872 cat > conftest.$ac_ext <<EOF
ffc6a242 4873#line 4874 "configure"
a4db0f07
RH
4874#include "confdefs.h"
4875
4876#include <stdio.h>
4877#ifdef HAVE_STRING_H
4878#include <string.h>
4879#else
4880#ifdef HAVE_STRINGS_H
4881#include <strings.h>
4882#endif
4883#endif
4884#ifdef HAVE_STDLIB_H
4885#include <stdlib.h>
4886#endif
4887#ifdef HAVE_UNISTD_H
4888#include <unistd.h>
4889#endif
4890int main() {
4891char *(*pfn) = (char *(*)) canonicalize_file_name
4892; return 0; }
4893EOF
ffc6a242 4894if { (eval echo configure:4895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07
RH
4895 rm -rf conftest*
4896 bfd_cv_decl_needed_canonicalize_file_name=no
4897else
4898 echo "configure: failed program was:" >&5
4899 cat conftest.$ac_ext >&5
4900 rm -rf conftest*
4901 bfd_cv_decl_needed_canonicalize_file_name=yes
4902fi
4903rm -f conftest*
4904fi
4905
4906echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
4907if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
4908 cat >> confdefs.h <<\EOF
4909#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
4910EOF
4911
4912fi
c906108c
SS
4913
4914
4915# The following save_state_t checkery is only necessary for HPUX
4916# versions earlier than 10.20. When those fade from memory, this
4917# could be expunged. --jsm 1999-03-22
4918
4919echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
ffc6a242 4920echo "configure:4921: checking for HPUX save_state structure" >&5
c906108c 4921cat > conftest.$ac_ext <<EOF
ffc6a242 4922#line 4923 "configure"
c906108c
SS
4923#include "confdefs.h"
4924#include <machine/save_state.h>
4925EOF
4926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4927 egrep "save_state_t" >/dev/null 2>&1; then
4928 rm -rf conftest*
4929 gdb_cv_hpux_savestate=yes
4930else
4931 rm -rf conftest*
4932 gdb_cv_hpux_savestate=no
4933fi
4934rm -f conftest*
4935
4936cat > conftest.$ac_ext <<EOF
ffc6a242 4937#line 4938 "configure"
c906108c
SS
4938#include "confdefs.h"
4939#include <machine/save_state.h>
4940EOF
4941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4942 egrep "ss_wide" >/dev/null 2>&1; then
4943 rm -rf conftest*
4944 gdb_cv_hpux_sswide=yes
4945else
4946 rm -rf conftest*
4947 gdb_cv_hpux_sswide=no
4948fi
4949rm -f conftest*
4950
4951if test $gdb_cv_hpux_savestate = yes
4952then
4953 cat >> confdefs.h <<\EOF
4954#define HAVE_STRUCT_SAVE_STATE_T 1
4955EOF
4956
4957fi
4958if test $gdb_cv_hpux_sswide = yes
4959then
4960 cat >> confdefs.h <<\EOF
4961#define HAVE_STRUCT_MEMBER_SS_WIDE 1
4962EOF
4963
4964fi
4965echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4966
4967
4968# If we are configured native on GNU/Linux, work around problems with
4969# sys/procfs.h
c3f6f71d 4970# Also detect which type of /proc is in use, such as for Unixware or Solaris.
c906108c
SS
4971
4972if test "${target}" = "${host}"; then
4973 case "${host}" in
4974 i[3456]86-*-linux*)
4975 cat >> confdefs.h <<\EOF
4976#define START_INFERIOR_TRAPS_EXPECTED 2
4977EOF
4978
4979 cat >> confdefs.h <<\EOF
4980#define sys_quotactl 1
4981EOF
4982
4983 ;;
596c9d4b
KB
4984 ia64-*-aix*)
4985 cat >> confdefs.h <<\EOF
4986#define NEW_PROC_API 1
4987EOF
4988
4989 ;;
c5394b80 4990 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
c3f6f71d
JM
4991 cat >> confdefs.h <<\EOF
4992#define NEW_PROC_API 1
c906108c
SS
4993EOF
4994
c3f6f71d 4995 ;;
3423db82 4996 *-*-solaris2.[678])
c3f6f71d
JM
4997 cat >> confdefs.h <<\EOF
4998#define NEW_PROC_API 1
4999EOF
5000
5001 ;;
5002 esac
c906108c
SS
5003fi
5004
5005if test "$ac_cv_header_sys_procfs_h" = yes; then
5006 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5007echo "configure:5008: checking for pstatus_t in sys/procfs.h" >&5
c906108c
SS
5008 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5009 echo $ac_n "(cached) $ac_c" 1>&6
5010else
5011 cat > conftest.$ac_ext <<EOF
ffc6a242 5012#line 5013 "configure"
c906108c 5013#include "confdefs.h"
e17bf198
AO
5014
5015#define _SYSCALL32
c906108c
SS
5016#include <sys/procfs.h>
5017int main() {
5018pstatus_t avar
5019; return 0; }
5020EOF
ffc6a242 5021if { (eval echo configure:5022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5022 rm -rf conftest*
5023 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5024else
5025 echo "configure: failed program was:" >&5
5026 cat conftest.$ac_ext >&5
5027 rm -rf conftest*
5028 bfd_cv_have_sys_procfs_type_pstatus_t=no
5029
5030fi
5031rm -f conftest*
5032fi
5033
5034 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5035 cat >> confdefs.h <<\EOF
5036#define HAVE_PSTATUS_T 1
5037EOF
5038
5039 fi
5040 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5041
5042 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5043echo "configure:5044: checking for prrun_t in sys/procfs.h" >&5
c906108c
SS
5044 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
5045 echo $ac_n "(cached) $ac_c" 1>&6
5046else
5047 cat > conftest.$ac_ext <<EOF
ffc6a242 5048#line 5049 "configure"
c906108c 5049#include "confdefs.h"
e17bf198
AO
5050
5051#define _SYSCALL32
c906108c
SS
5052#include <sys/procfs.h>
5053int main() {
5054prrun_t avar
5055; return 0; }
5056EOF
ffc6a242 5057if { (eval echo configure:5058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5058 rm -rf conftest*
5059 bfd_cv_have_sys_procfs_type_prrun_t=yes
5060else
5061 echo "configure: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 rm -rf conftest*
5064 bfd_cv_have_sys_procfs_type_prrun_t=no
5065
5066fi
5067rm -f conftest*
5068fi
5069
5070 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
5071 cat >> confdefs.h <<\EOF
5072#define HAVE_PRRUN_T 1
5073EOF
5074
5075 fi
5076 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
5077
5078 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5079echo "configure:5080: checking for gregset_t in sys/procfs.h" >&5
c906108c
SS
5080 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
5081 echo $ac_n "(cached) $ac_c" 1>&6
5082else
5083 cat > conftest.$ac_ext <<EOF
ffc6a242 5084#line 5085 "configure"
c906108c 5085#include "confdefs.h"
e17bf198
AO
5086
5087#define _SYSCALL32
c906108c
SS
5088#include <sys/procfs.h>
5089int main() {
5090gregset_t avar
5091; return 0; }
5092EOF
ffc6a242 5093if { (eval echo configure:5094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5094 rm -rf conftest*
5095 bfd_cv_have_sys_procfs_type_gregset_t=yes
5096else
5097 echo "configure: failed program was:" >&5
5098 cat conftest.$ac_ext >&5
5099 rm -rf conftest*
5100 bfd_cv_have_sys_procfs_type_gregset_t=no
5101
5102fi
5103rm -f conftest*
5104fi
5105
5106 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5107 cat >> confdefs.h <<\EOF
5108#define HAVE_GREGSET_T 1
5109EOF
5110
5111 fi
5112 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
5113
5114 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5115echo "configure:5116: checking for fpregset_t in sys/procfs.h" >&5
c906108c
SS
5116 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
5117 echo $ac_n "(cached) $ac_c" 1>&6
5118else
5119 cat > conftest.$ac_ext <<EOF
ffc6a242 5120#line 5121 "configure"
c906108c 5121#include "confdefs.h"
e17bf198
AO
5122
5123#define _SYSCALL32
c906108c
SS
5124#include <sys/procfs.h>
5125int main() {
5126fpregset_t avar
5127; return 0; }
5128EOF
ffc6a242 5129if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5130 rm -rf conftest*
5131 bfd_cv_have_sys_procfs_type_fpregset_t=yes
5132else
5133 echo "configure: failed program was:" >&5
5134 cat conftest.$ac_ext >&5
5135 rm -rf conftest*
5136 bfd_cv_have_sys_procfs_type_fpregset_t=no
5137
5138fi
5139rm -f conftest*
5140fi
5141
5142 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5143 cat >> confdefs.h <<\EOF
5144#define HAVE_FPREGSET_T 1
5145EOF
5146
5147 fi
5148 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5149
3862412b 5150 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5151echo "configure:5152: checking for prgregset_t in sys/procfs.h" >&5
3862412b
MK
5152 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5153 echo $ac_n "(cached) $ac_c" 1>&6
5154else
5155 cat > conftest.$ac_ext <<EOF
ffc6a242 5156#line 5157 "configure"
3862412b 5157#include "confdefs.h"
e17bf198
AO
5158
5159#define _SYSCALL32
3862412b
MK
5160#include <sys/procfs.h>
5161int main() {
5162prgregset_t avar
5163; return 0; }
5164EOF
ffc6a242 5165if { (eval echo configure:5166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5166 rm -rf conftest*
5167 bfd_cv_have_sys_procfs_type_prgregset_t=yes
5168else
5169 echo "configure: failed program was:" >&5
5170 cat conftest.$ac_ext >&5
5171 rm -rf conftest*
5172 bfd_cv_have_sys_procfs_type_prgregset_t=no
5173
5174fi
5175rm -f conftest*
5176fi
5177
5178 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5179 cat >> confdefs.h <<\EOF
5180#define HAVE_PRGREGSET_T 1
5181EOF
5182
5183 fi
5184 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5185
5186 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5187echo "configure:5188: checking for prfpregset_t in sys/procfs.h" >&5
3862412b
MK
5188 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5189 echo $ac_n "(cached) $ac_c" 1>&6
5190else
5191 cat > conftest.$ac_ext <<EOF
ffc6a242 5192#line 5193 "configure"
3862412b 5193#include "confdefs.h"
e17bf198
AO
5194
5195#define _SYSCALL32
3862412b
MK
5196#include <sys/procfs.h>
5197int main() {
5198prfpregset_t avar
5199; return 0; }
5200EOF
ffc6a242 5201if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5202 rm -rf conftest*
5203 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5204else
5205 echo "configure: failed program was:" >&5
5206 cat conftest.$ac_ext >&5
5207 rm -rf conftest*
5208 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5209
5210fi
5211rm -f conftest*
5212fi
5213
5214 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5215 cat >> confdefs.h <<\EOF
5216#define HAVE_PRFPREGSET_T 1
5217EOF
5218
5219 fi
5220 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5221
451928c5 5222 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5223echo "configure:5224: checking for prgregset32_t in sys/procfs.h" >&5
451928c5
AC
5224 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5225 echo $ac_n "(cached) $ac_c" 1>&6
5226else
5227 cat > conftest.$ac_ext <<EOF
ffc6a242 5228#line 5229 "configure"
451928c5 5229#include "confdefs.h"
e17bf198
AO
5230
5231#define _SYSCALL32
451928c5
AC
5232#include <sys/procfs.h>
5233int main() {
5234prgregset32_t avar
5235; return 0; }
5236EOF
ffc6a242 5237if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5238 rm -rf conftest*
5239 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5240else
5241 echo "configure: failed program was:" >&5
5242 cat conftest.$ac_ext >&5
5243 rm -rf conftest*
5244 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5245
5246fi
5247rm -f conftest*
5248fi
5249
5250 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5251 cat >> confdefs.h <<\EOF
5252#define HAVE_PRGREGSET32_T 1
5253EOF
5254
5255 fi
5256 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5257
5258 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5259echo "configure:5260: checking for prfpregset32_t in sys/procfs.h" >&5
451928c5
AC
5260 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5261 echo $ac_n "(cached) $ac_c" 1>&6
5262else
5263 cat > conftest.$ac_ext <<EOF
ffc6a242 5264#line 5265 "configure"
451928c5 5265#include "confdefs.h"
e17bf198
AO
5266
5267#define _SYSCALL32
451928c5
AC
5268#include <sys/procfs.h>
5269int main() {
5270prfpregset32_t avar
5271; return 0; }
5272EOF
ffc6a242 5273if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5274 rm -rf conftest*
5275 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5276else
5277 echo "configure: failed program was:" >&5
5278 cat conftest.$ac_ext >&5
5279 rm -rf conftest*
5280 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5281
5282fi
5283rm -f conftest*
5284fi
5285
5286 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5287 cat >> confdefs.h <<\EOF
5288#define HAVE_PRFPREGSET32_T 1
5289EOF
5290
5291 fi
5292 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5293
3862412b 5294 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5295echo "configure:5296: checking for lwpid_t in sys/procfs.h" >&5
3862412b
MK
5296 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298else
5299 cat > conftest.$ac_ext <<EOF
ffc6a242 5300#line 5301 "configure"
3862412b 5301#include "confdefs.h"
e17bf198
AO
5302
5303#define _SYSCALL32
3862412b
MK
5304#include <sys/procfs.h>
5305int main() {
5306lwpid_t avar
5307; return 0; }
5308EOF
ffc6a242 5309if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5310 rm -rf conftest*
5311 bfd_cv_have_sys_procfs_type_lwpid_t=yes
5312else
5313 echo "configure: failed program was:" >&5
5314 cat conftest.$ac_ext >&5
5315 rm -rf conftest*
5316 bfd_cv_have_sys_procfs_type_lwpid_t=no
5317
5318fi
5319rm -f conftest*
5320fi
5321
5322 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5323 cat >> confdefs.h <<\EOF
5324#define HAVE_LWPID_T 1
5325EOF
5326
5327 fi
5328 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5329
5330 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5331echo "configure:5332: checking for psaddr_t in sys/procfs.h" >&5
3862412b
MK
5332 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5333 echo $ac_n "(cached) $ac_c" 1>&6
5334else
5335 cat > conftest.$ac_ext <<EOF
ffc6a242 5336#line 5337 "configure"
3862412b 5337#include "confdefs.h"
e17bf198
AO
5338
5339#define _SYSCALL32
3862412b
MK
5340#include <sys/procfs.h>
5341int main() {
5342psaddr_t avar
5343; return 0; }
5344EOF
ffc6a242 5345if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5346 rm -rf conftest*
5347 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5348else
5349 echo "configure: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 rm -rf conftest*
5352 bfd_cv_have_sys_procfs_type_psaddr_t=no
5353
5354fi
5355rm -f conftest*
5356fi
5357
5358 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5359 cat >> confdefs.h <<\EOF
5360#define HAVE_PSADDR_T 1
5361EOF
5362
5363 fi
5364 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5365
596c9d4b 5366 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5367echo "configure:5368: checking for prsysent_t in sys/procfs.h" >&5
596c9d4b
KB
5368 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5369 echo $ac_n "(cached) $ac_c" 1>&6
5370else
5371 cat > conftest.$ac_ext <<EOF
ffc6a242 5372#line 5373 "configure"
596c9d4b
KB
5373#include "confdefs.h"
5374
5375#define _SYSCALL32
5376#include <sys/procfs.h>
5377int main() {
5378prsysent_t avar
5379; return 0; }
5380EOF
ffc6a242 5381if { (eval echo configure:5382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5382 rm -rf conftest*
5383 bfd_cv_have_sys_procfs_type_prsysent_t=yes
5384else
5385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5387 rm -rf conftest*
5388 bfd_cv_have_sys_procfs_type_prsysent_t=no
5389
5390fi
5391rm -f conftest*
5392fi
5393
5394 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5395 cat >> confdefs.h <<\EOF
5396#define HAVE_PRSYSENT_T 1
5397EOF
5398
5399 fi
5400 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5401
5402 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5403echo "configure:5404: checking for pr_sigset_t in sys/procfs.h" >&5
596c9d4b
KB
5404 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5405 echo $ac_n "(cached) $ac_c" 1>&6
5406else
5407 cat > conftest.$ac_ext <<EOF
ffc6a242 5408#line 5409 "configure"
596c9d4b
KB
5409#include "confdefs.h"
5410
5411#define _SYSCALL32
5412#include <sys/procfs.h>
5413int main() {
5414pr_sigset_t avar
5415; return 0; }
5416EOF
ffc6a242 5417if { (eval echo configure:5418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5418 rm -rf conftest*
5419 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5420else
5421 echo "configure: failed program was:" >&5
5422 cat conftest.$ac_ext >&5
5423 rm -rf conftest*
5424 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5425
5426fi
5427rm -f conftest*
5428fi
5429
5430 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5431 cat >> confdefs.h <<\EOF
5432#define HAVE_PR_SIGSET_T 1
5433EOF
5434
5435 fi
5436 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5437
5438 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5439echo "configure:5440: checking for pr_sigaction64_t in sys/procfs.h" >&5
596c9d4b
KB
5440 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
5441 echo $ac_n "(cached) $ac_c" 1>&6
5442else
5443 cat > conftest.$ac_ext <<EOF
ffc6a242 5444#line 5445 "configure"
596c9d4b
KB
5445#include "confdefs.h"
5446
5447#define _SYSCALL32
5448#include <sys/procfs.h>
5449int main() {
5450pr_sigaction64_t avar
5451; return 0; }
5452EOF
ffc6a242 5453if { (eval echo configure:5454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5454 rm -rf conftest*
5455 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5456else
5457 echo "configure: failed program was:" >&5
5458 cat conftest.$ac_ext >&5
5459 rm -rf conftest*
5460 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5461
5462fi
5463rm -f conftest*
5464fi
5465
5466 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5467 cat >> confdefs.h <<\EOF
5468#define HAVE_PR_SIGACTION64_T 1
5469EOF
5470
5471 fi
5472 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5473
5474 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5475echo "configure:5476: checking for pr_siginfo64_t in sys/procfs.h" >&5
596c9d4b
KB
5476 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5477 echo $ac_n "(cached) $ac_c" 1>&6
5478else
5479 cat > conftest.$ac_ext <<EOF
ffc6a242 5480#line 5481 "configure"
596c9d4b
KB
5481#include "confdefs.h"
5482
5483#define _SYSCALL32
5484#include <sys/procfs.h>
5485int main() {
5486pr_siginfo64_t avar
5487; return 0; }
5488EOF
ffc6a242 5489if { (eval echo configure:5490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5490 rm -rf conftest*
5491 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5492else
5493 echo "configure: failed program was:" >&5
5494 cat conftest.$ac_ext >&5
5495 rm -rf conftest*
5496 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5497
5498fi
5499rm -f conftest*
5500fi
5501
5502 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5503 cat >> confdefs.h <<\EOF
5504#define HAVE_PR_SIGINFO64_T 1
5505EOF
5506
5507 fi
5508 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5509
c906108c 5510
451928c5 5511
c906108c 5512
746a987d 5513
d84dd0c5
MK
5514 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5515 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
ffc6a242 5516echo "configure:5517: checking whether prfpregset_t type is broken" >&5
d84dd0c5
MK
5517 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5518 echo $ac_n "(cached) $ac_c" 1>&6
5519else
5520 if test "$cross_compiling" = yes; then
5521 gdb_cv_prfpregset_t_broken=yes
5522else
5523 cat > conftest.$ac_ext <<EOF
ffc6a242 5524#line 5525 "configure"
d84dd0c5
MK
5525#include "confdefs.h"
5526#include <sys/procfs.h>
5527 int main ()
5528 {
5529 if (sizeof (prfpregset_t) == sizeof (void *))
5530 return 1;
5531 return 0;
5532 }
5533EOF
ffc6a242 5534if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
d84dd0c5
MK
5535then
5536 gdb_cv_prfpregset_t_broken=no
5537else
5538 echo "configure: failed program was:" >&5
5539 cat conftest.$ac_ext >&5
5540 rm -fr conftest*
5541 gdb_cv_prfpregset_t_broken=yes
5542fi
5543rm -fr conftest*
5544fi
5545
5546fi
5547
5548 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5549 if test $gdb_cv_prfpregset_t_broken = yes; then
5550 cat >> confdefs.h <<\EOF
5551#define PRFPREGSET_T_BROKEN 1
5552EOF
5553
5554 fi
5555 fi
5556
5557
c906108c 5558 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
ffc6a242 5559echo "configure:5560: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
c906108c
SS
5560 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5561 echo $ac_n "(cached) $ac_c" 1>&6
5562else
5563 cat > conftest.$ac_ext <<EOF
ffc6a242 5564#line 5565 "configure"
c906108c
SS
5565#include "confdefs.h"
5566#include <unistd.h>
5567#include <sys/types.h>
5568#include <sys/procfs.h>
5569
5570int main() {
5571
5572 int dummy;;
5573 dummy = ioctl(0, PIOCSET, &dummy);
5574
5575; return 0; }
5576EOF
ffc6a242 5577if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5578 rm -rf conftest*
5579 gdb_cv_have_procfs_piocset=yes
5580else
5581 echo "configure: failed program was:" >&5
5582 cat conftest.$ac_ext >&5
5583 rm -rf conftest*
5584 gdb_cv_have_procfs_piocset=no
5585fi
5586rm -f conftest*
5587fi
5588
5589 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5590 if test $gdb_cv_have_procfs_piocset = yes; then
5591 cat >> confdefs.h <<\EOF
5592#define HAVE_PROCFS_PIOCSET 1
5593EOF
5594
5595 fi
5596fi
5597
d45fe813
KB
5598if test ${host} = ${target} ; then
5599
5600 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
ffc6a242 5601echo "configure:5602: checking for member l_addr in struct link_map" >&5
d45fe813
KB
5602 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5603 echo $ac_n "(cached) $ac_c" 1>&6
5604else
5605 cat > conftest.$ac_ext <<EOF
ffc6a242 5606#line 5607 "configure"
d45fe813
KB
5607#include "confdefs.h"
5608#include <link.h>
5609int main() {
5610struct link_map lm; (void) lm.l_addr;
5611; return 0; }
5612EOF
ffc6a242 5613if { (eval echo configure:5614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5614 rm -rf conftest*
5615 gdb_cv_have_struct_link_map_with_l_members=yes
5616else
5617 echo "configure: failed program was:" >&5
5618 cat conftest.$ac_ext >&5
5619 rm -rf conftest*
5620 gdb_cv_have_struct_link_map_with_l_members=no
5621fi
5622rm -f conftest*
5623fi
5624
5625 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5626 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5627 cat >> confdefs.h <<\EOF
5628#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5629EOF
5630
5631 fi
5632
5633
5634 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
ffc6a242 5635echo "configure:5636: checking for member lm_addr in struct link_map" >&5
d45fe813
KB
5636 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5637 echo $ac_n "(cached) $ac_c" 1>&6
5638else
5639 cat > conftest.$ac_ext <<EOF
ffc6a242 5640#line 5641 "configure"
d45fe813
KB
5641#include "confdefs.h"
5642#include <sys/types.h>
5643#include <link.h>
5644int main() {
5645struct link_map lm; (void) lm.lm_addr;
5646; return 0; }
5647EOF
ffc6a242 5648if { (eval echo configure:5649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5649 rm -rf conftest*
5650 gdb_cv_have_struct_link_map_with_lm_members=yes
5651else
5652 echo "configure: failed program was:" >&5
5653 cat conftest.$ac_ext >&5
5654 rm -rf conftest*
5655 gdb_cv_have_struct_link_map_with_lm_members=no
5656fi
5657rm -f conftest*
5658fi
5659
5660 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
5661 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
5662 cat >> confdefs.h <<\EOF
5663#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
5664EOF
5665
5666 fi
5667
5668
5669 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
ffc6a242 5670echo "configure:5671: checking for member som_addr in struct so_map" >&5
d45fe813
KB
5671 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
5672 echo $ac_n "(cached) $ac_c" 1>&6
5673else
5674 cat > conftest.$ac_ext <<EOF
ffc6a242 5675#line 5676 "configure"
d45fe813
KB
5676#include "confdefs.h"
5677#include <sys/types.h>
39812ceb
C
5678#ifdef HAVE_NLIST_H
5679#include <nlist.h>
5680#endif
d45fe813
KB
5681#include <link.h>
5682int main() {
5683struct so_map lm; (void) lm.som_addr;
5684; return 0; }
5685EOF
ffc6a242 5686if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5687 rm -rf conftest*
5688 gdb_cv_have_struct_so_map_with_som_members=yes
5689else
5690 echo "configure: failed program was:" >&5
5691 cat conftest.$ac_ext >&5
5692 rm -rf conftest*
5693 gdb_cv_have_struct_so_map_with_som_members=no
5694fi
5695rm -f conftest*
5696fi
5697
5698 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
5699 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
5700 cat >> confdefs.h <<\EOF
5701#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
5702EOF
5703
5704 fi
5705
5706
5707 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
ffc6a242 5708echo "configure:5709: checking for struct link_map32 in sys/link.h" >&5
d45fe813
KB
5709 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
5710 echo $ac_n "(cached) $ac_c" 1>&6
5711else
5712 cat > conftest.$ac_ext <<EOF
ffc6a242 5713#line 5714 "configure"
d45fe813
KB
5714#include "confdefs.h"
5715#define _SYSCALL32
5716#include <sys/link.h>
5717int main() {
5718struct link_map32 l;
5719; return 0; }
5720EOF
ffc6a242 5721if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5722 rm -rf conftest*
5723 gdb_cv_have_struct_link_map32=yes
5724else
5725 echo "configure: failed program was:" >&5
5726 cat conftest.$ac_ext >&5
5727 rm -rf conftest*
5728 gdb_cv_have_struct_link_map32=no
5729fi
5730rm -f conftest*
5731fi
5732
5733 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
5734 if test $gdb_cv_have_struct_link_map32 = yes; then
5735 cat >> confdefs.h <<\EOF
5736#define HAVE_STRUCT_LINK_MAP32 1
943c9c25
MS
5737EOF
5738
5739 cat >> confdefs.h <<\EOF
5740#define _SYSCALL32 1
d45fe813
KB
5741EOF
5742
5743 fi
5744fi
5745
c906108c 5746echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
ffc6a242 5747echo "configure:5748: checking for main in -lm" >&5
c906108c
SS
5748ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5749if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5750 echo $ac_n "(cached) $ac_c" 1>&6
5751else
5752 ac_save_LIBS="$LIBS"
5753LIBS="-lm $LIBS"
5754cat > conftest.$ac_ext <<EOF
ffc6a242 5755#line 5756 "configure"
c906108c
SS
5756#include "confdefs.h"
5757
5758int main() {
5759main()
5760; return 0; }
5761EOF
ffc6a242 5762if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5763 rm -rf conftest*
5764 eval "ac_cv_lib_$ac_lib_var=yes"
5765else
5766 echo "configure: failed program was:" >&5
5767 cat conftest.$ac_ext >&5
5768 rm -rf conftest*
5769 eval "ac_cv_lib_$ac_lib_var=no"
5770fi
5771rm -f conftest*
5772LIBS="$ac_save_LIBS"
5773
5774fi
5775if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5776 echo "$ac_t""yes" 1>&6
5777 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5778 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5779 cat >> confdefs.h <<EOF
5780#define $ac_tr_lib 1
5781EOF
5782
5783 LIBS="-lm $LIBS"
5784
5785else
5786 echo "$ac_t""no" 1>&6
5787fi
5788
5789
5790echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
ffc6a242 5791echo "configure:5792: checking for wctype in -lc" >&5
c906108c
SS
5792ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
5793if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5794 echo $ac_n "(cached) $ac_c" 1>&6
5795else
5796 ac_save_LIBS="$LIBS"
5797LIBS="-lc $LIBS"
5798cat > conftest.$ac_ext <<EOF
ffc6a242 5799#line 5800 "configure"
c906108c
SS
5800#include "confdefs.h"
5801/* Override any gcc2 internal prototype to avoid an error. */
5802/* We use char because int might match the return type of a gcc2
5803 builtin and then its argument prototype would still apply. */
5804char wctype();
5805
5806int main() {
5807wctype()
5808; return 0; }
5809EOF
ffc6a242 5810if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5811 rm -rf conftest*
5812 eval "ac_cv_lib_$ac_lib_var=yes"
5813else
5814 echo "configure: failed program was:" >&5
5815 cat conftest.$ac_ext >&5
5816 rm -rf conftest*
5817 eval "ac_cv_lib_$ac_lib_var=no"
5818fi
5819rm -f conftest*
5820LIBS="$ac_save_LIBS"
5821
5822fi
5823if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5824 echo "$ac_t""yes" 1>&6
5825 :
5826else
5827 echo "$ac_t""no" 1>&6
5828echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
ffc6a242 5829echo "configure:5830: checking for wctype in -lw" >&5
c906108c
SS
5830ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5831if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5832 echo $ac_n "(cached) $ac_c" 1>&6
5833else
5834 ac_save_LIBS="$LIBS"
5835LIBS="-lw $LIBS"
5836cat > conftest.$ac_ext <<EOF
ffc6a242 5837#line 5838 "configure"
c906108c
SS
5838#include "confdefs.h"
5839/* Override any gcc2 internal prototype to avoid an error. */
5840/* We use char because int might match the return type of a gcc2
5841 builtin and then its argument prototype would still apply. */
5842char wctype();
5843
5844int main() {
5845wctype()
5846; return 0; }
5847EOF
ffc6a242 5848if { (eval echo configure:5849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5849 rm -rf conftest*
5850 eval "ac_cv_lib_$ac_lib_var=yes"
5851else
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5854 rm -rf conftest*
5855 eval "ac_cv_lib_$ac_lib_var=no"
5856fi
5857rm -f conftest*
5858LIBS="$ac_save_LIBS"
5859
5860fi
5861if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5862 echo "$ac_t""yes" 1>&6
5863 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5864 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5865 cat >> confdefs.h <<EOF
5866#define $ac_tr_lib 1
5867EOF
5868
5869 LIBS="-lw $LIBS"
5870
5871else
5872 echo "$ac_t""no" 1>&6
5873fi
5874
5875fi
5876
5877
5878
5879echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
ffc6a242 5880echo "configure:5881: checking for long long support in compiler" >&5
c906108c
SS
5881if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
5882 echo $ac_n "(cached) $ac_c" 1>&6
5883else
5884 cat > conftest.$ac_ext <<EOF
ffc6a242 5885#line 5886 "configure"
c906108c
SS
5886#include "confdefs.h"
5887
5888int main() {
5889
5890 extern long long foo;
5891 switch (foo & 2) { case 0: return 1; }
5892
5893; return 0; }
5894EOF
ffc6a242 5895if { (eval echo configure:5896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5896 rm -rf conftest*
5897 gdb_cv_c_long_long=yes
5898else
5899 echo "configure: failed program was:" >&5
5900 cat conftest.$ac_ext >&5
5901 rm -rf conftest*
5902 gdb_cv_c_long_long=no
5903fi
5904rm -f conftest*
5905fi
5906
5907echo "$ac_t""$gdb_cv_c_long_long" 1>&6
5908if test $gdb_cv_c_long_long = yes; then
5909 cat >> confdefs.h <<\EOF
5910#define CC_HAS_LONG_LONG 1
5911EOF
5912
5913fi
5914
5915
5916echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
ffc6a242 5917echo "configure:5918: checking for long long support in printf" >&5
c906108c
SS
5918if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
5919 echo $ac_n "(cached) $ac_c" 1>&6
5920else
5921 if test "$cross_compiling" = yes; then
5922 gdb_cv_printf_has_long_long=no
5923else
5924 cat > conftest.$ac_ext <<EOF
ffc6a242 5925#line 5926 "configure"
c906108c
SS
5926#include "confdefs.h"
5927
5928int main () {
5929 char buf[32];
5930 long long l = 0;
5931 l = (l << 16) + 0x0123;
5932 l = (l << 16) + 0x4567;
5933 l = (l << 16) + 0x89ab;
5934 l = (l << 16) + 0xcdef;
5935 sprintf (buf, "0x%016llx", l);
5936 return (strcmp ("0x0123456789abcdef", buf));
5937}
5938EOF
ffc6a242 5939if { (eval echo configure:5940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
5940then
5941 gdb_cv_printf_has_long_long=yes
5942else
5943 echo "configure: failed program was:" >&5
5944 cat conftest.$ac_ext >&5
5945 rm -fr conftest*
5946 gdb_cv_printf_has_long_long=no
5947fi
5948rm -fr conftest*
5949fi
5950
5951fi
5952
5953if test $gdb_cv_printf_has_long_long = yes; then
5954 cat >> confdefs.h <<\EOF
5955#define PRINTF_HAS_LONG_LONG 1
5956EOF
5957
5958fi
5959echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
5960
5961
5962echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
ffc6a242 5963echo "configure:5964: checking for long double support in compiler" >&5
c906108c
SS
5964if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
5965 echo $ac_n "(cached) $ac_c" 1>&6
5966else
5967 cat > conftest.$ac_ext <<EOF
ffc6a242 5968#line 5969 "configure"
c906108c
SS
5969#include "confdefs.h"
5970
5971int main() {
5972long double foo;
5973; return 0; }
5974EOF
ffc6a242 5975if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5976 rm -rf conftest*
5977 ac_cv_c_long_double=yes
5978else
5979 echo "configure: failed program was:" >&5
5980 cat conftest.$ac_ext >&5
5981 rm -rf conftest*
5982 ac_cv_c_long_double=no
5983fi
5984rm -f conftest*
5985fi
5986
5987echo "$ac_t""$ac_cv_c_long_double" 1>&6
5988if test $ac_cv_c_long_double = yes; then
5989 cat >> confdefs.h <<\EOF
5990#define HAVE_LONG_DOUBLE 1
5991EOF
5992
5993fi
5994
5995
5996echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
ffc6a242 5997echo "configure:5998: checking for long double support in printf" >&5
c906108c
SS
5998if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
5999 echo $ac_n "(cached) $ac_c" 1>&6
6000else
6001 if test "$cross_compiling" = yes; then
6002 gdb_cv_printf_has_long_double=no
6003else
6004 cat > conftest.$ac_ext <<EOF
ffc6a242 6005#line 6006 "configure"
c906108c
SS
6006#include "confdefs.h"
6007
6008int main () {
6009 char buf[16];
6010 long double f = 3.141592653;
6011 sprintf (buf, "%Lg", f);
6012 return (strncmp ("3.14159", buf, 7));
6013}
6014EOF
ffc6a242 6015if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6016then
6017 gdb_cv_printf_has_long_double=yes
6018else
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6021 rm -fr conftest*
6022 gdb_cv_printf_has_long_double=no
6023fi
6024rm -fr conftest*
6025fi
6026
6027fi
6028
6029if test $gdb_cv_printf_has_long_double = yes; then
6030 cat >> confdefs.h <<\EOF
6031#define PRINTF_HAS_LONG_DOUBLE 1
6032EOF
6033
6034fi
6035echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
6036
6037
6038echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
ffc6a242 6039echo "configure:6040: checking for long double support in scanf" >&5
c906108c
SS
6040if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
6041 echo $ac_n "(cached) $ac_c" 1>&6
6042else
6043 if test "$cross_compiling" = yes; then
6044 gdb_cv_scanf_has_long_double=no
6045else
6046 cat > conftest.$ac_ext <<EOF
ffc6a242 6047#line 6048 "configure"
c906108c
SS
6048#include "confdefs.h"
6049
6050int main () {
6051 char *buf = "3.141592653";
6052 long double f = 0;
6053 sscanf (buf, "%Lg", &f);
6054 return !(f > 3.14159 && f < 3.14160);
6055}
6056EOF
ffc6a242 6057if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6058then
6059 gdb_cv_scanf_has_long_double=yes
6060else
6061 echo "configure: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063 rm -fr conftest*
6064 gdb_cv_scanf_has_long_double=no
6065fi
6066rm -fr conftest*
6067fi
6068
6069fi
6070
6071if test $gdb_cv_scanf_has_long_double = yes; then
6072 cat >> confdefs.h <<\EOF
6073#define SCANF_HAS_LONG_DOUBLE 1
6074EOF
6075
6076fi
6077echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
6078
a534e424 6079for ac_hdr in unistd.h
c906108c
SS
6080do
6081ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6082echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ffc6a242 6083echo "configure:6084: checking for $ac_hdr" >&5
c906108c
SS
6084if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
6086else
6087 cat > conftest.$ac_ext <<EOF
ffc6a242 6088#line 6089 "configure"
c906108c
SS
6089#include "confdefs.h"
6090#include <$ac_hdr>
6091EOF
6092ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 6093{ (eval echo configure:6094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
6094ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6095if test -z "$ac_err"; then
6096 rm -rf conftest*
6097 eval "ac_cv_header_$ac_safe=yes"
6098else
6099 echo "$ac_err" >&5
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6102 rm -rf conftest*
6103 eval "ac_cv_header_$ac_safe=no"
6104fi
6105rm -f conftest*
6106fi
6107if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6108 echo "$ac_t""yes" 1>&6
6109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6110 cat >> confdefs.h <<EOF
6111#define $ac_tr_hdr 1
6112EOF
6113
6114else
6115 echo "$ac_t""no" 1>&6
6116fi
6117done
6118
6119for ac_func in getpagesize
6120do
6121echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
ffc6a242 6122echo "configure:6123: checking for $ac_func" >&5
c906108c
SS
6123if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6124 echo $ac_n "(cached) $ac_c" 1>&6
6125else
6126 cat > conftest.$ac_ext <<EOF
ffc6a242 6127#line 6128 "configure"
c906108c
SS
6128#include "confdefs.h"
6129/* System header to define __stub macros and hopefully few prototypes,
6130 which can conflict with char $ac_func(); below. */
6131#include <assert.h>
6132/* Override any gcc2 internal prototype to avoid an error. */
6133/* We use char because int might match the return type of a gcc2
6134 builtin and then its argument prototype would still apply. */
6135char $ac_func();
6136
6137int main() {
6138
6139/* The GNU C library defines this for functions which it implements
6140 to always fail with ENOSYS. Some functions are actually named
6141 something starting with __ and the normal name is an alias. */
6142#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6143choke me
6144#else
6145$ac_func();
6146#endif
6147
6148; return 0; }
6149EOF
ffc6a242 6150if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6151 rm -rf conftest*
6152 eval "ac_cv_func_$ac_func=yes"
6153else
6154 echo "configure: failed program was:" >&5
6155 cat conftest.$ac_ext >&5
6156 rm -rf conftest*
6157 eval "ac_cv_func_$ac_func=no"
6158fi
6159rm -f conftest*
6160fi
6161
6162if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6163 echo "$ac_t""yes" 1>&6
6164 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6165 cat >> confdefs.h <<EOF
6166#define $ac_tr_func 1
6167EOF
6168
6169else
6170 echo "$ac_t""no" 1>&6
6171fi
6172done
6173
6174echo $ac_n "checking for working mmap""... $ac_c" 1>&6
ffc6a242 6175echo "configure:6176: checking for working mmap" >&5
c906108c
SS
6176if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6177 echo $ac_n "(cached) $ac_c" 1>&6
6178else
6179 if test "$cross_compiling" = yes; then
6180 ac_cv_func_mmap_fixed_mapped=no
6181else
6182 cat > conftest.$ac_ext <<EOF
ffc6a242 6183#line 6184 "configure"
c906108c
SS
6184#include "confdefs.h"
6185
6186/* Thanks to Mike Haertel and Jim Avera for this test.
6187 Here is a matrix of mmap possibilities:
6188 mmap private not fixed
6189 mmap private fixed at somewhere currently unmapped
6190 mmap private fixed at somewhere already mapped
6191 mmap shared not fixed
6192 mmap shared fixed at somewhere currently unmapped
6193 mmap shared fixed at somewhere already mapped
6194 For private mappings, we should verify that changes cannot be read()
6195 back from the file, nor mmap's back from the file at a different
6196 address. (There have been systems where private was not correctly
6197 implemented like the infamous i386 svr4.0, and systems where the
6198 VM page cache was not coherent with the filesystem buffer cache
6199 like early versions of FreeBSD and possibly contemporary NetBSD.)
6200 For shared mappings, we should conversely verify that changes get
6201 propogated back to all the places they're supposed to be.
6202
6203 Grep wants private fixed already mapped.
6204 The main things grep needs to know about mmap are:
6205 * does it exist and is it safe to write into the mmap'd area
6206 * how to use it (BSD variants) */
6207#include <sys/types.h>
6208#include <fcntl.h>
6209#include <sys/mman.h>
6210
6211/* This mess was copied from the GNU getpagesize.h. */
6212#ifndef HAVE_GETPAGESIZE
a534e424
AC
6213# ifdef HAVE_UNISTD_H
6214# include <unistd.h>
6215# endif
c906108c
SS
6216
6217/* Assume that all systems that can run configure have sys/param.h. */
6218# ifndef HAVE_SYS_PARAM_H
6219# define HAVE_SYS_PARAM_H 1
6220# endif
6221
6222# ifdef _SC_PAGESIZE
6223# define getpagesize() sysconf(_SC_PAGESIZE)
6224# else /* no _SC_PAGESIZE */
6225# ifdef HAVE_SYS_PARAM_H
6226# include <sys/param.h>
6227# ifdef EXEC_PAGESIZE
6228# define getpagesize() EXEC_PAGESIZE
6229# else /* no EXEC_PAGESIZE */
6230# ifdef NBPG
6231# define getpagesize() NBPG * CLSIZE
6232# ifndef CLSIZE
6233# define CLSIZE 1
6234# endif /* no CLSIZE */
6235# else /* no NBPG */
6236# ifdef NBPC
6237# define getpagesize() NBPC
6238# else /* no NBPC */
6239# ifdef PAGESIZE
6240# define getpagesize() PAGESIZE
6241# endif /* PAGESIZE */
6242# endif /* no NBPC */
6243# endif /* no NBPG */
6244# endif /* no EXEC_PAGESIZE */
6245# else /* no HAVE_SYS_PARAM_H */
6246# define getpagesize() 8192 /* punt totally */
6247# endif /* no HAVE_SYS_PARAM_H */
6248# endif /* no _SC_PAGESIZE */
6249
6250#endif /* no HAVE_GETPAGESIZE */
6251
6252#ifdef __cplusplus
6253extern "C" { void *malloc(unsigned); }
6254#else
6255char *malloc();
6256#endif
6257
6258int
6259main()
6260{
6261 char *data, *data2, *data3;
6262 int i, pagesize;
6263 int fd;
6264
6265 pagesize = getpagesize();
6266
6267 /*
6268 * First, make a file with some known garbage in it.
6269 */
6270 data = malloc(pagesize);
6271 if (!data)
6272 exit(1);
6273 for (i = 0; i < pagesize; ++i)
6274 *(data + i) = rand();
6275 umask(0);
6276 fd = creat("conftestmmap", 0600);
6277 if (fd < 0)
6278 exit(1);
6279 if (write(fd, data, pagesize) != pagesize)
6280 exit(1);
6281 close(fd);
6282
6283 /*
6284 * Next, try to mmap the file at a fixed address which
6285 * already has something else allocated at it. If we can,
6286 * also make sure that we see the same garbage.
6287 */
6288 fd = open("conftestmmap", O_RDWR);
6289 if (fd < 0)
6290 exit(1);
6291 data2 = malloc(2 * pagesize);
6292 if (!data2)
6293 exit(1);
6294 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6295 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6296 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6297 exit(1);
6298 for (i = 0; i < pagesize; ++i)
6299 if (*(data + i) != *(data2 + i))
6300 exit(1);
6301
6302 /*
6303 * Finally, make sure that changes to the mapped area
6304 * do not percolate back to the file as seen by read().
6305 * (This is a bug on some variants of i386 svr4.0.)
6306 */
6307 for (i = 0; i < pagesize; ++i)
6308 *(data2 + i) = *(data2 + i) + 1;
6309 data3 = malloc(pagesize);
6310 if (!data3)
6311 exit(1);
6312 if (read(fd, data3, pagesize) != pagesize)
6313 exit(1);
6314 for (i = 0; i < pagesize; ++i)
6315 if (*(data + i) != *(data3 + i))
6316 exit(1);
6317 close(fd);
6318 unlink("conftestmmap");
6319 exit(0);
6320}
6321
6322EOF
ffc6a242 6323if { (eval echo configure:6324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6324then
6325 ac_cv_func_mmap_fixed_mapped=yes
6326else
6327 echo "configure: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6329 rm -fr conftest*
6330 ac_cv_func_mmap_fixed_mapped=no
6331fi
6332rm -fr conftest*
6333fi
6334
6335fi
6336
6337echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6338if test $ac_cv_func_mmap_fixed_mapped = yes; then
6339 cat >> confdefs.h <<\EOF
6340#define HAVE_MMAP 1
6341EOF
6342
6343fi
6344
6345
438013df
AO
6346case ${host_os} in
6347aix*)
6348 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
ffc6a242 6349echo "configure:6350: checking for -bbigtoc option" >&5
438013df
AO
6350if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
6351 echo $ac_n "(cached) $ac_c" 1>&6
6352else
6353
6354 SAVE_LDFLAGS=$LDFLAGS
6355
6356 case $GCC in
6357 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
6358 *) gdb_cv_bigtoc=-bbigtoc ;;
6359 esac
6360
6361 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
6362 cat > conftest.$ac_ext <<EOF
ffc6a242 6363#line 6364 "configure"
438013df
AO
6364#include "confdefs.h"
6365
6366int main() {
6367int i;
6368; return 0; }
6369EOF
ffc6a242 6370if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
6371 :
6372else
6373 echo "configure: failed program was:" >&5
6374 cat conftest.$ac_ext >&5
6375 rm -rf conftest*
6376 gdb_cv_bigtoc=
6377fi
6378rm -f conftest*
6379
6380fi
6381
6382echo "$ac_t""$gdb_cv_bigtoc" 1>&6
6383 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
6384 ;;
6385esac
6386
c906108c
SS
6387
6388
6389if test ${build} = ${host} -a ${host} = ${target} ; then
6390 case ${host_os} in
6391 hpux*)
6392 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
ffc6a242 6393echo "configure:6394: checking for HPUX/OSF thread support" >&5
c906108c
SS
6394 if test -f /usr/include/dce/cma_config.h ; then
6395 if test "$GCC" = "yes" ; then
6396 echo "$ac_t""yes" 1>&6
6397 cat >> confdefs.h <<\EOF
6398#define HAVE_HPUX_THREAD_SUPPORT 1
6399EOF
6400
66b965bb 6401 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
6402 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6403 else
6404 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6405 fi
6406 else
6407 echo "$ac_t""no" 1>&6
6408 fi
6409 ;;
6410 solaris*)
6411 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
ffc6a242 6412echo "configure:6413: checking for Solaris thread debugging library" >&5
c906108c
SS
6413 if test -f /usr/lib/libthread_db.so.1 ; then
6414 echo "$ac_t""yes" 1>&6
6415 cat >> confdefs.h <<\EOF
6416#define HAVE_THREAD_DB_LIB 1
6417EOF
6418
66b965bb 6419 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
6420 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6421 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
ffc6a242 6422echo "configure:6423: checking for dlopen in -ldl" >&5
c906108c
SS
6423ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6424if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426else
6427 ac_save_LIBS="$LIBS"
6428LIBS="-ldl $LIBS"
6429cat > conftest.$ac_ext <<EOF
ffc6a242 6430#line 6431 "configure"
c906108c
SS
6431#include "confdefs.h"
6432/* Override any gcc2 internal prototype to avoid an error. */
6433/* We use char because int might match the return type of a gcc2
6434 builtin and then its argument prototype would still apply. */
6435char dlopen();
6436
6437int main() {
6438dlopen()
6439; return 0; }
6440EOF
ffc6a242 6441if { (eval echo configure:6442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6442 rm -rf conftest*
6443 eval "ac_cv_lib_$ac_lib_var=yes"
6444else
6445 echo "configure: failed program was:" >&5
6446 cat conftest.$ac_ext >&5
6447 rm -rf conftest*
6448 eval "ac_cv_lib_$ac_lib_var=no"
6449fi
6450rm -f conftest*
6451LIBS="$ac_save_LIBS"
6452
6453fi
6454if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6455 echo "$ac_t""yes" 1>&6
6456 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6457 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6458 cat >> confdefs.h <<EOF
6459#define $ac_tr_lib 1
6460EOF
6461
6462 LIBS="-ldl $LIBS"
6463
6464else
6465 echo "$ac_t""no" 1>&6
6466fi
6467
6468 if test "$GCC" = "yes" ; then
6469 # The GNU linker requires the -export-dynamic option to make
6470 # all symbols visible in the dynamic symbol table.
6471 hold_ldflags=$LDFLAGS
6472 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
ffc6a242 6473echo "configure:6474: checking for the ld -export-dynamic flag" >&5
c906108c
SS
6474 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6475 cat > conftest.$ac_ext <<EOF
ffc6a242 6476#line 6477 "configure"
c906108c
SS
6477#include "confdefs.h"
6478
6479int main() {
6480int i;
6481; return 0; }
6482EOF
ffc6a242 6483if { (eval echo configure:6484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6484 rm -rf conftest*
6485 found=yes
6486else
6487 echo "configure: failed program was:" >&5
6488 cat conftest.$ac_ext >&5
6489 rm -rf conftest*
6490 found=no
6491fi
6492rm -f conftest*
6493 LDFLAGS=$hold_ldflags
6494 echo "$ac_t""$found" 1>&6
6495 if test $found = yes; then
6496 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6497 fi
6498 fi
6499 # Sun randomly tweaked the prototypes in <proc_service.h>
6500 # at one point.
6501 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
ffc6a242 6502echo "configure:6503: checking if <proc_service.h> is old" >&5
c906108c
SS
6503 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6504 echo $ac_n "(cached) $ac_c" 1>&6
6505else
6506
6507 cat > conftest.$ac_ext <<EOF
ffc6a242 6508#line 6509 "configure"
c906108c
SS
6509#include "confdefs.h"
6510
6511 #include <proc_service.h>
6512 ps_err_e ps_pdwrite
6513 (struct ps_prochandle*, psaddr_t, const void*, size_t);
6514
6515int main() {
6516
6517; return 0; }
6518EOF
ffc6a242 6519if { (eval echo configure:6520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
6520 rm -rf conftest*
6521 gdb_cv_proc_service_is_old=no
6522else
6523 echo "configure: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
6525 rm -rf conftest*
6526 gdb_cv_proc_service_is_old=yes
6527fi
6528rm -f conftest*
6529
6530fi
6531
6532 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6533 if test $gdb_cv_proc_service_is_old = yes; then
6534 cat >> confdefs.h <<\EOF
6535#define PROC_SERVICE_IS_OLD 1
6536EOF
6537
6538 fi
6539 else
6540 echo "$ac_t""no" 1>&6
6541 fi
6542 ;;
6543 esac
6544
6545fi
6546
fb40c209 6547
d318976c
FN
6548# Check whether --enable-gdbcli or --disable-gdbcli was given.
6549if test "${enable_gdbcli+set}" = set; then
6550 enableval="$enable_gdbcli"
6551
6bad8db2
FN
6552 case "${enableval}" in
6553 yes) enable_gdbcli=yes ;;
6554 "") enable_gdbcli=yes ;;
d318976c
FN
6555 no)
6556 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6557 ;;
6558 *)
6bad8db2 6559 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
d318976c
FN
6560 ;;
6561 esac
6562
6563else
6564 enable_gdbcli=yes
6565fi
6566
6567case ${enable_gdbcli} in
6568 "yes" )
6bad8db2 6569 if test -d "${srcdir}/cli" ; then
d318976c
FN
6570 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6571 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
486697a0 6572 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
d318976c
FN
6573 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6574 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6575 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6576 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6577 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6578 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6579 fi
6580 ;;
6581esac
6582
6583
fb40c209
AC
6584# Check whether --enable-gdbmi or --disable-gdbmi was given.
6585if test "${enable_gdbmi+set}" = set; then
6586 enableval="$enable_gdbmi"
6587
6588 case "${enable_gdbmi}" in
6589 yes | no) ;;
6590 "") enable_gdbmi=yes ;;
6591 *)
6592 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6593 ;;
6594 esac
6595
b0e2e90a
AC
6596else
6597 enable_gdbmi=yes
fb40c209
AC
6598fi
6599
6600case ${enable_gdbmi} in
6601 "yes" )
6602 if test -d "${srcdir}/mi" ; then
6603 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6604 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
486697a0 6605 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
fb40c209 6606 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 6607 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
b3a90332
AC
6608 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6609 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
e56ac5c3
AC
6610 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6611 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
6612 fi
6613 ;;
6614esac
c906108c 6615
b4df4f68
FN
6616# Configure UI_OUT by default (before 5.2 it can be disabled)
6617# It must be configured if gdbmi is configured
6618
6619UIOUT_CFLAGS=
6620
6621
6622# Check whether --with-uiout or --without-uiout was given.
6623if test "${with_uiout+set}" = set; then
6624 withval="$with_uiout"
6625 case "${withval}" in
6626 yes) want_uiout=true ;;
6627 no) if test $enable_gdbmi = yes; then
6628 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6629 else
6630 want_uiout=false
6631 fi ;;
6632 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6633esac
6634else
6635 want_uiout=true
6636fi
6637
6638if test $want_uiout = true; then
6639 UIOUT_CFLAGS="-DUI_OUT=1"
6640fi
6641
c906108c
SS
6642# Check whether --enable-tui or --disable-tui was given.
6643if test "${enable_tui+set}" = set; then
6644 enableval="$enable_tui"
6645
6646 case "${enable_tui}" in
6647 yes | no) ;;
6648 "") enable_tui=yes ;;
6649 *)
6650 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6651 ;;
6652 esac
6653
6654fi
6655
6656case ${enable_tui} in
6657 "yes" )
ed952ac5
AC
6658 if test -d "${srcdir}/tui" ; then
6659 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6660 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
486697a0 6661 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
ed952ac5
AC
6662 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6663 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6664 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6665 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6666 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6667 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6668 fi
6669 ;;
c906108c
SS
6670esac
6671
c906108c
SS
6672# Check whether --enable-netrom or --disable-netrom was given.
6673if test "${enable_netrom+set}" = set; then
6674 enableval="$enable_netrom"
6675 case "${enableval}" in
6676yes) enable_netrom=yes ;;
6677no) enable_netrom=no ;;
6678*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
6679esac
6680fi
6681
6682
6683if test "${enable_netrom}" = "yes"; then
66b965bb 6684 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
6685 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
6686fi
6687
1decb323 6688
3b851bce
AC
6689# NOTE: Don't add -Wall or -Wunused, they both include
6690# -Wunused-parameter which reports bogus warnings.
6691# NOTE: If you add to this list, remember to update
6692# gdb/doc/gdbint.texinfo.
1decb323 6693build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 6694-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
6695# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
6696# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 6697# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
6698# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
6699# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
6700# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
6701# Check whether --enable-build-warnings or --disable-build-warnings was given.
6702if test "${enable_build_warnings+set}" = set; then
6703 enableval="$enable_build_warnings"
1decb323 6704 case "${enableval}" in
c906108c
SS
6705 yes) ;;
6706 no) build_warnings="-w";;
6707 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6708 build_warnings="${build_warnings} ${t}";;
6709 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6710 build_warnings="${t} ${build_warnings}";;
6711 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6712esac
d4f3574e 6713if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 6714 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 6715fi
1decb323 6716fi
3b851bce
AC
6717# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
6718if test "${enable_gdb_build_warnings+set}" = set; then
6719 enableval="$enable_gdb_build_warnings"
6720 case "${enableval}" in
6721 yes) ;;
6722 no) build_warnings="-w";;
6723 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6724 build_warnings="${build_warnings} ${t}";;
6725 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6726 build_warnings="${t} ${build_warnings}";;
6727 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6728esac
6729if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6730 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
6731fi
6732fi
104c1213
JM
6733WARN_CFLAGS=""
6734WERROR_CFLAGS=""
c906108c
SS
6735if test "x${build_warnings}" != x -a "x$GCC" = xyes
6736then
746a987d 6737 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
ffc6a242 6738echo "configure:6739: checking compiler warning flags" >&5
746a987d
AC
6739 # Separate out the -Werror flag as some files just cannot be
6740 # compiled with it enabled.
6741 for w in ${build_warnings}; do
6742 case $w in
6743 -Werr*) WERROR_CFLAGS=-Werror ;;
6744 *) # Check that GCC accepts it
4536bbc6
AC
6745 saved_CFLAGS="$CFLAGS"
6746 CFLAGS="$CFLAGS $w"
6747 cat > conftest.$ac_ext <<EOF
ffc6a242 6748#line 6749 "configure"
4536bbc6
AC
6749#include "confdefs.h"
6750
6751int main() {
6752
6753; return 0; }
6754EOF
ffc6a242 6755if { (eval echo configure:6756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
6756 rm -rf conftest*
6757 WARN_CFLAGS="${WARN_CFLAGS} $w"
6758else
6759 echo "configure: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6761fi
6762rm -f conftest*
6763 CFLAGS="$saved_CFLAGS"
746a987d
AC
6764 esac
6765 done
6766 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
6767fi
6768
6769
104c1213 6770
c906108c
SS
6771MMALLOC_CFLAGS=
6772MMALLOC=
6773
6774
6775
6776# Check whether --with-mmalloc or --without-mmalloc was given.
6777if test "${with_mmalloc+set}" = set; then
6778 withval="$with_mmalloc"
6779 case "${withval}" in
6780 yes) want_mmalloc=true ;;
6781 no) want_mmalloc=false;;
6782 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
6783esac
6784else
6785 want_mmalloc=false
6786fi
6787
6788if test x$want_mmalloc = xtrue; then
6789 cat >> confdefs.h <<\EOF
6790#define USE_MMALLOC 1
6791EOF
6792
6793 cat >> confdefs.h <<\EOF
6794#define MMCHECK_FORCE 1
6795EOF
6796
6797 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
6798 MMALLOC='../mmalloc/libmmalloc.a'
6799fi
6800
88987551
L
6801# Check whether --with-included-regex or --without-included-regex was given.
6802if test "${with_included_regex+set}" = set; then
6803 withval="$with_included_regex"
6804 case "${withval}" in
6805 yes) want_included_regex=true ;;
6806 no) want_included_regex=false;;
6807 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
6808esac
6809else
6810 want_included_regex=true
6811fi
6812
88987551
L
6813if test $want_included_regex = false; then
6814 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
ffc6a242 6815echo "configure:6816: checking for GNU regex" >&5
88987551
L
6816 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6817 echo $ac_n "(cached) $ac_c" 1>&6
6818else
6819 cat > conftest.$ac_ext <<EOF
ffc6a242 6820#line 6821 "configure"
88987551
L
6821#include "confdefs.h"
6822#include <gnu-versions.h>
6823#include <sys/types.h>
6824#include <regex.h>
6825int main() {
6826#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
6827#error No valid GNU regex.
6828#endif
6829
6830; return 0; }
6831EOF
ffc6a242 6832if { (eval echo configure:6833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
88987551
L
6833 rm -rf conftest*
6834 gdb_cv_have_gnu_regex=yes
6835else
6836 echo "configure: failed program was:" >&5
6837 cat conftest.$ac_ext >&5
6838 rm -rf conftest*
6839 gdb_cv_have_gnu_regex=no
6840fi
6841rm -f conftest*
6842fi
6843
6844 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
e48f66e4
AC
6845 if test $gdb_cv_have_gnu_regex = no; then
6846 want_included_regex=true
88987551
L
6847 fi
6848fi
6849
e48f66e4
AC
6850if test x${want_included_regex} = xtrue; then
6851 REGEX="gnu-regex.o"
6852 cat >> confdefs.h <<\EOF
6853#define USE_INCLUDED_REGEX 1
6854EOF
6855
6856fi
88987551 6857
7a292a7a
SS
6858
6859# In the Cygwin environment, we need some additional flags.
6860echo $ac_n "checking for cygwin""... $ac_c" 1>&6
ffc6a242 6861echo "configure:6862: checking for cygwin" >&5
7a292a7a
SS
6862if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
6863 echo $ac_n "(cached) $ac_c" 1>&6
6864else
6865 cat > conftest.$ac_ext <<EOF
ffc6a242 6866#line 6867 "configure"
7a292a7a
SS
6867#include "confdefs.h"
6868
6869#if defined (__CYGWIN__) || defined (__CYGWIN32__)
6870lose
6871#endif
6872EOF
6873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6874 egrep "lose" >/dev/null 2>&1; then
6875 rm -rf conftest*
6876 gdb_cv_os_cygwin=yes
6877else
6878 rm -rf conftest*
6879 gdb_cv_os_cygwin=no
6880fi
6881rm -f conftest*
6882
6883fi
6884
6885echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
6886
aff38e61
AC
6887
6888SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
6889case ${host} in
95cbc983
AC
6890 *go32* ) SER_HARDWIRE=ser-go32.o ;;
6891 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
6892esac
6893
6894
6895
b83266a0
SS
6896if test x$gdb_host = xgo32; then
6897 TERM_LIB=
6898else
c906108c
SS
6899if test x$gdb_cv_os_cygwin = xyes; then
6900 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
6901else
6902 TERM_LIB=
6903 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
ffc6a242 6904echo "configure:6905: checking for tgetent in -lncurses" >&5
c906108c
SS
6905ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
6906if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6907 echo $ac_n "(cached) $ac_c" 1>&6
6908else
6909 ac_save_LIBS="$LIBS"
6910LIBS="-lncurses $LIBS"
6911cat > conftest.$ac_ext <<EOF
ffc6a242 6912#line 6913 "configure"
c906108c
SS
6913#include "confdefs.h"
6914/* Override any gcc2 internal prototype to avoid an error. */
6915/* We use char because int might match the return type of a gcc2
6916 builtin and then its argument prototype would still apply. */
6917char tgetent();
6918
6919int main() {
6920tgetent()
6921; return 0; }
6922EOF
ffc6a242 6923if { (eval echo configure:6924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6924 rm -rf conftest*
6925 eval "ac_cv_lib_$ac_lib_var=yes"
6926else
6927 echo "configure: failed program was:" >&5
6928 cat conftest.$ac_ext >&5
6929 rm -rf conftest*
6930 eval "ac_cv_lib_$ac_lib_var=no"
6931fi
6932rm -f conftest*
6933LIBS="$ac_save_LIBS"
6934
6935fi
6936if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6937 echo "$ac_t""yes" 1>&6
6938 TERM_LIB=-lncurses
6939else
6940 echo "$ac_t""no" 1>&6
6941echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
ffc6a242 6942echo "configure:6943: checking for tgetent in -lHcurses" >&5
c906108c
SS
6943ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
6944if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6945 echo $ac_n "(cached) $ac_c" 1>&6
6946else
6947 ac_save_LIBS="$LIBS"
6948LIBS="-lHcurses $LIBS"
6949cat > conftest.$ac_ext <<EOF
ffc6a242 6950#line 6951 "configure"
c906108c
SS
6951#include "confdefs.h"
6952/* Override any gcc2 internal prototype to avoid an error. */
6953/* We use char because int might match the return type of a gcc2
6954 builtin and then its argument prototype would still apply. */
6955char tgetent();
6956
6957int main() {
6958tgetent()
6959; return 0; }
6960EOF
ffc6a242 6961if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6962 rm -rf conftest*
6963 eval "ac_cv_lib_$ac_lib_var=yes"
6964else
6965 echo "configure: failed program was:" >&5
6966 cat conftest.$ac_ext >&5
6967 rm -rf conftest*
6968 eval "ac_cv_lib_$ac_lib_var=no"
6969fi
6970rm -f conftest*
6971LIBS="$ac_save_LIBS"
6972
6973fi
6974if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6975 echo "$ac_t""yes" 1>&6
6976 TERM_LIB=-lHcurses
6977else
6978 echo "$ac_t""no" 1>&6
6979echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
ffc6a242 6980echo "configure:6981: checking for tgetent in -ltermlib" >&5
c906108c
SS
6981ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
6982if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6983 echo $ac_n "(cached) $ac_c" 1>&6
6984else
6985 ac_save_LIBS="$LIBS"
6986LIBS="-ltermlib $LIBS"
6987cat > conftest.$ac_ext <<EOF
ffc6a242 6988#line 6989 "configure"
c906108c
SS
6989#include "confdefs.h"
6990/* Override any gcc2 internal prototype to avoid an error. */
6991/* We use char because int might match the return type of a gcc2
6992 builtin and then its argument prototype would still apply. */
6993char tgetent();
6994
6995int main() {
6996tgetent()
6997; return 0; }
6998EOF
ffc6a242 6999if { (eval echo configure:7000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7000 rm -rf conftest*
7001 eval "ac_cv_lib_$ac_lib_var=yes"
7002else
7003 echo "configure: failed program was:" >&5
7004 cat conftest.$ac_ext >&5
7005 rm -rf conftest*
7006 eval "ac_cv_lib_$ac_lib_var=no"
7007fi
7008rm -f conftest*
7009LIBS="$ac_save_LIBS"
7010
7011fi
7012if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7013 echo "$ac_t""yes" 1>&6
7014 TERM_LIB=-ltermlib
7015else
7016 echo "$ac_t""no" 1>&6
7017echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
ffc6a242 7018echo "configure:7019: checking for tgetent in -ltermcap" >&5
c906108c
SS
7019ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
7020if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7021 echo $ac_n "(cached) $ac_c" 1>&6
7022else
7023 ac_save_LIBS="$LIBS"
7024LIBS="-ltermcap $LIBS"
7025cat > conftest.$ac_ext <<EOF
ffc6a242 7026#line 7027 "configure"
c906108c
SS
7027#include "confdefs.h"
7028/* Override any gcc2 internal prototype to avoid an error. */
7029/* We use char because int might match the return type of a gcc2
7030 builtin and then its argument prototype would still apply. */
7031char tgetent();
7032
7033int main() {
7034tgetent()
7035; return 0; }
7036EOF
ffc6a242 7037if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7038 rm -rf conftest*
7039 eval "ac_cv_lib_$ac_lib_var=yes"
7040else
7041 echo "configure: failed program was:" >&5
7042 cat conftest.$ac_ext >&5
7043 rm -rf conftest*
7044 eval "ac_cv_lib_$ac_lib_var=no"
7045fi
7046rm -f conftest*
7047LIBS="$ac_save_LIBS"
7048
7049fi
7050if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7051 echo "$ac_t""yes" 1>&6
7052 TERM_LIB=-ltermcap
7053else
7054 echo "$ac_t""no" 1>&6
7055echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
ffc6a242 7056echo "configure:7057: checking for tgetent in -lcurses" >&5
c906108c
SS
7057ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
7058if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7059 echo $ac_n "(cached) $ac_c" 1>&6
7060else
7061 ac_save_LIBS="$LIBS"
7062LIBS="-lcurses $LIBS"
7063cat > conftest.$ac_ext <<EOF
ffc6a242 7064#line 7065 "configure"
c906108c
SS
7065#include "confdefs.h"
7066/* Override any gcc2 internal prototype to avoid an error. */
7067/* We use char because int might match the return type of a gcc2
7068 builtin and then its argument prototype would still apply. */
7069char tgetent();
7070
7071int main() {
7072tgetent()
7073; return 0; }
7074EOF
ffc6a242 7075if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7076 rm -rf conftest*
7077 eval "ac_cv_lib_$ac_lib_var=yes"
7078else
7079 echo "configure: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081 rm -rf conftest*
7082 eval "ac_cv_lib_$ac_lib_var=no"
7083fi
7084rm -f conftest*
7085LIBS="$ac_save_LIBS"
7086
7087fi
7088if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7089 echo "$ac_t""yes" 1>&6
7090 TERM_LIB=-lcurses
7091else
7092 echo "$ac_t""no" 1>&6
7093echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
ffc6a242 7094echo "configure:7095: checking for tgetent in -lterminfo" >&5
c906108c
SS
7095ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
7096if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7097 echo $ac_n "(cached) $ac_c" 1>&6
7098else
7099 ac_save_LIBS="$LIBS"
7100LIBS="-lterminfo $LIBS"
7101cat > conftest.$ac_ext <<EOF
ffc6a242 7102#line 7103 "configure"
c906108c
SS
7103#include "confdefs.h"
7104/* Override any gcc2 internal prototype to avoid an error. */
7105/* We use char because int might match the return type of a gcc2
7106 builtin and then its argument prototype would still apply. */
7107char tgetent();
7108
7109int main() {
7110tgetent()
7111; return 0; }
7112EOF
ffc6a242 7113if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7114 rm -rf conftest*
7115 eval "ac_cv_lib_$ac_lib_var=yes"
7116else
7117 echo "configure: failed program was:" >&5
7118 cat conftest.$ac_ext >&5
7119 rm -rf conftest*
7120 eval "ac_cv_lib_$ac_lib_var=no"
7121fi
7122rm -f conftest*
7123LIBS="$ac_save_LIBS"
7124
7125fi
7126if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7127 echo "$ac_t""yes" 1>&6
7128 TERM_LIB=-lterminfo
7129else
7130 echo "$ac_t""no" 1>&6
7131fi
7132
7133fi
7134
7135fi
7136
7137fi
7138
7139fi
7140
7141fi
7142
7143
7144 if test "x$TERM_LIB" = x
7145 then
7146 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
7147 fi
7148fi
b83266a0 7149fi
c906108c
SS
7150
7151
cd0fc7c3
SS
7152# libreadline needs libuser32.a in a cygwin environment
7153WIN32LIBS=
7154if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
7155 WIN32LIBS="-luser32"
7156 case "${target}" in
7157 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
7158 ;;
7159 esac
cd0fc7c3 7160fi
c906108c 7161
7a292a7a 7162
3fc11d3e
JM
7163LIBGUI="../libgui/src/libgui.a"
7164GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
7165
7166
7a292a7a 7167
8b93c638
JM
7168# Check whether --with-cpu or --without-cpu was given.
7169if test "${with_cpu+set}" = set; then
7170 withval="$with_cpu"
7171 case "${target}" in
7172 powerpc-* | powerpcle-* )
7173 ## It would be nice to keep this table in sync with the one in
7174 ## gcc/configure.
7175 case "${with_cpu}" in
7176 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
7177 | 604 | 750 )
7178 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
7179 ;;
7180 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
7181 ## These are all RS6000 variants, as far as GDB is concerned.
7182 with_cpu=rs6000
7183 ;;
7184 603e | ec603e )
7185 with_cpu=603
7186 ;;
7187 604e )
7188 with_cpu=604
7189 ;;
7190 * )
7191 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
7192 with_cpu=ppc-uisa
7193 ;;
7194 esac
7195 ;;
7196 * )
7197 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
7198 ;;
7199esac
7200cat >> confdefs.h <<EOF
7201#define TARGET_CPU_DEFAULT "${with_cpu}"
7202EOF
7203
7204
7205fi
7206
7207
7208
3fc11d3e
JM
7209# Check whether --enable-gdbtk or --disable-gdbtk was given.
7210if test "${enable_gdbtk+set}" = set; then
7211 enableval="$enable_gdbtk"
7212 case "${enableval}" in
7213 yes)
7214 case "$host" in
7215 *go32*)
7216 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7217 enable_gdbtk=no ;;
7218 *windows*)
7219 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7220 enable_gdbtk=no ;;
7221 *)
7222 enable_gdbtk=yes ;;
7223 esac ;;
7224 no)
7225 enable_gdbtk=no ;;
7226 *)
7227 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7228esac
7229else
7230
7231# Default is on for everything but go32 and Cygwin
7232case "$host" in
7233 *go32* | *windows*)
7234 ;;
7235 *)
379d6434
AC
7236 if test -d "${srcdir}/gdbtk" ; then
7237 enable_gdbtk=yes
7238 fi
7239 ;;
7240esac
3fc11d3e
JM
7241
7242fi
7243
7244
7245WIN32LDAPP=
7246
7247
7248
7249configdir="unix"
7250
7251GDBTKLIBS=
7252if test "${enable_gdbtk}" = "yes"; then
7253
d1c3b63a
KS
7254 # Gdbtk must have an absolute path to srcdir in order to run
7255 # properly when not installed.
7256 here=`pwd`
7257 cd ${srcdir}
7258 GDBTK_SRC_DIR=`pwd`
7259 cd $here
7260
3fc11d3e
JM
7261
7262#
7263# Ok, lets find the tcl configuration
7264# First, look for one uninstalled.
7265# the alternative search directory is invoked by --with-tclconfig
7266#
7267
7268if test x"${no_tcl}" = x ; then
7269 # we reset no_tcl in case something fails here
7270 no_tcl=true
7271 # Check whether --with-tclconfig or --without-tclconfig was given.
7272if test "${with_tclconfig+set}" = set; then
7273 withval="$with_tclconfig"
7274 with_tclconfig=${withval}
7275fi
7276
7277 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
ffc6a242 7278echo "configure:7279: checking for Tcl configuration" >&5
3fc11d3e
JM
7279 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7280 echo $ac_n "(cached) $ac_c" 1>&6
7281else
7282
7283
7284 # First check to see if --with-tclconfig was specified.
7285 if test x"${with_tclconfig}" != x ; then
7286 if test -f "${with_tclconfig}/tclConfig.sh" ; then
7287 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7288 else
7289 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7290 fi
7291 fi
7292
7293 # then check for a private Tcl installation
7294 if test x"${ac_cv_c_tclconfig}" = x ; then
7295 for i in \
7296 ../tcl \
7297 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7298 ../../tcl \
7299 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7300 ../../../tcl \
7301 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7302 if test -f "$i/${configdir}/tclConfig.sh" ; then
7303 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7304 break
7305 fi
7306 done
7307 fi
7308 # check in a few common install locations
7309 if test x"${ac_cv_c_tclconfig}" = x ; then
7310 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7311 if test -f "$i/tclConfig.sh" ; then
7312 ac_cv_c_tclconfig=`(cd $i; pwd)`
7313 break
7314 fi
7315 done
7316 fi
7317 # check in a few other private locations
7318 if test x"${ac_cv_c_tclconfig}" = x ; then
7319 for i in \
7320 ${srcdir}/../tcl \
7321 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7322 if test -f "$i/${configdir}/tclConfig.sh" ; then
7323 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7324 break
7325 fi
7326 done
7327 fi
7328
7329fi
7330
7331 if test x"${ac_cv_c_tclconfig}" = x ; then
7332 TCLCONFIG="# no Tcl configs found"
7333 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7334 else
7335 no_tcl=
7336 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7337 echo "$ac_t""found $TCLCONFIG" 1>&6
7338 fi
7339fi
7340
7341 if test -z "${no_tcl}"; then
7342
7343 . $TCLCONFIG
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370#
7371# Ok, lets find the tk configuration
7372# First, look for one uninstalled.
7373# the alternative search directory is invoked by --with-tkconfig
7374#
7375
7376if test x"${no_tk}" = x ; then
7377 # we reset no_tk in case something fails here
7378 no_tk=true
7379 # Check whether --with-tkconfig or --without-tkconfig was given.
7380if test "${with_tkconfig+set}" = set; then
7381 withval="$with_tkconfig"
7382 with_tkconfig=${withval}
7383fi
7384
7385 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
ffc6a242 7386echo "configure:7387: checking for Tk configuration" >&5
3fc11d3e
JM
7387 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7388 echo $ac_n "(cached) $ac_c" 1>&6
7389else
7390
7391
7392 # First check to see if --with-tkconfig was specified.
7393 if test x"${with_tkconfig}" != x ; then
7394 if test -f "${with_tkconfig}/tkConfig.sh" ; then
7395 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7396 else
7397 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7398 fi
7399 fi
7400
7401 # then check for a private Tk library
7402 if test x"${ac_cv_c_tkconfig}" = x ; then
7403 for i in \
7404 ../tk \
7405 `ls -dr ../tk[4-9]* 2>/dev/null` \
7406 ../../tk \
7407 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7408 ../../../tk \
7409 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7410 if test -f "$i/${configdir}/tkConfig.sh" ; then
7411 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7412 break
7413 fi
7414 done
7415 fi
7416 # check in a few common install locations
7417 if test x"${ac_cv_c_tkconfig}" = x ; then
7418 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7419 if test -f "$i/tkConfig.sh" ; then
7420 ac_cv_c_tkconfig=`(cd $i; pwd)`
7421 break
7422 fi
7423 done
7424 fi
7425 # check in a few other private locations
7426 if test x"${ac_cv_c_tkconfig}" = x ; then
7427 for i in \
7428 ${srcdir}/../tk \
7429 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7430 if test -f "$i/${configdir}/tkConfig.sh" ; then
7431 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7432 break
7433 fi
7434 done
7435 fi
7436
7437fi
7438
7439 if test x"${ac_cv_c_tkconfig}" = x ; then
7440 TKCONFIG="# no Tk configs found"
7441 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7442 else
7443 no_tk=
7444 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7445 echo "$ac_t""found $TKCONFIG" 1>&6
7446 fi
7447fi
7448
7449
7450
dd2504ab
JM
7451 # now look for Tcl library stuff
7452
7453 case "${host}" in
7454 *-*-cygwin*)
7455 tcldir=../tcl/win/
7456 ;;
7457 *)
7458 tcldir=../tcl/unix/
7459 ;;
7460 esac
7461
7462 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7463
3fc11d3e
JM
7464 # If $no_tk is nonempty, then we can't do Tk, and there is no
7465 # point to doing Tcl.
7466 if test -z "${no_tk}"; then
7467
7468 if test -f "$TKCONFIG" ; then
7469 . $TKCONFIG
7470 fi
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485#
7486# Ok, lets find the tcl source trees so we can use the headers
7487# Warning: transition of version 9 to 10 will break this algorithm
7488# because 10 sorts before 9. We also look for just tcl. We have to
7489# be careful that we don't match stuff like tclX by accident.
7490# the alternative search directory is involked by --with-tclinclude
7491#
7492
7493no_tcl=true
7494echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
ffc6a242 7495echo "configure:7496: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
7496# Check whether --with-tclinclude or --without-tclinclude was given.
7497if test "${with_tclinclude+set}" = set; then
7498 withval="$with_tclinclude"
7499 with_tclinclude=${withval}
7500fi
7501
7502if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7503 echo $ac_n "(cached) $ac_c" 1>&6
7504else
7505
7506# first check to see if --with-tclinclude was specified
7507if test x"${with_tclinclude}" != x ; then
7508 if test -f ${with_tclinclude}/tclInt.h ; then
7509 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7510 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7511 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7512 else
7513 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7514 fi
7515fi
7516
7517# next check if it came with Tcl configuration file
7518if test x"${ac_cv_c_tclconfig}" = x ; then
7519 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7520 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7521 fi
7522fi
7523
7524# next check in private source directory
7525#
7526# since ls returns lowest version numbers first, reverse its output
7527if test x"${ac_cv_c_tclh}" = x ; then
7528 for i in \
7529 ${srcdir}/../tcl \
7530 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7531 ${srcdir}/../../tcl \
7532 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7533 ${srcdir}/../../../tcl \
7534 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7535 if test -f $i/generic/tclInt.h ; then
7536 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7537 break
7538 fi
7539 done
7540fi
7541# finally check in a few common install locations
7542#
7543# since ls returns lowest version numbers first, reverse its output
7544if test x"${ac_cv_c_tclh}" = x ; then
7545 for i in \
7546 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7547 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7548 /usr/local/src/tcl \
7549 /usr/local/lib/tcl \
7550 ${prefix}/include ; do
7551 if test -f $i/generic/tclInt.h ; then
7552 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7553 break
7554 fi
7555 done
7556fi
7557# see if one is installed
7558if test x"${ac_cv_c_tclh}" = x ; then
7559 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7560echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
ffc6a242 7561echo "configure:7562: checking for tclInt.h" >&5
3fc11d3e
JM
7562if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7563 echo $ac_n "(cached) $ac_c" 1>&6
7564else
7565 cat > conftest.$ac_ext <<EOF
ffc6a242 7566#line 7567 "configure"
3fc11d3e
JM
7567#include "confdefs.h"
7568#include <tclInt.h>
7569EOF
7570ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 7571{ (eval echo configure:7572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7572ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7573if test -z "$ac_err"; then
7574 rm -rf conftest*
7575 eval "ac_cv_header_$ac_safe=yes"
7576else
7577 echo "$ac_err" >&5
7578 echo "configure: failed program was:" >&5
7579 cat conftest.$ac_ext >&5
7580 rm -rf conftest*
7581 eval "ac_cv_header_$ac_safe=no"
7582fi
7583rm -f conftest*
7584fi
7585if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7586 echo "$ac_t""yes" 1>&6
7587 ac_cv_c_tclh=installed
7588else
7589 echo "$ac_t""no" 1>&6
7590ac_cv_c_tclh=""
7591fi
7592
7593fi
7594
7595fi
7596
7597if test x"${ac_cv_c_tclh}" = x ; then
7598 TCLHDIR="# no Tcl private headers found"
7599 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7600fi
7601if test x"${ac_cv_c_tclh}" != x ; then
7602 no_tcl=""
7603 if test x"${ac_cv_c_tclh}" = x"installed" ; then
7604 echo "$ac_t""is installed" 1>&6
7605 TCLHDIR=""
7606 else
7607 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7608 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7609 TCLHDIR="-I${ac_cv_c_tclh}"
7610 fi
7611fi
7612
7613
7614
7615
7616#
7617# Ok, lets find the tk source trees so we can use the headers
7618# If the directory (presumably symlink) named "tk" exists, use that one
7619# in preference to any others. Same logic is used when choosing library
7620# and again with Tcl. The search order is the best place to look first, then in
7621# decreasing significance. The loop breaks if the trigger file is found.
7622# Note the gross little conversion here of srcdir by cd'ing to the found
7623# directory. This converts the path from a relative to an absolute, so
7624# recursive cache variables for the path will work right. We check all
7625# the possible paths in one loop rather than many seperate loops to speed
7626# things up.
7627# the alternative search directory is involked by --with-tkinclude
7628#
7629no_tk=true
7630echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
ffc6a242 7631echo "configure:7632: checking for Tk private headers" >&5
3fc11d3e
JM
7632# Check whether --with-tkinclude or --without-tkinclude was given.
7633if test "${with_tkinclude+set}" = set; then
7634 withval="$with_tkinclude"
7635 with_tkinclude=${withval}
7636fi
7637
7638if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7639 echo $ac_n "(cached) $ac_c" 1>&6
7640else
7641
7642# first check to see if --with-tkinclude was specified
7643if test x"${with_tkinclude}" != x ; then
7644 if test -f ${with_tkinclude}/tk.h ; then
7645 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7646 elif test -f ${with_tkinclude}/generic/tk.h ; then
7647 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7648 else
7649 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7650 fi
7651fi
7652
7653# next check if it came with Tk configuration file
7654if test x"${ac_cv_c_tkconfig}" = x ; then
7655 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7656 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7657 fi
7658fi
7659
7660# next check in private source directory
7661#
7662# since ls returns lowest version numbers first, reverse its output
7663if test x"${ac_cv_c_tkh}" = x ; then
7664 for i in \
7665 ${srcdir}/../tk \
7666 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7667 ${srcdir}/../../tk \
7668 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7669 ${srcdir}/../../../tk \
7670 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
7671 if test -f $i/generic/tk.h ; then
7672 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7673 break
7674 fi
7675 done
7676fi
7677# finally check in a few common install locations
7678#
7679# since ls returns lowest version numbers first, reverse its output
7680if test x"${ac_cv_c_tkh}" = x ; then
7681 for i in \
7682 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
7683 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
7684 /usr/local/src/tk \
7685 /usr/local/lib/tk \
7686 ${prefix}/include ; do
7687 if test -f $i/generic/tk.h ; then
7688 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7689 break
7690 fi
7691 done
7692fi
7693# see if one is installed
7694if test x"${ac_cv_c_tkh}" = x ; then
7695 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
7696echo $ac_n "checking for tk.h""... $ac_c" 1>&6
ffc6a242 7697echo "configure:7698: checking for tk.h" >&5
3fc11d3e
JM
7698if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7699 echo $ac_n "(cached) $ac_c" 1>&6
7700else
7701 cat > conftest.$ac_ext <<EOF
ffc6a242 7702#line 7703 "configure"
3fc11d3e
JM
7703#include "confdefs.h"
7704#include <tk.h>
7705EOF
7706ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 7707{ (eval echo configure:7708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7708ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7709if test -z "$ac_err"; then
7710 rm -rf conftest*
7711 eval "ac_cv_header_$ac_safe=yes"
7712else
7713 echo "$ac_err" >&5
7714 echo "configure: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7716 rm -rf conftest*
7717 eval "ac_cv_header_$ac_safe=no"
7718fi
7719rm -f conftest*
7720fi
7721if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7722 echo "$ac_t""yes" 1>&6
7723 ac_cv_c_tkh=installed
7724else
7725 echo "$ac_t""no" 1>&6
7726ac_cv_c_tkh=""
7727fi
7728
7729fi
7730
7731fi
7732
7733if test x"${ac_cv_c_tkh}" != x ; then
7734 no_tk=""
7735 if test x"${ac_cv_c_tkh}" = x"installed" ; then
7736 echo "$ac_t""is installed" 1>&6
7737 TKHDIR=""
7738 else
7739 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
7740 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
7741 TKHDIR="-I${ac_cv_c_tkh}"
7742 fi
7743else
7744 TKHDIR="# no Tk directory found"
7745 echo "configure: warning: Can't find Tk private headers" 1>&2
7746 no_tk=true
7747fi
7748
7749
7750
7751
7752echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
ffc6a242 7753echo "configure:7754: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7754if test x"${ac_cv_c_itclh}" = x ; then
7755 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
7756 if test -f $i/generic/itcl.h ; then
7757 ac_cv_c_itclh=`(cd $i/generic; pwd)`
7758 break
7759 fi
7760 done
7761fi
7762if test x"${ac_cv_c_itclh}" = x ; then
7763 ITCLHDIR="# no Itcl private headers found"
7764 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
7765fi
7766if test x"${ac_cv_c_itclh}" != x ; then
7767 ITCLHDIR="-I${ac_cv_c_itclh}"
7768fi
7769# should always be here
7770# ITCLLIB="../itcl/itcl/unix/libitcl.a"
7771
7772#AC_SUBST(ITCLLIB)
7773
7774
7775echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
ffc6a242 7776echo "configure:7777: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7777if test x"${ac_cv_c_itkh}" = x ; then
7778 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
7779 if test -f $i/generic/itk.h ; then
7780 ac_cv_c_itkh=`(cd $i/generic; pwd)`
7781 break
7782 fi
7783 done
7784fi
7785if test x"${ac_cv_c_itkh}" = x ; then
7786 ITKHDIR="# no Itk private headers found"
7787 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
7788fi
7789if test x"${ac_cv_c_itkh}" != x ; then
7790 ITKHDIR="-I${ac_cv_c_itkh}"
7791fi
7792# should always be here
7793# ITKLIB="../itcl/itk/unix/libitk.a"
7794
7795#AC_SUBST(ITKLIB)
7796
7797
7798echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
ffc6a242 7799echo "configure:7800: checking for Tix private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7800if test x"${ac_cv_c_tixh}" = x ; then
7801 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
7802 if test -f $i/generic/tix.h ; then
7803 ac_cv_c_tixh=`(cd $i/generic; pwd)`
7804 break
7805 fi
7806 done
7807fi
7808if test x"${ac_cv_c_tixh}" = x ; then
7809 TIXHDIR="# no Tix private headers found"
7810 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
7811fi
7812if test x"${ac_cv_c_tixh}" != x ; then
7813 TIXHDIR="-I${ac_cv_c_tixh}"
7814fi
7815
7816
7817
dd2504ab
JM
7818
7819 # now look for Tk library stuff
7820
7821 case "${host}" in
7822 *-*-cygwin*)
7823 tkdir=../tk/win/
7824 ;;
7825 *)
7826 tkdir=../tk/unix/
7827 ;;
7828 esac
7829
7830 TK_DEPS="${tkdir}${TK_LIB_FILE}"
7831
3fc11d3e
JM
7832 # now look for Itcl library stuff
7833
7834
7835#
7836# Ok, lets find the itcl configuration
7837# First, look for one uninstalled.
7838# the alternative search directory is invoked by --with-itclconfig
7839#
7840
7841if test x"${no_itcl}" = x ; then
7842 # we reset no_itcl in case something fails here
7843 no_itcl=true
7844 # Check whether --with-itclconfig or --without-itclconfig was given.
7845if test "${with_itclconfig+set}" = set; then
7846 withval="$with_itclconfig"
7847 with_itclconfig=${withval}
7848fi
7849
7850 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
ffc6a242 7851echo "configure:7852: checking for Itcl configuration" >&5
3fc11d3e
JM
7852 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
7853 echo $ac_n "(cached) $ac_c" 1>&6
7854else
7855
7856
7857 # First check to see if --with-itclconfig was specified.
7858 if test x"${with_itclconfig}" != x ; then
7859 if test -f "${with_itclconfig}/itclConfig.sh" ; then
7860 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
7861 else
7862 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
7863 fi
7864 fi
7865
7866 # then check for a private Itcl library
7867 if test x"${ac_cv_c_itclconfig}" = x ; then
7868 for i in \
7869 ../itcl/itcl \
7870 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
7871 ../../itcl \
7872 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
7873 ../../../itcl \
7874 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
7875 if test -f "$i/itclConfig.sh" ; then
7876 ac_cv_c_itclconfig=`(cd $i; pwd)`
7877 break
7878 fi
7879 done
7880 fi
7881 # check in a few common install locations
7882 if test x"${ac_cv_c_itclconfig}" = x ; then
7883 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7884 if test -f "$i/itclConfig.sh" ; then
7885 ac_cv_c_itclconfig=`(cd $i; pwd)`
7886 break
7887 fi
7888 done
7889 fi
7890 # check in a few other private locations
7891 if test x"${ac_cv_c_itclconfig}" = x ; then
7892 for i in \
7893 ${srcdir}/../itcl/itcl \
7894 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
7895 if test -f "$i/itclConfig.sh" ; then
7896 ac_cv_c_itclconfig=`(cd $i; pwd)`
7897 break
7898 fi
7899 done
7900 fi
7901
7902fi
7903
7904 if test x"${ac_cv_c_itclconfig}" = x ; then
7905 ITCLCONFIG="# no Itcl configs found"
7906 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
7907 else
7908 no_itcl=
7909 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
7910 echo "$ac_t""found $ITCLCONFIG" 1>&6
7911 fi
7912fi
7913
7914 if test -z "${no_itcl}"; then
7915
7916 if test -f "$ITCLCONFIG" ; then
7917 . $ITCLCONFIG
7918 fi
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
3fc11d3e
JM
7929
7930
7931 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 7932 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
7933 fi
7934
7935
7936 # now look for Itk library stuff
7937
7938#
7939# Ok, lets find the itk configuration
7940# First, look for one uninstalled.
7941# the alternative search directory is invoked by --with-itkconfig
7942#
7943
7944if test x"${no_itk}" = x ; then
7945 # we reset no_itk in case something fails here
7946 no_itk=true
7947 # Check whether --with-itkconfig or --without-itkconfig was given.
7948if test "${with_itkconfig+set}" = set; then
7949 withval="$with_itkconfig"
7950 with_itkconfig=${withval}
7951fi
7952
7953 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
ffc6a242 7954echo "configure:7955: checking for Itk configuration" >&5
3fc11d3e
JM
7955 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
7956 echo $ac_n "(cached) $ac_c" 1>&6
7957else
7958
7959
7960 # First check to see if --with-itkconfig was specified.
7961 if test x"${with_itkconfig}" != x ; then
7962 if test -f "${with_itkconfig}/itkConfig.sh" ; then
7963 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
7964 else
7965 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
7966 fi
7967 fi
7968
7969 # then check for a private Itk library
7970 if test x"${ac_cv_c_itkconfig}" = x ; then
7971 for i in \
7972 ../itcl/itk \
7973 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
7974 ../../itk \
7975 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
7976 ../../../itk \
7977 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
7978 if test -f "$i/itkConfig.sh" ; then
7979 ac_cv_c_itkconfig=`(cd $i; pwd)`
7980 break
7981 fi
7982 done
7983 fi
7984 # check in a few common install locations
7985 if test x"${ac_cv_c_itkconfig}" = x ; then
7986 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7987 if test -f "$i/itkConfig.sh" ; then
7988 ac_cv_c_itkconfig=`(cd $i; pwd)`
7989 break
7990 fi
7991 done
7992 fi
7993 # check in a few other private locations
7994 if test x"${ac_cv_c_itkconfig}" = x ; then
7995 for i in \
7996 ${srcdir}/../itcl/itk \
7997 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
7998 if test -f "$i/itkConfig.sh" ; then
7999 ac_cv_c_itkconfig=`(cd $i; pwd)`
8000 break
8001 fi
8002 done
8003 fi
8004
8005fi
8006
8007 if test x"${ac_cv_c_itkconfig}" = x ; then
8008 ITKCONFIG="# no Itk configs found"
8009 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
8010 else
8011 no_itk=
8012 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
8013 echo "$ac_t""found $ITKCONFIG" 1>&6
8014 fi
8015fi
8016
8017
8018 if test -z "${no_itcl}"; then
8019
8020 if test -f "$ITKCONFIG" ; then
8021 . $ITKCONFIG
8022 fi
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
3fc11d3e 8035 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 8036 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
8037 fi
8038
8039 # now look for Tix library stuff
8040
8041#
8042# Ok, lets find the tix configuration
8043# First, look for one uninstalled.
8044# the alternative search directory is invoked by --with-itkconfig
8045#
8046
8047if test x"${no_tix}" = x ; then
8048 # we reset no_tix in case something fails here
8049 no_tix=true
8050 # Check whether --with-tixconfig or --without-tixconfig was given.
8051if test "${with_tixconfig+set}" = set; then
8052 withval="$with_tixconfig"
8053 with_tixconfig=${withval}
8054fi
8055
8056 echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
ffc6a242 8057echo "configure:8058: checking for Tix configuration" >&5
3fc11d3e
JM
8058 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
8059 echo $ac_n "(cached) $ac_c" 1>&6
8060else
8061
8062
8063 # First check to see if --with-tixconfig was specified.
8064 if test x"${with_tixconfig}" != x ; then
8065 if test -f "${with_tixconfig}/tixConfig.sh" ; then
8066 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
8067 else
8068 { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
8069 fi
8070 fi
8071
8072 # then check for a private Tix library
8073 if test x"${ac_cv_c_tixconfig}" = x ; then
8074 for i in \
8075 ../tix \
8076 `ls -dr ../tix 2>/dev/null` \
8077 ../../tix \
8078 `ls -dr ../../tix 2>/dev/null` \
8079 ../../../tix \
8080 `ls -dr ../../../tix 2>/dev/null` ; do
8081 echo "**** Looking at $i - with ${configdir}"
8082 if test -f "$i/tixConfig.sh" ; then
8083 ac_cv_c_tixconfig=`(cd $i; pwd)`
8084 break
8085 fi
8086 done
8087 fi
8088 # check in a few common install locations
8089 if test x"${ac_cv_c_tixconfig}" = x ; then
8090 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8091 echo "**** Looking at $i"
8092 if test -f "$i/tixConfig.sh" ; then
8093 ac_cv_c_tixconfig=`(cd $i; pwd)`
8094 break
8095 fi
8096 done
8097 fi
8098 # check in a few other private locations
8099 echo "**** Other private locations"
8100 if test x"${ac_cv_c_tixconfig}" = x ; then
8101 for i in \
8102 ${srcdir}/../tix \
8103 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
8104 echo "**** Looking at $i - with ${configdir}"
8105 if test -f "$i/${configdir}/tixConfig.sh" ; then
8106 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
8107 break
8108 fi
8109 done
8110 fi
8111
8112fi
8113
8114 if test x"${ac_cv_c_tixconfig}" = x ; then
8115 TIXCONFIG="# no Tix configs found"
8116 echo "configure: warning: Can't find Tix configuration definitions" 1>&2
8117 else
8118 no_tix=
8119 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
8120 echo "$ac_t""found $TIXCONFIG" 1>&6
8121 fi
8122fi
8123
8124
8125 if test -z "${no_tix}"; then
8126
8127 if test -f "$TIXCONFIG" ; then
8128 . $TIXCONFIG
8129 fi
8130
8131
8132
8133
8134
8135
8136
8137
8138 TIXLIB="${TIX_BUILD_LIB_SPEC}"
8139 TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
8140 fi
8141
4226a5a5 8142 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
8143 # Tcl/Tk 8.1 require -fwritable strings. I don't
8144 # know whether 8.2 will or not, but I bet it will.
8145 # I don't have to worry about 7.x since we don't support it.
8146 GDBTK_CFLAGS=""
8147 if test "$GCC" = "yes"; then
8148 if test "$TCL_VERSION" != "8.0" ; then
8149 GDBTK_CFLAGS="-fwritable-strings"
8150 fi
8151 fi
8152
8153 # Include some libraries that Tcl and Tk want.
8154 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
8155 # Yes, the ordering seems wrong here. But it isn't.
8156 # TK_LIBS is the list of libraries that need to be linked
8157 # after Tcl/Tk. Note that this isn't put into LIBS. If it
8158 # were in LIBS then any link tests after this point would
8159 # try to include things like `$(LIBGUI)', which wouldn't work.
8160 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
8161
8162 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
8163 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
8164 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
8165 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 8166 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 8167 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
8168 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
8169 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
8170
8171 if test x$gdb_cv_os_cygwin = xyes; then
8172 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
8173 WIN32LDAPP="-Wl,--subsystem,console"
8174 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
8175 fi
8176 fi
8177 fi
ffc6a242
KS
8178
8179 SUBDIRS="${SUBDIRS} gdbtk"
8180 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
8181fi
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
dd2504ab
JM
8195
8196
d1c3b63a 8197
c906108c
SS
8198# If we find X, set shell vars x_includes and x_libraries to the
8199# paths, otherwise set no_x=yes.
8200# Uses ac_ vars as temps to allow command line to override cache and checks.
8201# --without-x overrides everything else, but does not touch the cache.
8202echo $ac_n "checking for X""... $ac_c" 1>&6
ffc6a242 8203echo "configure:8204: checking for X" >&5
c906108c
SS
8204
8205# Check whether --with-x or --without-x was given.
8206if test "${with_x+set}" = set; then
8207 withval="$with_x"
8208 :
8209fi
8210
8211# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8212if test "x$with_x" = xno; then
8213 # The user explicitly disabled X.
8214 have_x=disabled
8215else
8216 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8217 # Both variables are already set.
8218 have_x=yes
8219 else
8220if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8221 echo $ac_n "(cached) $ac_c" 1>&6
8222else
8223 # One or both of the vars are not set, and there is no cached value.
8224ac_x_includes=NO ac_x_libraries=NO
8225rm -fr conftestdir
8226if mkdir conftestdir; then
8227 cd conftestdir
8228 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8229 cat > Imakefile <<'EOF'
8230acfindx:
8231 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8232EOF
8233 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8234 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8235 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8236 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8237 for ac_extension in a so sl; do
8238 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8239 test -f $ac_im_libdir/libX11.$ac_extension; then
8240 ac_im_usrlibdir=$ac_im_libdir; break
8241 fi
8242 done
8243 # Screen out bogus values from the imake configuration. They are
8244 # bogus both because they are the default anyway, and because
8245 # using them would break gcc on systems where it needs fixed includes.
8246 case "$ac_im_incroot" in
8247 /usr/include) ;;
8248 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8249 esac
8250 case "$ac_im_usrlibdir" in
8251 /usr/lib | /lib) ;;
8252 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8253 esac
8254 fi
8255 cd ..
8256 rm -fr conftestdir
8257fi
8258
8259if test "$ac_x_includes" = NO; then
8260 # Guess where to find include files, by looking for this one X11 .h file.
8261 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8262
8263 # First, try using that file with no special directory specified.
8264cat > conftest.$ac_ext <<EOF
ffc6a242 8265#line 8266 "configure"
c906108c
SS
8266#include "confdefs.h"
8267#include <$x_direct_test_include>
8268EOF
8269ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ffc6a242 8270{ (eval echo configure:8271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
8271ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8272if test -z "$ac_err"; then
8273 rm -rf conftest*
8274 # We can compile using X headers with no special include directory.
8275ac_x_includes=
8276else
8277 echo "$ac_err" >&5
8278 echo "configure: failed program was:" >&5
8279 cat conftest.$ac_ext >&5
8280 rm -rf conftest*
8281 # Look for the header file in a standard set of common directories.
8282# Check X11 before X11Rn because it is often a symlink to the current release.
8283 for ac_dir in \
8284 /usr/X11/include \
8285 /usr/X11R6/include \
8286 /usr/X11R5/include \
8287 /usr/X11R4/include \
8288 \
8289 /usr/include/X11 \
8290 /usr/include/X11R6 \
8291 /usr/include/X11R5 \
8292 /usr/include/X11R4 \
8293 \
8294 /usr/local/X11/include \
8295 /usr/local/X11R6/include \
8296 /usr/local/X11R5/include \
8297 /usr/local/X11R4/include \
8298 \
8299 /usr/local/include/X11 \
8300 /usr/local/include/X11R6 \
8301 /usr/local/include/X11R5 \
8302 /usr/local/include/X11R4 \
8303 \
8304 /usr/X386/include \
8305 /usr/x386/include \
8306 /usr/XFree86/include/X11 \
8307 \
8308 /usr/include \
8309 /usr/local/include \
8310 /usr/unsupported/include \
8311 /usr/athena/include \
8312 /usr/local/x11r5/include \
8313 /usr/lpp/Xamples/include \
8314 \
8315 /usr/openwin/include \
8316 /usr/openwin/share/include \
8317 ; \
8318 do
8319 if test -r "$ac_dir/$x_direct_test_include"; then
8320 ac_x_includes=$ac_dir
8321 break
8322 fi
8323 done
8324fi
8325rm -f conftest*
8326fi # $ac_x_includes = NO
8327
8328if test "$ac_x_libraries" = NO; then
8329 # Check for the libraries.
8330
8331 test -z "$x_direct_test_library" && x_direct_test_library=Xt
8332 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8333
8334 # See if we find them without any special options.
8335 # Don't add to $LIBS permanently.
8336 ac_save_LIBS="$LIBS"
8337 LIBS="-l$x_direct_test_library $LIBS"
8338cat > conftest.$ac_ext <<EOF
ffc6a242 8339#line 8340 "configure"
c906108c
SS
8340#include "confdefs.h"
8341
8342int main() {
8343${x_direct_test_function}()
8344; return 0; }
8345EOF
ffc6a242 8346if { (eval echo configure:8347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8347 rm -rf conftest*
8348 LIBS="$ac_save_LIBS"
8349# We can link X programs with no special library path.
8350ac_x_libraries=
8351else
8352 echo "configure: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8354 rm -rf conftest*
8355 LIBS="$ac_save_LIBS"
8356# First see if replacing the include by lib works.
8357# Check X11 before X11Rn because it is often a symlink to the current release.
8358for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8359 /usr/X11/lib \
8360 /usr/X11R6/lib \
8361 /usr/X11R5/lib \
8362 /usr/X11R4/lib \
8363 \
8364 /usr/lib/X11 \
8365 /usr/lib/X11R6 \
8366 /usr/lib/X11R5 \
8367 /usr/lib/X11R4 \
8368 \
8369 /usr/local/X11/lib \
8370 /usr/local/X11R6/lib \
8371 /usr/local/X11R5/lib \
8372 /usr/local/X11R4/lib \
8373 \
8374 /usr/local/lib/X11 \
8375 /usr/local/lib/X11R6 \
8376 /usr/local/lib/X11R5 \
8377 /usr/local/lib/X11R4 \
8378 \
8379 /usr/X386/lib \
8380 /usr/x386/lib \
8381 /usr/XFree86/lib/X11 \
8382 \
8383 /usr/lib \
8384 /usr/local/lib \
8385 /usr/unsupported/lib \
8386 /usr/athena/lib \
8387 /usr/local/x11r5/lib \
8388 /usr/lpp/Xamples/lib \
8389 /lib/usr/lib/X11 \
8390 \
8391 /usr/openwin/lib \
8392 /usr/openwin/share/lib \
8393 ; \
8394do
8395 for ac_extension in a so sl; do
8396 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8397 ac_x_libraries=$ac_dir
8398 break 2
8399 fi
8400 done
8401done
8402fi
8403rm -f conftest*
8404fi # $ac_x_libraries = NO
8405
8406if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8407 # Didn't find X anywhere. Cache the known absence of X.
8408 ac_cv_have_x="have_x=no"
8409else
8410 # Record where we found X for the cache.
8411 ac_cv_have_x="have_x=yes \
8412 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8413fi
8414fi
8415 fi
8416 eval "$ac_cv_have_x"
8417fi # $with_x != no
8418
8419if test "$have_x" != yes; then
8420 echo "$ac_t""$have_x" 1>&6
8421 no_x=yes
8422else
8423 # If each of the values was on the command line, it overrides each guess.
8424 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8425 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8426 # Update the cache value to reflect the command line values.
8427 ac_cv_have_x="have_x=yes \
8428 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8429 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8430fi
8431
8432
7a292a7a
SS
8433
8434# Unlike the sim directory, whether a simulator is linked is controlled by
8435# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
8436# This code just checks for a few cases where we'd like to ignore those
8437# definitions, even when they're present in the '.mt' file. These cases
8438# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 8439# not part of the source tree.
7a292a7a
SS
8440#
8441# Check whether --enable-sim or --disable-sim was given.
8442if test "${enable_sim+set}" = set; then
8443 enableval="$enable_sim"
8444 echo "enable_sim = $enable_sim";
8445 echo "enableval = ${enableval}";
8446 case "${enableval}" in
8447 yes) ignore_sim=false ;;
8448 no) ignore_sim=true ;;
8449 *) ignore_sim=false ;;
8450 esac
8451else
8452 ignore_sim=false
8453fi
8454
8455
8456if test ! -d "${srcdir}/../sim"; then
8457 ignore_sim=true
8458fi
8459
8460if test "${ignore_sim}" = "true"; then
8461 IGNORE_SIM="SIM="
8462 IGNORE_SIM_OBS="SIM_OBS="
8463else
8464 IGNORE_SIM=""
8465 IGNORE_SIM_OBS=""
8466 cat >> confdefs.h <<\EOF
8467#define WITH_SIM 1
8468EOF
8469
8470fi
8471
8472
8473
c906108c
SS
8474
8475
8476
8477
8478
8479
dfcd3bfb 8480
e56ac5c3
AC
8481
8482
b3a90332
AC
8483
8484
b46cd165 8485
c906108c
SS
8486# Begin stuff to support --enable-shared
8487# Check whether --enable-shared or --disable-shared was given.
8488if test "${enable_shared+set}" = set; then
8489 enableval="$enable_shared"
8490 case "${enableval}" in
8491 yes) shared=true ;;
8492 no) shared=false ;;
8493 *) shared=true ;;
8494esac
8495fi
8496
8497HLDFLAGS=
8498HLDENV=
8499# If we have shared libraries, try to set rpath reasonably.
8500if test "${shared}" = "true"; then
8501 case "${host}" in
8502 *-*-hpux*)
8503 HLDFLAGS='-Wl,+s,+b,$(libdir)'
8504 ;;
8505 *-*-irix5* | *-*-irix6*)
8506 HLDFLAGS='-Wl,-rpath,$(libdir)'
8507 ;;
8508 *-*-linux*aout*)
8509 ;;
88987551 8510 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
8511 HLDFLAGS='-Wl,-rpath,$(libdir)'
8512 ;;
8513 *-*-solaris*)
8514 HLDFLAGS='-R $(libdir)'
8515 ;;
8516 *-*-sysv4*)
8517 HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
8518 ;;
8519 esac
8520fi
8521
8522# On SunOS, if the linker supports the -rpath option, use it to
8523# prevent ../bfd and ../opcodes from being included in the run time
8524# search path.
8525case "${host}" in
8526 *-*-sunos*)
8527 echo 'main () { }' > conftest.c
8528 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8529 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8530 :
8531 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8532 :
8533 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8534 :
8535 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8536 :
8537 elif test "${shared}" = "true"; then
8538 HLDFLAGS='-Wl,-rpath=$(libdir)'
8539 else
8540 HLDFLAGS='-Wl,-rpath='
8541 fi
8542 rm -f conftest.t conftest.c conftest
8543 ;;
8544esac
8545
8546
8547# End stuff to support --enable-shared
8548
8549# target_subdir is used by the testsuite to find the target libraries.
8550target_subdir=
8551if test "${host}" != "${target}"; then
8552 target_subdir="${target_alias}/"
8553fi
8554
8555
8556frags=
8557host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8558if test ! -f ${host_makefile_frag}; then
7fd60527
AC
8559 # When building a native debuger the .mh file containing things
8560 # like NATDEPFILES is needed. Cross debuggers don't need .mh
8561 # since it no longer contains anything useful.
8562 if test "${target}" = "${host}"; then
8563 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
8564 else
8565 host_makefile_frag=/dev/null
8566 fi
c906108c
SS
8567fi
8568frags="$frags $host_makefile_frag"
8569
8570target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8571if test ! -f ${target_makefile_frag}; then
8572{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8573fi
8574frags="$frags $target_makefile_frag"
8575
8576
8577
8578
8579
8580hostfile=`sed -n '
8581s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8582' ${host_makefile_frag}`
8583
8584targetfile=`sed -n '
8585s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8586' ${target_makefile_frag}`
8587
6166d547
AC
8588GDB_MULTI_ARCH=`sed -n '
8589s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
8590' ${target_makefile_frag}`
8591
c906108c 8592if test "${target}" = "${host}"; then
a85f51e7
DJ
8593# We pick this up from the host configuration file (.mh) because we
8594# do not have a native configuration Makefile fragment.
c906108c
SS
8595nativefile=`sed -n '
8596s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8597' ${host_makefile_frag}`
c906108c
SS
8598fi
8599
8600
6166d547
AC
8601# New targets should just set gdb_multi_arch=yes in configure.tgt.
8602# Old targets being converted can either do that or set GDB_MULTI_ARCH
8603# in the target specific makefile frag. Eventually gdb_multi_arch=yes
8604# will be the default.
8605if test x"${GDB_MULTI_ARCH}" = x ; then
8606 case "${gdb_multi_arch}" in
8607 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8608 no ) GDB_MULTI_ARCH=0 ;;
8609 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8610 esac
8611fi
8612if test x"${GDB_MULTI_ARCH}" != x ; then
8613 cat >> confdefs.h <<EOF
8614#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8615EOF
8616
8617fi
6c5cfe5b 8618# Warn the user when they use an old practice
6166d547
AC
8619case "${GDB_MULTI_ARCH}" in
8620 "" ) ;;
8621 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8622 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8623 GDB_MULTI_ARCH_PURE )
8624 if test x"${targetfile}" != x ; then
6c5cfe5b 8625 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 8626 targetfile=""
6166d547
AC
8627 fi ;;
8628 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8629esac
8630
96baa820
JM
8631if test "${enable_multi_ice}" = "yes"; then
8632 SUBDIRS="${SUBDIRS} multi-ice"
8633fi
8634
a85f51e7
DJ
8635# ``gdbserver'' can only be built in a native configuration.
8636if test x"${target}" = x"${host}"; then
8637 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
ffc6a242 8638echo "configure:8639: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
8639 if test x"${build_gdbserver}" = xyes ; then
8640 configdirs="${configdirs} gdbserver"
8641 SUBDIRS="${SUBDIRS} gdbserver"
8642 echo "$ac_t""yes" 1>&6
8643 else
8644 echo "$ac_t""no" 1>&6
8645 fi
8646fi
8647
96baa820
JM
8648
8649
c906108c 8650# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
8651# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8652# version.
c906108c
SS
8653
8654files=
8655links=
5a2402b8 8656
c906108c 8657rm -f xm.h
5a2402b8 8658xm_h=""
c906108c 8659if test "${hostfile}" != ""; then
5a2402b8
AC
8660 xm_h=xm.h
8661 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8662 files="${files} ${GDB_XM_FILE}"
8663 links="${links} xm.h"
8664 cat >> confdefs.h <<EOF
8665#define GDB_XM_FILE ${GDB_XM_FILE}
8666EOF
8667
c906108c 8668fi
5a2402b8
AC
8669
8670
c906108c 8671rm -f tm.h
5a2402b8 8672tm_h=""
c906108c 8673if test "${targetfile}" != ""; then
5a2402b8
AC
8674 tm_h=tm.h
8675 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8676 files="${files} ${GDB_TM_FILE}"
8677 links="${links} tm.h"
8678 cat >> confdefs.h <<EOF
8679#define GDB_TM_FILE ${GDB_TM_FILE}
8680EOF
8681
c906108c 8682fi
5a2402b8
AC
8683
8684
c906108c 8685rm -f nm.h
5a2402b8 8686nm_h=""
c906108c 8687if test "${nativefile}" != ""; then
5a2402b8
AC
8688 nm_h=nm.h
8689 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8690 files="${files} ${GDB_NM_FILE}"
8691 links="${links} nm.h"
8692 cat >> confdefs.h <<EOF
8693#define GDB_NM_FILE ${GDB_NM_FILE}
8694EOF
8695
c906108c 8696fi
5a2402b8
AC
8697
8698
3fc11d3e 8699echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
ffc6a242 8700echo "configure:8701: checking whether ln -s works" >&5
3fc11d3e
JM
8701if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
8702 echo $ac_n "(cached) $ac_c" 1>&6
8703else
8704 rm -f conftestdata
8705if ln -s X conftestdata 2>/dev/null
8706then
8707 rm -f conftestdata
8708 ac_cv_prog_LN_S="ln -s"
8709else
8710 ac_cv_prog_LN_S=ln
8711fi
8712fi
8713LN_S="$ac_cv_prog_LN_S"
8714if test "$ac_cv_prog_LN_S" = "ln -s"; then
8715 echo "$ac_t""yes" 1>&6
8716else
8717 echo "$ac_t""no" 1>&6
8718fi
8719
c906108c
SS
8720
8721
8722
8723echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
ffc6a242 8724echo "configure:8725: checking for Cygwin environment" >&5
c906108c
SS
8725if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8726 echo $ac_n "(cached) $ac_c" 1>&6
8727else
8728 cat > conftest.$ac_ext <<EOF
ffc6a242 8729#line 8730 "configure"
c906108c
SS
8730#include "confdefs.h"
8731
8732int main() {
8733
8734#ifndef __CYGWIN__
8735#define __CYGWIN__ __CYGWIN32__
8736#endif
8737return __CYGWIN__;
8738; return 0; }
8739EOF
ffc6a242 8740if { (eval echo configure:8741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8741 rm -rf conftest*
8742 ac_cv_cygwin=yes
8743else
8744 echo "configure: failed program was:" >&5
8745 cat conftest.$ac_ext >&5
8746 rm -rf conftest*
8747 ac_cv_cygwin=no
8748fi
8749rm -f conftest*
8750rm -f conftest*
8751fi
8752
8753echo "$ac_t""$ac_cv_cygwin" 1>&6
8754CYGWIN=
8755test "$ac_cv_cygwin" = yes && CYGWIN=yes
8756echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
ffc6a242 8757echo "configure:8758: checking for mingw32 environment" >&5
c906108c
SS
8758if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8759 echo $ac_n "(cached) $ac_c" 1>&6
8760else
8761 cat > conftest.$ac_ext <<EOF
ffc6a242 8762#line 8763 "configure"
c906108c
SS
8763#include "confdefs.h"
8764
8765int main() {
8766return __MINGW32__;
8767; return 0; }
8768EOF
ffc6a242 8769if { (eval echo configure:8770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8770 rm -rf conftest*
8771 ac_cv_mingw32=yes
8772else
8773 echo "configure: failed program was:" >&5
8774 cat conftest.$ac_ext >&5
8775 rm -rf conftest*
8776 ac_cv_mingw32=no
8777fi
8778rm -f conftest*
8779rm -f conftest*
8780fi
8781
8782echo "$ac_t""$ac_cv_mingw32" 1>&6
8783MINGW32=
8784test "$ac_cv_mingw32" = yes && MINGW32=yes
8785
8786
8787echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
ffc6a242 8788echo "configure:8789: checking for executable suffix" >&5
c906108c
SS
8789if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8790 echo $ac_n "(cached) $ac_c" 1>&6
8791else
8792 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8793 ac_cv_exeext=.exe
8794else
8795 rm -f conftest*
8796 echo 'int main () { return 0; }' > conftest.$ac_ext
8797 ac_cv_exeext=
ffc6a242 8798 if { (eval echo configure:8799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
8799 for file in conftest.*; do
8800 case $file in
a534e424 8801 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
8802 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8803 esac
8804 done
8805 else
8806 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8807 fi
8808 rm -f conftest*
8809 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8810fi
8811fi
8812
8813EXEEXT=""
8814test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8815echo "$ac_t""${ac_cv_exeext}" 1>&6
8816ac_exeext=$EXEEXT
8817
8818
8819subdirs="$configdirs"
8820
8821trap '' 1 2 15
8822cat > confcache <<\EOF
8823# This file is a shell script that caches the results of configure
8824# tests run on this system so they can be shared between configure
8825# scripts and configure runs. It is not useful on other systems.
8826# If it contains results you don't want to keep, you may remove or edit it.
8827#
8828# By default, configure uses ./config.cache as the cache file,
8829# creating it if it does not exist already. You can give configure
8830# the --cache-file=FILE option to use a different cache file; that is
8831# what configure does when it calls configure scripts in
8832# subdirectories, so they share the cache.
8833# Giving --cache-file=/dev/null disables caching, for debugging configure.
8834# config.status only pays attention to the cache file if you give it the
8835# --recheck option to rerun configure.
8836#
8837EOF
8838# The following way of writing the cache mishandles newlines in values,
8839# but we know of no workaround that is simple, portable, and efficient.
8840# So, don't put newlines in cache variables' values.
8841# Ultrix sh set writes to stderr and can't be redirected directly,
8842# and sets the high bit in the cache file unless we assign to the vars.
8843(set) 2>&1 |
8844 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8845 *ac_space=\ *)
8846 # `set' does not quote correctly, so add quotes (double-quote substitution
8847 # turns \\\\ into \\, and sed turns \\ into \).
8848 sed -n \
8849 -e "s/'/'\\\\''/g" \
8850 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8851 ;;
8852 *)
8853 # `set' quotes correctly as required by POSIX, so do not add quotes.
8854 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8855 ;;
8856 esac >> confcache
8857if cmp -s $cache_file confcache; then
8858 :
8859else
8860 if test -w $cache_file; then
8861 echo "updating cache $cache_file"
8862 cat confcache > $cache_file
8863 else
8864 echo "not updating unwritable cache $cache_file"
8865 fi
8866fi
8867rm -f confcache
8868
8869trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8870
8871test "x$prefix" = xNONE && prefix=$ac_default_prefix
8872# Let make expand exec_prefix.
8873test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8874
8875# Any assignment to VPATH causes Sun make to only execute
8876# the first set of double-colon rules, so remove it if not needed.
8877# If there is a colon in the path, we need to keep it.
8878if test "x$srcdir" = x.; then
8879 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8880fi
8881
8882trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8883
8884DEFS=-DHAVE_CONFIG_H
8885
8886# Without the "./", some shells look in PATH for config.status.
8887: ${CONFIG_STATUS=./config.status}
8888
8889echo creating $CONFIG_STATUS
8890rm -f $CONFIG_STATUS
8891cat > $CONFIG_STATUS <<EOF
8892#! /bin/sh
8893# Generated automatically by configure.
8894# Run this file to recreate the current configuration.
8895# This directory was configured as follows,
8896# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8897#
8898# $0 $ac_configure_args
8899#
8900# Compiler output produced by configure, useful for debugging
8901# configure, is in ./config.log if it exists.
8902
8903ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8904for ac_option
8905do
8906 case "\$ac_option" in
8907 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8908 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8909 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8910 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8911 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8912 exit 0 ;;
8913 -help | --help | --hel | --he | --h)
8914 echo "\$ac_cs_usage"; exit 0 ;;
8915 *) echo "\$ac_cs_usage"; exit 1 ;;
8916 esac
8917done
8918
8919ac_given_srcdir=$srcdir
8920ac_given_INSTALL="$INSTALL"
8921
ed952ac5 8922trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
8923EOF
8924cat >> $CONFIG_STATUS <<EOF
8925
8926# Protect against being on the right side of a sed subst in config.status.
8927sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8928 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8929$ac_vpsub
8930$extrasub
8931s%@SHELL@%$SHELL%g
8932s%@CFLAGS@%$CFLAGS%g
8933s%@CPPFLAGS@%$CPPFLAGS%g
8934s%@CXXFLAGS@%$CXXFLAGS%g
8935s%@FFLAGS@%$FFLAGS%g
8936s%@DEFS@%$DEFS%g
8937s%@LDFLAGS@%$LDFLAGS%g
8938s%@LIBS@%$LIBS%g
8939s%@exec_prefix@%$exec_prefix%g
8940s%@prefix@%$prefix%g
8941s%@program_transform_name@%$program_transform_name%g
8942s%@bindir@%$bindir%g
8943s%@sbindir@%$sbindir%g
8944s%@libexecdir@%$libexecdir%g
8945s%@datadir@%$datadir%g
8946s%@sysconfdir@%$sysconfdir%g
8947s%@sharedstatedir@%$sharedstatedir%g
8948s%@localstatedir@%$localstatedir%g
8949s%@libdir@%$libdir%g
8950s%@includedir@%$includedir%g
8951s%@oldincludedir@%$oldincludedir%g
8952s%@infodir@%$infodir%g
8953s%@mandir@%$mandir%g
413ccac7
AC
8954s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
8955s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
8956s%@MAINT@%$MAINT%g
c906108c
SS
8957s%@CC@%$CC%g
8958s%@CPP@%$CPP%g
8959s%@host@%$host%g
8960s%@host_alias@%$host_alias%g
8961s%@host_cpu@%$host_cpu%g
8962s%@host_vendor@%$host_vendor%g
8963s%@host_os@%$host_os%g
8964s%@target@%$target%g
8965s%@target_alias@%$target_alias%g
8966s%@target_cpu@%$target_cpu%g
8967s%@target_vendor@%$target_vendor%g
8968s%@target_os@%$target_os%g
8969s%@build@%$build%g
8970s%@build_alias@%$build_alias%g
8971s%@build_cpu@%$build_cpu%g
8972s%@build_vendor@%$build_vendor%g
8973s%@build_os@%$build_os%g
8974s%@SET_MAKE@%$SET_MAKE%g
8975s%@RANLIB@%$RANLIB%g
8976s%@ALLOCA@%$ALLOCA%g
8977s%@USE_NLS@%$USE_NLS%g
8978s%@MSGFMT@%$MSGFMT%g
8979s%@GMSGFMT@%$GMSGFMT%g
8980s%@XGETTEXT@%$XGETTEXT%g
8981s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8982s%@CATALOGS@%$CATALOGS%g
8983s%@CATOBJEXT@%$CATOBJEXT%g
8984s%@DATADIRNAME@%$DATADIRNAME%g
8985s%@GMOFILES@%$GMOFILES%g
8986s%@INSTOBJEXT@%$INSTOBJEXT%g
8987s%@INTLDEPS@%$INTLDEPS%g
8988s%@INTLLIBS@%$INTLLIBS%g
8989s%@INTLOBJS@%$INTLOBJS%g
8990s%@POFILES@%$POFILES%g
8991s%@POSUB@%$POSUB%g
8992s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8993s%@GT_NO@%$GT_NO%g
8994s%@GT_YES@%$GT_YES%g
8995s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8996s%@l@%$l%g
7a292a7a 8997s%@AWK@%$AWK%g
c906108c
SS
8998s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8999s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9000s%@INSTALL_DATA@%$INSTALL_DATA%g
9001s%@AR@%$AR%g
95ca63c4
CF
9002s%@DLLTOOL@%$DLLTOOL%g
9003s%@WINDRES@%$WINDRES%g
c906108c 9004s%@YACC@%$YACC%g
75c6e08a 9005s%@MIG@%$MIG%g
c906108c 9006s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
b4df4f68 9007s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
c906108c 9008s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 9009s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
9010s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
9011s%@MMALLOC@%$MMALLOC%g
88987551 9012s%@REGEX@%$REGEX%g
aff38e61 9013s%@SER_HARDWIRE@%$SER_HARDWIRE%g
c906108c 9014s%@TERM_LIB@%$TERM_LIB%g
cd0fc7c3 9015s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
9016s%@LIBGUI@%$LIBGUI%g
9017s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
9018s%@WIN32LDAPP@%$WIN32LDAPP%g
9019s%@TCL_VERSION@%$TCL_VERSION%g
9020s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
9021s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
9022s%@TCL_CC@%$TCL_CC%g
9023s%@TCL_DEFS@%$TCL_DEFS%g
9024s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
9025s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
9026s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
9027s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
9028s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
9029s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
9030s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
9031s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
9032s%@TCL_RANLIB@%$TCL_RANLIB%g
9033s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
9034s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
9035s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
9036s%@TK_VERSION@%$TK_VERSION%g
9037s%@TK_DEFS@%$TK_DEFS%g
9038s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
9039s%@TK_XINCLUDES@%$TK_XINCLUDES%g
9040s%@TK_XLIBSW@%$TK_XLIBSW%g
9041s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
9042s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
9043s%@TCLHDIR@%$TCLHDIR%g
9044s%@TKHDIR@%$TKHDIR%g
9045s%@ITCLHDIR@%$ITCLHDIR%g
9046s%@ITKHDIR@%$ITKHDIR%g
9047s%@TIXHDIR@%$TIXHDIR%g
9048s%@ITCL_VERSION@%$ITCL_VERSION%g
9049s%@ITCL_DEFS@%$ITCL_DEFS%g
9050s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
9051s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
9052s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
9053s%@ITK_VERSION@%$ITK_VERSION%g
9054s%@ITK_DEFS@%$ITK_DEFS%g
9055s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
9056s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
9057s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
9058s%@TIX_VERSION@%$TIX_VERSION%g
9059s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
7a292a7a
SS
9060s%@X_CFLAGS@%$X_CFLAGS%g
9061s%@X_LDFLAGS@%$X_LDFLAGS%g
9062s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
9063s%@TCL_DEPS@%$TCL_DEPS%g
9064s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
9065s%@ITCLLIB@%$ITCLLIB%g
9066s%@ITCL_DEPS@%$ITCL_DEPS%g
9067s%@ITKLIB@%$ITKLIB%g
9068s%@ITK_DEPS@%$ITK_DEPS%g
9069s%@TIXLIB@%$TIXLIB%g
9070s%@TIX_DEPS@%$TIX_DEPS%g
9071s%@GDBTKLIBS@%$GDBTKLIBS%g
9072s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 9073s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
9074s%@IGNORE_SIM@%$IGNORE_SIM%g
9075s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
9076s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
9077s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 9078s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
9079s%@CONFIG_DEPS@%$CONFIG_DEPS%g
9080s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 9081s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
9082s%@CONFIG_ALL@%$CONFIG_ALL%g
9083s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
9084s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
9085s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
9086s%@HLDFLAGS@%$HLDFLAGS%g
9087s%@HLDENV@%$HLDENV%g
9088s%@target_subdir@%$target_subdir%g
9089/@host_makefile_frag@/r $host_makefile_frag
9090s%@host_makefile_frag@%%g
9091/@target_makefile_frag@/r $target_makefile_frag
9092s%@target_makefile_frag@%%g
9093s%@frags@%$frags%g
96baa820 9094s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
9095s%@xm_h@%$xm_h%g
9096s%@tm_h@%$tm_h%g
9097s%@nm_h@%$nm_h%g
7a292a7a 9098s%@LN_S@%$LN_S%g
c906108c
SS
9099s%@EXEEXT@%$EXEEXT%g
9100s%@subdirs@%$subdirs%g
9101
9102CEOF
9103EOF
9104
9105cat >> $CONFIG_STATUS <<\EOF
9106
9107# Split the substitutions into bite-sized pieces for seds with
9108# small command number limits, like on Digital OSF/1 and HP-UX.
ffc6a242 9109ac_max_sed_cmds=60 # Maximum number of lines to put in a sed script.
c906108c
SS
9110ac_file=1 # Number of current file.
9111ac_beg=1 # First line for current file.
9112ac_end=$ac_max_sed_cmds # Line after last line for current file.
9113ac_more_lines=:
9114ac_sed_cmds=""
9115while $ac_more_lines; do
9116 if test $ac_beg -gt 1; then
9117 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9118 else
9119 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9120 fi
9121 if test ! -s conftest.s$ac_file; then
9122 ac_more_lines=false
9123 rm -f conftest.s$ac_file
9124 else
9125 if test -z "$ac_sed_cmds"; then
9126 ac_sed_cmds="sed -f conftest.s$ac_file"
9127 else
9128 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9129 fi
9130 ac_file=`expr $ac_file + 1`
9131 ac_beg=$ac_end
9132 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9133 fi
9134done
9135if test -z "$ac_sed_cmds"; then
9136 ac_sed_cmds=cat
9137fi
9138EOF
9139
9140cat >> $CONFIG_STATUS <<EOF
9141
ed952ac5 9142CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
9143EOF
9144cat >> $CONFIG_STATUS <<\EOF
9145for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9146 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9147 case "$ac_file" in
9148 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9149 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9150 *) ac_file_in="${ac_file}.in" ;;
9151 esac
9152
9153 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9154
9155 # Remove last slash and all that follows it. Not all systems have dirname.
9156 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9157 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9158 # The file is in a subdirectory.
9159 test ! -d "$ac_dir" && mkdir "$ac_dir"
9160 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9161 # A "../" for each directory in $ac_dir_suffix.
9162 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9163 else
9164 ac_dir_suffix= ac_dots=
9165 fi
9166
9167 case "$ac_given_srcdir" in
9168 .) srcdir=.
9169 if test -z "$ac_dots"; then top_srcdir=.
9170 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9171 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9172 *) # Relative path.
9173 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9174 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9175 esac
9176
9177 case "$ac_given_INSTALL" in
9178 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9179 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9180 esac
9181
9182 echo creating "$ac_file"
9183 rm -f "$ac_file"
9184 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9185 case "$ac_file" in
9186 *Makefile*) ac_comsub="1i\\
9187# $configure_input" ;;
9188 *) ac_comsub= ;;
9189 esac
9190
9191 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9192 sed -e "$ac_comsub
9193s%@configure_input@%$configure_input%g
9194s%@srcdir@%$srcdir%g
9195s%@top_srcdir@%$top_srcdir%g
9196s%@INSTALL@%$INSTALL%g
9197" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9198fi; done
9199rm -f conftest.s*
9200
9201# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9202# NAME is the cpp macro being defined and VALUE is the value it is being given.
9203#
9204# ac_d sets the value in "#define NAME VALUE" lines.
9205ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9206ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9207ac_dC='\3'
9208ac_dD='%g'
9209# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9210ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9211ac_uB='\([ ]\)%\1#\2define\3'
9212ac_uC=' '
9213ac_uD='\4%g'
9214# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9215ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9216ac_eB='$%\1#\2define\3'
9217ac_eC=' '
9218ac_eD='%g'
9219
9220if test "${CONFIG_HEADERS+set}" != set; then
9221EOF
9222cat >> $CONFIG_STATUS <<EOF
9223 CONFIG_HEADERS="config.h:config.in"
9224EOF
9225cat >> $CONFIG_STATUS <<\EOF
9226fi
9227for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9228 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9229 case "$ac_file" in
9230 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9231 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9232 *) ac_file_in="${ac_file}.in" ;;
9233 esac
9234
9235 echo creating $ac_file
9236
9237 rm -f conftest.frag conftest.in conftest.out
9238 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9239 cat $ac_file_inputs > conftest.in
9240
9241EOF
9242
9243# Transform confdefs.h into a sed script conftest.vals that substitutes
9244# the proper values into config.h.in to produce config.h. And first:
9245# Protect against being on the right side of a sed subst in config.status.
9246# Protect against being in an unquoted here document in config.status.
9247rm -f conftest.vals
9248cat > conftest.hdr <<\EOF
9249s/[\\&%]/\\&/g
9250s%[\\$`]%\\&%g
9251s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9252s%ac_d%ac_u%gp
9253s%ac_u%ac_e%gp
9254EOF
9255sed -n -f conftest.hdr confdefs.h > conftest.vals
9256rm -f conftest.hdr
9257
9258# This sed command replaces #undef with comments. This is necessary, for
9259# example, in the case of _POSIX_SOURCE, which is predefined and required
9260# on some systems where configure will not decide to define it.
9261cat >> conftest.vals <<\EOF
9262s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9263EOF
9264
9265# Break up conftest.vals because some shells have a limit on
9266# the size of here documents, and old seds have small limits too.
9267
9268rm -f conftest.tail
9269while :
9270do
9271 ac_lines=`grep -c . conftest.vals`
9272 # grep -c gives empty output for an empty file on some AIX systems.
9273 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9274 # Write a limited-size here document to conftest.frag.
9275 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9276 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9277 echo 'CEOF
9278 sed -f conftest.frag conftest.in > conftest.out
9279 rm -f conftest.in
9280 mv conftest.out conftest.in
9281' >> $CONFIG_STATUS
9282 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9283 rm -f conftest.vals
9284 mv conftest.tail conftest.vals
9285done
9286rm -f conftest.vals
9287
9288cat >> $CONFIG_STATUS <<\EOF
9289 rm -f conftest.frag conftest.h
9290 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9291 cat conftest.in >> conftest.h
9292 rm -f conftest.in
9293 if cmp -s $ac_file conftest.h 2>/dev/null; then
9294 echo "$ac_file is unchanged"
9295 rm -f conftest.h
9296 else
9297 # Remove last slash and all that follows it. Not all systems have dirname.
9298 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9299 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9300 # The file is in a subdirectory.
9301 test ! -d "$ac_dir" && mkdir "$ac_dir"
9302 fi
9303 rm -f $ac_file
9304 mv conftest.h $ac_file
9305 fi
9306fi; done
9307
9308EOF
9309
9310cat >> $CONFIG_STATUS <<EOF
9311ac_sources="$files"
9312ac_dests="$links"
9313EOF
9314
9315cat >> $CONFIG_STATUS <<\EOF
9316srcdir=$ac_given_srcdir
9317while test -n "$ac_sources"; do
9318 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9319 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9320
9321 echo "linking $srcdir/$ac_source to $ac_dest"
9322
9323 if test ! -r $srcdir/$ac_source; then
9324 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9325 fi
9326 rm -f $ac_dest
9327
9328 # Make relative symlinks.
9329 # Remove last slash and all that follows it. Not all systems have dirname.
9330 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9331 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9332 # The dest file is in a subdirectory.
9333 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9334 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9335 # A "../" for each directory in $ac_dest_dir_suffix.
9336 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9337 else
9338 ac_dest_dir_suffix= ac_dots=
9339 fi
9340
9341 case "$srcdir" in
9342 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9343 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9344 esac
9345
9346 # Make a symlink if possible; otherwise try a hard link.
9347 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9348 ln $srcdir/$ac_source $ac_dest; then :
9349 else
9350 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9351 fi
9352done
9353EOF
9354cat >> $CONFIG_STATUS <<EOF
9355
9356gdb_host_cpu=$gdb_host_cpu
9357gdb_target_cpu=$gdb_target_cpu
9358nativefile=$nativefile
9359
9360EOF
9361cat >> $CONFIG_STATUS <<\EOF
9362
9363if test "${nativefile}" = ""; then
c4620205 9364 < Makefile \
e27da16d
JT
9365 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
9366 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
9367 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
9368 > Makefile.tem
c906108c
SS
9369mv -f Makefile.tem Makefile
9370fi
9371
9372sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
9373/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
9374/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9375mv -f Makefile.tmp Makefile
9376
2acceee2 9377
c906108c
SS
9378case x$CONFIG_HEADERS in
9379xconfig.h:config.in)
9380echo > stamp-h ;;
9381esac
9382
9383exit 0
9384EOF
9385chmod +x $CONFIG_STATUS
9386rm -fr confdefs* $ac_clean_files
9387test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9388
9389if test "$no_recursion" != yes; then
9390
9391 # Remove --cache-file and --srcdir arguments so they do not pile up.
9392 ac_sub_configure_args=
9393 ac_prev=
9394 for ac_arg in $ac_configure_args; do
9395 if test -n "$ac_prev"; then
9396 ac_prev=
9397 continue
9398 fi
9399 case "$ac_arg" in
9400 -cache-file | --cache-file | --cache-fil | --cache-fi \
9401 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9402 ac_prev=cache_file ;;
9403 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9404 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9405 ;;
9406 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9407 ac_prev=srcdir ;;
9408 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9409 ;;
9410 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9411 esac
9412 done
9413
9414 for ac_config_dir in $configdirs; do
9415
9416 # Do not complain, so a configure script can configure whichever
9417 # parts of a large source tree are present.
9418 if test ! -d $srcdir/$ac_config_dir; then
9419 continue
9420 fi
9421
9422 echo configuring in $ac_config_dir
9423
9424 case "$srcdir" in
9425 .) ;;
9426 *)
9427 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9428 else
9429 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9430 fi
9431 ;;
9432 esac
9433
9434 ac_popdir=`pwd`
9435 cd $ac_config_dir
9436
9437 # A "../" for each directory in /$ac_config_dir.
9438 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9439
9440 case "$srcdir" in
9441 .) # No --srcdir option. We are building in place.
9442 ac_sub_srcdir=$srcdir ;;
9443 /*) # Absolute path.
9444 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9445 *) # Relative path.
9446 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9447 esac
9448
9449 # Check for guested configure; otherwise get Cygnus style configure.
9450 if test -f $ac_sub_srcdir/configure; then
9451 ac_sub_configure=$ac_sub_srcdir/configure
9452 elif test -f $ac_sub_srcdir/configure.in; then
9453 ac_sub_configure=$ac_configure
9454 else
9455 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9456 ac_sub_configure=
9457 fi
9458
9459 # The recursion is here.
9460 if test -n "$ac_sub_configure"; then
9461
9462 # Make the cache file name correct relative to the subdirectory.
9463 case "$cache_file" in
9464 /*) ac_sub_cache_file=$cache_file ;;
9465 *) # Relative path.
9466 ac_sub_cache_file="$ac_dots$cache_file" ;;
9467 esac
9468 case "$ac_given_INSTALL" in
9469 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9470 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9471 esac
9472
9473 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9474 # The eval makes quoting arguments work.
9475 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9476 then :
9477 else
9478 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9479 fi
9480 fi
9481
9482 cd $ac_popdir
9483 done
9484fi
9485
9486
9487exit 0
This page took 0.814594 seconds and 4 git commands to generate.