* configure.in (sparc64-*-*): Add default host configuration.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
7c40dd08 4# Generated automatically using autoconf version 2.7
5436fc65
C
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
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
7c40dd08
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=
7c40dd08 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
7c40dd08
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 ;;
7c40dd08 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
7c40dd08
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]
7c40dd08 164 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 165 [same as prefix]
7c40dd08
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
7c40dd08
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
7c40dd08
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
7c40dd08
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
7c40dd08
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
7c40dd08
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
7c40dd08
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)
7c40dd08 351 echo "configure generated by autoconf version 2.7"
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
7c40dd08 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.
7c40dd08
DE
516ac_cpp='echo $CPP $CPPFLAGS 1>&5;
517$CPP $CPPFLAGS'
518ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
519${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
520ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
521${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
5436fc65
C
522
523if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526 ac_n= ac_c='
527' ac_t=' '
528 else
529 ac_n=-n ac_c= ac_t=
530 fi
531else
532 ac_n= ac_c='\c' ac_t=
533fi
534
535
536
5436fc65
C
537# Extract the first word of "gcc", so it can be a program name with args.
538set dummy gcc; ac_word=$2
539echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
540if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
541 echo $ac_n "(cached) $ac_c" 1>&6
542else
543 if test -n "$CC"; then
544 ac_cv_prog_CC="$CC" # Let the user override the test.
545else
546 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 547 for ac_dir in $PATH; do
5436fc65
C
548 test -z "$ac_dir" && ac_dir=.
549 if test -f $ac_dir/$ac_word; then
550 ac_cv_prog_CC="gcc"
551 break
552 fi
553 done
554 IFS="$ac_save_ifs"
555 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
556fi
557fi
558CC="$ac_cv_prog_CC"
559if test -n "$CC"; then
560 echo "$ac_t""$CC" 1>&6
561else
562 echo "$ac_t""no" 1>&6
563fi
564
565
566echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
567if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
568 echo $ac_n "(cached) $ac_c" 1>&6
569else
570 cat > conftest.c <<EOF
571#ifdef __GNUC__
572 yes;
573#endif
574EOF
575if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
576 ac_cv_prog_gcc=yes
577else
578 ac_cv_prog_gcc=no
579fi
580fi
7c40dd08 581
5436fc65
C
582echo "$ac_t""$ac_cv_prog_gcc" 1>&6
583if test $ac_cv_prog_gcc = yes; then
584 GCC=yes
585 if test "${CFLAGS+set}" != set; then
586 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
587if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
588 echo $ac_n "(cached) $ac_c" 1>&6
589else
590 echo 'void f(){}' > conftest.c
591if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
592 ac_cv_prog_gcc_g=yes
593else
594 ac_cv_prog_gcc_g=no
595fi
596rm -f conftest*
597
598fi
7c40dd08
DE
599
600echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
601 if test $ac_cv_prog_gcc_g = yes; then
602 CFLAGS="-g -O"
603 else
604 CFLAGS="-O"
605 fi
606 fi
607else
608 GCC=
609 test "${CFLAGS+set}" = set || CFLAGS="-g"
610fi
611
612echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
613# On Suns, sometimes $CPP names a directory.
614if test -n "$CPP" && test -d "$CPP"; then
615 CPP=
616fi
617if test -z "$CPP"; then
618if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
619 echo $ac_n "(cached) $ac_c" 1>&6
620else
621 # This must be in double quotes, not single quotes, because CPP may get
622 # substituted into the Makefile and "${CC-cc}" will confuse make.
623 CPP="${CC-cc} -E"
624 # On the NeXT, cc -E runs the code through the compiler's parser,
625 # not just through cpp.
626 cat > conftest.$ac_ext <<EOF
4e327047 627#line 628 "configure"
5436fc65
C
628#include "confdefs.h"
629#include <assert.h>
630Syntax Error
631EOF
632eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
633ac_err=`grep -v '^ *+' conftest.out`
634if test -z "$ac_err"; then
635 :
636else
637 echo "$ac_err" >&5
638 rm -rf conftest*
639 CPP="${CC-cc} -E -traditional-cpp"
640 cat > conftest.$ac_ext <<EOF
4e327047 641#line 642 "configure"
5436fc65
C
642#include "confdefs.h"
643#include <assert.h>
644Syntax Error
645EOF
646eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
647ac_err=`grep -v '^ *+' conftest.out`
648if test -z "$ac_err"; then
649 :
650else
651 echo "$ac_err" >&5
652 rm -rf conftest*
653 CPP=/lib/cpp
654fi
655rm -f conftest*
656fi
657rm -f conftest*
658 ac_cv_prog_CPP="$CPP"
659fi
dedcc91d
SC
660 CPP="$ac_cv_prog_CPP"
661else
662 ac_cv_prog_CPP="$CPP"
5436fc65 663fi
5436fc65
C
664echo "$ac_t""$CPP" 1>&6
665
666echo $ac_n "checking for AIX""... $ac_c" 1>&6
667cat > conftest.$ac_ext <<EOF
4e327047 668#line 669 "configure"
5436fc65
C
669#include "confdefs.h"
670#ifdef _AIX
671 yes
672#endif
673
674EOF
675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
676 egrep "yes" >/dev/null 2>&1; then
677 rm -rf conftest*
678 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
679#define _ALL_SOURCE 1
680EOF
681
682else
683 rm -rf conftest*
684 echo "$ac_t""no" 1>&6
685fi
686rm -f conftest*
687
688
689ac_safe=`echo "minix/config.h" | tr './\055' '___'`
690echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
691if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
692 echo $ac_n "(cached) $ac_c" 1>&6
693else
694 cat > conftest.$ac_ext <<EOF
4e327047 695#line 696 "configure"
5436fc65
C
696#include "confdefs.h"
697#include <minix/config.h>
698EOF
699eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
700ac_err=`grep -v '^ *+' conftest.out`
701if test -z "$ac_err"; then
702 rm -rf conftest*
703 eval "ac_cv_header_$ac_safe=yes"
704else
705 echo "$ac_err" >&5
706 rm -rf conftest*
707 eval "ac_cv_header_$ac_safe=no"
708fi
709rm -f conftest*
710fi
711if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
712 echo "$ac_t""yes" 1>&6
713 MINIX=yes
714else
715 echo "$ac_t""no" 1>&6
716MINIX=
717fi
718
719if test "$MINIX" = yes; then
720 cat >> confdefs.h <<\EOF
721#define _POSIX_SOURCE 1
722EOF
723
724 cat >> confdefs.h <<\EOF
725#define _POSIX_1_SOURCE 2
726EOF
727
728 cat >> confdefs.h <<\EOF
729#define _MINIX 1
730EOF
731
732fi
733
734echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
735if test -d /etc/conf/kconfig.d &&
736 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
737then
738 echo "$ac_t""yes" 1>&6
739 ISC=yes # If later tests want to check for ISC.
740 cat >> confdefs.h <<\EOF
741#define _POSIX_SOURCE 1
742EOF
743
744 if test "$GCC" = yes; then
745 CC="$CC -posix"
746 else
747 CC="$CC -Xp"
748 fi
749else
750 echo "$ac_t""no" 1>&6
751 ISC=
752fi
753
754
755ac_aux_dir=
756for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
757 if test -f $ac_dir/install-sh; then
758 ac_aux_dir=$ac_dir
759 ac_install_sh="$ac_aux_dir/install-sh -c"
760 break
761 elif test -f $ac_dir/install.sh; then
762 ac_aux_dir=$ac_dir
763 ac_install_sh="$ac_aux_dir/install.sh -c"
764 break
765 fi
766done
767if test -z "$ac_aux_dir"; then
768 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
769fi
770ac_config_guess=$ac_aux_dir/config.guess
771ac_config_sub=$ac_aux_dir/config.sub
772ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
773
774# Find a good install program. We prefer a C program (faster),
775# so one script is as good as another. But avoid the broken or
776# incompatible versions:
777# SysV /etc/install, /usr/sbin/install
778# SunOS /usr/etc/install
779# IRIX /sbin/install
780# AIX /bin/install
781# AFS /usr/afsws/bin/install, which mishandles nonexistent args
782# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
783# ./install, which can be erroneously created by make from ./install.sh.
784echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
785if test -z "$INSTALL"; then
786if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
787 echo $ac_n "(cached) $ac_c" 1>&6
788else
789 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
790 for ac_dir in $PATH; do
791 # Account for people who put trailing slashes in PATH elements.
792 case "$ac_dir/" in
793 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
794 *)
795 # OSF1 and SCO ODT 3.0 have their own names for install.
796 for ac_prog in ginstall installbsd scoinst install; do
797 if test -f $ac_dir/$ac_prog; then
798 if test $ac_prog = install &&
799 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
800 # AIX install. It has an incompatible calling convention.
801 # OSF/1 installbsd also uses dspmsg, but is usable.
802 :
803 else
804 ac_cv_path_install="$ac_dir/$ac_prog -c"
805 break 2
806 fi
807 fi
808 done
809 ;;
810 esac
811 done
812 IFS="$ac_save_ifs"
7c40dd08 813
5436fc65 814fi
7c40dd08
DE
815 if test "${ac_cv_path_install+set}" = set; then
816 INSTALL="$ac_cv_path_install"
817 else
818 # As a last resort, use the slow shell script. We don't cache a
819 # path for INSTALL within a source directory, because that will
820 # break other packages using the cache if that directory is
821 # removed, or if the path is relative.
822 INSTALL="$ac_install_sh"
823 fi
5436fc65
C
824fi
825echo "$ac_t""$INSTALL" 1>&6
826
827# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
828# It thinks the first close brace ends the variable substitution.
829test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
830
831test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
832
833# Extract the first word of "ranlib", so it can be a program name with args.
834set dummy ranlib; ac_word=$2
835echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
836if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
837 echo $ac_n "(cached) $ac_c" 1>&6
838else
839 if test -n "$RANLIB"; then
840 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
841else
842 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 843 for ac_dir in $PATH; do
5436fc65
C
844 test -z "$ac_dir" && ac_dir=.
845 if test -f $ac_dir/$ac_word; then
846 ac_cv_prog_RANLIB="ranlib"
847 break
848 fi
849 done
850 IFS="$ac_save_ifs"
851 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
852fi
853fi
854RANLIB="$ac_cv_prog_RANLIB"
855if test -n "$RANLIB"; then
856 echo "$ac_t""$RANLIB" 1>&6
857else
858 echo "$ac_t""no" 1>&6
859fi
860
204c8825
FF
861for ac_prog in 'bison -y' byacc
862do
863# Extract the first word of "$ac_prog", so it can be a program name with args.
864set dummy $ac_prog; ac_word=$2
865echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
866if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
867 echo $ac_n "(cached) $ac_c" 1>&6
868else
869 if test -n "$YACC"; then
870 ac_cv_prog_YACC="$YACC" # Let the user override the test.
871else
872 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
873 for ac_dir in $PATH; do
874 test -z "$ac_dir" && ac_dir=.
875 if test -f $ac_dir/$ac_word; then
876 ac_cv_prog_YACC="$ac_prog"
877 break
878 fi
879 done
880 IFS="$ac_save_ifs"
881fi
882fi
883YACC="$ac_cv_prog_YACC"
884if test -n "$YACC"; then
885 echo "$ac_t""$YACC" 1>&6
886else
887 echo "$ac_t""no" 1>&6
888fi
889
890test -n "$YACC" && break
891done
892test -n "$YACC" || YACC="yacc"
893
5436fc65
C
894
895ac_aux_dir=
896for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
897 if test -f $ac_dir/install-sh; then
898 ac_aux_dir=$ac_dir
899 ac_install_sh="$ac_aux_dir/install-sh -c"
900 break
901 elif test -f $ac_dir/install.sh; then
902 ac_aux_dir=$ac_dir
903 ac_install_sh="$ac_aux_dir/install.sh -c"
904 break
905 fi
906done
907if test -z "$ac_aux_dir"; then
908 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
909fi
910ac_config_guess=$ac_aux_dir/config.guess
911ac_config_sub=$ac_aux_dir/config.sub
912ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
913
914
915# Do some error checking and defaulting for the host and target type.
916# The inputs are:
917# configure --host=HOST --target=TARGET --build=BUILD NONOPT
918#
919# The rules are:
920# 1. You are not allowed to specify --host, --target, and nonopt at the
7c40dd08 921# same time.
5436fc65
C
922# 2. Host defaults to nonopt.
923# 3. If nonopt is not specified, then host defaults to the current host,
924# as determined by config.guess.
925# 4. Target and build default to nonopt.
926# 5. If nonopt is not specified, then target and build default to host.
927
928# The aliases save the names the user supplied, while $host etc.
929# will get canonicalized.
930case $host---$target---$nonopt in
931NONE---*---* | *---NONE---* | *---*---NONE) ;;
932*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
933esac
934
935
936# Make sure we can run config.sub.
937if $ac_config_sub sun4 >/dev/null 2>&1; then :
938else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
939fi
940
941echo $ac_n "checking host system type""... $ac_c" 1>&6
942
943host_alias=$host
944case "$host_alias" in
945NONE)
946 case $nonopt in
947 NONE)
948 if host_alias=`$ac_config_guess`; then :
949 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
950 fi ;;
951 *) host_alias=$nonopt ;;
952 esac ;;
953esac
954
955host=`$ac_config_sub $host_alias`
956host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
957host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
958host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
959echo "$ac_t""$host" 1>&6
960
961echo $ac_n "checking target system type""... $ac_c" 1>&6
962
963target_alias=$target
964case "$target_alias" in
965NONE)
966 case $nonopt in
967 NONE) target_alias=$host_alias ;;
968 *) target_alias=$nonopt ;;
969 esac ;;
970esac
971
972target=`$ac_config_sub $target_alias`
973target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
974target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
975target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
976echo "$ac_t""$target" 1>&6
977
978echo $ac_n "checking build system type""... $ac_c" 1>&6
979
980build_alias=$build
981case "$build_alias" in
982NONE)
983 case $nonopt in
984 NONE) build_alias=$host_alias ;;
985 *) build_alias=$nonopt ;;
986 esac ;;
987esac
988
989build=`$ac_config_sub $build_alias`
990build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
991build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
992build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
993echo "$ac_t""$build" 1>&6
994
995test "$host_alias" != "$target_alias" &&
996 test "$program_prefix$program_suffix$program_transform_name" = \
997 NONENONEs,x,x, &&
998 program_prefix=${target_alias}-
999
1000if test "$program_transform_name" = s,x,x,; then
1001 program_transform_name=
1002else
7c40dd08
DE
1003 # Double any \ or $. echo might interpret backslashes.
1004 cat <<\EOF_SED > conftestsed
1005s,\\,\\\\,g; s,\$,$$,g
1006EOF_SED
5436fc65
C
1007 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1008 rm -f conftestsed
1009fi
1010test "$program_prefix" != NONE &&
1011 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1012# Use a double $ so make ignores it.
1013test "$program_suffix" != NONE &&
1014 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1015
1016# sed with no file args requires a program.
1017test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1018
1019
2b576293
C
1020# If we cannot run a trivial program, we must be cross compiling.
1021echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1022if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1023 echo $ac_n "(cached) $ac_c" 1>&6
1024else
1025 if test "$cross_compiling" = yes; then
1026 ac_cv_c_cross=yes
1027else
1028cat > conftest.$ac_ext <<EOF
4e327047 1029#line 1030 "configure"
2b576293
C
1030#include "confdefs.h"
1031main(){return(0);}
1032EOF
1033eval $ac_link
1034if test -s conftest && (./conftest; exit) 2>/dev/null; then
1035 ac_cv_c_cross=no
1036else
1037 ac_cv_c_cross=yes
1038fi
1039fi
1040rm -fr conftest*
1041fi
7c40dd08 1042
da3d57e3 1043echo "$ac_t""$ac_cv_c_cross" 1>&6
7c40dd08 1044cross_compiling=$ac_cv_c_cross
2b576293
C
1045
1046echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1047if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1048 echo $ac_n "(cached) $ac_c" 1>&6
1049else
1050 cat > conftest.$ac_ext <<EOF
4e327047 1051#line 1052 "configure"
2b576293
C
1052#include "confdefs.h"
1053#include <stdlib.h>
1054#include <stdarg.h>
1055#include <string.h>
1056#include <float.h>
1057EOF
1058eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1059ac_err=`grep -v '^ *+' conftest.out`
1060if test -z "$ac_err"; then
1061 rm -rf conftest*
1062 ac_cv_header_stdc=yes
1063else
1064 echo "$ac_err" >&5
1065 rm -rf conftest*
1066 ac_cv_header_stdc=no
1067fi
1068rm -f conftest*
1069
1070if test $ac_cv_header_stdc = yes; then
1071 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1072cat > conftest.$ac_ext <<EOF
4e327047 1073#line 1074 "configure"
2b576293
C
1074#include "confdefs.h"
1075#include <string.h>
1076EOF
1077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1078 egrep "memchr" >/dev/null 2>&1; then
1079 :
1080else
1081 rm -rf conftest*
1082 ac_cv_header_stdc=no
1083fi
1084rm -f conftest*
1085
1086fi
1087
1088if test $ac_cv_header_stdc = yes; then
1089 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1090cat > conftest.$ac_ext <<EOF
4e327047 1091#line 1092 "configure"
2b576293
C
1092#include "confdefs.h"
1093#include <stdlib.h>
1094EOF
1095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1096 egrep "free" >/dev/null 2>&1; then
1097 :
1098else
1099 rm -rf conftest*
1100 ac_cv_header_stdc=no
1101fi
1102rm -f conftest*
1103
1104fi
1105
1106if test $ac_cv_header_stdc = yes; then
1107 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1108if test "$cross_compiling" = yes; then
7c40dd08 1109 :
2b576293
C
1110else
1111cat > conftest.$ac_ext <<EOF
4e327047 1112#line 1113 "configure"
2b576293
C
1113#include "confdefs.h"
1114#include <ctype.h>
1115#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1116#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1117#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1118int main () { int i; for (i = 0; i < 256; i++)
1119if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1120exit (0); }
1121
1122EOF
1123eval $ac_link
1124if test -s conftest && (./conftest; exit) 2>/dev/null; then
1125 :
1126else
1127 ac_cv_header_stdc=no
1128fi
1129fi
1130rm -fr conftest*
1131fi
1132fi
7c40dd08 1133
2b576293
C
1134echo "$ac_t""$ac_cv_header_stdc" 1>&6
1135if test $ac_cv_header_stdc = yes; then
1136 cat >> confdefs.h <<\EOF
1137#define STDC_HEADERS 1
1138EOF
1139
1140fi
1141
da3d57e3 1142for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h
1a494973
C
1143do
1144ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1145echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1146if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1147 echo $ac_n "(cached) $ac_c" 1>&6
1148else
1149 cat > conftest.$ac_ext <<EOF
4e327047 1150#line 1151 "configure"
1a494973
C
1151#include "confdefs.h"
1152#include <$ac_hdr>
1153EOF
1154eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1155ac_err=`grep -v '^ *+' conftest.out`
1156if test -z "$ac_err"; then
1157 rm -rf conftest*
1158 eval "ac_cv_header_$ac_safe=yes"
1159else
1160 echo "$ac_err" >&5
1161 rm -rf conftest*
1162 eval "ac_cv_header_$ac_safe=no"
1163fi
1164rm -f conftest*
1165fi
1166if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1167 echo "$ac_t""yes" 1>&6
7c40dd08 1168 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1a494973
C
1169 cat >> confdefs.h <<EOF
1170#define $ac_tr_hdr 1
1171EOF
1172
1173else
1174 echo "$ac_t""no" 1>&6
1175fi
1176done
1177
2b576293
C
1178echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1179if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1180 echo $ac_n "(cached) $ac_c" 1>&6
1181else
1182 cat > conftest.$ac_ext <<EOF
4e327047 1183#line 1184 "configure"
2b576293
C
1184#include "confdefs.h"
1185#include <sys/types.h>
1186#include <sys/stat.h>
1187
1188#if defined(S_ISBLK) && defined(S_IFDIR)
1189# if S_ISBLK (S_IFDIR)
1190You lose.
1191# endif
1192#endif
1193
1194#if defined(S_ISBLK) && defined(S_IFCHR)
1195# if S_ISBLK (S_IFCHR)
1196You lose.
1197# endif
1198#endif
1199
1200#if defined(S_ISLNK) && defined(S_IFREG)
1201# if S_ISLNK (S_IFREG)
1202You lose.
1203# endif
1204#endif
1205
1206#if defined(S_ISSOCK) && defined(S_IFREG)
1207# if S_ISSOCK (S_IFREG)
1208You lose.
1209# endif
1210#endif
1211
1212EOF
1213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1214 egrep "You lose" >/dev/null 2>&1; then
1215 rm -rf conftest*
1216 ac_cv_header_stat_broken=yes
1217else
1218 rm -rf conftest*
1219 ac_cv_header_stat_broken=no
1220fi
1221rm -f conftest*
1222
1223fi
7c40dd08 1224
2b576293
C
1225echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1226if test $ac_cv_header_stat_broken = yes; then
1227 cat >> confdefs.h <<\EOF
1228#define STAT_MACROS_BROKEN 1
1229EOF
1230
1231fi
1232
1233
7c40dd08
DE
1234for ac_func in valloc getpagesize
1235do
1236echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1237if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239else
1240 cat > conftest.$ac_ext <<EOF
4e327047 1241#line 1242 "configure"
7c40dd08
DE
1242#include "confdefs.h"
1243/* System header to define __stub macros and hopefully few prototypes,
1244 which can conflict with char $ac_func(); below. */
1245#include <assert.h>
1246/* Override any gcc2 internal prototype to avoid an error. */
1247char $ac_func();
1248
1249int main() { return 0; }
1250int t() {
1251
1252/* The GNU C library defines this for functions which it implements
1253 to always fail with ENOSYS. Some functions are actually named
1254 something starting with __ and the normal name is an alias. */
1255#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1256choke me
1257#else
1258$ac_func();
1259#endif
1260
1261; return 0; }
1262EOF
1263if eval $ac_link; then
1264 rm -rf conftest*
1265 eval "ac_cv_func_$ac_func=yes"
1266else
1267 rm -rf conftest*
1268 eval "ac_cv_func_$ac_func=no"
1269fi
1270rm -f conftest*
1271
1272fi
1273if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1274 echo "$ac_t""yes" 1>&6
1275 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1276 cat >> confdefs.h <<EOF
1277#define $ac_tr_func 1
1278EOF
1279
1280else
1281 echo "$ac_t""no" 1>&6
1282fi
1283done
1284
2b576293
C
1285echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1286if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1287 echo $ac_n "(cached) $ac_c" 1>&6
1288else
1289 if test "$cross_compiling" = yes; then
1290 ac_cv_func_mmap=no
1291else
1292cat > conftest.$ac_ext <<EOF
4e327047 1293#line 1294 "configure"
2b576293
C
1294#include "confdefs.h"
1295
1296/* Thanks to Mike Haertel and Jim Avera for this test. */
1297#include <sys/types.h>
1298#include <fcntl.h>
1299#include <sys/mman.h>
1300
2b576293
C
1301#ifndef HAVE_GETPAGESIZE
1302# include <sys/param.h>
1303# ifdef EXEC_PAGESIZE
1304# define getpagesize() EXEC_PAGESIZE
1305# else
1306# ifdef NBPG
1307# define getpagesize() NBPG * CLSIZE
1308# ifndef CLSIZE
1309# define CLSIZE 1
1310# endif
1311# else
1312# ifdef NBPC
1313# define getpagesize() NBPC
1314# else
1315# define getpagesize() PAGESIZE /* SVR4 */
1316# endif
1317# endif
1318# endif
1319#endif
1320
7c40dd08 1321#ifndef HAVE_VALLOC
2b576293
C
1322# define valloc malloc
1323#endif
1324
1325#ifdef __cplusplus
1326extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1327#else
1328char *valloc(), *malloc();
1329#endif
1330
1331int
1332main()
1333{
1334 char *buf1, *buf2, *buf3;
1335 int i = getpagesize(), j;
7c40dd08 1336 int i2 = i * 2;
2b576293
C
1337 int fd;
1338
1339 buf1 = (char *)valloc(i2);
1340 buf2 = (char *)valloc(i);
1341 buf3 = (char *)malloc(i2);
1342 for (j = 0; j < i2; ++j)
1343 *(buf1 + j) = rand();
1344 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1345 write(fd, buf1, i2);
1346 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1347 for (j = 0; j < i; ++j)
1348 if (*(buf1 + j) != *(buf2 + j))
1349 exit(1);
1350 lseek(fd, (long)i, 0);
1351 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1352 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1353 lseek(fd, (long)0, 0);
1354 read(fd, buf3, i2);
1355 for (j = 0; j < i2; ++j)
1356 if (*(buf1 + j) != *(buf3 + j))
1357 exit(1);
1358 exit(0);
1359}
1360
1361EOF
1362eval $ac_link
1363if test -s conftest && (./conftest; exit) 2>/dev/null; then
1364 ac_cv_func_mmap=yes
1365else
1366 ac_cv_func_mmap=no
1367fi
1368fi
1369rm -fr conftest*
1370fi
7c40dd08 1371
2b576293
C
1372echo "$ac_t""$ac_cv_func_mmap" 1>&6
1373if test $ac_cv_func_mmap = yes; then
1374 cat >> confdefs.h <<\EOF
1375#define HAVE_MMAP 1
1376EOF
1377
1378fi
1379
5436fc65
C
1380
1381ENABLE_CFLAGS=
1382ENABLE_CLIBS=
1383ENABLE_OBS=
1384
1385# Check whether --enable-netrom or --disable-netrom was given.
7c40dd08
DE
1386if test "${enable_netrom+set}" = set; then
1387 enableval="$enable_netrom"
5436fc65
C
1388 case "${enableval}" in
1389yes) enable_netrom=yes ;;
1390no) enable_netrom=no ;;
1391*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1392esac
1393fi
1394
1395
1396if test "${enable_netrom}" = "yes"; then
1397 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1398fi
1399
188c635f
SG
1400# start-sanitize-gm
1401ENABLE_GM=
1402
1403# Check whether --enable-gm or --disable-gm was given.
7c40dd08
DE
1404if test "${enable_gm+set}" = set; then
1405 enableval="$enable_gm"
188c635f 1406 case "${enableval}" in
1a57cd09 1407yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
1408 ENABLE_CFLAGS=-DGENERAL_MAGIC
1409 ;;
1410no) ;;
1411*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1412esac
1413fi
1414
1415
1416# end-sanitize-gm
1417
3c0bf315 1418# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
7c40dd08
DE
1419if test "${enable_sim_powerpc+set}" = set; then
1420 enableval="$enable_sim_powerpc"
3c0bf315
MM
1421 case "${enableval}" in
1422yes) powerpc_sim=yes ;;
1423no) powerpc_sim=no ;;
1424*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1425esac
1426else
1427 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1428fi
1429
1430
5436fc65
C
1431# start-sanitize-gdbtk
1432ENABLE_GDBTK=
1433
1434# Check whether --enable-gdbtk or --disable-gdbtk was given.
7c40dd08
DE
1435if test "${enable_gdbtk+set}" = set; then
1436 enableval="$enable_gdbtk"
5436fc65 1437 case "${enableval}" in
0fe1522a
SG
1438 yes)
1439 case "$host" in
1440 *go32*)
1441 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1442 enable_gdbtk=no ;;
1443 *)
1444 enable_gdbtk=yes ;;
1445 esac ;;
1446 no)
1447 enable_gdbtk=no ;;
1448 *)
1449 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 1450esac
0fe1522a
SG
1451else
1452
1453# Default is on for everything but go32
1454case "$host" in
1455 *go32*)
1456 ;;
1457 *)
1458 enable_gdbtk=yes ;;
1459 esac
1460
5436fc65
C
1461fi
1462
1463
1464if test "${enable_gdbtk}" = "yes"; then
0fe1522a 1465
a2b63bbd 1466 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1467# paths, otherwise set no_x=yes.
1468# Uses ac_ vars as temps to allow command line to override cache and checks.
1469# --without-x overrides everything else, but does not touch the cache.
1470echo $ac_n "checking for X""... $ac_c" 1>&6
1471
1472# Check whether --with-x or --without-x was given.
7c40dd08
DE
1473if test "${with_x+set}" = set; then
1474 withval="$with_x"
5436fc65
C
1475 :
1476fi
1477
1478if test "x$with_x" = xno; then
1479 no_x=yes
1480else
1481 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1482 no_x=
1483 else
1484if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486else
1487 # One or both of the vars are not set, and there is no cached value.
1488no_x=yes
1489rm -fr conftestdir
1490if mkdir conftestdir; then
1491 cd conftestdir
1492 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1493 cat > Imakefile <<'EOF'
1494acfindx:
1495 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1496EOF
1497 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1498 no_x=
1499 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7c40dd08 1500 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5436fc65 1501 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1502 for ac_extension in a so sl; do
1503 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1504 test -f $ac_im_libdir/libX11.$ac_extension; then
1505 ac_im_usrlibdir=$ac_im_libdir; break
1506 fi
1507 done
5436fc65
C
1508 # Screen out bogus values from the imake configuration.
1509 case "$ac_im_incroot" in
1510 /usr/include) ;;
1511 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1512 esac
1513 case "$ac_im_usrlibdir" in
1514 /usr/lib | /lib) ;;
1515 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1516 esac
1517 fi
1518 cd ..
1519 rm -fr conftestdir
1520fi
1521
1522if test "$no_x" = yes; then
1523test -z "$x_direct_test_library" && x_direct_test_library=Xt
1524test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1525test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1526cat > conftest.$ac_ext <<EOF
4e327047 1527#line 1528 "configure"
5436fc65
C
1528#include "confdefs.h"
1529#include <$x_direct_test_include>
1530EOF
1531eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1532ac_err=`grep -v '^ *+' conftest.out`
1533if test -z "$ac_err"; then
1534 rm -rf conftest*
1535 no_x= ac_x_includes=
1536else
1537 echo "$ac_err" >&5
1538 rm -rf conftest*
1539 for ac_dir in \
1540 /usr/X11R6/include \
1541 /usr/X11R5/include \
1542 /usr/X11R4/include \
1543 \
1544 /usr/include/X11R6 \
1545 /usr/include/X11R5 \
1546 /usr/include/X11R4 \
1547 \
1548 /usr/local/X11R6/include \
1549 /usr/local/X11R5/include \
1550 /usr/local/X11R4/include \
1551 \
1552 /usr/local/include/X11R6 \
1553 /usr/local/include/X11R5 \
1554 /usr/local/include/X11R4 \
1555 \
1556 /usr/X11/include \
1557 /usr/include/X11 \
1558 /usr/local/X11/include \
1559 /usr/local/include/X11 \
1560 \
1561 /usr/X386/include \
1562 /usr/x386/include \
1563 /usr/XFree86/include/X11 \
1564 \
1565 /usr/include \
1566 /usr/local/include \
1567 /usr/unsupported/include \
1568 /usr/athena/include \
1569 /usr/local/x11r5/include \
1570 /usr/lpp/Xamples/include \
1571 \
1572 /usr/openwin/include \
1573 /usr/openwin/share/include \
1574 ; \
1575 do
1576 if test -r "$ac_dir/$x_direct_test_include"; then
1577 no_x= ac_x_includes=$ac_dir
1578 break
1579 fi
1580 done
1581fi
1582rm -f conftest*
1583
1584# Check for the libraries.
1585# See if we find them without any special options.
1586# Don't add to $LIBS permanently.
1587ac_save_LIBS="$LIBS"
1588LIBS="-l$x_direct_test_library $LIBS"
1589cat > conftest.$ac_ext <<EOF
4e327047 1590#line 1591 "configure"
5436fc65
C
1591#include "confdefs.h"
1592
1593int main() { return 0; }
1594int t() {
1595${x_direct_test_function}()
1596; return 0; }
1597EOF
1598if eval $ac_link; then
1599 rm -rf conftest*
1600 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1601else
1602 rm -rf conftest*
1603 LIBS="$ac_save_LIBS"
1604# First see if replacing the include by lib works.
1605for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1606 /usr/X11R6/lib \
1607 /usr/X11R5/lib \
1608 /usr/X11R4/lib \
1609 \
1610 /usr/lib/X11R6 \
1611 /usr/lib/X11R5 \
1612 /usr/lib/X11R4 \
1613 \
1614 /usr/local/X11R6/lib \
1615 /usr/local/X11R5/lib \
1616 /usr/local/X11R4/lib \
1617 \
1618 /usr/local/lib/X11R6 \
1619 /usr/local/lib/X11R5 \
1620 /usr/local/lib/X11R4 \
1621 \
1622 /usr/X11/lib \
1623 /usr/lib/X11 \
1624 /usr/local/X11/lib \
1625 /usr/local/lib/X11 \
1626 \
1627 /usr/X386/lib \
1628 /usr/x386/lib \
1629 /usr/XFree86/lib/X11 \
1630 \
1631 /usr/lib \
1632 /usr/local/lib \
1633 /usr/unsupported/lib \
1634 /usr/athena/lib \
1635 /usr/local/x11r5/lib \
1636 /usr/lpp/Xamples/lib \
1637 \
1638 /usr/openwin/lib \
1639 /usr/openwin/share/lib \
1640 ; \
1641do
1642 for ac_extension in a so sl; do
1643 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1644 no_x= ac_x_libraries=$ac_dir
1645 break 2
1646 fi
1647 done
1648done
1649fi
1650rm -f conftest*
1651
1652fi
1653if test "$no_x" = yes; then
1654 ac_cv_path_x="no_x=yes"
1655else
1656 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1657fi
1658fi
1659 fi
1660 eval "$ac_cv_path_x"
1661fi # $with_x != no
1662
1663if test "$no_x" = yes; then
1664 echo "$ac_t""no" 1>&6
1665else
1666 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1667 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1668 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1669 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1670fi
1671
a2b63bbd 1672 if test "$no_x" = yes; then
5436fc65
C
1673 # Not all programs may use this symbol, but it does not hurt to define it.
1674 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1675else
1676 if test -n "$x_includes"; then
1677 X_CFLAGS="$X_CFLAGS -I$x_includes"
1678 fi
1679
1680 # It would be nice to have a more robust check for the -R ld option than
1681 # just checking for Solaris.
1682 # It would also be nice to do this for all -L options, not just this one.
1683 if test -n "$x_libraries"; then
1684 X_LIBS="$X_LIBS -L$x_libraries"
1685 if test "`(uname) 2>/dev/null`" = SunOS &&
1686 uname -r | grep '^5' >/dev/null; then
7c40dd08 1687 X_LIBS="$X_LIBS -R $x_libraries"
5436fc65
C
1688 fi
1689 fi
1690
1691 # Check for libraries that X11R6 Xt/Xaw programs need.
1692
1693 ac_save_LDFLAGS="$LDFLAGS"
1694 LDFLAGS="$LDFLAGS -L$x_libraries"
1695 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1696 # check for ICE first), but we must link in the order -lSM -lICE or
1697 # we get undefined symbols. So assume we have SM if we have ICE.
1698 # These have to be linked with before -lX11, unlike the other
1699 # libraries we check for below, so use a different variable.
1700 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1701 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
7c40dd08
DE
1702ac_lib_var=`echo ICE | tr '.-/+' '___p'`
1703if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1704 echo $ac_n "(cached) $ac_c" 1>&6
1705else
1706 ac_save_LIBS="$LIBS"
1707LIBS="-lICE $LIBS"
1708cat > conftest.$ac_ext <<EOF
4e327047 1709#line 1710 "configure"
5436fc65
C
1710#include "confdefs.h"
1711
1712int main() { return 0; }
1713int t() {
1714IceConnectionNumber()
1715; return 0; }
1716EOF
1717if eval $ac_link; then
1718 rm -rf conftest*
7c40dd08 1719 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1720else
1721 rm -rf conftest*
7c40dd08 1722 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1723fi
1724rm -f conftest*
1725LIBS="$ac_save_LIBS"
1726
1727fi
7c40dd08 1728if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1729 echo "$ac_t""yes" 1>&6
1730 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1731else
1732 echo "$ac_t""no" 1>&6
1733fi
1734
1735 LDFLAGS="$ac_save_LDFLAGS"
1736
1737 # Check for system-dependent libraries X programs must link with.
1738
1739 if test "$ISC" = yes; then
1740 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1741 else
1742 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1743 # libraries were built with DECnet support. And karl@cs.umb.edu says
1744 # the Alpha needs dnet_stub (dnet does not exist).
1745 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
7c40dd08
DE
1746ac_lib_var=`echo dnet | tr '.-/+' '___p'`
1747if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1748 echo $ac_n "(cached) $ac_c" 1>&6
1749else
1750 ac_save_LIBS="$LIBS"
1751LIBS="-ldnet $LIBS"
1752cat > conftest.$ac_ext <<EOF
4e327047 1753#line 1754 "configure"
5436fc65
C
1754#include "confdefs.h"
1755
1756int main() { return 0; }
1757int t() {
1758dnet_ntoa()
1759; return 0; }
1760EOF
1761if eval $ac_link; then
1762 rm -rf conftest*
7c40dd08 1763 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1764else
1765 rm -rf conftest*
7c40dd08 1766 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1767fi
1768rm -f conftest*
1769LIBS="$ac_save_LIBS"
1770
1771fi
7c40dd08 1772if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1773 echo "$ac_t""yes" 1>&6
1774 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1775else
1776 echo "$ac_t""no" 1>&6
1777fi
1778
1779 if test $ac_cv_lib_dnet = no; then
1780 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
7c40dd08
DE
1781ac_lib_var=`echo dnet_stub | tr '.-/+' '___p'`
1782if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784else
1785 ac_save_LIBS="$LIBS"
1786LIBS="-ldnet_stub $LIBS"
1787cat > conftest.$ac_ext <<EOF
4e327047 1788#line 1789 "configure"
5436fc65
C
1789#include "confdefs.h"
1790
1791int main() { return 0; }
1792int t() {
1793dnet_ntoa()
1794; return 0; }
1795EOF
1796if eval $ac_link; then
1797 rm -rf conftest*
7c40dd08 1798 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1799else
1800 rm -rf conftest*
7c40dd08 1801 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1802fi
1803rm -f conftest*
1804LIBS="$ac_save_LIBS"
1805
1806fi
7c40dd08 1807if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1808 echo "$ac_t""yes" 1>&6
1809 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1810else
1811 echo "$ac_t""no" 1>&6
1812fi
1813
1814 fi
1815
1816 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1817 # to get the SysV transport functions.
1818 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1819 # check for it.
1820 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
7c40dd08
DE
1821ac_lib_var=`echo nsl | tr '.-/+' '___p'`
1822if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1823 echo $ac_n "(cached) $ac_c" 1>&6
1824else
1825 ac_save_LIBS="$LIBS"
1826LIBS="-lnsl $LIBS"
1827cat > conftest.$ac_ext <<EOF
4e327047 1828#line 1829 "configure"
5436fc65
C
1829#include "confdefs.h"
1830
1831int main() { return 0; }
1832int t() {
1833t_accept()
1834; return 0; }
1835EOF
1836if eval $ac_link; then
1837 rm -rf conftest*
7c40dd08 1838 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1839else
1840 rm -rf conftest*
7c40dd08 1841 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1842fi
1843rm -f conftest*
1844LIBS="$ac_save_LIBS"
1845
1846fi
7c40dd08 1847if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1848 echo "$ac_t""yes" 1>&6
1849 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1850else
1851 echo "$ac_t""no" 1>&6
1852fi
1853
1854
1855 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1856 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1857 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1858 if test "`(uname) 2>/dev/null`" != IRIX; then
1859 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
7c40dd08
DE
1860ac_lib_var=`echo socket | tr '.-/+' '___p'`
1861if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1862 echo $ac_n "(cached) $ac_c" 1>&6
1863else
1864 ac_save_LIBS="$LIBS"
1865LIBS="-lsocket $LIBS"
1866cat > conftest.$ac_ext <<EOF
4e327047 1867#line 1868 "configure"
5436fc65
C
1868#include "confdefs.h"
1869
1870int main() { return 0; }
1871int t() {
1872socket()
1873; return 0; }
1874EOF
1875if eval $ac_link; then
1876 rm -rf conftest*
7c40dd08 1877 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1878else
1879 rm -rf conftest*
7c40dd08 1880 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1881fi
1882rm -f conftest*
1883LIBS="$ac_save_LIBS"
1884
1885fi
7c40dd08 1886if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1887 echo "$ac_t""yes" 1>&6
1888 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1889else
1890 echo "$ac_t""no" 1>&6
1891fi
1892
1893 fi
1894 fi
1895fi
1896
1897
a2b63bbd 1898
4e327047 1899
5436fc65 1900#
4e327047
TT
1901# Ok, lets find the tcl source trees so we can use the headers
1902# Warning: transition of version 9 to 10 will break this algorithm
1903# because 10 sorts before 9. We also look for just tcl. We have to
1904# be careful that we don't match stuff like tclX by accident.
1905# the alternative search directory is involked by --with-tclinclude
5436fc65 1906#
4e327047
TT
1907no_tcl=true
1908echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
1909# Check whether --with-tclinclude or --without-tclinclude was given.
1910if test "${with_tclinclude+set}" = set; then
1911 withval="$with_tclinclude"
1912 with_tclinclude=${withval}
1913fi
1914
1915if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
1916 echo $ac_n "(cached) $ac_c" 1>&6
1917else
1918
1919# first check to see if --with-tclinclude was specified
1920if test x"${with_tclinclude}" != x ; then
1921 if test -f ${with_tclinclude}/tclInt.h ; then
1922 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5436fc65 1923 else
4e327047
TT
1924 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
1925 fi
1926fi
1927# next check in private source directory
1928#
1929# since ls returns lowest version numbers first, reverse its output
1930if test x"${ac_cv_c_tclh}" = x ; then
1931 for i in \
1932 ${srcdir}/../tcl \
1933 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` \
1934 ${srcdir}/../../tcl \
1935 `ls -dr ${srcdir}/../../tcl[0-9]* 2>/dev/null` \
1936 ${srcdir}/../../../tcl \
1937 `ls -dr ${srcdir}/../../../tcl[0-9]* 2>/dev/null ` ; do
1938 if test -f $i/tclInt.h ; then
1939 ac_cv_c_tclh=`(cd $i; pwd)`
1940 break
1941 fi
1942 # Tcl 7.5 and greater puts headers in subdirectory.
1943 if test -f $i/generic/tclInt.h ; then
1944 ac_cv_c_tclh=`(cd $i; pwd)`/generic
1945 fi
1946 done
1947fi
1948# finally check in a few common install locations
1949#
1950# since ls returns lowest version numbers first, reverse its output
1951if test x"${ac_cv_c_tclh}" = x ; then
1952 for i in \
1953 `ls -dr /usr/local/src/tcl[0-9]* 2>/dev/null` \
1954 `ls -dr /usr/local/lib/tcl[0-9]* 2>/dev/null` \
1955 /usr/local/src/tcl \
1956 /usr/local/lib/tcl \
1957 ${prefix}/include ; do
1958 if test -f $i/tclInt.h ; then
1959 ac_cv_c_tclh=`(cd $i; pwd)`
1960 break
1961 fi
1962 done
1963fi
1964# see if one is installed
1965if test x"${ac_cv_c_tclh}" = x ; then
1966 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
1967echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5436fc65
C
1968if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1969 echo $ac_n "(cached) $ac_c" 1>&6
1970else
1971 cat > conftest.$ac_ext <<EOF
4e327047 1972#line 1973 "configure"
5436fc65 1973#include "confdefs.h"
4e327047 1974#include <tclInt.h>
5436fc65
C
1975EOF
1976eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1977ac_err=`grep -v '^ *+' conftest.out`
1978if test -z "$ac_err"; then
1979 rm -rf conftest*
1980 eval "ac_cv_header_$ac_safe=yes"
1981else
1982 echo "$ac_err" >&5
1983 rm -rf conftest*
1984 eval "ac_cv_header_$ac_safe=no"
1985fi
1986rm -f conftest*
1987fi
1988if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1989 echo "$ac_t""yes" 1>&6
4e327047 1990 ac_cv_c_tclh=installed
5436fc65
C
1991else
1992 echo "$ac_t""no" 1>&6
4e327047 1993ac_cv_c_tclh=""
5436fc65
C
1994fi
1995
4e327047
TT
1996fi
1997
1998fi
1999
2000if test x"${ac_cv_c_tclh}" = x ; then
2001 TCLHDIR="# no Tcl private headers found"
2002 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2003fi
2004if test x"${ac_cv_c_tclh}" != x ; then
2005 no_tcl=""
2006 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2007 echo "$ac_t""is installed" 1>&6
2008 TCLHDIR=""
2009 else
2010 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2011 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2012 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 2013 fi
5436fc65 2014fi
4e327047
TT
2015
2016echo $ac_n "checking Tcl version""... $ac_c" 1>&6
2017rm -rf tclmajor tclminor
2018orig_includes="$CPPFLAGS"
2019
2020if test x"${TCLHDIR}" != x ; then
2021 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2022fi
2023
2024if test "$cross_compiling" = yes; then
2025 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
2026
2027else
2028cat > conftest.$ac_ext <<EOF
2029#line 2030 "configure"
2030#include "confdefs.h"
2031
2032#include <stdio.h>
2033#include "tcl.h"
2034main() {
2035 FILE *maj = fopen("tclmajor","w");
2036 FILE *min = fopen("tclminor","w");
2037 fprintf(maj,"%d",TCL_MAJOR_VERSION);
2038 fprintf(min,"%d",TCL_MINOR_VERSION);
2039 fclose(maj);
2040 fclose(min);
2041 return 0;
2042}
2043EOF
2044eval $ac_link
2045if test -s conftest && (./conftest; exit) 2>/dev/null; then
2046 tclmajor=`cat tclmajor`
2047 tclminor=`cat tclminor`
2048 tclversion=$tclmajor.$tclminor
2049 echo "$ac_t""$tclversion" 1>&6
2050 rm -f tclmajor tclminor
2051
2052else
2053 echo "$ac_t""can't happen" 1>&6
2054
2055fi
5436fc65 2056fi
4e327047
TT
2057rm -fr conftest*
2058CPPFLAGS="${orig_includes}"
2059
5436fc65 2060
4e327047
TT
2061
2062
2063
5436fc65 2064#
4e327047 2065# Ok, lets find the tcl library
5436fc65 2066# First, look for one uninstalled.
4e327047 2067# the alternative search directory is invoked by --with-tcllib
5436fc65 2068#
4e327047
TT
2069
2070if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
2071 installedtcllibroot=tcl$tclversion
2072else
2073 installedtcllibroot=tcl
2074fi
2075
2076if test x"${no_tcl}" = x ; then
2077 # we reset no_tcl incase something fails here
2078 no_tcl=true
2079 # Check whether --with-tcllib or --without-tcllib was given.
2080if test "${with_tcllib+set}" = set; then
2081 withval="$with_tcllib"
2082 with_tcllib=${withval}
2083fi
2084
2085 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
2086 if eval "test \"`echo '$''{'ac_cv_c_tcllib'+set}'`\" = set"; then
2087 echo $ac_n "(cached) $ac_c" 1>&6
2088else
2089
2090 # First check to see if --with-tcllib was specified.
2091 # This requires checking for both the installed and uninstalled name-styles
2092 # since we have no idea if it's installed or not.
2093 if test x"${with_tcllib}" != x ; then
2094 if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
2095 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
2096 elif test -f "${with_tcllib}/libtcl.so" ; then
2097 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
2098 # then look for a freshly built statically linked library
2099 # if Makefile exists we assume its configured and libtcl will be built first.
2100 elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
2101 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
2102 elif test -f "${with_tcllib}/libtcl.a" ; then
2103 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
2104 else
2105 { echo "configure: error: ${with_tcllib} directory doesn't contain libraries" 1>&2; exit 1; }
2106 fi
5436fc65 2107 fi
4e327047
TT
2108 # then check for a private Tcl library
2109 # Since these are uninstalled, use the simple lib name root.
2110 if test x"${ac_cv_c_tcllib}" = x ; then
2111 for i in \
2112 ../tcl \
2113 `ls -dr ../tcl[0-9]* 2>/dev/null` \
2114 ../../tcl \
2115 `ls -dr ../../tcl[0-9]* 2>/dev/null` \
2116 ../../../tcl \
2117 `ls -dr ../../../tcl[0-9]* 2>/dev/null` ; do
2118 # Tcl 7.5 and greater puts library in subdir. Look there first.
2119 if test -f "$i/unix/libtcl.so" ; then
2120 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2121 break
2122 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2123 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2124 break
2125 # look for a freshly built dynamically linked library
2126 elif test -f "$i/libtcl.so" ; then
2127 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2128 break
2129
2130 # then look for a freshly built statically linked library
2131 # if Makefile exists we assume its configured and libtcl will be
2132 # built first.
2133 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2134 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2135 break
2136 fi
2137 done
5436fc65 2138 fi
4e327047
TT
2139 # check in a few common install locations
2140 if test x"${ac_cv_c_tcllib}" = x ; then
2141 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2142 # first look for a freshly built dynamically linked library
2143 if test -f "$i/lib$installedtcllibroot.so" ; then
2144 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
2145 break
2146 # then look for a freshly built statically linked library
2147 # if Makefile exists we assume its configured and libtcl will be built first.
2148 elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
2149 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
2150 break
2151 fi
2152 done
5436fc65 2153 fi
4e327047
TT
2154 # check in a few other private locations
2155 if test x"${ac_cv_c_tcllib}" = x ; then
2156 for i in \
2157 ${srcdir}/../tcl \
2158 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` ; do
2159 # Tcl 7.5 and greater puts library in subdir. Look there first.
2160 if test -f "$i/unix/libtcl.so" ; then
2161 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2162 break
2163 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2164 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2165 break
2166 # look for a freshly built dynamically linked library
2167 elif test -f "$i/libtcl.so" ; then
2168 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2169 break
2170
2171 # then look for a freshly built statically linked library
2172 # if Makefile exists we assume its configured and libtcl will be
2173 # built first.
2174 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2175 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2176 break
2177 fi
2178 done
2179 fi
2180
2181 # see if one is conveniently installed with the compiler
2182 if test x"${ac_cv_c_tcllib}" = x ; then
2183 orig_libs="$LIBS"
2184 LIBS="$LIBS -l$installedtcllibroot -lm"
2185 if test "$cross_compiling" = yes; then
2186 ac_cv_c_tclib="-l$installedtcllibroot"
2187else
2188cat > conftest.$ac_ext <<EOF
2189#line 2190 "configure"
2190#include "confdefs.h"
2191
2192 Tcl_AppInit()
2193 { exit(0); }
2194EOF
2195eval $ac_link
2196if test -s conftest && (./conftest; exit) 2>/dev/null; then
2197 ac_cv_c_tcllib="-l$installedtcllibroot"
2198else
2199 ac_cv_c_tcllib=""
2200
2201fi
2202fi
2203rm -fr conftest*
2204 LIBS="${orig_libs}"
2205 fi
2206
5436fc65
C
2207fi
2208
4e327047
TT
2209 if test x"${ac_cv_c_tcllib}" = x ; then
2210 TCLLIB="# no Tcl library found"
2211 echo "configure: warning: Can't find Tcl library" 1>&2
2212 else
2213 TCLLIB=${ac_cv_c_tcllib}
2214 echo "$ac_t""found $TCLLIB" 1>&6
2215 no_tcl=
5436fc65 2216 fi
5436fc65
C
2217fi
2218
5436fc65
C
2219
2220
2221
2222
a2b63bbd 2223
4e327047 2224
5436fc65 2225#
4e327047
TT
2226# Ok, lets find the tk source trees so we can use the headers
2227# If the directory (presumably symlink) named "tk" exists, use that one
2228# in preference to any others. Same logic is used when choosing library
2229# and again with Tcl. The search order is the best place to look first, then in
2230# decreasing significance. The loop breaks if the trigger file is found.
2231# Note the gross little conversion here of srcdir by cd'ing to the found
2232# directory. This converts the path from a relative to an absolute, so
2233# recursive cache variables for the path will work right. We check all
2234# the possible paths in one loop rather than many seperate loops to speed
2235# things up.
2236# the alternative search directory is invoked by --with-tkinclude
5436fc65 2237#
4e327047
TT
2238echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2239# Check whether --with-tkinclude or --without-tkinclude was given.
2240if test "${with_tkinclude+set}" = set; then
2241 withval="$with_tkinclude"
2242 with_tkinclude=${withval}
2243fi
2244
2245no_tk=true
2246if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2247 echo $ac_n "(cached) $ac_c" 1>&6
2248else
2249
2250# first check to see if --with-tkinclude was specified
2251if test x"${with_tkinclude}" != x ; then
2252 if test -f ${with_tkinclude}/tk.h ; then
2253 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5436fc65 2254 else
4e327047
TT
2255 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2256 fi
2257fi
2258# next check in private source directory
2259#
2260# since ls returns lowest version numbers first, reverse the entire list
2261# and search for the worst fit, overwriting it with better fits as we find them
2262if test x"${ac_cv_c_tkh}" = x ; then
2263 for i in \
2264 ${srcdir}/../tk \
2265 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` \
2266 ${srcdir}/../../tk \
2267 `ls -dr ${srcdir}/../../tk[0-9]* 2>/dev/null` \
2268 ${srcdir}/../../../tk \
2269 `ls -dr ${srcdir}/../../../tk[0-9]* 2>/dev/null ` ; do
2270 if test -f $i/tk.h ; then
2271 ac_cv_c_tkh=`(cd $i; pwd)`
2272 break
2273 fi
2274 # Tk 4.1 and greater puts this in a subdir.
2275 if test -f $i/generic/tk.h; then
2276 ac_cv_c_tkh=`(cd $i; pwd)`/generic
2277 fi
2278 done
2279fi
2280# finally check in a few common install locations
2281#
2282# since ls returns lowest version numbers first, reverse the entire list
2283# and search for the worst fit, overwriting it with better fits as we find them
2284if test x"${ac_cv_c_tkh}" = x ; then
2285 for i in \
2286 `ls -dr /usr/local/src/tk[0-9]* 2>/dev/null` \
2287 `ls -dr /usr/local/lib/tk[0-9]* 2>/dev/null` \
2288 /usr/local/src/tk \
2289 /usr/local/lib/tk \
2290 ${prefix}/include ; do
2291 if test -f $i/tk.h ; then
2292 ac_cv_c_tkh=`(cd $i; pwd)`
2293 break
2294 fi
2295 done
2296fi
2297# see if one is installed
2298if test x"${ac_cv_c_tkh}" = x ; then
2299 ac_safe=`echo "tk.h" | tr './\055' '___'`
2300echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5436fc65
C
2301if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2302 echo $ac_n "(cached) $ac_c" 1>&6
2303else
2304 cat > conftest.$ac_ext <<EOF
4e327047 2305#line 2306 "configure"
5436fc65 2306#include "confdefs.h"
4e327047 2307#include <tk.h>
5436fc65
C
2308EOF
2309eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2310ac_err=`grep -v '^ *+' conftest.out`
2311if test -z "$ac_err"; then
2312 rm -rf conftest*
2313 eval "ac_cv_header_$ac_safe=yes"
2314else
2315 echo "$ac_err" >&5
2316 rm -rf conftest*
2317 eval "ac_cv_header_$ac_safe=no"
2318fi
2319rm -f conftest*
2320fi
2321if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2322 echo "$ac_t""yes" 1>&6
4e327047 2323 ac_cv_c_tkh=installed
5436fc65
C
2324else
2325 echo "$ac_t""no" 1>&6
2326fi
2327
4e327047
TT
2328fi
2329
2330fi
2331
2332if test x"${ac_cv_c_tkh}" != x ; then
2333 no_tk=""
2334 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2335 echo "$ac_t""is installed" 1>&6
2336 TKHDIR=""
2337 else
2338 echo "$ac_t""found in $ac_cv_c_tkh" 1>&6
2339 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2340 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
2341 fi
2342else
4e327047
TT
2343 TKHDIR="# no Tk directory found"
2344 echo "configure: warning: Can't find Tk private headers" 1>&2
2345 no_tk=true
5436fc65
C
2346fi
2347
4e327047
TT
2348# if Tk is installed, extract the major/minor version
2349if test x"${no_tk}" = x ; then
2350echo $ac_n "checking Tk version""... $ac_c" 1>&6
2351rm -rf tkmajor tkminor
2352orig_includes="$CPPFLAGS"
2353
2354if test x"${TCLHDIR}" != x ; then
2355 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2356fi
2357if test x"${TKHDIR}" != x ; then
2358 CPPFLAGS="$CPPFLAGS $TKHDIR"
2359fi
2360if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
2361 CPPFLAGS="$CPPFLAGS -I$x_includes"
2362fi
2363
2364if test "$cross_compiling" = yes; then
2365 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
2366
2367else
2368cat > conftest.$ac_ext <<EOF
2369#line 2370 "configure"
2370#include "confdefs.h"
2371
2372#include <stdio.h>
2373#include "tk.h"
2374 main() {
2375 FILE *maj = fopen("tkmajor","w");
2376 FILE *min = fopen("tkminor","w");
2377 fprintf(maj,"%d",TK_MAJOR_VERSION);
2378 fprintf(min,"%d",TK_MINOR_VERSION);
2379 fclose(maj);
2380 fclose(min);
2381 return 0;
2382}
2383EOF
2384eval $ac_link
2385if test -s conftest && (./conftest; exit) 2>/dev/null; then
2386 tkmajor=`cat tkmajor`
2387 tkminor=`cat tkminor`
2388 tkversion=$tkmajor.$tkminor
2389 echo "$ac_t""$tkversion" 1>&6
2390 rm -f tkmajor tkminor
2391
2392else
2393 { echo "configure: error:
2394cannot compile a simple X program - suspect your xmkmf is
2395misconfigured and is incorrectly reporting the location of your X
2396include or libraries - report this to your system admin" 1>&2; exit 1; }
2397fi
2398fi
2399rm -fr conftest*
2400CPPFLAGS="${orig_includes}"
2401fi
2402
2403
2404
2405
2406
2407
5436fc65 2408#
4e327047
TT
2409# Ok, lets find the tk library
2410# First, look for the latest private (uninstalled) copy
2411# Notice that the destinations in backwards priority since the tests have
2412# no break.
2413# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
2414# is it indicates the target has been configured and will (probably)
2415# soon be built. This allows an entire tree of Tcl software to be
2416# configured at once and then built.
2417# the alternative search directory is invoked by --with-tklib
5436fc65 2418#
4e327047
TT
2419
2420if test x"${no_tk}" = x ; then
2421 # reset no_tk incase something fails here
2422 no_tk="true"
2423
2424 if test $tkmajor -ge 4 ; then
2425 installedtklibroot=tk$tkversion
2426 else
2427 installedtkllibroot=tk
5436fc65 2428 fi
4e327047
TT
2429
2430 # Check whether --with-tklib or --without-tklib was given.
2431if test "${with_tklib+set}" = set; then
2432 withval="$with_tklib"
2433 with_tklib=${withval}
5436fc65 2434fi
4e327047
TT
2435
2436 echo $ac_n "checking for Tk library""... $ac_c" 1>&6
2437 if eval "test \"`echo '$''{'ac_cv_c_tklib'+set}'`\" = set"; then
2438 echo $ac_n "(cached) $ac_c" 1>&6
2439else
2440
2441 # first check to see if --with-tklib was specified
2442 # This requires checking for both the installed and uninstalled name-styles
2443 # since we have no idea if it's installed or not.
2444 if test x"${with_tklib}" != x ; then
2445 if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
2446 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
2447 no_tk=""
2448 elif test -f "${with_tklib}/libtk.so" ; then
2449 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
2450 no_tk=""
2451 # then look for a freshly built statically linked library
2452 # if Makefile exists we assume its configured and libtk will be built
2453 elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
2454 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
2455 no_tk=""
2456 elif test -f "${with_tklib}/libtk.a" ; then
2457 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
2458 no_tk=""
2459 else
2460 { echo "configure: error: ${with_tklib} directory doesn't contain libraries" 1>&2; exit 1; }
2461 fi
5436fc65 2462 fi
4e327047
TT
2463 # then check for a private Tk library
2464 # Since these are uninstalled, use the simple lib name root.
2465 if test x"${ac_cv_c_tklib}" = x ; then
2466 for i in \
2467 ../tk \
2468 `ls -dr ../tk[0-9]* 2>/dev/null` \
2469 ../../tk \
2470 `ls -dr ../../tk[0-9]* 2>/dev/null` \
2471 ../../../tk \
2472 `ls -dr ../../../tk[0-9]* 2>/dev/null` ; do
2473 # Tk 4.1 and greater puts things in subdirs. Check these first.
2474 if test -f "$i/unix/libtk.so" ; then
2475 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2476 no_tk=
2477 break
2478 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2479 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
2480 no_tk=
2481 break
2482 # look for a freshly built dynamically linked library
2483 elif test -f "$i/libtk.so" ; then
2484 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2485 no_tk=
2486 break
2487 # then look for a freshly built statically linked library
2488 # if Makefile exists we assume its configured and libtk will be built
2489 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2490 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2491 no_tk=""
2492 break
2493 fi
2494 done
2495 fi
2496 # finally check in a few common install locations
2497 if test x"${ac_cv_c_tklib}" = x ; then
2498 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2499 # first look for a freshly built dynamically linked library
2500 if test -f "$i/lib$installedtklibroot.so" ; then
2501 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
2502 no_tk=""
2503 break
2504 # then look for a freshly built statically linked library
2505 # if Makefile exists, we assume it's configured and libtcl will be built
2506 elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
2507 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
2508 no_tk=""
2509 break
2510 fi
2511 done
2512 fi
2513 # check in a few other private locations
2514 if test x"${ac_cv_c_tklib}" = x ; then
2515 for i in \
2516 ${srcdir}/../tk \
2517 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` ; do
2518 # Tk 4.1 and greater puts things in subdirs. Check these first.
2519 if test -f "$i/unix/libtk.so" ; then
2520 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2521 no_tk=
2522 break
2523 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2524 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
2525 no_tk=
2526 break
2527 # look for a freshly built dynamically linked library
2528 elif test -f "$i/libtk.so" ; then
2529 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2530 no_tk=""
2531 break
2532 # then look for a freshly built statically linked library
2533 # if Makefile exists, we assume it's configured and libtcl will be built
2534 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2535 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2536 no_tk=""
2537 break
2538 fi
2539 done
2540 fi
2541 # see if one is conveniently installed with the compiler
2542 if test x"${ac_cv_c_tklib}" = x ; then
2543
2544 orig_libs="$LIBS"
2545 LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
2546 if test "$cross_compiling" = yes; then
2547 ac_cv_c_tklib="-l$installedtklibroot"
2548else
2549cat > conftest.$ac_ext <<EOF
2550#line 2551 "configure"
2551#include "confdefs.h"
5436fc65 2552
4e327047
TT
2553 Tcl_AppInit()
2554 { exit(0); }
2555EOF
2556eval $ac_link
2557if test -s conftest && (./conftest; exit) 2>/dev/null; then
2558 ac_cv_c_tklib="-l$installedtklibroot"
5436fc65 2559else
4e327047
TT
2560 ac_cv_c_tklib=""
2561
2562fi
2563fi
2564rm -fr conftest*
2565 LIBS="${orig_libs}"
2566 fi
2567
2568fi
2569
2570 if test x"${ac_cv_c_tklib}" = x ; then
2571 TKLIB="# no Tk library found"
2572 echo "configure: warning: Can't find Tk library" 1>&2
2573 else
2574 TKLIB=$ac_cv_c_tklib
2575 echo "$ac_t""found $TKLIB" 1>&6
2576 no_tk=
2577 fi
5436fc65
C
2578fi
2579
2580
2581
2582
2583
1a57cd09
TT
2584 # Look for dynamic linking libraries that Tcl might need. This is
2585 # only done for Tcl 7.5 and greater. It would be good to look for and
2586 # use the "configInfo" file that Tcl generates, but for now that is
2587 # beyond us.
2588 if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
2589 echo $ac_n "checking for -ldl""... $ac_c" 1>&6
2590ac_lib_var=`echo dl | tr '.-/+' '___p'`
2591if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
2593else
2594 ac_save_LIBS="$LIBS"
2595LIBS="-ldl $LIBS"
2596cat > conftest.$ac_ext <<EOF
2597#line 2598 "configure"
2598#include "confdefs.h"
2599
2600int main() { return 0; }
2601int t() {
2602main()
2603; return 0; }
2604EOF
2605if eval $ac_link; then
2606 rm -rf conftest*
2607 eval "ac_cv_lib_$ac_lib_var=yes"
2608else
2609 rm -rf conftest*
2610 eval "ac_cv_lib_$ac_lib_var=no"
2611fi
2612rm -f conftest*
2613LIBS="$ac_save_LIBS"
2614
2615fi
2616if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2617 echo "$ac_t""yes" 1>&6
2618 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2619 cat >> confdefs.h <<EOF
2620#define $ac_tr_lib 1
2621EOF
2622
2623 LIBS="-ldl $LIBS"
2624
2625else
2626 echo "$ac_t""no" 1>&6
2627echo $ac_n "checking for -ldld""... $ac_c" 1>&6
2628ac_lib_var=`echo dld | tr '.-/+' '___p'`
2629if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2630 echo $ac_n "(cached) $ac_c" 1>&6
2631else
2632 ac_save_LIBS="$LIBS"
2633LIBS="-ldld $LIBS"
2634cat > conftest.$ac_ext <<EOF
2635#line 2636 "configure"
2636#include "confdefs.h"
2637
2638int main() { return 0; }
2639int t() {
2640main()
2641; return 0; }
2642EOF
2643if eval $ac_link; then
2644 rm -rf conftest*
2645 eval "ac_cv_lib_$ac_lib_var=yes"
2646else
2647 rm -rf conftest*
2648 eval "ac_cv_lib_$ac_lib_var=no"
2649fi
2650rm -f conftest*
2651LIBS="$ac_save_LIBS"
2652
2653fi
2654if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2655 echo "$ac_t""yes" 1>&6
2656 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2657 cat >> confdefs.h <<EOF
2658#define $ac_tr_lib 1
2659EOF
2660
2661 LIBS="-ldld $LIBS"
2662
2663else
2664 echo "$ac_t""no" 1>&6
2665fi
2666
2667fi
2668
2669 fi
2670
a2b63bbd 2671 ENABLE_GDBTK=1
66efdff9 2672
a2b63bbd
JM
2673 if test "x$no_x" != "xyes"; then
2674 if test "x$x_includes" != "x" ;
2675 then
2676 X_CFLAGS="-I$x_includes"
2677 else
2678 X_CFLAGS=""
2679 fi
2680
2681 if test "x$x_libraries" != "x" ;
2682 then
2683 X_LDFLAGS="-L$x_libraries"
2684 else
2685 X_LDFLAGS=""
2686 fi
2687
2688 case "$host" in
2689#
2690# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2691#
146ee7db 2692 sparc*-sun-solaris2*)
a2b63bbd
JM
2693 if test "x$GCC" = "xyes";
2694 then
127841e4 2695 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
2696 else
2697 if test "x$x_libraries" != "x" ;
2698 then
2699 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2700 fi
2701 X_LIBS="-lX11 -lXext -lX11"
2702 fi ;;
2703#
2704# gdb linked statically w/ SunOS or HPUX
2705#
2706 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2707 if test "x$x_libraries" != "x" ;
2708 then
2709 X_LIBS="$x_libraries/libX11.a"
2710 else
2711 X_LIBS="/usr/lib/libX11.a"
2712 fi ;;
2713#
2714# default is to link dynamically
2715#
2716 *)
2717 X_LIBS="-lX11" ;;
2718 esac
2719 else
2720 X_LDLAGS=""
2721 X_CFLAGS=""
2722 X_LIBS=""
2723 echo "configure: warning: No X based programs will be built" 1>&2
2724 fi
2725
2726 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2727 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2728 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2729fi
66efdff9 2730
66efdff9 2731
5436fc65 2732
66efdff9
JM
2733
2734
5436fc65
C
2735# end-sanitize-gdbtk
2736
2737
2738
2739
2740
7c40dd08
DE
2741# target_subdir is used by the testsuite to find the target libraries.
2742target_subdir=
2743if test "${host}" != "${target}"; then
2744 target_subdir="${target_alias}/"
2745fi
2746
5436fc65
C
2747
2748configdirs="doc testsuite"
2749
2750
2751# Map host cpu into the config cpu subdirectory name.
2752# The default is $host_cpu.
2753
2754case "${host_cpu}" in
2755
2756c[12]) gdb_host_cpu=convex ;;
2757hppa*) gdb_host_cpu=pa ;;
3222ff2e 2758i[3456]86) gdb_host_cpu=i386 ;;
5436fc65
C
2759m68*) gdb_host_cpu=m68k ;;
2760m88*) gdb_host_cpu=m88k ;;
2761np1) gdb_host_cpu=gould ;;
2762pyramid) gdb_host_cpu=pyr ;;
2763powerpc*) gdb_host_cpu=powerpc ;;
146ee7db 2764sparc64) gdb_host_cpu=sparc ;;
5436fc65
C
2765*) gdb_host_cpu=$host_cpu ;;
2766
2767esac
2768
2769# map host info into gdb names.
2770
2771case "${host}" in
2772
2773a29k-*-*) gdb_host=ultra3 ;;
2774
2775alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2776alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2777alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
2778
2779arm-*-*) gdb_host=arm ;;
2780
2781c[12]-*-*) gdb_host=convex ;;
2782
2783hppa*-*-bsd*) gdb_host=hppabsd ;;
2784hppa*-*-hiux*) gdb_host=hppahpux ;;
2785hppa*-*-hpux*) gdb_host=hppahpux ;;
2786hppa*-*-osf*) gdb_host=hppaosf ;;
2787
3222ff2e
MM
2788i[3456]86-ncr-*) gdb_host=ncr3000 ;;
2789i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2790i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
2791i[3456]86-sequent-sysv*) gdb_host=ptx ;;
2792i[3456]86-*-aix*) gdb_host=i386aix ;;
2793i[3456]86-*-bsd*) gdb_host=i386bsd ;;
2794i[3456]86-*-dgux*) gdb_host=i386dgux ;;
2795i[3456]86-*-freebsd*) gdb_host=fbsd ;;
2796i[3456]86-*-netbsd*) gdb_host=nbsd ;;
2797i[3456]86-*-go32*) gdb_host=go32 ;;
2798i[3456]86-*-linux*) gdb_host=linux ;;
2799i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
2800i[3456]86-*-mach3*) gdb_host=i386m3 ;;
2801i[3456]86-*-mach*) gdb_host=i386mach ;;
2802i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
2803i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2804i[3456]86-*-sco*) gdb_host=i386sco ;;
2805i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
2806i[3456]86-*-sunos*) gdb_host=sun386 ;;
2807i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
2808i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
2809i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
2810i[3456]86-*-unixware) gdb_host=i386v4 ;;
2811i[3456]86-*-sysv*) gdb_host=i386v ;;
2812i[3456]86-*-isc*) gdb_host=i386v32 ;;
2813i[3456]86-*-os9k) gdb_host=i386os9k ;;
2814i[3456]86-*-win32*) gdb_host=win32 ;;
5436fc65
C
2815m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2816m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2817m68030-sony-*) gdb_host=news1000 ;;
2818
2819m68*-altos-*) gdb_host=altos ;;
2820m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2821m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2822m68*-att-*) gdb_host=3b1 ;;
2823m68*-bull*-sysv*) gdb_host=dpx2 ;;
2824m68*-hp-bsd*) gdb_host=hp300bsd ;;
2825m68*-hp-hpux*) gdb_host=hp300hpux ;;
2826m68*-isi-*) gdb_host=isi ;;
2827m68*-*-lynxos*) gdb_host=m68klynx ;;
2828m68*-*-sysv4*) gdb_host=m68kv4 ;;
2829m68*-motorola-*) gdb_host=delta68 ;;
2830m68*-sony-*) gdb_host=news ;;
2831m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2832m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2833m68*-sun-*) gdb_host=sun3os4 ;;
2834
2835m88*-harris-cxux*) gdb_host=cxux ;;
2836m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2837m88*-motorola-sysv*) gdb_host=delta88 ;;
2838m88*-*-mach3*) gdb_host=mach3 ;;
2839m88*-*-*) gdb_host=m88k ;;
2840
2841mips-dec-mach3*) gdb_host=mach3 ;;
2842mips-dec-*) gdb_host=decstation ;;
2843mips-little-*) gdb_host=littlemips ;;
2844mips-sgi-irix3*) gdb_host=irix3 ;;
2845mips-sgi-irix4*) gdb_host=irix4 ;;
2846mips-sgi-irix5*) gdb_host=irix5 ;;
2847mips-sony-*) gdb_host=news-mips ;;
2848mips-*-mach3*) gdb_host=mach3 ;;
2849mips-*-sysv4*) gdb_host=mipsv4 ;;
2850mips-*-sysv*) gdb_host=riscos ;;
2851mips-*-riscos*) gdb_host=riscos ;;
2852
2853none-*-*) gdb_host=none ;;
2854
2855np1-*-*) gdb_host=np1 ;;
2856
2857ns32k-*-mach3*) gdb_host=mach3 ;;
2858ns32k-*-netbsd*) gdb_host=nbsd ;;
2859ns32k-umax-*) gdb_host=umax ;;
2860ns32k-utek-sysv*) gdb_host=merlin ;;
2861
fbc3f191
JL
2862powerpc-*-aix*) gdb_host=aix ;;
2863
5436fc65
C
2864pn-*-*) gdb_host=pn ;;
2865
2866pyramid-*-*) gdb_host=pyramid ;;
2867
2868romp-*-*) gdb_host=rtbsd ;;
2869
2870rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
a1956677 2871rs6000-*-aix4*) gdb_host=aix4 ;;
5436fc65
C
2872rs6000-*-*) gdb_host=rs6000 ;;
2873
2874sparc-*-lynxos*) gdb_host=sparclynx ;;
2875sparc-*-netbsd*) gdb_host=nbsd ;;
2876sparc-*-solaris2*) gdb_host=sun4sol2 ;;
2877sparc-*-sunos4*) gdb_host=sun4os4 ;;
2878sparc-*-sunos5*) gdb_host=sun4sol2 ;;
2879sparc-*-*) gdb_host=sun4os4 ;;
146ee7db 2880sparc64-*-*) gdb_host=sun4sol2 ;;
5436fc65
C
2881
2882tahoe-*-*) gdb_host=tahoe ;;
2883
2884vax-*-bsd*) gdb_host=vaxbsd ;;
2885vax-*-ultrix2*) gdb_host=vaxult2 ;;
2886vax-*-ultrix*) gdb_host=vaxult ;;
2887
2888w65-*-*) gdb_host=w65 ;;
2889
2890esac
2891
2892
2893# Map target cpu into the config cpu subdirectory name.
2894# The default is $target_cpu.
2895
2896case "${target_cpu}" in
2897
2898alpha) gdb_target_cpu=alpha ;;
2899c[12]) gdb_target_cpu=convex ;;
2900hppa*) gdb_target_cpu=pa ;;
3222ff2e 2901i[3456]86) gdb_target_cpu=i386 ;;
5436fc65
C
2902m68*) gdb_target_cpu=m68k ;;
2903m88*) gdb_target_cpu=m88k ;;
2904mips*) gdb_target_cpu=mips ;;
2905np1) gdb_target_cpu=gould ;;
2906powerpc*) gdb_target_cpu=powerpc ;;
2907pn) gdb_target_cpu=gould ;;
2908pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
2909sparc*) gdb_target_cpu=sparc ;;
2910*) gdb_target_cpu=$target_cpu ;;
2911
2912esac
2913
2914# map target info into gdb names.
2915
2916case "${target}" in
2917
2918a29k-*-aout*) gdb_target=a29k ;;
2919a29k-*-coff*) gdb_target=a29k ;;
2920a29k-*-elf*) gdb_target=a29k ;;
2921a29k-*-ebmon*) gdb_target=a29k ;;
2922a29k-*-kern*) gdb_target=a29k-kern ;;
2923a29k-*-none*) gdb_target=a29k ;;
2924a29k-*-sym1*) gdb_target=ultra3 ;;
2925a29k-*-udi*) gdb_target=a29k-udi ;;
2926a29k-*-vxworks*) gdb_target=vx29k ;;
2927
2928alpha-*-osf*) gdb_target=alpha-osf1 ;;
2929
2930# start-sanitize-arc
2931arc-*-*) gdb_target=arc ;;
2932# end-sanitize-arc
2933
2934arm-*-*) gdb_target=arm ;;
2935
2936c1-*-*) gdb_target=convex ;;
2937c2-*-*) gdb_target=convex ;;
2938
fb506180
SS
2939h8300-*-*) gdb_target=h8300 ;;
2940h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
2941
2942sh-*-*) gdb_target=sh ;;
2943
2944# start-sanitize-r16
2945r16-*-*) gdb_target=r16 ;;
2946# end-sanitize-r16
2947
2948hppa*-*-bsd*) gdb_target=hppabsd ;;
2949hppa*-*-pro*) gdb_target=hppapro ;;
2950hppa*-*-hpux*) gdb_target=hppahpux ;;
2951hppa*-*-hiux*) gdb_target=hppahpux ;;
2952hppa*-*-osf*) gdb_target=hppaosf ;;
2953
3222ff2e
MM
2954i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
2955i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
2956i[3456]86-sequent-sysv*) gdb_target=ptx ;;
2957i[3456]86-ncr-*) gdb_target=ncr3000 ;;
2958i[3456]86-*-aout*) gdb_target=i386aout ;;
2959i[3456]86-*-coff*) gdb_target=i386v ;;
2960i[3456]86-*-elf*) gdb_target=i386v ;;
2961i[3456]86-*-aix*) gdb_target=i386aix ;;
2962i[3456]86-*-bsd*) gdb_target=i386bsd ;;
2963i[3456]86-*-freebsd*) gdb_target=fbsd ;;
2964i[3456]86-*-netbsd*) gdb_target=nbsd ;;
2965i[3456]86-*-os9k) gdb_target=i386os9k ;;
2966i[3456]86-*-go32*) gdb_target=i386aout ;;
2967i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 2968 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
2969i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
2970i[3456]86-*-sunos*) gdb_target=sun386 ;;
2971i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
2972i[3456]86-*-sco*) gdb_target=i386v ;;
2973i[3456]86-*-sysv*) gdb_target=i386v ;;
2974i[3456]86-*-linux*) gdb_target=linux ;;
2975i[3456]86-*-isc*) gdb_target=i386v ;;
2976i[3456]86-*-mach3*) gdb_target=i386m3 ;;
2977i[3456]86-*-mach*) gdb_target=i386mach ;;
2978i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 2979 configdirs="${configdirs} nlm" ;;
3222ff2e
MM
2980i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
2981i[3456]86-*-win32) gdb_target=win32 ;;
5436fc65
C
2982
2983i960-*-bout*) gdb_target=vxworks960 ;;
2984i960-*-coff*) gdb_target=nindy960 ;;
2985i960-*-elf*) gdb_target=nindy960 ;;
2986
2987i960-*-nindy*) gdb_target=nindy960 ;;
2988i960-*-vxworks*) gdb_target=vxworks960 ;;
2989
2990m68000-*-sunos3*) gdb_target=sun2os3 ;;
2991m68000-*-sunos4*) gdb_target=sun2os4 ;;
2992
2993m68*-apollo*-bsd*) gdb_target=apollo68b ;;
2994m68*-bull-sysv*) gdb_target=dpx2 ;;
2995m68*-hp-bsd*) gdb_target=hp300bsd ;;
2996m68*-hp-hpux*) gdb_target=hp300hpux ;;
2997m68*-altos-*) gdb_target=altos ;;
2998m68*-att-*) gdb_target=3b1 ;;
2999m68*-cisco*-*) gdb_target=cisco ;;
3000m68*-ericsson-*) gdb_target=es1800 ;;
3001m68*-isi-*) gdb_target=isi ;;
3002m68*-motorola-*) gdb_target=delta68 ;;
3003m68*-netx-*) gdb_target=vxworks68 ;;
3004m68*-sony-*) gdb_target=news ;;
3005m68*-tandem-*) gdb_target=st2000 ;;
3006m68*-rom68k-*) gdb_target=monitor ;;
3007m68*-*bug-*) gdb_target=monitor ;;
3008m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 3009m68*-est-*) gdb_target=monitor ;;
5436fc65
C
3010m68*-*-aout*) gdb_target=monitor ;;
3011m68*-*-coff*) gdb_target=monitor ;;
3012m68*-*-elf*) gdb_target=monitor ;;
3013m68*-*-lynxos*) gdb_target=m68klynx
3014 configdirs="${configdirs} gdbserver" ;;
3015m68*-*-os68k*) gdb_target=os68k ;;
3016m68*-*-sunos3*) gdb_target=sun3os3 ;;
3017m68*-*-sunos4*) gdb_target=sun3os4 ;;
3018m68*-*-sysv4*) gdb_target=m68kv4 ;;
3019m68*-*-vxworks*) gdb_target=vxworks68 ;;
3020
3021m88*-harris-cxux*) gdb_target=cxux ;;
3022m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
3023m88*-*-mach3*) gdb_target=mach3 ;;
3024m88*-motorola-*) gdb_target=delta88 ;;
3025m88*-*-*) gdb_target=m88k ;;
3026
3027mips64*-big-*) gdb_target=bigmips64 ;;
3028mips*-big-*) gdb_target=bigmips ;;
3029mips*-dec-mach3*) gdb_target=mach3 ;;
3030mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
3031mips64*el-*-ecoff*) gdb_target=embedl64 ;;
3032mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
3033mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
3034mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
3035mips64*el-*-elf*) gdb_target=embedl64 ;;
3036mips64*-*-elf*) gdb_target=embed64 ;;
3037mips*el-*-ecoff*) gdb_target=embedl ;;
3038mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 3039# start-sanitize-gm
7bb5e831 3040mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 3041# end-sanitize-gm
7bb5e831
RS
3042mips*el-*-elf*) gdb_target=embedl ;;
3043mips*-*-elf*) gdb_target=embed ;;
5436fc65
C
3044mips*-little-*) gdb_target=littlemips ;;
3045mips*-sgi-irix5*) gdb_target=irix5 ;;
3046mips*-sgi-*) gdb_target=irix3 ;;
3047mips*-sony-*) gdb_target=bigmips ;;
3048mips*-*-mach3*) gdb_target=mach3 ;;
3049mips*-*-sysv4*) gdb_target=mipsv4 ;;
3050mips*-*-sysv*) gdb_target=bigmips ;;
3051mips*-*-riscos*) gdb_target=bigmips ;;
3052
3053none-*-*) gdb_target=none ;;
3054
3055np1-*-*) gdb_target=np1 ;;
3056
3057ns32k-*-mach3*) gdb_target=mach3 ;;
3058ns32k-*-netbsd*) gdb_target=nbsd ;;
3059ns32k-utek-sysv*) gdb_target=merlin ;;
3060ns32k-utek-*) gdb_target=umax ;;
3061
3062pn-*-*) gdb_target=pn ;;
c148ab3c 3063powerpc-*-macos*) gdb_target=macos ;;
5436fc65
C
3064powerpc-*-netware*) gdb_target=ppc-nw
3065 configdirs="${configdirs} nlm" ;;
3066
65eaea27 3067powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 3068powerpc-*-aix*) gdb_target=aix ;;
3c0bf315
MM
3069powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3070 gdb_target=ppc-sim
3071 else
3072 gdb_target=ppc-eabi
3073 fi ;;
3074powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3075 gdb_target=ppcle-sim
3076 else
3077 gdb_target=ppcle-eabi
3078 fi ;;
5436fc65
C
3079
3080pyramid-*-*) gdb_target=pyramid ;;
3081
3082rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 3083rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
3084rs6000-*-*) gdb_target=rs6000 ;;
3085
3086sparc-*-aout*) gdb_target=sparc-em ;;
3087sparc-*-coff*) gdb_target=sparc-em ;;
3088sparc-*-elf*) gdb_target=sparc-em ;;
3089sparc-*-lynxos*) gdb_target=sparclynx
3090 configdirs="${configdirs} gdbserver" ;;
3091sparc-*-netbsd*) gdb_target=nbsd ;;
3092sparc-*-solaris2*) gdb_target=sun4sol2 ;;
3093sparc-*-sunos4*) gdb_target=sun4os4 ;;
3094sparc-*-sunos5*) gdb_target=sun4sol2 ;;
3095sparc-*-vxworks*) gdb_target=vxsparc ;;
3096sparc-*-*) gdb_target=sun4os4 ;;
3097sparclite*-*-*) gdb_target=sparclite ;;
146ee7db 3098sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
5436fc65
C
3099sparc64-*-*) gdb_target=sp64 ;;
3100
3101tahoe-*-*) gdb_target=tahoe ;;
3102
3103vax-*-*) gdb_target=vax ;;
3104
3105w65-*-*) gdb_target=w65 ;;
3106
fb506180 3107z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
3108
3109esac
3110
3111
5f107900 3112frags=
5436fc65
C
3113host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
3114if test ! -f ${host_makefile_frag}; then
3115{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
3116fi
5f107900 3117frags="$frags $host_makefile_frag"
5436fc65
C
3118
3119target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
3120if test ! -f ${target_makefile_frag}; then
3121{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
3122fi
5f107900 3123frags="$frags $target_makefile_frag"
5436fc65
C
3124
3125
3126
3127
3128
094fd4ae
C
3129hostfile=`sed -n '
3130s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3131' ${host_makefile_frag}`
5436fc65 3132
094fd4ae
C
3133targetfile=`sed -n '
3134s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3135' ${target_makefile_frag}`
5436fc65
C
3136
3137# these really aren't orthogonal true/false values of the same condition,
3138# but shells are slow enough that I like to reuse the test conditions
3139# whenever possible
3140if test "${target}" = "${host}"; then
094fd4ae
C
3141nativefile=`sed -n '
3142s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3143' ${host_makefile_frag}`
5436fc65
C
3144else
3145# GDBserver is only useful in a "native" enviroment
3146configdirs=`echo $configdirs | sed 's/gdbserver//'`
3147fi
3148
094fd4ae 3149
5436fc65
C
3150# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
3151# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
3152# corresponding links. But we have to remove the xm.h files and tm.h
3153# files anyway, e.g. when switching from "configure host" to
3154# "configure none".
3155
3156files=
3157links=
3158rm -f xm.h
3159if test "${hostfile}" != ""; then
3160files="${files} config/${gdb_host_cpu}/${hostfile}"
3161links="${links} xm.h"
3162fi
3163rm -f tm.h
3164if test "${targetfile}" != ""; then
3165files="${files} config/${gdb_target_cpu}/${targetfile}"
3166links="${links} tm.h"
3167fi
3168rm -f nm.h
3169if test "${nativefile}" != ""; then
3170files="${files} config/${gdb_host_cpu}/${nativefile}"
3171links="${links} nm.h"
3172else
3173# A cross-only configuration.
3174files="${files} config/nm-empty.h"
3175links="${links} nm.h"
3176fi
3177# start-sanitize-gdbtk
3178
3179# Make it possible to use the GUI without doing a full install
3180if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
3181files="${files} gdbtk.tcl"
3182links="${links} gdbtk.tcl"
3183fi
3184# end-sanitize-gdbtk
3185
3186
3187
3188subdirs="$configdirs"
3189
3190trap '' 1 2 15
3191cat > confcache <<\EOF
3192# This file is a shell script that caches the results of configure
3193# tests run on this system so they can be shared between configure
3194# scripts and configure runs. It is not useful on other systems.
3195# If it contains results you don't want to keep, you may remove or edit it.
3196#
3197# By default, configure uses ./config.cache as the cache file,
3198# creating it if it does not exist already. You can give configure
3199# the --cache-file=FILE option to use a different cache file; that is
3200# what configure does when it calls configure scripts in
3201# subdirectories, so they share the cache.
3202# Giving --cache-file=/dev/null disables caching, for debugging configure.
3203# config.status only pays attention to the cache file if you give it the
3204# --recheck option to rerun configure.
3205#
3206EOF
3207# Ultrix sh set writes to stderr and can't be redirected directly,
3208# and sets the high bit in the cache file unless we assign to the vars.
3209(set) 2>&1 |
3210 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3211 >> confcache
3212if cmp -s $cache_file confcache; then
3213 :
3214else
3215 if test -w $cache_file; then
3216 echo "updating cache $cache_file"
3217 cat confcache > $cache_file
3218 else
3219 echo "not updating unwritable cache $cache_file"
3220 fi
3221fi
3222rm -f confcache
3223
3224trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3225
3226test "x$prefix" = xNONE && prefix=$ac_default_prefix
3227# Let make expand exec_prefix.
3228test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3229
3230# Any assignment to VPATH causes Sun make to only execute
3231# the first set of double-colon rules, so remove it if not needed.
3232# If there is a colon in the path, we need to keep it.
3233if test "x$srcdir" = x.; then
3234 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3235fi
3236
3237trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3238
3239# Transform confdefs.h into DEFS.
3240# Protect against shell expansion while executing Makefile rules.
3241# Protect against Makefile macro expansion.
3242cat > conftest.defs <<\EOF
3243s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
3244s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
3245s%\[%\\&%g
3246s%\]%\\&%g
3247s%\$%$$%g
3248EOF
3249DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3250rm -f conftest.defs
3251
3252
3253# Without the "./", some shells look in PATH for config.status.
3254: ${CONFIG_STATUS=./config.status}
3255
3256echo creating $CONFIG_STATUS
3257rm -f $CONFIG_STATUS
3258cat > $CONFIG_STATUS <<EOF
3259#! /bin/sh
3260# Generated automatically by configure.
3261# Run this file to recreate the current configuration.
3262# This directory was configured as follows,
3263# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3264#
3265# $0 $ac_configure_args
3266#
3267# Compiler output produced by configure, useful for debugging
3268# configure, is in ./config.log if it exists.
3269
3270ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3271for ac_option
3272do
3273 case "\$ac_option" in
3274 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3275 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3276 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3277 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7c40dd08 3278 echo "$CONFIG_STATUS generated by autoconf version 2.7"
5436fc65
C
3279 exit 0 ;;
3280 -help | --help | --hel | --he | --h)
3281 echo "\$ac_cs_usage"; exit 0 ;;
3282 *) echo "\$ac_cs_usage"; exit 1 ;;
3283 esac
3284done
3285
3286ac_given_srcdir=$srcdir
3287ac_given_INSTALL="$INSTALL"
3288
3289trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7c40dd08
DE
3290EOF
3291cat >> $CONFIG_STATUS <<EOF
5436fc65 3292
7c40dd08
DE
3293# Protect against being on the right side of a sed subst in config.status.
3294sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3295 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
3296$ac_vpsub
3297$extrasub
3298s%@CFLAGS@%$CFLAGS%g
3299s%@CPPFLAGS@%$CPPFLAGS%g
3300s%@CXXFLAGS@%$CXXFLAGS%g
3301s%@DEFS@%$DEFS%g
3302s%@LDFLAGS@%$LDFLAGS%g
3303s%@LIBS@%$LIBS%g
3304s%@exec_prefix@%$exec_prefix%g
3305s%@prefix@%$prefix%g
3306s%@program_transform_name@%$program_transform_name%g
7c40dd08
DE
3307s%@bindir@%$bindir%g
3308s%@sbindir@%$sbindir%g
3309s%@libexecdir@%$libexecdir%g
3310s%@datadir@%$datadir%g
3311s%@sysconfdir@%$sysconfdir%g
3312s%@sharedstatedir@%$sharedstatedir%g
3313s%@localstatedir@%$localstatedir%g
3314s%@libdir@%$libdir%g
3315s%@includedir@%$includedir%g
3316s%@oldincludedir@%$oldincludedir%g
3317s%@infodir@%$infodir%g
3318s%@mandir@%$mandir%g
5436fc65
C
3319s%@CC@%$CC%g
3320s%@CPP@%$CPP%g
3321s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3322s%@INSTALL_DATA@%$INSTALL_DATA%g
3323s%@RANLIB@%$RANLIB%g
204c8825 3324s%@YACC@%$YACC%g
5436fc65
C
3325s%@host@%$host%g
3326s%@host_alias@%$host_alias%g
3327s%@host_cpu@%$host_cpu%g
3328s%@host_vendor@%$host_vendor%g
3329s%@host_os@%$host_os%g
3330s%@target@%$target%g
3331s%@target_alias@%$target_alias%g
3332s%@target_cpu@%$target_cpu%g
3333s%@target_vendor@%$target_vendor%g
3334s%@target_os@%$target_os%g
3335s%@build@%$build%g
3336s%@build_alias@%$build_alias%g
3337s%@build_cpu@%$build_cpu%g
3338s%@build_vendor@%$build_vendor%g
3339s%@build_os@%$build_os%g
3340s%@X_CFLAGS@%$X_CFLAGS%g
3341s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3342s%@X_LIBS@%$X_LIBS%g
3343s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5436fc65
C
3344s%@TCLHDIR@%$TCLHDIR%g
3345s%@TCLLIB@%$TCLLIB%g
4e327047
TT
3346s%@TKHDIR@%$TKHDIR%g
3347s%@TKLIB@%$TKLIB%g
5436fc65 3348s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd 3349s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
3350s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3351s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3352s%@ENABLE_OBS@%$ENABLE_OBS%g
7c40dd08 3353s%@target_subdir@%$target_subdir%g
5436fc65
C
3354/@host_makefile_frag@/r $host_makefile_frag
3355s%@host_makefile_frag@%%g
3356/@target_makefile_frag@/r $target_makefile_frag
3357s%@target_makefile_frag@%%g
5f107900 3358s%@frags@%$frags%g
5436fc65
C
3359s%@subdirs@%$subdirs%g
3360
3361CEOF
3362EOF
3363cat >> $CONFIG_STATUS <<EOF
3364
3365CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3366EOF
3367cat >> $CONFIG_STATUS <<\EOF
3368for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3369 # Support "outfile[:infile]", defaulting infile="outfile.in".
3370 case "$ac_file" in
3371 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3372 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3373 *) ac_file_in="${ac_file}.in" ;;
3374 esac
3375
3376 # Adjust relative srcdir, etc. for subdirectories.
3377
3378 # Remove last slash and all that follows it. Not all systems have dirname.
3379 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3380 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3381 # The file is in a subdirectory.
3382 test ! -d "$ac_dir" && mkdir "$ac_dir"
3383 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3384 # A "../" for each directory in $ac_dir_suffix.
3385 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3386 else
3387 ac_dir_suffix= ac_dots=
3388 fi
3389
3390 case "$ac_given_srcdir" in
3391 .) srcdir=.
3392 if test -z "$ac_dots"; then top_srcdir=.
3393 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3394 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3395 *) # Relative path.
3396 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3397 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3398 esac
3399
3400 case "$ac_given_INSTALL" in
3401 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3402 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3403 esac
3404 echo creating "$ac_file"
3405 rm -f "$ac_file"
3406 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3407 case "$ac_file" in
3408 *Makefile*) ac_comsub="1i\\
3409# $configure_input" ;;
3410 *) ac_comsub= ;;
3411 esac
3412 sed -e "$ac_comsub
3413s%@configure_input@%$configure_input%g
3414s%@srcdir@%$srcdir%g
3415s%@top_srcdir@%$top_srcdir%g
3416s%@INSTALL@%$INSTALL%g
3417" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3418fi; done
3419rm -f conftest.subs
3420
3421EOF
3422
3423cat >> $CONFIG_STATUS <<EOF
3424ac_sources="$files"
3425ac_dests="$links"
3426EOF
3427
3428cat >> $CONFIG_STATUS <<\EOF
3429srcdir=$ac_given_srcdir
3430while test -n "$ac_sources"; do
3431 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3432 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3433
3434 echo "linking $srcdir/$ac_source to $ac_dest"
3435
3436 if test ! -r $srcdir/$ac_source; then
3437 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3438 fi
3439 rm -f $ac_dest
3440
3441 # Make relative symlinks.
3442 # Remove last slash and all that follows it. Not all systems have dirname.
3443 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3444 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3445 # The dest file is in a subdirectory.
3446 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3447 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3448 # A "../" for each directory in $ac_dest_dir_suffix.
3449 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3450 else
3451 ac_dest_dir_suffix= ac_dots=
3452 fi
3453
3454 case "$srcdir" in
3455 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3456 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3457 esac
3458
3459 # Make a symlink if possible; otherwise try a hard link.
3460 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3461 ln $srcdir/$ac_source $ac_dest; then :
3462 else
3463 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3464 fi
3465done
0a5a1821
C
3466EOF
3467cat >> $CONFIG_STATUS <<EOF
5436fc65 3468
0a5a1821
C
3469gdb_host_cpu=$gdb_host_cpu
3470gdb_target_cpu=$gdb_target_cpu
3471nativefile=$nativefile
3472
3473EOF
3474cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
3475
3476if test "${nativefile}" = ""; then
3477sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
3478 < Makefile > Makefile.tem
3479mv -f Makefile.tem Makefile
3480fi
3481
3482sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3483/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3484/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3485mv -f Makefile.tmp Makefile
3486
3487case ${srcdir} in
3488.)
3489;;
3490*)
3491grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3492echo "source ${srcdir}/.gdbinit" >> .gdbinit
3493esac
3494
3495exit 0
3496EOF
3497chmod +x $CONFIG_STATUS
3498rm -fr confdefs* $ac_clean_files
3499test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3500
3501if test "$no_recursion" != yes; then
3502
3503 # Remove --cache-file and --srcdir arguments so they do not pile up.
3504 ac_sub_configure_args=
3505 ac_prev=
3506 for ac_arg in $ac_configure_args; do
3507 if test -n "$ac_prev"; then
3508 ac_prev=
3509 continue
3510 fi
3511 case "$ac_arg" in
3512 -cache-file | --cache-file | --cache-fil | --cache-fi \
3513 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3514 ac_prev=cache_file ;;
3515 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3516 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3517 ;;
3518 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3519 ac_prev=srcdir ;;
3520 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3521 ;;
3522 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3523 esac
3524 done
3525
3526 for ac_config_dir in $configdirs; do
3527
3528 # Do not complain, so a configure script can configure whichever
3529 # parts of a large source tree are present.
3530 if test ! -d $srcdir/$ac_config_dir; then
3531 continue
3532 fi
3533
3534 echo configuring in $ac_config_dir
3535
3536 case "$srcdir" in
3537 .) ;;
3538 *)
3539 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3540 else
3541 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3542 fi
3543 ;;
3544 esac
3545
3546 ac_popdir=`pwd`
3547 cd $ac_config_dir
3548
3549 case "$srcdir" in
3550 .) # No --srcdir option. We are building in place.
3551 ac_sub_srcdir=$srcdir ;;
3552 /*) # Absolute path.
3553 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3554 *) # Relative path.
3555 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3556 esac
3557
3558 # Check for guested configure; otherwise get Cygnus style configure.
3559 if test -f $ac_sub_srcdir/configure; then
3560 ac_sub_configure=$ac_sub_srcdir/configure
3561 elif test -f $ac_sub_srcdir/configure.in; then
3562 ac_sub_configure=$ac_configure
3563 else
3564 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3565 ac_sub_configure=
3566 fi
3567
3568 # The recursion is here.
3569 if test -n "$ac_sub_configure"; then
3570
3571 # Make the cache file name correct relative to the subdirectory.
3572 # A "../" for each directory in /$ac_config_dir.
3573 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3574 case "$cache_file" in
3575 /*) ac_sub_cache_file=$cache_file ;;
3576 *) # Relative path.
3577 ac_sub_cache_file="$ac_dots$cache_file" ;;
3578 esac
3579 case "$ac_given_INSTALL" in
3580 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3581 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3582 esac
3583
3584 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3585 # The eval makes quoting arguments work.
3586 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3587 then :
3588 else
3589 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3590 fi
3591 fi
3592
3593 cd $ac_popdir
3594 done
3595fi
3596
5e711e7f
PS
3597
3598exit 0
This page took 0.205374 seconds and 4 git commands to generate.