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