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