* reloc.c: Add BFD_RELOC_24.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
8b701284 4# Generated automatically using autoconf version 2.12
bc859e63 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
5436fc65
C
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:
14ac_help="$ac_help
15 --enable-netrom "
188c635f
SG
16ac_help="$ac_help
17 --enable-gm "
3c0bf315
MM
18ac_help="$ac_help
19 --enable-sim-powerpc "
5436fc65
C
20ac_help="$ac_help
21 --enable-gdbtk "
22ac_help="$ac_help
047465fd 23 --with-tclconfig directory containing tcl configuration (tclConfig.sh)"
4e327047 24ac_help="$ac_help
047465fd 25 --with-tkconfig directory containing tk configuration (tkConfig.sh)"
4e327047 26ac_help="$ac_help
047465fd 27 --with-tclinclude directory where tcl private headers are"
4e327047 28ac_help="$ac_help
047465fd 29 --with-tkinclude directory where tk private headers are"
1d5eb137
FF
30ac_help="$ac_help
31 --enable-shared use shared libraries"
5436fc65
C
32
33# Initialize some variables set by options.
34# The variables have the same names as the options, with
35# dashes changed to underlines.
36build=NONE
37cache_file=./config.cache
38exec_prefix=NONE
39host=NONE
40no_create=
41nonopt=NONE
42no_recursion=
43prefix=NONE
44program_prefix=NONE
45program_suffix=NONE
46program_transform_name=s,x,x,
47silent=
48site=
49srcdir=
50target=NONE
51verbose=
52x_includes=NONE
53x_libraries=NONE
1a7b4b7c
DE
54bindir='${exec_prefix}/bin'
55sbindir='${exec_prefix}/sbin'
56libexecdir='${exec_prefix}/libexec'
57datadir='${prefix}/share'
58sysconfdir='${prefix}/etc'
59sharedstatedir='${prefix}/com'
60localstatedir='${prefix}/var'
61libdir='${exec_prefix}/lib'
62includedir='${prefix}/include'
63oldincludedir='/usr/include'
64infodir='${prefix}/info'
65mandir='${prefix}/man'
5436fc65
C
66
67# Initialize some other variables.
68subdirs=
1a7b4b7c 69MFLAGS= MAKEFLAGS=
8b701284
ILT
70# Maximum number of lines to put in a shell here document.
71ac_max_here_lines=12
5436fc65
C
72
73ac_prev=
74for ac_option
75do
76
77 # If the previous option needs an argument, assign it.
78 if test -n "$ac_prev"; then
79 eval "$ac_prev=\$ac_option"
80 ac_prev=
81 continue
82 fi
83
84 case "$ac_option" in
85 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
86 *) ac_optarg= ;;
87 esac
88
89 # Accept the important Cygnus configure options, so we can diagnose typos.
90
91 case "$ac_option" in
92
1a7b4b7c
DE
93 -bindir | --bindir | --bindi | --bind | --bin | --bi)
94 ac_prev=bindir ;;
95 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
96 bindir="$ac_optarg" ;;
97
98 -build | --build | --buil | --bui | --bu)
5436fc65 99 ac_prev=build ;;
1a7b4b7c 100 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
101 build="$ac_optarg" ;;
102
103 -cache-file | --cache-file | --cache-fil | --cache-fi \
104 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
105 ac_prev=cache_file ;;
106 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
107 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
108 cache_file="$ac_optarg" ;;
109
1a7b4b7c
DE
110 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
111 ac_prev=datadir ;;
112 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
113 | --da=*)
114 datadir="$ac_optarg" ;;
115
5436fc65
C
116 -disable-* | --disable-*)
117 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
118 # Reject names that are not valid shell variable names.
119 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
120 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
121 fi
122 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}=no" ;;
124
125 -enable-* | --enable-*)
126 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
127 # Reject names that are not valid shell variable names.
128 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
129 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
130 fi
131 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
132 case "$ac_option" in
133 *=*) ;;
134 *) ac_optarg=yes ;;
135 esac
136 eval "enable_${ac_feature}='$ac_optarg'" ;;
137
138 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
139 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
140 | --exec | --exe | --ex)
141 ac_prev=exec_prefix ;;
142 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
143 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
144 | --exec=* | --exe=* | --ex=*)
145 exec_prefix="$ac_optarg" ;;
146
147 -gas | --gas | --ga | --g)
148 # Obsolete; use --with-gas.
149 with_gas=yes ;;
150
151 -help | --help | --hel | --he)
152 # Omit some internal or obsolete options to make the list less imposing.
153 # This message is too long to be a string in the A/UX 3.1 sh.
154 cat << EOF
155Usage: configure [options] [host]
156Options: [defaults in brackets after descriptions]
157Configuration:
158 --cache-file=FILE cache test results in FILE
159 --help print this message
160 --no-create do not create output files
161 --quiet, --silent do not print \`checking...' messages
162 --version print the version of autoconf that created configure
163Directory and file names:
164 --prefix=PREFIX install architecture-independent files in PREFIX
165 [$ac_default_prefix]
1a7b4b7c 166 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 167 [same as prefix]
1a7b4b7c
DE
168 --bindir=DIR user executables in DIR [EPREFIX/bin]
169 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
170 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
171 --datadir=DIR read-only architecture-independent data in DIR
172 [PREFIX/share]
173 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
174 --sharedstatedir=DIR modifiable architecture-independent data in DIR
175 [PREFIX/com]
176 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
177 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
178 --includedir=DIR C header files in DIR [PREFIX/include]
179 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
180 --infodir=DIR info documentation in DIR [PREFIX/info]
181 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
182 --srcdir=DIR find the sources in DIR [configure dir or ..]
183 --program-prefix=PREFIX prepend PREFIX to installed program names
184 --program-suffix=SUFFIX append SUFFIX to installed program names
1a7b4b7c
DE
185 --program-transform-name=PROGRAM
186 run sed PROGRAM on installed program names
187EOF
188 cat << EOF
5436fc65
C
189Host type:
190 --build=BUILD configure for building on BUILD [BUILD=HOST]
191 --host=HOST configure for HOST [guessed]
192 --target=TARGET configure for TARGET [TARGET=HOST]
193Features and packages:
194 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
195 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
196 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
197 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
198 --x-includes=DIR X include files are in DIR
199 --x-libraries=DIR X library files are in DIR
5436fc65 200EOF
1a7b4b7c
DE
201 if test -n "$ac_help"; then
202 echo "--enable and --with options recognized:$ac_help"
203 fi
5436fc65
C
204 exit 0 ;;
205
206 -host | --host | --hos | --ho)
207 ac_prev=host ;;
208 -host=* | --host=* | --hos=* | --ho=*)
209 host="$ac_optarg" ;;
210
1a7b4b7c
DE
211 -includedir | --includedir | --includedi | --included | --include \
212 | --includ | --inclu | --incl | --inc)
213 ac_prev=includedir ;;
214 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
215 | --includ=* | --inclu=* | --incl=* | --inc=*)
216 includedir="$ac_optarg" ;;
217
218 -infodir | --infodir | --infodi | --infod | --info | --inf)
219 ac_prev=infodir ;;
220 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
221 infodir="$ac_optarg" ;;
222
223 -libdir | --libdir | --libdi | --libd)
224 ac_prev=libdir ;;
225 -libdir=* | --libdir=* | --libdi=* | --libd=*)
226 libdir="$ac_optarg" ;;
227
228 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
229 | --libexe | --libex | --libe)
230 ac_prev=libexecdir ;;
231 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
232 | --libexe=* | --libex=* | --libe=*)
233 libexecdir="$ac_optarg" ;;
234
235 -localstatedir | --localstatedir | --localstatedi | --localstated \
236 | --localstate | --localstat | --localsta | --localst \
237 | --locals | --local | --loca | --loc | --lo)
238 ac_prev=localstatedir ;;
239 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
240 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
241 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
242 localstatedir="$ac_optarg" ;;
243
244 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
245 ac_prev=mandir ;;
246 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
247 mandir="$ac_optarg" ;;
248
5436fc65
C
249 -nfp | --nfp | --nf)
250 # Obsolete; use --without-fp.
251 with_fp=no ;;
252
253 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
254 | --no-cr | --no-c)
255 no_create=yes ;;
256
257 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
258 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 no_recursion=yes ;;
260
1a7b4b7c
DE
261 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
262 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
263 | --oldin | --oldi | --old | --ol | --o)
264 ac_prev=oldincludedir ;;
265 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
266 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
267 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
268 oldincludedir="$ac_optarg" ;;
269
5436fc65
C
270 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
271 ac_prev=prefix ;;
272 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
273 prefix="$ac_optarg" ;;
274
275 -program-prefix | --program-prefix | --program-prefi | --program-pref \
276 | --program-pre | --program-pr | --program-p)
277 ac_prev=program_prefix ;;
278 -program-prefix=* | --program-prefix=* | --program-prefi=* \
279 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
280 program_prefix="$ac_optarg" ;;
281
282 -program-suffix | --program-suffix | --program-suffi | --program-suff \
283 | --program-suf | --program-su | --program-s)
284 ac_prev=program_suffix ;;
285 -program-suffix=* | --program-suffix=* | --program-suffi=* \
286 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
287 program_suffix="$ac_optarg" ;;
288
289 -program-transform-name | --program-transform-name \
290 | --program-transform-nam | --program-transform-na \
291 | --program-transform-n | --program-transform- \
292 | --program-transform | --program-transfor \
293 | --program-transfo | --program-transf \
294 | --program-trans | --program-tran \
295 | --progr-tra | --program-tr | --program-t)
296 ac_prev=program_transform_name ;;
297 -program-transform-name=* | --program-transform-name=* \
298 | --program-transform-nam=* | --program-transform-na=* \
299 | --program-transform-n=* | --program-transform-=* \
300 | --program-transform=* | --program-transfor=* \
301 | --program-transfo=* | --program-transf=* \
302 | --program-trans=* | --program-tran=* \
303 | --progr-tra=* | --program-tr=* | --program-t=*)
304 program_transform_name="$ac_optarg" ;;
305
306 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
307 | -silent | --silent | --silen | --sile | --sil)
308 silent=yes ;;
309
1a7b4b7c
DE
310 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
311 ac_prev=sbindir ;;
312 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
313 | --sbi=* | --sb=*)
314 sbindir="$ac_optarg" ;;
315
316 -sharedstatedir | --sharedstatedir | --sharedstatedi \
317 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
318 | --sharedst | --shareds | --shared | --share | --shar \
319 | --sha | --sh)
320 ac_prev=sharedstatedir ;;
321 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
322 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
323 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
324 | --sha=* | --sh=*)
325 sharedstatedir="$ac_optarg" ;;
326
5436fc65
C
327 -site | --site | --sit)
328 ac_prev=site ;;
329 -site=* | --site=* | --sit=*)
330 site="$ac_optarg" ;;
331
332 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
333 ac_prev=srcdir ;;
334 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
335 srcdir="$ac_optarg" ;;
336
1a7b4b7c
DE
337 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
338 | --syscon | --sysco | --sysc | --sys | --sy)
339 ac_prev=sysconfdir ;;
340 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
341 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
342 sysconfdir="$ac_optarg" ;;
343
5436fc65
C
344 -target | --target | --targe | --targ | --tar | --ta | --t)
345 ac_prev=target ;;
346 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
347 target="$ac_optarg" ;;
348
349 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 verbose=yes ;;
351
352 -version | --version | --versio | --versi | --vers)
8b701284 353 echo "configure generated by autoconf version 2.12"
5436fc65
C
354 exit 0 ;;
355
356 -with-* | --with-*)
357 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 case "$ac_option" in
364 *=*) ;;
365 *) ac_optarg=yes ;;
366 esac
367 eval "with_${ac_package}='$ac_optarg'" ;;
368
369 -without-* | --without-*)
370 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
371 # Reject names that are not valid shell variable names.
372 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
373 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
374 fi
375 ac_package=`echo $ac_package| sed 's/-/_/g'`
376 eval "with_${ac_package}=no" ;;
377
378 --x)
379 # Obsolete; use --with-x.
380 with_x=yes ;;
381
382 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
383 | --x-incl | --x-inc | --x-in | --x-i)
384 ac_prev=x_includes ;;
385 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
386 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
387 x_includes="$ac_optarg" ;;
388
389 -x-libraries | --x-libraries | --x-librarie | --x-librari \
390 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
391 ac_prev=x_libraries ;;
392 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
393 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
394 x_libraries="$ac_optarg" ;;
395
396 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
397 ;;
398
1a7b4b7c 399 *)
5436fc65
C
400 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
401 echo "configure: warning: $ac_option: invalid host type" 1>&2
402 fi
403 if test "x$nonopt" != xNONE; then
404 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405 fi
406 nonopt="$ac_option"
407 ;;
408
409 esac
410done
411
412if test -n "$ac_prev"; then
413 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414fi
415
416trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
417
418# File descriptor usage:
419# 0 standard input
420# 1 file creation
421# 2 errors and warnings
422# 3 some systems may open it to /dev/tty
423# 4 used on the Kubota Titan
424# 6 checking for... messages and results
425# 5 compiler messages saved in config.log
426if test "$silent" = yes; then
427 exec 6>/dev/null
428else
429 exec 6>&1
430fi
431exec 5>./config.log
432
433echo "\
434This file contains any messages produced by compilers while
435running configure, to aid debugging if configure makes a mistake.
436" 1>&5
437
438# Strip out --no-create and --no-recursion so they do not pile up.
439# Also quote any args containing shell metacharacters.
440ac_configure_args=
441for ac_arg
442do
443 case "$ac_arg" in
444 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
445 | --no-cr | --no-c) ;;
446 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
447 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
448 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
449 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
450 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
451 esac
452done
453
454# NLS nuisances.
8b701284
ILT
455# Only set these to C if already set. These must not be set unconditionally
456# because not all systems understand e.g. LANG=C (notably SCO).
457# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
458# Non-C LC_CTYPE values break the ctype check.
5436fc65 459if test "${LANG+set}" = set; then LANG=C; export LANG; fi
8b701284
ILT
460if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
461if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
462if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
5436fc65
C
463
464# confdefs.h avoids OS command line length limits that DEFS can exceed.
465rm -rf conftest* confdefs.h
466# AIX cpp loses on an empty file, so make sure it contains at least a newline.
467echo > confdefs.h
468
469# A filename unique to this package, relative to the directory that
470# configure is in, which we can look for to find out if srcdir is correct.
471ac_unique_file=main.c
472
473# Find the source files, if location was not specified.
474if test -z "$srcdir"; then
475 ac_srcdir_defaulted=yes
476 # Try the directory containing this script, then its parent.
477 ac_prog=$0
478 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
479 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
480 srcdir=$ac_confdir
481 if test ! -r $srcdir/$ac_unique_file; then
482 srcdir=..
483 fi
484else
485 ac_srcdir_defaulted=no
486fi
487if test ! -r $srcdir/$ac_unique_file; then
488 if test "$ac_srcdir_defaulted" = yes; then
489 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
490 else
491 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492 fi
493fi
494srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
495
496# Prefer explicitly selected file to automatically selected ones.
497if test -z "$CONFIG_SITE"; then
498 if test "x$prefix" != xNONE; then
499 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
500 else
501 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502 fi
503fi
504for ac_site_file in $CONFIG_SITE; do
505 if test -r "$ac_site_file"; then
506 echo "loading site script $ac_site_file"
507 . "$ac_site_file"
508 fi
509done
510
511if test -r "$cache_file"; then
512 echo "loading cache $cache_file"
513 . $cache_file
514else
515 echo "creating cache $cache_file"
516 > $cache_file
517fi
518
519ac_ext=c
520# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3dedc867 521ac_cpp='$CPP $CPPFLAGS'
1a7b4b7c
DE
522ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
523ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
8b701284 524cross_compiling=$ac_cv_prog_cc_cross
5436fc65
C
525
526if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
529 ac_n= ac_c='
530' ac_t=' '
531 else
532 ac_n=-n ac_c= ac_t=
533 fi
534else
535 ac_n= ac_c='\c' ac_t=
536fi
537
538
539
db210d08 540
5436fc65
C
541# Extract the first word of "gcc", so it can be a program name with args.
542set dummy gcc; ac_word=$2
543echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 544echo "configure:545: checking for $ac_word" >&5
5436fc65
C
545if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
546 echo $ac_n "(cached) $ac_c" 1>&6
547else
548 if test -n "$CC"; then
549 ac_cv_prog_CC="$CC" # Let the user override the test.
550else
551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 552 for ac_dir in $PATH; do
5436fc65
C
553 test -z "$ac_dir" && ac_dir=.
554 if test -f $ac_dir/$ac_word; then
555 ac_cv_prog_CC="gcc"
556 break
557 fi
558 done
559 IFS="$ac_save_ifs"
5436fc65
C
560fi
561fi
562CC="$ac_cv_prog_CC"
563if test -n "$CC"; then
564 echo "$ac_t""$CC" 1>&6
565else
566 echo "$ac_t""no" 1>&6
567fi
568
1a7b4b7c
DE
569if test -z "$CC"; then
570 # Extract the first word of "cc", so it can be a program name with args.
571set dummy cc; ac_word=$2
572echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 573echo "configure:574: checking for $ac_word" >&5
1a7b4b7c
DE
574if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
575 echo $ac_n "(cached) $ac_c" 1>&6
576else
577 if test -n "$CC"; then
578 ac_cv_prog_CC="$CC" # Let the user override the test.
579else
580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
581 ac_prog_rejected=no
582 for ac_dir in $PATH; do
583 test -z "$ac_dir" && ac_dir=.
584 if test -f $ac_dir/$ac_word; then
585 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
586 ac_prog_rejected=yes
587 continue
588 fi
589 ac_cv_prog_CC="cc"
590 break
591 fi
592 done
593 IFS="$ac_save_ifs"
594if test $ac_prog_rejected = yes; then
595 # We found a bogon in the path, so make sure we never use it.
596 set dummy $ac_cv_prog_CC
597 shift
598 if test $# -gt 0; then
599 # We chose a different compiler from the bogus one.
600 # However, it has the same basename, so the bogon will be chosen
601 # first if we set CC to just the basename; use the full file name.
602 shift
603 set dummy "$ac_dir/$ac_word" "$@"
604 shift
605 ac_cv_prog_CC="$@"
606 fi
607fi
608fi
609fi
610CC="$ac_cv_prog_CC"
611if test -n "$CC"; then
612 echo "$ac_t""$CC" 1>&6
613else
614 echo "$ac_t""no" 1>&6
615fi
616
617 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
618fi
5436fc65 619
8b701284
ILT
620echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
621echo "configure:622: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
622
623ac_ext=c
624# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
625ac_cpp='$CPP $CPPFLAGS'
626ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
627ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
628cross_compiling=$ac_cv_prog_cc_cross
629
630cat > conftest.$ac_ext <<EOF
631#line 632 "configure"
632#include "confdefs.h"
633main(){return(0);}
634EOF
635if { (eval echo configure:636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
636 ac_cv_prog_cc_works=yes
637 # If we can't run a trivial program, we are probably using a cross compiler.
638 if (./conftest; exit) 2>/dev/null; then
639 ac_cv_prog_cc_cross=no
640 else
641 ac_cv_prog_cc_cross=yes
642 fi
643else
644 echo "configure: failed program was:" >&5
645 cat conftest.$ac_ext >&5
646 ac_cv_prog_cc_works=no
647fi
648rm -fr conftest*
649
650echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
651if test $ac_cv_prog_cc_works = no; then
652 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
653fi
654echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
655echo "configure:656: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
656echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
657cross_compiling=$ac_cv_prog_cc_cross
658
5436fc65 659echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
8b701284 660echo "configure:661: checking whether we are using GNU C" >&5
5436fc65
C
661if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
662 echo $ac_n "(cached) $ac_c" 1>&6
663else
664 cat > conftest.c <<EOF
665#ifdef __GNUC__
666 yes;
667#endif
668EOF
8b701284 669if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
5436fc65
C
670 ac_cv_prog_gcc=yes
671else
672 ac_cv_prog_gcc=no
673fi
674fi
1a7b4b7c 675
5436fc65 676echo "$ac_t""$ac_cv_prog_gcc" 1>&6
8b701284 677
5436fc65
C
678if test $ac_cv_prog_gcc = yes; then
679 GCC=yes
8b701284
ILT
680 ac_test_CFLAGS="${CFLAGS+set}"
681 ac_save_CFLAGS="$CFLAGS"
682 CFLAGS=
683 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
684echo "configure:685: checking whether ${CC-cc} accepts -g" >&5
685if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
5436fc65
C
686 echo $ac_n "(cached) $ac_c" 1>&6
687else
688 echo 'void f(){}' > conftest.c
689if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
8b701284 690 ac_cv_prog_cc_g=yes
5436fc65 691else
8b701284 692 ac_cv_prog_cc_g=no
5436fc65
C
693fi
694rm -f conftest*
695
696fi
1a7b4b7c 697
8b701284
ILT
698echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
699 if test "$ac_test_CFLAGS" = set; then
700 CFLAGS="$ac_save_CFLAGS"
701 elif test $ac_cv_prog_cc_g = yes; then
702 CFLAGS="-g -O2"
703 else
704 CFLAGS="-O2"
5436fc65
C
705 fi
706else
707 GCC=
708 test "${CFLAGS+set}" = set || CFLAGS="-g"
709fi
710
711echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8b701284 712echo "configure:713: checking how to run the C preprocessor" >&5
5436fc65
C
713# On Suns, sometimes $CPP names a directory.
714if test -n "$CPP" && test -d "$CPP"; then
715 CPP=
716fi
717if test -z "$CPP"; then
718if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
719 echo $ac_n "(cached) $ac_c" 1>&6
720else
721 # This must be in double quotes, not single quotes, because CPP may get
722 # substituted into the Makefile and "${CC-cc}" will confuse make.
723 CPP="${CC-cc} -E"
724 # On the NeXT, cc -E runs the code through the compiler's parser,
725 # not just through cpp.
726 cat > conftest.$ac_ext <<EOF
8b701284 727#line 728 "configure"
5436fc65
C
728#include "confdefs.h"
729#include <assert.h>
730Syntax Error
731EOF
1a7b4b7c 732ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 733{ (eval echo configure:734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
734ac_err=`grep -v '^ *+' conftest.out`
735if test -z "$ac_err"; then
736 :
737else
738 echo "$ac_err" >&5
8b701284
ILT
739 echo "configure: failed program was:" >&5
740 cat conftest.$ac_ext >&5
5436fc65
C
741 rm -rf conftest*
742 CPP="${CC-cc} -E -traditional-cpp"
743 cat > conftest.$ac_ext <<EOF
8b701284 744#line 745 "configure"
5436fc65
C
745#include "confdefs.h"
746#include <assert.h>
747Syntax Error
748EOF
1a7b4b7c 749ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 750{ (eval echo configure:751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
751ac_err=`grep -v '^ *+' conftest.out`
752if test -z "$ac_err"; then
753 :
754else
755 echo "$ac_err" >&5
8b701284
ILT
756 echo "configure: failed program was:" >&5
757 cat conftest.$ac_ext >&5
5436fc65
C
758 rm -rf conftest*
759 CPP=/lib/cpp
760fi
761rm -f conftest*
762fi
763rm -f conftest*
764 ac_cv_prog_CPP="$CPP"
765fi
dedcc91d
SC
766 CPP="$ac_cv_prog_CPP"
767else
768 ac_cv_prog_CPP="$CPP"
5436fc65 769fi
5436fc65
C
770echo "$ac_t""$CPP" 1>&6
771
772echo $ac_n "checking for AIX""... $ac_c" 1>&6
8b701284 773echo "configure:774: checking for AIX" >&5
5436fc65 774cat > conftest.$ac_ext <<EOF
8b701284 775#line 776 "configure"
5436fc65
C
776#include "confdefs.h"
777#ifdef _AIX
778 yes
779#endif
780
781EOF
782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
783 egrep "yes" >/dev/null 2>&1; then
784 rm -rf conftest*
785 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
786#define _ALL_SOURCE 1
787EOF
788
789else
790 rm -rf conftest*
791 echo "$ac_t""no" 1>&6
792fi
793rm -f conftest*
794
795
8b701284 796ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
5436fc65 797echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
8b701284 798echo "configure:799: checking for minix/config.h" >&5
5436fc65
C
799if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801else
802 cat > conftest.$ac_ext <<EOF
8b701284 803#line 804 "configure"
5436fc65
C
804#include "confdefs.h"
805#include <minix/config.h>
806EOF
1a7b4b7c 807ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 808{ (eval echo configure:809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
809ac_err=`grep -v '^ *+' conftest.out`
810if test -z "$ac_err"; then
811 rm -rf conftest*
812 eval "ac_cv_header_$ac_safe=yes"
813else
814 echo "$ac_err" >&5
8b701284
ILT
815 echo "configure: failed program was:" >&5
816 cat conftest.$ac_ext >&5
5436fc65
C
817 rm -rf conftest*
818 eval "ac_cv_header_$ac_safe=no"
819fi
820rm -f conftest*
821fi
822if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
823 echo "$ac_t""yes" 1>&6
824 MINIX=yes
825else
826 echo "$ac_t""no" 1>&6
827MINIX=
828fi
829
830if test "$MINIX" = yes; then
831 cat >> confdefs.h <<\EOF
832#define _POSIX_SOURCE 1
833EOF
834
835 cat >> confdefs.h <<\EOF
836#define _POSIX_1_SOURCE 2
837EOF
838
839 cat >> confdefs.h <<\EOF
840#define _MINIX 1
841EOF
842
843fi
844
845echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
8b701284 846echo "configure:847: checking for POSIXized ISC" >&5
5436fc65
C
847if test -d /etc/conf/kconfig.d &&
848 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
849then
850 echo "$ac_t""yes" 1>&6
851 ISC=yes # If later tests want to check for ISC.
852 cat >> confdefs.h <<\EOF
853#define _POSIX_SOURCE 1
854EOF
855
856 if test "$GCC" = yes; then
857 CC="$CC -posix"
858 else
859 CC="$CC -Xp"
860 fi
861else
862 echo "$ac_t""no" 1>&6
863 ISC=
864fi
865
866
867ac_aux_dir=
868for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
869 if test -f $ac_dir/install-sh; then
870 ac_aux_dir=$ac_dir
871 ac_install_sh="$ac_aux_dir/install-sh -c"
872 break
873 elif test -f $ac_dir/install.sh; then
874 ac_aux_dir=$ac_dir
875 ac_install_sh="$ac_aux_dir/install.sh -c"
876 break
877 fi
878done
879if test -z "$ac_aux_dir"; then
880 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
881fi
882ac_config_guess=$ac_aux_dir/config.guess
883ac_config_sub=$ac_aux_dir/config.sub
884ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
885
0579b53d
GN
886
887# Do some error checking and defaulting for the host and target type.
888# The inputs are:
889# configure --host=HOST --target=TARGET --build=BUILD NONOPT
890#
891# The rules are:
892# 1. You are not allowed to specify --host, --target, and nonopt at the
893# same time.
894# 2. Host defaults to nonopt.
895# 3. If nonopt is not specified, then host defaults to the current host,
896# as determined by config.guess.
897# 4. Target and build default to nonopt.
898# 5. If nonopt is not specified, then target and build default to host.
899
900# The aliases save the names the user supplied, while $host etc.
901# will get canonicalized.
902case $host---$target---$nonopt in
903NONE---*---* | *---NONE---* | *---*---NONE) ;;
904*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
905esac
906
907
908# Make sure we can run config.sub.
909if $ac_config_sub sun4 >/dev/null 2>&1; then :
910else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
911fi
912
913echo $ac_n "checking host system type""... $ac_c" 1>&6
8b701284 914echo "configure:915: checking host system type" >&5
0579b53d
GN
915
916host_alias=$host
917case "$host_alias" in
918NONE)
919 case $nonopt in
920 NONE)
921 if host_alias=`$ac_config_guess`; then :
922 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
923 fi ;;
924 *) host_alias=$nonopt ;;
925 esac ;;
926esac
927
928host=`$ac_config_sub $host_alias`
8b701284
ILT
929host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
930host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
931host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
0579b53d
GN
932echo "$ac_t""$host" 1>&6
933
934echo $ac_n "checking target system type""... $ac_c" 1>&6
8b701284 935echo "configure:936: checking target system type" >&5
0579b53d
GN
936
937target_alias=$target
938case "$target_alias" in
939NONE)
940 case $nonopt in
941 NONE) target_alias=$host_alias ;;
942 *) target_alias=$nonopt ;;
943 esac ;;
944esac
945
946target=`$ac_config_sub $target_alias`
8b701284
ILT
947target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
948target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
949target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
0579b53d
GN
950echo "$ac_t""$target" 1>&6
951
952echo $ac_n "checking build system type""... $ac_c" 1>&6
8b701284 953echo "configure:954: checking build system type" >&5
0579b53d
GN
954
955build_alias=$build
956case "$build_alias" in
957NONE)
958 case $nonopt in
959 NONE) build_alias=$host_alias ;;
960 *) build_alias=$nonopt ;;
961 esac ;;
962esac
963
964build=`$ac_config_sub $build_alias`
8b701284
ILT
965build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
966build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
967build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
0579b53d
GN
968echo "$ac_t""$build" 1>&6
969
970test "$host_alias" != "$target_alias" &&
971 test "$program_prefix$program_suffix$program_transform_name" = \
972 NONENONEs,x,x, &&
973 program_prefix=${target_alias}-
974
975
5436fc65
C
976# Find a good install program. We prefer a C program (faster),
977# so one script is as good as another. But avoid the broken or
978# incompatible versions:
979# SysV /etc/install, /usr/sbin/install
980# SunOS /usr/etc/install
981# IRIX /sbin/install
982# AIX /bin/install
983# AFS /usr/afsws/bin/install, which mishandles nonexistent args
984# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
985# ./install, which can be erroneously created by make from ./install.sh.
986echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
8b701284 987echo "configure:988: checking for a BSD compatible install" >&5
5436fc65
C
988if test -z "$INSTALL"; then
989if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
990 echo $ac_n "(cached) $ac_c" 1>&6
991else
8b701284 992 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
5436fc65
C
993 for ac_dir in $PATH; do
994 # Account for people who put trailing slashes in PATH elements.
995 case "$ac_dir/" in
996 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
997 *)
998 # OSF1 and SCO ODT 3.0 have their own names for install.
999 for ac_prog in ginstall installbsd scoinst install; do
1000 if test -f $ac_dir/$ac_prog; then
1001 if test $ac_prog = install &&
1002 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1003 # AIX install. It has an incompatible calling convention.
1004 # OSF/1 installbsd also uses dspmsg, but is usable.
1005 :
1006 else
1007 ac_cv_path_install="$ac_dir/$ac_prog -c"
1008 break 2
1009 fi
1010 fi
1011 done
1012 ;;
1013 esac
1014 done
8b701284 1015 IFS="$ac_save_IFS"
1a7b4b7c 1016
5436fc65 1017fi
1a7b4b7c
DE
1018 if test "${ac_cv_path_install+set}" = set; then
1019 INSTALL="$ac_cv_path_install"
1020 else
1021 # As a last resort, use the slow shell script. We don't cache a
1022 # path for INSTALL within a source directory, because that will
1023 # break other packages using the cache if that directory is
1024 # removed, or if the path is relative.
1025 INSTALL="$ac_install_sh"
1026 fi
5436fc65
C
1027fi
1028echo "$ac_t""$INSTALL" 1>&6
1029
1030# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1031# It thinks the first close brace ends the variable substitution.
1032test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1033
1034test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1035
d8efbc66
FF
1036if test $host != $build; then
1037 ac_tool_prefix=${host_alias}-
1038else
1039 ac_tool_prefix=
1040fi
1041
1042# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1043set dummy ${ac_tool_prefix}ar; ac_word=$2
1044echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 1045echo "configure:1046: checking for $ac_word" >&5
d8efbc66
FF
1046if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1047 echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049 if test -n "$AR"; then
1050 ac_cv_prog_AR="$AR" # Let the user override the test.
1051else
1052 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1053 for ac_dir in $PATH; do
1054 test -z "$ac_dir" && ac_dir=.
1055 if test -f $ac_dir/$ac_word; then
1056 ac_cv_prog_AR="${ac_tool_prefix}ar"
1057 break
1058 fi
1059 done
1060 IFS="$ac_save_ifs"
1061 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1062fi
1063fi
1064AR="$ac_cv_prog_AR"
1065if test -n "$AR"; then
1066 echo "$ac_t""$AR" 1>&6
1067else
1068 echo "$ac_t""no" 1>&6
1069fi
1070
1071
1072
1073# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1074set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1075echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 1076echo "configure:1077: checking for $ac_word" >&5
d8efbc66
FF
1077if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1078 echo $ac_n "(cached) $ac_c" 1>&6
1079else
1080 if test -n "$RANLIB"; then
1081 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1082else
1083 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1084 for ac_dir in $PATH; do
1085 test -z "$ac_dir" && ac_dir=.
1086 if test -f $ac_dir/$ac_word; then
1087 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1088 break
1089 fi
1090 done
1091 IFS="$ac_save_ifs"
1092fi
1093fi
1094RANLIB="$ac_cv_prog_RANLIB"
1095if test -n "$RANLIB"; then
1096 echo "$ac_t""$RANLIB" 1>&6
1097else
1098 echo "$ac_t""no" 1>&6
1099fi
1100
1101
1102if test -z "$ac_cv_prog_RANLIB"; then
1103if test -n "$ac_tool_prefix"; then
1104 # Extract the first word of "ranlib", so it can be a program name with args.
5436fc65
C
1105set dummy ranlib; ac_word=$2
1106echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 1107echo "configure:1108: checking for $ac_word" >&5
5436fc65
C
1108if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1110else
1111 if test -n "$RANLIB"; then
1112 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1113else
1114 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 1115 for ac_dir in $PATH; do
5436fc65
C
1116 test -z "$ac_dir" && ac_dir=.
1117 if test -f $ac_dir/$ac_word; then
1118 ac_cv_prog_RANLIB="ranlib"
1119 break
1120 fi
1121 done
1122 IFS="$ac_save_ifs"
1123 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1124fi
1125fi
1126RANLIB="$ac_cv_prog_RANLIB"
1127if test -n "$RANLIB"; then
1128 echo "$ac_t""$RANLIB" 1>&6
1129else
1130 echo "$ac_t""no" 1>&6
1131fi
1132
d8efbc66
FF
1133else
1134 RANLIB=":"
1135fi
1136fi
1137
204c8825
FF
1138for ac_prog in 'bison -y' byacc
1139do
1140# Extract the first word of "$ac_prog", so it can be a program name with args.
1141set dummy $ac_prog; ac_word=$2
1142echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 1143echo "configure:1144: checking for $ac_word" >&5
204c8825
FF
1144if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1145 echo $ac_n "(cached) $ac_c" 1>&6
1146else
1147 if test -n "$YACC"; then
1148 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1149else
1150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1151 for ac_dir in $PATH; do
1152 test -z "$ac_dir" && ac_dir=.
1153 if test -f $ac_dir/$ac_word; then
1154 ac_cv_prog_YACC="$ac_prog"
1155 break
1156 fi
1157 done
1158 IFS="$ac_save_ifs"
1159fi
1160fi
1161YACC="$ac_cv_prog_YACC"
1162if test -n "$YACC"; then
1163 echo "$ac_t""$YACC" 1>&6
1164else
1165 echo "$ac_t""no" 1>&6
1166fi
1167
1168test -n "$YACC" && break
1169done
1170test -n "$YACC" || YACC="yacc"
1171
d8efbc66
FF
1172for ac_prog in mawk gawk nawk awk
1173do
1174# Extract the first word of "$ac_prog", so it can be a program name with args.
1175set dummy $ac_prog; ac_word=$2
1176echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8b701284 1177echo "configure:1178: checking for $ac_word" >&5
d8efbc66
FF
1178if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1179 echo $ac_n "(cached) $ac_c" 1>&6
1180else
1181 if test -n "$AWK"; then
1182 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1183else
1184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1185 for ac_dir in $PATH; do
1186 test -z "$ac_dir" && ac_dir=.
1187 if test -f $ac_dir/$ac_word; then
1188 ac_cv_prog_AWK="$ac_prog"
1189 break
1190 fi
1191 done
1192 IFS="$ac_save_ifs"
1193fi
1194fi
1195AWK="$ac_cv_prog_AWK"
1196if test -n "$AWK"; then
1197 echo "$ac_t""$AWK" 1>&6
1198else
1199 echo "$ac_t""no" 1>&6
1200fi
1201
1202test -n "$AWK" && break
1203done
1204
5436fc65
C
1205
1206ac_aux_dir=
1207for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1208 if test -f $ac_dir/install-sh; then
1209 ac_aux_dir=$ac_dir
1210 ac_install_sh="$ac_aux_dir/install-sh -c"
1211 break
1212 elif test -f $ac_dir/install.sh; then
1213 ac_aux_dir=$ac_dir
1214 ac_install_sh="$ac_aux_dir/install.sh -c"
1215 break
1216 fi
1217done
1218if test -z "$ac_aux_dir"; then
1219 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1220fi
1221ac_config_guess=$ac_aux_dir/config.guess
1222ac_config_sub=$ac_aux_dir/config.sub
1223ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1224
5436fc65
C
1225if test "$program_transform_name" = s,x,x,; then
1226 program_transform_name=
1227else
1a7b4b7c
DE
1228 # Double any \ or $. echo might interpret backslashes.
1229 cat <<\EOF_SED > conftestsed
1230s,\\,\\\\,g; s,\$,$$,g
1231EOF_SED
5436fc65
C
1232 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1233 rm -f conftestsed
1234fi
1235test "$program_prefix" != NONE &&
1236 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1237# Use a double $ so make ignores it.
1238test "$program_suffix" != NONE &&
1239 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1240
1241# sed with no file args requires a program.
1242test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1243
1244
2b576293 1245echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8b701284 1246echo "configure:1247: checking for ANSI C header files" >&5
2b576293
C
1247if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1249else
1250 cat > conftest.$ac_ext <<EOF
8b701284 1251#line 1252 "configure"
2b576293
C
1252#include "confdefs.h"
1253#include <stdlib.h>
1254#include <stdarg.h>
1255#include <string.h>
1256#include <float.h>
1257EOF
1a7b4b7c 1258ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 1259{ (eval echo configure:1260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2b576293
C
1260ac_err=`grep -v '^ *+' conftest.out`
1261if test -z "$ac_err"; then
1262 rm -rf conftest*
1263 ac_cv_header_stdc=yes
1264else
1265 echo "$ac_err" >&5
8b701284
ILT
1266 echo "configure: failed program was:" >&5
1267 cat conftest.$ac_ext >&5
2b576293
C
1268 rm -rf conftest*
1269 ac_cv_header_stdc=no
1270fi
1271rm -f conftest*
1272
1273if test $ac_cv_header_stdc = yes; then
1274 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1275cat > conftest.$ac_ext <<EOF
8b701284 1276#line 1277 "configure"
2b576293
C
1277#include "confdefs.h"
1278#include <string.h>
1279EOF
1280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1281 egrep "memchr" >/dev/null 2>&1; then
1282 :
1283else
1284 rm -rf conftest*
1285 ac_cv_header_stdc=no
1286fi
1287rm -f conftest*
1288
1289fi
1290
1291if test $ac_cv_header_stdc = yes; then
1292 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1293cat > conftest.$ac_ext <<EOF
8b701284 1294#line 1295 "configure"
2b576293
C
1295#include "confdefs.h"
1296#include <stdlib.h>
1297EOF
1298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1299 egrep "free" >/dev/null 2>&1; then
1300 :
1301else
1302 rm -rf conftest*
1303 ac_cv_header_stdc=no
1304fi
1305rm -f conftest*
1306
1307fi
1308
1309if test $ac_cv_header_stdc = yes; then
1310 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1311if test "$cross_compiling" = yes; then
1a7b4b7c 1312 :
2b576293 1313else
8b701284
ILT
1314 cat > conftest.$ac_ext <<EOF
1315#line 1316 "configure"
2b576293
C
1316#include "confdefs.h"
1317#include <ctype.h>
1318#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1319#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1320#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1321int main () { int i; for (i = 0; i < 256; i++)
1322if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1323exit (0); }
1324
1325EOF
8b701284
ILT
1326if { (eval echo configure:1327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1327then
2b576293
C
1328 :
1329else
8b701284
ILT
1330 echo "configure: failed program was:" >&5
1331 cat conftest.$ac_ext >&5
1332 rm -fr conftest*
2b576293
C
1333 ac_cv_header_stdc=no
1334fi
2b576293 1335rm -fr conftest*
8b701284
ILT
1336fi
1337
2b576293
C
1338fi
1339fi
1a7b4b7c 1340
2b576293
C
1341echo "$ac_t""$ac_cv_header_stdc" 1>&6
1342if test $ac_cv_header_stdc = yes; then
1343 cat >> confdefs.h <<\EOF
1344#define STDC_HEADERS 1
1345EOF
1346
1347fi
1348
0db3fe94 1349for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h
1a494973 1350do
8b701284 1351ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1a494973 1352echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8b701284 1353echo "configure:1354: checking for $ac_hdr" >&5
1a494973
C
1354if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1355 echo $ac_n "(cached) $ac_c" 1>&6
1356else
1357 cat > conftest.$ac_ext <<EOF
8b701284 1358#line 1359 "configure"
1a494973
C
1359#include "confdefs.h"
1360#include <$ac_hdr>
1361EOF
1a7b4b7c 1362ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 1363{ (eval echo configure:1364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1a494973
C
1364ac_err=`grep -v '^ *+' conftest.out`
1365if test -z "$ac_err"; then
1366 rm -rf conftest*
1367 eval "ac_cv_header_$ac_safe=yes"
1368else
1369 echo "$ac_err" >&5
8b701284
ILT
1370 echo "configure: failed program was:" >&5
1371 cat conftest.$ac_ext >&5
1a494973
C
1372 rm -rf conftest*
1373 eval "ac_cv_header_$ac_safe=no"
1374fi
1375rm -f conftest*
1376fi
1377if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1378 echo "$ac_t""yes" 1>&6
8b701284 1379 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1a494973
C
1380 cat >> confdefs.h <<EOF
1381#define $ac_tr_hdr 1
1382EOF
1383
1384else
1385 echo "$ac_t""no" 1>&6
1386fi
1387done
1388
2b576293 1389echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
8b701284 1390echo "configure:1391: checking whether stat file-mode macros are broken" >&5
2b576293
C
1391if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1392 echo $ac_n "(cached) $ac_c" 1>&6
1393else
1394 cat > conftest.$ac_ext <<EOF
8b701284 1395#line 1396 "configure"
2b576293
C
1396#include "confdefs.h"
1397#include <sys/types.h>
1398#include <sys/stat.h>
1399
1400#if defined(S_ISBLK) && defined(S_IFDIR)
1401# if S_ISBLK (S_IFDIR)
1402You lose.
1403# endif
1404#endif
1405
1406#if defined(S_ISBLK) && defined(S_IFCHR)
1407# if S_ISBLK (S_IFCHR)
1408You lose.
1409# endif
1410#endif
1411
1412#if defined(S_ISLNK) && defined(S_IFREG)
1413# if S_ISLNK (S_IFREG)
1414You lose.
1415# endif
1416#endif
1417
1418#if defined(S_ISSOCK) && defined(S_IFREG)
1419# if S_ISSOCK (S_IFREG)
1420You lose.
1421# endif
1422#endif
1423
1424EOF
1425if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1426 egrep "You lose" >/dev/null 2>&1; then
1427 rm -rf conftest*
1428 ac_cv_header_stat_broken=yes
1429else
1430 rm -rf conftest*
1431 ac_cv_header_stat_broken=no
1432fi
1433rm -f conftest*
1434
1435fi
1a7b4b7c 1436
2b576293
C
1437echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1438if test $ac_cv_header_stat_broken = yes; then
1439 cat >> confdefs.h <<\EOF
1440#define STAT_MACROS_BROKEN 1
1441EOF
1442
1443fi
1444
1445
8501c742 1446echo $ac_n "checking for working const""... $ac_c" 1>&6
8b701284 1447echo "configure:1448: checking for working const" >&5
8501c742
SG
1448if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1449 echo $ac_n "(cached) $ac_c" 1>&6
1450else
1451 cat > conftest.$ac_ext <<EOF
8b701284 1452#line 1453 "configure"
8501c742
SG
1453#include "confdefs.h"
1454
8b701284 1455int main() {
8501c742
SG
1456
1457/* Ultrix mips cc rejects this. */
1458typedef int charset[2]; const charset x;
1459/* SunOS 4.1.1 cc rejects this. */
1460char const *const *ccp;
1461char **p;
1462/* NEC SVR4.0.2 mips cc rejects this. */
1463struct point {int x, y;};
1464static struct point const zero = {0,0};
1465/* AIX XL C 1.02.0.0 rejects this.
1466 It does not let you subtract one const X* pointer from another in an arm
1467 of an if-expression whose if-part is not a constant expression */
1468const char *g = "string";
1469ccp = &g + (g ? g-g : 0);
1470/* HPUX 7.0 cc rejects these. */
1471++ccp;
1472p = (char**) ccp;
1473ccp = (char const *const *) p;
1474{ /* SCO 3.2v4 cc rejects this. */
1475 char *t;
1476 char const *s = 0 ? (char *) 0 : (char const *) 0;
1477
1478 *t++ = 0;
1479}
1480{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1481 int x[] = {25, 17};
1482 const int *foo = &x[0];
1483 ++foo;
1484}
1485{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1486 typedef const int *iptr;
1487 iptr p = 0;
1488 ++p;
1489}
1490{ /* AIX XL C 1.02.0.0 rejects this saying
1491 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1492 struct s { int j; const int *ap[3]; };
1493 struct s *b; b->j = 5;
1494}
1495{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1496 const int foo = 10;
1497}
1498
1499; return 0; }
1500EOF
8b701284 1501if { (eval echo configure:1502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8501c742
SG
1502 rm -rf conftest*
1503 ac_cv_c_const=yes
1504else
8b701284
ILT
1505 echo "configure: failed program was:" >&5
1506 cat conftest.$ac_ext >&5
8501c742
SG
1507 rm -rf conftest*
1508 ac_cv_c_const=no
1509fi
1510rm -f conftest*
8501c742
SG
1511fi
1512
1513echo "$ac_t""$ac_cv_c_const" 1>&6
1514if test $ac_cv_c_const = no; then
1515 cat >> confdefs.h <<\EOF
1516#define const
1517EOF
1518
1519fi
1520
1521
5d394f70 1522for ac_func in setpgid sbrk select poll
72ae15f6
FF
1523do
1524echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8b701284 1525echo "configure:1526: checking for $ac_func" >&5
72ae15f6
FF
1526if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1527 echo $ac_n "(cached) $ac_c" 1>&6
1528else
1529 cat > conftest.$ac_ext <<EOF
8b701284 1530#line 1531 "configure"
72ae15f6
FF
1531#include "confdefs.h"
1532/* System header to define __stub macros and hopefully few prototypes,
1533 which can conflict with char $ac_func(); below. */
1534#include <assert.h>
1535/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
1536/* We use char because int might match the return type of a gcc2
1537 builtin and then its argument prototype would still apply. */
1a7b4b7c 1538char $ac_func();
72ae15f6 1539
8b701284 1540int main() {
72ae15f6
FF
1541
1542/* The GNU C library defines this for functions which it implements
1543 to always fail with ENOSYS. Some functions are actually named
1544 something starting with __ and the normal name is an alias. */
1545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1546choke me
1547#else
1548$ac_func();
1549#endif
1550
1551; return 0; }
1552EOF
8b701284 1553if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
72ae15f6
FF
1554 rm -rf conftest*
1555 eval "ac_cv_func_$ac_func=yes"
1556else
8b701284
ILT
1557 echo "configure: failed program was:" >&5
1558 cat conftest.$ac_ext >&5
72ae15f6
FF
1559 rm -rf conftest*
1560 eval "ac_cv_func_$ac_func=no"
1561fi
1562rm -f conftest*
72ae15f6 1563fi
8b701284 1564
72ae15f6
FF
1565if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1566 echo "$ac_t""yes" 1>&6
1a7b4b7c 1567 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
72ae15f6
FF
1568 cat >> confdefs.h <<EOF
1569#define $ac_tr_func 1
1570EOF
1571
1572else
1573 echo "$ac_t""no" 1>&6
1574fi
1575done
1576
1577
0d4c1152
FF
1578# If we are configured native on Linux, work around problems with sys/procfs.h
1579if test "${target}" = "${host}"; then
1580 case "${host}" in
1581 i345686-*-linux*)
1582 cat >> confdefs.h <<\EOF
1583#define START_INFERIOR_TRAPS_EXPECTED "2"
1584EOF
1585
1586 cat >> confdefs.h <<\EOF
1587#define sys_quotactl 1
1588EOF
1589
1590 ;;
1591 esac
1592fi
1593
4708ac65 1594echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
8b701284 1595echo "configure:1596: checking for gregset_t type" >&5
07b77f5c 1596if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
4708ac65
FF
1597 echo $ac_n "(cached) $ac_c" 1>&6
1598else
1599 cat > conftest.$ac_ext <<EOF
8b701284 1600#line 1601 "configure"
4708ac65
FF
1601#include "confdefs.h"
1602#include <sys/procfs.h>
8b701284 1603int main() {
4708ac65
FF
1604gregset_t *gregsetp = 0
1605; return 0; }
1606EOF
8b701284 1607if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4708ac65 1608 rm -rf conftest*
07b77f5c 1609 gdb_cv_have_gregset_t=yes
4708ac65 1610else
8b701284
ILT
1611 echo "configure: failed program was:" >&5
1612 cat conftest.$ac_ext >&5
4708ac65 1613 rm -rf conftest*
07b77f5c 1614 gdb_cv_have_gregset_t=no
4708ac65
FF
1615fi
1616rm -f conftest*
4708ac65
FF
1617fi
1618
07b77f5c
FF
1619echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
1620if test $gdb_cv_have_gregset_t = yes; then
4708ac65
FF
1621 cat >> confdefs.h <<\EOF
1622#define HAVE_GREGSET_T 1
1623EOF
1624
1625fi
1626
1627echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
8b701284 1628echo "configure:1629: checking for fpregset_t type" >&5
07b77f5c 1629if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
4708ac65
FF
1630 echo $ac_n "(cached) $ac_c" 1>&6
1631else
1632 cat > conftest.$ac_ext <<EOF
8b701284 1633#line 1634 "configure"
4708ac65
FF
1634#include "confdefs.h"
1635#include <sys/procfs.h>
8b701284 1636int main() {
4708ac65
FF
1637fpregset_t *fpregsetp = 0
1638; return 0; }
1639EOF
8b701284 1640if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4708ac65 1641 rm -rf conftest*
07b77f5c 1642 gdb_cv_have_fpregset_t=yes
4708ac65 1643else
8b701284
ILT
1644 echo "configure: failed program was:" >&5
1645 cat conftest.$ac_ext >&5
4708ac65 1646 rm -rf conftest*
07b77f5c 1647 gdb_cv_have_fpregset_t=no
4708ac65
FF
1648fi
1649rm -f conftest*
4708ac65
FF
1650fi
1651
07b77f5c
FF
1652echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
1653if test $gdb_cv_have_fpregset_t = yes; then
4708ac65
FF
1654 cat >> confdefs.h <<\EOF
1655#define HAVE_FPREGSET_T 1
1656EOF
1657
1658fi
1659
aa220473 1660
3f550b59 1661echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
8b701284 1662echo "configure:1663: checking for long long support in compiler" >&5
3f550b59
FF
1663if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1665else
1666 cat > conftest.$ac_ext <<EOF
8b701284 1667#line 1668 "configure"
3f550b59
FF
1668#include "confdefs.h"
1669
8b701284 1670int main() {
80f600a4 1671
d538f9cf
FF
1672 extern long long foo;
1673 switch (foo & 2) { case 0: return 1; }
1674
3f550b59
FF
1675; return 0; }
1676EOF
8b701284 1677if { (eval echo configure:1678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3f550b59
FF
1678 rm -rf conftest*
1679 gdb_cv_c_long_long=yes
1680else
8b701284
ILT
1681 echo "configure: failed program was:" >&5
1682 cat conftest.$ac_ext >&5
3f550b59
FF
1683 rm -rf conftest*
1684 gdb_cv_c_long_long=no
1685fi
1686rm -f conftest*
3f550b59
FF
1687fi
1688
1689echo "$ac_t""$gdb_cv_c_long_long" 1>&6
1690if test $gdb_cv_c_long_long = yes; then
1691 cat >> confdefs.h <<\EOF
1692#define CC_HAS_LONG_LONG 1
1693EOF
1694
1695fi
1696
1697
1698echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
8b701284 1699echo "configure:1700: checking for long long support in printf" >&5
3f550b59
FF
1700if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
1701 echo $ac_n "(cached) $ac_c" 1>&6
1702else
1703 if test "$cross_compiling" = yes; then
1704 gdb_cv_printf_has_long_long=no
1705else
8b701284
ILT
1706 cat > conftest.$ac_ext <<EOF
1707#line 1708 "configure"
3f550b59
FF
1708#include "confdefs.h"
1709
1710int main () {
1711 char buf[16];
1712 long long l = 0x12345;
1713 sprintf (buf, "%llx", l);
1714 return (strcmp ("12345", buf));
1715}
1716EOF
8b701284
ILT
1717if { (eval echo configure:1718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1718then
3f550b59
FF
1719 gdb_cv_printf_has_long_long=yes
1720else
8b701284
ILT
1721 echo "configure: failed program was:" >&5
1722 cat conftest.$ac_ext >&5
1723 rm -fr conftest*
3f550b59
FF
1724 gdb_cv_printf_has_long_long=no
1725fi
3f550b59
FF
1726rm -fr conftest*
1727fi
1728
8b701284
ILT
1729fi
1730
3f550b59
FF
1731if test $gdb_cv_printf_has_long_long = yes; then
1732 cat >> confdefs.h <<\EOF
1733#define PRINTF_HAS_LONG_LONG 1
1734EOF
1735
1736fi
1737echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
1738
1739
07b77f5c 1740echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8b701284 1741echo "configure:1742: checking for long double support in compiler" >&5
aa220473
SG
1742if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
1743 echo $ac_n "(cached) $ac_c" 1>&6
1744else
1745 cat > conftest.$ac_ext <<EOF
8b701284 1746#line 1747 "configure"
aa220473
SG
1747#include "confdefs.h"
1748
8b701284 1749int main() {
aa220473
SG
1750long double foo;
1751; return 0; }
1752EOF
8b701284 1753if { (eval echo configure:1754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
aa220473
SG
1754 rm -rf conftest*
1755 ac_cv_c_long_double=yes
1756else
8b701284
ILT
1757 echo "configure: failed program was:" >&5
1758 cat conftest.$ac_ext >&5
aa220473
SG
1759 rm -rf conftest*
1760 ac_cv_c_long_double=no
1761fi
1762rm -f conftest*
aa220473
SG
1763fi
1764
1765echo "$ac_t""$ac_cv_c_long_double" 1>&6
1766if test $ac_cv_c_long_double = yes; then
1767 cat >> confdefs.h <<\EOF
1768#define HAVE_LONG_DOUBLE 1
1769EOF
1770
1771fi
1772
07b77f5c
FF
1773
1774echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8b701284 1775echo "configure:1776: checking for long double support in printf" >&5
07b77f5c
FF
1776if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
1777 echo $ac_n "(cached) $ac_c" 1>&6
1778else
1779 if test "$cross_compiling" = yes; then
1780 gdb_cv_printf_has_long_double=no
1781else
8b701284
ILT
1782 cat > conftest.$ac_ext <<EOF
1783#line 1784 "configure"
07b77f5c
FF
1784#include "confdefs.h"
1785
1786int main () {
1787 char buf[16];
1788 long double f = 3.141592653;
1789 sprintf (buf, "%Lg", f);
1790 return (strncmp ("3.14159", buf, 7));
1791}
1792EOF
8b701284
ILT
1793if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1794then
07b77f5c
FF
1795 gdb_cv_printf_has_long_double=yes
1796else
8b701284
ILT
1797 echo "configure: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 rm -fr conftest*
07b77f5c
FF
1800 gdb_cv_printf_has_long_double=no
1801fi
07b77f5c
FF
1802rm -fr conftest*
1803fi
1804
8b701284
ILT
1805fi
1806
07b77f5c
FF
1807if test $gdb_cv_printf_has_long_double = yes; then
1808 cat >> confdefs.h <<\EOF
1809#define PRINTF_HAS_LONG_DOUBLE 1
1810EOF
1811
1812fi
1813echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
1814
8b701284
ILT
1815for ac_hdr in unistd.h
1816do
1817ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1818echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1819echo "configure:1820: checking for $ac_hdr" >&5
1820if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1821 echo $ac_n "(cached) $ac_c" 1>&6
1822else
1823 cat > conftest.$ac_ext <<EOF
1824#line 1825 "configure"
1825#include "confdefs.h"
1826#include <$ac_hdr>
1827EOF
1828ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1829{ (eval echo configure:1830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1830ac_err=`grep -v '^ *+' conftest.out`
1831if test -z "$ac_err"; then
1832 rm -rf conftest*
1833 eval "ac_cv_header_$ac_safe=yes"
1834else
1835 echo "$ac_err" >&5
1836 echo "configure: failed program was:" >&5
1837 cat conftest.$ac_ext >&5
1838 rm -rf conftest*
1839 eval "ac_cv_header_$ac_safe=no"
1840fi
1841rm -f conftest*
1842fi
1843if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1844 echo "$ac_t""yes" 1>&6
1845 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1846 cat >> confdefs.h <<EOF
1847#define $ac_tr_hdr 1
1848EOF
1849
1850else
1851 echo "$ac_t""no" 1>&6
1852fi
1853done
1854
1855for ac_func in getpagesize
1a7b4b7c
DE
1856do
1857echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8b701284 1858echo "configure:1859: checking for $ac_func" >&5
1a7b4b7c
DE
1859if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1860 echo $ac_n "(cached) $ac_c" 1>&6
1861else
1862 cat > conftest.$ac_ext <<EOF
8b701284 1863#line 1864 "configure"
1a7b4b7c
DE
1864#include "confdefs.h"
1865/* System header to define __stub macros and hopefully few prototypes,
1866 which can conflict with char $ac_func(); below. */
1867#include <assert.h>
1868/* Override any gcc2 internal prototype to avoid an error. */
bc859e63
SG
1869/* We use char because int might match the return type of a gcc2
1870 builtin and then its argument prototype would still apply. */
1a7b4b7c
DE
1871char $ac_func();
1872
8b701284 1873int main() {
1a7b4b7c
DE
1874
1875/* The GNU C library defines this for functions which it implements
1876 to always fail with ENOSYS. Some functions are actually named
1877 something starting with __ and the normal name is an alias. */
1878#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1879choke me
1880#else
1881$ac_func();
1882#endif
1883
1884; return 0; }
1885EOF
8b701284 1886if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1a7b4b7c
DE
1887 rm -rf conftest*
1888 eval "ac_cv_func_$ac_func=yes"
1889else
8b701284
ILT
1890 echo "configure: failed program was:" >&5
1891 cat conftest.$ac_ext >&5
1a7b4b7c
DE
1892 rm -rf conftest*
1893 eval "ac_cv_func_$ac_func=no"
1894fi
1895rm -f conftest*
1a7b4b7c 1896fi
8b701284 1897
1a7b4b7c
DE
1898if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1899 echo "$ac_t""yes" 1>&6
1900 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1901 cat >> confdefs.h <<EOF
1902#define $ac_tr_func 1
1903EOF
1904
1905else
1906 echo "$ac_t""no" 1>&6
1907fi
1908done
1909
2b576293 1910echo $ac_n "checking for working mmap""... $ac_c" 1>&6
8b701284
ILT
1911echo "configure:1912: checking for working mmap" >&5
1912if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2b576293
C
1913 echo $ac_n "(cached) $ac_c" 1>&6
1914else
1915 if test "$cross_compiling" = yes; then
8b701284 1916 ac_cv_func_mmap_fixed_mapped=no
2b576293 1917else
8b701284
ILT
1918 cat > conftest.$ac_ext <<EOF
1919#line 1920 "configure"
2b576293
C
1920#include "confdefs.h"
1921
8b701284
ILT
1922/* Thanks to Mike Haertel and Jim Avera for this test.
1923 Here is a matrix of mmap possibilities:
1924 mmap private not fixed
1925 mmap private fixed at somewhere currently unmapped
1926 mmap private fixed at somewhere already mapped
1927 mmap shared not fixed
1928 mmap shared fixed at somewhere currently unmapped
1929 mmap shared fixed at somewhere already mapped
1930 For private mappings, we should verify that changes cannot be read()
1931 back from the file, nor mmap's back from the file at a different
1932 address. (There have been systems where private was not correctly
1933 implemented like the infamous i386 svr4.0, and systems where the
1934 VM page cache was not coherent with the filesystem buffer cache
1935 like early versions of FreeBSD and possibly contemporary NetBSD.)
1936 For shared mappings, we should conversely verify that changes get
1937 propogated back to all the places they're supposed to be.
1938
1939 Grep wants private fixed already mapped.
1940 The main things grep needs to know about mmap are:
1941 * does it exist and is it safe to write into the mmap'd area
1942 * how to use it (BSD variants) */
2b576293
C
1943#include <sys/types.h>
1944#include <fcntl.h>
1945#include <sys/mman.h>
1946
8b701284 1947/* This mess was copied from the GNU getpagesize.h. */
2b576293 1948#ifndef HAVE_GETPAGESIZE
8b701284
ILT
1949# ifdef HAVE_UNISTD_H
1950# include <unistd.h>
2b576293 1951# endif
2b576293 1952
8b701284
ILT
1953/* Assume that all systems that can run configure have sys/param.h. */
1954# ifndef HAVE_SYS_PARAM_H
1955# define HAVE_SYS_PARAM_H 1
1956# endif
1957
1958# ifdef _SC_PAGESIZE
1959# define getpagesize() sysconf(_SC_PAGESIZE)
1960# else /* no _SC_PAGESIZE */
1961# ifdef HAVE_SYS_PARAM_H
1962# include <sys/param.h>
1963# ifdef EXEC_PAGESIZE
1964# define getpagesize() EXEC_PAGESIZE
1965# else /* no EXEC_PAGESIZE */
1966# ifdef NBPG
1967# define getpagesize() NBPG * CLSIZE
1968# ifndef CLSIZE
1969# define CLSIZE 1
1970# endif /* no CLSIZE */
1971# else /* no NBPG */
1972# ifdef NBPC
1973# define getpagesize() NBPC
1974# else /* no NBPC */
1975# ifdef PAGESIZE
1976# define getpagesize() PAGESIZE
1977# endif /* PAGESIZE */
1978# endif /* no NBPC */
1979# endif /* no NBPG */
1980# endif /* no EXEC_PAGESIZE */
1981# else /* no HAVE_SYS_PARAM_H */
1982# define getpagesize() 8192 /* punt totally */
1983# endif /* no HAVE_SYS_PARAM_H */
1984# endif /* no _SC_PAGESIZE */
1985
1986#endif /* no HAVE_GETPAGESIZE */
2b576293
C
1987
1988#ifdef __cplusplus
8b701284 1989extern "C" { void *malloc(unsigned); }
2b576293 1990#else
8b701284 1991char *malloc();
2b576293
C
1992#endif
1993
1994int
1995main()
1996{
8b701284
ILT
1997 char *data, *data2, *data3;
1998 int i, pagesize;
1999 int fd;
2000
2001 pagesize = getpagesize();
2002
2003 /*
2004 * First, make a file with some known garbage in it.
2005 */
2006 data = malloc(pagesize);
2007 if (!data)
2008 exit(1);
2009 for (i = 0; i < pagesize; ++i)
2010 *(data + i) = rand();
2011 umask(0);
2012 fd = creat("conftestmmap", 0600);
2013 if (fd < 0)
2014 exit(1);
2015 if (write(fd, data, pagesize) != pagesize)
2016 exit(1);
2017 close(fd);
2018
2019 /*
2020 * Next, try to mmap the file at a fixed address which
2021 * already has something else allocated at it. If we can,
2022 * also make sure that we see the same garbage.
2023 */
2024 fd = open("conftestmmap", O_RDWR);
2025 if (fd < 0)
2026 exit(1);
2027 data2 = malloc(2 * pagesize);
2028 if (!data2)
2029 exit(1);
2030 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2031 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2032 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2033 exit(1);
2034 for (i = 0; i < pagesize; ++i)
2035 if (*(data + i) != *(data2 + i))
2036 exit(1);
2037
2038 /*
2039 * Finally, make sure that changes to the mapped area
2040 * do not percolate back to the file as seen by read().
2041 * (This is a bug on some variants of i386 svr4.0.)
2042 */
2043 for (i = 0; i < pagesize; ++i)
2044 *(data2 + i) = *(data2 + i) + 1;
2045 data3 = malloc(pagesize);
2046 if (!data3)
2047 exit(1);
2048 if (read(fd, data3, pagesize) != pagesize)
2049 exit(1);
2050 for (i = 0; i < pagesize; ++i)
2051 if (*(data + i) != *(data3 + i))
2052 exit(1);
2053 close(fd);
2054 unlink("conftestmmap");
2055 exit(0);
2b576293
C
2056}
2057
2058EOF
8b701284
ILT
2059if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2060then
2061 ac_cv_func_mmap_fixed_mapped=yes
2b576293 2062else
8b701284
ILT
2063 echo "configure: failed program was:" >&5
2064 cat conftest.$ac_ext >&5
2065 rm -fr conftest*
2066 ac_cv_func_mmap_fixed_mapped=no
2b576293
C
2067fi
2068rm -fr conftest*
2069fi
1a7b4b7c 2070
8b701284
ILT
2071fi
2072
2073echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2074if test $ac_cv_func_mmap_fixed_mapped = yes; then
2b576293
C
2075 cat >> confdefs.h <<\EOF
2076#define HAVE_MMAP 1
2077EOF
2078
2079fi
2080
5436fc65 2081
5819f35d 2082echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
8b701284 2083echo "configure:2084: checking whether malloc must be declared" >&5
5819f35d
SG
2084if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086else
2087 cat > conftest.$ac_ext <<EOF
8b701284 2088#line 2089 "configure"
5819f35d
SG
2089#include "confdefs.h"
2090
2091#include <stdio.h>
2092#ifdef HAVE_STRING_H
2093#include <string.h>
2094#else
2095#ifdef HAVE_STRINGS_H
2096#include <strings.h>
2097#endif
2098#endif
2099#ifdef HAVE_STDLIB_H
2100#include <stdlib.h>
2101#endif
2102#ifdef HAVE_UNISTD_H
2103#include <unistd.h>
2104#endif
8b701284 2105int main() {
5819f35d
SG
2106char *(*pfn) = (char *(*)) malloc
2107; return 0; }
2108EOF
8b701284 2109if { (eval echo configure:2110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
2110 rm -rf conftest*
2111 bfd_cv_decl_needed_malloc=no
2112else
8b701284
ILT
2113 echo "configure: failed program was:" >&5
2114 cat conftest.$ac_ext >&5
5819f35d
SG
2115 rm -rf conftest*
2116 bfd_cv_decl_needed_malloc=yes
2117fi
2118rm -f conftest*
5819f35d
SG
2119fi
2120
2121echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
2122if test $bfd_cv_decl_needed_malloc = yes; then
2123 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2124 cat >> confdefs.h <<EOF
2125#define $bfd_tr_decl 1
2126EOF
2127
2128fi
2129
2130echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
8b701284 2131echo "configure:2132: checking whether realloc must be declared" >&5
5819f35d
SG
2132if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
2133 echo $ac_n "(cached) $ac_c" 1>&6
2134else
2135 cat > conftest.$ac_ext <<EOF
8b701284 2136#line 2137 "configure"
5819f35d
SG
2137#include "confdefs.h"
2138
2139#include <stdio.h>
2140#ifdef HAVE_STRING_H
2141#include <string.h>
2142#else
2143#ifdef HAVE_STRINGS_H
2144#include <strings.h>
2145#endif
2146#endif
2147#ifdef HAVE_STDLIB_H
2148#include <stdlib.h>
2149#endif
2150#ifdef HAVE_UNISTD_H
2151#include <unistd.h>
2152#endif
8b701284 2153int main() {
5819f35d
SG
2154char *(*pfn) = (char *(*)) realloc
2155; return 0; }
2156EOF
8b701284 2157if { (eval echo configure:2158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
2158 rm -rf conftest*
2159 bfd_cv_decl_needed_realloc=no
2160else
8b701284
ILT
2161 echo "configure: failed program was:" >&5
2162 cat conftest.$ac_ext >&5
5819f35d
SG
2163 rm -rf conftest*
2164 bfd_cv_decl_needed_realloc=yes
2165fi
2166rm -f conftest*
5819f35d
SG
2167fi
2168
2169echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
2170if test $bfd_cv_decl_needed_realloc = yes; then
2171 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2172 cat >> confdefs.h <<EOF
2173#define $bfd_tr_decl 1
2174EOF
2175
2176fi
2177
2178echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
8b701284 2179echo "configure:2180: checking whether free must be declared" >&5
5819f35d
SG
2180if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2181 echo $ac_n "(cached) $ac_c" 1>&6
2182else
2183 cat > conftest.$ac_ext <<EOF
8b701284 2184#line 2185 "configure"
5819f35d
SG
2185#include "confdefs.h"
2186
2187#include <stdio.h>
2188#ifdef HAVE_STRING_H
2189#include <string.h>
2190#else
2191#ifdef HAVE_STRINGS_H
2192#include <strings.h>
2193#endif
2194#endif
2195#ifdef HAVE_STDLIB_H
2196#include <stdlib.h>
2197#endif
2198#ifdef HAVE_UNISTD_H
2199#include <unistd.h>
2200#endif
8b701284 2201int main() {
5819f35d
SG
2202char *(*pfn) = (char *(*)) free
2203; return 0; }
2204EOF
8b701284 2205if { (eval echo configure:2206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5819f35d
SG
2206 rm -rf conftest*
2207 bfd_cv_decl_needed_free=no
2208else
8b701284
ILT
2209 echo "configure: failed program was:" >&5
2210 cat conftest.$ac_ext >&5
5819f35d
SG
2211 rm -rf conftest*
2212 bfd_cv_decl_needed_free=yes
2213fi
2214rm -f conftest*
5819f35d
SG
2215fi
2216
2217echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2218if test $bfd_cv_decl_needed_free = yes; then
2219 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2220 cat >> confdefs.h <<EOF
2221#define $bfd_tr_decl 1
2222EOF
2223
2224fi
2225
fef1696f 2226
47ef0da5 2227
89e673a4
SG
2228
2229if test ${build} = ${host} -a ${host} = ${target} ; then
4915acad 2230 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
8b701284 2231echo "configure:2232: checking for Solaris thread debugging library" >&5
4915acad
SG
2232 if test -f /usr/lib/libthread_db.so.1 ; then
2233 echo "$ac_t""yes" 1>&6
2234 THREAD_DB_OBS=sol-thread.o
2235 cat >> confdefs.h <<\EOF
47ef0da5
SG
2236#define HAVE_THREAD_DB_LIB 1
2237EOF
2238
4915acad
SG
2239 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
2240 else
2241 echo "$ac_t""no" 1>&6
2242 fi
5d394f70
SG
2243 case ${host_os} in
2244 hpux*)
2245 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
8b701284 2246echo "configure:2247: checking for HPUX/OSF thread support" >&5
5d394f70
SG
2247 if test -f /usr/include/dce/cma_config.h ; then
2248 echo "$ac_t""yes" 1>&6
2249 cat >> confdefs.h <<\EOF
2250#define HAVE_HPUX_THREAD_SUPPORT 1
2251EOF
2252
2253 THREAD_DB_OBS=hpux-thread.o
2254 else
2255 echo "$ac_t""no" 1>&6
2256 fi
2257 ;;
2258 esac
4915acad
SG
2259
2260
89e673a4 2261fi
47ef0da5 2262
5436fc65
C
2263ENABLE_CFLAGS=
2264ENABLE_CLIBS=
2265ENABLE_OBS=
2266
2267# Check whether --enable-netrom or --disable-netrom was given.
1a7b4b7c
DE
2268if test "${enable_netrom+set}" = set; then
2269 enableval="$enable_netrom"
5436fc65
C
2270 case "${enableval}" in
2271yes) enable_netrom=yes ;;
2272no) enable_netrom=no ;;
2273*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
2274esac
2275fi
2276
2277
2278if test "${enable_netrom}" = "yes"; then
2279 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
2280fi
2281
188c635f
SG
2282# start-sanitize-gm
2283ENABLE_GM=
2284
2285# Check whether --enable-gm or --disable-gm was given.
1a7b4b7c
DE
2286if test "${enable_gm+set}" = set; then
2287 enableval="$enable_gm"
188c635f 2288 case "${enableval}" in
1a57cd09 2289yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
2290 ENABLE_CFLAGS=-DGENERAL_MAGIC
2291 ;;
2292no) ;;
2293*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
2294esac
2295fi
2296
2297
2298# end-sanitize-gm
2299
3c0bf315 2300# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
1a7b4b7c
DE
2301if test "${enable_sim_powerpc+set}" = set; then
2302 enableval="$enable_sim_powerpc"
3c0bf315
MM
2303 case "${enableval}" in
2304yes) powerpc_sim=yes ;;
2305no) powerpc_sim=no ;;
2306*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
2307esac
2308else
2309 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
2310fi
2311
2312
5436fc65
C
2313# start-sanitize-gdbtk
2314ENABLE_GDBTK=
2315
2316# Check whether --enable-gdbtk or --disable-gdbtk was given.
1a7b4b7c
DE
2317if test "${enable_gdbtk+set}" = set; then
2318 enableval="$enable_gdbtk"
5436fc65 2319 case "${enableval}" in
0fe1522a
SG
2320 yes)
2321 case "$host" in
2322 *go32*)
2323 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
2324 enable_gdbtk=no ;;
d9951af4 2325 *cygwin32* | *windows*)
b613bfbf
GN
2326 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
2327 enable_gdbtk=no ;;
0fe1522a
SG
2328 *)
2329 enable_gdbtk=yes ;;
2330 esac ;;
2331 no)
2332 enable_gdbtk=no ;;
2333 *)
2334 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 2335esac
0fe1522a
SG
2336else
2337
b613bfbf 2338# Default is on for everything but go32 and cygwin32
0fe1522a 2339case "$host" in
d9951af4 2340 *go32* | *cygwin32* | *windows*)
b613bfbf 2341 ;;
0fe1522a
SG
2342 *)
2343 enable_gdbtk=yes ;;
2344 esac
2345
5436fc65
C
2346fi
2347
2348
2349if test "${enable_gdbtk}" = "yes"; then
0fe1522a 2350
047465fd
TT
2351
2352#
2353# Ok, lets find the tcl configuration
2354# First, look for one uninstalled.
2355# the alternative search directory is invoked by --with-tclconfig
2356#
5436fc65 2357
047465fd
TT
2358if test x"${no_tcl}" = x ; then
2359 # we reset no_tcl in case something fails here
2360 no_tcl=true
2361 # Check whether --with-tclconfig or --without-tclconfig was given.
2362if test "${with_tclconfig+set}" = set; then
2363 withval="$with_tclconfig"
2364 with_tclconfig=${withval}
5436fc65
C
2365fi
2366
047465fd 2367 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
8b701284 2368echo "configure:2369: checking for Tcl configuration" >&5
047465fd 2369 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5436fc65
C
2370 echo $ac_n "(cached) $ac_c" 1>&6
2371else
047465fd 2372
1a7b4b7c 2373
047465fd
TT
2374 # First check to see if --with-tclconfig was specified.
2375 if test x"${with_tclconfig}" != x ; then
2376 if test -f "${with_tclconfig}/tclConfig.sh" ; then
2377 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
2378 else
2379 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5436fc65 2380 fi
047465fd 2381 fi
5436fc65 2382
047465fd
TT
2383 # then check for a private Tcl installation
2384 if test x"${ac_cv_c_tclconfig}" = x ; then
2385 for i in \
2386 ../tcl \
2387 `ls -dr ../tcl[7-9]* 2>/dev/null` \
2388 ../../tcl \
2389 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
2390 ../../../tcl \
2391 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
2392 if test -f "$i/unix/tclConfig.sh" ; then
2393 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2394 break
2395 fi
2396 done
2397 fi
2398 # check in a few common install locations
2399 if test x"${ac_cv_c_tclconfig}" = x ; then
2400 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2401 if test -f "$i/tclConfig.sh" ; then
2402 ac_cv_c_tclconfig=`(cd $i; pwd)`
2403 break
2404 fi
2405 done
2406 fi
2407 # check in a few other private locations
2408 if test x"${ac_cv_c_tclconfig}" = x ; then
2409 for i in \
2410 ${srcdir}/../tcl \
2411 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
2412 if test -f "$i/unix/tclConfig.sh" ; then
2413 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2414 break
2415 fi
2416 done
2417 fi
2418
5436fc65 2419fi
1a7b4b7c 2420
047465fd
TT
2421 if test x"${ac_cv_c_tclconfig}" = x ; then
2422 TCLCONFIG="# no Tcl configs found"
2423 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
2424 else
2425 no_tcl=
2426 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
2427 echo "$ac_t""found $TCLCONFIG" 1>&6
5436fc65 2428 fi
5436fc65
C
2429fi
2430
0cf433d9
ILT
2431 if test -z "${no_tcl}"; then
2432
047465fd 2433 . $TCLCONFIG
5436fc65 2434
047465fd
TT
2435
2436
2437
2438
2439
5436fc65 2440
5436fc65 2441
5436fc65 2442
5436fc65 2443
047465fd
TT
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
5436fc65 2456
5436fc65 2457
5436fc65 2458
0cf433d9 2459
047465fd
TT
2460#
2461# Ok, lets find the tk configuration
2462# First, look for one uninstalled.
2463# the alternative search directory is invoked by --with-tkconfig
2464#
5436fc65 2465
047465fd
TT
2466if test x"${no_tk}" = x ; then
2467 # we reset no_tk in case something fails here
2468 no_tk=true
2469 # Check whether --with-tkconfig or --without-tkconfig was given.
2470if test "${with_tkconfig+set}" = set; then
2471 withval="$with_tkconfig"
2472 with_tkconfig=${withval}
5436fc65
C
2473fi
2474
047465fd 2475 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
8b701284 2476echo "configure:2477: checking for Tk configuration" >&5
047465fd 2477 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5436fc65
C
2478 echo $ac_n "(cached) $ac_c" 1>&6
2479else
047465fd 2480
5436fc65 2481
047465fd
TT
2482 # First check to see if --with-tkconfig was specified.
2483 if test x"${with_tkconfig}" != x ; then
2484 if test -f "${with_tkconfig}/tkConfig.sh" ; then
2485 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
2486 else
2487 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5436fc65 2488 fi
047465fd 2489 fi
5436fc65 2490
047465fd
TT
2491 # then check for a private Tk library
2492 if test x"${ac_cv_c_tkconfig}" = x ; then
2493 for i in \
2494 ../tk \
2495 `ls -dr ../tk[4-9]* 2>/dev/null` \
2496 ../../tk \
2497 `ls -dr ../../tk[4-9]* 2>/dev/null` \
2498 ../../../tk \
2499 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
2500 if test -f "$i/unix/tkConfig.sh" ; then
2501 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2502 break
2503 fi
2504 done
2505 fi
2506 # check in a few common install locations
2507 if test x"${ac_cv_c_tkconfig}" = x ; then
2508 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2509 if test -f "$i/tkConfig.sh" ; then
2510 ac_cv_c_tkconfig=`(cd $i; pwd)`
2511 break
2512 fi
2513 done
2514 fi
2515 # check in a few other private locations
2516 if test x"${ac_cv_c_tkconfig}" = x ; then
2517 for i in \
2518 ${srcdir}/../tk \
2519 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
2520 if test -f "$i/unix/tkConfig.sh" ; then
2521 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2522 break
2523 fi
2524 done
2525 fi
2526
5436fc65 2527fi
5436fc65 2528
047465fd
TT
2529 if test x"${ac_cv_c_tkconfig}" = x ; then
2530 TKCONFIG="# no Tk configs found"
2531 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
2532 else
2533 no_tk=
2534 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
2535 echo "$ac_t""found $TKCONFIG" 1>&6
2536 fi
5436fc65
C
2537fi
2538
2539
5436fc65 2540
0cf433d9
ILT
2541 # If $no_tk is nonempty, then we can't do Tk, and there is no
2542 # point to doing Tcl.
2543 if test -z "${no_tk}"; then
2544
047465fd
TT
2545 if test -f "$TKCONFIG" ; then
2546 . $TKCONFIG
2547 fi
5436fc65 2548
047465fd
TT
2549
2550
5436fc65 2551
047465fd 2552
5436fc65
C
2553
2554
a2b63bbd 2555
047465fd
TT
2556
2557
2558
2559
0cf433d9 2560
5436fc65 2561#
4e327047
TT
2562# Ok, lets find the tcl source trees so we can use the headers
2563# Warning: transition of version 9 to 10 will break this algorithm
2564# because 10 sorts before 9. We also look for just tcl. We have to
2565# be careful that we don't match stuff like tclX by accident.
2566# the alternative search directory is involked by --with-tclinclude
5436fc65 2567#
4e327047
TT
2568no_tcl=true
2569echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
8b701284 2570echo "configure:2571: checking for Tcl private headers" >&5
4e327047 2571# Check whether --with-tclinclude or --without-tclinclude was given.
1a7b4b7c
DE
2572if test "${with_tclinclude+set}" = set; then
2573 withval="$with_tclinclude"
4e327047
TT
2574 with_tclinclude=${withval}
2575fi
2576
2577if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
2579else
2580
2581# first check to see if --with-tclinclude was specified
2582if test x"${with_tclinclude}" != x ; then
2583 if test -f ${with_tclinclude}/tclInt.h ; then
2584 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
047465fd
TT
2585 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
2586 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
5436fc65 2587 else
4e327047
TT
2588 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2589 fi
2590fi
047465fd
TT
2591
2592# next check if it came with Tcl configuration file
2593if test x"${ac_cv_c_tclconfig}" = x ; then
2594 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
2595 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
2596 fi
2597fi
2598
4e327047
TT
2599# next check in private source directory
2600#
2601# since ls returns lowest version numbers first, reverse its output
2602if test x"${ac_cv_c_tclh}" = x ; then
2603 for i in \
2604 ${srcdir}/../tcl \
047465fd 2605 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
4e327047 2606 ${srcdir}/../../tcl \
047465fd 2607 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
4e327047 2608 ${srcdir}/../../../tcl \
047465fd 2609 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
4e327047 2610 if test -f $i/generic/tclInt.h ; then
047465fd 2611 ac_cv_c_tclh=`(cd $i/generic; pwd)`
1a7b4b7c 2612 break
4e327047
TT
2613 fi
2614 done
2615fi
2616# finally check in a few common install locations
2617#
2618# since ls returns lowest version numbers first, reverse its output
2619if test x"${ac_cv_c_tclh}" = x ; then
2620 for i in \
047465fd
TT
2621 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
2622 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
4e327047
TT
2623 /usr/local/src/tcl \
2624 /usr/local/lib/tcl \
2625 ${prefix}/include ; do
047465fd
TT
2626 if test -f $i/generic/tclInt.h ; then
2627 ac_cv_c_tclh=`(cd $i/generic; pwd)`
4e327047
TT
2628 break
2629 fi
2630 done
2631fi
2632# see if one is installed
2633if test x"${ac_cv_c_tclh}" = x ; then
8b701284 2634 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
4e327047 2635echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
8b701284 2636echo "configure:2637: checking for tclInt.h" >&5
5436fc65
C
2637if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2638 echo $ac_n "(cached) $ac_c" 1>&6
2639else
2640 cat > conftest.$ac_ext <<EOF
8b701284 2641#line 2642 "configure"
5436fc65 2642#include "confdefs.h"
4e327047 2643#include <tclInt.h>
5436fc65 2644EOF
1a7b4b7c 2645ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 2646{ (eval echo configure:2647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
2647ac_err=`grep -v '^ *+' conftest.out`
2648if test -z "$ac_err"; then
2649 rm -rf conftest*
2650 eval "ac_cv_header_$ac_safe=yes"
2651else
2652 echo "$ac_err" >&5
8b701284
ILT
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
5436fc65
C
2655 rm -rf conftest*
2656 eval "ac_cv_header_$ac_safe=no"
2657fi
2658rm -f conftest*
2659fi
2660if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2661 echo "$ac_t""yes" 1>&6
4e327047 2662 ac_cv_c_tclh=installed
5436fc65
C
2663else
2664 echo "$ac_t""no" 1>&6
4e327047 2665ac_cv_c_tclh=""
5436fc65
C
2666fi
2667
4e327047
TT
2668fi
2669
2670fi
2671
2672if test x"${ac_cv_c_tclh}" = x ; then
2673 TCLHDIR="# no Tcl private headers found"
2674 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2675fi
2676if test x"${ac_cv_c_tclh}" != x ; then
2677 no_tcl=""
1a7b4b7c 2678 if test x"${ac_cv_c_tclh}" = x"installed" ; then
4e327047
TT
2679 echo "$ac_t""is installed" 1>&6
2680 TCLHDIR=""
2681 else
2682 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2683 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2684 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 2685 fi
5436fc65 2686fi
4e327047 2687
4e327047 2688
5436fc65 2689
0cf433d9 2690
5436fc65 2691#
4e327047
TT
2692# Ok, lets find the tk source trees so we can use the headers
2693# If the directory (presumably symlink) named "tk" exists, use that one
2694# in preference to any others. Same logic is used when choosing library
2695# and again with Tcl. The search order is the best place to look first, then in
2696# decreasing significance. The loop breaks if the trigger file is found.
2697# Note the gross little conversion here of srcdir by cd'ing to the found
2698# directory. This converts the path from a relative to an absolute, so
2699# recursive cache variables for the path will work right. We check all
2700# the possible paths in one loop rather than many seperate loops to speed
2701# things up.
047465fd 2702# the alternative search directory is involked by --with-tkinclude
5436fc65 2703#
047465fd 2704no_tk=true
4e327047 2705echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
8b701284 2706echo "configure:2707: checking for Tk private headers" >&5
4e327047 2707# Check whether --with-tkinclude or --without-tkinclude was given.
1a7b4b7c
DE
2708if test "${with_tkinclude+set}" = set; then
2709 withval="$with_tkinclude"
4e327047
TT
2710 with_tkinclude=${withval}
2711fi
2712
4e327047
TT
2713if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
2715else
2716
2717# first check to see if --with-tkinclude was specified
2718if test x"${with_tkinclude}" != x ; then
2719 if test -f ${with_tkinclude}/tk.h ; then
2720 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
047465fd
TT
2721 elif test -f ${with_tkinclude}/generic/tk.h ; then
2722 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5436fc65 2723 else
4e327047
TT
2724 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2725 fi
2726fi
047465fd
TT
2727
2728# next check if it came with Tk configuration file
2729if test x"${ac_cv_c_tkconfig}" = x ; then
2730 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
2731 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
2732 fi
2733fi
2734
4e327047
TT
2735# next check in private source directory
2736#
047465fd 2737# since ls returns lowest version numbers first, reverse its output
4e327047
TT
2738if test x"${ac_cv_c_tkh}" = x ; then
2739 for i in \
2740 ${srcdir}/../tk \
047465fd 2741 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
4e327047 2742 ${srcdir}/../../tk \
047465fd 2743 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
4e327047 2744 ${srcdir}/../../../tk \
047465fd
TT
2745 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
2746 if test -f $i/generic/tk.h ; then
2747 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
2748 break
2749 fi
4e327047
TT
2750 done
2751fi
2752# finally check in a few common install locations
2753#
047465fd 2754# since ls returns lowest version numbers first, reverse its output
4e327047
TT
2755if test x"${ac_cv_c_tkh}" = x ; then
2756 for i in \
047465fd
TT
2757 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
2758 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
4e327047
TT
2759 /usr/local/src/tk \
2760 /usr/local/lib/tk \
2761 ${prefix}/include ; do
047465fd
TT
2762 if test -f $i/generic/tk.h ; then
2763 ac_cv_c_tkh=`(cd $i/generic; pwd)`
4e327047
TT
2764 break
2765 fi
2766 done
2767fi
2768# see if one is installed
2769if test x"${ac_cv_c_tkh}" = x ; then
8b701284 2770 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
4e327047 2771echo $ac_n "checking for tk.h""... $ac_c" 1>&6
8b701284 2772echo "configure:2773: checking for tk.h" >&5
5436fc65
C
2773if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2774 echo $ac_n "(cached) $ac_c" 1>&6
2775else
2776 cat > conftest.$ac_ext <<EOF
8b701284 2777#line 2778 "configure"
5436fc65 2778#include "confdefs.h"
4e327047 2779#include <tk.h>
5436fc65 2780EOF
1a7b4b7c 2781ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8b701284 2782{ (eval echo configure:2783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
2783ac_err=`grep -v '^ *+' conftest.out`
2784if test -z "$ac_err"; then
2785 rm -rf conftest*
2786 eval "ac_cv_header_$ac_safe=yes"
2787else
2788 echo "$ac_err" >&5
8b701284
ILT
2789 echo "configure: failed program was:" >&5
2790 cat conftest.$ac_ext >&5
5436fc65
C
2791 rm -rf conftest*
2792 eval "ac_cv_header_$ac_safe=no"
2793fi
2794rm -f conftest*
2795fi
2796if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2797 echo "$ac_t""yes" 1>&6
4e327047 2798 ac_cv_c_tkh=installed
5436fc65
C
2799else
2800 echo "$ac_t""no" 1>&6
047465fd 2801ac_cv_c_tkh=""
5436fc65
C
2802fi
2803
4e327047
TT
2804fi
2805
2806fi
2807
2808if test x"${ac_cv_c_tkh}" != x ; then
2809 no_tk=""
2810 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2811 echo "$ac_t""is installed" 1>&6
2812 TKHDIR=""
2813 else
047465fd 2814 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
4e327047
TT
2815 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2816 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
2817 fi
2818else
4e327047
TT
2819 TKHDIR="# no Tk directory found"
2820 echo "configure: warning: Can't find Tk private headers" 1>&2
2821 no_tk=true
5436fc65
C
2822fi
2823
5436fc65
C
2824
2825
2826
0cf433d9
ILT
2827 # Include some libraries that Tcl and Tk want.
2828 LIBS="$LIBS $TK_LIBS"
5436fc65 2829
0cf433d9 2830 ENABLE_GDBTK=1
5436fc65 2831
0cf433d9
ILT
2832 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2833 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
2834 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2835 fi
1a57cd09 2836 fi
a2b63bbd 2837fi
66efdff9 2838
66efdff9 2839
5436fc65 2840
66efdff9
JM
2841
2842
5436fc65
C
2843# end-sanitize-gdbtk
2844
2845
2846
2847
2848
1d5eb137
FF
2849# Begin stuff to support --enable-shared
2850# Check whether --enable-shared or --disable-shared was given.
2851if test "${enable_shared+set}" = set; then
2852 enableval="$enable_shared"
2853 case "${enableval}" in
2854 yes) shared=true ;;
2855 no) shared=false ;;
2856 *) shared=true ;;
2857esac
2858fi
2859
2860HLDFLAGS=
2861HLDENV=
2862# If we have shared libraries, try to set rpath reasonably.
2863if test "${shared}" = "true"; then
2864 case "${host}" in
2865 *-*-hpux*)
2866 HLDFLAGS='-Wl,+s,+b,$(libdir)'
2867 ;;
2868 *-*-irix5* | *-*-irix6*)
2869 HLDFLAGS='-Wl,-rpath,$(libdir)'
2870 ;;
2871 *-*-linux*aout*)
2872 ;;
8ddf07a2 2873 *-*-linux* | *-pc-linux-gnu)
1d5eb137
FF
2874 HLDFLAGS='-Wl,-rpath,$(libdir)'
2875 ;;
2876 *-*-solaris*)
2877 HLDFLAGS='-R $(libdir)'
2878 ;;
2879 *-*-sysv4*)
2880 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;'
2881 ;;
2882 esac
2883fi
2884
2885# On SunOS, if the linker supports the -rpath option, use it to
2886# prevent ../bfd and ../opcodes from being included in the run time
2887# search path.
2888case "${host}" in
2889 *-*-sunos*)
2890 echo 'main () { }' > conftest.c
2891 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
2892 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
2893 :
2894 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
2895 :
2896 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
2897 :
074d813d
PS
2898 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
2899 :
1d5eb137
FF
2900 elif test "${shared}" = "true"; then
2901 HLDFLAGS='-Wl,-rpath=$(libdir)'
2902 else
2903 HLDFLAGS='-Wl,-rpath='
2904 fi
2905 rm -f conftest.t conftest.c conftest
2906 ;;
2907esac
2908
2909
2910# End stuff to support --enable-shared
2911
7c40dd08
DE
2912# target_subdir is used by the testsuite to find the target libraries.
2913target_subdir=
2914if test "${host}" != "${target}"; then
2915 target_subdir="${target_alias}/"
2916fi
2917
5436fc65
C
2918
2919configdirs="doc testsuite"
2920
2921
943e243c 2922. ${srcdir}/configure.host
5436fc65 2923
943e243c 2924. ${srcdir}/configure.tgt
5436fc65
C
2925
2926
5f107900 2927frags=
5436fc65
C
2928host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2929if test ! -f ${host_makefile_frag}; then
2930{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2931fi
5f107900 2932frags="$frags $host_makefile_frag"
5436fc65
C
2933
2934target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
2935if test ! -f ${target_makefile_frag}; then
2936{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
2937fi
5f107900 2938frags="$frags $target_makefile_frag"
5436fc65
C
2939
2940
2941
2942
2943
094fd4ae
C
2944hostfile=`sed -n '
2945s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2946' ${host_makefile_frag}`
5436fc65 2947
094fd4ae
C
2948targetfile=`sed -n '
2949s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2950' ${target_makefile_frag}`
5436fc65
C
2951
2952# these really aren't orthogonal true/false values of the same condition,
2953# but shells are slow enough that I like to reuse the test conditions
2954# whenever possible
2955if test "${target}" = "${host}"; then
094fd4ae
C
2956nativefile=`sed -n '
2957s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2958' ${host_makefile_frag}`
5436fc65
C
2959else
2960# GDBserver is only useful in a "native" enviroment
2961configdirs=`echo $configdirs | sed 's/gdbserver//'`
2962fi
2963
094fd4ae 2964
5436fc65
C
2965# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
2966# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
2967# corresponding links. But we have to remove the xm.h files and tm.h
2968# files anyway, e.g. when switching from "configure host" to
2969# "configure none".
2970
2971files=
2972links=
2973rm -f xm.h
2974if test "${hostfile}" != ""; then
2975files="${files} config/${gdb_host_cpu}/${hostfile}"
2976links="${links} xm.h"
2977fi
2978rm -f tm.h
2979if test "${targetfile}" != ""; then
2980files="${files} config/${gdb_target_cpu}/${targetfile}"
2981links="${links} tm.h"
2982fi
2983rm -f nm.h
2984if test "${nativefile}" != ""; then
2985files="${files} config/${gdb_host_cpu}/${nativefile}"
2986links="${links} nm.h"
2987else
2988# A cross-only configuration.
2989files="${files} config/nm-empty.h"
2990links="${links} nm.h"
2991fi
2992# start-sanitize-gdbtk
2993
2994# Make it possible to use the GUI without doing a full install
2995if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
2996files="${files} gdbtk.tcl"
2997links="${links} gdbtk.tcl"
2998fi
2999# end-sanitize-gdbtk
3000
3001
3002
3003subdirs="$configdirs"
3004
3005trap '' 1 2 15
3006cat > confcache <<\EOF
3007# This file is a shell script that caches the results of configure
3008# tests run on this system so they can be shared between configure
3009# scripts and configure runs. It is not useful on other systems.
3010# If it contains results you don't want to keep, you may remove or edit it.
3011#
3012# By default, configure uses ./config.cache as the cache file,
3013# creating it if it does not exist already. You can give configure
3014# the --cache-file=FILE option to use a different cache file; that is
3015# what configure does when it calls configure scripts in
3016# subdirectories, so they share the cache.
3017# Giving --cache-file=/dev/null disables caching, for debugging configure.
3018# config.status only pays attention to the cache file if you give it the
3019# --recheck option to rerun configure.
3020#
3021EOF
8b701284
ILT
3022# The following way of writing the cache mishandles newlines in values,
3023# but we know of no workaround that is simple, portable, and efficient.
3024# So, don't put newlines in cache variables' values.
5436fc65
C
3025# Ultrix sh set writes to stderr and can't be redirected directly,
3026# and sets the high bit in the cache file unless we assign to the vars.
3027(set) 2>&1 |
8b701284
ILT
3028 case `(ac_space=' '; set) 2>&1` in
3029 *ac_space=\ *)
3030 # `set' does not quote correctly, so add quotes (double-quote substitution
3031 # turns \\\\ into \\, and sed turns \\ into \).
3032 sed -n \
3033 -e "s/'/'\\\\''/g" \
3034 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3035 ;;
3036 *)
3037 # `set' quotes correctly as required by POSIX, so do not add quotes.
3038 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3039 ;;
3040 esac >> confcache
5436fc65
C
3041if cmp -s $cache_file confcache; then
3042 :
3043else
3044 if test -w $cache_file; then
3045 echo "updating cache $cache_file"
3046 cat confcache > $cache_file
3047 else
3048 echo "not updating unwritable cache $cache_file"
3049 fi
3050fi
3051rm -f confcache
3052
3053trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3054
3055test "x$prefix" = xNONE && prefix=$ac_default_prefix
3056# Let make expand exec_prefix.
3057test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3058
3059# Any assignment to VPATH causes Sun make to only execute
3060# the first set of double-colon rules, so remove it if not needed.
3061# If there is a colon in the path, we need to keep it.
3062if test "x$srcdir" = x.; then
3063 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3064fi
3065
3066trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3067
db210d08 3068DEFS=-DHAVE_CONFIG_H
5436fc65
C
3069
3070# Without the "./", some shells look in PATH for config.status.
3071: ${CONFIG_STATUS=./config.status}
3072
3073echo creating $CONFIG_STATUS
3074rm -f $CONFIG_STATUS
3075cat > $CONFIG_STATUS <<EOF
3076#! /bin/sh
3077# Generated automatically by configure.
3078# Run this file to recreate the current configuration.
3079# This directory was configured as follows,
3080# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3081#
3082# $0 $ac_configure_args
3083#
3084# Compiler output produced by configure, useful for debugging
3085# configure, is in ./config.log if it exists.
3086
3087ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3088for ac_option
3089do
3090 case "\$ac_option" in
3091 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3092 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3093 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3094 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8b701284 3095 echo "$CONFIG_STATUS generated by autoconf version 2.12"
5436fc65
C
3096 exit 0 ;;
3097 -help | --help | --hel | --he | --h)
3098 echo "\$ac_cs_usage"; exit 0 ;;
3099 *) echo "\$ac_cs_usage"; exit 1 ;;
3100 esac
3101done
3102
3103ac_given_srcdir=$srcdir
3104ac_given_INSTALL="$INSTALL"
3105
18ea4416 3106trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1a7b4b7c
DE
3107EOF
3108cat >> $CONFIG_STATUS <<EOF
5436fc65 3109
1a7b4b7c
DE
3110# Protect against being on the right side of a sed subst in config.status.
3111sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3112 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
3113$ac_vpsub
3114$extrasub
3115s%@CFLAGS@%$CFLAGS%g
3116s%@CPPFLAGS@%$CPPFLAGS%g
3117s%@CXXFLAGS@%$CXXFLAGS%g
3118s%@DEFS@%$DEFS%g
3119s%@LDFLAGS@%$LDFLAGS%g
3120s%@LIBS@%$LIBS%g
3121s%@exec_prefix@%$exec_prefix%g
3122s%@prefix@%$prefix%g
3123s%@program_transform_name@%$program_transform_name%g
1a7b4b7c
DE
3124s%@bindir@%$bindir%g
3125s%@sbindir@%$sbindir%g
3126s%@libexecdir@%$libexecdir%g
3127s%@datadir@%$datadir%g
3128s%@sysconfdir@%$sysconfdir%g
3129s%@sharedstatedir@%$sharedstatedir%g
3130s%@localstatedir@%$localstatedir%g
3131s%@libdir@%$libdir%g
3132s%@includedir@%$includedir%g
3133s%@oldincludedir@%$oldincludedir%g
3134s%@infodir@%$infodir%g
3135s%@mandir@%$mandir%g
5436fc65
C
3136s%@CC@%$CC%g
3137s%@CPP@%$CPP%g
5436fc65
C
3138s%@host@%$host%g
3139s%@host_alias@%$host_alias%g
3140s%@host_cpu@%$host_cpu%g
3141s%@host_vendor@%$host_vendor%g
3142s%@host_os@%$host_os%g
0579b53d
GN
3143s%@target@%$target%g
3144s%@target_alias@%$target_alias%g
3145s%@target_cpu@%$target_cpu%g
3146s%@target_vendor@%$target_vendor%g
3147s%@target_os@%$target_os%g
5436fc65
C
3148s%@build@%$build%g
3149s%@build_alias@%$build_alias%g
3150s%@build_cpu@%$build_cpu%g
3151s%@build_vendor@%$build_vendor%g
3152s%@build_os@%$build_os%g
0579b53d
GN
3153s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3154s%@INSTALL_DATA@%$INSTALL_DATA%g
d8efbc66
FF
3155s%@AR@%$AR%g
3156s%@RANLIB@%$RANLIB%g
3157s%@YACC@%$YACC%g
3158s%@AWK@%$AWK%g
47ef0da5 3159s%@THREAD_DB_OBS@%$THREAD_DB_OBS%g
4915acad 3160s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
047465fd
TT
3161s%@TCL_VERSION@%$TCL_VERSION%g
3162s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
3163s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
3164s%@TCL_CC@%$TCL_CC%g
3165s%@TCL_DEFS@%$TCL_DEFS%g
3166s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
3167s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
3168s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
3169s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
3170s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
3171s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
3172s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
3173s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
3174s%@TCL_RANLIB@%$TCL_RANLIB%g
3175s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
3176s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
3177s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
3178s%@TK_VERSION@%$TK_VERSION%g
3179s%@TK_DEFS@%$TK_DEFS%g
3180s%@TK_XINCLUDES@%$TK_XINCLUDES%g
3181s%@TK_XLIBSW@%$TK_XLIBSW%g
3182s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
3183s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
5436fc65 3184s%@TCLHDIR@%$TCLHDIR%g
4e327047 3185s%@TKHDIR@%$TKHDIR%g
5436fc65 3186s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
047465fd 3187s%@X_CFLAGS@%$X_CFLAGS%g
a2b63bbd 3188s%@X_LDFLAGS@%$X_LDFLAGS%g
047465fd 3189s%@X_LIBS@%$X_LIBS%g
5436fc65
C
3190s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3191s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3192s%@ENABLE_OBS@%$ENABLE_OBS%g
1d5eb137
FF
3193s%@HLDFLAGS@%$HLDFLAGS%g
3194s%@HLDENV@%$HLDENV%g
7c40dd08 3195s%@target_subdir@%$target_subdir%g
5436fc65
C
3196/@host_makefile_frag@/r $host_makefile_frag
3197s%@host_makefile_frag@%%g
3198/@target_makefile_frag@/r $target_makefile_frag
3199s%@target_makefile_frag@%%g
5f107900 3200s%@frags@%$frags%g
5436fc65
C
3201s%@subdirs@%$subdirs%g
3202
3203CEOF
3204EOF
8b701284
ILT
3205
3206cat >> $CONFIG_STATUS <<\EOF
3207
3208# Split the substitutions into bite-sized pieces for seds with
3209# small command number limits, like on Digital OSF/1 and HP-UX.
3210ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3211ac_file=1 # Number of current file.
3212ac_beg=1 # First line for current file.
3213ac_end=$ac_max_sed_cmds # Line after last line for current file.
3214ac_more_lines=:
3215ac_sed_cmds=""
3216while $ac_more_lines; do
3217 if test $ac_beg -gt 1; then
3218 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3219 else
3220 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3221 fi
3222 if test ! -s conftest.s$ac_file; then
3223 ac_more_lines=false
3224 rm -f conftest.s$ac_file
3225 else
3226 if test -z "$ac_sed_cmds"; then
3227 ac_sed_cmds="sed -f conftest.s$ac_file"
3228 else
3229 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3230 fi
3231 ac_file=`expr $ac_file + 1`
3232 ac_beg=$ac_end
3233 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3234 fi
3235done
3236if test -z "$ac_sed_cmds"; then
3237 ac_sed_cmds=cat
3238fi
3239EOF
3240
5436fc65
C
3241cat >> $CONFIG_STATUS <<EOF
3242
3243CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3244EOF
3245cat >> $CONFIG_STATUS <<\EOF
3246for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8b701284 3247 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5436fc65 3248 case "$ac_file" in
8b701284 3249 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5436fc65
C
3250 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3251 *) ac_file_in="${ac_file}.in" ;;
3252 esac
3253
8b701284 3254 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5436fc65
C
3255
3256 # Remove last slash and all that follows it. Not all systems have dirname.
3257 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3258 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3259 # The file is in a subdirectory.
3260 test ! -d "$ac_dir" && mkdir "$ac_dir"
3261 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3262 # A "../" for each directory in $ac_dir_suffix.
3263 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3264 else
3265 ac_dir_suffix= ac_dots=
3266 fi
3267
3268 case "$ac_given_srcdir" in
3269 .) srcdir=.
3270 if test -z "$ac_dots"; then top_srcdir=.
3271 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3272 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3273 *) # Relative path.
3274 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3275 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3276 esac
3277
3278 case "$ac_given_INSTALL" in
3279 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3280 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3281 esac
8b701284 3282
5436fc65
C
3283 echo creating "$ac_file"
3284 rm -f "$ac_file"
3285 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3286 case "$ac_file" in
3287 *Makefile*) ac_comsub="1i\\
3288# $configure_input" ;;
3289 *) ac_comsub= ;;
3290 esac
8b701284
ILT
3291
3292 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5436fc65
C
3293 sed -e "$ac_comsub
3294s%@configure_input@%$configure_input%g
3295s%@srcdir@%$srcdir%g
3296s%@top_srcdir@%$top_srcdir%g
3297s%@INSTALL@%$INSTALL%g
8b701284 3298" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5436fc65 3299fi; done
8b701284 3300rm -f conftest.s*
5436fc65 3301
db210d08
FF
3302# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3303# NAME is the cpp macro being defined and VALUE is the value it is being given.
3304#
3305# ac_d sets the value in "#define NAME VALUE" lines.
3306ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3307ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3308ac_dC='\3'
3309ac_dD='%g'
3310# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3311ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3312ac_uB='\([ ]\)%\1#\2define\3'
3313ac_uC=' '
3314ac_uD='\4%g'
3315# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3316ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3317ac_eB='$%\1#\2define\3'
3318ac_eC=' '
3319ac_eD='%g'
3320
8b701284
ILT
3321if test "${CONFIG_HEADERS+set}" != set; then
3322EOF
3323cat >> $CONFIG_STATUS <<EOF
3324 CONFIG_HEADERS="config.h:config.in"
3325EOF
3326cat >> $CONFIG_STATUS <<\EOF
3327fi
db210d08 3328for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8b701284 3329 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
db210d08 3330 case "$ac_file" in
8b701284 3331 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
db210d08
FF
3332 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3333 *) ac_file_in="${ac_file}.in" ;;
3334 esac
3335
3336 echo creating $ac_file
3337
3338 rm -f conftest.frag conftest.in conftest.out
8b701284
ILT
3339 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3340 cat $ac_file_inputs > conftest.in
db210d08
FF
3341
3342EOF
3343
3344# Transform confdefs.h into a sed script conftest.vals that substitutes
3345# the proper values into config.h.in to produce config.h. And first:
1a7b4b7c 3346# Protect against being on the right side of a sed subst in config.status.
db210d08
FF
3347# Protect against being in an unquoted here document in config.status.
3348rm -f conftest.vals
3349cat > conftest.hdr <<\EOF
3350s/[\\&%]/\\&/g
3351s%[\\$`]%\\&%g
bc859e63 3352s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
db210d08
FF
3353s%ac_d%ac_u%gp
3354s%ac_u%ac_e%gp
3355EOF
3356sed -n -f conftest.hdr confdefs.h > conftest.vals
3357rm -f conftest.hdr
3358
3359# This sed command replaces #undef with comments. This is necessary, for
3360# example, in the case of _POSIX_SOURCE, which is predefined and required
3361# on some systems where configure will not decide to define it.
3362cat >> conftest.vals <<\EOF
3363s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3364EOF
3365
3366# Break up conftest.vals because some shells have a limit on
3367# the size of here documents, and old seds have small limits too.
db210d08
FF
3368
3369rm -f conftest.tail
3370while :
3371do
3372 ac_lines=`grep -c . conftest.vals`
3373 # grep -c gives empty output for an empty file on some AIX systems.
3374 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3375 # Write a limited-size here document to conftest.frag.
3376 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3377 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3378 echo 'CEOF
3379 sed -f conftest.frag conftest.in > conftest.out
3380 rm -f conftest.in
3381 mv conftest.out conftest.in
3382' >> $CONFIG_STATUS
3383 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3384 rm -f conftest.vals
3385 mv conftest.tail conftest.vals
3386done
3387rm -f conftest.vals
3388
3389cat >> $CONFIG_STATUS <<\EOF
3390 rm -f conftest.frag conftest.h
3391 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3392 cat conftest.in >> conftest.h
3393 rm -f conftest.in
3394 if cmp -s $ac_file conftest.h 2>/dev/null; then
3395 echo "$ac_file is unchanged"
3396 rm -f conftest.h
3397 else
bc859e63
SG
3398 # Remove last slash and all that follows it. Not all systems have dirname.
3399 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3400 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3401 # The file is in a subdirectory.
3402 test ! -d "$ac_dir" && mkdir "$ac_dir"
3403 fi
db210d08
FF
3404 rm -f $ac_file
3405 mv conftest.h $ac_file
3406 fi
3407fi; done
3408
5436fc65
C
3409EOF
3410
3411cat >> $CONFIG_STATUS <<EOF
3412ac_sources="$files"
3413ac_dests="$links"
3414EOF
3415
3416cat >> $CONFIG_STATUS <<\EOF
3417srcdir=$ac_given_srcdir
3418while test -n "$ac_sources"; do
3419 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3420 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3421
3422 echo "linking $srcdir/$ac_source to $ac_dest"
3423
3424 if test ! -r $srcdir/$ac_source; then
3425 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3426 fi
3427 rm -f $ac_dest
3428
3429 # Make relative symlinks.
3430 # Remove last slash and all that follows it. Not all systems have dirname.
3431 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3432 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3433 # The dest file is in a subdirectory.
3434 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3435 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3436 # A "../" for each directory in $ac_dest_dir_suffix.
3437 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3438 else
3439 ac_dest_dir_suffix= ac_dots=
3440 fi
3441
3442 case "$srcdir" in
3443 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3444 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3445 esac
3446
3447 # Make a symlink if possible; otherwise try a hard link.
3448 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3449 ln $srcdir/$ac_source $ac_dest; then :
3450 else
3451 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3452 fi
3453done
0a5a1821
C
3454EOF
3455cat >> $CONFIG_STATUS <<EOF
5436fc65 3456
0a5a1821
C
3457gdb_host_cpu=$gdb_host_cpu
3458gdb_target_cpu=$gdb_target_cpu
3459nativefile=$nativefile
3460
3461EOF
3462cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
3463
3464if test "${nativefile}" = ""; then
7bd1f0c5 3465sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
5436fc65
C
3466 < Makefile > Makefile.tem
3467mv -f Makefile.tem Makefile
3468fi
3469
3470sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3471/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3472/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3473mv -f Makefile.tmp Makefile
3474
3475case ${srcdir} in
3476.)
3477;;
3478*)
3479grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3480echo "source ${srcdir}/.gdbinit" >> .gdbinit
3481esac
3482
31520669 3483case x$CONFIG_HEADERS in
18ea4416 3484xconfig.h:config.in)
31520669
FF
3485echo > stamp-h ;;
3486esac
3487
5436fc65
C
3488exit 0
3489EOF
3490chmod +x $CONFIG_STATUS
3491rm -fr confdefs* $ac_clean_files
3492test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3493
3494if test "$no_recursion" != yes; then
3495
3496 # Remove --cache-file and --srcdir arguments so they do not pile up.
3497 ac_sub_configure_args=
3498 ac_prev=
3499 for ac_arg in $ac_configure_args; do
3500 if test -n "$ac_prev"; then
3501 ac_prev=
3502 continue
3503 fi
3504 case "$ac_arg" in
3505 -cache-file | --cache-file | --cache-fil | --cache-fi \
3506 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3507 ac_prev=cache_file ;;
3508 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3509 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3510 ;;
3511 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3512 ac_prev=srcdir ;;
3513 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3514 ;;
3515 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3516 esac
3517 done
3518
3519 for ac_config_dir in $configdirs; do
3520
3521 # Do not complain, so a configure script can configure whichever
3522 # parts of a large source tree are present.
3523 if test ! -d $srcdir/$ac_config_dir; then
3524 continue
3525 fi
3526
3527 echo configuring in $ac_config_dir
3528
3529 case "$srcdir" in
3530 .) ;;
3531 *)
3532 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3533 else
3534 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3535 fi
3536 ;;
3537 esac
3538
3539 ac_popdir=`pwd`
3540 cd $ac_config_dir
3541
8b701284
ILT
3542 # A "../" for each directory in /$ac_config_dir.
3543 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3544
5436fc65
C
3545 case "$srcdir" in
3546 .) # No --srcdir option. We are building in place.
3547 ac_sub_srcdir=$srcdir ;;
3548 /*) # Absolute path.
3549 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3550 *) # Relative path.
8b701284 3551 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5436fc65
C
3552 esac
3553
3554 # Check for guested configure; otherwise get Cygnus style configure.
3555 if test -f $ac_sub_srcdir/configure; then
3556 ac_sub_configure=$ac_sub_srcdir/configure
3557 elif test -f $ac_sub_srcdir/configure.in; then
3558 ac_sub_configure=$ac_configure
3559 else
3560 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3561 ac_sub_configure=
3562 fi
3563
3564 # The recursion is here.
3565 if test -n "$ac_sub_configure"; then
3566
3567 # Make the cache file name correct relative to the subdirectory.
5436fc65
C
3568 case "$cache_file" in
3569 /*) ac_sub_cache_file=$cache_file ;;
3570 *) # Relative path.
3571 ac_sub_cache_file="$ac_dots$cache_file" ;;
3572 esac
3573 case "$ac_given_INSTALL" in
3574 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3575 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3576 esac
3577
3578 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3579 # The eval makes quoting arguments work.
3580 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3581 then :
3582 else
3583 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3584 fi
3585 fi
3586
3587 cd $ac_popdir
3588 done
3589fi
3590
5e711e7f
PS
3591
3592exit 0
b7f3b6d5 3593
This page took 0.269729 seconds and 4 git commands to generate.