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