daily update
[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
3234echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
c41b7eb1 3235echo "configure:3236: checking return type of signal handlers" >&5
c906108c
SS
3236if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3237 echo $ac_n "(cached) $ac_c" 1>&6
3238else
3239 cat > conftest.$ac_ext <<EOF
c41b7eb1 3240#line 3241 "configure"
c906108c
SS
3241#include "confdefs.h"
3242#include <sys/types.h>
3243#include <signal.h>
3244#ifdef signal
3245#undef signal
3246#endif
3247#ifdef __cplusplus
3248extern "C" void (*signal (int, void (*)(int)))(int);
3249#else
3250void (*signal ()) ();
3251#endif
3252
3253int main() {
3254int i;
3255; return 0; }
3256EOF
c41b7eb1 3257if { (eval echo configure:3258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3258 rm -rf conftest*
3259 ac_cv_type_signal=void
3260else
3261 echo "configure: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 rm -rf conftest*
3264 ac_cv_type_signal=int
3265fi
3266rm -f conftest*
3267fi
3268
3269echo "$ac_t""$ac_cv_type_signal" 1>&6
3270cat >> confdefs.h <<EOF
3271#define RETSIGTYPE $ac_cv_type_signal
3272EOF
3273
3274
3275
9608ab8b
MK
3276ac_header_dirent=no
3277for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3278do
3279ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3280echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3281echo "configure:3282: checking for $ac_hdr that defines DIR" >&5
3282if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284else
3285 cat > conftest.$ac_ext <<EOF
3286#line 3287 "configure"
3287#include "confdefs.h"
3288#include <sys/types.h>
3289#include <$ac_hdr>
3290int main() {
3291DIR *dirp = 0;
3292; return 0; }
3293EOF
3294if { (eval echo configure:3295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3295 rm -rf conftest*
3296 eval "ac_cv_header_dirent_$ac_safe=yes"
3297else
3298 echo "configure: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 rm -rf conftest*
3301 eval "ac_cv_header_dirent_$ac_safe=no"
3302fi
3303rm -f conftest*
3304fi
3305if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3306 echo "$ac_t""yes" 1>&6
3307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3308 cat >> confdefs.h <<EOF
3309#define $ac_tr_hdr 1
3310EOF
3311 ac_header_dirent=$ac_hdr; break
3312else
3313 echo "$ac_t""no" 1>&6
3314fi
3315done
3316# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3317if test $ac_header_dirent = dirent.h; then
3318echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3319echo "configure:3320: checking for opendir in -ldir" >&5
3320ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3321if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3322 echo $ac_n "(cached) $ac_c" 1>&6
3323else
3324 ac_save_LIBS="$LIBS"
3325LIBS="-ldir $LIBS"
3326cat > conftest.$ac_ext <<EOF
3327#line 3328 "configure"
3328#include "confdefs.h"
3329/* Override any gcc2 internal prototype to avoid an error. */
3330/* We use char because int might match the return type of a gcc2
3331 builtin and then its argument prototype would still apply. */
3332char opendir();
3333
3334int main() {
3335opendir()
3336; return 0; }
3337EOF
3338if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3339 rm -rf conftest*
3340 eval "ac_cv_lib_$ac_lib_var=yes"
3341else
3342 echo "configure: failed program was:" >&5
3343 cat conftest.$ac_ext >&5
3344 rm -rf conftest*
3345 eval "ac_cv_lib_$ac_lib_var=no"
3346fi
3347rm -f conftest*
3348LIBS="$ac_save_LIBS"
3349
3350fi
3351if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3352 echo "$ac_t""yes" 1>&6
3353 LIBS="$LIBS -ldir"
3354else
3355 echo "$ac_t""no" 1>&6
3356fi
3357
3358else
3359echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3360echo "configure:3361: checking for opendir in -lx" >&5
3361ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3362if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3363 echo $ac_n "(cached) $ac_c" 1>&6
3364else
3365 ac_save_LIBS="$LIBS"
3366LIBS="-lx $LIBS"
3367cat > conftest.$ac_ext <<EOF
3368#line 3369 "configure"
3369#include "confdefs.h"
3370/* Override any gcc2 internal prototype to avoid an error. */
3371/* We use char because int might match the return type of a gcc2
3372 builtin and then its argument prototype would still apply. */
3373char opendir();
3374
3375int main() {
3376opendir()
3377; return 0; }
3378EOF
3379if { (eval echo configure:3380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3380 rm -rf conftest*
3381 eval "ac_cv_lib_$ac_lib_var=yes"
3382else
3383 echo "configure: failed program was:" >&5
3384 cat conftest.$ac_ext >&5
3385 rm -rf conftest*
3386 eval "ac_cv_lib_$ac_lib_var=no"
3387fi
3388rm -f conftest*
3389LIBS="$ac_save_LIBS"
3390
3391fi
3392if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3393 echo "$ac_t""yes" 1>&6
3394 LIBS="$LIBS -lx"
3395else
3396 echo "$ac_t""no" 1>&6
3397fi
3398
3399fi
3400
c906108c 3401echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9608ab8b 3402echo "configure:3403: checking for ANSI C header files" >&5
c906108c
SS
3403if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
3406 cat > conftest.$ac_ext <<EOF
9608ab8b 3407#line 3408 "configure"
c906108c
SS
3408#include "confdefs.h"
3409#include <stdlib.h>
3410#include <stdarg.h>
3411#include <string.h>
3412#include <float.h>
3413EOF
3414ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 3415{ (eval echo configure:3416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3416ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3417if test -z "$ac_err"; then
3418 rm -rf conftest*
3419 ac_cv_header_stdc=yes
3420else
3421 echo "$ac_err" >&5
3422 echo "configure: failed program was:" >&5
3423 cat conftest.$ac_ext >&5
3424 rm -rf conftest*
3425 ac_cv_header_stdc=no
3426fi
3427rm -f conftest*
3428
3429if test $ac_cv_header_stdc = yes; then
3430 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3431cat > conftest.$ac_ext <<EOF
9608ab8b 3432#line 3433 "configure"
c906108c
SS
3433#include "confdefs.h"
3434#include <string.h>
3435EOF
3436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3437 egrep "memchr" >/dev/null 2>&1; then
3438 :
3439else
3440 rm -rf conftest*
3441 ac_cv_header_stdc=no
3442fi
3443rm -f conftest*
3444
3445fi
3446
3447if test $ac_cv_header_stdc = yes; then
3448 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3449cat > conftest.$ac_ext <<EOF
9608ab8b 3450#line 3451 "configure"
c906108c
SS
3451#include "confdefs.h"
3452#include <stdlib.h>
3453EOF
3454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3455 egrep "free" >/dev/null 2>&1; then
3456 :
3457else
3458 rm -rf conftest*
3459 ac_cv_header_stdc=no
3460fi
3461rm -f conftest*
3462
3463fi
3464
3465if test $ac_cv_header_stdc = yes; then
3466 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3467if test "$cross_compiling" = yes; then
3468 :
3469else
3470 cat > conftest.$ac_ext <<EOF
9608ab8b 3471#line 3472 "configure"
c906108c
SS
3472#include "confdefs.h"
3473#include <ctype.h>
3474#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3475#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3476#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3477int main () { int i; for (i = 0; i < 256; i++)
3478if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3479exit (0); }
3480
3481EOF
9608ab8b 3482if { (eval echo configure:3483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
3483then
3484 :
3485else
3486 echo "configure: failed program was:" >&5
3487 cat conftest.$ac_ext >&5
3488 rm -fr conftest*
3489 ac_cv_header_stdc=no
3490fi
3491rm -fr conftest*
3492fi
3493
3494fi
3495fi
3496
3497echo "$ac_t""$ac_cv_header_stdc" 1>&6
3498if test $ac_cv_header_stdc = yes; then
3499 cat >> confdefs.h <<\EOF
3500#define STDC_HEADERS 1
3501EOF
3502
3503fi
3504
3505
6abadcf8 3506
3e0bf9f1 3507case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
6abadcf8
ND
3508 cat >> confdefs.h <<\EOF
3509#define _MSE_INT_H 1
3510EOF
3511
3512esac; esac
3513
9299404e 3514for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
c906108c 3515 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
f15f768e 3516 string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
c906108c 3517 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
104c1213 3518 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
596c9d4b 3519 time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
9608ab8b 3520 sys/filio.h \
409a3f64
AC
3521 curses.h ncurses.h \
3522 poll.h sys/poll.h
c906108c
SS
3523do
3524ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3525echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9608ab8b 3526echo "configure:3527: checking for $ac_hdr" >&5
c906108c
SS
3527if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3528 echo $ac_n "(cached) $ac_c" 1>&6
3529else
3530 cat > conftest.$ac_ext <<EOF
9608ab8b 3531#line 3532 "configure"
c906108c
SS
3532#include "confdefs.h"
3533#include <$ac_hdr>
3534EOF
3535ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 3536{ (eval echo configure:3537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
3537ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3538if test -z "$ac_err"; then
3539 rm -rf conftest*
3540 eval "ac_cv_header_$ac_safe=yes"
3541else
3542 echo "$ac_err" >&5
3543 echo "configure: failed program was:" >&5
3544 cat conftest.$ac_ext >&5
3545 rm -rf conftest*
3546 eval "ac_cv_header_$ac_safe=no"
3547fi
3548rm -f conftest*
3549fi
3550if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3551 echo "$ac_t""yes" 1>&6
3552 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3553 cat >> confdefs.h <<EOF
3554#define $ac_tr_hdr 1
3555EOF
3556
3557else
3558 echo "$ac_t""no" 1>&6
3559fi
3560done
3561
3562echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
9608ab8b 3563echo "configure:3564: checking whether stat file-mode macros are broken" >&5
c906108c
SS
3564if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3565 echo $ac_n "(cached) $ac_c" 1>&6
3566else
3567 cat > conftest.$ac_ext <<EOF
9608ab8b 3568#line 3569 "configure"
c906108c
SS
3569#include "confdefs.h"
3570#include <sys/types.h>
3571#include <sys/stat.h>
3572
3573#if defined(S_ISBLK) && defined(S_IFDIR)
3574# if S_ISBLK (S_IFDIR)
3575You lose.
3576# endif
3577#endif
3578
3579#if defined(S_ISBLK) && defined(S_IFCHR)
3580# if S_ISBLK (S_IFCHR)
3581You lose.
3582# endif
3583#endif
3584
3585#if defined(S_ISLNK) && defined(S_IFREG)
3586# if S_ISLNK (S_IFREG)
3587You lose.
3588# endif
3589#endif
3590
3591#if defined(S_ISSOCK) && defined(S_IFREG)
3592# if S_ISSOCK (S_IFREG)
3593You lose.
3594# endif
3595#endif
3596
3597EOF
3598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3599 egrep "You lose" >/dev/null 2>&1; then
3600 rm -rf conftest*
3601 ac_cv_header_stat_broken=yes
3602else
3603 rm -rf conftest*
3604 ac_cv_header_stat_broken=no
3605fi
3606rm -f conftest*
3607
3608fi
3609
3610echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3611if test $ac_cv_header_stat_broken = yes; then
3612 cat >> confdefs.h <<\EOF
3613#define STAT_MACROS_BROKEN 1
3614EOF
3615
3616fi
3617
3618
3619echo $ac_n "checking for working const""... $ac_c" 1>&6
9608ab8b 3620echo "configure:3621: checking for working const" >&5
c906108c
SS
3621if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3622 echo $ac_n "(cached) $ac_c" 1>&6
3623else
3624 cat > conftest.$ac_ext <<EOF
9608ab8b 3625#line 3626 "configure"
c906108c
SS
3626#include "confdefs.h"
3627
3628int main() {
3629
3630/* Ultrix mips cc rejects this. */
3631typedef int charset[2]; const charset x;
3632/* SunOS 4.1.1 cc rejects this. */
3633char const *const *ccp;
3634char **p;
3635/* NEC SVR4.0.2 mips cc rejects this. */
3636struct point {int x, y;};
3637static struct point const zero = {0,0};
3638/* AIX XL C 1.02.0.0 rejects this.
3639 It does not let you subtract one const X* pointer from another in an arm
3640 of an if-expression whose if-part is not a constant expression */
3641const char *g = "string";
3642ccp = &g + (g ? g-g : 0);
3643/* HPUX 7.0 cc rejects these. */
3644++ccp;
3645p = (char**) ccp;
3646ccp = (char const *const *) p;
3647{ /* SCO 3.2v4 cc rejects this. */
3648 char *t;
3649 char const *s = 0 ? (char *) 0 : (char const *) 0;
3650
3651 *t++ = 0;
3652}
3653{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3654 int x[] = {25, 17};
3655 const int *foo = &x[0];
3656 ++foo;
3657}
3658{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3659 typedef const int *iptr;
3660 iptr p = 0;
3661 ++p;
3662}
3663{ /* AIX XL C 1.02.0.0 rejects this saying
3664 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3665 struct s { int j; const int *ap[3]; };
3666 struct s *b; b->j = 5;
3667}
3668{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3669 const int foo = 10;
3670}
3671
3672; return 0; }
3673EOF
9608ab8b 3674if { (eval echo configure:3675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
3675 rm -rf conftest*
3676 ac_cv_c_const=yes
3677else
3678 echo "configure: failed program was:" >&5
3679 cat conftest.$ac_ext >&5
3680 rm -rf conftest*
3681 ac_cv_c_const=no
3682fi
3683rm -f conftest*
3684fi
3685
3686echo "$ac_t""$ac_cv_c_const" 1>&6
3687if test $ac_cv_c_const = no; then
3688 cat >> confdefs.h <<\EOF
3689#define const
3690EOF
3691
3692fi
3693
bce58c09 3694echo $ac_n "checking for inline""... $ac_c" 1>&6
9608ab8b 3695echo "configure:3696: checking for inline" >&5
bce58c09
JB
3696if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3697 echo $ac_n "(cached) $ac_c" 1>&6
3698else
3699 ac_cv_c_inline=no
3700for ac_kw in inline __inline__ __inline; do
3701 cat > conftest.$ac_ext <<EOF
9608ab8b 3702#line 3703 "configure"
bce58c09
JB
3703#include "confdefs.h"
3704
3705int main() {
3706} $ac_kw foo() {
3707; return 0; }
3708EOF
9608ab8b 3709if { (eval echo configure:3710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
bce58c09
JB
3710 rm -rf conftest*
3711 ac_cv_c_inline=$ac_kw; break
3712else
3713 echo "configure: failed program was:" >&5
3714 cat conftest.$ac_ext >&5
3715fi
3716rm -f conftest*
3717done
3718
3719fi
3720
3721echo "$ac_t""$ac_cv_c_inline" 1>&6
3722case "$ac_cv_c_inline" in
3723 inline | yes) ;;
3724 no) cat >> confdefs.h <<\EOF
3725#define inline
3726EOF
3727 ;;
3728 *) cat >> confdefs.h <<EOF
3729#define inline $ac_cv_c_inline
3730EOF
3731 ;;
3732esac
3733
c906108c 3734
3250596b 3735for ac_func in btowc canonicalize_file_name isascii poll \
27aac7ff 3736 realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
c906108c
SS
3737do
3738echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9608ab8b 3739echo "configure:3740: checking for $ac_func" >&5
c906108c
SS
3740if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3741 echo $ac_n "(cached) $ac_c" 1>&6
3742else
3743 cat > conftest.$ac_ext <<EOF
9608ab8b 3744#line 3745 "configure"
c906108c
SS
3745#include "confdefs.h"
3746/* System header to define __stub macros and hopefully few prototypes,
3747 which can conflict with char $ac_func(); below. */
3748#include <assert.h>
3749/* Override any gcc2 internal prototype to avoid an error. */
3750/* We use char because int might match the return type of a gcc2
3751 builtin and then its argument prototype would still apply. */
3752char $ac_func();
3753
3754int main() {
3755
3756/* The GNU C library defines this for functions which it implements
3757 to always fail with ENOSYS. Some functions are actually named
3758 something starting with __ and the normal name is an alias. */
3759#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3760choke me
3761#else
3762$ac_func();
3763#endif
3764
3765; return 0; }
3766EOF
9608ab8b 3767if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
3768 rm -rf conftest*
3769 eval "ac_cv_func_$ac_func=yes"
3770else
3771 echo "configure: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3773 rm -rf conftest*
3774 eval "ac_cv_func_$ac_func=no"
3775fi
3776rm -f conftest*
3777fi
3778
3779if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3780 echo "$ac_t""yes" 1>&6
3781 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3782 cat >> confdefs.h <<EOF
3783#define $ac_tr_func 1
3784EOF
3785
3786else
3787 echo "$ac_t""no" 1>&6
3788fi
3789done
3790
46711df8
MK
3791# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3792# for constant arguments. Useless!
3793echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9608ab8b 3794echo "configure:3795: checking for working alloca.h" >&5
46711df8
MK
3795if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3796 echo $ac_n "(cached) $ac_c" 1>&6
3797else
3798 cat > conftest.$ac_ext <<EOF
9608ab8b 3799#line 3800 "configure"
46711df8
MK
3800#include "confdefs.h"
3801#include <alloca.h>
3802int main() {
3803char *p = alloca(2 * sizeof(int));
3804; return 0; }
3805EOF
9608ab8b 3806if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3807 rm -rf conftest*
3808 ac_cv_header_alloca_h=yes
3809else
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3812 rm -rf conftest*
3813 ac_cv_header_alloca_h=no
3814fi
3815rm -f conftest*
3816fi
3817
3818echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3819if test $ac_cv_header_alloca_h = yes; then
3820 cat >> confdefs.h <<\EOF
3821#define HAVE_ALLOCA_H 1
3822EOF
3823
3824fi
3825
3826echo $ac_n "checking for alloca""... $ac_c" 1>&6
9608ab8b 3827echo "configure:3828: checking for alloca" >&5
46711df8
MK
3828if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3829 echo $ac_n "(cached) $ac_c" 1>&6
3830else
3831 cat > conftest.$ac_ext <<EOF
9608ab8b 3832#line 3833 "configure"
46711df8
MK
3833#include "confdefs.h"
3834
3835#ifdef __GNUC__
3836# define alloca __builtin_alloca
3837#else
3838# ifdef _MSC_VER
3839# include <malloc.h>
3840# define alloca _alloca
3841# else
3842# if HAVE_ALLOCA_H
3843# include <alloca.h>
3844# else
3845# ifdef _AIX
3846 #pragma alloca
3847# else
3848# ifndef alloca /* predefined by HP cc +Olibcalls */
3849char *alloca ();
3850# endif
3851# endif
3852# endif
3853# endif
3854#endif
3855
3856int main() {
3857char *p = (char *) alloca(1);
3858; return 0; }
3859EOF
9608ab8b 3860if { (eval echo configure:3861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3861 rm -rf conftest*
3862 ac_cv_func_alloca_works=yes
3863else
3864 echo "configure: failed program was:" >&5
3865 cat conftest.$ac_ext >&5
3866 rm -rf conftest*
3867 ac_cv_func_alloca_works=no
3868fi
3869rm -f conftest*
3870fi
3871
3872echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3873if test $ac_cv_func_alloca_works = yes; then
3874 cat >> confdefs.h <<\EOF
3875#define HAVE_ALLOCA 1
3876EOF
3877
3878fi
3879
3880if test $ac_cv_func_alloca_works = no; then
3881 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3882 # that cause trouble. Some versions do not even contain alloca or
3883 # contain a buggy version. If you still want to use their alloca,
3884 # use ar to extract alloca.o from them instead of compiling alloca.c.
3885 ALLOCA=alloca.${ac_objext}
3886 cat >> confdefs.h <<\EOF
3887#define C_ALLOCA 1
3888EOF
3889
3890
3891echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9608ab8b 3892echo "configure:3893: checking whether alloca needs Cray hooks" >&5
46711df8
MK
3893if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3894 echo $ac_n "(cached) $ac_c" 1>&6
3895else
3896 cat > conftest.$ac_ext <<EOF
9608ab8b 3897#line 3898 "configure"
46711df8
MK
3898#include "confdefs.h"
3899#if defined(CRAY) && ! defined(CRAY2)
3900webecray
3901#else
3902wenotbecray
3903#endif
3904
3905EOF
3906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3907 egrep "webecray" >/dev/null 2>&1; then
3908 rm -rf conftest*
3909 ac_cv_os_cray=yes
3910else
3911 rm -rf conftest*
3912 ac_cv_os_cray=no
3913fi
3914rm -f conftest*
3915
3916fi
3917
3918echo "$ac_t""$ac_cv_os_cray" 1>&6
3919if test $ac_cv_os_cray = yes; then
3920for ac_func in _getb67 GETB67 getb67; do
3921 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9608ab8b 3922echo "configure:3923: checking for $ac_func" >&5
46711df8
MK
3923if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3924 echo $ac_n "(cached) $ac_c" 1>&6
3925else
3926 cat > conftest.$ac_ext <<EOF
9608ab8b 3927#line 3928 "configure"
46711df8
MK
3928#include "confdefs.h"
3929/* System header to define __stub macros and hopefully few prototypes,
3930 which can conflict with char $ac_func(); below. */
3931#include <assert.h>
3932/* Override any gcc2 internal prototype to avoid an error. */
3933/* We use char because int might match the return type of a gcc2
3934 builtin and then its argument prototype would still apply. */
3935char $ac_func();
3936
3937int main() {
3938
3939/* The GNU C library defines this for functions which it implements
3940 to always fail with ENOSYS. Some functions are actually named
3941 something starting with __ and the normal name is an alias. */
3942#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3943choke me
3944#else
3945$ac_func();
3946#endif
3947
3948; return 0; }
3949EOF
9608ab8b 3950if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
46711df8
MK
3951 rm -rf conftest*
3952 eval "ac_cv_func_$ac_func=yes"
3953else
3954 echo "configure: failed program was:" >&5
3955 cat conftest.$ac_ext >&5
3956 rm -rf conftest*
3957 eval "ac_cv_func_$ac_func=no"
3958fi
3959rm -f conftest*
3960fi
3961
3962if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3963 echo "$ac_t""yes" 1>&6
3964 cat >> confdefs.h <<EOF
3965#define CRAY_STACKSEG_END $ac_func
3966EOF
3967
3968 break
3969else
3970 echo "$ac_t""no" 1>&6
3971fi
3972
3973done
3974fi
3975
3976echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9608ab8b 3977echo "configure:3978: checking stack direction for C alloca" >&5
46711df8
MK
3978if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3979 echo $ac_n "(cached) $ac_c" 1>&6
3980else
3981 if test "$cross_compiling" = yes; then
3982 ac_cv_c_stack_direction=0
3983else
3984 cat > conftest.$ac_ext <<EOF
9608ab8b 3985#line 3986 "configure"
46711df8
MK
3986#include "confdefs.h"
3987find_stack_direction ()
3988{
3989 static char *addr = 0;
3990 auto char dummy;
3991 if (addr == 0)
3992 {
3993 addr = &dummy;
3994 return find_stack_direction ();
3995 }
3996 else
3997 return (&dummy > addr) ? 1 : -1;
3998}
3999main ()
4000{
4001 exit (find_stack_direction() < 0);
4002}
4003EOF
9608ab8b 4004if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
46711df8
MK
4005then
4006 ac_cv_c_stack_direction=1
4007else
4008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
4010 rm -fr conftest*
4011 ac_cv_c_stack_direction=-1
4012fi
4013rm -fr conftest*
4014fi
4015
4016fi
4017
4018echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4019cat >> confdefs.h <<EOF
4020#define STACK_DIRECTION $ac_cv_c_stack_direction
4021EOF
4022
4023fi
4024
74c1b268 4025echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9608ab8b 4026echo "configure:4027: checking for pid_t" >&5
74c1b268
AC
4027if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4028 echo $ac_n "(cached) $ac_c" 1>&6
4029else
4030 cat > conftest.$ac_ext <<EOF
9608ab8b 4031#line 4032 "configure"
74c1b268
AC
4032#include "confdefs.h"
4033#include <sys/types.h>
4034#if STDC_HEADERS
4035#include <stdlib.h>
4036#include <stddef.h>
4037#endif
4038EOF
4039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4040 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4041 rm -rf conftest*
4042 ac_cv_type_pid_t=yes
4043else
4044 rm -rf conftest*
4045 ac_cv_type_pid_t=no
4046fi
4047rm -f conftest*
4048
4049fi
4050echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4051if test $ac_cv_type_pid_t = no; then
4052 cat >> confdefs.h <<\EOF
4053#define pid_t int
4054EOF
4055
4056fi
4057
4058ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4059echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9608ab8b 4060echo "configure:4061: checking for vfork.h" >&5
74c1b268
AC
4061if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4062 echo $ac_n "(cached) $ac_c" 1>&6
4063else
4064 cat > conftest.$ac_ext <<EOF
9608ab8b 4065#line 4066 "configure"
74c1b268
AC
4066#include "confdefs.h"
4067#include <vfork.h>
4068EOF
4069ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 4070{ (eval echo configure:4071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
74c1b268
AC
4071ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4072if test -z "$ac_err"; then
4073 rm -rf conftest*
4074 eval "ac_cv_header_$ac_safe=yes"
4075else
4076 echo "$ac_err" >&5
4077 echo "configure: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4079 rm -rf conftest*
4080 eval "ac_cv_header_$ac_safe=no"
4081fi
4082rm -f conftest*
4083fi
4084if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4085 echo "$ac_t""yes" 1>&6
4086 cat >> confdefs.h <<\EOF
4087#define HAVE_VFORK_H 1
4088EOF
4089
4090else
4091 echo "$ac_t""no" 1>&6
4092fi
4093
4094echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9608ab8b 4095echo "configure:4096: checking for working vfork" >&5
74c1b268
AC
4096if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
4098else
4099 if test "$cross_compiling" = yes; then
4100 echo $ac_n "checking for vfork""... $ac_c" 1>&6
9608ab8b 4101echo "configure:4102: checking for vfork" >&5
74c1b268
AC
4102if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4103 echo $ac_n "(cached) $ac_c" 1>&6
4104else
4105 cat > conftest.$ac_ext <<EOF
9608ab8b 4106#line 4107 "configure"
74c1b268
AC
4107#include "confdefs.h"
4108/* System header to define __stub macros and hopefully few prototypes,
4109 which can conflict with char vfork(); below. */
4110#include <assert.h>
4111/* Override any gcc2 internal prototype to avoid an error. */
4112/* We use char because int might match the return type of a gcc2
4113 builtin and then its argument prototype would still apply. */
4114char vfork();
4115
4116int main() {
4117
4118/* The GNU C library defines this for functions which it implements
4119 to always fail with ENOSYS. Some functions are actually named
4120 something starting with __ and the normal name is an alias. */
4121#if defined (__stub_vfork) || defined (__stub___vfork)
4122choke me
4123#else
4124vfork();
4125#endif
4126
4127; return 0; }
4128EOF
9608ab8b 4129if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
74c1b268
AC
4130 rm -rf conftest*
4131 eval "ac_cv_func_vfork=yes"
4132else
4133 echo "configure: failed program was:" >&5
4134 cat conftest.$ac_ext >&5
4135 rm -rf conftest*
4136 eval "ac_cv_func_vfork=no"
4137fi
4138rm -f conftest*
4139fi
4140
4141if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4142 echo "$ac_t""yes" 1>&6
4143 :
4144else
4145 echo "$ac_t""no" 1>&6
4146fi
4147
4148ac_cv_func_vfork_works=$ac_cv_func_vfork
4149else
4150 cat > conftest.$ac_ext <<EOF
9608ab8b 4151#line 4152 "configure"
74c1b268
AC
4152#include "confdefs.h"
4153/* Thanks to Paul Eggert for this test. */
4154#include <stdio.h>
4155#include <sys/types.h>
4156#include <sys/stat.h>
4157#ifdef HAVE_UNISTD_H
4158#include <unistd.h>
4159#endif
4160#ifdef HAVE_VFORK_H
4161#include <vfork.h>
4162#endif
4163/* On some sparc systems, changes by the child to local and incoming
4164 argument registers are propagated back to the parent.
4165 The compiler is told about this with #include <vfork.h>,
4166 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4167 Test for this by using a static variable whose address
4168 is put into a register that is clobbered by the vfork. */
4169static
4170#ifdef __cplusplus
4171sparc_address_test (int arg)
4172#else
4173sparc_address_test (arg) int arg;
4174#endif
4175{
4176 static pid_t child;
4177 if (!child) {
4178 child = vfork ();
4179 if (child < 0) {
4180 perror ("vfork");
4181 _exit(2);
4182 }
4183 if (!child) {
4184 arg = getpid();
4185 write(-1, "", 0);
4186 _exit (arg);
4187 }
4188 }
4189}
4190main() {
4191 pid_t parent = getpid ();
4192 pid_t child;
4193
4194 sparc_address_test ();
4195
4196 child = vfork ();
4197
4198 if (child == 0) {
4199 /* Here is another test for sparc vfork register problems.
4200 This test uses lots of local variables, at least
4201 as many local variables as main has allocated so far
4202 including compiler temporaries. 4 locals are enough for
4203 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4204 A buggy compiler should reuse the register of parent
4205 for one of the local variables, since it will think that
4206 parent can't possibly be used any more in this routine.
4207 Assigning to the local variable will thus munge parent
4208 in the parent process. */
4209 pid_t
4210 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4211 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4212 /* Convince the compiler that p..p7 are live; otherwise, it might
4213 use the same hardware register for all 8 local variables. */
4214 if (p != p1 || p != p2 || p != p3 || p != p4
4215 || p != p5 || p != p6 || p != p7)
4216 _exit(1);
4217
4218 /* On some systems (e.g. IRIX 3.3),
4219 vfork doesn't separate parent from child file descriptors.
4220 If the child closes a descriptor before it execs or exits,
4221 this munges the parent's descriptor as well.
4222 Test for this by closing stdout in the child. */
4223 _exit(close(fileno(stdout)) != 0);
4224 } else {
4225 int status;
4226 struct stat st;
4227
4228 while (wait(&status) != child)
4229 ;
4230 exit(
4231 /* Was there some problem with vforking? */
4232 child < 0
4233
4234 /* Did the child fail? (This shouldn't happen.) */
4235 || status
4236
4237 /* Did the vfork/compiler bug occur? */
4238 || parent != getpid()
4239
4240 /* Did the file descriptor bug occur? */
4241 || fstat(fileno(stdout), &st) != 0
4242 );
4243 }
4244}
4245EOF
9608ab8b 4246if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
74c1b268
AC
4247then
4248 ac_cv_func_vfork_works=yes
4249else
4250 echo "configure: failed program was:" >&5
4251 cat conftest.$ac_ext >&5
4252 rm -fr conftest*
4253 ac_cv_func_vfork_works=no
4254fi
4255rm -fr conftest*
4256fi
4257
4258fi
4259
4260echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4261if test $ac_cv_func_vfork_works = no; then
4262 cat >> confdefs.h <<\EOF
4263#define vfork fork
4264EOF
4265
4266fi
4267
72473524
DJ
4268if test "$cross_compiling" = no; then
4269 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9608ab8b 4270echo "configure:4271: checking whether setpgrp takes no argument" >&5
0200359f
MK
4271if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4272 echo $ac_n "(cached) $ac_c" 1>&6
4273else
4274 if test "$cross_compiling" = yes; then
4275 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4276else
4277 cat > conftest.$ac_ext <<EOF
9608ab8b 4278#line 4279 "configure"
0200359f
MK
4279#include "confdefs.h"
4280
4281#ifdef HAVE_UNISTD_H
4282#include <unistd.h>
4283#endif
4284
4285/*
4286 * If this system has a BSD-style setpgrp, which takes arguments, exit
4287 * successfully.
4288 */
4289main()
4290{
4291 if (setpgrp(1,1) == -1)
4292 exit(0);
4293 else
4294 exit(1);
4295}
4296
4297EOF
9608ab8b 4298if { (eval echo configure:4299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
0200359f
MK
4299then
4300 ac_cv_func_setpgrp_void=no
4301else
4302 echo "configure: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304 rm -fr conftest*
4305 ac_cv_func_setpgrp_void=yes
4306fi
4307rm -fr conftest*
4308fi
4309
4310
4311fi
4312
4313echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4314if test $ac_cv_func_setpgrp_void = yes; then
4315 cat >> confdefs.h <<\EOF
4316#define SETPGRP_VOID 1
4317EOF
4318
4319fi
4320
72473524
DJ
4321else
4322 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
9608ab8b 4323echo "configure:4324: checking whether setpgrp takes no argument" >&5
72473524
DJ
4324if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4325 echo $ac_n "(cached) $ac_c" 1>&6
4326else
4327 cat > conftest.$ac_ext <<EOF
9608ab8b 4328#line 4329 "configure"
72473524
DJ
4329#include "confdefs.h"
4330
4331#include <unistd.h>
4332
4333int main() {
4334
4335 if (setpgrp(1,1) == -1)
4336 exit (0);
4337 else
4338 exit (1);
4339
4340; return 0; }
4341EOF
9608ab8b 4342if { (eval echo configure:4343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
72473524
DJ
4343 rm -rf conftest*
4344 ac_cv_func_setpgrp_void=no
4345else
4346 echo "configure: failed program was:" >&5
4347 cat conftest.$ac_ext >&5
4348 rm -rf conftest*
4349 ac_cv_func_setpgrp_void=yes
4350fi
4351rm -f conftest*
4352fi
4353
4354echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4355if test $ac_cv_func_setpgrp_void = yes; then
4356 cat >> confdefs.h <<\EOF
4357#define SETPGRP_VOID 1
4358EOF
4359
4360fi
4361fi
c906108c 4362
2b2d558c
MK
4363# Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
4364# since sigsetjmp might only be defined as a macro.
4365echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9608ab8b 4366echo "configure:4367: checking for sigsetjmp" >&5
2b2d558c
MK
4367if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4368 echo $ac_n "(cached) $ac_c" 1>&6
4369else
4370 cat > conftest.$ac_ext <<EOF
9608ab8b 4371#line 4372 "configure"
2b2d558c
MK
4372#include "confdefs.h"
4373
4374#include <setjmp.h>
4375
4376int main() {
4377sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4378; return 0; }
4379EOF
9608ab8b 4380if { (eval echo configure:4381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2b2d558c
MK
4381 rm -rf conftest*
4382 gdb_cv_func_sigsetjmp=yes
4383else
4384 echo "configure: failed program was:" >&5
4385 cat conftest.$ac_ext >&5
4386 rm -rf conftest*
4387 gdb_cv_func_sigsetjmp=no
4388fi
4389rm -f conftest*
4390fi
4391
4392echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4393if test $gdb_cv_func_sigsetjmp = yes; then
4394 cat >> confdefs.h <<\EOF
4395#define HAVE_SIGSETJMP 1
4396EOF
4397
4398fi
4399
0afdd437 4400# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7dfa765c
MK
4401# Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4402echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
9608ab8b 4403echo "configure:4404: checking for r_fs in struct reg" >&5
422ea4b8 4404if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7dfa765c
MK
4405 echo $ac_n "(cached) $ac_c" 1>&6
4406else
4407 cat > conftest.$ac_ext <<EOF
9608ab8b 4408#line 4409 "configure"
7dfa765c
MK
4409#include "confdefs.h"
4410#include <machine/reg.h>
4411int main() {
4412struct reg r; r.r_fs;
4413; return 0; }
4414EOF
9608ab8b 4415if { (eval echo configure:4416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4416 rm -rf conftest*
422ea4b8 4417 gdb_cv_struct_reg_r_fs=yes
7dfa765c
MK
4418else
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4421 rm -rf conftest*
422ea4b8 4422 gdb_cv_struct_reg_r_fs=no
7dfa765c
MK
4423fi
4424rm -f conftest*
4425fi
4426
422ea4b8
MK
4427echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4428if test $gdb_cv_struct_reg_r_fs = yes; then
7dfa765c 4429 cat >> confdefs.h <<\EOF
422ea4b8 4430#define HAVE_STRUCT_REG_R_FS 1
7dfa765c
MK
4431EOF
4432
4433fi
4434echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
9608ab8b 4435echo "configure:4436: checking for r_gs in struct reg" >&5
422ea4b8 4436if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7dfa765c
MK
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438else
4439 cat > conftest.$ac_ext <<EOF
9608ab8b 4440#line 4441 "configure"
7dfa765c
MK
4441#include "confdefs.h"
4442#include <machine/reg.h>
4443int main() {
4444struct reg r; r.r_gs;
4445; return 0; }
4446EOF
9608ab8b 4447if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7dfa765c 4448 rm -rf conftest*
422ea4b8 4449 gdb_cv_struct_reg_r_gs=yes
7dfa765c
MK
4450else
4451 echo "configure: failed program was:" >&5
4452 cat conftest.$ac_ext >&5
4453 rm -rf conftest*
422ea4b8 4454 gdb_cv_struct_reg_r_gs=no
7dfa765c
MK
4455fi
4456rm -f conftest*
4457fi
4458
422ea4b8
MK
4459echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4460if test $gdb_cv_struct_reg_r_gs = yes; then
7dfa765c 4461 cat >> confdefs.h <<\EOF
422ea4b8 4462#define HAVE_STRUCT_REG_R_GS 1
7dfa765c
MK
4463EOF
4464
4465fi
4466
0afdd437 4467# See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
64bb1671 4468echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
9608ab8b 4469echo "configure:4470: checking for PTRACE_GETREGS" >&5
64bb1671
MK
4470if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4471 echo $ac_n "(cached) $ac_c" 1>&6
4472else
4473 cat > conftest.$ac_ext <<EOF
9608ab8b 4474#line 4475 "configure"
64bb1671
MK
4475#include "confdefs.h"
4476#include <sys/ptrace.h>
4477int main() {
4478PTRACE_GETREGS;
4479; return 0; }
4480EOF
9608ab8b 4481if { (eval echo configure:4482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
64bb1671
MK
4482 rm -rf conftest*
4483 gdb_cv_have_ptrace_getregs=yes
4484else
4485 echo "configure: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
4487 rm -rf conftest*
4488 gdb_cv_have_ptrace_getregs=no
4489fi
4490rm -f conftest*
4491fi
4492
4397a6ab 4493echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
64bb1671
MK
4494if test $gdb_cv_have_ptrace_getregs = yes; then
4495 cat >> confdefs.h <<\EOF
4496#define HAVE_PTRACE_GETREGS 1
4497EOF
4498
4499fi
4500
0afdd437 4501# See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6ce2ac0b 4502echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
9608ab8b 4503echo "configure:4504: checking for PTRACE_GETFPXREGS" >&5
6ce2ac0b 4504if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
5c44784c
JM
4505 echo $ac_n "(cached) $ac_c" 1>&6
4506else
4507 cat > conftest.$ac_ext <<EOF
9608ab8b 4508#line 4509 "configure"
5c44784c
JM
4509#include "confdefs.h"
4510#include <sys/ptrace.h>
4511int main() {
6ce2ac0b 4512PTRACE_GETFPXREGS;
5c44784c
JM
4513; return 0; }
4514EOF
9608ab8b 4515if { (eval echo configure:4516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5c44784c 4516 rm -rf conftest*
6ce2ac0b 4517 gdb_cv_have_ptrace_getfpxregs=yes
5c44784c
JM
4518else
4519 echo "configure: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 rm -rf conftest*
6ce2ac0b 4522 gdb_cv_have_ptrace_getfpxregs=no
5c44784c
JM
4523fi
4524rm -f conftest*
4525fi
4526
6ce2ac0b
MK
4527echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4528if test $gdb_cv_have_ptrace_getfpxregs = yes; then
5c44784c 4529 cat >> confdefs.h <<\EOF
6ce2ac0b 4530#define HAVE_PTRACE_GETFPXREGS 1
5c44784c
JM
4531EOF
4532
4533fi
4534
0afdd437
MK
4535# See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4536echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
9608ab8b 4537echo "configure:4538: checking for PT_GETDBREGS" >&5
0afdd437
MK
4538if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
4539 echo $ac_n "(cached) $ac_c" 1>&6
4540else
4541 cat > conftest.$ac_ext <<EOF
9608ab8b 4542#line 4543 "configure"
0afdd437
MK
4543#include "confdefs.h"
4544#include <sys/types.h>
4545#include <sys/ptrace.h>
4546int main() {
4547PT_GETDBREGS;
4548; return 0; }
4549EOF
9608ab8b 4550if { (eval echo configure:4551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
0afdd437
MK
4551 rm -rf conftest*
4552 gdb_cv_have_pt_getdbregs=yes
4553else
4554 echo "configure: failed program was:" >&5
4555 cat conftest.$ac_ext >&5
4556 rm -rf conftest*
4557 gdb_cv_have_pt_getdbregs=no
4558fi
4559rm -f conftest*
4560fi
4561
4562echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4563if test $gdb_cv_have_pt_getdbregs = yes; then
4564 cat >> confdefs.h <<\EOF
4565#define HAVE_PT_GETDBREGS 1
4566EOF
4567
4568fi
4569
7e89e357
JT
4570# See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
4571echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
9608ab8b 4572echo "configure:4573: checking for PT_GETXMMREGS" >&5
7e89e357
JT
4573if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
4574 echo $ac_n "(cached) $ac_c" 1>&6
4575else
4576 cat > conftest.$ac_ext <<EOF
9608ab8b 4577#line 4578 "configure"
7e89e357
JT
4578#include "confdefs.h"
4579#include <sys/types.h>
4580#include <sys/ptrace.h>
4581int main() {
4582PT_GETXMMREGS;
4583; return 0; }
4584EOF
9608ab8b 4585if { (eval echo configure:4586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7e89e357
JT
4586 rm -rf conftest*
4587 gdb_cv_have_pt_getxmmregs=yes
4588else
4589 echo "configure: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 rm -rf conftest*
4592 gdb_cv_have_pt_getxmmregs=no
4593fi
4594rm -f conftest*
4595fi
4596
4597echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
4598if test $gdb_cv_have_pt_getxmmregs = yes; then
4599 cat >> confdefs.h <<\EOF
4600#define HAVE_PT_GETXMMREGS 1
4601EOF
4602
4603fi
4604
0afdd437 4605
7be570e7 4606echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
9608ab8b 4607echo "configure:4608: checking for socketpair in -lsocket" >&5
7be570e7
JM
4608ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
4609if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4610 echo $ac_n "(cached) $ac_c" 1>&6
4611else
4612 ac_save_LIBS="$LIBS"
4613LIBS="-lsocket $LIBS"
4614cat > conftest.$ac_ext <<EOF
9608ab8b 4615#line 4616 "configure"
7be570e7
JM
4616#include "confdefs.h"
4617/* Override any gcc2 internal prototype to avoid an error. */
4618/* We use char because int might match the return type of a gcc2
4619 builtin and then its argument prototype would still apply. */
4620char socketpair();
4621
4622int main() {
4623socketpair()
4624; return 0; }
4625EOF
9608ab8b 4626if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4627 rm -rf conftest*
4628 eval "ac_cv_lib_$ac_lib_var=yes"
4629else
4630 echo "configure: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4632 rm -rf conftest*
4633 eval "ac_cv_lib_$ac_lib_var=no"
4634fi
4635rm -f conftest*
4636LIBS="$ac_save_LIBS"
4637
4638fi
4639if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4640 echo "$ac_t""yes" 1>&6
4641 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4642 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4643 cat >> confdefs.h <<EOF
4644#define $ac_tr_lib 1
4645EOF
4646
4647 LIBS="-lsocket $LIBS"
4648
4649else
4650 echo "$ac_t""no" 1>&6
4651fi
4652
4653for ac_func in socketpair
4654do
4655echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9608ab8b 4656echo "configure:4657: checking for $ac_func" >&5
7be570e7
JM
4657if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4658 echo $ac_n "(cached) $ac_c" 1>&6
4659else
4660 cat > conftest.$ac_ext <<EOF
9608ab8b 4661#line 4662 "configure"
7be570e7
JM
4662#include "confdefs.h"
4663/* System header to define __stub macros and hopefully few prototypes,
4664 which can conflict with char $ac_func(); below. */
4665#include <assert.h>
4666/* Override any gcc2 internal prototype to avoid an error. */
4667/* We use char because int might match the return type of a gcc2
4668 builtin and then its argument prototype would still apply. */
4669char $ac_func();
4670
4671int main() {
4672
4673/* The GNU C library defines this for functions which it implements
4674 to always fail with ENOSYS. Some functions are actually named
4675 something starting with __ and the normal name is an alias. */
4676#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4677choke me
4678#else
4679$ac_func();
4680#endif
4681
4682; return 0; }
4683EOF
9608ab8b 4684if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7be570e7
JM
4685 rm -rf conftest*
4686 eval "ac_cv_func_$ac_func=yes"
4687else
4688 echo "configure: failed program was:" >&5
4689 cat conftest.$ac_ext >&5
4690 rm -rf conftest*
4691 eval "ac_cv_func_$ac_func=no"
4692fi
4693rm -f conftest*
4694fi
4695
4696if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4697 echo "$ac_t""yes" 1>&6
4698 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4699 cat >> confdefs.h <<EOF
4700#define $ac_tr_func 1
4701EOF
4702
4703else
4704 echo "$ac_t""no" 1>&6
4705fi
4706done
4707
4708
4709
c906108c 4710echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
9608ab8b 4711echo "configure:4712: checking whether malloc must be declared" >&5
c906108c
SS
4712if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4713 echo $ac_n "(cached) $ac_c" 1>&6
4714else
4715 cat > conftest.$ac_ext <<EOF
9608ab8b 4716#line 4717 "configure"
c906108c
SS
4717#include "confdefs.h"
4718
4719#include <stdio.h>
4720#ifdef HAVE_STRING_H
4721#include <string.h>
4722#else
4723#ifdef HAVE_STRINGS_H
4724#include <strings.h>
4725#endif
4726#endif
4727#ifdef HAVE_STDLIB_H
4728#include <stdlib.h>
4729#endif
4730#ifdef HAVE_UNISTD_H
4731#include <unistd.h>
4732#endif
4733int main() {
4734char *(*pfn) = (char *(*)) malloc
4735; return 0; }
4736EOF
9608ab8b 4737if { (eval echo configure:4738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4738 rm -rf conftest*
4739 bfd_cv_decl_needed_malloc=no
4740else
4741 echo "configure: failed program was:" >&5
4742 cat conftest.$ac_ext >&5
4743 rm -rf conftest*
4744 bfd_cv_decl_needed_malloc=yes
4745fi
4746rm -f conftest*
4747fi
4748
4749echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4750if test $bfd_cv_decl_needed_malloc = yes; then
4751 cat >> confdefs.h <<\EOF
4752#define NEED_DECLARATION_MALLOC 1
4753EOF
4754
4755fi
4756
4757echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
9608ab8b 4758echo "configure:4759: checking whether realloc must be declared" >&5
c906108c
SS
4759if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4760 echo $ac_n "(cached) $ac_c" 1>&6
4761else
4762 cat > conftest.$ac_ext <<EOF
9608ab8b 4763#line 4764 "configure"
c906108c
SS
4764#include "confdefs.h"
4765
4766#include <stdio.h>
4767#ifdef HAVE_STRING_H
4768#include <string.h>
4769#else
4770#ifdef HAVE_STRINGS_H
4771#include <strings.h>
4772#endif
4773#endif
4774#ifdef HAVE_STDLIB_H
4775#include <stdlib.h>
4776#endif
4777#ifdef HAVE_UNISTD_H
4778#include <unistd.h>
4779#endif
4780int main() {
4781char *(*pfn) = (char *(*)) realloc
4782; return 0; }
4783EOF
9608ab8b 4784if { (eval echo configure:4785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4785 rm -rf conftest*
4786 bfd_cv_decl_needed_realloc=no
4787else
4788 echo "configure: failed program was:" >&5
4789 cat conftest.$ac_ext >&5
4790 rm -rf conftest*
4791 bfd_cv_decl_needed_realloc=yes
4792fi
4793rm -f conftest*
4794fi
4795
4796echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4797if test $bfd_cv_decl_needed_realloc = yes; then
4798 cat >> confdefs.h <<\EOF
4799#define NEED_DECLARATION_REALLOC 1
4800EOF
4801
4802fi
4803
4804echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
9608ab8b 4805echo "configure:4806: checking whether free must be declared" >&5
c906108c
SS
4806if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4807 echo $ac_n "(cached) $ac_c" 1>&6
4808else
4809 cat > conftest.$ac_ext <<EOF
9608ab8b 4810#line 4811 "configure"
c906108c
SS
4811#include "confdefs.h"
4812
4813#include <stdio.h>
4814#ifdef HAVE_STRING_H
4815#include <string.h>
4816#else
4817#ifdef HAVE_STRINGS_H
4818#include <strings.h>
4819#endif
4820#endif
4821#ifdef HAVE_STDLIB_H
4822#include <stdlib.h>
4823#endif
4824#ifdef HAVE_UNISTD_H
4825#include <unistd.h>
4826#endif
4827int main() {
4828char *(*pfn) = (char *(*)) free
4829; return 0; }
4830EOF
9608ab8b 4831if { (eval echo configure:4832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4832 rm -rf conftest*
4833 bfd_cv_decl_needed_free=no
4834else
4835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 rm -rf conftest*
4838 bfd_cv_decl_needed_free=yes
4839fi
4840rm -f conftest*
4841fi
4842
4843echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4844if test $bfd_cv_decl_needed_free = yes; then
4845 cat >> confdefs.h <<\EOF
4846#define NEED_DECLARATION_FREE 1
4847EOF
4848
4849fi
4850
4851echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
9608ab8b 4852echo "configure:4853: checking whether strerror must be declared" >&5
c906108c
SS
4853if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4854 echo $ac_n "(cached) $ac_c" 1>&6
4855else
4856 cat > conftest.$ac_ext <<EOF
9608ab8b 4857#line 4858 "configure"
c906108c
SS
4858#include "confdefs.h"
4859
4860#include <stdio.h>
4861#ifdef HAVE_STRING_H
4862#include <string.h>
4863#else
4864#ifdef HAVE_STRINGS_H
4865#include <strings.h>
4866#endif
4867#endif
4868#ifdef HAVE_STDLIB_H
4869#include <stdlib.h>
4870#endif
4871#ifdef HAVE_UNISTD_H
4872#include <unistd.h>
4873#endif
4874int main() {
4875char *(*pfn) = (char *(*)) strerror
4876; return 0; }
4877EOF
9608ab8b 4878if { (eval echo configure:4879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4879 rm -rf conftest*
4880 bfd_cv_decl_needed_strerror=no
4881else
4882 echo "configure: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 rm -rf conftest*
4885 bfd_cv_decl_needed_strerror=yes
4886fi
4887rm -f conftest*
4888fi
4889
4890echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4891if test $bfd_cv_decl_needed_strerror = yes; then
4892 cat >> confdefs.h <<\EOF
4893#define NEED_DECLARATION_STRERROR 1
4894EOF
4895
4896fi
4897
4898echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
9608ab8b 4899echo "configure:4900: checking whether strdup must be declared" >&5
c906108c
SS
4900if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4901 echo $ac_n "(cached) $ac_c" 1>&6
4902else
4903 cat > conftest.$ac_ext <<EOF
9608ab8b 4904#line 4905 "configure"
c906108c
SS
4905#include "confdefs.h"
4906
4907#include <stdio.h>
4908#ifdef HAVE_STRING_H
4909#include <string.h>
4910#else
4911#ifdef HAVE_STRINGS_H
4912#include <strings.h>
4913#endif
4914#endif
4915#ifdef HAVE_STDLIB_H
4916#include <stdlib.h>
4917#endif
4918#ifdef HAVE_UNISTD_H
4919#include <unistd.h>
4920#endif
4921int main() {
4922char *(*pfn) = (char *(*)) strdup
4923; return 0; }
4924EOF
9608ab8b 4925if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
4926 rm -rf conftest*
4927 bfd_cv_decl_needed_strdup=no
4928else
4929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4931 rm -rf conftest*
4932 bfd_cv_decl_needed_strdup=yes
4933fi
4934rm -f conftest*
4935fi
4936
4937echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4938if test $bfd_cv_decl_needed_strdup = yes; then
4939 cat >> confdefs.h <<\EOF
4940#define NEED_DECLARATION_STRDUP 1
4941EOF
4942
4943fi
4944
b83266a0 4945echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
9608ab8b 4946echo "configure:4947: checking whether strstr must be declared" >&5
b83266a0
SS
4947if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4948 echo $ac_n "(cached) $ac_c" 1>&6
4949else
4950 cat > conftest.$ac_ext <<EOF
9608ab8b 4951#line 4952 "configure"
b83266a0
SS
4952#include "confdefs.h"
4953
4954#include <stdio.h>
4955#ifdef HAVE_STRING_H
4956#include <string.h>
4957#else
4958#ifdef HAVE_STRINGS_H
4959#include <strings.h>
4960#endif
4961#endif
4962#ifdef HAVE_STDLIB_H
4963#include <stdlib.h>
4964#endif
4965#ifdef HAVE_UNISTD_H
4966#include <unistd.h>
4967#endif
4968int main() {
4969char *(*pfn) = (char *(*)) strstr
4970; return 0; }
4971EOF
9608ab8b 4972if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b83266a0
SS
4973 rm -rf conftest*
4974 bfd_cv_decl_needed_strstr=no
4975else
4976 echo "configure: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
4978 rm -rf conftest*
4979 bfd_cv_decl_needed_strstr=yes
4980fi
4981rm -f conftest*
4982fi
4983
4984echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4985if test $bfd_cv_decl_needed_strstr = yes; then
4986 cat >> confdefs.h <<\EOF
4987#define NEED_DECLARATION_STRSTR 1
4988EOF
4989
4990fi
4991
a4db0f07 4992echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
9608ab8b 4993echo "configure:4994: checking whether canonicalize_file_name must be declared" >&5
a4db0f07
RH
4994if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
4995 echo $ac_n "(cached) $ac_c" 1>&6
4996else
4997 cat > conftest.$ac_ext <<EOF
9608ab8b 4998#line 4999 "configure"
a4db0f07
RH
4999#include "confdefs.h"
5000
5001#include <stdio.h>
5002#ifdef HAVE_STRING_H
5003#include <string.h>
5004#else
5005#ifdef HAVE_STRINGS_H
5006#include <strings.h>
5007#endif
5008#endif
5009#ifdef HAVE_STDLIB_H
5010#include <stdlib.h>
5011#endif
5012#ifdef HAVE_UNISTD_H
5013#include <unistd.h>
5014#endif
5015int main() {
5016char *(*pfn) = (char *(*)) canonicalize_file_name
5017; return 0; }
5018EOF
9608ab8b 5019if { (eval echo configure:5020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
a4db0f07
RH
5020 rm -rf conftest*
5021 bfd_cv_decl_needed_canonicalize_file_name=no
5022else
5023 echo "configure: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 rm -rf conftest*
5026 bfd_cv_decl_needed_canonicalize_file_name=yes
5027fi
5028rm -f conftest*
5029fi
5030
5031echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
5032if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
5033 cat >> confdefs.h <<\EOF
5034#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
5035EOF
5036
5037fi
c906108c
SS
5038
5039
5040# The following save_state_t checkery is only necessary for HPUX
5041# versions earlier than 10.20. When those fade from memory, this
5042# could be expunged. --jsm 1999-03-22
5043
5044echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
9608ab8b 5045echo "configure:5046: checking for HPUX save_state structure" >&5
c906108c 5046cat > conftest.$ac_ext <<EOF
9608ab8b 5047#line 5048 "configure"
c906108c
SS
5048#include "confdefs.h"
5049#include <machine/save_state.h>
5050EOF
5051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5052 egrep "save_state_t" >/dev/null 2>&1; then
5053 rm -rf conftest*
5054 gdb_cv_hpux_savestate=yes
5055else
5056 rm -rf conftest*
5057 gdb_cv_hpux_savestate=no
5058fi
5059rm -f conftest*
5060
5061cat > conftest.$ac_ext <<EOF
9608ab8b 5062#line 5063 "configure"
c906108c
SS
5063#include "confdefs.h"
5064#include <machine/save_state.h>
5065EOF
5066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5067 egrep "ss_wide" >/dev/null 2>&1; then
5068 rm -rf conftest*
5069 gdb_cv_hpux_sswide=yes
5070else
5071 rm -rf conftest*
5072 gdb_cv_hpux_sswide=no
5073fi
5074rm -f conftest*
5075
5076if test $gdb_cv_hpux_savestate = yes
5077then
5078 cat >> confdefs.h <<\EOF
5079#define HAVE_STRUCT_SAVE_STATE_T 1
5080EOF
5081
5082fi
5083if test $gdb_cv_hpux_sswide = yes
5084then
5085 cat >> confdefs.h <<\EOF
5086#define HAVE_STRUCT_MEMBER_SS_WIDE 1
5087EOF
5088
5089fi
5090echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
5091
5092
5093# If we are configured native on GNU/Linux, work around problems with
5094# sys/procfs.h
c3f6f71d 5095# Also detect which type of /proc is in use, such as for Unixware or Solaris.
c906108c
SS
5096
5097if test "${target}" = "${host}"; then
5098 case "${host}" in
5099 i[3456]86-*-linux*)
5100 cat >> confdefs.h <<\EOF
5101#define START_INFERIOR_TRAPS_EXPECTED 2
5102EOF
5103
5104 cat >> confdefs.h <<\EOF
5105#define sys_quotactl 1
5106EOF
5107
5108 ;;
596c9d4b
KB
5109 ia64-*-aix*)
5110 cat >> confdefs.h <<\EOF
5111#define NEW_PROC_API 1
5112EOF
5113
5114 ;;
1045b512 5115 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
c3f6f71d
JM
5116 cat >> confdefs.h <<\EOF
5117#define NEW_PROC_API 1
c906108c
SS
5118EOF
5119
c3f6f71d 5120 ;;
3423db82 5121 *-*-solaris2.[678])
c3f6f71d
JM
5122 cat >> confdefs.h <<\EOF
5123#define NEW_PROC_API 1
5124EOF
5125
5126 ;;
5127 esac
c906108c
SS
5128fi
5129
5130if test "$ac_cv_header_sys_procfs_h" = yes; then
5131 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5132echo "configure:5133: checking for pstatus_t in sys/procfs.h" >&5
c906108c
SS
5133 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5134 echo $ac_n "(cached) $ac_c" 1>&6
5135else
5136 cat > conftest.$ac_ext <<EOF
9608ab8b 5137#line 5138 "configure"
c906108c 5138#include "confdefs.h"
e17bf198
AO
5139
5140#define _SYSCALL32
c906108c
SS
5141#include <sys/procfs.h>
5142int main() {
5143pstatus_t avar
5144; return 0; }
5145EOF
9608ab8b 5146if { (eval echo configure:5147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5147 rm -rf conftest*
5148 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5149else
5150 echo "configure: failed program was:" >&5
5151 cat conftest.$ac_ext >&5
5152 rm -rf conftest*
5153 bfd_cv_have_sys_procfs_type_pstatus_t=no
5154
5155fi
5156rm -f conftest*
5157fi
5158
5159 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5160 cat >> confdefs.h <<\EOF
5161#define HAVE_PSTATUS_T 1
5162EOF
5163
5164 fi
5165 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5166
5167 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5168echo "configure:5169: checking for prrun_t in sys/procfs.h" >&5
c906108c
SS
5169 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
5170 echo $ac_n "(cached) $ac_c" 1>&6
5171else
5172 cat > conftest.$ac_ext <<EOF
9608ab8b 5173#line 5174 "configure"
c906108c 5174#include "confdefs.h"
e17bf198
AO
5175
5176#define _SYSCALL32
c906108c
SS
5177#include <sys/procfs.h>
5178int main() {
5179prrun_t avar
5180; return 0; }
5181EOF
9608ab8b 5182if { (eval echo configure:5183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5183 rm -rf conftest*
5184 bfd_cv_have_sys_procfs_type_prrun_t=yes
5185else
5186 echo "configure: failed program was:" >&5
5187 cat conftest.$ac_ext >&5
5188 rm -rf conftest*
5189 bfd_cv_have_sys_procfs_type_prrun_t=no
5190
5191fi
5192rm -f conftest*
5193fi
5194
5195 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
5196 cat >> confdefs.h <<\EOF
5197#define HAVE_PRRUN_T 1
5198EOF
5199
5200 fi
5201 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
5202
5203 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5204echo "configure:5205: checking for gregset_t in sys/procfs.h" >&5
c906108c
SS
5205 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
5206 echo $ac_n "(cached) $ac_c" 1>&6
5207else
5208 cat > conftest.$ac_ext <<EOF
9608ab8b 5209#line 5210 "configure"
c906108c 5210#include "confdefs.h"
e17bf198
AO
5211
5212#define _SYSCALL32
c906108c
SS
5213#include <sys/procfs.h>
5214int main() {
5215gregset_t avar
5216; return 0; }
5217EOF
9608ab8b 5218if { (eval echo configure:5219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5219 rm -rf conftest*
5220 bfd_cv_have_sys_procfs_type_gregset_t=yes
5221else
5222 echo "configure: failed program was:" >&5
5223 cat conftest.$ac_ext >&5
5224 rm -rf conftest*
5225 bfd_cv_have_sys_procfs_type_gregset_t=no
5226
5227fi
5228rm -f conftest*
5229fi
5230
5231 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5232 cat >> confdefs.h <<\EOF
5233#define HAVE_GREGSET_T 1
5234EOF
5235
5236 fi
5237 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
5238
5239 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5240echo "configure:5241: checking for fpregset_t in sys/procfs.h" >&5
c906108c
SS
5241 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
5242 echo $ac_n "(cached) $ac_c" 1>&6
5243else
5244 cat > conftest.$ac_ext <<EOF
9608ab8b 5245#line 5246 "configure"
c906108c 5246#include "confdefs.h"
e17bf198
AO
5247
5248#define _SYSCALL32
c906108c
SS
5249#include <sys/procfs.h>
5250int main() {
5251fpregset_t avar
5252; return 0; }
5253EOF
9608ab8b 5254if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5255 rm -rf conftest*
5256 bfd_cv_have_sys_procfs_type_fpregset_t=yes
5257else
5258 echo "configure: failed program was:" >&5
5259 cat conftest.$ac_ext >&5
5260 rm -rf conftest*
5261 bfd_cv_have_sys_procfs_type_fpregset_t=no
5262
5263fi
5264rm -f conftest*
5265fi
5266
5267 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5268 cat >> confdefs.h <<\EOF
5269#define HAVE_FPREGSET_T 1
5270EOF
5271
5272 fi
5273 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5274
3862412b 5275 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5276echo "configure:5277: checking for prgregset_t in sys/procfs.h" >&5
3862412b
MK
5277 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5278 echo $ac_n "(cached) $ac_c" 1>&6
5279else
5280 cat > conftest.$ac_ext <<EOF
9608ab8b 5281#line 5282 "configure"
3862412b 5282#include "confdefs.h"
e17bf198
AO
5283
5284#define _SYSCALL32
3862412b
MK
5285#include <sys/procfs.h>
5286int main() {
5287prgregset_t avar
5288; return 0; }
5289EOF
9608ab8b 5290if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5291 rm -rf conftest*
5292 bfd_cv_have_sys_procfs_type_prgregset_t=yes
5293else
5294 echo "configure: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 rm -rf conftest*
5297 bfd_cv_have_sys_procfs_type_prgregset_t=no
5298
5299fi
5300rm -f conftest*
5301fi
5302
5303 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5304 cat >> confdefs.h <<\EOF
5305#define HAVE_PRGREGSET_T 1
5306EOF
5307
5308 fi
5309 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5310
5311 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5312echo "configure:5313: checking for prfpregset_t in sys/procfs.h" >&5
3862412b
MK
5313 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5314 echo $ac_n "(cached) $ac_c" 1>&6
5315else
5316 cat > conftest.$ac_ext <<EOF
9608ab8b 5317#line 5318 "configure"
3862412b 5318#include "confdefs.h"
e17bf198
AO
5319
5320#define _SYSCALL32
3862412b
MK
5321#include <sys/procfs.h>
5322int main() {
5323prfpregset_t avar
5324; return 0; }
5325EOF
9608ab8b 5326if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5327 rm -rf conftest*
5328 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5329else
5330 echo "configure: failed program was:" >&5
5331 cat conftest.$ac_ext >&5
5332 rm -rf conftest*
5333 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5334
5335fi
5336rm -f conftest*
5337fi
5338
5339 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5340 cat >> confdefs.h <<\EOF
5341#define HAVE_PRFPREGSET_T 1
5342EOF
5343
5344 fi
5345 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5346
451928c5 5347 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5348echo "configure:5349: checking for prgregset32_t in sys/procfs.h" >&5
451928c5
AC
5349 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5350 echo $ac_n "(cached) $ac_c" 1>&6
5351else
5352 cat > conftest.$ac_ext <<EOF
9608ab8b 5353#line 5354 "configure"
451928c5 5354#include "confdefs.h"
e17bf198
AO
5355
5356#define _SYSCALL32
451928c5
AC
5357#include <sys/procfs.h>
5358int main() {
5359prgregset32_t avar
5360; return 0; }
5361EOF
9608ab8b 5362if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5363 rm -rf conftest*
5364 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5365else
5366 echo "configure: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5368 rm -rf conftest*
5369 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5370
5371fi
5372rm -f conftest*
5373fi
5374
5375 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5376 cat >> confdefs.h <<\EOF
5377#define HAVE_PRGREGSET32_T 1
5378EOF
5379
5380 fi
5381 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5382
5383 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5384echo "configure:5385: checking for prfpregset32_t in sys/procfs.h" >&5
451928c5
AC
5385 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5386 echo $ac_n "(cached) $ac_c" 1>&6
5387else
5388 cat > conftest.$ac_ext <<EOF
9608ab8b 5389#line 5390 "configure"
451928c5 5390#include "confdefs.h"
e17bf198
AO
5391
5392#define _SYSCALL32
451928c5
AC
5393#include <sys/procfs.h>
5394int main() {
5395prfpregset32_t avar
5396; return 0; }
5397EOF
9608ab8b 5398if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
451928c5
AC
5399 rm -rf conftest*
5400 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5401else
5402 echo "configure: failed program was:" >&5
5403 cat conftest.$ac_ext >&5
5404 rm -rf conftest*
5405 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5406
5407fi
5408rm -f conftest*
5409fi
5410
5411 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5412 cat >> confdefs.h <<\EOF
5413#define HAVE_PRFPREGSET32_T 1
5414EOF
5415
5416 fi
5417 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5418
3862412b 5419 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5420echo "configure:5421: checking for lwpid_t in sys/procfs.h" >&5
3862412b
MK
5421 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
5423else
5424 cat > conftest.$ac_ext <<EOF
9608ab8b 5425#line 5426 "configure"
3862412b 5426#include "confdefs.h"
e17bf198
AO
5427
5428#define _SYSCALL32
3862412b
MK
5429#include <sys/procfs.h>
5430int main() {
5431lwpid_t avar
5432; return 0; }
5433EOF
9608ab8b 5434if { (eval echo configure:5435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5435 rm -rf conftest*
5436 bfd_cv_have_sys_procfs_type_lwpid_t=yes
5437else
5438 echo "configure: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
5440 rm -rf conftest*
5441 bfd_cv_have_sys_procfs_type_lwpid_t=no
5442
5443fi
5444rm -f conftest*
5445fi
5446
5447 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5448 cat >> confdefs.h <<\EOF
5449#define HAVE_LWPID_T 1
5450EOF
5451
5452 fi
5453 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5454
5455 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5456echo "configure:5457: checking for psaddr_t in sys/procfs.h" >&5
3862412b
MK
5457 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5458 echo $ac_n "(cached) $ac_c" 1>&6
5459else
5460 cat > conftest.$ac_ext <<EOF
9608ab8b 5461#line 5462 "configure"
3862412b 5462#include "confdefs.h"
e17bf198
AO
5463
5464#define _SYSCALL32
3862412b
MK
5465#include <sys/procfs.h>
5466int main() {
5467psaddr_t avar
5468; return 0; }
5469EOF
9608ab8b 5470if { (eval echo configure:5471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3862412b
MK
5471 rm -rf conftest*
5472 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5473else
5474 echo "configure: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 rm -rf conftest*
5477 bfd_cv_have_sys_procfs_type_psaddr_t=no
5478
5479fi
5480rm -f conftest*
5481fi
5482
5483 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5484 cat >> confdefs.h <<\EOF
5485#define HAVE_PSADDR_T 1
5486EOF
5487
5488 fi
5489 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5490
596c9d4b 5491 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5492echo "configure:5493: checking for prsysent_t in sys/procfs.h" >&5
596c9d4b
KB
5493 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5494 echo $ac_n "(cached) $ac_c" 1>&6
5495else
5496 cat > conftest.$ac_ext <<EOF
9608ab8b 5497#line 5498 "configure"
596c9d4b
KB
5498#include "confdefs.h"
5499
5500#define _SYSCALL32
5501#include <sys/procfs.h>
5502int main() {
5503prsysent_t avar
5504; return 0; }
5505EOF
9608ab8b 5506if { (eval echo configure:5507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5507 rm -rf conftest*
5508 bfd_cv_have_sys_procfs_type_prsysent_t=yes
5509else
5510 echo "configure: failed program was:" >&5
5511 cat conftest.$ac_ext >&5
5512 rm -rf conftest*
5513 bfd_cv_have_sys_procfs_type_prsysent_t=no
5514
5515fi
5516rm -f conftest*
5517fi
5518
5519 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5520 cat >> confdefs.h <<\EOF
5521#define HAVE_PRSYSENT_T 1
5522EOF
5523
5524 fi
5525 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5526
5527 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5528echo "configure:5529: checking for pr_sigset_t in sys/procfs.h" >&5
596c9d4b
KB
5529 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5530 echo $ac_n "(cached) $ac_c" 1>&6
5531else
5532 cat > conftest.$ac_ext <<EOF
9608ab8b 5533#line 5534 "configure"
596c9d4b
KB
5534#include "confdefs.h"
5535
5536#define _SYSCALL32
5537#include <sys/procfs.h>
5538int main() {
5539pr_sigset_t avar
5540; return 0; }
5541EOF
9608ab8b 5542if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5543 rm -rf conftest*
5544 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5545else
5546 echo "configure: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548 rm -rf conftest*
5549 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5550
5551fi
5552rm -f conftest*
5553fi
5554
5555 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5556 cat >> confdefs.h <<\EOF
5557#define HAVE_PR_SIGSET_T 1
5558EOF
5559
5560 fi
5561 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5562
5563 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5564echo "configure:5565: checking for pr_sigaction64_t in sys/procfs.h" >&5
596c9d4b
KB
5565 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
5566 echo $ac_n "(cached) $ac_c" 1>&6
5567else
5568 cat > conftest.$ac_ext <<EOF
9608ab8b 5569#line 5570 "configure"
596c9d4b
KB
5570#include "confdefs.h"
5571
5572#define _SYSCALL32
5573#include <sys/procfs.h>
5574int main() {
5575pr_sigaction64_t avar
5576; return 0; }
5577EOF
9608ab8b 5578if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5579 rm -rf conftest*
5580 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5581else
5582 echo "configure: failed program was:" >&5
5583 cat conftest.$ac_ext >&5
5584 rm -rf conftest*
5585 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5586
5587fi
5588rm -f conftest*
5589fi
5590
5591 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5592 cat >> confdefs.h <<\EOF
5593#define HAVE_PR_SIGACTION64_T 1
5594EOF
5595
5596 fi
5597 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5598
5599 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5600echo "configure:5601: checking for pr_siginfo64_t in sys/procfs.h" >&5
596c9d4b
KB
5601 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5602 echo $ac_n "(cached) $ac_c" 1>&6
5603else
5604 cat > conftest.$ac_ext <<EOF
9608ab8b 5605#line 5606 "configure"
596c9d4b
KB
5606#include "confdefs.h"
5607
5608#define _SYSCALL32
5609#include <sys/procfs.h>
5610int main() {
5611pr_siginfo64_t avar
5612; return 0; }
5613EOF
9608ab8b 5614if { (eval echo configure:5615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
596c9d4b
KB
5615 rm -rf conftest*
5616 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5617else
5618 echo "configure: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 rm -rf conftest*
5621 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5622
5623fi
5624rm -f conftest*
5625fi
5626
5627 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5628 cat >> confdefs.h <<\EOF
5629#define HAVE_PR_SIGINFO64_T 1
5630EOF
5631
5632 fi
5633 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5634
c906108c 5635
451928c5 5636
c906108c 5637
746a987d 5638
d84dd0c5
MK
5639 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5640 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
9608ab8b 5641echo "configure:5642: checking whether prfpregset_t type is broken" >&5
d84dd0c5
MK
5642 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5643 echo $ac_n "(cached) $ac_c" 1>&6
5644else
5645 if test "$cross_compiling" = yes; then
5646 gdb_cv_prfpregset_t_broken=yes
5647else
5648 cat > conftest.$ac_ext <<EOF
9608ab8b 5649#line 5650 "configure"
d84dd0c5
MK
5650#include "confdefs.h"
5651#include <sys/procfs.h>
5652 int main ()
5653 {
5654 if (sizeof (prfpregset_t) == sizeof (void *))
5655 return 1;
5656 return 0;
5657 }
5658EOF
9608ab8b 5659if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
d84dd0c5
MK
5660then
5661 gdb_cv_prfpregset_t_broken=no
5662else
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5665 rm -fr conftest*
5666 gdb_cv_prfpregset_t_broken=yes
5667fi
5668rm -fr conftest*
5669fi
5670
5671fi
5672
5673 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5674 if test $gdb_cv_prfpregset_t_broken = yes; then
5675 cat >> confdefs.h <<\EOF
5676#define PRFPREGSET_T_BROKEN 1
5677EOF
5678
5679 fi
5680 fi
5681
5682
c906108c 5683 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
9608ab8b 5684echo "configure:5685: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
c906108c
SS
5685 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5686 echo $ac_n "(cached) $ac_c" 1>&6
5687else
5688 cat > conftest.$ac_ext <<EOF
9608ab8b 5689#line 5690 "configure"
c906108c
SS
5690#include "confdefs.h"
5691#include <unistd.h>
5692#include <sys/types.h>
5693#include <sys/procfs.h>
5694
5695int main() {
5696
5697 int dummy;;
5698 dummy = ioctl(0, PIOCSET, &dummy);
5699
5700; return 0; }
5701EOF
9608ab8b 5702if { (eval echo configure:5703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
5703 rm -rf conftest*
5704 gdb_cv_have_procfs_piocset=yes
5705else
5706 echo "configure: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 rm -rf conftest*
5709 gdb_cv_have_procfs_piocset=no
5710fi
5711rm -f conftest*
5712fi
5713
5714 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5715 if test $gdb_cv_have_procfs_piocset = yes; then
5716 cat >> confdefs.h <<\EOF
5717#define HAVE_PROCFS_PIOCSET 1
5718EOF
5719
5720 fi
5721fi
5722
d45fe813
KB
5723if test ${host} = ${target} ; then
5724
5725 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
9608ab8b 5726echo "configure:5727: checking for member l_addr in struct link_map" >&5
d45fe813
KB
5727 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5728 echo $ac_n "(cached) $ac_c" 1>&6
5729else
5730 cat > conftest.$ac_ext <<EOF
9608ab8b 5731#line 5732 "configure"
d45fe813
KB
5732#include "confdefs.h"
5733#include <link.h>
5734int main() {
5735struct link_map lm; (void) lm.l_addr;
5736; return 0; }
5737EOF
9608ab8b 5738if { (eval echo configure:5739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5739 rm -rf conftest*
5740 gdb_cv_have_struct_link_map_with_l_members=yes
5741else
5742 echo "configure: failed program was:" >&5
5743 cat conftest.$ac_ext >&5
5744 rm -rf conftest*
5745 gdb_cv_have_struct_link_map_with_l_members=no
5746fi
5747rm -f conftest*
5748fi
5749
5750 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5751 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5752 cat >> confdefs.h <<\EOF
5753#define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5754EOF
5755
5756 fi
5757
5758
5759 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
9608ab8b 5760echo "configure:5761: checking for member lm_addr in struct link_map" >&5
d45fe813
KB
5761 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5762 echo $ac_n "(cached) $ac_c" 1>&6
5763else
5764 cat > conftest.$ac_ext <<EOF
9608ab8b 5765#line 5766 "configure"
d45fe813
KB
5766#include "confdefs.h"
5767#include <sys/types.h>
5768#include <link.h>
5769int main() {
5770struct link_map lm; (void) lm.lm_addr;
5771; return 0; }
5772EOF
9608ab8b 5773if { (eval echo configure:5774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5774 rm -rf conftest*
5775 gdb_cv_have_struct_link_map_with_lm_members=yes
5776else
5777 echo "configure: failed program was:" >&5
5778 cat conftest.$ac_ext >&5
5779 rm -rf conftest*
5780 gdb_cv_have_struct_link_map_with_lm_members=no
5781fi
5782rm -f conftest*
5783fi
5784
5785 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
5786 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
5787 cat >> confdefs.h <<\EOF
5788#define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
5789EOF
5790
5791 fi
5792
5793
5794 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
9608ab8b 5795echo "configure:5796: checking for member som_addr in struct so_map" >&5
d45fe813
KB
5796 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
5797 echo $ac_n "(cached) $ac_c" 1>&6
5798else
5799 cat > conftest.$ac_ext <<EOF
9608ab8b 5800#line 5801 "configure"
d45fe813
KB
5801#include "confdefs.h"
5802#include <sys/types.h>
39812ceb
C
5803#ifdef HAVE_NLIST_H
5804#include <nlist.h>
5805#endif
d45fe813
KB
5806#include <link.h>
5807int main() {
5808struct so_map lm; (void) lm.som_addr;
5809; return 0; }
5810EOF
9608ab8b 5811if { (eval echo configure:5812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5812 rm -rf conftest*
5813 gdb_cv_have_struct_so_map_with_som_members=yes
5814else
5815 echo "configure: failed program was:" >&5
5816 cat conftest.$ac_ext >&5
5817 rm -rf conftest*
5818 gdb_cv_have_struct_so_map_with_som_members=no
5819fi
5820rm -f conftest*
5821fi
5822
5823 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
5824 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
5825 cat >> confdefs.h <<\EOF
5826#define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
5827EOF
5828
5829 fi
5830
5831
5832 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
9608ab8b 5833echo "configure:5834: checking for struct link_map32 in sys/link.h" >&5
d45fe813
KB
5834 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
5835 echo $ac_n "(cached) $ac_c" 1>&6
5836else
5837 cat > conftest.$ac_ext <<EOF
9608ab8b 5838#line 5839 "configure"
d45fe813
KB
5839#include "confdefs.h"
5840#define _SYSCALL32
5841#include <sys/link.h>
5842int main() {
5843struct link_map32 l;
5844; return 0; }
5845EOF
9608ab8b 5846if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d45fe813
KB
5847 rm -rf conftest*
5848 gdb_cv_have_struct_link_map32=yes
5849else
5850 echo "configure: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5852 rm -rf conftest*
5853 gdb_cv_have_struct_link_map32=no
5854fi
5855rm -f conftest*
5856fi
5857
5858 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
5859 if test $gdb_cv_have_struct_link_map32 = yes; then
5860 cat >> confdefs.h <<\EOF
5861#define HAVE_STRUCT_LINK_MAP32 1
943c9c25
MS
5862EOF
5863
5864 cat >> confdefs.h <<\EOF
5865#define _SYSCALL32 1
d45fe813
KB
5866EOF
5867
5868 fi
5869fi
5870
c906108c 5871echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
9608ab8b 5872echo "configure:5873: checking for main in -lm" >&5
c906108c
SS
5873ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5874if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5875 echo $ac_n "(cached) $ac_c" 1>&6
5876else
5877 ac_save_LIBS="$LIBS"
5878LIBS="-lm $LIBS"
5879cat > conftest.$ac_ext <<EOF
9608ab8b 5880#line 5881 "configure"
c906108c
SS
5881#include "confdefs.h"
5882
5883int main() {
5884main()
5885; return 0; }
5886EOF
9608ab8b 5887if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5888 rm -rf conftest*
5889 eval "ac_cv_lib_$ac_lib_var=yes"
5890else
5891 echo "configure: failed program was:" >&5
5892 cat conftest.$ac_ext >&5
5893 rm -rf conftest*
5894 eval "ac_cv_lib_$ac_lib_var=no"
5895fi
5896rm -f conftest*
5897LIBS="$ac_save_LIBS"
5898
5899fi
5900if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5901 echo "$ac_t""yes" 1>&6
5902 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5903 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5904 cat >> confdefs.h <<EOF
5905#define $ac_tr_lib 1
5906EOF
5907
5908 LIBS="-lm $LIBS"
5909
5910else
5911 echo "$ac_t""no" 1>&6
5912fi
5913
5914
5915echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
9608ab8b 5916echo "configure:5917: checking for wctype in -lc" >&5
c906108c
SS
5917ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
5918if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5919 echo $ac_n "(cached) $ac_c" 1>&6
5920else
5921 ac_save_LIBS="$LIBS"
5922LIBS="-lc $LIBS"
5923cat > conftest.$ac_ext <<EOF
9608ab8b 5924#line 5925 "configure"
c906108c
SS
5925#include "confdefs.h"
5926/* Override any gcc2 internal prototype to avoid an error. */
5927/* We use char because int might match the return type of a gcc2
5928 builtin and then its argument prototype would still apply. */
5929char wctype();
5930
5931int main() {
5932wctype()
5933; return 0; }
5934EOF
9608ab8b 5935if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5936 rm -rf conftest*
5937 eval "ac_cv_lib_$ac_lib_var=yes"
5938else
5939 echo "configure: failed program was:" >&5
5940 cat conftest.$ac_ext >&5
5941 rm -rf conftest*
5942 eval "ac_cv_lib_$ac_lib_var=no"
5943fi
5944rm -f conftest*
5945LIBS="$ac_save_LIBS"
5946
5947fi
5948if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5949 echo "$ac_t""yes" 1>&6
5950 :
5951else
5952 echo "$ac_t""no" 1>&6
5953echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
9608ab8b 5954echo "configure:5955: checking for wctype in -lw" >&5
c906108c
SS
5955ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5956if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
5958else
5959 ac_save_LIBS="$LIBS"
5960LIBS="-lw $LIBS"
5961cat > conftest.$ac_ext <<EOF
9608ab8b 5962#line 5963 "configure"
c906108c
SS
5963#include "confdefs.h"
5964/* Override any gcc2 internal prototype to avoid an error. */
5965/* We use char because int might match the return type of a gcc2
5966 builtin and then its argument prototype would still apply. */
5967char wctype();
5968
5969int main() {
5970wctype()
5971; return 0; }
5972EOF
9608ab8b 5973if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
5974 rm -rf conftest*
5975 eval "ac_cv_lib_$ac_lib_var=yes"
5976else
5977 echo "configure: failed program was:" >&5
5978 cat conftest.$ac_ext >&5
5979 rm -rf conftest*
5980 eval "ac_cv_lib_$ac_lib_var=no"
5981fi
5982rm -f conftest*
5983LIBS="$ac_save_LIBS"
5984
5985fi
5986if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5987 echo "$ac_t""yes" 1>&6
5988 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5989 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5990 cat >> confdefs.h <<EOF
5991#define $ac_tr_lib 1
5992EOF
5993
5994 LIBS="-lw $LIBS"
5995
5996else
5997 echo "$ac_t""no" 1>&6
5998fi
5999
6000fi
6001
6002
6003
6004echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
9608ab8b 6005echo "configure:6006: checking for long long support in compiler" >&5
c906108c
SS
6006if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
6007 echo $ac_n "(cached) $ac_c" 1>&6
6008else
6009 cat > conftest.$ac_ext <<EOF
9608ab8b 6010#line 6011 "configure"
c906108c
SS
6011#include "confdefs.h"
6012
6013int main() {
6014
6015 extern long long foo;
6016 switch (foo & 2) { case 0: return 1; }
6017
6018; return 0; }
6019EOF
9608ab8b 6020if { (eval echo configure:6021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
6021 rm -rf conftest*
6022 gdb_cv_c_long_long=yes
6023else
6024 echo "configure: failed program was:" >&5
6025 cat conftest.$ac_ext >&5
6026 rm -rf conftest*
6027 gdb_cv_c_long_long=no
6028fi
6029rm -f conftest*
6030fi
6031
6032echo "$ac_t""$gdb_cv_c_long_long" 1>&6
6033if test $gdb_cv_c_long_long = yes; then
6034 cat >> confdefs.h <<\EOF
6035#define CC_HAS_LONG_LONG 1
6036EOF
6037
6038fi
6039
6040
6041echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
9608ab8b 6042echo "configure:6043: checking for long long support in printf" >&5
c906108c
SS
6043if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045else
6046 if test "$cross_compiling" = yes; then
6047 gdb_cv_printf_has_long_long=no
6048else
6049 cat > conftest.$ac_ext <<EOF
9608ab8b 6050#line 6051 "configure"
c906108c
SS
6051#include "confdefs.h"
6052
6053int main () {
6054 char buf[32];
6055 long long l = 0;
6056 l = (l << 16) + 0x0123;
6057 l = (l << 16) + 0x4567;
6058 l = (l << 16) + 0x89ab;
6059 l = (l << 16) + 0xcdef;
6060 sprintf (buf, "0x%016llx", l);
6061 return (strcmp ("0x0123456789abcdef", buf));
6062}
6063EOF
9608ab8b 6064if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6065then
6066 gdb_cv_printf_has_long_long=yes
6067else
6068 echo "configure: failed program was:" >&5
6069 cat conftest.$ac_ext >&5
6070 rm -fr conftest*
6071 gdb_cv_printf_has_long_long=no
6072fi
6073rm -fr conftest*
6074fi
6075
6076fi
6077
6078if test $gdb_cv_printf_has_long_long = yes; then
6079 cat >> confdefs.h <<\EOF
6080#define PRINTF_HAS_LONG_LONG 1
6081EOF
6082
6083fi
6084echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
6085
6086
6087echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
9608ab8b 6088echo "configure:6089: checking for long double support in compiler" >&5
c906108c
SS
6089if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
6090 echo $ac_n "(cached) $ac_c" 1>&6
6091else
6092 cat > conftest.$ac_ext <<EOF
9608ab8b 6093#line 6094 "configure"
c906108c
SS
6094#include "confdefs.h"
6095
6096int main() {
6097long double foo;
6098; return 0; }
6099EOF
9608ab8b 6100if { (eval echo configure:6101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
6101 rm -rf conftest*
6102 ac_cv_c_long_double=yes
6103else
6104 echo "configure: failed program was:" >&5
6105 cat conftest.$ac_ext >&5
6106 rm -rf conftest*
6107 ac_cv_c_long_double=no
6108fi
6109rm -f conftest*
6110fi
6111
6112echo "$ac_t""$ac_cv_c_long_double" 1>&6
6113if test $ac_cv_c_long_double = yes; then
6114 cat >> confdefs.h <<\EOF
6115#define HAVE_LONG_DOUBLE 1
6116EOF
6117
6118fi
6119
6120
6121echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
9608ab8b 6122echo "configure:6123: checking for long double support in printf" >&5
c906108c
SS
6123if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
6124 echo $ac_n "(cached) $ac_c" 1>&6
6125else
6126 if test "$cross_compiling" = yes; then
6127 gdb_cv_printf_has_long_double=no
6128else
6129 cat > conftest.$ac_ext <<EOF
9608ab8b 6130#line 6131 "configure"
c906108c
SS
6131#include "confdefs.h"
6132
6133int main () {
6134 char buf[16];
6135 long double f = 3.141592653;
6136 sprintf (buf, "%Lg", f);
6137 return (strncmp ("3.14159", buf, 7));
6138}
6139EOF
9608ab8b 6140if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6141then
6142 gdb_cv_printf_has_long_double=yes
6143else
6144 echo "configure: failed program was:" >&5
6145 cat conftest.$ac_ext >&5
6146 rm -fr conftest*
6147 gdb_cv_printf_has_long_double=no
6148fi
6149rm -fr conftest*
6150fi
6151
6152fi
6153
6154if test $gdb_cv_printf_has_long_double = yes; then
6155 cat >> confdefs.h <<\EOF
6156#define PRINTF_HAS_LONG_DOUBLE 1
6157EOF
6158
6159fi
6160echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
6161
6162
6163echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
9608ab8b 6164echo "configure:6165: checking for long double support in scanf" >&5
c906108c
SS
6165if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
6166 echo $ac_n "(cached) $ac_c" 1>&6
6167else
6168 if test "$cross_compiling" = yes; then
6169 gdb_cv_scanf_has_long_double=no
6170else
6171 cat > conftest.$ac_ext <<EOF
9608ab8b 6172#line 6173 "configure"
c906108c
SS
6173#include "confdefs.h"
6174
6175int main () {
6176 char *buf = "3.141592653";
6177 long double f = 0;
6178 sscanf (buf, "%Lg", &f);
6179 return !(f > 3.14159 && f < 3.14160);
6180}
6181EOF
9608ab8b 6182if { (eval echo configure:6183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6183then
6184 gdb_cv_scanf_has_long_double=yes
6185else
6186 echo "configure: failed program was:" >&5
6187 cat conftest.$ac_ext >&5
6188 rm -fr conftest*
6189 gdb_cv_scanf_has_long_double=no
6190fi
6191rm -fr conftest*
6192fi
6193
6194fi
6195
6196if test $gdb_cv_scanf_has_long_double = yes; then
6197 cat >> confdefs.h <<\EOF
6198#define SCANF_HAS_LONG_DOUBLE 1
6199EOF
6200
6201fi
6202echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
6203
c41b7eb1 6204for ac_hdr in unistd.h
c906108c
SS
6205do
6206ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6207echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9608ab8b 6208echo "configure:6209: checking for $ac_hdr" >&5
c906108c
SS
6209if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6210 echo $ac_n "(cached) $ac_c" 1>&6
6211else
6212 cat > conftest.$ac_ext <<EOF
9608ab8b 6213#line 6214 "configure"
c906108c
SS
6214#include "confdefs.h"
6215#include <$ac_hdr>
6216EOF
6217ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 6218{ (eval echo configure:6219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
6219ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6220if test -z "$ac_err"; then
6221 rm -rf conftest*
6222 eval "ac_cv_header_$ac_safe=yes"
6223else
6224 echo "$ac_err" >&5
6225 echo "configure: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6227 rm -rf conftest*
6228 eval "ac_cv_header_$ac_safe=no"
6229fi
6230rm -f conftest*
6231fi
6232if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6233 echo "$ac_t""yes" 1>&6
6234 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6235 cat >> confdefs.h <<EOF
6236#define $ac_tr_hdr 1
6237EOF
6238
6239else
6240 echo "$ac_t""no" 1>&6
6241fi
6242done
6243
6244for ac_func in getpagesize
6245do
6246echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9608ab8b 6247echo "configure:6248: checking for $ac_func" >&5
c906108c
SS
6248if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6249 echo $ac_n "(cached) $ac_c" 1>&6
6250else
6251 cat > conftest.$ac_ext <<EOF
9608ab8b 6252#line 6253 "configure"
c906108c
SS
6253#include "confdefs.h"
6254/* System header to define __stub macros and hopefully few prototypes,
6255 which can conflict with char $ac_func(); below. */
6256#include <assert.h>
6257/* Override any gcc2 internal prototype to avoid an error. */
6258/* We use char because int might match the return type of a gcc2
6259 builtin and then its argument prototype would still apply. */
6260char $ac_func();
6261
6262int main() {
6263
6264/* The GNU C library defines this for functions which it implements
6265 to always fail with ENOSYS. Some functions are actually named
6266 something starting with __ and the normal name is an alias. */
6267#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6268choke me
6269#else
6270$ac_func();
6271#endif
6272
6273; return 0; }
6274EOF
9608ab8b 6275if { (eval echo configure:6276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6276 rm -rf conftest*
6277 eval "ac_cv_func_$ac_func=yes"
6278else
6279 echo "configure: failed program was:" >&5
6280 cat conftest.$ac_ext >&5
6281 rm -rf conftest*
6282 eval "ac_cv_func_$ac_func=no"
6283fi
6284rm -f conftest*
6285fi
6286
6287if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6288 echo "$ac_t""yes" 1>&6
6289 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6290 cat >> confdefs.h <<EOF
6291#define $ac_tr_func 1
6292EOF
6293
6294else
6295 echo "$ac_t""no" 1>&6
6296fi
6297done
6298
6299echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9608ab8b 6300echo "configure:6301: checking for working mmap" >&5
c906108c
SS
6301if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6302 echo $ac_n "(cached) $ac_c" 1>&6
6303else
6304 if test "$cross_compiling" = yes; then
6305 ac_cv_func_mmap_fixed_mapped=no
6306else
6307 cat > conftest.$ac_ext <<EOF
9608ab8b 6308#line 6309 "configure"
c906108c
SS
6309#include "confdefs.h"
6310
6311/* Thanks to Mike Haertel and Jim Avera for this test.
6312 Here is a matrix of mmap possibilities:
6313 mmap private not fixed
6314 mmap private fixed at somewhere currently unmapped
6315 mmap private fixed at somewhere already mapped
6316 mmap shared not fixed
6317 mmap shared fixed at somewhere currently unmapped
6318 mmap shared fixed at somewhere already mapped
6319 For private mappings, we should verify that changes cannot be read()
6320 back from the file, nor mmap's back from the file at a different
6321 address. (There have been systems where private was not correctly
6322 implemented like the infamous i386 svr4.0, and systems where the
6323 VM page cache was not coherent with the filesystem buffer cache
6324 like early versions of FreeBSD and possibly contemporary NetBSD.)
6325 For shared mappings, we should conversely verify that changes get
6326 propogated back to all the places they're supposed to be.
6327
6328 Grep wants private fixed already mapped.
6329 The main things grep needs to know about mmap are:
6330 * does it exist and is it safe to write into the mmap'd area
6331 * how to use it (BSD variants) */
6332#include <sys/types.h>
6333#include <fcntl.h>
6334#include <sys/mman.h>
6335
6336/* This mess was copied from the GNU getpagesize.h. */
6337#ifndef HAVE_GETPAGESIZE
c41b7eb1
JB
6338# ifdef HAVE_UNISTD_H
6339# include <unistd.h>
6340# endif
c906108c
SS
6341
6342/* Assume that all systems that can run configure have sys/param.h. */
6343# ifndef HAVE_SYS_PARAM_H
6344# define HAVE_SYS_PARAM_H 1
6345# endif
6346
6347# ifdef _SC_PAGESIZE
6348# define getpagesize() sysconf(_SC_PAGESIZE)
6349# else /* no _SC_PAGESIZE */
6350# ifdef HAVE_SYS_PARAM_H
6351# include <sys/param.h>
6352# ifdef EXEC_PAGESIZE
6353# define getpagesize() EXEC_PAGESIZE
6354# else /* no EXEC_PAGESIZE */
6355# ifdef NBPG
6356# define getpagesize() NBPG * CLSIZE
6357# ifndef CLSIZE
6358# define CLSIZE 1
6359# endif /* no CLSIZE */
6360# else /* no NBPG */
6361# ifdef NBPC
6362# define getpagesize() NBPC
6363# else /* no NBPC */
6364# ifdef PAGESIZE
6365# define getpagesize() PAGESIZE
6366# endif /* PAGESIZE */
6367# endif /* no NBPC */
6368# endif /* no NBPG */
6369# endif /* no EXEC_PAGESIZE */
6370# else /* no HAVE_SYS_PARAM_H */
6371# define getpagesize() 8192 /* punt totally */
6372# endif /* no HAVE_SYS_PARAM_H */
6373# endif /* no _SC_PAGESIZE */
6374
6375#endif /* no HAVE_GETPAGESIZE */
6376
6377#ifdef __cplusplus
6378extern "C" { void *malloc(unsigned); }
6379#else
6380char *malloc();
6381#endif
6382
6383int
6384main()
6385{
6386 char *data, *data2, *data3;
6387 int i, pagesize;
6388 int fd;
6389
6390 pagesize = getpagesize();
6391
6392 /*
6393 * First, make a file with some known garbage in it.
6394 */
6395 data = malloc(pagesize);
6396 if (!data)
6397 exit(1);
6398 for (i = 0; i < pagesize; ++i)
6399 *(data + i) = rand();
6400 umask(0);
6401 fd = creat("conftestmmap", 0600);
6402 if (fd < 0)
6403 exit(1);
6404 if (write(fd, data, pagesize) != pagesize)
6405 exit(1);
6406 close(fd);
6407
6408 /*
6409 * Next, try to mmap the file at a fixed address which
6410 * already has something else allocated at it. If we can,
6411 * also make sure that we see the same garbage.
6412 */
6413 fd = open("conftestmmap", O_RDWR);
6414 if (fd < 0)
6415 exit(1);
6416 data2 = malloc(2 * pagesize);
6417 if (!data2)
6418 exit(1);
6419 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6420 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6421 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6422 exit(1);
6423 for (i = 0; i < pagesize; ++i)
6424 if (*(data + i) != *(data2 + i))
6425 exit(1);
6426
6427 /*
6428 * Finally, make sure that changes to the mapped area
6429 * do not percolate back to the file as seen by read().
6430 * (This is a bug on some variants of i386 svr4.0.)
6431 */
6432 for (i = 0; i < pagesize; ++i)
6433 *(data2 + i) = *(data2 + i) + 1;
6434 data3 = malloc(pagesize);
6435 if (!data3)
6436 exit(1);
6437 if (read(fd, data3, pagesize) != pagesize)
6438 exit(1);
6439 for (i = 0; i < pagesize; ++i)
6440 if (*(data + i) != *(data3 + i))
6441 exit(1);
6442 close(fd);
6443 unlink("conftestmmap");
6444 exit(0);
6445}
6446
6447EOF
9608ab8b 6448if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
c906108c
SS
6449then
6450 ac_cv_func_mmap_fixed_mapped=yes
6451else
6452 echo "configure: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454 rm -fr conftest*
6455 ac_cv_func_mmap_fixed_mapped=no
6456fi
6457rm -fr conftest*
6458fi
6459
6460fi
6461
6462echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6463if test $ac_cv_func_mmap_fixed_mapped = yes; then
6464 cat >> confdefs.h <<\EOF
6465#define HAVE_MMAP 1
6466EOF
6467
6468fi
6469
6470
438013df
AO
6471case ${host_os} in
6472aix*)
6473 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
9608ab8b 6474echo "configure:6475: checking for -bbigtoc option" >&5
438013df
AO
6475if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
6476 echo $ac_n "(cached) $ac_c" 1>&6
6477else
6478
6479 SAVE_LDFLAGS=$LDFLAGS
6480
6481 case $GCC in
6482 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
6483 *) gdb_cv_bigtoc=-bbigtoc ;;
6484 esac
6485
6486 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
6487 cat > conftest.$ac_ext <<EOF
9608ab8b 6488#line 6489 "configure"
438013df
AO
6489#include "confdefs.h"
6490
6491int main() {
6492int i;
6493; return 0; }
6494EOF
9608ab8b 6495if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
438013df
AO
6496 :
6497else
6498 echo "configure: failed program was:" >&5
6499 cat conftest.$ac_ext >&5
6500 rm -rf conftest*
6501 gdb_cv_bigtoc=
6502fi
6503rm -f conftest*
6504
6505fi
6506
6507echo "$ac_t""$gdb_cv_bigtoc" 1>&6
6508 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
6509 ;;
6510esac
6511
c906108c
SS
6512
6513
6514if test ${build} = ${host} -a ${host} = ${target} ; then
6515 case ${host_os} in
6516 hpux*)
6517 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
9608ab8b 6518echo "configure:6519: checking for HPUX/OSF thread support" >&5
c906108c
SS
6519 if test -f /usr/include/dce/cma_config.h ; then
6520 if test "$GCC" = "yes" ; then
6521 echo "$ac_t""yes" 1>&6
6522 cat >> confdefs.h <<\EOF
6523#define HAVE_HPUX_THREAD_SUPPORT 1
6524EOF
6525
66b965bb 6526 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
c906108c
SS
6527 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6528 else
6529 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6530 fi
6531 else
6532 echo "$ac_t""no" 1>&6
6533 fi
6534 ;;
6535 solaris*)
d92419e5
JB
6536 # See if thread_db library is around for Solaris thread debugging.
6537 # Note that we must explicitly test for version 1 of the library
6538 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
6539 # the same API.
c906108c 6540 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
9608ab8b 6541echo "configure:6542: checking for Solaris thread debugging library" >&5
c906108c
SS
6542 if test -f /usr/lib/libthread_db.so.1 ; then
6543 echo "$ac_t""yes" 1>&6
6544 cat >> confdefs.h <<\EOF
6545#define HAVE_THREAD_DB_LIB 1
6546EOF
6547
66b965bb 6548 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
c906108c
SS
6549 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6550 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9608ab8b 6551echo "configure:6552: checking for dlopen in -ldl" >&5
c906108c
SS
6552ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6553if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6554 echo $ac_n "(cached) $ac_c" 1>&6
6555else
6556 ac_save_LIBS="$LIBS"
6557LIBS="-ldl $LIBS"
6558cat > conftest.$ac_ext <<EOF
9608ab8b 6559#line 6560 "configure"
c906108c
SS
6560#include "confdefs.h"
6561/* Override any gcc2 internal prototype to avoid an error. */
6562/* We use char because int might match the return type of a gcc2
6563 builtin and then its argument prototype would still apply. */
6564char dlopen();
6565
6566int main() {
6567dlopen()
6568; return 0; }
6569EOF
9608ab8b 6570if { (eval echo configure:6571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6571 rm -rf conftest*
6572 eval "ac_cv_lib_$ac_lib_var=yes"
6573else
6574 echo "configure: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 rm -rf conftest*
6577 eval "ac_cv_lib_$ac_lib_var=no"
6578fi
6579rm -f conftest*
6580LIBS="$ac_save_LIBS"
6581
6582fi
6583if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6584 echo "$ac_t""yes" 1>&6
6585 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6586 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6587 cat >> confdefs.h <<EOF
6588#define $ac_tr_lib 1
6589EOF
6590
6591 LIBS="-ldl $LIBS"
6592
6593else
6594 echo "$ac_t""no" 1>&6
6595fi
6596
6597 if test "$GCC" = "yes" ; then
6598 # The GNU linker requires the -export-dynamic option to make
6599 # all symbols visible in the dynamic symbol table.
6600 hold_ldflags=$LDFLAGS
6601 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
9608ab8b 6602echo "configure:6603: checking for the ld -export-dynamic flag" >&5
c906108c
SS
6603 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6604 cat > conftest.$ac_ext <<EOF
9608ab8b 6605#line 6606 "configure"
c906108c
SS
6606#include "confdefs.h"
6607
6608int main() {
6609int i;
6610; return 0; }
6611EOF
9608ab8b 6612if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
6613 rm -rf conftest*
6614 found=yes
6615else
6616 echo "configure: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 rm -rf conftest*
6619 found=no
6620fi
6621rm -f conftest*
6622 LDFLAGS=$hold_ldflags
6623 echo "$ac_t""$found" 1>&6
6624 if test $found = yes; then
6625 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6626 fi
6627 fi
6628 # Sun randomly tweaked the prototypes in <proc_service.h>
6629 # at one point.
6630 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9608ab8b 6631echo "configure:6632: checking if <proc_service.h> is old" >&5
c906108c
SS
6632 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6633 echo $ac_n "(cached) $ac_c" 1>&6
6634else
6635
6636 cat > conftest.$ac_ext <<EOF
9608ab8b 6637#line 6638 "configure"
c906108c
SS
6638#include "confdefs.h"
6639
6640 #include <proc_service.h>
6641 ps_err_e ps_pdwrite
6642 (struct ps_prochandle*, psaddr_t, const void*, size_t);
6643
6644int main() {
6645
6646; return 0; }
6647EOF
9608ab8b 6648if { (eval echo configure:6649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
6649 rm -rf conftest*
6650 gdb_cv_proc_service_is_old=no
6651else
6652 echo "configure: failed program was:" >&5
6653 cat conftest.$ac_ext >&5
6654 rm -rf conftest*
6655 gdb_cv_proc_service_is_old=yes
6656fi
6657rm -f conftest*
6658
6659fi
6660
6661 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6662 if test $gdb_cv_proc_service_is_old = yes; then
6663 cat >> confdefs.h <<\EOF
6664#define PROC_SERVICE_IS_OLD 1
6665EOF
6666
6667 fi
6668 else
6669 echo "$ac_t""no" 1>&6
6670 fi
6671 ;;
d92419e5
JB
6672 aix*)
6673 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9608ab8b 6674echo "configure:6675: checking for AiX thread debugging library" >&5
d92419e5
JB
6675 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
6676 echo $ac_n "(cached) $ac_c" 1>&6
6677else
6678 cat > conftest.$ac_ext <<EOF
9608ab8b 6679#line 6680 "configure"
d92419e5
JB
6680#include "confdefs.h"
6681#include <sys/pthdebug.h>
6682int main() {
6683#ifndef PTHDB_VERSION_3
6684 #error
6685 #endif
6686; return 0; }
6687EOF
9608ab8b 6688if { (eval echo configure:6689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
d92419e5
JB
6689 rm -rf conftest*
6690 gdb_cv_have_aix_thread_debug=yes
6691else
6692 echo "configure: failed program was:" >&5
6693 cat conftest.$ac_ext >&5
6694 rm -rf conftest*
6695 gdb_cv_have_aix_thread_debug=no
6696fi
6697rm -f conftest*
6698fi
6699
6700 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
6701 if test $gdb_cv_have_aix_thread_debug = yes; then
6702 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
6703 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
6704 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
6705 fi
6706 ;;
c906108c
SS
6707 esac
6708
6709fi
6710
3f47be5c
EZ
6711if test "x$ac_cv_header_thread_db_h" = "xyes"; then
6712 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9608ab8b 6713echo "configure:6714: checking whether <thread_db.h> has TD_NOTALLOC" >&5
3f47be5c
EZ
6714if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
6715 echo $ac_n "(cached) $ac_c" 1>&6
6716else
6717 cat > conftest.$ac_ext <<EOF
9608ab8b 6718#line 6719 "configure"
3f47be5c
EZ
6719#include "confdefs.h"
6720#include <thread_db.h>
6721int main() {
6722int i = TD_NOTALLOC;
6723; return 0; }
6724EOF
9608ab8b 6725if { (eval echo configure:6726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f47be5c
EZ
6726 rm -rf conftest*
6727 gdb_cv_thread_db_h_has_td_notalloc=yes
6728else
6729 echo "configure: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 rm -rf conftest*
6732 gdb_cv_thread_db_h_has_td_notalloc=no
6733
6734fi
6735rm -f conftest*
6736
6737fi
6738
6739echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
6740fi
6741if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
6742 cat >> confdefs.h <<\EOF
6743#define THREAD_DB_HAS_TD_NOTALLOC 1
6744EOF
6745
6746fi
6747
eb784848
DJ
6748if test $host = $target; then
6749 case $target in
6750 *-linux*)
6751 save_CFLAGS=$CFLAGS
6752 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
6753 cat > conftest.$ac_ext <<EOF
9608ab8b 6754#line 6755 "configure"
eb784848
DJ
6755#include "confdefs.h"
6756#include <unistd.h>
6757int main() {
6758pread64 (0, NULL, 0, 0);
6759; return 0; }
6760EOF
9608ab8b 6761if { (eval echo configure:6762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
eb784848
DJ
6762 rm -rf conftest*
6763 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
6764 cat >> confdefs.h <<\EOF
6765#define HAVE_PREAD64 1
6766EOF
6767
6768else
6769 echo "configure: failed program was:" >&5
6770 cat conftest.$ac_ext >&5
6771fi
6772rm -f conftest*
6773 CFLAGS=$save_CFLAGS
6774 ;;
6775 esac
6776fi
6777
fb40c209 6778
d318976c
FN
6779# Check whether --enable-gdbcli or --disable-gdbcli was given.
6780if test "${enable_gdbcli+set}" = set; then
6781 enableval="$enable_gdbcli"
6782
6bad8db2
FN
6783 case "${enableval}" in
6784 yes) enable_gdbcli=yes ;;
6785 "") enable_gdbcli=yes ;;
d318976c
FN
6786 no)
6787 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6788 ;;
6789 *)
6bad8db2 6790 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
d318976c
FN
6791 ;;
6792 esac
6793
6794else
6795 enable_gdbcli=yes
6796fi
6797
6798case ${enable_gdbcli} in
6799 "yes" )
6bad8db2 6800 if test -d "${srcdir}/cli" ; then
d318976c
FN
6801 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6802 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
486697a0 6803 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
d318976c
FN
6804 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6805 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6806 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6807 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6808 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6809 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6810 fi
6811 ;;
6812esac
6813
6814
fb40c209
AC
6815# Check whether --enable-gdbmi or --disable-gdbmi was given.
6816if test "${enable_gdbmi+set}" = set; then
6817 enableval="$enable_gdbmi"
6818
6819 case "${enable_gdbmi}" in
6820 yes | no) ;;
6821 "") enable_gdbmi=yes ;;
6822 *)
6823 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6824 ;;
6825 esac
6826
b0e2e90a
AC
6827else
6828 enable_gdbmi=yes
fb40c209
AC
6829fi
6830
6831case ${enable_gdbmi} in
6832 "yes" )
6833 if test -d "${srcdir}/mi" ; then
6834 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6835 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
486697a0 6836 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
fb40c209 6837 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
b0b1b869 6838 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
b3a90332
AC
6839 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6840 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
e56ac5c3
AC
6841 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6842 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
fb40c209
AC
6843 fi
6844 ;;
6845esac
c906108c 6846
b4df4f68
FN
6847# Configure UI_OUT by default (before 5.2 it can be disabled)
6848# It must be configured if gdbmi is configured
6849
6850UIOUT_CFLAGS=
6851
6852
6853# Check whether --with-uiout or --without-uiout was given.
6854if test "${with_uiout+set}" = set; then
6855 withval="$with_uiout"
6856 case "${withval}" in
6857 yes) want_uiout=true ;;
6858 no) if test $enable_gdbmi = yes; then
6859 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6860 else
6861 want_uiout=false
6862 fi ;;
6863 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6864esac
6865else
6866 want_uiout=true
6867fi
6868
6869if test $want_uiout = true; then
6870 UIOUT_CFLAGS="-DUI_OUT=1"
6871fi
6872
c906108c
SS
6873# Check whether --enable-tui or --disable-tui was given.
6874if test "${enable_tui+set}" = set; then
6875 enableval="$enable_tui"
6876
6877 case "${enable_tui}" in
6878 yes | no) ;;
6879 "") enable_tui=yes ;;
6880 *)
6881 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6882 ;;
6883 esac
6884
6885fi
6886
6887case ${enable_tui} in
6888 "yes" )
ed952ac5
AC
6889 if test -d "${srcdir}/tui" ; then
6890 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6891 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
486697a0 6892 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
ed952ac5
AC
6893 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6894 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6895 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6896 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6897 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6898 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6899 fi
6900 ;;
c906108c
SS
6901esac
6902
c906108c
SS
6903# Check whether --enable-netrom or --disable-netrom was given.
6904if test "${enable_netrom+set}" = set; then
6905 enableval="$enable_netrom"
6906 case "${enableval}" in
6907yes) enable_netrom=yes ;;
6908no) enable_netrom=no ;;
6909*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
6910esac
6911fi
6912
6913
6914if test "${enable_netrom}" = "yes"; then
66b965bb 6915 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
c906108c
SS
6916 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
6917fi
6918
1decb323 6919
3b851bce
AC
6920# NOTE: Don't add -Wall or -Wunused, they both include
6921# -Wunused-parameter which reports bogus warnings.
6922# NOTE: If you add to this list, remember to update
6923# gdb/doc/gdbint.texinfo.
1decb323 6924build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
93d56215 6925-Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
d8038014
AC
6926# Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
6927# -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
93d56215 6928# -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
d8038014
AC
6929# -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
6930# -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
6931# -Woverloaded-virtual -Winline -Werror"
c906108c
SS
6932# Check whether --enable-build-warnings or --disable-build-warnings was given.
6933if test "${enable_build_warnings+set}" = set; then
6934 enableval="$enable_build_warnings"
1decb323 6935 case "${enableval}" in
c906108c
SS
6936 yes) ;;
6937 no) build_warnings="-w";;
6938 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6939 build_warnings="${build_warnings} ${t}";;
6940 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6941 build_warnings="${t} ${build_warnings}";;
6942 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6943esac
d4f3574e 6944if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
746a987d 6945 echo "Setting compiler warning flags = $build_warnings" 6>&1
c906108c 6946fi
1decb323 6947fi
3b851bce
AC
6948# Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
6949if test "${enable_gdb_build_warnings+set}" = set; then
6950 enableval="$enable_gdb_build_warnings"
6951 case "${enableval}" in
6952 yes) ;;
6953 no) build_warnings="-w";;
6954 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6955 build_warnings="${build_warnings} ${t}";;
6956 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6957 build_warnings="${t} ${build_warnings}";;
6958 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6959esac
6960if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6961 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
6962fi
6963fi
104c1213
JM
6964WARN_CFLAGS=""
6965WERROR_CFLAGS=""
c906108c
SS
6966if test "x${build_warnings}" != x -a "x$GCC" = xyes
6967then
746a987d 6968 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9608ab8b 6969echo "configure:6970: checking compiler warning flags" >&5
746a987d
AC
6970 # Separate out the -Werror flag as some files just cannot be
6971 # compiled with it enabled.
6972 for w in ${build_warnings}; do
6973 case $w in
6974 -Werr*) WERROR_CFLAGS=-Werror ;;
6975 *) # Check that GCC accepts it
4536bbc6
AC
6976 saved_CFLAGS="$CFLAGS"
6977 CFLAGS="$CFLAGS $w"
6978 cat > conftest.$ac_ext <<EOF
9608ab8b 6979#line 6980 "configure"
4536bbc6
AC
6980#include "confdefs.h"
6981
6982int main() {
6983
6984; return 0; }
6985EOF
9608ab8b 6986if { (eval echo configure:6987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4536bbc6
AC
6987 rm -rf conftest*
6988 WARN_CFLAGS="${WARN_CFLAGS} $w"
6989else
6990 echo "configure: failed program was:" >&5
6991 cat conftest.$ac_ext >&5
6992fi
6993rm -f conftest*
6994 CFLAGS="$saved_CFLAGS"
746a987d
AC
6995 esac
6996 done
6997 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
c906108c
SS
6998fi
6999
7000
104c1213 7001
c906108c
SS
7002MMALLOC_CFLAGS=
7003MMALLOC=
7004
7005
7006
7007# Check whether --with-mmalloc or --without-mmalloc was given.
7008if test "${with_mmalloc+set}" = set; then
7009 withval="$with_mmalloc"
7010 case "${withval}" in
7011 yes) want_mmalloc=true ;;
7012 no) want_mmalloc=false;;
7013 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
7014esac
7015else
7016 want_mmalloc=false
7017fi
7018
7019if test x$want_mmalloc = xtrue; then
7020 cat >> confdefs.h <<\EOF
7021#define USE_MMALLOC 1
7022EOF
7023
7024 cat >> confdefs.h <<\EOF
7025#define MMCHECK_FORCE 1
7026EOF
7027
7028 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
7029 MMALLOC='../mmalloc/libmmalloc.a'
7030fi
7031
88987551
L
7032# Check whether --with-included-regex or --without-included-regex was given.
7033if test "${with_included_regex+set}" = set; then
7034 withval="$with_included_regex"
7035 case "${withval}" in
7036 yes) want_included_regex=true ;;
7037 no) want_included_regex=false;;
7038 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
7039esac
7040else
7041 want_included_regex=true
7042fi
7043
88987551
L
7044if test $want_included_regex = false; then
7045 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
9608ab8b 7046echo "configure:7047: checking for GNU regex" >&5
88987551
L
7047 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7048 echo $ac_n "(cached) $ac_c" 1>&6
7049else
7050 cat > conftest.$ac_ext <<EOF
9608ab8b 7051#line 7052 "configure"
88987551
L
7052#include "confdefs.h"
7053#include <gnu-versions.h>
7054#include <sys/types.h>
7055#include <regex.h>
7056int main() {
7057#if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
7058#error No valid GNU regex.
7059#endif
7060
7061; return 0; }
7062EOF
9608ab8b 7063if { (eval echo configure:7064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
88987551
L
7064 rm -rf conftest*
7065 gdb_cv_have_gnu_regex=yes
7066else
7067 echo "configure: failed program was:" >&5
7068 cat conftest.$ac_ext >&5
7069 rm -rf conftest*
7070 gdb_cv_have_gnu_regex=no
7071fi
7072rm -f conftest*
7073fi
7074
7075 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
e48f66e4
AC
7076 if test $gdb_cv_have_gnu_regex = no; then
7077 want_included_regex=true
88987551
L
7078 fi
7079fi
7080
e48f66e4
AC
7081if test x${want_included_regex} = xtrue; then
7082 REGEX="gnu-regex.o"
7083 cat >> confdefs.h <<\EOF
7084#define USE_INCLUDED_REGEX 1
7085EOF
7086
7087fi
88987551 7088
7a292a7a
SS
7089
7090# In the Cygwin environment, we need some additional flags.
7091echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9608ab8b 7092echo "configure:7093: checking for cygwin" >&5
7a292a7a
SS
7093if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
7094 echo $ac_n "(cached) $ac_c" 1>&6
7095else
7096 cat > conftest.$ac_ext <<EOF
9608ab8b 7097#line 7098 "configure"
7a292a7a
SS
7098#include "confdefs.h"
7099
7100#if defined (__CYGWIN__) || defined (__CYGWIN32__)
7101lose
7102#endif
7103EOF
7104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7105 egrep "lose" >/dev/null 2>&1; then
7106 rm -rf conftest*
7107 gdb_cv_os_cygwin=yes
7108else
7109 rm -rf conftest*
7110 gdb_cv_os_cygwin=no
7111fi
7112rm -f conftest*
7113
7114fi
7115
7116echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
7117
aff38e61
AC
7118
7119SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
7120case ${host} in
95cbc983
AC
7121 *go32* ) SER_HARDWIRE=ser-go32.o ;;
7122 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
aff38e61
AC
7123esac
7124
7125
7126
b83266a0
SS
7127if test x$gdb_host = xgo32; then
7128 TERM_LIB=
7129else
c906108c
SS
7130if test x$gdb_cv_os_cygwin = xyes; then
7131 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
7132else
7133 TERM_LIB=
7134 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
9608ab8b 7135echo "configure:7136: checking for tgetent in -lncurses" >&5
c906108c
SS
7136ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
7137if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7138 echo $ac_n "(cached) $ac_c" 1>&6
7139else
7140 ac_save_LIBS="$LIBS"
7141LIBS="-lncurses $LIBS"
7142cat > conftest.$ac_ext <<EOF
9608ab8b 7143#line 7144 "configure"
c906108c
SS
7144#include "confdefs.h"
7145/* Override any gcc2 internal prototype to avoid an error. */
7146/* We use char because int might match the return type of a gcc2
7147 builtin and then its argument prototype would still apply. */
7148char tgetent();
7149
7150int main() {
7151tgetent()
7152; return 0; }
7153EOF
9608ab8b 7154if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7155 rm -rf conftest*
7156 eval "ac_cv_lib_$ac_lib_var=yes"
7157else
7158 echo "configure: failed program was:" >&5
7159 cat conftest.$ac_ext >&5
7160 rm -rf conftest*
7161 eval "ac_cv_lib_$ac_lib_var=no"
7162fi
7163rm -f conftest*
7164LIBS="$ac_save_LIBS"
7165
7166fi
7167if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7168 echo "$ac_t""yes" 1>&6
7169 TERM_LIB=-lncurses
7170else
7171 echo "$ac_t""no" 1>&6
7172echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
9608ab8b 7173echo "configure:7174: checking for tgetent in -lHcurses" >&5
c906108c
SS
7174ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
7175if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7176 echo $ac_n "(cached) $ac_c" 1>&6
7177else
7178 ac_save_LIBS="$LIBS"
7179LIBS="-lHcurses $LIBS"
7180cat > conftest.$ac_ext <<EOF
9608ab8b 7181#line 7182 "configure"
c906108c
SS
7182#include "confdefs.h"
7183/* Override any gcc2 internal prototype to avoid an error. */
7184/* We use char because int might match the return type of a gcc2
7185 builtin and then its argument prototype would still apply. */
7186char tgetent();
7187
7188int main() {
7189tgetent()
7190; return 0; }
7191EOF
9608ab8b 7192if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7193 rm -rf conftest*
7194 eval "ac_cv_lib_$ac_lib_var=yes"
7195else
7196 echo "configure: failed program was:" >&5
7197 cat conftest.$ac_ext >&5
7198 rm -rf conftest*
7199 eval "ac_cv_lib_$ac_lib_var=no"
7200fi
7201rm -f conftest*
7202LIBS="$ac_save_LIBS"
7203
7204fi
7205if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7206 echo "$ac_t""yes" 1>&6
7207 TERM_LIB=-lHcurses
7208else
7209 echo "$ac_t""no" 1>&6
7210echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
9608ab8b 7211echo "configure:7212: checking for tgetent in -ltermlib" >&5
c906108c
SS
7212ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
7213if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7214 echo $ac_n "(cached) $ac_c" 1>&6
7215else
7216 ac_save_LIBS="$LIBS"
7217LIBS="-ltermlib $LIBS"
7218cat > conftest.$ac_ext <<EOF
9608ab8b 7219#line 7220 "configure"
c906108c
SS
7220#include "confdefs.h"
7221/* Override any gcc2 internal prototype to avoid an error. */
7222/* We use char because int might match the return type of a gcc2
7223 builtin and then its argument prototype would still apply. */
7224char tgetent();
7225
7226int main() {
7227tgetent()
7228; return 0; }
7229EOF
9608ab8b 7230if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7231 rm -rf conftest*
7232 eval "ac_cv_lib_$ac_lib_var=yes"
7233else
7234 echo "configure: failed program was:" >&5
7235 cat conftest.$ac_ext >&5
7236 rm -rf conftest*
7237 eval "ac_cv_lib_$ac_lib_var=no"
7238fi
7239rm -f conftest*
7240LIBS="$ac_save_LIBS"
7241
7242fi
7243if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7244 echo "$ac_t""yes" 1>&6
7245 TERM_LIB=-ltermlib
7246else
7247 echo "$ac_t""no" 1>&6
7248echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
9608ab8b 7249echo "configure:7250: checking for tgetent in -ltermcap" >&5
c906108c
SS
7250ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
7251if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7252 echo $ac_n "(cached) $ac_c" 1>&6
7253else
7254 ac_save_LIBS="$LIBS"
7255LIBS="-ltermcap $LIBS"
7256cat > conftest.$ac_ext <<EOF
9608ab8b 7257#line 7258 "configure"
c906108c
SS
7258#include "confdefs.h"
7259/* Override any gcc2 internal prototype to avoid an error. */
7260/* We use char because int might match the return type of a gcc2
7261 builtin and then its argument prototype would still apply. */
7262char tgetent();
7263
7264int main() {
7265tgetent()
7266; return 0; }
7267EOF
9608ab8b 7268if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7269 rm -rf conftest*
7270 eval "ac_cv_lib_$ac_lib_var=yes"
7271else
7272 echo "configure: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 rm -rf conftest*
7275 eval "ac_cv_lib_$ac_lib_var=no"
7276fi
7277rm -f conftest*
7278LIBS="$ac_save_LIBS"
7279
7280fi
7281if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7282 echo "$ac_t""yes" 1>&6
7283 TERM_LIB=-ltermcap
7284else
7285 echo "$ac_t""no" 1>&6
7286echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
9608ab8b 7287echo "configure:7288: checking for tgetent in -lcurses" >&5
c906108c
SS
7288ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
7289if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7290 echo $ac_n "(cached) $ac_c" 1>&6
7291else
7292 ac_save_LIBS="$LIBS"
7293LIBS="-lcurses $LIBS"
7294cat > conftest.$ac_ext <<EOF
9608ab8b 7295#line 7296 "configure"
c906108c
SS
7296#include "confdefs.h"
7297/* Override any gcc2 internal prototype to avoid an error. */
7298/* We use char because int might match the return type of a gcc2
7299 builtin and then its argument prototype would still apply. */
7300char tgetent();
7301
7302int main() {
7303tgetent()
7304; return 0; }
7305EOF
9608ab8b 7306if { (eval echo configure:7307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7307 rm -rf conftest*
7308 eval "ac_cv_lib_$ac_lib_var=yes"
7309else
7310 echo "configure: failed program was:" >&5
7311 cat conftest.$ac_ext >&5
7312 rm -rf conftest*
7313 eval "ac_cv_lib_$ac_lib_var=no"
7314fi
7315rm -f conftest*
7316LIBS="$ac_save_LIBS"
7317
7318fi
7319if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7320 echo "$ac_t""yes" 1>&6
7321 TERM_LIB=-lcurses
7322else
7323 echo "$ac_t""no" 1>&6
7324echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
9608ab8b 7325echo "configure:7326: checking for tgetent in -lterminfo" >&5
c906108c
SS
7326ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
7327if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7328 echo $ac_n "(cached) $ac_c" 1>&6
7329else
7330 ac_save_LIBS="$LIBS"
7331LIBS="-lterminfo $LIBS"
7332cat > conftest.$ac_ext <<EOF
9608ab8b 7333#line 7334 "configure"
c906108c
SS
7334#include "confdefs.h"
7335/* Override any gcc2 internal prototype to avoid an error. */
7336/* We use char because int might match the return type of a gcc2
7337 builtin and then its argument prototype would still apply. */
7338char tgetent();
7339
7340int main() {
7341tgetent()
7342; return 0; }
7343EOF
9608ab8b 7344if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
7345 rm -rf conftest*
7346 eval "ac_cv_lib_$ac_lib_var=yes"
7347else
7348 echo "configure: failed program was:" >&5
7349 cat conftest.$ac_ext >&5
7350 rm -rf conftest*
7351 eval "ac_cv_lib_$ac_lib_var=no"
7352fi
7353rm -f conftest*
7354LIBS="$ac_save_LIBS"
7355
7356fi
7357if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7358 echo "$ac_t""yes" 1>&6
7359 TERM_LIB=-lterminfo
7360else
7361 echo "$ac_t""no" 1>&6
7362fi
7363
7364fi
7365
7366fi
7367
7368fi
7369
7370fi
7371
7372fi
7373
7374
7375 if test "x$TERM_LIB" = x
7376 then
7377 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
7378 fi
7379fi
b83266a0 7380fi
c906108c
SS
7381
7382
cd0fc7c3
SS
7383# libreadline needs libuser32.a in a cygwin environment
7384WIN32LIBS=
7385if test x$gdb_cv_os_cygwin = xyes; then
c5394b80
JM
7386 WIN32LIBS="-luser32"
7387 case "${target}" in
7388 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
7389 ;;
7390 esac
cd0fc7c3 7391fi
c906108c 7392
7a292a7a 7393
3fc11d3e
JM
7394LIBGUI="../libgui/src/libgui.a"
7395GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
7396
7397
7a292a7a 7398
8b93c638
JM
7399# Check whether --with-cpu or --without-cpu was given.
7400if test "${with_cpu+set}" = set; then
7401 withval="$with_cpu"
7402 case "${target}" in
7403 powerpc-* | powerpcle-* )
7404 ## It would be nice to keep this table in sync with the one in
7405 ## gcc/configure.
7406 case "${with_cpu}" in
7407 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
7408 | 604 | 750 )
7409 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
7410 ;;
7411 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
7412 ## These are all RS6000 variants, as far as GDB is concerned.
7413 with_cpu=rs6000
7414 ;;
7415 603e | ec603e )
7416 with_cpu=603
7417 ;;
7418 604e )
7419 with_cpu=604
7420 ;;
7421 * )
7422 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
7423 with_cpu=ppc-uisa
7424 ;;
7425 esac
7426 ;;
7427 * )
7428 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
7429 ;;
7430esac
7431cat >> confdefs.h <<EOF
7432#define TARGET_CPU_DEFAULT "${with_cpu}"
7433EOF
7434
7435
7436fi
7437
7438
7439
3fc11d3e
JM
7440# Check whether --enable-gdbtk or --disable-gdbtk was given.
7441if test "${enable_gdbtk+set}" = set; then
7442 enableval="$enable_gdbtk"
7443 case "${enableval}" in
7444 yes)
7445 case "$host" in
7446 *go32*)
7447 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7448 enable_gdbtk=no ;;
7449 *windows*)
7450 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7451 enable_gdbtk=no ;;
7452 *)
7453 enable_gdbtk=yes ;;
7454 esac ;;
7455 no)
7456 enable_gdbtk=no ;;
7457 *)
7458 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7459esac
7460else
7461
7462# Default is on for everything but go32 and Cygwin
7463case "$host" in
7464 *go32* | *windows*)
7465 ;;
7466 *)
379d6434
AC
7467 if test -d "${srcdir}/gdbtk" ; then
7468 enable_gdbtk=yes
7469 fi
7470 ;;
7471esac
3fc11d3e
JM
7472
7473fi
7474
7475
7476WIN32LDAPP=
7477
7478
7479
7480configdir="unix"
7481
7482GDBTKLIBS=
7483if test "${enable_gdbtk}" = "yes"; then
7484
d1c3b63a
KS
7485 # Gdbtk must have an absolute path to srcdir in order to run
7486 # properly when not installed.
7487 here=`pwd`
7488 cd ${srcdir}
7489 GDBTK_SRC_DIR=`pwd`
7490 cd $here
7491
3fc11d3e
JM
7492
7493#
7494# Ok, lets find the tcl configuration
7495# First, look for one uninstalled.
7496# the alternative search directory is invoked by --with-tclconfig
7497#
7498
7499if test x"${no_tcl}" = x ; then
7500 # we reset no_tcl in case something fails here
7501 no_tcl=true
7502 # Check whether --with-tclconfig or --without-tclconfig was given.
7503if test "${with_tclconfig+set}" = set; then
7504 withval="$with_tclconfig"
7505 with_tclconfig=${withval}
7506fi
7507
7508 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9608ab8b 7509echo "configure:7510: checking for Tcl configuration" >&5
3fc11d3e
JM
7510 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7511 echo $ac_n "(cached) $ac_c" 1>&6
7512else
7513
7514
7515 # First check to see if --with-tclconfig was specified.
7516 if test x"${with_tclconfig}" != x ; then
7517 if test -f "${with_tclconfig}/tclConfig.sh" ; then
7518 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7519 else
7520 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7521 fi
7522 fi
7523
7524 # then check for a private Tcl installation
7525 if test x"${ac_cv_c_tclconfig}" = x ; then
7526 for i in \
7527 ../tcl \
7528 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7529 ../../tcl \
7530 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7531 ../../../tcl \
7532 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7533 if test -f "$i/${configdir}/tclConfig.sh" ; then
7534 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7535 break
7536 fi
7537 done
7538 fi
7539 # check in a few common install locations
7540 if test x"${ac_cv_c_tclconfig}" = x ; then
7541 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7542 if test -f "$i/tclConfig.sh" ; then
7543 ac_cv_c_tclconfig=`(cd $i; pwd)`
7544 break
7545 fi
7546 done
7547 fi
7548 # check in a few other private locations
7549 if test x"${ac_cv_c_tclconfig}" = x ; then
7550 for i in \
7551 ${srcdir}/../tcl \
7552 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7553 if test -f "$i/${configdir}/tclConfig.sh" ; then
7554 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7555 break
7556 fi
7557 done
7558 fi
7559
7560fi
7561
7562 if test x"${ac_cv_c_tclconfig}" = x ; then
7563 TCLCONFIG="# no Tcl configs found"
7564 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7565 else
7566 no_tcl=
7567 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7568 echo "$ac_t""found $TCLCONFIG" 1>&6
7569 fi
7570fi
7571
7572 if test -z "${no_tcl}"; then
7573
7574 . $TCLCONFIG
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601#
7602# Ok, lets find the tk configuration
7603# First, look for one uninstalled.
7604# the alternative search directory is invoked by --with-tkconfig
7605#
7606
7607if test x"${no_tk}" = x ; then
7608 # we reset no_tk in case something fails here
7609 no_tk=true
7610 # Check whether --with-tkconfig or --without-tkconfig was given.
7611if test "${with_tkconfig+set}" = set; then
7612 withval="$with_tkconfig"
7613 with_tkconfig=${withval}
7614fi
7615
7616 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9608ab8b 7617echo "configure:7618: checking for Tk configuration" >&5
3fc11d3e
JM
7618 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7619 echo $ac_n "(cached) $ac_c" 1>&6
7620else
7621
7622
7623 # First check to see if --with-tkconfig was specified.
7624 if test x"${with_tkconfig}" != x ; then
7625 if test -f "${with_tkconfig}/tkConfig.sh" ; then
7626 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7627 else
7628 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7629 fi
7630 fi
7631
7632 # then check for a private Tk library
7633 if test x"${ac_cv_c_tkconfig}" = x ; then
7634 for i in \
7635 ../tk \
7636 `ls -dr ../tk[4-9]* 2>/dev/null` \
7637 ../../tk \
7638 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7639 ../../../tk \
7640 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7641 if test -f "$i/${configdir}/tkConfig.sh" ; then
7642 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7643 break
7644 fi
7645 done
7646 fi
7647 # check in a few common install locations
7648 if test x"${ac_cv_c_tkconfig}" = x ; then
7649 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7650 if test -f "$i/tkConfig.sh" ; then
7651 ac_cv_c_tkconfig=`(cd $i; pwd)`
7652 break
7653 fi
7654 done
7655 fi
7656 # check in a few other private locations
7657 if test x"${ac_cv_c_tkconfig}" = x ; then
7658 for i in \
7659 ${srcdir}/../tk \
7660 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7661 if test -f "$i/${configdir}/tkConfig.sh" ; then
7662 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7663 break
7664 fi
7665 done
7666 fi
7667
7668fi
7669
7670 if test x"${ac_cv_c_tkconfig}" = x ; then
7671 TKCONFIG="# no Tk configs found"
7672 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7673 else
7674 no_tk=
7675 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7676 echo "$ac_t""found $TKCONFIG" 1>&6
7677 fi
7678fi
7679
7680
7681
dd2504ab
JM
7682 # now look for Tcl library stuff
7683
7684 case "${host}" in
7685 *-*-cygwin*)
7686 tcldir=../tcl/win/
7687 ;;
7688 *)
7689 tcldir=../tcl/unix/
7690 ;;
7691 esac
7692
7693 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7694
3fc11d3e
JM
7695 # If $no_tk is nonempty, then we can't do Tk, and there is no
7696 # point to doing Tcl.
7697 if test -z "${no_tk}"; then
7698
7699 if test -f "$TKCONFIG" ; then
7700 . $TKCONFIG
7701 fi
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716#
7717# Ok, lets find the tcl source trees so we can use the headers
7718# Warning: transition of version 9 to 10 will break this algorithm
7719# because 10 sorts before 9. We also look for just tcl. We have to
7720# be careful that we don't match stuff like tclX by accident.
7721# the alternative search directory is involked by --with-tclinclude
7722#
7723
7724no_tcl=true
7725echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9608ab8b 7726echo "configure:7727: checking for Tcl private headers. dir=${configdir}" >&5
3fc11d3e
JM
7727# Check whether --with-tclinclude or --without-tclinclude was given.
7728if test "${with_tclinclude+set}" = set; then
7729 withval="$with_tclinclude"
7730 with_tclinclude=${withval}
7731fi
7732
7733if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7734 echo $ac_n "(cached) $ac_c" 1>&6
7735else
7736
7737# first check to see if --with-tclinclude was specified
7738if test x"${with_tclinclude}" != x ; then
7739 if test -f ${with_tclinclude}/tclInt.h ; then
7740 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7741 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7742 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7743 else
7744 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7745 fi
7746fi
7747
7748# next check if it came with Tcl configuration file
7749if test x"${ac_cv_c_tclconfig}" = x ; then
7750 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7751 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7752 fi
7753fi
7754
7755# next check in private source directory
7756#
7757# since ls returns lowest version numbers first, reverse its output
7758if test x"${ac_cv_c_tclh}" = x ; then
7759 for i in \
7760 ${srcdir}/../tcl \
7761 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7762 ${srcdir}/../../tcl \
7763 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7764 ${srcdir}/../../../tcl \
7765 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7766 if test -f $i/generic/tclInt.h ; then
7767 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7768 break
7769 fi
7770 done
7771fi
7772# finally check in a few common install locations
7773#
7774# since ls returns lowest version numbers first, reverse its output
7775if test x"${ac_cv_c_tclh}" = x ; then
7776 for i in \
7777 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7778 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7779 /usr/local/src/tcl \
7780 /usr/local/lib/tcl \
7781 ${prefix}/include ; do
7782 if test -f $i/generic/tclInt.h ; then
7783 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7784 break
7785 fi
7786 done
7787fi
7788# see if one is installed
7789if test x"${ac_cv_c_tclh}" = x ; then
7790 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7791echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9608ab8b 7792echo "configure:7793: checking for tclInt.h" >&5
3fc11d3e
JM
7793if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7794 echo $ac_n "(cached) $ac_c" 1>&6
7795else
7796 cat > conftest.$ac_ext <<EOF
9608ab8b 7797#line 7798 "configure"
3fc11d3e
JM
7798#include "confdefs.h"
7799#include <tclInt.h>
7800EOF
7801ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 7802{ (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7803ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7804if test -z "$ac_err"; then
7805 rm -rf conftest*
7806 eval "ac_cv_header_$ac_safe=yes"
7807else
7808 echo "$ac_err" >&5
7809 echo "configure: failed program was:" >&5
7810 cat conftest.$ac_ext >&5
7811 rm -rf conftest*
7812 eval "ac_cv_header_$ac_safe=no"
7813fi
7814rm -f conftest*
7815fi
7816if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7817 echo "$ac_t""yes" 1>&6
7818 ac_cv_c_tclh=installed
7819else
7820 echo "$ac_t""no" 1>&6
7821ac_cv_c_tclh=""
7822fi
7823
7824fi
7825
7826fi
7827
7828if test x"${ac_cv_c_tclh}" = x ; then
7829 TCLHDIR="# no Tcl private headers found"
7830 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7831fi
7832if test x"${ac_cv_c_tclh}" != x ; then
7833 no_tcl=""
7834 if test x"${ac_cv_c_tclh}" = x"installed" ; then
7835 echo "$ac_t""is installed" 1>&6
7836 TCLHDIR=""
7837 else
7838 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7839 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7840 TCLHDIR="-I${ac_cv_c_tclh}"
7841 fi
7842fi
7843
7844
7845
7846
7847#
7848# Ok, lets find the tk source trees so we can use the headers
7849# If the directory (presumably symlink) named "tk" exists, use that one
7850# in preference to any others. Same logic is used when choosing library
7851# and again with Tcl. The search order is the best place to look first, then in
7852# decreasing significance. The loop breaks if the trigger file is found.
7853# Note the gross little conversion here of srcdir by cd'ing to the found
7854# directory. This converts the path from a relative to an absolute, so
7855# recursive cache variables for the path will work right. We check all
7856# the possible paths in one loop rather than many seperate loops to speed
7857# things up.
7858# the alternative search directory is involked by --with-tkinclude
7859#
7860no_tk=true
7861echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9608ab8b 7862echo "configure:7863: checking for Tk private headers" >&5
3fc11d3e
JM
7863# Check whether --with-tkinclude or --without-tkinclude was given.
7864if test "${with_tkinclude+set}" = set; then
7865 withval="$with_tkinclude"
7866 with_tkinclude=${withval}
7867fi
7868
7869if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7870 echo $ac_n "(cached) $ac_c" 1>&6
7871else
7872
7873# first check to see if --with-tkinclude was specified
7874if test x"${with_tkinclude}" != x ; then
7875 if test -f ${with_tkinclude}/tk.h ; then
7876 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7877 elif test -f ${with_tkinclude}/generic/tk.h ; then
7878 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7879 else
7880 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7881 fi
7882fi
7883
7884# next check if it came with Tk configuration file
7885if test x"${ac_cv_c_tkconfig}" = x ; then
7886 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7887 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7888 fi
7889fi
7890
7891# next check in private source directory
7892#
7893# since ls returns lowest version numbers first, reverse its output
7894if test x"${ac_cv_c_tkh}" = x ; then
7895 for i in \
7896 ${srcdir}/../tk \
7897 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7898 ${srcdir}/../../tk \
7899 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7900 ${srcdir}/../../../tk \
7901 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
7902 if test -f $i/generic/tk.h ; then
7903 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7904 break
7905 fi
7906 done
7907fi
7908# finally check in a few common install locations
7909#
7910# since ls returns lowest version numbers first, reverse its output
7911if test x"${ac_cv_c_tkh}" = x ; then
7912 for i in \
7913 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
7914 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
7915 /usr/local/src/tk \
7916 /usr/local/lib/tk \
7917 ${prefix}/include ; do
7918 if test -f $i/generic/tk.h ; then
7919 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7920 break
7921 fi
7922 done
7923fi
7924# see if one is installed
7925if test x"${ac_cv_c_tkh}" = x ; then
7926 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
7927echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9608ab8b 7928echo "configure:7929: checking for tk.h" >&5
3fc11d3e
JM
7929if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7930 echo $ac_n "(cached) $ac_c" 1>&6
7931else
7932 cat > conftest.$ac_ext <<EOF
9608ab8b 7933#line 7934 "configure"
3fc11d3e
JM
7934#include "confdefs.h"
7935#include <tk.h>
7936EOF
7937ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 7938{ (eval echo configure:7939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3fc11d3e
JM
7939ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7940if test -z "$ac_err"; then
7941 rm -rf conftest*
7942 eval "ac_cv_header_$ac_safe=yes"
7943else
7944 echo "$ac_err" >&5
7945 echo "configure: failed program was:" >&5
7946 cat conftest.$ac_ext >&5
7947 rm -rf conftest*
7948 eval "ac_cv_header_$ac_safe=no"
7949fi
7950rm -f conftest*
7951fi
7952if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7953 echo "$ac_t""yes" 1>&6
7954 ac_cv_c_tkh=installed
7955else
7956 echo "$ac_t""no" 1>&6
7957ac_cv_c_tkh=""
7958fi
7959
7960fi
7961
7962fi
7963
7964if test x"${ac_cv_c_tkh}" != x ; then
7965 no_tk=""
7966 if test x"${ac_cv_c_tkh}" = x"installed" ; then
7967 echo "$ac_t""is installed" 1>&6
7968 TKHDIR=""
7969 else
7970 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
7971 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
7972 TKHDIR="-I${ac_cv_c_tkh}"
7973 fi
7974else
7975 TKHDIR="# no Tk directory found"
7976 echo "configure: warning: Can't find Tk private headers" 1>&2
7977 no_tk=true
7978fi
7979
7980
7981
7982
7983echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9608ab8b 7984echo "configure:7985: checking for Itcl private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
7985if test x"${ac_cv_c_itclh}" = x ; then
7986 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
7987 if test -f $i/generic/itcl.h ; then
7988 ac_cv_c_itclh=`(cd $i/generic; pwd)`
7989 break
7990 fi
7991 done
7992fi
7993if test x"${ac_cv_c_itclh}" = x ; then
7994 ITCLHDIR="# no Itcl private headers found"
7995 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
7996fi
7997if test x"${ac_cv_c_itclh}" != x ; then
7998 ITCLHDIR="-I${ac_cv_c_itclh}"
7999fi
8000# should always be here
8001# ITCLLIB="../itcl/itcl/unix/libitcl.a"
8002
8003#AC_SUBST(ITCLLIB)
8004
8005
8006echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9608ab8b 8007echo "configure:8008: checking for Itk private headers. srcdir=${srcdir}" >&5
3fc11d3e
JM
8008if test x"${ac_cv_c_itkh}" = x ; then
8009 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
8010 if test -f $i/generic/itk.h ; then
8011 ac_cv_c_itkh=`(cd $i/generic; pwd)`
8012 break
8013 fi
8014 done
8015fi
8016if test x"${ac_cv_c_itkh}" = x ; then
8017 ITKHDIR="# no Itk private headers found"
8018 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
8019fi
8020if test x"${ac_cv_c_itkh}" != x ; then
8021 ITKHDIR="-I${ac_cv_c_itkh}"
8022fi
8023# should always be here
8024# ITKLIB="../itcl/itk/unix/libitk.a"
8025
8026#AC_SUBST(ITKLIB)
8027
3fc11d3e 8028
dd2504ab
JM
8029
8030 # now look for Tk library stuff
8031
8032 case "${host}" in
8033 *-*-cygwin*)
8034 tkdir=../tk/win/
8035 ;;
8036 *)
8037 tkdir=../tk/unix/
8038 ;;
8039 esac
8040
8041 TK_DEPS="${tkdir}${TK_LIB_FILE}"
8042
3fc11d3e
JM
8043 # now look for Itcl library stuff
8044
8045
8046#
8047# Ok, lets find the itcl configuration
8048# First, look for one uninstalled.
8049# the alternative search directory is invoked by --with-itclconfig
8050#
8051
8052if test x"${no_itcl}" = x ; then
8053 # we reset no_itcl in case something fails here
8054 no_itcl=true
8055 # Check whether --with-itclconfig or --without-itclconfig was given.
8056if test "${with_itclconfig+set}" = set; then
8057 withval="$with_itclconfig"
8058 with_itclconfig=${withval}
8059fi
8060
8061 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
9608ab8b 8062echo "configure:8063: checking for Itcl configuration" >&5
3fc11d3e
JM
8063 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
8064 echo $ac_n "(cached) $ac_c" 1>&6
8065else
8066
8067
8068 # First check to see if --with-itclconfig was specified.
8069 if test x"${with_itclconfig}" != x ; then
8070 if test -f "${with_itclconfig}/itclConfig.sh" ; then
8071 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
8072 else
8073 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
8074 fi
8075 fi
8076
8077 # then check for a private Itcl library
8078 if test x"${ac_cv_c_itclconfig}" = x ; then
8079 for i in \
8080 ../itcl/itcl \
8081 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
8082 ../../itcl \
8083 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
8084 ../../../itcl \
8085 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
8086 if test -f "$i/itclConfig.sh" ; then
8087 ac_cv_c_itclconfig=`(cd $i; pwd)`
8088 break
8089 fi
8090 done
8091 fi
8092 # check in a few common install locations
8093 if test x"${ac_cv_c_itclconfig}" = x ; then
8094 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8095 if test -f "$i/itclConfig.sh" ; then
8096 ac_cv_c_itclconfig=`(cd $i; pwd)`
8097 break
8098 fi
8099 done
8100 fi
8101 # check in a few other private locations
8102 if test x"${ac_cv_c_itclconfig}" = x ; then
8103 for i in \
8104 ${srcdir}/../itcl/itcl \
8105 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
8106 if test -f "$i/itclConfig.sh" ; then
8107 ac_cv_c_itclconfig=`(cd $i; pwd)`
8108 break
8109 fi
8110 done
8111 fi
8112
8113fi
8114
8115 if test x"${ac_cv_c_itclconfig}" = x ; then
8116 ITCLCONFIG="# no Itcl configs found"
8117 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
8118 else
8119 no_itcl=
8120 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
8121 echo "$ac_t""found $ITCLCONFIG" 1>&6
8122 fi
8123fi
8124
8125 if test -z "${no_itcl}"; then
8126
8127 if test -f "$ITCLCONFIG" ; then
8128 . $ITCLCONFIG
8129 fi
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
3fc11d3e
JM
8140
8141
8142 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
b381d62d 8143 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
3fc11d3e
JM
8144 fi
8145
8146
8147 # now look for Itk library stuff
8148
8149#
8150# Ok, lets find the itk configuration
8151# First, look for one uninstalled.
8152# the alternative search directory is invoked by --with-itkconfig
8153#
8154
8155if test x"${no_itk}" = x ; then
8156 # we reset no_itk in case something fails here
8157 no_itk=true
8158 # Check whether --with-itkconfig or --without-itkconfig was given.
8159if test "${with_itkconfig+set}" = set; then
8160 withval="$with_itkconfig"
8161 with_itkconfig=${withval}
8162fi
8163
8164 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
9608ab8b 8165echo "configure:8166: checking for Itk configuration" >&5
3fc11d3e
JM
8166 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
8167 echo $ac_n "(cached) $ac_c" 1>&6
8168else
8169
8170
8171 # First check to see if --with-itkconfig was specified.
8172 if test x"${with_itkconfig}" != x ; then
8173 if test -f "${with_itkconfig}/itkConfig.sh" ; then
8174 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
8175 else
8176 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
8177 fi
8178 fi
8179
8180 # then check for a private Itk library
8181 if test x"${ac_cv_c_itkconfig}" = x ; then
8182 for i in \
8183 ../itcl/itk \
8184 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
8185 ../../itk \
8186 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
8187 ../../../itk \
8188 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
8189 if test -f "$i/itkConfig.sh" ; then
8190 ac_cv_c_itkconfig=`(cd $i; pwd)`
8191 break
8192 fi
8193 done
8194 fi
8195 # check in a few common install locations
8196 if test x"${ac_cv_c_itkconfig}" = x ; then
8197 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8198 if test -f "$i/itkConfig.sh" ; then
8199 ac_cv_c_itkconfig=`(cd $i; pwd)`
8200 break
8201 fi
8202 done
8203 fi
8204 # check in a few other private locations
8205 if test x"${ac_cv_c_itkconfig}" = x ; then
8206 for i in \
8207 ${srcdir}/../itcl/itk \
8208 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
8209 if test -f "$i/itkConfig.sh" ; then
8210 ac_cv_c_itkconfig=`(cd $i; pwd)`
8211 break
8212 fi
8213 done
8214 fi
8215
8216fi
8217
8218 if test x"${ac_cv_c_itkconfig}" = x ; then
8219 ITKCONFIG="# no Itk configs found"
8220 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
8221 else
8222 no_itk=
8223 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
8224 echo "$ac_t""found $ITKCONFIG" 1>&6
8225 fi
8226fi
8227
8228
8229 if test -z "${no_itcl}"; then
8230
8231 if test -f "$ITKCONFIG" ; then
8232 . $ITKCONFIG
8233 fi
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
3fc11d3e 8246 ITKLIB="${ITK_BUILD_LIB_SPEC}"
b381d62d 8247 ITK_DEPS="${ITK_LIB_FULL_PATH}"
3fc11d3e
JM
8248 fi
8249
4226a5a5 8250 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
3fc11d3e
JM
8251 # Tcl/Tk 8.1 require -fwritable strings. I don't
8252 # know whether 8.2 will or not, but I bet it will.
8253 # I don't have to worry about 7.x since we don't support it.
8254 GDBTK_CFLAGS=""
8255 if test "$GCC" = "yes"; then
8256 if test "$TCL_VERSION" != "8.0" ; then
8257 GDBTK_CFLAGS="-fwritable-strings"
8258 fi
8259 fi
8260
8261 # Include some libraries that Tcl and Tk want.
b2a1bd4f 8262 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3fc11d3e
JM
8263 # Yes, the ordering seems wrong here. But it isn't.
8264 # TK_LIBS is the list of libraries that need to be linked
8265 # after Tcl/Tk. Note that this isn't put into LIBS. If it
8266 # were in LIBS then any link tests after this point would
8267 # try to include things like `$(LIBGUI)', which wouldn't work.
8268 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4226a5a5
FN
8269
8270 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
8271 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
8272 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
8273 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
b3a90332 8274 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
ce844ae2 8275 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
e56ac5c3
AC
8276 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
8277 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
3fc11d3e
JM
8278
8279 if test x$gdb_cv_os_cygwin = xyes; then
8280 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
8281 WIN32LDAPP="-Wl,--subsystem,console"
8282 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
8283 fi
8284 fi
8285 fi
ffc6a242
KS
8286
8287 SUBDIRS="${SUBDIRS} gdbtk"
8288 configdirs="${configdirs} gdbtk"
3fc11d3e
JM
8289fi
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
dd2504ab 8303
c906108c
SS
8304# If we find X, set shell vars x_includes and x_libraries to the
8305# paths, otherwise set no_x=yes.
8306# Uses ac_ vars as temps to allow command line to override cache and checks.
8307# --without-x overrides everything else, but does not touch the cache.
8308echo $ac_n "checking for X""... $ac_c" 1>&6
9608ab8b 8309echo "configure:8310: checking for X" >&5
c906108c
SS
8310
8311# Check whether --with-x or --without-x was given.
8312if test "${with_x+set}" = set; then
8313 withval="$with_x"
8314 :
8315fi
8316
8317# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8318if test "x$with_x" = xno; then
8319 # The user explicitly disabled X.
8320 have_x=disabled
8321else
8322 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8323 # Both variables are already set.
8324 have_x=yes
8325 else
8326if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8327 echo $ac_n "(cached) $ac_c" 1>&6
8328else
8329 # One or both of the vars are not set, and there is no cached value.
8330ac_x_includes=NO ac_x_libraries=NO
8331rm -fr conftestdir
8332if mkdir conftestdir; then
8333 cd conftestdir
8334 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8335 cat > Imakefile <<'EOF'
8336acfindx:
8337 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8338EOF
8339 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8340 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8341 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8342 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8343 for ac_extension in a so sl; do
8344 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8345 test -f $ac_im_libdir/libX11.$ac_extension; then
8346 ac_im_usrlibdir=$ac_im_libdir; break
8347 fi
8348 done
8349 # Screen out bogus values from the imake configuration. They are
8350 # bogus both because they are the default anyway, and because
8351 # using them would break gcc on systems where it needs fixed includes.
8352 case "$ac_im_incroot" in
8353 /usr/include) ;;
8354 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8355 esac
8356 case "$ac_im_usrlibdir" in
8357 /usr/lib | /lib) ;;
8358 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8359 esac
8360 fi
8361 cd ..
8362 rm -fr conftestdir
8363fi
8364
8365if test "$ac_x_includes" = NO; then
8366 # Guess where to find include files, by looking for this one X11 .h file.
8367 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8368
8369 # First, try using that file with no special directory specified.
8370cat > conftest.$ac_ext <<EOF
9608ab8b 8371#line 8372 "configure"
c906108c
SS
8372#include "confdefs.h"
8373#include <$x_direct_test_include>
8374EOF
8375ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9608ab8b 8376{ (eval echo configure:8377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
c906108c
SS
8377ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8378if test -z "$ac_err"; then
8379 rm -rf conftest*
8380 # We can compile using X headers with no special include directory.
8381ac_x_includes=
8382else
8383 echo "$ac_err" >&5
8384 echo "configure: failed program was:" >&5
8385 cat conftest.$ac_ext >&5
8386 rm -rf conftest*
8387 # Look for the header file in a standard set of common directories.
8388# Check X11 before X11Rn because it is often a symlink to the current release.
8389 for ac_dir in \
8390 /usr/X11/include \
8391 /usr/X11R6/include \
8392 /usr/X11R5/include \
8393 /usr/X11R4/include \
8394 \
8395 /usr/include/X11 \
8396 /usr/include/X11R6 \
8397 /usr/include/X11R5 \
8398 /usr/include/X11R4 \
8399 \
8400 /usr/local/X11/include \
8401 /usr/local/X11R6/include \
8402 /usr/local/X11R5/include \
8403 /usr/local/X11R4/include \
8404 \
8405 /usr/local/include/X11 \
8406 /usr/local/include/X11R6 \
8407 /usr/local/include/X11R5 \
8408 /usr/local/include/X11R4 \
8409 \
8410 /usr/X386/include \
8411 /usr/x386/include \
8412 /usr/XFree86/include/X11 \
8413 \
8414 /usr/include \
8415 /usr/local/include \
8416 /usr/unsupported/include \
8417 /usr/athena/include \
8418 /usr/local/x11r5/include \
8419 /usr/lpp/Xamples/include \
8420 \
8421 /usr/openwin/include \
8422 /usr/openwin/share/include \
8423 ; \
8424 do
8425 if test -r "$ac_dir/$x_direct_test_include"; then
8426 ac_x_includes=$ac_dir
8427 break
8428 fi
8429 done
8430fi
8431rm -f conftest*
8432fi # $ac_x_includes = NO
8433
8434if test "$ac_x_libraries" = NO; then
8435 # Check for the libraries.
8436
8437 test -z "$x_direct_test_library" && x_direct_test_library=Xt
8438 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8439
8440 # See if we find them without any special options.
8441 # Don't add to $LIBS permanently.
8442 ac_save_LIBS="$LIBS"
8443 LIBS="-l$x_direct_test_library $LIBS"
8444cat > conftest.$ac_ext <<EOF
9608ab8b 8445#line 8446 "configure"
c906108c
SS
8446#include "confdefs.h"
8447
8448int main() {
8449${x_direct_test_function}()
8450; return 0; }
8451EOF
9608ab8b 8452if { (eval echo configure:8453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
c906108c
SS
8453 rm -rf conftest*
8454 LIBS="$ac_save_LIBS"
8455# We can link X programs with no special library path.
8456ac_x_libraries=
8457else
8458 echo "configure: failed program was:" >&5
8459 cat conftest.$ac_ext >&5
8460 rm -rf conftest*
8461 LIBS="$ac_save_LIBS"
8462# First see if replacing the include by lib works.
8463# Check X11 before X11Rn because it is often a symlink to the current release.
8464for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8465 /usr/X11/lib \
8466 /usr/X11R6/lib \
8467 /usr/X11R5/lib \
8468 /usr/X11R4/lib \
8469 \
8470 /usr/lib/X11 \
8471 /usr/lib/X11R6 \
8472 /usr/lib/X11R5 \
8473 /usr/lib/X11R4 \
8474 \
8475 /usr/local/X11/lib \
8476 /usr/local/X11R6/lib \
8477 /usr/local/X11R5/lib \
8478 /usr/local/X11R4/lib \
8479 \
8480 /usr/local/lib/X11 \
8481 /usr/local/lib/X11R6 \
8482 /usr/local/lib/X11R5 \
8483 /usr/local/lib/X11R4 \
8484 \
8485 /usr/X386/lib \
8486 /usr/x386/lib \
8487 /usr/XFree86/lib/X11 \
8488 \
8489 /usr/lib \
8490 /usr/local/lib \
8491 /usr/unsupported/lib \
8492 /usr/athena/lib \
8493 /usr/local/x11r5/lib \
8494 /usr/lpp/Xamples/lib \
8495 /lib/usr/lib/X11 \
8496 \
8497 /usr/openwin/lib \
8498 /usr/openwin/share/lib \
8499 ; \
8500do
8501 for ac_extension in a so sl; do
8502 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8503 ac_x_libraries=$ac_dir
8504 break 2
8505 fi
8506 done
8507done
8508fi
8509rm -f conftest*
8510fi # $ac_x_libraries = NO
8511
8512if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8513 # Didn't find X anywhere. Cache the known absence of X.
8514 ac_cv_have_x="have_x=no"
8515else
8516 # Record where we found X for the cache.
8517 ac_cv_have_x="have_x=yes \
8518 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8519fi
8520fi
8521 fi
8522 eval "$ac_cv_have_x"
8523fi # $with_x != no
8524
8525if test "$have_x" != yes; then
8526 echo "$ac_t""$have_x" 1>&6
8527 no_x=yes
8528else
8529 # If each of the values was on the command line, it overrides each guess.
8530 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8531 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8532 # Update the cache value to reflect the command line values.
8533 ac_cv_have_x="have_x=yes \
8534 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8535 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8536fi
8537
8538
7a292a7a
SS
8539
8540# Unlike the sim directory, whether a simulator is linked is controlled by
8541# presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
8542# This code just checks for a few cases where we'd like to ignore those
8543# definitions, even when they're present in the '.mt' file. These cases
8544# are when --disable-sim is specified, or if the simulator directory is
6c5cfe5b 8545# not part of the source tree.
7a292a7a
SS
8546#
8547# Check whether --enable-sim or --disable-sim was given.
8548if test "${enable_sim+set}" = set; then
8549 enableval="$enable_sim"
8550 echo "enable_sim = $enable_sim";
8551 echo "enableval = ${enableval}";
8552 case "${enableval}" in
8553 yes) ignore_sim=false ;;
8554 no) ignore_sim=true ;;
8555 *) ignore_sim=false ;;
8556 esac
8557else
8558 ignore_sim=false
8559fi
8560
8561
8562if test ! -d "${srcdir}/../sim"; then
8563 ignore_sim=true
8564fi
8565
8566if test "${ignore_sim}" = "true"; then
8567 IGNORE_SIM="SIM="
8568 IGNORE_SIM_OBS="SIM_OBS="
8569else
8570 IGNORE_SIM=""
8571 IGNORE_SIM_OBS=""
8572 cat >> confdefs.h <<\EOF
8573#define WITH_SIM 1
8574EOF
8575
8576fi
8577
8578
8579
c906108c
SS
8580
8581
8582
8583
8584
8585
dfcd3bfb 8586
e56ac5c3
AC
8587
8588
b3a90332
AC
8589
8590
b46cd165 8591
c906108c
SS
8592# Begin stuff to support --enable-shared
8593# Check whether --enable-shared or --disable-shared was given.
8594if test "${enable_shared+set}" = set; then
8595 enableval="$enable_shared"
8596 case "${enableval}" in
8597 yes) shared=true ;;
8598 no) shared=false ;;
8599 *) shared=true ;;
8600esac
8601fi
8602
8603HLDFLAGS=
8604HLDENV=
8605# If we have shared libraries, try to set rpath reasonably.
8606if test "${shared}" = "true"; then
8607 case "${host}" in
8608 *-*-hpux*)
8609 HLDFLAGS='-Wl,+s,+b,$(libdir)'
8610 ;;
8611 *-*-irix5* | *-*-irix6*)
8612 HLDFLAGS='-Wl,-rpath,$(libdir)'
8613 ;;
8614 *-*-linux*aout*)
8615 ;;
88987551 8616 *-*-linux* | *-pc-linux-gnu*)
c906108c
SS
8617 HLDFLAGS='-Wl,-rpath,$(libdir)'
8618 ;;
8619 *-*-solaris*)
8620 HLDFLAGS='-R $(libdir)'
8621 ;;
8622 *-*-sysv4*)
8623 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;'
8624 ;;
8625 esac
8626fi
8627
8628# On SunOS, if the linker supports the -rpath option, use it to
8629# prevent ../bfd and ../opcodes from being included in the run time
8630# search path.
8631case "${host}" in
8632 *-*-sunos*)
8633 echo 'main () { }' > conftest.c
8634 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8635 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8636 :
8637 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8638 :
8639 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8640 :
8641 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8642 :
8643 elif test "${shared}" = "true"; then
8644 HLDFLAGS='-Wl,-rpath=$(libdir)'
8645 else
8646 HLDFLAGS='-Wl,-rpath='
8647 fi
8648 rm -f conftest.t conftest.c conftest
8649 ;;
8650esac
8651
8652
8653# End stuff to support --enable-shared
8654
8655# target_subdir is used by the testsuite to find the target libraries.
8656target_subdir=
8657if test "${host}" != "${target}"; then
8658 target_subdir="${target_alias}/"
8659fi
8660
8661
8662frags=
8663host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8664if test ! -f ${host_makefile_frag}; then
7fd60527
AC
8665 # When building a native debuger the .mh file containing things
8666 # like NATDEPFILES is needed. Cross debuggers don't need .mh
8667 # since it no longer contains anything useful.
8668 if test "${target}" = "${host}"; then
8669 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
8670 else
8671 host_makefile_frag=/dev/null
8672 fi
c906108c
SS
8673fi
8674frags="$frags $host_makefile_frag"
8675
8676target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8677if test ! -f ${target_makefile_frag}; then
8678{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8679fi
8680frags="$frags $target_makefile_frag"
8681
8682
8683
8684
8685
8686hostfile=`sed -n '
8687s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8688' ${host_makefile_frag}`
8689
8690targetfile=`sed -n '
8691s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8692' ${target_makefile_frag}`
8693
6166d547
AC
8694GDB_MULTI_ARCH=`sed -n '
8695s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
8696' ${target_makefile_frag}`
8697
c906108c 8698if test "${target}" = "${host}"; then
a85f51e7
DJ
8699# We pick this up from the host configuration file (.mh) because we
8700# do not have a native configuration Makefile fragment.
c906108c
SS
8701nativefile=`sed -n '
8702s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8703' ${host_makefile_frag}`
c906108c
SS
8704fi
8705
8706
6166d547
AC
8707# New targets should just set gdb_multi_arch=yes in configure.tgt.
8708# Old targets being converted can either do that or set GDB_MULTI_ARCH
8709# in the target specific makefile frag. Eventually gdb_multi_arch=yes
8710# will be the default.
8711if test x"${GDB_MULTI_ARCH}" = x ; then
8712 case "${gdb_multi_arch}" in
8713 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8714 no ) GDB_MULTI_ARCH=0 ;;
8715 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8716 esac
8717fi
8718if test x"${GDB_MULTI_ARCH}" != x ; then
8719 cat >> confdefs.h <<EOF
8720#define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8721EOF
8722
8723fi
6c5cfe5b 8724# Warn the user when they use an old practice
6166d547
AC
8725case "${GDB_MULTI_ARCH}" in
8726 "" ) ;;
8727 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8728 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8729 GDB_MULTI_ARCH_PURE )
8730 if test x"${targetfile}" != x ; then
6c5cfe5b 8731 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
5a2402b8 8732 targetfile=""
6166d547
AC
8733 fi ;;
8734 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8735esac
8736
96baa820
JM
8737if test "${enable_multi_ice}" = "yes"; then
8738 SUBDIRS="${SUBDIRS} multi-ice"
8739fi
8740
a85f51e7
DJ
8741# ``gdbserver'' can only be built in a native configuration.
8742if test x"${target}" = x"${host}"; then
8743 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
9608ab8b 8744echo "configure:8745: checking whether gdbserver is supported on this host" >&5
a85f51e7
DJ
8745 if test x"${build_gdbserver}" = xyes ; then
8746 configdirs="${configdirs} gdbserver"
8747 SUBDIRS="${SUBDIRS} gdbserver"
8748 echo "$ac_t""yes" 1>&6
8749 else
8750 echo "$ac_t""no" 1>&6
8751 fi
8752fi
8753
96baa820
JM
8754
8755
c906108c 8756# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
5a2402b8
AC
8757# (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8758# version.
c906108c
SS
8759
8760files=
8761links=
5a2402b8 8762
c906108c 8763rm -f xm.h
5a2402b8 8764xm_h=""
c906108c 8765if test "${hostfile}" != ""; then
5a2402b8
AC
8766 xm_h=xm.h
8767 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8768 files="${files} ${GDB_XM_FILE}"
8769 links="${links} xm.h"
8770 cat >> confdefs.h <<EOF
8771#define GDB_XM_FILE ${GDB_XM_FILE}
8772EOF
8773
c906108c 8774fi
5a2402b8
AC
8775
8776
c906108c 8777rm -f tm.h
5a2402b8 8778tm_h=""
c906108c 8779if test "${targetfile}" != ""; then
5a2402b8
AC
8780 tm_h=tm.h
8781 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8782 files="${files} ${GDB_TM_FILE}"
8783 links="${links} tm.h"
8784 cat >> confdefs.h <<EOF
8785#define GDB_TM_FILE ${GDB_TM_FILE}
8786EOF
8787
c906108c 8788fi
5a2402b8
AC
8789
8790
c906108c 8791rm -f nm.h
5a2402b8 8792nm_h=""
c906108c 8793if test "${nativefile}" != ""; then
5a2402b8
AC
8794 nm_h=nm.h
8795 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8796 files="${files} ${GDB_NM_FILE}"
8797 links="${links} nm.h"
8798 cat >> confdefs.h <<EOF
8799#define GDB_NM_FILE ${GDB_NM_FILE}
8800EOF
8801
c906108c 8802fi
5a2402b8
AC
8803
8804
3fc11d3e 8805echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
9608ab8b 8806echo "configure:8807: checking whether ln -s works" >&5
3fc11d3e
JM
8807if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
8808 echo $ac_n "(cached) $ac_c" 1>&6
8809else
8810 rm -f conftestdata
8811if ln -s X conftestdata 2>/dev/null
8812then
8813 rm -f conftestdata
8814 ac_cv_prog_LN_S="ln -s"
8815else
8816 ac_cv_prog_LN_S=ln
8817fi
8818fi
8819LN_S="$ac_cv_prog_LN_S"
8820if test "$ac_cv_prog_LN_S" = "ln -s"; then
8821 echo "$ac_t""yes" 1>&6
8822else
8823 echo "$ac_t""no" 1>&6
8824fi
8825
c906108c
SS
8826
8827
8828
8829echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
9608ab8b 8830echo "configure:8831: checking for Cygwin environment" >&5
c906108c
SS
8831if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8832 echo $ac_n "(cached) $ac_c" 1>&6
8833else
8834 cat > conftest.$ac_ext <<EOF
9608ab8b 8835#line 8836 "configure"
c906108c
SS
8836#include "confdefs.h"
8837
8838int main() {
8839
8840#ifndef __CYGWIN__
8841#define __CYGWIN__ __CYGWIN32__
8842#endif
8843return __CYGWIN__;
8844; return 0; }
8845EOF
9608ab8b 8846if { (eval echo configure:8847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8847 rm -rf conftest*
8848 ac_cv_cygwin=yes
8849else
8850 echo "configure: failed program was:" >&5
8851 cat conftest.$ac_ext >&5
8852 rm -rf conftest*
8853 ac_cv_cygwin=no
8854fi
8855rm -f conftest*
8856rm -f conftest*
8857fi
8858
8859echo "$ac_t""$ac_cv_cygwin" 1>&6
8860CYGWIN=
8861test "$ac_cv_cygwin" = yes && CYGWIN=yes
8862echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
9608ab8b 8863echo "configure:8864: checking for mingw32 environment" >&5
c906108c
SS
8864if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8865 echo $ac_n "(cached) $ac_c" 1>&6
8866else
8867 cat > conftest.$ac_ext <<EOF
9608ab8b 8868#line 8869 "configure"
c906108c
SS
8869#include "confdefs.h"
8870
8871int main() {
8872return __MINGW32__;
8873; return 0; }
8874EOF
9608ab8b 8875if { (eval echo configure:8876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c906108c
SS
8876 rm -rf conftest*
8877 ac_cv_mingw32=yes
8878else
8879 echo "configure: failed program was:" >&5
8880 cat conftest.$ac_ext >&5
8881 rm -rf conftest*
8882 ac_cv_mingw32=no
8883fi
8884rm -f conftest*
8885rm -f conftest*
8886fi
8887
8888echo "$ac_t""$ac_cv_mingw32" 1>&6
8889MINGW32=
8890test "$ac_cv_mingw32" = yes && MINGW32=yes
8891
8892
8893echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
9608ab8b 8894echo "configure:8895: checking for executable suffix" >&5
c906108c
SS
8895if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8896 echo $ac_n "(cached) $ac_c" 1>&6
8897else
8898 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8899 ac_cv_exeext=.exe
8900else
8901 rm -f conftest*
8902 echo 'int main () { return 0; }' > conftest.$ac_ext
8903 ac_cv_exeext=
9608ab8b 8904 if { (eval echo configure:8905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
c906108c
SS
8905 for file in conftest.*; do
8906 case $file in
9608ab8b 8907 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
c906108c
SS
8908 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8909 esac
8910 done
8911 else
8912 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8913 fi
8914 rm -f conftest*
8915 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8916fi
8917fi
8918
8919EXEEXT=""
8920test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8921echo "$ac_t""${ac_cv_exeext}" 1>&6
8922ac_exeext=$EXEEXT
8923
8924
234b45d4
KB
8925
8926cat >> confdefs.h <<\EOF
8927#define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
8928EOF
8929
8930
8931
8932
8933 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
8934if test "${with_libiconv_prefix+set}" = set; then
8935 withval="$with_libiconv_prefix"
8936
8937 for dir in `echo "$withval" | tr : ' '`; do
8938 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
8939 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
8940 done
8941
8942fi
8943
8944
8945 echo $ac_n "checking for iconv""... $ac_c" 1>&6
9608ab8b 8946echo "configure:8947: checking for iconv" >&5
234b45d4
KB
8947if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
8948 echo $ac_n "(cached) $ac_c" 1>&6
8949else
8950
8951 am_cv_func_iconv="no, consider installing GNU libiconv"
8952 am_cv_lib_iconv=no
8953 cat > conftest.$ac_ext <<EOF
9608ab8b 8954#line 8955 "configure"
234b45d4
KB
8955#include "confdefs.h"
8956#include <stdlib.h>
8957#include <iconv.h>
8958int main() {
8959iconv_t cd = iconv_open("","");
8960 iconv(cd,NULL,NULL,NULL,NULL);
8961 iconv_close(cd);
8962; return 0; }
8963EOF
9608ab8b 8964if { (eval echo configure:8965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
8965 rm -rf conftest*
8966 am_cv_func_iconv=yes
8967else
8968 echo "configure: failed program was:" >&5
8969 cat conftest.$ac_ext >&5
8970fi
8971rm -f conftest*
8972 if test "$am_cv_func_iconv" != yes; then
8973 am_save_LIBS="$LIBS"
8974 LIBS="$LIBS -liconv"
8975 cat > conftest.$ac_ext <<EOF
9608ab8b 8976#line 8977 "configure"
234b45d4
KB
8977#include "confdefs.h"
8978#include <stdlib.h>
8979#include <iconv.h>
8980int main() {
8981iconv_t cd = iconv_open("","");
8982 iconv(cd,NULL,NULL,NULL,NULL);
8983 iconv_close(cd);
8984; return 0; }
8985EOF
9608ab8b 8986if { (eval echo configure:8987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
234b45d4
KB
8987 rm -rf conftest*
8988 am_cv_lib_iconv=yes
8989 am_cv_func_iconv=yes
8990else
8991 echo "configure: failed program was:" >&5
8992 cat conftest.$ac_ext >&5
8993fi
8994rm -f conftest*
8995 LIBS="$am_save_LIBS"
8996 fi
8997
8998fi
8999
9000echo "$ac_t""$am_cv_func_iconv" 1>&6
9001 if test "$am_cv_func_iconv" = yes; then
9002 cat >> confdefs.h <<\EOF
9003#define HAVE_ICONV 1
9004EOF
9005
9006 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
9608ab8b 9007echo "configure:9008: checking for iconv declaration" >&5
234b45d4
KB
9008 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
9009 echo $ac_n "(cached) $ac_c" 1>&6
9010else
9011
9012 cat > conftest.$ac_ext <<EOF
9608ab8b 9013#line 9014 "configure"
234b45d4
KB
9014#include "confdefs.h"
9015
9016#include <stdlib.h>
9017#include <iconv.h>
9018extern
9019#ifdef __cplusplus
9020"C"
9021#endif
9022#if defined(__STDC__) || defined(__cplusplus)
9023size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9024#else
9025size_t iconv();
9026#endif
9027
9028int main() {
9029
9030; return 0; }
9031EOF
9608ab8b 9032if { (eval echo configure:9033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
234b45d4
KB
9033 rm -rf conftest*
9034 am_cv_proto_iconv_arg1=""
9035else
9036 echo "configure: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038 rm -rf conftest*
9039 am_cv_proto_iconv_arg1="const"
9040fi
9041rm -f conftest*
9042 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);"
9043fi
9044
9045 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9046 echo "$ac_t""${ac_t:-
9047 }$am_cv_proto_iconv" 1>&6
9048 cat >> confdefs.h <<EOF
9049#define ICONV_CONST $am_cv_proto_iconv_arg1
9050EOF
9051
9052 fi
9053 LIBICONV=
9054 if test "$am_cv_lib_iconv" = yes; then
9055 LIBICONV="-liconv"
9056 fi
9057
9058
9059
c906108c
SS
9060subdirs="$configdirs"
9061
9062trap '' 1 2 15
9063cat > confcache <<\EOF
9064# This file is a shell script that caches the results of configure
9065# tests run on this system so they can be shared between configure
9066# scripts and configure runs. It is not useful on other systems.
9067# If it contains results you don't want to keep, you may remove or edit it.
9068#
9069# By default, configure uses ./config.cache as the cache file,
9070# creating it if it does not exist already. You can give configure
9071# the --cache-file=FILE option to use a different cache file; that is
9072# what configure does when it calls configure scripts in
9073# subdirectories, so they share the cache.
9074# Giving --cache-file=/dev/null disables caching, for debugging configure.
9075# config.status only pays attention to the cache file if you give it the
9076# --recheck option to rerun configure.
9077#
9078EOF
9079# The following way of writing the cache mishandles newlines in values,
9080# but we know of no workaround that is simple, portable, and efficient.
9081# So, don't put newlines in cache variables' values.
9082# Ultrix sh set writes to stderr and can't be redirected directly,
9083# and sets the high bit in the cache file unless we assign to the vars.
9084(set) 2>&1 |
9085 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9086 *ac_space=\ *)
9087 # `set' does not quote correctly, so add quotes (double-quote substitution
9088 # turns \\\\ into \\, and sed turns \\ into \).
9089 sed -n \
9090 -e "s/'/'\\\\''/g" \
9091 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9092 ;;
9093 *)
9094 # `set' quotes correctly as required by POSIX, so do not add quotes.
9095 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9096 ;;
9097 esac >> confcache
9098if cmp -s $cache_file confcache; then
9099 :
9100else
9101 if test -w $cache_file; then
9102 echo "updating cache $cache_file"
9103 cat confcache > $cache_file
9104 else
9105 echo "not updating unwritable cache $cache_file"
9106 fi
9107fi
9108rm -f confcache
9109
9110trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9111
9112test "x$prefix" = xNONE && prefix=$ac_default_prefix
9113# Let make expand exec_prefix.
9114test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9115
9116# Any assignment to VPATH causes Sun make to only execute
9117# the first set of double-colon rules, so remove it if not needed.
9118# If there is a colon in the path, we need to keep it.
9119if test "x$srcdir" = x.; then
9120 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9121fi
9122
9123trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9124
9125DEFS=-DHAVE_CONFIG_H
9126
9127# Without the "./", some shells look in PATH for config.status.
9128: ${CONFIG_STATUS=./config.status}
9129
9130echo creating $CONFIG_STATUS
9131rm -f $CONFIG_STATUS
9132cat > $CONFIG_STATUS <<EOF
9133#! /bin/sh
9134# Generated automatically by configure.
9135# Run this file to recreate the current configuration.
9136# This directory was configured as follows,
9137# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9138#
9139# $0 $ac_configure_args
9140#
9141# Compiler output produced by configure, useful for debugging
9142# configure, is in ./config.log if it exists.
9143
9144ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9145for ac_option
9146do
9147 case "\$ac_option" in
9148 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9149 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9150 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9151 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9152 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9153 exit 0 ;;
9154 -help | --help | --hel | --he | --h)
9155 echo "\$ac_cs_usage"; exit 0 ;;
9156 *) echo "\$ac_cs_usage"; exit 1 ;;
9157 esac
9158done
9159
9160ac_given_srcdir=$srcdir
9161ac_given_INSTALL="$INSTALL"
9162
ed952ac5 9163trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
c906108c
SS
9164EOF
9165cat >> $CONFIG_STATUS <<EOF
9166
9167# Protect against being on the right side of a sed subst in config.status.
9168sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9169 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9170$ac_vpsub
9171$extrasub
9172s%@SHELL@%$SHELL%g
9173s%@CFLAGS@%$CFLAGS%g
9174s%@CPPFLAGS@%$CPPFLAGS%g
9175s%@CXXFLAGS@%$CXXFLAGS%g
9176s%@FFLAGS@%$FFLAGS%g
9177s%@DEFS@%$DEFS%g
9178s%@LDFLAGS@%$LDFLAGS%g
9179s%@LIBS@%$LIBS%g
9180s%@exec_prefix@%$exec_prefix%g
9181s%@prefix@%$prefix%g
9182s%@program_transform_name@%$program_transform_name%g
9183s%@bindir@%$bindir%g
9184s%@sbindir@%$sbindir%g
9185s%@libexecdir@%$libexecdir%g
9186s%@datadir@%$datadir%g
9187s%@sysconfdir@%$sysconfdir%g
9188s%@sharedstatedir@%$sharedstatedir%g
9189s%@localstatedir@%$localstatedir%g
9190s%@libdir@%$libdir%g
9191s%@includedir@%$includedir%g
9192s%@oldincludedir@%$oldincludedir%g
9193s%@infodir@%$infodir%g
9194s%@mandir@%$mandir%g
413ccac7
AC
9195s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
9196s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
9197s%@MAINT@%$MAINT%g
c906108c
SS
9198s%@CC@%$CC%g
9199s%@CPP@%$CPP%g
9200s%@host@%$host%g
9201s%@host_alias@%$host_alias%g
9202s%@host_cpu@%$host_cpu%g
9203s%@host_vendor@%$host_vendor%g
9204s%@host_os@%$host_os%g
9205s%@target@%$target%g
9206s%@target_alias@%$target_alias%g
9207s%@target_cpu@%$target_cpu%g
9208s%@target_vendor@%$target_vendor%g
9209s%@target_os@%$target_os%g
9210s%@build@%$build%g
9211s%@build_alias@%$build_alias%g
9212s%@build_cpu@%$build_cpu%g
9213s%@build_vendor@%$build_vendor%g
9214s%@build_os@%$build_os%g
9215s%@SET_MAKE@%$SET_MAKE%g
9216s%@RANLIB@%$RANLIB%g
9217s%@ALLOCA@%$ALLOCA%g
9218s%@USE_NLS@%$USE_NLS%g
9219s%@MSGFMT@%$MSGFMT%g
9220s%@GMSGFMT@%$GMSGFMT%g
9221s%@XGETTEXT@%$XGETTEXT%g
9222s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9223s%@CATALOGS@%$CATALOGS%g
9224s%@CATOBJEXT@%$CATOBJEXT%g
9225s%@DATADIRNAME@%$DATADIRNAME%g
9226s%@GMOFILES@%$GMOFILES%g
9227s%@INSTOBJEXT@%$INSTOBJEXT%g
9228s%@INTLDEPS@%$INTLDEPS%g
9229s%@INTLLIBS@%$INTLLIBS%g
9230s%@INTLOBJS@%$INTLOBJS%g
9231s%@POFILES@%$POFILES%g
9232s%@POSUB@%$POSUB%g
9233s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
9234s%@GT_NO@%$GT_NO%g
9235s%@GT_YES@%$GT_YES%g
9236s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9237s%@l@%$l%g
7a292a7a 9238s%@AWK@%$AWK%g
c906108c
SS
9239s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9240s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9241s%@INSTALL_DATA@%$INSTALL_DATA%g
9242s%@AR@%$AR%g
95ca63c4
CF
9243s%@DLLTOOL@%$DLLTOOL%g
9244s%@WINDRES@%$WINDRES%g
c906108c 9245s%@YACC@%$YACC%g
75c6e08a 9246s%@MIG@%$MIG%g
c906108c 9247s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
b4df4f68 9248s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
c906108c 9249s%@WARN_CFLAGS@%$WARN_CFLAGS%g
104c1213 9250s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
c906108c
SS
9251s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
9252s%@MMALLOC@%$MMALLOC%g
88987551 9253s%@REGEX@%$REGEX%g
aff38e61 9254s%@SER_HARDWIRE@%$SER_HARDWIRE%g
c906108c 9255s%@TERM_LIB@%$TERM_LIB%g
cd0fc7c3 9256s%@WIN32LIBS@%$WIN32LIBS%g
7a292a7a
SS
9257s%@LIBGUI@%$LIBGUI%g
9258s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
7a292a7a
SS
9259s%@WIN32LDAPP@%$WIN32LDAPP%g
9260s%@TCL_VERSION@%$TCL_VERSION%g
9261s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
9262s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
9263s%@TCL_CC@%$TCL_CC%g
9264s%@TCL_DEFS@%$TCL_DEFS%g
9265s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
9266s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
9267s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
9268s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
9269s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
9270s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
9271s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
9272s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
9273s%@TCL_RANLIB@%$TCL_RANLIB%g
9274s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
9275s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
9276s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
9277s%@TK_VERSION@%$TK_VERSION%g
9278s%@TK_DEFS@%$TK_DEFS%g
9279s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
9280s%@TK_XINCLUDES@%$TK_XINCLUDES%g
9281s%@TK_XLIBSW@%$TK_XLIBSW%g
9282s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
9283s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
9284s%@TCLHDIR@%$TCLHDIR%g
9285s%@TKHDIR@%$TKHDIR%g
9286s%@ITCLHDIR@%$ITCLHDIR%g
9287s%@ITKHDIR@%$ITKHDIR%g
7a292a7a
SS
9288s%@ITCL_VERSION@%$ITCL_VERSION%g
9289s%@ITCL_DEFS@%$ITCL_DEFS%g
9290s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
9291s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
9292s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
9293s%@ITK_VERSION@%$ITK_VERSION%g
9294s%@ITK_DEFS@%$ITK_DEFS%g
9295s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
9296s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
9297s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
7a292a7a
SS
9298s%@X_CFLAGS@%$X_CFLAGS%g
9299s%@X_LDFLAGS@%$X_LDFLAGS%g
9300s%@X_LIBS@%$X_LIBS%g
dd2504ab
JM
9301s%@TCL_DEPS@%$TCL_DEPS%g
9302s%@TK_DEPS@%$TK_DEPS%g
7a292a7a
SS
9303s%@ITCLLIB@%$ITCLLIB%g
9304s%@ITCL_DEPS@%$ITCL_DEPS%g
9305s%@ITKLIB@%$ITKLIB%g
9306s%@ITK_DEPS@%$ITK_DEPS%g
7a292a7a
SS
9307s%@GDBTKLIBS@%$GDBTKLIBS%g
9308s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
d1c3b63a 9309s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
7a292a7a
SS
9310s%@IGNORE_SIM@%$IGNORE_SIM%g
9311s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
c906108c
SS
9312s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
9313s%@CONFIG_OBS@%$CONFIG_OBS%g
66b965bb 9314s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
c906108c
SS
9315s%@CONFIG_DEPS@%$CONFIG_DEPS%g
9316s%@CONFIG_SRCS@%$CONFIG_SRCS%g
dfcd3bfb 9317s%@CONFIG_INITS@%$CONFIG_INITS%g
b3a90332
AC
9318s%@CONFIG_ALL@%$CONFIG_ALL%g
9319s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
e56ac5c3
AC
9320s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
9321s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
c906108c
SS
9322s%@HLDFLAGS@%$HLDFLAGS%g
9323s%@HLDENV@%$HLDENV%g
9324s%@target_subdir@%$target_subdir%g
9325/@host_makefile_frag@/r $host_makefile_frag
9326s%@host_makefile_frag@%%g
9327/@target_makefile_frag@/r $target_makefile_frag
9328s%@target_makefile_frag@%%g
9329s%@frags@%$frags%g
96baa820 9330s%@SUBDIRS@%$SUBDIRS%g
5a2402b8
AC
9331s%@xm_h@%$xm_h%g
9332s%@tm_h@%$tm_h%g
9333s%@nm_h@%$nm_h%g
7a292a7a 9334s%@LN_S@%$LN_S%g
c906108c 9335s%@EXEEXT@%$EXEEXT%g
234b45d4 9336s%@LIBICONV@%$LIBICONV%g
c906108c
SS
9337s%@subdirs@%$subdirs%g
9338
9339CEOF
9340EOF
9341
9342cat >> $CONFIG_STATUS <<\EOF
9343
9344# Split the substitutions into bite-sized pieces for seds with
9345# small command number limits, like on Digital OSF/1 and HP-UX.
234b45d4 9346ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
c906108c
SS
9347ac_file=1 # Number of current file.
9348ac_beg=1 # First line for current file.
9349ac_end=$ac_max_sed_cmds # Line after last line for current file.
9350ac_more_lines=:
9351ac_sed_cmds=""
9352while $ac_more_lines; do
9353 if test $ac_beg -gt 1; then
9354 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9355 else
9356 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9357 fi
9358 if test ! -s conftest.s$ac_file; then
9359 ac_more_lines=false
9360 rm -f conftest.s$ac_file
9361 else
9362 if test -z "$ac_sed_cmds"; then
9363 ac_sed_cmds="sed -f conftest.s$ac_file"
9364 else
9365 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9366 fi
9367 ac_file=`expr $ac_file + 1`
9368 ac_beg=$ac_end
9369 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9370 fi
9371done
9372if test -z "$ac_sed_cmds"; then
9373 ac_sed_cmds=cat
9374fi
9375EOF
9376
9377cat >> $CONFIG_STATUS <<EOF
9378
ed952ac5 9379CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
c906108c
SS
9380EOF
9381cat >> $CONFIG_STATUS <<\EOF
9382for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9383 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9384 case "$ac_file" in
9385 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9386 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9387 *) ac_file_in="${ac_file}.in" ;;
9388 esac
9389
9390 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9391
9392 # Remove last slash and all that follows it. Not all systems have dirname.
9393 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9394 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9395 # The file is in a subdirectory.
9396 test ! -d "$ac_dir" && mkdir "$ac_dir"
9397 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9398 # A "../" for each directory in $ac_dir_suffix.
9399 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9400 else
9401 ac_dir_suffix= ac_dots=
9402 fi
9403
9404 case "$ac_given_srcdir" in
9405 .) srcdir=.
9406 if test -z "$ac_dots"; then top_srcdir=.
9407 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9408 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9409 *) # Relative path.
9410 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9411 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9412 esac
9413
9414 case "$ac_given_INSTALL" in
9415 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9416 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9417 esac
9418
9419 echo creating "$ac_file"
9420 rm -f "$ac_file"
9421 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9422 case "$ac_file" in
9423 *Makefile*) ac_comsub="1i\\
9424# $configure_input" ;;
9425 *) ac_comsub= ;;
9426 esac
9427
9428 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9429 sed -e "$ac_comsub
9430s%@configure_input@%$configure_input%g
9431s%@srcdir@%$srcdir%g
9432s%@top_srcdir@%$top_srcdir%g
9433s%@INSTALL@%$INSTALL%g
9434" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9435fi; done
9436rm -f conftest.s*
9437
9438# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9439# NAME is the cpp macro being defined and VALUE is the value it is being given.
9440#
9441# ac_d sets the value in "#define NAME VALUE" lines.
9442ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9443ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9444ac_dC='\3'
9445ac_dD='%g'
9446# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9447ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9448ac_uB='\([ ]\)%\1#\2define\3'
9449ac_uC=' '
9450ac_uD='\4%g'
9451# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9452ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9453ac_eB='$%\1#\2define\3'
9454ac_eC=' '
9455ac_eD='%g'
9456
9457if test "${CONFIG_HEADERS+set}" != set; then
9458EOF
9459cat >> $CONFIG_STATUS <<EOF
9460 CONFIG_HEADERS="config.h:config.in"
9461EOF
9462cat >> $CONFIG_STATUS <<\EOF
9463fi
9464for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9465 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9466 case "$ac_file" in
9467 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9468 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9469 *) ac_file_in="${ac_file}.in" ;;
9470 esac
9471
9472 echo creating $ac_file
9473
9474 rm -f conftest.frag conftest.in conftest.out
9475 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9476 cat $ac_file_inputs > conftest.in
9477
9478EOF
9479
9480# Transform confdefs.h into a sed script conftest.vals that substitutes
9481# the proper values into config.h.in to produce config.h. And first:
9482# Protect against being on the right side of a sed subst in config.status.
9483# Protect against being in an unquoted here document in config.status.
9484rm -f conftest.vals
9485cat > conftest.hdr <<\EOF
9486s/[\\&%]/\\&/g
9487s%[\\$`]%\\&%g
9488s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9489s%ac_d%ac_u%gp
9490s%ac_u%ac_e%gp
9491EOF
9492sed -n -f conftest.hdr confdefs.h > conftest.vals
9493rm -f conftest.hdr
9494
9495# This sed command replaces #undef with comments. This is necessary, for
9496# example, in the case of _POSIX_SOURCE, which is predefined and required
9497# on some systems where configure will not decide to define it.
9498cat >> conftest.vals <<\EOF
9499s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9500EOF
9501
9502# Break up conftest.vals because some shells have a limit on
9503# the size of here documents, and old seds have small limits too.
9504
9505rm -f conftest.tail
9506while :
9507do
9508 ac_lines=`grep -c . conftest.vals`
9509 # grep -c gives empty output for an empty file on some AIX systems.
9510 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9511 # Write a limited-size here document to conftest.frag.
9512 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9513 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9514 echo 'CEOF
9515 sed -f conftest.frag conftest.in > conftest.out
9516 rm -f conftest.in
9517 mv conftest.out conftest.in
9518' >> $CONFIG_STATUS
9519 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9520 rm -f conftest.vals
9521 mv conftest.tail conftest.vals
9522done
9523rm -f conftest.vals
9524
9525cat >> $CONFIG_STATUS <<\EOF
9526 rm -f conftest.frag conftest.h
9527 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9528 cat conftest.in >> conftest.h
9529 rm -f conftest.in
9530 if cmp -s $ac_file conftest.h 2>/dev/null; then
9531 echo "$ac_file is unchanged"
9532 rm -f conftest.h
9533 else
9534 # Remove last slash and all that follows it. Not all systems have dirname.
9535 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9536 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9537 # The file is in a subdirectory.
9538 test ! -d "$ac_dir" && mkdir "$ac_dir"
9539 fi
9540 rm -f $ac_file
9541 mv conftest.h $ac_file
9542 fi
9543fi; done
9544
9545EOF
9546
9547cat >> $CONFIG_STATUS <<EOF
9548ac_sources="$files"
9549ac_dests="$links"
9550EOF
9551
9552cat >> $CONFIG_STATUS <<\EOF
9553srcdir=$ac_given_srcdir
9554while test -n "$ac_sources"; do
9555 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9556 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9557
9558 echo "linking $srcdir/$ac_source to $ac_dest"
9559
9560 if test ! -r $srcdir/$ac_source; then
9561 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9562 fi
9563 rm -f $ac_dest
9564
9565 # Make relative symlinks.
9566 # Remove last slash and all that follows it. Not all systems have dirname.
9567 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9568 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9569 # The dest file is in a subdirectory.
9570 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9571 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9572 # A "../" for each directory in $ac_dest_dir_suffix.
9573 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9574 else
9575 ac_dest_dir_suffix= ac_dots=
9576 fi
9577
9578 case "$srcdir" in
9579 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9580 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9581 esac
9582
9583 # Make a symlink if possible; otherwise try a hard link.
9584 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9585 ln $srcdir/$ac_source $ac_dest; then :
9586 else
9587 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9588 fi
9589done
9590EOF
9591cat >> $CONFIG_STATUS <<EOF
9592
9593gdb_host_cpu=$gdb_host_cpu
9594gdb_target_cpu=$gdb_target_cpu
9595nativefile=$nativefile
9596
9597EOF
9598cat >> $CONFIG_STATUS <<\EOF
9599
9600if test "${nativefile}" = ""; then
c4620205 9601 < Makefile \
e27da16d
JT
9602 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
9603 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
c4620205
JB
9604 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
9605 > Makefile.tem
c906108c
SS
9606mv -f Makefile.tem Makefile
9607fi
9608
9609sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
9610/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
9611/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9612mv -f Makefile.tmp Makefile
9613
2acceee2 9614
c906108c
SS
9615case x$CONFIG_HEADERS in
9616xconfig.h:config.in)
9617echo > stamp-h ;;
9618esac
9619
9620exit 0
9621EOF
9622chmod +x $CONFIG_STATUS
9623rm -fr confdefs* $ac_clean_files
9624test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9625
9626if test "$no_recursion" != yes; then
9627
9628 # Remove --cache-file and --srcdir arguments so they do not pile up.
9629 ac_sub_configure_args=
9630 ac_prev=
9631 for ac_arg in $ac_configure_args; do
9632 if test -n "$ac_prev"; then
9633 ac_prev=
9634 continue
9635 fi
9636 case "$ac_arg" in
9637 -cache-file | --cache-file | --cache-fil | --cache-fi \
9638 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9639 ac_prev=cache_file ;;
9640 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9641 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9642 ;;
9643 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9644 ac_prev=srcdir ;;
9645 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9646 ;;
9647 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9648 esac
9649 done
9650
9651 for ac_config_dir in $configdirs; do
9652
9653 # Do not complain, so a configure script can configure whichever
9654 # parts of a large source tree are present.
9655 if test ! -d $srcdir/$ac_config_dir; then
9656 continue
9657 fi
9658
9659 echo configuring in $ac_config_dir
9660
9661 case "$srcdir" in
9662 .) ;;
9663 *)
9664 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9665 else
9666 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9667 fi
9668 ;;
9669 esac
9670
9671 ac_popdir=`pwd`
9672 cd $ac_config_dir
9673
9674 # A "../" for each directory in /$ac_config_dir.
9675 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9676
9677 case "$srcdir" in
9678 .) # No --srcdir option. We are building in place.
9679 ac_sub_srcdir=$srcdir ;;
9680 /*) # Absolute path.
9681 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9682 *) # Relative path.
9683 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9684 esac
9685
9686 # Check for guested configure; otherwise get Cygnus style configure.
9687 if test -f $ac_sub_srcdir/configure; then
9688 ac_sub_configure=$ac_sub_srcdir/configure
9689 elif test -f $ac_sub_srcdir/configure.in; then
9690 ac_sub_configure=$ac_configure
9691 else
9692 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9693 ac_sub_configure=
9694 fi
9695
9696 # The recursion is here.
9697 if test -n "$ac_sub_configure"; then
9698
9699 # Make the cache file name correct relative to the subdirectory.
9700 case "$cache_file" in
9701 /*) ac_sub_cache_file=$cache_file ;;
9702 *) # Relative path.
9703 ac_sub_cache_file="$ac_dots$cache_file" ;;
9704 esac
9705 case "$ac_given_INSTALL" in
9706 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9707 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9708 esac
9709
9710 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9711 # The eval makes quoting arguments work.
9712 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9713 then :
9714 else
9715 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9716 fi
9717 fi
9718
9719 cd $ac_popdir
9720 done
9721fi
9722
9723
9724exit 0
This page took 0.774177 seconds and 4 git commands to generate.