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