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