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