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