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