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