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