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