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