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