* aclocal.m4 (AM_CYGWIN32, AM_EXEEXT): Remove. They are already
[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
981 configdirs="doc testsuite"
982
983
984 . ${srcdir}/configure.host
985
986 . ${srcdir}/configure.tgt
987
988
989 # Find a good install program. We prefer a C program (faster),
990 # so one script is as good as another. But avoid the broken or
991 # incompatible versions:
992 # SysV /etc/install, /usr/sbin/install
993 # SunOS /usr/etc/install
994 # IRIX /sbin/install
995 # AIX /bin/install
996 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
997 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
998 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
999 # ./install, which can be erroneously created by make from ./install.sh.
1000 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1001 echo "configure:1002: checking for a BSD compatible install" >&5
1002 if test -z "$INSTALL"; then
1003 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1007 for ac_dir in $PATH; do
1008 # Account for people who put trailing slashes in PATH elements.
1009 case "$ac_dir/" in
1010 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1011 *)
1012 # OSF1 and SCO ODT 3.0 have their own names for install.
1013 # Don't use installbsd from OSF since it installs stuff as root
1014 # by default.
1015 for ac_prog in ginstall scoinst install; do
1016 if test -f $ac_dir/$ac_prog; then
1017 if test $ac_prog = install &&
1018 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1019 # AIX install. It has an incompatible calling convention.
1020 :
1021 else
1022 ac_cv_path_install="$ac_dir/$ac_prog -c"
1023 break 2
1024 fi
1025 fi
1026 done
1027 ;;
1028 esac
1029 done
1030 IFS="$ac_save_IFS"
1031
1032 fi
1033 if test "${ac_cv_path_install+set}" = set; then
1034 INSTALL="$ac_cv_path_install"
1035 else
1036 # As a last resort, use the slow shell script. We don't cache a
1037 # path for INSTALL within a source directory, because that will
1038 # break other packages using the cache if that directory is
1039 # removed, or if the path is relative.
1040 INSTALL="$ac_install_sh"
1041 fi
1042 fi
1043 echo "$ac_t""$INSTALL" 1>&6
1044
1045 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1046 # It thinks the first close brace ends the variable substitution.
1047 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1048
1049 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1050
1051 if test $host != $build; then
1052 ac_tool_prefix=${host_alias}-
1053 else
1054 ac_tool_prefix=
1055 fi
1056
1057 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1058 set dummy ${ac_tool_prefix}ar; ac_word=$2
1059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1060 echo "configure:1061: checking for $ac_word" >&5
1061 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1062 echo $ac_n "(cached) $ac_c" 1>&6
1063 else
1064 if test -n "$AR"; then
1065 ac_cv_prog_AR="$AR" # Let the user override the test.
1066 else
1067 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1068 for ac_dir in $PATH; do
1069 test -z "$ac_dir" && ac_dir=.
1070 if test -f $ac_dir/$ac_word; then
1071 ac_cv_prog_AR="${ac_tool_prefix}ar"
1072 break
1073 fi
1074 done
1075 IFS="$ac_save_ifs"
1076 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1077 fi
1078 fi
1079 AR="$ac_cv_prog_AR"
1080 if test -n "$AR"; then
1081 echo "$ac_t""$AR" 1>&6
1082 else
1083 echo "$ac_t""no" 1>&6
1084 fi
1085
1086
1087
1088 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1089 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1090 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1091 echo "configure:1092: checking for $ac_word" >&5
1092 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1093 echo $ac_n "(cached) $ac_c" 1>&6
1094 else
1095 if test -n "$RANLIB"; then
1096 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1097 else
1098 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1099 for ac_dir in $PATH; do
1100 test -z "$ac_dir" && ac_dir=.
1101 if test -f $ac_dir/$ac_word; then
1102 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1103 break
1104 fi
1105 done
1106 IFS="$ac_save_ifs"
1107 fi
1108 fi
1109 RANLIB="$ac_cv_prog_RANLIB"
1110 if test -n "$RANLIB"; then
1111 echo "$ac_t""$RANLIB" 1>&6
1112 else
1113 echo "$ac_t""no" 1>&6
1114 fi
1115
1116
1117 if test -z "$ac_cv_prog_RANLIB"; then
1118 if test -n "$ac_tool_prefix"; then
1119 # Extract the first word of "ranlib", so it can be a program name with args.
1120 set dummy ranlib; ac_word=$2
1121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1122 echo "configure:1123: checking for $ac_word" >&5
1123 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1124 echo $ac_n "(cached) $ac_c" 1>&6
1125 else
1126 if test -n "$RANLIB"; then
1127 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1128 else
1129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1130 for ac_dir in $PATH; do
1131 test -z "$ac_dir" && ac_dir=.
1132 if test -f $ac_dir/$ac_word; then
1133 ac_cv_prog_RANLIB="ranlib"
1134 break
1135 fi
1136 done
1137 IFS="$ac_save_ifs"
1138 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1139 fi
1140 fi
1141 RANLIB="$ac_cv_prog_RANLIB"
1142 if test -n "$RANLIB"; then
1143 echo "$ac_t""$RANLIB" 1>&6
1144 else
1145 echo "$ac_t""no" 1>&6
1146 fi
1147
1148 else
1149 RANLIB=":"
1150 fi
1151 fi
1152
1153 for ac_prog in 'bison -y' byacc
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162 if test -n "$YACC"; then
1163 ac_cv_prog_YACC="$YACC" # Let the user override the test.
1164 else
1165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1166 for ac_dir in $PATH; do
1167 test -z "$ac_dir" && ac_dir=.
1168 if test -f $ac_dir/$ac_word; then
1169 ac_cv_prog_YACC="$ac_prog"
1170 break
1171 fi
1172 done
1173 IFS="$ac_save_ifs"
1174 fi
1175 fi
1176 YACC="$ac_cv_prog_YACC"
1177 if test -n "$YACC"; then
1178 echo "$ac_t""$YACC" 1>&6
1179 else
1180 echo "$ac_t""no" 1>&6
1181 fi
1182
1183 test -n "$YACC" && break
1184 done
1185 test -n "$YACC" || YACC="yacc"
1186
1187 for ac_prog in mawk gawk nawk awk
1188 do
1189 # Extract the first word of "$ac_prog", so it can be a program name with args.
1190 set dummy $ac_prog; ac_word=$2
1191 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1192 echo "configure:1193: checking for $ac_word" >&5
1193 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1194 echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196 if test -n "$AWK"; then
1197 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1198 else
1199 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1200 for ac_dir in $PATH; do
1201 test -z "$ac_dir" && ac_dir=.
1202 if test -f $ac_dir/$ac_word; then
1203 ac_cv_prog_AWK="$ac_prog"
1204 break
1205 fi
1206 done
1207 IFS="$ac_save_ifs"
1208 fi
1209 fi
1210 AWK="$ac_cv_prog_AWK"
1211 if test -n "$AWK"; then
1212 echo "$ac_t""$AWK" 1>&6
1213 else
1214 echo "$ac_t""no" 1>&6
1215 fi
1216
1217 test -n "$AWK" && break
1218 done
1219
1220
1221 if test "$program_transform_name" = s,x,x,; then
1222 program_transform_name=
1223 else
1224 # Double any \ or $. echo might interpret backslashes.
1225 cat <<\EOF_SED > conftestsed
1226 s,\\,\\\\,g; s,\$,$$,g
1227 EOF_SED
1228 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1229 rm -f conftestsed
1230 fi
1231 test "$program_prefix" != NONE &&
1232 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1233 # Use a double $ so make ignores it.
1234 test "$program_suffix" != NONE &&
1235 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1236
1237 # sed with no file args requires a program.
1238 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1239
1240
1241 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1242 echo "configure:1243: checking return type of signal handlers" >&5
1243 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1245 else
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1249 #include <sys/types.h>
1250 #include <signal.h>
1251 #ifdef signal
1252 #undef signal
1253 #endif
1254 #ifdef __cplusplus
1255 extern "C" void (*signal (int, void (*)(int)))(int);
1256 #else
1257 void (*signal ()) ();
1258 #endif
1259
1260 int main() {
1261 int i;
1262 ; return 0; }
1263 EOF
1264 if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1265 rm -rf conftest*
1266 ac_cv_type_signal=void
1267 else
1268 echo "configure: failed program was:" >&5
1269 cat conftest.$ac_ext >&5
1270 rm -rf conftest*
1271 ac_cv_type_signal=int
1272 fi
1273 rm -f conftest*
1274 fi
1275
1276 echo "$ac_t""$ac_cv_type_signal" 1>&6
1277 cat >> confdefs.h <<EOF
1278 #define RETSIGTYPE $ac_cv_type_signal
1279 EOF
1280
1281
1282
1283 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1284 echo "configure:1285: checking for ANSI C header files" >&5
1285 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287 else
1288 cat > conftest.$ac_ext <<EOF
1289 #line 1290 "configure"
1290 #include "confdefs.h"
1291 #include <stdlib.h>
1292 #include <stdarg.h>
1293 #include <string.h>
1294 #include <float.h>
1295 EOF
1296 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1297 { (eval echo configure:1298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1298 ac_err=`grep -v '^ *+' conftest.out`
1299 if test -z "$ac_err"; then
1300 rm -rf conftest*
1301 ac_cv_header_stdc=yes
1302 else
1303 echo "$ac_err" >&5
1304 echo "configure: failed program was:" >&5
1305 cat conftest.$ac_ext >&5
1306 rm -rf conftest*
1307 ac_cv_header_stdc=no
1308 fi
1309 rm -f conftest*
1310
1311 if test $ac_cv_header_stdc = yes; then
1312 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1313 cat > conftest.$ac_ext <<EOF
1314 #line 1315 "configure"
1315 #include "confdefs.h"
1316 #include <string.h>
1317 EOF
1318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1319 egrep "memchr" >/dev/null 2>&1; then
1320 :
1321 else
1322 rm -rf conftest*
1323 ac_cv_header_stdc=no
1324 fi
1325 rm -f conftest*
1326
1327 fi
1328
1329 if test $ac_cv_header_stdc = yes; then
1330 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1331 cat > conftest.$ac_ext <<EOF
1332 #line 1333 "configure"
1333 #include "confdefs.h"
1334 #include <stdlib.h>
1335 EOF
1336 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1337 egrep "free" >/dev/null 2>&1; then
1338 :
1339 else
1340 rm -rf conftest*
1341 ac_cv_header_stdc=no
1342 fi
1343 rm -f conftest*
1344
1345 fi
1346
1347 if test $ac_cv_header_stdc = yes; then
1348 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1349 if test "$cross_compiling" = yes; then
1350 :
1351 else
1352 cat > conftest.$ac_ext <<EOF
1353 #line 1354 "configure"
1354 #include "confdefs.h"
1355 #include <ctype.h>
1356 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1357 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1358 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1359 int main () { int i; for (i = 0; i < 256; i++)
1360 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1361 exit (0); }
1362
1363 EOF
1364 if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1365 then
1366 :
1367 else
1368 echo "configure: failed program was:" >&5
1369 cat conftest.$ac_ext >&5
1370 rm -fr conftest*
1371 ac_cv_header_stdc=no
1372 fi
1373 rm -fr conftest*
1374 fi
1375
1376 fi
1377 fi
1378
1379 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1380 if test $ac_cv_header_stdc = yes; then
1381 cat >> confdefs.h <<\EOF
1382 #define STDC_HEADERS 1
1383 EOF
1384
1385 fi
1386
1387 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
1388 do
1389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1391 echo "configure:1392: checking for $ac_hdr" >&5
1392 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1393 echo $ac_n "(cached) $ac_c" 1>&6
1394 else
1395 cat > conftest.$ac_ext <<EOF
1396 #line 1397 "configure"
1397 #include "confdefs.h"
1398 #include <$ac_hdr>
1399 EOF
1400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1401 { (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1402 ac_err=`grep -v '^ *+' conftest.out`
1403 if test -z "$ac_err"; then
1404 rm -rf conftest*
1405 eval "ac_cv_header_$ac_safe=yes"
1406 else
1407 echo "$ac_err" >&5
1408 echo "configure: failed program was:" >&5
1409 cat conftest.$ac_ext >&5
1410 rm -rf conftest*
1411 eval "ac_cv_header_$ac_safe=no"
1412 fi
1413 rm -f conftest*
1414 fi
1415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1416 echo "$ac_t""yes" 1>&6
1417 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1418 cat >> confdefs.h <<EOF
1419 #define $ac_tr_hdr 1
1420 EOF
1421
1422 else
1423 echo "$ac_t""no" 1>&6
1424 fi
1425 done
1426
1427 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1428 echo "configure:1429: checking whether stat file-mode macros are broken" >&5
1429 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1430 echo $ac_n "(cached) $ac_c" 1>&6
1431 else
1432 cat > conftest.$ac_ext <<EOF
1433 #line 1434 "configure"
1434 #include "confdefs.h"
1435 #include <sys/types.h>
1436 #include <sys/stat.h>
1437
1438 #if defined(S_ISBLK) && defined(S_IFDIR)
1439 # if S_ISBLK (S_IFDIR)
1440 You lose.
1441 # endif
1442 #endif
1443
1444 #if defined(S_ISBLK) && defined(S_IFCHR)
1445 # if S_ISBLK (S_IFCHR)
1446 You lose.
1447 # endif
1448 #endif
1449
1450 #if defined(S_ISLNK) && defined(S_IFREG)
1451 # if S_ISLNK (S_IFREG)
1452 You lose.
1453 # endif
1454 #endif
1455
1456 #if defined(S_ISSOCK) && defined(S_IFREG)
1457 # if S_ISSOCK (S_IFREG)
1458 You lose.
1459 # endif
1460 #endif
1461
1462 EOF
1463 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1464 egrep "You lose" >/dev/null 2>&1; then
1465 rm -rf conftest*
1466 ac_cv_header_stat_broken=yes
1467 else
1468 rm -rf conftest*
1469 ac_cv_header_stat_broken=no
1470 fi
1471 rm -f conftest*
1472
1473 fi
1474
1475 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1476 if test $ac_cv_header_stat_broken = yes; then
1477 cat >> confdefs.h <<\EOF
1478 #define STAT_MACROS_BROKEN 1
1479 EOF
1480
1481 fi
1482
1483
1484 echo $ac_n "checking for working const""... $ac_c" 1>&6
1485 echo "configure:1486: checking for working const" >&5
1486 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1487 echo $ac_n "(cached) $ac_c" 1>&6
1488 else
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492
1493 int main() {
1494
1495 /* Ultrix mips cc rejects this. */
1496 typedef int charset[2]; const charset x;
1497 /* SunOS 4.1.1 cc rejects this. */
1498 char const *const *ccp;
1499 char **p;
1500 /* NEC SVR4.0.2 mips cc rejects this. */
1501 struct point {int x, y;};
1502 static struct point const zero = {0,0};
1503 /* AIX XL C 1.02.0.0 rejects this.
1504 It does not let you subtract one const X* pointer from another in an arm
1505 of an if-expression whose if-part is not a constant expression */
1506 const char *g = "string";
1507 ccp = &g + (g ? g-g : 0);
1508 /* HPUX 7.0 cc rejects these. */
1509 ++ccp;
1510 p = (char**) ccp;
1511 ccp = (char const *const *) p;
1512 { /* SCO 3.2v4 cc rejects this. */
1513 char *t;
1514 char const *s = 0 ? (char *) 0 : (char const *) 0;
1515
1516 *t++ = 0;
1517 }
1518 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1519 int x[] = {25, 17};
1520 const int *foo = &x[0];
1521 ++foo;
1522 }
1523 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1524 typedef const int *iptr;
1525 iptr p = 0;
1526 ++p;
1527 }
1528 { /* AIX XL C 1.02.0.0 rejects this saying
1529 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1530 struct s { int j; const int *ap[3]; };
1531 struct s *b; b->j = 5;
1532 }
1533 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1534 const int foo = 10;
1535 }
1536
1537 ; return 0; }
1538 EOF
1539 if { (eval echo configure:1540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1540 rm -rf conftest*
1541 ac_cv_c_const=yes
1542 else
1543 echo "configure: failed program was:" >&5
1544 cat conftest.$ac_ext >&5
1545 rm -rf conftest*
1546 ac_cv_c_const=no
1547 fi
1548 rm -f conftest*
1549 fi
1550
1551 echo "$ac_t""$ac_cv_c_const" 1>&6
1552 if test $ac_cv_c_const = no; then
1553 cat >> confdefs.h <<\EOF
1554 #define const
1555 EOF
1556
1557 fi
1558
1559
1560 for ac_func in setpgid sbrk select poll
1561 do
1562 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1563 echo "configure:1564: checking for $ac_func" >&5
1564 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1565 echo $ac_n "(cached) $ac_c" 1>&6
1566 else
1567 cat > conftest.$ac_ext <<EOF
1568 #line 1569 "configure"
1569 #include "confdefs.h"
1570 /* System header to define __stub macros and hopefully few prototypes,
1571 which can conflict with char $ac_func(); below. */
1572 #include <assert.h>
1573 /* Override any gcc2 internal prototype to avoid an error. */
1574 /* We use char because int might match the return type of a gcc2
1575 builtin and then its argument prototype would still apply. */
1576 char $ac_func();
1577
1578 int main() {
1579
1580 /* The GNU C library defines this for functions which it implements
1581 to always fail with ENOSYS. Some functions are actually named
1582 something starting with __ and the normal name is an alias. */
1583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1584 choke me
1585 #else
1586 $ac_func();
1587 #endif
1588
1589 ; return 0; }
1590 EOF
1591 if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1592 rm -rf conftest*
1593 eval "ac_cv_func_$ac_func=yes"
1594 else
1595 echo "configure: failed program was:" >&5
1596 cat conftest.$ac_ext >&5
1597 rm -rf conftest*
1598 eval "ac_cv_func_$ac_func=no"
1599 fi
1600 rm -f conftest*
1601 fi
1602
1603 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1604 echo "$ac_t""yes" 1>&6
1605 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1606 cat >> confdefs.h <<EOF
1607 #define $ac_tr_func 1
1608 EOF
1609
1610 else
1611 echo "$ac_t""no" 1>&6
1612 fi
1613 done
1614
1615
1616 # If we are configured native on Linux, work around problems with sys/procfs.h
1617 if test "${target}" = "${host}"; then
1618 case "${host}" in
1619 i345686-*-linux*)
1620 cat >> confdefs.h <<\EOF
1621 #define START_INFERIOR_TRAPS_EXPECTED "2"
1622 EOF
1623
1624 cat >> confdefs.h <<\EOF
1625 #define sys_quotactl 1
1626 EOF
1627
1628 ;;
1629 esac
1630 fi
1631
1632 echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
1633 echo "configure:1634: checking for gregset_t type" >&5
1634 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
1635 echo $ac_n "(cached) $ac_c" 1>&6
1636 else
1637 cat > conftest.$ac_ext <<EOF
1638 #line 1639 "configure"
1639 #include "confdefs.h"
1640 #include <sys/procfs.h>
1641 int main() {
1642 gregset_t *gregsetp = 0
1643 ; return 0; }
1644 EOF
1645 if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1646 rm -rf conftest*
1647 gdb_cv_have_gregset_t=yes
1648 else
1649 echo "configure: failed program was:" >&5
1650 cat conftest.$ac_ext >&5
1651 rm -rf conftest*
1652 gdb_cv_have_gregset_t=no
1653 fi
1654 rm -f conftest*
1655 fi
1656
1657 echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
1658 if test $gdb_cv_have_gregset_t = yes; then
1659 cat >> confdefs.h <<\EOF
1660 #define HAVE_GREGSET_T 1
1661 EOF
1662
1663 fi
1664
1665 echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
1666 echo "configure:1667: checking for fpregset_t type" >&5
1667 if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
1668 echo $ac_n "(cached) $ac_c" 1>&6
1669 else
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 #include <sys/procfs.h>
1674 int main() {
1675 fpregset_t *fpregsetp = 0
1676 ; return 0; }
1677 EOF
1678 if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1679 rm -rf conftest*
1680 gdb_cv_have_fpregset_t=yes
1681 else
1682 echo "configure: failed program was:" >&5
1683 cat conftest.$ac_ext >&5
1684 rm -rf conftest*
1685 gdb_cv_have_fpregset_t=no
1686 fi
1687 rm -f conftest*
1688 fi
1689
1690 echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
1691 if test $gdb_cv_have_fpregset_t = yes; then
1692 cat >> confdefs.h <<\EOF
1693 #define HAVE_FPREGSET_T 1
1694 EOF
1695
1696 fi
1697
1698 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
1699 echo "configure:1700: checking for main in -lm" >&5
1700 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
1701 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1703 else
1704 ac_save_LIBS="$LIBS"
1705 LIBS="-lm $LIBS"
1706 cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1709
1710 int main() {
1711 main()
1712 ; return 0; }
1713 EOF
1714 if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1715 rm -rf conftest*
1716 eval "ac_cv_lib_$ac_lib_var=yes"
1717 else
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1720 rm -rf conftest*
1721 eval "ac_cv_lib_$ac_lib_var=no"
1722 fi
1723 rm -f conftest*
1724 LIBS="$ac_save_LIBS"
1725
1726 fi
1727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1728 echo "$ac_t""yes" 1>&6
1729 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1730 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1731 cat >> confdefs.h <<EOF
1732 #define $ac_tr_lib 1
1733 EOF
1734
1735 LIBS="-lm $LIBS"
1736
1737 else
1738 echo "$ac_t""no" 1>&6
1739 fi
1740
1741
1742
1743 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
1744 echo "configure:1745: checking for long long support in compiler" >&5
1745 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
1746 echo $ac_n "(cached) $ac_c" 1>&6
1747 else
1748 cat > conftest.$ac_ext <<EOF
1749 #line 1750 "configure"
1750 #include "confdefs.h"
1751
1752 int main() {
1753
1754 extern long long foo;
1755 switch (foo & 2) { case 0: return 1; }
1756
1757 ; return 0; }
1758 EOF
1759 if { (eval echo configure:1760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1760 rm -rf conftest*
1761 gdb_cv_c_long_long=yes
1762 else
1763 echo "configure: failed program was:" >&5
1764 cat conftest.$ac_ext >&5
1765 rm -rf conftest*
1766 gdb_cv_c_long_long=no
1767 fi
1768 rm -f conftest*
1769 fi
1770
1771 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
1772 if test $gdb_cv_c_long_long = yes; then
1773 cat >> confdefs.h <<\EOF
1774 #define CC_HAS_LONG_LONG 1
1775 EOF
1776
1777 fi
1778
1779
1780 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
1781 echo "configure:1782: checking for long long support in printf" >&5
1782 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1784 else
1785 if test "$cross_compiling" = yes; then
1786 gdb_cv_printf_has_long_long=no
1787 else
1788 cat > conftest.$ac_ext <<EOF
1789 #line 1790 "configure"
1790 #include "confdefs.h"
1791
1792 int main () {
1793 char buf[16];
1794 long long l = 0x12345;
1795 sprintf (buf, "%llx", l);
1796 return (strcmp ("12345", buf));
1797 }
1798 EOF
1799 if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1800 then
1801 gdb_cv_printf_has_long_long=yes
1802 else
1803 echo "configure: failed program was:" >&5
1804 cat conftest.$ac_ext >&5
1805 rm -fr conftest*
1806 gdb_cv_printf_has_long_long=no
1807 fi
1808 rm -fr conftest*
1809 fi
1810
1811 fi
1812
1813 if test $gdb_cv_printf_has_long_long = yes; then
1814 cat >> confdefs.h <<\EOF
1815 #define PRINTF_HAS_LONG_LONG 1
1816 EOF
1817
1818 fi
1819 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
1820
1821
1822 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
1823 echo "configure:1824: checking for long double support in compiler" >&5
1824 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
1825 echo $ac_n "(cached) $ac_c" 1>&6
1826 else
1827 cat > conftest.$ac_ext <<EOF
1828 #line 1829 "configure"
1829 #include "confdefs.h"
1830
1831 int main() {
1832 long double foo;
1833 ; return 0; }
1834 EOF
1835 if { (eval echo configure:1836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1836 rm -rf conftest*
1837 ac_cv_c_long_double=yes
1838 else
1839 echo "configure: failed program was:" >&5
1840 cat conftest.$ac_ext >&5
1841 rm -rf conftest*
1842 ac_cv_c_long_double=no
1843 fi
1844 rm -f conftest*
1845 fi
1846
1847 echo "$ac_t""$ac_cv_c_long_double" 1>&6
1848 if test $ac_cv_c_long_double = yes; then
1849 cat >> confdefs.h <<\EOF
1850 #define HAVE_LONG_DOUBLE 1
1851 EOF
1852
1853 fi
1854
1855
1856 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
1857 echo "configure:1858: checking for long double support in printf" >&5
1858 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
1859 echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861 if test "$cross_compiling" = yes; then
1862 gdb_cv_printf_has_long_double=no
1863 else
1864 cat > conftest.$ac_ext <<EOF
1865 #line 1866 "configure"
1866 #include "confdefs.h"
1867
1868 int main () {
1869 char buf[16];
1870 long double f = 3.141592653;
1871 sprintf (buf, "%Lg", f);
1872 return (strncmp ("3.14159", buf, 7));
1873 }
1874 EOF
1875 if { (eval echo configure:1876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1876 then
1877 gdb_cv_printf_has_long_double=yes
1878 else
1879 echo "configure: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 rm -fr conftest*
1882 gdb_cv_printf_has_long_double=no
1883 fi
1884 rm -fr conftest*
1885 fi
1886
1887 fi
1888
1889 if test $gdb_cv_printf_has_long_double = yes; then
1890 cat >> confdefs.h <<\EOF
1891 #define PRINTF_HAS_LONG_DOUBLE 1
1892 EOF
1893
1894 fi
1895 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
1896
1897 for ac_hdr in unistd.h
1898 do
1899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1901 echo "configure:1902: checking for $ac_hdr" >&5
1902 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
1904 else
1905 cat > conftest.$ac_ext <<EOF
1906 #line 1907 "configure"
1907 #include "confdefs.h"
1908 #include <$ac_hdr>
1909 EOF
1910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1911 { (eval echo configure:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1912 ac_err=`grep -v '^ *+' conftest.out`
1913 if test -z "$ac_err"; then
1914 rm -rf conftest*
1915 eval "ac_cv_header_$ac_safe=yes"
1916 else
1917 echo "$ac_err" >&5
1918 echo "configure: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 rm -rf conftest*
1921 eval "ac_cv_header_$ac_safe=no"
1922 fi
1923 rm -f conftest*
1924 fi
1925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1926 echo "$ac_t""yes" 1>&6
1927 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1928 cat >> confdefs.h <<EOF
1929 #define $ac_tr_hdr 1
1930 EOF
1931
1932 else
1933 echo "$ac_t""no" 1>&6
1934 fi
1935 done
1936
1937 for ac_func in getpagesize
1938 do
1939 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_func" >&5
1941 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1943 else
1944 cat > conftest.$ac_ext <<EOF
1945 #line 1946 "configure"
1946 #include "confdefs.h"
1947 /* System header to define __stub macros and hopefully few prototypes,
1948 which can conflict with char $ac_func(); below. */
1949 #include <assert.h>
1950 /* Override any gcc2 internal prototype to avoid an error. */
1951 /* We use char because int might match the return type of a gcc2
1952 builtin and then its argument prototype would still apply. */
1953 char $ac_func();
1954
1955 int main() {
1956
1957 /* The GNU C library defines this for functions which it implements
1958 to always fail with ENOSYS. Some functions are actually named
1959 something starting with __ and the normal name is an alias. */
1960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1961 choke me
1962 #else
1963 $ac_func();
1964 #endif
1965
1966 ; return 0; }
1967 EOF
1968 if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1969 rm -rf conftest*
1970 eval "ac_cv_func_$ac_func=yes"
1971 else
1972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1974 rm -rf conftest*
1975 eval "ac_cv_func_$ac_func=no"
1976 fi
1977 rm -f conftest*
1978 fi
1979
1980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1981 echo "$ac_t""yes" 1>&6
1982 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1983 cat >> confdefs.h <<EOF
1984 #define $ac_tr_func 1
1985 EOF
1986
1987 else
1988 echo "$ac_t""no" 1>&6
1989 fi
1990 done
1991
1992 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1993 echo "configure:1994: checking for working mmap" >&5
1994 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1995 echo $ac_n "(cached) $ac_c" 1>&6
1996 else
1997 if test "$cross_compiling" = yes; then
1998 ac_cv_func_mmap_fixed_mapped=no
1999 else
2000 cat > conftest.$ac_ext <<EOF
2001 #line 2002 "configure"
2002 #include "confdefs.h"
2003
2004 /* Thanks to Mike Haertel and Jim Avera for this test.
2005 Here is a matrix of mmap possibilities:
2006 mmap private not fixed
2007 mmap private fixed at somewhere currently unmapped
2008 mmap private fixed at somewhere already mapped
2009 mmap shared not fixed
2010 mmap shared fixed at somewhere currently unmapped
2011 mmap shared fixed at somewhere already mapped
2012 For private mappings, we should verify that changes cannot be read()
2013 back from the file, nor mmap's back from the file at a different
2014 address. (There have been systems where private was not correctly
2015 implemented like the infamous i386 svr4.0, and systems where the
2016 VM page cache was not coherent with the filesystem buffer cache
2017 like early versions of FreeBSD and possibly contemporary NetBSD.)
2018 For shared mappings, we should conversely verify that changes get
2019 propogated back to all the places they're supposed to be.
2020
2021 Grep wants private fixed already mapped.
2022 The main things grep needs to know about mmap are:
2023 * does it exist and is it safe to write into the mmap'd area
2024 * how to use it (BSD variants) */
2025 #include <sys/types.h>
2026 #include <fcntl.h>
2027 #include <sys/mman.h>
2028
2029 /* This mess was copied from the GNU getpagesize.h. */
2030 #ifndef HAVE_GETPAGESIZE
2031 # ifdef HAVE_UNISTD_H
2032 # include <unistd.h>
2033 # endif
2034
2035 /* Assume that all systems that can run configure have sys/param.h. */
2036 # ifndef HAVE_SYS_PARAM_H
2037 # define HAVE_SYS_PARAM_H 1
2038 # endif
2039
2040 # ifdef _SC_PAGESIZE
2041 # define getpagesize() sysconf(_SC_PAGESIZE)
2042 # else /* no _SC_PAGESIZE */
2043 # ifdef HAVE_SYS_PARAM_H
2044 # include <sys/param.h>
2045 # ifdef EXEC_PAGESIZE
2046 # define getpagesize() EXEC_PAGESIZE
2047 # else /* no EXEC_PAGESIZE */
2048 # ifdef NBPG
2049 # define getpagesize() NBPG * CLSIZE
2050 # ifndef CLSIZE
2051 # define CLSIZE 1
2052 # endif /* no CLSIZE */
2053 # else /* no NBPG */
2054 # ifdef NBPC
2055 # define getpagesize() NBPC
2056 # else /* no NBPC */
2057 # ifdef PAGESIZE
2058 # define getpagesize() PAGESIZE
2059 # endif /* PAGESIZE */
2060 # endif /* no NBPC */
2061 # endif /* no NBPG */
2062 # endif /* no EXEC_PAGESIZE */
2063 # else /* no HAVE_SYS_PARAM_H */
2064 # define getpagesize() 8192 /* punt totally */
2065 # endif /* no HAVE_SYS_PARAM_H */
2066 # endif /* no _SC_PAGESIZE */
2067
2068 #endif /* no HAVE_GETPAGESIZE */
2069
2070 #ifdef __cplusplus
2071 extern "C" { void *malloc(unsigned); }
2072 #else
2073 char *malloc();
2074 #endif
2075
2076 int
2077 main()
2078 {
2079 char *data, *data2, *data3;
2080 int i, pagesize;
2081 int fd;
2082
2083 pagesize = getpagesize();
2084
2085 /*
2086 * First, make a file with some known garbage in it.
2087 */
2088 data = malloc(pagesize);
2089 if (!data)
2090 exit(1);
2091 for (i = 0; i < pagesize; ++i)
2092 *(data + i) = rand();
2093 umask(0);
2094 fd = creat("conftestmmap", 0600);
2095 if (fd < 0)
2096 exit(1);
2097 if (write(fd, data, pagesize) != pagesize)
2098 exit(1);
2099 close(fd);
2100
2101 /*
2102 * Next, try to mmap the file at a fixed address which
2103 * already has something else allocated at it. If we can,
2104 * also make sure that we see the same garbage.
2105 */
2106 fd = open("conftestmmap", O_RDWR);
2107 if (fd < 0)
2108 exit(1);
2109 data2 = malloc(2 * pagesize);
2110 if (!data2)
2111 exit(1);
2112 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2113 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2114 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2115 exit(1);
2116 for (i = 0; i < pagesize; ++i)
2117 if (*(data + i) != *(data2 + i))
2118 exit(1);
2119
2120 /*
2121 * Finally, make sure that changes to the mapped area
2122 * do not percolate back to the file as seen by read().
2123 * (This is a bug on some variants of i386 svr4.0.)
2124 */
2125 for (i = 0; i < pagesize; ++i)
2126 *(data2 + i) = *(data2 + i) + 1;
2127 data3 = malloc(pagesize);
2128 if (!data3)
2129 exit(1);
2130 if (read(fd, data3, pagesize) != pagesize)
2131 exit(1);
2132 for (i = 0; i < pagesize; ++i)
2133 if (*(data + i) != *(data3 + i))
2134 exit(1);
2135 close(fd);
2136 unlink("conftestmmap");
2137 exit(0);
2138 }
2139
2140 EOF
2141 if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
2142 then
2143 ac_cv_func_mmap_fixed_mapped=yes
2144 else
2145 echo "configure: failed program was:" >&5
2146 cat conftest.$ac_ext >&5
2147 rm -fr conftest*
2148 ac_cv_func_mmap_fixed_mapped=no
2149 fi
2150 rm -fr conftest*
2151 fi
2152
2153 fi
2154
2155 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2156 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2157 cat >> confdefs.h <<\EOF
2158 #define HAVE_MMAP 1
2159 EOF
2160
2161 fi
2162
2163
2164 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
2165 echo "configure:2166: checking whether malloc must be declared" >&5
2166 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
2167 echo $ac_n "(cached) $ac_c" 1>&6
2168 else
2169 cat > conftest.$ac_ext <<EOF
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172
2173 #include <stdio.h>
2174 #ifdef HAVE_STRING_H
2175 #include <string.h>
2176 #else
2177 #ifdef HAVE_STRINGS_H
2178 #include <strings.h>
2179 #endif
2180 #endif
2181 #ifdef HAVE_STDLIB_H
2182 #include <stdlib.h>
2183 #endif
2184 #ifdef HAVE_UNISTD_H
2185 #include <unistd.h>
2186 #endif
2187 int main() {
2188 char *(*pfn) = (char *(*)) malloc
2189 ; return 0; }
2190 EOF
2191 if { (eval echo configure:2192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2192 rm -rf conftest*
2193 bfd_cv_decl_needed_malloc=no
2194 else
2195 echo "configure: failed program was:" >&5
2196 cat conftest.$ac_ext >&5
2197 rm -rf conftest*
2198 bfd_cv_decl_needed_malloc=yes
2199 fi
2200 rm -f conftest*
2201 fi
2202
2203 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
2204 if test $bfd_cv_decl_needed_malloc = yes; then
2205 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2206 cat >> confdefs.h <<EOF
2207 #define $bfd_tr_decl 1
2208 EOF
2209
2210 fi
2211
2212 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
2213 echo "configure:2214: checking whether realloc must be declared" >&5
2214 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
2215 echo $ac_n "(cached) $ac_c" 1>&6
2216 else
2217 cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2220
2221 #include <stdio.h>
2222 #ifdef HAVE_STRING_H
2223 #include <string.h>
2224 #else
2225 #ifdef HAVE_STRINGS_H
2226 #include <strings.h>
2227 #endif
2228 #endif
2229 #ifdef HAVE_STDLIB_H
2230 #include <stdlib.h>
2231 #endif
2232 #ifdef HAVE_UNISTD_H
2233 #include <unistd.h>
2234 #endif
2235 int main() {
2236 char *(*pfn) = (char *(*)) realloc
2237 ; return 0; }
2238 EOF
2239 if { (eval echo configure:2240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2240 rm -rf conftest*
2241 bfd_cv_decl_needed_realloc=no
2242 else
2243 echo "configure: failed program was:" >&5
2244 cat conftest.$ac_ext >&5
2245 rm -rf conftest*
2246 bfd_cv_decl_needed_realloc=yes
2247 fi
2248 rm -f conftest*
2249 fi
2250
2251 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
2252 if test $bfd_cv_decl_needed_realloc = yes; then
2253 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2254 cat >> confdefs.h <<EOF
2255 #define $bfd_tr_decl 1
2256 EOF
2257
2258 fi
2259
2260 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
2261 echo "configure:2262: checking whether free must be declared" >&5
2262 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2263 echo $ac_n "(cached) $ac_c" 1>&6
2264 else
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2267 "configure"
2267 #include "confdefs.h"
2268
2269 #include <stdio.h>
2270 #ifdef HAVE_STRING_H
2271 #include <string.h>
2272 #else
2273 #ifdef HAVE_STRINGS_H
2274 #include <strings.h>
2275 #endif
2276 #endif
2277 #ifdef HAVE_STDLIB_H
2278 #include <stdlib.h>
2279 #endif
2280 #ifdef HAVE_UNISTD_H
2281 #include <unistd.h>
2282 #endif
2283 int main() {
2284 char *(*pfn) = (char *(*)) free
2285 ; return 0; }
2286 EOF
2287 if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2288 rm -rf conftest*
2289 bfd_cv_decl_needed_free=no
2290 else
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293 rm -rf conftest*
2294 bfd_cv_decl_needed_free=yes
2295 fi
2296 rm -f conftest*
2297 fi
2298
2299 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2300 if test $bfd_cv_decl_needed_free = yes; then
2301 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2302 cat >> confdefs.h <<EOF
2303 #define $bfd_tr_decl 1
2304 EOF
2305
2306 fi
2307
2308
2309
2310
2311 if test ${build} = ${host} -a ${host} = ${target} ; then
2312 case ${host_os} in
2313 hpux*)
2314 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
2315 echo "configure:2316: checking for HPUX/OSF thread support" >&5
2316 if test -f /usr/include/dce/cma_config.h ; then
2317 if test "$GCC" = "yes" ; then
2318 echo "$ac_t""yes" 1>&6
2319 cat >> confdefs.h <<\EOF
2320 #define HAVE_HPUX_THREAD_SUPPORT 1
2321 EOF
2322
2323 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
2324 else
2325 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
2326 fi
2327 else
2328 echo "$ac_t""no" 1>&6
2329 fi
2330 ;;
2331 solaris*)
2332 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
2333 echo "configure:2334: checking for Solaris thread debugging library" >&5
2334 if test -f /usr/lib/libthread_db.so.1 ; then
2335 echo "$ac_t""yes" 1>&6
2336 cat >> confdefs.h <<\EOF
2337 #define HAVE_THREAD_DB_LIB 1
2338 EOF
2339
2340 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
2341 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2342 echo "configure:2343: checking for dlopen in -ldl" >&5
2343 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2344 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2345 echo $ac_n "(cached) $ac_c" 1>&6
2346 else
2347 ac_save_LIBS="$LIBS"
2348 LIBS="-ldl $LIBS"
2349 cat > conftest.$ac_ext <<EOF
2350 #line 2351 "configure"
2351 #include "confdefs.h"
2352 /* Override any gcc2 internal prototype to avoid an error. */
2353 /* We use char because int might match the return type of a gcc2
2354 builtin and then its argument prototype would still apply. */
2355 char dlopen();
2356
2357 int main() {
2358 dlopen()
2359 ; return 0; }
2360 EOF
2361 if { (eval echo configure:2362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2362 rm -rf conftest*
2363 eval "ac_cv_lib_$ac_lib_var=yes"
2364 else
2365 echo "configure: failed program was:" >&5
2366 cat conftest.$ac_ext >&5
2367 rm -rf conftest*
2368 eval "ac_cv_lib_$ac_lib_var=no"
2369 fi
2370 rm -f conftest*
2371 LIBS="$ac_save_LIBS"
2372
2373 fi
2374 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2375 echo "$ac_t""yes" 1>&6
2376 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2377 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2378 cat >> confdefs.h <<EOF
2379 #define $ac_tr_lib 1
2380 EOF
2381
2382 LIBS="-ldl $LIBS"
2383
2384 else
2385 echo "$ac_t""no" 1>&6
2386 fi
2387
2388 if test "$GCC" = "yes" ; then
2389 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
2390 fi
2391 else
2392 echo "$ac_t""no" 1>&6
2393 fi
2394 ;;
2395 esac
2396
2397 fi
2398
2399 ENABLE_CFLAGS=
2400
2401 # Check whether --enable-netrom or --disable-netrom was given.
2402 if test "${enable_netrom+set}" = set; then
2403 enableval="$enable_netrom"
2404 case "${enableval}" in
2405 yes) enable_netrom=yes ;;
2406 no) enable_netrom=no ;;
2407 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
2408 esac
2409 fi
2410
2411
2412 if test "${enable_netrom}" = "yes"; then
2413 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
2414 fi
2415
2416 # start-sanitize-gdbtk
2417 ENABLE_IDE=
2418 # Check whether --enable-ide or --disable-ide was given.
2419 if test "${enable_ide+set}" = set; then
2420 enableval="$enable_ide"
2421 :
2422 fi
2423
2424 if test "$enable_ide" = yes; then
2425 enable_ide=yes
2426 ENABLE_IDE=1
2427 else
2428 enable_ide=no
2429 fi
2430
2431
2432 ENABLE_GDBTK=
2433
2434 # Check whether --enable-gdbtk or --disable-gdbtk was given.
2435 if test "${enable_gdbtk+set}" = set; then
2436 enableval="$enable_gdbtk"
2437 case "${enableval}" in
2438 yes)
2439 case "$host" in
2440 *go32*)
2441 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
2442 enable_gdbtk=no ;;
2443 *windows*)
2444 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
2445 enable_gdbtk=no ;;
2446 *)
2447 enable_gdbtk=yes ;;
2448 esac ;;
2449 no)
2450 enable_gdbtk=no ;;
2451 *)
2452 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
2453 esac
2454 else
2455
2456 # Default is on for everything but go32 and cygwin32
2457 case "$host" in
2458 *go32* | *windows*)
2459 ;;
2460 *)
2461 enable_gdbtk=yes ;;
2462 esac
2463
2464 fi
2465
2466
2467 # In the cygwin32 environment, we need some additional flags.
2468 echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
2469 echo "configure:2470: checking for cygwin32" >&5
2470 if eval "test \"`echo '$''{'gdb_cv_os_cygwin32'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476
2477 #ifdef __CYGWIN32__
2478 lose
2479 #endif
2480 EOF
2481 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2482 egrep "lose" >/dev/null 2>&1; then
2483 rm -rf conftest*
2484 gdb_cv_os_cygwin32=yes
2485 else
2486 rm -rf conftest*
2487 gdb_cv_os_cygwin32=no
2488 fi
2489 rm -f conftest*
2490
2491 fi
2492
2493 echo "$ac_t""$gdb_cv_os_cygwin32" 1>&6
2494
2495 WIN32LIBS=
2496 WIN32LDAPP=
2497
2498
2499
2500 if test x$gdb_cv_os_cygwin32 = xyes; then
2501 if test x$enable_ide = xyes; then
2502 WIN32LIBS="-ladvapi32"
2503 fi
2504 fi
2505
2506 configdir="unix"
2507
2508 if test "${enable_gdbtk}" = "yes"; then
2509
2510
2511 #
2512 # Ok, lets find the tcl configuration
2513 # First, look for one uninstalled.
2514 # the alternative search directory is invoked by --with-tclconfig
2515 #
2516
2517 if test x"${no_tcl}" = x ; then
2518 # we reset no_tcl in case something fails here
2519 no_tcl=true
2520 # Check whether --with-tclconfig or --without-tclconfig was given.
2521 if test "${with_tclconfig+set}" = set; then
2522 withval="$with_tclconfig"
2523 with_tclconfig=${withval}
2524 fi
2525
2526 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
2527 echo "configure:2528: checking for Tcl configuration" >&5
2528 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
2529 echo $ac_n "(cached) $ac_c" 1>&6
2530 else
2531
2532
2533 # First check to see if --with-tclconfig was specified.
2534 if test x"${with_tclconfig}" != x ; then
2535 if test -f "${with_tclconfig}/tclConfig.sh" ; then
2536 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
2537 else
2538 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
2539 fi
2540 fi
2541
2542 # then check for a private Tcl installation
2543 if test x"${ac_cv_c_tclconfig}" = x ; then
2544 for i in \
2545 ../tcl \
2546 `ls -dr ../tcl[7-9]* 2>/dev/null` \
2547 ../../tcl \
2548 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
2549 ../../../tcl \
2550 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
2551 if test -f "$i/${configdir}/tclConfig.sh" ; then
2552 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
2553 break
2554 fi
2555 done
2556 fi
2557 # check in a few common install locations
2558 if test x"${ac_cv_c_tclconfig}" = x ; then
2559 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2560 if test -f "$i/tclConfig.sh" ; then
2561 ac_cv_c_tclconfig=`(cd $i; pwd)`
2562 break
2563 fi
2564 done
2565 fi
2566 # check in a few other private locations
2567 if test x"${ac_cv_c_tclconfig}" = x ; then
2568 for i in \
2569 ${srcdir}/../tcl \
2570 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
2571 if test -f "$i/${configdir}/tclConfig.sh" ; then
2572 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
2573 break
2574 fi
2575 done
2576 fi
2577
2578 fi
2579
2580 if test x"${ac_cv_c_tclconfig}" = x ; then
2581 TCLCONFIG="# no Tcl configs found"
2582 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
2583 else
2584 no_tcl=
2585 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
2586 echo "$ac_t""found $TCLCONFIG" 1>&6
2587 fi
2588 fi
2589
2590 if test -z "${no_tcl}"; then
2591
2592 . $TCLCONFIG
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619 #
2620 # Ok, lets find the tk configuration
2621 # First, look for one uninstalled.
2622 # the alternative search directory is invoked by --with-tkconfig
2623 #
2624
2625 if test x"${no_tk}" = x ; then
2626 # we reset no_tk in case something fails here
2627 no_tk=true
2628 # Check whether --with-tkconfig or --without-tkconfig was given.
2629 if test "${with_tkconfig+set}" = set; then
2630 withval="$with_tkconfig"
2631 with_tkconfig=${withval}
2632 fi
2633
2634 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
2635 echo "configure:2636: checking for Tk configuration" >&5
2636 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
2637 echo $ac_n "(cached) $ac_c" 1>&6
2638 else
2639
2640
2641 # First check to see if --with-tkconfig was specified.
2642 if test x"${with_tkconfig}" != x ; then
2643 if test -f "${with_tkconfig}/tkConfig.sh" ; then
2644 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
2645 else
2646 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
2647 fi
2648 fi
2649
2650 # then check for a private Tk library
2651 if test x"${ac_cv_c_tkconfig}" = x ; then
2652 for i in \
2653 ../tk \
2654 `ls -dr ../tk[4-9]* 2>/dev/null` \
2655 ../../tk \
2656 `ls -dr ../../tk[4-9]* 2>/dev/null` \
2657 ../../../tk \
2658 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
2659 if test -f "$i/${configdir}/tkConfig.sh" ; then
2660 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
2661 break
2662 fi
2663 done
2664 fi
2665 # check in a few common install locations
2666 if test x"${ac_cv_c_tkconfig}" = x ; then
2667 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2668 if test -f "$i/tkConfig.sh" ; then
2669 ac_cv_c_tkconfig=`(cd $i; pwd)`
2670 break
2671 fi
2672 done
2673 fi
2674 # check in a few other private locations
2675 if test x"${ac_cv_c_tkconfig}" = x ; then
2676 for i in \
2677 ${srcdir}/../tk \
2678 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
2679 if test -f "$i/${configdir}/tkConfig.sh" ; then
2680 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
2681 break
2682 fi
2683 done
2684 fi
2685
2686 fi
2687
2688 if test x"${ac_cv_c_tkconfig}" = x ; then
2689 TKCONFIG="# no Tk configs found"
2690 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
2691 else
2692 no_tk=
2693 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
2694 echo "$ac_t""found $TKCONFIG" 1>&6
2695 fi
2696 fi
2697
2698
2699
2700 # If $no_tk is nonempty, then we can't do Tk, and there is no
2701 # point to doing Tcl.
2702 if test -z "${no_tk}"; then
2703
2704 if test -f "$TKCONFIG" ; then
2705 . $TKCONFIG
2706 fi
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721 #
2722 # Ok, lets find the tcl source trees so we can use the headers
2723 # Warning: transition of version 9 to 10 will break this algorithm
2724 # because 10 sorts before 9. We also look for just tcl. We have to
2725 # be careful that we don't match stuff like tclX by accident.
2726 # the alternative search directory is involked by --with-tclinclude
2727 #
2728
2729 no_tcl=true
2730 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
2731 echo "configure:2732: checking for Tcl private headers. dir=${configdir}" >&5
2732 # Check whether --with-tclinclude or --without-tclinclude was given.
2733 if test "${with_tclinclude+set}" = set; then
2734 withval="$with_tclinclude"
2735 with_tclinclude=${withval}
2736 fi
2737
2738 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2739 echo $ac_n "(cached) $ac_c" 1>&6
2740 else
2741
2742 # first check to see if --with-tclinclude was specified
2743 if test x"${with_tclinclude}" != x ; then
2744 if test -f ${with_tclinclude}/tclInt.h ; then
2745 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
2746 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
2747 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
2748 else
2749 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2750 fi
2751 fi
2752
2753 # next check if it came with Tcl configuration file
2754 if test x"${ac_cv_c_tclconfig}" = x ; then
2755 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
2756 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
2757 fi
2758 fi
2759
2760 # next check in private source directory
2761 #
2762 # since ls returns lowest version numbers first, reverse its output
2763 if test x"${ac_cv_c_tclh}" = x ; then
2764 for i in \
2765 ${srcdir}/../tcl \
2766 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
2767 ${srcdir}/../../tcl \
2768 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
2769 ${srcdir}/../../../tcl \
2770 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
2771 if test -f $i/generic/tclInt.h ; then
2772 ac_cv_c_tclh=`(cd $i/generic; pwd)`
2773 break
2774 fi
2775 done
2776 fi
2777 # finally check in a few common install locations
2778 #
2779 # since ls returns lowest version numbers first, reverse its output
2780 if test x"${ac_cv_c_tclh}" = x ; then
2781 for i in \
2782 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
2783 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
2784 /usr/local/src/tcl \
2785 /usr/local/lib/tcl \
2786 ${prefix}/include ; do
2787 if test -f $i/generic/tclInt.h ; then
2788 ac_cv_c_tclh=`(cd $i/generic; pwd)`
2789 break
2790 fi
2791 done
2792 fi
2793 # see if one is installed
2794 if test x"${ac_cv_c_tclh}" = x ; then
2795 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
2796 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
2797 echo "configure:2798: checking for tclInt.h" >&5
2798 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2799 echo $ac_n "(cached) $ac_c" 1>&6
2800 else
2801 cat > conftest.$ac_ext <<EOF
2802 #line 2803 "configure"
2803 #include "confdefs.h"
2804 #include <tclInt.h>
2805 EOF
2806 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2807 { (eval echo configure:2808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2808 ac_err=`grep -v '^ *+' conftest.out`
2809 if test -z "$ac_err"; then
2810 rm -rf conftest*
2811 eval "ac_cv_header_$ac_safe=yes"
2812 else
2813 echo "$ac_err" >&5
2814 echo "configure: failed program was:" >&5
2815 cat conftest.$ac_ext >&5
2816 rm -rf conftest*
2817 eval "ac_cv_header_$ac_safe=no"
2818 fi
2819 rm -f conftest*
2820 fi
2821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2822 echo "$ac_t""yes" 1>&6
2823 ac_cv_c_tclh=installed
2824 else
2825 echo "$ac_t""no" 1>&6
2826 ac_cv_c_tclh=""
2827 fi
2828
2829 fi
2830
2831 fi
2832
2833 if test x"${ac_cv_c_tclh}" = x ; then
2834 TCLHDIR="# no Tcl private headers found"
2835 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2836 fi
2837 if test x"${ac_cv_c_tclh}" != x ; then
2838 no_tcl=""
2839 if test x"${ac_cv_c_tclh}" = x"installed" ; then
2840 echo "$ac_t""is installed" 1>&6
2841 TCLHDIR=""
2842 else
2843 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2844 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2845 TCLHDIR="-I${ac_cv_c_tclh}"
2846 fi
2847 fi
2848
2849
2850
2851
2852 #
2853 # Ok, lets find the tk source trees so we can use the headers
2854 # If the directory (presumably symlink) named "tk" exists, use that one
2855 # in preference to any others. Same logic is used when choosing library
2856 # and again with Tcl. The search order is the best place to look first, then in
2857 # decreasing significance. The loop breaks if the trigger file is found.
2858 # Note the gross little conversion here of srcdir by cd'ing to the found
2859 # directory. This converts the path from a relative to an absolute, so
2860 # recursive cache variables for the path will work right. We check all
2861 # the possible paths in one loop rather than many seperate loops to speed
2862 # things up.
2863 # the alternative search directory is involked by --with-tkinclude
2864 #
2865 no_tk=true
2866 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2867 echo "configure:2868: checking for Tk private headers" >&5
2868 # Check whether --with-tkinclude or --without-tkinclude was given.
2869 if test "${with_tkinclude+set}" = set; then
2870 withval="$with_tkinclude"
2871 with_tkinclude=${withval}
2872 fi
2873
2874 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2875 echo $ac_n "(cached) $ac_c" 1>&6
2876 else
2877
2878 # first check to see if --with-tkinclude was specified
2879 if test x"${with_tkinclude}" != x ; then
2880 if test -f ${with_tkinclude}/tk.h ; then
2881 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
2882 elif test -f ${with_tkinclude}/generic/tk.h ; then
2883 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
2884 else
2885 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2886 fi
2887 fi
2888
2889 # next check if it came with Tk configuration file
2890 if test x"${ac_cv_c_tkconfig}" = x ; then
2891 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
2892 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
2893 fi
2894 fi
2895
2896 # next check in private source directory
2897 #
2898 # since ls returns lowest version numbers first, reverse its output
2899 if test x"${ac_cv_c_tkh}" = x ; then
2900 for i in \
2901 ${srcdir}/../tk \
2902 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
2903 ${srcdir}/../../tk \
2904 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
2905 ${srcdir}/../../../tk \
2906 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
2907 if test -f $i/generic/tk.h ; then
2908 ac_cv_c_tkh=`(cd $i/generic; pwd)`
2909 break
2910 fi
2911 done
2912 fi
2913 # finally check in a few common install locations
2914 #
2915 # since ls returns lowest version numbers first, reverse its output
2916 if test x"${ac_cv_c_tkh}" = x ; then
2917 for i in \
2918 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
2919 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
2920 /usr/local/src/tk \
2921 /usr/local/lib/tk \
2922 ${prefix}/include ; do
2923 if test -f $i/generic/tk.h ; then
2924 ac_cv_c_tkh=`(cd $i/generic; pwd)`
2925 break
2926 fi
2927 done
2928 fi
2929 # see if one is installed
2930 if test x"${ac_cv_c_tkh}" = x ; then
2931 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
2932 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
2933 echo "configure:2934: checking for tk.h" >&5
2934 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2935 echo $ac_n "(cached) $ac_c" 1>&6
2936 else
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 #include <tk.h>
2941 EOF
2942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2943 { (eval echo configure:2944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2944 ac_err=`grep -v '^ *+' conftest.out`
2945 if test -z "$ac_err"; then
2946 rm -rf conftest*
2947 eval "ac_cv_header_$ac_safe=yes"
2948 else
2949 echo "$ac_err" >&5
2950 echo "configure: failed program was:" >&5
2951 cat conftest.$ac_ext >&5
2952 rm -rf conftest*
2953 eval "ac_cv_header_$ac_safe=no"
2954 fi
2955 rm -f conftest*
2956 fi
2957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2958 echo "$ac_t""yes" 1>&6
2959 ac_cv_c_tkh=installed
2960 else
2961 echo "$ac_t""no" 1>&6
2962 ac_cv_c_tkh=""
2963 fi
2964
2965 fi
2966
2967 fi
2968
2969 if test x"${ac_cv_c_tkh}" != x ; then
2970 no_tk=""
2971 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2972 echo "$ac_t""is installed" 1>&6
2973 TKHDIR=""
2974 else
2975 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
2976 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2977 TKHDIR="-I${ac_cv_c_tkh}"
2978 fi
2979 else
2980 TKHDIR="# no Tk directory found"
2981 echo "configure: warning: Can't find Tk private headers" 1>&2
2982 no_tk=true
2983 fi
2984
2985
2986
2987
2988 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
2989 echo "configure:2990: checking for Itcl private headers. srcdir=${srcdir}" >&5
2990 if test x"${ac_cv_c_itclh}" = x ; then
2991 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
2992 if test -f $i/src/itcl.h ; then
2993 ac_cv_c_itclh=`(cd $i/src; pwd)`
2994 break
2995 fi
2996 done
2997 fi
2998 if test x"${ac_cv_c_itclh}" = x ; then
2999 ITCLHDIR="# no Itcl private headers found"
3000 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
3001 fi
3002 if test x"${ac_cv_c_itclh}" != x ; then
3003 ITCLHDIR="-I${ac_cv_c_itclh}"
3004 fi
3005 # should always be here
3006 ITCLLIB="../itcl/src/libitcl.a"
3007
3008
3009
3010
3011 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
3012 echo "configure:3013: checking for Tix private headers. srcdir=${srcdir}" >&5
3013 if test x"${ac_cv_c_tixh}" = x ; then
3014 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
3015 if test -f $i/generic/tix.h ; then
3016 ac_cv_c_tixh=`(cd $i/generic; pwd)`
3017 break
3018 fi
3019 done
3020 fi
3021 if test x"${ac_cv_c_tixh}" = x ; then
3022 TIXHDIR="# no Tix private headers found"
3023 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
3024 fi
3025 if test x"${ac_cv_c_tixh}" != x ; then
3026 TIXHDIR="-I${ac_cv_c_tixh}"
3027 fi
3028
3029
3030
3031 # now look for tix library stuff
3032 TIXVERSION=4.1.8.0
3033 . ${ac_cv_c_tclconfig}/tclConfig.sh
3034 case "${host}" in
3035 *-*-cygwin32*)
3036 tixdir=../tix/win/tcl8.0
3037 ;;
3038 *)
3039 tixdir=../tix/unix/tk8.0
3040 ;;
3041 esac
3042 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
3043 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
3044 else
3045 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
3046 fi
3047
3048 ENABLE_GDBTK=1
3049
3050 # Include some libraries that Tcl and Tk want.
3051 if test "${enable_ide}" = "yes"; then
3052 TCL_LIBS='$(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3053 else
3054 TCL_LIBS='$(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
3055 fi
3056 # Yes, the ordering seems wrong here. But it isn't.
3057 # TK_LIBS is the list of libraries that need to be linked
3058 # after Tcl/Tk.
3059 LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}"
3060 CONFIG_OBS="${CONFIG_OBS} gdbtk.o"
3061
3062 if test x$gdb_cv_os_cygwin32 = xyes; then
3063 WIN32LIBS="${WIN32LIBS} -luser32"
3064 WIN32LDAPP="-Wl,--subsystem,windows"
3065 fi
3066 fi
3067 fi
3068 fi
3069
3070
3071
3072
3073
3074
3075 # end-sanitize-gdbtk
3076
3077
3078
3079
3080
3081 # Begin stuff to support --enable-shared
3082 # Check whether --enable-shared or --disable-shared was given.
3083 if test "${enable_shared+set}" = set; then
3084 enableval="$enable_shared"
3085 case "${enableval}" in
3086 yes) shared=true ;;
3087 no) shared=false ;;
3088 *) shared=true ;;
3089 esac
3090 fi
3091
3092 HLDFLAGS=
3093 HLDENV=
3094 # If we have shared libraries, try to set rpath reasonably.
3095 if test "${shared}" = "true"; then
3096 case "${host}" in
3097 *-*-hpux*)
3098 HLDFLAGS='-Wl,+s,+b,$(libdir)'
3099 ;;
3100 *-*-irix5* | *-*-irix6*)
3101 HLDFLAGS='-Wl,-rpath,$(libdir)'
3102 ;;
3103 *-*-linux*aout*)
3104 ;;
3105 *-*-linux* | *-pc-linux-gnu)
3106 HLDFLAGS='-Wl,-rpath,$(libdir)'
3107 ;;
3108 *-*-solaris*)
3109 HLDFLAGS='-R $(libdir)'
3110 ;;
3111 *-*-sysv4*)
3112 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;'
3113 ;;
3114 esac
3115 fi
3116
3117 # On SunOS, if the linker supports the -rpath option, use it to
3118 # prevent ../bfd and ../opcodes from being included in the run time
3119 # search path.
3120 case "${host}" in
3121 *-*-sunos*)
3122 echo 'main () { }' > conftest.c
3123 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
3124 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
3125 :
3126 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
3127 :
3128 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
3129 :
3130 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
3131 :
3132 elif test "${shared}" = "true"; then
3133 HLDFLAGS='-Wl,-rpath=$(libdir)'
3134 else
3135 HLDFLAGS='-Wl,-rpath='
3136 fi
3137 rm -f conftest.t conftest.c conftest
3138 ;;
3139 esac
3140
3141
3142 # End stuff to support --enable-shared
3143
3144 # target_subdir is used by the testsuite to find the target libraries.
3145 target_subdir=
3146 if test "${host}" != "${target}"; then
3147 target_subdir="${target_alias}/"
3148 fi
3149
3150
3151 frags=
3152 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
3153 if test ! -f ${host_makefile_frag}; then
3154 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
3155 fi
3156 frags="$frags $host_makefile_frag"
3157
3158 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
3159 if test ! -f ${target_makefile_frag}; then
3160 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
3161 fi
3162 frags="$frags $target_makefile_frag"
3163
3164
3165
3166
3167
3168 hostfile=`sed -n '
3169 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3170 ' ${host_makefile_frag}`
3171
3172 targetfile=`sed -n '
3173 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3174 ' ${target_makefile_frag}`
3175
3176 # these really aren't orthogonal true/false values of the same condition,
3177 # but shells are slow enough that I like to reuse the test conditions
3178 # whenever possible
3179 if test "${target}" = "${host}"; then
3180 nativefile=`sed -n '
3181 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3182 ' ${host_makefile_frag}`
3183 # else
3184 # GDBserver is only useful in a "native" enviroment
3185 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
3186 fi
3187
3188
3189 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
3190 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
3191 # corresponding links. But we have to remove the xm.h files and tm.h
3192 # files anyway, e.g. when switching from "configure host" to
3193 # "configure none".
3194
3195 files=
3196 links=
3197 rm -f xm.h
3198 if test "${hostfile}" != ""; then
3199 files="${files} config/${gdb_host_cpu}/${hostfile}"
3200 links="${links} xm.h"
3201 fi
3202 rm -f tm.h
3203 if test "${targetfile}" != ""; then
3204 files="${files} config/${gdb_target_cpu}/${targetfile}"
3205 links="${links} tm.h"
3206 fi
3207 rm -f nm.h
3208 if test "${nativefile}" != ""; then
3209 files="${files} config/${gdb_host_cpu}/${nativefile}"
3210 links="${links} nm.h"
3211 else
3212 # A cross-only configuration.
3213 files="${files} config/nm-empty.h"
3214 links="${links} nm.h"
3215 fi
3216 # start-sanitize-gdbtk
3217 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3218 echo "configure:3219: checking whether ln -s works" >&5
3219 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3220 echo $ac_n "(cached) $ac_c" 1>&6
3221 else
3222 rm -f conftestdata
3223 if ln -s X conftestdata 2>/dev/null
3224 then
3225 rm -f conftestdata
3226 ac_cv_prog_LN_S="ln -s"
3227 else
3228 ac_cv_prog_LN_S=ln
3229 fi
3230 fi
3231 LN_S="$ac_cv_prog_LN_S"
3232 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3233 echo "$ac_t""yes" 1>&6
3234 else
3235 echo "$ac_t""no" 1>&6
3236 fi
3237
3238 # Make it possible to use the GUI without doing a full install
3239 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then
3240 if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
3241 echo linking $srcdir/gdbtcl to gdbtcl
3242 $LN_S $srcdir/gdbtcl gdbtcl
3243 else
3244 echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a
3245 echo " " make install before you are able to run the GUI.
3246 fi
3247 fi
3248 # end-sanitize-gdbtk
3249
3250
3251
3252 echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6
3253 echo "configure:3254: checking for Cygwin32 environment" >&5
3254 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3256 else
3257 cat > conftest.$ac_ext <<EOF
3258 #line 3259 "configure"
3259 #include "confdefs.h"
3260
3261 int main() {
3262 int main () { return __CYGWIN32__; }
3263 ; return 0; }
3264 EOF
3265 if { (eval echo configure:3266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3266 rm -rf conftest*
3267 am_cv_cygwin32=yes
3268 else
3269 echo "configure: failed program was:" >&5
3270 cat conftest.$ac_ext >&5
3271 rm -rf conftest*
3272 am_cv_cygwin32=no
3273 fi
3274 rm -f conftest*
3275 rm -f conftest*
3276 fi
3277
3278 echo "$ac_t""$am_cv_cygwin32" 1>&6
3279 CYGWIN32=
3280 test "$am_cv_cygwin32" = yes && CYGWIN32=yes
3281
3282 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3283 echo "configure:3284: checking for executable suffix" >&5
3284 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then
3285 echo $ac_n "(cached) $ac_c" 1>&6
3286 else
3287 if test "$CYGWIN32" = yes; then
3288 am_cv_exeext=.exe
3289 else
3290 cat > am_c_test.c << 'EOF'
3291 int main() {
3292 /* Nothing needed here */
3293 }
3294 EOF
3295 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
3296 am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
3297 rm -f am_c_test*
3298 fi
3299
3300 test x"${am_cv_exeext}" = x && am_cv_exeext=no
3301 fi
3302 EXEEXT=""
3303 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
3304 echo "$ac_t""${am_cv_exeext}" 1>&6
3305
3306
3307 subdirs="$configdirs"
3308
3309 trap '' 1 2 15
3310 cat > confcache <<\EOF
3311 # This file is a shell script that caches the results of configure
3312 # tests run on this system so they can be shared between configure
3313 # scripts and configure runs. It is not useful on other systems.
3314 # If it contains results you don't want to keep, you may remove or edit it.
3315 #
3316 # By default, configure uses ./config.cache as the cache file,
3317 # creating it if it does not exist already. You can give configure
3318 # the --cache-file=FILE option to use a different cache file; that is
3319 # what configure does when it calls configure scripts in
3320 # subdirectories, so they share the cache.
3321 # Giving --cache-file=/dev/null disables caching, for debugging configure.
3322 # config.status only pays attention to the cache file if you give it the
3323 # --recheck option to rerun configure.
3324 #
3325 EOF
3326 # The following way of writing the cache mishandles newlines in values,
3327 # but we know of no workaround that is simple, portable, and efficient.
3328 # So, don't put newlines in cache variables' values.
3329 # Ultrix sh set writes to stderr and can't be redirected directly,
3330 # and sets the high bit in the cache file unless we assign to the vars.
3331 (set) 2>&1 |
3332 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
3333 *ac_space=\ *)
3334 # `set' does not quote correctly, so add quotes (double-quote substitution
3335 # turns \\\\ into \\, and sed turns \\ into \).
3336 sed -n \
3337 -e "s/'/'\\\\''/g" \
3338 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3339 ;;
3340 *)
3341 # `set' quotes correctly as required by POSIX, so do not add quotes.
3342 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3343 ;;
3344 esac >> confcache
3345 if cmp -s $cache_file confcache; then
3346 :
3347 else
3348 if test -w $cache_file; then
3349 echo "updating cache $cache_file"
3350 cat confcache > $cache_file
3351 else
3352 echo "not updating unwritable cache $cache_file"
3353 fi
3354 fi
3355 rm -f confcache
3356
3357 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3358
3359 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3360 # Let make expand exec_prefix.
3361 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3362
3363 # Any assignment to VPATH causes Sun make to only execute
3364 # the first set of double-colon rules, so remove it if not needed.
3365 # If there is a colon in the path, we need to keep it.
3366 if test "x$srcdir" = x.; then
3367 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3368 fi
3369
3370 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3371
3372 DEFS=-DHAVE_CONFIG_H
3373
3374 # Without the "./", some shells look in PATH for config.status.
3375 : ${CONFIG_STATUS=./config.status}
3376
3377 echo creating $CONFIG_STATUS
3378 rm -f $CONFIG_STATUS
3379 cat > $CONFIG_STATUS <<EOF
3380 #! /bin/sh
3381 # Generated automatically by configure.
3382 # Run this file to recreate the current configuration.
3383 # This directory was configured as follows,
3384 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3385 #
3386 # $0 $ac_configure_args
3387 #
3388 # Compiler output produced by configure, useful for debugging
3389 # configure, is in ./config.log if it exists.
3390
3391 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3392 for ac_option
3393 do
3394 case "\$ac_option" in
3395 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3396 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3397 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3398 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3399 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
3400 exit 0 ;;
3401 -help | --help | --hel | --he | --h)
3402 echo "\$ac_cs_usage"; exit 0 ;;
3403 *) echo "\$ac_cs_usage"; exit 1 ;;
3404 esac
3405 done
3406
3407 ac_given_srcdir=$srcdir
3408 ac_given_INSTALL="$INSTALL"
3409
3410 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
3411 EOF
3412 cat >> $CONFIG_STATUS <<EOF
3413
3414 # Protect against being on the right side of a sed subst in config.status.
3415 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3416 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3417 $ac_vpsub
3418 $extrasub
3419 s%@SHELL@%$SHELL%g
3420 s%@CFLAGS@%$CFLAGS%g
3421 s%@CPPFLAGS@%$CPPFLAGS%g
3422 s%@CXXFLAGS@%$CXXFLAGS%g
3423 s%@DEFS@%$DEFS%g
3424 s%@LDFLAGS@%$LDFLAGS%g
3425 s%@LIBS@%$LIBS%g
3426 s%@exec_prefix@%$exec_prefix%g
3427 s%@prefix@%$prefix%g
3428 s%@program_transform_name@%$program_transform_name%g
3429 s%@bindir@%$bindir%g
3430 s%@sbindir@%$sbindir%g
3431 s%@libexecdir@%$libexecdir%g
3432 s%@datadir@%$datadir%g
3433 s%@sysconfdir@%$sysconfdir%g
3434 s%@sharedstatedir@%$sharedstatedir%g
3435 s%@localstatedir@%$localstatedir%g
3436 s%@libdir@%$libdir%g
3437 s%@includedir@%$includedir%g
3438 s%@oldincludedir@%$oldincludedir%g
3439 s%@infodir@%$infodir%g
3440 s%@mandir@%$mandir%g
3441 s%@CC@%$CC%g
3442 s%@CPP@%$CPP%g
3443 s%@DLLTOOL@%$DLLTOOL%g
3444 s%@host@%$host%g
3445 s%@host_alias@%$host_alias%g
3446 s%@host_cpu@%$host_cpu%g
3447 s%@host_vendor@%$host_vendor%g
3448 s%@host_os@%$host_os%g
3449 s%@target@%$target%g
3450 s%@target_alias@%$target_alias%g
3451 s%@target_cpu@%$target_cpu%g
3452 s%@target_vendor@%$target_vendor%g
3453 s%@target_os@%$target_os%g
3454 s%@build@%$build%g
3455 s%@build_alias@%$build_alias%g
3456 s%@build_cpu@%$build_cpu%g
3457 s%@build_vendor@%$build_vendor%g
3458 s%@build_os@%$build_os%g
3459 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3460 s%@INSTALL_DATA@%$INSTALL_DATA%g
3461 s%@AR@%$AR%g
3462 s%@RANLIB@%$RANLIB%g
3463 s%@YACC@%$YACC%g
3464 s%@AWK@%$AWK%g
3465 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
3466 s%@ENABLE_IDE@%$ENABLE_IDE%g
3467 s%@WIN32LIBS@%$WIN32LIBS%g
3468 s%@WIN32LDAPP@%$WIN32LDAPP%g
3469 s%@TCL_VERSION@%$TCL_VERSION%g
3470 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
3471 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
3472 s%@TCL_CC@%$TCL_CC%g
3473 s%@TCL_DEFS@%$TCL_DEFS%g
3474 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
3475 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
3476 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
3477 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
3478 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
3479 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
3480 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
3481 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
3482 s%@TCL_RANLIB@%$TCL_RANLIB%g
3483 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
3484 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
3485 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
3486 s%@TK_VERSION@%$TK_VERSION%g
3487 s%@TK_DEFS@%$TK_DEFS%g
3488 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
3489 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
3490 s%@TK_XLIBSW@%$TK_XLIBSW%g
3491 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
3492 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
3493 s%@TCLHDIR@%$TCLHDIR%g
3494 s%@TKHDIR@%$TKHDIR%g
3495 s%@ITCLHDIR@%$ITCLHDIR%g
3496 s%@ITCLLIB@%$ITCLLIB%g
3497 s%@TIXHDIR@%$TIXHDIR%g
3498 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
3499 s%@X_CFLAGS@%$X_CFLAGS%g
3500 s%@X_LDFLAGS@%$X_LDFLAGS%g
3501 s%@X_LIBS@%$X_LIBS%g
3502 s%@TIXLIB@%$TIXLIB%g
3503 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3504 s%@CONFIG_OBS@%$CONFIG_OBS%g
3505 s%@HLDFLAGS@%$HLDFLAGS%g
3506 s%@HLDENV@%$HLDENV%g
3507 s%@target_subdir@%$target_subdir%g
3508 /@host_makefile_frag@/r $host_makefile_frag
3509 s%@host_makefile_frag@%%g
3510 /@target_makefile_frag@/r $target_makefile_frag
3511 s%@target_makefile_frag@%%g
3512 s%@frags@%$frags%g
3513 s%@LN_S@%$LN_S%g
3514 s%@EXEEXT@%$EXEEXT%g
3515 s%@subdirs@%$subdirs%g
3516
3517 CEOF
3518 EOF
3519
3520 cat >> $CONFIG_STATUS <<\EOF
3521
3522 # Split the substitutions into bite-sized pieces for seds with
3523 # small command number limits, like on Digital OSF/1 and HP-UX.
3524 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3525 ac_file=1 # Number of current file.
3526 ac_beg=1 # First line for current file.
3527 ac_end=$ac_max_sed_cmds # Line after last line for current file.
3528 ac_more_lines=:
3529 ac_sed_cmds=""
3530 while $ac_more_lines; do
3531 if test $ac_beg -gt 1; then
3532 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3533 else
3534 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3535 fi
3536 if test ! -s conftest.s$ac_file; then
3537 ac_more_lines=false
3538 rm -f conftest.s$ac_file
3539 else
3540 if test -z "$ac_sed_cmds"; then
3541 ac_sed_cmds="sed -f conftest.s$ac_file"
3542 else
3543 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3544 fi
3545 ac_file=`expr $ac_file + 1`
3546 ac_beg=$ac_end
3547 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3548 fi
3549 done
3550 if test -z "$ac_sed_cmds"; then
3551 ac_sed_cmds=cat
3552 fi
3553 EOF
3554
3555 cat >> $CONFIG_STATUS <<EOF
3556
3557 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
3558 EOF
3559 cat >> $CONFIG_STATUS <<\EOF
3560 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3561 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3562 case "$ac_file" in
3563 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3564 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3565 *) ac_file_in="${ac_file}.in" ;;
3566 esac
3567
3568 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3569
3570 # Remove last slash and all that follows it. Not all systems have dirname.
3571 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3572 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3573 # The file is in a subdirectory.
3574 test ! -d "$ac_dir" && mkdir "$ac_dir"
3575 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3576 # A "../" for each directory in $ac_dir_suffix.
3577 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3578 else
3579 ac_dir_suffix= ac_dots=
3580 fi
3581
3582 case "$ac_given_srcdir" in
3583 .) srcdir=.
3584 if test -z "$ac_dots"; then top_srcdir=.
3585 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3586 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3587 *) # Relative path.
3588 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3589 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3590 esac
3591
3592 case "$ac_given_INSTALL" in
3593 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3594 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3595 esac
3596
3597 echo creating "$ac_file"
3598 rm -f "$ac_file"
3599 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3600 case "$ac_file" in
3601 *Makefile*) ac_comsub="1i\\
3602 # $configure_input" ;;
3603 *) ac_comsub= ;;
3604 esac
3605
3606 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3607 sed -e "$ac_comsub
3608 s%@configure_input@%$configure_input%g
3609 s%@srcdir@%$srcdir%g
3610 s%@top_srcdir@%$top_srcdir%g
3611 s%@INSTALL@%$INSTALL%g
3612 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3613 fi; done
3614 rm -f conftest.s*
3615
3616 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3617 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3618 #
3619 # ac_d sets the value in "#define NAME VALUE" lines.
3620 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3621 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3622 ac_dC='\3'
3623 ac_dD='%g'
3624 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3625 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3626 ac_uB='\([ ]\)%\1#\2define\3'
3627 ac_uC=' '
3628 ac_uD='\4%g'
3629 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3630 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3631 ac_eB='$%\1#\2define\3'
3632 ac_eC=' '
3633 ac_eD='%g'
3634
3635 if test "${CONFIG_HEADERS+set}" != set; then
3636 EOF
3637 cat >> $CONFIG_STATUS <<EOF
3638 CONFIG_HEADERS="config.h:config.in"
3639 EOF
3640 cat >> $CONFIG_STATUS <<\EOF
3641 fi
3642 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3643 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3644 case "$ac_file" in
3645 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3646 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3647 *) ac_file_in="${ac_file}.in" ;;
3648 esac
3649
3650 echo creating $ac_file
3651
3652 rm -f conftest.frag conftest.in conftest.out
3653 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3654 cat $ac_file_inputs > conftest.in
3655
3656 EOF
3657
3658 # Transform confdefs.h into a sed script conftest.vals that substitutes
3659 # the proper values into config.h.in to produce config.h. And first:
3660 # Protect against being on the right side of a sed subst in config.status.
3661 # Protect against being in an unquoted here document in config.status.
3662 rm -f conftest.vals
3663 cat > conftest.hdr <<\EOF
3664 s/[\\&%]/\\&/g
3665 s%[\\$`]%\\&%g
3666 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3667 s%ac_d%ac_u%gp
3668 s%ac_u%ac_e%gp
3669 EOF
3670 sed -n -f conftest.hdr confdefs.h > conftest.vals
3671 rm -f conftest.hdr
3672
3673 # This sed command replaces #undef with comments. This is necessary, for
3674 # example, in the case of _POSIX_SOURCE, which is predefined and required
3675 # on some systems where configure will not decide to define it.
3676 cat >> conftest.vals <<\EOF
3677 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3678 EOF
3679
3680 # Break up conftest.vals because some shells have a limit on
3681 # the size of here documents, and old seds have small limits too.
3682
3683 rm -f conftest.tail
3684 while :
3685 do
3686 ac_lines=`grep -c . conftest.vals`
3687 # grep -c gives empty output for an empty file on some AIX systems.
3688 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3689 # Write a limited-size here document to conftest.frag.
3690 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3691 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3692 echo 'CEOF
3693 sed -f conftest.frag conftest.in > conftest.out
3694 rm -f conftest.in
3695 mv conftest.out conftest.in
3696 ' >> $CONFIG_STATUS
3697 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3698 rm -f conftest.vals
3699 mv conftest.tail conftest.vals
3700 done
3701 rm -f conftest.vals
3702
3703 cat >> $CONFIG_STATUS <<\EOF
3704 rm -f conftest.frag conftest.h
3705 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3706 cat conftest.in >> conftest.h
3707 rm -f conftest.in
3708 if cmp -s $ac_file conftest.h 2>/dev/null; then
3709 echo "$ac_file is unchanged"
3710 rm -f conftest.h
3711 else
3712 # Remove last slash and all that follows it. Not all systems have dirname.
3713 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3714 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3715 # The file is in a subdirectory.
3716 test ! -d "$ac_dir" && mkdir "$ac_dir"
3717 fi
3718 rm -f $ac_file
3719 mv conftest.h $ac_file
3720 fi
3721 fi; done
3722
3723 EOF
3724
3725 cat >> $CONFIG_STATUS <<EOF
3726 ac_sources="$files"
3727 ac_dests="$links"
3728 EOF
3729
3730 cat >> $CONFIG_STATUS <<\EOF
3731 srcdir=$ac_given_srcdir
3732 while test -n "$ac_sources"; do
3733 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3734 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3735
3736 echo "linking $srcdir/$ac_source to $ac_dest"
3737
3738 if test ! -r $srcdir/$ac_source; then
3739 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3740 fi
3741 rm -f $ac_dest
3742
3743 # Make relative symlinks.
3744 # Remove last slash and all that follows it. Not all systems have dirname.
3745 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3746 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3747 # The dest file is in a subdirectory.
3748 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3749 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3750 # A "../" for each directory in $ac_dest_dir_suffix.
3751 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3752 else
3753 ac_dest_dir_suffix= ac_dots=
3754 fi
3755
3756 case "$srcdir" in
3757 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3758 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3759 esac
3760
3761 # Make a symlink if possible; otherwise try a hard link.
3762 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3763 ln $srcdir/$ac_source $ac_dest; then :
3764 else
3765 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3766 fi
3767 done
3768 EOF
3769 cat >> $CONFIG_STATUS <<EOF
3770
3771 gdb_host_cpu=$gdb_host_cpu
3772 gdb_target_cpu=$gdb_target_cpu
3773 nativefile=$nativefile
3774
3775 EOF
3776 cat >> $CONFIG_STATUS <<\EOF
3777
3778 if test "${nativefile}" = ""; then
3779 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
3780 < Makefile > Makefile.tem
3781 mv -f Makefile.tem Makefile
3782 fi
3783
3784 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3785 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3786 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3787 mv -f Makefile.tmp Makefile
3788
3789 case x$CONFIG_HEADERS in
3790 xconfig.h:config.in)
3791 echo > stamp-h ;;
3792 esac
3793
3794 exit 0
3795 EOF
3796 chmod +x $CONFIG_STATUS
3797 rm -fr confdefs* $ac_clean_files
3798 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3799
3800 if test "$no_recursion" != yes; then
3801
3802 # Remove --cache-file and --srcdir arguments so they do not pile up.
3803 ac_sub_configure_args=
3804 ac_prev=
3805 for ac_arg in $ac_configure_args; do
3806 if test -n "$ac_prev"; then
3807 ac_prev=
3808 continue
3809 fi
3810 case "$ac_arg" in
3811 -cache-file | --cache-file | --cache-fil | --cache-fi \
3812 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3813 ac_prev=cache_file ;;
3814 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3815 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3816 ;;
3817 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3818 ac_prev=srcdir ;;
3819 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3820 ;;
3821 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3822 esac
3823 done
3824
3825 for ac_config_dir in $configdirs; do
3826
3827 # Do not complain, so a configure script can configure whichever
3828 # parts of a large source tree are present.
3829 if test ! -d $srcdir/$ac_config_dir; then
3830 continue
3831 fi
3832
3833 echo configuring in $ac_config_dir
3834
3835 case "$srcdir" in
3836 .) ;;
3837 *)
3838 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3839 else
3840 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3841 fi
3842 ;;
3843 esac
3844
3845 ac_popdir=`pwd`
3846 cd $ac_config_dir
3847
3848 # A "../" for each directory in /$ac_config_dir.
3849 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3850
3851 case "$srcdir" in
3852 .) # No --srcdir option. We are building in place.
3853 ac_sub_srcdir=$srcdir ;;
3854 /*) # Absolute path.
3855 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3856 *) # Relative path.
3857 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
3858 esac
3859
3860 # Check for guested configure; otherwise get Cygnus style configure.
3861 if test -f $ac_sub_srcdir/configure; then
3862 ac_sub_configure=$ac_sub_srcdir/configure
3863 elif test -f $ac_sub_srcdir/configure.in; then
3864 ac_sub_configure=$ac_configure
3865 else
3866 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3867 ac_sub_configure=
3868 fi
3869
3870 # The recursion is here.
3871 if test -n "$ac_sub_configure"; then
3872
3873 # Make the cache file name correct relative to the subdirectory.
3874 case "$cache_file" in
3875 /*) ac_sub_cache_file=$cache_file ;;
3876 *) # Relative path.
3877 ac_sub_cache_file="$ac_dots$cache_file" ;;
3878 esac
3879 case "$ac_given_INSTALL" in
3880 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3881 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3882 esac
3883
3884 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3885 # The eval makes quoting arguments work.
3886 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3887 then :
3888 else
3889 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3890 fi
3891 fi
3892
3893 cd $ac_popdir
3894 done
3895 fi
3896
3897
3898 exit 0
3899
This page took 0.126117 seconds and 5 git commands to generate.