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