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