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