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