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