]> Git Repo - binutils.git/blame - gdb/configure
* configure.in: Recognize any sparc* cpu.
[binutils.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
3d78f532 4# Generated automatically using autoconf version 2.4
5436fc65
C
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-netrom "
188c635f
SG
16ac_help="$ac_help
17 --enable-gm "
3c0bf315
MM
18ac_help="$ac_help
19 --enable-sim-powerpc "
5436fc65
C
20ac_help="$ac_help
21 --enable-gdbtk "
22ac_help="$ac_help
23 --with-x use the X Window System"
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
3d78f532 78 -build | --build | --buil | --bui | --bu | --b)
5436fc65 79 ac_prev=build ;;
3d78f532 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]
3d78f532 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
3d78f532 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
3d78f532 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)
3d78f532 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
3d78f532 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.
3d78f532
SC
402ac_cpp='$CPP $CPPFLAGS'
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 [email protected].
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
5436fc65
C
420# Extract the first word of "gcc", so it can be a program name with args.
421set dummy gcc; ac_word=$2
422echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
423if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
424 echo $ac_n "(cached) $ac_c" 1>&6
425else
426 if test -n "$CC"; then
427 ac_cv_prog_CC="$CC" # Let the user override the test.
428else
429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 430 for ac_dir in $PATH; do
5436fc65
C
431 test -z "$ac_dir" && ac_dir=.
432 if test -f $ac_dir/$ac_word; then
433 ac_cv_prog_CC="gcc"
434 break
435 fi
436 done
437 IFS="$ac_save_ifs"
438 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
439fi
440fi
441CC="$ac_cv_prog_CC"
442if test -n "$CC"; then
443 echo "$ac_t""$CC" 1>&6
444else
445 echo "$ac_t""no" 1>&6
446fi
447
448
449echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
450if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
451 echo $ac_n "(cached) $ac_c" 1>&6
452else
453 cat > conftest.c <<EOF
454#ifdef __GNUC__
455 yes;
456#endif
457EOF
458if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
459 ac_cv_prog_gcc=yes
460else
461 ac_cv_prog_gcc=no
462fi
463fi
464echo "$ac_t""$ac_cv_prog_gcc" 1>&6
465if test $ac_cv_prog_gcc = yes; then
466 GCC=yes
467 if test "${CFLAGS+set}" != set; then
468 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
469if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
470 echo $ac_n "(cached) $ac_c" 1>&6
471else
472 echo 'void f(){}' > conftest.c
473if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
474 ac_cv_prog_gcc_g=yes
475else
476 ac_cv_prog_gcc_g=no
477fi
478rm -f conftest*
479
480fi
3d78f532 481 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
482 if test $ac_cv_prog_gcc_g = yes; then
483 CFLAGS="-g -O"
484 else
485 CFLAGS="-O"
486 fi
487 fi
488else
489 GCC=
490 test "${CFLAGS+set}" = set || CFLAGS="-g"
491fi
492
493echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
494# On Suns, sometimes $CPP names a directory.
495if test -n "$CPP" && test -d "$CPP"; then
496 CPP=
497fi
498if test -z "$CPP"; then
499if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
500 echo $ac_n "(cached) $ac_c" 1>&6
501else
502 # This must be in double quotes, not single quotes, because CPP may get
503 # substituted into the Makefile and "${CC-cc}" will confuse make.
504 CPP="${CC-cc} -E"
505 # On the NeXT, cc -E runs the code through the compiler's parser,
506 # not just through cpp.
507 cat > conftest.$ac_ext <<EOF
3d78f532 508#line 509 "configure"
5436fc65
C
509#include "confdefs.h"
510#include <assert.h>
511Syntax Error
512EOF
513eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
514ac_err=`grep -v '^ *+' conftest.out`
515if test -z "$ac_err"; then
516 :
517else
518 echo "$ac_err" >&5
519 rm -rf conftest*
520 CPP="${CC-cc} -E -traditional-cpp"
521 cat > conftest.$ac_ext <<EOF
3d78f532 522#line 523 "configure"
5436fc65
C
523#include "confdefs.h"
524#include <assert.h>
525Syntax Error
526EOF
527eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
528ac_err=`grep -v '^ *+' conftest.out`
529if test -z "$ac_err"; then
530 :
531else
532 echo "$ac_err" >&5
533 rm -rf conftest*
534 CPP=/lib/cpp
535fi
536rm -f conftest*
537fi
538rm -f conftest*
539 ac_cv_prog_CPP="$CPP"
540fi
dedcc91d
SC
541 CPP="$ac_cv_prog_CPP"
542else
543 ac_cv_prog_CPP="$CPP"
5436fc65 544fi
5436fc65
C
545echo "$ac_t""$CPP" 1>&6
546
547echo $ac_n "checking for AIX""... $ac_c" 1>&6
548cat > conftest.$ac_ext <<EOF
3d78f532 549#line 550 "configure"
5436fc65
C
550#include "confdefs.h"
551#ifdef _AIX
552 yes
553#endif
554
555EOF
556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
557 egrep "yes" >/dev/null 2>&1; then
558 rm -rf conftest*
559 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
560#define _ALL_SOURCE 1
561EOF
562
563else
564 rm -rf conftest*
565 echo "$ac_t""no" 1>&6
566fi
567rm -f conftest*
568
569
570ac_safe=`echo "minix/config.h" | tr './\055' '___'`
571echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
572if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
573 echo $ac_n "(cached) $ac_c" 1>&6
574else
575 cat > conftest.$ac_ext <<EOF
3d78f532 576#line 577 "configure"
5436fc65
C
577#include "confdefs.h"
578#include <minix/config.h>
579EOF
580eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
581ac_err=`grep -v '^ *+' conftest.out`
582if test -z "$ac_err"; then
583 rm -rf conftest*
584 eval "ac_cv_header_$ac_safe=yes"
585else
586 echo "$ac_err" >&5
587 rm -rf conftest*
588 eval "ac_cv_header_$ac_safe=no"
589fi
590rm -f conftest*
591fi
592if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
593 echo "$ac_t""yes" 1>&6
594 MINIX=yes
595else
596 echo "$ac_t""no" 1>&6
597MINIX=
598fi
599
600if test "$MINIX" = yes; then
601 cat >> confdefs.h <<\EOF
602#define _POSIX_SOURCE 1
603EOF
604
605 cat >> confdefs.h <<\EOF
606#define _POSIX_1_SOURCE 2
607EOF
608
609 cat >> confdefs.h <<\EOF
610#define _MINIX 1
611EOF
612
613fi
614
615echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
616if test -d /etc/conf/kconfig.d &&
617 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
618then
619 echo "$ac_t""yes" 1>&6
620 ISC=yes # If later tests want to check for ISC.
621 cat >> confdefs.h <<\EOF
622#define _POSIX_SOURCE 1
623EOF
624
625 if test "$GCC" = yes; then
626 CC="$CC -posix"
627 else
628 CC="$CC -Xp"
629 fi
630else
631 echo "$ac_t""no" 1>&6
632 ISC=
633fi
634
635
636ac_aux_dir=
637for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
638 if test -f $ac_dir/install-sh; then
639 ac_aux_dir=$ac_dir
640 ac_install_sh="$ac_aux_dir/install-sh -c"
641 break
642 elif test -f $ac_dir/install.sh; then
643 ac_aux_dir=$ac_dir
644 ac_install_sh="$ac_aux_dir/install.sh -c"
645 break
646 fi
647done
648if test -z "$ac_aux_dir"; then
649 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
650fi
651ac_config_guess=$ac_aux_dir/config.guess
652ac_config_sub=$ac_aux_dir/config.sub
653ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
654
655# Find a good install program. We prefer a C program (faster),
656# so one script is as good as another. But avoid the broken or
657# incompatible versions:
658# SysV /etc/install, /usr/sbin/install
659# SunOS /usr/etc/install
660# IRIX /sbin/install
661# AIX /bin/install
662# AFS /usr/afsws/bin/install, which mishandles nonexistent args
663# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
664# ./install, which can be erroneously created by make from ./install.sh.
665echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
666if test -z "$INSTALL"; then
667if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
668 echo $ac_n "(cached) $ac_c" 1>&6
669else
670 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
671 for ac_dir in $PATH; do
672 # Account for people who put trailing slashes in PATH elements.
673 case "$ac_dir/" in
674 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
675 *)
676 # OSF1 and SCO ODT 3.0 have their own names for install.
677 for ac_prog in ginstall installbsd scoinst install; do
678 if test -f $ac_dir/$ac_prog; then
679 if test $ac_prog = install &&
680 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
681 # AIX install. It has an incompatible calling convention.
682 # OSF/1 installbsd also uses dspmsg, but is usable.
683 :
684 else
685 ac_cv_path_install="$ac_dir/$ac_prog -c"
686 break 2
687 fi
688 fi
689 done
690 ;;
691 esac
692 done
693 IFS="$ac_save_ifs"
3d78f532
SC
694 # As a last resort, use the slow shell script.
695 test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
5436fc65 696fi
3d78f532 697 INSTALL="$ac_cv_path_install"
5436fc65
C
698fi
699echo "$ac_t""$INSTALL" 1>&6
700
701# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
702# It thinks the first close brace ends the variable substitution.
703test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
704
705test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
706
707# Extract the first word of "ranlib", so it can be a program name with args.
708set dummy ranlib; ac_word=$2
709echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
710if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
711 echo $ac_n "(cached) $ac_c" 1>&6
712else
713 if test -n "$RANLIB"; then
714 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
715else
716 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 717 for ac_dir in $PATH; do
5436fc65
C
718 test -z "$ac_dir" && ac_dir=.
719 if test -f $ac_dir/$ac_word; then
720 ac_cv_prog_RANLIB="ranlib"
721 break
722 fi
723 done
724 IFS="$ac_save_ifs"
725 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
726fi
727fi
728RANLIB="$ac_cv_prog_RANLIB"
729if test -n "$RANLIB"; then
730 echo "$ac_t""$RANLIB" 1>&6
731else
732 echo "$ac_t""no" 1>&6
733fi
734
204c8825
FF
735for ac_prog in 'bison -y' byacc
736do
737# Extract the first word of "$ac_prog", so it can be a program name with args.
738set dummy $ac_prog; ac_word=$2
739echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
740if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
741 echo $ac_n "(cached) $ac_c" 1>&6
742else
743 if test -n "$YACC"; then
744 ac_cv_prog_YACC="$YACC" # Let the user override the test.
745else
746 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
747 for ac_dir in $PATH; do
748 test -z "$ac_dir" && ac_dir=.
749 if test -f $ac_dir/$ac_word; then
750 ac_cv_prog_YACC="$ac_prog"
751 break
752 fi
753 done
754 IFS="$ac_save_ifs"
755fi
756fi
757YACC="$ac_cv_prog_YACC"
758if test -n "$YACC"; then
759 echo "$ac_t""$YACC" 1>&6
760else
761 echo "$ac_t""no" 1>&6
762fi
763
764test -n "$YACC" && break
765done
766test -n "$YACC" || YACC="yacc"
767
5436fc65
C
768
769ac_aux_dir=
770for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
771 if test -f $ac_dir/install-sh; then
772 ac_aux_dir=$ac_dir
773 ac_install_sh="$ac_aux_dir/install-sh -c"
774 break
775 elif test -f $ac_dir/install.sh; then
776 ac_aux_dir=$ac_dir
777 ac_install_sh="$ac_aux_dir/install.sh -c"
778 break
779 fi
780done
781if test -z "$ac_aux_dir"; then
782 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
783fi
784ac_config_guess=$ac_aux_dir/config.guess
785ac_config_sub=$ac_aux_dir/config.sub
786ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
787
788
789# Do some error checking and defaulting for the host and target type.
790# The inputs are:
791# configure --host=HOST --target=TARGET --build=BUILD NONOPT
792#
793# The rules are:
794# 1. You are not allowed to specify --host, --target, and nonopt at the
3d78f532 795# same time.
5436fc65
C
796# 2. Host defaults to nonopt.
797# 3. If nonopt is not specified, then host defaults to the current host,
798# as determined by config.guess.
799# 4. Target and build default to nonopt.
800# 5. If nonopt is not specified, then target and build default to host.
801
802# The aliases save the names the user supplied, while $host etc.
803# will get canonicalized.
804case $host---$target---$nonopt in
805NONE---*---* | *---NONE---* | *---*---NONE) ;;
806*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
807esac
808
809
810# Make sure we can run config.sub.
811if $ac_config_sub sun4 >/dev/null 2>&1; then :
812else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
813fi
814
815echo $ac_n "checking host system type""... $ac_c" 1>&6
816
817host_alias=$host
818case "$host_alias" in
819NONE)
820 case $nonopt in
821 NONE)
822 if host_alias=`$ac_config_guess`; then :
823 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
824 fi ;;
825 *) host_alias=$nonopt ;;
826 esac ;;
827esac
828
829host=`$ac_config_sub $host_alias`
830host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
831host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
832host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
833echo "$ac_t""$host" 1>&6
834
835echo $ac_n "checking target system type""... $ac_c" 1>&6
836
837target_alias=$target
838case "$target_alias" in
839NONE)
840 case $nonopt in
841 NONE) target_alias=$host_alias ;;
842 *) target_alias=$nonopt ;;
843 esac ;;
844esac
845
846target=`$ac_config_sub $target_alias`
847target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
848target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
849target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
850echo "$ac_t""$target" 1>&6
851
852echo $ac_n "checking build system type""... $ac_c" 1>&6
853
854build_alias=$build
855case "$build_alias" in
856NONE)
857 case $nonopt in
858 NONE) build_alias=$host_alias ;;
859 *) build_alias=$nonopt ;;
860 esac ;;
861esac
862
863build=`$ac_config_sub $build_alias`
864build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
865build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
866build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
867echo "$ac_t""$build" 1>&6
868
869test "$host_alias" != "$target_alias" &&
870 test "$program_prefix$program_suffix$program_transform_name" = \
871 NONENONEs,x,x, &&
872 program_prefix=${target_alias}-
873
874if test "$program_transform_name" = s,x,x,; then
875 program_transform_name=
876else
3d78f532
SC
877 # Double any \ or $.
878 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
5436fc65
C
879 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
880 rm -f conftestsed
881fi
882test "$program_prefix" != NONE &&
883 program_transform_name="s,^,${program_prefix},; $program_transform_name"
884# Use a double $ so make ignores it.
885test "$program_suffix" != NONE &&
886 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
887
888# sed with no file args requires a program.
889test "$program_transform_name" = "" && program_transform_name="s,x,x,"
890
891
2b576293
C
892# If we cannot run a trivial program, we must be cross compiling.
893echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
894if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
896else
897 if test "$cross_compiling" = yes; then
898 ac_cv_c_cross=yes
899else
900cat > conftest.$ac_ext <<EOF
3d78f532 901#line 902 "configure"
2b576293
C
902#include "confdefs.h"
903main(){return(0);}
904EOF
905eval $ac_link
906if test -s conftest && (./conftest; exit) 2>/dev/null; then
907 ac_cv_c_cross=no
908else
909 ac_cv_c_cross=yes
910fi
911fi
912rm -fr conftest*
913fi
7c40dd08 914cross_compiling=$ac_cv_c_cross
3d78f532 915echo "$ac_t""$ac_cv_c_cross" 1>&6
2b576293
C
916
917echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
918if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
919 echo $ac_n "(cached) $ac_c" 1>&6
920else
921 cat > conftest.$ac_ext <<EOF
3d78f532 922#line 923 "configure"
2b576293
C
923#include "confdefs.h"
924#include <stdlib.h>
925#include <stdarg.h>
926#include <string.h>
927#include <float.h>
928EOF
929eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
930ac_err=`grep -v '^ *+' conftest.out`
931if test -z "$ac_err"; then
932 rm -rf conftest*
933 ac_cv_header_stdc=yes
934else
935 echo "$ac_err" >&5
936 rm -rf conftest*
937 ac_cv_header_stdc=no
938fi
939rm -f conftest*
940
941if test $ac_cv_header_stdc = yes; then
942 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
943cat > conftest.$ac_ext <<EOF
3d78f532 944#line 945 "configure"
2b576293
C
945#include "confdefs.h"
946#include <string.h>
947EOF
948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
949 egrep "memchr" >/dev/null 2>&1; then
950 :
951else
952 rm -rf conftest*
953 ac_cv_header_stdc=no
954fi
955rm -f conftest*
956
957fi
958
959if test $ac_cv_header_stdc = yes; then
960 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
961cat > conftest.$ac_ext <<EOF
3d78f532 962#line 963 "configure"
2b576293
C
963#include "confdefs.h"
964#include <stdlib.h>
965EOF
966if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
967 egrep "free" >/dev/null 2>&1; then
968 :
969else
970 rm -rf conftest*
971 ac_cv_header_stdc=no
972fi
973rm -f conftest*
974
975fi
976
977if test $ac_cv_header_stdc = yes; then
978 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
979if test "$cross_compiling" = yes; then
3d78f532 980 ac_cv_header_stdc=no
2b576293
C
981else
982cat > conftest.$ac_ext <<EOF
3d78f532 983#line 984 "configure"
2b576293
C
984#include "confdefs.h"
985#include <ctype.h>
986#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
987#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
988#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
989int main () { int i; for (i = 0; i < 256; i++)
990if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
991exit (0); }
992
993EOF
994eval $ac_link
995if test -s conftest && (./conftest; exit) 2>/dev/null; then
996 :
997else
998 ac_cv_header_stdc=no
999fi
1000fi
1001rm -fr conftest*
1002fi
1003fi
1004echo "$ac_t""$ac_cv_header_stdc" 1>&6
1005if test $ac_cv_header_stdc = yes; then
1006 cat >> confdefs.h <<\EOF
1007#define STDC_HEADERS 1
1008EOF
1009
1010fi
1011
4708ac65 1012for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h
1a494973
C
1013do
1014ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1015echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1016if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1017 echo $ac_n "(cached) $ac_c" 1>&6
1018else
1019 cat > conftest.$ac_ext <<EOF
3d78f532 1020#line 1021 "configure"
1a494973
C
1021#include "confdefs.h"
1022#include <$ac_hdr>
1023EOF
1024eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1025ac_err=`grep -v '^ *+' conftest.out`
1026if test -z "$ac_err"; then
1027 rm -rf conftest*
1028 eval "ac_cv_header_$ac_safe=yes"
1029else
1030 echo "$ac_err" >&5
1031 rm -rf conftest*
1032 eval "ac_cv_header_$ac_safe=no"
1033fi
1034rm -f conftest*
1035fi
1036if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1037 echo "$ac_t""yes" 1>&6
3d78f532 1038 ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
1a494973
C
1039 cat >> confdefs.h <<EOF
1040#define $ac_tr_hdr 1
1041EOF
1042
1043else
1044 echo "$ac_t""no" 1>&6
1045fi
1046done
1047
2b576293
C
1048echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1049if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1050 echo $ac_n "(cached) $ac_c" 1>&6
1051else
1052 cat > conftest.$ac_ext <<EOF
3d78f532 1053#line 1054 "configure"
2b576293
C
1054#include "confdefs.h"
1055#include <sys/types.h>
1056#include <sys/stat.h>
1057
1058#if defined(S_ISBLK) && defined(S_IFDIR)
1059# if S_ISBLK (S_IFDIR)
1060You lose.
1061# endif
1062#endif
1063
1064#if defined(S_ISBLK) && defined(S_IFCHR)
1065# if S_ISBLK (S_IFCHR)
1066You lose.
1067# endif
1068#endif
1069
1070#if defined(S_ISLNK) && defined(S_IFREG)
1071# if S_ISLNK (S_IFREG)
1072You lose.
1073# endif
1074#endif
1075
1076#if defined(S_ISSOCK) && defined(S_IFREG)
1077# if S_ISSOCK (S_IFREG)
1078You lose.
1079# endif
1080#endif
1081
1082EOF
1083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1084 egrep "You lose" >/dev/null 2>&1; then
1085 rm -rf conftest*
1086 ac_cv_header_stat_broken=yes
1087else
1088 rm -rf conftest*
1089 ac_cv_header_stat_broken=no
1090fi
1091rm -f conftest*
1092
1093fi
1094echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1095if test $ac_cv_header_stat_broken = yes; then
1096 cat >> confdefs.h <<\EOF
1097#define STAT_MACROS_BROKEN 1
1098EOF
1099
1100fi
1101
1102
4708ac65
FF
1103echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
1104if eval "test \"`echo '$''{'gdb_have_gregset_t'+set}'`\" = set"; then
1105 echo $ac_n "(cached) $ac_c" 1>&6
1106else
1107 cat > conftest.$ac_ext <<EOF
3d78f532 1108#line 1109 "configure"
4708ac65
FF
1109#include "confdefs.h"
1110#include <sys/procfs.h>
1111int main() { return 0; }
1112int t() {
1113gregset_t *gregsetp = 0
1114; return 0; }
1115EOF
1116if eval $ac_link; then
1117 rm -rf conftest*
1118 gdb_have_gregset_t=yes
1119else
1120 rm -rf conftest*
1121 gdb_have_gregset_t=no
1122fi
1123rm -f conftest*
1124
1125fi
1126
1127echo "$ac_t""$gdb_have_gregset_t" 1>&6
1128if test $gdb_have_gregset_t = yes; then
1129 cat >> confdefs.h <<\EOF
1130#define HAVE_GREGSET_T 1
1131EOF
1132
1133fi
1134
1135echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
1136if eval "test \"`echo '$''{'gdb_have_fpregset_t'+set}'`\" = set"; then
1137 echo $ac_n "(cached) $ac_c" 1>&6
1138else
1139 cat > conftest.$ac_ext <<EOF
3d78f532 1140#line 1141 "configure"
4708ac65
FF
1141#include "confdefs.h"
1142#include <sys/procfs.h>
1143int main() { return 0; }
1144int t() {
1145fpregset_t *fpregsetp = 0
1146; return 0; }
1147EOF
1148if eval $ac_link; then
1149 rm -rf conftest*
1150 gdb_have_fpregset_t=yes
1151else
1152 rm -rf conftest*
1153 gdb_have_fpregset_t=no
1154fi
1155rm -f conftest*
1156
1157fi
1158
1159echo "$ac_t""$gdb_have_fpregset_t" 1>&6
1160if test $gdb_have_fpregset_t = yes; then
1161 cat >> confdefs.h <<\EOF
1162#define HAVE_FPREGSET_T 1
1163EOF
1164
1165fi
1166
2b576293
C
1167echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1168if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1169 echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171 if test "$cross_compiling" = yes; then
1172 ac_cv_func_mmap=no
1173else
1174cat > conftest.$ac_ext <<EOF
3d78f532 1175#line 1176 "configure"
2b576293
C
1176#include "confdefs.h"
1177
1178/* Thanks to Mike Haertel and Jim Avera for this test. */
1179#include <sys/types.h>
1180#include <fcntl.h>
1181#include <sys/mman.h>
1182
3d78f532
SC
1183#ifdef BSD
1184# ifndef BSD4_1
1185# define HAVE_GETPAGESIZE
1186# endif
1187#endif
1188
2b576293
C
1189#ifndef HAVE_GETPAGESIZE
1190# include <sys/param.h>
1191# ifdef EXEC_PAGESIZE
1192# define getpagesize() EXEC_PAGESIZE
1193# else
1194# ifdef NBPG
1195# define getpagesize() NBPG * CLSIZE
1196# ifndef CLSIZE
1197# define CLSIZE 1
1198# endif
1199# else
1200# ifdef NBPC
1201# define getpagesize() NBPC
1202# else
1203# define getpagesize() PAGESIZE /* SVR4 */
1204# endif
1205# endif
1206# endif
1207#endif
1208
3d78f532 1209#ifdef __osf__
2b576293
C
1210# define valloc malloc
1211#endif
1212
1213#ifdef __cplusplus
1214extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1215#else
1216char *valloc(), *malloc();
1217#endif
1218
1219int
1220main()
1221{
1222 char *buf1, *buf2, *buf3;
1223 int i = getpagesize(), j;
3d78f532 1224 int i2 = getpagesize()*2;
2b576293
C
1225 int fd;
1226
1227 buf1 = (char *)valloc(i2);
1228 buf2 = (char *)valloc(i);
1229 buf3 = (char *)malloc(i2);
1230 for (j = 0; j < i2; ++j)
1231 *(buf1 + j) = rand();
1232 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1233 write(fd, buf1, i2);
1234 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1235 for (j = 0; j < i; ++j)
1236 if (*(buf1 + j) != *(buf2 + j))
1237 exit(1);
1238 lseek(fd, (long)i, 0);
1239 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1240 /* (it does in i386 SVR4.0 - Jim Avera, [email protected]) */
1241 lseek(fd, (long)0, 0);
1242 read(fd, buf3, i2);
1243 for (j = 0; j < i2; ++j)
1244 if (*(buf1 + j) != *(buf3 + j))
1245 exit(1);
1246 exit(0);
1247}
1248
1249EOF
1250eval $ac_link
1251if test -s conftest && (./conftest; exit) 2>/dev/null; then
1252 ac_cv_func_mmap=yes
1253else
1254 ac_cv_func_mmap=no
1255fi
1256fi
1257rm -fr conftest*
1258fi
1259echo "$ac_t""$ac_cv_func_mmap" 1>&6
1260if test $ac_cv_func_mmap = yes; then
1261 cat >> confdefs.h <<\EOF
1262#define HAVE_MMAP 1
1263EOF
1264
1265fi
1266
5436fc65
C
1267
1268ENABLE_CFLAGS=
1269ENABLE_CLIBS=
1270ENABLE_OBS=
1271
1272# Check whether --enable-netrom or --disable-netrom was given.
3d78f532
SC
1273enableval="$enable_netrom"
1274if test -n "$enableval"; then
5436fc65
C
1275 case "${enableval}" in
1276yes) enable_netrom=yes ;;
1277no) enable_netrom=no ;;
1278*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1279esac
1280fi
1281
1282
1283if test "${enable_netrom}" = "yes"; then
1284 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1285fi
1286
188c635f
SG
1287# start-sanitize-gm
1288ENABLE_GM=
1289
1290# Check whether --enable-gm or --disable-gm was given.
3d78f532
SC
1291enableval="$enable_gm"
1292if test -n "$enableval"; then
188c635f 1293 case "${enableval}" in
1a57cd09 1294yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
1295 ENABLE_CFLAGS=-DGENERAL_MAGIC
1296 ;;
1297no) ;;
1298*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1299esac
1300fi
1301
1302
1303# end-sanitize-gm
1304
3c0bf315 1305# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
3d78f532
SC
1306enableval="$enable_sim_powerpc"
1307if test -n "$enableval"; then
3c0bf315
MM
1308 case "${enableval}" in
1309yes) powerpc_sim=yes ;;
1310no) powerpc_sim=no ;;
1311*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1312esac
1313else
1314 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1315fi
1316
1317
5436fc65
C
1318# start-sanitize-gdbtk
1319ENABLE_GDBTK=
1320
1321# Check whether --enable-gdbtk or --disable-gdbtk was given.
3d78f532
SC
1322enableval="$enable_gdbtk"
1323if test -n "$enableval"; then
5436fc65 1324 case "${enableval}" in
0fe1522a
SG
1325 yes)
1326 case "$host" in
1327 *go32*)
1328 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1329 enable_gdbtk=no ;;
1330 *)
1331 enable_gdbtk=yes ;;
1332 esac ;;
1333 no)
1334 enable_gdbtk=no ;;
1335 *)
1336 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 1337esac
0fe1522a
SG
1338else
1339
1340# Default is on for everything but go32
1341case "$host" in
1342 *go32*)
1343 ;;
1344 *)
1345 enable_gdbtk=yes ;;
1346 esac
1347
5436fc65
C
1348fi
1349
1350
1351if test "${enable_gdbtk}" = "yes"; then
0fe1522a 1352
a2b63bbd 1353 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1354# paths, otherwise set no_x=yes.
1355# Uses ac_ vars as temps to allow command line to override cache and checks.
1356# --without-x overrides everything else, but does not touch the cache.
1357echo $ac_n "checking for X""... $ac_c" 1>&6
1358
1359# Check whether --with-x or --without-x was given.
3d78f532
SC
1360withval="$with_x"
1361if test -n "$withval"; then
5436fc65
C
1362 :
1363fi
1364
1365if test "x$with_x" = xno; then
1366 no_x=yes
1367else
1368 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1369 no_x=
1370 else
1371if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1372 echo $ac_n "(cached) $ac_c" 1>&6
1373else
1374 # One or both of the vars are not set, and there is no cached value.
1375no_x=yes
1376rm -fr conftestdir
1377if mkdir conftestdir; then
1378 cd conftestdir
1379 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1380 cat > Imakefile <<'EOF'
1381acfindx:
1382 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1383EOF
1384 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1385 no_x=
1386 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3d78f532 1387 eval `make acfindx 2>/dev/null | grep -v make`
5436fc65 1388 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1389 for ac_extension in a so sl; do
1390 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1391 test -f $ac_im_libdir/libX11.$ac_extension; then
1392 ac_im_usrlibdir=$ac_im_libdir; break
1393 fi
1394 done
5436fc65
C
1395 # Screen out bogus values from the imake configuration.
1396 case "$ac_im_incroot" in
1397 /usr/include) ;;
1398 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1399 esac
1400 case "$ac_im_usrlibdir" in
1401 /usr/lib | /lib) ;;
1402 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1403 esac
1404 fi
1405 cd ..
1406 rm -fr conftestdir
1407fi
1408
1409if test "$no_x" = yes; then
1410test -z "$x_direct_test_library" && x_direct_test_library=Xt
1411test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1412test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1413cat > conftest.$ac_ext <<EOF
3d78f532 1414#line 1415 "configure"
5436fc65
C
1415#include "confdefs.h"
1416#include <$x_direct_test_include>
1417EOF
1418eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1419ac_err=`grep -v '^ *+' conftest.out`
1420if test -z "$ac_err"; then
1421 rm -rf conftest*
1422 no_x= ac_x_includes=
1423else
1424 echo "$ac_err" >&5
1425 rm -rf conftest*
1426 for ac_dir in \
1427 /usr/X11R6/include \
1428 /usr/X11R5/include \
1429 /usr/X11R4/include \
1430 \
1431 /usr/include/X11R6 \
1432 /usr/include/X11R5 \
1433 /usr/include/X11R4 \
1434 \
1435 /usr/local/X11R6/include \
1436 /usr/local/X11R5/include \
1437 /usr/local/X11R4/include \
1438 \
1439 /usr/local/include/X11R6 \
1440 /usr/local/include/X11R5 \
1441 /usr/local/include/X11R4 \
1442 \
1443 /usr/X11/include \
1444 /usr/include/X11 \
1445 /usr/local/X11/include \
1446 /usr/local/include/X11 \
1447 \
1448 /usr/X386/include \
1449 /usr/x386/include \
1450 /usr/XFree86/include/X11 \
1451 \
1452 /usr/include \
1453 /usr/local/include \
1454 /usr/unsupported/include \
1455 /usr/athena/include \
1456 /usr/local/x11r5/include \
1457 /usr/lpp/Xamples/include \
1458 \
1459 /usr/openwin/include \
1460 /usr/openwin/share/include \
1461 ; \
1462 do
1463 if test -r "$ac_dir/$x_direct_test_include"; then
1464 no_x= ac_x_includes=$ac_dir
1465 break
1466 fi
1467 done
1468fi
1469rm -f conftest*
1470
1471# Check for the libraries.
1472# See if we find them without any special options.
1473# Don't add to $LIBS permanently.
1474ac_save_LIBS="$LIBS"
1475LIBS="-l$x_direct_test_library $LIBS"
1476cat > conftest.$ac_ext <<EOF
3d78f532 1477#line 1478 "configure"
5436fc65
C
1478#include "confdefs.h"
1479
1480int main() { return 0; }
1481int t() {
1482${x_direct_test_function}()
1483; return 0; }
1484EOF
1485if eval $ac_link; then
1486 rm -rf conftest*
1487 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1488else
1489 rm -rf conftest*
1490 LIBS="$ac_save_LIBS"
1491# First see if replacing the include by lib works.
1492for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1493 /usr/X11R6/lib \
1494 /usr/X11R5/lib \
1495 /usr/X11R4/lib \
1496 \
1497 /usr/lib/X11R6 \
1498 /usr/lib/X11R5 \
1499 /usr/lib/X11R4 \
1500 \
1501 /usr/local/X11R6/lib \
1502 /usr/local/X11R5/lib \
1503 /usr/local/X11R4/lib \
1504 \
1505 /usr/local/lib/X11R6 \
1506 /usr/local/lib/X11R5 \
1507 /usr/local/lib/X11R4 \
1508 \
1509 /usr/X11/lib \
1510 /usr/lib/X11 \
1511 /usr/local/X11/lib \
1512 /usr/local/lib/X11 \
1513 \
1514 /usr/X386/lib \
1515 /usr/x386/lib \
1516 /usr/XFree86/lib/X11 \
1517 \
1518 /usr/lib \
1519 /usr/local/lib \
1520 /usr/unsupported/lib \
1521 /usr/athena/lib \
1522 /usr/local/x11r5/lib \
1523 /usr/lpp/Xamples/lib \
1524 \
1525 /usr/openwin/lib \
1526 /usr/openwin/share/lib \
1527 ; \
1528do
1529 for ac_extension in a so sl; do
1530 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1531 no_x= ac_x_libraries=$ac_dir
1532 break 2
1533 fi
1534 done
1535done
1536fi
1537rm -f conftest*
1538
1539fi
1540if test "$no_x" = yes; then
1541 ac_cv_path_x="no_x=yes"
1542else
1543 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1544fi
1545fi
1546 fi
1547 eval "$ac_cv_path_x"
1548fi # $with_x != no
1549
1550if test "$no_x" = yes; then
1551 echo "$ac_t""no" 1>&6
1552else
1553 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1554 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1555 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1556 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1557fi
1558
a2b63bbd 1559 if test "$no_x" = yes; then
5436fc65
C
1560 # Not all programs may use this symbol, but it does not hurt to define it.
1561 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1562else
1563 if test -n "$x_includes"; then
1564 X_CFLAGS="$X_CFLAGS -I$x_includes"
1565 fi
1566
1567 # It would be nice to have a more robust check for the -R ld option than
1568 # just checking for Solaris.
1569 # It would also be nice to do this for all -L options, not just this one.
1570 if test -n "$x_libraries"; then
1571 X_LIBS="$X_LIBS -L$x_libraries"
1572 if test "`(uname) 2>/dev/null`" = SunOS &&
1573 uname -r | grep '^5' >/dev/null; then
3d78f532 1574 X_LIBS="$X_LIBS -R$x_libraries"
5436fc65
C
1575 fi
1576 fi
1577
1578 # Check for libraries that X11R6 Xt/Xaw programs need.
1579
1580 ac_save_LDFLAGS="$LDFLAGS"
1581 LDFLAGS="$LDFLAGS -L$x_libraries"
1582 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1583 # check for ICE first), but we must link in the order -lSM -lICE or
1584 # we get undefined symbols. So assume we have SM if we have ICE.
1585 # These have to be linked with before -lX11, unlike the other
1586 # libraries we check for below, so use a different variable.
1587 # [email protected], [email protected].
1588 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
3d78f532 1589if eval "test \"`echo '$''{'ac_cv_lib_ICE'+set}'`\" = set"; then
5436fc65
C
1590 echo $ac_n "(cached) $ac_c" 1>&6
1591else
1592 ac_save_LIBS="$LIBS"
1593LIBS="-lICE $LIBS"
1594cat > conftest.$ac_ext <<EOF
3d78f532 1595#line 1596 "configure"
5436fc65
C
1596#include "confdefs.h"
1597
1598int main() { return 0; }
1599int t() {
1600IceConnectionNumber()
1601; return 0; }
1602EOF
1603if eval $ac_link; then
1604 rm -rf conftest*
3d78f532 1605 eval "ac_cv_lib_ICE=yes"
5436fc65
C
1606else
1607 rm -rf conftest*
3d78f532 1608 eval "ac_cv_lib_ICE=no"
5436fc65
C
1609fi
1610rm -f conftest*
1611LIBS="$ac_save_LIBS"
1612
1613fi
3d78f532 1614if eval "test \"`echo '$ac_cv_lib_'ICE`\" = yes"; then
5436fc65
C
1615 echo "$ac_t""yes" 1>&6
1616 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1617else
1618 echo "$ac_t""no" 1>&6
1619fi
1620
1621 LDFLAGS="$ac_save_LDFLAGS"
1622
1623 # Check for system-dependent libraries X programs must link with.
1624
1625 if test "$ISC" = yes; then
1626 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1627 else
1628 # [email protected] says this is needed for Ultrix, if the X
1629 # libraries were built with DECnet support. And [email protected] says
1630 # the Alpha needs dnet_stub (dnet does not exist).
1631 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
3d78f532 1632if eval "test \"`echo '$''{'ac_cv_lib_dnet'+set}'`\" = set"; then
5436fc65
C
1633 echo $ac_n "(cached) $ac_c" 1>&6
1634else
1635 ac_save_LIBS="$LIBS"
1636LIBS="-ldnet $LIBS"
1637cat > conftest.$ac_ext <<EOF
3d78f532 1638#line 1639 "configure"
5436fc65
C
1639#include "confdefs.h"
1640
1641int main() { return 0; }
1642int t() {
1643dnet_ntoa()
1644; return 0; }
1645EOF
1646if eval $ac_link; then
1647 rm -rf conftest*
3d78f532 1648 eval "ac_cv_lib_dnet=yes"
5436fc65
C
1649else
1650 rm -rf conftest*
3d78f532 1651 eval "ac_cv_lib_dnet=no"
5436fc65
C
1652fi
1653rm -f conftest*
1654LIBS="$ac_save_LIBS"
1655
1656fi
3d78f532 1657if eval "test \"`echo '$ac_cv_lib_'dnet`\" = yes"; then
5436fc65
C
1658 echo "$ac_t""yes" 1>&6
1659 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1660else
1661 echo "$ac_t""no" 1>&6
1662fi
1663
1664 if test $ac_cv_lib_dnet = no; then
1665 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
3d78f532 1666if eval "test \"`echo '$''{'ac_cv_lib_dnet_stub'+set}'`\" = set"; then
5436fc65
C
1667 echo $ac_n "(cached) $ac_c" 1>&6
1668else
1669 ac_save_LIBS="$LIBS"
1670LIBS="-ldnet_stub $LIBS"
1671cat > conftest.$ac_ext <<EOF
3d78f532 1672#line 1673 "configure"
5436fc65
C
1673#include "confdefs.h"
1674
1675int main() { return 0; }
1676int t() {
1677dnet_ntoa()
1678; return 0; }
1679EOF
1680if eval $ac_link; then
1681 rm -rf conftest*
3d78f532 1682 eval "ac_cv_lib_dnet_stub=yes"
5436fc65
C
1683else
1684 rm -rf conftest*
3d78f532 1685 eval "ac_cv_lib_dnet_stub=no"
5436fc65
C
1686fi
1687rm -f conftest*
1688LIBS="$ac_save_LIBS"
1689
1690fi
3d78f532 1691if eval "test \"`echo '$ac_cv_lib_'dnet_stub`\" = yes"; then
5436fc65
C
1692 echo "$ac_t""yes" 1>&6
1693 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1694else
1695 echo "$ac_t""no" 1>&6
1696fi
1697
1698 fi
1699
1700 # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
1701 # to get the SysV transport functions.
1702 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1703 # check for it.
1704 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
3d78f532 1705if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
5436fc65
C
1706 echo $ac_n "(cached) $ac_c" 1>&6
1707else
1708 ac_save_LIBS="$LIBS"
1709LIBS="-lnsl $LIBS"
1710cat > conftest.$ac_ext <<EOF
3d78f532 1711#line 1712 "configure"
5436fc65
C
1712#include "confdefs.h"
1713
1714int main() { return 0; }
1715int t() {
1716t_accept()
1717; return 0; }
1718EOF
1719if eval $ac_link; then
1720 rm -rf conftest*
3d78f532 1721 eval "ac_cv_lib_nsl=yes"
5436fc65
C
1722else
1723 rm -rf conftest*
3d78f532 1724 eval "ac_cv_lib_nsl=no"
5436fc65
C
1725fi
1726rm -f conftest*
1727LIBS="$ac_save_LIBS"
1728
1729fi
3d78f532 1730if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
5436fc65
C
1731 echo "$ac_t""yes" 1>&6
1732 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1733else
1734 echo "$ac_t""no" 1>&6
1735fi
1736
1737
1738 # [email protected] says without -lsocket,
1739 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1740 # But -lsocket is broken on IRIX, according to [email protected].
1741 if test "`(uname) 2>/dev/null`" != IRIX; then
1742 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
3d78f532 1743if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
5436fc65
C
1744 echo $ac_n "(cached) $ac_c" 1>&6
1745else
1746 ac_save_LIBS="$LIBS"
1747LIBS="-lsocket $LIBS"
1748cat > conftest.$ac_ext <<EOF
3d78f532 1749#line 1750 "configure"
5436fc65
C
1750#include "confdefs.h"
1751
1752int main() { return 0; }
1753int t() {
1754socket()
1755; return 0; }
1756EOF
1757if eval $ac_link; then
1758 rm -rf conftest*
3d78f532 1759 eval "ac_cv_lib_socket=yes"
5436fc65
C
1760else
1761 rm -rf conftest*
3d78f532 1762 eval "ac_cv_lib_socket=no"
5436fc65
C
1763fi
1764rm -f conftest*
1765LIBS="$ac_save_LIBS"
1766
1767fi
3d78f532 1768if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
5436fc65
C
1769 echo "$ac_t""yes" 1>&6
1770 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1771else
1772 echo "$ac_t""no" 1>&6
1773fi
1774
1775 fi
1776 fi
1777fi
1778
1779
a2b63bbd 1780
4e327047 1781
5436fc65 1782#
4e327047
TT
1783# Ok, lets find the tcl source trees so we can use the headers
1784# Warning: transition of version 9 to 10 will break this algorithm
1785# because 10 sorts before 9. We also look for just tcl. We have to
1786# be careful that we don't match stuff like tclX by accident.
1787# the alternative search directory is involked by --with-tclinclude
5436fc65 1788#
4e327047
TT
1789no_tcl=true
1790echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
1791# Check whether --with-tclinclude or --without-tclinclude was given.
3d78f532
SC
1792withval="$with_tclinclude"
1793if test -n "$withval"; then
4e327047
TT
1794 with_tclinclude=${withval}
1795fi
1796
1797if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
1798 echo $ac_n "(cached) $ac_c" 1>&6
1799else
1800
1801# first check to see if --with-tclinclude was specified
1802if test x"${with_tclinclude}" != x ; then
1803 if test -f ${with_tclinclude}/tclInt.h ; then
1804 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5436fc65 1805 else
4e327047
TT
1806 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
1807 fi
1808fi
1809# next check in private source directory
1810#
1811# since ls returns lowest version numbers first, reverse its output
1812if test x"${ac_cv_c_tclh}" = x ; then
1813 for i in \
1814 ${srcdir}/../tcl \
1815 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` \
1816 ${srcdir}/../../tcl \
1817 `ls -dr ${srcdir}/../../tcl[0-9]* 2>/dev/null` \
1818 ${srcdir}/../../../tcl \
1819 `ls -dr ${srcdir}/../../../tcl[0-9]* 2>/dev/null ` ; do
1820 if test -f $i/tclInt.h ; then
1821 ac_cv_c_tclh=`(cd $i; pwd)`
1822 break
1823 fi
1824 # Tcl 7.5 and greater puts headers in subdirectory.
1825 if test -f $i/generic/tclInt.h ; then
1826 ac_cv_c_tclh=`(cd $i; pwd)`/generic
1827 fi
1828 done
1829fi
1830# finally check in a few common install locations
1831#
1832# since ls returns lowest version numbers first, reverse its output
1833if test x"${ac_cv_c_tclh}" = x ; then
1834 for i in \
1835 `ls -dr /usr/local/src/tcl[0-9]* 2>/dev/null` \
1836 `ls -dr /usr/local/lib/tcl[0-9]* 2>/dev/null` \
1837 /usr/local/src/tcl \
1838 /usr/local/lib/tcl \
1839 ${prefix}/include ; do
1840 if test -f $i/tclInt.h ; then
1841 ac_cv_c_tclh=`(cd $i; pwd)`
1842 break
1843 fi
1844 done
1845fi
1846# see if one is installed
1847if test x"${ac_cv_c_tclh}" = x ; then
1848 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
1849echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5436fc65
C
1850if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
1852else
1853 cat > conftest.$ac_ext <<EOF
3d78f532 1854#line 1855 "configure"
5436fc65 1855#include "confdefs.h"
4e327047 1856#include <tclInt.h>
5436fc65
C
1857EOF
1858eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1859ac_err=`grep -v '^ *+' conftest.out`
1860if test -z "$ac_err"; then
1861 rm -rf conftest*
1862 eval "ac_cv_header_$ac_safe=yes"
1863else
1864 echo "$ac_err" >&5
1865 rm -rf conftest*
1866 eval "ac_cv_header_$ac_safe=no"
1867fi
1868rm -f conftest*
1869fi
1870if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1871 echo "$ac_t""yes" 1>&6
4e327047 1872 ac_cv_c_tclh=installed
5436fc65
C
1873else
1874 echo "$ac_t""no" 1>&6
4e327047 1875ac_cv_c_tclh=""
5436fc65
C
1876fi
1877
4e327047
TT
1878fi
1879
1880fi
1881
1882if test x"${ac_cv_c_tclh}" = x ; then
1883 TCLHDIR="# no Tcl private headers found"
1884 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
1885fi
1886if test x"${ac_cv_c_tclh}" != x ; then
1887 no_tcl=""
1888 if test x"${ac_cv_c_tkh}" = x"installed" ; then
1889 echo "$ac_t""is installed" 1>&6
1890 TCLHDIR=""
1891 else
1892 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
1893 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
1894 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 1895 fi
5436fc65 1896fi
4e327047
TT
1897
1898echo $ac_n "checking Tcl version""... $ac_c" 1>&6
1899rm -rf tclmajor tclminor
1900orig_includes="$CPPFLAGS"
1901
1902if test x"${TCLHDIR}" != x ; then
1903 CPPFLAGS="$CPPFLAGS $TCLHDIR"
1904fi
1905
1906if test "$cross_compiling" = yes; then
1907 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
1908
1909else
1910cat > conftest.$ac_ext <<EOF
3d78f532 1911#line 1912 "configure"
4e327047
TT
1912#include "confdefs.h"
1913
1914#include <stdio.h>
1915#include "tcl.h"
1916main() {
1917 FILE *maj = fopen("tclmajor","w");
1918 FILE *min = fopen("tclminor","w");
1919 fprintf(maj,"%d",TCL_MAJOR_VERSION);
1920 fprintf(min,"%d",TCL_MINOR_VERSION);
1921 fclose(maj);
1922 fclose(min);
1923 return 0;
1924}
1925EOF
1926eval $ac_link
1927if test -s conftest && (./conftest; exit) 2>/dev/null; then
1928 tclmajor=`cat tclmajor`
1929 tclminor=`cat tclminor`
1930 tclversion=$tclmajor.$tclminor
1931 echo "$ac_t""$tclversion" 1>&6
1932 rm -f tclmajor tclminor
1933
1934else
1935 echo "$ac_t""can't happen" 1>&6
1936
1937fi
5436fc65 1938fi
4e327047
TT
1939rm -fr conftest*
1940CPPFLAGS="${orig_includes}"
1941
5436fc65 1942
4e327047
TT
1943
1944
1945
5436fc65 1946#
4e327047 1947# Ok, lets find the tcl library
5436fc65 1948# First, look for one uninstalled.
4e327047 1949# the alternative search directory is invoked by --with-tcllib
5436fc65 1950#
4e327047
TT
1951
1952if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
1953 installedtcllibroot=tcl$tclversion
1954else
1955 installedtcllibroot=tcl
1956fi
1957
1958if test x"${no_tcl}" = x ; then
1959 # we reset no_tcl incase something fails here
1960 no_tcl=true
1961 # Check whether --with-tcllib or --without-tcllib was given.
3d78f532
SC
1962withval="$with_tcllib"
1963if test -n "$withval"; then
4e327047
TT
1964 with_tcllib=${withval}
1965fi
1966
1967 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
1968 if eval "test \"`echo '$''{'ac_cv_c_tcllib'+set}'`\" = set"; then
1969 echo $ac_n "(cached) $ac_c" 1>&6
1970else
1971
1972 # First check to see if --with-tcllib was specified.
1973 # This requires checking for both the installed and uninstalled name-styles
1974 # since we have no idea if it's installed or not.
1975 if test x"${with_tcllib}" != x ; then
1976 if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
1977 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
1978 elif test -f "${with_tcllib}/libtcl.so" ; then
1979 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
1980 # then look for a freshly built statically linked library
1981 # if Makefile exists we assume its configured and libtcl will be built first.
1982 elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
1983 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
1984 elif test -f "${with_tcllib}/libtcl.a" ; then
1985 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
1986 else
1987 { echo "configure: error: ${with_tcllib} directory doesn't contain libraries" 1>&2; exit 1; }
1988 fi
5436fc65 1989 fi
4e327047
TT
1990 # then check for a private Tcl library
1991 # Since these are uninstalled, use the simple lib name root.
1992 if test x"${ac_cv_c_tcllib}" = x ; then
1993 for i in \
1994 ../tcl \
1995 `ls -dr ../tcl[0-9]* 2>/dev/null` \
1996 ../../tcl \
1997 `ls -dr ../../tcl[0-9]* 2>/dev/null` \
1998 ../../../tcl \
1999 `ls -dr ../../../tcl[0-9]* 2>/dev/null` ; do
2000 # Tcl 7.5 and greater puts library in subdir. Look there first.
2001 if test -f "$i/unix/libtcl.so" ; then
2002 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2003 break
2004 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2005 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2006 break
2007 # look for a freshly built dynamically linked library
2008 elif test -f "$i/libtcl.so" ; then
2009 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2010 break
2011
2012 # then look for a freshly built statically linked library
2013 # if Makefile exists we assume its configured and libtcl will be
2014 # built first.
2015 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2016 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2017 break
2018 fi
2019 done
5436fc65 2020 fi
4e327047
TT
2021 # check in a few common install locations
2022 if test x"${ac_cv_c_tcllib}" = x ; then
2023 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2024 # first look for a freshly built dynamically linked library
2025 if test -f "$i/lib$installedtcllibroot.so" ; then
2026 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
2027 break
2028 # then look for a freshly built statically linked library
2029 # if Makefile exists we assume its configured and libtcl will be built first.
2030 elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
2031 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
2032 break
2033 fi
2034 done
5436fc65 2035 fi
4e327047
TT
2036 # check in a few other private locations
2037 if test x"${ac_cv_c_tcllib}" = x ; then
2038 for i in \
2039 ${srcdir}/../tcl \
2040 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` ; do
2041 # Tcl 7.5 and greater puts library in subdir. Look there first.
2042 if test -f "$i/unix/libtcl.so" ; then
2043 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2044 break
2045 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2046 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2047 break
2048 # look for a freshly built dynamically linked library
2049 elif test -f "$i/libtcl.so" ; then
2050 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2051 break
2052
2053 # then look for a freshly built statically linked library
2054 # if Makefile exists we assume its configured and libtcl will be
2055 # built first.
2056 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2057 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2058 break
2059 fi
2060 done
2061 fi
2062
2063 # see if one is conveniently installed with the compiler
2064 if test x"${ac_cv_c_tcllib}" = x ; then
2065 orig_libs="$LIBS"
2066 LIBS="$LIBS -l$installedtcllibroot -lm"
2067 if test "$cross_compiling" = yes; then
2068 ac_cv_c_tclib="-l$installedtcllibroot"
2069else
2070cat > conftest.$ac_ext <<EOF
3d78f532 2071#line 2072 "configure"
4e327047
TT
2072#include "confdefs.h"
2073
2074 Tcl_AppInit()
2075 { exit(0); }
2076EOF
2077eval $ac_link
2078if test -s conftest && (./conftest; exit) 2>/dev/null; then
2079 ac_cv_c_tcllib="-l$installedtcllibroot"
2080else
2081 ac_cv_c_tcllib=""
2082
2083fi
2084fi
2085rm -fr conftest*
2086 LIBS="${orig_libs}"
2087 fi
2088
5436fc65
C
2089fi
2090
4e327047
TT
2091 if test x"${ac_cv_c_tcllib}" = x ; then
2092 TCLLIB="# no Tcl library found"
2093 echo "configure: warning: Can't find Tcl library" 1>&2
2094 else
2095 TCLLIB=${ac_cv_c_tcllib}
2096 echo "$ac_t""found $TCLLIB" 1>&6
2097 no_tcl=
5436fc65 2098 fi
5436fc65
C
2099fi
2100
5436fc65
C
2101
2102
2103
2104
a2b63bbd 2105
4e327047 2106
5436fc65 2107#
4e327047
TT
2108# Ok, lets find the tk source trees so we can use the headers
2109# If the directory (presumably symlink) named "tk" exists, use that one
2110# in preference to any others. Same logic is used when choosing library
2111# and again with Tcl. The search order is the best place to look first, then in
2112# decreasing significance. The loop breaks if the trigger file is found.
2113# Note the gross little conversion here of srcdir by cd'ing to the found
2114# directory. This converts the path from a relative to an absolute, so
2115# recursive cache variables for the path will work right. We check all
2116# the possible paths in one loop rather than many seperate loops to speed
2117# things up.
2118# the alternative search directory is invoked by --with-tkinclude
5436fc65 2119#
4e327047
TT
2120echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2121# Check whether --with-tkinclude or --without-tkinclude was given.
3d78f532
SC
2122withval="$with_tkinclude"
2123if test -n "$withval"; then
4e327047
TT
2124 with_tkinclude=${withval}
2125fi
2126
2127no_tk=true
2128if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2129 echo $ac_n "(cached) $ac_c" 1>&6
2130else
2131
2132# first check to see if --with-tkinclude was specified
2133if test x"${with_tkinclude}" != x ; then
2134 if test -f ${with_tkinclude}/tk.h ; then
2135 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5436fc65 2136 else
4e327047
TT
2137 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2138 fi
2139fi
2140# next check in private source directory
2141#
2142# since ls returns lowest version numbers first, reverse the entire list
2143# and search for the worst fit, overwriting it with better fits as we find them
2144if test x"${ac_cv_c_tkh}" = x ; then
2145 for i in \
2146 ${srcdir}/../tk \
2147 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` \
2148 ${srcdir}/../../tk \
2149 `ls -dr ${srcdir}/../../tk[0-9]* 2>/dev/null` \
2150 ${srcdir}/../../../tk \
2151 `ls -dr ${srcdir}/../../../tk[0-9]* 2>/dev/null ` ; do
2152 if test -f $i/tk.h ; then
2153 ac_cv_c_tkh=`(cd $i; pwd)`
2154 break
2155 fi
2156 # Tk 4.1 and greater puts this in a subdir.
2157 if test -f $i/generic/tk.h; then
2158 ac_cv_c_tkh=`(cd $i; pwd)`/generic
2159 fi
2160 done
2161fi
2162# finally check in a few common install locations
2163#
2164# since ls returns lowest version numbers first, reverse the entire list
2165# and search for the worst fit, overwriting it with better fits as we find them
2166if test x"${ac_cv_c_tkh}" = x ; then
2167 for i in \
2168 `ls -dr /usr/local/src/tk[0-9]* 2>/dev/null` \
2169 `ls -dr /usr/local/lib/tk[0-9]* 2>/dev/null` \
2170 /usr/local/src/tk \
2171 /usr/local/lib/tk \
2172 ${prefix}/include ; do
2173 if test -f $i/tk.h ; then
2174 ac_cv_c_tkh=`(cd $i; pwd)`
2175 break
2176 fi
2177 done
2178fi
2179# see if one is installed
2180if test x"${ac_cv_c_tkh}" = x ; then
2181 ac_safe=`echo "tk.h" | tr './\055' '___'`
2182echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5436fc65
C
2183if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
2185else
2186 cat > conftest.$ac_ext <<EOF
3d78f532 2187#line 2188 "configure"
5436fc65 2188#include "confdefs.h"
4e327047 2189#include <tk.h>
5436fc65
C
2190EOF
2191eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2192ac_err=`grep -v '^ *+' conftest.out`
2193if test -z "$ac_err"; then
2194 rm -rf conftest*
2195 eval "ac_cv_header_$ac_safe=yes"
2196else
2197 echo "$ac_err" >&5
2198 rm -rf conftest*
2199 eval "ac_cv_header_$ac_safe=no"
2200fi
2201rm -f conftest*
2202fi
2203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2204 echo "$ac_t""yes" 1>&6
4e327047 2205 ac_cv_c_tkh=installed
5436fc65
C
2206else
2207 echo "$ac_t""no" 1>&6
2208fi
2209
4e327047
TT
2210fi
2211
2212fi
2213
2214if test x"${ac_cv_c_tkh}" != x ; then
2215 no_tk=""
2216 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2217 echo "$ac_t""is installed" 1>&6
2218 TKHDIR=""
2219 else
2220 echo "$ac_t""found in $ac_cv_c_tkh" 1>&6
2221 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2222 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
2223 fi
2224else
4e327047
TT
2225 TKHDIR="# no Tk directory found"
2226 echo "configure: warning: Can't find Tk private headers" 1>&2
2227 no_tk=true
5436fc65
C
2228fi
2229
4e327047
TT
2230# if Tk is installed, extract the major/minor version
2231if test x"${no_tk}" = x ; then
2232echo $ac_n "checking Tk version""... $ac_c" 1>&6
2233rm -rf tkmajor tkminor
2234orig_includes="$CPPFLAGS"
2235
2236if test x"${TCLHDIR}" != x ; then
2237 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2238fi
2239if test x"${TKHDIR}" != x ; then
2240 CPPFLAGS="$CPPFLAGS $TKHDIR"
2241fi
2242if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
2243 CPPFLAGS="$CPPFLAGS -I$x_includes"
2244fi
2245
2246if test "$cross_compiling" = yes; then
2247 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
2248
2249else
2250cat > conftest.$ac_ext <<EOF
3d78f532 2251#line 2252 "configure"
4e327047
TT
2252#include "confdefs.h"
2253
2254#include <stdio.h>
2255#include "tk.h"
2256 main() {
2257 FILE *maj = fopen("tkmajor","w");
2258 FILE *min = fopen("tkminor","w");
2259 fprintf(maj,"%d",TK_MAJOR_VERSION);
2260 fprintf(min,"%d",TK_MINOR_VERSION);
2261 fclose(maj);
2262 fclose(min);
2263 return 0;
2264}
2265EOF
2266eval $ac_link
2267if test -s conftest && (./conftest; exit) 2>/dev/null; then
2268 tkmajor=`cat tkmajor`
2269 tkminor=`cat tkminor`
2270 tkversion=$tkmajor.$tkminor
2271 echo "$ac_t""$tkversion" 1>&6
2272 rm -f tkmajor tkminor
2273
2274else
2275 { echo "configure: error:
2276cannot compile a simple X program - suspect your xmkmf is
2277misconfigured and is incorrectly reporting the location of your X
2278include or libraries - report this to your system admin" 1>&2; exit 1; }
2279fi
2280fi
2281rm -fr conftest*
2282CPPFLAGS="${orig_includes}"
2283fi
2284
2285
2286
2287
2288
2289
5436fc65 2290#
4e327047
TT
2291# Ok, lets find the tk library
2292# First, look for the latest private (uninstalled) copy
2293# Notice that the destinations in backwards priority since the tests have
2294# no break.
2295# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
2296# is it indicates the target has been configured and will (probably)
2297# soon be built. This allows an entire tree of Tcl software to be
2298# configured at once and then built.
2299# the alternative search directory is invoked by --with-tklib
5436fc65 2300#
4e327047
TT
2301
2302if test x"${no_tk}" = x ; then
2303 # reset no_tk incase something fails here
2304 no_tk="true"
2305
2306 if test $tkmajor -ge 4 ; then
2307 installedtklibroot=tk$tkversion
2308 else
2309 installedtkllibroot=tk
5436fc65 2310 fi
4e327047
TT
2311
2312 # Check whether --with-tklib or --without-tklib was given.
3d78f532
SC
2313withval="$with_tklib"
2314if test -n "$withval"; then
4e327047 2315 with_tklib=${withval}
5436fc65 2316fi
4e327047
TT
2317
2318 echo $ac_n "checking for Tk library""... $ac_c" 1>&6
2319 if eval "test \"`echo '$''{'ac_cv_c_tklib'+set}'`\" = set"; then
2320 echo $ac_n "(cached) $ac_c" 1>&6
2321else
2322
2323 # first check to see if --with-tklib was specified
2324 # This requires checking for both the installed and uninstalled name-styles
2325 # since we have no idea if it's installed or not.
2326 if test x"${with_tklib}" != x ; then
2327 if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
2328 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
2329 no_tk=""
2330 elif test -f "${with_tklib}/libtk.so" ; then
2331 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
2332 no_tk=""
2333 # then look for a freshly built statically linked library
2334 # if Makefile exists we assume its configured and libtk will be built
2335 elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
2336 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
2337 no_tk=""
2338 elif test -f "${with_tklib}/libtk.a" ; then
2339 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
2340 no_tk=""
2341 else
2342 { echo "configure: error: ${with_tklib} directory doesn't contain libraries" 1>&2; exit 1; }
2343 fi
5436fc65 2344 fi
4e327047
TT
2345 # then check for a private Tk library
2346 # Since these are uninstalled, use the simple lib name root.
2347 if test x"${ac_cv_c_tklib}" = x ; then
2348 for i in \
2349 ../tk \
2350 `ls -dr ../tk[0-9]* 2>/dev/null` \
2351 ../../tk \
2352 `ls -dr ../../tk[0-9]* 2>/dev/null` \
2353 ../../../tk \
2354 `ls -dr ../../../tk[0-9]* 2>/dev/null` ; do
2355 # Tk 4.1 and greater puts things in subdirs. Check these first.
2356 if test -f "$i/unix/libtk.so" ; then
2357 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2358 no_tk=
2359 break
2360 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2361 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
2362 no_tk=
2363 break
2364 # look for a freshly built dynamically linked library
2365 elif test -f "$i/libtk.so" ; then
2366 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2367 no_tk=
2368 break
2369 # then look for a freshly built statically linked library
2370 # if Makefile exists we assume its configured and libtk will be built
2371 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2372 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2373 no_tk=""
2374 break
2375 fi
2376 done
2377 fi
2378 # finally check in a few common install locations
2379 if test x"${ac_cv_c_tklib}" = x ; then
2380 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2381 # first look for a freshly built dynamically linked library
2382 if test -f "$i/lib$installedtklibroot.so" ; then
2383 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
2384 no_tk=""
2385 break
2386 # then look for a freshly built statically linked library
2387 # if Makefile exists, we assume it's configured and libtcl will be built
2388 elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
2389 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
2390 no_tk=""
2391 break
2392 fi
2393 done
2394 fi
2395 # check in a few other private locations
2396 if test x"${ac_cv_c_tklib}" = x ; then
2397 for i in \
2398 ${srcdir}/../tk \
2399 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` ; do
2400 # Tk 4.1 and greater puts things in subdirs. Check these first.
2401 if test -f "$i/unix/libtk.so" ; then
2402 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2403 no_tk=
2404 break
2405 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2406 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
2407 no_tk=
2408 break
2409 # look for a freshly built dynamically linked library
2410 elif test -f "$i/libtk.so" ; then
2411 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2412 no_tk=""
2413 break
2414 # then look for a freshly built statically linked library
2415 # if Makefile exists, we assume it's configured and libtcl will be built
2416 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2417 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2418 no_tk=""
2419 break
2420 fi
2421 done
2422 fi
2423 # see if one is conveniently installed with the compiler
2424 if test x"${ac_cv_c_tklib}" = x ; then
2425
2426 orig_libs="$LIBS"
2427 LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
2428 if test "$cross_compiling" = yes; then
2429 ac_cv_c_tklib="-l$installedtklibroot"
2430else
2431cat > conftest.$ac_ext <<EOF
3d78f532 2432#line 2433 "configure"
4e327047 2433#include "confdefs.h"
5436fc65 2434
4e327047
TT
2435 Tcl_AppInit()
2436 { exit(0); }
2437EOF
2438eval $ac_link
2439if test -s conftest && (./conftest; exit) 2>/dev/null; then
2440 ac_cv_c_tklib="-l$installedtklibroot"
5436fc65 2441else
4e327047
TT
2442 ac_cv_c_tklib=""
2443
2444fi
2445fi
2446rm -fr conftest*
2447 LIBS="${orig_libs}"
2448 fi
2449
2450fi
2451
2452 if test x"${ac_cv_c_tklib}" = x ; then
2453 TKLIB="# no Tk library found"
2454 echo "configure: warning: Can't find Tk library" 1>&2
2455 else
2456 TKLIB=$ac_cv_c_tklib
2457 echo "$ac_t""found $TKLIB" 1>&6
2458 no_tk=
2459 fi
5436fc65
C
2460fi
2461
2462
2463
2464
2465
1a57cd09
TT
2466 # Look for dynamic linking libraries that Tcl might need. This is
2467 # only done for Tcl 7.5 and greater. It would be good to look for and
2468 # use the "configInfo" file that Tcl generates, but for now that is
2469 # beyond us.
2470 if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
2471 echo $ac_n "checking for -ldl""... $ac_c" 1>&6
3d78f532 2472if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
1a57cd09
TT
2473 echo $ac_n "(cached) $ac_c" 1>&6
2474else
2475 ac_save_LIBS="$LIBS"
2476LIBS="-ldl $LIBS"
2477cat > conftest.$ac_ext <<EOF
3d78f532 2478#line 2479 "configure"
1a57cd09
TT
2479#include "confdefs.h"
2480
2481int main() { return 0; }
2482int t() {
2483main()
2484; return 0; }
2485EOF
2486if eval $ac_link; then
2487 rm -rf conftest*
3d78f532 2488 eval "ac_cv_lib_dl=yes"
1a57cd09
TT
2489else
2490 rm -rf conftest*
3d78f532 2491 eval "ac_cv_lib_dl=no"
1a57cd09
TT
2492fi
2493rm -f conftest*
2494LIBS="$ac_save_LIBS"
2495
2496fi
3d78f532 2497if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
1a57cd09 2498 echo "$ac_t""yes" 1>&6
3d78f532 2499 ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
1a57cd09
TT
2500 cat >> confdefs.h <<EOF
2501#define $ac_tr_lib 1
2502EOF
2503
2504 LIBS="-ldl $LIBS"
2505
2506else
2507 echo "$ac_t""no" 1>&6
2508echo $ac_n "checking for -ldld""... $ac_c" 1>&6
3d78f532 2509if eval "test \"`echo '$''{'ac_cv_lib_dld'+set}'`\" = set"; then
1a57cd09
TT
2510 echo $ac_n "(cached) $ac_c" 1>&6
2511else
2512 ac_save_LIBS="$LIBS"
2513LIBS="-ldld $LIBS"
2514cat > conftest.$ac_ext <<EOF
3d78f532 2515#line 2516 "configure"
1a57cd09
TT
2516#include "confdefs.h"
2517
2518int main() { return 0; }
2519int t() {
2520main()
2521; return 0; }
2522EOF
2523if eval $ac_link; then
2524 rm -rf conftest*
3d78f532 2525 eval "ac_cv_lib_dld=yes"
1a57cd09
TT
2526else
2527 rm -rf conftest*
3d78f532 2528 eval "ac_cv_lib_dld=no"
1a57cd09
TT
2529fi
2530rm -f conftest*
2531LIBS="$ac_save_LIBS"
2532
2533fi
3d78f532 2534if eval "test \"`echo '$ac_cv_lib_'dld`\" = yes"; then
1a57cd09 2535 echo "$ac_t""yes" 1>&6
3d78f532 2536 ac_tr_lib=HAVE_LIB`echo dld | tr 'a-z' 'A-Z'`
1a57cd09
TT
2537 cat >> confdefs.h <<EOF
2538#define $ac_tr_lib 1
2539EOF
2540
2541 LIBS="-ldld $LIBS"
2542
2543else
2544 echo "$ac_t""no" 1>&6
2545fi
2546
2547fi
2548
2549 fi
2550
a2b63bbd 2551 ENABLE_GDBTK=1
66efdff9 2552
a2b63bbd
JM
2553 if test "x$no_x" != "xyes"; then
2554 if test "x$x_includes" != "x" ;
2555 then
2556 X_CFLAGS="-I$x_includes"
2557 else
2558 X_CFLAGS=""
2559 fi
2560
2561 if test "x$x_libraries" != "x" ;
2562 then
2563 X_LDFLAGS="-L$x_libraries"
2564 else
2565 X_LDFLAGS=""
2566 fi
2567
2568 case "$host" in
2569#
2570# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2571#
146ee7db 2572 sparc*-sun-solaris2*)
a2b63bbd
JM
2573 if test "x$GCC" = "xyes";
2574 then
127841e4 2575 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
2576 else
2577 if test "x$x_libraries" != "x" ;
2578 then
2579 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2580 fi
2581 X_LIBS="-lX11 -lXext -lX11"
2582 fi ;;
2583#
2584# gdb linked statically w/ SunOS or HPUX
2585#
2586 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2587 if test "x$x_libraries" != "x" ;
2588 then
2589 X_LIBS="$x_libraries/libX11.a"
2590 else
2591 X_LIBS="/usr/lib/libX11.a"
2592 fi ;;
2593#
2594# default is to link dynamically
2595#
2596 *)
2597 X_LIBS="-lX11" ;;
2598 esac
2599 else
2600 X_LDLAGS=""
2601 X_CFLAGS=""
2602 X_LIBS=""
2603 echo "configure: warning: No X based programs will be built" 1>&2
2604 fi
2605
2606 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2607 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2608 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2609fi
66efdff9 2610
66efdff9 2611
5436fc65 2612
66efdff9
JM
2613
2614
5436fc65
C
2615# end-sanitize-gdbtk
2616
2617
2618
2619
2620
7c40dd08
DE
2621# target_subdir is used by the testsuite to find the target libraries.
2622target_subdir=
2623if test "${host}" != "${target}"; then
2624 target_subdir="${target_alias}/"
2625fi
2626
5436fc65
C
2627
2628configdirs="doc testsuite"
2629
2630
2631# Map host cpu into the config cpu subdirectory name.
2632# The default is $host_cpu.
2633
2634case "${host_cpu}" in
2635
2636c[12]) gdb_host_cpu=convex ;;
2637hppa*) gdb_host_cpu=pa ;;
3222ff2e 2638i[3456]86) gdb_host_cpu=i386 ;;
5436fc65
C
2639m68*) gdb_host_cpu=m68k ;;
2640m88*) gdb_host_cpu=m88k ;;
2641np1) gdb_host_cpu=gould ;;
2642pyramid) gdb_host_cpu=pyr ;;
2643powerpc*) gdb_host_cpu=powerpc ;;
146ee7db 2644sparc64) gdb_host_cpu=sparc ;;
5436fc65
C
2645*) gdb_host_cpu=$host_cpu ;;
2646
2647esac
2648
2649# map host info into gdb names.
2650
2651case "${host}" in
2652
2653a29k-*-*) gdb_host=ultra3 ;;
2654
2655alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2656alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2657alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
2658
2659arm-*-*) gdb_host=arm ;;
2660
2661c[12]-*-*) gdb_host=convex ;;
2662
2663hppa*-*-bsd*) gdb_host=hppabsd ;;
2664hppa*-*-hiux*) gdb_host=hppahpux ;;
2665hppa*-*-hpux*) gdb_host=hppahpux ;;
2666hppa*-*-osf*) gdb_host=hppaosf ;;
2667
3222ff2e
MM
2668i[3456]86-ncr-*) gdb_host=ncr3000 ;;
2669i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2670i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
2671i[3456]86-sequent-sysv*) gdb_host=ptx ;;
2672i[3456]86-*-aix*) gdb_host=i386aix ;;
2673i[3456]86-*-bsd*) gdb_host=i386bsd ;;
2674i[3456]86-*-dgux*) gdb_host=i386dgux ;;
2675i[3456]86-*-freebsd*) gdb_host=fbsd ;;
2676i[3456]86-*-netbsd*) gdb_host=nbsd ;;
2677i[3456]86-*-go32*) gdb_host=go32 ;;
2678i[3456]86-*-linux*) gdb_host=linux ;;
2679i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
2680i[3456]86-*-mach3*) gdb_host=i386m3 ;;
2681i[3456]86-*-mach*) gdb_host=i386mach ;;
2682i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
2683i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2684i[3456]86-*-sco*) gdb_host=i386sco ;;
2685i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
2686i[3456]86-*-sunos*) gdb_host=sun386 ;;
2687i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
2688i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
2689i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
2690i[3456]86-*-unixware) gdb_host=i386v4 ;;
2691i[3456]86-*-sysv*) gdb_host=i386v ;;
2692i[3456]86-*-isc*) gdb_host=i386v32 ;;
2693i[3456]86-*-os9k) gdb_host=i386os9k ;;
3d78f532 2694i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
5436fc65
C
2695m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2696m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2697m68030-sony-*) gdb_host=news1000 ;;
2698
2699m68*-altos-*) gdb_host=altos ;;
2700m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2701m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2702m68*-att-*) gdb_host=3b1 ;;
2703m68*-bull*-sysv*) gdb_host=dpx2 ;;
2704m68*-hp-bsd*) gdb_host=hp300bsd ;;
2705m68*-hp-hpux*) gdb_host=hp300hpux ;;
2706m68*-isi-*) gdb_host=isi ;;
2707m68*-*-lynxos*) gdb_host=m68klynx ;;
2708m68*-*-sysv4*) gdb_host=m68kv4 ;;
2709m68*-motorola-*) gdb_host=delta68 ;;
2710m68*-sony-*) gdb_host=news ;;
2711m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2712m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2713m68*-sun-*) gdb_host=sun3os4 ;;
2714
2715m88*-harris-cxux*) gdb_host=cxux ;;
2716m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2717m88*-motorola-sysv*) gdb_host=delta88 ;;
2718m88*-*-mach3*) gdb_host=mach3 ;;
2719m88*-*-*) gdb_host=m88k ;;
2720
2721mips-dec-mach3*) gdb_host=mach3 ;;
2722mips-dec-*) gdb_host=decstation ;;
2723mips-little-*) gdb_host=littlemips ;;
2724mips-sgi-irix3*) gdb_host=irix3 ;;
2725mips-sgi-irix4*) gdb_host=irix4 ;;
2726mips-sgi-irix5*) gdb_host=irix5 ;;
2727mips-sony-*) gdb_host=news-mips ;;
2728mips-*-mach3*) gdb_host=mach3 ;;
2729mips-*-sysv4*) gdb_host=mipsv4 ;;
2730mips-*-sysv*) gdb_host=riscos ;;
2731mips-*-riscos*) gdb_host=riscos ;;
2732
2733none-*-*) gdb_host=none ;;
2734
2735np1-*-*) gdb_host=np1 ;;
2736
2737ns32k-*-mach3*) gdb_host=mach3 ;;
2738ns32k-*-netbsd*) gdb_host=nbsd ;;
2739ns32k-umax-*) gdb_host=umax ;;
2740ns32k-utek-sysv*) gdb_host=merlin ;;
2741
fbc3f191 2742powerpc-*-aix*) gdb_host=aix ;;
3d78f532 2743powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
5436fc65
C
2744pn-*-*) gdb_host=pn ;;
2745
2746pyramid-*-*) gdb_host=pyramid ;;
2747
2748romp-*-*) gdb_host=rtbsd ;;
2749
2750rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
a1956677 2751rs6000-*-aix4*) gdb_host=aix4 ;;
5436fc65
C
2752rs6000-*-*) gdb_host=rs6000 ;;
2753
2754sparc-*-lynxos*) gdb_host=sparclynx ;;
2755sparc-*-netbsd*) gdb_host=nbsd ;;
2756sparc-*-solaris2*) gdb_host=sun4sol2 ;;
2757sparc-*-sunos4*) gdb_host=sun4os4 ;;
2758sparc-*-sunos5*) gdb_host=sun4sol2 ;;
2759sparc-*-*) gdb_host=sun4os4 ;;
146ee7db 2760sparc64-*-*) gdb_host=sun4sol2 ;;
5436fc65
C
2761
2762tahoe-*-*) gdb_host=tahoe ;;
2763
2764vax-*-bsd*) gdb_host=vaxbsd ;;
2765vax-*-ultrix2*) gdb_host=vaxult2 ;;
2766vax-*-ultrix*) gdb_host=vaxult ;;
2767
2768w65-*-*) gdb_host=w65 ;;
2769
2770esac
2771
2772
2773# Map target cpu into the config cpu subdirectory name.
2774# The default is $target_cpu.
2775
2776case "${target_cpu}" in
2777
2778alpha) gdb_target_cpu=alpha ;;
2779c[12]) gdb_target_cpu=convex ;;
2780hppa*) gdb_target_cpu=pa ;;
3222ff2e 2781i[3456]86) gdb_target_cpu=i386 ;;
5436fc65
C
2782m68*) gdb_target_cpu=m68k ;;
2783m88*) gdb_target_cpu=m88k ;;
2784mips*) gdb_target_cpu=mips ;;
2785np1) gdb_target_cpu=gould ;;
2786powerpc*) gdb_target_cpu=powerpc ;;
2787pn) gdb_target_cpu=gould ;;
2788pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
2789sparc*) gdb_target_cpu=sparc ;;
2790*) gdb_target_cpu=$target_cpu ;;
2791
2792esac
2793
2794# map target info into gdb names.
2795
2796case "${target}" in
2797
2798a29k-*-aout*) gdb_target=a29k ;;
2799a29k-*-coff*) gdb_target=a29k ;;
2800a29k-*-elf*) gdb_target=a29k ;;
2801a29k-*-ebmon*) gdb_target=a29k ;;
2802a29k-*-kern*) gdb_target=a29k-kern ;;
2803a29k-*-none*) gdb_target=a29k ;;
2804a29k-*-sym1*) gdb_target=ultra3 ;;
2805a29k-*-udi*) gdb_target=a29k-udi ;;
2806a29k-*-vxworks*) gdb_target=vx29k ;;
2807
2808alpha-*-osf*) gdb_target=alpha-osf1 ;;
2809
2810# start-sanitize-arc
2811arc-*-*) gdb_target=arc ;;
2812# end-sanitize-arc
2813
2814arm-*-*) gdb_target=arm ;;
2815
2816c1-*-*) gdb_target=convex ;;
2817c2-*-*) gdb_target=convex ;;
2818
fb506180
SS
2819h8300-*-*) gdb_target=h8300 ;;
2820h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
2821
2822sh-*-*) gdb_target=sh ;;
2823
2824# start-sanitize-r16
2825r16-*-*) gdb_target=r16 ;;
2826# end-sanitize-r16
2827
2828hppa*-*-bsd*) gdb_target=hppabsd ;;
2829hppa*-*-pro*) gdb_target=hppapro ;;
2830hppa*-*-hpux*) gdb_target=hppahpux ;;
2831hppa*-*-hiux*) gdb_target=hppahpux ;;
2832hppa*-*-osf*) gdb_target=hppaosf ;;
2833
3222ff2e
MM
2834i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
2835i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
2836i[3456]86-sequent-sysv*) gdb_target=ptx ;;
2837i[3456]86-ncr-*) gdb_target=ncr3000 ;;
2838i[3456]86-*-aout*) gdb_target=i386aout ;;
2839i[3456]86-*-coff*) gdb_target=i386v ;;
2840i[3456]86-*-elf*) gdb_target=i386v ;;
2841i[3456]86-*-aix*) gdb_target=i386aix ;;
2842i[3456]86-*-bsd*) gdb_target=i386bsd ;;
2843i[3456]86-*-freebsd*) gdb_target=fbsd ;;
2844i[3456]86-*-netbsd*) gdb_target=nbsd ;;
2845i[3456]86-*-os9k) gdb_target=i386os9k ;;
2846i[3456]86-*-go32*) gdb_target=i386aout ;;
2847i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 2848 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
2849i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
2850i[3456]86-*-sunos*) gdb_target=sun386 ;;
2851i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
2852i[3456]86-*-sco*) gdb_target=i386v ;;
2853i[3456]86-*-sysv*) gdb_target=i386v ;;
2854i[3456]86-*-linux*) gdb_target=linux ;;
2855i[3456]86-*-isc*) gdb_target=i386v ;;
2856i[3456]86-*-mach3*) gdb_target=i386m3 ;;
2857i[3456]86-*-mach*) gdb_target=i386mach ;;
2858i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 2859 configdirs="${configdirs} nlm" ;;
3222ff2e 2860i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
3d78f532 2861i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
5436fc65
C
2862i960-*-bout*) gdb_target=vxworks960 ;;
2863i960-*-coff*) gdb_target=nindy960 ;;
2864i960-*-elf*) gdb_target=nindy960 ;;
2865
2866i960-*-nindy*) gdb_target=nindy960 ;;
2867i960-*-vxworks*) gdb_target=vxworks960 ;;
2868
2869m68000-*-sunos3*) gdb_target=sun2os3 ;;
2870m68000-*-sunos4*) gdb_target=sun2os4 ;;
2871
2872m68*-apollo*-bsd*) gdb_target=apollo68b ;;
2873m68*-bull-sysv*) gdb_target=dpx2 ;;
2874m68*-hp-bsd*) gdb_target=hp300bsd ;;
2875m68*-hp-hpux*) gdb_target=hp300hpux ;;
2876m68*-altos-*) gdb_target=altos ;;
2877m68*-att-*) gdb_target=3b1 ;;
2878m68*-cisco*-*) gdb_target=cisco ;;
2879m68*-ericsson-*) gdb_target=es1800 ;;
2880m68*-isi-*) gdb_target=isi ;;
2881m68*-motorola-*) gdb_target=delta68 ;;
2882m68*-netx-*) gdb_target=vxworks68 ;;
2883m68*-sony-*) gdb_target=news ;;
2884m68*-tandem-*) gdb_target=st2000 ;;
2885m68*-rom68k-*) gdb_target=monitor ;;
2886m68*-*bug-*) gdb_target=monitor ;;
2887m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 2888m68*-est-*) gdb_target=monitor ;;
5436fc65
C
2889m68*-*-aout*) gdb_target=monitor ;;
2890m68*-*-coff*) gdb_target=monitor ;;
2891m68*-*-elf*) gdb_target=monitor ;;
2892m68*-*-lynxos*) gdb_target=m68klynx
2893 configdirs="${configdirs} gdbserver" ;;
2894m68*-*-os68k*) gdb_target=os68k ;;
2895m68*-*-sunos3*) gdb_target=sun3os3 ;;
2896m68*-*-sunos4*) gdb_target=sun3os4 ;;
2897m68*-*-sysv4*) gdb_target=m68kv4 ;;
2898m68*-*-vxworks*) gdb_target=vxworks68 ;;
2899
2900m88*-harris-cxux*) gdb_target=cxux ;;
2901m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
2902m88*-*-mach3*) gdb_target=mach3 ;;
2903m88*-motorola-*) gdb_target=delta88 ;;
2904m88*-*-*) gdb_target=m88k ;;
2905
2906mips64*-big-*) gdb_target=bigmips64 ;;
2907mips*-big-*) gdb_target=bigmips ;;
2908mips*-dec-mach3*) gdb_target=mach3 ;;
2909mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
2910mips64*el-*-ecoff*) gdb_target=embedl64 ;;
2911mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
2912mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
2913mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
2914mips64*el-*-elf*) gdb_target=embedl64 ;;
2915mips64*-*-elf*) gdb_target=embed64 ;;
2916mips*el-*-ecoff*) gdb_target=embedl ;;
2917mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 2918# start-sanitize-gm
7bb5e831 2919mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 2920# end-sanitize-gm
7bb5e831
RS
2921mips*el-*-elf*) gdb_target=embedl ;;
2922mips*-*-elf*) gdb_target=embed ;;
5436fc65
C
2923mips*-little-*) gdb_target=littlemips ;;
2924mips*-sgi-irix5*) gdb_target=irix5 ;;
2925mips*-sgi-*) gdb_target=irix3 ;;
2926mips*-sony-*) gdb_target=bigmips ;;
2927mips*-*-mach3*) gdb_target=mach3 ;;
2928mips*-*-sysv4*) gdb_target=mipsv4 ;;
2929mips*-*-sysv*) gdb_target=bigmips ;;
2930mips*-*-riscos*) gdb_target=bigmips ;;
2931
2932none-*-*) gdb_target=none ;;
2933
2934np1-*-*) gdb_target=np1 ;;
2935
2936ns32k-*-mach3*) gdb_target=mach3 ;;
2937ns32k-*-netbsd*) gdb_target=nbsd ;;
2938ns32k-utek-sysv*) gdb_target=merlin ;;
2939ns32k-utek-*) gdb_target=umax ;;
2940
2941pn-*-*) gdb_target=pn ;;
c148ab3c 2942powerpc-*-macos*) gdb_target=macos ;;
5436fc65
C
2943powerpc-*-netware*) gdb_target=ppc-nw
2944 configdirs="${configdirs} nlm" ;;
2945
65eaea27 2946powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 2947powerpc-*-aix*) gdb_target=aix ;;
3d78f532 2948powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
3c0bf315
MM
2949powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
2950 gdb_target=ppc-sim
2951 else
2952 gdb_target=ppc-eabi
2953 fi ;;
2954powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
2955 gdb_target=ppcle-sim
2956 else
2957 gdb_target=ppcle-eabi
2958 fi ;;
5436fc65
C
2959
2960pyramid-*-*) gdb_target=pyramid ;;
2961
2962rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 2963rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
2964rs6000-*-*) gdb_target=rs6000 ;;
2965
2966sparc-*-aout*) gdb_target=sparc-em ;;
2967sparc-*-coff*) gdb_target=sparc-em ;;
2968sparc-*-elf*) gdb_target=sparc-em ;;
2969sparc-*-lynxos*) gdb_target=sparclynx
2970 configdirs="${configdirs} gdbserver" ;;
2971sparc-*-netbsd*) gdb_target=nbsd ;;
2972sparc-*-solaris2*) gdb_target=sun4sol2 ;;
2973sparc-*-sunos4*) gdb_target=sun4os4 ;;
2974sparc-*-sunos5*) gdb_target=sun4sol2 ;;
2975sparc-*-vxworks*) gdb_target=vxsparc ;;
2976sparc-*-*) gdb_target=sun4os4 ;;
2977sparclite*-*-*) gdb_target=sparclite ;;
146ee7db 2978sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
5436fc65
C
2979sparc64-*-*) gdb_target=sp64 ;;
2980
2981tahoe-*-*) gdb_target=tahoe ;;
2982
2983vax-*-*) gdb_target=vax ;;
2984
2985w65-*-*) gdb_target=w65 ;;
2986
fb506180 2987z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
2988
2989esac
2990
2991
5f107900 2992frags=
5436fc65
C
2993host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2994if test ! -f ${host_makefile_frag}; then
2995{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2996fi
5f107900 2997frags="$frags $host_makefile_frag"
5436fc65
C
2998
2999target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
3000if test ! -f ${target_makefile_frag}; then
3001{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
3002fi
5f107900 3003frags="$frags $target_makefile_frag"
5436fc65
C
3004
3005
3006
3007
3008
094fd4ae
C
3009hostfile=`sed -n '
3010s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3011' ${host_makefile_frag}`
5436fc65 3012
094fd4ae
C
3013targetfile=`sed -n '
3014s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3015' ${target_makefile_frag}`
5436fc65
C
3016
3017# these really aren't orthogonal true/false values of the same condition,
3018# but shells are slow enough that I like to reuse the test conditions
3019# whenever possible
3020if test "${target}" = "${host}"; then
094fd4ae
C
3021nativefile=`sed -n '
3022s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3023' ${host_makefile_frag}`
5436fc65
C
3024else
3025# GDBserver is only useful in a "native" enviroment
3026configdirs=`echo $configdirs | sed 's/gdbserver//'`
3027fi
3028
094fd4ae 3029
5436fc65
C
3030# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
3031# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
3032# corresponding links. But we have to remove the xm.h files and tm.h
3033# files anyway, e.g. when switching from "configure host" to
3034# "configure none".
3035
3036files=
3037links=
3038rm -f xm.h
3039if test "${hostfile}" != ""; then
3040files="${files} config/${gdb_host_cpu}/${hostfile}"
3041links="${links} xm.h"
3042fi
3043rm -f tm.h
3044if test "${targetfile}" != ""; then
3045files="${files} config/${gdb_target_cpu}/${targetfile}"
3046links="${links} tm.h"
3047fi
3048rm -f nm.h
3049if test "${nativefile}" != ""; then
3050files="${files} config/${gdb_host_cpu}/${nativefile}"
3051links="${links} nm.h"
3052else
3053# A cross-only configuration.
3054files="${files} config/nm-empty.h"
3055links="${links} nm.h"
3056fi
3057# start-sanitize-gdbtk
3058
3059# Make it possible to use the GUI without doing a full install
3060if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
3061files="${files} gdbtk.tcl"
3062links="${links} gdbtk.tcl"
3063fi
3064# end-sanitize-gdbtk
3065
3066
3067
3068subdirs="$configdirs"
3069
3070trap '' 1 2 15
3071cat > confcache <<\EOF
3072# This file is a shell script that caches the results of configure
3073# tests run on this system so they can be shared between configure
3074# scripts and configure runs. It is not useful on other systems.
3075# If it contains results you don't want to keep, you may remove or edit it.
3076#
3077# By default, configure uses ./config.cache as the cache file,
3078# creating it if it does not exist already. You can give configure
3079# the --cache-file=FILE option to use a different cache file; that is
3080# what configure does when it calls configure scripts in
3081# subdirectories, so they share the cache.
3082# Giving --cache-file=/dev/null disables caching, for debugging configure.
3083# config.status only pays attention to the cache file if you give it the
3084# --recheck option to rerun configure.
3085#
3086EOF
3087# Ultrix sh set writes to stderr and can't be redirected directly,
3088# and sets the high bit in the cache file unless we assign to the vars.
3089(set) 2>&1 |
3090 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3091 >> confcache
3092if cmp -s $cache_file confcache; then
3093 :
3094else
3095 if test -w $cache_file; then
3096 echo "updating cache $cache_file"
3097 cat confcache > $cache_file
3098 else
3099 echo "not updating unwritable cache $cache_file"
3100 fi
3101fi
3102rm -f confcache
3103
3104trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3105
3106test "x$prefix" = xNONE && prefix=$ac_default_prefix
3107# Let make expand exec_prefix.
3108test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3109
3110# Any assignment to VPATH causes Sun make to only execute
3111# the first set of double-colon rules, so remove it if not needed.
3112# If there is a colon in the path, we need to keep it.
3113if test "x$srcdir" = x.; then
3114 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3115fi
3116
3117trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3118
3119# Transform confdefs.h into DEFS.
3120# Protect against shell expansion while executing Makefile rules.
3121# Protect against Makefile macro expansion.
3122cat > conftest.defs <<\EOF
3123s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
3124s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
3125s%\[%\\&%g
3126s%\]%\\&%g
3127s%\$%$$%g
3128EOF
3129DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
3130rm -f conftest.defs
3131
3132
3133# Without the "./", some shells look in PATH for config.status.
3134: ${CONFIG_STATUS=./config.status}
3135
3136echo creating $CONFIG_STATUS
3137rm -f $CONFIG_STATUS
3138cat > $CONFIG_STATUS <<EOF
3139#! /bin/sh
3140# Generated automatically by configure.
3141# Run this file to recreate the current configuration.
3142# This directory was configured as follows,
3143# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3144#
3145# $0 $ac_configure_args
3146#
3147# Compiler output produced by configure, useful for debugging
3148# configure, is in ./config.log if it exists.
3149
3150ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3151for ac_option
3152do
3153 case "\$ac_option" in
3154 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3155 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3156 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3157 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3d78f532 3158 echo "$CONFIG_STATUS generated by autoconf version 2.4"
5436fc65
C
3159 exit 0 ;;
3160 -help | --help | --hel | --he | --h)
3161 echo "\$ac_cs_usage"; exit 0 ;;
3162 *) echo "\$ac_cs_usage"; exit 1 ;;
3163 esac
3164done
3165
3166ac_given_srcdir=$srcdir
3167ac_given_INSTALL="$INSTALL"
3168
3169trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3170
3d78f532
SC
3171# Protect against being on the right side of a sed subst in config.status.
3172sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
3173 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
5436fc65
C
3174$ac_vpsub
3175$extrasub
3176s%@CFLAGS@%$CFLAGS%g
3177s%@CPPFLAGS@%$CPPFLAGS%g
3178s%@CXXFLAGS@%$CXXFLAGS%g
3179s%@DEFS@%$DEFS%g
3180s%@LDFLAGS@%$LDFLAGS%g
3181s%@LIBS@%$LIBS%g
3182s%@exec_prefix@%$exec_prefix%g
3183s%@prefix@%$prefix%g
3184s%@program_transform_name@%$program_transform_name%g
3185s%@CC@%$CC%g
3186s%@CPP@%$CPP%g
3187s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3188s%@INSTALL_DATA@%$INSTALL_DATA%g
3189s%@RANLIB@%$RANLIB%g
204c8825 3190s%@YACC@%$YACC%g
5436fc65
C
3191s%@host@%$host%g
3192s%@host_alias@%$host_alias%g
3193s%@host_cpu@%$host_cpu%g
3194s%@host_vendor@%$host_vendor%g
3195s%@host_os@%$host_os%g
3196s%@target@%$target%g
3197s%@target_alias@%$target_alias%g
3198s%@target_cpu@%$target_cpu%g
3199s%@target_vendor@%$target_vendor%g
3200s%@target_os@%$target_os%g
3201s%@build@%$build%g
3202s%@build_alias@%$build_alias%g
3203s%@build_cpu@%$build_cpu%g
3204s%@build_vendor@%$build_vendor%g
3205s%@build_os@%$build_os%g
3206s%@X_CFLAGS@%$X_CFLAGS%g
3207s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3208s%@X_LIBS@%$X_LIBS%g
3209s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5436fc65
C
3210s%@TCLHDIR@%$TCLHDIR%g
3211s%@TCLLIB@%$TCLLIB%g
4e327047
TT
3212s%@TKHDIR@%$TKHDIR%g
3213s%@TKLIB@%$TKLIB%g
5436fc65 3214s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd 3215s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
3216s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3217s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3218s%@ENABLE_OBS@%$ENABLE_OBS%g
7c40dd08 3219s%@target_subdir@%$target_subdir%g
5436fc65
C
3220/@host_makefile_frag@/r $host_makefile_frag
3221s%@host_makefile_frag@%%g
3222/@target_makefile_frag@/r $target_makefile_frag
3223s%@target_makefile_frag@%%g
5f107900 3224s%@frags@%$frags%g
5436fc65
C
3225s%@subdirs@%$subdirs%g
3226
3227CEOF
3228EOF
3229cat >> $CONFIG_STATUS <<EOF
3230
3231CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3232EOF
3233cat >> $CONFIG_STATUS <<\EOF
3234for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3235 # Support "outfile[:infile]", defaulting infile="outfile.in".
3236 case "$ac_file" in
3237 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3238 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3239 *) ac_file_in="${ac_file}.in" ;;
3240 esac
3241
3242 # Adjust relative srcdir, etc. for subdirectories.
3243
3244 # Remove last slash and all that follows it. Not all systems have dirname.
3245 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3246 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3247 # The file is in a subdirectory.
3248 test ! -d "$ac_dir" && mkdir "$ac_dir"
3249 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3250 # A "../" for each directory in $ac_dir_suffix.
3251 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3252 else
3253 ac_dir_suffix= ac_dots=
3254 fi
3255
3256 case "$ac_given_srcdir" in
3257 .) srcdir=.
3258 if test -z "$ac_dots"; then top_srcdir=.
3259 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3260 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3261 *) # Relative path.
3262 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3263 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3264 esac
3265
3266 case "$ac_given_INSTALL" in
3267 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3268 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3269 esac
3270 echo creating "$ac_file"
3271 rm -f "$ac_file"
3272 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3273 case "$ac_file" in
3274 *Makefile*) ac_comsub="1i\\
3275# $configure_input" ;;
3276 *) ac_comsub= ;;
3277 esac
3278 sed -e "$ac_comsub
3279s%@configure_input@%$configure_input%g
3280s%@srcdir@%$srcdir%g
3281s%@top_srcdir@%$top_srcdir%g
3282s%@INSTALL@%$INSTALL%g
3283" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3284fi; done
3285rm -f conftest.subs
3286
3287EOF
3288
3289cat >> $CONFIG_STATUS <<EOF
3290ac_sources="$files"
3291ac_dests="$links"
3292EOF
3293
3294cat >> $CONFIG_STATUS <<\EOF
3295srcdir=$ac_given_srcdir
3296while test -n "$ac_sources"; do
3297 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3298 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3299
3300 echo "linking $srcdir/$ac_source to $ac_dest"
3301
3302 if test ! -r $srcdir/$ac_source; then
3303 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3304 fi
3305 rm -f $ac_dest
3306
3307 # Make relative symlinks.
3308 # Remove last slash and all that follows it. Not all systems have dirname.
3309 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3310 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3311 # The dest file is in a subdirectory.
3312 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3313 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3314 # A "../" for each directory in $ac_dest_dir_suffix.
3315 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3316 else
3317 ac_dest_dir_suffix= ac_dots=
3318 fi
3319
3320 case "$srcdir" in
3321 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3322 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3323 esac
3324
3325 # Make a symlink if possible; otherwise try a hard link.
3326 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3327 ln $srcdir/$ac_source $ac_dest; then :
3328 else
3329 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3330 fi
3331done
0a5a1821
C
3332EOF
3333cat >> $CONFIG_STATUS <<EOF
5436fc65 3334
0a5a1821
C
3335gdb_host_cpu=$gdb_host_cpu
3336gdb_target_cpu=$gdb_target_cpu
3337nativefile=$nativefile
3338
3339EOF
3340cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
3341
3342if test "${nativefile}" = ""; then
3343sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
3344 < Makefile > Makefile.tem
3345mv -f Makefile.tem Makefile
3346fi
3347
3348sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3349/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3350/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3351mv -f Makefile.tmp Makefile
3352
3353case ${srcdir} in
3354.)
3355;;
3356*)
3357grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3358echo "source ${srcdir}/.gdbinit" >> .gdbinit
3359esac
3360
3361exit 0
3362EOF
3363chmod +x $CONFIG_STATUS
3364rm -fr confdefs* $ac_clean_files
3365test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3366
3367if test "$no_recursion" != yes; then
3368
3369 # Remove --cache-file and --srcdir arguments so they do not pile up.
3370 ac_sub_configure_args=
3371 ac_prev=
3372 for ac_arg in $ac_configure_args; do
3373 if test -n "$ac_prev"; then
3374 ac_prev=
3375 continue
3376 fi
3377 case "$ac_arg" in
3378 -cache-file | --cache-file | --cache-fil | --cache-fi \
3379 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3380 ac_prev=cache_file ;;
3381 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3382 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3383 ;;
3384 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3385 ac_prev=srcdir ;;
3386 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3387 ;;
3388 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3389 esac
3390 done
3391
3392 for ac_config_dir in $configdirs; do
3393
3394 # Do not complain, so a configure script can configure whichever
3395 # parts of a large source tree are present.
3396 if test ! -d $srcdir/$ac_config_dir; then
3397 continue
3398 fi
3399
3400 echo configuring in $ac_config_dir
3401
3402 case "$srcdir" in
3403 .) ;;
3404 *)
3405 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3406 else
3407 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3408 fi
3409 ;;
3410 esac
3411
3412 ac_popdir=`pwd`
3413 cd $ac_config_dir
3414
3415 case "$srcdir" in
3416 .) # No --srcdir option. We are building in place.
3417 ac_sub_srcdir=$srcdir ;;
3418 /*) # Absolute path.
3419 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3420 *) # Relative path.
3421 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3422 esac
3423
3424 # Check for guested configure; otherwise get Cygnus style configure.
3425 if test -f $ac_sub_srcdir/configure; then
3426 ac_sub_configure=$ac_sub_srcdir/configure
3427 elif test -f $ac_sub_srcdir/configure.in; then
3428 ac_sub_configure=$ac_configure
3429 else
3430 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3431 ac_sub_configure=
3432 fi
3433
3434 # The recursion is here.
3435 if test -n "$ac_sub_configure"; then
3436
3437 # Make the cache file name correct relative to the subdirectory.
3438 # A "../" for each directory in /$ac_config_dir.
3439 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3440 case "$cache_file" in
3441 /*) ac_sub_cache_file=$cache_file ;;
3442 *) # Relative path.
3443 ac_sub_cache_file="$ac_dots$cache_file" ;;
3444 esac
3445 case "$ac_given_INSTALL" in
3446 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3447 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3448 esac
3449
3450 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3451 # The eval makes quoting arguments work.
3452 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3453 then :
3454 else
3455 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3456 fi
3457 fi
3458
3459 cd $ac_popdir
3460 done
3461fi
3462
5e711e7f
PS
3463
3464exit 0
This page took 0.556506 seconds and 4 git commands to generate.