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