Renamed the VR4300 specific emulparams files to 8.3 unique names,
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
0694bce6 4# Generated automatically using autoconf version 2.4.2
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 "
16ac_help="$ac_help
17 --enable-gdbtk "
18ac_help="$ac_help
19 --with-x use the X Window System"
20
21# Initialize some variables set by options.
22# The variables have the same names as the options, with
23# dashes changed to underlines.
24build=NONE
25cache_file=./config.cache
26exec_prefix=NONE
27host=NONE
28no_create=
29nonopt=NONE
30no_recursion=
31prefix=NONE
32program_prefix=NONE
33program_suffix=NONE
34program_transform_name=s,x,x,
35silent=
36site=
37srcdir=
38target=NONE
39verbose=
40x_includes=NONE
41x_libraries=NONE
0694bce6
SC
42bindir='${exec_prefix}/bin'
43sbindir='${exec_prefix}/sbin'
44libexecdir='${exec_prefix}/libexec'
45datadir='${prefix}/share'
46sysconfdir='${prefix}/etc'
47sharedstatedir='${prefix}/com'
48localstatedir='${prefix}/var'
49libdir='${exec_prefix}/lib'
50includedir='${prefix}/include'
51oldincludedir='/usr/include'
52infodir='${prefix}/info'
53mandir='${prefix}/man'
5436fc65
C
54
55# Initialize some other variables.
56subdirs=
57
58ac_prev=
59for ac_option
60do
61
62 # If the previous option needs an argument, assign it.
63 if test -n "$ac_prev"; then
64 eval "$ac_prev=\$ac_option"
65 ac_prev=
66 continue
67 fi
68
69 case "$ac_option" in
70 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71 *) ac_optarg= ;;
72 esac
73
74 # Accept the important Cygnus configure options, so we can diagnose typos.
75
76 case "$ac_option" in
77
0694bce6
SC
78 -bindir | --bindir | --bindi | --bind | --bin | --bi)
79 ac_prev=bindir ;;
80 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
81 bindir="$ac_optarg" ;;
82
83 -build | --build | --buil | --bui | --bu)
5436fc65 84 ac_prev=build ;;
0694bce6 85 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
86 build="$ac_optarg" ;;
87
88 -cache-file | --cache-file | --cache-fil | --cache-fi \
89 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90 ac_prev=cache_file ;;
91 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
92 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
93 cache_file="$ac_optarg" ;;
94
0694bce6
SC
95 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96 ac_prev=datadir ;;
97 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98 | --da=*)
99 datadir="$ac_optarg" ;;
100
5436fc65
C
101 -disable-* | --disable-*)
102 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
103 # Reject names that are not valid shell variable names.
104 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
105 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
106 fi
107 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
108 eval "enable_${ac_feature}=no" ;;
109
110 -enable-* | --enable-*)
111 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
112 # Reject names that are not valid shell variable names.
113 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
114 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115 fi
116 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
117 case "$ac_option" in
118 *=*) ;;
119 *) ac_optarg=yes ;;
120 esac
121 eval "enable_${ac_feature}='$ac_optarg'" ;;
122
123 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
124 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
125 | --exec | --exe | --ex)
126 ac_prev=exec_prefix ;;
127 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
128 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
129 | --exec=* | --exe=* | --ex=*)
130 exec_prefix="$ac_optarg" ;;
131
132 -gas | --gas | --ga | --g)
133 # Obsolete; use --with-gas.
134 with_gas=yes ;;
135
136 -help | --help | --hel | --he)
137 # Omit some internal or obsolete options to make the list less imposing.
138 # This message is too long to be a string in the A/UX 3.1 sh.
139 cat << EOF
140Usage: configure [options] [host]
141Options: [defaults in brackets after descriptions]
142Configuration:
143 --cache-file=FILE cache test results in FILE
144 --help print this message
145 --no-create do not create output files
146 --quiet, --silent do not print \`checking...' messages
147 --version print the version of autoconf that created configure
148Directory and file names:
149 --prefix=PREFIX install architecture-independent files in PREFIX
150 [$ac_default_prefix]
0694bce6 151 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 152 [same as prefix]
0694bce6
SC
153 --bindir=DIR user executables in DIR [EPREFIX/bin]
154 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
155 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
156 --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
157 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
158 --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
0694bce6
SC
169EOF
170 cat << EOF
5436fc65
C
171Host type:
172 --build=BUILD configure for building on BUILD [BUILD=HOST]
173 --host=HOST configure for HOST [guessed]
174 --target=TARGET configure for TARGET [TARGET=HOST]
175Features and packages:
176 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
177 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
178 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
179 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
180 --x-includes=DIR X include files are in DIR
181 --x-libraries=DIR X library files are in DIR
182--enable and --with options recognized:$ac_help
183EOF
184 exit 0 ;;
185
186 -host | --host | --hos | --ho)
187 ac_prev=host ;;
188 -host=* | --host=* | --hos=* | --ho=*)
189 host="$ac_optarg" ;;
190
0694bce6
SC
191 -includedir | --includedir | --includedi | --included | --include \
192 | --includ | --inclu | --incl | --inc)
193 ac_prev=includedir ;;
194 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
195 | --includ=* | --inclu=* | --incl=* | --inc=*)
196 includedir="$ac_optarg" ;;
197
198 -infodir | --infodir | --infodi | --infod | --info | --inf)
199 ac_prev=infodir ;;
200 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
201 infodir="$ac_optarg" ;;
202
203 -libdir | --libdir | --libdi | --libd)
204 ac_prev=libdir ;;
205 -libdir=* | --libdir=* | --libdi=* | --libd=*)
206 libdir="$ac_optarg" ;;
207
208 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
209 | --libexe | --libex | --libe)
210 ac_prev=libexecdir ;;
211 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
212 | --libexe=* | --libex=* | --libe=*)
213 libexecdir="$ac_optarg" ;;
214
215 -localstatedir | --localstatedir | --localstatedi | --localstated \
216 | --localstate | --localstat | --localsta | --localst \
217 | --locals | --local | --loca | --loc | --lo)
218 ac_prev=localstatedir ;;
219 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
220 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
221 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
222 localstatedir="$ac_optarg" ;;
223
224 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
225 ac_prev=mandir ;;
226 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
227 mandir="$ac_optarg" ;;
228
5436fc65
C
229 -nfp | --nfp | --nf)
230 # Obsolete; use --without-fp.
231 with_fp=no ;;
232
233 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
234 | --no-cr | --no-c)
235 no_create=yes ;;
236
237 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
238 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
239 no_recursion=yes ;;
240
0694bce6
SC
241 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
242 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
243 | --oldin | --oldi | --old | --ol | --o)
244 ac_prev=oldincludedir ;;
245 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
246 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
247 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
248 oldincludedir="$ac_optarg" ;;
249
5436fc65
C
250 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
251 ac_prev=prefix ;;
252 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
253 prefix="$ac_optarg" ;;
254
255 -program-prefix | --program-prefix | --program-prefi | --program-pref \
256 | --program-pre | --program-pr | --program-p)
257 ac_prev=program_prefix ;;
258 -program-prefix=* | --program-prefix=* | --program-prefi=* \
259 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
260 program_prefix="$ac_optarg" ;;
261
262 -program-suffix | --program-suffix | --program-suffi | --program-suff \
263 | --program-suf | --program-su | --program-s)
264 ac_prev=program_suffix ;;
265 -program-suffix=* | --program-suffix=* | --program-suffi=* \
266 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
267 program_suffix="$ac_optarg" ;;
268
269 -program-transform-name | --program-transform-name \
270 | --program-transform-nam | --program-transform-na \
271 | --program-transform-n | --program-transform- \
272 | --program-transform | --program-transfor \
273 | --program-transfo | --program-transf \
274 | --program-trans | --program-tran \
275 | --progr-tra | --program-tr | --program-t)
276 ac_prev=program_transform_name ;;
277 -program-transform-name=* | --program-transform-name=* \
278 | --program-transform-nam=* | --program-transform-na=* \
279 | --program-transform-n=* | --program-transform-=* \
280 | --program-transform=* | --program-transfor=* \
281 | --program-transfo=* | --program-transf=* \
282 | --program-trans=* | --program-tran=* \
283 | --progr-tra=* | --program-tr=* | --program-t=*)
284 program_transform_name="$ac_optarg" ;;
285
286 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
287 | -silent | --silent | --silen | --sile | --sil)
288 silent=yes ;;
289
0694bce6
SC
290 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
291 ac_prev=sbindir ;;
292 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
293 | --sbi=* | --sb=*)
294 sbindir="$ac_optarg" ;;
295
296 -sharedstatedir | --sharedstatedir | --sharedstatedi \
297 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
298 | --sharedst | --shareds | --shared | --share | --shar \
299 | --sha | --sh)
300 ac_prev=sharedstatedir ;;
301 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
302 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
303 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
304 | --sha=* | --sh=*)
305 sharedstatedir="$ac_optarg" ;;
306
5436fc65
C
307 -site | --site | --sit)
308 ac_prev=site ;;
309 -site=* | --site=* | --sit=*)
310 site="$ac_optarg" ;;
311
312 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
313 ac_prev=srcdir ;;
314 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
315 srcdir="$ac_optarg" ;;
316
0694bce6
SC
317 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
318 | --syscon | --sysco | --sysc | --sys | --sy)
319 ac_prev=sysconfdir ;;
320 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
321 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
322 sysconfdir="$ac_optarg" ;;
323
5436fc65
C
324 -target | --target | --targe | --targ | --tar | --ta | --t)
325 ac_prev=target ;;
326 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
327 target="$ac_optarg" ;;
328
329 -v | -verbose | --verbose | --verbos | --verbo | --verb)
330 verbose=yes ;;
331
332 -version | --version | --versio | --versi | --vers)
0694bce6 333 echo "configure generated by autoconf version 2.4.2"
5436fc65
C
334 exit 0 ;;
335
336 -with-* | --with-*)
337 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
338 # Reject names that are not valid shell variable names.
339 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
340 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
341 fi
342 ac_package=`echo $ac_package| sed 's/-/_/g'`
343 case "$ac_option" in
344 *=*) ;;
345 *) ac_optarg=yes ;;
346 esac
347 eval "with_${ac_package}='$ac_optarg'" ;;
348
349 -without-* | --without-*)
350 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
351 # Reject names that are not valid shell variable names.
352 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354 fi
355 ac_package=`echo $ac_package| sed 's/-/_/g'`
356 eval "with_${ac_package}=no" ;;
357
358 --x)
359 # Obsolete; use --with-x.
360 with_x=yes ;;
361
362 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
363 | --x-incl | --x-inc | --x-in | --x-i)
364 ac_prev=x_includes ;;
365 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
366 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
367 x_includes="$ac_optarg" ;;
368
369 -x-libraries | --x-libraries | --x-librarie | --x-librari \
370 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
371 ac_prev=x_libraries ;;
372 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
373 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
374 x_libraries="$ac_optarg" ;;
375
376 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
377 ;;
378
379 *)
380 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
381 echo "configure: warning: $ac_option: invalid host type" 1>&2
382 fi
383 if test "x$nonopt" != xNONE; then
384 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
385 fi
386 nonopt="$ac_option"
387 ;;
388
389 esac
390done
391
392if test -n "$ac_prev"; then
393 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
394fi
395
396trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
397
398# File descriptor usage:
399# 0 standard input
400# 1 file creation
401# 2 errors and warnings
402# 3 some systems may open it to /dev/tty
403# 4 used on the Kubota Titan
404# 6 checking for... messages and results
405# 5 compiler messages saved in config.log
406if test "$silent" = yes; then
407 exec 6>/dev/null
408else
409 exec 6>&1
410fi
411exec 5>./config.log
412
413echo "\
414This file contains any messages produced by compilers while
415running configure, to aid debugging if configure makes a mistake.
416" 1>&5
417
418# Strip out --no-create and --no-recursion so they do not pile up.
419# Also quote any args containing shell metacharacters.
420ac_configure_args=
421for ac_arg
422do
423 case "$ac_arg" in
424 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
425 | --no-cr | --no-c) ;;
426 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
427 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
428 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
429 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
430 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
431 esac
432done
433
434# NLS nuisances.
435# Only set LANG and LC_ALL to C if already set.
436# These must not be set unconditionally because not all systems understand
437# e.g. LANG=C (notably SCO).
438if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
439if test "${LANG+set}" = set; then LANG=C; export LANG; fi
440
441# confdefs.h avoids OS command line length limits that DEFS can exceed.
442rm -rf conftest* confdefs.h
443# AIX cpp loses on an empty file, so make sure it contains at least a newline.
444echo > confdefs.h
445
446# A filename unique to this package, relative to the directory that
447# configure is in, which we can look for to find out if srcdir is correct.
448ac_unique_file=main.c
449
450# Find the source files, if location was not specified.
451if test -z "$srcdir"; then
452 ac_srcdir_defaulted=yes
453 # Try the directory containing this script, then its parent.
454 ac_prog=$0
455 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
456 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
457 srcdir=$ac_confdir
458 if test ! -r $srcdir/$ac_unique_file; then
459 srcdir=..
460 fi
461else
462 ac_srcdir_defaulted=no
463fi
464if test ! -r $srcdir/$ac_unique_file; then
465 if test "$ac_srcdir_defaulted" = yes; then
466 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
467 else
468 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
469 fi
470fi
471srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
472
473# Prefer explicitly selected file to automatically selected ones.
474if test -z "$CONFIG_SITE"; then
475 if test "x$prefix" != xNONE; then
476 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
477 else
478 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
479 fi
480fi
481for ac_site_file in $CONFIG_SITE; do
482 if test -r "$ac_site_file"; then
483 echo "loading site script $ac_site_file"
484 . "$ac_site_file"
485 fi
486done
487
488if test -r "$cache_file"; then
489 echo "loading cache $cache_file"
490 . $cache_file
491else
492 echo "creating cache $cache_file"
493 > $cache_file
494fi
495
496ac_ext=c
497# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
0694bce6
SC
498ac_cpp='echo $CPP $CPPFLAGS 1>&5;
499$CPP $CPPFLAGS'
500ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
501${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
502ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
503${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
5436fc65
C
504
505if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
506 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
507 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
508 ac_n= ac_c='
509' ac_t=' '
510 else
511 ac_n=-n ac_c= ac_t=
512 fi
513else
514 ac_n= ac_c='\c' ac_t=
515fi
516
517
518
519CC=${CC-cc}
520# Extract the first word of "gcc", so it can be a program name with args.
521set dummy gcc; ac_word=$2
522echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
523if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
524 echo $ac_n "(cached) $ac_c" 1>&6
525else
526 if test -n "$CC"; then
527 ac_cv_prog_CC="$CC" # Let the user override the test.
528else
529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
530 for ac_dir in $PATH; do
531 test -z "$ac_dir" && ac_dir=.
532 if test -f $ac_dir/$ac_word; then
533 ac_cv_prog_CC="gcc"
534 break
535 fi
536 done
537 IFS="$ac_save_ifs"
538 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
539fi
540fi
541CC="$ac_cv_prog_CC"
542if test -n "$CC"; then
543 echo "$ac_t""$CC" 1>&6
544else
545 echo "$ac_t""no" 1>&6
546fi
547
548
549echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
550if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
551 echo $ac_n "(cached) $ac_c" 1>&6
552else
553 cat > conftest.c <<EOF
554#ifdef __GNUC__
555 yes;
556#endif
557EOF
558if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
559 ac_cv_prog_gcc=yes
560else
561 ac_cv_prog_gcc=no
562fi
563fi
0694bce6 564
5436fc65
C
565echo "$ac_t""$ac_cv_prog_gcc" 1>&6
566if test $ac_cv_prog_gcc = yes; then
567 GCC=yes
568 if test "${CFLAGS+set}" != set; then
569 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
570if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
571 echo $ac_n "(cached) $ac_c" 1>&6
572else
573 echo 'void f(){}' > conftest.c
574if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
575 ac_cv_prog_gcc_g=yes
576else
577 ac_cv_prog_gcc_g=no
578fi
579rm -f conftest*
580
581fi
0694bce6
SC
582
583echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
584 if test $ac_cv_prog_gcc_g = yes; then
585 CFLAGS="-g -O"
586 else
587 CFLAGS="-O"
588 fi
589 fi
590else
591 GCC=
592 test "${CFLAGS+set}" = set || CFLAGS="-g"
593fi
594
595echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
596# On Suns, sometimes $CPP names a directory.
597if test -n "$CPP" && test -d "$CPP"; then
598 CPP=
599fi
600if test -z "$CPP"; then
601if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
602 echo $ac_n "(cached) $ac_c" 1>&6
603else
604 # This must be in double quotes, not single quotes, because CPP may get
605 # substituted into the Makefile and "${CC-cc}" will confuse make.
606 CPP="${CC-cc} -E"
607 # On the NeXT, cc -E runs the code through the compiler's parser,
608 # not just through cpp.
609 cat > conftest.$ac_ext <<EOF
0694bce6 610#line 611 "configure"
5436fc65
C
611#include "confdefs.h"
612#include <assert.h>
613Syntax Error
614EOF
615eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
616ac_err=`grep -v '^ *+' conftest.out`
617if test -z "$ac_err"; then
618 :
619else
620 echo "$ac_err" >&5
621 rm -rf conftest*
622 CPP="${CC-cc} -E -traditional-cpp"
623 cat > conftest.$ac_ext <<EOF
0694bce6 624#line 625 "configure"
5436fc65
C
625#include "confdefs.h"
626#include <assert.h>
627Syntax Error
628EOF
629eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
630ac_err=`grep -v '^ *+' conftest.out`
631if test -z "$ac_err"; then
632 :
633else
634 echo "$ac_err" >&5
635 rm -rf conftest*
636 CPP=/lib/cpp
637fi
638rm -f conftest*
639fi
640rm -f conftest*
641 ac_cv_prog_CPP="$CPP"
642fi
dedcc91d
SC
643 CPP="$ac_cv_prog_CPP"
644else
645 ac_cv_prog_CPP="$CPP"
5436fc65 646fi
5436fc65
C
647echo "$ac_t""$CPP" 1>&6
648
649echo $ac_n "checking for AIX""... $ac_c" 1>&6
650cat > conftest.$ac_ext <<EOF
0694bce6 651#line 652 "configure"
5436fc65
C
652#include "confdefs.h"
653#ifdef _AIX
654 yes
655#endif
656
657EOF
658if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
659 egrep "yes" >/dev/null 2>&1; then
660 rm -rf conftest*
661 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
662#define _ALL_SOURCE 1
663EOF
664
665else
666 rm -rf conftest*
667 echo "$ac_t""no" 1>&6
668fi
669rm -f conftest*
670
671
672ac_safe=`echo "minix/config.h" | tr './\055' '___'`
673echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
674if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
676else
677 cat > conftest.$ac_ext <<EOF
0694bce6 678#line 679 "configure"
5436fc65
C
679#include "confdefs.h"
680#include <minix/config.h>
681EOF
682eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
683ac_err=`grep -v '^ *+' conftest.out`
684if test -z "$ac_err"; then
685 rm -rf conftest*
686 eval "ac_cv_header_$ac_safe=yes"
687else
688 echo "$ac_err" >&5
689 rm -rf conftest*
690 eval "ac_cv_header_$ac_safe=no"
691fi
692rm -f conftest*
693fi
694if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
695 echo "$ac_t""yes" 1>&6
696 MINIX=yes
697else
698 echo "$ac_t""no" 1>&6
699MINIX=
700fi
701
702if test "$MINIX" = yes; then
703 cat >> confdefs.h <<\EOF
704#define _POSIX_SOURCE 1
705EOF
706
707 cat >> confdefs.h <<\EOF
708#define _POSIX_1_SOURCE 2
709EOF
710
711 cat >> confdefs.h <<\EOF
712#define _MINIX 1
713EOF
714
715fi
716
717echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
718if test -d /etc/conf/kconfig.d &&
719 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
720then
721 echo "$ac_t""yes" 1>&6
722 ISC=yes # If later tests want to check for ISC.
723 cat >> confdefs.h <<\EOF
724#define _POSIX_SOURCE 1
725EOF
726
727 if test "$GCC" = yes; then
728 CC="$CC -posix"
729 else
730 CC="$CC -Xp"
731 fi
732else
733 echo "$ac_t""no" 1>&6
734 ISC=
735fi
736
737
738ac_aux_dir=
739for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
740 if test -f $ac_dir/install-sh; then
741 ac_aux_dir=$ac_dir
742 ac_install_sh="$ac_aux_dir/install-sh -c"
743 break
744 elif test -f $ac_dir/install.sh; then
745 ac_aux_dir=$ac_dir
746 ac_install_sh="$ac_aux_dir/install.sh -c"
747 break
748 fi
749done
750if test -z "$ac_aux_dir"; then
751 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
752fi
753ac_config_guess=$ac_aux_dir/config.guess
754ac_config_sub=$ac_aux_dir/config.sub
755ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
756
757# Find a good install program. We prefer a C program (faster),
758# so one script is as good as another. But avoid the broken or
759# incompatible versions:
760# SysV /etc/install, /usr/sbin/install
761# SunOS /usr/etc/install
762# IRIX /sbin/install
763# AIX /bin/install
764# AFS /usr/afsws/bin/install, which mishandles nonexistent args
765# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
766# ./install, which can be erroneously created by make from ./install.sh.
767echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
768if test -z "$INSTALL"; then
769if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
770 echo $ac_n "(cached) $ac_c" 1>&6
771else
772 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
773 for ac_dir in $PATH; do
774 # Account for people who put trailing slashes in PATH elements.
775 case "$ac_dir/" in
776 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
777 *)
778 # OSF1 and SCO ODT 3.0 have their own names for install.
779 for ac_prog in ginstall installbsd scoinst install; do
780 if test -f $ac_dir/$ac_prog; then
781 if test $ac_prog = install &&
782 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
783 # AIX install. It has an incompatible calling convention.
784 # OSF/1 installbsd also uses dspmsg, but is usable.
785 :
786 else
787 ac_cv_path_install="$ac_dir/$ac_prog -c"
788 break 2
789 fi
790 fi
791 done
792 ;;
793 esac
794 done
795 IFS="$ac_save_ifs"
0694bce6 796
5436fc65 797fi
0694bce6
SC
798 if test "${ac_cv_path_install+set}" = set; then
799 INSTALL="$ac_cv_path_install"
800 else
801 # As a last resort, use the slow shell script. We don't cache a
802 # path for INSTALL within a source directory, because that will
803 # break other packages using the cache if that directory is
804 # removed, or if the path is relative.
805 INSTALL="$ac_install_sh"
806 fi
5436fc65
C
807fi
808echo "$ac_t""$INSTALL" 1>&6
809
810# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
811# It thinks the first close brace ends the variable substitution.
812test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
813
814test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
815
816# Extract the first word of "ranlib", so it can be a program name with args.
817set dummy ranlib; ac_word=$2
818echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
819if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
820 echo $ac_n "(cached) $ac_c" 1>&6
821else
822 if test -n "$RANLIB"; then
823 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
824else
825 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
826 for ac_dir in $PATH; do
827 test -z "$ac_dir" && ac_dir=.
828 if test -f $ac_dir/$ac_word; then
829 ac_cv_prog_RANLIB="ranlib"
830 break
831 fi
832 done
833 IFS="$ac_save_ifs"
834 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
835fi
836fi
837RANLIB="$ac_cv_prog_RANLIB"
838if test -n "$RANLIB"; then
839 echo "$ac_t""$RANLIB" 1>&6
840else
841 echo "$ac_t""no" 1>&6
842fi
843
204c8825
FF
844for ac_prog in 'bison -y' byacc
845do
846# Extract the first word of "$ac_prog", so it can be a program name with args.
847set dummy $ac_prog; ac_word=$2
848echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
849if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
850 echo $ac_n "(cached) $ac_c" 1>&6
851else
852 if test -n "$YACC"; then
853 ac_cv_prog_YACC="$YACC" # Let the user override the test.
854else
855 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
856 for ac_dir in $PATH; do
857 test -z "$ac_dir" && ac_dir=.
858 if test -f $ac_dir/$ac_word; then
859 ac_cv_prog_YACC="$ac_prog"
860 break
861 fi
862 done
863 IFS="$ac_save_ifs"
864fi
865fi
866YACC="$ac_cv_prog_YACC"
867if test -n "$YACC"; then
868 echo "$ac_t""$YACC" 1>&6
869else
870 echo "$ac_t""no" 1>&6
871fi
872
873test -n "$YACC" && break
874done
875test -n "$YACC" || YACC="yacc"
876
5436fc65
C
877
878ac_aux_dir=
879for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
880 if test -f $ac_dir/install-sh; then
881 ac_aux_dir=$ac_dir
882 ac_install_sh="$ac_aux_dir/install-sh -c"
883 break
884 elif test -f $ac_dir/install.sh; then
885 ac_aux_dir=$ac_dir
886 ac_install_sh="$ac_aux_dir/install.sh -c"
887 break
888 fi
889done
890if test -z "$ac_aux_dir"; then
891 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
892fi
893ac_config_guess=$ac_aux_dir/config.guess
894ac_config_sub=$ac_aux_dir/config.sub
895ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
896
897
898# Do some error checking and defaulting for the host and target type.
899# The inputs are:
900# configure --host=HOST --target=TARGET --build=BUILD NONOPT
901#
902# The rules are:
903# 1. You are not allowed to specify --host, --target, and nonopt at the
904# same time.
905# 2. Host defaults to nonopt.
906# 3. If nonopt is not specified, then host defaults to the current host,
907# as determined by config.guess.
908# 4. Target and build default to nonopt.
909# 5. If nonopt is not specified, then target and build default to host.
910
911# The aliases save the names the user supplied, while $host etc.
912# will get canonicalized.
913case $host---$target---$nonopt in
914NONE---*---* | *---NONE---* | *---*---NONE) ;;
915*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
916esac
917
918
919# Make sure we can run config.sub.
920if $ac_config_sub sun4 >/dev/null 2>&1; then :
921else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
922fi
923
924echo $ac_n "checking host system type""... $ac_c" 1>&6
925
926host_alias=$host
927case "$host_alias" in
928NONE)
929 case $nonopt in
930 NONE)
931 if host_alias=`$ac_config_guess`; then :
932 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
933 fi ;;
934 *) host_alias=$nonopt ;;
935 esac ;;
936esac
937
938host=`$ac_config_sub $host_alias`
939host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
940host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
941host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
942echo "$ac_t""$host" 1>&6
943
944echo $ac_n "checking target system type""... $ac_c" 1>&6
945
946target_alias=$target
947case "$target_alias" in
948NONE)
949 case $nonopt in
950 NONE) target_alias=$host_alias ;;
951 *) target_alias=$nonopt ;;
952 esac ;;
953esac
954
955target=`$ac_config_sub $target_alias`
956target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
957target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
958target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
959echo "$ac_t""$target" 1>&6
960
961echo $ac_n "checking build system type""... $ac_c" 1>&6
962
963build_alias=$build
964case "$build_alias" in
965NONE)
966 case $nonopt in
967 NONE) build_alias=$host_alias ;;
968 *) build_alias=$nonopt ;;
969 esac ;;
970esac
971
972build=`$ac_config_sub $build_alias`
973build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
974build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
975build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
976echo "$ac_t""$build" 1>&6
977
978test "$host_alias" != "$target_alias" &&
979 test "$program_prefix$program_suffix$program_transform_name" = \
980 NONENONEs,x,x, &&
981 program_prefix=${target_alias}-
982
983if test "$program_transform_name" = s,x,x,; then
984 program_transform_name=
985else
986 # Double any \ or $.
987 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
988 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
989 rm -f conftestsed
990fi
991test "$program_prefix" != NONE &&
992 program_transform_name="s,^,${program_prefix},; $program_transform_name"
993# Use a double $ so make ignores it.
994test "$program_suffix" != NONE &&
995 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
996
997# sed with no file args requires a program.
998test "$program_transform_name" = "" && program_transform_name="s,x,x,"
999
1000
2b576293
C
1001# If we cannot run a trivial program, we must be cross compiling.
1002echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1003if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1005else
1006 if test "$cross_compiling" = yes; then
1007 ac_cv_c_cross=yes
1008else
1009cat > conftest.$ac_ext <<EOF
204c8825 1010#line 1011 "configure"
2b576293
C
1011#include "confdefs.h"
1012main(){return(0);}
1013EOF
1014eval $ac_link
1015if test -s conftest && (./conftest; exit) 2>/dev/null; then
1016 ac_cv_c_cross=no
1017else
1018 ac_cv_c_cross=yes
1019fi
1020fi
1021rm -fr conftest*
1022fi
0694bce6 1023
66efdff9 1024echo "$ac_t""$ac_cv_c_cross" 1>&6
0694bce6 1025cross_compiling=$ac_cv_c_cross
2b576293
C
1026
1027echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1028if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1029 echo $ac_n "(cached) $ac_c" 1>&6
1030else
1031 cat > conftest.$ac_ext <<EOF
204c8825 1032#line 1033 "configure"
2b576293
C
1033#include "confdefs.h"
1034#include <stdlib.h>
1035#include <stdarg.h>
1036#include <string.h>
1037#include <float.h>
1038EOF
1039eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1040ac_err=`grep -v '^ *+' conftest.out`
1041if test -z "$ac_err"; then
1042 rm -rf conftest*
1043 ac_cv_header_stdc=yes
1044else
1045 echo "$ac_err" >&5
1046 rm -rf conftest*
1047 ac_cv_header_stdc=no
1048fi
1049rm -f conftest*
1050
1051if test $ac_cv_header_stdc = yes; then
1052 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1053cat > conftest.$ac_ext <<EOF
204c8825 1054#line 1055 "configure"
2b576293
C
1055#include "confdefs.h"
1056#include <string.h>
1057EOF
1058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1059 egrep "memchr" >/dev/null 2>&1; then
1060 :
1061else
1062 rm -rf conftest*
1063 ac_cv_header_stdc=no
1064fi
1065rm -f conftest*
1066
1067fi
1068
1069if test $ac_cv_header_stdc = yes; then
1070 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1071cat > conftest.$ac_ext <<EOF
204c8825 1072#line 1073 "configure"
2b576293
C
1073#include "confdefs.h"
1074#include <stdlib.h>
1075EOF
1076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1077 egrep "free" >/dev/null 2>&1; then
1078 :
1079else
1080 rm -rf conftest*
1081 ac_cv_header_stdc=no
1082fi
1083rm -f conftest*
1084
1085fi
1086
1087if test $ac_cv_header_stdc = yes; then
1088 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1089if test "$cross_compiling" = yes; then
1090 ac_cv_header_stdc=no
1091else
1092cat > conftest.$ac_ext <<EOF
204c8825 1093#line 1094 "configure"
2b576293
C
1094#include "confdefs.h"
1095#include <ctype.h>
1096#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1097#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1098#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1099int main () { int i; for (i = 0; i < 256; i++)
1100if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1101exit (0); }
1102
1103EOF
1104eval $ac_link
1105if test -s conftest && (./conftest; exit) 2>/dev/null; then
1106 :
1107else
1108 ac_cv_header_stdc=no
1109fi
1110fi
1111rm -fr conftest*
1112fi
1113fi
0694bce6 1114
2b576293
C
1115echo "$ac_t""$ac_cv_header_stdc" 1>&6
1116if test $ac_cv_header_stdc = yes; then
1117 cat >> confdefs.h <<\EOF
1118#define STDC_HEADERS 1
1119EOF
1120
1121fi
1122
dedcc91d 1123for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h
1a494973
C
1124do
1125ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1126echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1127if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1128 echo $ac_n "(cached) $ac_c" 1>&6
1129else
1130 cat > conftest.$ac_ext <<EOF
204c8825 1131#line 1132 "configure"
1a494973
C
1132#include "confdefs.h"
1133#include <$ac_hdr>
1134EOF
1135eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1136ac_err=`grep -v '^ *+' conftest.out`
1137if test -z "$ac_err"; then
1138 rm -rf conftest*
1139 eval "ac_cv_header_$ac_safe=yes"
1140else
1141 echo "$ac_err" >&5
1142 rm -rf conftest*
1143 eval "ac_cv_header_$ac_safe=no"
1144fi
1145rm -f conftest*
1146fi
1147if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1148 echo "$ac_t""yes" 1>&6
0694bce6 1149 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1a494973
C
1150 cat >> confdefs.h <<EOF
1151#define $ac_tr_hdr 1
1152EOF
1153
1154else
1155 echo "$ac_t""no" 1>&6
1156fi
1157done
1158
2b576293
C
1159echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1160if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1161 echo $ac_n "(cached) $ac_c" 1>&6
1162else
1163 cat > conftest.$ac_ext <<EOF
204c8825 1164#line 1165 "configure"
2b576293
C
1165#include "confdefs.h"
1166#include <sys/types.h>
1167#include <sys/stat.h>
1168
1169#if defined(S_ISBLK) && defined(S_IFDIR)
1170# if S_ISBLK (S_IFDIR)
1171You lose.
1172# endif
1173#endif
1174
1175#if defined(S_ISBLK) && defined(S_IFCHR)
1176# if S_ISBLK (S_IFCHR)
1177You lose.
1178# endif
1179#endif
1180
1181#if defined(S_ISLNK) && defined(S_IFREG)
1182# if S_ISLNK (S_IFREG)
1183You lose.
1184# endif
1185#endif
1186
1187#if defined(S_ISSOCK) && defined(S_IFREG)
1188# if S_ISSOCK (S_IFREG)
1189You lose.
1190# endif
1191#endif
1192
1193EOF
1194if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1195 egrep "You lose" >/dev/null 2>&1; then
1196 rm -rf conftest*
1197 ac_cv_header_stat_broken=yes
1198else
1199 rm -rf conftest*
1200 ac_cv_header_stat_broken=no
1201fi
1202rm -f conftest*
1203
1204fi
0694bce6 1205
2b576293
C
1206echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1207if test $ac_cv_header_stat_broken = yes; then
1208 cat >> confdefs.h <<\EOF
1209#define STAT_MACROS_BROKEN 1
1210EOF
1211
1212fi
1213
1214
1215echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1216if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1217 echo $ac_n "(cached) $ac_c" 1>&6
1218else
1219 if test "$cross_compiling" = yes; then
1220 ac_cv_func_mmap=no
1221else
1222cat > conftest.$ac_ext <<EOF
204c8825 1223#line 1224 "configure"
2b576293
C
1224#include "confdefs.h"
1225
1226/* Thanks to Mike Haertel and Jim Avera for this test. */
1227#include <sys/types.h>
1228#include <fcntl.h>
1229#include <sys/mman.h>
1230
1231#ifdef BSD
1232# ifndef BSD4_1
1233# define HAVE_GETPAGESIZE
1234# endif
1235#endif
1236
1237#ifndef HAVE_GETPAGESIZE
1238# include <sys/param.h>
1239# ifdef EXEC_PAGESIZE
1240# define getpagesize() EXEC_PAGESIZE
1241# else
1242# ifdef NBPG
1243# define getpagesize() NBPG * CLSIZE
1244# ifndef CLSIZE
1245# define CLSIZE 1
1246# endif
1247# else
1248# ifdef NBPC
1249# define getpagesize() NBPC
1250# else
1251# define getpagesize() PAGESIZE /* SVR4 */
1252# endif
1253# endif
1254# endif
1255#endif
1256
1257#ifdef __osf__
1258# define valloc malloc
1259#endif
1260
1261#ifdef __cplusplus
1262extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1263#else
1264char *valloc(), *malloc();
1265#endif
1266
1267int
1268main()
1269{
1270 char *buf1, *buf2, *buf3;
1271 int i = getpagesize(), j;
1272 int i2 = getpagesize()*2;
1273 int fd;
1274
1275 buf1 = (char *)valloc(i2);
1276 buf2 = (char *)valloc(i);
1277 buf3 = (char *)malloc(i2);
1278 for (j = 0; j < i2; ++j)
1279 *(buf1 + j) = rand();
1280 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1281 write(fd, buf1, i2);
1282 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1283 for (j = 0; j < i; ++j)
1284 if (*(buf1 + j) != *(buf2 + j))
1285 exit(1);
1286 lseek(fd, (long)i, 0);
1287 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1288 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1289 lseek(fd, (long)0, 0);
1290 read(fd, buf3, i2);
1291 for (j = 0; j < i2; ++j)
1292 if (*(buf1 + j) != *(buf3 + j))
1293 exit(1);
1294 exit(0);
1295}
1296
1297EOF
1298eval $ac_link
1299if test -s conftest && (./conftest; exit) 2>/dev/null; then
1300 ac_cv_func_mmap=yes
1301else
1302 ac_cv_func_mmap=no
1303fi
1304fi
1305rm -fr conftest*
1306fi
0694bce6 1307
2b576293
C
1308echo "$ac_t""$ac_cv_func_mmap" 1>&6
1309if test $ac_cv_func_mmap = yes; then
1310 cat >> confdefs.h <<\EOF
1311#define HAVE_MMAP 1
1312EOF
1313
1314fi
1315
5436fc65
C
1316
1317ENABLE_CFLAGS=
1318ENABLE_CLIBS=
1319ENABLE_OBS=
1320
1321# Check whether --enable-netrom or --disable-netrom was given.
0694bce6
SC
1322if test "${enable_netrom+set}" = set; then
1323 enableval="$enable_netrom"
5436fc65
C
1324 case "${enableval}" in
1325yes) enable_netrom=yes ;;
1326no) enable_netrom=no ;;
1327*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1328esac
1329fi
1330
1331
1332if test "${enable_netrom}" = "yes"; then
1333 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1334fi
1335
1336# start-sanitize-gdbtk
1337ENABLE_GDBTK=
1338
1339# Check whether --enable-gdbtk or --disable-gdbtk was given.
0694bce6
SC
1340if test "${enable_gdbtk+set}" = set; then
1341 enableval="$enable_gdbtk"
5436fc65
C
1342 case "${enableval}" in
1343yes) enable_gdbtk=yes ;;
1344no) enable_gdbtk=no ;;
1345*) { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
1346esac
1347fi
1348
1349
1350if test "${enable_gdbtk}" = "yes"; then
1351 # If we find X, set shell vars x_includes and x_libraries to the
1352# paths, otherwise set no_x=yes.
1353# Uses ac_ vars as temps to allow command line to override cache and checks.
1354# --without-x overrides everything else, but does not touch the cache.
1355echo $ac_n "checking for X""... $ac_c" 1>&6
1356
1357# Check whether --with-x or --without-x was given.
0694bce6
SC
1358if test "${with_x+set}" = set; then
1359 withval="$with_x"
5436fc65
C
1360 :
1361fi
1362
1363if test "x$with_x" = xno; then
1364 no_x=yes
1365else
1366 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1367 no_x=
1368 else
1369if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1371else
1372 # One or both of the vars are not set, and there is no cached value.
1373no_x=yes
1374rm -fr conftestdir
1375if mkdir conftestdir; then
1376 cd conftestdir
1377 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1378 cat > Imakefile <<'EOF'
1379acfindx:
1380 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1381EOF
1382 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1383 no_x=
1384 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1385 eval `make acfindx 2>/dev/null | grep -v make`
1386 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1387 for ac_extension in a so sl; do
1388 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1389 test -f $ac_im_libdir/libX11.$ac_extension; then
1390 ac_im_usrlibdir=$ac_im_libdir; break
1391 fi
1392 done
5436fc65
C
1393 # Screen out bogus values from the imake configuration.
1394 case "$ac_im_incroot" in
1395 /usr/include) ;;
1396 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1397 esac
1398 case "$ac_im_usrlibdir" in
1399 /usr/lib | /lib) ;;
1400 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1401 esac
1402 fi
1403 cd ..
1404 rm -fr conftestdir
1405fi
1406
1407if test "$no_x" = yes; then
1408test -z "$x_direct_test_library" && x_direct_test_library=Xt
1409test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1410test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1411cat > conftest.$ac_ext <<EOF
204c8825 1412#line 1413 "configure"
5436fc65
C
1413#include "confdefs.h"
1414#include <$x_direct_test_include>
1415EOF
1416eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1417ac_err=`grep -v '^ *+' conftest.out`
1418if test -z "$ac_err"; then
1419 rm -rf conftest*
1420 no_x= ac_x_includes=
1421else
1422 echo "$ac_err" >&5
1423 rm -rf conftest*
1424 for ac_dir in \
1425 /usr/X11R6/include \
1426 /usr/X11R5/include \
1427 /usr/X11R4/include \
1428 \
1429 /usr/include/X11R6 \
1430 /usr/include/X11R5 \
1431 /usr/include/X11R4 \
1432 \
1433 /usr/local/X11R6/include \
1434 /usr/local/X11R5/include \
1435 /usr/local/X11R4/include \
1436 \
1437 /usr/local/include/X11R6 \
1438 /usr/local/include/X11R5 \
1439 /usr/local/include/X11R4 \
1440 \
1441 /usr/X11/include \
1442 /usr/include/X11 \
1443 /usr/local/X11/include \
1444 /usr/local/include/X11 \
1445 \
1446 /usr/X386/include \
1447 /usr/x386/include \
1448 /usr/XFree86/include/X11 \
1449 \
1450 /usr/include \
1451 /usr/local/include \
1452 /usr/unsupported/include \
1453 /usr/athena/include \
1454 /usr/local/x11r5/include \
1455 /usr/lpp/Xamples/include \
1456 \
1457 /usr/openwin/include \
1458 /usr/openwin/share/include \
1459 ; \
1460 do
1461 if test -r "$ac_dir/$x_direct_test_include"; then
1462 no_x= ac_x_includes=$ac_dir
1463 break
1464 fi
1465 done
1466fi
1467rm -f conftest*
1468
1469# Check for the libraries.
1470# See if we find them without any special options.
1471# Don't add to $LIBS permanently.
1472ac_save_LIBS="$LIBS"
1473LIBS="-l$x_direct_test_library $LIBS"
1474cat > conftest.$ac_ext <<EOF
204c8825 1475#line 1476 "configure"
5436fc65
C
1476#include "confdefs.h"
1477
1478int main() { return 0; }
1479int t() {
1480${x_direct_test_function}()
1481; return 0; }
1482EOF
1483if eval $ac_link; then
1484 rm -rf conftest*
1485 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1486else
1487 rm -rf conftest*
1488 LIBS="$ac_save_LIBS"
1489# First see if replacing the include by lib works.
1490for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1491 /usr/X11R6/lib \
1492 /usr/X11R5/lib \
1493 /usr/X11R4/lib \
1494 \
1495 /usr/lib/X11R6 \
1496 /usr/lib/X11R5 \
1497 /usr/lib/X11R4 \
1498 \
1499 /usr/local/X11R6/lib \
1500 /usr/local/X11R5/lib \
1501 /usr/local/X11R4/lib \
1502 \
1503 /usr/local/lib/X11R6 \
1504 /usr/local/lib/X11R5 \
1505 /usr/local/lib/X11R4 \
1506 \
1507 /usr/X11/lib \
1508 /usr/lib/X11 \
1509 /usr/local/X11/lib \
1510 /usr/local/lib/X11 \
1511 \
1512 /usr/X386/lib \
1513 /usr/x386/lib \
1514 /usr/XFree86/lib/X11 \
1515 \
1516 /usr/lib \
1517 /usr/local/lib \
1518 /usr/unsupported/lib \
1519 /usr/athena/lib \
1520 /usr/local/x11r5/lib \
1521 /usr/lpp/Xamples/lib \
1522 \
1523 /usr/openwin/lib \
1524 /usr/openwin/share/lib \
1525 ; \
1526do
1527 for ac_extension in a so sl; do
1528 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1529 no_x= ac_x_libraries=$ac_dir
1530 break 2
1531 fi
1532 done
1533done
1534fi
1535rm -f conftest*
1536
1537fi
1538if test "$no_x" = yes; then
1539 ac_cv_path_x="no_x=yes"
1540else
1541 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1542fi
1543fi
1544 fi
1545 eval "$ac_cv_path_x"
1546fi # $with_x != no
1547
1548if test "$no_x" = yes; then
1549 echo "$ac_t""no" 1>&6
1550else
1551 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1552 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1553 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1554 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1555fi
1556
1557 if test "$no_x" = yes; then
1558 # Not all programs may use this symbol, but it does not hurt to define it.
1559 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1560else
1561 if test -n "$x_includes"; then
1562 X_CFLAGS="$X_CFLAGS -I$x_includes"
1563 fi
1564
1565 # It would be nice to have a more robust check for the -R ld option than
1566 # just checking for Solaris.
1567 # It would also be nice to do this for all -L options, not just this one.
1568 if test -n "$x_libraries"; then
1569 X_LIBS="$X_LIBS -L$x_libraries"
1570 if test "`(uname) 2>/dev/null`" = SunOS &&
1571 uname -r | grep '^5' >/dev/null; then
1572 X_LIBS="$X_LIBS -R$x_libraries"
1573 fi
1574 fi
1575
1576 # Check for libraries that X11R6 Xt/Xaw programs need.
1577
1578 ac_save_LDFLAGS="$LDFLAGS"
1579 LDFLAGS="$LDFLAGS -L$x_libraries"
1580 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1581 # check for ICE first), but we must link in the order -lSM -lICE or
1582 # we get undefined symbols. So assume we have SM if we have ICE.
1583 # These have to be linked with before -lX11, unlike the other
1584 # libraries we check for below, so use a different variable.
1585 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1586 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
0694bce6
SC
1587ac_lib_var=`echo ICE | tr './+' '__p'`
1588if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1589 echo $ac_n "(cached) $ac_c" 1>&6
1590else
1591 ac_save_LIBS="$LIBS"
1592LIBS="-lICE $LIBS"
1593cat > conftest.$ac_ext <<EOF
204c8825 1594#line 1595 "configure"
5436fc65
C
1595#include "confdefs.h"
1596
1597int main() { return 0; }
1598int t() {
1599IceConnectionNumber()
1600; return 0; }
1601EOF
1602if eval $ac_link; then
1603 rm -rf conftest*
0694bce6 1604 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1605else
1606 rm -rf conftest*
0694bce6 1607 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1608fi
1609rm -f conftest*
1610LIBS="$ac_save_LIBS"
1611
1612fi
0694bce6 1613if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1614 echo "$ac_t""yes" 1>&6
1615 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1616else
1617 echo "$ac_t""no" 1>&6
1618fi
1619
1620 LDFLAGS="$ac_save_LDFLAGS"
1621
1622 # Check for system-dependent libraries X programs must link with.
1623
1624 if test "$ISC" = yes; then
1625 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1626 else
1627 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1628 # libraries were built with DECnet support. And karl@cs.umb.edu says
1629 # the Alpha needs dnet_stub (dnet does not exist).
1630 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
0694bce6
SC
1631ac_lib_var=`echo dnet | tr './+' '__p'`
1632if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634else
1635 ac_save_LIBS="$LIBS"
1636LIBS="-ldnet $LIBS"
1637cat > conftest.$ac_ext <<EOF
204c8825 1638#line 1639 "configure"
5436fc65
C
1639#include "confdefs.h"
1640
1641int main() { return 0; }
1642int t() {
1643dnet_ntoa()
1644; return 0; }
1645EOF
1646if eval $ac_link; then
1647 rm -rf conftest*
0694bce6 1648 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1649else
1650 rm -rf conftest*
0694bce6 1651 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1652fi
1653rm -f conftest*
1654LIBS="$ac_save_LIBS"
1655
1656fi
0694bce6 1657if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1658 echo "$ac_t""yes" 1>&6
1659 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1660else
1661 echo "$ac_t""no" 1>&6
1662fi
1663
1664 if test $ac_cv_lib_dnet = no; then
1665 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
0694bce6
SC
1666ac_lib_var=`echo dnet_stub | tr './+' '__p'`
1667if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1668 echo $ac_n "(cached) $ac_c" 1>&6
1669else
1670 ac_save_LIBS="$LIBS"
1671LIBS="-ldnet_stub $LIBS"
1672cat > conftest.$ac_ext <<EOF
204c8825 1673#line 1674 "configure"
5436fc65
C
1674#include "confdefs.h"
1675
1676int main() { return 0; }
1677int t() {
1678dnet_ntoa()
1679; return 0; }
1680EOF
1681if eval $ac_link; then
1682 rm -rf conftest*
0694bce6 1683 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1684else
1685 rm -rf conftest*
0694bce6 1686 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1687fi
1688rm -f conftest*
1689LIBS="$ac_save_LIBS"
1690
1691fi
0694bce6 1692if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1693 echo "$ac_t""yes" 1>&6
1694 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1695else
1696 echo "$ac_t""no" 1>&6
1697fi
1698
1699 fi
1700
1701 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1702 # to get the SysV transport functions.
1703 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1704 # check for it.
1705 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
0694bce6
SC
1706ac_lib_var=`echo nsl | tr './+' '__p'`
1707if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1708 echo $ac_n "(cached) $ac_c" 1>&6
1709else
1710 ac_save_LIBS="$LIBS"
1711LIBS="-lnsl $LIBS"
1712cat > conftest.$ac_ext <<EOF
204c8825 1713#line 1714 "configure"
5436fc65
C
1714#include "confdefs.h"
1715
1716int main() { return 0; }
1717int t() {
1718t_accept()
1719; return 0; }
1720EOF
1721if eval $ac_link; then
1722 rm -rf conftest*
0694bce6 1723 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1724else
1725 rm -rf conftest*
0694bce6 1726 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1727fi
1728rm -f conftest*
1729LIBS="$ac_save_LIBS"
1730
1731fi
0694bce6 1732if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1733 echo "$ac_t""yes" 1>&6
1734 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1735else
1736 echo "$ac_t""no" 1>&6
1737fi
1738
1739
1740 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1741 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1742 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1743 if test "`(uname) 2>/dev/null`" != IRIX; then
1744 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
0694bce6
SC
1745ac_lib_var=`echo socket | tr './+' '__p'`
1746if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1747 echo $ac_n "(cached) $ac_c" 1>&6
1748else
1749 ac_save_LIBS="$LIBS"
1750LIBS="-lsocket $LIBS"
1751cat > conftest.$ac_ext <<EOF
204c8825 1752#line 1753 "configure"
5436fc65
C
1753#include "confdefs.h"
1754
1755int main() { return 0; }
1756int t() {
1757socket()
1758; return 0; }
1759EOF
1760if eval $ac_link; then
1761 rm -rf conftest*
0694bce6 1762 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1763else
1764 rm -rf conftest*
0694bce6 1765 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1766fi
1767rm -f conftest*
1768LIBS="$ac_save_LIBS"
1769
1770fi
0694bce6 1771if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1772 echo "$ac_t""yes" 1>&6
1773 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1774else
1775 echo "$ac_t""no" 1>&6
1776fi
1777
1778 fi
1779 fi
1780fi
1781
1782
1783
1784#
1785# Ok, lets find the tk source trees so we can use the headers
1786# If the directory (presumably symlink) named "tk" exists, use that one
1787# in preference to any others. Same logic is used when choosing library
1788# and again with Tcl.
1789#
1790echo "checking for Tk source directory" 1>&6
1791TKHDIR=""
1792for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do
1793 if test -f $i/tk.h ; then
1794 TKHDIR="-I$i"
1795 fi
1796done
1797# if we can't find it, see if one is installed
1798if test x"$TKHDIR" = x ; then
1799 installed=0
1800 if test -f $prefix/include/tk.h; then
1801 installed=1 TKHDIR="-I$prefix/include"
1802 else
1803 ac_safe=`echo "tk.h" | tr './\055' '___'`
1804echo $ac_n "checking for tk.h""... $ac_c" 1>&6
1805if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807else
1808 cat > conftest.$ac_ext <<EOF
204c8825 1809#line 1810 "configure"
5436fc65
C
1810#include "confdefs.h"
1811#include <tk.h>
1812EOF
1813eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1814ac_err=`grep -v '^ *+' conftest.out`
1815if test -z "$ac_err"; then
1816 rm -rf conftest*
1817 eval "ac_cv_header_$ac_safe=yes"
1818else
1819 echo "$ac_err" >&5
1820 rm -rf conftest*
1821 eval "ac_cv_header_$ac_safe=no"
1822fi
1823rm -f conftest*
1824fi
1825if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1826 echo "$ac_t""yes" 1>&6
1827 installed=1
1828else
1829 echo "$ac_t""no" 1>&6
1830fi
1831
1832 fi
1833 if test $installed -eq 0 ; then
1834 TKHDIR="# no Tk directory found"
1835 echo "configure: warning: Can't find Tk directory" 1>&2
1836 fi
1837fi
1838if test x"$TKHDIR" != x ; then
1839 echo "$ac_t""Setting TKHDIR to be $i" 1>&6
1840fi
1841
1842#
1843# Ok, lets find the tk library
1844# First, look for one uninstalled.
1845#
1846TKLIB=""
1847echo "checking for Tk library" 1>&6
1848for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1849 if test -f "$i/Makefile" ; then
1850 TKLIB=$i/libtk.a
1851 fi
1852done
1853# If not found, look for installed version
1854if test x"$TKLIB" = x ; then
1855 if test -f $prefix/lib/libtk.a; then
1856 installed=1
1857 else
1858 installed=0
1859 fi
1860 if test $installed -eq 1 ; then
1861 TKLIB="-ltk"
1862 fi
1863fi
1864
1865# If still not found, assume Tk simply hasn't been built yet
1866if test x"$TKLIB" = x ; then
1867 for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1868 if test -f "$i/tk.h" ; then
1869 TKLIB=$i/libtk.a
1870 fi
1871 done
1872fi
1873
1874if test x"$TKLIB" = x ; then
1875 TKLIB="# no Tk library found"
1876 echo "configure: warning: Can't find Tk library" 1>&2
1877else
1878 echo "$ac_t""setting TKLIB to be $TKLIB" 1>&6
1879 no_tk=
1880fi
1881
1882
1883
1884
1885
1886#
1887# Ok, lets find the tcl source trees so we can use the headers
1888#
1889# Warning: transition of version 9 to 10 will break this algorithm
1890# because 10 sorts before 9.
1891#
1892echo "checking for Tcl source directory" 1>&6
1893TCLHDIR=""
1894for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do
1895 if test -f $i/tclInt.h ; then
1896 TCLHDIR="-I$i"
1897 fi
1898done
1899# if we can't find it, see if one is installed
1900if test x"$TCLHDIR" = x ; then
1901 installed=0
1902 if test -f $prefix/include/tclInt.h; then
1903 installed=1 TCLHDIR="-I$prefix/include"
1904 else
1905 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
1906echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
1907if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1908 echo $ac_n "(cached) $ac_c" 1>&6
1909else
1910 cat > conftest.$ac_ext <<EOF
204c8825 1911#line 1912 "configure"
5436fc65
C
1912#include "confdefs.h"
1913#include <tclInt.h>
1914EOF
1915eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1916ac_err=`grep -v '^ *+' conftest.out`
1917if test -z "$ac_err"; then
1918 rm -rf conftest*
1919 eval "ac_cv_header_$ac_safe=yes"
1920else
1921 echo "$ac_err" >&5
1922 rm -rf conftest*
1923 eval "ac_cv_header_$ac_safe=no"
1924fi
1925rm -f conftest*
1926fi
1927if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1928 echo "$ac_t""yes" 1>&6
1929 installed=1
1930else
1931 echo "$ac_t""no" 1>&6
1932fi
1933
1934 fi
1935 if test $installed -eq 0 ; then
1936 TCLHDIR="# no Tcl directory found"
1937 echo "configure: warning: Can't find Tcl directory" 1>&2
1938 fi
1939else
1940 echo "$ac_t""setting TCLHDIR to be $i" 1>&6
1941fi
1942
1943#
1944# Ok, lets find the tcl library
1945# First, look for the latest uninstalled
1946#
1947TCLLIB=""
1948echo "checking for Tcl library" 1>&6
1949for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
1950 if test -f "$i/Makefile" ; then
1951 TCLLIB=$i/libtcl.a
1952 fi
1953done
1954# If not found, look for installed version
1955if test x"$TCLLIB" = x ; then
1956 if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi
1957 if test $installed -eq 1 ; then
1958 TCLLIB="-ltcl"
1959 fi
1960fi
1961# If still not found, assume Tcl simply hasn't been built yet
1962if test x"$TCLLIB" = x ; then
1963 for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
1964 if test -f "$i/tcl.h" ; then
1965 TCLLIB=$i/libtcl.a
1966 fi
1967 done
1968fi
1969
1970if test x"$TCLLIB" = x ; then
1971 TCLLIB="# no Tcl library found"
1972 echo "configure: warning: Can't find Tcl library" 1>&2
1973else
1974 echo "$ac_t""setting TCLLIB to be $TCLLIB" 1>&6
1975fi
1976
1977
1978
1979
1980
1981 ENABLE_GDBTK=1
66efdff9
JM
1982
1983 if test "x$x_includes" != "x" ;
1984 then
1985 X_INCDIR="-I$x_includes"
1986 else
1987 X_INCDIR=""
1988 fi
1989
1990 if test "x$x_libraries" != "x" ;
1991 then
1992 X_LIBDIR="-L$x_libraries"
1993 else
1994 X_LIBDIR=""
1995 fi
1996
7a13a704
FF
1997 TCL_LIBS='$(TCL) $(TK) $(X11)'
1998 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
5436fc65
C
1999 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2000fi
2001
66efdff9
JM
2002
2003
5436fc65
C
2004# end-sanitize-gdbtk
2005
2006
2007
2008
2009
2010
2011configdirs="doc testsuite"
2012
2013
2014# Map host cpu into the config cpu subdirectory name.
2015# The default is $host_cpu.
2016
2017case "${host_cpu}" in
2018
2019c[12]) gdb_host_cpu=convex ;;
2020hppa*) gdb_host_cpu=pa ;;
2021i[345]86) gdb_host_cpu=i386 ;;
2022m68*) gdb_host_cpu=m68k ;;
2023m88*) gdb_host_cpu=m88k ;;
2024np1) gdb_host_cpu=gould ;;
2025pyramid) gdb_host_cpu=pyr ;;
2026powerpc*) gdb_host_cpu=powerpc ;;
2027*) gdb_host_cpu=$host_cpu ;;
2028
2029esac
2030
2031# map host info into gdb names.
2032
2033case "${host}" in
2034
2035a29k-*-*) gdb_host=ultra3 ;;
2036
2037alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2038alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2039alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
2040
2041arm-*-*) gdb_host=arm ;;
2042
2043c[12]-*-*) gdb_host=convex ;;
2044
2045hppa*-*-bsd*) gdb_host=hppabsd ;;
2046hppa*-*-hiux*) gdb_host=hppahpux ;;
2047hppa*-*-hpux*) gdb_host=hppahpux ;;
2048hppa*-*-osf*) gdb_host=hppaosf ;;
2049
2050i[345]86-ncr-*) gdb_host=ncr3000 ;;
2051i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2052i[345]86-sequent-sysv4*) gdb_host=ptx4 ;;
2053i[345]86-sequent-sysv*) gdb_host=ptx ;;
2054i[345]86-*-aix*) gdb_host=i386aix ;;
2055i[345]86-*-bsd*) gdb_host=i386bsd ;;
2056i[345]86-*-freebsd*) gdb_host=fbsd ;;
2057i[345]86-*-netbsd*) gdb_host=nbsd ;;
2058i[345]86-*-go32*) gdb_host=go32 ;;
2059i[345]86-*-linux*) gdb_host=linux ;;
2060i[345]86-*-lynxos*) gdb_host=i386lynx ;;
2061i[345]86-*-mach3*) gdb_host=i386m3 ;;
2062i[345]86-*-mach*) gdb_host=i386mach ;;
2063i[345]86-*-osf1mk*) gdb_host=osf1mk ;;
2064i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2065i[345]86-*-sco*) gdb_host=i386sco ;;
2066i[345]86-*-solaris*) gdb_host=i386sol2 ;;
2067i[345]86-*-sunos*) gdb_host=sun386 ;;
2068i[345]86-*-sysv3.2*) gdb_host=i386v32 ;;
2069i[345]86-*-sysv32*) gdb_host=i386v32 ;;
2070i[345]86-*-sysv4*) gdb_host=i386v4 ;;
2071i[345]86-*-unixware) gdb_host=i386v4 ;;
2072i[345]86-*-sysv*) gdb_host=i386v ;;
2073i[345]86-*-isc*) gdb_host=i386v32 ;;
2074i[345]86-*-os9k) gdb_host=i386os9k ;;
24e60978 2075i[345]86-*-win32*) gdb_host=win32 ;;
5436fc65
C
2076m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2077m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2078m68030-sony-*) gdb_host=news1000 ;;
2079
2080m68*-altos-*) gdb_host=altos ;;
2081m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2082m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2083m68*-att-*) gdb_host=3b1 ;;
2084m68*-bull*-sysv*) gdb_host=dpx2 ;;
2085m68*-hp-bsd*) gdb_host=hp300bsd ;;
2086m68*-hp-hpux*) gdb_host=hp300hpux ;;
2087m68*-isi-*) gdb_host=isi ;;
2088m68*-*-lynxos*) gdb_host=m68klynx ;;
2089m68*-*-sysv4*) gdb_host=m68kv4 ;;
2090m68*-motorola-*) gdb_host=delta68 ;;
2091m68*-sony-*) gdb_host=news ;;
2092m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2093m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2094m68*-sun-*) gdb_host=sun3os4 ;;
2095
2096m88*-harris-cxux*) gdb_host=cxux ;;
2097m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2098m88*-motorola-sysv*) gdb_host=delta88 ;;
2099m88*-*-mach3*) gdb_host=mach3 ;;
2100m88*-*-*) gdb_host=m88k ;;
2101
2102mips-dec-mach3*) gdb_host=mach3 ;;
2103mips-dec-*) gdb_host=decstation ;;
2104mips-little-*) gdb_host=littlemips ;;
2105mips-sgi-irix3*) gdb_host=irix3 ;;
2106mips-sgi-irix4*) gdb_host=irix4 ;;
2107mips-sgi-irix5*) gdb_host=irix5 ;;
2108mips-sony-*) gdb_host=news-mips ;;
2109mips-*-mach3*) gdb_host=mach3 ;;
2110mips-*-sysv4*) gdb_host=mipsv4 ;;
2111mips-*-sysv*) gdb_host=riscos ;;
2112mips-*-riscos*) gdb_host=riscos ;;
2113
2114none-*-*) gdb_host=none ;;
2115
2116np1-*-*) gdb_host=np1 ;;
2117
2118ns32k-*-mach3*) gdb_host=mach3 ;;
2119ns32k-*-netbsd*) gdb_host=nbsd ;;
2120ns32k-umax-*) gdb_host=umax ;;
2121ns32k-utek-sysv*) gdb_host=merlin ;;
2122
fbc3f191
JL
2123powerpc-*-aix*) gdb_host=aix ;;
2124
5436fc65
C
2125pn-*-*) gdb_host=pn ;;
2126
2127pyramid-*-*) gdb_host=pyramid ;;
2128
2129romp-*-*) gdb_host=rtbsd ;;
2130
2131rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
2132rs6000-*-*) gdb_host=rs6000 ;;
2133
2134sparc-*-lynxos*) gdb_host=sparclynx ;;
2135sparc-*-netbsd*) gdb_host=nbsd ;;
2136sparc-*-solaris2*) gdb_host=sun4sol2 ;;
2137sparc-*-sunos4*) gdb_host=sun4os4 ;;
2138sparc-*-sunos5*) gdb_host=sun4sol2 ;;
2139sparc-*-*) gdb_host=sun4os4 ;;
2140
2141tahoe-*-*) gdb_host=tahoe ;;
2142
2143vax-*-bsd*) gdb_host=vaxbsd ;;
2144vax-*-ultrix2*) gdb_host=vaxult2 ;;
2145vax-*-ultrix*) gdb_host=vaxult ;;
2146
2147w65-*-*) gdb_host=w65 ;;
2148
2149esac
2150
2151
2152# Map target cpu into the config cpu subdirectory name.
2153# The default is $target_cpu.
2154
2155case "${target_cpu}" in
2156
2157alpha) gdb_target_cpu=alpha ;;
2158c[12]) gdb_target_cpu=convex ;;
2159hppa*) gdb_target_cpu=pa ;;
2160i[345]86) gdb_target_cpu=i386 ;;
2161m68*) gdb_target_cpu=m68k ;;
2162m88*) gdb_target_cpu=m88k ;;
2163mips*) gdb_target_cpu=mips ;;
2164np1) gdb_target_cpu=gould ;;
2165powerpc*) gdb_target_cpu=powerpc ;;
2166pn) gdb_target_cpu=gould ;;
2167pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
2168sparc*) gdb_target_cpu=sparc ;;
2169*) gdb_target_cpu=$target_cpu ;;
2170
2171esac
2172
2173# map target info into gdb names.
2174
2175case "${target}" in
2176
2177a29k-*-aout*) gdb_target=a29k ;;
2178a29k-*-coff*) gdb_target=a29k ;;
2179a29k-*-elf*) gdb_target=a29k ;;
2180a29k-*-ebmon*) gdb_target=a29k ;;
2181a29k-*-kern*) gdb_target=a29k-kern ;;
2182a29k-*-none*) gdb_target=a29k ;;
2183a29k-*-sym1*) gdb_target=ultra3 ;;
2184a29k-*-udi*) gdb_target=a29k-udi ;;
2185a29k-*-vxworks*) gdb_target=vx29k ;;
2186
2187alpha-*-osf*) gdb_target=alpha-osf1 ;;
2188
2189# start-sanitize-arc
2190arc-*-*) gdb_target=arc ;;
2191# end-sanitize-arc
2192
2193arm-*-*) gdb_target=arm ;;
2194
2195c1-*-*) gdb_target=convex ;;
2196c2-*-*) gdb_target=convex ;;
2197
fb506180
SS
2198h8300-*-*) gdb_target=h8300 ;;
2199h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
2200
2201sh-*-*) gdb_target=sh ;;
2202
2203# start-sanitize-r16
2204r16-*-*) gdb_target=r16 ;;
2205# end-sanitize-r16
2206
2207hppa*-*-bsd*) gdb_target=hppabsd ;;
2208hppa*-*-pro*) gdb_target=hppapro ;;
2209hppa*-*-hpux*) gdb_target=hppahpux ;;
2210hppa*-*-hiux*) gdb_target=hppahpux ;;
2211hppa*-*-osf*) gdb_target=hppaosf ;;
2212
2213i[345]86-sequent-bsd*) gdb_target=symmetry ;;
2214i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
2215i[345]86-sequent-sysv*) gdb_target=ptx ;;
2216i[345]86-ncr-*) gdb_target=ncr3000 ;;
2217i[345]86-*-aout*) gdb_target=i386aout ;;
2218i[345]86-*-coff*) gdb_target=i386v ;;
2219i[345]86-*-elf*) gdb_target=i386v ;;
2220i[345]86-*-aix*) gdb_target=i386aix ;;
2221i[345]86-*-bsd*) gdb_target=i386bsd ;;
2222i[345]86-*-freebsd*) gdb_target=fbsd ;;
2223i[345]86-*-netbsd*) gdb_target=nbsd ;;
2224i[345]86-*-os9k) gdb_target=i386os9k ;;
2225i[345]86-*-go32*) gdb_target=i386aout ;;
2226i[345]86-*-lynxos*) gdb_target=i386lynx
2227 configdirs="${configdirs} gdbserver" ;;
2228i[345]86-*-solaris*) gdb_target=i386sol2 ;;
2229i[345]86-*-sunos*) gdb_target=sun386 ;;
2230i[345]86-*-sysv4*) gdb_target=i386v4 ;;
2231i[345]86-*-sco*) gdb_target=i386v ;;
2232i[345]86-*-sysv*) gdb_target=i386v ;;
2233i[345]86-*-linux*) gdb_target=linux ;;
2234i[345]86-*-isc*) gdb_target=i386v ;;
2235i[345]86-*-mach3*) gdb_target=i386m3 ;;
2236i[345]86-*-mach*) gdb_target=i386mach ;;
2237i[345]86-*-netware*) gdb_target=i386nw
2238 configdirs="${configdirs} nlm" ;;
2239i[345]86-*-osf1mk*) gdb_target=i386mk ;;
24e60978 2240i[345]86-*-win32) gdb_target=win32 ;;
5436fc65
C
2241
2242i960-*-bout*) gdb_target=vxworks960 ;;
2243i960-*-coff*) gdb_target=nindy960 ;;
2244i960-*-elf*) gdb_target=nindy960 ;;
2245
2246i960-*-nindy*) gdb_target=nindy960 ;;
2247i960-*-vxworks*) gdb_target=vxworks960 ;;
2248
2249m68000-*-sunos3*) gdb_target=sun2os3 ;;
2250m68000-*-sunos4*) gdb_target=sun2os4 ;;
2251
2252m68*-apollo*-bsd*) gdb_target=apollo68b ;;
2253m68*-bull-sysv*) gdb_target=dpx2 ;;
2254m68*-hp-bsd*) gdb_target=hp300bsd ;;
2255m68*-hp-hpux*) gdb_target=hp300hpux ;;
2256m68*-altos-*) gdb_target=altos ;;
2257m68*-att-*) gdb_target=3b1 ;;
2258m68*-cisco*-*) gdb_target=cisco ;;
2259m68*-ericsson-*) gdb_target=es1800 ;;
2260m68*-isi-*) gdb_target=isi ;;
2261m68*-motorola-*) gdb_target=delta68 ;;
2262m68*-netx-*) gdb_target=vxworks68 ;;
2263m68*-sony-*) gdb_target=news ;;
2264m68*-tandem-*) gdb_target=st2000 ;;
2265m68*-rom68k-*) gdb_target=monitor ;;
2266m68*-*bug-*) gdb_target=monitor ;;
2267m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 2268m68*-est-*) gdb_target=monitor ;;
5436fc65
C
2269m68*-*-aout*) gdb_target=monitor ;;
2270m68*-*-coff*) gdb_target=monitor ;;
2271m68*-*-elf*) gdb_target=monitor ;;
2272m68*-*-lynxos*) gdb_target=m68klynx
2273 configdirs="${configdirs} gdbserver" ;;
2274m68*-*-os68k*) gdb_target=os68k ;;
2275m68*-*-sunos3*) gdb_target=sun3os3 ;;
2276m68*-*-sunos4*) gdb_target=sun3os4 ;;
2277m68*-*-sysv4*) gdb_target=m68kv4 ;;
2278m68*-*-vxworks*) gdb_target=vxworks68 ;;
2279
2280m88*-harris-cxux*) gdb_target=cxux ;;
2281m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
2282m88*-*-mach3*) gdb_target=mach3 ;;
2283m88*-motorola-*) gdb_target=delta88 ;;
2284m88*-*-*) gdb_target=m88k ;;
2285
2286mips64*-big-*) gdb_target=bigmips64 ;;
2287mips*-big-*) gdb_target=bigmips ;;
2288mips*-dec-mach3*) gdb_target=mach3 ;;
2289mips*-dec-*) gdb_target=decstation ;;
2290mips64*el-*-ecoff*) gdb_target=idtl64 ;;
2291mips64*-idt-ecoff*) gdb_target=idt64 ;;
2292mips64*el-*-elf*) gdb_target=idtl64 ;;
2293mips64*-*-elf*) gdb_target=idt64 ;;
2294mips*el-*-ecoff*) gdb_target=idtl ;;
2295mips*-*-ecoff*) gdb_target=idt ;;
2296mips*el-*-elf*) gdb_target=idtl ;;
2297mips*-*-elf*) gdb_target=idt ;;
2298mips*-little-*) gdb_target=littlemips ;;
2299mips*-sgi-irix5*) gdb_target=irix5 ;;
2300mips*-sgi-*) gdb_target=irix3 ;;
2301mips*-sony-*) gdb_target=bigmips ;;
2302mips*-*-mach3*) gdb_target=mach3 ;;
2303mips*-*-sysv4*) gdb_target=mipsv4 ;;
2304mips*-*-sysv*) gdb_target=bigmips ;;
2305mips*-*-riscos*) gdb_target=bigmips ;;
2306
2307none-*-*) gdb_target=none ;;
2308
2309np1-*-*) gdb_target=np1 ;;
2310
2311ns32k-*-mach3*) gdb_target=mach3 ;;
2312ns32k-*-netbsd*) gdb_target=nbsd ;;
2313ns32k-utek-sysv*) gdb_target=merlin ;;
2314ns32k-utek-*) gdb_target=umax ;;
2315
2316pn-*-*) gdb_target=pn ;;
2317powerpc-*-netware*) gdb_target=ppc-nw
2318 configdirs="${configdirs} nlm" ;;
2319
65eaea27 2320powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 2321powerpc-*-aix*) gdb_target=aix ;;
13ba8b69 2322powerpc-*-eabisim*) gdb_target=ppc-sim ;;
fbc3f191 2323powerpc-*-eabi*) gdb_target=ppc-eabi ;;
13ba8b69 2324powerpcle-*-eabisim*) gdb_target=ppcle-sim ;;
fbc3f191 2325powerpcle-*-eabi*) gdb_target=ppcle-eabi ;;
5436fc65
C
2326
2327pyramid-*-*) gdb_target=pyramid ;;
2328
2329rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 2330rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
2331rs6000-*-*) gdb_target=rs6000 ;;
2332
2333sparc-*-aout*) gdb_target=sparc-em ;;
2334sparc-*-coff*) gdb_target=sparc-em ;;
2335sparc-*-elf*) gdb_target=sparc-em ;;
2336sparc-*-lynxos*) gdb_target=sparclynx
2337 configdirs="${configdirs} gdbserver" ;;
2338sparc-*-netbsd*) gdb_target=nbsd ;;
2339sparc-*-solaris2*) gdb_target=sun4sol2 ;;
2340sparc-*-sunos4*) gdb_target=sun4os4 ;;
2341sparc-*-sunos5*) gdb_target=sun4sol2 ;;
2342sparc-*-vxworks*) gdb_target=vxsparc ;;
2343sparc-*-*) gdb_target=sun4os4 ;;
2344sparclite*-*-*) gdb_target=sparclite ;;
2345sparc64-*-*) gdb_target=sp64 ;;
2346
2347tahoe-*-*) gdb_target=tahoe ;;
2348
2349vax-*-*) gdb_target=vax ;;
2350
2351w65-*-*) gdb_target=w65 ;;
2352
fb506180 2353z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
2354
2355esac
2356
2357
5f107900 2358frags=
5436fc65
C
2359host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2360if test ! -f ${host_makefile_frag}; then
2361{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2362fi
5f107900 2363frags="$frags $host_makefile_frag"
5436fc65
C
2364
2365target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
2366if test ! -f ${target_makefile_frag}; then
2367{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
2368fi
5f107900 2369frags="$frags $target_makefile_frag"
5436fc65
C
2370
2371
2372
2373
2374
094fd4ae
C
2375hostfile=`sed -n '
2376s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2377' ${host_makefile_frag}`
5436fc65 2378
094fd4ae
C
2379targetfile=`sed -n '
2380s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2381' ${target_makefile_frag}`
5436fc65
C
2382
2383# these really aren't orthogonal true/false values of the same condition,
2384# but shells are slow enough that I like to reuse the test conditions
2385# whenever possible
2386if test "${target}" = "${host}"; then
094fd4ae
C
2387nativefile=`sed -n '
2388s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2389' ${host_makefile_frag}`
5436fc65
C
2390else
2391# GDBserver is only useful in a "native" enviroment
2392configdirs=`echo $configdirs | sed 's/gdbserver//'`
2393fi
2394
094fd4ae 2395
5436fc65
C
2396# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
2397# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
2398# corresponding links. But we have to remove the xm.h files and tm.h
2399# files anyway, e.g. when switching from "configure host" to
2400# "configure none".
2401
2402files=
2403links=
2404rm -f xm.h
2405if test "${hostfile}" != ""; then
2406files="${files} config/${gdb_host_cpu}/${hostfile}"
2407links="${links} xm.h"
2408fi
2409rm -f tm.h
2410if test "${targetfile}" != ""; then
2411files="${files} config/${gdb_target_cpu}/${targetfile}"
2412links="${links} tm.h"
2413fi
2414rm -f nm.h
2415if test "${nativefile}" != ""; then
2416files="${files} config/${gdb_host_cpu}/${nativefile}"
2417links="${links} nm.h"
2418else
2419# A cross-only configuration.
2420files="${files} config/nm-empty.h"
2421links="${links} nm.h"
2422fi
2423# start-sanitize-gdbtk
2424
2425# Make it possible to use the GUI without doing a full install
2426if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
2427files="${files} gdbtk.tcl"
2428links="${links} gdbtk.tcl"
2429fi
2430# end-sanitize-gdbtk
2431
2432
2433
2434subdirs="$configdirs"
2435
2436trap '' 1 2 15
2437cat > confcache <<\EOF
2438# This file is a shell script that caches the results of configure
2439# tests run on this system so they can be shared between configure
2440# scripts and configure runs. It is not useful on other systems.
2441# If it contains results you don't want to keep, you may remove or edit it.
2442#
2443# By default, configure uses ./config.cache as the cache file,
2444# creating it if it does not exist already. You can give configure
2445# the --cache-file=FILE option to use a different cache file; that is
2446# what configure does when it calls configure scripts in
2447# subdirectories, so they share the cache.
2448# Giving --cache-file=/dev/null disables caching, for debugging configure.
2449# config.status only pays attention to the cache file if you give it the
2450# --recheck option to rerun configure.
2451#
2452EOF
2453# Ultrix sh set writes to stderr and can't be redirected directly,
2454# and sets the high bit in the cache file unless we assign to the vars.
2455(set) 2>&1 |
2456 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2457 >> confcache
2458if cmp -s $cache_file confcache; then
2459 :
2460else
2461 if test -w $cache_file; then
2462 echo "updating cache $cache_file"
2463 cat confcache > $cache_file
2464 else
2465 echo "not updating unwritable cache $cache_file"
2466 fi
2467fi
2468rm -f confcache
2469
2470trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2471
2472test "x$prefix" = xNONE && prefix=$ac_default_prefix
2473# Let make expand exec_prefix.
2474test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2475
2476# Any assignment to VPATH causes Sun make to only execute
2477# the first set of double-colon rules, so remove it if not needed.
2478# If there is a colon in the path, we need to keep it.
2479if test "x$srcdir" = x.; then
2480 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2481fi
2482
2483trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2484
2485# Transform confdefs.h into DEFS.
2486# Protect against shell expansion while executing Makefile rules.
2487# Protect against Makefile macro expansion.
2488cat > conftest.defs <<\EOF
2489s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2490s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
2491s%\[%\\&%g
2492s%\]%\\&%g
2493s%\$%$$%g
2494EOF
2495DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2496rm -f conftest.defs
2497
2498
2499# Without the "./", some shells look in PATH for config.status.
2500: ${CONFIG_STATUS=./config.status}
2501
2502echo creating $CONFIG_STATUS
2503rm -f $CONFIG_STATUS
2504cat > $CONFIG_STATUS <<EOF
2505#! /bin/sh
2506# Generated automatically by configure.
2507# Run this file to recreate the current configuration.
2508# This directory was configured as follows,
2509# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2510#
2511# $0 $ac_configure_args
2512#
2513# Compiler output produced by configure, useful for debugging
2514# configure, is in ./config.log if it exists.
2515
2516ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2517for ac_option
2518do
2519 case "\$ac_option" in
2520 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2521 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2522 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2523 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
0694bce6 2524 echo "$CONFIG_STATUS generated by autoconf version 2.4.2"
5436fc65
C
2525 exit 0 ;;
2526 -help | --help | --hel | --he | --h)
2527 echo "\$ac_cs_usage"; exit 0 ;;
2528 *) echo "\$ac_cs_usage"; exit 1 ;;
2529 esac
2530done
2531
2532ac_given_srcdir=$srcdir
2533ac_given_INSTALL="$INSTALL"
2534
2535trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2536
2537# Protect against being on the right side of a sed subst in config.status.
2538sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2539 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2540$ac_vpsub
2541$extrasub
2542s%@CFLAGS@%$CFLAGS%g
2543s%@CPPFLAGS@%$CPPFLAGS%g
2544s%@CXXFLAGS@%$CXXFLAGS%g
2545s%@DEFS@%$DEFS%g
2546s%@LDFLAGS@%$LDFLAGS%g
2547s%@LIBS@%$LIBS%g
2548s%@exec_prefix@%$exec_prefix%g
2549s%@prefix@%$prefix%g
2550s%@program_transform_name@%$program_transform_name%g
0694bce6
SC
2551s%@bindir@%$bindir%g
2552s%@sbindir@%$sbindir%g
2553s%@libexecdir@%$libexecdir%g
2554s%@datadir@%$datadir%g
2555s%@sysconfdir@%$sysconfdir%g
2556s%@sharedstatedir@%$sharedstatedir%g
2557s%@localstatedir@%$localstatedir%g
2558s%@libdir@%$libdir%g
2559s%@includedir@%$includedir%g
2560s%@oldincludedir@%$oldincludedir%g
2561s%@infodir@%$infodir%g
2562s%@mandir@%$mandir%g
5436fc65
C
2563s%@CC@%$CC%g
2564s%@CPP@%$CPP%g
2565s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2566s%@INSTALL_DATA@%$INSTALL_DATA%g
2567s%@RANLIB@%$RANLIB%g
204c8825 2568s%@YACC@%$YACC%g
5436fc65
C
2569s%@host@%$host%g
2570s%@host_alias@%$host_alias%g
2571s%@host_cpu@%$host_cpu%g
2572s%@host_vendor@%$host_vendor%g
2573s%@host_os@%$host_os%g
2574s%@target@%$target%g
2575s%@target_alias@%$target_alias%g
2576s%@target_cpu@%$target_cpu%g
2577s%@target_vendor@%$target_vendor%g
2578s%@target_os@%$target_os%g
2579s%@build@%$build%g
2580s%@build_alias@%$build_alias%g
2581s%@build_cpu@%$build_cpu%g
2582s%@build_vendor@%$build_vendor%g
2583s%@build_os@%$build_os%g
2584s%@X_CFLAGS@%$X_CFLAGS%g
2585s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2586s%@X_LIBS@%$X_LIBS%g
2587s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2588s%@TKHDIR@%$TKHDIR%g
2589s%@TKLIB@%$TKLIB%g
2590s%@TCLHDIR@%$TCLHDIR%g
2591s%@TCLLIB@%$TCLLIB%g
2592s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
66efdff9
JM
2593s%@X_INCDIR@%$X_INCDIR%g
2594s%@X_LIBDIR@%$X_LIBDIR%g
5436fc65
C
2595s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
2596s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
2597s%@ENABLE_OBS@%$ENABLE_OBS%g
5436fc65
C
2598/@host_makefile_frag@/r $host_makefile_frag
2599s%@host_makefile_frag@%%g
2600/@target_makefile_frag@/r $target_makefile_frag
2601s%@target_makefile_frag@%%g
5f107900 2602s%@frags@%$frags%g
5436fc65
C
2603s%@subdirs@%$subdirs%g
2604
2605CEOF
2606EOF
2607cat >> $CONFIG_STATUS <<EOF
2608
2609CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2610EOF
2611cat >> $CONFIG_STATUS <<\EOF
2612for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2613 # Support "outfile[:infile]", defaulting infile="outfile.in".
2614 case "$ac_file" in
2615 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2616 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2617 *) ac_file_in="${ac_file}.in" ;;
2618 esac
2619
2620 # Adjust relative srcdir, etc. for subdirectories.
2621
2622 # Remove last slash and all that follows it. Not all systems have dirname.
2623 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2624 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2625 # The file is in a subdirectory.
2626 test ! -d "$ac_dir" && mkdir "$ac_dir"
2627 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2628 # A "../" for each directory in $ac_dir_suffix.
2629 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2630 else
2631 ac_dir_suffix= ac_dots=
2632 fi
2633
2634 case "$ac_given_srcdir" in
2635 .) srcdir=.
2636 if test -z "$ac_dots"; then top_srcdir=.
2637 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2638 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2639 *) # Relative path.
2640 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2641 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2642 esac
2643
2644 case "$ac_given_INSTALL" in
2645 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2646 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2647 esac
2648 echo creating "$ac_file"
2649 rm -f "$ac_file"
2650 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2651 case "$ac_file" in
2652 *Makefile*) ac_comsub="1i\\
2653# $configure_input" ;;
2654 *) ac_comsub= ;;
2655 esac
2656 sed -e "$ac_comsub
2657s%@configure_input@%$configure_input%g
2658s%@srcdir@%$srcdir%g
2659s%@top_srcdir@%$top_srcdir%g
2660s%@INSTALL@%$INSTALL%g
2661" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2662fi; done
2663rm -f conftest.subs
2664
2665EOF
2666
2667cat >> $CONFIG_STATUS <<EOF
2668ac_sources="$files"
2669ac_dests="$links"
2670EOF
2671
2672cat >> $CONFIG_STATUS <<\EOF
2673srcdir=$ac_given_srcdir
2674while test -n "$ac_sources"; do
2675 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2676 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2677
2678 echo "linking $srcdir/$ac_source to $ac_dest"
2679
2680 if test ! -r $srcdir/$ac_source; then
2681 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2682 fi
2683 rm -f $ac_dest
2684
2685 # Make relative symlinks.
2686 # Remove last slash and all that follows it. Not all systems have dirname.
2687 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2688 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2689 # The dest file is in a subdirectory.
2690 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2691 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2692 # A "../" for each directory in $ac_dest_dir_suffix.
2693 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2694 else
2695 ac_dest_dir_suffix= ac_dots=
2696 fi
2697
2698 case "$srcdir" in
2699 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2700 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2701 esac
2702
2703 # Make a symlink if possible; otherwise try a hard link.
2704 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2705 ln $srcdir/$ac_source $ac_dest; then :
2706 else
2707 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2708 fi
2709done
0a5a1821
C
2710EOF
2711cat >> $CONFIG_STATUS <<EOF
5436fc65 2712
0a5a1821
C
2713gdb_host_cpu=$gdb_host_cpu
2714gdb_target_cpu=$gdb_target_cpu
2715nativefile=$nativefile
2716
2717EOF
2718cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
2719
2720if test "${nativefile}" = ""; then
2721sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
2722 < Makefile > Makefile.tem
2723mv -f Makefile.tem Makefile
2724fi
2725
2726sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
2727/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
2728/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
2729mv -f Makefile.tmp Makefile
2730
2731case ${srcdir} in
2732.)
2733;;
2734*)
2735grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
2736echo "source ${srcdir}/.gdbinit" >> .gdbinit
2737esac
2738
2739exit 0
2740EOF
2741chmod +x $CONFIG_STATUS
2742rm -fr confdefs* $ac_clean_files
2743test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2744
2745if test "$no_recursion" != yes; then
2746
2747 # Remove --cache-file and --srcdir arguments so they do not pile up.
2748 ac_sub_configure_args=
2749 ac_prev=
2750 for ac_arg in $ac_configure_args; do
2751 if test -n "$ac_prev"; then
2752 ac_prev=
2753 continue
2754 fi
2755 case "$ac_arg" in
2756 -cache-file | --cache-file | --cache-fil | --cache-fi \
2757 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2758 ac_prev=cache_file ;;
2759 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2760 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2761 ;;
2762 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2763 ac_prev=srcdir ;;
2764 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2765 ;;
2766 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2767 esac
2768 done
2769
2770 for ac_config_dir in $configdirs; do
2771
2772 # Do not complain, so a configure script can configure whichever
2773 # parts of a large source tree are present.
2774 if test ! -d $srcdir/$ac_config_dir; then
2775 continue
2776 fi
2777
2778 echo configuring in $ac_config_dir
2779
2780 case "$srcdir" in
2781 .) ;;
2782 *)
2783 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2784 else
2785 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2786 fi
2787 ;;
2788 esac
2789
2790 ac_popdir=`pwd`
2791 cd $ac_config_dir
2792
2793 case "$srcdir" in
2794 .) # No --srcdir option. We are building in place.
2795 ac_sub_srcdir=$srcdir ;;
2796 /*) # Absolute path.
2797 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2798 *) # Relative path.
2799 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
2800 esac
2801
2802 # Check for guested configure; otherwise get Cygnus style configure.
2803 if test -f $ac_sub_srcdir/configure; then
2804 ac_sub_configure=$ac_sub_srcdir/configure
2805 elif test -f $ac_sub_srcdir/configure.in; then
2806 ac_sub_configure=$ac_configure
2807 else
2808 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2809 ac_sub_configure=
2810 fi
2811
2812 # The recursion is here.
2813 if test -n "$ac_sub_configure"; then
2814
2815 # Make the cache file name correct relative to the subdirectory.
2816 # A "../" for each directory in /$ac_config_dir.
2817 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2818 case "$cache_file" in
2819 /*) ac_sub_cache_file=$cache_file ;;
2820 *) # Relative path.
2821 ac_sub_cache_file="$ac_dots$cache_file" ;;
2822 esac
2823 case "$ac_given_INSTALL" in
2824 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2825 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2826 esac
2827
2828 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2829 # The eval makes quoting arguments work.
2830 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2831 then :
2832 else
2833 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2834 fi
2835 fi
2836
2837 cd $ac_popdir
2838 done
2839fi
2840
5e711e7f
PS
2841
2842exit 0
This page took 0.157255 seconds and 4 git commands to generate.