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