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