* Makefile.in (taz): Handle case where tex3patch didn't even get checked out.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
b613bfbf
GN
4# Generated automatically using autoconf version 2.4
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
5436fc65
C
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"
4e327047
TT
24ac_help="$ac_help
25 --with-tclinclude directory where tcl private headers are"
26ac_help="$ac_help
27 --with-tcllib directory where the tcl library is"
28ac_help="$ac_help
29 --with-tkinclude directory where the tk private headers are"
30ac_help="$ac_help
31 --with-tklib directory where the tk library is"
5436fc65
C
32
33# Initialize some variables set by options.
34# The variables have the same names as the options, with
35# dashes changed to underlines.
36build=NONE
37cache_file=./config.cache
38exec_prefix=NONE
39host=NONE
40no_create=
41nonopt=NONE
42no_recursion=
43prefix=NONE
44program_prefix=NONE
45program_suffix=NONE
46program_transform_name=s,x,x,
47silent=
48site=
49srcdir=
50target=NONE
51verbose=
52x_includes=NONE
53x_libraries=NONE
54
55# Initialize some other variables.
56subdirs=
57
58ac_prev=
59for ac_option
60do
61
62 # If the previous option needs an argument, assign it.
63 if test -n "$ac_prev"; then
64 eval "$ac_prev=\$ac_option"
65 ac_prev=
66 continue
67 fi
68
69 case "$ac_option" in
70 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71 *) ac_optarg= ;;
72 esac
73
74 # Accept the important Cygnus configure options, so we can diagnose typos.
75
76 case "$ac_option" in
77
b613bfbf 78 -build | --build | --buil | --bui | --bu | --b)
5436fc65 79 ac_prev=build ;;
b613bfbf 80 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
5436fc65
C
81 build="$ac_optarg" ;;
82
83 -cache-file | --cache-file | --cache-fil | --cache-fi \
84 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
85 ac_prev=cache_file ;;
86 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
87 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
88 cache_file="$ac_optarg" ;;
89
90 -disable-* | --disable-*)
91 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
92 # Reject names that are not valid shell variable names.
93 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
94 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
95 fi
96 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
97 eval "enable_${ac_feature}=no" ;;
98
99 -enable-* | --enable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
104 fi
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 case "$ac_option" in
107 *=*) ;;
108 *) ac_optarg=yes ;;
109 esac
110 eval "enable_${ac_feature}='$ac_optarg'" ;;
111
112 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
113 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
114 | --exec | --exe | --ex)
115 ac_prev=exec_prefix ;;
116 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
117 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
118 | --exec=* | --exe=* | --ex=*)
119 exec_prefix="$ac_optarg" ;;
120
121 -gas | --gas | --ga | --g)
122 # Obsolete; use --with-gas.
123 with_gas=yes ;;
124
125 -help | --help | --hel | --he)
126 # Omit some internal or obsolete options to make the list less imposing.
127 # This message is too long to be a string in the A/UX 3.1 sh.
128 cat << EOF
129Usage: configure [options] [host]
130Options: [defaults in brackets after descriptions]
131Configuration:
132 --cache-file=FILE cache test results in FILE
133 --help print this message
134 --no-create do not create output files
135 --quiet, --silent do not print \`checking...' messages
136 --version print the version of autoconf that created configure
137Directory and file names:
138 --prefix=PREFIX install architecture-independent files in PREFIX
139 [$ac_default_prefix]
b613bfbf 140 --exec-prefix=PREFIX install architecture-dependent files in PREFIX
5436fc65
C
141 [same as prefix]
142 --srcdir=DIR find the sources in DIR [configure dir or ..]
143 --program-prefix=PREFIX prepend PREFIX to installed program names
144 --program-suffix=SUFFIX append SUFFIX to installed program names
b613bfbf 145 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
5436fc65
C
146Host type:
147 --build=BUILD configure for building on BUILD [BUILD=HOST]
148 --host=HOST configure for HOST [guessed]
149 --target=TARGET configure for TARGET [TARGET=HOST]
150Features and packages:
151 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
152 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
153 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
154 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
155 --x-includes=DIR X include files are in DIR
156 --x-libraries=DIR X library files are in DIR
b613bfbf 157--enable and --with options recognized:$ac_help
5436fc65
C
158EOF
159 exit 0 ;;
160
161 -host | --host | --hos | --ho)
162 ac_prev=host ;;
163 -host=* | --host=* | --hos=* | --ho=*)
164 host="$ac_optarg" ;;
165
166 -nfp | --nfp | --nf)
167 # Obsolete; use --without-fp.
168 with_fp=no ;;
169
170 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
171 | --no-cr | --no-c)
172 no_create=yes ;;
173
174 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
175 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
176 no_recursion=yes ;;
177
178 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
179 ac_prev=prefix ;;
180 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
181 prefix="$ac_optarg" ;;
182
183 -program-prefix | --program-prefix | --program-prefi | --program-pref \
184 | --program-pre | --program-pr | --program-p)
185 ac_prev=program_prefix ;;
186 -program-prefix=* | --program-prefix=* | --program-prefi=* \
187 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
188 program_prefix="$ac_optarg" ;;
189
190 -program-suffix | --program-suffix | --program-suffi | --program-suff \
191 | --program-suf | --program-su | --program-s)
192 ac_prev=program_suffix ;;
193 -program-suffix=* | --program-suffix=* | --program-suffi=* \
194 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
195 program_suffix="$ac_optarg" ;;
196
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 ac_prev=program_transform_name ;;
205 -program-transform-name=* | --program-transform-name=* \
206 | --program-transform-nam=* | --program-transform-na=* \
207 | --program-transform-n=* | --program-transform-=* \
208 | --program-transform=* | --program-transfor=* \
209 | --program-transfo=* | --program-transf=* \
210 | --program-trans=* | --program-tran=* \
211 | --progr-tra=* | --program-tr=* | --program-t=*)
212 program_transform_name="$ac_optarg" ;;
213
214 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
215 | -silent | --silent | --silen | --sile | --sil)
216 silent=yes ;;
217
218 -site | --site | --sit)
219 ac_prev=site ;;
220 -site=* | --site=* | --sit=*)
221 site="$ac_optarg" ;;
222
223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
224 ac_prev=srcdir ;;
225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
226 srcdir="$ac_optarg" ;;
227
228 -target | --target | --targe | --targ | --tar | --ta | --t)
229 ac_prev=target ;;
230 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
231 target="$ac_optarg" ;;
232
233 -v | -verbose | --verbose | --verbos | --verbo | --verb)
234 verbose=yes ;;
235
236 -version | --version | --versio | --versi | --vers)
b613bfbf 237 echo "configure generated by autoconf version 2.4"
5436fc65
C
238 exit 0 ;;
239
240 -with-* | --with-*)
241 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
242 # Reject names that are not valid shell variable names.
243 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
244 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
245 fi
246 ac_package=`echo $ac_package| sed 's/-/_/g'`
247 case "$ac_option" in
248 *=*) ;;
249 *) ac_optarg=yes ;;
250 esac
251 eval "with_${ac_package}='$ac_optarg'" ;;
252
253 -without-* | --without-*)
254 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
255 # Reject names that are not valid shell variable names.
256 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
257 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
258 fi
259 ac_package=`echo $ac_package| sed 's/-/_/g'`
260 eval "with_${ac_package}=no" ;;
261
262 --x)
263 # Obsolete; use --with-x.
264 with_x=yes ;;
265
266 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
267 | --x-incl | --x-inc | --x-in | --x-i)
268 ac_prev=x_includes ;;
269 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
270 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
271 x_includes="$ac_optarg" ;;
272
273 -x-libraries | --x-libraries | --x-librarie | --x-librari \
274 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
275 ac_prev=x_libraries ;;
276 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
277 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
278 x_libraries="$ac_optarg" ;;
279
280 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
281 ;;
282
b613bfbf 283 *)
5436fc65
C
284 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
285 echo "configure: warning: $ac_option: invalid host type" 1>&2
286 fi
287 if test "x$nonopt" != xNONE; then
288 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
289 fi
290 nonopt="$ac_option"
291 ;;
292
293 esac
294done
295
296if test -n "$ac_prev"; then
297 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
298fi
299
300trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
301
302# File descriptor usage:
303# 0 standard input
304# 1 file creation
305# 2 errors and warnings
306# 3 some systems may open it to /dev/tty
307# 4 used on the Kubota Titan
308# 6 checking for... messages and results
309# 5 compiler messages saved in config.log
310if test "$silent" = yes; then
311 exec 6>/dev/null
312else
313 exec 6>&1
314fi
315exec 5>./config.log
316
317echo "\
318This file contains any messages produced by compilers while
319running configure, to aid debugging if configure makes a mistake.
320" 1>&5
321
322# Strip out --no-create and --no-recursion so they do not pile up.
323# Also quote any args containing shell metacharacters.
324ac_configure_args=
325for ac_arg
326do
327 case "$ac_arg" in
328 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
329 | --no-cr | --no-c) ;;
330 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
331 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
332 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
333 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
334 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
335 esac
336done
337
338# NLS nuisances.
339# Only set LANG and LC_ALL to C if already set.
340# These must not be set unconditionally because not all systems understand
341# e.g. LANG=C (notably SCO).
342if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
343if test "${LANG+set}" = set; then LANG=C; export LANG; fi
344
345# confdefs.h avoids OS command line length limits that DEFS can exceed.
346rm -rf conftest* confdefs.h
347# AIX cpp loses on an empty file, so make sure it contains at least a newline.
348echo > confdefs.h
349
350# A filename unique to this package, relative to the directory that
351# configure is in, which we can look for to find out if srcdir is correct.
352ac_unique_file=main.c
353
354# Find the source files, if location was not specified.
355if test -z "$srcdir"; then
356 ac_srcdir_defaulted=yes
357 # Try the directory containing this script, then its parent.
358 ac_prog=$0
359 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
360 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
361 srcdir=$ac_confdir
362 if test ! -r $srcdir/$ac_unique_file; then
363 srcdir=..
364 fi
365else
366 ac_srcdir_defaulted=no
367fi
368if test ! -r $srcdir/$ac_unique_file; then
369 if test "$ac_srcdir_defaulted" = yes; then
370 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
371 else
372 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
373 fi
374fi
375srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
376
377# Prefer explicitly selected file to automatically selected ones.
378if test -z "$CONFIG_SITE"; then
379 if test "x$prefix" != xNONE; then
380 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
381 else
382 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
383 fi
384fi
385for ac_site_file in $CONFIG_SITE; do
386 if test -r "$ac_site_file"; then
387 echo "loading site script $ac_site_file"
388 . "$ac_site_file"
389 fi
390done
391
392if test -r "$cache_file"; then
393 echo "loading cache $cache_file"
394 . $cache_file
395else
396 echo "creating cache $cache_file"
397 > $cache_file
398fi
399
400ac_ext=c
401# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3dedc867 402ac_cpp='$CPP $CPPFLAGS'
b613bfbf
GN
403ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
404ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
5436fc65
C
405
406if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
407 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
408 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
409 ac_n= ac_c='
410' ac_t=' '
411 else
412 ac_n=-n ac_c= ac_t=
413 fi
414else
415 ac_n= ac_c='\c' ac_t=
416fi
417
418
419
db210d08 420
5436fc65
C
421# Extract the first word of "gcc", so it can be a program name with args.
422set dummy gcc; ac_word=$2
423echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
424if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
425 echo $ac_n "(cached) $ac_c" 1>&6
426else
427 if test -n "$CC"; then
428 ac_cv_prog_CC="$CC" # Let the user override the test.
429else
430 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 431 for ac_dir in $PATH; do
5436fc65
C
432 test -z "$ac_dir" && ac_dir=.
433 if test -f $ac_dir/$ac_word; then
434 ac_cv_prog_CC="gcc"
435 break
436 fi
437 done
438 IFS="$ac_save_ifs"
b613bfbf 439 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
5436fc65
C
440fi
441fi
442CC="$ac_cv_prog_CC"
443if test -n "$CC"; then
444 echo "$ac_t""$CC" 1>&6
445else
446 echo "$ac_t""no" 1>&6
447fi
448
449
450echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
451if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
452 echo $ac_n "(cached) $ac_c" 1>&6
453else
454 cat > conftest.c <<EOF
455#ifdef __GNUC__
456 yes;
457#endif
458EOF
b613bfbf 459if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
5436fc65
C
460 ac_cv_prog_gcc=yes
461else
462 ac_cv_prog_gcc=no
463fi
464fi
465echo "$ac_t""$ac_cv_prog_gcc" 1>&6
466if test $ac_cv_prog_gcc = yes; then
467 GCC=yes
468 if test "${CFLAGS+set}" != set; then
469 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
470if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
471 echo $ac_n "(cached) $ac_c" 1>&6
472else
473 echo 'void f(){}' > conftest.c
474if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
475 ac_cv_prog_gcc_g=yes
476else
477 ac_cv_prog_gcc_g=no
478fi
479rm -f conftest*
480
481fi
b613bfbf 482 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
483 if test $ac_cv_prog_gcc_g = yes; then
484 CFLAGS="-g -O"
485 else
486 CFLAGS="-O"
487 fi
488 fi
489else
490 GCC=
491 test "${CFLAGS+set}" = set || CFLAGS="-g"
492fi
493
494echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
495# On Suns, sometimes $CPP names a directory.
496if test -n "$CPP" && test -d "$CPP"; then
497 CPP=
498fi
499if test -z "$CPP"; then
500if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
501 echo $ac_n "(cached) $ac_c" 1>&6
502else
503 # This must be in double quotes, not single quotes, because CPP may get
504 # substituted into the Makefile and "${CC-cc}" will confuse make.
505 CPP="${CC-cc} -E"
506 # On the NeXT, cc -E runs the code through the compiler's parser,
507 # not just through cpp.
508 cat > conftest.$ac_ext <<EOF
b613bfbf 509#line 510 "configure"
5436fc65
C
510#include "confdefs.h"
511#include <assert.h>
512Syntax Error
513EOF
b613bfbf 514eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
515ac_err=`grep -v '^ *+' conftest.out`
516if test -z "$ac_err"; then
517 :
518else
519 echo "$ac_err" >&5
520 rm -rf conftest*
521 CPP="${CC-cc} -E -traditional-cpp"
522 cat > conftest.$ac_ext <<EOF
b613bfbf 523#line 524 "configure"
5436fc65
C
524#include "confdefs.h"
525#include <assert.h>
526Syntax Error
527EOF
b613bfbf 528eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
529ac_err=`grep -v '^ *+' conftest.out`
530if test -z "$ac_err"; then
531 :
532else
533 echo "$ac_err" >&5
534 rm -rf conftest*
535 CPP=/lib/cpp
536fi
537rm -f conftest*
538fi
539rm -f conftest*
540 ac_cv_prog_CPP="$CPP"
541fi
dedcc91d
SC
542 CPP="$ac_cv_prog_CPP"
543else
544 ac_cv_prog_CPP="$CPP"
5436fc65 545fi
5436fc65
C
546echo "$ac_t""$CPP" 1>&6
547
548echo $ac_n "checking for AIX""... $ac_c" 1>&6
549cat > conftest.$ac_ext <<EOF
b613bfbf 550#line 551 "configure"
5436fc65
C
551#include "confdefs.h"
552#ifdef _AIX
553 yes
554#endif
555
556EOF
557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
558 egrep "yes" >/dev/null 2>&1; then
559 rm -rf conftest*
560 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
561#define _ALL_SOURCE 1
562EOF
563
564else
565 rm -rf conftest*
566 echo "$ac_t""no" 1>&6
567fi
568rm -f conftest*
569
570
571ac_safe=`echo "minix/config.h" | tr './\055' '___'`
572echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
573if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
574 echo $ac_n "(cached) $ac_c" 1>&6
575else
576 cat > conftest.$ac_ext <<EOF
b613bfbf 577#line 578 "configure"
5436fc65
C
578#include "confdefs.h"
579#include <minix/config.h>
580EOF
b613bfbf 581eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
582ac_err=`grep -v '^ *+' conftest.out`
583if test -z "$ac_err"; then
584 rm -rf conftest*
585 eval "ac_cv_header_$ac_safe=yes"
586else
587 echo "$ac_err" >&5
588 rm -rf conftest*
589 eval "ac_cv_header_$ac_safe=no"
590fi
591rm -f conftest*
592fi
593if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
594 echo "$ac_t""yes" 1>&6
595 MINIX=yes
596else
597 echo "$ac_t""no" 1>&6
598MINIX=
599fi
600
601if test "$MINIX" = yes; then
602 cat >> confdefs.h <<\EOF
603#define _POSIX_SOURCE 1
604EOF
605
606 cat >> confdefs.h <<\EOF
607#define _POSIX_1_SOURCE 2
608EOF
609
610 cat >> confdefs.h <<\EOF
611#define _MINIX 1
612EOF
613
614fi
615
616echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
617if test -d /etc/conf/kconfig.d &&
618 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
619then
620 echo "$ac_t""yes" 1>&6
621 ISC=yes # If later tests want to check for ISC.
622 cat >> confdefs.h <<\EOF
623#define _POSIX_SOURCE 1
624EOF
625
626 if test "$GCC" = yes; then
627 CC="$CC -posix"
628 else
629 CC="$CC -Xp"
630 fi
631else
632 echo "$ac_t""no" 1>&6
633 ISC=
634fi
635
636
637ac_aux_dir=
638for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
639 if test -f $ac_dir/install-sh; then
640 ac_aux_dir=$ac_dir
641 ac_install_sh="$ac_aux_dir/install-sh -c"
642 break
643 elif test -f $ac_dir/install.sh; then
644 ac_aux_dir=$ac_dir
645 ac_install_sh="$ac_aux_dir/install.sh -c"
646 break
647 fi
648done
649if test -z "$ac_aux_dir"; then
650 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
651fi
652ac_config_guess=$ac_aux_dir/config.guess
653ac_config_sub=$ac_aux_dir/config.sub
654ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
655
656# Find a good install program. We prefer a C program (faster),
657# so one script is as good as another. But avoid the broken or
658# incompatible versions:
659# SysV /etc/install, /usr/sbin/install
660# SunOS /usr/etc/install
661# IRIX /sbin/install
662# AIX /bin/install
663# AFS /usr/afsws/bin/install, which mishandles nonexistent args
664# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
665# ./install, which can be erroneously created by make from ./install.sh.
666echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
667if test -z "$INSTALL"; then
668if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
669 echo $ac_n "(cached) $ac_c" 1>&6
670else
671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
672 for ac_dir in $PATH; do
673 # Account for people who put trailing slashes in PATH elements.
674 case "$ac_dir/" in
675 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
676 *)
677 # OSF1 and SCO ODT 3.0 have their own names for install.
678 for ac_prog in ginstall installbsd scoinst install; do
679 if test -f $ac_dir/$ac_prog; then
680 if test $ac_prog = install &&
681 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
682 # AIX install. It has an incompatible calling convention.
683 # OSF/1 installbsd also uses dspmsg, but is usable.
684 :
685 else
686 ac_cv_path_install="$ac_dir/$ac_prog -c"
687 break 2
688 fi
689 fi
690 done
691 ;;
692 esac
693 done
694 IFS="$ac_save_ifs"
b613bfbf
GN
695 # As a last resort, use the slow shell script.
696 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
5436fc65 697fi
b613bfbf 698 INSTALL="$ac_cv_path_install"
5436fc65
C
699fi
700echo "$ac_t""$INSTALL" 1>&6
701
702# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
703# It thinks the first close brace ends the variable substitution.
704test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
705
706test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
707
d8efbc66
FF
708
709# Make sure we can run config.sub.
710if $ac_config_sub sun4 >/dev/null 2>&1; then :
711else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
712fi
713
714echo $ac_n "checking host system type""... $ac_c" 1>&6
715
716host_alias=$host
717case "$host_alias" in
718NONE)
719 case $nonopt in
720 NONE)
721 if host_alias=`$ac_config_guess`; then :
722 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
723 fi ;;
724 *) host_alias=$nonopt ;;
725 esac ;;
726esac
727
728host=`$ac_config_sub $host_alias`
729host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
730host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
731host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
732echo "$ac_t""$host" 1>&6
733
734echo $ac_n "checking build system type""... $ac_c" 1>&6
735
736build_alias=$build
737case "$build_alias" in
738NONE)
739 case $nonopt in
740 NONE) build_alias=$host_alias ;;
741 *) build_alias=$nonopt ;;
742 esac ;;
743esac
744
745build=`$ac_config_sub $build_alias`
746build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
747build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
748build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
749echo "$ac_t""$build" 1>&6
750
751if test $host != $build; then
752 ac_tool_prefix=${host_alias}-
753else
754 ac_tool_prefix=
755fi
756
757# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
758set dummy ${ac_tool_prefix}ar; ac_word=$2
759echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
760if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
761 echo $ac_n "(cached) $ac_c" 1>&6
762else
763 if test -n "$AR"; then
764 ac_cv_prog_AR="$AR" # Let the user override the test.
765else
766 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
767 for ac_dir in $PATH; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_AR="${ac_tool_prefix}ar"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
775 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
776fi
777fi
778AR="$ac_cv_prog_AR"
779if test -n "$AR"; then
780 echo "$ac_t""$AR" 1>&6
781else
782 echo "$ac_t""no" 1>&6
783fi
784
785
786
787# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
788set dummy ${ac_tool_prefix}ranlib; ac_word=$2
789echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
790if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
791 echo $ac_n "(cached) $ac_c" 1>&6
792else
793 if test -n "$RANLIB"; then
794 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
795else
796 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
797 for ac_dir in $PATH; do
798 test -z "$ac_dir" && ac_dir=.
799 if test -f $ac_dir/$ac_word; then
800 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
801 break
802 fi
803 done
804 IFS="$ac_save_ifs"
805fi
806fi
807RANLIB="$ac_cv_prog_RANLIB"
808if test -n "$RANLIB"; then
809 echo "$ac_t""$RANLIB" 1>&6
810else
811 echo "$ac_t""no" 1>&6
812fi
813
814
815if test -z "$ac_cv_prog_RANLIB"; then
816if test -n "$ac_tool_prefix"; then
817 # Extract the first word of "ranlib", so it can be a program name with args.
5436fc65
C
818set dummy ranlib; ac_word=$2
819echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
820if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
821 echo $ac_n "(cached) $ac_c" 1>&6
822else
823 if test -n "$RANLIB"; then
824 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
825else
826 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 827 for ac_dir in $PATH; do
5436fc65
C
828 test -z "$ac_dir" && ac_dir=.
829 if test -f $ac_dir/$ac_word; then
830 ac_cv_prog_RANLIB="ranlib"
831 break
832 fi
833 done
834 IFS="$ac_save_ifs"
835 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
836fi
837fi
838RANLIB="$ac_cv_prog_RANLIB"
839if test -n "$RANLIB"; then
840 echo "$ac_t""$RANLIB" 1>&6
841else
842 echo "$ac_t""no" 1>&6
843fi
844
d8efbc66
FF
845else
846 RANLIB=":"
847fi
848fi
849
204c8825
FF
850for ac_prog in 'bison -y' byacc
851do
852# Extract the first word of "$ac_prog", so it can be a program name with args.
853set dummy $ac_prog; ac_word=$2
854echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
855if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
856 echo $ac_n "(cached) $ac_c" 1>&6
857else
858 if test -n "$YACC"; then
859 ac_cv_prog_YACC="$YACC" # Let the user override the test.
860else
861 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
862 for ac_dir in $PATH; do
863 test -z "$ac_dir" && ac_dir=.
864 if test -f $ac_dir/$ac_word; then
865 ac_cv_prog_YACC="$ac_prog"
866 break
867 fi
868 done
869 IFS="$ac_save_ifs"
870fi
871fi
872YACC="$ac_cv_prog_YACC"
873if test -n "$YACC"; then
874 echo "$ac_t""$YACC" 1>&6
875else
876 echo "$ac_t""no" 1>&6
877fi
878
879test -n "$YACC" && break
880done
881test -n "$YACC" || YACC="yacc"
882
d8efbc66
FF
883for ac_prog in mawk gawk nawk awk
884do
885# Extract the first word of "$ac_prog", so it can be a program name with args.
886set dummy $ac_prog; ac_word=$2
887echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
888if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
889 echo $ac_n "(cached) $ac_c" 1>&6
890else
891 if test -n "$AWK"; then
892 ac_cv_prog_AWK="$AWK" # Let the user override the test.
893else
894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
895 for ac_dir in $PATH; do
896 test -z "$ac_dir" && ac_dir=.
897 if test -f $ac_dir/$ac_word; then
898 ac_cv_prog_AWK="$ac_prog"
899 break
900 fi
901 done
902 IFS="$ac_save_ifs"
903fi
904fi
905AWK="$ac_cv_prog_AWK"
906if test -n "$AWK"; then
907 echo "$ac_t""$AWK" 1>&6
908else
909 echo "$ac_t""no" 1>&6
910fi
911
912test -n "$AWK" && break
913done
914
5436fc65
C
915
916ac_aux_dir=
917for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
918 if test -f $ac_dir/install-sh; then
919 ac_aux_dir=$ac_dir
920 ac_install_sh="$ac_aux_dir/install-sh -c"
921 break
922 elif test -f $ac_dir/install.sh; then
923 ac_aux_dir=$ac_dir
924 ac_install_sh="$ac_aux_dir/install.sh -c"
925 break
926 fi
927done
928if test -z "$ac_aux_dir"; then
929 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
930fi
931ac_config_guess=$ac_aux_dir/config.guess
932ac_config_sub=$ac_aux_dir/config.sub
933ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
934
935
936# Do some error checking and defaulting for the host and target type.
937# The inputs are:
938# configure --host=HOST --target=TARGET --build=BUILD NONOPT
939#
940# The rules are:
941# 1. You are not allowed to specify --host, --target, and nonopt at the
b613bfbf 942# same time.
5436fc65
C
943# 2. Host defaults to nonopt.
944# 3. If nonopt is not specified, then host defaults to the current host,
945# as determined by config.guess.
946# 4. Target and build default to nonopt.
947# 5. If nonopt is not specified, then target and build default to host.
948
949# The aliases save the names the user supplied, while $host etc.
950# will get canonicalized.
951case $host---$target---$nonopt in
952NONE---*---* | *---NONE---* | *---*---NONE) ;;
953*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
954esac
955
956
957# Make sure we can run config.sub.
958if $ac_config_sub sun4 >/dev/null 2>&1; then :
959else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
960fi
961
962echo $ac_n "checking host system type""... $ac_c" 1>&6
963
964host_alias=$host
965case "$host_alias" in
966NONE)
967 case $nonopt in
968 NONE)
969 if host_alias=`$ac_config_guess`; then :
970 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
971 fi ;;
972 *) host_alias=$nonopt ;;
973 esac ;;
974esac
975
976host=`$ac_config_sub $host_alias`
977host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
978host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
979host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
980echo "$ac_t""$host" 1>&6
981
982echo $ac_n "checking target system type""... $ac_c" 1>&6
983
984target_alias=$target
985case "$target_alias" in
986NONE)
987 case $nonopt in
988 NONE) target_alias=$host_alias ;;
989 *) target_alias=$nonopt ;;
990 esac ;;
991esac
992
993target=`$ac_config_sub $target_alias`
994target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
995target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
996target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
997echo "$ac_t""$target" 1>&6
998
999echo $ac_n "checking build system type""... $ac_c" 1>&6
1000
1001build_alias=$build
1002case "$build_alias" in
1003NONE)
1004 case $nonopt in
1005 NONE) build_alias=$host_alias ;;
1006 *) build_alias=$nonopt ;;
1007 esac ;;
1008esac
1009
1010build=`$ac_config_sub $build_alias`
1011build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1012build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1013build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1014echo "$ac_t""$build" 1>&6
1015
1016test "$host_alias" != "$target_alias" &&
1017 test "$program_prefix$program_suffix$program_transform_name" = \
1018 NONENONEs,x,x, &&
1019 program_prefix=${target_alias}-
1020
1021if test "$program_transform_name" = s,x,x,; then
1022 program_transform_name=
1023else
b613bfbf
GN
1024 # Double any \ or $.
1025 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
5436fc65
C
1026 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1027 rm -f conftestsed
1028fi
1029test "$program_prefix" != NONE &&
1030 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1031# Use a double $ so make ignores it.
1032test "$program_suffix" != NONE &&
1033 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1034
1035# sed with no file args requires a program.
1036test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1037
1038
2b576293
C
1039# If we cannot run a trivial program, we must be cross compiling.
1040echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1041if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1043else
1044 if test "$cross_compiling" = yes; then
1045 ac_cv_c_cross=yes
1046else
1047cat > conftest.$ac_ext <<EOF
b613bfbf 1048#line 1049 "configure"
2b576293
C
1049#include "confdefs.h"
1050main(){return(0);}
1051EOF
b613bfbf 1052eval $ac_link
2b576293
C
1053if test -s conftest && (./conftest; exit) 2>/dev/null; then
1054 ac_cv_c_cross=no
1055else
1056 ac_cv_c_cross=yes
1057fi
1058fi
1059rm -fr conftest*
1060fi
229b2c87 1061cross_compiling=$ac_cv_c_cross
b613bfbf 1062echo "$ac_t""$ac_cv_c_cross" 1>&6
2b576293
C
1063
1064echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1065if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1066 echo $ac_n "(cached) $ac_c" 1>&6
1067else
1068 cat > conftest.$ac_ext <<EOF
b613bfbf 1069#line 1070 "configure"
2b576293
C
1070#include "confdefs.h"
1071#include <stdlib.h>
1072#include <stdarg.h>
1073#include <string.h>
1074#include <float.h>
1075EOF
b613bfbf 1076eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2b576293
C
1077ac_err=`grep -v '^ *+' conftest.out`
1078if test -z "$ac_err"; then
1079 rm -rf conftest*
1080 ac_cv_header_stdc=yes
1081else
1082 echo "$ac_err" >&5
1083 rm -rf conftest*
1084 ac_cv_header_stdc=no
1085fi
1086rm -f conftest*
1087
1088if test $ac_cv_header_stdc = yes; then
1089 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1090cat > conftest.$ac_ext <<EOF
b613bfbf 1091#line 1092 "configure"
2b576293
C
1092#include "confdefs.h"
1093#include <string.h>
1094EOF
1095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1096 egrep "memchr" >/dev/null 2>&1; then
1097 :
1098else
1099 rm -rf conftest*
1100 ac_cv_header_stdc=no
1101fi
1102rm -f conftest*
1103
1104fi
1105
1106if test $ac_cv_header_stdc = yes; then
1107 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1108cat > conftest.$ac_ext <<EOF
b613bfbf 1109#line 1110 "configure"
2b576293
C
1110#include "confdefs.h"
1111#include <stdlib.h>
1112EOF
1113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1114 egrep "free" >/dev/null 2>&1; then
1115 :
1116else
1117 rm -rf conftest*
1118 ac_cv_header_stdc=no
1119fi
1120rm -f conftest*
1121
1122fi
1123
1124if test $ac_cv_header_stdc = yes; then
1125 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1126if test "$cross_compiling" = yes; then
b613bfbf 1127 ac_cv_header_stdc=no
2b576293
C
1128else
1129cat > conftest.$ac_ext <<EOF
b613bfbf 1130#line 1131 "configure"
2b576293
C
1131#include "confdefs.h"
1132#include <ctype.h>
1133#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1134#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1135#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1136int main () { int i; for (i = 0; i < 256; i++)
1137if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1138exit (0); }
1139
1140EOF
b613bfbf 1141eval $ac_link
2b576293
C
1142if test -s conftest && (./conftest; exit) 2>/dev/null; then
1143 :
1144else
1145 ac_cv_header_stdc=no
1146fi
1147fi
1148rm -fr conftest*
1149fi
1150fi
1151echo "$ac_t""$ac_cv_header_stdc" 1>&6
1152if test $ac_cv_header_stdc = yes; then
1153 cat >> confdefs.h <<\EOF
1154#define STDC_HEADERS 1
1155EOF
1156
1157fi
1158
d8efbc66 1159for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h endian.h
1a494973
C
1160do
1161ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1162echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1163if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165else
1166 cat > conftest.$ac_ext <<EOF
b613bfbf 1167#line 1168 "configure"
1a494973
C
1168#include "confdefs.h"
1169#include <$ac_hdr>
1170EOF
b613bfbf 1171eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1a494973
C
1172ac_err=`grep -v '^ *+' conftest.out`
1173if test -z "$ac_err"; then
1174 rm -rf conftest*
1175 eval "ac_cv_header_$ac_safe=yes"
1176else
1177 echo "$ac_err" >&5
1178 rm -rf conftest*
1179 eval "ac_cv_header_$ac_safe=no"
1180fi
1181rm -f conftest*
1182fi
1183if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1184 echo "$ac_t""yes" 1>&6
b613bfbf 1185 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1a494973
C
1186 cat >> confdefs.h <<EOF
1187#define $ac_tr_hdr 1
1188EOF
1189
1190else
1191 echo "$ac_t""no" 1>&6
1192fi
1193done
1194
2b576293
C
1195echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1196if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199 cat > conftest.$ac_ext <<EOF
b613bfbf 1200#line 1201 "configure"
2b576293
C
1201#include "confdefs.h"
1202#include <sys/types.h>
1203#include <sys/stat.h>
1204
1205#if defined(S_ISBLK) && defined(S_IFDIR)
1206# if S_ISBLK (S_IFDIR)
1207You lose.
1208# endif
1209#endif
1210
1211#if defined(S_ISBLK) && defined(S_IFCHR)
1212# if S_ISBLK (S_IFCHR)
1213You lose.
1214# endif
1215#endif
1216
1217#if defined(S_ISLNK) && defined(S_IFREG)
1218# if S_ISLNK (S_IFREG)
1219You lose.
1220# endif
1221#endif
1222
1223#if defined(S_ISSOCK) && defined(S_IFREG)
1224# if S_ISSOCK (S_IFREG)
1225You lose.
1226# endif
1227#endif
1228
1229EOF
1230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1231 egrep "You lose" >/dev/null 2>&1; then
1232 rm -rf conftest*
1233 ac_cv_header_stat_broken=yes
1234else
1235 rm -rf conftest*
1236 ac_cv_header_stat_broken=no
1237fi
1238rm -f conftest*
1239
1240fi
1241echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1242if test $ac_cv_header_stat_broken = yes; then
1243 cat >> confdefs.h <<\EOF
1244#define STAT_MACROS_BROKEN 1
1245EOF
1246
1247fi
1248
1249
38d715a4 1250for ac_func in setpgid sbrk
72ae15f6
FF
1251do
1252echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1253if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1254 echo $ac_n "(cached) $ac_c" 1>&6
1255else
1256 cat > conftest.$ac_ext <<EOF
b613bfbf 1257#line 1258 "configure"
72ae15f6
FF
1258#include "confdefs.h"
1259/* System header to define __stub macros and hopefully few prototypes,
1260 which can conflict with char $ac_func(); below. */
1261#include <assert.h>
1262/* Override any gcc2 internal prototype to avoid an error. */
b613bfbf 1263char $ac_func();
72ae15f6
FF
1264
1265int main() { return 0; }
1266int t() {
1267
1268/* The GNU C library defines this for functions which it implements
1269 to always fail with ENOSYS. Some functions are actually named
1270 something starting with __ and the normal name is an alias. */
1271#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1272choke me
1273#else
1274$ac_func();
1275#endif
1276
1277; return 0; }
1278EOF
b613bfbf 1279if eval $ac_link; then
72ae15f6
FF
1280 rm -rf conftest*
1281 eval "ac_cv_func_$ac_func=yes"
1282else
1283 rm -rf conftest*
1284 eval "ac_cv_func_$ac_func=no"
1285fi
1286rm -f conftest*
1287
1288fi
1289if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1290 echo "$ac_t""yes" 1>&6
b613bfbf 1291 ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
72ae15f6
FF
1292 cat >> confdefs.h <<EOF
1293#define $ac_tr_func 1
1294EOF
1295
1296else
1297 echo "$ac_t""no" 1>&6
1298fi
1299done
1300
1301
4708ac65 1302echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
07b77f5c 1303if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
4708ac65
FF
1304 echo $ac_n "(cached) $ac_c" 1>&6
1305else
1306 cat > conftest.$ac_ext <<EOF
b613bfbf 1307#line 1308 "configure"
4708ac65
FF
1308#include "confdefs.h"
1309#include <sys/procfs.h>
1310int main() { return 0; }
1311int t() {
1312gregset_t *gregsetp = 0
1313; return 0; }
1314EOF
b613bfbf 1315if eval $ac_link; then
4708ac65 1316 rm -rf conftest*
07b77f5c 1317 gdb_cv_have_gregset_t=yes
4708ac65
FF
1318else
1319 rm -rf conftest*
07b77f5c 1320 gdb_cv_have_gregset_t=no
4708ac65
FF
1321fi
1322rm -f conftest*
1323
1324fi
1325
07b77f5c
FF
1326echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
1327if test $gdb_cv_have_gregset_t = yes; then
4708ac65
FF
1328 cat >> confdefs.h <<\EOF
1329#define HAVE_GREGSET_T 1
1330EOF
1331
1332fi
1333
1334echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
07b77f5c 1335if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
4708ac65
FF
1336 echo $ac_n "(cached) $ac_c" 1>&6
1337else
1338 cat > conftest.$ac_ext <<EOF
b613bfbf 1339#line 1340 "configure"
4708ac65
FF
1340#include "confdefs.h"
1341#include <sys/procfs.h>
1342int main() { return 0; }
1343int t() {
1344fpregset_t *fpregsetp = 0
1345; return 0; }
1346EOF
b613bfbf 1347if eval $ac_link; then
4708ac65 1348 rm -rf conftest*
07b77f5c 1349 gdb_cv_have_fpregset_t=yes
4708ac65
FF
1350else
1351 rm -rf conftest*
07b77f5c 1352 gdb_cv_have_fpregset_t=no
4708ac65
FF
1353fi
1354rm -f conftest*
1355
1356fi
1357
07b77f5c
FF
1358echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
1359if test $gdb_cv_have_fpregset_t = yes; then
4708ac65
FF
1360 cat >> confdefs.h <<\EOF
1361#define HAVE_FPREGSET_T 1
1362EOF
1363
1364fi
1365
aa220473 1366
07b77f5c 1367echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
aa220473
SG
1368if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
1369 echo $ac_n "(cached) $ac_c" 1>&6
1370else
1371 cat > conftest.$ac_ext <<EOF
b613bfbf 1372#line 1373 "configure"
aa220473
SG
1373#include "confdefs.h"
1374
1375int main() { return 0; }
1376int t() {
1377long double foo;
1378; return 0; }
1379EOF
b613bfbf 1380if eval $ac_compile; then
aa220473
SG
1381 rm -rf conftest*
1382 ac_cv_c_long_double=yes
1383else
1384 rm -rf conftest*
1385 ac_cv_c_long_double=no
1386fi
1387rm -f conftest*
1388
1389fi
1390
1391echo "$ac_t""$ac_cv_c_long_double" 1>&6
1392if test $ac_cv_c_long_double = yes; then
1393 cat >> confdefs.h <<\EOF
1394#define HAVE_LONG_DOUBLE 1
1395EOF
1396
1397fi
1398
07b77f5c
FF
1399
1400echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
1401if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
1402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 if test "$cross_compiling" = yes; then
1405 gdb_cv_printf_has_long_double=no
1406else
1407cat > conftest.$ac_ext <<EOF
b613bfbf 1408#line 1409 "configure"
07b77f5c
FF
1409#include "confdefs.h"
1410
1411int main () {
1412 char buf[16];
1413 long double f = 3.141592653;
1414 sprintf (buf, "%Lg", f);
1415 return (strncmp ("3.14159", buf, 7));
1416}
1417EOF
b613bfbf 1418eval $ac_link
07b77f5c
FF
1419if test -s conftest && (./conftest; exit) 2>/dev/null; then
1420 gdb_cv_printf_has_long_double=yes
1421else
1422 gdb_cv_printf_has_long_double=no
1423fi
1424fi
1425rm -fr conftest*
1426fi
1427
1428if test $gdb_cv_printf_has_long_double = yes; then
1429 cat >> confdefs.h <<\EOF
1430#define PRINTF_HAS_LONG_DOUBLE 1
1431EOF
1432
1433fi
1434echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
1435
2b576293
C
1436echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1437if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1438 echo $ac_n "(cached) $ac_c" 1>&6
1439else
1440 if test "$cross_compiling" = yes; then
1441 ac_cv_func_mmap=no
1442else
1443cat > conftest.$ac_ext <<EOF
b613bfbf 1444#line 1445 "configure"
2b576293
C
1445#include "confdefs.h"
1446
1447/* Thanks to Mike Haertel and Jim Avera for this test. */
1448#include <sys/types.h>
1449#include <fcntl.h>
1450#include <sys/mman.h>
1451
b613bfbf
GN
1452#ifdef BSD
1453# ifndef BSD4_1
1454# define HAVE_GETPAGESIZE
1455# endif
1456#endif
1457
2b576293
C
1458#ifndef HAVE_GETPAGESIZE
1459# include <sys/param.h>
1460# ifdef EXEC_PAGESIZE
1461# define getpagesize() EXEC_PAGESIZE
1462# else
1463# ifdef NBPG
1464# define getpagesize() NBPG * CLSIZE
1465# ifndef CLSIZE
1466# define CLSIZE 1
1467# endif
1468# else
1469# ifdef NBPC
1470# define getpagesize() NBPC
1471# else
1472# define getpagesize() PAGESIZE /* SVR4 */
1473# endif
1474# endif
1475# endif
1476#endif
1477
b613bfbf 1478#ifdef __osf__
2b576293
C
1479# define valloc malloc
1480#endif
1481
1482#ifdef __cplusplus
1483extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1484#else
1485char *valloc(), *malloc();
1486#endif
1487
1488int
1489main()
1490{
1491 char *buf1, *buf2, *buf3;
1492 int i = getpagesize(), j;
b613bfbf 1493 int i2 = getpagesize()*2;
2b576293
C
1494 int fd;
1495
1496 buf1 = (char *)valloc(i2);
1497 buf2 = (char *)valloc(i);
1498 buf3 = (char *)malloc(i2);
1499 for (j = 0; j < i2; ++j)
1500 *(buf1 + j) = rand();
1501 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1502 write(fd, buf1, i2);
1503 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1504 for (j = 0; j < i; ++j)
1505 if (*(buf1 + j) != *(buf2 + j))
1506 exit(1);
1507 lseek(fd, (long)i, 0);
1508 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1509 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1510 lseek(fd, (long)0, 0);
1511 read(fd, buf3, i2);
1512 for (j = 0; j < i2; ++j)
1513 if (*(buf1 + j) != *(buf3 + j))
1514 exit(1);
1515 exit(0);
1516}
1517
1518EOF
b613bfbf 1519eval $ac_link
2b576293
C
1520if test -s conftest && (./conftest; exit) 2>/dev/null; then
1521 ac_cv_func_mmap=yes
1522else
1523 ac_cv_func_mmap=no
1524fi
1525fi
1526rm -fr conftest*
1527fi
1528echo "$ac_t""$ac_cv_func_mmap" 1>&6
1529if test $ac_cv_func_mmap = yes; then
1530 cat >> confdefs.h <<\EOF
1531#define HAVE_MMAP 1
1532EOF
1533
1534fi
1535
5436fc65 1536
47ef0da5 1537
4915acad
SG
1538if test ${host} = ${target} ; then
1539 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
1540 if test -f /usr/lib/libthread_db.so.1 ; then
1541 echo "$ac_t""yes" 1>&6
1542 THREAD_DB_OBS=sol-thread.o
1543 cat >> confdefs.h <<\EOF
47ef0da5
SG
1544#define HAVE_THREAD_DB_LIB 1
1545EOF
1546
4915acad
SG
1547 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
1548 else
1549 echo "$ac_t""no" 1>&6
1550 fi
1551
1552
47ef0da5
SG
1553fi
1554
5436fc65
C
1555ENABLE_CFLAGS=
1556ENABLE_CLIBS=
1557ENABLE_OBS=
1558
1559# Check whether --enable-netrom or --disable-netrom was given.
b613bfbf
GN
1560enableval="$enable_netrom"
1561if test -n "$enableval"; then
5436fc65
C
1562 case "${enableval}" in
1563yes) enable_netrom=yes ;;
1564no) enable_netrom=no ;;
1565*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1566esac
1567fi
1568
1569
1570if test "${enable_netrom}" = "yes"; then
1571 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1572fi
1573
188c635f
SG
1574# start-sanitize-gm
1575ENABLE_GM=
1576
1577# Check whether --enable-gm or --disable-gm was given.
b613bfbf
GN
1578enableval="$enable_gm"
1579if test -n "$enableval"; then
188c635f 1580 case "${enableval}" in
1a57cd09 1581yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
1582 ENABLE_CFLAGS=-DGENERAL_MAGIC
1583 ;;
1584no) ;;
1585*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1586esac
1587fi
1588
1589
1590# end-sanitize-gm
1591
3c0bf315 1592# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
b613bfbf
GN
1593enableval="$enable_sim_powerpc"
1594if test -n "$enableval"; then
3c0bf315
MM
1595 case "${enableval}" in
1596yes) powerpc_sim=yes ;;
1597no) powerpc_sim=no ;;
1598*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1599esac
1600else
1601 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1602fi
1603
1604
5436fc65
C
1605# start-sanitize-gdbtk
1606ENABLE_GDBTK=
1607
1608# Check whether --enable-gdbtk or --disable-gdbtk was given.
b613bfbf
GN
1609enableval="$enable_gdbtk"
1610if test -n "$enableval"; then
5436fc65 1611 case "${enableval}" in
0fe1522a
SG
1612 yes)
1613 case "$host" in
1614 *go32*)
1615 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1616 enable_gdbtk=no ;;
b613bfbf
GN
1617 *cygwin32*)
1618 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1619 enable_gdbtk=no ;;
0fe1522a
SG
1620 *)
1621 enable_gdbtk=yes ;;
1622 esac ;;
1623 no)
1624 enable_gdbtk=no ;;
1625 *)
1626 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 1627esac
0fe1522a
SG
1628else
1629
b613bfbf 1630# Default is on for everything but go32 and cygwin32
0fe1522a
SG
1631case "$host" in
1632 *go32*)
1633 ;;
b613bfbf
GN
1634 *cygwin32*)
1635 ;;
0fe1522a
SG
1636 *)
1637 enable_gdbtk=yes ;;
1638 esac
1639
5436fc65
C
1640fi
1641
1642
1643if test "${enable_gdbtk}" = "yes"; then
0fe1522a 1644
a2b63bbd 1645 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1646# paths, otherwise set no_x=yes.
1647# Uses ac_ vars as temps to allow command line to override cache and checks.
1648# --without-x overrides everything else, but does not touch the cache.
1649echo $ac_n "checking for X""... $ac_c" 1>&6
1650
1651# Check whether --with-x or --without-x was given.
b613bfbf
GN
1652withval="$with_x"
1653if test -n "$withval"; then
5436fc65
C
1654 :
1655fi
1656
1657if test "x$with_x" = xno; then
b613bfbf 1658 no_x=yes
5436fc65
C
1659else
1660 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
b613bfbf 1661 no_x=
5436fc65 1662 else
b613bfbf 1663if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
5436fc65
C
1664 echo $ac_n "(cached) $ac_c" 1>&6
1665else
1666 # One or both of the vars are not set, and there is no cached value.
b613bfbf 1667no_x=yes
5436fc65
C
1668rm -fr conftestdir
1669if mkdir conftestdir; then
1670 cd conftestdir
1671 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1672 cat > Imakefile <<'EOF'
1673acfindx:
1674 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1675EOF
1676 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
b613bfbf 1677 no_x=
5436fc65 1678 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
b613bfbf 1679 eval `make acfindx 2>/dev/null | grep -v make`
5436fc65 1680 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1681 for ac_extension in a so sl; do
1682 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1683 test -f $ac_im_libdir/libX11.$ac_extension; then
1684 ac_im_usrlibdir=$ac_im_libdir; break
1685 fi
1686 done
5436fc65
C
1687 # Screen out bogus values from the imake configuration.
1688 case "$ac_im_incroot" in
1689 /usr/include) ;;
1690 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1691 esac
1692 case "$ac_im_usrlibdir" in
1693 /usr/lib | /lib) ;;
1694 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1695 esac
1696 fi
1697 cd ..
1698 rm -fr conftestdir
1699fi
1700
b613bfbf
GN
1701if test "$no_x" = yes; then
1702test -z "$x_direct_test_library" && x_direct_test_library=Xt
1703test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1704test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5436fc65 1705cat > conftest.$ac_ext <<EOF
b613bfbf 1706#line 1707 "configure"
5436fc65
C
1707#include "confdefs.h"
1708#include <$x_direct_test_include>
1709EOF
b613bfbf 1710eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
1711ac_err=`grep -v '^ *+' conftest.out`
1712if test -z "$ac_err"; then
1713 rm -rf conftest*
b613bfbf 1714 no_x= ac_x_includes=
5436fc65
C
1715else
1716 echo "$ac_err" >&5
1717 rm -rf conftest*
b613bfbf 1718 for ac_dir in \
5436fc65
C
1719 /usr/X11R6/include \
1720 /usr/X11R5/include \
1721 /usr/X11R4/include \
1722 \
1723 /usr/include/X11R6 \
1724 /usr/include/X11R5 \
1725 /usr/include/X11R4 \
1726 \
1727 /usr/local/X11R6/include \
1728 /usr/local/X11R5/include \
1729 /usr/local/X11R4/include \
1730 \
1731 /usr/local/include/X11R6 \
1732 /usr/local/include/X11R5 \
1733 /usr/local/include/X11R4 \
1734 \
1735 /usr/X11/include \
1736 /usr/include/X11 \
1737 /usr/local/X11/include \
1738 /usr/local/include/X11 \
1739 \
1740 /usr/X386/include \
1741 /usr/x386/include \
1742 /usr/XFree86/include/X11 \
1743 \
1744 /usr/include \
1745 /usr/local/include \
1746 /usr/unsupported/include \
1747 /usr/athena/include \
1748 /usr/local/x11r5/include \
1749 /usr/lpp/Xamples/include \
1750 \
1751 /usr/openwin/include \
1752 /usr/openwin/share/include \
1753 ; \
1754 do
1755 if test -r "$ac_dir/$x_direct_test_include"; then
b613bfbf 1756 no_x= ac_x_includes=$ac_dir
5436fc65
C
1757 break
1758 fi
1759 done
1760fi
1761rm -f conftest*
3dedc867 1762
b613bfbf
GN
1763# Check for the libraries.
1764# See if we find them without any special options.
1765# Don't add to $LIBS permanently.
1766ac_save_LIBS="$LIBS"
1767LIBS="-l$x_direct_test_library $LIBS"
5436fc65 1768cat > conftest.$ac_ext <<EOF
b613bfbf 1769#line 1770 "configure"
5436fc65
C
1770#include "confdefs.h"
1771
1772int main() { return 0; }
1773int t() {
1774${x_direct_test_function}()
1775; return 0; }
1776EOF
b613bfbf 1777if eval $ac_link; then
5436fc65 1778 rm -rf conftest*
b613bfbf 1779 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
5436fc65
C
1780else
1781 rm -rf conftest*
1782 LIBS="$ac_save_LIBS"
1783# First see if replacing the include by lib works.
1784for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1785 /usr/X11R6/lib \
1786 /usr/X11R5/lib \
1787 /usr/X11R4/lib \
1788 \
1789 /usr/lib/X11R6 \
1790 /usr/lib/X11R5 \
1791 /usr/lib/X11R4 \
1792 \
1793 /usr/local/X11R6/lib \
1794 /usr/local/X11R5/lib \
1795 /usr/local/X11R4/lib \
1796 \
1797 /usr/local/lib/X11R6 \
1798 /usr/local/lib/X11R5 \
1799 /usr/local/lib/X11R4 \
1800 \
1801 /usr/X11/lib \
1802 /usr/lib/X11 \
1803 /usr/local/X11/lib \
1804 /usr/local/lib/X11 \
1805 \
1806 /usr/X386/lib \
1807 /usr/x386/lib \
1808 /usr/XFree86/lib/X11 \
1809 \
1810 /usr/lib \
1811 /usr/local/lib \
1812 /usr/unsupported/lib \
1813 /usr/athena/lib \
1814 /usr/local/x11r5/lib \
1815 /usr/lpp/Xamples/lib \
1816 \
1817 /usr/openwin/lib \
1818 /usr/openwin/share/lib \
1819 ; \
1820do
1821 for ac_extension in a so sl; do
1822 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
b613bfbf 1823 no_x= ac_x_libraries=$ac_dir
5436fc65
C
1824 break 2
1825 fi
1826 done
1827done
1828fi
1829rm -f conftest*
1830
b613bfbf
GN
1831fi
1832if test "$no_x" = yes; then
1833 ac_cv_path_x="no_x=yes"
5436fc65 1834else
b613bfbf 1835 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5436fc65
C
1836fi
1837fi
1838 fi
b613bfbf 1839 eval "$ac_cv_path_x"
5436fc65
C
1840fi # $with_x != no
1841
b613bfbf
GN
1842if test "$no_x" = yes; then
1843 echo "$ac_t""no" 1>&6
5436fc65
C
1844else
1845 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1846 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
b613bfbf 1847 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5436fc65
C
1848 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1849fi
1850
b613bfbf 1851 if test "$no_x" = yes; then
5436fc65
C
1852 # Not all programs may use this symbol, but it does not hurt to define it.
1853 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1854else
1855 if test -n "$x_includes"; then
1856 X_CFLAGS="$X_CFLAGS -I$x_includes"
1857 fi
1858
1859 # It would be nice to have a more robust check for the -R ld option than
1860 # just checking for Solaris.
1861 # It would also be nice to do this for all -L options, not just this one.
1862 if test -n "$x_libraries"; then
1863 X_LIBS="$X_LIBS -L$x_libraries"
1864 if test "`(uname) 2>/dev/null`" = SunOS &&
1865 uname -r | grep '^5' >/dev/null; then
b613bfbf 1866 X_LIBS="$X_LIBS -R$x_libraries"
5436fc65
C
1867 fi
1868 fi
1869
1870 # Check for libraries that X11R6 Xt/Xaw programs need.
1871
1872 ac_save_LDFLAGS="$LDFLAGS"
1873 LDFLAGS="$LDFLAGS -L$x_libraries"
1874 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1875 # check for ICE first), but we must link in the order -lSM -lICE or
1876 # we get undefined symbols. So assume we have SM if we have ICE.
1877 # These have to be linked with before -lX11, unlike the other
1878 # libraries we check for below, so use a different variable.
1879 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1880 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
b613bfbf 1881if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
5436fc65
C
1882 echo $ac_n "(cached) $ac_c" 1>&6
1883else
1884 ac_save_LIBS="$LIBS"
1885LIBS="-lICE $LIBS"
1886cat > conftest.$ac_ext <<EOF
b613bfbf 1887#line 1888 "configure"
5436fc65
C
1888#include "confdefs.h"
1889
1890int main() { return 0; }
1891int t() {
1892IceConnectionNumber()
1893; return 0; }
1894EOF
b613bfbf 1895if eval $ac_link; then
5436fc65 1896 rm -rf conftest*
b613bfbf 1897 eval "ac_cv_lib_ICE=yes"
5436fc65
C
1898else
1899 rm -rf conftest*
b613bfbf 1900 eval "ac_cv_lib_ICE=no"
5436fc65
C
1901fi
1902rm -f conftest*
1903LIBS="$ac_save_LIBS"
1904
1905fi
b613bfbf 1906if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
5436fc65
C
1907 echo "$ac_t""yes" 1>&6
1908 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1909else
1910 echo "$ac_t""no" 1>&6
1911fi
1912
1913 LDFLAGS="$ac_save_LDFLAGS"
1914
1915 # Check for system-dependent libraries X programs must link with.
1916
1917 if test "$ISC" = yes; then
1918 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1919 else
1920 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1921 # libraries were built with DECnet support. And karl@cs.umb.edu says
1922 # the Alpha needs dnet_stub (dnet does not exist).
1923 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
b613bfbf 1924if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
5436fc65
C
1925 echo $ac_n "(cached) $ac_c" 1>&6
1926else
1927 ac_save_LIBS="$LIBS"
1928LIBS="-ldnet $LIBS"
1929cat > conftest.$ac_ext <<EOF
b613bfbf 1930#line 1931 "configure"
5436fc65
C
1931#include "confdefs.h"
1932
1933int main() { return 0; }
1934int t() {
1935dnet_ntoa()
1936; return 0; }
1937EOF
b613bfbf 1938if eval $ac_link; then
5436fc65 1939 rm -rf conftest*
b613bfbf 1940 eval "ac_cv_lib_dnet=yes"
5436fc65
C
1941else
1942 rm -rf conftest*
b613bfbf 1943 eval "ac_cv_lib_dnet=no"
5436fc65
C
1944fi
1945rm -f conftest*
1946LIBS="$ac_save_LIBS"
1947
1948fi
b613bfbf 1949if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
5436fc65
C
1950 echo "$ac_t""yes" 1>&6
1951 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1952else
1953 echo "$ac_t""no" 1>&6
1954fi
1955
b613bfbf 1956 if test $ac_cv_lib_dnet = no; then
5436fc65 1957 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
b613bfbf 1958if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
5436fc65
C
1959 echo $ac_n "(cached) $ac_c" 1>&6
1960else
1961 ac_save_LIBS="$LIBS"
1962LIBS="-ldnet_stub $LIBS"
1963cat > conftest.$ac_ext <<EOF
b613bfbf 1964#line 1965 "configure"
5436fc65
C
1965#include "confdefs.h"
1966
1967int main() { return 0; }
1968int t() {
1969dnet_ntoa()
1970; return 0; }
1971EOF
b613bfbf 1972if eval $ac_link; then
5436fc65 1973 rm -rf conftest*
b613bfbf 1974 eval "ac_cv_lib_dnet_stub=yes"
5436fc65
C
1975else
1976 rm -rf conftest*
b613bfbf 1977 eval "ac_cv_lib_dnet_stub=no"
5436fc65
C
1978fi
1979rm -f conftest*
1980LIBS="$ac_save_LIBS"
1981
1982fi
b613bfbf 1983if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
5436fc65
C
1984 echo "$ac_t""yes" 1>&6
1985 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1986else
1987 echo "$ac_t""no" 1>&6
1988fi
1989
1990 fi
1991
1992 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1993 # to get the SysV transport functions.
1994 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1995 # check for it.
1996 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
b613bfbf 1997if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
5436fc65
C
1998 echo $ac_n "(cached) $ac_c" 1>&6
1999else
2000 ac_save_LIBS="$LIBS"
2001LIBS="-lnsl $LIBS"
2002cat > conftest.$ac_ext <<EOF
b613bfbf 2003#line 2004 "configure"
5436fc65
C
2004#include "confdefs.h"
2005
2006int main() { return 0; }
2007int t() {
2008t_accept()
2009; return 0; }
2010EOF
b613bfbf 2011if eval $ac_link; then
5436fc65 2012 rm -rf conftest*
b613bfbf 2013 eval "ac_cv_lib_nsl=yes"
5436fc65
C
2014else
2015 rm -rf conftest*
b613bfbf 2016 eval "ac_cv_lib_nsl=no"
5436fc65
C
2017fi
2018rm -f conftest*
2019LIBS="$ac_save_LIBS"
2020
2021fi
b613bfbf 2022if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
5436fc65
C
2023 echo "$ac_t""yes" 1>&6
2024 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2025else
2026 echo "$ac_t""no" 1>&6
2027fi
2028
2029
2030 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2031 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
2032 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
2033 if test "`(uname) 2>/dev/null`" != IRIX; then
2034 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
b613bfbf 2035if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
5436fc65
C
2036 echo $ac_n "(cached) $ac_c" 1>&6
2037else
2038 ac_save_LIBS="$LIBS"
2039LIBS="-lsocket $LIBS"
2040cat > conftest.$ac_ext <<EOF
b613bfbf 2041#line 2042 "configure"
5436fc65
C
2042#include "confdefs.h"
2043
2044int main() { return 0; }
2045int t() {
2046socket()
2047; return 0; }
2048EOF
b613bfbf 2049if eval $ac_link; then
5436fc65 2050 rm -rf conftest*
b613bfbf 2051 eval "ac_cv_lib_socket=yes"
5436fc65
C
2052else
2053 rm -rf conftest*
b613bfbf 2054 eval "ac_cv_lib_socket=no"
5436fc65
C
2055fi
2056rm -f conftest*
2057LIBS="$ac_save_LIBS"
2058
2059fi
b613bfbf 2060if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
5436fc65
C
2061 echo "$ac_t""yes" 1>&6
2062 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
2063else
2064 echo "$ac_t""no" 1>&6
2065fi
2066
2067 fi
2068 fi
2069fi
2070
2071
a2b63bbd 2072
4e327047 2073
5436fc65 2074#
4e327047
TT
2075# Ok, lets find the tcl source trees so we can use the headers
2076# Warning: transition of version 9 to 10 will break this algorithm
2077# because 10 sorts before 9. We also look for just tcl. We have to
2078# be careful that we don't match stuff like tclX by accident.
2079# the alternative search directory is involked by --with-tclinclude
5436fc65 2080#
4e327047
TT
2081no_tcl=true
2082echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
2083# Check whether --with-tclinclude or --without-tclinclude was given.
b613bfbf
GN
2084withval="$with_tclinclude"
2085if test -n "$withval"; then
4e327047
TT
2086 with_tclinclude=${withval}
2087fi
2088
2089if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2090 echo $ac_n "(cached) $ac_c" 1>&6
2091else
2092
2093# first check to see if --with-tclinclude was specified
2094if test x"${with_tclinclude}" != x ; then
2095 if test -f ${with_tclinclude}/tclInt.h ; then
2096 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5436fc65 2097 else
4e327047
TT
2098 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2099 fi
2100fi
2101# next check in private source directory
2102#
2103# since ls returns lowest version numbers first, reverse its output
2104if test x"${ac_cv_c_tclh}" = x ; then
2105 for i in \
2106 ${srcdir}/../tcl \
2107 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` \
2108 ${srcdir}/../../tcl \
2109 `ls -dr ${srcdir}/../../tcl[0-9]* 2>/dev/null` \
2110 ${srcdir}/../../../tcl \
2111 `ls -dr ${srcdir}/../../../tcl[0-9]* 2>/dev/null ` ; do
2112 if test -f $i/tclInt.h ; then
2113 ac_cv_c_tclh=`(cd $i; pwd)`
2114 break
2115 fi
2116 # Tcl 7.5 and greater puts headers in subdirectory.
2117 if test -f $i/generic/tclInt.h ; then
b613bfbf 2118 ac_cv_c_tclh=`(cd $i; pwd)`/generic
4e327047
TT
2119 fi
2120 done
2121fi
2122# finally check in a few common install locations
2123#
2124# since ls returns lowest version numbers first, reverse its output
2125if test x"${ac_cv_c_tclh}" = x ; then
2126 for i in \
2127 `ls -dr /usr/local/src/tcl[0-9]* 2>/dev/null` \
2128 `ls -dr /usr/local/lib/tcl[0-9]* 2>/dev/null` \
2129 /usr/local/src/tcl \
2130 /usr/local/lib/tcl \
2131 ${prefix}/include ; do
2132 if test -f $i/tclInt.h ; then
2133 ac_cv_c_tclh=`(cd $i; pwd)`
2134 break
2135 fi
2136 done
2137fi
2138# see if one is installed
2139if test x"${ac_cv_c_tclh}" = x ; then
2140 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
2141echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5436fc65
C
2142if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
2144else
2145 cat > conftest.$ac_ext <<EOF
b613bfbf 2146#line 2147 "configure"
5436fc65 2147#include "confdefs.h"
4e327047 2148#include <tclInt.h>
5436fc65 2149EOF
b613bfbf 2150eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
2151ac_err=`grep -v '^ *+' conftest.out`
2152if test -z "$ac_err"; then
2153 rm -rf conftest*
2154 eval "ac_cv_header_$ac_safe=yes"
2155else
2156 echo "$ac_err" >&5
2157 rm -rf conftest*
2158 eval "ac_cv_header_$ac_safe=no"
2159fi
2160rm -f conftest*
2161fi
2162if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2163 echo "$ac_t""yes" 1>&6
4e327047 2164 ac_cv_c_tclh=installed
5436fc65
C
2165else
2166 echo "$ac_t""no" 1>&6
4e327047 2167ac_cv_c_tclh=""
5436fc65
C
2168fi
2169
4e327047
TT
2170fi
2171
2172fi
2173
2174if test x"${ac_cv_c_tclh}" = x ; then
2175 TCLHDIR="# no Tcl private headers found"
2176 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2177fi
2178if test x"${ac_cv_c_tclh}" != x ; then
2179 no_tcl=""
b613bfbf 2180 if test x"${ac_cv_c_tkh}" = x"installed" ; then
4e327047
TT
2181 echo "$ac_t""is installed" 1>&6
2182 TCLHDIR=""
2183 else
2184 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2185 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2186 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 2187 fi
5436fc65 2188fi
4e327047
TT
2189
2190echo $ac_n "checking Tcl version""... $ac_c" 1>&6
4e327047
TT
2191orig_includes="$CPPFLAGS"
2192
2193if test x"${TCLHDIR}" != x ; then
2194 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2195fi
2196
b613bfbf 2197# Get major and minor versions of Tcl.
4bd9f70f 2198cat > conftest.c <<'EOF'
4e327047 2199#include "tcl.h"
b613bfbf
GN
2200major = TCL_MAJOR_VERSION
2201minor = TCL_MINOR_VERSION
4e327047 2202EOF
e44d1491 2203
4bd9f70f
TT
2204tclmajor=
2205tclminor=
2206if (eval "$CPP $CPPFLAGS conftest.c") 2>/dev/null >conftest.out; then
2207 # Success.
b613bfbf
GN
2208 tclmajor=`egrep '^major = ' conftest.out | sed -e 's/^major = *//' -e 's/ *$//'`
2209 tclminor=`egrep '^minor = ' conftest.out | sed -e 's/^minor = *//' -e 's/ *$//'`
5436fc65 2210fi
4bd9f70f
TT
2211rm -f conftest.c conftest.out
2212
2213if test -z "$tclmajor" || test -z "$tclminor"; then
2214 echo "$ac_t""fatal error: could not find major or minor version number of Tcl" 1>&6
2215 exit 1
911026aa 2216fi
4bd9f70f
TT
2217echo "$ac_t""${tclmajor}.${tclminor}" 1>&6
2218
4e327047
TT
2219CPPFLAGS="${orig_includes}"
2220
5436fc65 2221
4e327047
TT
2222
2223
2224
5436fc65 2225#
4e327047 2226# Ok, lets find the tcl library
5436fc65 2227# First, look for one uninstalled.
4e327047 2228# the alternative search directory is invoked by --with-tcllib
5436fc65 2229#
4e327047
TT
2230
2231if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
2232 installedtcllibroot=tcl$tclversion
2233else
2234 installedtcllibroot=tcl
2235fi
2236
2237if test x"${no_tcl}" = x ; then
2238 # we reset no_tcl incase something fails here
2239 no_tcl=true
2240 # Check whether --with-tcllib or --without-tcllib was given.
b613bfbf
GN
2241withval="$with_tcllib"
2242if test -n "$withval"; then
4e327047
TT
2243 with_tcllib=${withval}
2244fi
2245
2246 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
2247 if eval "test \"`echo '$''{'ac_cv_c_tcllib'+set}'`\" = set"; then
2248 echo $ac_n "(cached) $ac_c" 1>&6
2249else
2250
2251 # First check to see if --with-tcllib was specified.
2252 # This requires checking for both the installed and uninstalled name-styles
2253 # since we have no idea if it's installed or not.
2254 if test x"${with_tcllib}" != x ; then
2255 if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
2256 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
2257 elif test -f "${with_tcllib}/libtcl.so" ; then
2258 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
2259 # then look for a freshly built statically linked library
2260 # if Makefile exists we assume its configured and libtcl will be built first.
2261 elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
2262 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
2263 elif test -f "${with_tcllib}/libtcl.a" ; then
2264 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
2265 else
2266 { echo "configure: error: ${with_tcllib} directory doesn't contain libraries" 1>&2; exit 1; }
2267 fi
5436fc65 2268 fi
4e327047
TT
2269 # then check for a private Tcl library
2270 # Since these are uninstalled, use the simple lib name root.
2271 if test x"${ac_cv_c_tcllib}" = x ; then
2272 for i in \
2273 ../tcl \
2274 `ls -dr ../tcl[0-9]* 2>/dev/null` \
2275 ../../tcl \
2276 `ls -dr ../../tcl[0-9]* 2>/dev/null` \
2277 ../../../tcl \
2278 `ls -dr ../../../tcl[0-9]* 2>/dev/null` ; do
2279 # Tcl 7.5 and greater puts library in subdir. Look there first.
2280 if test -f "$i/unix/libtcl.so" ; then
2281 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2282 break
2283 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2284 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2285 break
2286 # look for a freshly built dynamically linked library
2287 elif test -f "$i/libtcl.so" ; then
2288 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2289 break
2290
2291 # then look for a freshly built statically linked library
2292 # if Makefile exists we assume its configured and libtcl will be
2293 # built first.
2294 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2295 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2296 break
2297 fi
2298 done
5436fc65 2299 fi
4e327047
TT
2300 # check in a few common install locations
2301 if test x"${ac_cv_c_tcllib}" = x ; then
2302 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2303 # first look for a freshly built dynamically linked library
2304 if test -f "$i/lib$installedtcllibroot.so" ; then
2305 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
2306 break
2307 # then look for a freshly built statically linked library
2308 # if Makefile exists we assume its configured and libtcl will be built first.
2309 elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
2310 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
2311 break
2312 fi
2313 done
5436fc65 2314 fi
4e327047
TT
2315 # check in a few other private locations
2316 if test x"${ac_cv_c_tcllib}" = x ; then
2317 for i in \
2318 ${srcdir}/../tcl \
2319 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` ; do
2320 # Tcl 7.5 and greater puts library in subdir. Look there first.
2321 if test -f "$i/unix/libtcl.so" ; then
2322 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2323 break
2324 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2325 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2326 break
2327 # look for a freshly built dynamically linked library
2328 elif test -f "$i/libtcl.so" ; then
2329 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2330 break
2331
2332 # then look for a freshly built statically linked library
2333 # if Makefile exists we assume its configured and libtcl will be
2334 # built first.
2335 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2336 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2337 break
2338 fi
2339 done
2340 fi
2341
2342 # see if one is conveniently installed with the compiler
2343 if test x"${ac_cv_c_tcllib}" = x ; then
2344 orig_libs="$LIBS"
2345 LIBS="$LIBS -l$installedtcllibroot -lm"
2346 if test "$cross_compiling" = yes; then
2347 ac_cv_c_tclib="-l$installedtcllibroot"
2348else
2349cat > conftest.$ac_ext <<EOF
b613bfbf 2350#line 2351 "configure"
4e327047
TT
2351#include "confdefs.h"
2352
2353 Tcl_AppInit()
2354 { exit(0); }
2355EOF
b613bfbf 2356eval $ac_link
4e327047
TT
2357if test -s conftest && (./conftest; exit) 2>/dev/null; then
2358 ac_cv_c_tcllib="-l$installedtcllibroot"
2359else
2360 ac_cv_c_tcllib=""
2361
2362fi
2363fi
2364rm -fr conftest*
2365 LIBS="${orig_libs}"
2366 fi
2367
5436fc65
C
2368fi
2369
4e327047
TT
2370 if test x"${ac_cv_c_tcllib}" = x ; then
2371 TCLLIB="# no Tcl library found"
2372 echo "configure: warning: Can't find Tcl library" 1>&2
2373 else
2374 TCLLIB=${ac_cv_c_tcllib}
2375 echo "$ac_t""found $TCLLIB" 1>&6
2376 no_tcl=
5436fc65 2377 fi
5436fc65
C
2378fi
2379
5436fc65
C
2380
2381
2382
2383
a2b63bbd 2384
4e327047 2385
5436fc65 2386#
4e327047
TT
2387# Ok, lets find the tk source trees so we can use the headers
2388# If the directory (presumably symlink) named "tk" exists, use that one
2389# in preference to any others. Same logic is used when choosing library
2390# and again with Tcl. The search order is the best place to look first, then in
2391# decreasing significance. The loop breaks if the trigger file is found.
2392# Note the gross little conversion here of srcdir by cd'ing to the found
2393# directory. This converts the path from a relative to an absolute, so
2394# recursive cache variables for the path will work right. We check all
2395# the possible paths in one loop rather than many seperate loops to speed
2396# things up.
2397# the alternative search directory is invoked by --with-tkinclude
5436fc65 2398#
4e327047
TT
2399echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2400# Check whether --with-tkinclude or --without-tkinclude was given.
b613bfbf
GN
2401withval="$with_tkinclude"
2402if test -n "$withval"; then
4e327047
TT
2403 with_tkinclude=${withval}
2404fi
2405
2406no_tk=true
2407if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2408 echo $ac_n "(cached) $ac_c" 1>&6
2409else
2410
2411# first check to see if --with-tkinclude was specified
2412if test x"${with_tkinclude}" != x ; then
2413 if test -f ${with_tkinclude}/tk.h ; then
2414 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5436fc65 2415 else
4e327047
TT
2416 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2417 fi
2418fi
2419# next check in private source directory
2420#
2421# since ls returns lowest version numbers first, reverse the entire list
2422# and search for the worst fit, overwriting it with better fits as we find them
2423if test x"${ac_cv_c_tkh}" = x ; then
2424 for i in \
2425 ${srcdir}/../tk \
2426 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` \
2427 ${srcdir}/../../tk \
2428 `ls -dr ${srcdir}/../../tk[0-9]* 2>/dev/null` \
2429 ${srcdir}/../../../tk \
2430 `ls -dr ${srcdir}/../../../tk[0-9]* 2>/dev/null ` ; do
2431 if test -f $i/tk.h ; then
2432 ac_cv_c_tkh=`(cd $i; pwd)`
2433 break
2434 fi
2435 # Tk 4.1 and greater puts this in a subdir.
2436 if test -f $i/generic/tk.h; then
2437 ac_cv_c_tkh=`(cd $i; pwd)`/generic
2438 fi
2439 done
2440fi
2441# finally check in a few common install locations
2442#
2443# since ls returns lowest version numbers first, reverse the entire list
2444# and search for the worst fit, overwriting it with better fits as we find them
2445if test x"${ac_cv_c_tkh}" = x ; then
2446 for i in \
2447 `ls -dr /usr/local/src/tk[0-9]* 2>/dev/null` \
2448 `ls -dr /usr/local/lib/tk[0-9]* 2>/dev/null` \
2449 /usr/local/src/tk \
2450 /usr/local/lib/tk \
2451 ${prefix}/include ; do
2452 if test -f $i/tk.h ; then
2453 ac_cv_c_tkh=`(cd $i; pwd)`
2454 break
2455 fi
2456 done
2457fi
2458# see if one is installed
2459if test x"${ac_cv_c_tkh}" = x ; then
2460 ac_safe=`echo "tk.h" | tr './\055' '___'`
2461echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5436fc65
C
2462if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2463 echo $ac_n "(cached) $ac_c" 1>&6
2464else
2465 cat > conftest.$ac_ext <<EOF
b613bfbf 2466#line 2467 "configure"
5436fc65 2467#include "confdefs.h"
4e327047 2468#include <tk.h>
5436fc65 2469EOF
b613bfbf 2470eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5436fc65
C
2471ac_err=`grep -v '^ *+' conftest.out`
2472if test -z "$ac_err"; then
2473 rm -rf conftest*
2474 eval "ac_cv_header_$ac_safe=yes"
2475else
2476 echo "$ac_err" >&5
2477 rm -rf conftest*
2478 eval "ac_cv_header_$ac_safe=no"
2479fi
2480rm -f conftest*
2481fi
2482if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2483 echo "$ac_t""yes" 1>&6
4e327047 2484 ac_cv_c_tkh=installed
5436fc65
C
2485else
2486 echo "$ac_t""no" 1>&6
2487fi
2488
4e327047
TT
2489fi
2490
2491fi
2492
2493if test x"${ac_cv_c_tkh}" != x ; then
2494 no_tk=""
2495 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2496 echo "$ac_t""is installed" 1>&6
2497 TKHDIR=""
2498 else
2499 echo "$ac_t""found in $ac_cv_c_tkh" 1>&6
2500 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2501 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
2502 fi
2503else
4e327047
TT
2504 TKHDIR="# no Tk directory found"
2505 echo "configure: warning: Can't find Tk private headers" 1>&2
2506 no_tk=true
5436fc65
C
2507fi
2508
4e327047
TT
2509# if Tk is installed, extract the major/minor version
2510if test x"${no_tk}" = x ; then
2511echo $ac_n "checking Tk version""... $ac_c" 1>&6
4e327047
TT
2512orig_includes="$CPPFLAGS"
2513
2514if test x"${TCLHDIR}" != x ; then
2515 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2516fi
2517if test x"${TKHDIR}" != x ; then
2518 CPPFLAGS="$CPPFLAGS $TKHDIR"
2519fi
2520if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
2521 CPPFLAGS="$CPPFLAGS -I$x_includes"
2522fi
2523
b613bfbf 2524# Get major and minor versions of Tk.
4bd9f70f 2525cat > conftest.c <<'EOF'
4e327047 2526#include "tk.h"
b613bfbf
GN
2527major = TK_MAJOR_VERSION
2528minor = TK_MINOR_VERSION
4e327047 2529EOF
4e327047 2530
4bd9f70f
TT
2531tkmajor=
2532tkminor=
2533if (eval "$CPP $CPPFLAGS conftest.c") 2>/dev/null >conftest.out; then
2534 # Success.
b613bfbf
GN
2535 tkmajor=`egrep '^major = ' conftest.out | sed -e 's/^major = *//' -e 's/ *$//'`
2536 tkminor=`egrep '^minor = ' conftest.out | sed -e 's/^minor = *//' -e 's/ *$//'`
4e327047 2537fi
4bd9f70f
TT
2538rm -f conftest.c conftest.out
2539
2540if test -z "$tkmajor" || test -z "$tkminor"; then
2541 echo "$ac_t""fatal error: could not find major or minor version number of Tk" 1>&6
2542 exit 1
4e327047 2543fi
4bd9f70f
TT
2544echo "$ac_t""${tkmajor}.${tkminor}" 1>&6
2545
4e327047
TT
2546CPPFLAGS="${orig_includes}"
2547fi
2548
2549
2550
2551
2552
2553
5436fc65 2554#
4e327047
TT
2555# Ok, lets find the tk library
2556# First, look for the latest private (uninstalled) copy
2557# Notice that the destinations in backwards priority since the tests have
2558# no break.
2559# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
2560# is it indicates the target has been configured and will (probably)
2561# soon be built. This allows an entire tree of Tcl software to be
2562# configured at once and then built.
2563# the alternative search directory is invoked by --with-tklib
5436fc65 2564#
4e327047
TT
2565
2566if test x"${no_tk}" = x ; then
2567 # reset no_tk incase something fails here
2568 no_tk="true"
2569
2570 if test $tkmajor -ge 4 ; then
2571 installedtklibroot=tk$tkversion
2572 else
2573 installedtkllibroot=tk
5436fc65 2574 fi
4e327047
TT
2575
2576 # Check whether --with-tklib or --without-tklib was given.
b613bfbf
GN
2577withval="$with_tklib"
2578if test -n "$withval"; then
4e327047 2579 with_tklib=${withval}
5436fc65 2580fi
4e327047
TT
2581
2582 echo $ac_n "checking for Tk library""... $ac_c" 1>&6
2583 if eval "test \"`echo '$''{'ac_cv_c_tklib'+set}'`\" = set"; then
2584 echo $ac_n "(cached) $ac_c" 1>&6
2585else
2586
2587 # first check to see if --with-tklib was specified
2588 # This requires checking for both the installed and uninstalled name-styles
2589 # since we have no idea if it's installed or not.
2590 if test x"${with_tklib}" != x ; then
2591 if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
2592 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
2593 no_tk=""
2594 elif test -f "${with_tklib}/libtk.so" ; then
2595 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
2596 no_tk=""
2597 # then look for a freshly built statically linked library
2598 # if Makefile exists we assume its configured and libtk will be built
2599 elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
2600 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
2601 no_tk=""
2602 elif test -f "${with_tklib}/libtk.a" ; then
2603 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
2604 no_tk=""
2605 else
2606 { echo "configure: error: ${with_tklib} directory doesn't contain libraries" 1>&2; exit 1; }
2607 fi
5436fc65 2608 fi
4e327047
TT
2609 # then check for a private Tk library
2610 # Since these are uninstalled, use the simple lib name root.
2611 if test x"${ac_cv_c_tklib}" = x ; then
2612 for i in \
2613 ../tk \
2614 `ls -dr ../tk[0-9]* 2>/dev/null` \
2615 ../../tk \
2616 `ls -dr ../../tk[0-9]* 2>/dev/null` \
2617 ../../../tk \
2618 `ls -dr ../../../tk[0-9]* 2>/dev/null` ; do
2619 # Tk 4.1 and greater puts things in subdirs. Check these first.
2620 if test -f "$i/unix/libtk.so" ; then
2621 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2622 no_tk=
2623 break
2624 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2625 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
2626 no_tk=
2627 break
2628 # look for a freshly built dynamically linked library
2629 elif test -f "$i/libtk.so" ; then
2630 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2631 no_tk=
2632 break
2633 # then look for a freshly built statically linked library
2634 # if Makefile exists we assume its configured and libtk will be built
2635 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2636 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2637 no_tk=""
2638 break
2639 fi
2640 done
2641 fi
2642 # finally check in a few common install locations
2643 if test x"${ac_cv_c_tklib}" = x ; then
2644 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2645 # first look for a freshly built dynamically linked library
2646 if test -f "$i/lib$installedtklibroot.so" ; then
2647 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
2648 no_tk=""
2649 break
2650 # then look for a freshly built statically linked library
2651 # if Makefile exists, we assume it's configured and libtcl will be built
2652 elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
2653 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
2654 no_tk=""
2655 break
2656 fi
2657 done
2658 fi
2659 # check in a few other private locations
2660 if test x"${ac_cv_c_tklib}" = x ; then
2661 for i in \
2662 ${srcdir}/../tk \
2663 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` ; do
2664 # Tk 4.1 and greater puts things in subdirs. Check these first.
2665 if test -f "$i/unix/libtk.so" ; then
2666 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2667 no_tk=
2668 break
2669 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2670 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
2671 no_tk=
2672 break
2673 # look for a freshly built dynamically linked library
2674 elif test -f "$i/libtk.so" ; then
2675 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2676 no_tk=""
2677 break
2678 # then look for a freshly built statically linked library
2679 # if Makefile exists, we assume it's configured and libtcl will be built
2680 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2681 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2682 no_tk=""
2683 break
2684 fi
2685 done
2686 fi
2687 # see if one is conveniently installed with the compiler
2688 if test x"${ac_cv_c_tklib}" = x ; then
2689
2690 orig_libs="$LIBS"
2691 LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
2692 if test "$cross_compiling" = yes; then
2693 ac_cv_c_tklib="-l$installedtklibroot"
2694else
2695cat > conftest.$ac_ext <<EOF
b613bfbf 2696#line 2697 "configure"
4e327047 2697#include "confdefs.h"
5436fc65 2698
4e327047
TT
2699 Tcl_AppInit()
2700 { exit(0); }
2701EOF
b613bfbf 2702eval $ac_link
4e327047
TT
2703if test -s conftest && (./conftest; exit) 2>/dev/null; then
2704 ac_cv_c_tklib="-l$installedtklibroot"
5436fc65 2705else
4e327047
TT
2706 ac_cv_c_tklib=""
2707
2708fi
2709fi
2710rm -fr conftest*
2711 LIBS="${orig_libs}"
2712 fi
2713
2714fi
2715
2716 if test x"${ac_cv_c_tklib}" = x ; then
2717 TKLIB="# no Tk library found"
2718 echo "configure: warning: Can't find Tk library" 1>&2
2719 else
2720 TKLIB=$ac_cv_c_tklib
2721 echo "$ac_t""found $TKLIB" 1>&6
2722 no_tk=
2723 fi
5436fc65
C
2724fi
2725
2726
2727
2728
2729
1a57cd09
TT
2730 # Look for dynamic linking libraries that Tcl might need. This is
2731 # only done for Tcl 7.5 and greater. It would be good to look for and
2732 # use the "configInfo" file that Tcl generates, but for now that is
2733 # beyond us.
2734 if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
2735 echo $ac_n "checking for -ldl""... $ac_c" 1>&6
b613bfbf 2736if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
1a57cd09
TT
2737 echo $ac_n "(cached) $ac_c" 1>&6
2738else
2739 ac_save_LIBS="$LIBS"
2740LIBS="-ldl $LIBS"
2741cat > conftest.$ac_ext <<EOF
b613bfbf 2742#line 2743 "configure"
1a57cd09
TT
2743#include "confdefs.h"
2744
2745int main() { return 0; }
2746int t() {
2747main()
2748; return 0; }
2749EOF
b613bfbf 2750if eval $ac_link; then
1a57cd09 2751 rm -rf conftest*
b613bfbf 2752 eval "ac_cv_lib_dl=yes"
1a57cd09
TT
2753else
2754 rm -rf conftest*
b613bfbf 2755 eval "ac_cv_lib_dl=no"
1a57cd09
TT
2756fi
2757rm -f conftest*
2758LIBS="$ac_save_LIBS"
2759
2760fi
b613bfbf 2761if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
1a57cd09 2762 echo "$ac_t""yes" 1>&6
b613bfbf 2763 ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
1a57cd09
TT
2764 cat >> confdefs.h <<EOF
2765#define $ac_tr_lib 1
2766EOF
2767
2768 LIBS="-ldl $LIBS"
2769
2770else
2771 echo "$ac_t""no" 1>&6
2772echo $ac_n "checking for -ldld""... $ac_c" 1>&6
b613bfbf 2773if eval "test \"`echo '$''{'ac_cv_lib_dld'+set}'`\" = set"; then
1a57cd09
TT
2774 echo $ac_n "(cached) $ac_c" 1>&6
2775else
2776 ac_save_LIBS="$LIBS"
2777LIBS="-ldld $LIBS"
2778cat > conftest.$ac_ext <<EOF
b613bfbf 2779#line 2780 "configure"
1a57cd09
TT
2780#include "confdefs.h"
2781
2782int main() { return 0; }
2783int t() {
2784main()
2785; return 0; }
2786EOF
b613bfbf 2787if eval $ac_link; then
1a57cd09 2788 rm -rf conftest*
b613bfbf 2789 eval "ac_cv_lib_dld=yes"
1a57cd09
TT
2790else
2791 rm -rf conftest*
b613bfbf 2792 eval "ac_cv_lib_dld=no"
1a57cd09
TT
2793fi
2794rm -f conftest*
2795LIBS="$ac_save_LIBS"
2796
2797fi
b613bfbf 2798if eval "test \"`echo '$ac_cv_lib_'dld`\" = yes"; then
1a57cd09 2799 echo "$ac_t""yes" 1>&6
b613bfbf 2800 ac_tr_lib=HAVE_LIB`echo dld | tr 'a-z' 'A-Z'`
1a57cd09
TT
2801 cat >> confdefs.h <<EOF
2802#define $ac_tr_lib 1
2803EOF
2804
2805 LIBS="-ldld $LIBS"
2806
2807else
2808 echo "$ac_t""no" 1>&6
2809fi
2810
2811fi
2812
2813 fi
2814
a2b63bbd 2815 ENABLE_GDBTK=1
66efdff9 2816
a2b63bbd
JM
2817 if test "x$no_x" != "xyes"; then
2818 if test "x$x_includes" != "x" ;
2819 then
2820 X_CFLAGS="-I$x_includes"
2821 else
2822 X_CFLAGS=""
2823 fi
2824
2825 if test "x$x_libraries" != "x" ;
2826 then
2827 X_LDFLAGS="-L$x_libraries"
2828 else
2829 X_LDFLAGS=""
2830 fi
2831
2832 case "$host" in
2833#
2834# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2835#
146ee7db 2836 sparc*-sun-solaris2*)
a2b63bbd
JM
2837 if test "x$GCC" = "xyes";
2838 then
127841e4 2839 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
2840 else
2841 if test "x$x_libraries" != "x" ;
2842 then
2843 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2844 fi
2845 X_LIBS="-lX11 -lXext -lX11"
2846 fi ;;
2847#
2848# gdb linked statically w/ SunOS or HPUX
2849#
2850 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2851 if test "x$x_libraries" != "x" ;
2852 then
2853 X_LIBS="$x_libraries/libX11.a"
2854 else
2855 X_LIBS="/usr/lib/libX11.a"
2856 fi ;;
2857#
2858# default is to link dynamically
2859#
2860 *)
2861 X_LIBS="-lX11" ;;
2862 esac
2863 else
2864 X_LDLAGS=""
2865 X_CFLAGS=""
2866 X_LIBS=""
2867 echo "configure: warning: No X based programs will be built" 1>&2
2868 fi
2869
2870 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2871 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2872 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2873fi
66efdff9 2874
66efdff9 2875
5436fc65 2876
66efdff9
JM
2877
2878
5436fc65
C
2879# end-sanitize-gdbtk
2880
2881
2882
2883
2884
7c40dd08
DE
2885# target_subdir is used by the testsuite to find the target libraries.
2886target_subdir=
2887if test "${host}" != "${target}"; then
2888 target_subdir="${target_alias}/"
2889fi
2890
5436fc65
C
2891
2892configdirs="doc testsuite"
2893
2894
2895# Map host cpu into the config cpu subdirectory name.
2896# The default is $host_cpu.
2897
2898case "${host_cpu}" in
2899
2900c[12]) gdb_host_cpu=convex ;;
2901hppa*) gdb_host_cpu=pa ;;
3222ff2e 2902i[3456]86) gdb_host_cpu=i386 ;;
5436fc65
C
2903m68*) gdb_host_cpu=m68k ;;
2904m88*) gdb_host_cpu=m88k ;;
2905np1) gdb_host_cpu=gould ;;
2906pyramid) gdb_host_cpu=pyr ;;
2907powerpc*) gdb_host_cpu=powerpc ;;
146ee7db 2908sparc64) gdb_host_cpu=sparc ;;
5436fc65
C
2909*) gdb_host_cpu=$host_cpu ;;
2910
2911esac
2912
2913# map host info into gdb names.
2914
2915case "${host}" in
2916
2917a29k-*-*) gdb_host=ultra3 ;;
2918
2919alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2920alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2921alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
e44d1491 2922alpha-*-linux*) gdb_host=alpha-linux ;;
5436fc65
C
2923
2924arm-*-*) gdb_host=arm ;;
2925
2926c[12]-*-*) gdb_host=convex ;;
2927
2928hppa*-*-bsd*) gdb_host=hppabsd ;;
2929hppa*-*-hiux*) gdb_host=hppahpux ;;
2930hppa*-*-hpux*) gdb_host=hppahpux ;;
2931hppa*-*-osf*) gdb_host=hppaosf ;;
2932
3222ff2e
MM
2933i[3456]86-ncr-*) gdb_host=ncr3000 ;;
2934i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2935i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
2936i[3456]86-sequent-sysv*) gdb_host=ptx ;;
2937i[3456]86-*-aix*) gdb_host=i386aix ;;
2938i[3456]86-*-bsd*) gdb_host=i386bsd ;;
2939i[3456]86-*-dgux*) gdb_host=i386dgux ;;
2940i[3456]86-*-freebsd*) gdb_host=fbsd ;;
2941i[3456]86-*-netbsd*) gdb_host=nbsd ;;
2942i[3456]86-*-go32*) gdb_host=go32 ;;
2943i[3456]86-*-linux*) gdb_host=linux ;;
2944i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
2945i[3456]86-*-mach3*) gdb_host=i386m3 ;;
2946i[3456]86-*-mach*) gdb_host=i386mach ;;
d8efbc66 2947i[3456]86-*-gnu*) gdb_host=i386gnu ;;
3222ff2e 2948i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
125c17af 2949i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
3222ff2e
MM
2950i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2951i[3456]86-*-sco*) gdb_host=i386sco ;;
2952i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
2953i[3456]86-*-sunos*) gdb_host=sun386 ;;
2954i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
2955i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
2956i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
2957i[3456]86-*-unixware) gdb_host=i386v4 ;;
2958i[3456]86-*-sysv*) gdb_host=i386v ;;
2959i[3456]86-*-isc*) gdb_host=i386v32 ;;
2960i[3456]86-*-os9k) gdb_host=i386os9k ;;
3d78f532 2961i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
5436fc65
C
2962m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2963m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2964m68030-sony-*) gdb_host=news1000 ;;
2965
2966m68*-altos-*) gdb_host=altos ;;
2967m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2968m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2969m68*-att-*) gdb_host=3b1 ;;
2970m68*-bull*-sysv*) gdb_host=dpx2 ;;
2971m68*-hp-bsd*) gdb_host=hp300bsd ;;
2972m68*-hp-hpux*) gdb_host=hp300hpux ;;
2973m68*-isi-*) gdb_host=isi ;;
2974m68*-*-lynxos*) gdb_host=m68klynx ;;
b7f3b6d5 2975m68*-*-netbsd*) gdb_host=nbsd ;;
5436fc65
C
2976m68*-*-sysv4*) gdb_host=m68kv4 ;;
2977m68*-motorola-*) gdb_host=delta68 ;;
2978m68*-sony-*) gdb_host=news ;;
2979m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2980m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2981m68*-sun-*) gdb_host=sun3os4 ;;
2982
2983m88*-harris-cxux*) gdb_host=cxux ;;
2984m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2985m88*-motorola-sysv*) gdb_host=delta88 ;;
2986m88*-*-mach3*) gdb_host=mach3 ;;
2987m88*-*-*) gdb_host=m88k ;;
2988
2989mips-dec-mach3*) gdb_host=mach3 ;;
2990mips-dec-*) gdb_host=decstation ;;
2991mips-little-*) gdb_host=littlemips ;;
2992mips-sgi-irix3*) gdb_host=irix3 ;;
2993mips-sgi-irix4*) gdb_host=irix4 ;;
2994mips-sgi-irix5*) gdb_host=irix5 ;;
2995mips-sony-*) gdb_host=news-mips ;;
2996mips-*-mach3*) gdb_host=mach3 ;;
2997mips-*-sysv4*) gdb_host=mipsv4 ;;
2998mips-*-sysv*) gdb_host=riscos ;;
2999mips-*-riscos*) gdb_host=riscos ;;
3000
3001none-*-*) gdb_host=none ;;
3002
3003np1-*-*) gdb_host=np1 ;;
3004
3005ns32k-*-mach3*) gdb_host=mach3 ;;
3006ns32k-*-netbsd*) gdb_host=nbsd ;;
3007ns32k-umax-*) gdb_host=umax ;;
3008ns32k-utek-sysv*) gdb_host=merlin ;;
3009
fbc3f191 3010powerpc-*-aix*) gdb_host=aix ;;
3d78f532 3011powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
fe8d28cf 3012powerpcle-*-solaris*) gdb_host=solaris ;;
5436fc65
C
3013pn-*-*) gdb_host=pn ;;
3014
3015pyramid-*-*) gdb_host=pyramid ;;
3016
3017romp-*-*) gdb_host=rtbsd ;;
3018
3019rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
a1956677 3020rs6000-*-aix4*) gdb_host=aix4 ;;
5436fc65
C
3021rs6000-*-*) gdb_host=rs6000 ;;
3022
3023sparc-*-lynxos*) gdb_host=sparclynx ;;
3024sparc-*-netbsd*) gdb_host=nbsd ;;
3025sparc-*-solaris2*) gdb_host=sun4sol2 ;;
3026sparc-*-sunos4*) gdb_host=sun4os4 ;;
3027sparc-*-sunos5*) gdb_host=sun4sol2 ;;
3028sparc-*-*) gdb_host=sun4os4 ;;
146ee7db 3029sparc64-*-*) gdb_host=sun4sol2 ;;
5436fc65
C
3030
3031tahoe-*-*) gdb_host=tahoe ;;
3032
3033vax-*-bsd*) gdb_host=vaxbsd ;;
3034vax-*-ultrix2*) gdb_host=vaxult2 ;;
3035vax-*-ultrix*) gdb_host=vaxult ;;
3036
3037w65-*-*) gdb_host=w65 ;;
3038
3039esac
3040
3041
3042# Map target cpu into the config cpu subdirectory name.
3043# The default is $target_cpu.
3044
3045case "${target_cpu}" in
3046
3047alpha) gdb_target_cpu=alpha ;;
3048c[12]) gdb_target_cpu=convex ;;
3049hppa*) gdb_target_cpu=pa ;;
3222ff2e 3050i[3456]86) gdb_target_cpu=i386 ;;
5436fc65
C
3051m68*) gdb_target_cpu=m68k ;;
3052m88*) gdb_target_cpu=m88k ;;
3053mips*) gdb_target_cpu=mips ;;
3054np1) gdb_target_cpu=gould ;;
3055powerpc*) gdb_target_cpu=powerpc ;;
3056pn) gdb_target_cpu=gould ;;
3057pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
3058sparc*) gdb_target_cpu=sparc ;;
3059*) gdb_target_cpu=$target_cpu ;;
3060
3061esac
3062
3063# map target info into gdb names.
3064
3065case "${target}" in
3066
3067a29k-*-aout*) gdb_target=a29k ;;
3068a29k-*-coff*) gdb_target=a29k ;;
3069a29k-*-elf*) gdb_target=a29k ;;
3070a29k-*-ebmon*) gdb_target=a29k ;;
3071a29k-*-kern*) gdb_target=a29k-kern ;;
3072a29k-*-none*) gdb_target=a29k ;;
3073a29k-*-sym1*) gdb_target=ultra3 ;;
3074a29k-*-udi*) gdb_target=a29k-udi ;;
3075a29k-*-vxworks*) gdb_target=vx29k ;;
3076
3077alpha-*-osf*) gdb_target=alpha-osf1 ;;
e44d1491 3078alpha-*-linux*) gdb_target=alpha-linux ;;
5436fc65
C
3079
3080# start-sanitize-arc
3081arc-*-*) gdb_target=arc ;;
3082# end-sanitize-arc
3083
3084arm-*-*) gdb_target=arm ;;
3085
3086c1-*-*) gdb_target=convex ;;
3087c2-*-*) gdb_target=convex ;;
3088
fb506180
SS
3089h8300-*-*) gdb_target=h8300 ;;
3090h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
3091
3092sh-*-*) gdb_target=sh ;;
3093
5436fc65
C
3094hppa*-*-bsd*) gdb_target=hppabsd ;;
3095hppa*-*-pro*) gdb_target=hppapro ;;
3096hppa*-*-hpux*) gdb_target=hppahpux ;;
3097hppa*-*-hiux*) gdb_target=hppahpux ;;
3098hppa*-*-osf*) gdb_target=hppaosf ;;
3099
3222ff2e
MM
3100i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
3101i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
3102i[3456]86-sequent-sysv*) gdb_target=ptx ;;
3103i[3456]86-ncr-*) gdb_target=ncr3000 ;;
3104i[3456]86-*-aout*) gdb_target=i386aout ;;
3105i[3456]86-*-coff*) gdb_target=i386v ;;
3106i[3456]86-*-elf*) gdb_target=i386v ;;
3107i[3456]86-*-aix*) gdb_target=i386aix ;;
3108i[3456]86-*-bsd*) gdb_target=i386bsd ;;
3109i[3456]86-*-freebsd*) gdb_target=fbsd ;;
3110i[3456]86-*-netbsd*) gdb_target=nbsd ;;
3111i[3456]86-*-os9k) gdb_target=i386os9k ;;
3112i[3456]86-*-go32*) gdb_target=i386aout ;;
3113i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 3114 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
3115i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
3116i[3456]86-*-sunos*) gdb_target=sun386 ;;
3117i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
3118i[3456]86-*-sco*) gdb_target=i386v ;;
3119i[3456]86-*-sysv*) gdb_target=i386v ;;
3dedc867
FF
3120i[3456]86-*-linux*) gdb_target=linux
3121 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
3122i[3456]86-*-isc*) gdb_target=i386v ;;
3123i[3456]86-*-mach3*) gdb_target=i386m3 ;;
3124i[3456]86-*-mach*) gdb_target=i386mach ;;
d8efbc66 3125i[3456]86-*-gnu*) gdb_target=i386gnu ;;
3222ff2e 3126i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 3127 configdirs="${configdirs} nlm" ;;
3222ff2e 3128i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
3d78f532 3129i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
5436fc65 3130i960-*-bout*) gdb_target=vxworks960 ;;
2e665cd3
DP
3131i960-nindy-coff*) gdb_target=nindy960 ;;
3132i960-*-coff*) gdb_target=mon960 ;;
3133i960-nindy-elf*) gdb_target=nindy960 ;;
3134i960-*-elf*) gdb_target=mon960 ;;
5436fc65
C
3135
3136i960-*-nindy*) gdb_target=nindy960 ;;
3137i960-*-vxworks*) gdb_target=vxworks960 ;;
3138
3139m68000-*-sunos3*) gdb_target=sun2os3 ;;
3140m68000-*-sunos4*) gdb_target=sun2os4 ;;
3141
3142m68*-apollo*-bsd*) gdb_target=apollo68b ;;
3143m68*-bull-sysv*) gdb_target=dpx2 ;;
3144m68*-hp-bsd*) gdb_target=hp300bsd ;;
3145m68*-hp-hpux*) gdb_target=hp300hpux ;;
3146m68*-altos-*) gdb_target=altos ;;
3147m68*-att-*) gdb_target=3b1 ;;
3148m68*-cisco*-*) gdb_target=cisco ;;
3149m68*-ericsson-*) gdb_target=es1800 ;;
3150m68*-isi-*) gdb_target=isi ;;
3151m68*-motorola-*) gdb_target=delta68 ;;
3152m68*-netx-*) gdb_target=vxworks68 ;;
3153m68*-sony-*) gdb_target=news ;;
3154m68*-tandem-*) gdb_target=st2000 ;;
3155m68*-rom68k-*) gdb_target=monitor ;;
3156m68*-*bug-*) gdb_target=monitor ;;
3157m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 3158m68*-est-*) gdb_target=monitor ;;
5436fc65
C
3159m68*-*-aout*) gdb_target=monitor ;;
3160m68*-*-coff*) gdb_target=monitor ;;
3161m68*-*-elf*) gdb_target=monitor ;;
3162m68*-*-lynxos*) gdb_target=m68klynx
3163 configdirs="${configdirs} gdbserver" ;;
b7f3b6d5 3164m68*-*-netbsd*) gdb_target=nbsd ;;
5436fc65
C
3165m68*-*-os68k*) gdb_target=os68k ;;
3166m68*-*-sunos3*) gdb_target=sun3os3 ;;
3167m68*-*-sunos4*) gdb_target=sun3os4 ;;
3168m68*-*-sysv4*) gdb_target=m68kv4 ;;
3169m68*-*-vxworks*) gdb_target=vxworks68 ;;
3170
3171m88*-harris-cxux*) gdb_target=cxux ;;
3172m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
3173m88*-*-mach3*) gdb_target=mach3 ;;
3174m88*-motorola-*) gdb_target=delta88 ;;
3175m88*-*-*) gdb_target=m88k ;;
3176
3177mips64*-big-*) gdb_target=bigmips64 ;;
3178mips*-big-*) gdb_target=bigmips ;;
3179mips*-dec-mach3*) gdb_target=mach3 ;;
3180mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
3181mips64*el-*-ecoff*) gdb_target=embedl64 ;;
3182mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
3183mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
3184mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
911026aa
JSC
3185mips64*vr4100*el-*-elf*) gdb_target=vr4300el ;;
3186mips64*vr4100*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
3187mips64*el-*-elf*) gdb_target=embedl64 ;;
3188mips64*-*-elf*) gdb_target=embed64 ;;
3189mips*el-*-ecoff*) gdb_target=embedl ;;
3190mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 3191# start-sanitize-gm
7bb5e831 3192mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 3193# end-sanitize-gm
7bb5e831
RS
3194mips*el-*-elf*) gdb_target=embedl ;;
3195mips*-*-elf*) gdb_target=embed ;;
5436fc65
C
3196mips*-little-*) gdb_target=littlemips ;;
3197mips*-sgi-irix5*) gdb_target=irix5 ;;
3198mips*-sgi-*) gdb_target=irix3 ;;
3199mips*-sony-*) gdb_target=bigmips ;;
3200mips*-*-mach3*) gdb_target=mach3 ;;
3201mips*-*-sysv4*) gdb_target=mipsv4 ;;
3202mips*-*-sysv*) gdb_target=bigmips ;;
3203mips*-*-riscos*) gdb_target=bigmips ;;
3dedc867 3204mips*-*-vxworks*) gdb_target=vxmips ;;
5436fc65
C
3205
3206none-*-*) gdb_target=none ;;
3207
3208np1-*-*) gdb_target=np1 ;;
3209
3210ns32k-*-mach3*) gdb_target=mach3 ;;
3211ns32k-*-netbsd*) gdb_target=nbsd ;;
3212ns32k-utek-sysv*) gdb_target=merlin ;;
3213ns32k-utek-*) gdb_target=umax ;;
3214
3215pn-*-*) gdb_target=pn ;;
c148ab3c 3216powerpc-*-macos*) gdb_target=macos ;;
5436fc65
C
3217powerpc-*-netware*) gdb_target=ppc-nw
3218 configdirs="${configdirs} nlm" ;;
3219
65eaea27 3220powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 3221powerpc-*-aix*) gdb_target=aix ;;
3d78f532 3222powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
fe8d28cf 3223powerpcle-*-solaris*) gdb_target=solaris ;;
3c0bf315
MM
3224powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3225 gdb_target=ppc-sim
3226 else
3227 gdb_target=ppc-eabi
3228 fi ;;
3229powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3230 gdb_target=ppcle-sim
3231 else
3232 gdb_target=ppcle-eabi
3233 fi ;;
5436fc65
C
3234
3235pyramid-*-*) gdb_target=pyramid ;;
3236
3237rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 3238rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
3239rs6000-*-*) gdb_target=rs6000 ;;
3240
3241sparc-*-aout*) gdb_target=sparc-em ;;
3242sparc-*-coff*) gdb_target=sparc-em ;;
3243sparc-*-elf*) gdb_target=sparc-em ;;
3244sparc-*-lynxos*) gdb_target=sparclynx
3245 configdirs="${configdirs} gdbserver" ;;
3246sparc-*-netbsd*) gdb_target=nbsd ;;
3247sparc-*-solaris2*) gdb_target=sun4sol2 ;;
3248sparc-*-sunos4*) gdb_target=sun4os4 ;;
3249sparc-*-sunos5*) gdb_target=sun4sol2 ;;
3250sparc-*-vxworks*) gdb_target=vxsparc ;;
3251sparc-*-*) gdb_target=sun4os4 ;;
229b2c87
DE
3252# Use sparc-em for sparclet for now.
3253sparclet-*-*) gdb_target=sparc-em ;;
5436fc65 3254sparclite*-*-*) gdb_target=sparclite ;;
078aeca4
DE
3255# It's not clear what the right solution for "v8plus" systems is yet.
3256# For now, stick with sparc-sun-solaris2 since that's what config.guess
3257# should return. Work is still needed to get gdb to print the 64 bit
3258# regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
3259# deleted though presumably it should be eventually.
3260#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
5436fc65
C
3261sparc64-*-*) gdb_target=sp64 ;;
3262
3263tahoe-*-*) gdb_target=tahoe ;;
3264
3265vax-*-*) gdb_target=vax ;;
3266
3267w65-*-*) gdb_target=w65 ;;
3268
fb506180 3269z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
3270
3271esac
3272
3273
5f107900 3274frags=
5436fc65
C
3275host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
3276if test ! -f ${host_makefile_frag}; then
3277{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
3278fi
5f107900 3279frags="$frags $host_makefile_frag"
5436fc65
C
3280
3281target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
3282if test ! -f ${target_makefile_frag}; then
3283{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
3284fi
5f107900 3285frags="$frags $target_makefile_frag"
5436fc65
C
3286
3287
3288
3289
3290
094fd4ae
C
3291hostfile=`sed -n '
3292s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3293' ${host_makefile_frag}`
5436fc65 3294
094fd4ae
C
3295targetfile=`sed -n '
3296s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3297' ${target_makefile_frag}`
5436fc65
C
3298
3299# these really aren't orthogonal true/false values of the same condition,
3300# but shells are slow enough that I like to reuse the test conditions
3301# whenever possible
3302if test "${target}" = "${host}"; then
094fd4ae
C
3303nativefile=`sed -n '
3304s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3305' ${host_makefile_frag}`
5436fc65
C
3306else
3307# GDBserver is only useful in a "native" enviroment
3308configdirs=`echo $configdirs | sed 's/gdbserver//'`
3309fi
3310
094fd4ae 3311
5436fc65
C
3312# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
3313# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
3314# corresponding links. But we have to remove the xm.h files and tm.h
3315# files anyway, e.g. when switching from "configure host" to
3316# "configure none".
3317
3318files=
3319links=
3320rm -f xm.h
3321if test "${hostfile}" != ""; then
3322files="${files} config/${gdb_host_cpu}/${hostfile}"
3323links="${links} xm.h"
3324fi
3325rm -f tm.h
3326if test "${targetfile}" != ""; then
3327files="${files} config/${gdb_target_cpu}/${targetfile}"
3328links="${links} tm.h"
3329fi
3330rm -f nm.h
3331if test "${nativefile}" != ""; then
3332files="${files} config/${gdb_host_cpu}/${nativefile}"
3333links="${links} nm.h"
3334else
3335# A cross-only configuration.
3336files="${files} config/nm-empty.h"
3337links="${links} nm.h"
3338fi
3339# start-sanitize-gdbtk
3340
3341# Make it possible to use the GUI without doing a full install
3342if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
3343files="${files} gdbtk.tcl"
3344links="${links} gdbtk.tcl"
3345fi
3346# end-sanitize-gdbtk
3347
3348
3349
3350subdirs="$configdirs"
3351
3352trap '' 1 2 15
3353cat > confcache <<\EOF
3354# This file is a shell script that caches the results of configure
3355# tests run on this system so they can be shared between configure
3356# scripts and configure runs. It is not useful on other systems.
3357# If it contains results you don't want to keep, you may remove or edit it.
3358#
3359# By default, configure uses ./config.cache as the cache file,
3360# creating it if it does not exist already. You can give configure
3361# the --cache-file=FILE option to use a different cache file; that is
3362# what configure does when it calls configure scripts in
3363# subdirectories, so they share the cache.
3364# Giving --cache-file=/dev/null disables caching, for debugging configure.
3365# config.status only pays attention to the cache file if you give it the
3366# --recheck option to rerun configure.
3367#
3368EOF
3369# Ultrix sh set writes to stderr and can't be redirected directly,
3370# and sets the high bit in the cache file unless we assign to the vars.
3371(set) 2>&1 |
3372 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3373 >> confcache
3374if cmp -s $cache_file confcache; then
3375 :
3376else
3377 if test -w $cache_file; then
3378 echo "updating cache $cache_file"
3379 cat confcache > $cache_file
3380 else
3381 echo "not updating unwritable cache $cache_file"
3382 fi
3383fi
3384rm -f confcache
3385
3386trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3387
3388test "x$prefix" = xNONE && prefix=$ac_default_prefix
3389# Let make expand exec_prefix.
3390test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3391
3392# Any assignment to VPATH causes Sun make to only execute
3393# the first set of double-colon rules, so remove it if not needed.
3394# If there is a colon in the path, we need to keep it.
3395if test "x$srcdir" = x.; then
3396 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3397fi
3398
3399trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3400
db210d08 3401DEFS=-DHAVE_CONFIG_H
5436fc65
C
3402
3403# Without the "./", some shells look in PATH for config.status.
3404: ${CONFIG_STATUS=./config.status}
3405
3406echo creating $CONFIG_STATUS
3407rm -f $CONFIG_STATUS
3408cat > $CONFIG_STATUS <<EOF
3409#! /bin/sh
3410# Generated automatically by configure.
3411# Run this file to recreate the current configuration.
3412# This directory was configured as follows,
3413# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3414#
3415# $0 $ac_configure_args
3416#
3417# Compiler output produced by configure, useful for debugging
3418# configure, is in ./config.log if it exists.
3419
3420ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3421for ac_option
3422do
3423 case "\$ac_option" in
3424 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3425 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3426 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3427 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
b613bfbf 3428 echo "$CONFIG_STATUS generated by autoconf version 2.4"
5436fc65
C
3429 exit 0 ;;
3430 -help | --help | --hel | --he | --h)
3431 echo "\$ac_cs_usage"; exit 0 ;;
3432 *) echo "\$ac_cs_usage"; exit 1 ;;
3433 esac
3434done
3435
3436ac_given_srcdir=$srcdir
3437ac_given_INSTALL="$INSTALL"
3438
18ea4416 3439trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5436fc65 3440
b613bfbf
GN
3441# Protect against being on the right side of a sed subst in config.status.
3442sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
3443 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
5436fc65
C
3444$ac_vpsub
3445$extrasub
3446s%@CFLAGS@%$CFLAGS%g
3447s%@CPPFLAGS@%$CPPFLAGS%g
3448s%@CXXFLAGS@%$CXXFLAGS%g
3449s%@DEFS@%$DEFS%g
3450s%@LDFLAGS@%$LDFLAGS%g
3451s%@LIBS@%$LIBS%g
3452s%@exec_prefix@%$exec_prefix%g
3453s%@prefix@%$prefix%g
3454s%@program_transform_name@%$program_transform_name%g
3455s%@CC@%$CC%g
3456s%@CPP@%$CPP%g
3457s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3458s%@INSTALL_DATA@%$INSTALL_DATA%g
5436fc65
C
3459s%@host@%$host%g
3460s%@host_alias@%$host_alias%g
3461s%@host_cpu@%$host_cpu%g
3462s%@host_vendor@%$host_vendor%g
3463s%@host_os@%$host_os%g
5436fc65
C
3464s%@build@%$build%g
3465s%@build_alias@%$build_alias%g
3466s%@build_cpu@%$build_cpu%g
3467s%@build_vendor@%$build_vendor%g
3468s%@build_os@%$build_os%g
d8efbc66
FF
3469s%@AR@%$AR%g
3470s%@RANLIB@%$RANLIB%g
3471s%@YACC@%$YACC%g
3472s%@AWK@%$AWK%g
3473s%@target@%$target%g
3474s%@target_alias@%$target_alias%g
3475s%@target_cpu@%$target_cpu%g
3476s%@target_vendor@%$target_vendor%g
3477s%@target_os@%$target_os%g
47ef0da5 3478s%@THREAD_DB_OBS@%$THREAD_DB_OBS%g
4915acad 3479s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
5436fc65
C
3480s%@X_CFLAGS@%$X_CFLAGS%g
3481s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3482s%@X_LIBS@%$X_LIBS%g
3483s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5436fc65
C
3484s%@TCLHDIR@%$TCLHDIR%g
3485s%@TCLLIB@%$TCLLIB%g
4e327047
TT
3486s%@TKHDIR@%$TKHDIR%g
3487s%@TKLIB@%$TKLIB%g
5436fc65 3488s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd 3489s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
3490s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3491s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3492s%@ENABLE_OBS@%$ENABLE_OBS%g
7c40dd08 3493s%@target_subdir@%$target_subdir%g
5436fc65
C
3494/@host_makefile_frag@/r $host_makefile_frag
3495s%@host_makefile_frag@%%g
3496/@target_makefile_frag@/r $target_makefile_frag
3497s%@target_makefile_frag@%%g
5f107900 3498s%@frags@%$frags%g
5436fc65
C
3499s%@subdirs@%$subdirs%g
3500
3501CEOF
3502EOF
3503cat >> $CONFIG_STATUS <<EOF
3504
3505CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3506EOF
3507cat >> $CONFIG_STATUS <<\EOF
3508for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3509 # Support "outfile[:infile]", defaulting infile="outfile.in".
3510 case "$ac_file" in
3511 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3512 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3513 *) ac_file_in="${ac_file}.in" ;;
3514 esac
3515
3516 # Adjust relative srcdir, etc. for subdirectories.
3517
3518 # Remove last slash and all that follows it. Not all systems have dirname.
3519 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3520 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3521 # The file is in a subdirectory.
3522 test ! -d "$ac_dir" && mkdir "$ac_dir"
3523 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3524 # A "../" for each directory in $ac_dir_suffix.
3525 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3526 else
3527 ac_dir_suffix= ac_dots=
3528 fi
3529
3530 case "$ac_given_srcdir" in
3531 .) srcdir=.
3532 if test -z "$ac_dots"; then top_srcdir=.
3533 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3534 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3535 *) # Relative path.
3536 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3537 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3538 esac
3539
3540 case "$ac_given_INSTALL" in
3541 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3542 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3543 esac
3544 echo creating "$ac_file"
3545 rm -f "$ac_file"
3546 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3547 case "$ac_file" in
3548 *Makefile*) ac_comsub="1i\\
3549# $configure_input" ;;
3550 *) ac_comsub= ;;
3551 esac
3552 sed -e "$ac_comsub
3553s%@configure_input@%$configure_input%g
3554s%@srcdir@%$srcdir%g
3555s%@top_srcdir@%$top_srcdir%g
3556s%@INSTALL@%$INSTALL%g
3557" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3558fi; done
3559rm -f conftest.subs
3560
db210d08
FF
3561# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3562# NAME is the cpp macro being defined and VALUE is the value it is being given.
3563#
3564# ac_d sets the value in "#define NAME VALUE" lines.
3565ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3566ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3567ac_dC='\3'
3568ac_dD='%g'
3569# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3570ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3571ac_uB='\([ ]\)%\1#\2define\3'
3572ac_uC=' '
3573ac_uD='\4%g'
3574# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3575ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3576ac_eB='$%\1#\2define\3'
3577ac_eC=' '
3578ac_eD='%g'
3579
18ea4416 3580CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
db210d08
FF
3581for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3582 # Support "outfile[:infile]", defaulting infile="outfile.in".
3583 case "$ac_file" in
3584 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3585 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3586 *) ac_file_in="${ac_file}.in" ;;
3587 esac
3588
3589 echo creating $ac_file
3590
3591 rm -f conftest.frag conftest.in conftest.out
3592 cp $ac_given_srcdir/$ac_file_in conftest.in
3593
3594EOF
3595
3596# Transform confdefs.h into a sed script conftest.vals that substitutes
3597# the proper values into config.h.in to produce config.h. And first:
b613bfbf 3598# Protect against being on the right side of a sed subst in config.status.
db210d08
FF
3599# Protect against being in an unquoted here document in config.status.
3600rm -f conftest.vals
3601cat > conftest.hdr <<\EOF
3602s/[\\&%]/\\&/g
3603s%[\\$`]%\\&%g
b613bfbf 3604s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
db210d08
FF
3605s%ac_d%ac_u%gp
3606s%ac_u%ac_e%gp
3607EOF
3608sed -n -f conftest.hdr confdefs.h > conftest.vals
3609rm -f conftest.hdr
3610
3611# This sed command replaces #undef with comments. This is necessary, for
3612# example, in the case of _POSIX_SOURCE, which is predefined and required
3613# on some systems where configure will not decide to define it.
3614cat >> conftest.vals <<\EOF
3615s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3616EOF
3617
3618# Break up conftest.vals because some shells have a limit on
3619# the size of here documents, and old seds have small limits too.
3620# Maximum number of lines to put in a single here document.
3621ac_max_here_lines=12
3622
3623rm -f conftest.tail
3624while :
3625do
3626 ac_lines=`grep -c . conftest.vals`
3627 # grep -c gives empty output for an empty file on some AIX systems.
3628 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3629 # Write a limited-size here document to conftest.frag.
3630 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3631 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3632 echo 'CEOF
3633 sed -f conftest.frag conftest.in > conftest.out
3634 rm -f conftest.in
3635 mv conftest.out conftest.in
3636' >> $CONFIG_STATUS
3637 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3638 rm -f conftest.vals
3639 mv conftest.tail conftest.vals
3640done
3641rm -f conftest.vals
3642
3643cat >> $CONFIG_STATUS <<\EOF
3644 rm -f conftest.frag conftest.h
3645 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3646 cat conftest.in >> conftest.h
3647 rm -f conftest.in
3648 if cmp -s $ac_file conftest.h 2>/dev/null; then
3649 echo "$ac_file is unchanged"
3650 rm -f conftest.h
3651 else
3652 rm -f $ac_file
3653 mv conftest.h $ac_file
3654 fi
3655fi; done
3656
5436fc65
C
3657EOF
3658
3659cat >> $CONFIG_STATUS <<EOF
3660ac_sources="$files"
3661ac_dests="$links"
3662EOF
3663
3664cat >> $CONFIG_STATUS <<\EOF
3665srcdir=$ac_given_srcdir
3666while test -n "$ac_sources"; do
3667 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3668 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3669
3670 echo "linking $srcdir/$ac_source to $ac_dest"
3671
3672 if test ! -r $srcdir/$ac_source; then
3673 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3674 fi
3675 rm -f $ac_dest
3676
3677 # Make relative symlinks.
3678 # Remove last slash and all that follows it. Not all systems have dirname.
3679 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3680 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3681 # The dest file is in a subdirectory.
3682 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3683 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3684 # A "../" for each directory in $ac_dest_dir_suffix.
3685 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3686 else
3687 ac_dest_dir_suffix= ac_dots=
3688 fi
3689
3690 case "$srcdir" in
3691 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3692 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3693 esac
3694
3695 # Make a symlink if possible; otherwise try a hard link.
3696 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3697 ln $srcdir/$ac_source $ac_dest; then :
3698 else
3699 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3700 fi
3701done
0a5a1821
C
3702EOF
3703cat >> $CONFIG_STATUS <<EOF
5436fc65 3704
0a5a1821
C
3705gdb_host_cpu=$gdb_host_cpu
3706gdb_target_cpu=$gdb_target_cpu
3707nativefile=$nativefile
3708
3709EOF
3710cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
3711
3712if test "${nativefile}" = ""; then
3713sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
3714 < Makefile > Makefile.tem
3715mv -f Makefile.tem Makefile
3716fi
3717
3718sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3719/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3720/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3721mv -f Makefile.tmp Makefile
3722
3723case ${srcdir} in
3724.)
3725;;
3726*)
3727grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3728echo "source ${srcdir}/.gdbinit" >> .gdbinit
3729esac
3730
31520669 3731case x$CONFIG_HEADERS in
18ea4416 3732xconfig.h:config.in)
31520669
FF
3733echo > stamp-h ;;
3734esac
3735
5436fc65
C
3736exit 0
3737EOF
3738chmod +x $CONFIG_STATUS
3739rm -fr confdefs* $ac_clean_files
3740test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3741
3742if test "$no_recursion" != yes; then
3743
3744 # Remove --cache-file and --srcdir arguments so they do not pile up.
3745 ac_sub_configure_args=
3746 ac_prev=
3747 for ac_arg in $ac_configure_args; do
3748 if test -n "$ac_prev"; then
3749 ac_prev=
3750 continue
3751 fi
3752 case "$ac_arg" in
3753 -cache-file | --cache-file | --cache-fil | --cache-fi \
3754 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3755 ac_prev=cache_file ;;
3756 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3757 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3758 ;;
3759 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3760 ac_prev=srcdir ;;
3761 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3762 ;;
3763 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3764 esac
3765 done
3766
3767 for ac_config_dir in $configdirs; do
3768
3769 # Do not complain, so a configure script can configure whichever
3770 # parts of a large source tree are present.
3771 if test ! -d $srcdir/$ac_config_dir; then
3772 continue
3773 fi
3774
3775 echo configuring in $ac_config_dir
3776
3777 case "$srcdir" in
3778 .) ;;
3779 *)
3780 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3781 else
3782 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3783 fi
3784 ;;
3785 esac
3786
3787 ac_popdir=`pwd`
3788 cd $ac_config_dir
3789
3790 case "$srcdir" in
3791 .) # No --srcdir option. We are building in place.
3792 ac_sub_srcdir=$srcdir ;;
3793 /*) # Absolute path.
3794 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3795 *) # Relative path.
3796 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3797 esac
3798
3799 # Check for guested configure; otherwise get Cygnus style configure.
3800 if test -f $ac_sub_srcdir/configure; then
3801 ac_sub_configure=$ac_sub_srcdir/configure
3802 elif test -f $ac_sub_srcdir/configure.in; then
3803 ac_sub_configure=$ac_configure
3804 else
3805 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3806 ac_sub_configure=
3807 fi
3808
3809 # The recursion is here.
3810 if test -n "$ac_sub_configure"; then
3811
3812 # Make the cache file name correct relative to the subdirectory.
3813 # A "../" for each directory in /$ac_config_dir.
3814 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3815 case "$cache_file" in
3816 /*) ac_sub_cache_file=$cache_file ;;
3817 *) # Relative path.
3818 ac_sub_cache_file="$ac_dots$cache_file" ;;
3819 esac
3820 case "$ac_given_INSTALL" in
3821 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3822 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3823 esac
3824
3825 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3826 # The eval makes quoting arguments work.
3827 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3828 then :
3829 else
3830 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3831 fi
3832 fi
3833
3834 cd $ac_popdir
3835 done
3836fi
3837
5e711e7f
PS
3838
3839exit 0
b7f3b6d5 3840
This page took 0.238423 seconds and 4 git commands to generate.