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