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