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