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