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