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