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