Fix -W... flags check.
[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.13
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-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19 ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
21 ac_help="$ac_help
22 --enable-multi-ice Build the multi-ice-gdb-server"
23 ac_help="$ac_help
24 --enable-gdbcli Enable GDB-CLI interface"
25 ac_help="$ac_help
26 --enable-gdbmi Enable GDB-MI interface"
27 ac_help="$ac_help
28 --with-uiout Use new uiout functions instead of *printf's"
29 ac_help="$ac_help
30 --enable-tui Enable full-screen terminal user interface"
31 ac_help="$ac_help
32 --enable-netrom Enable NetROM support"
33 ac_help="$ac_help
34 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
35 ac_help="$ac_help
36 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
37 ac_help="$ac_help
38 --with-mmalloc Use memory mapped malloc package"
39 ac_help="$ac_help
40 --with-included-regex Use included regex"
41 ac_help="$ac_help
42 --with-cpu=CPU Set the default CPU variant to debug"
43 ac_help="$ac_help
44 --enable-gdbtk Enable GDBTK GUI front end"
45 ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47 ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49 ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51 ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53 ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55 ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
57 ac_help="$ac_help
58 --with-tixconfig Directory containing tix configuration (tixConfig.sh)"
59 ac_help="$ac_help
60 --with-x use the X Window System"
61 ac_help="$ac_help
62 --enable-sim Link gdb with simulator"
63 ac_help="$ac_help
64 --enable-shared Use shared libraries"
65
66 # Initialize some variables set by options.
67 # The variables have the same names as the options, with
68 # dashes changed to underlines.
69 build=NONE
70 cache_file=./config.cache
71 exec_prefix=NONE
72 host=NONE
73 no_create=
74 nonopt=NONE
75 no_recursion=
76 prefix=NONE
77 program_prefix=NONE
78 program_suffix=NONE
79 program_transform_name=s,x,x,
80 silent=
81 site=
82 sitefile=
83 srcdir=
84 target=NONE
85 verbose=
86 x_includes=NONE
87 x_libraries=NONE
88 bindir='${exec_prefix}/bin'
89 sbindir='${exec_prefix}/sbin'
90 libexecdir='${exec_prefix}/libexec'
91 datadir='${prefix}/share'
92 sysconfdir='${prefix}/etc'
93 sharedstatedir='${prefix}/com'
94 localstatedir='${prefix}/var'
95 libdir='${exec_prefix}/lib'
96 includedir='${prefix}/include'
97 oldincludedir='/usr/include'
98 infodir='${prefix}/info'
99 mandir='${prefix}/man'
100
101 # Initialize some other variables.
102 subdirs=
103 MFLAGS= MAKEFLAGS=
104 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
197 --site-file=FILE use FILE as the site file
198 --version print the version of autoconf that created configure
199 Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223 EOF
224 cat << EOF
225 Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229 Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236 EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451 done
452
453 if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468 exec 6>/dev/null
469 else
470 exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set. These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525 else
526 ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
545 fi
546 else
547 CONFIG_SITE="$sitefile"
548 fi
549 for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554 done
555
556 if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559 else
560 echo "creating cache $cache_file"
561 > $cache_file
562 fi
563
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
570
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577 ' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581 else
582 ac_n= ac_c='\c' ac_t=
583 fi
584
585
586
587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
588 echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590 if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593 else
594 USE_MAINTAINER_MODE=no
595 fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600 if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603 else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606 fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
610
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617 else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620 else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631 fi
632 fi
633 CC="$ac_cv_prog_CC"
634 if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636 else
637 echo "$ac_t""no" 1>&6
638 fi
639
640 if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647 else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650 else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666 if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679 fi
680 fi
681 fi
682 CC="$ac_cv_prog_CC"
683 if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685 else
686 echo "$ac_t""no" 1>&6
687 fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717 else
718 echo "$ac_t""no" 1>&6
719 fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729 ac_ext=c
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 cat > conftest.$ac_ext << EOF
737
738 #line 739 "configure"
739 #include "confdefs.h"
740
741 main(){return(0);}
742 EOF
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751 else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755 fi
756 rm -fr conftest*
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767 fi
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
772
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777 else
778 cat > conftest.c <<EOF
779 #ifdef __GNUC__
780 yes;
781 #endif
782 EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
784 ac_cv_prog_gcc=yes
785 else
786 ac_cv_prog_gcc=no
787 fi
788 fi
789
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792 if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794 else
795 GCC=
796 fi
797
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
800 CFLAGS=
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809 else
810 ac_cv_prog_cc_g=no
811 fi
812 rm -f conftest*
813
814 fi
815
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825 else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831 fi
832
833 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
834 echo "configure:835: checking how to run the C preprocessor" >&5
835 # On Suns, sometimes $CPP names a directory.
836 if test -n "$CPP" && test -d "$CPP"; then
837 CPP=
838 fi
839 if test -z "$CPP"; then
840 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
841 echo $ac_n "(cached) $ac_c" 1>&6
842 else
843 # This must be in double quotes, not single quotes, because CPP may get
844 # substituted into the Makefile and "${CC-cc}" will confuse make.
845 CPP="${CC-cc} -E"
846 # On the NeXT, cc -E runs the code through the compiler's parser,
847 # not just through cpp.
848 cat > conftest.$ac_ext <<EOF
849 #line 850 "configure"
850 #include "confdefs.h"
851 #include <assert.h>
852 Syntax Error
853 EOF
854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
855 { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
857 if test -z "$ac_err"; then
858 :
859 else
860 echo "$ac_err" >&5
861 echo "configure: failed program was:" >&5
862 cat conftest.$ac_ext >&5
863 rm -rf conftest*
864 CPP="${CC-cc} -E -traditional-cpp"
865 cat > conftest.$ac_ext <<EOF
866 #line 867 "configure"
867 #include "confdefs.h"
868 #include <assert.h>
869 Syntax Error
870 EOF
871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
872 { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
874 if test -z "$ac_err"; then
875 :
876 else
877 echo "$ac_err" >&5
878 echo "configure: failed program was:" >&5
879 cat conftest.$ac_ext >&5
880 rm -rf conftest*
881 CPP="${CC-cc} -nologo -E"
882 cat > conftest.$ac_ext <<EOF
883 #line 884 "configure"
884 #include "confdefs.h"
885 #include <assert.h>
886 Syntax Error
887 EOF
888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
889 { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
891 if test -z "$ac_err"; then
892 :
893 else
894 echo "$ac_err" >&5
895 echo "configure: failed program was:" >&5
896 cat conftest.$ac_ext >&5
897 rm -rf conftest*
898 CPP=/lib/cpp
899 fi
900 rm -f conftest*
901 fi
902 rm -f conftest*
903 fi
904 rm -f conftest*
905 ac_cv_prog_CPP="$CPP"
906 fi
907 CPP="$ac_cv_prog_CPP"
908 else
909 ac_cv_prog_CPP="$CPP"
910 fi
911 echo "$ac_t""$CPP" 1>&6
912
913 echo $ac_n "checking for AIX""... $ac_c" 1>&6
914 echo "configure:915: checking for AIX" >&5
915 cat > conftest.$ac_ext <<EOF
916 #line 917 "configure"
917 #include "confdefs.h"
918 #ifdef _AIX
919 yes
920 #endif
921
922 EOF
923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
924 egrep "yes" >/dev/null 2>&1; then
925 rm -rf conftest*
926 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
927 #define _ALL_SOURCE 1
928 EOF
929
930 else
931 rm -rf conftest*
932 echo "$ac_t""no" 1>&6
933 fi
934 rm -f conftest*
935
936
937
938 echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
939 echo "configure:940: checking for strerror in -lcposix" >&5
940 ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
942 echo $ac_n "(cached) $ac_c" 1>&6
943 else
944 ac_save_LIBS="$LIBS"
945 LIBS="-lcposix $LIBS"
946 cat > conftest.$ac_ext <<EOF
947 #line 948 "configure"
948 #include "confdefs.h"
949 /* Override any gcc2 internal prototype to avoid an error. */
950 /* We use char because int might match the return type of a gcc2
951 builtin and then its argument prototype would still apply. */
952 char strerror();
953
954 int main() {
955 strerror()
956 ; return 0; }
957 EOF
958 if { (eval echo configure:959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
959 rm -rf conftest*
960 eval "ac_cv_lib_$ac_lib_var=yes"
961 else
962 echo "configure: failed program was:" >&5
963 cat conftest.$ac_ext >&5
964 rm -rf conftest*
965 eval "ac_cv_lib_$ac_lib_var=no"
966 fi
967 rm -f conftest*
968 LIBS="$ac_save_LIBS"
969
970 fi
971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
972 echo "$ac_t""yes" 1>&6
973 LIBS="$LIBS -lcposix"
974 else
975 echo "$ac_t""no" 1>&6
976 fi
977
978
979
980
981
982
983 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
984 echo "configure:985: checking for ${CC-cc} option to accept ANSI C" >&5
985 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
986 echo $ac_n "(cached) $ac_c" 1>&6
987 else
988 am_cv_prog_cc_stdc=no
989 ac_save_CC="$CC"
990 # Don't try gcc -ansi; that turns off useful extensions and
991 # breaks some systems' header files.
992 # AIX -qlanglvl=ansi
993 # Ultrix and OSF/1 -std1
994 # HP-UX -Aa -D_HPUX_SOURCE
995 # SVR4 -Xc -D__EXTENSIONS__
996 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
997 do
998 CC="$ac_save_CC $ac_arg"
999 cat > conftest.$ac_ext <<EOF
1000 #line 1001 "configure"
1001 #include "confdefs.h"
1002 #include <stdarg.h>
1003 #include <stdio.h>
1004 #include <sys/types.h>
1005 #include <sys/stat.h>
1006 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
1007 struct buf { int x; };
1008 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1009 static char *e (p, i)
1010 char **p;
1011 int i;
1012 {
1013 return p[i];
1014 }
1015 static char *f (char * (*g) (char **, int), char **p, ...)
1016 {
1017 char *s;
1018 va_list v;
1019 va_start (v,p);
1020 s = g (p, va_arg (v,int));
1021 va_end (v);
1022 return s;
1023 }
1024 int test (int i, double x);
1025 struct s1 {int (*f) (int a);};
1026 struct s2 {int (*f) (double a);};
1027 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1028 int argc;
1029 char **argv;
1030
1031 int main() {
1032
1033 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1034
1035 ; return 0; }
1036 EOF
1037 if { (eval echo configure:1038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1038 rm -rf conftest*
1039 am_cv_prog_cc_stdc="$ac_arg"; break
1040 else
1041 echo "configure: failed program was:" >&5
1042 cat conftest.$ac_ext >&5
1043 fi
1044 rm -f conftest*
1045 done
1046 CC="$ac_save_CC"
1047
1048 fi
1049
1050 if test -z "$am_cv_prog_cc_stdc"; then
1051 echo "$ac_t""none needed" 1>&6
1052 else
1053 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1054 fi
1055 case "x$am_cv_prog_cc_stdc" in
1056 x|xno) ;;
1057 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1058 esac
1059
1060
1061 ac_aux_dir=
1062 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1063 if test -f $ac_dir/install-sh; then
1064 ac_aux_dir=$ac_dir
1065 ac_install_sh="$ac_aux_dir/install-sh -c"
1066 break
1067 elif test -f $ac_dir/install.sh; then
1068 ac_aux_dir=$ac_dir
1069 ac_install_sh="$ac_aux_dir/install.sh -c"
1070 break
1071 fi
1072 done
1073 if test -z "$ac_aux_dir"; then
1074 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1075 fi
1076 ac_config_guess=$ac_aux_dir/config.guess
1077 ac_config_sub=$ac_aux_dir/config.sub
1078 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1079
1080
1081 # Do some error checking and defaulting for the host and target type.
1082 # The inputs are:
1083 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1084 #
1085 # The rules are:
1086 # 1. You are not allowed to specify --host, --target, and nonopt at the
1087 # same time.
1088 # 2. Host defaults to nonopt.
1089 # 3. If nonopt is not specified, then host defaults to the current host,
1090 # as determined by config.guess.
1091 # 4. Target and build default to nonopt.
1092 # 5. If nonopt is not specified, then target and build default to host.
1093
1094 # The aliases save the names the user supplied, while $host etc.
1095 # will get canonicalized.
1096 case $host---$target---$nonopt in
1097 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1098 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1099 esac
1100
1101
1102 # Make sure we can run config.sub.
1103 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1104 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1105 fi
1106
1107 echo $ac_n "checking host system type""... $ac_c" 1>&6
1108 echo "configure:1109: checking host system type" >&5
1109
1110 host_alias=$host
1111 case "$host_alias" in
1112 NONE)
1113 case $nonopt in
1114 NONE)
1115 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1116 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1117 fi ;;
1118 *) host_alias=$nonopt ;;
1119 esac ;;
1120 esac
1121
1122 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1123 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1124 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1125 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1126 echo "$ac_t""$host" 1>&6
1127
1128 echo $ac_n "checking target system type""... $ac_c" 1>&6
1129 echo "configure:1130: checking target system type" >&5
1130
1131 target_alias=$target
1132 case "$target_alias" in
1133 NONE)
1134 case $nonopt in
1135 NONE) target_alias=$host_alias ;;
1136 *) target_alias=$nonopt ;;
1137 esac ;;
1138 esac
1139
1140 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1141 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1142 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1143 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1144 echo "$ac_t""$target" 1>&6
1145
1146 echo $ac_n "checking build system type""... $ac_c" 1>&6
1147 echo "configure:1148: checking build system type" >&5
1148
1149 build_alias=$build
1150 case "$build_alias" in
1151 NONE)
1152 case $nonopt in
1153 NONE) build_alias=$host_alias ;;
1154 *) build_alias=$nonopt ;;
1155 esac ;;
1156 esac
1157
1158 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1159 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1160 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1161 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1162 echo "$ac_t""$build" 1>&6
1163
1164 test "$host_alias" != "$target_alias" &&
1165 test "$program_prefix$program_suffix$program_transform_name" = \
1166 NONENONEs,x,x, &&
1167 program_prefix=${target_alias}-
1168
1169
1170 ALL_LINGUAS=
1171 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1172 echo "configure:1173: checking whether ${MAKE-make} sets \${MAKE}" >&5
1173 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1174 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177 cat > conftestmake <<\EOF
1178 all:
1179 @echo 'ac_maketemp="${MAKE}"'
1180 EOF
1181 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1182 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1183 if test -n "$ac_maketemp"; then
1184 eval ac_cv_prog_make_${ac_make}_set=yes
1185 else
1186 eval ac_cv_prog_make_${ac_make}_set=no
1187 fi
1188 rm -f conftestmake
1189 fi
1190 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1191 echo "$ac_t""yes" 1>&6
1192 SET_MAKE=
1193 else
1194 echo "$ac_t""no" 1>&6
1195 SET_MAKE="MAKE=${MAKE-make}"
1196 fi
1197
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199 set dummy ranlib; ac_word=$2
1200 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1201 echo "configure:1202: checking for $ac_word" >&5
1202 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207 else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219 fi
1220 fi
1221 RANLIB="$ac_cv_prog_RANLIB"
1222 if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224 else
1225 echo "$ac_t""no" 1>&6
1226 fi
1227
1228 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1229 echo "configure:1230: checking for ANSI C header files" >&5
1230 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1231 echo $ac_n "(cached) $ac_c" 1>&6
1232 else
1233 cat > conftest.$ac_ext <<EOF
1234 #line 1235 "configure"
1235 #include "confdefs.h"
1236 #include <stdlib.h>
1237 #include <stdarg.h>
1238 #include <string.h>
1239 #include <float.h>
1240 EOF
1241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1242 { (eval echo configure:1243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1244 if test -z "$ac_err"; then
1245 rm -rf conftest*
1246 ac_cv_header_stdc=yes
1247 else
1248 echo "$ac_err" >&5
1249 echo "configure: failed program was:" >&5
1250 cat conftest.$ac_ext >&5
1251 rm -rf conftest*
1252 ac_cv_header_stdc=no
1253 fi
1254 rm -f conftest*
1255
1256 if test $ac_cv_header_stdc = yes; then
1257 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1258 cat > conftest.$ac_ext <<EOF
1259 #line 1260 "configure"
1260 #include "confdefs.h"
1261 #include <string.h>
1262 EOF
1263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1264 egrep "memchr" >/dev/null 2>&1; then
1265 :
1266 else
1267 rm -rf conftest*
1268 ac_cv_header_stdc=no
1269 fi
1270 rm -f conftest*
1271
1272 fi
1273
1274 if test $ac_cv_header_stdc = yes; then
1275 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1276 cat > conftest.$ac_ext <<EOF
1277 #line 1278 "configure"
1278 #include "confdefs.h"
1279 #include <stdlib.h>
1280 EOF
1281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1282 egrep "free" >/dev/null 2>&1; then
1283 :
1284 else
1285 rm -rf conftest*
1286 ac_cv_header_stdc=no
1287 fi
1288 rm -f conftest*
1289
1290 fi
1291
1292 if test $ac_cv_header_stdc = yes; then
1293 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1294 if test "$cross_compiling" = yes; then
1295 :
1296 else
1297 cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300 #include <ctype.h>
1301 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1302 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1303 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1304 int main () { int i; for (i = 0; i < 256; i++)
1305 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1306 exit (0); }
1307
1308 EOF
1309 if { (eval echo configure:1310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1310 then
1311 :
1312 else
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -fr conftest*
1316 ac_cv_header_stdc=no
1317 fi
1318 rm -fr conftest*
1319 fi
1320
1321 fi
1322 fi
1323
1324 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1325 if test $ac_cv_header_stdc = yes; then
1326 cat >> confdefs.h <<\EOF
1327 #define STDC_HEADERS 1
1328 EOF
1329
1330 fi
1331
1332 echo $ac_n "checking for working const""... $ac_c" 1>&6
1333 echo "configure:1334: checking for working const" >&5
1334 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1335 echo $ac_n "(cached) $ac_c" 1>&6
1336 else
1337 cat > conftest.$ac_ext <<EOF
1338 #line 1339 "configure"
1339 #include "confdefs.h"
1340
1341 int main() {
1342
1343 /* Ultrix mips cc rejects this. */
1344 typedef int charset[2]; const charset x;
1345 /* SunOS 4.1.1 cc rejects this. */
1346 char const *const *ccp;
1347 char **p;
1348 /* NEC SVR4.0.2 mips cc rejects this. */
1349 struct point {int x, y;};
1350 static struct point const zero = {0,0};
1351 /* AIX XL C 1.02.0.0 rejects this.
1352 It does not let you subtract one const X* pointer from another in an arm
1353 of an if-expression whose if-part is not a constant expression */
1354 const char *g = "string";
1355 ccp = &g + (g ? g-g : 0);
1356 /* HPUX 7.0 cc rejects these. */
1357 ++ccp;
1358 p = (char**) ccp;
1359 ccp = (char const *const *) p;
1360 { /* SCO 3.2v4 cc rejects this. */
1361 char *t;
1362 char const *s = 0 ? (char *) 0 : (char const *) 0;
1363
1364 *t++ = 0;
1365 }
1366 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1367 int x[] = {25, 17};
1368 const int *foo = &x[0];
1369 ++foo;
1370 }
1371 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1372 typedef const int *iptr;
1373 iptr p = 0;
1374 ++p;
1375 }
1376 { /* AIX XL C 1.02.0.0 rejects this saying
1377 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1378 struct s { int j; const int *ap[3]; };
1379 struct s *b; b->j = 5;
1380 }
1381 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1382 const int foo = 10;
1383 }
1384
1385 ; return 0; }
1386 EOF
1387 if { (eval echo configure:1388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1388 rm -rf conftest*
1389 ac_cv_c_const=yes
1390 else
1391 echo "configure: failed program was:" >&5
1392 cat conftest.$ac_ext >&5
1393 rm -rf conftest*
1394 ac_cv_c_const=no
1395 fi
1396 rm -f conftest*
1397 fi
1398
1399 echo "$ac_t""$ac_cv_c_const" 1>&6
1400 if test $ac_cv_c_const = no; then
1401 cat >> confdefs.h <<\EOF
1402 #define const
1403 EOF
1404
1405 fi
1406
1407 echo $ac_n "checking for inline""... $ac_c" 1>&6
1408 echo "configure:1409: checking for inline" >&5
1409 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412 ac_cv_c_inline=no
1413 for ac_kw in inline __inline__ __inline; do
1414 cat > conftest.$ac_ext <<EOF
1415 #line 1416 "configure"
1416 #include "confdefs.h"
1417
1418 int main() {
1419 } $ac_kw foo() {
1420 ; return 0; }
1421 EOF
1422 if { (eval echo configure:1423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1423 rm -rf conftest*
1424 ac_cv_c_inline=$ac_kw; break
1425 else
1426 echo "configure: failed program was:" >&5
1427 cat conftest.$ac_ext >&5
1428 fi
1429 rm -f conftest*
1430 done
1431
1432 fi
1433
1434 echo "$ac_t""$ac_cv_c_inline" 1>&6
1435 case "$ac_cv_c_inline" in
1436 inline | yes) ;;
1437 no) cat >> confdefs.h <<\EOF
1438 #define inline
1439 EOF
1440 ;;
1441 *) cat >> confdefs.h <<EOF
1442 #define inline $ac_cv_c_inline
1443 EOF
1444 ;;
1445 esac
1446
1447 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1448 echo "configure:1449: checking for off_t" >&5
1449 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1450 echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452 cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 #include <sys/types.h>
1456 #if STDC_HEADERS
1457 #include <stdlib.h>
1458 #include <stddef.h>
1459 #endif
1460 EOF
1461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1462 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1463 rm -rf conftest*
1464 ac_cv_type_off_t=yes
1465 else
1466 rm -rf conftest*
1467 ac_cv_type_off_t=no
1468 fi
1469 rm -f conftest*
1470
1471 fi
1472 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1473 if test $ac_cv_type_off_t = no; then
1474 cat >> confdefs.h <<\EOF
1475 #define off_t long
1476 EOF
1477
1478 fi
1479
1480 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1481 echo "configure:1482: checking for size_t" >&5
1482 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1483 echo $ac_n "(cached) $ac_c" 1>&6
1484 else
1485 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1488 #include <sys/types.h>
1489 #if STDC_HEADERS
1490 #include <stdlib.h>
1491 #include <stddef.h>
1492 #endif
1493 EOF
1494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1495 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1496 rm -rf conftest*
1497 ac_cv_type_size_t=yes
1498 else
1499 rm -rf conftest*
1500 ac_cv_type_size_t=no
1501 fi
1502 rm -f conftest*
1503
1504 fi
1505 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1506 if test $ac_cv_type_size_t = no; then
1507 cat >> confdefs.h <<\EOF
1508 #define size_t unsigned
1509 EOF
1510
1511 fi
1512
1513 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1514 # for constant arguments. Useless!
1515 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1516 echo "configure:1517: checking for working alloca.h" >&5
1517 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1518 echo $ac_n "(cached) $ac_c" 1>&6
1519 else
1520 cat > conftest.$ac_ext <<EOF
1521 #line 1522 "configure"
1522 #include "confdefs.h"
1523 #include <alloca.h>
1524 int main() {
1525 char *p = alloca(2 * sizeof(int));
1526 ; return 0; }
1527 EOF
1528 if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1529 rm -rf conftest*
1530 ac_cv_header_alloca_h=yes
1531 else
1532 echo "configure: failed program was:" >&5
1533 cat conftest.$ac_ext >&5
1534 rm -rf conftest*
1535 ac_cv_header_alloca_h=no
1536 fi
1537 rm -f conftest*
1538 fi
1539
1540 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1541 if test $ac_cv_header_alloca_h = yes; then
1542 cat >> confdefs.h <<\EOF
1543 #define HAVE_ALLOCA_H 1
1544 EOF
1545
1546 fi
1547
1548 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1549 echo "configure:1550: checking for alloca" >&5
1550 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1551 echo $ac_n "(cached) $ac_c" 1>&6
1552 else
1553 cat > conftest.$ac_ext <<EOF
1554 #line 1555 "configure"
1555 #include "confdefs.h"
1556
1557 #ifdef __GNUC__
1558 # define alloca __builtin_alloca
1559 #else
1560 # ifdef _MSC_VER
1561 # include <malloc.h>
1562 # define alloca _alloca
1563 # else
1564 # if HAVE_ALLOCA_H
1565 # include <alloca.h>
1566 # else
1567 # ifdef _AIX
1568 #pragma alloca
1569 # else
1570 # ifndef alloca /* predefined by HP cc +Olibcalls */
1571 char *alloca ();
1572 # endif
1573 # endif
1574 # endif
1575 # endif
1576 #endif
1577
1578 int main() {
1579 char *p = (char *) alloca(1);
1580 ; return 0; }
1581 EOF
1582 if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1583 rm -rf conftest*
1584 ac_cv_func_alloca_works=yes
1585 else
1586 echo "configure: failed program was:" >&5
1587 cat conftest.$ac_ext >&5
1588 rm -rf conftest*
1589 ac_cv_func_alloca_works=no
1590 fi
1591 rm -f conftest*
1592 fi
1593
1594 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1595 if test $ac_cv_func_alloca_works = yes; then
1596 cat >> confdefs.h <<\EOF
1597 #define HAVE_ALLOCA 1
1598 EOF
1599
1600 fi
1601
1602 if test $ac_cv_func_alloca_works = no; then
1603 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1604 # that cause trouble. Some versions do not even contain alloca or
1605 # contain a buggy version. If you still want to use their alloca,
1606 # use ar to extract alloca.o from them instead of compiling alloca.c.
1607 ALLOCA=alloca.${ac_objext}
1608 cat >> confdefs.h <<\EOF
1609 #define C_ALLOCA 1
1610 EOF
1611
1612
1613 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1614 echo "configure:1615: checking whether alloca needs Cray hooks" >&5
1615 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1616 echo $ac_n "(cached) $ac_c" 1>&6
1617 else
1618 cat > conftest.$ac_ext <<EOF
1619 #line 1620 "configure"
1620 #include "confdefs.h"
1621 #if defined(CRAY) && ! defined(CRAY2)
1622 webecray
1623 #else
1624 wenotbecray
1625 #endif
1626
1627 EOF
1628 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1629 egrep "webecray" >/dev/null 2>&1; then
1630 rm -rf conftest*
1631 ac_cv_os_cray=yes
1632 else
1633 rm -rf conftest*
1634 ac_cv_os_cray=no
1635 fi
1636 rm -f conftest*
1637
1638 fi
1639
1640 echo "$ac_t""$ac_cv_os_cray" 1>&6
1641 if test $ac_cv_os_cray = yes; then
1642 for ac_func in _getb67 GETB67 getb67; do
1643 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1644 echo "configure:1645: checking for $ac_func" >&5
1645 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1646 echo $ac_n "(cached) $ac_c" 1>&6
1647 else
1648 cat > conftest.$ac_ext <<EOF
1649 #line 1650 "configure"
1650 #include "confdefs.h"
1651 /* System header to define __stub macros and hopefully few prototypes,
1652 which can conflict with char $ac_func(); below. */
1653 #include <assert.h>
1654 /* Override any gcc2 internal prototype to avoid an error. */
1655 /* We use char because int might match the return type of a gcc2
1656 builtin and then its argument prototype would still apply. */
1657 char $ac_func();
1658
1659 int main() {
1660
1661 /* The GNU C library defines this for functions which it implements
1662 to always fail with ENOSYS. Some functions are actually named
1663 something starting with __ and the normal name is an alias. */
1664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1665 choke me
1666 #else
1667 $ac_func();
1668 #endif
1669
1670 ; return 0; }
1671 EOF
1672 if { (eval echo configure:1673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1673 rm -rf conftest*
1674 eval "ac_cv_func_$ac_func=yes"
1675 else
1676 echo "configure: failed program was:" >&5
1677 cat conftest.$ac_ext >&5
1678 rm -rf conftest*
1679 eval "ac_cv_func_$ac_func=no"
1680 fi
1681 rm -f conftest*
1682 fi
1683
1684 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1685 echo "$ac_t""yes" 1>&6
1686 cat >> confdefs.h <<EOF
1687 #define CRAY_STACKSEG_END $ac_func
1688 EOF
1689
1690 break
1691 else
1692 echo "$ac_t""no" 1>&6
1693 fi
1694
1695 done
1696 fi
1697
1698 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1699 echo "configure:1700: checking stack direction for C alloca" >&5
1700 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1701 echo $ac_n "(cached) $ac_c" 1>&6
1702 else
1703 if test "$cross_compiling" = yes; then
1704 ac_cv_c_stack_direction=0
1705 else
1706 cat > conftest.$ac_ext <<EOF
1707 #line 1708 "configure"
1708 #include "confdefs.h"
1709 find_stack_direction ()
1710 {
1711 static char *addr = 0;
1712 auto char dummy;
1713 if (addr == 0)
1714 {
1715 addr = &dummy;
1716 return find_stack_direction ();
1717 }
1718 else
1719 return (&dummy > addr) ? 1 : -1;
1720 }
1721 main ()
1722 {
1723 exit (find_stack_direction() < 0);
1724 }
1725 EOF
1726 if { (eval echo configure:1727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1727 then
1728 ac_cv_c_stack_direction=1
1729 else
1730 echo "configure: failed program was:" >&5
1731 cat conftest.$ac_ext >&5
1732 rm -fr conftest*
1733 ac_cv_c_stack_direction=-1
1734 fi
1735 rm -fr conftest*
1736 fi
1737
1738 fi
1739
1740 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1741 cat >> confdefs.h <<EOF
1742 #define STACK_DIRECTION $ac_cv_c_stack_direction
1743 EOF
1744
1745 fi
1746
1747 for ac_hdr in unistd.h
1748 do
1749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1751 echo "configure:1752: checking for $ac_hdr" >&5
1752 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1753 echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include <$ac_hdr>
1759 EOF
1760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1761 { (eval echo configure:1762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1763 if test -z "$ac_err"; then
1764 rm -rf conftest*
1765 eval "ac_cv_header_$ac_safe=yes"
1766 else
1767 echo "$ac_err" >&5
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -rf conftest*
1771 eval "ac_cv_header_$ac_safe=no"
1772 fi
1773 rm -f conftest*
1774 fi
1775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1776 echo "$ac_t""yes" 1>&6
1777 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1778 cat >> confdefs.h <<EOF
1779 #define $ac_tr_hdr 1
1780 EOF
1781
1782 else
1783 echo "$ac_t""no" 1>&6
1784 fi
1785 done
1786
1787 for ac_func in getpagesize
1788 do
1789 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1790 echo "configure:1791: checking for $ac_func" >&5
1791 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1792 echo $ac_n "(cached) $ac_c" 1>&6
1793 else
1794 cat > conftest.$ac_ext <<EOF
1795 #line 1796 "configure"
1796 #include "confdefs.h"
1797 /* System header to define __stub macros and hopefully few prototypes,
1798 which can conflict with char $ac_func(); below. */
1799 #include <assert.h>
1800 /* Override any gcc2 internal prototype to avoid an error. */
1801 /* We use char because int might match the return type of a gcc2
1802 builtin and then its argument prototype would still apply. */
1803 char $ac_func();
1804
1805 int main() {
1806
1807 /* The GNU C library defines this for functions which it implements
1808 to always fail with ENOSYS. Some functions are actually named
1809 something starting with __ and the normal name is an alias. */
1810 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1811 choke me
1812 #else
1813 $ac_func();
1814 #endif
1815
1816 ; return 0; }
1817 EOF
1818 if { (eval echo configure:1819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1819 rm -rf conftest*
1820 eval "ac_cv_func_$ac_func=yes"
1821 else
1822 echo "configure: failed program was:" >&5
1823 cat conftest.$ac_ext >&5
1824 rm -rf conftest*
1825 eval "ac_cv_func_$ac_func=no"
1826 fi
1827 rm -f conftest*
1828 fi
1829
1830 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1831 echo "$ac_t""yes" 1>&6
1832 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1833 cat >> confdefs.h <<EOF
1834 #define $ac_tr_func 1
1835 EOF
1836
1837 else
1838 echo "$ac_t""no" 1>&6
1839 fi
1840 done
1841
1842 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1843 echo "configure:1844: checking for working mmap" >&5
1844 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847 if test "$cross_compiling" = yes; then
1848 ac_cv_func_mmap_fixed_mapped=no
1849 else
1850 cat > conftest.$ac_ext <<EOF
1851 #line 1852 "configure"
1852 #include "confdefs.h"
1853
1854 /* Thanks to Mike Haertel and Jim Avera for this test.
1855 Here is a matrix of mmap possibilities:
1856 mmap private not fixed
1857 mmap private fixed at somewhere currently unmapped
1858 mmap private fixed at somewhere already mapped
1859 mmap shared not fixed
1860 mmap shared fixed at somewhere currently unmapped
1861 mmap shared fixed at somewhere already mapped
1862 For private mappings, we should verify that changes cannot be read()
1863 back from the file, nor mmap's back from the file at a different
1864 address. (There have been systems where private was not correctly
1865 implemented like the infamous i386 svr4.0, and systems where the
1866 VM page cache was not coherent with the filesystem buffer cache
1867 like early versions of FreeBSD and possibly contemporary NetBSD.)
1868 For shared mappings, we should conversely verify that changes get
1869 propogated back to all the places they're supposed to be.
1870
1871 Grep wants private fixed already mapped.
1872 The main things grep needs to know about mmap are:
1873 * does it exist and is it safe to write into the mmap'd area
1874 * how to use it (BSD variants) */
1875 #include <sys/types.h>
1876 #include <fcntl.h>
1877 #include <sys/mman.h>
1878
1879 /* This mess was copied from the GNU getpagesize.h. */
1880 #ifndef HAVE_GETPAGESIZE
1881 # ifdef HAVE_UNISTD_H
1882 # include <unistd.h>
1883 # endif
1884
1885 /* Assume that all systems that can run configure have sys/param.h. */
1886 # ifndef HAVE_SYS_PARAM_H
1887 # define HAVE_SYS_PARAM_H 1
1888 # endif
1889
1890 # ifdef _SC_PAGESIZE
1891 # define getpagesize() sysconf(_SC_PAGESIZE)
1892 # else /* no _SC_PAGESIZE */
1893 # ifdef HAVE_SYS_PARAM_H
1894 # include <sys/param.h>
1895 # ifdef EXEC_PAGESIZE
1896 # define getpagesize() EXEC_PAGESIZE
1897 # else /* no EXEC_PAGESIZE */
1898 # ifdef NBPG
1899 # define getpagesize() NBPG * CLSIZE
1900 # ifndef CLSIZE
1901 # define CLSIZE 1
1902 # endif /* no CLSIZE */
1903 # else /* no NBPG */
1904 # ifdef NBPC
1905 # define getpagesize() NBPC
1906 # else /* no NBPC */
1907 # ifdef PAGESIZE
1908 # define getpagesize() PAGESIZE
1909 # endif /* PAGESIZE */
1910 # endif /* no NBPC */
1911 # endif /* no NBPG */
1912 # endif /* no EXEC_PAGESIZE */
1913 # else /* no HAVE_SYS_PARAM_H */
1914 # define getpagesize() 8192 /* punt totally */
1915 # endif /* no HAVE_SYS_PARAM_H */
1916 # endif /* no _SC_PAGESIZE */
1917
1918 #endif /* no HAVE_GETPAGESIZE */
1919
1920 #ifdef __cplusplus
1921 extern "C" { void *malloc(unsigned); }
1922 #else
1923 char *malloc();
1924 #endif
1925
1926 int
1927 main()
1928 {
1929 char *data, *data2, *data3;
1930 int i, pagesize;
1931 int fd;
1932
1933 pagesize = getpagesize();
1934
1935 /*
1936 * First, make a file with some known garbage in it.
1937 */
1938 data = malloc(pagesize);
1939 if (!data)
1940 exit(1);
1941 for (i = 0; i < pagesize; ++i)
1942 *(data + i) = rand();
1943 umask(0);
1944 fd = creat("conftestmmap", 0600);
1945 if (fd < 0)
1946 exit(1);
1947 if (write(fd, data, pagesize) != pagesize)
1948 exit(1);
1949 close(fd);
1950
1951 /*
1952 * Next, try to mmap the file at a fixed address which
1953 * already has something else allocated at it. If we can,
1954 * also make sure that we see the same garbage.
1955 */
1956 fd = open("conftestmmap", O_RDWR);
1957 if (fd < 0)
1958 exit(1);
1959 data2 = malloc(2 * pagesize);
1960 if (!data2)
1961 exit(1);
1962 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1963 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1964 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1965 exit(1);
1966 for (i = 0; i < pagesize; ++i)
1967 if (*(data + i) != *(data2 + i))
1968 exit(1);
1969
1970 /*
1971 * Finally, make sure that changes to the mapped area
1972 * do not percolate back to the file as seen by read().
1973 * (This is a bug on some variants of i386 svr4.0.)
1974 */
1975 for (i = 0; i < pagesize; ++i)
1976 *(data2 + i) = *(data2 + i) + 1;
1977 data3 = malloc(pagesize);
1978 if (!data3)
1979 exit(1);
1980 if (read(fd, data3, pagesize) != pagesize)
1981 exit(1);
1982 for (i = 0; i < pagesize; ++i)
1983 if (*(data + i) != *(data3 + i))
1984 exit(1);
1985 close(fd);
1986 unlink("conftestmmap");
1987 exit(0);
1988 }
1989
1990 EOF
1991 if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1992 then
1993 ac_cv_func_mmap_fixed_mapped=yes
1994 else
1995 echo "configure: failed program was:" >&5
1996 cat conftest.$ac_ext >&5
1997 rm -fr conftest*
1998 ac_cv_func_mmap_fixed_mapped=no
1999 fi
2000 rm -fr conftest*
2001 fi
2002
2003 fi
2004
2005 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2006 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2007 cat >> confdefs.h <<\EOF
2008 #define HAVE_MMAP 1
2009 EOF
2010
2011 fi
2012
2013
2014 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2015 unistd.h values.h sys/param.h
2016 do
2017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2019 echo "configure:2020: checking for $ac_hdr" >&5
2020 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2021 echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023 cat > conftest.$ac_ext <<EOF
2024 #line 2025 "configure"
2025 #include "confdefs.h"
2026 #include <$ac_hdr>
2027 EOF
2028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2029 { (eval echo configure:2030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2031 if test -z "$ac_err"; then
2032 rm -rf conftest*
2033 eval "ac_cv_header_$ac_safe=yes"
2034 else
2035 echo "$ac_err" >&5
2036 echo "configure: failed program was:" >&5
2037 cat conftest.$ac_ext >&5
2038 rm -rf conftest*
2039 eval "ac_cv_header_$ac_safe=no"
2040 fi
2041 rm -f conftest*
2042 fi
2043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2044 echo "$ac_t""yes" 1>&6
2045 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2046 cat >> confdefs.h <<EOF
2047 #define $ac_tr_hdr 1
2048 EOF
2049
2050 else
2051 echo "$ac_t""no" 1>&6
2052 fi
2053 done
2054
2055 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2056 __argz_count __argz_stringify __argz_next
2057 do
2058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_func" >&5
2060 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2061 echo $ac_n "(cached) $ac_c" 1>&6
2062 else
2063 cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 /* System header to define __stub macros and hopefully few prototypes,
2067 which can conflict with char $ac_func(); below. */
2068 #include <assert.h>
2069 /* Override any gcc2 internal prototype to avoid an error. */
2070 /* We use char because int might match the return type of a gcc2
2071 builtin and then its argument prototype would still apply. */
2072 char $ac_func();
2073
2074 int main() {
2075
2076 /* The GNU C library defines this for functions which it implements
2077 to always fail with ENOSYS. Some functions are actually named
2078 something starting with __ and the normal name is an alias. */
2079 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2080 choke me
2081 #else
2082 $ac_func();
2083 #endif
2084
2085 ; return 0; }
2086 EOF
2087 if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2088 rm -rf conftest*
2089 eval "ac_cv_func_$ac_func=yes"
2090 else
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 rm -rf conftest*
2094 eval "ac_cv_func_$ac_func=no"
2095 fi
2096 rm -f conftest*
2097 fi
2098
2099 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2100 echo "$ac_t""yes" 1>&6
2101 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2102 cat >> confdefs.h <<EOF
2103 #define $ac_tr_func 1
2104 EOF
2105
2106 else
2107 echo "$ac_t""no" 1>&6
2108 fi
2109 done
2110
2111
2112 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2113 for ac_func in stpcpy
2114 do
2115 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2116 echo "configure:2117: checking for $ac_func" >&5
2117 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2118 echo $ac_n "(cached) $ac_c" 1>&6
2119 else
2120 cat > conftest.$ac_ext <<EOF
2121 #line 2122 "configure"
2122 #include "confdefs.h"
2123 /* System header to define __stub macros and hopefully few prototypes,
2124 which can conflict with char $ac_func(); below. */
2125 #include <assert.h>
2126 /* Override any gcc2 internal prototype to avoid an error. */
2127 /* We use char because int might match the return type of a gcc2
2128 builtin and then its argument prototype would still apply. */
2129 char $ac_func();
2130
2131 int main() {
2132
2133 /* The GNU C library defines this for functions which it implements
2134 to always fail with ENOSYS. Some functions are actually named
2135 something starting with __ and the normal name is an alias. */
2136 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2137 choke me
2138 #else
2139 $ac_func();
2140 #endif
2141
2142 ; return 0; }
2143 EOF
2144 if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2145 rm -rf conftest*
2146 eval "ac_cv_func_$ac_func=yes"
2147 else
2148 echo "configure: failed program was:" >&5
2149 cat conftest.$ac_ext >&5
2150 rm -rf conftest*
2151 eval "ac_cv_func_$ac_func=no"
2152 fi
2153 rm -f conftest*
2154 fi
2155
2156 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2157 echo "$ac_t""yes" 1>&6
2158 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2159 cat >> confdefs.h <<EOF
2160 #define $ac_tr_func 1
2161 EOF
2162
2163 else
2164 echo "$ac_t""no" 1>&6
2165 fi
2166 done
2167
2168 fi
2169 if test "${ac_cv_func_stpcpy}" = "yes"; then
2170 cat >> confdefs.h <<\EOF
2171 #define HAVE_STPCPY 1
2172 EOF
2173
2174 fi
2175
2176 if test $ac_cv_header_locale_h = yes; then
2177 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2178 echo "configure:2179: checking for LC_MESSAGES" >&5
2179 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2180 echo $ac_n "(cached) $ac_c" 1>&6
2181 else
2182 cat > conftest.$ac_ext <<EOF
2183 #line 2184 "configure"
2184 #include "confdefs.h"
2185 #include <locale.h>
2186 int main() {
2187 return LC_MESSAGES
2188 ; return 0; }
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2191 rm -rf conftest*
2192 am_cv_val_LC_MESSAGES=yes
2193 else
2194 echo "configure: failed program was:" >&5
2195 cat conftest.$ac_ext >&5
2196 rm -rf conftest*
2197 am_cv_val_LC_MESSAGES=no
2198 fi
2199 rm -f conftest*
2200 fi
2201
2202 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2203 if test $am_cv_val_LC_MESSAGES = yes; then
2204 cat >> confdefs.h <<\EOF
2205 #define HAVE_LC_MESSAGES 1
2206 EOF
2207
2208 fi
2209 fi
2210 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2211 echo "configure:2212: checking whether NLS is requested" >&5
2212 # Check whether --enable-nls or --disable-nls was given.
2213 if test "${enable_nls+set}" = set; then
2214 enableval="$enable_nls"
2215 USE_NLS=$enableval
2216 else
2217 USE_NLS=yes
2218 fi
2219
2220 echo "$ac_t""$USE_NLS" 1>&6
2221
2222
2223 USE_INCLUDED_LIBINTL=no
2224
2225 if test "$USE_NLS" = "yes"; then
2226 cat >> confdefs.h <<\EOF
2227 #define ENABLE_NLS 1
2228 EOF
2229
2230 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2231 echo "configure:2232: checking whether included gettext is requested" >&5
2232 # Check whether --with-included-gettext or --without-included-gettext was given.
2233 if test "${with_included_gettext+set}" = set; then
2234 withval="$with_included_gettext"
2235 nls_cv_force_use_gnu_gettext=$withval
2236 else
2237 nls_cv_force_use_gnu_gettext=no
2238 fi
2239
2240 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2241
2242 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2243 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2244 nls_cv_header_intl=
2245 nls_cv_header_libgt=
2246 CATOBJEXT=NONE
2247
2248 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2249 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2250 echo "configure:2251: checking for libintl.h" >&5
2251 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2252 echo $ac_n "(cached) $ac_c" 1>&6
2253 else
2254 cat > conftest.$ac_ext <<EOF
2255 #line 2256 "configure"
2256 #include "confdefs.h"
2257 #include <libintl.h>
2258 EOF
2259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2260 { (eval echo configure:2261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2262 if test -z "$ac_err"; then
2263 rm -rf conftest*
2264 eval "ac_cv_header_$ac_safe=yes"
2265 else
2266 echo "$ac_err" >&5
2267 echo "configure: failed program was:" >&5
2268 cat conftest.$ac_ext >&5
2269 rm -rf conftest*
2270 eval "ac_cv_header_$ac_safe=no"
2271 fi
2272 rm -f conftest*
2273 fi
2274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2275 echo "$ac_t""yes" 1>&6
2276 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2277 echo "configure:2278: checking for gettext in libc" >&5
2278 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2279 echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <libintl.h>
2285 int main() {
2286 return (int) gettext ("")
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2290 rm -rf conftest*
2291 gt_cv_func_gettext_libc=yes
2292 else
2293 echo "configure: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 rm -rf conftest*
2296 gt_cv_func_gettext_libc=no
2297 fi
2298 rm -f conftest*
2299 fi
2300
2301 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2302
2303 if test "$gt_cv_func_gettext_libc" != "yes"; then
2304 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2305 echo "configure:2306: checking for bindtextdomain in -lintl" >&5
2306 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2307 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2308 echo $ac_n "(cached) $ac_c" 1>&6
2309 else
2310 ac_save_LIBS="$LIBS"
2311 LIBS="-lintl $LIBS"
2312 cat > conftest.$ac_ext <<EOF
2313 #line 2314 "configure"
2314 #include "confdefs.h"
2315 /* Override any gcc2 internal prototype to avoid an error. */
2316 /* We use char because int might match the return type of a gcc2
2317 builtin and then its argument prototype would still apply. */
2318 char bindtextdomain();
2319
2320 int main() {
2321 bindtextdomain()
2322 ; return 0; }
2323 EOF
2324 if { (eval echo configure:2325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2325 rm -rf conftest*
2326 eval "ac_cv_lib_$ac_lib_var=yes"
2327 else
2328 echo "configure: failed program was:" >&5
2329 cat conftest.$ac_ext >&5
2330 rm -rf conftest*
2331 eval "ac_cv_lib_$ac_lib_var=no"
2332 fi
2333 rm -f conftest*
2334 LIBS="$ac_save_LIBS"
2335
2336 fi
2337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2340 echo "configure:2341: checking for gettext in libintl" >&5
2341 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2342 echo $ac_n "(cached) $ac_c" 1>&6
2343 else
2344 cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347
2348 int main() {
2349 return (int) gettext ("")
2350 ; return 0; }
2351 EOF
2352 if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2353 rm -rf conftest*
2354 gt_cv_func_gettext_libintl=yes
2355 else
2356 echo "configure: failed program was:" >&5
2357 cat conftest.$ac_ext >&5
2358 rm -rf conftest*
2359 gt_cv_func_gettext_libintl=no
2360 fi
2361 rm -f conftest*
2362 fi
2363
2364 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2365 else
2366 echo "$ac_t""no" 1>&6
2367 fi
2368
2369 fi
2370
2371 if test "$gt_cv_func_gettext_libc" = "yes" \
2372 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2373 cat >> confdefs.h <<\EOF
2374 #define HAVE_GETTEXT 1
2375 EOF
2376
2377 # Extract the first word of "msgfmt", so it can be a program name with args.
2378 set dummy msgfmt; ac_word=$2
2379 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2380 echo "configure:2381: checking for $ac_word" >&5
2381 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2382 echo $ac_n "(cached) $ac_c" 1>&6
2383 else
2384 case "$MSGFMT" in
2385 /*)
2386 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2387 ;;
2388 *)
2389 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2390 for ac_dir in $PATH; do
2391 test -z "$ac_dir" && ac_dir=.
2392 if test -f $ac_dir/$ac_word; then
2393 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2394 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2395 break
2396 fi
2397 fi
2398 done
2399 IFS="$ac_save_ifs"
2400 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2401 ;;
2402 esac
2403 fi
2404 MSGFMT="$ac_cv_path_MSGFMT"
2405 if test -n "$MSGFMT"; then
2406 echo "$ac_t""$MSGFMT" 1>&6
2407 else
2408 echo "$ac_t""no" 1>&6
2409 fi
2410 if test "$MSGFMT" != "no"; then
2411 for ac_func in dcgettext
2412 do
2413 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2414 echo "configure:2415: checking for $ac_func" >&5
2415 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2416 echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418 cat > conftest.$ac_ext <<EOF
2419 #line 2420 "configure"
2420 #include "confdefs.h"
2421 /* System header to define __stub macros and hopefully few prototypes,
2422 which can conflict with char $ac_func(); below. */
2423 #include <assert.h>
2424 /* Override any gcc2 internal prototype to avoid an error. */
2425 /* We use char because int might match the return type of a gcc2
2426 builtin and then its argument prototype would still apply. */
2427 char $ac_func();
2428
2429 int main() {
2430
2431 /* The GNU C library defines this for functions which it implements
2432 to always fail with ENOSYS. Some functions are actually named
2433 something starting with __ and the normal name is an alias. */
2434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2435 choke me
2436 #else
2437 $ac_func();
2438 #endif
2439
2440 ; return 0; }
2441 EOF
2442 if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2443 rm -rf conftest*
2444 eval "ac_cv_func_$ac_func=yes"
2445 else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 rm -rf conftest*
2449 eval "ac_cv_func_$ac_func=no"
2450 fi
2451 rm -f conftest*
2452 fi
2453
2454 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2455 echo "$ac_t""yes" 1>&6
2456 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2457 cat >> confdefs.h <<EOF
2458 #define $ac_tr_func 1
2459 EOF
2460
2461 else
2462 echo "$ac_t""no" 1>&6
2463 fi
2464 done
2465
2466 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2467 set dummy gmsgfmt; ac_word=$2
2468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2469 echo "configure:2470: checking for $ac_word" >&5
2470 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2472 else
2473 case "$GMSGFMT" in
2474 /*)
2475 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2476 ;;
2477 ?:/*)
2478 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2479 ;;
2480 *)
2481 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2482 ac_dummy="$PATH"
2483 for ac_dir in $ac_dummy; do
2484 test -z "$ac_dir" && ac_dir=.
2485 if test -f $ac_dir/$ac_word; then
2486 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2487 break
2488 fi
2489 done
2490 IFS="$ac_save_ifs"
2491 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2492 ;;
2493 esac
2494 fi
2495 GMSGFMT="$ac_cv_path_GMSGFMT"
2496 if test -n "$GMSGFMT"; then
2497 echo "$ac_t""$GMSGFMT" 1>&6
2498 else
2499 echo "$ac_t""no" 1>&6
2500 fi
2501
2502 # Extract the first word of "xgettext", so it can be a program name with args.
2503 set dummy xgettext; ac_word=$2
2504 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2505 echo "configure:2506: checking for $ac_word" >&5
2506 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2507 echo $ac_n "(cached) $ac_c" 1>&6
2508 else
2509 case "$XGETTEXT" in
2510 /*)
2511 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2512 ;;
2513 *)
2514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2515 for ac_dir in $PATH; do
2516 test -z "$ac_dir" && ac_dir=.
2517 if test -f $ac_dir/$ac_word; then
2518 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2519 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2520 break
2521 fi
2522 fi
2523 done
2524 IFS="$ac_save_ifs"
2525 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2526 ;;
2527 esac
2528 fi
2529 XGETTEXT="$ac_cv_path_XGETTEXT"
2530 if test -n "$XGETTEXT"; then
2531 echo "$ac_t""$XGETTEXT" 1>&6
2532 else
2533 echo "$ac_t""no" 1>&6
2534 fi
2535
2536 cat > conftest.$ac_ext <<EOF
2537 #line 2538 "configure"
2538 #include "confdefs.h"
2539
2540 int main() {
2541 extern int _nl_msg_cat_cntr;
2542 return _nl_msg_cat_cntr
2543 ; return 0; }
2544 EOF
2545 if { (eval echo configure:2546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2546 rm -rf conftest*
2547 CATOBJEXT=.gmo
2548 DATADIRNAME=share
2549 else
2550 echo "configure: failed program was:" >&5
2551 cat conftest.$ac_ext >&5
2552 rm -rf conftest*
2553 CATOBJEXT=.mo
2554 DATADIRNAME=lib
2555 fi
2556 rm -f conftest*
2557 INSTOBJEXT=.mo
2558 fi
2559 fi
2560
2561 else
2562 echo "$ac_t""no" 1>&6
2563 fi
2564
2565
2566
2567 if test "$CATOBJEXT" = "NONE"; then
2568 nls_cv_use_gnu_gettext=yes
2569 fi
2570 fi
2571
2572 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2573 INTLOBJS="\$(GETTOBJS)"
2574 # Extract the first word of "msgfmt", so it can be a program name with args.
2575 set dummy msgfmt; ac_word=$2
2576 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2577 echo "configure:2578: checking for $ac_word" >&5
2578 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2579 echo $ac_n "(cached) $ac_c" 1>&6
2580 else
2581 case "$MSGFMT" in
2582 /*)
2583 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2584 ;;
2585 *)
2586 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2587 for ac_dir in $PATH; do
2588 test -z "$ac_dir" && ac_dir=.
2589 if test -f $ac_dir/$ac_word; then
2590 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2591 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2592 break
2593 fi
2594 fi
2595 done
2596 IFS="$ac_save_ifs"
2597 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2598 ;;
2599 esac
2600 fi
2601 MSGFMT="$ac_cv_path_MSGFMT"
2602 if test -n "$MSGFMT"; then
2603 echo "$ac_t""$MSGFMT" 1>&6
2604 else
2605 echo "$ac_t""no" 1>&6
2606 fi
2607
2608 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2609 set dummy gmsgfmt; ac_word=$2
2610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2611 echo "configure:2612: checking for $ac_word" >&5
2612 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2613 echo $ac_n "(cached) $ac_c" 1>&6
2614 else
2615 case "$GMSGFMT" in
2616 /*)
2617 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2618 ;;
2619 ?:/*)
2620 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2621 ;;
2622 *)
2623 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2624 ac_dummy="$PATH"
2625 for ac_dir in $ac_dummy; do
2626 test -z "$ac_dir" && ac_dir=.
2627 if test -f $ac_dir/$ac_word; then
2628 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2629 break
2630 fi
2631 done
2632 IFS="$ac_save_ifs"
2633 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2634 ;;
2635 esac
2636 fi
2637 GMSGFMT="$ac_cv_path_GMSGFMT"
2638 if test -n "$GMSGFMT"; then
2639 echo "$ac_t""$GMSGFMT" 1>&6
2640 else
2641 echo "$ac_t""no" 1>&6
2642 fi
2643
2644 # Extract the first word of "xgettext", so it can be a program name with args.
2645 set dummy xgettext; ac_word=$2
2646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2647 echo "configure:2648: checking for $ac_word" >&5
2648 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2649 echo $ac_n "(cached) $ac_c" 1>&6
2650 else
2651 case "$XGETTEXT" in
2652 /*)
2653 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2654 ;;
2655 *)
2656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2657 for ac_dir in $PATH; do
2658 test -z "$ac_dir" && ac_dir=.
2659 if test -f $ac_dir/$ac_word; then
2660 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2661 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2662 break
2663 fi
2664 fi
2665 done
2666 IFS="$ac_save_ifs"
2667 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2668 ;;
2669 esac
2670 fi
2671 XGETTEXT="$ac_cv_path_XGETTEXT"
2672 if test -n "$XGETTEXT"; then
2673 echo "$ac_t""$XGETTEXT" 1>&6
2674 else
2675 echo "$ac_t""no" 1>&6
2676 fi
2677
2678
2679 USE_INCLUDED_LIBINTL=yes
2680 CATOBJEXT=.gmo
2681 INSTOBJEXT=.mo
2682 DATADIRNAME=share
2683 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2684 INTLLIBS=$INTLDEPS
2685 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2686 nls_cv_header_intl=libintl.h
2687 nls_cv_header_libgt=libgettext.h
2688 fi
2689
2690 if test "$XGETTEXT" != ":"; then
2691 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2692 : ;
2693 else
2694 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2695 XGETTEXT=":"
2696 fi
2697 fi
2698
2699 # We need to process the po/ directory.
2700 POSUB=po
2701 else
2702 DATADIRNAME=share
2703 nls_cv_header_intl=libintl.h
2704 nls_cv_header_libgt=libgettext.h
2705 fi
2706
2707 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2708 # because some of the sources are only built for this goal.
2709 if test "$PACKAGE" = gettext; then
2710 USE_NLS=yes
2711 USE_INCLUDED_LIBINTL=yes
2712 fi
2713
2714 for lang in $ALL_LINGUAS; do
2715 GMOFILES="$GMOFILES $lang.gmo"
2716 POFILES="$POFILES $lang.po"
2717 done
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732 if test "x$CATOBJEXT" != "x"; then
2733 if test "x$ALL_LINGUAS" = "x"; then
2734 LINGUAS=
2735 else
2736 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2737 echo "configure:2738: checking for catalogs to be installed" >&5
2738 NEW_LINGUAS=
2739 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2740 case "$ALL_LINGUAS" in
2741 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2742 esac
2743 done
2744 LINGUAS=$NEW_LINGUAS
2745 echo "$ac_t""$LINGUAS" 1>&6
2746 fi
2747
2748 if test -n "$LINGUAS"; then
2749 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2750 fi
2751 fi
2752
2753 if test $ac_cv_header_locale_h = yes; then
2754 INCLUDE_LOCALE_H="#include <locale.h>"
2755 else
2756 INCLUDE_LOCALE_H="\
2757 /* The system does not provide the header <locale.h>. Take care yourself. */"
2758 fi
2759
2760
2761 if test -f $srcdir/po2tbl.sed.in; then
2762 if test "$CATOBJEXT" = ".cat"; then
2763 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2764 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2765 echo "configure:2766: checking for linux/version.h" >&5
2766 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2767 echo $ac_n "(cached) $ac_c" 1>&6
2768 else
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772 #include <linux/version.h>
2773 EOF
2774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2775 { (eval echo configure:2776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2777 if test -z "$ac_err"; then
2778 rm -rf conftest*
2779 eval "ac_cv_header_$ac_safe=yes"
2780 else
2781 echo "$ac_err" >&5
2782 echo "configure: failed program was:" >&5
2783 cat conftest.$ac_ext >&5
2784 rm -rf conftest*
2785 eval "ac_cv_header_$ac_safe=no"
2786 fi
2787 rm -f conftest*
2788 fi
2789 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2790 echo "$ac_t""yes" 1>&6
2791 msgformat=linux
2792 else
2793 echo "$ac_t""no" 1>&6
2794 msgformat=xopen
2795 fi
2796
2797
2798 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2799 fi
2800 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2801 $srcdir/po2tbl.sed.in > po2tbl.sed
2802 fi
2803
2804 if test "$PACKAGE" = "gettext"; then
2805 GT_NO="#NO#"
2806 GT_YES=
2807 else
2808 GT_NO=
2809 GT_YES="#YES#"
2810 fi
2811
2812
2813
2814 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2815
2816
2817 l=
2818
2819
2820 if test -f $srcdir/po/POTFILES.in; then
2821 test -d po || mkdir po
2822 if test "x$srcdir" != "x."; then
2823 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2824 posrcprefix="$srcdir/"
2825 else
2826 posrcprefix="../$srcdir/"
2827 fi
2828 else
2829 posrcprefix="../"
2830 fi
2831 rm -f po/POTFILES
2832 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2833 < $srcdir/po/POTFILES.in > po/POTFILES
2834 fi
2835
2836
2837
2838 CONFIG_OBS=
2839 CONFIG_LIB_OBS=
2840 CONFIG_DEPS=
2841 CONFIG_SRCS=
2842 CONFIG_INITS=
2843 ENABLE_CFLAGS=
2844 CONFIG_ALL=
2845 CONFIG_CLEAN=
2846 CONFIG_INSTALL=
2847 CONFIG_UNINSTALL=
2848
2849 configdirs="doc testsuite"
2850
2851 # Check whether --enable-multi-ice or --disable-multi-ice was given.
2852 if test "${enable_multi_ice+set}" = set; then
2853 enableval="$enable_multi_ice"
2854 case "${enableval}" in
2855 yes ) enable_multi_ice="yes" ;;
2856 no) enable_multi_ice="no" ;;
2857 *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2858 esac
2859
2860 fi
2861
2862
2863 if test "${enable_multi_ice}" = "yes"; then
2864 configdirs="${configdirs} multi-ice"
2865 fi
2866
2867
2868 . ${srcdir}/configure.host
2869
2870 . ${srcdir}/configure.tgt
2871
2872 targ=${target} ; . ${srcdir}/../bfd/config.bfd
2873
2874
2875 targ=${target}
2876 . ${srcdir}/../bfd/config.bfd
2877
2878 targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2879
2880 if test x"${targ_archs}" != x ; then
2881 cat >> confdefs.h <<EOF
2882 #define DEFAULT_BFD_ARCH ${targ_archs}
2883 EOF
2884
2885 fi
2886 if test x"${targ_defvec}" != x ; then
2887 cat >> confdefs.h <<EOF
2888 #define DEFAULT_BFD_VEC ${targ_defvec}
2889 EOF
2890
2891 fi
2892
2893 for ac_prog in mawk gawk nawk awk
2894 do
2895 # Extract the first word of "$ac_prog", so it can be a program name with args.
2896 set dummy $ac_prog; ac_word=$2
2897 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2898 echo "configure:2899: checking for $ac_word" >&5
2899 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2900 echo $ac_n "(cached) $ac_c" 1>&6
2901 else
2902 if test -n "$AWK"; then
2903 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2904 else
2905 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2906 ac_dummy="$PATH"
2907 for ac_dir in $ac_dummy; do
2908 test -z "$ac_dir" && ac_dir=.
2909 if test -f $ac_dir/$ac_word; then
2910 ac_cv_prog_AWK="$ac_prog"
2911 break
2912 fi
2913 done
2914 IFS="$ac_save_ifs"
2915 fi
2916 fi
2917 AWK="$ac_cv_prog_AWK"
2918 if test -n "$AWK"; then
2919 echo "$ac_t""$AWK" 1>&6
2920 else
2921 echo "$ac_t""no" 1>&6
2922 fi
2923
2924 test -n "$AWK" && break
2925 done
2926
2927 # Find a good install program. We prefer a C program (faster),
2928 # so one script is as good as another. But avoid the broken or
2929 # incompatible versions:
2930 # SysV /etc/install, /usr/sbin/install
2931 # SunOS /usr/etc/install
2932 # IRIX /sbin/install
2933 # AIX /bin/install
2934 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2935 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2936 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2937 # ./install, which can be erroneously created by make from ./install.sh.
2938 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2939 echo "configure:2940: checking for a BSD compatible install" >&5
2940 if test -z "$INSTALL"; then
2941 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2942 echo $ac_n "(cached) $ac_c" 1>&6
2943 else
2944 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2945 for ac_dir in $PATH; do
2946 # Account for people who put trailing slashes in PATH elements.
2947 case "$ac_dir/" in
2948 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2949 *)
2950 # OSF1 and SCO ODT 3.0 have their own names for install.
2951 # Don't use installbsd from OSF since it installs stuff as root
2952 # by default.
2953 for ac_prog in ginstall scoinst install; do
2954 if test -f $ac_dir/$ac_prog; then
2955 if test $ac_prog = install &&
2956 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2957 # AIX install. It has an incompatible calling convention.
2958 :
2959 else
2960 ac_cv_path_install="$ac_dir/$ac_prog -c"
2961 break 2
2962 fi
2963 fi
2964 done
2965 ;;
2966 esac
2967 done
2968 IFS="$ac_save_IFS"
2969
2970 fi
2971 if test "${ac_cv_path_install+set}" = set; then
2972 INSTALL="$ac_cv_path_install"
2973 else
2974 # As a last resort, use the slow shell script. We don't cache a
2975 # path for INSTALL within a source directory, because that will
2976 # break other packages using the cache if that directory is
2977 # removed, or if the path is relative.
2978 INSTALL="$ac_install_sh"
2979 fi
2980 fi
2981 echo "$ac_t""$INSTALL" 1>&6
2982
2983 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2984 # It thinks the first close brace ends the variable substitution.
2985 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2986
2987 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2988
2989 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2990
2991 if test $host != $build; then
2992 ac_tool_prefix=${host_alias}-
2993 else
2994 ac_tool_prefix=
2995 fi
2996
2997 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2998 set dummy ${ac_tool_prefix}ar; ac_word=$2
2999 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3000 echo "configure:3001: checking for $ac_word" >&5
3001 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3002 echo $ac_n "(cached) $ac_c" 1>&6
3003 else
3004 if test -n "$AR"; then
3005 ac_cv_prog_AR="$AR" # Let the user override the test.
3006 else
3007 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3008 ac_dummy="$PATH"
3009 for ac_dir in $ac_dummy; do
3010 test -z "$ac_dir" && ac_dir=.
3011 if test -f $ac_dir/$ac_word; then
3012 ac_cv_prog_AR="${ac_tool_prefix}ar"
3013 break
3014 fi
3015 done
3016 IFS="$ac_save_ifs"
3017 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3018 fi
3019 fi
3020 AR="$ac_cv_prog_AR"
3021 if test -n "$AR"; then
3022 echo "$ac_t""$AR" 1>&6
3023 else
3024 echo "$ac_t""no" 1>&6
3025 fi
3026
3027
3028
3029 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3030 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3034 echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036 if test -n "$RANLIB"; then
3037 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3038 else
3039 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3040 ac_dummy="$PATH"
3041 for ac_dir in $ac_dummy; do
3042 test -z "$ac_dir" && ac_dir=.
3043 if test -f $ac_dir/$ac_word; then
3044 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3045 break
3046 fi
3047 done
3048 IFS="$ac_save_ifs"
3049 fi
3050 fi
3051 RANLIB="$ac_cv_prog_RANLIB"
3052 if test -n "$RANLIB"; then
3053 echo "$ac_t""$RANLIB" 1>&6
3054 else
3055 echo "$ac_t""no" 1>&6
3056 fi
3057
3058
3059 if test -z "$ac_cv_prog_RANLIB"; then
3060 if test -n "$ac_tool_prefix"; then
3061 # Extract the first word of "ranlib", so it can be a program name with args.
3062 set dummy ranlib; ac_word=$2
3063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_word" >&5
3065 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3066 echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068 if test -n "$RANLIB"; then
3069 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3070 else
3071 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3072 ac_dummy="$PATH"
3073 for ac_dir in $ac_dummy; do
3074 test -z "$ac_dir" && ac_dir=.
3075 if test -f $ac_dir/$ac_word; then
3076 ac_cv_prog_RANLIB="ranlib"
3077 break
3078 fi
3079 done
3080 IFS="$ac_save_ifs"
3081 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3082 fi
3083 fi
3084 RANLIB="$ac_cv_prog_RANLIB"
3085 if test -n "$RANLIB"; then
3086 echo "$ac_t""$RANLIB" 1>&6
3087 else
3088 echo "$ac_t""no" 1>&6
3089 fi
3090
3091 else
3092 RANLIB=":"
3093 fi
3094 fi
3095
3096 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3097 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3098 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3099 echo "configure:3100: checking for $ac_word" >&5
3100 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3101 echo $ac_n "(cached) $ac_c" 1>&6
3102 else
3103 if test -n "$DLLTOOL"; then
3104 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3105 else
3106 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3107 ac_dummy="$PATH"
3108 for ac_dir in $ac_dummy; do
3109 test -z "$ac_dir" && ac_dir=.
3110 if test -f $ac_dir/$ac_word; then
3111 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3112 break
3113 fi
3114 done
3115 IFS="$ac_save_ifs"
3116 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3117 fi
3118 fi
3119 DLLTOOL="$ac_cv_prog_DLLTOOL"
3120 if test -n "$DLLTOOL"; then
3121 echo "$ac_t""$DLLTOOL" 1>&6
3122 else
3123 echo "$ac_t""no" 1>&6
3124 fi
3125
3126
3127
3128 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3129 set dummy ${ac_tool_prefix}windres; ac_word=$2
3130 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3131 echo "configure:3132: checking for $ac_word" >&5
3132 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3133 echo $ac_n "(cached) $ac_c" 1>&6
3134 else
3135 if test -n "$WINDRES"; then
3136 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3137 else
3138 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3139 ac_dummy="$PATH"
3140 for ac_dir in $ac_dummy; do
3141 test -z "$ac_dir" && ac_dir=.
3142 if test -f $ac_dir/$ac_word; then
3143 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3144 break
3145 fi
3146 done
3147 IFS="$ac_save_ifs"
3148 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3149 fi
3150 fi
3151 WINDRES="$ac_cv_prog_WINDRES"
3152 if test -n "$WINDRES"; then
3153 echo "$ac_t""$WINDRES" 1>&6
3154 else
3155 echo "$ac_t""no" 1>&6
3156 fi
3157
3158
3159
3160 for ac_prog in 'bison -y' byacc
3161 do
3162 # Extract the first word of "$ac_prog", so it can be a program name with args.
3163 set dummy $ac_prog; ac_word=$2
3164 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3165 echo "configure:3166: checking for $ac_word" >&5
3166 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3167 echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169 if test -n "$YACC"; then
3170 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3171 else
3172 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3173 ac_dummy="$PATH"
3174 for ac_dir in $ac_dummy; do
3175 test -z "$ac_dir" && ac_dir=.
3176 if test -f $ac_dir/$ac_word; then
3177 ac_cv_prog_YACC="$ac_prog"
3178 break
3179 fi
3180 done
3181 IFS="$ac_save_ifs"
3182 fi
3183 fi
3184 YACC="$ac_cv_prog_YACC"
3185 if test -n "$YACC"; then
3186 echo "$ac_t""$YACC" 1>&6
3187 else
3188 echo "$ac_t""no" 1>&6
3189 fi
3190
3191 test -n "$YACC" && break
3192 done
3193 test -n "$YACC" || YACC="yacc"
3194
3195
3196 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3197 set dummy ${ac_tool_prefix}mig; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3201 echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203 if test -n "$MIG"; then
3204 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3205 else
3206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3207 ac_dummy="$PATH"
3208 for ac_dir in $ac_dummy; do
3209 test -z "$ac_dir" && ac_dir=.
3210 if test -f $ac_dir/$ac_word; then
3211 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3212 break
3213 fi
3214 done
3215 IFS="$ac_save_ifs"
3216 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3217 fi
3218 fi
3219 MIG="$ac_cv_prog_MIG"
3220 if test -n "$MIG"; then
3221 echo "$ac_t""$MIG" 1>&6
3222 else
3223 echo "$ac_t""no" 1>&6
3224 fi
3225
3226
3227
3228
3229 if test "$program_transform_name" = s,x,x,; then
3230 program_transform_name=
3231 else
3232 # Double any \ or $. echo might interpret backslashes.
3233 cat <<\EOF_SED > conftestsed
3234 s,\\,\\\\,g; s,\$,$$,g
3235 EOF_SED
3236 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3237 rm -f conftestsed
3238 fi
3239 test "$program_prefix" != NONE &&
3240 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3241 # Use a double $ so make ignores it.
3242 test "$program_suffix" != NONE &&
3243 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3244
3245 # sed with no file args requires a program.
3246 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3247
3248
3249 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3250 echo "configure:3251: checking return type of signal handlers" >&5
3251 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3252 echo $ac_n "(cached) $ac_c" 1>&6
3253 else
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 #include <sys/types.h>
3258 #include <signal.h>
3259 #ifdef signal
3260 #undef signal
3261 #endif
3262 #ifdef __cplusplus
3263 extern "C" void (*signal (int, void (*)(int)))(int);
3264 #else
3265 void (*signal ()) ();
3266 #endif
3267
3268 int main() {
3269 int i;
3270 ; return 0; }
3271 EOF
3272 if { (eval echo configure:3273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3273 rm -rf conftest*
3274 ac_cv_type_signal=void
3275 else
3276 echo "configure: failed program was:" >&5
3277 cat conftest.$ac_ext >&5
3278 rm -rf conftest*
3279 ac_cv_type_signal=int
3280 fi
3281 rm -f conftest*
3282 fi
3283
3284 echo "$ac_t""$ac_cv_type_signal" 1>&6
3285 cat >> confdefs.h <<EOF
3286 #define RETSIGTYPE $ac_cv_type_signal
3287 EOF
3288
3289
3290
3291 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3292 echo "configure:3293: checking for ANSI C header files" >&5
3293 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3294 echo $ac_n "(cached) $ac_c" 1>&6
3295 else
3296 cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <stdlib.h>
3300 #include <stdarg.h>
3301 #include <string.h>
3302 #include <float.h>
3303 EOF
3304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3305 { (eval echo configure:3306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3307 if test -z "$ac_err"; then
3308 rm -rf conftest*
3309 ac_cv_header_stdc=yes
3310 else
3311 echo "$ac_err" >&5
3312 echo "configure: failed program was:" >&5
3313 cat conftest.$ac_ext >&5
3314 rm -rf conftest*
3315 ac_cv_header_stdc=no
3316 fi
3317 rm -f conftest*
3318
3319 if test $ac_cv_header_stdc = yes; then
3320 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3321 cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3324 #include <string.h>
3325 EOF
3326 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3327 egrep "memchr" >/dev/null 2>&1; then
3328 :
3329 else
3330 rm -rf conftest*
3331 ac_cv_header_stdc=no
3332 fi
3333 rm -f conftest*
3334
3335 fi
3336
3337 if test $ac_cv_header_stdc = yes; then
3338 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3339 cat > conftest.$ac_ext <<EOF
3340 #line 3341 "configure"
3341 #include "confdefs.h"
3342 #include <stdlib.h>
3343 EOF
3344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3345 egrep "free" >/dev/null 2>&1; then
3346 :
3347 else
3348 rm -rf conftest*
3349 ac_cv_header_stdc=no
3350 fi
3351 rm -f conftest*
3352
3353 fi
3354
3355 if test $ac_cv_header_stdc = yes; then
3356 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3357 if test "$cross_compiling" = yes; then
3358 :
3359 else
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <ctype.h>
3364 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3365 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3366 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3367 int main () { int i; for (i = 0; i < 256; i++)
3368 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3369 exit (0); }
3370
3371 EOF
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3373 then
3374 :
3375 else
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -fr conftest*
3379 ac_cv_header_stdc=no
3380 fi
3381 rm -fr conftest*
3382 fi
3383
3384 fi
3385 fi
3386
3387 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3388 if test $ac_cv_header_stdc = yes; then
3389 cat >> confdefs.h <<\EOF
3390 #define STDC_HEADERS 1
3391 EOF
3392
3393 fi
3394
3395
3396
3397 case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
3398 cat >> confdefs.h <<\EOF
3399 #define _MSE_INT_H 1
3400 EOF
3401
3402 esac; esac
3403
3404 for ac_hdr in ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \
3405 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3406 string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
3407 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3408 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
3409 time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
3410 dirent.h sys/ndir.h sys/dir.h ndir.h \
3411 curses.h ncurses.h \
3412 poll.h sys/poll.h
3413 do
3414 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3415 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3416 echo "configure:3417: checking for $ac_hdr" >&5
3417 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3418 echo $ac_n "(cached) $ac_c" 1>&6
3419 else
3420 cat > conftest.$ac_ext <<EOF
3421 #line 3422 "configure"
3422 #include "confdefs.h"
3423 #include <$ac_hdr>
3424 EOF
3425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3426 { (eval echo configure:3427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3428 if test -z "$ac_err"; then
3429 rm -rf conftest*
3430 eval "ac_cv_header_$ac_safe=yes"
3431 else
3432 echo "$ac_err" >&5
3433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_header_$ac_safe=no"
3437 fi
3438 rm -f conftest*
3439 fi
3440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3441 echo "$ac_t""yes" 1>&6
3442 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3443 cat >> confdefs.h <<EOF
3444 #define $ac_tr_hdr 1
3445 EOF
3446
3447 else
3448 echo "$ac_t""no" 1>&6
3449 fi
3450 done
3451
3452 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3453 echo "configure:3454: checking whether stat file-mode macros are broken" >&5
3454 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3455 echo $ac_n "(cached) $ac_c" 1>&6
3456 else
3457 cat > conftest.$ac_ext <<EOF
3458 #line 3459 "configure"
3459 #include "confdefs.h"
3460 #include <sys/types.h>
3461 #include <sys/stat.h>
3462
3463 #if defined(S_ISBLK) && defined(S_IFDIR)
3464 # if S_ISBLK (S_IFDIR)
3465 You lose.
3466 # endif
3467 #endif
3468
3469 #if defined(S_ISBLK) && defined(S_IFCHR)
3470 # if S_ISBLK (S_IFCHR)
3471 You lose.
3472 # endif
3473 #endif
3474
3475 #if defined(S_ISLNK) && defined(S_IFREG)
3476 # if S_ISLNK (S_IFREG)
3477 You lose.
3478 # endif
3479 #endif
3480
3481 #if defined(S_ISSOCK) && defined(S_IFREG)
3482 # if S_ISSOCK (S_IFREG)
3483 You lose.
3484 # endif
3485 #endif
3486
3487 EOF
3488 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3489 egrep "You lose" >/dev/null 2>&1; then
3490 rm -rf conftest*
3491 ac_cv_header_stat_broken=yes
3492 else
3493 rm -rf conftest*
3494 ac_cv_header_stat_broken=no
3495 fi
3496 rm -f conftest*
3497
3498 fi
3499
3500 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3501 if test $ac_cv_header_stat_broken = yes; then
3502 cat >> confdefs.h <<\EOF
3503 #define STAT_MACROS_BROKEN 1
3504 EOF
3505
3506 fi
3507
3508
3509 echo $ac_n "checking for working const""... $ac_c" 1>&6
3510 echo "configure:3511: checking for working const" >&5
3511 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3512 echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517
3518 int main() {
3519
3520 /* Ultrix mips cc rejects this. */
3521 typedef int charset[2]; const charset x;
3522 /* SunOS 4.1.1 cc rejects this. */
3523 char const *const *ccp;
3524 char **p;
3525 /* NEC SVR4.0.2 mips cc rejects this. */
3526 struct point {int x, y;};
3527 static struct point const zero = {0,0};
3528 /* AIX XL C 1.02.0.0 rejects this.
3529 It does not let you subtract one const X* pointer from another in an arm
3530 of an if-expression whose if-part is not a constant expression */
3531 const char *g = "string";
3532 ccp = &g + (g ? g-g : 0);
3533 /* HPUX 7.0 cc rejects these. */
3534 ++ccp;
3535 p = (char**) ccp;
3536 ccp = (char const *const *) p;
3537 { /* SCO 3.2v4 cc rejects this. */
3538 char *t;
3539 char const *s = 0 ? (char *) 0 : (char const *) 0;
3540
3541 *t++ = 0;
3542 }
3543 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3544 int x[] = {25, 17};
3545 const int *foo = &x[0];
3546 ++foo;
3547 }
3548 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3549 typedef const int *iptr;
3550 iptr p = 0;
3551 ++p;
3552 }
3553 { /* AIX XL C 1.02.0.0 rejects this saying
3554 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3555 struct s { int j; const int *ap[3]; };
3556 struct s *b; b->j = 5;
3557 }
3558 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3559 const int foo = 10;
3560 }
3561
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565 rm -rf conftest*
3566 ac_cv_c_const=yes
3567 else
3568 echo "configure: failed program was:" >&5
3569 cat conftest.$ac_ext >&5
3570 rm -rf conftest*
3571 ac_cv_c_const=no
3572 fi
3573 rm -f conftest*
3574 fi
3575
3576 echo "$ac_t""$ac_cv_c_const" 1>&6
3577 if test $ac_cv_c_const = no; then
3578 cat >> confdefs.h <<\EOF
3579 #define const
3580 EOF
3581
3582 fi
3583
3584
3585 for ac_func in bcopy btowc bzero isascii poll sbrk setpgid setpgrp \
3586 sigaction sigprocmask sigsetmask
3587 do
3588 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3589 echo "configure:3590: checking for $ac_func" >&5
3590 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3591 echo $ac_n "(cached) $ac_c" 1>&6
3592 else
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 /* System header to define __stub macros and hopefully few prototypes,
3597 which can conflict with char $ac_func(); below. */
3598 #include <assert.h>
3599 /* Override any gcc2 internal prototype to avoid an error. */
3600 /* We use char because int might match the return type of a gcc2
3601 builtin and then its argument prototype would still apply. */
3602 char $ac_func();
3603
3604 int main() {
3605
3606 /* The GNU C library defines this for functions which it implements
3607 to always fail with ENOSYS. Some functions are actually named
3608 something starting with __ and the normal name is an alias. */
3609 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3610 choke me
3611 #else
3612 $ac_func();
3613 #endif
3614
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3618 rm -rf conftest*
3619 eval "ac_cv_func_$ac_func=yes"
3620 else
3621 echo "configure: failed program was:" >&5
3622 cat conftest.$ac_ext >&5
3623 rm -rf conftest*
3624 eval "ac_cv_func_$ac_func=no"
3625 fi
3626 rm -f conftest*
3627 fi
3628
3629 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3630 echo "$ac_t""yes" 1>&6
3631 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3632 cat >> confdefs.h <<EOF
3633 #define $ac_tr_func 1
3634 EOF
3635
3636 else
3637 echo "$ac_t""no" 1>&6
3638 fi
3639 done
3640
3641 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3642 # for constant arguments. Useless!
3643 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3644 echo "configure:3645: checking for working alloca.h" >&5
3645 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3646 echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648 cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651 #include <alloca.h>
3652 int main() {
3653 char *p = alloca(2 * sizeof(int));
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3657 rm -rf conftest*
3658 ac_cv_header_alloca_h=yes
3659 else
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3662 rm -rf conftest*
3663 ac_cv_header_alloca_h=no
3664 fi
3665 rm -f conftest*
3666 fi
3667
3668 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3669 if test $ac_cv_header_alloca_h = yes; then
3670 cat >> confdefs.h <<\EOF
3671 #define HAVE_ALLOCA_H 1
3672 EOF
3673
3674 fi
3675
3676 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3677 echo "configure:3678: checking for alloca" >&5
3678 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3679 echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681 cat > conftest.$ac_ext <<EOF
3682 #line 3683 "configure"
3683 #include "confdefs.h"
3684
3685 #ifdef __GNUC__
3686 # define alloca __builtin_alloca
3687 #else
3688 # ifdef _MSC_VER
3689 # include <malloc.h>
3690 # define alloca _alloca
3691 # else
3692 # if HAVE_ALLOCA_H
3693 # include <alloca.h>
3694 # else
3695 # ifdef _AIX
3696 #pragma alloca
3697 # else
3698 # ifndef alloca /* predefined by HP cc +Olibcalls */
3699 char *alloca ();
3700 # endif
3701 # endif
3702 # endif
3703 # endif
3704 #endif
3705
3706 int main() {
3707 char *p = (char *) alloca(1);
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3711 rm -rf conftest*
3712 ac_cv_func_alloca_works=yes
3713 else
3714 echo "configure: failed program was:" >&5
3715 cat conftest.$ac_ext >&5
3716 rm -rf conftest*
3717 ac_cv_func_alloca_works=no
3718 fi
3719 rm -f conftest*
3720 fi
3721
3722 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3723 if test $ac_cv_func_alloca_works = yes; then
3724 cat >> confdefs.h <<\EOF
3725 #define HAVE_ALLOCA 1
3726 EOF
3727
3728 fi
3729
3730 if test $ac_cv_func_alloca_works = no; then
3731 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3732 # that cause trouble. Some versions do not even contain alloca or
3733 # contain a buggy version. If you still want to use their alloca,
3734 # use ar to extract alloca.o from them instead of compiling alloca.c.
3735 ALLOCA=alloca.${ac_objext}
3736 cat >> confdefs.h <<\EOF
3737 #define C_ALLOCA 1
3738 EOF
3739
3740
3741 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3742 echo "configure:3743: checking whether alloca needs Cray hooks" >&5
3743 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3744 echo $ac_n "(cached) $ac_c" 1>&6
3745 else
3746 cat > conftest.$ac_ext <<EOF
3747 #line 3748 "configure"
3748 #include "confdefs.h"
3749 #if defined(CRAY) && ! defined(CRAY2)
3750 webecray
3751 #else
3752 wenotbecray
3753 #endif
3754
3755 EOF
3756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3757 egrep "webecray" >/dev/null 2>&1; then
3758 rm -rf conftest*
3759 ac_cv_os_cray=yes
3760 else
3761 rm -rf conftest*
3762 ac_cv_os_cray=no
3763 fi
3764 rm -f conftest*
3765
3766 fi
3767
3768 echo "$ac_t""$ac_cv_os_cray" 1>&6
3769 if test $ac_cv_os_cray = yes; then
3770 for ac_func in _getb67 GETB67 getb67; do
3771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3772 echo "configure:3773: checking for $ac_func" >&5
3773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3774 echo $ac_n "(cached) $ac_c" 1>&6
3775 else
3776 cat > conftest.$ac_ext <<EOF
3777 #line 3778 "configure"
3778 #include "confdefs.h"
3779 /* System header to define __stub macros and hopefully few prototypes,
3780 which can conflict with char $ac_func(); below. */
3781 #include <assert.h>
3782 /* Override any gcc2 internal prototype to avoid an error. */
3783 /* We use char because int might match the return type of a gcc2
3784 builtin and then its argument prototype would still apply. */
3785 char $ac_func();
3786
3787 int main() {
3788
3789 /* The GNU C library defines this for functions which it implements
3790 to always fail with ENOSYS. Some functions are actually named
3791 something starting with __ and the normal name is an alias. */
3792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3793 choke me
3794 #else
3795 $ac_func();
3796 #endif
3797
3798 ; return 0; }
3799 EOF
3800 if { (eval echo configure:3801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3801 rm -rf conftest*
3802 eval "ac_cv_func_$ac_func=yes"
3803 else
3804 echo "configure: failed program was:" >&5
3805 cat conftest.$ac_ext >&5
3806 rm -rf conftest*
3807 eval "ac_cv_func_$ac_func=no"
3808 fi
3809 rm -f conftest*
3810 fi
3811
3812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3813 echo "$ac_t""yes" 1>&6
3814 cat >> confdefs.h <<EOF
3815 #define CRAY_STACKSEG_END $ac_func
3816 EOF
3817
3818 break
3819 else
3820 echo "$ac_t""no" 1>&6
3821 fi
3822
3823 done
3824 fi
3825
3826 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3827 echo "configure:3828: checking stack direction for C alloca" >&5
3828 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3829 echo $ac_n "(cached) $ac_c" 1>&6
3830 else
3831 if test "$cross_compiling" = yes; then
3832 ac_cv_c_stack_direction=0
3833 else
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 find_stack_direction ()
3838 {
3839 static char *addr = 0;
3840 auto char dummy;
3841 if (addr == 0)
3842 {
3843 addr = &dummy;
3844 return find_stack_direction ();
3845 }
3846 else
3847 return (&dummy > addr) ? 1 : -1;
3848 }
3849 main ()
3850 {
3851 exit (find_stack_direction() < 0);
3852 }
3853 EOF
3854 if { (eval echo configure:3855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3855 then
3856 ac_cv_c_stack_direction=1
3857 else
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -fr conftest*
3861 ac_cv_c_stack_direction=-1
3862 fi
3863 rm -fr conftest*
3864 fi
3865
3866 fi
3867
3868 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3869 cat >> confdefs.h <<EOF
3870 #define STACK_DIRECTION $ac_cv_c_stack_direction
3871 EOF
3872
3873 fi
3874
3875 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3876 echo "configure:3877: checking for pid_t" >&5
3877 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3878 echo $ac_n "(cached) $ac_c" 1>&6
3879 else
3880 cat > conftest.$ac_ext <<EOF
3881 #line 3882 "configure"
3882 #include "confdefs.h"
3883 #include <sys/types.h>
3884 #if STDC_HEADERS
3885 #include <stdlib.h>
3886 #include <stddef.h>
3887 #endif
3888 EOF
3889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3890 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3891 rm -rf conftest*
3892 ac_cv_type_pid_t=yes
3893 else
3894 rm -rf conftest*
3895 ac_cv_type_pid_t=no
3896 fi
3897 rm -f conftest*
3898
3899 fi
3900 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3901 if test $ac_cv_type_pid_t = no; then
3902 cat >> confdefs.h <<\EOF
3903 #define pid_t int
3904 EOF
3905
3906 fi
3907
3908 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3909 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3910 echo "configure:3911: checking for vfork.h" >&5
3911 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3912 echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914 cat > conftest.$ac_ext <<EOF
3915 #line 3916 "configure"
3916 #include "confdefs.h"
3917 #include <vfork.h>
3918 EOF
3919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3920 { (eval echo configure:3921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3922 if test -z "$ac_err"; then
3923 rm -rf conftest*
3924 eval "ac_cv_header_$ac_safe=yes"
3925 else
3926 echo "$ac_err" >&5
3927 echo "configure: failed program was:" >&5
3928 cat conftest.$ac_ext >&5
3929 rm -rf conftest*
3930 eval "ac_cv_header_$ac_safe=no"
3931 fi
3932 rm -f conftest*
3933 fi
3934 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3935 echo "$ac_t""yes" 1>&6
3936 cat >> confdefs.h <<\EOF
3937 #define HAVE_VFORK_H 1
3938 EOF
3939
3940 else
3941 echo "$ac_t""no" 1>&6
3942 fi
3943
3944 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3945 echo "configure:3946: checking for working vfork" >&5
3946 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3947 echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949 if test "$cross_compiling" = yes; then
3950 echo $ac_n "checking for vfork""... $ac_c" 1>&6
3951 echo "configure:3952: checking for vfork" >&5
3952 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3953 echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955 cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958 /* System header to define __stub macros and hopefully few prototypes,
3959 which can conflict with char vfork(); below. */
3960 #include <assert.h>
3961 /* Override any gcc2 internal prototype to avoid an error. */
3962 /* We use char because int might match the return type of a gcc2
3963 builtin and then its argument prototype would still apply. */
3964 char vfork();
3965
3966 int main() {
3967
3968 /* The GNU C library defines this for functions which it implements
3969 to always fail with ENOSYS. Some functions are actually named
3970 something starting with __ and the normal name is an alias. */
3971 #if defined (__stub_vfork) || defined (__stub___vfork)
3972 choke me
3973 #else
3974 vfork();
3975 #endif
3976
3977 ; return 0; }
3978 EOF
3979 if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3980 rm -rf conftest*
3981 eval "ac_cv_func_vfork=yes"
3982 else
3983 echo "configure: failed program was:" >&5
3984 cat conftest.$ac_ext >&5
3985 rm -rf conftest*
3986 eval "ac_cv_func_vfork=no"
3987 fi
3988 rm -f conftest*
3989 fi
3990
3991 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3992 echo "$ac_t""yes" 1>&6
3993 :
3994 else
3995 echo "$ac_t""no" 1>&6
3996 fi
3997
3998 ac_cv_func_vfork_works=$ac_cv_func_vfork
3999 else
4000 cat > conftest.$ac_ext <<EOF
4001 #line 4002 "configure"
4002 #include "confdefs.h"
4003 /* Thanks to Paul Eggert for this test. */
4004 #include <stdio.h>
4005 #include <sys/types.h>
4006 #include <sys/stat.h>
4007 #ifdef HAVE_UNISTD_H
4008 #include <unistd.h>
4009 #endif
4010 #ifdef HAVE_VFORK_H
4011 #include <vfork.h>
4012 #endif
4013 /* On some sparc systems, changes by the child to local and incoming
4014 argument registers are propagated back to the parent.
4015 The compiler is told about this with #include <vfork.h>,
4016 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4017 Test for this by using a static variable whose address
4018 is put into a register that is clobbered by the vfork. */
4019 static
4020 #ifdef __cplusplus
4021 sparc_address_test (int arg)
4022 #else
4023 sparc_address_test (arg) int arg;
4024 #endif
4025 {
4026 static pid_t child;
4027 if (!child) {
4028 child = vfork ();
4029 if (child < 0) {
4030 perror ("vfork");
4031 _exit(2);
4032 }
4033 if (!child) {
4034 arg = getpid();
4035 write(-1, "", 0);
4036 _exit (arg);
4037 }
4038 }
4039 }
4040 main() {
4041 pid_t parent = getpid ();
4042 pid_t child;
4043
4044 sparc_address_test ();
4045
4046 child = vfork ();
4047
4048 if (child == 0) {
4049 /* Here is another test for sparc vfork register problems.
4050 This test uses lots of local variables, at least
4051 as many local variables as main has allocated so far
4052 including compiler temporaries. 4 locals are enough for
4053 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4054 A buggy compiler should reuse the register of parent
4055 for one of the local variables, since it will think that
4056 parent can't possibly be used any more in this routine.
4057 Assigning to the local variable will thus munge parent
4058 in the parent process. */
4059 pid_t
4060 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4061 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4062 /* Convince the compiler that p..p7 are live; otherwise, it might
4063 use the same hardware register for all 8 local variables. */
4064 if (p != p1 || p != p2 || p != p3 || p != p4
4065 || p != p5 || p != p6 || p != p7)
4066 _exit(1);
4067
4068 /* On some systems (e.g. IRIX 3.3),
4069 vfork doesn't separate parent from child file descriptors.
4070 If the child closes a descriptor before it execs or exits,
4071 this munges the parent's descriptor as well.
4072 Test for this by closing stdout in the child. */
4073 _exit(close(fileno(stdout)) != 0);
4074 } else {
4075 int status;
4076 struct stat st;
4077
4078 while (wait(&status) != child)
4079 ;
4080 exit(
4081 /* Was there some problem with vforking? */
4082 child < 0
4083
4084 /* Did the child fail? (This shouldn't happen.) */
4085 || status
4086
4087 /* Did the vfork/compiler bug occur? */
4088 || parent != getpid()
4089
4090 /* Did the file descriptor bug occur? */
4091 || fstat(fileno(stdout), &st) != 0
4092 );
4093 }
4094 }
4095 EOF
4096 if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4097 then
4098 ac_cv_func_vfork_works=yes
4099 else
4100 echo "configure: failed program was:" >&5
4101 cat conftest.$ac_ext >&5
4102 rm -fr conftest*
4103 ac_cv_func_vfork_works=no
4104 fi
4105 rm -fr conftest*
4106 fi
4107
4108 fi
4109
4110 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4111 if test $ac_cv_func_vfork_works = no; then
4112 cat >> confdefs.h <<\EOF
4113 #define vfork fork
4114 EOF
4115
4116 fi
4117
4118 if test "$cross_compiling" = no; then
4119 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4120 echo "configure:4121: checking whether setpgrp takes no argument" >&5
4121 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4122 echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124 if test "$cross_compiling" = yes; then
4125 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4126 else
4127 cat > conftest.$ac_ext <<EOF
4128 #line 4129 "configure"
4129 #include "confdefs.h"
4130
4131 #ifdef HAVE_UNISTD_H
4132 #include <unistd.h>
4133 #endif
4134
4135 /*
4136 * If this system has a BSD-style setpgrp, which takes arguments, exit
4137 * successfully.
4138 */
4139 main()
4140 {
4141 if (setpgrp(1,1) == -1)
4142 exit(0);
4143 else
4144 exit(1);
4145 }
4146
4147 EOF
4148 if { (eval echo configure:4149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4149 then
4150 ac_cv_func_setpgrp_void=no
4151 else
4152 echo "configure: failed program was:" >&5
4153 cat conftest.$ac_ext >&5
4154 rm -fr conftest*
4155 ac_cv_func_setpgrp_void=yes
4156 fi
4157 rm -fr conftest*
4158 fi
4159
4160
4161 fi
4162
4163 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4164 if test $ac_cv_func_setpgrp_void = yes; then
4165 cat >> confdefs.h <<\EOF
4166 #define SETPGRP_VOID 1
4167 EOF
4168
4169 fi
4170
4171 else
4172 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4173 echo "configure:4174: checking whether setpgrp takes no argument" >&5
4174 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4175 echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177 cat > conftest.$ac_ext <<EOF
4178 #line 4179 "configure"
4179 #include "confdefs.h"
4180
4181 #include <unistd.h>
4182
4183 int main() {
4184
4185 if (setpgrp(1,1) == -1)
4186 exit (0);
4187 else
4188 exit (1);
4189
4190 ; return 0; }
4191 EOF
4192 if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193 rm -rf conftest*
4194 ac_cv_func_setpgrp_void=no
4195 else
4196 echo "configure: failed program was:" >&5
4197 cat conftest.$ac_ext >&5
4198 rm -rf conftest*
4199 ac_cv_func_setpgrp_void=yes
4200 fi
4201 rm -f conftest*
4202 fi
4203
4204 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4205 if test $ac_cv_func_setpgrp_void = yes; then
4206 cat >> confdefs.h <<\EOF
4207 #define SETPGRP_VOID 1
4208 EOF
4209
4210 fi
4211 fi
4212
4213 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
4214 # since sigsetjmp might only be defined as a macro.
4215 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
4216 echo "configure:4217: checking for sigsetjmp" >&5
4217 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4218 echo $ac_n "(cached) $ac_c" 1>&6
4219 else
4220 cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223
4224 #include <setjmp.h>
4225
4226 int main() {
4227 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4228 ; return 0; }
4229 EOF
4230 if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4231 rm -rf conftest*
4232 gdb_cv_func_sigsetjmp=yes
4233 else
4234 echo "configure: failed program was:" >&5
4235 cat conftest.$ac_ext >&5
4236 rm -rf conftest*
4237 gdb_cv_func_sigsetjmp=no
4238 fi
4239 rm -f conftest*
4240 fi
4241
4242 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4243 if test $gdb_cv_func_sigsetjmp = yes; then
4244 cat >> confdefs.h <<\EOF
4245 #define HAVE_SIGSETJMP 1
4246 EOF
4247
4248 fi
4249
4250 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
4251 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4252 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
4253 echo "configure:4254: checking for r_fs in struct reg" >&5
4254 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
4255 echo $ac_n "(cached) $ac_c" 1>&6
4256 else
4257 cat > conftest.$ac_ext <<EOF
4258 #line 4259 "configure"
4259 #include "confdefs.h"
4260 #include <machine/reg.h>
4261 int main() {
4262 struct reg r; r.r_fs;
4263 ; return 0; }
4264 EOF
4265 if { (eval echo configure:4266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4266 rm -rf conftest*
4267 gdb_cv_struct_reg_r_fs=yes
4268 else
4269 echo "configure: failed program was:" >&5
4270 cat conftest.$ac_ext >&5
4271 rm -rf conftest*
4272 gdb_cv_struct_reg_r_fs=no
4273 fi
4274 rm -f conftest*
4275 fi
4276
4277 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4278 if test $gdb_cv_struct_reg_r_fs = yes; then
4279 cat >> confdefs.h <<\EOF
4280 #define HAVE_STRUCT_REG_R_FS 1
4281 EOF
4282
4283 fi
4284 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
4285 echo "configure:4286: checking for r_gs in struct reg" >&5
4286 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289 cat > conftest.$ac_ext <<EOF
4290 #line 4291 "configure"
4291 #include "confdefs.h"
4292 #include <machine/reg.h>
4293 int main() {
4294 struct reg r; r.r_gs;
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4298 rm -rf conftest*
4299 gdb_cv_struct_reg_r_gs=yes
4300 else
4301 echo "configure: failed program was:" >&5
4302 cat conftest.$ac_ext >&5
4303 rm -rf conftest*
4304 gdb_cv_struct_reg_r_gs=no
4305 fi
4306 rm -f conftest*
4307 fi
4308
4309 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4310 if test $gdb_cv_struct_reg_r_gs = yes; then
4311 cat >> confdefs.h <<\EOF
4312 #define HAVE_STRUCT_REG_R_GS 1
4313 EOF
4314
4315 fi
4316
4317 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
4318 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
4319 echo "configure:4320: checking for PTRACE_GETREGS" >&5
4320 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4321 echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323 cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/ptrace.h>
4327 int main() {
4328 PTRACE_GETREGS;
4329 ; return 0; }
4330 EOF
4331 if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4332 rm -rf conftest*
4333 gdb_cv_have_ptrace_getregs=yes
4334 else
4335 echo "configure: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 rm -rf conftest*
4338 gdb_cv_have_ptrace_getregs=no
4339 fi
4340 rm -f conftest*
4341 fi
4342
4343 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
4344 if test $gdb_cv_have_ptrace_getregs = yes; then
4345 cat >> confdefs.h <<\EOF
4346 #define HAVE_PTRACE_GETREGS 1
4347 EOF
4348
4349 fi
4350
4351 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
4352 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
4353 echo "configure:4354: checking for PTRACE_GETFPXREGS" >&5
4354 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
4355 echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 #include <sys/ptrace.h>
4361 int main() {
4362 PTRACE_GETFPXREGS;
4363 ; return 0; }
4364 EOF
4365 if { (eval echo configure:4366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4366 rm -rf conftest*
4367 gdb_cv_have_ptrace_getfpxregs=yes
4368 else
4369 echo "configure: failed program was:" >&5
4370 cat conftest.$ac_ext >&5
4371 rm -rf conftest*
4372 gdb_cv_have_ptrace_getfpxregs=no
4373 fi
4374 rm -f conftest*
4375 fi
4376
4377 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4378 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
4379 cat >> confdefs.h <<\EOF
4380 #define HAVE_PTRACE_GETFPXREGS 1
4381 EOF
4382
4383 fi
4384
4385 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4386 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
4387 echo "configure:4388: checking for PT_GETDBREGS" >&5
4388 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
4389 echo $ac_n "(cached) $ac_c" 1>&6
4390 else
4391 cat > conftest.$ac_ext <<EOF
4392 #line 4393 "configure"
4393 #include "confdefs.h"
4394 #include <sys/types.h>
4395 #include <sys/ptrace.h>
4396 int main() {
4397 PT_GETDBREGS;
4398 ; return 0; }
4399 EOF
4400 if { (eval echo configure:4401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4401 rm -rf conftest*
4402 gdb_cv_have_pt_getdbregs=yes
4403 else
4404 echo "configure: failed program was:" >&5
4405 cat conftest.$ac_ext >&5
4406 rm -rf conftest*
4407 gdb_cv_have_pt_getdbregs=no
4408 fi
4409 rm -f conftest*
4410 fi
4411
4412 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4413 if test $gdb_cv_have_pt_getdbregs = yes; then
4414 cat >> confdefs.h <<\EOF
4415 #define HAVE_PT_GETDBREGS 1
4416 EOF
4417
4418 fi
4419
4420
4421 echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
4422 echo "configure:4423: checking for socketpair in -lsocket" >&5
4423 ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
4424 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4425 echo $ac_n "(cached) $ac_c" 1>&6
4426 else
4427 ac_save_LIBS="$LIBS"
4428 LIBS="-lsocket $LIBS"
4429 cat > conftest.$ac_ext <<EOF
4430 #line 4431 "configure"
4431 #include "confdefs.h"
4432 /* Override any gcc2 internal prototype to avoid an error. */
4433 /* We use char because int might match the return type of a gcc2
4434 builtin and then its argument prototype would still apply. */
4435 char socketpair();
4436
4437 int main() {
4438 socketpair()
4439 ; return 0; }
4440 EOF
4441 if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4442 rm -rf conftest*
4443 eval "ac_cv_lib_$ac_lib_var=yes"
4444 else
4445 echo "configure: failed program was:" >&5
4446 cat conftest.$ac_ext >&5
4447 rm -rf conftest*
4448 eval "ac_cv_lib_$ac_lib_var=no"
4449 fi
4450 rm -f conftest*
4451 LIBS="$ac_save_LIBS"
4452
4453 fi
4454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4455 echo "$ac_t""yes" 1>&6
4456 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4457 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4458 cat >> confdefs.h <<EOF
4459 #define $ac_tr_lib 1
4460 EOF
4461
4462 LIBS="-lsocket $LIBS"
4463
4464 else
4465 echo "$ac_t""no" 1>&6
4466 fi
4467
4468 for ac_func in socketpair
4469 do
4470 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4471 echo "configure:4472: checking for $ac_func" >&5
4472 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4473 echo $ac_n "(cached) $ac_c" 1>&6
4474 else
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4478 /* System header to define __stub macros and hopefully few prototypes,
4479 which can conflict with char $ac_func(); below. */
4480 #include <assert.h>
4481 /* Override any gcc2 internal prototype to avoid an error. */
4482 /* We use char because int might match the return type of a gcc2
4483 builtin and then its argument prototype would still apply. */
4484 char $ac_func();
4485
4486 int main() {
4487
4488 /* The GNU C library defines this for functions which it implements
4489 to always fail with ENOSYS. Some functions are actually named
4490 something starting with __ and the normal name is an alias. */
4491 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4492 choke me
4493 #else
4494 $ac_func();
4495 #endif
4496
4497 ; return 0; }
4498 EOF
4499 if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4500 rm -rf conftest*
4501 eval "ac_cv_func_$ac_func=yes"
4502 else
4503 echo "configure: failed program was:" >&5
4504 cat conftest.$ac_ext >&5
4505 rm -rf conftest*
4506 eval "ac_cv_func_$ac_func=no"
4507 fi
4508 rm -f conftest*
4509 fi
4510
4511 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4512 echo "$ac_t""yes" 1>&6
4513 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4514 cat >> confdefs.h <<EOF
4515 #define $ac_tr_func 1
4516 EOF
4517
4518 else
4519 echo "$ac_t""no" 1>&6
4520 fi
4521 done
4522
4523
4524
4525 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4526 echo "configure:4527: checking whether malloc must be declared" >&5
4527 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4528 echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530 cat > conftest.$ac_ext <<EOF
4531 #line 4532 "configure"
4532 #include "confdefs.h"
4533
4534 #include <stdio.h>
4535 #ifdef HAVE_STRING_H
4536 #include <string.h>
4537 #else
4538 #ifdef HAVE_STRINGS_H
4539 #include <strings.h>
4540 #endif
4541 #endif
4542 #ifdef HAVE_STDLIB_H
4543 #include <stdlib.h>
4544 #endif
4545 #ifdef HAVE_UNISTD_H
4546 #include <unistd.h>
4547 #endif
4548 int main() {
4549 char *(*pfn) = (char *(*)) malloc
4550 ; return 0; }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4553 rm -rf conftest*
4554 bfd_cv_decl_needed_malloc=no
4555 else
4556 echo "configure: failed program was:" >&5
4557 cat conftest.$ac_ext >&5
4558 rm -rf conftest*
4559 bfd_cv_decl_needed_malloc=yes
4560 fi
4561 rm -f conftest*
4562 fi
4563
4564 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4565 if test $bfd_cv_decl_needed_malloc = yes; then
4566 cat >> confdefs.h <<\EOF
4567 #define NEED_DECLARATION_MALLOC 1
4568 EOF
4569
4570 fi
4571
4572 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4573 echo "configure:4574: checking whether realloc must be declared" >&5
4574 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4575 echo $ac_n "(cached) $ac_c" 1>&6
4576 else
4577 cat > conftest.$ac_ext <<EOF
4578 #line 4579 "configure"
4579 #include "confdefs.h"
4580
4581 #include <stdio.h>
4582 #ifdef HAVE_STRING_H
4583 #include <string.h>
4584 #else
4585 #ifdef HAVE_STRINGS_H
4586 #include <strings.h>
4587 #endif
4588 #endif
4589 #ifdef HAVE_STDLIB_H
4590 #include <stdlib.h>
4591 #endif
4592 #ifdef HAVE_UNISTD_H
4593 #include <unistd.h>
4594 #endif
4595 int main() {
4596 char *(*pfn) = (char *(*)) realloc
4597 ; return 0; }
4598 EOF
4599 if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4600 rm -rf conftest*
4601 bfd_cv_decl_needed_realloc=no
4602 else
4603 echo "configure: failed program was:" >&5
4604 cat conftest.$ac_ext >&5
4605 rm -rf conftest*
4606 bfd_cv_decl_needed_realloc=yes
4607 fi
4608 rm -f conftest*
4609 fi
4610
4611 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4612 if test $bfd_cv_decl_needed_realloc = yes; then
4613 cat >> confdefs.h <<\EOF
4614 #define NEED_DECLARATION_REALLOC 1
4615 EOF
4616
4617 fi
4618
4619 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4620 echo "configure:4621: checking whether free must be declared" >&5
4621 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4622 echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624 cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627
4628 #include <stdio.h>
4629 #ifdef HAVE_STRING_H
4630 #include <string.h>
4631 #else
4632 #ifdef HAVE_STRINGS_H
4633 #include <strings.h>
4634 #endif
4635 #endif
4636 #ifdef HAVE_STDLIB_H
4637 #include <stdlib.h>
4638 #endif
4639 #ifdef HAVE_UNISTD_H
4640 #include <unistd.h>
4641 #endif
4642 int main() {
4643 char *(*pfn) = (char *(*)) free
4644 ; return 0; }
4645 EOF
4646 if { (eval echo configure:4647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4647 rm -rf conftest*
4648 bfd_cv_decl_needed_free=no
4649 else
4650 echo "configure: failed program was:" >&5
4651 cat conftest.$ac_ext >&5
4652 rm -rf conftest*
4653 bfd_cv_decl_needed_free=yes
4654 fi
4655 rm -f conftest*
4656 fi
4657
4658 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4659 if test $bfd_cv_decl_needed_free = yes; then
4660 cat >> confdefs.h <<\EOF
4661 #define NEED_DECLARATION_FREE 1
4662 EOF
4663
4664 fi
4665
4666 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
4667 echo "configure:4668: checking whether strerror must be declared" >&5
4668 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
4669 echo $ac_n "(cached) $ac_c" 1>&6
4670 else
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674
4675 #include <stdio.h>
4676 #ifdef HAVE_STRING_H
4677 #include <string.h>
4678 #else
4679 #ifdef HAVE_STRINGS_H
4680 #include <strings.h>
4681 #endif
4682 #endif
4683 #ifdef HAVE_STDLIB_H
4684 #include <stdlib.h>
4685 #endif
4686 #ifdef HAVE_UNISTD_H
4687 #include <unistd.h>
4688 #endif
4689 int main() {
4690 char *(*pfn) = (char *(*)) strerror
4691 ; return 0; }
4692 EOF
4693 if { (eval echo configure:4694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4694 rm -rf conftest*
4695 bfd_cv_decl_needed_strerror=no
4696 else
4697 echo "configure: failed program was:" >&5
4698 cat conftest.$ac_ext >&5
4699 rm -rf conftest*
4700 bfd_cv_decl_needed_strerror=yes
4701 fi
4702 rm -f conftest*
4703 fi
4704
4705 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4706 if test $bfd_cv_decl_needed_strerror = yes; then
4707 cat >> confdefs.h <<\EOF
4708 #define NEED_DECLARATION_STRERROR 1
4709 EOF
4710
4711 fi
4712
4713 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
4714 echo "configure:4715: checking whether strdup must be declared" >&5
4715 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4716 echo $ac_n "(cached) $ac_c" 1>&6
4717 else
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721
4722 #include <stdio.h>
4723 #ifdef HAVE_STRING_H
4724 #include <string.h>
4725 #else
4726 #ifdef HAVE_STRINGS_H
4727 #include <strings.h>
4728 #endif
4729 #endif
4730 #ifdef HAVE_STDLIB_H
4731 #include <stdlib.h>
4732 #endif
4733 #ifdef HAVE_UNISTD_H
4734 #include <unistd.h>
4735 #endif
4736 int main() {
4737 char *(*pfn) = (char *(*)) strdup
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4741 rm -rf conftest*
4742 bfd_cv_decl_needed_strdup=no
4743 else
4744 echo "configure: failed program was:" >&5
4745 cat conftest.$ac_ext >&5
4746 rm -rf conftest*
4747 bfd_cv_decl_needed_strdup=yes
4748 fi
4749 rm -f conftest*
4750 fi
4751
4752 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4753 if test $bfd_cv_decl_needed_strdup = yes; then
4754 cat >> confdefs.h <<\EOF
4755 #define NEED_DECLARATION_STRDUP 1
4756 EOF
4757
4758 fi
4759
4760 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4761 echo "configure:4762: checking whether strstr must be declared" >&5
4762 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4763 echo $ac_n "(cached) $ac_c" 1>&6
4764 else
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768
4769 #include <stdio.h>
4770 #ifdef HAVE_STRING_H
4771 #include <string.h>
4772 #else
4773 #ifdef HAVE_STRINGS_H
4774 #include <strings.h>
4775 #endif
4776 #endif
4777 #ifdef HAVE_STDLIB_H
4778 #include <stdlib.h>
4779 #endif
4780 #ifdef HAVE_UNISTD_H
4781 #include <unistd.h>
4782 #endif
4783 int main() {
4784 char *(*pfn) = (char *(*)) strstr
4785 ; return 0; }
4786 EOF
4787 if { (eval echo configure:4788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4788 rm -rf conftest*
4789 bfd_cv_decl_needed_strstr=no
4790 else
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4793 rm -rf conftest*
4794 bfd_cv_decl_needed_strstr=yes
4795 fi
4796 rm -f conftest*
4797 fi
4798
4799 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4800 if test $bfd_cv_decl_needed_strstr = yes; then
4801 cat >> confdefs.h <<\EOF
4802 #define NEED_DECLARATION_STRSTR 1
4803 EOF
4804
4805 fi
4806
4807
4808
4809 # The following save_state_t checkery is only necessary for HPUX
4810 # versions earlier than 10.20. When those fade from memory, this
4811 # could be expunged. --jsm 1999-03-22
4812
4813 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
4814 echo "configure:4815: checking for HPUX save_state structure" >&5
4815 cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818 #include <machine/save_state.h>
4819 EOF
4820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4821 egrep "save_state_t" >/dev/null 2>&1; then
4822 rm -rf conftest*
4823 gdb_cv_hpux_savestate=yes
4824 else
4825 rm -rf conftest*
4826 gdb_cv_hpux_savestate=no
4827 fi
4828 rm -f conftest*
4829
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 #include <machine/save_state.h>
4834 EOF
4835 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4836 egrep "ss_wide" >/dev/null 2>&1; then
4837 rm -rf conftest*
4838 gdb_cv_hpux_sswide=yes
4839 else
4840 rm -rf conftest*
4841 gdb_cv_hpux_sswide=no
4842 fi
4843 rm -f conftest*
4844
4845 if test $gdb_cv_hpux_savestate = yes
4846 then
4847 cat >> confdefs.h <<\EOF
4848 #define HAVE_STRUCT_SAVE_STATE_T 1
4849 EOF
4850
4851 fi
4852 if test $gdb_cv_hpux_sswide = yes
4853 then
4854 cat >> confdefs.h <<\EOF
4855 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
4856 EOF
4857
4858 fi
4859 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4860
4861
4862 # If we are configured native on GNU/Linux, work around problems with
4863 # sys/procfs.h
4864 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
4865
4866 if test "${target}" = "${host}"; then
4867 case "${host}" in
4868 i[3456]86-*-linux*)
4869 cat >> confdefs.h <<\EOF
4870 #define START_INFERIOR_TRAPS_EXPECTED 2
4871 EOF
4872
4873 cat >> confdefs.h <<\EOF
4874 #define sys_quotactl 1
4875 EOF
4876
4877 ;;
4878 ia64-*-aix*)
4879 cat >> confdefs.h <<\EOF
4880 #define NEW_PROC_API 1
4881 EOF
4882
4883 ;;
4884 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
4885 cat >> confdefs.h <<\EOF
4886 #define NEW_PROC_API 1
4887 EOF
4888
4889 ;;
4890 *-*-solaris2.[678])
4891 cat >> confdefs.h <<\EOF
4892 #define NEW_PROC_API 1
4893 EOF
4894
4895 ;;
4896 esac
4897 fi
4898
4899 if test "$ac_cv_header_sys_procfs_h" = yes; then
4900 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
4901 echo "configure:4902: checking for pstatus_t in sys/procfs.h" >&5
4902 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
4903 echo $ac_n "(cached) $ac_c" 1>&6
4904 else
4905 cat > conftest.$ac_ext <<EOF
4906 #line 4907 "configure"
4907 #include "confdefs.h"
4908
4909 #define _SYSCALL32
4910 #include <sys/procfs.h>
4911 int main() {
4912 pstatus_t avar
4913 ; return 0; }
4914 EOF
4915 if { (eval echo configure:4916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4916 rm -rf conftest*
4917 bfd_cv_have_sys_procfs_type_pstatus_t=yes
4918 else
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -rf conftest*
4922 bfd_cv_have_sys_procfs_type_pstatus_t=no
4923
4924 fi
4925 rm -f conftest*
4926 fi
4927
4928 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4929 cat >> confdefs.h <<\EOF
4930 #define HAVE_PSTATUS_T 1
4931 EOF
4932
4933 fi
4934 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4935
4936 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
4937 echo "configure:4938: checking for prrun_t in sys/procfs.h" >&5
4938 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
4939 echo $ac_n "(cached) $ac_c" 1>&6
4940 else
4941 cat > conftest.$ac_ext <<EOF
4942 #line 4943 "configure"
4943 #include "confdefs.h"
4944
4945 #define _SYSCALL32
4946 #include <sys/procfs.h>
4947 int main() {
4948 prrun_t avar
4949 ; return 0; }
4950 EOF
4951 if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4952 rm -rf conftest*
4953 bfd_cv_have_sys_procfs_type_prrun_t=yes
4954 else
4955 echo "configure: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 rm -rf conftest*
4958 bfd_cv_have_sys_procfs_type_prrun_t=no
4959
4960 fi
4961 rm -f conftest*
4962 fi
4963
4964 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
4965 cat >> confdefs.h <<\EOF
4966 #define HAVE_PRRUN_T 1
4967 EOF
4968
4969 fi
4970 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
4971
4972 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
4973 echo "configure:4974: checking for gregset_t in sys/procfs.h" >&5
4974 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
4975 echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977 cat > conftest.$ac_ext <<EOF
4978 #line 4979 "configure"
4979 #include "confdefs.h"
4980
4981 #define _SYSCALL32
4982 #include <sys/procfs.h>
4983 int main() {
4984 gregset_t avar
4985 ; return 0; }
4986 EOF
4987 if { (eval echo configure:4988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4988 rm -rf conftest*
4989 bfd_cv_have_sys_procfs_type_gregset_t=yes
4990 else
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4993 rm -rf conftest*
4994 bfd_cv_have_sys_procfs_type_gregset_t=no
4995
4996 fi
4997 rm -f conftest*
4998 fi
4999
5000 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5001 cat >> confdefs.h <<\EOF
5002 #define HAVE_GREGSET_T 1
5003 EOF
5004
5005 fi
5006 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
5007
5008 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
5009 echo "configure:5010: checking for fpregset_t in sys/procfs.h" >&5
5010 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
5011 echo $ac_n "(cached) $ac_c" 1>&6
5012 else
5013 cat > conftest.$ac_ext <<EOF
5014 #line 5015 "configure"
5015 #include "confdefs.h"
5016
5017 #define _SYSCALL32
5018 #include <sys/procfs.h>
5019 int main() {
5020 fpregset_t avar
5021 ; return 0; }
5022 EOF
5023 if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5024 rm -rf conftest*
5025 bfd_cv_have_sys_procfs_type_fpregset_t=yes
5026 else
5027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 rm -rf conftest*
5030 bfd_cv_have_sys_procfs_type_fpregset_t=no
5031
5032 fi
5033 rm -f conftest*
5034 fi
5035
5036 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5037 cat >> confdefs.h <<\EOF
5038 #define HAVE_FPREGSET_T 1
5039 EOF
5040
5041 fi
5042 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5043
5044 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
5045 echo "configure:5046: checking for prgregset_t in sys/procfs.h" >&5
5046 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5047 echo $ac_n "(cached) $ac_c" 1>&6
5048 else
5049 cat > conftest.$ac_ext <<EOF
5050 #line 5051 "configure"
5051 #include "confdefs.h"
5052
5053 #define _SYSCALL32
5054 #include <sys/procfs.h>
5055 int main() {
5056 prgregset_t avar
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5060 rm -rf conftest*
5061 bfd_cv_have_sys_procfs_type_prgregset_t=yes
5062 else
5063 echo "configure: failed program was:" >&5
5064 cat conftest.$ac_ext >&5
5065 rm -rf conftest*
5066 bfd_cv_have_sys_procfs_type_prgregset_t=no
5067
5068 fi
5069 rm -f conftest*
5070 fi
5071
5072 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5073 cat >> confdefs.h <<\EOF
5074 #define HAVE_PRGREGSET_T 1
5075 EOF
5076
5077 fi
5078 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5079
5080 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
5081 echo "configure:5082: checking for prfpregset_t in sys/procfs.h" >&5
5082 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5083 echo $ac_n "(cached) $ac_c" 1>&6
5084 else
5085 cat > conftest.$ac_ext <<EOF
5086 #line 5087 "configure"
5087 #include "confdefs.h"
5088
5089 #define _SYSCALL32
5090 #include <sys/procfs.h>
5091 int main() {
5092 prfpregset_t avar
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5096 rm -rf conftest*
5097 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5098 else
5099 echo "configure: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5101 rm -rf conftest*
5102 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5103
5104 fi
5105 rm -f conftest*
5106 fi
5107
5108 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5109 cat >> confdefs.h <<\EOF
5110 #define HAVE_PRFPREGSET_T 1
5111 EOF
5112
5113 fi
5114 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5115
5116 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
5117 echo "configure:5118: checking for prgregset32_t in sys/procfs.h" >&5
5118 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
5120 else
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124
5125 #define _SYSCALL32
5126 #include <sys/procfs.h>
5127 int main() {
5128 prgregset32_t avar
5129 ; return 0; }
5130 EOF
5131 if { (eval echo configure:5132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5132 rm -rf conftest*
5133 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5134 else
5135 echo "configure: failed program was:" >&5
5136 cat conftest.$ac_ext >&5
5137 rm -rf conftest*
5138 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5139
5140 fi
5141 rm -f conftest*
5142 fi
5143
5144 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5145 cat >> confdefs.h <<\EOF
5146 #define HAVE_PRGREGSET32_T 1
5147 EOF
5148
5149 fi
5150 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5151
5152 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
5153 echo "configure:5154: checking for prfpregset32_t in sys/procfs.h" >&5
5154 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5155 echo $ac_n "(cached) $ac_c" 1>&6
5156 else
5157 cat > conftest.$ac_ext <<EOF
5158 #line 5159 "configure"
5159 #include "confdefs.h"
5160
5161 #define _SYSCALL32
5162 #include <sys/procfs.h>
5163 int main() {
5164 prfpregset32_t avar
5165 ; return 0; }
5166 EOF
5167 if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5168 rm -rf conftest*
5169 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5170 else
5171 echo "configure: failed program was:" >&5
5172 cat conftest.$ac_ext >&5
5173 rm -rf conftest*
5174 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5175
5176 fi
5177 rm -f conftest*
5178 fi
5179
5180 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5181 cat >> confdefs.h <<\EOF
5182 #define HAVE_PRFPREGSET32_T 1
5183 EOF
5184
5185 fi
5186 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5187
5188 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
5189 echo "configure:5190: checking for lwpid_t in sys/procfs.h" >&5
5190 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5191 echo $ac_n "(cached) $ac_c" 1>&6
5192 else
5193 cat > conftest.$ac_ext <<EOF
5194 #line 5195 "configure"
5195 #include "confdefs.h"
5196
5197 #define _SYSCALL32
5198 #include <sys/procfs.h>
5199 int main() {
5200 lwpid_t avar
5201 ; return 0; }
5202 EOF
5203 if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5204 rm -rf conftest*
5205 bfd_cv_have_sys_procfs_type_lwpid_t=yes
5206 else
5207 echo "configure: failed program was:" >&5
5208 cat conftest.$ac_ext >&5
5209 rm -rf conftest*
5210 bfd_cv_have_sys_procfs_type_lwpid_t=no
5211
5212 fi
5213 rm -f conftest*
5214 fi
5215
5216 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5217 cat >> confdefs.h <<\EOF
5218 #define HAVE_LWPID_T 1
5219 EOF
5220
5221 fi
5222 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5223
5224 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
5225 echo "configure:5226: checking for psaddr_t in sys/procfs.h" >&5
5226 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232
5233 #define _SYSCALL32
5234 #include <sys/procfs.h>
5235 int main() {
5236 psaddr_t avar
5237 ; return 0; }
5238 EOF
5239 if { (eval echo configure:5240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5240 rm -rf conftest*
5241 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5242 else
5243 echo "configure: failed program was:" >&5
5244 cat conftest.$ac_ext >&5
5245 rm -rf conftest*
5246 bfd_cv_have_sys_procfs_type_psaddr_t=no
5247
5248 fi
5249 rm -f conftest*
5250 fi
5251
5252 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5253 cat >> confdefs.h <<\EOF
5254 #define HAVE_PSADDR_T 1
5255 EOF
5256
5257 fi
5258 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5259
5260 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
5261 echo "configure:5262: checking for prsysent_t in sys/procfs.h" >&5
5262 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5263 echo $ac_n "(cached) $ac_c" 1>&6
5264 else
5265 cat > conftest.$ac_ext <<EOF
5266 #line 5267 "configure"
5267 #include "confdefs.h"
5268
5269 #define _SYSCALL32
5270 #include <sys/procfs.h>
5271 int main() {
5272 prsysent_t avar
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5276 rm -rf conftest*
5277 bfd_cv_have_sys_procfs_type_prsysent_t=yes
5278 else
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 bfd_cv_have_sys_procfs_type_prsysent_t=no
5283
5284 fi
5285 rm -f conftest*
5286 fi
5287
5288 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5289 cat >> confdefs.h <<\EOF
5290 #define HAVE_PRSYSENT_T 1
5291 EOF
5292
5293 fi
5294 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5295
5296 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
5297 echo "configure:5298: checking for pr_sigset_t in sys/procfs.h" >&5
5298 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5299 echo $ac_n "(cached) $ac_c" 1>&6
5300 else
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304
5305 #define _SYSCALL32
5306 #include <sys/procfs.h>
5307 int main() {
5308 pr_sigset_t avar
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312 rm -rf conftest*
5313 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5314 else
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
5318 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5319
5320 fi
5321 rm -f conftest*
5322 fi
5323
5324 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5325 cat >> confdefs.h <<\EOF
5326 #define HAVE_PR_SIGSET_T 1
5327 EOF
5328
5329 fi
5330 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5331
5332 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
5333 echo "configure:5334: checking for pr_sigaction64_t in sys/procfs.h" >&5
5334 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
5335 echo $ac_n "(cached) $ac_c" 1>&6
5336 else
5337 cat > conftest.$ac_ext <<EOF
5338 #line 5339 "configure"
5339 #include "confdefs.h"
5340
5341 #define _SYSCALL32
5342 #include <sys/procfs.h>
5343 int main() {
5344 pr_sigaction64_t avar
5345 ; return 0; }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5348 rm -rf conftest*
5349 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5350 else
5351 echo "configure: failed program was:" >&5
5352 cat conftest.$ac_ext >&5
5353 rm -rf conftest*
5354 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5355
5356 fi
5357 rm -f conftest*
5358 fi
5359
5360 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5361 cat >> confdefs.h <<\EOF
5362 #define HAVE_PR_SIGACTION64_T 1
5363 EOF
5364
5365 fi
5366 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5367
5368 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
5369 echo "configure:5370: checking for pr_siginfo64_t in sys/procfs.h" >&5
5370 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5371 echo $ac_n "(cached) $ac_c" 1>&6
5372 else
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376
5377 #define _SYSCALL32
5378 #include <sys/procfs.h>
5379 int main() {
5380 pr_siginfo64_t avar
5381 ; return 0; }
5382 EOF
5383 if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5384 rm -rf conftest*
5385 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5386 else
5387 echo "configure: failed program was:" >&5
5388 cat conftest.$ac_ext >&5
5389 rm -rf conftest*
5390 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5391
5392 fi
5393 rm -f conftest*
5394 fi
5395
5396 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5397 cat >> confdefs.h <<\EOF
5398 #define HAVE_PR_SIGINFO64_T 1
5399 EOF
5400
5401 fi
5402 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5403
5404
5405
5406
5407
5408 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5409 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
5410 echo "configure:5411: checking whether prfpregset_t type is broken" >&5
5411 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5412 echo $ac_n "(cached) $ac_c" 1>&6
5413 else
5414 if test "$cross_compiling" = yes; then
5415 gdb_cv_prfpregset_t_broken=yes
5416 else
5417 cat > conftest.$ac_ext <<EOF
5418 #line 5419 "configure"
5419 #include "confdefs.h"
5420 #include <sys/procfs.h>
5421 int main ()
5422 {
5423 if (sizeof (prfpregset_t) == sizeof (void *))
5424 return 1;
5425 return 0;
5426 }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5429 then
5430 gdb_cv_prfpregset_t_broken=no
5431 else
5432 echo "configure: failed program was:" >&5
5433 cat conftest.$ac_ext >&5
5434 rm -fr conftest*
5435 gdb_cv_prfpregset_t_broken=yes
5436 fi
5437 rm -fr conftest*
5438 fi
5439
5440 fi
5441
5442 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5443 if test $gdb_cv_prfpregset_t_broken = yes; then
5444 cat >> confdefs.h <<\EOF
5445 #define PRFPREGSET_T_BROKEN 1
5446 EOF
5447
5448 fi
5449 fi
5450
5451
5452 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
5453 echo "configure:5454: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
5454 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5455 echo $ac_n "(cached) $ac_c" 1>&6
5456 else
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460 #include <unistd.h>
5461 #include <sys/types.h>
5462 #include <sys/procfs.h>
5463
5464 int main() {
5465
5466 int dummy;;
5467 dummy = ioctl(0, PIOCSET, &dummy);
5468
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5472 rm -rf conftest*
5473 gdb_cv_have_procfs_piocset=yes
5474 else
5475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 rm -rf conftest*
5478 gdb_cv_have_procfs_piocset=no
5479 fi
5480 rm -f conftest*
5481 fi
5482
5483 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5484 if test $gdb_cv_have_procfs_piocset = yes; then
5485 cat >> confdefs.h <<\EOF
5486 #define HAVE_PROCFS_PIOCSET 1
5487 EOF
5488
5489 fi
5490 fi
5491
5492 if test ${host} = ${target} ; then
5493
5494 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
5495 echo "configure:5496: checking for member l_addr in struct link_map" >&5
5496 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5497 echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499 cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 #include <link.h>
5503 int main() {
5504 struct link_map lm; (void) lm.l_addr;
5505 ; return 0; }
5506 EOF
5507 if { (eval echo configure:5508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5508 rm -rf conftest*
5509 gdb_cv_have_struct_link_map_with_l_members=yes
5510 else
5511 echo "configure: failed program was:" >&5
5512 cat conftest.$ac_ext >&5
5513 rm -rf conftest*
5514 gdb_cv_have_struct_link_map_with_l_members=no
5515 fi
5516 rm -f conftest*
5517 fi
5518
5519 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5520 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5521 cat >> confdefs.h <<\EOF
5522 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5523 EOF
5524
5525 fi
5526
5527
5528 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
5529 echo "configure:5530: checking for member lm_addr in struct link_map" >&5
5530 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5531 echo $ac_n "(cached) $ac_c" 1>&6
5532 else
5533 cat > conftest.$ac_ext <<EOF
5534 #line 5535 "configure"
5535 #include "confdefs.h"
5536 #include <sys/types.h>
5537 #include <link.h>
5538 int main() {
5539 struct link_map lm; (void) lm.lm_addr;
5540 ; return 0; }
5541 EOF
5542 if { (eval echo configure:5543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5543 rm -rf conftest*
5544 gdb_cv_have_struct_link_map_with_lm_members=yes
5545 else
5546 echo "configure: failed program was:" >&5
5547 cat conftest.$ac_ext >&5
5548 rm -rf conftest*
5549 gdb_cv_have_struct_link_map_with_lm_members=no
5550 fi
5551 rm -f conftest*
5552 fi
5553
5554 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
5555 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
5556 cat >> confdefs.h <<\EOF
5557 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
5558 EOF
5559
5560 fi
5561
5562
5563 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
5564 echo "configure:5565: checking for member som_addr in struct so_map" >&5
5565 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
5566 echo $ac_n "(cached) $ac_c" 1>&6
5567 else
5568 cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571 #include <sys/types.h>
5572 #ifdef HAVE_NLIST_H
5573 #include <nlist.h>
5574 #endif
5575 #include <link.h>
5576 int main() {
5577 struct so_map lm; (void) lm.som_addr;
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5581 rm -rf conftest*
5582 gdb_cv_have_struct_so_map_with_som_members=yes
5583 else
5584 echo "configure: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5586 rm -rf conftest*
5587 gdb_cv_have_struct_so_map_with_som_members=no
5588 fi
5589 rm -f conftest*
5590 fi
5591
5592 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
5593 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
5594 cat >> confdefs.h <<\EOF
5595 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
5596 EOF
5597
5598 fi
5599
5600
5601 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
5602 echo "configure:5603: checking for struct link_map32 in sys/link.h" >&5
5603 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
5604 echo $ac_n "(cached) $ac_c" 1>&6
5605 else
5606 cat > conftest.$ac_ext <<EOF
5607 #line 5608 "configure"
5608 #include "confdefs.h"
5609 #define _SYSCALL32
5610 #include <sys/link.h>
5611 int main() {
5612 struct link_map32 l;
5613 ; return 0; }
5614 EOF
5615 if { (eval echo configure:5616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5616 rm -rf conftest*
5617 gdb_cv_have_struct_link_map32=yes
5618 else
5619 echo "configure: failed program was:" >&5
5620 cat conftest.$ac_ext >&5
5621 rm -rf conftest*
5622 gdb_cv_have_struct_link_map32=no
5623 fi
5624 rm -f conftest*
5625 fi
5626
5627 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
5628 if test $gdb_cv_have_struct_link_map32 = yes; then
5629 cat >> confdefs.h <<\EOF
5630 #define HAVE_STRUCT_LINK_MAP32 1
5631 EOF
5632
5633 fi
5634 fi
5635
5636 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5637 echo "configure:5638: checking for main in -lm" >&5
5638 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5639 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5640 echo $ac_n "(cached) $ac_c" 1>&6
5641 else
5642 ac_save_LIBS="$LIBS"
5643 LIBS="-lm $LIBS"
5644 cat > conftest.$ac_ext <<EOF
5645 #line 5646 "configure"
5646 #include "confdefs.h"
5647
5648 int main() {
5649 main()
5650 ; return 0; }
5651 EOF
5652 if { (eval echo configure:5653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5653 rm -rf conftest*
5654 eval "ac_cv_lib_$ac_lib_var=yes"
5655 else
5656 echo "configure: failed program was:" >&5
5657 cat conftest.$ac_ext >&5
5658 rm -rf conftest*
5659 eval "ac_cv_lib_$ac_lib_var=no"
5660 fi
5661 rm -f conftest*
5662 LIBS="$ac_save_LIBS"
5663
5664 fi
5665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5666 echo "$ac_t""yes" 1>&6
5667 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5668 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5669 cat >> confdefs.h <<EOF
5670 #define $ac_tr_lib 1
5671 EOF
5672
5673 LIBS="-lm $LIBS"
5674
5675 else
5676 echo "$ac_t""no" 1>&6
5677 fi
5678
5679
5680 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
5681 echo "configure:5682: checking for wctype in -lc" >&5
5682 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
5683 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5684 echo $ac_n "(cached) $ac_c" 1>&6
5685 else
5686 ac_save_LIBS="$LIBS"
5687 LIBS="-lc $LIBS"
5688 cat > conftest.$ac_ext <<EOF
5689 #line 5690 "configure"
5690 #include "confdefs.h"
5691 /* Override any gcc2 internal prototype to avoid an error. */
5692 /* We use char because int might match the return type of a gcc2
5693 builtin and then its argument prototype would still apply. */
5694 char wctype();
5695
5696 int main() {
5697 wctype()
5698 ; return 0; }
5699 EOF
5700 if { (eval echo configure:5701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5701 rm -rf conftest*
5702 eval "ac_cv_lib_$ac_lib_var=yes"
5703 else
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5706 rm -rf conftest*
5707 eval "ac_cv_lib_$ac_lib_var=no"
5708 fi
5709 rm -f conftest*
5710 LIBS="$ac_save_LIBS"
5711
5712 fi
5713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5714 echo "$ac_t""yes" 1>&6
5715 :
5716 else
5717 echo "$ac_t""no" 1>&6
5718 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
5719 echo "configure:5720: checking for wctype in -lw" >&5
5720 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5721 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5722 echo $ac_n "(cached) $ac_c" 1>&6
5723 else
5724 ac_save_LIBS="$LIBS"
5725 LIBS="-lw $LIBS"
5726 cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729 /* Override any gcc2 internal prototype to avoid an error. */
5730 /* We use char because int might match the return type of a gcc2
5731 builtin and then its argument prototype would still apply. */
5732 char wctype();
5733
5734 int main() {
5735 wctype()
5736 ; return 0; }
5737 EOF
5738 if { (eval echo configure:5739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5739 rm -rf conftest*
5740 eval "ac_cv_lib_$ac_lib_var=yes"
5741 else
5742 echo "configure: failed program was:" >&5
5743 cat conftest.$ac_ext >&5
5744 rm -rf conftest*
5745 eval "ac_cv_lib_$ac_lib_var=no"
5746 fi
5747 rm -f conftest*
5748 LIBS="$ac_save_LIBS"
5749
5750 fi
5751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5752 echo "$ac_t""yes" 1>&6
5753 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5754 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5755 cat >> confdefs.h <<EOF
5756 #define $ac_tr_lib 1
5757 EOF
5758
5759 LIBS="-lw $LIBS"
5760
5761 else
5762 echo "$ac_t""no" 1>&6
5763 fi
5764
5765 fi
5766
5767
5768
5769 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
5770 echo "configure:5771: checking for long long support in compiler" >&5
5771 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
5772 echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774 cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777
5778 int main() {
5779
5780 extern long long foo;
5781 switch (foo & 2) { case 0: return 1; }
5782
5783 ; return 0; }
5784 EOF
5785 if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5786 rm -rf conftest*
5787 gdb_cv_c_long_long=yes
5788 else
5789 echo "configure: failed program was:" >&5
5790 cat conftest.$ac_ext >&5
5791 rm -rf conftest*
5792 gdb_cv_c_long_long=no
5793 fi
5794 rm -f conftest*
5795 fi
5796
5797 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
5798 if test $gdb_cv_c_long_long = yes; then
5799 cat >> confdefs.h <<\EOF
5800 #define CC_HAS_LONG_LONG 1
5801 EOF
5802
5803 fi
5804
5805
5806 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
5807 echo "configure:5808: checking for long long support in printf" >&5
5808 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
5809 echo $ac_n "(cached) $ac_c" 1>&6
5810 else
5811 if test "$cross_compiling" = yes; then
5812 gdb_cv_printf_has_long_long=no
5813 else
5814 cat > conftest.$ac_ext <<EOF
5815 #line 5816 "configure"
5816 #include "confdefs.h"
5817
5818 int main () {
5819 char buf[32];
5820 long long l = 0;
5821 l = (l << 16) + 0x0123;
5822 l = (l << 16) + 0x4567;
5823 l = (l << 16) + 0x89ab;
5824 l = (l << 16) + 0xcdef;
5825 sprintf (buf, "0x%016llx", l);
5826 return (strcmp ("0x0123456789abcdef", buf));
5827 }
5828 EOF
5829 if { (eval echo configure:5830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5830 then
5831 gdb_cv_printf_has_long_long=yes
5832 else
5833 echo "configure: failed program was:" >&5
5834 cat conftest.$ac_ext >&5
5835 rm -fr conftest*
5836 gdb_cv_printf_has_long_long=no
5837 fi
5838 rm -fr conftest*
5839 fi
5840
5841 fi
5842
5843 if test $gdb_cv_printf_has_long_long = yes; then
5844 cat >> confdefs.h <<\EOF
5845 #define PRINTF_HAS_LONG_LONG 1
5846 EOF
5847
5848 fi
5849 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
5850
5851
5852 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
5853 echo "configure:5854: checking for long double support in compiler" >&5
5854 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
5855 echo $ac_n "(cached) $ac_c" 1>&6
5856 else
5857 cat > conftest.$ac_ext <<EOF
5858 #line 5859 "configure"
5859 #include "confdefs.h"
5860
5861 int main() {
5862 long double foo;
5863 ; return 0; }
5864 EOF
5865 if { (eval echo configure:5866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5866 rm -rf conftest*
5867 ac_cv_c_long_double=yes
5868 else
5869 echo "configure: failed program was:" >&5
5870 cat conftest.$ac_ext >&5
5871 rm -rf conftest*
5872 ac_cv_c_long_double=no
5873 fi
5874 rm -f conftest*
5875 fi
5876
5877 echo "$ac_t""$ac_cv_c_long_double" 1>&6
5878 if test $ac_cv_c_long_double = yes; then
5879 cat >> confdefs.h <<\EOF
5880 #define HAVE_LONG_DOUBLE 1
5881 EOF
5882
5883 fi
5884
5885
5886 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
5887 echo "configure:5888: checking for long double support in printf" >&5
5888 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
5889 echo $ac_n "(cached) $ac_c" 1>&6
5890 else
5891 if test "$cross_compiling" = yes; then
5892 gdb_cv_printf_has_long_double=no
5893 else
5894 cat > conftest.$ac_ext <<EOF
5895 #line 5896 "configure"
5896 #include "confdefs.h"
5897
5898 int main () {
5899 char buf[16];
5900 long double f = 3.141592653;
5901 sprintf (buf, "%Lg", f);
5902 return (strncmp ("3.14159", buf, 7));
5903 }
5904 EOF
5905 if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5906 then
5907 gdb_cv_printf_has_long_double=yes
5908 else
5909 echo "configure: failed program was:" >&5
5910 cat conftest.$ac_ext >&5
5911 rm -fr conftest*
5912 gdb_cv_printf_has_long_double=no
5913 fi
5914 rm -fr conftest*
5915 fi
5916
5917 fi
5918
5919 if test $gdb_cv_printf_has_long_double = yes; then
5920 cat >> confdefs.h <<\EOF
5921 #define PRINTF_HAS_LONG_DOUBLE 1
5922 EOF
5923
5924 fi
5925 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
5926
5927
5928 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
5929 echo "configure:5930: checking for long double support in scanf" >&5
5930 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
5931 echo $ac_n "(cached) $ac_c" 1>&6
5932 else
5933 if test "$cross_compiling" = yes; then
5934 gdb_cv_scanf_has_long_double=no
5935 else
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5939
5940 int main () {
5941 char *buf = "3.141592653";
5942 long double f = 0;
5943 sscanf (buf, "%Lg", &f);
5944 return !(f > 3.14159 && f < 3.14160);
5945 }
5946 EOF
5947 if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5948 then
5949 gdb_cv_scanf_has_long_double=yes
5950 else
5951 echo "configure: failed program was:" >&5
5952 cat conftest.$ac_ext >&5
5953 rm -fr conftest*
5954 gdb_cv_scanf_has_long_double=no
5955 fi
5956 rm -fr conftest*
5957 fi
5958
5959 fi
5960
5961 if test $gdb_cv_scanf_has_long_double = yes; then
5962 cat >> confdefs.h <<\EOF
5963 #define SCANF_HAS_LONG_DOUBLE 1
5964 EOF
5965
5966 fi
5967 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
5968
5969 for ac_hdr in unistd.h
5970 do
5971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5973 echo "configure:5974: checking for $ac_hdr" >&5
5974 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5975 echo $ac_n "(cached) $ac_c" 1>&6
5976 else
5977 cat > conftest.$ac_ext <<EOF
5978 #line 5979 "configure"
5979 #include "confdefs.h"
5980 #include <$ac_hdr>
5981 EOF
5982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5983 { (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5985 if test -z "$ac_err"; then
5986 rm -rf conftest*
5987 eval "ac_cv_header_$ac_safe=yes"
5988 else
5989 echo "$ac_err" >&5
5990 echo "configure: failed program was:" >&5
5991 cat conftest.$ac_ext >&5
5992 rm -rf conftest*
5993 eval "ac_cv_header_$ac_safe=no"
5994 fi
5995 rm -f conftest*
5996 fi
5997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5998 echo "$ac_t""yes" 1>&6
5999 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6000 cat >> confdefs.h <<EOF
6001 #define $ac_tr_hdr 1
6002 EOF
6003
6004 else
6005 echo "$ac_t""no" 1>&6
6006 fi
6007 done
6008
6009 for ac_func in getpagesize
6010 do
6011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6012 echo "configure:6013: checking for $ac_func" >&5
6013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6014 echo $ac_n "(cached) $ac_c" 1>&6
6015 else
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 /* System header to define __stub macros and hopefully few prototypes,
6020 which can conflict with char $ac_func(); below. */
6021 #include <assert.h>
6022 /* Override any gcc2 internal prototype to avoid an error. */
6023 /* We use char because int might match the return type of a gcc2
6024 builtin and then its argument prototype would still apply. */
6025 char $ac_func();
6026
6027 int main() {
6028
6029 /* The GNU C library defines this for functions which it implements
6030 to always fail with ENOSYS. Some functions are actually named
6031 something starting with __ and the normal name is an alias. */
6032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6033 choke me
6034 #else
6035 $ac_func();
6036 #endif
6037
6038 ; return 0; }
6039 EOF
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041 rm -rf conftest*
6042 eval "ac_cv_func_$ac_func=yes"
6043 else
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 rm -rf conftest*
6047 eval "ac_cv_func_$ac_func=no"
6048 fi
6049 rm -f conftest*
6050 fi
6051
6052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6053 echo "$ac_t""yes" 1>&6
6054 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6055 cat >> confdefs.h <<EOF
6056 #define $ac_tr_func 1
6057 EOF
6058
6059 else
6060 echo "$ac_t""no" 1>&6
6061 fi
6062 done
6063
6064 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6065 echo "configure:6066: checking for working mmap" >&5
6066 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6067 echo $ac_n "(cached) $ac_c" 1>&6
6068 else
6069 if test "$cross_compiling" = yes; then
6070 ac_cv_func_mmap_fixed_mapped=no
6071 else
6072 cat > conftest.$ac_ext <<EOF
6073 #line 6074 "configure"
6074 #include "confdefs.h"
6075
6076 /* Thanks to Mike Haertel and Jim Avera for this test.
6077 Here is a matrix of mmap possibilities:
6078 mmap private not fixed
6079 mmap private fixed at somewhere currently unmapped
6080 mmap private fixed at somewhere already mapped
6081 mmap shared not fixed
6082 mmap shared fixed at somewhere currently unmapped
6083 mmap shared fixed at somewhere already mapped
6084 For private mappings, we should verify that changes cannot be read()
6085 back from the file, nor mmap's back from the file at a different
6086 address. (There have been systems where private was not correctly
6087 implemented like the infamous i386 svr4.0, and systems where the
6088 VM page cache was not coherent with the filesystem buffer cache
6089 like early versions of FreeBSD and possibly contemporary NetBSD.)
6090 For shared mappings, we should conversely verify that changes get
6091 propogated back to all the places they're supposed to be.
6092
6093 Grep wants private fixed already mapped.
6094 The main things grep needs to know about mmap are:
6095 * does it exist and is it safe to write into the mmap'd area
6096 * how to use it (BSD variants) */
6097 #include <sys/types.h>
6098 #include <fcntl.h>
6099 #include <sys/mman.h>
6100
6101 /* This mess was copied from the GNU getpagesize.h. */
6102 #ifndef HAVE_GETPAGESIZE
6103 # ifdef HAVE_UNISTD_H
6104 # include <unistd.h>
6105 # endif
6106
6107 /* Assume that all systems that can run configure have sys/param.h. */
6108 # ifndef HAVE_SYS_PARAM_H
6109 # define HAVE_SYS_PARAM_H 1
6110 # endif
6111
6112 # ifdef _SC_PAGESIZE
6113 # define getpagesize() sysconf(_SC_PAGESIZE)
6114 # else /* no _SC_PAGESIZE */
6115 # ifdef HAVE_SYS_PARAM_H
6116 # include <sys/param.h>
6117 # ifdef EXEC_PAGESIZE
6118 # define getpagesize() EXEC_PAGESIZE
6119 # else /* no EXEC_PAGESIZE */
6120 # ifdef NBPG
6121 # define getpagesize() NBPG * CLSIZE
6122 # ifndef CLSIZE
6123 # define CLSIZE 1
6124 # endif /* no CLSIZE */
6125 # else /* no NBPG */
6126 # ifdef NBPC
6127 # define getpagesize() NBPC
6128 # else /* no NBPC */
6129 # ifdef PAGESIZE
6130 # define getpagesize() PAGESIZE
6131 # endif /* PAGESIZE */
6132 # endif /* no NBPC */
6133 # endif /* no NBPG */
6134 # endif /* no EXEC_PAGESIZE */
6135 # else /* no HAVE_SYS_PARAM_H */
6136 # define getpagesize() 8192 /* punt totally */
6137 # endif /* no HAVE_SYS_PARAM_H */
6138 # endif /* no _SC_PAGESIZE */
6139
6140 #endif /* no HAVE_GETPAGESIZE */
6141
6142 #ifdef __cplusplus
6143 extern "C" { void *malloc(unsigned); }
6144 #else
6145 char *malloc();
6146 #endif
6147
6148 int
6149 main()
6150 {
6151 char *data, *data2, *data3;
6152 int i, pagesize;
6153 int fd;
6154
6155 pagesize = getpagesize();
6156
6157 /*
6158 * First, make a file with some known garbage in it.
6159 */
6160 data = malloc(pagesize);
6161 if (!data)
6162 exit(1);
6163 for (i = 0; i < pagesize; ++i)
6164 *(data + i) = rand();
6165 umask(0);
6166 fd = creat("conftestmmap", 0600);
6167 if (fd < 0)
6168 exit(1);
6169 if (write(fd, data, pagesize) != pagesize)
6170 exit(1);
6171 close(fd);
6172
6173 /*
6174 * Next, try to mmap the file at a fixed address which
6175 * already has something else allocated at it. If we can,
6176 * also make sure that we see the same garbage.
6177 */
6178 fd = open("conftestmmap", O_RDWR);
6179 if (fd < 0)
6180 exit(1);
6181 data2 = malloc(2 * pagesize);
6182 if (!data2)
6183 exit(1);
6184 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6185 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6186 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6187 exit(1);
6188 for (i = 0; i < pagesize; ++i)
6189 if (*(data + i) != *(data2 + i))
6190 exit(1);
6191
6192 /*
6193 * Finally, make sure that changes to the mapped area
6194 * do not percolate back to the file as seen by read().
6195 * (This is a bug on some variants of i386 svr4.0.)
6196 */
6197 for (i = 0; i < pagesize; ++i)
6198 *(data2 + i) = *(data2 + i) + 1;
6199 data3 = malloc(pagesize);
6200 if (!data3)
6201 exit(1);
6202 if (read(fd, data3, pagesize) != pagesize)
6203 exit(1);
6204 for (i = 0; i < pagesize; ++i)
6205 if (*(data + i) != *(data3 + i))
6206 exit(1);
6207 close(fd);
6208 unlink("conftestmmap");
6209 exit(0);
6210 }
6211
6212 EOF
6213 if { (eval echo configure:6214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6214 then
6215 ac_cv_func_mmap_fixed_mapped=yes
6216 else
6217 echo "configure: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6219 rm -fr conftest*
6220 ac_cv_func_mmap_fixed_mapped=no
6221 fi
6222 rm -fr conftest*
6223 fi
6224
6225 fi
6226
6227 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6228 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6229 cat >> confdefs.h <<\EOF
6230 #define HAVE_MMAP 1
6231 EOF
6232
6233 fi
6234
6235
6236
6237
6238 if test ${build} = ${host} -a ${host} = ${target} ; then
6239 case ${host_os} in
6240 hpux*)
6241 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
6242 echo "configure:6243: checking for HPUX/OSF thread support" >&5
6243 if test -f /usr/include/dce/cma_config.h ; then
6244 if test "$GCC" = "yes" ; then
6245 echo "$ac_t""yes" 1>&6
6246 cat >> confdefs.h <<\EOF
6247 #define HAVE_HPUX_THREAD_SUPPORT 1
6248 EOF
6249
6250 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
6251 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6252 else
6253 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6254 fi
6255 else
6256 echo "$ac_t""no" 1>&6
6257 fi
6258 ;;
6259 solaris*)
6260 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
6261 echo "configure:6262: checking for Solaris thread debugging library" >&5
6262 if test -f /usr/lib/libthread_db.so.1 ; then
6263 echo "$ac_t""yes" 1>&6
6264 cat >> confdefs.h <<\EOF
6265 #define HAVE_THREAD_DB_LIB 1
6266 EOF
6267
6268 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
6269 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6270 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6271 echo "configure:6272: checking for dlopen in -ldl" >&5
6272 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6274 echo $ac_n "(cached) $ac_c" 1>&6
6275 else
6276 ac_save_LIBS="$LIBS"
6277 LIBS="-ldl $LIBS"
6278 cat > conftest.$ac_ext <<EOF
6279 #line 6280 "configure"
6280 #include "confdefs.h"
6281 /* Override any gcc2 internal prototype to avoid an error. */
6282 /* We use char because int might match the return type of a gcc2
6283 builtin and then its argument prototype would still apply. */
6284 char dlopen();
6285
6286 int main() {
6287 dlopen()
6288 ; return 0; }
6289 EOF
6290 if { (eval echo configure:6291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6291 rm -rf conftest*
6292 eval "ac_cv_lib_$ac_lib_var=yes"
6293 else
6294 echo "configure: failed program was:" >&5
6295 cat conftest.$ac_ext >&5
6296 rm -rf conftest*
6297 eval "ac_cv_lib_$ac_lib_var=no"
6298 fi
6299 rm -f conftest*
6300 LIBS="$ac_save_LIBS"
6301
6302 fi
6303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6304 echo "$ac_t""yes" 1>&6
6305 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6306 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6307 cat >> confdefs.h <<EOF
6308 #define $ac_tr_lib 1
6309 EOF
6310
6311 LIBS="-ldl $LIBS"
6312
6313 else
6314 echo "$ac_t""no" 1>&6
6315 fi
6316
6317 if test "$GCC" = "yes" ; then
6318 # The GNU linker requires the -export-dynamic option to make
6319 # all symbols visible in the dynamic symbol table.
6320 hold_ldflags=$LDFLAGS
6321 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
6322 echo "configure:6323: checking for the ld -export-dynamic flag" >&5
6323 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6324 cat > conftest.$ac_ext <<EOF
6325 #line 6326 "configure"
6326 #include "confdefs.h"
6327
6328 int main() {
6329 int i;
6330 ; return 0; }
6331 EOF
6332 if { (eval echo configure:6333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333 rm -rf conftest*
6334 found=yes
6335 else
6336 echo "configure: failed program was:" >&5
6337 cat conftest.$ac_ext >&5
6338 rm -rf conftest*
6339 found=no
6340 fi
6341 rm -f conftest*
6342 LDFLAGS=$hold_ldflags
6343 echo "$ac_t""$found" 1>&6
6344 if test $found = yes; then
6345 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6346 fi
6347 fi
6348 # Sun randomly tweaked the prototypes in <proc_service.h>
6349 # at one point.
6350 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
6351 echo "configure:6352: checking if <proc_service.h> is old" >&5
6352 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6353 echo $ac_n "(cached) $ac_c" 1>&6
6354 else
6355
6356 cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359
6360 #include <proc_service.h>
6361 ps_err_e ps_pdwrite
6362 (struct ps_prochandle*, psaddr_t, const void*, size_t);
6363
6364 int main() {
6365
6366 ; return 0; }
6367 EOF
6368 if { (eval echo configure:6369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6369 rm -rf conftest*
6370 gdb_cv_proc_service_is_old=no
6371 else
6372 echo "configure: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
6374 rm -rf conftest*
6375 gdb_cv_proc_service_is_old=yes
6376 fi
6377 rm -f conftest*
6378
6379 fi
6380
6381 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6382 if test $gdb_cv_proc_service_is_old = yes; then
6383 cat >> confdefs.h <<\EOF
6384 #define PROC_SERVICE_IS_OLD 1
6385 EOF
6386
6387 fi
6388 else
6389 echo "$ac_t""no" 1>&6
6390 fi
6391 ;;
6392 esac
6393
6394 fi
6395
6396
6397 # Check whether --enable-gdbcli or --disable-gdbcli was given.
6398 if test "${enable_gdbcli+set}" = set; then
6399 enableval="$enable_gdbcli"
6400
6401 case "${enableval}" in
6402 yes) enable_gdbcli=yes ;;
6403 "") enable_gdbcli=yes ;;
6404 no)
6405 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6406 ;;
6407 *)
6408 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
6409 ;;
6410 esac
6411
6412 else
6413 enable_gdbcli=yes
6414 fi
6415
6416 case ${enable_gdbcli} in
6417 "yes" )
6418 if test -d "${srcdir}/cli" ; then
6419 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6420 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
6421 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
6422 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6423 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6424 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6425 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6426 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6427 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6428 fi
6429 ;;
6430 esac
6431
6432
6433 # Check whether --enable-gdbmi or --disable-gdbmi was given.
6434 if test "${enable_gdbmi+set}" = set; then
6435 enableval="$enable_gdbmi"
6436
6437 case "${enable_gdbmi}" in
6438 yes | no) ;;
6439 "") enable_gdbmi=yes ;;
6440 *)
6441 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6442 ;;
6443 esac
6444
6445 else
6446 enable_gdbmi=yes
6447 fi
6448
6449 case ${enable_gdbmi} in
6450 "yes" )
6451 if test -d "${srcdir}/mi" ; then
6452 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6453 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
6454 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
6455 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
6456 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
6457 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6458 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
6459 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6460 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
6461 fi
6462 ;;
6463 esac
6464
6465 # Configure UI_OUT by default (before 5.2 it can be disabled)
6466 # It must be configured if gdbmi is configured
6467
6468 UIOUT_CFLAGS=
6469
6470
6471 # Check whether --with-uiout or --without-uiout was given.
6472 if test "${with_uiout+set}" = set; then
6473 withval="$with_uiout"
6474 case "${withval}" in
6475 yes) want_uiout=true ;;
6476 no) if test $enable_gdbmi = yes; then
6477 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6478 else
6479 want_uiout=false
6480 fi ;;
6481 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6482 esac
6483 else
6484 want_uiout=true
6485 fi
6486
6487 if test $want_uiout = true; then
6488 UIOUT_CFLAGS="-DUI_OUT=1"
6489 fi
6490
6491 # Check whether --enable-tui or --disable-tui was given.
6492 if test "${enable_tui+set}" = set; then
6493 enableval="$enable_tui"
6494
6495 case "${enable_tui}" in
6496 yes | no) ;;
6497 "") enable_tui=yes ;;
6498 *)
6499 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6500 ;;
6501 esac
6502
6503 fi
6504
6505 case ${enable_tui} in
6506 "yes" )
6507 if test -d "${srcdir}/tui" ; then
6508 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6509 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
6510 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
6511 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6512 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6513 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6514 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6515 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6516 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6517 fi
6518 ;;
6519 esac
6520
6521 # Check whether --enable-netrom or --disable-netrom was given.
6522 if test "${enable_netrom+set}" = set; then
6523 enableval="$enable_netrom"
6524 case "${enableval}" in
6525 yes) enable_netrom=yes ;;
6526 no) enable_netrom=no ;;
6527 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
6528 esac
6529 fi
6530
6531
6532 if test "${enable_netrom}" = "yes"; then
6533 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
6534 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
6535 fi
6536
6537
6538 # NOTE: Don't add -Wall or -Wunused, they both include
6539 # -Wunused-parameter which reports bogus warnings.
6540 # NOTE: If you add to this list, remember to update
6541 # gdb/doc/gdbint.texinfo.
6542 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
6543 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
6544 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
6545 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
6546 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
6547 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
6548 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
6549 # -Woverloaded-virtual -Winline -Werror"
6550 # Check whether --enable-build-warnings or --disable-build-warnings was given.
6551 if test "${enable_build_warnings+set}" = set; then
6552 enableval="$enable_build_warnings"
6553 case "${enableval}" in
6554 yes) ;;
6555 no) build_warnings="-w";;
6556 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6557 build_warnings="${build_warnings} ${t}";;
6558 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6559 build_warnings="${t} ${build_warnings}";;
6560 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6561 esac
6562 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6563 echo "Setting compiler warning flags = $build_warnings" 6>&1
6564 fi
6565 fi
6566 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
6567 if test "${enable_gdb_build_warnings+set}" = set; then
6568 enableval="$enable_gdb_build_warnings"
6569 case "${enableval}" in
6570 yes) ;;
6571 no) build_warnings="-w";;
6572 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6573 build_warnings="${build_warnings} ${t}";;
6574 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
6575 build_warnings="${t} ${build_warnings}";;
6576 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6577 esac
6578 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6579 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
6580 fi
6581 fi
6582 WARN_CFLAGS=""
6583 WERROR_CFLAGS=""
6584 if test "x${build_warnings}" != x -a "x$GCC" = xyes
6585 then
6586 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
6587 echo "configure:6588: checking compiler warning flags" >&5
6588 # Separate out the -Werror flag as some files just cannot be
6589 # compiled with it enabled.
6590 for w in ${build_warnings}; do
6591 case $w in
6592 -Werr*) WERROR_CFLAGS=-Werror ;;
6593 *) # Check that GCC accepts it
6594 saved_CFLAGS="$CFLAGS"
6595 CFLAGS="$CFLAGS $w"
6596 cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599
6600 int main() {
6601
6602 ; return 0; }
6603 EOF
6604 if { (eval echo configure:6605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6605 rm -rf conftest*
6606 WARN_CFLAGS="${WARN_CFLAGS} $w"
6607 else
6608 echo "configure: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6610 fi
6611 rm -f conftest*
6612 CFLAGS="$saved_CFLAGS"
6613 esac
6614 done
6615 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
6616 fi
6617
6618
6619
6620 MMALLOC_CFLAGS=
6621 MMALLOC=
6622
6623
6624
6625 # Check whether --with-mmalloc or --without-mmalloc was given.
6626 if test "${with_mmalloc+set}" = set; then
6627 withval="$with_mmalloc"
6628 case "${withval}" in
6629 yes) want_mmalloc=true ;;
6630 no) want_mmalloc=false;;
6631 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
6632 esac
6633 else
6634 want_mmalloc=false
6635 fi
6636
6637 if test x$want_mmalloc = xtrue; then
6638 cat >> confdefs.h <<\EOF
6639 #define USE_MMALLOC 1
6640 EOF
6641
6642 cat >> confdefs.h <<\EOF
6643 #define MMCHECK_FORCE 1
6644 EOF
6645
6646 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
6647 MMALLOC='../mmalloc/libmmalloc.a'
6648 fi
6649
6650 # Check whether --with-included-regex or --without-included-regex was given.
6651 if test "${with_included_regex+set}" = set; then
6652 withval="$with_included_regex"
6653 case "${withval}" in
6654 yes) want_included_regex=true ;;
6655 no) want_included_regex=false;;
6656 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
6657 esac
6658 else
6659 want_included_regex=true
6660 fi
6661
6662 if test $want_included_regex = false; then
6663 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
6664 echo "configure:6665: checking for GNU regex" >&5
6665 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6666 echo $ac_n "(cached) $ac_c" 1>&6
6667 else
6668 cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 #include <gnu-versions.h>
6672 #include <sys/types.h>
6673 #include <regex.h>
6674 int main() {
6675 #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
6676 #error No valid GNU regex.
6677 #endif
6678
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6682 rm -rf conftest*
6683 gdb_cv_have_gnu_regex=yes
6684 else
6685 echo "configure: failed program was:" >&5
6686 cat conftest.$ac_ext >&5
6687 rm -rf conftest*
6688 gdb_cv_have_gnu_regex=no
6689 fi
6690 rm -f conftest*
6691 fi
6692
6693 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6694 if test $gdb_cv_have_gnu_regex = no; then
6695 want_included_regex=true
6696 fi
6697 fi
6698
6699 if test x${want_included_regex} = xtrue; then
6700 REGEX="gnu-regex.o"
6701 cat >> confdefs.h <<\EOF
6702 #define USE_INCLUDED_REGEX 1
6703 EOF
6704
6705 fi
6706
6707
6708 # In the Cygwin environment, we need some additional flags.
6709 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
6710 echo "configure:6711: checking for cygwin" >&5
6711 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
6712 echo $ac_n "(cached) $ac_c" 1>&6
6713 else
6714 cat > conftest.$ac_ext <<EOF
6715 #line 6716 "configure"
6716 #include "confdefs.h"
6717
6718 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
6719 lose
6720 #endif
6721 EOF
6722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6723 egrep "lose" >/dev/null 2>&1; then
6724 rm -rf conftest*
6725 gdb_cv_os_cygwin=yes
6726 else
6727 rm -rf conftest*
6728 gdb_cv_os_cygwin=no
6729 fi
6730 rm -f conftest*
6731
6732 fi
6733
6734 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
6735
6736
6737 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
6738 case ${host} in
6739 *go32* ) SER_HARDWIRE=ser-go32.o ;;
6740 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
6741 esac
6742
6743
6744
6745 if test x$gdb_host = xgo32; then
6746 TERM_LIB=
6747 else
6748 if test x$gdb_cv_os_cygwin = xyes; then
6749 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
6750 else
6751 TERM_LIB=
6752 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
6753 echo "configure:6754: checking for tgetent in -lncurses" >&5
6754 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
6755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6756 echo $ac_n "(cached) $ac_c" 1>&6
6757 else
6758 ac_save_LIBS="$LIBS"
6759 LIBS="-lncurses $LIBS"
6760 cat > conftest.$ac_ext <<EOF
6761 #line 6762 "configure"
6762 #include "confdefs.h"
6763 /* Override any gcc2 internal prototype to avoid an error. */
6764 /* We use char because int might match the return type of a gcc2
6765 builtin and then its argument prototype would still apply. */
6766 char tgetent();
6767
6768 int main() {
6769 tgetent()
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773 rm -rf conftest*
6774 eval "ac_cv_lib_$ac_lib_var=yes"
6775 else
6776 echo "configure: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
6778 rm -rf conftest*
6779 eval "ac_cv_lib_$ac_lib_var=no"
6780 fi
6781 rm -f conftest*
6782 LIBS="$ac_save_LIBS"
6783
6784 fi
6785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6786 echo "$ac_t""yes" 1>&6
6787 TERM_LIB=-lncurses
6788 else
6789 echo "$ac_t""no" 1>&6
6790 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
6791 echo "configure:6792: checking for tgetent in -lHcurses" >&5
6792 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
6793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6794 echo $ac_n "(cached) $ac_c" 1>&6
6795 else
6796 ac_save_LIBS="$LIBS"
6797 LIBS="-lHcurses $LIBS"
6798 cat > conftest.$ac_ext <<EOF
6799 #line 6800 "configure"
6800 #include "confdefs.h"
6801 /* Override any gcc2 internal prototype to avoid an error. */
6802 /* We use char because int might match the return type of a gcc2
6803 builtin and then its argument prototype would still apply. */
6804 char tgetent();
6805
6806 int main() {
6807 tgetent()
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811 rm -rf conftest*
6812 eval "ac_cv_lib_$ac_lib_var=yes"
6813 else
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6816 rm -rf conftest*
6817 eval "ac_cv_lib_$ac_lib_var=no"
6818 fi
6819 rm -f conftest*
6820 LIBS="$ac_save_LIBS"
6821
6822 fi
6823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6824 echo "$ac_t""yes" 1>&6
6825 TERM_LIB=-lHcurses
6826 else
6827 echo "$ac_t""no" 1>&6
6828 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
6829 echo "configure:6830: checking for tgetent in -ltermlib" >&5
6830 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
6831 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6832 echo $ac_n "(cached) $ac_c" 1>&6
6833 else
6834 ac_save_LIBS="$LIBS"
6835 LIBS="-ltermlib $LIBS"
6836 cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839 /* Override any gcc2 internal prototype to avoid an error. */
6840 /* We use char because int might match the return type of a gcc2
6841 builtin and then its argument prototype would still apply. */
6842 char tgetent();
6843
6844 int main() {
6845 tgetent()
6846 ; return 0; }
6847 EOF
6848 if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6849 rm -rf conftest*
6850 eval "ac_cv_lib_$ac_lib_var=yes"
6851 else
6852 echo "configure: failed program was:" >&5
6853 cat conftest.$ac_ext >&5
6854 rm -rf conftest*
6855 eval "ac_cv_lib_$ac_lib_var=no"
6856 fi
6857 rm -f conftest*
6858 LIBS="$ac_save_LIBS"
6859
6860 fi
6861 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6862 echo "$ac_t""yes" 1>&6
6863 TERM_LIB=-ltermlib
6864 else
6865 echo "$ac_t""no" 1>&6
6866 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
6867 echo "configure:6868: checking for tgetent in -ltermcap" >&5
6868 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
6869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6870 echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872 ac_save_LIBS="$LIBS"
6873 LIBS="-ltermcap $LIBS"
6874 cat > conftest.$ac_ext <<EOF
6875 #line 6876 "configure"
6876 #include "confdefs.h"
6877 /* Override any gcc2 internal prototype to avoid an error. */
6878 /* We use char because int might match the return type of a gcc2
6879 builtin and then its argument prototype would still apply. */
6880 char tgetent();
6881
6882 int main() {
6883 tgetent()
6884 ; return 0; }
6885 EOF
6886 if { (eval echo configure:6887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6887 rm -rf conftest*
6888 eval "ac_cv_lib_$ac_lib_var=yes"
6889 else
6890 echo "configure: failed program was:" >&5
6891 cat conftest.$ac_ext >&5
6892 rm -rf conftest*
6893 eval "ac_cv_lib_$ac_lib_var=no"
6894 fi
6895 rm -f conftest*
6896 LIBS="$ac_save_LIBS"
6897
6898 fi
6899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6900 echo "$ac_t""yes" 1>&6
6901 TERM_LIB=-ltermcap
6902 else
6903 echo "$ac_t""no" 1>&6
6904 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
6905 echo "configure:6906: checking for tgetent in -lcurses" >&5
6906 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
6907 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6908 echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910 ac_save_LIBS="$LIBS"
6911 LIBS="-lcurses $LIBS"
6912 cat > conftest.$ac_ext <<EOF
6913 #line 6914 "configure"
6914 #include "confdefs.h"
6915 /* Override any gcc2 internal prototype to avoid an error. */
6916 /* We use char because int might match the return type of a gcc2
6917 builtin and then its argument prototype would still apply. */
6918 char tgetent();
6919
6920 int main() {
6921 tgetent()
6922 ; return 0; }
6923 EOF
6924 if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6925 rm -rf conftest*
6926 eval "ac_cv_lib_$ac_lib_var=yes"
6927 else
6928 echo "configure: failed program was:" >&5
6929 cat conftest.$ac_ext >&5
6930 rm -rf conftest*
6931 eval "ac_cv_lib_$ac_lib_var=no"
6932 fi
6933 rm -f conftest*
6934 LIBS="$ac_save_LIBS"
6935
6936 fi
6937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6938 echo "$ac_t""yes" 1>&6
6939 TERM_LIB=-lcurses
6940 else
6941 echo "$ac_t""no" 1>&6
6942 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
6943 echo "configure:6944: checking for tgetent in -lterminfo" >&5
6944 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
6945 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6946 echo $ac_n "(cached) $ac_c" 1>&6
6947 else
6948 ac_save_LIBS="$LIBS"
6949 LIBS="-lterminfo $LIBS"
6950 cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953 /* Override any gcc2 internal prototype to avoid an error. */
6954 /* We use char because int might match the return type of a gcc2
6955 builtin and then its argument prototype would still apply. */
6956 char tgetent();
6957
6958 int main() {
6959 tgetent()
6960 ; return 0; }
6961 EOF
6962 if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6963 rm -rf conftest*
6964 eval "ac_cv_lib_$ac_lib_var=yes"
6965 else
6966 echo "configure: failed program was:" >&5
6967 cat conftest.$ac_ext >&5
6968 rm -rf conftest*
6969 eval "ac_cv_lib_$ac_lib_var=no"
6970 fi
6971 rm -f conftest*
6972 LIBS="$ac_save_LIBS"
6973
6974 fi
6975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6976 echo "$ac_t""yes" 1>&6
6977 TERM_LIB=-lterminfo
6978 else
6979 echo "$ac_t""no" 1>&6
6980 fi
6981
6982 fi
6983
6984 fi
6985
6986 fi
6987
6988 fi
6989
6990 fi
6991
6992
6993 if test "x$TERM_LIB" = x
6994 then
6995 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
6996 fi
6997 fi
6998 fi
6999
7000
7001 # libreadline needs libuser32.a in a cygwin environment
7002 WIN32LIBS=
7003 if test x$gdb_cv_os_cygwin = xyes; then
7004 WIN32LIBS="-luser32"
7005 case "${target}" in
7006 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
7007 ;;
7008 esac
7009 fi
7010
7011
7012 LIBGUI="../libgui/src/libgui.a"
7013 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
7014
7015
7016
7017 # Check whether --with-cpu or --without-cpu was given.
7018 if test "${with_cpu+set}" = set; then
7019 withval="$with_cpu"
7020 case "${target}" in
7021 powerpc-* | powerpcle-* )
7022 ## It would be nice to keep this table in sync with the one in
7023 ## gcc/configure.
7024 case "${with_cpu}" in
7025 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
7026 | 604 | 750 )
7027 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
7028 ;;
7029 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
7030 ## These are all RS6000 variants, as far as GDB is concerned.
7031 with_cpu=rs6000
7032 ;;
7033 603e | ec603e )
7034 with_cpu=603
7035 ;;
7036 604e )
7037 with_cpu=604
7038 ;;
7039 * )
7040 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
7041 with_cpu=ppc-uisa
7042 ;;
7043 esac
7044 ;;
7045 * )
7046 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
7047 ;;
7048 esac
7049 cat >> confdefs.h <<EOF
7050 #define TARGET_CPU_DEFAULT "${with_cpu}"
7051 EOF
7052
7053
7054 fi
7055
7056
7057
7058 # Check whether --enable-gdbtk or --disable-gdbtk was given.
7059 if test "${enable_gdbtk+set}" = set; then
7060 enableval="$enable_gdbtk"
7061 case "${enableval}" in
7062 yes)
7063 case "$host" in
7064 *go32*)
7065 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7066 enable_gdbtk=no ;;
7067 *windows*)
7068 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7069 enable_gdbtk=no ;;
7070 *)
7071 enable_gdbtk=yes ;;
7072 esac ;;
7073 no)
7074 enable_gdbtk=no ;;
7075 *)
7076 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7077 esac
7078 else
7079
7080 # Default is on for everything but go32 and Cygwin
7081 case "$host" in
7082 *go32* | *windows*)
7083 ;;
7084 *)
7085 if test -d "${srcdir}/gdbtk" ; then
7086 enable_gdbtk=yes
7087 fi
7088 ;;
7089 esac
7090
7091 fi
7092
7093
7094 WIN32LDAPP=
7095
7096
7097
7098 configdir="unix"
7099
7100 GDBTKLIBS=
7101 if test "${enable_gdbtk}" = "yes"; then
7102
7103 # Gdbtk must have an absolute path to srcdir in order to run
7104 # properly when not installed.
7105 here=`pwd`
7106 cd ${srcdir}
7107 GDBTK_SRC_DIR=`pwd`
7108 cd $here
7109
7110
7111 #
7112 # Ok, lets find the tcl configuration
7113 # First, look for one uninstalled.
7114 # the alternative search directory is invoked by --with-tclconfig
7115 #
7116
7117 if test x"${no_tcl}" = x ; then
7118 # we reset no_tcl in case something fails here
7119 no_tcl=true
7120 # Check whether --with-tclconfig or --without-tclconfig was given.
7121 if test "${with_tclconfig+set}" = set; then
7122 withval="$with_tclconfig"
7123 with_tclconfig=${withval}
7124 fi
7125
7126 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
7127 echo "configure:7128: checking for Tcl configuration" >&5
7128 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7129 echo $ac_n "(cached) $ac_c" 1>&6
7130 else
7131
7132
7133 # First check to see if --with-tclconfig was specified.
7134 if test x"${with_tclconfig}" != x ; then
7135 if test -f "${with_tclconfig}/tclConfig.sh" ; then
7136 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7137 else
7138 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7139 fi
7140 fi
7141
7142 # then check for a private Tcl installation
7143 if test x"${ac_cv_c_tclconfig}" = x ; then
7144 for i in \
7145 ../tcl \
7146 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7147 ../../tcl \
7148 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7149 ../../../tcl \
7150 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7151 if test -f "$i/${configdir}/tclConfig.sh" ; then
7152 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7153 break
7154 fi
7155 done
7156 fi
7157 # check in a few common install locations
7158 if test x"${ac_cv_c_tclconfig}" = x ; then
7159 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7160 if test -f "$i/tclConfig.sh" ; then
7161 ac_cv_c_tclconfig=`(cd $i; pwd)`
7162 break
7163 fi
7164 done
7165 fi
7166 # check in a few other private locations
7167 if test x"${ac_cv_c_tclconfig}" = x ; then
7168 for i in \
7169 ${srcdir}/../tcl \
7170 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7171 if test -f "$i/${configdir}/tclConfig.sh" ; then
7172 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7173 break
7174 fi
7175 done
7176 fi
7177
7178 fi
7179
7180 if test x"${ac_cv_c_tclconfig}" = x ; then
7181 TCLCONFIG="# no Tcl configs found"
7182 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7183 else
7184 no_tcl=
7185 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7186 echo "$ac_t""found $TCLCONFIG" 1>&6
7187 fi
7188 fi
7189
7190 if test -z "${no_tcl}"; then
7191
7192 . $TCLCONFIG
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219 #
7220 # Ok, lets find the tk configuration
7221 # First, look for one uninstalled.
7222 # the alternative search directory is invoked by --with-tkconfig
7223 #
7224
7225 if test x"${no_tk}" = x ; then
7226 # we reset no_tk in case something fails here
7227 no_tk=true
7228 # Check whether --with-tkconfig or --without-tkconfig was given.
7229 if test "${with_tkconfig+set}" = set; then
7230 withval="$with_tkconfig"
7231 with_tkconfig=${withval}
7232 fi
7233
7234 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
7235 echo "configure:7236: checking for Tk configuration" >&5
7236 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7237 echo $ac_n "(cached) $ac_c" 1>&6
7238 else
7239
7240
7241 # First check to see if --with-tkconfig was specified.
7242 if test x"${with_tkconfig}" != x ; then
7243 if test -f "${with_tkconfig}/tkConfig.sh" ; then
7244 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7245 else
7246 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7247 fi
7248 fi
7249
7250 # then check for a private Tk library
7251 if test x"${ac_cv_c_tkconfig}" = x ; then
7252 for i in \
7253 ../tk \
7254 `ls -dr ../tk[4-9]* 2>/dev/null` \
7255 ../../tk \
7256 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7257 ../../../tk \
7258 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7259 if test -f "$i/${configdir}/tkConfig.sh" ; then
7260 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7261 break
7262 fi
7263 done
7264 fi
7265 # check in a few common install locations
7266 if test x"${ac_cv_c_tkconfig}" = x ; then
7267 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7268 if test -f "$i/tkConfig.sh" ; then
7269 ac_cv_c_tkconfig=`(cd $i; pwd)`
7270 break
7271 fi
7272 done
7273 fi
7274 # check in a few other private locations
7275 if test x"${ac_cv_c_tkconfig}" = x ; then
7276 for i in \
7277 ${srcdir}/../tk \
7278 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7279 if test -f "$i/${configdir}/tkConfig.sh" ; then
7280 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7281 break
7282 fi
7283 done
7284 fi
7285
7286 fi
7287
7288 if test x"${ac_cv_c_tkconfig}" = x ; then
7289 TKCONFIG="# no Tk configs found"
7290 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7291 else
7292 no_tk=
7293 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7294 echo "$ac_t""found $TKCONFIG" 1>&6
7295 fi
7296 fi
7297
7298
7299
7300 # now look for Tcl library stuff
7301
7302 case "${host}" in
7303 *-*-cygwin*)
7304 tcldir=../tcl/win/
7305 ;;
7306 *)
7307 tcldir=../tcl/unix/
7308 ;;
7309 esac
7310
7311 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7312
7313 # If $no_tk is nonempty, then we can't do Tk, and there is no
7314 # point to doing Tcl.
7315 if test -z "${no_tk}"; then
7316
7317 if test -f "$TKCONFIG" ; then
7318 . $TKCONFIG
7319 fi
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334 #
7335 # Ok, lets find the tcl source trees so we can use the headers
7336 # Warning: transition of version 9 to 10 will break this algorithm
7337 # because 10 sorts before 9. We also look for just tcl. We have to
7338 # be careful that we don't match stuff like tclX by accident.
7339 # the alternative search directory is involked by --with-tclinclude
7340 #
7341
7342 no_tcl=true
7343 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
7344 echo "configure:7345: checking for Tcl private headers. dir=${configdir}" >&5
7345 # Check whether --with-tclinclude or --without-tclinclude was given.
7346 if test "${with_tclinclude+set}" = set; then
7347 withval="$with_tclinclude"
7348 with_tclinclude=${withval}
7349 fi
7350
7351 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7352 echo $ac_n "(cached) $ac_c" 1>&6
7353 else
7354
7355 # first check to see if --with-tclinclude was specified
7356 if test x"${with_tclinclude}" != x ; then
7357 if test -f ${with_tclinclude}/tclInt.h ; then
7358 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7359 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7360 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7361 else
7362 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7363 fi
7364 fi
7365
7366 # next check if it came with Tcl configuration file
7367 if test x"${ac_cv_c_tclconfig}" = x ; then
7368 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7369 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7370 fi
7371 fi
7372
7373 # next check in private source directory
7374 #
7375 # since ls returns lowest version numbers first, reverse its output
7376 if test x"${ac_cv_c_tclh}" = x ; then
7377 for i in \
7378 ${srcdir}/../tcl \
7379 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7380 ${srcdir}/../../tcl \
7381 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7382 ${srcdir}/../../../tcl \
7383 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7384 if test -f $i/generic/tclInt.h ; then
7385 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7386 break
7387 fi
7388 done
7389 fi
7390 # finally check in a few common install locations
7391 #
7392 # since ls returns lowest version numbers first, reverse its output
7393 if test x"${ac_cv_c_tclh}" = x ; then
7394 for i in \
7395 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7396 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7397 /usr/local/src/tcl \
7398 /usr/local/lib/tcl \
7399 ${prefix}/include ; do
7400 if test -f $i/generic/tclInt.h ; then
7401 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7402 break
7403 fi
7404 done
7405 fi
7406 # see if one is installed
7407 if test x"${ac_cv_c_tclh}" = x ; then
7408 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7409 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
7410 echo "configure:7411: checking for tclInt.h" >&5
7411 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7412 echo $ac_n "(cached) $ac_c" 1>&6
7413 else
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 #include <tclInt.h>
7418 EOF
7419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7420 { (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7422 if test -z "$ac_err"; then
7423 rm -rf conftest*
7424 eval "ac_cv_header_$ac_safe=yes"
7425 else
7426 echo "$ac_err" >&5
7427 echo "configure: failed program was:" >&5
7428 cat conftest.$ac_ext >&5
7429 rm -rf conftest*
7430 eval "ac_cv_header_$ac_safe=no"
7431 fi
7432 rm -f conftest*
7433 fi
7434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7435 echo "$ac_t""yes" 1>&6
7436 ac_cv_c_tclh=installed
7437 else
7438 echo "$ac_t""no" 1>&6
7439 ac_cv_c_tclh=""
7440 fi
7441
7442 fi
7443
7444 fi
7445
7446 if test x"${ac_cv_c_tclh}" = x ; then
7447 TCLHDIR="# no Tcl private headers found"
7448 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7449 fi
7450 if test x"${ac_cv_c_tclh}" != x ; then
7451 no_tcl=""
7452 if test x"${ac_cv_c_tclh}" = x"installed" ; then
7453 echo "$ac_t""is installed" 1>&6
7454 TCLHDIR=""
7455 else
7456 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7457 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7458 TCLHDIR="-I${ac_cv_c_tclh}"
7459 fi
7460 fi
7461
7462
7463
7464
7465 #
7466 # Ok, lets find the tk source trees so we can use the headers
7467 # If the directory (presumably symlink) named "tk" exists, use that one
7468 # in preference to any others. Same logic is used when choosing library
7469 # and again with Tcl. The search order is the best place to look first, then in
7470 # decreasing significance. The loop breaks if the trigger file is found.
7471 # Note the gross little conversion here of srcdir by cd'ing to the found
7472 # directory. This converts the path from a relative to an absolute, so
7473 # recursive cache variables for the path will work right. We check all
7474 # the possible paths in one loop rather than many seperate loops to speed
7475 # things up.
7476 # the alternative search directory is involked by --with-tkinclude
7477 #
7478 no_tk=true
7479 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
7480 echo "configure:7481: checking for Tk private headers" >&5
7481 # Check whether --with-tkinclude or --without-tkinclude was given.
7482 if test "${with_tkinclude+set}" = set; then
7483 withval="$with_tkinclude"
7484 with_tkinclude=${withval}
7485 fi
7486
7487 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7488 echo $ac_n "(cached) $ac_c" 1>&6
7489 else
7490
7491 # first check to see if --with-tkinclude was specified
7492 if test x"${with_tkinclude}" != x ; then
7493 if test -f ${with_tkinclude}/tk.h ; then
7494 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7495 elif test -f ${with_tkinclude}/generic/tk.h ; then
7496 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7497 else
7498 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7499 fi
7500 fi
7501
7502 # next check if it came with Tk configuration file
7503 if test x"${ac_cv_c_tkconfig}" = x ; then
7504 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7505 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7506 fi
7507 fi
7508
7509 # next check in private source directory
7510 #
7511 # since ls returns lowest version numbers first, reverse its output
7512 if test x"${ac_cv_c_tkh}" = x ; then
7513 for i in \
7514 ${srcdir}/../tk \
7515 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7516 ${srcdir}/../../tk \
7517 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7518 ${srcdir}/../../../tk \
7519 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
7520 if test -f $i/generic/tk.h ; then
7521 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7522 break
7523 fi
7524 done
7525 fi
7526 # finally check in a few common install locations
7527 #
7528 # since ls returns lowest version numbers first, reverse its output
7529 if test x"${ac_cv_c_tkh}" = x ; then
7530 for i in \
7531 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
7532 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
7533 /usr/local/src/tk \
7534 /usr/local/lib/tk \
7535 ${prefix}/include ; do
7536 if test -f $i/generic/tk.h ; then
7537 ac_cv_c_tkh=`(cd $i/generic; pwd)`
7538 break
7539 fi
7540 done
7541 fi
7542 # see if one is installed
7543 if test x"${ac_cv_c_tkh}" = x ; then
7544 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
7545 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
7546 echo "configure:7547: checking for tk.h" >&5
7547 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7548 echo $ac_n "(cached) $ac_c" 1>&6
7549 else
7550 cat > conftest.$ac_ext <<EOF
7551 #line 7552 "configure"
7552 #include "confdefs.h"
7553 #include <tk.h>
7554 EOF
7555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7556 { (eval echo configure:7557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7558 if test -z "$ac_err"; then
7559 rm -rf conftest*
7560 eval "ac_cv_header_$ac_safe=yes"
7561 else
7562 echo "$ac_err" >&5
7563 echo "configure: failed program was:" >&5
7564 cat conftest.$ac_ext >&5
7565 rm -rf conftest*
7566 eval "ac_cv_header_$ac_safe=no"
7567 fi
7568 rm -f conftest*
7569 fi
7570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7571 echo "$ac_t""yes" 1>&6
7572 ac_cv_c_tkh=installed
7573 else
7574 echo "$ac_t""no" 1>&6
7575 ac_cv_c_tkh=""
7576 fi
7577
7578 fi
7579
7580 fi
7581
7582 if test x"${ac_cv_c_tkh}" != x ; then
7583 no_tk=""
7584 if test x"${ac_cv_c_tkh}" = x"installed" ; then
7585 echo "$ac_t""is installed" 1>&6
7586 TKHDIR=""
7587 else
7588 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
7589 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
7590 TKHDIR="-I${ac_cv_c_tkh}"
7591 fi
7592 else
7593 TKHDIR="# no Tk directory found"
7594 echo "configure: warning: Can't find Tk private headers" 1>&2
7595 no_tk=true
7596 fi
7597
7598
7599
7600
7601 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7602 echo "configure:7603: checking for Itcl private headers. srcdir=${srcdir}" >&5
7603 if test x"${ac_cv_c_itclh}" = x ; then
7604 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
7605 if test -f $i/generic/itcl.h ; then
7606 ac_cv_c_itclh=`(cd $i/generic; pwd)`
7607 break
7608 fi
7609 done
7610 fi
7611 if test x"${ac_cv_c_itclh}" = x ; then
7612 ITCLHDIR="# no Itcl private headers found"
7613 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
7614 fi
7615 if test x"${ac_cv_c_itclh}" != x ; then
7616 ITCLHDIR="-I${ac_cv_c_itclh}"
7617 fi
7618 # should always be here
7619 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
7620
7621 #AC_SUBST(ITCLLIB)
7622
7623
7624 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7625 echo "configure:7626: checking for Itk private headers. srcdir=${srcdir}" >&5
7626 if test x"${ac_cv_c_itkh}" = x ; then
7627 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
7628 if test -f $i/generic/itk.h ; then
7629 ac_cv_c_itkh=`(cd $i/generic; pwd)`
7630 break
7631 fi
7632 done
7633 fi
7634 if test x"${ac_cv_c_itkh}" = x ; then
7635 ITKHDIR="# no Itk private headers found"
7636 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
7637 fi
7638 if test x"${ac_cv_c_itkh}" != x ; then
7639 ITKHDIR="-I${ac_cv_c_itkh}"
7640 fi
7641 # should always be here
7642 # ITKLIB="../itcl/itk/unix/libitk.a"
7643
7644 #AC_SUBST(ITKLIB)
7645
7646
7647 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7648 echo "configure:7649: checking for Tix private headers. srcdir=${srcdir}" >&5
7649 if test x"${ac_cv_c_tixh}" = x ; then
7650 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
7651 if test -f $i/generic/tix.h ; then
7652 ac_cv_c_tixh=`(cd $i/generic; pwd)`
7653 break
7654 fi
7655 done
7656 fi
7657 if test x"${ac_cv_c_tixh}" = x ; then
7658 TIXHDIR="# no Tix private headers found"
7659 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
7660 fi
7661 if test x"${ac_cv_c_tixh}" != x ; then
7662 TIXHDIR="-I${ac_cv_c_tixh}"
7663 fi
7664
7665
7666
7667
7668 # now look for Tk library stuff
7669
7670 case "${host}" in
7671 *-*-cygwin*)
7672 tkdir=../tk/win/
7673 ;;
7674 *)
7675 tkdir=../tk/unix/
7676 ;;
7677 esac
7678
7679 TK_DEPS="${tkdir}${TK_LIB_FILE}"
7680
7681 # now look for Itcl library stuff
7682
7683
7684 #
7685 # Ok, lets find the itcl configuration
7686 # First, look for one uninstalled.
7687 # the alternative search directory is invoked by --with-itclconfig
7688 #
7689
7690 if test x"${no_itcl}" = x ; then
7691 # we reset no_itcl in case something fails here
7692 no_itcl=true
7693 # Check whether --with-itclconfig or --without-itclconfig was given.
7694 if test "${with_itclconfig+set}" = set; then
7695 withval="$with_itclconfig"
7696 with_itclconfig=${withval}
7697 fi
7698
7699 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
7700 echo "configure:7701: checking for Itcl configuration" >&5
7701 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
7702 echo $ac_n "(cached) $ac_c" 1>&6
7703 else
7704
7705
7706 # First check to see if --with-itclconfig was specified.
7707 if test x"${with_itclconfig}" != x ; then
7708 if test -f "${with_itclconfig}/itclConfig.sh" ; then
7709 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
7710 else
7711 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
7712 fi
7713 fi
7714
7715 # then check for a private Itcl library
7716 if test x"${ac_cv_c_itclconfig}" = x ; then
7717 for i in \
7718 ../itcl/itcl \
7719 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
7720 ../../itcl \
7721 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
7722 ../../../itcl \
7723 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
7724 if test -f "$i/itclConfig.sh" ; then
7725 ac_cv_c_itclconfig=`(cd $i; pwd)`
7726 break
7727 fi
7728 done
7729 fi
7730 # check in a few common install locations
7731 if test x"${ac_cv_c_itclconfig}" = x ; then
7732 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7733 if test -f "$i/itclConfig.sh" ; then
7734 ac_cv_c_itclconfig=`(cd $i; pwd)`
7735 break
7736 fi
7737 done
7738 fi
7739 # check in a few other private locations
7740 if test x"${ac_cv_c_itclconfig}" = x ; then
7741 for i in \
7742 ${srcdir}/../itcl/itcl \
7743 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
7744 if test -f "$i/itclConfig.sh" ; then
7745 ac_cv_c_itclconfig=`(cd $i; pwd)`
7746 break
7747 fi
7748 done
7749 fi
7750
7751 fi
7752
7753 if test x"${ac_cv_c_itclconfig}" = x ; then
7754 ITCLCONFIG="# no Itcl configs found"
7755 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
7756 else
7757 no_itcl=
7758 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
7759 echo "$ac_t""found $ITCLCONFIG" 1>&6
7760 fi
7761 fi
7762
7763 if test -z "${no_itcl}"; then
7764
7765 if test -f "$ITCLCONFIG" ; then
7766 . $ITCLCONFIG
7767 fi
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
7781 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
7782 fi
7783
7784
7785 # now look for Itk library stuff
7786
7787 #
7788 # Ok, lets find the itk configuration
7789 # First, look for one uninstalled.
7790 # the alternative search directory is invoked by --with-itkconfig
7791 #
7792
7793 if test x"${no_itk}" = x ; then
7794 # we reset no_itk in case something fails here
7795 no_itk=true
7796 # Check whether --with-itkconfig or --without-itkconfig was given.
7797 if test "${with_itkconfig+set}" = set; then
7798 withval="$with_itkconfig"
7799 with_itkconfig=${withval}
7800 fi
7801
7802 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
7803 echo "configure:7804: checking for Itk configuration" >&5
7804 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
7805 echo $ac_n "(cached) $ac_c" 1>&6
7806 else
7807
7808
7809 # First check to see if --with-itkconfig was specified.
7810 if test x"${with_itkconfig}" != x ; then
7811 if test -f "${with_itkconfig}/itkConfig.sh" ; then
7812 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
7813 else
7814 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
7815 fi
7816 fi
7817
7818 # then check for a private Itk library
7819 if test x"${ac_cv_c_itkconfig}" = x ; then
7820 for i in \
7821 ../itcl/itk \
7822 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
7823 ../../itk \
7824 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
7825 ../../../itk \
7826 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
7827 if test -f "$i/itkConfig.sh" ; then
7828 ac_cv_c_itkconfig=`(cd $i; pwd)`
7829 break
7830 fi
7831 done
7832 fi
7833 # check in a few common install locations
7834 if test x"${ac_cv_c_itkconfig}" = x ; then
7835 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7836 if test -f "$i/itkConfig.sh" ; then
7837 ac_cv_c_itkconfig=`(cd $i; pwd)`
7838 break
7839 fi
7840 done
7841 fi
7842 # check in a few other private locations
7843 if test x"${ac_cv_c_itkconfig}" = x ; then
7844 for i in \
7845 ${srcdir}/../itcl/itk \
7846 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
7847 if test -f "$i/itkConfig.sh" ; then
7848 ac_cv_c_itkconfig=`(cd $i; pwd)`
7849 break
7850 fi
7851 done
7852 fi
7853
7854 fi
7855
7856 if test x"${ac_cv_c_itkconfig}" = x ; then
7857 ITKCONFIG="# no Itk configs found"
7858 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
7859 else
7860 no_itk=
7861 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
7862 echo "$ac_t""found $ITKCONFIG" 1>&6
7863 fi
7864 fi
7865
7866
7867 if test -z "${no_itcl}"; then
7868
7869 if test -f "$ITKCONFIG" ; then
7870 . $ITKCONFIG
7871 fi
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884 ITKLIB="${ITK_BUILD_LIB_SPEC}"
7885 ITK_DEPS="${ITK_LIB_FULL_PATH}"
7886 fi
7887
7888 # now look for Tix library stuff
7889
7890 #
7891 # Ok, lets find the tix configuration
7892 # First, look for one uninstalled.
7893 # the alternative search directory is invoked by --with-itkconfig
7894 #
7895
7896 if test x"${no_tix}" = x ; then
7897 # we reset no_tix in case something fails here
7898 no_tix=true
7899 # Check whether --with-tixconfig or --without-tixconfig was given.
7900 if test "${with_tixconfig+set}" = set; then
7901 withval="$with_tixconfig"
7902 with_tixconfig=${withval}
7903 fi
7904
7905 echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
7906 echo "configure:7907: checking for Tix configuration" >&5
7907 if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
7908 echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910
7911
7912 # First check to see if --with-tixconfig was specified.
7913 if test x"${with_tixconfig}" != x ; then
7914 if test -f "${with_tixconfig}/tixConfig.sh" ; then
7915 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
7916 else
7917 { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
7918 fi
7919 fi
7920
7921 # then check for a private Tix library
7922 if test x"${ac_cv_c_tixconfig}" = x ; then
7923 for i in \
7924 ../tix \
7925 `ls -dr ../tix 2>/dev/null` \
7926 ../../tix \
7927 `ls -dr ../../tix 2>/dev/null` \
7928 ../../../tix \
7929 `ls -dr ../../../tix 2>/dev/null` ; do
7930 echo "**** Looking at $i - with ${configdir}"
7931 if test -f "$i/tixConfig.sh" ; then
7932 ac_cv_c_tixconfig=`(cd $i; pwd)`
7933 break
7934 fi
7935 done
7936 fi
7937 # check in a few common install locations
7938 if test x"${ac_cv_c_tixconfig}" = x ; then
7939 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7940 echo "**** Looking at $i"
7941 if test -f "$i/tixConfig.sh" ; then
7942 ac_cv_c_tixconfig=`(cd $i; pwd)`
7943 break
7944 fi
7945 done
7946 fi
7947 # check in a few other private locations
7948 echo "**** Other private locations"
7949 if test x"${ac_cv_c_tixconfig}" = x ; then
7950 for i in \
7951 ${srcdir}/../tix \
7952 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
7953 echo "**** Looking at $i - with ${configdir}"
7954 if test -f "$i/${configdir}/tixConfig.sh" ; then
7955 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
7956 break
7957 fi
7958 done
7959 fi
7960
7961 fi
7962
7963 if test x"${ac_cv_c_tixconfig}" = x ; then
7964 TIXCONFIG="# no Tix configs found"
7965 echo "configure: warning: Can't find Tix configuration definitions" 1>&2
7966 else
7967 no_tix=
7968 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
7969 echo "$ac_t""found $TIXCONFIG" 1>&6
7970 fi
7971 fi
7972
7973
7974 if test -z "${no_tix}"; then
7975
7976 if test -f "$TIXCONFIG" ; then
7977 . $TIXCONFIG
7978 fi
7979
7980
7981
7982
7983
7984
7985
7986
7987 TIXLIB="${TIX_BUILD_LIB_SPEC}"
7988 TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
7989 fi
7990
7991 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
7992 # Tcl/Tk 8.1 require -fwritable strings. I don't
7993 # know whether 8.2 will or not, but I bet it will.
7994 # I don't have to worry about 7.x since we don't support it.
7995 GDBTK_CFLAGS=""
7996 if test "$GCC" = "yes"; then
7997 if test "$TCL_VERSION" != "8.0" ; then
7998 GDBTK_CFLAGS="-fwritable-strings"
7999 fi
8000 fi
8001
8002 # Include some libraries that Tcl and Tk want.
8003 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
8004 # Yes, the ordering seems wrong here. But it isn't.
8005 # TK_LIBS is the list of libraries that need to be linked
8006 # after Tcl/Tk. Note that this isn't put into LIBS. If it
8007 # were in LIBS then any link tests after this point would
8008 # try to include things like `$(LIBGUI)', which wouldn't work.
8009 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
8010
8011 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
8012 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
8013 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
8014 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
8015 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
8016 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
8017 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
8018 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
8019
8020 if test x$gdb_cv_os_cygwin = xyes; then
8021 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
8022 WIN32LDAPP="-Wl,--subsystem,console"
8023 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
8024 fi
8025 fi
8026 fi
8027 fi
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044 # If we find X, set shell vars x_includes and x_libraries to the
8045 # paths, otherwise set no_x=yes.
8046 # Uses ac_ vars as temps to allow command line to override cache and checks.
8047 # --without-x overrides everything else, but does not touch the cache.
8048 echo $ac_n "checking for X""... $ac_c" 1>&6
8049 echo "configure:8050: checking for X" >&5
8050
8051 # Check whether --with-x or --without-x was given.
8052 if test "${with_x+set}" = set; then
8053 withval="$with_x"
8054 :
8055 fi
8056
8057 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8058 if test "x$with_x" = xno; then
8059 # The user explicitly disabled X.
8060 have_x=disabled
8061 else
8062 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8063 # Both variables are already set.
8064 have_x=yes
8065 else
8066 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8067 echo $ac_n "(cached) $ac_c" 1>&6
8068 else
8069 # One or both of the vars are not set, and there is no cached value.
8070 ac_x_includes=NO ac_x_libraries=NO
8071 rm -fr conftestdir
8072 if mkdir conftestdir; then
8073 cd conftestdir
8074 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8075 cat > Imakefile <<'EOF'
8076 acfindx:
8077 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8078 EOF
8079 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8080 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8081 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8082 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8083 for ac_extension in a so sl; do
8084 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8085 test -f $ac_im_libdir/libX11.$ac_extension; then
8086 ac_im_usrlibdir=$ac_im_libdir; break
8087 fi
8088 done
8089 # Screen out bogus values from the imake configuration. They are
8090 # bogus both because they are the default anyway, and because
8091 # using them would break gcc on systems where it needs fixed includes.
8092 case "$ac_im_incroot" in
8093 /usr/include) ;;
8094 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8095 esac
8096 case "$ac_im_usrlibdir" in
8097 /usr/lib | /lib) ;;
8098 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8099 esac
8100 fi
8101 cd ..
8102 rm -fr conftestdir
8103 fi
8104
8105 if test "$ac_x_includes" = NO; then
8106 # Guess where to find include files, by looking for this one X11 .h file.
8107 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8108
8109 # First, try using that file with no special directory specified.
8110 cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 #include <$x_direct_test_include>
8114 EOF
8115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8116 { (eval echo configure:8117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8118 if test -z "$ac_err"; then
8119 rm -rf conftest*
8120 # We can compile using X headers with no special include directory.
8121 ac_x_includes=
8122 else
8123 echo "$ac_err" >&5
8124 echo "configure: failed program was:" >&5
8125 cat conftest.$ac_ext >&5
8126 rm -rf conftest*
8127 # Look for the header file in a standard set of common directories.
8128 # Check X11 before X11Rn because it is often a symlink to the current release.
8129 for ac_dir in \
8130 /usr/X11/include \
8131 /usr/X11R6/include \
8132 /usr/X11R5/include \
8133 /usr/X11R4/include \
8134 \
8135 /usr/include/X11 \
8136 /usr/include/X11R6 \
8137 /usr/include/X11R5 \
8138 /usr/include/X11R4 \
8139 \
8140 /usr/local/X11/include \
8141 /usr/local/X11R6/include \
8142 /usr/local/X11R5/include \
8143 /usr/local/X11R4/include \
8144 \
8145 /usr/local/include/X11 \
8146 /usr/local/include/X11R6 \
8147 /usr/local/include/X11R5 \
8148 /usr/local/include/X11R4 \
8149 \
8150 /usr/X386/include \
8151 /usr/x386/include \
8152 /usr/XFree86/include/X11 \
8153 \
8154 /usr/include \
8155 /usr/local/include \
8156 /usr/unsupported/include \
8157 /usr/athena/include \
8158 /usr/local/x11r5/include \
8159 /usr/lpp/Xamples/include \
8160 \
8161 /usr/openwin/include \
8162 /usr/openwin/share/include \
8163 ; \
8164 do
8165 if test -r "$ac_dir/$x_direct_test_include"; then
8166 ac_x_includes=$ac_dir
8167 break
8168 fi
8169 done
8170 fi
8171 rm -f conftest*
8172 fi # $ac_x_includes = NO
8173
8174 if test "$ac_x_libraries" = NO; then
8175 # Check for the libraries.
8176
8177 test -z "$x_direct_test_library" && x_direct_test_library=Xt
8178 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8179
8180 # See if we find them without any special options.
8181 # Don't add to $LIBS permanently.
8182 ac_save_LIBS="$LIBS"
8183 LIBS="-l$x_direct_test_library $LIBS"
8184 cat > conftest.$ac_ext <<EOF
8185 #line 8186 "configure"
8186 #include "confdefs.h"
8187
8188 int main() {
8189 ${x_direct_test_function}()
8190 ; return 0; }
8191 EOF
8192 if { (eval echo configure:8193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8193 rm -rf conftest*
8194 LIBS="$ac_save_LIBS"
8195 # We can link X programs with no special library path.
8196 ac_x_libraries=
8197 else
8198 echo "configure: failed program was:" >&5
8199 cat conftest.$ac_ext >&5
8200 rm -rf conftest*
8201 LIBS="$ac_save_LIBS"
8202 # First see if replacing the include by lib works.
8203 # Check X11 before X11Rn because it is often a symlink to the current release.
8204 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8205 /usr/X11/lib \
8206 /usr/X11R6/lib \
8207 /usr/X11R5/lib \
8208 /usr/X11R4/lib \
8209 \
8210 /usr/lib/X11 \
8211 /usr/lib/X11R6 \
8212 /usr/lib/X11R5 \
8213 /usr/lib/X11R4 \
8214 \
8215 /usr/local/X11/lib \
8216 /usr/local/X11R6/lib \
8217 /usr/local/X11R5/lib \
8218 /usr/local/X11R4/lib \
8219 \
8220 /usr/local/lib/X11 \
8221 /usr/local/lib/X11R6 \
8222 /usr/local/lib/X11R5 \
8223 /usr/local/lib/X11R4 \
8224 \
8225 /usr/X386/lib \
8226 /usr/x386/lib \
8227 /usr/XFree86/lib/X11 \
8228 \
8229 /usr/lib \
8230 /usr/local/lib \
8231 /usr/unsupported/lib \
8232 /usr/athena/lib \
8233 /usr/local/x11r5/lib \
8234 /usr/lpp/Xamples/lib \
8235 /lib/usr/lib/X11 \
8236 \
8237 /usr/openwin/lib \
8238 /usr/openwin/share/lib \
8239 ; \
8240 do
8241 for ac_extension in a so sl; do
8242 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8243 ac_x_libraries=$ac_dir
8244 break 2
8245 fi
8246 done
8247 done
8248 fi
8249 rm -f conftest*
8250 fi # $ac_x_libraries = NO
8251
8252 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8253 # Didn't find X anywhere. Cache the known absence of X.
8254 ac_cv_have_x="have_x=no"
8255 else
8256 # Record where we found X for the cache.
8257 ac_cv_have_x="have_x=yes \
8258 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8259 fi
8260 fi
8261 fi
8262 eval "$ac_cv_have_x"
8263 fi # $with_x != no
8264
8265 if test "$have_x" != yes; then
8266 echo "$ac_t""$have_x" 1>&6
8267 no_x=yes
8268 else
8269 # If each of the values was on the command line, it overrides each guess.
8270 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8271 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8272 # Update the cache value to reflect the command line values.
8273 ac_cv_have_x="have_x=yes \
8274 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8275 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8276 fi
8277
8278
8279
8280 # Unlike the sim directory, whether a simulator is linked is controlled by
8281 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
8282 # This code just checks for a few cases where we'd like to ignore those
8283 # definitions, even when they're present in the '.mt' file. These cases
8284 # are when --disable-sim is specified, or if the simulator directory is
8285 # not part of the source tree.
8286 #
8287 # Check whether --enable-sim or --disable-sim was given.
8288 if test "${enable_sim+set}" = set; then
8289 enableval="$enable_sim"
8290 echo "enable_sim = $enable_sim";
8291 echo "enableval = ${enableval}";
8292 case "${enableval}" in
8293 yes) ignore_sim=false ;;
8294 no) ignore_sim=true ;;
8295 *) ignore_sim=false ;;
8296 esac
8297 else
8298 ignore_sim=false
8299 fi
8300
8301
8302 if test ! -d "${srcdir}/../sim"; then
8303 ignore_sim=true
8304 fi
8305
8306 if test "${ignore_sim}" = "true"; then
8307 IGNORE_SIM="SIM="
8308 IGNORE_SIM_OBS="SIM_OBS="
8309 else
8310 IGNORE_SIM=""
8311 IGNORE_SIM_OBS=""
8312 cat >> confdefs.h <<\EOF
8313 #define WITH_SIM 1
8314 EOF
8315
8316 fi
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332 # Begin stuff to support --enable-shared
8333 # Check whether --enable-shared or --disable-shared was given.
8334 if test "${enable_shared+set}" = set; then
8335 enableval="$enable_shared"
8336 case "${enableval}" in
8337 yes) shared=true ;;
8338 no) shared=false ;;
8339 *) shared=true ;;
8340 esac
8341 fi
8342
8343 HLDFLAGS=
8344 HLDENV=
8345 # If we have shared libraries, try to set rpath reasonably.
8346 if test "${shared}" = "true"; then
8347 case "${host}" in
8348 *-*-hpux*)
8349 HLDFLAGS='-Wl,+s,+b,$(libdir)'
8350 ;;
8351 *-*-irix5* | *-*-irix6*)
8352 HLDFLAGS='-Wl,-rpath,$(libdir)'
8353 ;;
8354 *-*-linux*aout*)
8355 ;;
8356 *-*-linux* | *-pc-linux-gnu*)
8357 HLDFLAGS='-Wl,-rpath,$(libdir)'
8358 ;;
8359 *-*-solaris*)
8360 HLDFLAGS='-R $(libdir)'
8361 ;;
8362 *-*-sysv4*)
8363 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;'
8364 ;;
8365 esac
8366 fi
8367
8368 # On SunOS, if the linker supports the -rpath option, use it to
8369 # prevent ../bfd and ../opcodes from being included in the run time
8370 # search path.
8371 case "${host}" in
8372 *-*-sunos*)
8373 echo 'main () { }' > conftest.c
8374 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8375 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8376 :
8377 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8378 :
8379 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8380 :
8381 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8382 :
8383 elif test "${shared}" = "true"; then
8384 HLDFLAGS='-Wl,-rpath=$(libdir)'
8385 else
8386 HLDFLAGS='-Wl,-rpath='
8387 fi
8388 rm -f conftest.t conftest.c conftest
8389 ;;
8390 esac
8391
8392
8393 # End stuff to support --enable-shared
8394
8395 # target_subdir is used by the testsuite to find the target libraries.
8396 target_subdir=
8397 if test "${host}" != "${target}"; then
8398 target_subdir="${target_alias}/"
8399 fi
8400
8401
8402 frags=
8403 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8404 if test ! -f ${host_makefile_frag}; then
8405 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
8406 fi
8407 frags="$frags $host_makefile_frag"
8408
8409 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8410 if test ! -f ${target_makefile_frag}; then
8411 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8412 fi
8413 frags="$frags $target_makefile_frag"
8414
8415
8416
8417
8418
8419 hostfile=`sed -n '
8420 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8421 ' ${host_makefile_frag}`
8422
8423 targetfile=`sed -n '
8424 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8425 ' ${target_makefile_frag}`
8426
8427 GDB_MULTI_ARCH=`sed -n '
8428 s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
8429 ' ${target_makefile_frag}`
8430
8431 # these really aren't orthogonal true/false values of the same condition,
8432 # but shells are slow enough that I like to reuse the test conditions
8433 # whenever possible
8434 if test "${target}" = "${host}"; then
8435 nativefile=`sed -n '
8436 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8437 ' ${host_makefile_frag}`
8438 # else
8439 # GDBserver is only useful in a "native" environment
8440 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
8441 fi
8442
8443
8444 # New targets should just set gdb_multi_arch=yes in configure.tgt.
8445 # Old targets being converted can either do that or set GDB_MULTI_ARCH
8446 # in the target specific makefile frag. Eventually gdb_multi_arch=yes
8447 # will be the default.
8448 if test x"${GDB_MULTI_ARCH}" = x ; then
8449 case "${gdb_multi_arch}" in
8450 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8451 no ) GDB_MULTI_ARCH=0 ;;
8452 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8453 esac
8454 fi
8455 if test x"${GDB_MULTI_ARCH}" != x ; then
8456 cat >> confdefs.h <<EOF
8457 #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8458 EOF
8459
8460 fi
8461 # Warn the user when they use an old practice
8462 case "${GDB_MULTI_ARCH}" in
8463 "" ) ;;
8464 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8465 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8466 GDB_MULTI_ARCH_PURE )
8467 if test x"${targetfile}" != x ; then
8468 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
8469 targetfile=""
8470 fi ;;
8471 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8472 esac
8473
8474
8475 SUBDIRS="doc testsuite nlm"
8476 if test "${enable_multi_ice}" = "yes"; then
8477 SUBDIRS="${SUBDIRS} multi-ice"
8478 fi
8479
8480
8481
8482 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
8483 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8484 # version.
8485
8486 files=
8487 links=
8488
8489 rm -f xm.h
8490 xm_h=""
8491 if test "${hostfile}" != ""; then
8492 xm_h=xm.h
8493 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8494 files="${files} ${GDB_XM_FILE}"
8495 links="${links} xm.h"
8496 cat >> confdefs.h <<EOF
8497 #define GDB_XM_FILE ${GDB_XM_FILE}
8498 EOF
8499
8500 fi
8501
8502
8503 rm -f tm.h
8504 tm_h=""
8505 if test "${targetfile}" != ""; then
8506 tm_h=tm.h
8507 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8508 files="${files} ${GDB_TM_FILE}"
8509 links="${links} tm.h"
8510 cat >> confdefs.h <<EOF
8511 #define GDB_TM_FILE ${GDB_TM_FILE}
8512 EOF
8513
8514 fi
8515
8516
8517 rm -f nm.h
8518 nm_h=""
8519 if test "${nativefile}" != ""; then
8520 nm_h=nm.h
8521 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8522 files="${files} ${GDB_NM_FILE}"
8523 links="${links} nm.h"
8524 cat >> confdefs.h <<EOF
8525 #define GDB_NM_FILE ${GDB_NM_FILE}
8526 EOF
8527
8528 fi
8529
8530
8531 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8532 echo "configure:8533: checking whether ln -s works" >&5
8533 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
8534 echo $ac_n "(cached) $ac_c" 1>&6
8535 else
8536 rm -f conftestdata
8537 if ln -s X conftestdata 2>/dev/null
8538 then
8539 rm -f conftestdata
8540 ac_cv_prog_LN_S="ln -s"
8541 else
8542 ac_cv_prog_LN_S=ln
8543 fi
8544 fi
8545 LN_S="$ac_cv_prog_LN_S"
8546 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8547 echo "$ac_t""yes" 1>&6
8548 else
8549 echo "$ac_t""no" 1>&6
8550 fi
8551
8552
8553
8554
8555 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8556 echo "configure:8557: checking for Cygwin environment" >&5
8557 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8558 echo $ac_n "(cached) $ac_c" 1>&6
8559 else
8560 cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563
8564 int main() {
8565
8566 #ifndef __CYGWIN__
8567 #define __CYGWIN__ __CYGWIN32__
8568 #endif
8569 return __CYGWIN__;
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8573 rm -rf conftest*
8574 ac_cv_cygwin=yes
8575 else
8576 echo "configure: failed program was:" >&5
8577 cat conftest.$ac_ext >&5
8578 rm -rf conftest*
8579 ac_cv_cygwin=no
8580 fi
8581 rm -f conftest*
8582 rm -f conftest*
8583 fi
8584
8585 echo "$ac_t""$ac_cv_cygwin" 1>&6
8586 CYGWIN=
8587 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8588 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8589 echo "configure:8590: checking for mingw32 environment" >&5
8590 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8591 echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593 cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596
8597 int main() {
8598 return __MINGW32__;
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8602 rm -rf conftest*
8603 ac_cv_mingw32=yes
8604 else
8605 echo "configure: failed program was:" >&5
8606 cat conftest.$ac_ext >&5
8607 rm -rf conftest*
8608 ac_cv_mingw32=no
8609 fi
8610 rm -f conftest*
8611 rm -f conftest*
8612 fi
8613
8614 echo "$ac_t""$ac_cv_mingw32" 1>&6
8615 MINGW32=
8616 test "$ac_cv_mingw32" = yes && MINGW32=yes
8617
8618
8619 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8620 echo "configure:8621: checking for executable suffix" >&5
8621 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8622 echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8625 ac_cv_exeext=.exe
8626 else
8627 rm -f conftest*
8628 echo 'int main () { return 0; }' > conftest.$ac_ext
8629 ac_cv_exeext=
8630 if { (eval echo configure:8631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8631 for file in conftest.*; do
8632 case $file in
8633 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
8634 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8635 esac
8636 done
8637 else
8638 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8639 fi
8640 rm -f conftest*
8641 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8642 fi
8643 fi
8644
8645 EXEEXT=""
8646 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8647 echo "$ac_t""${ac_cv_exeext}" 1>&6
8648 ac_exeext=$EXEEXT
8649
8650
8651 subdirs="$configdirs"
8652
8653 trap '' 1 2 15
8654 cat > confcache <<\EOF
8655 # This file is a shell script that caches the results of configure
8656 # tests run on this system so they can be shared between configure
8657 # scripts and configure runs. It is not useful on other systems.
8658 # If it contains results you don't want to keep, you may remove or edit it.
8659 #
8660 # By default, configure uses ./config.cache as the cache file,
8661 # creating it if it does not exist already. You can give configure
8662 # the --cache-file=FILE option to use a different cache file; that is
8663 # what configure does when it calls configure scripts in
8664 # subdirectories, so they share the cache.
8665 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8666 # config.status only pays attention to the cache file if you give it the
8667 # --recheck option to rerun configure.
8668 #
8669 EOF
8670 # The following way of writing the cache mishandles newlines in values,
8671 # but we know of no workaround that is simple, portable, and efficient.
8672 # So, don't put newlines in cache variables' values.
8673 # Ultrix sh set writes to stderr and can't be redirected directly,
8674 # and sets the high bit in the cache file unless we assign to the vars.
8675 (set) 2>&1 |
8676 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8677 *ac_space=\ *)
8678 # `set' does not quote correctly, so add quotes (double-quote substitution
8679 # turns \\\\ into \\, and sed turns \\ into \).
8680 sed -n \
8681 -e "s/'/'\\\\''/g" \
8682 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8683 ;;
8684 *)
8685 # `set' quotes correctly as required by POSIX, so do not add quotes.
8686 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8687 ;;
8688 esac >> confcache
8689 if cmp -s $cache_file confcache; then
8690 :
8691 else
8692 if test -w $cache_file; then
8693 echo "updating cache $cache_file"
8694 cat confcache > $cache_file
8695 else
8696 echo "not updating unwritable cache $cache_file"
8697 fi
8698 fi
8699 rm -f confcache
8700
8701 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8702
8703 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8704 # Let make expand exec_prefix.
8705 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8706
8707 # Any assignment to VPATH causes Sun make to only execute
8708 # the first set of double-colon rules, so remove it if not needed.
8709 # If there is a colon in the path, we need to keep it.
8710 if test "x$srcdir" = x.; then
8711 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8712 fi
8713
8714 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8715
8716 DEFS=-DHAVE_CONFIG_H
8717
8718 # Without the "./", some shells look in PATH for config.status.
8719 : ${CONFIG_STATUS=./config.status}
8720
8721 echo creating $CONFIG_STATUS
8722 rm -f $CONFIG_STATUS
8723 cat > $CONFIG_STATUS <<EOF
8724 #! /bin/sh
8725 # Generated automatically by configure.
8726 # Run this file to recreate the current configuration.
8727 # This directory was configured as follows,
8728 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8729 #
8730 # $0 $ac_configure_args
8731 #
8732 # Compiler output produced by configure, useful for debugging
8733 # configure, is in ./config.log if it exists.
8734
8735 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8736 for ac_option
8737 do
8738 case "\$ac_option" in
8739 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8740 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8741 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8742 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8743 echo "$CONFIG_STATUS generated by autoconf version 2.13"
8744 exit 0 ;;
8745 -help | --help | --hel | --he | --h)
8746 echo "\$ac_cs_usage"; exit 0 ;;
8747 *) echo "\$ac_cs_usage"; exit 1 ;;
8748 esac
8749 done
8750
8751 ac_given_srcdir=$srcdir
8752 ac_given_INSTALL="$INSTALL"
8753
8754 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8755 EOF
8756 cat >> $CONFIG_STATUS <<EOF
8757
8758 # Protect against being on the right side of a sed subst in config.status.
8759 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8760 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8761 $ac_vpsub
8762 $extrasub
8763 s%@SHELL@%$SHELL%g
8764 s%@CFLAGS@%$CFLAGS%g
8765 s%@CPPFLAGS@%$CPPFLAGS%g
8766 s%@CXXFLAGS@%$CXXFLAGS%g
8767 s%@FFLAGS@%$FFLAGS%g
8768 s%@DEFS@%$DEFS%g
8769 s%@LDFLAGS@%$LDFLAGS%g
8770 s%@LIBS@%$LIBS%g
8771 s%@exec_prefix@%$exec_prefix%g
8772 s%@prefix@%$prefix%g
8773 s%@program_transform_name@%$program_transform_name%g
8774 s%@bindir@%$bindir%g
8775 s%@sbindir@%$sbindir%g
8776 s%@libexecdir@%$libexecdir%g
8777 s%@datadir@%$datadir%g
8778 s%@sysconfdir@%$sysconfdir%g
8779 s%@sharedstatedir@%$sharedstatedir%g
8780 s%@localstatedir@%$localstatedir%g
8781 s%@libdir@%$libdir%g
8782 s%@includedir@%$includedir%g
8783 s%@oldincludedir@%$oldincludedir%g
8784 s%@infodir@%$infodir%g
8785 s%@mandir@%$mandir%g
8786 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
8787 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
8788 s%@MAINT@%$MAINT%g
8789 s%@CC@%$CC%g
8790 s%@CPP@%$CPP%g
8791 s%@host@%$host%g
8792 s%@host_alias@%$host_alias%g
8793 s%@host_cpu@%$host_cpu%g
8794 s%@host_vendor@%$host_vendor%g
8795 s%@host_os@%$host_os%g
8796 s%@target@%$target%g
8797 s%@target_alias@%$target_alias%g
8798 s%@target_cpu@%$target_cpu%g
8799 s%@target_vendor@%$target_vendor%g
8800 s%@target_os@%$target_os%g
8801 s%@build@%$build%g
8802 s%@build_alias@%$build_alias%g
8803 s%@build_cpu@%$build_cpu%g
8804 s%@build_vendor@%$build_vendor%g
8805 s%@build_os@%$build_os%g
8806 s%@SET_MAKE@%$SET_MAKE%g
8807 s%@RANLIB@%$RANLIB%g
8808 s%@ALLOCA@%$ALLOCA%g
8809 s%@USE_NLS@%$USE_NLS%g
8810 s%@MSGFMT@%$MSGFMT%g
8811 s%@GMSGFMT@%$GMSGFMT%g
8812 s%@XGETTEXT@%$XGETTEXT%g
8813 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8814 s%@CATALOGS@%$CATALOGS%g
8815 s%@CATOBJEXT@%$CATOBJEXT%g
8816 s%@DATADIRNAME@%$DATADIRNAME%g
8817 s%@GMOFILES@%$GMOFILES%g
8818 s%@INSTOBJEXT@%$INSTOBJEXT%g
8819 s%@INTLDEPS@%$INTLDEPS%g
8820 s%@INTLLIBS@%$INTLLIBS%g
8821 s%@INTLOBJS@%$INTLOBJS%g
8822 s%@POFILES@%$POFILES%g
8823 s%@POSUB@%$POSUB%g
8824 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8825 s%@GT_NO@%$GT_NO%g
8826 s%@GT_YES@%$GT_YES%g
8827 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8828 s%@l@%$l%g
8829 s%@AWK@%$AWK%g
8830 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8831 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8832 s%@INSTALL_DATA@%$INSTALL_DATA%g
8833 s%@AR@%$AR%g
8834 s%@DLLTOOL@%$DLLTOOL%g
8835 s%@WINDRES@%$WINDRES%g
8836 s%@YACC@%$YACC%g
8837 s%@MIG@%$MIG%g
8838 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
8839 s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
8840 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
8841 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
8842 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
8843 s%@MMALLOC@%$MMALLOC%g
8844 s%@REGEX@%$REGEX%g
8845 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
8846 s%@TERM_LIB@%$TERM_LIB%g
8847 s%@WIN32LIBS@%$WIN32LIBS%g
8848 s%@LIBGUI@%$LIBGUI%g
8849 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
8850 s%@WIN32LDAPP@%$WIN32LDAPP%g
8851 s%@TCL_VERSION@%$TCL_VERSION%g
8852 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
8853 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
8854 s%@TCL_CC@%$TCL_CC%g
8855 s%@TCL_DEFS@%$TCL_DEFS%g
8856 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
8857 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
8858 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
8859 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
8860 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
8861 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
8862 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
8863 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
8864 s%@TCL_RANLIB@%$TCL_RANLIB%g
8865 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
8866 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
8867 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
8868 s%@TK_VERSION@%$TK_VERSION%g
8869 s%@TK_DEFS@%$TK_DEFS%g
8870 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
8871 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
8872 s%@TK_XLIBSW@%$TK_XLIBSW%g
8873 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
8874 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
8875 s%@TCLHDIR@%$TCLHDIR%g
8876 s%@TKHDIR@%$TKHDIR%g
8877 s%@ITCLHDIR@%$ITCLHDIR%g
8878 s%@ITKHDIR@%$ITKHDIR%g
8879 s%@TIXHDIR@%$TIXHDIR%g
8880 s%@ITCL_VERSION@%$ITCL_VERSION%g
8881 s%@ITCL_DEFS@%$ITCL_DEFS%g
8882 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
8883 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
8884 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
8885 s%@ITK_VERSION@%$ITK_VERSION%g
8886 s%@ITK_DEFS@%$ITK_DEFS%g
8887 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
8888 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
8889 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
8890 s%@TIX_VERSION@%$TIX_VERSION%g
8891 s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
8892 s%@X_CFLAGS@%$X_CFLAGS%g
8893 s%@X_LDFLAGS@%$X_LDFLAGS%g
8894 s%@X_LIBS@%$X_LIBS%g
8895 s%@TCL_DEPS@%$TCL_DEPS%g
8896 s%@TK_DEPS@%$TK_DEPS%g
8897 s%@ITCLLIB@%$ITCLLIB%g
8898 s%@ITCL_DEPS@%$ITCL_DEPS%g
8899 s%@ITKLIB@%$ITKLIB%g
8900 s%@ITK_DEPS@%$ITK_DEPS%g
8901 s%@TIXLIB@%$TIXLIB%g
8902 s%@TIX_DEPS@%$TIX_DEPS%g
8903 s%@GDBTKLIBS@%$GDBTKLIBS%g
8904 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
8905 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
8906 s%@IGNORE_SIM@%$IGNORE_SIM%g
8907 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
8908 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
8909 s%@CONFIG_OBS@%$CONFIG_OBS%g
8910 s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
8911 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
8912 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
8913 s%@CONFIG_INITS@%$CONFIG_INITS%g
8914 s%@CONFIG_ALL@%$CONFIG_ALL%g
8915 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
8916 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
8917 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
8918 s%@HLDFLAGS@%$HLDFLAGS%g
8919 s%@HLDENV@%$HLDENV%g
8920 s%@target_subdir@%$target_subdir%g
8921 /@host_makefile_frag@/r $host_makefile_frag
8922 s%@host_makefile_frag@%%g
8923 /@target_makefile_frag@/r $target_makefile_frag
8924 s%@target_makefile_frag@%%g
8925 s%@frags@%$frags%g
8926 s%@SUBDIRS@%$SUBDIRS%g
8927 s%@xm_h@%$xm_h%g
8928 s%@tm_h@%$tm_h%g
8929 s%@nm_h@%$nm_h%g
8930 s%@LN_S@%$LN_S%g
8931 s%@EXEEXT@%$EXEEXT%g
8932 s%@subdirs@%$subdirs%g
8933
8934 CEOF
8935 EOF
8936
8937 cat >> $CONFIG_STATUS <<\EOF
8938
8939 # Split the substitutions into bite-sized pieces for seds with
8940 # small command number limits, like on Digital OSF/1 and HP-UX.
8941 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8942 ac_file=1 # Number of current file.
8943 ac_beg=1 # First line for current file.
8944 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8945 ac_more_lines=:
8946 ac_sed_cmds=""
8947 while $ac_more_lines; do
8948 if test $ac_beg -gt 1; then
8949 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8950 else
8951 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8952 fi
8953 if test ! -s conftest.s$ac_file; then
8954 ac_more_lines=false
8955 rm -f conftest.s$ac_file
8956 else
8957 if test -z "$ac_sed_cmds"; then
8958 ac_sed_cmds="sed -f conftest.s$ac_file"
8959 else
8960 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8961 fi
8962 ac_file=`expr $ac_file + 1`
8963 ac_beg=$ac_end
8964 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8965 fi
8966 done
8967 if test -z "$ac_sed_cmds"; then
8968 ac_sed_cmds=cat
8969 fi
8970 EOF
8971
8972 cat >> $CONFIG_STATUS <<EOF
8973
8974 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
8975 EOF
8976 cat >> $CONFIG_STATUS <<\EOF
8977 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8978 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8979 case "$ac_file" in
8980 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8981 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8982 *) ac_file_in="${ac_file}.in" ;;
8983 esac
8984
8985 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8986
8987 # Remove last slash and all that follows it. Not all systems have dirname.
8988 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8989 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8990 # The file is in a subdirectory.
8991 test ! -d "$ac_dir" && mkdir "$ac_dir"
8992 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8993 # A "../" for each directory in $ac_dir_suffix.
8994 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8995 else
8996 ac_dir_suffix= ac_dots=
8997 fi
8998
8999 case "$ac_given_srcdir" in
9000 .) srcdir=.
9001 if test -z "$ac_dots"; then top_srcdir=.
9002 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9003 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9004 *) # Relative path.
9005 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9006 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9007 esac
9008
9009 case "$ac_given_INSTALL" in
9010 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9011 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9012 esac
9013
9014 echo creating "$ac_file"
9015 rm -f "$ac_file"
9016 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9017 case "$ac_file" in
9018 *Makefile*) ac_comsub="1i\\
9019 # $configure_input" ;;
9020 *) ac_comsub= ;;
9021 esac
9022
9023 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9024 sed -e "$ac_comsub
9025 s%@configure_input@%$configure_input%g
9026 s%@srcdir@%$srcdir%g
9027 s%@top_srcdir@%$top_srcdir%g
9028 s%@INSTALL@%$INSTALL%g
9029 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9030 fi; done
9031 rm -f conftest.s*
9032
9033 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9034 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9035 #
9036 # ac_d sets the value in "#define NAME VALUE" lines.
9037 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9038 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9039 ac_dC='\3'
9040 ac_dD='%g'
9041 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9042 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9043 ac_uB='\([ ]\)%\1#\2define\3'
9044 ac_uC=' '
9045 ac_uD='\4%g'
9046 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9047 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9048 ac_eB='$%\1#\2define\3'
9049 ac_eC=' '
9050 ac_eD='%g'
9051
9052 if test "${CONFIG_HEADERS+set}" != set; then
9053 EOF
9054 cat >> $CONFIG_STATUS <<EOF
9055 CONFIG_HEADERS="config.h:config.in"
9056 EOF
9057 cat >> $CONFIG_STATUS <<\EOF
9058 fi
9059 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9060 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9061 case "$ac_file" in
9062 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9063 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9064 *) ac_file_in="${ac_file}.in" ;;
9065 esac
9066
9067 echo creating $ac_file
9068
9069 rm -f conftest.frag conftest.in conftest.out
9070 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9071 cat $ac_file_inputs > conftest.in
9072
9073 EOF
9074
9075 # Transform confdefs.h into a sed script conftest.vals that substitutes
9076 # the proper values into config.h.in to produce config.h. And first:
9077 # Protect against being on the right side of a sed subst in config.status.
9078 # Protect against being in an unquoted here document in config.status.
9079 rm -f conftest.vals
9080 cat > conftest.hdr <<\EOF
9081 s/[\\&%]/\\&/g
9082 s%[\\$`]%\\&%g
9083 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9084 s%ac_d%ac_u%gp
9085 s%ac_u%ac_e%gp
9086 EOF
9087 sed -n -f conftest.hdr confdefs.h > conftest.vals
9088 rm -f conftest.hdr
9089
9090 # This sed command replaces #undef with comments. This is necessary, for
9091 # example, in the case of _POSIX_SOURCE, which is predefined and required
9092 # on some systems where configure will not decide to define it.
9093 cat >> conftest.vals <<\EOF
9094 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9095 EOF
9096
9097 # Break up conftest.vals because some shells have a limit on
9098 # the size of here documents, and old seds have small limits too.
9099
9100 rm -f conftest.tail
9101 while :
9102 do
9103 ac_lines=`grep -c . conftest.vals`
9104 # grep -c gives empty output for an empty file on some AIX systems.
9105 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9106 # Write a limited-size here document to conftest.frag.
9107 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9108 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9109 echo 'CEOF
9110 sed -f conftest.frag conftest.in > conftest.out
9111 rm -f conftest.in
9112 mv conftest.out conftest.in
9113 ' >> $CONFIG_STATUS
9114 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9115 rm -f conftest.vals
9116 mv conftest.tail conftest.vals
9117 done
9118 rm -f conftest.vals
9119
9120 cat >> $CONFIG_STATUS <<\EOF
9121 rm -f conftest.frag conftest.h
9122 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9123 cat conftest.in >> conftest.h
9124 rm -f conftest.in
9125 if cmp -s $ac_file conftest.h 2>/dev/null; then
9126 echo "$ac_file is unchanged"
9127 rm -f conftest.h
9128 else
9129 # Remove last slash and all that follows it. Not all systems have dirname.
9130 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9131 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9132 # The file is in a subdirectory.
9133 test ! -d "$ac_dir" && mkdir "$ac_dir"
9134 fi
9135 rm -f $ac_file
9136 mv conftest.h $ac_file
9137 fi
9138 fi; done
9139
9140 EOF
9141
9142 cat >> $CONFIG_STATUS <<EOF
9143 ac_sources="$files"
9144 ac_dests="$links"
9145 EOF
9146
9147 cat >> $CONFIG_STATUS <<\EOF
9148 srcdir=$ac_given_srcdir
9149 while test -n "$ac_sources"; do
9150 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9151 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9152
9153 echo "linking $srcdir/$ac_source to $ac_dest"
9154
9155 if test ! -r $srcdir/$ac_source; then
9156 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9157 fi
9158 rm -f $ac_dest
9159
9160 # Make relative symlinks.
9161 # Remove last slash and all that follows it. Not all systems have dirname.
9162 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9163 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9164 # The dest file is in a subdirectory.
9165 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9166 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9167 # A "../" for each directory in $ac_dest_dir_suffix.
9168 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9169 else
9170 ac_dest_dir_suffix= ac_dots=
9171 fi
9172
9173 case "$srcdir" in
9174 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9175 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9176 esac
9177
9178 # Make a symlink if possible; otherwise try a hard link.
9179 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9180 ln $srcdir/$ac_source $ac_dest; then :
9181 else
9182 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9183 fi
9184 done
9185 EOF
9186 cat >> $CONFIG_STATUS <<EOF
9187
9188 gdb_host_cpu=$gdb_host_cpu
9189 gdb_target_cpu=$gdb_target_cpu
9190 nativefile=$nativefile
9191
9192 EOF
9193 cat >> $CONFIG_STATUS <<\EOF
9194
9195 if test "${nativefile}" = ""; then
9196 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
9197 < Makefile > Makefile.tem
9198 mv -f Makefile.tem Makefile
9199 fi
9200
9201 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
9202 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
9203 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9204 mv -f Makefile.tmp Makefile
9205
9206
9207 case x$CONFIG_HEADERS in
9208 xconfig.h:config.in)
9209 echo > stamp-h ;;
9210 esac
9211
9212 exit 0
9213 EOF
9214 chmod +x $CONFIG_STATUS
9215 rm -fr confdefs* $ac_clean_files
9216 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9217
9218 if test "$no_recursion" != yes; then
9219
9220 # Remove --cache-file and --srcdir arguments so they do not pile up.
9221 ac_sub_configure_args=
9222 ac_prev=
9223 for ac_arg in $ac_configure_args; do
9224 if test -n "$ac_prev"; then
9225 ac_prev=
9226 continue
9227 fi
9228 case "$ac_arg" in
9229 -cache-file | --cache-file | --cache-fil | --cache-fi \
9230 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9231 ac_prev=cache_file ;;
9232 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9233 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9234 ;;
9235 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9236 ac_prev=srcdir ;;
9237 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9238 ;;
9239 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9240 esac
9241 done
9242
9243 for ac_config_dir in $configdirs; do
9244
9245 # Do not complain, so a configure script can configure whichever
9246 # parts of a large source tree are present.
9247 if test ! -d $srcdir/$ac_config_dir; then
9248 continue
9249 fi
9250
9251 echo configuring in $ac_config_dir
9252
9253 case "$srcdir" in
9254 .) ;;
9255 *)
9256 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9257 else
9258 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9259 fi
9260 ;;
9261 esac
9262
9263 ac_popdir=`pwd`
9264 cd $ac_config_dir
9265
9266 # A "../" for each directory in /$ac_config_dir.
9267 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9268
9269 case "$srcdir" in
9270 .) # No --srcdir option. We are building in place.
9271 ac_sub_srcdir=$srcdir ;;
9272 /*) # Absolute path.
9273 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9274 *) # Relative path.
9275 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9276 esac
9277
9278 # Check for guested configure; otherwise get Cygnus style configure.
9279 if test -f $ac_sub_srcdir/configure; then
9280 ac_sub_configure=$ac_sub_srcdir/configure
9281 elif test -f $ac_sub_srcdir/configure.in; then
9282 ac_sub_configure=$ac_configure
9283 else
9284 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9285 ac_sub_configure=
9286 fi
9287
9288 # The recursion is here.
9289 if test -n "$ac_sub_configure"; then
9290
9291 # Make the cache file name correct relative to the subdirectory.
9292 case "$cache_file" in
9293 /*) ac_sub_cache_file=$cache_file ;;
9294 *) # Relative path.
9295 ac_sub_cache_file="$ac_dots$cache_file" ;;
9296 esac
9297 case "$ac_given_INSTALL" in
9298 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9299 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9300 esac
9301
9302 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9303 # The eval makes quoting arguments work.
9304 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9305 then :
9306 else
9307 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9308 fi
9309 fi
9310
9311 cd $ac_popdir
9312 done
9313 fi
9314
9315
9316 exit 0
This page took 0.257641 seconds and 4 git commands to generate.