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