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