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