2004-01-26 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19 ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
21 ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
23 ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25 ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
27 ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
29 ac_help="$ac_help
30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
31 ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
33 ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
35 ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
39 ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
41 ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
43 ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
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-x use the X Window System"
59 ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
61 ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
63 ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
65
66 # Initialize some variables set by options.
67 # The variables have the same names as the options, with
68 # dashes changed to underlines.
69 build=NONE
70 cache_file=./config.cache
71 exec_prefix=NONE
72 host=NONE
73 no_create=
74 nonopt=NONE
75 no_recursion=
76 prefix=NONE
77 program_prefix=NONE
78 program_suffix=NONE
79 program_transform_name=s,x,x,
80 silent=
81 site=
82 sitefile=
83 srcdir=
84 target=NONE
85 verbose=
86 x_includes=NONE
87 x_libraries=NONE
88 bindir='${exec_prefix}/bin'
89 sbindir='${exec_prefix}/sbin'
90 libexecdir='${exec_prefix}/libexec'
91 datadir='${prefix}/share'
92 sysconfdir='${prefix}/etc'
93 sharedstatedir='${prefix}/com'
94 localstatedir='${prefix}/var'
95 libdir='${exec_prefix}/lib'
96 includedir='${prefix}/include'
97 oldincludedir='/usr/include'
98 infodir='${prefix}/info'
99 mandir='${prefix}/man'
100
101 # Initialize some other variables.
102 subdirs=
103 MFLAGS= MAKEFLAGS=
104 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
197 --site-file=FILE use FILE as the site file
198 --version print the version of autoconf that created configure
199 Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223 EOF
224 cat << EOF
225 Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229 Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236 EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451 done
452
453 if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468 exec 6>/dev/null
469 else
470 exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set. These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525 else
526 ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
545 fi
546 else
547 CONFIG_SITE="$sitefile"
548 fi
549 for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554 done
555
556 if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559 else
560 echo "creating cache $cache_file"
561 > $cache_file
562 fi
563
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
570
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577 ' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581 else
582 ac_n= ac_c='\c' ac_t=
583 fi
584
585
586
587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
588 echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590 if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593 else
594 USE_MAINTAINER_MODE=no
595 fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600 if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603 else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606 fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
610
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617 else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620 else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631 fi
632 fi
633 CC="$ac_cv_prog_CC"
634 if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636 else
637 echo "$ac_t""no" 1>&6
638 fi
639
640 if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647 else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650 else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666 if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679 fi
680 fi
681 fi
682 CC="$ac_cv_prog_CC"
683 if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685 else
686 echo "$ac_t""no" 1>&6
687 fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717 else
718 echo "$ac_t""no" 1>&6
719 fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729 ac_ext=c
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 cat > conftest.$ac_ext << EOF
737
738 #line 739 "configure"
739 #include "confdefs.h"
740
741 main(){return(0);}
742 EOF
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751 else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755 fi
756 rm -fr conftest*
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767 fi
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
772
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777 else
778 cat > conftest.c <<EOF
779 #ifdef __GNUC__
780 yes;
781 #endif
782 EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
784 ac_cv_prog_gcc=yes
785 else
786 ac_cv_prog_gcc=no
787 fi
788 fi
789
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792 if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794 else
795 GCC=
796 fi
797
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
800 CFLAGS=
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809 else
810 ac_cv_prog_cc_g=no
811 fi
812 rm -f conftest*
813
814 fi
815
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825 else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831 fi
832
833 cat >> confdefs.h <<\EOF
834 #define _GNU_SOURCE 1
835 EOF
836
837
838 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
839 echo "configure:840: checking how to run the C preprocessor" >&5
840 # On Suns, sometimes $CPP names a directory.
841 if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843 fi
844 if test -z "$CPP"; then
845 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847 else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
854 #line 855 "configure"
855 #include "confdefs.h"
856 #include <assert.h>
857 Syntax Error
858 EOF
859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
860 { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862 if test -z "$ac_err"; then
863 :
864 else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
871 #line 872 "configure"
872 #include "confdefs.h"
873 #include <assert.h>
874 Syntax Error
875 EOF
876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
877 { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879 if test -z "$ac_err"; then
880 :
881 else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
888 #line 889 "configure"
889 #include "confdefs.h"
890 #include <assert.h>
891 Syntax Error
892 EOF
893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
894 { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896 if test -z "$ac_err"; then
897 :
898 else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904 fi
905 rm -f conftest*
906 fi
907 rm -f conftest*
908 fi
909 rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911 fi
912 CPP="$ac_cv_prog_CPP"
913 else
914 ac_cv_prog_CPP="$CPP"
915 fi
916 echo "$ac_t""$CPP" 1>&6
917
918 echo $ac_n "checking for AIX""... $ac_c" 1>&6
919 echo "configure:920: checking for AIX" >&5
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
923 #ifdef _AIX
924 yes
925 #endif
926
927 EOF
928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932 #define _ALL_SOURCE 1
933 EOF
934
935 else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938 fi
939 rm -f conftest*
940
941
942 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
943 echo "configure:944: checking for POSIXized ISC" >&5
944 if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946 then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950 #define _POSIX_SOURCE 1
951 EOF
952
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
958 else
959 echo "$ac_t""no" 1>&6
960 ISC=
961 fi
962
963
964
965
966 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
967 echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
968 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970 else
971 am_cv_prog_cc_stdc=no
972 ac_save_CC="$CC"
973 # Don't try gcc -ansi; that turns off useful extensions and
974 # breaks some systems' header files.
975 # AIX -qlanglvl=ansi
976 # Ultrix and OSF/1 -std1
977 # HP-UX 10.20 and later -Ae
978 # HP-UX older versions -Aa -D_HPUX_SOURCE
979 # SVR4 -Xc -D__EXTENSIONS__
980 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
981 do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
984 #line 985 "configure"
985 #include "confdefs.h"
986 #include <stdarg.h>
987 #include <stdio.h>
988 #include <sys/types.h>
989 #include <sys/stat.h>
990 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991 struct buf { int x; };
992 FILE * (*rcsopen) (struct buf *, struct stat *, int);
993 static char *e (p, i)
994 char **p;
995 int i;
996 {
997 return p[i];
998 }
999 static char *f (char * (*g) (char **, int), char **p, ...)
1000 {
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007 }
1008 int test (int i, double x);
1009 struct s1 {int (*f) (int a);};
1010 struct s2 {int (*f) (double a);};
1011 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012 int argc;
1013 char **argv;
1014
1015 int main() {
1016
1017 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019 ; return 0; }
1020 EOF
1021 if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024 else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027 fi
1028 rm -f conftest*
1029 done
1030 CC="$ac_save_CC"
1031
1032 fi
1033
1034 if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036 else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038 fi
1039 case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042 esac
1043
1044
1045 ac_aux_dir=
1046 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056 done
1057 if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059 fi
1060 ac_config_guess=$ac_aux_dir/config.guess
1061 ac_config_sub=$ac_aux_dir/config.sub
1062 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065 # Do some error checking and defaulting for the host and target type.
1066 # The inputs are:
1067 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068 #
1069 # The rules are:
1070 # 1. You are not allowed to specify --host, --target, and nonopt at the
1071 # same time.
1072 # 2. Host defaults to nonopt.
1073 # 3. If nonopt is not specified, then host defaults to the current host,
1074 # as determined by config.guess.
1075 # 4. Target and build default to nonopt.
1076 # 5. If nonopt is not specified, then target and build default to host.
1077
1078 # The aliases save the names the user supplied, while $host etc.
1079 # will get canonicalized.
1080 case $host---$target---$nonopt in
1081 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083 esac
1084
1085
1086 # Make sure we can run config.sub.
1087 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089 fi
1090
1091 echo $ac_n "checking host system type""... $ac_c" 1>&6
1092 echo "configure:1093: checking host system type" >&5
1093
1094 host_alias=$host
1095 case "$host_alias" in
1096 NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104 esac
1105
1106 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110 echo "$ac_t""$host" 1>&6
1111
1112 echo $ac_n "checking target system type""... $ac_c" 1>&6
1113 echo "configure:1114: checking target system type" >&5
1114
1115 target_alias=$target
1116 case "$target_alias" in
1117 NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122 esac
1123
1124 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 echo "$ac_t""$target" 1>&6
1129
1130 echo $ac_n "checking build system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking build system type" >&5
1132
1133 build_alias=$build
1134 case "$build_alias" in
1135 NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140 esac
1141
1142 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146 echo "$ac_t""$build" 1>&6
1147
1148 test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
1154 # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155 # doesn't support cross-compilation, but the one from Autoconf 2.5x
1156 # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157 # deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1158 # AC_PROG_RANLIB. This can be removed when we switch to Autoconf
1159 # 2.5x.
1160 if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162 else
1163 ac_tool_prefix=
1164 fi
1165
1166 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167 set dummy ${ac_tool_prefix}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="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186 fi
1187 fi
1188 RANLIB="$ac_cv_prog_RANLIB"
1189 if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191 else
1192 echo "$ac_t""no" 1>&6
1193 fi
1194
1195
1196 if test -z "$ac_cv_prog_RANLIB"; then
1197 if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199 set dummy ranlib; ac_word=$2
1200 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1201 echo "configure:1202: checking for $ac_word" >&5
1202 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207 else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219 fi
1220 fi
1221 RANLIB="$ac_cv_prog_RANLIB"
1222 if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224 else
1225 echo "$ac_t""no" 1>&6
1226 fi
1227
1228 else
1229 RANLIB=":"
1230 fi
1231 fi
1232
1233
1234 ALL_LINGUAS=
1235 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1236 echo "configure:1237: checking whether ${MAKE-make} sets \${MAKE}" >&5
1237 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1238 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1239 echo $ac_n "(cached) $ac_c" 1>&6
1240 else
1241 cat > conftestmake <<\EOF
1242 all:
1243 @echo 'ac_maketemp="${MAKE}"'
1244 EOF
1245 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1246 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1247 if test -n "$ac_maketemp"; then
1248 eval ac_cv_prog_make_${ac_make}_set=yes
1249 else
1250 eval ac_cv_prog_make_${ac_make}_set=no
1251 fi
1252 rm -f conftestmake
1253 fi
1254 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1255 echo "$ac_t""yes" 1>&6
1256 SET_MAKE=
1257 else
1258 echo "$ac_t""no" 1>&6
1259 SET_MAKE="MAKE=${MAKE-make}"
1260 fi
1261
1262 # Extract the first word of "ranlib", so it can be a program name with args.
1263 set dummy ranlib; ac_word=$2
1264 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1265 echo "configure:1266: checking for $ac_word" >&5
1266 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1267 echo $ac_n "(cached) $ac_c" 1>&6
1268 else
1269 if test -n "$RANLIB"; then
1270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1271 else
1272 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1273 ac_dummy="$PATH"
1274 for ac_dir in $ac_dummy; do
1275 test -z "$ac_dir" && ac_dir=.
1276 if test -f $ac_dir/$ac_word; then
1277 ac_cv_prog_RANLIB="ranlib"
1278 break
1279 fi
1280 done
1281 IFS="$ac_save_ifs"
1282 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1283 fi
1284 fi
1285 RANLIB="$ac_cv_prog_RANLIB"
1286 if test -n "$RANLIB"; then
1287 echo "$ac_t""$RANLIB" 1>&6
1288 else
1289 echo "$ac_t""no" 1>&6
1290 fi
1291
1292 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1293 echo "configure:1294: checking for ANSI C header files" >&5
1294 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1295 echo $ac_n "(cached) $ac_c" 1>&6
1296 else
1297 cat > conftest.$ac_ext <<EOF
1298 #line 1299 "configure"
1299 #include "confdefs.h"
1300 #include <stdlib.h>
1301 #include <stdarg.h>
1302 #include <string.h>
1303 #include <float.h>
1304 EOF
1305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1306 { (eval echo configure:1307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1308 if test -z "$ac_err"; then
1309 rm -rf conftest*
1310 ac_cv_header_stdc=yes
1311 else
1312 echo "$ac_err" >&5
1313 echo "configure: failed program was:" >&5
1314 cat conftest.$ac_ext >&5
1315 rm -rf conftest*
1316 ac_cv_header_stdc=no
1317 fi
1318 rm -f conftest*
1319
1320 if test $ac_cv_header_stdc = yes; then
1321 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1322 cat > conftest.$ac_ext <<EOF
1323 #line 1324 "configure"
1324 #include "confdefs.h"
1325 #include <string.h>
1326 EOF
1327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1328 egrep "memchr" >/dev/null 2>&1; then
1329 :
1330 else
1331 rm -rf conftest*
1332 ac_cv_header_stdc=no
1333 fi
1334 rm -f conftest*
1335
1336 fi
1337
1338 if test $ac_cv_header_stdc = yes; then
1339 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1340 cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 #include <stdlib.h>
1344 EOF
1345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1346 egrep "free" >/dev/null 2>&1; then
1347 :
1348 else
1349 rm -rf conftest*
1350 ac_cv_header_stdc=no
1351 fi
1352 rm -f conftest*
1353
1354 fi
1355
1356 if test $ac_cv_header_stdc = yes; then
1357 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1358 if test "$cross_compiling" = yes; then
1359 :
1360 else
1361 cat > conftest.$ac_ext <<EOF
1362 #line 1363 "configure"
1363 #include "confdefs.h"
1364 #include <ctype.h>
1365 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1366 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1367 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1368 int main () { int i; for (i = 0; i < 256; i++)
1369 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1370 exit (0); }
1371
1372 EOF
1373 if { (eval echo configure:1374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1374 then
1375 :
1376 else
1377 echo "configure: failed program was:" >&5
1378 cat conftest.$ac_ext >&5
1379 rm -fr conftest*
1380 ac_cv_header_stdc=no
1381 fi
1382 rm -fr conftest*
1383 fi
1384
1385 fi
1386 fi
1387
1388 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1389 if test $ac_cv_header_stdc = yes; then
1390 cat >> confdefs.h <<\EOF
1391 #define STDC_HEADERS 1
1392 EOF
1393
1394 fi
1395
1396 echo $ac_n "checking for working const""... $ac_c" 1>&6
1397 echo "configure:1398: checking for working const" >&5
1398 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1399 echo $ac_n "(cached) $ac_c" 1>&6
1400 else
1401 cat > conftest.$ac_ext <<EOF
1402 #line 1403 "configure"
1403 #include "confdefs.h"
1404
1405 int main() {
1406
1407 /* Ultrix mips cc rejects this. */
1408 typedef int charset[2]; const charset x;
1409 /* SunOS 4.1.1 cc rejects this. */
1410 char const *const *ccp;
1411 char **p;
1412 /* NEC SVR4.0.2 mips cc rejects this. */
1413 struct point {int x, y;};
1414 static struct point const zero = {0,0};
1415 /* AIX XL C 1.02.0.0 rejects this.
1416 It does not let you subtract one const X* pointer from another in an arm
1417 of an if-expression whose if-part is not a constant expression */
1418 const char *g = "string";
1419 ccp = &g + (g ? g-g : 0);
1420 /* HPUX 7.0 cc rejects these. */
1421 ++ccp;
1422 p = (char**) ccp;
1423 ccp = (char const *const *) p;
1424 { /* SCO 3.2v4 cc rejects this. */
1425 char *t;
1426 char const *s = 0 ? (char *) 0 : (char const *) 0;
1427
1428 *t++ = 0;
1429 }
1430 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1431 int x[] = {25, 17};
1432 const int *foo = &x[0];
1433 ++foo;
1434 }
1435 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1436 typedef const int *iptr;
1437 iptr p = 0;
1438 ++p;
1439 }
1440 { /* AIX XL C 1.02.0.0 rejects this saying
1441 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1442 struct s { int j; const int *ap[3]; };
1443 struct s *b; b->j = 5;
1444 }
1445 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1446 const int foo = 10;
1447 }
1448
1449 ; return 0; }
1450 EOF
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452 rm -rf conftest*
1453 ac_cv_c_const=yes
1454 else
1455 echo "configure: failed program was:" >&5
1456 cat conftest.$ac_ext >&5
1457 rm -rf conftest*
1458 ac_cv_c_const=no
1459 fi
1460 rm -f conftest*
1461 fi
1462
1463 echo "$ac_t""$ac_cv_c_const" 1>&6
1464 if test $ac_cv_c_const = no; then
1465 cat >> confdefs.h <<\EOF
1466 #define const
1467 EOF
1468
1469 fi
1470
1471 echo $ac_n "checking for inline""... $ac_c" 1>&6
1472 echo "configure:1473: checking for inline" >&5
1473 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1474 echo $ac_n "(cached) $ac_c" 1>&6
1475 else
1476 ac_cv_c_inline=no
1477 for ac_kw in inline __inline__ __inline; do
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1481
1482 int main() {
1483 } $ac_kw foo() {
1484 ; return 0; }
1485 EOF
1486 if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1487 rm -rf conftest*
1488 ac_cv_c_inline=$ac_kw; break
1489 else
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1492 fi
1493 rm -f conftest*
1494 done
1495
1496 fi
1497
1498 echo "$ac_t""$ac_cv_c_inline" 1>&6
1499 case "$ac_cv_c_inline" in
1500 inline | yes) ;;
1501 no) cat >> confdefs.h <<\EOF
1502 #define inline
1503 EOF
1504 ;;
1505 *) cat >> confdefs.h <<EOF
1506 #define inline $ac_cv_c_inline
1507 EOF
1508 ;;
1509 esac
1510
1511 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1512 echo "configure:1513: checking for off_t" >&5
1513 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1514 echo $ac_n "(cached) $ac_c" 1>&6
1515 else
1516 cat > conftest.$ac_ext <<EOF
1517 #line 1518 "configure"
1518 #include "confdefs.h"
1519 #include <sys/types.h>
1520 #if STDC_HEADERS
1521 #include <stdlib.h>
1522 #include <stddef.h>
1523 #endif
1524 EOF
1525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1526 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1527 rm -rf conftest*
1528 ac_cv_type_off_t=yes
1529 else
1530 rm -rf conftest*
1531 ac_cv_type_off_t=no
1532 fi
1533 rm -f conftest*
1534
1535 fi
1536 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1537 if test $ac_cv_type_off_t = no; then
1538 cat >> confdefs.h <<\EOF
1539 #define off_t long
1540 EOF
1541
1542 fi
1543
1544 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1545 echo "configure:1546: checking for size_t" >&5
1546 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1547 echo $ac_n "(cached) $ac_c" 1>&6
1548 else
1549 cat > conftest.$ac_ext <<EOF
1550 #line 1551 "configure"
1551 #include "confdefs.h"
1552 #include <sys/types.h>
1553 #if STDC_HEADERS
1554 #include <stdlib.h>
1555 #include <stddef.h>
1556 #endif
1557 EOF
1558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1559 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1560 rm -rf conftest*
1561 ac_cv_type_size_t=yes
1562 else
1563 rm -rf conftest*
1564 ac_cv_type_size_t=no
1565 fi
1566 rm -f conftest*
1567
1568 fi
1569 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1570 if test $ac_cv_type_size_t = no; then
1571 cat >> confdefs.h <<\EOF
1572 #define size_t unsigned
1573 EOF
1574
1575 fi
1576
1577 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1578 # for constant arguments. Useless!
1579 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1580 echo "configure:1581: checking for working alloca.h" >&5
1581 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1582 echo $ac_n "(cached) $ac_c" 1>&6
1583 else
1584 cat > conftest.$ac_ext <<EOF
1585 #line 1586 "configure"
1586 #include "confdefs.h"
1587 #include <alloca.h>
1588 int main() {
1589 char *p = alloca(2 * sizeof(int));
1590 ; return 0; }
1591 EOF
1592 if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1593 rm -rf conftest*
1594 ac_cv_header_alloca_h=yes
1595 else
1596 echo "configure: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 rm -rf conftest*
1599 ac_cv_header_alloca_h=no
1600 fi
1601 rm -f conftest*
1602 fi
1603
1604 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1605 if test $ac_cv_header_alloca_h = yes; then
1606 cat >> confdefs.h <<\EOF
1607 #define HAVE_ALLOCA_H 1
1608 EOF
1609
1610 fi
1611
1612 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1613 echo "configure:1614: checking for alloca" >&5
1614 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1615 echo $ac_n "(cached) $ac_c" 1>&6
1616 else
1617 cat > conftest.$ac_ext <<EOF
1618 #line 1619 "configure"
1619 #include "confdefs.h"
1620
1621 #ifdef __GNUC__
1622 # define alloca __builtin_alloca
1623 #else
1624 # ifdef _MSC_VER
1625 # include <malloc.h>
1626 # define alloca _alloca
1627 # else
1628 # if HAVE_ALLOCA_H
1629 # include <alloca.h>
1630 # else
1631 # ifdef _AIX
1632 #pragma alloca
1633 # else
1634 # ifndef alloca /* predefined by HP cc +Olibcalls */
1635 char *alloca ();
1636 # endif
1637 # endif
1638 # endif
1639 # endif
1640 #endif
1641
1642 int main() {
1643 char *p = (char *) alloca(1);
1644 ; return 0; }
1645 EOF
1646 if { (eval echo configure:1647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1647 rm -rf conftest*
1648 ac_cv_func_alloca_works=yes
1649 else
1650 echo "configure: failed program was:" >&5
1651 cat conftest.$ac_ext >&5
1652 rm -rf conftest*
1653 ac_cv_func_alloca_works=no
1654 fi
1655 rm -f conftest*
1656 fi
1657
1658 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1659 if test $ac_cv_func_alloca_works = yes; then
1660 cat >> confdefs.h <<\EOF
1661 #define HAVE_ALLOCA 1
1662 EOF
1663
1664 fi
1665
1666 if test $ac_cv_func_alloca_works = no; then
1667 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1668 # that cause trouble. Some versions do not even contain alloca or
1669 # contain a buggy version. If you still want to use their alloca,
1670 # use ar to extract alloca.o from them instead of compiling alloca.c.
1671 ALLOCA=alloca.${ac_objext}
1672 cat >> confdefs.h <<\EOF
1673 #define C_ALLOCA 1
1674 EOF
1675
1676
1677 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1678 echo "configure:1679: checking whether alloca needs Cray hooks" >&5
1679 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1680 echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682 cat > conftest.$ac_ext <<EOF
1683 #line 1684 "configure"
1684 #include "confdefs.h"
1685 #if defined(CRAY) && ! defined(CRAY2)
1686 webecray
1687 #else
1688 wenotbecray
1689 #endif
1690
1691 EOF
1692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1693 egrep "webecray" >/dev/null 2>&1; then
1694 rm -rf conftest*
1695 ac_cv_os_cray=yes
1696 else
1697 rm -rf conftest*
1698 ac_cv_os_cray=no
1699 fi
1700 rm -f conftest*
1701
1702 fi
1703
1704 echo "$ac_t""$ac_cv_os_cray" 1>&6
1705 if test $ac_cv_os_cray = yes; then
1706 for ac_func in _getb67 GETB67 getb67; do
1707 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_func" >&5
1709 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 cat > conftest.$ac_ext <<EOF
1713 #line 1714 "configure"
1714 #include "confdefs.h"
1715 /* System header to define __stub macros and hopefully few prototypes,
1716 which can conflict with char $ac_func(); below. */
1717 #include <assert.h>
1718 /* Override any gcc2 internal prototype to avoid an error. */
1719 /* We use char because int might match the return type of a gcc2
1720 builtin and then its argument prototype would still apply. */
1721 char $ac_func();
1722
1723 int main() {
1724
1725 /* The GNU C library defines this for functions which it implements
1726 to always fail with ENOSYS. Some functions are actually named
1727 something starting with __ and the normal name is an alias. */
1728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1729 choke me
1730 #else
1731 $ac_func();
1732 #endif
1733
1734 ; return 0; }
1735 EOF
1736 if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1737 rm -rf conftest*
1738 eval "ac_cv_func_$ac_func=yes"
1739 else
1740 echo "configure: failed program was:" >&5
1741 cat conftest.$ac_ext >&5
1742 rm -rf conftest*
1743 eval "ac_cv_func_$ac_func=no"
1744 fi
1745 rm -f conftest*
1746 fi
1747
1748 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1749 echo "$ac_t""yes" 1>&6
1750 cat >> confdefs.h <<EOF
1751 #define CRAY_STACKSEG_END $ac_func
1752 EOF
1753
1754 break
1755 else
1756 echo "$ac_t""no" 1>&6
1757 fi
1758
1759 done
1760 fi
1761
1762 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1763 echo "configure:1764: checking stack direction for C alloca" >&5
1764 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1765 echo $ac_n "(cached) $ac_c" 1>&6
1766 else
1767 if test "$cross_compiling" = yes; then
1768 ac_cv_c_stack_direction=0
1769 else
1770 cat > conftest.$ac_ext <<EOF
1771 #line 1772 "configure"
1772 #include "confdefs.h"
1773 find_stack_direction ()
1774 {
1775 static char *addr = 0;
1776 auto char dummy;
1777 if (addr == 0)
1778 {
1779 addr = &dummy;
1780 return find_stack_direction ();
1781 }
1782 else
1783 return (&dummy > addr) ? 1 : -1;
1784 }
1785 main ()
1786 {
1787 exit (find_stack_direction() < 0);
1788 }
1789 EOF
1790 if { (eval echo configure:1791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1791 then
1792 ac_cv_c_stack_direction=1
1793 else
1794 echo "configure: failed program was:" >&5
1795 cat conftest.$ac_ext >&5
1796 rm -fr conftest*
1797 ac_cv_c_stack_direction=-1
1798 fi
1799 rm -fr conftest*
1800 fi
1801
1802 fi
1803
1804 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1805 cat >> confdefs.h <<EOF
1806 #define STACK_DIRECTION $ac_cv_c_stack_direction
1807 EOF
1808
1809 fi
1810
1811 for ac_hdr in unistd.h
1812 do
1813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1815 echo "configure:1816: checking for $ac_hdr" >&5
1816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1817 echo $ac_n "(cached) $ac_c" 1>&6
1818 else
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 #include <$ac_hdr>
1823 EOF
1824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1825 { (eval echo configure:1826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1827 if test -z "$ac_err"; then
1828 rm -rf conftest*
1829 eval "ac_cv_header_$ac_safe=yes"
1830 else
1831 echo "$ac_err" >&5
1832 echo "configure: failed program was:" >&5
1833 cat conftest.$ac_ext >&5
1834 rm -rf conftest*
1835 eval "ac_cv_header_$ac_safe=no"
1836 fi
1837 rm -f conftest*
1838 fi
1839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1840 echo "$ac_t""yes" 1>&6
1841 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1842 cat >> confdefs.h <<EOF
1843 #define $ac_tr_hdr 1
1844 EOF
1845
1846 else
1847 echo "$ac_t""no" 1>&6
1848 fi
1849 done
1850
1851 for ac_func in getpagesize
1852 do
1853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1854 echo "configure:1855: checking for $ac_func" >&5
1855 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1856 echo $ac_n "(cached) $ac_c" 1>&6
1857 else
1858 cat > conftest.$ac_ext <<EOF
1859 #line 1860 "configure"
1860 #include "confdefs.h"
1861 /* System header to define __stub macros and hopefully few prototypes,
1862 which can conflict with char $ac_func(); below. */
1863 #include <assert.h>
1864 /* Override any gcc2 internal prototype to avoid an error. */
1865 /* We use char because int might match the return type of a gcc2
1866 builtin and then its argument prototype would still apply. */
1867 char $ac_func();
1868
1869 int main() {
1870
1871 /* The GNU C library defines this for functions which it implements
1872 to always fail with ENOSYS. Some functions are actually named
1873 something starting with __ and the normal name is an alias. */
1874 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1875 choke me
1876 #else
1877 $ac_func();
1878 #endif
1879
1880 ; return 0; }
1881 EOF
1882 if { (eval echo configure:1883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1883 rm -rf conftest*
1884 eval "ac_cv_func_$ac_func=yes"
1885 else
1886 echo "configure: failed program was:" >&5
1887 cat conftest.$ac_ext >&5
1888 rm -rf conftest*
1889 eval "ac_cv_func_$ac_func=no"
1890 fi
1891 rm -f conftest*
1892 fi
1893
1894 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1897 cat >> confdefs.h <<EOF
1898 #define $ac_tr_func 1
1899 EOF
1900
1901 else
1902 echo "$ac_t""no" 1>&6
1903 fi
1904 done
1905
1906 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1907 echo "configure:1908: checking for working mmap" >&5
1908 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1909 echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911 if test "$cross_compiling" = yes; then
1912 ac_cv_func_mmap_fixed_mapped=no
1913 else
1914 cat > conftest.$ac_ext <<EOF
1915 #line 1916 "configure"
1916 #include "confdefs.h"
1917
1918 /* Thanks to Mike Haertel and Jim Avera for this test.
1919 Here is a matrix of mmap possibilities:
1920 mmap private not fixed
1921 mmap private fixed at somewhere currently unmapped
1922 mmap private fixed at somewhere already mapped
1923 mmap shared not fixed
1924 mmap shared fixed at somewhere currently unmapped
1925 mmap shared fixed at somewhere already mapped
1926 For private mappings, we should verify that changes cannot be read()
1927 back from the file, nor mmap's back from the file at a different
1928 address. (There have been systems where private was not correctly
1929 implemented like the infamous i386 svr4.0, and systems where the
1930 VM page cache was not coherent with the filesystem buffer cache
1931 like early versions of FreeBSD and possibly contemporary NetBSD.)
1932 For shared mappings, we should conversely verify that changes get
1933 propogated back to all the places they're supposed to be.
1934
1935 Grep wants private fixed already mapped.
1936 The main things grep needs to know about mmap are:
1937 * does it exist and is it safe to write into the mmap'd area
1938 * how to use it (BSD variants) */
1939 #include <sys/types.h>
1940 #include <fcntl.h>
1941 #include <sys/mman.h>
1942
1943 /* This mess was copied from the GNU getpagesize.h. */
1944 #ifndef HAVE_GETPAGESIZE
1945 # ifdef HAVE_UNISTD_H
1946 # include <unistd.h>
1947 # endif
1948
1949 /* Assume that all systems that can run configure have sys/param.h. */
1950 # ifndef HAVE_SYS_PARAM_H
1951 # define HAVE_SYS_PARAM_H 1
1952 # endif
1953
1954 # ifdef _SC_PAGESIZE
1955 # define getpagesize() sysconf(_SC_PAGESIZE)
1956 # else /* no _SC_PAGESIZE */
1957 # ifdef HAVE_SYS_PARAM_H
1958 # include <sys/param.h>
1959 # ifdef EXEC_PAGESIZE
1960 # define getpagesize() EXEC_PAGESIZE
1961 # else /* no EXEC_PAGESIZE */
1962 # ifdef NBPG
1963 # define getpagesize() NBPG * CLSIZE
1964 # ifndef CLSIZE
1965 # define CLSIZE 1
1966 # endif /* no CLSIZE */
1967 # else /* no NBPG */
1968 # ifdef NBPC
1969 # define getpagesize() NBPC
1970 # else /* no NBPC */
1971 # ifdef PAGESIZE
1972 # define getpagesize() PAGESIZE
1973 # endif /* PAGESIZE */
1974 # endif /* no NBPC */
1975 # endif /* no NBPG */
1976 # endif /* no EXEC_PAGESIZE */
1977 # else /* no HAVE_SYS_PARAM_H */
1978 # define getpagesize() 8192 /* punt totally */
1979 # endif /* no HAVE_SYS_PARAM_H */
1980 # endif /* no _SC_PAGESIZE */
1981
1982 #endif /* no HAVE_GETPAGESIZE */
1983
1984 #ifdef __cplusplus
1985 extern "C" { void *malloc(unsigned); }
1986 #else
1987 char *malloc();
1988 #endif
1989
1990 int
1991 main()
1992 {
1993 char *data, *data2, *data3;
1994 int i, pagesize;
1995 int fd;
1996
1997 pagesize = getpagesize();
1998
1999 /*
2000 * First, make a file with some known garbage in it.
2001 */
2002 data = malloc(pagesize);
2003 if (!data)
2004 exit(1);
2005 for (i = 0; i < pagesize; ++i)
2006 *(data + i) = rand();
2007 umask(0);
2008 fd = creat("conftestmmap", 0600);
2009 if (fd < 0)
2010 exit(1);
2011 if (write(fd, data, pagesize) != pagesize)
2012 exit(1);
2013 close(fd);
2014
2015 /*
2016 * Next, try to mmap the file at a fixed address which
2017 * already has something else allocated at it. If we can,
2018 * also make sure that we see the same garbage.
2019 */
2020 fd = open("conftestmmap", O_RDWR);
2021 if (fd < 0)
2022 exit(1);
2023 data2 = malloc(2 * pagesize);
2024 if (!data2)
2025 exit(1);
2026 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2027 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2028 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2029 exit(1);
2030 for (i = 0; i < pagesize; ++i)
2031 if (*(data + i) != *(data2 + i))
2032 exit(1);
2033
2034 /*
2035 * Finally, make sure that changes to the mapped area
2036 * do not percolate back to the file as seen by read().
2037 * (This is a bug on some variants of i386 svr4.0.)
2038 */
2039 for (i = 0; i < pagesize; ++i)
2040 *(data2 + i) = *(data2 + i) + 1;
2041 data3 = malloc(pagesize);
2042 if (!data3)
2043 exit(1);
2044 if (read(fd, data3, pagesize) != pagesize)
2045 exit(1);
2046 for (i = 0; i < pagesize; ++i)
2047 if (*(data + i) != *(data3 + i))
2048 exit(1);
2049 close(fd);
2050 unlink("conftestmmap");
2051 exit(0);
2052 }
2053
2054 EOF
2055 if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2056 then
2057 ac_cv_func_mmap_fixed_mapped=yes
2058 else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -fr conftest*
2062 ac_cv_func_mmap_fixed_mapped=no
2063 fi
2064 rm -fr conftest*
2065 fi
2066
2067 fi
2068
2069 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2070 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2071 cat >> confdefs.h <<\EOF
2072 #define HAVE_MMAP 1
2073 EOF
2074
2075 fi
2076
2077
2078 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2079 unistd.h values.h sys/param.h
2080 do
2081 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2082 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_hdr" >&5
2084 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087 cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 #include <$ac_hdr>
2091 EOF
2092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2093 { (eval echo configure:2094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2095 if test -z "$ac_err"; then
2096 rm -rf conftest*
2097 eval "ac_cv_header_$ac_safe=yes"
2098 else
2099 echo "$ac_err" >&5
2100 echo "configure: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 rm -rf conftest*
2103 eval "ac_cv_header_$ac_safe=no"
2104 fi
2105 rm -f conftest*
2106 fi
2107 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2108 echo "$ac_t""yes" 1>&6
2109 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2110 cat >> confdefs.h <<EOF
2111 #define $ac_tr_hdr 1
2112 EOF
2113
2114 else
2115 echo "$ac_t""no" 1>&6
2116 fi
2117 done
2118
2119 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2120 __argz_count __argz_stringify __argz_next
2121 do
2122 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2123 echo "configure:2124: checking for $ac_func" >&5
2124 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2125 echo $ac_n "(cached) $ac_c" 1>&6
2126 else
2127 cat > conftest.$ac_ext <<EOF
2128 #line 2129 "configure"
2129 #include "confdefs.h"
2130 /* System header to define __stub macros and hopefully few prototypes,
2131 which can conflict with char $ac_func(); below. */
2132 #include <assert.h>
2133 /* Override any gcc2 internal prototype to avoid an error. */
2134 /* We use char because int might match the return type of a gcc2
2135 builtin and then its argument prototype would still apply. */
2136 char $ac_func();
2137
2138 int main() {
2139
2140 /* The GNU C library defines this for functions which it implements
2141 to always fail with ENOSYS. Some functions are actually named
2142 something starting with __ and the normal name is an alias. */
2143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2144 choke me
2145 #else
2146 $ac_func();
2147 #endif
2148
2149 ; return 0; }
2150 EOF
2151 if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2152 rm -rf conftest*
2153 eval "ac_cv_func_$ac_func=yes"
2154 else
2155 echo "configure: failed program was:" >&5
2156 cat conftest.$ac_ext >&5
2157 rm -rf conftest*
2158 eval "ac_cv_func_$ac_func=no"
2159 fi
2160 rm -f conftest*
2161 fi
2162
2163 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2164 echo "$ac_t""yes" 1>&6
2165 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2166 cat >> confdefs.h <<EOF
2167 #define $ac_tr_func 1
2168 EOF
2169
2170 else
2171 echo "$ac_t""no" 1>&6
2172 fi
2173 done
2174
2175
2176 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2177 for ac_func in stpcpy
2178 do
2179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2180 echo "configure:2181: checking for $ac_func" >&5
2181 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2182 echo $ac_n "(cached) $ac_c" 1>&6
2183 else
2184 cat > conftest.$ac_ext <<EOF
2185 #line 2186 "configure"
2186 #include "confdefs.h"
2187 /* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $ac_func(); below. */
2189 #include <assert.h>
2190 /* Override any gcc2 internal prototype to avoid an error. */
2191 /* We use char because int might match the return type of a gcc2
2192 builtin and then its argument prototype would still apply. */
2193 char $ac_func();
2194
2195 int main() {
2196
2197 /* The GNU C library defines this for functions which it implements
2198 to always fail with ENOSYS. Some functions are actually named
2199 something starting with __ and the normal name is an alias. */
2200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2201 choke me
2202 #else
2203 $ac_func();
2204 #endif
2205
2206 ; return 0; }
2207 EOF
2208 if { (eval echo configure:2209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2209 rm -rf conftest*
2210 eval "ac_cv_func_$ac_func=yes"
2211 else
2212 echo "configure: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 rm -rf conftest*
2215 eval "ac_cv_func_$ac_func=no"
2216 fi
2217 rm -f conftest*
2218 fi
2219
2220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2221 echo "$ac_t""yes" 1>&6
2222 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2223 cat >> confdefs.h <<EOF
2224 #define $ac_tr_func 1
2225 EOF
2226
2227 else
2228 echo "$ac_t""no" 1>&6
2229 fi
2230 done
2231
2232 fi
2233 if test "${ac_cv_func_stpcpy}" = "yes"; then
2234 cat >> confdefs.h <<\EOF
2235 #define HAVE_STPCPY 1
2236 EOF
2237
2238 fi
2239
2240 if test $ac_cv_header_locale_h = yes; then
2241 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2242 echo "configure:2243: checking for LC_MESSAGES" >&5
2243 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
2245 else
2246 cat > conftest.$ac_ext <<EOF
2247 #line 2248 "configure"
2248 #include "confdefs.h"
2249 #include <locale.h>
2250 int main() {
2251 return LC_MESSAGES
2252 ; return 0; }
2253 EOF
2254 if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2255 rm -rf conftest*
2256 am_cv_val_LC_MESSAGES=yes
2257 else
2258 echo "configure: failed program was:" >&5
2259 cat conftest.$ac_ext >&5
2260 rm -rf conftest*
2261 am_cv_val_LC_MESSAGES=no
2262 fi
2263 rm -f conftest*
2264 fi
2265
2266 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2267 if test $am_cv_val_LC_MESSAGES = yes; then
2268 cat >> confdefs.h <<\EOF
2269 #define HAVE_LC_MESSAGES 1
2270 EOF
2271
2272 fi
2273 fi
2274 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2275 echo "configure:2276: checking whether NLS is requested" >&5
2276 # Check whether --enable-nls or --disable-nls was given.
2277 if test "${enable_nls+set}" = set; then
2278 enableval="$enable_nls"
2279 USE_NLS=$enableval
2280 else
2281 USE_NLS=yes
2282 fi
2283
2284 echo "$ac_t""$USE_NLS" 1>&6
2285
2286
2287 USE_INCLUDED_LIBINTL=no
2288
2289 if test "$USE_NLS" = "yes"; then
2290 cat >> confdefs.h <<\EOF
2291 #define ENABLE_NLS 1
2292 EOF
2293
2294 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2295 echo "configure:2296: checking whether included gettext is requested" >&5
2296 # Check whether --with-included-gettext or --without-included-gettext was given.
2297 if test "${with_included_gettext+set}" = set; then
2298 withval="$with_included_gettext"
2299 nls_cv_force_use_gnu_gettext=$withval
2300 else
2301 nls_cv_force_use_gnu_gettext=no
2302 fi
2303
2304 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2305
2306 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2307 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2308 nls_cv_header_intl=
2309 nls_cv_header_libgt=
2310 CATOBJEXT=NONE
2311
2312 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2314 echo "configure:2315: checking for libintl.h" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2321 #include <libintl.h>
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327 rm -rf conftest*
2328 eval "ac_cv_header_$ac_safe=yes"
2329 else
2330 echo "$ac_err" >&5
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2333 rm -rf conftest*
2334 eval "ac_cv_header_$ac_safe=no"
2335 fi
2336 rm -f conftest*
2337 fi
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2341 echo "configure:2342: checking for gettext in libc" >&5
2342 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2343 echo $ac_n "(cached) $ac_c" 1>&6
2344 else
2345 cat > conftest.$ac_ext <<EOF
2346 #line 2347 "configure"
2347 #include "confdefs.h"
2348 #include <libintl.h>
2349 int main() {
2350 return (int) gettext ("")
2351 ; return 0; }
2352 EOF
2353 if { (eval echo configure:2354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2354 rm -rf conftest*
2355 gt_cv_func_gettext_libc=yes
2356 else
2357 echo "configure: failed program was:" >&5
2358 cat conftest.$ac_ext >&5
2359 rm -rf conftest*
2360 gt_cv_func_gettext_libc=no
2361 fi
2362 rm -f conftest*
2363 fi
2364
2365 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2366
2367 if test "$gt_cv_func_gettext_libc" != "yes"; then
2368 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2369 echo "configure:2370: checking for bindtextdomain in -lintl" >&5
2370 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2371 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2372 echo $ac_n "(cached) $ac_c" 1>&6
2373 else
2374 ac_save_LIBS="$LIBS"
2375 LIBS="-lintl $LIBS"
2376 cat > conftest.$ac_ext <<EOF
2377 #line 2378 "configure"
2378 #include "confdefs.h"
2379 /* Override any gcc2 internal prototype to avoid an error. */
2380 /* We use char because int might match the return type of a gcc2
2381 builtin and then its argument prototype would still apply. */
2382 char bindtextdomain();
2383
2384 int main() {
2385 bindtextdomain()
2386 ; return 0; }
2387 EOF
2388 if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2389 rm -rf conftest*
2390 eval "ac_cv_lib_$ac_lib_var=yes"
2391 else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 eval "ac_cv_lib_$ac_lib_var=no"
2396 fi
2397 rm -f conftest*
2398 LIBS="$ac_save_LIBS"
2399
2400 fi
2401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2402 echo "$ac_t""yes" 1>&6
2403 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2404 echo "configure:2405: checking for gettext in libintl" >&5
2405 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
2407 else
2408 cat > conftest.$ac_ext <<EOF
2409 #line 2410 "configure"
2410 #include "confdefs.h"
2411
2412 int main() {
2413 return (int) gettext ("")
2414 ; return 0; }
2415 EOF
2416 if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2417 rm -rf conftest*
2418 gt_cv_func_gettext_libintl=yes
2419 else
2420 echo "configure: failed program was:" >&5
2421 cat conftest.$ac_ext >&5
2422 rm -rf conftest*
2423 gt_cv_func_gettext_libintl=no
2424 fi
2425 rm -f conftest*
2426 fi
2427
2428 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2429 else
2430 echo "$ac_t""no" 1>&6
2431 fi
2432
2433 fi
2434
2435 if test "$gt_cv_func_gettext_libc" = "yes" \
2436 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2437 cat >> confdefs.h <<\EOF
2438 #define HAVE_GETTEXT 1
2439 EOF
2440
2441 # Extract the first word of "msgfmt", so it can be a program name with args.
2442 set dummy msgfmt; ac_word=$2
2443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2444 echo "configure:2445: checking for $ac_word" >&5
2445 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2447 else
2448 case "$MSGFMT" in
2449 /*)
2450 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2451 ;;
2452 *)
2453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2454 for ac_dir in $PATH; do
2455 test -z "$ac_dir" && ac_dir=.
2456 if test -f $ac_dir/$ac_word; then
2457 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2458 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2459 break
2460 fi
2461 fi
2462 done
2463 IFS="$ac_save_ifs"
2464 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2465 ;;
2466 esac
2467 fi
2468 MSGFMT="$ac_cv_path_MSGFMT"
2469 if test -n "$MSGFMT"; then
2470 echo "$ac_t""$MSGFMT" 1>&6
2471 else
2472 echo "$ac_t""no" 1>&6
2473 fi
2474 if test "$MSGFMT" != "no"; then
2475 for ac_func in dcgettext
2476 do
2477 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2478 echo "configure:2479: checking for $ac_func" >&5
2479 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
2481 else
2482 cat > conftest.$ac_ext <<EOF
2483 #line 2484 "configure"
2484 #include "confdefs.h"
2485 /* System header to define __stub macros and hopefully few prototypes,
2486 which can conflict with char $ac_func(); below. */
2487 #include <assert.h>
2488 /* Override any gcc2 internal prototype to avoid an error. */
2489 /* We use char because int might match the return type of a gcc2
2490 builtin and then its argument prototype would still apply. */
2491 char $ac_func();
2492
2493 int main() {
2494
2495 /* The GNU C library defines this for functions which it implements
2496 to always fail with ENOSYS. Some functions are actually named
2497 something starting with __ and the normal name is an alias. */
2498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2499 choke me
2500 #else
2501 $ac_func();
2502 #endif
2503
2504 ; return 0; }
2505 EOF
2506 if { (eval echo configure:2507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2507 rm -rf conftest*
2508 eval "ac_cv_func_$ac_func=yes"
2509 else
2510 echo "configure: failed program was:" >&5
2511 cat conftest.$ac_ext >&5
2512 rm -rf conftest*
2513 eval "ac_cv_func_$ac_func=no"
2514 fi
2515 rm -f conftest*
2516 fi
2517
2518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2519 echo "$ac_t""yes" 1>&6
2520 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2521 cat >> confdefs.h <<EOF
2522 #define $ac_tr_func 1
2523 EOF
2524
2525 else
2526 echo "$ac_t""no" 1>&6
2527 fi
2528 done
2529
2530 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2531 set dummy gmsgfmt; ac_word=$2
2532 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2533 echo "configure:2534: checking for $ac_word" >&5
2534 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
2536 else
2537 case "$GMSGFMT" in
2538 /*)
2539 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2540 ;;
2541 ?:/*)
2542 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2543 ;;
2544 *)
2545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548 test -z "$ac_dir" && ac_dir=.
2549 if test -f $ac_dir/$ac_word; then
2550 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2551 break
2552 fi
2553 done
2554 IFS="$ac_save_ifs"
2555 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2556 ;;
2557 esac
2558 fi
2559 GMSGFMT="$ac_cv_path_GMSGFMT"
2560 if test -n "$GMSGFMT"; then
2561 echo "$ac_t""$GMSGFMT" 1>&6
2562 else
2563 echo "$ac_t""no" 1>&6
2564 fi
2565
2566 # Extract the first word of "xgettext", so it can be a program name with args.
2567 set dummy xgettext; ac_word=$2
2568 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2569 echo "configure:2570: checking for $ac_word" >&5
2570 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2571 echo $ac_n "(cached) $ac_c" 1>&6
2572 else
2573 case "$XGETTEXT" in
2574 /*)
2575 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2576 ;;
2577 *)
2578 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2579 for ac_dir in $PATH; do
2580 test -z "$ac_dir" && ac_dir=.
2581 if test -f $ac_dir/$ac_word; then
2582 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2583 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2584 break
2585 fi
2586 fi
2587 done
2588 IFS="$ac_save_ifs"
2589 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2590 ;;
2591 esac
2592 fi
2593 XGETTEXT="$ac_cv_path_XGETTEXT"
2594 if test -n "$XGETTEXT"; then
2595 echo "$ac_t""$XGETTEXT" 1>&6
2596 else
2597 echo "$ac_t""no" 1>&6
2598 fi
2599
2600 cat > conftest.$ac_ext <<EOF
2601 #line 2602 "configure"
2602 #include "confdefs.h"
2603
2604 int main() {
2605 extern int _nl_msg_cat_cntr;
2606 return _nl_msg_cat_cntr
2607 ; return 0; }
2608 EOF
2609 if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2610 rm -rf conftest*
2611 CATOBJEXT=.gmo
2612 DATADIRNAME=share
2613 else
2614 echo "configure: failed program was:" >&5
2615 cat conftest.$ac_ext >&5
2616 rm -rf conftest*
2617 CATOBJEXT=.mo
2618 DATADIRNAME=lib
2619 fi
2620 rm -f conftest*
2621 INSTOBJEXT=.mo
2622 fi
2623 fi
2624
2625 else
2626 echo "$ac_t""no" 1>&6
2627 fi
2628
2629
2630
2631 if test "$CATOBJEXT" = "NONE"; then
2632 nls_cv_use_gnu_gettext=yes
2633 fi
2634 fi
2635
2636 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2637 INTLOBJS="\$(GETTOBJS)"
2638 # Extract the first word of "msgfmt", so it can be a program name with args.
2639 set dummy msgfmt; ac_word=$2
2640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2641 echo "configure:2642: checking for $ac_word" >&5
2642 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2643 echo $ac_n "(cached) $ac_c" 1>&6
2644 else
2645 case "$MSGFMT" in
2646 /*)
2647 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2648 ;;
2649 *)
2650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2651 for ac_dir in $PATH; do
2652 test -z "$ac_dir" && ac_dir=.
2653 if test -f $ac_dir/$ac_word; then
2654 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2655 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2656 break
2657 fi
2658 fi
2659 done
2660 IFS="$ac_save_ifs"
2661 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2662 ;;
2663 esac
2664 fi
2665 MSGFMT="$ac_cv_path_MSGFMT"
2666 if test -n "$MSGFMT"; then
2667 echo "$ac_t""$MSGFMT" 1>&6
2668 else
2669 echo "$ac_t""no" 1>&6
2670 fi
2671
2672 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2673 set dummy gmsgfmt; ac_word=$2
2674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2675 echo "configure:2676: checking for $ac_word" >&5
2676 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2677 echo $ac_n "(cached) $ac_c" 1>&6
2678 else
2679 case "$GMSGFMT" in
2680 /*)
2681 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2682 ;;
2683 ?:/*)
2684 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2685 ;;
2686 *)
2687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2688 ac_dummy="$PATH"
2689 for ac_dir in $ac_dummy; do
2690 test -z "$ac_dir" && ac_dir=.
2691 if test -f $ac_dir/$ac_word; then
2692 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2693 break
2694 fi
2695 done
2696 IFS="$ac_save_ifs"
2697 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2698 ;;
2699 esac
2700 fi
2701 GMSGFMT="$ac_cv_path_GMSGFMT"
2702 if test -n "$GMSGFMT"; then
2703 echo "$ac_t""$GMSGFMT" 1>&6
2704 else
2705 echo "$ac_t""no" 1>&6
2706 fi
2707
2708 # Extract the first word of "xgettext", so it can be a program name with args.
2709 set dummy xgettext; ac_word=$2
2710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2711 echo "configure:2712: checking for $ac_word" >&5
2712 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2713 echo $ac_n "(cached) $ac_c" 1>&6
2714 else
2715 case "$XGETTEXT" in
2716 /*)
2717 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2718 ;;
2719 *)
2720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2721 for ac_dir in $PATH; do
2722 test -z "$ac_dir" && ac_dir=.
2723 if test -f $ac_dir/$ac_word; then
2724 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2725 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2726 break
2727 fi
2728 fi
2729 done
2730 IFS="$ac_save_ifs"
2731 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2732 ;;
2733 esac
2734 fi
2735 XGETTEXT="$ac_cv_path_XGETTEXT"
2736 if test -n "$XGETTEXT"; then
2737 echo "$ac_t""$XGETTEXT" 1>&6
2738 else
2739 echo "$ac_t""no" 1>&6
2740 fi
2741
2742
2743 USE_INCLUDED_LIBINTL=yes
2744 CATOBJEXT=.gmo
2745 INSTOBJEXT=.mo
2746 DATADIRNAME=share
2747 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2748 INTLLIBS=$INTLDEPS
2749 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2750 nls_cv_header_intl=libintl.h
2751 nls_cv_header_libgt=libgettext.h
2752 fi
2753
2754 if test "$XGETTEXT" != ":"; then
2755 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2756 : ;
2757 else
2758 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2759 XGETTEXT=":"
2760 fi
2761 fi
2762
2763 # We need to process the po/ directory.
2764 POSUB=po
2765 else
2766 DATADIRNAME=share
2767 nls_cv_header_intl=libintl.h
2768 nls_cv_header_libgt=libgettext.h
2769 fi
2770
2771 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2772 # because some of the sources are only built for this goal.
2773 if test "$PACKAGE" = gettext; then
2774 USE_NLS=yes
2775 USE_INCLUDED_LIBINTL=yes
2776 fi
2777
2778 for lang in $ALL_LINGUAS; do
2779 GMOFILES="$GMOFILES $lang.gmo"
2780 POFILES="$POFILES $lang.po"
2781 done
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796 if test "x$CATOBJEXT" != "x"; then
2797 if test "x$ALL_LINGUAS" = "x"; then
2798 LINGUAS=
2799 else
2800 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2801 echo "configure:2802: checking for catalogs to be installed" >&5
2802 NEW_LINGUAS=
2803 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2804 case "$ALL_LINGUAS" in
2805 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2806 esac
2807 done
2808 LINGUAS=$NEW_LINGUAS
2809 echo "$ac_t""$LINGUAS" 1>&6
2810 fi
2811
2812 if test -n "$LINGUAS"; then
2813 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2814 fi
2815 fi
2816
2817 if test $ac_cv_header_locale_h = yes; then
2818 INCLUDE_LOCALE_H="#include <locale.h>"
2819 else
2820 INCLUDE_LOCALE_H="\
2821 /* The system does not provide the header <locale.h>. Take care yourself. */"
2822 fi
2823
2824
2825 if test -f $srcdir/po2tbl.sed.in; then
2826 if test "$CATOBJEXT" = ".cat"; then
2827 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2828 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2829 echo "configure:2830: checking for linux/version.h" >&5
2830 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2831 echo $ac_n "(cached) $ac_c" 1>&6
2832 else
2833 cat > conftest.$ac_ext <<EOF
2834 #line 2835 "configure"
2835 #include "confdefs.h"
2836 #include <linux/version.h>
2837 EOF
2838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2839 { (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2841 if test -z "$ac_err"; then
2842 rm -rf conftest*
2843 eval "ac_cv_header_$ac_safe=yes"
2844 else
2845 echo "$ac_err" >&5
2846 echo "configure: failed program was:" >&5
2847 cat conftest.$ac_ext >&5
2848 rm -rf conftest*
2849 eval "ac_cv_header_$ac_safe=no"
2850 fi
2851 rm -f conftest*
2852 fi
2853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2854 echo "$ac_t""yes" 1>&6
2855 msgformat=linux
2856 else
2857 echo "$ac_t""no" 1>&6
2858 msgformat=xopen
2859 fi
2860
2861
2862 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2863 fi
2864 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2865 $srcdir/po2tbl.sed.in > po2tbl.sed
2866 fi
2867
2868 if test "$PACKAGE" = "gettext"; then
2869 GT_NO="#NO#"
2870 GT_YES=
2871 else
2872 GT_NO=
2873 GT_YES="#YES#"
2874 fi
2875
2876
2877
2878 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2879
2880
2881 l=
2882
2883
2884 if test -f $srcdir/po/POTFILES.in; then
2885 test -d po || mkdir po
2886 if test "x$srcdir" != "x."; then
2887 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2888 posrcprefix="$srcdir/"
2889 else
2890 posrcprefix="../$srcdir/"
2891 fi
2892 else
2893 posrcprefix="../"
2894 fi
2895 rm -f po/POTFILES
2896 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2897 < $srcdir/po/POTFILES.in > po/POTFILES
2898 fi
2899
2900 cat >> confdefs.h <<\EOF
2901 #define PACKAGE "gdb"
2902 EOF
2903
2904
2905 debugdir=${libdir}/debug
2906
2907 # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2908 if test "${with_separate_debug_dir+set}" = set; then
2909 withval="$with_separate_debug_dir"
2910 debugdir="${withval}"
2911 fi
2912
2913
2914
2915 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2916 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2917 ac_define_dir=`eval echo $debugdir`
2918 ac_define_dir=`eval echo $ac_define_dir`
2919 cat >> confdefs.h <<EOF
2920 #define DEBUGDIR "$ac_define_dir"
2921 EOF
2922
2923
2924 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
2925
2926
2927 CONFIG_OBS=
2928 CONFIG_LIB_OBS=
2929 CONFIG_DEPS=
2930 CONFIG_SRCS=
2931 CONFIG_INITS=
2932 ENABLE_CFLAGS=
2933 CONFIG_ALL=
2934 CONFIG_CLEAN=
2935 CONFIG_INSTALL=
2936 CONFIG_UNINSTALL=
2937
2938 subdirs="doc testsuite"
2939
2940 configdirs=
2941
2942 . $srcdir/configure.host
2943
2944 . $srcdir/configure.tgt
2945
2946 # Fetch the default architecture and default target vector from BFD.
2947 targ=$target; . $srcdir/../bfd/config.bfd
2948
2949 # We only want the first architecture, so strip off the others if
2950 # there is more than one.
2951 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2952
2953 if test "x$targ_archs" != x; then
2954 cat >> confdefs.h <<EOF
2955 #define DEFAULT_BFD_ARCH $targ_archs
2956 EOF
2957
2958 fi
2959 if test "x$targ_defvec" != x; then
2960 cat >> confdefs.h <<EOF
2961 #define DEFAULT_BFD_VEC $targ_defvec
2962 EOF
2963
2964 fi
2965
2966 if test "$program_transform_name" = s,x,x,; then
2967 program_transform_name=
2968 else
2969 # Double any \ or $. echo might interpret backslashes.
2970 cat <<\EOF_SED > conftestsed
2971 s,\\,\\\\,g; s,\$,$$,g
2972 EOF_SED
2973 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2974 rm -f conftestsed
2975 fi
2976 test "$program_prefix" != NONE &&
2977 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2978 # Use a double $ so make ignores it.
2979 test "$program_suffix" != NONE &&
2980 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2981
2982 # sed with no file args requires a program.
2983 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2984
2985
2986 # The CLI cannot be disabled yet, but may be in the future.
2987
2988 # Enable CLI.
2989 # Check whether --enable-gdbcli or --disable-gdbcli was given.
2990 if test "${enable_gdbcli+set}" = set; then
2991 enableval="$enable_gdbcli"
2992 case $enableval in
2993 yes)
2994 ;;
2995 no)
2996 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2997 *)
2998 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2999 esac
3000 else
3001 enable_gdbcli=yes
3002 fi
3003
3004 if test x"$enable_gdbcli" = xyes; then
3005 if test -d $srcdir/cli; then
3006 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3007 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3008 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3009 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3010 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3011 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3012 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3013 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3014 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3015 fi
3016 fi
3017
3018 # Enable MI.
3019 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3020 if test "${enable_gdbmi+set}" = set; then
3021 enableval="$enable_gdbmi"
3022 case $enableval in
3023 yes | no)
3024 ;;
3025 *)
3026 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3027 esac
3028 else
3029 enable_gdbmi=yes
3030 fi
3031
3032 if test x"$enable_gdbmi" = xyes; then
3033 if test -d $srcdir/mi; then
3034 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3035 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3036 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3037 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3038 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3039 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3040 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3041 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3042 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3043 fi
3044 fi
3045
3046 # Enable TUI.
3047 # Check whether --enable-tui or --disable-tui was given.
3048 if test "${enable_tui+set}" = set; then
3049 enableval="$enable_tui"
3050 case $enableval in
3051 yes | no)
3052 ;;
3053 *)
3054 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3055 esac
3056 fi
3057
3058 if test x"$enable_tui" = xyes; then
3059 if test -d $srcdir/tui; then
3060 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3061 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3062 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3063 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3064 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3065 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3066 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3067 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3068 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3069 need_curses=yes
3070 fi
3071 fi
3072
3073 # Enable gdbtk.
3074 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3075 if test "${enable_gdbtk+set}" = set; then
3076 enableval="$enable_gdbtk"
3077 case $enableval in
3078 yes | no)
3079 ;;
3080 *)
3081 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3082 esac
3083 else
3084 if test -d $srcdir/gdbtk; then
3085 enable_gdbtk=yes
3086 else
3087 enable_gdbtk=no
3088 fi
3089 fi
3090
3091 # We unconditionally disable gdbtk tests on selected platforms.
3092 case $host_os in
3093 go32* | windows*)
3094 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3095 enable_gdbtk=no ;;
3096 esac
3097
3098 # Libunwind support.
3099 # Check whether --with-libunwind or --without-libunwind was given.
3100 if test "${with_libunwind+set}" = set; then
3101 withval="$with_libunwind"
3102 case "${withval}" in
3103 yes) enable_libunwind=yes ;;
3104 no) enable_libunwind=no ;;
3105 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3106 esac
3107 else
3108
3109 for ac_hdr in libunwind.h
3110 do
3111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3113 echo "configure:3114: checking for $ac_hdr" >&5
3114 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3115 echo $ac_n "(cached) $ac_c" 1>&6
3116 else
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <$ac_hdr>
3121 EOF
3122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3123 { (eval echo configure:3124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3125 if test -z "$ac_err"; then
3126 rm -rf conftest*
3127 eval "ac_cv_header_$ac_safe=yes"
3128 else
3129 echo "$ac_err" >&5
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3132 rm -rf conftest*
3133 eval "ac_cv_header_$ac_safe=no"
3134 fi
3135 rm -f conftest*
3136 fi
3137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3138 echo "$ac_t""yes" 1>&6
3139 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3140 cat >> confdefs.h <<EOF
3141 #define $ac_tr_hdr 1
3142 EOF
3143
3144 else
3145 echo "$ac_t""no" 1>&6
3146 fi
3147 done
3148
3149 for ac_hdr in libunwind-ia64.h
3150 do
3151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3153 echo "configure:3154: checking for $ac_hdr" >&5
3154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <$ac_hdr>
3161 EOF
3162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3163 { (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165 if test -z "$ac_err"; then
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=yes"
3168 else
3169 echo "$ac_err" >&5
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -rf conftest*
3173 eval "ac_cv_header_$ac_safe=no"
3174 fi
3175 rm -f conftest*
3176 fi
3177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3180 cat >> confdefs.h <<EOF
3181 #define $ac_tr_hdr 1
3182 EOF
3183
3184 else
3185 echo "$ac_t""no" 1>&6
3186 fi
3187 done
3188
3189 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3190 enable_libunwind=yes;
3191 fi
3192
3193 fi
3194
3195
3196 if test x"$enable_libunwind" = xyes; then
3197 for ac_hdr in libunwind.h
3198 do
3199 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3200 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3201 echo "configure:3202: checking for $ac_hdr" >&5
3202 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3203 echo $ac_n "(cached) $ac_c" 1>&6
3204 else
3205 cat > conftest.$ac_ext <<EOF
3206 #line 3207 "configure"
3207 #include "confdefs.h"
3208 #include <$ac_hdr>
3209 EOF
3210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3211 { (eval echo configure:3212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3212 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3213 if test -z "$ac_err"; then
3214 rm -rf conftest*
3215 eval "ac_cv_header_$ac_safe=yes"
3216 else
3217 echo "$ac_err" >&5
3218 echo "configure: failed program was:" >&5
3219 cat conftest.$ac_ext >&5
3220 rm -rf conftest*
3221 eval "ac_cv_header_$ac_safe=no"
3222 fi
3223 rm -f conftest*
3224 fi
3225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3226 echo "$ac_t""yes" 1>&6
3227 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3228 cat >> confdefs.h <<EOF
3229 #define $ac_tr_hdr 1
3230 EOF
3231
3232 else
3233 echo "$ac_t""no" 1>&6
3234 fi
3235 done
3236
3237 for ac_hdr in libunwind-ia64.h
3238 do
3239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3241 echo "configure:3242: checking for $ac_hdr" >&5
3242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <$ac_hdr>
3249 EOF
3250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3251 { (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253 if test -z "$ac_err"; then
3254 rm -rf conftest*
3255 eval "ac_cv_header_$ac_safe=yes"
3256 else
3257 echo "$ac_err" >&5
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 rm -rf conftest*
3261 eval "ac_cv_header_$ac_safe=no"
3262 fi
3263 rm -f conftest*
3264 fi
3265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3268 cat >> confdefs.h <<EOF
3269 #define $ac_tr_hdr 1
3270 EOF
3271
3272 else
3273 echo "$ac_t""no" 1>&6
3274 fi
3275 done
3276
3277 cat >> confdefs.h <<\EOF
3278 #define HAVE_LIBUNWIND 1
3279 EOF
3280
3281 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3282 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3283 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3284 fi
3285
3286 # Profiling support.
3287 # Check whether --enable-profiling or --disable-profiling was given.
3288 if test "${enable_profiling+set}" = set; then
3289 enableval="$enable_profiling"
3290 case $enableval in
3291 yes | no)
3292 ;;
3293 *)
3294 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3295 esac
3296 else
3297 enable_profiling=no
3298 fi
3299
3300
3301 for ac_func in monstartup _mcleanup
3302 do
3303 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3304 echo "configure:3305: checking for $ac_func" >&5
3305 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3306 echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308 cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 /* System header to define __stub macros and hopefully few prototypes,
3312 which can conflict with char $ac_func(); below. */
3313 #include <assert.h>
3314 /* Override any gcc2 internal prototype to avoid an error. */
3315 /* We use char because int might match the return type of a gcc2
3316 builtin and then its argument prototype would still apply. */
3317 char $ac_func();
3318
3319 int main() {
3320
3321 /* The GNU C library defines this for functions which it implements
3322 to always fail with ENOSYS. Some functions are actually named
3323 something starting with __ and the normal name is an alias. */
3324 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3325 choke me
3326 #else
3327 $ac_func();
3328 #endif
3329
3330 ; return 0; }
3331 EOF
3332 if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3333 rm -rf conftest*
3334 eval "ac_cv_func_$ac_func=yes"
3335 else
3336 echo "configure: failed program was:" >&5
3337 cat conftest.$ac_ext >&5
3338 rm -rf conftest*
3339 eval "ac_cv_func_$ac_func=no"
3340 fi
3341 rm -f conftest*
3342 fi
3343
3344 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3345 echo "$ac_t""yes" 1>&6
3346 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3347 cat >> confdefs.h <<EOF
3348 #define $ac_tr_func 1
3349 EOF
3350
3351 else
3352 echo "$ac_t""no" 1>&6
3353 fi
3354 done
3355
3356 echo $ac_n "checking for _etext""... $ac_c" 1>&6
3357 echo "configure:3358: checking for _etext" >&5
3358 if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3359 echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361 cat > conftest.$ac_ext <<EOF
3362 #line 3363 "configure"
3363 #include "confdefs.h"
3364 #include <stdlib.h>
3365 extern char _etext;
3366
3367 int main() {
3368 free (&_etext);
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3372 rm -rf conftest*
3373 ac_cv_var__etext=yes
3374 else
3375 echo "configure: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 rm -rf conftest*
3378 ac_cv_var__etext=no
3379 fi
3380 rm -f conftest*
3381 fi
3382
3383 echo "$ac_t""$ac_cv_var__etext" 1>&6
3384 if test $ac_cv_var__etext = yes; then
3385 cat >> confdefs.h <<\EOF
3386 #define HAVE__ETEXT 1
3387 EOF
3388
3389 fi
3390 if test "$enable_profiling" = yes ; then
3391 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3392 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3393 fi
3394 PROFILE_CFLAGS=-pg
3395 OLD_CFLAGS="$CFLAGS"
3396 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3397
3398 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3399 echo "configure:3400: checking whether $CC supports -pg" >&5
3400 if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
3401 echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403 cat > conftest.$ac_ext <<EOF
3404 #line 3405 "configure"
3405 #include "confdefs.h"
3406
3407 int main() {
3408 int x;
3409 ; return 0; }
3410 EOF
3411 if { (eval echo configure:3412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3412 rm -rf conftest*
3413 ac_cv_cc_supports_pg=yes
3414 else
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -rf conftest*
3418 ac_cv_cc_supports_pg=no
3419 fi
3420 rm -f conftest*
3421 fi
3422
3423 echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
3424
3425 if test $ac_cv_cc_supports_pg = no; then
3426 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3427 fi
3428
3429 CFLAGS="$OLD_CFLAGS"
3430 fi
3431
3432 # --------------------- #
3433 # Checks for programs. #
3434 # --------------------- #
3435
3436 for ac_prog in mawk gawk nawk awk
3437 do
3438 # Extract the first word of "$ac_prog", so it can be a program name with args.
3439 set dummy $ac_prog; ac_word=$2
3440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3441 echo "configure:3442: checking for $ac_word" >&5
3442 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3443 echo $ac_n "(cached) $ac_c" 1>&6
3444 else
3445 if test -n "$AWK"; then
3446 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3447 else
3448 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3449 ac_dummy="$PATH"
3450 for ac_dir in $ac_dummy; do
3451 test -z "$ac_dir" && ac_dir=.
3452 if test -f $ac_dir/$ac_word; then
3453 ac_cv_prog_AWK="$ac_prog"
3454 break
3455 fi
3456 done
3457 IFS="$ac_save_ifs"
3458 fi
3459 fi
3460 AWK="$ac_cv_prog_AWK"
3461 if test -n "$AWK"; then
3462 echo "$ac_t""$AWK" 1>&6
3463 else
3464 echo "$ac_t""no" 1>&6
3465 fi
3466
3467 test -n "$AWK" && break
3468 done
3469
3470 # Find a good install program. We prefer a C program (faster),
3471 # so one script is as good as another. But avoid the broken or
3472 # incompatible versions:
3473 # SysV /etc/install, /usr/sbin/install
3474 # SunOS /usr/etc/install
3475 # IRIX /sbin/install
3476 # AIX /bin/install
3477 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3478 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3479 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3480 # ./install, which can be erroneously created by make from ./install.sh.
3481 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3482 echo "configure:3483: checking for a BSD compatible install" >&5
3483 if test -z "$INSTALL"; then
3484 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3485 echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3488 for ac_dir in $PATH; do
3489 # Account for people who put trailing slashes in PATH elements.
3490 case "$ac_dir/" in
3491 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3492 *)
3493 # OSF1 and SCO ODT 3.0 have their own names for install.
3494 # Don't use installbsd from OSF since it installs stuff as root
3495 # by default.
3496 for ac_prog in ginstall scoinst install; do
3497 if test -f $ac_dir/$ac_prog; then
3498 if test $ac_prog = install &&
3499 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3500 # AIX install. It has an incompatible calling convention.
3501 :
3502 else
3503 ac_cv_path_install="$ac_dir/$ac_prog -c"
3504 break 2
3505 fi
3506 fi
3507 done
3508 ;;
3509 esac
3510 done
3511 IFS="$ac_save_IFS"
3512
3513 fi
3514 if test "${ac_cv_path_install+set}" = set; then
3515 INSTALL="$ac_cv_path_install"
3516 else
3517 # As a last resort, use the slow shell script. We don't cache a
3518 # path for INSTALL within a source directory, because that will
3519 # break other packages using the cache if that directory is
3520 # removed, or if the path is relative.
3521 INSTALL="$ac_install_sh"
3522 fi
3523 fi
3524 echo "$ac_t""$INSTALL" 1>&6
3525
3526 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3527 # It thinks the first close brace ends the variable substitution.
3528 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3529
3530 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3531
3532 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3533
3534 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3535 echo "configure:3536: checking whether ln -s works" >&5
3536 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3537 echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539 rm -f conftestdata
3540 if ln -s X conftestdata 2>/dev/null
3541 then
3542 rm -f conftestdata
3543 ac_cv_prog_LN_S="ln -s"
3544 else
3545 ac_cv_prog_LN_S=ln
3546 fi
3547 fi
3548 LN_S="$ac_cv_prog_LN_S"
3549 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3550 echo "$ac_t""yes" 1>&6
3551 else
3552 echo "$ac_t""no" 1>&6
3553 fi
3554
3555 # Extract the first word of "ranlib", so it can be a program name with args.
3556 set dummy ranlib; ac_word=$2
3557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3558 echo "configure:3559: checking for $ac_word" >&5
3559 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3560 echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562 if test -n "$RANLIB"; then
3563 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3564 else
3565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3566 ac_dummy="$PATH"
3567 for ac_dir in $ac_dummy; do
3568 test -z "$ac_dir" && ac_dir=.
3569 if test -f $ac_dir/$ac_word; then
3570 ac_cv_prog_RANLIB="ranlib"
3571 break
3572 fi
3573 done
3574 IFS="$ac_save_ifs"
3575 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3576 fi
3577 fi
3578 RANLIB="$ac_cv_prog_RANLIB"
3579 if test -n "$RANLIB"; then
3580 echo "$ac_t""$RANLIB" 1>&6
3581 else
3582 echo "$ac_t""no" 1>&6
3583 fi
3584
3585 for ac_prog in 'bison -y' byacc
3586 do
3587 # Extract the first word of "$ac_prog", so it can be a program name with args.
3588 set dummy $ac_prog; ac_word=$2
3589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3590 echo "configure:3591: checking for $ac_word" >&5
3591 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3592 echo $ac_n "(cached) $ac_c" 1>&6
3593 else
3594 if test -n "$YACC"; then
3595 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3596 else
3597 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3598 ac_dummy="$PATH"
3599 for ac_dir in $ac_dummy; do
3600 test -z "$ac_dir" && ac_dir=.
3601 if test -f $ac_dir/$ac_word; then
3602 ac_cv_prog_YACC="$ac_prog"
3603 break
3604 fi
3605 done
3606 IFS="$ac_save_ifs"
3607 fi
3608 fi
3609 YACC="$ac_cv_prog_YACC"
3610 if test -n "$YACC"; then
3611 echo "$ac_t""$YACC" 1>&6
3612 else
3613 echo "$ac_t""no" 1>&6
3614 fi
3615
3616 test -n "$YACC" && break
3617 done
3618 test -n "$YACC" || YACC="yacc"
3619
3620
3621 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3622 set dummy ${ac_tool_prefix}ar; ac_word=$2
3623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3624 echo "configure:3625: checking for $ac_word" >&5
3625 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3626 echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628 if test -n "$AR"; then
3629 ac_cv_prog_AR="$AR" # Let the user override the test.
3630 else
3631 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3632 ac_dummy="$PATH"
3633 for ac_dir in $ac_dummy; do
3634 test -z "$ac_dir" && ac_dir=.
3635 if test -f $ac_dir/$ac_word; then
3636 ac_cv_prog_AR="${ac_tool_prefix}ar"
3637 break
3638 fi
3639 done
3640 IFS="$ac_save_ifs"
3641 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3642 fi
3643 fi
3644 AR="$ac_cv_prog_AR"
3645 if test -n "$AR"; then
3646 echo "$ac_t""$AR" 1>&6
3647 else
3648 echo "$ac_t""no" 1>&6
3649 fi
3650
3651
3652
3653 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3654 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3656 echo "configure:3657: checking for $ac_word" >&5
3657 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3658 echo $ac_n "(cached) $ac_c" 1>&6
3659 else
3660 if test -n "$DLLTOOL"; then
3661 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3662 else
3663 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3664 ac_dummy="$PATH"
3665 for ac_dir in $ac_dummy; do
3666 test -z "$ac_dir" && ac_dir=.
3667 if test -f $ac_dir/$ac_word; then
3668 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3669 break
3670 fi
3671 done
3672 IFS="$ac_save_ifs"
3673 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3674 fi
3675 fi
3676 DLLTOOL="$ac_cv_prog_DLLTOOL"
3677 if test -n "$DLLTOOL"; then
3678 echo "$ac_t""$DLLTOOL" 1>&6
3679 else
3680 echo "$ac_t""no" 1>&6
3681 fi
3682
3683
3684
3685 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3686 set dummy ${ac_tool_prefix}windres; ac_word=$2
3687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3688 echo "configure:3689: checking for $ac_word" >&5
3689 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3690 echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692 if test -n "$WINDRES"; then
3693 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3694 else
3695 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3696 ac_dummy="$PATH"
3697 for ac_dir in $ac_dummy; do
3698 test -z "$ac_dir" && ac_dir=.
3699 if test -f $ac_dir/$ac_word; then
3700 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3701 break
3702 fi
3703 done
3704 IFS="$ac_save_ifs"
3705 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3706 fi
3707 fi
3708 WINDRES="$ac_cv_prog_WINDRES"
3709 if test -n "$WINDRES"; then
3710 echo "$ac_t""$WINDRES" 1>&6
3711 else
3712 echo "$ac_t""no" 1>&6
3713 fi
3714
3715
3716
3717
3718 # Needed for GNU/Hurd.
3719 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3720 set dummy ${ac_tool_prefix}mig; ac_word=$2
3721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3722 echo "configure:3723: checking for $ac_word" >&5
3723 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3724 echo $ac_n "(cached) $ac_c" 1>&6
3725 else
3726 if test -n "$MIG"; then
3727 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3728 else
3729 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732 test -z "$ac_dir" && ac_dir=.
3733 if test -f $ac_dir/$ac_word; then
3734 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3735 break
3736 fi
3737 done
3738 IFS="$ac_save_ifs"
3739 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3740 fi
3741 fi
3742 MIG="$ac_cv_prog_MIG"
3743 if test -n "$MIG"; then
3744 echo "$ac_t""$MIG" 1>&6
3745 else
3746 echo "$ac_t""no" 1>&6
3747 fi
3748
3749
3750
3751
3752 # ---------------------- #
3753 # Checks for libraries. #
3754 # ---------------------- #
3755
3756 # We might need to link with -lm; most simulators need it.
3757 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3758 echo "configure:3759: checking for main in -lm" >&5
3759 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3760 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3761 echo $ac_n "(cached) $ac_c" 1>&6
3762 else
3763 ac_save_LIBS="$LIBS"
3764 LIBS="-lm $LIBS"
3765 cat > conftest.$ac_ext <<EOF
3766 #line 3767 "configure"
3767 #include "confdefs.h"
3768
3769 int main() {
3770 main()
3771 ; return 0; }
3772 EOF
3773 if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3774 rm -rf conftest*
3775 eval "ac_cv_lib_$ac_lib_var=yes"
3776 else
3777 echo "configure: failed program was:" >&5
3778 cat conftest.$ac_ext >&5
3779 rm -rf conftest*
3780 eval "ac_cv_lib_$ac_lib_var=no"
3781 fi
3782 rm -f conftest*
3783 LIBS="$ac_save_LIBS"
3784
3785 fi
3786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3787 echo "$ac_t""yes" 1>&6
3788 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3789 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3790 cat >> confdefs.h <<EOF
3791 #define $ac_tr_lib 1
3792 EOF
3793
3794 LIBS="-lm $LIBS"
3795
3796 else
3797 echo "$ac_t""no" 1>&6
3798 fi
3799
3800
3801 # We need to link with -lw to get `wctype' on Solaris before Solaris
3802 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3803 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3804 # is known to have this problem). Therefore we avoid libw if we can.
3805 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3806 echo "configure:3807: checking for wctype" >&5
3807 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3808 echo $ac_n "(cached) $ac_c" 1>&6
3809 else
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 /* System header to define __stub macros and hopefully few prototypes,
3814 which can conflict with char wctype(); below. */
3815 #include <assert.h>
3816 /* Override any gcc2 internal prototype to avoid an error. */
3817 /* We use char because int might match the return type of a gcc2
3818 builtin and then its argument prototype would still apply. */
3819 char wctype();
3820
3821 int main() {
3822
3823 /* The GNU C library defines this for functions which it implements
3824 to always fail with ENOSYS. Some functions are actually named
3825 something starting with __ and the normal name is an alias. */
3826 #if defined (__stub_wctype) || defined (__stub___wctype)
3827 choke me
3828 #else
3829 wctype();
3830 #endif
3831
3832 ; return 0; }
3833 EOF
3834 if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3835 rm -rf conftest*
3836 eval "ac_cv_func_wctype=yes"
3837 else
3838 echo "configure: failed program was:" >&5
3839 cat conftest.$ac_ext >&5
3840 rm -rf conftest*
3841 eval "ac_cv_func_wctype=no"
3842 fi
3843 rm -f conftest*
3844 fi
3845
3846 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3847 echo "$ac_t""yes" 1>&6
3848 :
3849 else
3850 echo "$ac_t""no" 1>&6
3851 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3852 echo "configure:3853: checking for wctype in -lw" >&5
3853 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3854 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857 ac_save_LIBS="$LIBS"
3858 LIBS="-lw $LIBS"
3859 cat > conftest.$ac_ext <<EOF
3860 #line 3861 "configure"
3861 #include "confdefs.h"
3862 /* Override any gcc2 internal prototype to avoid an error. */
3863 /* We use char because int might match the return type of a gcc2
3864 builtin and then its argument prototype would still apply. */
3865 char wctype();
3866
3867 int main() {
3868 wctype()
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3872 rm -rf conftest*
3873 eval "ac_cv_lib_$ac_lib_var=yes"
3874 else
3875 echo "configure: failed program was:" >&5
3876 cat conftest.$ac_ext >&5
3877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=no"
3879 fi
3880 rm -f conftest*
3881 LIBS="$ac_save_LIBS"
3882
3883 fi
3884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3885 echo "$ac_t""yes" 1>&6
3886 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3887 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3888 cat >> confdefs.h <<EOF
3889 #define $ac_tr_lib 1
3890 EOF
3891
3892 LIBS="-lw $LIBS"
3893
3894 else
3895 echo "$ac_t""no" 1>&6
3896 fi
3897
3898 fi
3899
3900
3901 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3902
3903 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3904 echo "configure:3905: checking for library containing gethostbyname" >&5
3905 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3906 echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908 ac_func_search_save_LIBS="$LIBS"
3909 ac_cv_search_gethostbyname="no"
3910 cat > conftest.$ac_ext <<EOF
3911 #line 3912 "configure"
3912 #include "confdefs.h"
3913 /* Override any gcc2 internal prototype to avoid an error. */
3914 /* We use char because int might match the return type of a gcc2
3915 builtin and then its argument prototype would still apply. */
3916 char gethostbyname();
3917
3918 int main() {
3919 gethostbyname()
3920 ; return 0; }
3921 EOF
3922 if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3923 rm -rf conftest*
3924 ac_cv_search_gethostbyname="none required"
3925 else
3926 echo "configure: failed program was:" >&5
3927 cat conftest.$ac_ext >&5
3928 fi
3929 rm -f conftest*
3930 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3931 LIBS="-l$i $ac_func_search_save_LIBS"
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 /* Override any gcc2 internal prototype to avoid an error. */
3936 /* We use char because int might match the return type of a gcc2
3937 builtin and then its argument prototype would still apply. */
3938 char gethostbyname();
3939
3940 int main() {
3941 gethostbyname()
3942 ; return 0; }
3943 EOF
3944 if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3945 rm -rf conftest*
3946 ac_cv_search_gethostbyname="-l$i"
3947 break
3948 else
3949 echo "configure: failed program was:" >&5
3950 cat conftest.$ac_ext >&5
3951 fi
3952 rm -f conftest*
3953 done
3954 LIBS="$ac_func_search_save_LIBS"
3955 fi
3956
3957 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3958 if test "$ac_cv_search_gethostbyname" != "no"; then
3959 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3960
3961 else :
3962
3963 fi
3964
3965 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
3966
3967 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
3968 echo "configure:3969: checking for library containing socketpair" >&5
3969 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3970 echo $ac_n "(cached) $ac_c" 1>&6
3971 else
3972 ac_func_search_save_LIBS="$LIBS"
3973 ac_cv_search_socketpair="no"
3974 cat > conftest.$ac_ext <<EOF
3975 #line 3976 "configure"
3976 #include "confdefs.h"
3977 /* Override any gcc2 internal prototype to avoid an error. */
3978 /* We use char because int might match the return type of a gcc2
3979 builtin and then its argument prototype would still apply. */
3980 char socketpair();
3981
3982 int main() {
3983 socketpair()
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3987 rm -rf conftest*
3988 ac_cv_search_socketpair="none required"
3989 else
3990 echo "configure: failed program was:" >&5
3991 cat conftest.$ac_ext >&5
3992 fi
3993 rm -f conftest*
3994 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3995 LIBS="-l$i $ac_func_search_save_LIBS"
3996 cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 /* Override any gcc2 internal prototype to avoid an error. */
4000 /* We use char because int might match the return type of a gcc2
4001 builtin and then its argument prototype would still apply. */
4002 char socketpair();
4003
4004 int main() {
4005 socketpair()
4006 ; return 0; }
4007 EOF
4008 if { (eval echo configure:4009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4009 rm -rf conftest*
4010 ac_cv_search_socketpair="-l$i"
4011 break
4012 else
4013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
4015 fi
4016 rm -f conftest*
4017 done
4018 LIBS="$ac_func_search_save_LIBS"
4019 fi
4020
4021 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4022 if test "$ac_cv_search_socketpair" != "no"; then
4023 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4024
4025 else :
4026
4027 fi
4028
4029 # Since GDB uses Readline, we need termcap functionality, so we need
4030 # to find a library that provides that. When GDB is configured with
4031 # --enable-tui, we need full curses functionality.
4032 #
4033 # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4034 # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4035 # Makefile fragments. That's why we need to have `Hcurses' before
4036 # `curses'. I don't see why we should use HP curses if a more
4037 # standard curses is available, except that according to HP's
4038 # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4039 # HP-UX 10.10 and 10.20.
4040
4041 if test "$need_curses" = yes; then
4042
4043 echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4044 echo "configure:4045: checking for library containing initscr" >&5
4045 if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4046 echo $ac_n "(cached) $ac_c" 1>&6
4047 else
4048 ac_func_search_save_LIBS="$LIBS"
4049 ac_cv_search_initscr="no"
4050 cat > conftest.$ac_ext <<EOF
4051 #line 4052 "configure"
4052 #include "confdefs.h"
4053 /* Override any gcc2 internal prototype to avoid an error. */
4054 /* We use char because int might match the return type of a gcc2
4055 builtin and then its argument prototype would still apply. */
4056 char initscr();
4057
4058 int main() {
4059 initscr()
4060 ; return 0; }
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4063 rm -rf conftest*
4064 ac_cv_search_initscr="none required"
4065 else
4066 echo "configure: failed program was:" >&5
4067 cat conftest.$ac_ext >&5
4068 fi
4069 rm -f conftest*
4070 test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
4071 LIBS="-l$i $ac_func_search_save_LIBS"
4072 cat > conftest.$ac_ext <<EOF
4073 #line 4074 "configure"
4074 #include "confdefs.h"
4075 /* Override any gcc2 internal prototype to avoid an error. */
4076 /* We use char because int might match the return type of a gcc2
4077 builtin and then its argument prototype would still apply. */
4078 char initscr();
4079
4080 int main() {
4081 initscr()
4082 ; return 0; }
4083 EOF
4084 if { (eval echo configure:4085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4085 rm -rf conftest*
4086 ac_cv_search_initscr="-l$i"
4087 break
4088 else
4089 echo "configure: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 fi
4092 rm -f conftest*
4093 done
4094 LIBS="$ac_func_search_save_LIBS"
4095 fi
4096
4097 echo "$ac_t""$ac_cv_search_initscr" 1>&6
4098 if test "$ac_cv_search_initscr" != "no"; then
4099 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4100
4101 else :
4102 { echo "configure: error: no curses library found" 1>&2; exit 1; }
4103 fi
4104 fi
4105
4106 case $host_os in
4107 cygwin*)
4108 if test -d $srcdir/libtermcap; then
4109 LIBS="../libtermcap/libtermcap.a $LIBS"
4110 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4111 fi ;;
4112 go32* | *djgpp*)
4113 ac_cv_search_tgetent="none required"
4114 ;;
4115 aix*)
4116 # Readline prefers curses over termcap on AIX.
4117 # ??? Why?
4118
4119 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4120 echo "configure:4121: checking for library containing tgetent" >&5
4121 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4122 echo $ac_n "(cached) $ac_c" 1>&6
4123 else
4124 ac_func_search_save_LIBS="$LIBS"
4125 ac_cv_search_tgetent="no"
4126 cat > conftest.$ac_ext <<EOF
4127 #line 4128 "configure"
4128 #include "confdefs.h"
4129 /* Override any gcc2 internal prototype to avoid an error. */
4130 /* We use char because int might match the return type of a gcc2
4131 builtin and then its argument prototype would still apply. */
4132 char tgetent();
4133
4134 int main() {
4135 tgetent()
4136 ; return 0; }
4137 EOF
4138 if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4139 rm -rf conftest*
4140 ac_cv_search_tgetent="none required"
4141 else
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144 fi
4145 rm -f conftest*
4146 test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4147 LIBS="-l$i $ac_func_search_save_LIBS"
4148 cat > conftest.$ac_ext <<EOF
4149 #line 4150 "configure"
4150 #include "confdefs.h"
4151 /* Override any gcc2 internal prototype to avoid an error. */
4152 /* We use char because int might match the return type of a gcc2
4153 builtin and then its argument prototype would still apply. */
4154 char tgetent();
4155
4156 int main() {
4157 tgetent()
4158 ; return 0; }
4159 EOF
4160 if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4161 rm -rf conftest*
4162 ac_cv_search_tgetent="-l$i"
4163 break
4164 else
4165 echo "configure: failed program was:" >&5
4166 cat conftest.$ac_ext >&5
4167 fi
4168 rm -f conftest*
4169 done
4170 LIBS="$ac_func_search_save_LIBS"
4171 fi
4172
4173 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4174 if test "$ac_cv_search_tgetent" != "no"; then
4175 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4176
4177 else :
4178
4179 fi
4180 ;;
4181 esac
4182
4183 # Note: We used to check for libtermlib and libterminfo too, but
4184 # Readline doesn't, so I think we're safe with leaving them out.
4185
4186 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4187 echo "configure:4188: checking for library containing tgetent" >&5
4188 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4189 echo $ac_n "(cached) $ac_c" 1>&6
4190 else
4191 ac_func_search_save_LIBS="$LIBS"
4192 ac_cv_search_tgetent="no"
4193 cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 /* Override any gcc2 internal prototype to avoid an error. */
4197 /* We use char because int might match the return type of a gcc2
4198 builtin and then its argument prototype would still apply. */
4199 char tgetent();
4200
4201 int main() {
4202 tgetent()
4203 ; return 0; }
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4206 rm -rf conftest*
4207 ac_cv_search_tgetent="none required"
4208 else
4209 echo "configure: failed program was:" >&5
4210 cat conftest.$ac_ext >&5
4211 fi
4212 rm -f conftest*
4213 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4214 LIBS="-l$i $ac_func_search_save_LIBS"
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 /* Override any gcc2 internal prototype to avoid an error. */
4219 /* We use char because int might match the return type of a gcc2
4220 builtin and then its argument prototype would still apply. */
4221 char tgetent();
4222
4223 int main() {
4224 tgetent()
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4228 rm -rf conftest*
4229 ac_cv_search_tgetent="-l$i"
4230 break
4231 else
4232 echo "configure: failed program was:" >&5
4233 cat conftest.$ac_ext >&5
4234 fi
4235 rm -f conftest*
4236 done
4237 LIBS="$ac_func_search_save_LIBS"
4238 fi
4239
4240 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4241 if test "$ac_cv_search_tgetent" != "no"; then
4242 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4243
4244 else :
4245
4246 fi
4247
4248 if test "$ac_cv_search_tgetent" = no; then
4249 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4250 fi
4251
4252 # ------------------------- #
4253 # Checks for header files. #
4254 # ------------------------- #
4255
4256 ac_header_dirent=no
4257 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4258 do
4259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4260 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4261 echo "configure:4262: checking for $ac_hdr that defines DIR" >&5
4262 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4263 echo $ac_n "(cached) $ac_c" 1>&6
4264 else
4265 cat > conftest.$ac_ext <<EOF
4266 #line 4267 "configure"
4267 #include "confdefs.h"
4268 #include <sys/types.h>
4269 #include <$ac_hdr>
4270 int main() {
4271 DIR *dirp = 0;
4272 ; return 0; }
4273 EOF
4274 if { (eval echo configure:4275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4275 rm -rf conftest*
4276 eval "ac_cv_header_dirent_$ac_safe=yes"
4277 else
4278 echo "configure: failed program was:" >&5
4279 cat conftest.$ac_ext >&5
4280 rm -rf conftest*
4281 eval "ac_cv_header_dirent_$ac_safe=no"
4282 fi
4283 rm -f conftest*
4284 fi
4285 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4286 echo "$ac_t""yes" 1>&6
4287 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4288 cat >> confdefs.h <<EOF
4289 #define $ac_tr_hdr 1
4290 EOF
4291 ac_header_dirent=$ac_hdr; break
4292 else
4293 echo "$ac_t""no" 1>&6
4294 fi
4295 done
4296 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4297 if test $ac_header_dirent = dirent.h; then
4298 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4299 echo "configure:4300: checking for opendir in -ldir" >&5
4300 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4302 echo $ac_n "(cached) $ac_c" 1>&6
4303 else
4304 ac_save_LIBS="$LIBS"
4305 LIBS="-ldir $LIBS"
4306 cat > conftest.$ac_ext <<EOF
4307 #line 4308 "configure"
4308 #include "confdefs.h"
4309 /* Override any gcc2 internal prototype to avoid an error. */
4310 /* We use char because int might match the return type of a gcc2
4311 builtin and then its argument prototype would still apply. */
4312 char opendir();
4313
4314 int main() {
4315 opendir()
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4319 rm -rf conftest*
4320 eval "ac_cv_lib_$ac_lib_var=yes"
4321 else
4322 echo "configure: failed program was:" >&5
4323 cat conftest.$ac_ext >&5
4324 rm -rf conftest*
4325 eval "ac_cv_lib_$ac_lib_var=no"
4326 fi
4327 rm -f conftest*
4328 LIBS="$ac_save_LIBS"
4329
4330 fi
4331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4332 echo "$ac_t""yes" 1>&6
4333 LIBS="$LIBS -ldir"
4334 else
4335 echo "$ac_t""no" 1>&6
4336 fi
4337
4338 else
4339 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4340 echo "configure:4341: checking for opendir in -lx" >&5
4341 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4342 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4343 echo $ac_n "(cached) $ac_c" 1>&6
4344 else
4345 ac_save_LIBS="$LIBS"
4346 LIBS="-lx $LIBS"
4347 cat > conftest.$ac_ext <<EOF
4348 #line 4349 "configure"
4349 #include "confdefs.h"
4350 /* Override any gcc2 internal prototype to avoid an error. */
4351 /* We use char because int might match the return type of a gcc2
4352 builtin and then its argument prototype would still apply. */
4353 char opendir();
4354
4355 int main() {
4356 opendir()
4357 ; return 0; }
4358 EOF
4359 if { (eval echo configure:4360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4360 rm -rf conftest*
4361 eval "ac_cv_lib_$ac_lib_var=yes"
4362 else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -rf conftest*
4366 eval "ac_cv_lib_$ac_lib_var=no"
4367 fi
4368 rm -f conftest*
4369 LIBS="$ac_save_LIBS"
4370
4371 fi
4372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4373 echo "$ac_t""yes" 1>&6
4374 LIBS="$LIBS -lx"
4375 else
4376 echo "$ac_t""no" 1>&6
4377 fi
4378
4379 fi
4380
4381 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4382 echo "configure:4383: checking whether stat file-mode macros are broken" >&5
4383 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4384 echo $ac_n "(cached) $ac_c" 1>&6
4385 else
4386 cat > conftest.$ac_ext <<EOF
4387 #line 4388 "configure"
4388 #include "confdefs.h"
4389 #include <sys/types.h>
4390 #include <sys/stat.h>
4391
4392 #if defined(S_ISBLK) && defined(S_IFDIR)
4393 # if S_ISBLK (S_IFDIR)
4394 You lose.
4395 # endif
4396 #endif
4397
4398 #if defined(S_ISBLK) && defined(S_IFCHR)
4399 # if S_ISBLK (S_IFCHR)
4400 You lose.
4401 # endif
4402 #endif
4403
4404 #if defined(S_ISLNK) && defined(S_IFREG)
4405 # if S_ISLNK (S_IFREG)
4406 You lose.
4407 # endif
4408 #endif
4409
4410 #if defined(S_ISSOCK) && defined(S_IFREG)
4411 # if S_ISSOCK (S_IFREG)
4412 You lose.
4413 # endif
4414 #endif
4415
4416 EOF
4417 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4418 egrep "You lose" >/dev/null 2>&1; then
4419 rm -rf conftest*
4420 ac_cv_header_stat_broken=yes
4421 else
4422 rm -rf conftest*
4423 ac_cv_header_stat_broken=no
4424 fi
4425 rm -f conftest*
4426
4427 fi
4428
4429 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4430 if test $ac_cv_header_stat_broken = yes; then
4431 cat >> confdefs.h <<\EOF
4432 #define STAT_MACROS_BROKEN 1
4433 EOF
4434
4435 fi
4436
4437 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4438 echo "configure:4439: checking for ANSI C header files" >&5
4439 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4440 echo $ac_n "(cached) $ac_c" 1>&6
4441 else
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 #include <stdlib.h>
4446 #include <stdarg.h>
4447 #include <string.h>
4448 #include <float.h>
4449 EOF
4450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4451 { (eval echo configure:4452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4453 if test -z "$ac_err"; then
4454 rm -rf conftest*
4455 ac_cv_header_stdc=yes
4456 else
4457 echo "$ac_err" >&5
4458 echo "configure: failed program was:" >&5
4459 cat conftest.$ac_ext >&5
4460 rm -rf conftest*
4461 ac_cv_header_stdc=no
4462 fi
4463 rm -f conftest*
4464
4465 if test $ac_cv_header_stdc = yes; then
4466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4467 cat > conftest.$ac_ext <<EOF
4468 #line 4469 "configure"
4469 #include "confdefs.h"
4470 #include <string.h>
4471 EOF
4472 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4473 egrep "memchr" >/dev/null 2>&1; then
4474 :
4475 else
4476 rm -rf conftest*
4477 ac_cv_header_stdc=no
4478 fi
4479 rm -f conftest*
4480
4481 fi
4482
4483 if test $ac_cv_header_stdc = yes; then
4484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4485 cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include <stdlib.h>
4489 EOF
4490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4491 egrep "free" >/dev/null 2>&1; then
4492 :
4493 else
4494 rm -rf conftest*
4495 ac_cv_header_stdc=no
4496 fi
4497 rm -f conftest*
4498
4499 fi
4500
4501 if test $ac_cv_header_stdc = yes; then
4502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4503 if test "$cross_compiling" = yes; then
4504 :
4505 else
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <ctype.h>
4510 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4511 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4512 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4513 int main () { int i; for (i = 0; i < 256; i++)
4514 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4515 exit (0); }
4516
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4519 then
4520 :
4521 else
4522 echo "configure: failed program was:" >&5
4523 cat conftest.$ac_ext >&5
4524 rm -fr conftest*
4525 ac_cv_header_stdc=no
4526 fi
4527 rm -fr conftest*
4528 fi
4529
4530 fi
4531 fi
4532
4533 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4534 if test $ac_cv_header_stdc = yes; then
4535 cat >> confdefs.h <<\EOF
4536 #define STDC_HEADERS 1
4537 EOF
4538
4539 fi
4540
4541 for ac_hdr in link.h
4542 do
4543 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4544 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4545 echo "configure:4546: checking for $ac_hdr" >&5
4546 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4547 echo $ac_n "(cached) $ac_c" 1>&6
4548 else
4549 cat > conftest.$ac_ext <<EOF
4550 #line 4551 "configure"
4551 #include "confdefs.h"
4552 #include <$ac_hdr>
4553 EOF
4554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4555 { (eval echo configure:4556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4557 if test -z "$ac_err"; then
4558 rm -rf conftest*
4559 eval "ac_cv_header_$ac_safe=yes"
4560 else
4561 echo "$ac_err" >&5
4562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 rm -rf conftest*
4565 eval "ac_cv_header_$ac_safe=no"
4566 fi
4567 rm -f conftest*
4568 fi
4569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4570 echo "$ac_t""yes" 1>&6
4571 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4572 cat >> confdefs.h <<EOF
4573 #define $ac_tr_hdr 1
4574 EOF
4575
4576 else
4577 echo "$ac_t""no" 1>&6
4578 fi
4579 done
4580
4581 for ac_hdr in machine/reg.h
4582 do
4583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4584 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4585 echo "configure:4586: checking for $ac_hdr" >&5
4586 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4587 echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589 cat > conftest.$ac_ext <<EOF
4590 #line 4591 "configure"
4591 #include "confdefs.h"
4592 #include <$ac_hdr>
4593 EOF
4594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4595 { (eval echo configure:4596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4597 if test -z "$ac_err"; then
4598 rm -rf conftest*
4599 eval "ac_cv_header_$ac_safe=yes"
4600 else
4601 echo "$ac_err" >&5
4602 echo "configure: failed program was:" >&5
4603 cat conftest.$ac_ext >&5
4604 rm -rf conftest*
4605 eval "ac_cv_header_$ac_safe=no"
4606 fi
4607 rm -f conftest*
4608 fi
4609 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4610 echo "$ac_t""yes" 1>&6
4611 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4612 cat >> confdefs.h <<EOF
4613 #define $ac_tr_hdr 1
4614 EOF
4615
4616 else
4617 echo "$ac_t""no" 1>&6
4618 fi
4619 done
4620
4621 for ac_hdr in nlist.h
4622 do
4623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_hdr" >&5
4626 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4627 echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 #include <$ac_hdr>
4633 EOF
4634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4635 { (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4637 if test -z "$ac_err"; then
4638 rm -rf conftest*
4639 eval "ac_cv_header_$ac_safe=yes"
4640 else
4641 echo "$ac_err" >&5
4642 echo "configure: failed program was:" >&5
4643 cat conftest.$ac_ext >&5
4644 rm -rf conftest*
4645 eval "ac_cv_header_$ac_safe=no"
4646 fi
4647 rm -f conftest*
4648 fi
4649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4650 echo "$ac_t""yes" 1>&6
4651 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4652 cat >> confdefs.h <<EOF
4653 #define $ac_tr_hdr 1
4654 EOF
4655
4656 else
4657 echo "$ac_t""no" 1>&6
4658 fi
4659 done
4660
4661 for ac_hdr in poll.h sys/poll.h
4662 do
4663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4664 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_hdr" >&5
4666 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4667 echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669 cat > conftest.$ac_ext <<EOF
4670 #line 4671 "configure"
4671 #include "confdefs.h"
4672 #include <$ac_hdr>
4673 EOF
4674 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4675 { (eval echo configure:4676: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4676 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4677 if test -z "$ac_err"; then
4678 rm -rf conftest*
4679 eval "ac_cv_header_$ac_safe=yes"
4680 else
4681 echo "$ac_err" >&5
4682 echo "configure: failed program was:" >&5
4683 cat conftest.$ac_ext >&5
4684 rm -rf conftest*
4685 eval "ac_cv_header_$ac_safe=no"
4686 fi
4687 rm -f conftest*
4688 fi
4689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4690 echo "$ac_t""yes" 1>&6
4691 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4692 cat >> confdefs.h <<EOF
4693 #define $ac_tr_hdr 1
4694 EOF
4695
4696 else
4697 echo "$ac_t""no" 1>&6
4698 fi
4699 done
4700
4701 for ac_hdr in proc_service.h thread_db.h
4702 do
4703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4705 echo "configure:4706: checking for $ac_hdr" >&5
4706 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4708 else
4709 cat > conftest.$ac_ext <<EOF
4710 #line 4711 "configure"
4711 #include "confdefs.h"
4712 #include <$ac_hdr>
4713 EOF
4714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4715 { (eval echo configure:4716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4717 if test -z "$ac_err"; then
4718 rm -rf conftest*
4719 eval "ac_cv_header_$ac_safe=yes"
4720 else
4721 echo "$ac_err" >&5
4722 echo "configure: failed program was:" >&5
4723 cat conftest.$ac_ext >&5
4724 rm -rf conftest*
4725 eval "ac_cv_header_$ac_safe=no"
4726 fi
4727 rm -f conftest*
4728 fi
4729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4730 echo "$ac_t""yes" 1>&6
4731 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4732 cat >> confdefs.h <<EOF
4733 #define $ac_tr_hdr 1
4734 EOF
4735
4736 else
4737 echo "$ac_t""no" 1>&6
4738 fi
4739 done
4740
4741 for ac_hdr in stddef.h
4742 do
4743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4745 echo "configure:4746: checking for $ac_hdr" >&5
4746 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4747 echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749 cat > conftest.$ac_ext <<EOF
4750 #line 4751 "configure"
4751 #include "confdefs.h"
4752 #include <$ac_hdr>
4753 EOF
4754 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4755 { (eval echo configure:4756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4756 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4757 if test -z "$ac_err"; then
4758 rm -rf conftest*
4759 eval "ac_cv_header_$ac_safe=yes"
4760 else
4761 echo "$ac_err" >&5
4762 echo "configure: failed program was:" >&5
4763 cat conftest.$ac_ext >&5
4764 rm -rf conftest*
4765 eval "ac_cv_header_$ac_safe=no"
4766 fi
4767 rm -f conftest*
4768 fi
4769 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4770 echo "$ac_t""yes" 1>&6
4771 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4772 cat >> confdefs.h <<EOF
4773 #define $ac_tr_hdr 1
4774 EOF
4775
4776 else
4777 echo "$ac_t""no" 1>&6
4778 fi
4779 done
4780
4781 for ac_hdr in stdlib.h
4782 do
4783 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4784 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4785 echo "configure:4786: checking for $ac_hdr" >&5
4786 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4787 echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4792 #include <$ac_hdr>
4793 EOF
4794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4795 { (eval echo configure:4796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4797 if test -z "$ac_err"; then
4798 rm -rf conftest*
4799 eval "ac_cv_header_$ac_safe=yes"
4800 else
4801 echo "$ac_err" >&5
4802 echo "configure: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4804 rm -rf conftest*
4805 eval "ac_cv_header_$ac_safe=no"
4806 fi
4807 rm -f conftest*
4808 fi
4809 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4810 echo "$ac_t""yes" 1>&6
4811 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4812 cat >> confdefs.h <<EOF
4813 #define $ac_tr_hdr 1
4814 EOF
4815
4816 else
4817 echo "$ac_t""no" 1>&6
4818 fi
4819 done
4820
4821 for ac_hdr in stdint.h
4822 do
4823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4825 echo "configure:4826: checking for $ac_hdr" >&5
4826 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4827 echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829 cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <$ac_hdr>
4833 EOF
4834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4835 { (eval echo configure:4836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4837 if test -z "$ac_err"; then
4838 rm -rf conftest*
4839 eval "ac_cv_header_$ac_safe=yes"
4840 else
4841 echo "$ac_err" >&5
4842 echo "configure: failed program was:" >&5
4843 cat conftest.$ac_ext >&5
4844 rm -rf conftest*
4845 eval "ac_cv_header_$ac_safe=no"
4846 fi
4847 rm -f conftest*
4848 fi
4849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4850 echo "$ac_t""yes" 1>&6
4851 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4852 cat >> confdefs.h <<EOF
4853 #define $ac_tr_hdr 1
4854 EOF
4855
4856 else
4857 echo "$ac_t""no" 1>&6
4858 fi
4859 done
4860
4861 for ac_hdr in string.h memory.h strings.h
4862 do
4863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4865 echo "configure:4866: checking for $ac_hdr" >&5
4866 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4867 echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869 cat > conftest.$ac_ext <<EOF
4870 #line 4871 "configure"
4871 #include "confdefs.h"
4872 #include <$ac_hdr>
4873 EOF
4874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4875 { (eval echo configure:4876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4877 if test -z "$ac_err"; then
4878 rm -rf conftest*
4879 eval "ac_cv_header_$ac_safe=yes"
4880 else
4881 echo "$ac_err" >&5
4882 echo "configure: failed program was:" >&5
4883 cat conftest.$ac_ext >&5
4884 rm -rf conftest*
4885 eval "ac_cv_header_$ac_safe=no"
4886 fi
4887 rm -f conftest*
4888 fi
4889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4890 echo "$ac_t""yes" 1>&6
4891 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4892 cat >> confdefs.h <<EOF
4893 #define $ac_tr_hdr 1
4894 EOF
4895
4896 else
4897 echo "$ac_t""no" 1>&6
4898 fi
4899 done
4900
4901 for ac_hdr in sys/fault.h
4902 do
4903 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4904 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4905 echo "configure:4906: checking for $ac_hdr" >&5
4906 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4907 echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909 cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912 #include <$ac_hdr>
4913 EOF
4914 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4915 { (eval echo configure:4916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4916 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4917 if test -z "$ac_err"; then
4918 rm -rf conftest*
4919 eval "ac_cv_header_$ac_safe=yes"
4920 else
4921 echo "$ac_err" >&5
4922 echo "configure: failed program was:" >&5
4923 cat conftest.$ac_ext >&5
4924 rm -rf conftest*
4925 eval "ac_cv_header_$ac_safe=no"
4926 fi
4927 rm -f conftest*
4928 fi
4929 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4930 echo "$ac_t""yes" 1>&6
4931 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4932 cat >> confdefs.h <<EOF
4933 #define $ac_tr_hdr 1
4934 EOF
4935
4936 else
4937 echo "$ac_t""no" 1>&6
4938 fi
4939 done
4940
4941 for ac_hdr in sys/file.h
4942 do
4943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4945 echo "configure:4946: checking for $ac_hdr" >&5
4946 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4947 echo $ac_n "(cached) $ac_c" 1>&6
4948 else
4949 cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952 #include <$ac_hdr>
4953 EOF
4954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4955 { (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4957 if test -z "$ac_err"; then
4958 rm -rf conftest*
4959 eval "ac_cv_header_$ac_safe=yes"
4960 else
4961 echo "$ac_err" >&5
4962 echo "configure: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 rm -rf conftest*
4965 eval "ac_cv_header_$ac_safe=no"
4966 fi
4967 rm -f conftest*
4968 fi
4969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4970 echo "$ac_t""yes" 1>&6
4971 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4972 cat >> confdefs.h <<EOF
4973 #define $ac_tr_hdr 1
4974 EOF
4975
4976 else
4977 echo "$ac_t""no" 1>&6
4978 fi
4979 done
4980
4981 for ac_hdr in sys/filio.h
4982 do
4983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4985 echo "configure:4986: checking for $ac_hdr" >&5
4986 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4987 echo $ac_n "(cached) $ac_c" 1>&6
4988 else
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4992 #include <$ac_hdr>
4993 EOF
4994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4995 { (eval echo configure:4996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4997 if test -z "$ac_err"; then
4998 rm -rf conftest*
4999 eval "ac_cv_header_$ac_safe=yes"
5000 else
5001 echo "$ac_err" >&5
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5004 rm -rf conftest*
5005 eval "ac_cv_header_$ac_safe=no"
5006 fi
5007 rm -f conftest*
5008 fi
5009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5010 echo "$ac_t""yes" 1>&6
5011 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5012 cat >> confdefs.h <<EOF
5013 #define $ac_tr_hdr 1
5014 EOF
5015
5016 else
5017 echo "$ac_t""no" 1>&6
5018 fi
5019 done
5020
5021 for ac_hdr in sys/ioctl.h
5022 do
5023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5025 echo "configure:5026: checking for $ac_hdr" >&5
5026 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5027 echo $ac_n "(cached) $ac_c" 1>&6
5028 else
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032 #include <$ac_hdr>
5033 EOF
5034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5035 { (eval echo configure:5036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5037 if test -z "$ac_err"; then
5038 rm -rf conftest*
5039 eval "ac_cv_header_$ac_safe=yes"
5040 else
5041 echo "$ac_err" >&5
5042 echo "configure: failed program was:" >&5
5043 cat conftest.$ac_ext >&5
5044 rm -rf conftest*
5045 eval "ac_cv_header_$ac_safe=no"
5046 fi
5047 rm -f conftest*
5048 fi
5049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5050 echo "$ac_t""yes" 1>&6
5051 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5052 cat >> confdefs.h <<EOF
5053 #define $ac_tr_hdr 1
5054 EOF
5055
5056 else
5057 echo "$ac_t""no" 1>&6
5058 fi
5059 done
5060
5061 for ac_hdr in sys/param.h
5062 do
5063 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5064 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5065 echo "configure:5066: checking for $ac_hdr" >&5
5066 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5067 echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069 cat > conftest.$ac_ext <<EOF
5070 #line 5071 "configure"
5071 #include "confdefs.h"
5072 #include <$ac_hdr>
5073 EOF
5074 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5075 { (eval echo configure:5076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5076 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5077 if test -z "$ac_err"; then
5078 rm -rf conftest*
5079 eval "ac_cv_header_$ac_safe=yes"
5080 else
5081 echo "$ac_err" >&5
5082 echo "configure: failed program was:" >&5
5083 cat conftest.$ac_ext >&5
5084 rm -rf conftest*
5085 eval "ac_cv_header_$ac_safe=no"
5086 fi
5087 rm -f conftest*
5088 fi
5089 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5090 echo "$ac_t""yes" 1>&6
5091 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5092 cat >> confdefs.h <<EOF
5093 #define $ac_tr_hdr 1
5094 EOF
5095
5096 else
5097 echo "$ac_t""no" 1>&6
5098 fi
5099 done
5100
5101 for ac_hdr in sys/proc.h
5102 do
5103 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5104 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5105 echo "configure:5106: checking for $ac_hdr" >&5
5106 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5107 echo $ac_n "(cached) $ac_c" 1>&6
5108 else
5109 cat > conftest.$ac_ext <<EOF
5110 #line 5111 "configure"
5111 #include "confdefs.h"
5112 #include <$ac_hdr>
5113 EOF
5114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5115 { (eval echo configure:5116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5117 if test -z "$ac_err"; then
5118 rm -rf conftest*
5119 eval "ac_cv_header_$ac_safe=yes"
5120 else
5121 echo "$ac_err" >&5
5122 echo "configure: failed program was:" >&5
5123 cat conftest.$ac_ext >&5
5124 rm -rf conftest*
5125 eval "ac_cv_header_$ac_safe=no"
5126 fi
5127 rm -f conftest*
5128 fi
5129 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5130 echo "$ac_t""yes" 1>&6
5131 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5132 cat >> confdefs.h <<EOF
5133 #define $ac_tr_hdr 1
5134 EOF
5135
5136 else
5137 echo "$ac_t""no" 1>&6
5138 fi
5139 done
5140
5141 for ac_hdr in sys/procfs.h
5142 do
5143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5145 echo "configure:5146: checking for $ac_hdr" >&5
5146 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5147 echo $ac_n "(cached) $ac_c" 1>&6
5148 else
5149 cat > conftest.$ac_ext <<EOF
5150 #line 5151 "configure"
5151 #include "confdefs.h"
5152 #include <$ac_hdr>
5153 EOF
5154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5155 { (eval echo configure:5156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5157 if test -z "$ac_err"; then
5158 rm -rf conftest*
5159 eval "ac_cv_header_$ac_safe=yes"
5160 else
5161 echo "$ac_err" >&5
5162 echo "configure: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5164 rm -rf conftest*
5165 eval "ac_cv_header_$ac_safe=no"
5166 fi
5167 rm -f conftest*
5168 fi
5169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5170 echo "$ac_t""yes" 1>&6
5171 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5172 cat >> confdefs.h <<EOF
5173 #define $ac_tr_hdr 1
5174 EOF
5175
5176 else
5177 echo "$ac_t""no" 1>&6
5178 fi
5179 done
5180
5181 for ac_hdr in sys/ptrace.h ptrace.h
5182 do
5183 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5184 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5185 echo "configure:5186: checking for $ac_hdr" >&5
5186 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5187 echo $ac_n "(cached) $ac_c" 1>&6
5188 else
5189 cat > conftest.$ac_ext <<EOF
5190 #line 5191 "configure"
5191 #include "confdefs.h"
5192 #include <$ac_hdr>
5193 EOF
5194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5195 { (eval echo configure:5196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5197 if test -z "$ac_err"; then
5198 rm -rf conftest*
5199 eval "ac_cv_header_$ac_safe=yes"
5200 else
5201 echo "$ac_err" >&5
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 rm -rf conftest*
5205 eval "ac_cv_header_$ac_safe=no"
5206 fi
5207 rm -f conftest*
5208 fi
5209 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5210 echo "$ac_t""yes" 1>&6
5211 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5212 cat >> confdefs.h <<EOF
5213 #define $ac_tr_hdr 1
5214 EOF
5215
5216 else
5217 echo "$ac_t""no" 1>&6
5218 fi
5219 done
5220
5221 for ac_hdr in sys/reg.h sys/debugreg.h
5222 do
5223 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5224 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5225 echo "configure:5226: checking for $ac_hdr" >&5
5226 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5227 echo $ac_n "(cached) $ac_c" 1>&6
5228 else
5229 cat > conftest.$ac_ext <<EOF
5230 #line 5231 "configure"
5231 #include "confdefs.h"
5232 #include <$ac_hdr>
5233 EOF
5234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5235 { (eval echo configure:5236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5237 if test -z "$ac_err"; then
5238 rm -rf conftest*
5239 eval "ac_cv_header_$ac_safe=yes"
5240 else
5241 echo "$ac_err" >&5
5242 echo "configure: failed program was:" >&5
5243 cat conftest.$ac_ext >&5
5244 rm -rf conftest*
5245 eval "ac_cv_header_$ac_safe=no"
5246 fi
5247 rm -f conftest*
5248 fi
5249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5250 echo "$ac_t""yes" 1>&6
5251 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5252 cat >> confdefs.h <<EOF
5253 #define $ac_tr_hdr 1
5254 EOF
5255
5256 else
5257 echo "$ac_t""no" 1>&6
5258 fi
5259 done
5260
5261 for ac_hdr in sys/select.h
5262 do
5263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5265 echo "configure:5266: checking for $ac_hdr" >&5
5266 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
5268 else
5269 cat > conftest.$ac_ext <<EOF
5270 #line 5271 "configure"
5271 #include "confdefs.h"
5272 #include <$ac_hdr>
5273 EOF
5274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5275 { (eval echo configure:5276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5277 if test -z "$ac_err"; then
5278 rm -rf conftest*
5279 eval "ac_cv_header_$ac_safe=yes"
5280 else
5281 echo "$ac_err" >&5
5282 echo "configure: failed program was:" >&5
5283 cat conftest.$ac_ext >&5
5284 rm -rf conftest*
5285 eval "ac_cv_header_$ac_safe=no"
5286 fi
5287 rm -f conftest*
5288 fi
5289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5290 echo "$ac_t""yes" 1>&6
5291 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5292 cat >> confdefs.h <<EOF
5293 #define $ac_tr_hdr 1
5294 EOF
5295
5296 else
5297 echo "$ac_t""no" 1>&6
5298 fi
5299 done
5300
5301 for ac_hdr in sys/syscall.h
5302 do
5303 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5304 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5305 echo "configure:5306: checking for $ac_hdr" >&5
5306 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5307 echo $ac_n "(cached) $ac_c" 1>&6
5308 else
5309 cat > conftest.$ac_ext <<EOF
5310 #line 5311 "configure"
5311 #include "confdefs.h"
5312 #include <$ac_hdr>
5313 EOF
5314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5315 { (eval echo configure:5316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5317 if test -z "$ac_err"; then
5318 rm -rf conftest*
5319 eval "ac_cv_header_$ac_safe=yes"
5320 else
5321 echo "$ac_err" >&5
5322 echo "configure: failed program was:" >&5
5323 cat conftest.$ac_ext >&5
5324 rm -rf conftest*
5325 eval "ac_cv_header_$ac_safe=no"
5326 fi
5327 rm -f conftest*
5328 fi
5329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5330 echo "$ac_t""yes" 1>&6
5331 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5332 cat >> confdefs.h <<EOF
5333 #define $ac_tr_hdr 1
5334 EOF
5335
5336 else
5337 echo "$ac_t""no" 1>&6
5338 fi
5339 done
5340
5341 for ac_hdr in sys/user.h
5342 do
5343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5345 echo "configure:5346: checking for $ac_hdr" >&5
5346 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5347 echo $ac_n "(cached) $ac_c" 1>&6
5348 else
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5352 #include <$ac_hdr>
5353 EOF
5354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5355 { (eval echo configure:5356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5357 if test -z "$ac_err"; then
5358 rm -rf conftest*
5359 eval "ac_cv_header_$ac_safe=yes"
5360 else
5361 echo "$ac_err" >&5
5362 echo "configure: failed program was:" >&5
5363 cat conftest.$ac_ext >&5
5364 rm -rf conftest*
5365 eval "ac_cv_header_$ac_safe=no"
5366 fi
5367 rm -f conftest*
5368 fi
5369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5370 echo "$ac_t""yes" 1>&6
5371 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5372 cat >> confdefs.h <<EOF
5373 #define $ac_tr_hdr 1
5374 EOF
5375
5376 else
5377 echo "$ac_t""no" 1>&6
5378 fi
5379 done
5380
5381 for ac_hdr in sys/wait.h wait.h
5382 do
5383 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5384 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5385 echo "configure:5386: checking for $ac_hdr" >&5
5386 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5387 echo $ac_n "(cached) $ac_c" 1>&6
5388 else
5389 cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 #include <$ac_hdr>
5393 EOF
5394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5395 { (eval echo configure:5396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5397 if test -z "$ac_err"; then
5398 rm -rf conftest*
5399 eval "ac_cv_header_$ac_safe=yes"
5400 else
5401 echo "$ac_err" >&5
5402 echo "configure: failed program was:" >&5
5403 cat conftest.$ac_ext >&5
5404 rm -rf conftest*
5405 eval "ac_cv_header_$ac_safe=no"
5406 fi
5407 rm -f conftest*
5408 fi
5409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5410 echo "$ac_t""yes" 1>&6
5411 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5412 cat >> confdefs.h <<EOF
5413 #define $ac_tr_hdr 1
5414 EOF
5415
5416 else
5417 echo "$ac_t""no" 1>&6
5418 fi
5419 done
5420
5421 for ac_hdr in termios.h termio.h sgtty.h
5422 do
5423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5424 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5425 echo "configure:5426: checking for $ac_hdr" >&5
5426 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5427 echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429 cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 #include <$ac_hdr>
5433 EOF
5434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5435 { (eval echo configure:5436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5437 if test -z "$ac_err"; then
5438 rm -rf conftest*
5439 eval "ac_cv_header_$ac_safe=yes"
5440 else
5441 echo "$ac_err" >&5
5442 echo "configure: failed program was:" >&5
5443 cat conftest.$ac_ext >&5
5444 rm -rf conftest*
5445 eval "ac_cv_header_$ac_safe=no"
5446 fi
5447 rm -f conftest*
5448 fi
5449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5450 echo "$ac_t""yes" 1>&6
5451 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5452 cat >> confdefs.h <<EOF
5453 #define $ac_tr_hdr 1
5454 EOF
5455
5456 else
5457 echo "$ac_t""no" 1>&6
5458 fi
5459 done
5460
5461 for ac_hdr in unistd.h
5462 do
5463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5465 echo "configure:5466: checking for $ac_hdr" >&5
5466 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5467 echo $ac_n "(cached) $ac_c" 1>&6
5468 else
5469 cat > conftest.$ac_ext <<EOF
5470 #line 5471 "configure"
5471 #include "confdefs.h"
5472 #include <$ac_hdr>
5473 EOF
5474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5475 { (eval echo configure:5476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5477 if test -z "$ac_err"; then
5478 rm -rf conftest*
5479 eval "ac_cv_header_$ac_safe=yes"
5480 else
5481 echo "$ac_err" >&5
5482 echo "configure: failed program was:" >&5
5483 cat conftest.$ac_ext >&5
5484 rm -rf conftest*
5485 eval "ac_cv_header_$ac_safe=no"
5486 fi
5487 rm -f conftest*
5488 fi
5489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5490 echo "$ac_t""yes" 1>&6
5491 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5492 cat >> confdefs.h <<EOF
5493 #define $ac_tr_hdr 1
5494 EOF
5495
5496 else
5497 echo "$ac_t""no" 1>&6
5498 fi
5499 done
5500
5501
5502 # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5503 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5504 # think that we don't have <curses.h> if we're using GCC.
5505 case $host_os in
5506 solaris2.[78])
5507 if test "$GCC" = yes; then
5508 cat >> confdefs.h <<\EOF
5509 #define _MSE_INT_H 1
5510 EOF
5511
5512 fi ;;
5513 esac
5514 for ac_hdr in curses.h ncurses.h term.h
5515 do
5516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5518 echo "configure:5519: checking for $ac_hdr" >&5
5519 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5520 echo $ac_n "(cached) $ac_c" 1>&6
5521 else
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 #include <$ac_hdr>
5526 EOF
5527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5528 { (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5530 if test -z "$ac_err"; then
5531 rm -rf conftest*
5532 eval "ac_cv_header_$ac_safe=yes"
5533 else
5534 echo "$ac_err" >&5
5535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5537 rm -rf conftest*
5538 eval "ac_cv_header_$ac_safe=no"
5539 fi
5540 rm -f conftest*
5541 fi
5542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5543 echo "$ac_t""yes" 1>&6
5544 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5545 cat >> confdefs.h <<EOF
5546 #define $ac_tr_hdr 1
5547 EOF
5548
5549 else
5550 echo "$ac_t""no" 1>&6
5551 fi
5552 done
5553
5554
5555 # FIXME: kettenis/20030102: In most cases we include these
5556 # unconditionally, so what's the point in checking these?
5557 for ac_hdr in ctype.h time.h
5558 do
5559 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5560 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5561 echo "configure:5562: checking for $ac_hdr" >&5
5562 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5563 echo $ac_n "(cached) $ac_c" 1>&6
5564 else
5565 cat > conftest.$ac_ext <<EOF
5566 #line 5567 "configure"
5567 #include "confdefs.h"
5568 #include <$ac_hdr>
5569 EOF
5570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5571 { (eval echo configure:5572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5573 if test -z "$ac_err"; then
5574 rm -rf conftest*
5575 eval "ac_cv_header_$ac_safe=yes"
5576 else
5577 echo "$ac_err" >&5
5578 echo "configure: failed program was:" >&5
5579 cat conftest.$ac_ext >&5
5580 rm -rf conftest*
5581 eval "ac_cv_header_$ac_safe=no"
5582 fi
5583 rm -f conftest*
5584 fi
5585 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5586 echo "$ac_t""yes" 1>&6
5587 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5588 cat >> confdefs.h <<EOF
5589 #define $ac_tr_hdr 1
5590 EOF
5591
5592 else
5593 echo "$ac_t""no" 1>&6
5594 fi
5595 done
5596
5597
5598 echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5599 echo "configure:5600: checking for member st_blocks in struct stat" >&5
5600 if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5601 echo $ac_n "(cached) $ac_c" 1>&6
5602 else
5603 cat > conftest.$ac_ext <<EOF
5604 #line 5605 "configure"
5605 #include "confdefs.h"
5606 #include <sys/types.h>
5607 #include <sys/stat.h>
5608 int main() {
5609 struct stat st; (void) st.st_blocks;
5610 ; return 0; }
5611 EOF
5612 if { (eval echo configure:5613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5613 rm -rf conftest*
5614 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5615 else
5616 echo "configure: failed program was:" >&5
5617 cat conftest.$ac_ext >&5
5618 rm -rf conftest*
5619 gdb_cv_have_struct_stat_with_st_blocks_member=no
5620 fi
5621 rm -f conftest*
5622 fi
5623
5624 echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5625 if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5626 cat >> confdefs.h <<\EOF
5627 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
5628 EOF
5629
5630 fi
5631 # ------------------------- #
5632 # Checks for declarations. #
5633 # ------------------------- #
5634
5635 for ac_func in getopt
5636 do
5637 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5638 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5639 echo "configure:5640: checking whether $ac_func is declared" >&5
5640 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5641 echo $ac_n "(cached) $ac_c" 1>&6
5642 else
5643 cat > conftest.$ac_ext <<EOF
5644 #line 5645 "configure"
5645 #include "confdefs.h"
5646 #undef $ac_tr_decl
5647 #define $ac_tr_decl 1
5648
5649
5650 int main() {
5651 #ifndef $ac_func
5652 char *(*pfn) = (char *(*)) $ac_func ;
5653 #endif
5654 ; return 0; }
5655 EOF
5656 if { (eval echo configure:5657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5657 rm -rf conftest*
5658 eval "gcc_cv_have_decl_$ac_func=yes"
5659 else
5660 echo "configure: failed program was:" >&5
5661 cat conftest.$ac_ext >&5
5662 rm -rf conftest*
5663 eval "gcc_cv_have_decl_$ac_func=no"
5664 fi
5665 rm -f conftest*
5666 fi
5667
5668 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5669 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5670 #define $ac_tr_decl 1
5671 EOF
5672
5673 else
5674 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5675 #define $ac_tr_decl 0
5676 EOF
5677
5678 fi
5679
5680 done
5681 if test x = y ; then
5682 cat >> confdefs.h <<\EOF
5683 #define HAVE_DECL_GETOPT 1
5684 EOF
5685 fi
5686
5687
5688 # ------------------ #
5689 # Checks for types. #
5690 # ------------------ #
5691
5692 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5693 echo "configure:5694: checking return type of signal handlers" >&5
5694 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5695 echo $ac_n "(cached) $ac_c" 1>&6
5696 else
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 #include <sys/types.h>
5701 #include <signal.h>
5702 #ifdef signal
5703 #undef signal
5704 #endif
5705 #ifdef __cplusplus
5706 extern "C" void (*signal (int, void (*)(int)))(int);
5707 #else
5708 void (*signal ()) ();
5709 #endif
5710
5711 int main() {
5712 int i;
5713 ; return 0; }
5714 EOF
5715 if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5716 rm -rf conftest*
5717 ac_cv_type_signal=void
5718 else
5719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
5721 rm -rf conftest*
5722 ac_cv_type_signal=int
5723 fi
5724 rm -f conftest*
5725 fi
5726
5727 echo "$ac_t""$ac_cv_type_signal" 1>&6
5728 cat >> confdefs.h <<EOF
5729 #define RETSIGTYPE $ac_cv_type_signal
5730 EOF
5731
5732
5733
5734 # ------------------------------------- #
5735 # Checks for compiler characteristics. #
5736 # ------------------------------------- #
5737
5738 echo $ac_n "checking for working const""... $ac_c" 1>&6
5739 echo "configure:5740: checking for working const" >&5
5740 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5741 echo $ac_n "(cached) $ac_c" 1>&6
5742 else
5743 cat > conftest.$ac_ext <<EOF
5744 #line 5745 "configure"
5745 #include "confdefs.h"
5746
5747 int main() {
5748
5749 /* Ultrix mips cc rejects this. */
5750 typedef int charset[2]; const charset x;
5751 /* SunOS 4.1.1 cc rejects this. */
5752 char const *const *ccp;
5753 char **p;
5754 /* NEC SVR4.0.2 mips cc rejects this. */
5755 struct point {int x, y;};
5756 static struct point const zero = {0,0};
5757 /* AIX XL C 1.02.0.0 rejects this.
5758 It does not let you subtract one const X* pointer from another in an arm
5759 of an if-expression whose if-part is not a constant expression */
5760 const char *g = "string";
5761 ccp = &g + (g ? g-g : 0);
5762 /* HPUX 7.0 cc rejects these. */
5763 ++ccp;
5764 p = (char**) ccp;
5765 ccp = (char const *const *) p;
5766 { /* SCO 3.2v4 cc rejects this. */
5767 char *t;
5768 char const *s = 0 ? (char *) 0 : (char const *) 0;
5769
5770 *t++ = 0;
5771 }
5772 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5773 int x[] = {25, 17};
5774 const int *foo = &x[0];
5775 ++foo;
5776 }
5777 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5778 typedef const int *iptr;
5779 iptr p = 0;
5780 ++p;
5781 }
5782 { /* AIX XL C 1.02.0.0 rejects this saying
5783 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5784 struct s { int j; const int *ap[3]; };
5785 struct s *b; b->j = 5;
5786 }
5787 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5788 const int foo = 10;
5789 }
5790
5791 ; return 0; }
5792 EOF
5793 if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5794 rm -rf conftest*
5795 ac_cv_c_const=yes
5796 else
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5799 rm -rf conftest*
5800 ac_cv_c_const=no
5801 fi
5802 rm -f conftest*
5803 fi
5804
5805 echo "$ac_t""$ac_cv_c_const" 1>&6
5806 if test $ac_cv_c_const = no; then
5807 cat >> confdefs.h <<\EOF
5808 #define const
5809 EOF
5810
5811 fi
5812
5813 echo $ac_n "checking for inline""... $ac_c" 1>&6
5814 echo "configure:5815: checking for inline" >&5
5815 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5816 echo $ac_n "(cached) $ac_c" 1>&6
5817 else
5818 ac_cv_c_inline=no
5819 for ac_kw in inline __inline__ __inline; do
5820 cat > conftest.$ac_ext <<EOF
5821 #line 5822 "configure"
5822 #include "confdefs.h"
5823
5824 int main() {
5825 } $ac_kw foo() {
5826 ; return 0; }
5827 EOF
5828 if { (eval echo configure:5829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5829 rm -rf conftest*
5830 ac_cv_c_inline=$ac_kw; break
5831 else
5832 echo "configure: failed program was:" >&5
5833 cat conftest.$ac_ext >&5
5834 fi
5835 rm -f conftest*
5836 done
5837
5838 fi
5839
5840 echo "$ac_t""$ac_cv_c_inline" 1>&6
5841 case "$ac_cv_c_inline" in
5842 inline | yes) ;;
5843 no) cat >> confdefs.h <<\EOF
5844 #define inline
5845 EOF
5846 ;;
5847 *) cat >> confdefs.h <<EOF
5848 #define inline $ac_cv_c_inline
5849 EOF
5850 ;;
5851 esac
5852
5853
5854 # ------------------------------ #
5855 # Checks for library functions. #
5856 # ------------------------------ #
5857
5858 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5859 # for constant arguments. Useless!
5860 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5861 echo "configure:5862: checking for working alloca.h" >&5
5862 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5863 echo $ac_n "(cached) $ac_c" 1>&6
5864 else
5865 cat > conftest.$ac_ext <<EOF
5866 #line 5867 "configure"
5867 #include "confdefs.h"
5868 #include <alloca.h>
5869 int main() {
5870 char *p = alloca(2 * sizeof(int));
5871 ; return 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5874 rm -rf conftest*
5875 ac_cv_header_alloca_h=yes
5876 else
5877 echo "configure: failed program was:" >&5
5878 cat conftest.$ac_ext >&5
5879 rm -rf conftest*
5880 ac_cv_header_alloca_h=no
5881 fi
5882 rm -f conftest*
5883 fi
5884
5885 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5886 if test $ac_cv_header_alloca_h = yes; then
5887 cat >> confdefs.h <<\EOF
5888 #define HAVE_ALLOCA_H 1
5889 EOF
5890
5891 fi
5892
5893 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5894 echo "configure:5895: checking for alloca" >&5
5895 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5896 echo $ac_n "(cached) $ac_c" 1>&6
5897 else
5898 cat > conftest.$ac_ext <<EOF
5899 #line 5900 "configure"
5900 #include "confdefs.h"
5901
5902 #ifdef __GNUC__
5903 # define alloca __builtin_alloca
5904 #else
5905 # ifdef _MSC_VER
5906 # include <malloc.h>
5907 # define alloca _alloca
5908 # else
5909 # if HAVE_ALLOCA_H
5910 # include <alloca.h>
5911 # else
5912 # ifdef _AIX
5913 #pragma alloca
5914 # else
5915 # ifndef alloca /* predefined by HP cc +Olibcalls */
5916 char *alloca ();
5917 # endif
5918 # endif
5919 # endif
5920 # endif
5921 #endif
5922
5923 int main() {
5924 char *p = (char *) alloca(1);
5925 ; return 0; }
5926 EOF
5927 if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5928 rm -rf conftest*
5929 ac_cv_func_alloca_works=yes
5930 else
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 rm -rf conftest*
5934 ac_cv_func_alloca_works=no
5935 fi
5936 rm -f conftest*
5937 fi
5938
5939 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5940 if test $ac_cv_func_alloca_works = yes; then
5941 cat >> confdefs.h <<\EOF
5942 #define HAVE_ALLOCA 1
5943 EOF
5944
5945 fi
5946
5947 if test $ac_cv_func_alloca_works = no; then
5948 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5949 # that cause trouble. Some versions do not even contain alloca or
5950 # contain a buggy version. If you still want to use their alloca,
5951 # use ar to extract alloca.o from them instead of compiling alloca.c.
5952 ALLOCA=alloca.${ac_objext}
5953 cat >> confdefs.h <<\EOF
5954 #define C_ALLOCA 1
5955 EOF
5956
5957
5958 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5959 echo "configure:5960: checking whether alloca needs Cray hooks" >&5
5960 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5961 echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963 cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966 #if defined(CRAY) && ! defined(CRAY2)
5967 webecray
5968 #else
5969 wenotbecray
5970 #endif
5971
5972 EOF
5973 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5974 egrep "webecray" >/dev/null 2>&1; then
5975 rm -rf conftest*
5976 ac_cv_os_cray=yes
5977 else
5978 rm -rf conftest*
5979 ac_cv_os_cray=no
5980 fi
5981 rm -f conftest*
5982
5983 fi
5984
5985 echo "$ac_t""$ac_cv_os_cray" 1>&6
5986 if test $ac_cv_os_cray = yes; then
5987 for ac_func in _getb67 GETB67 getb67; do
5988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5989 echo "configure:5990: checking for $ac_func" >&5
5990 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5991 echo $ac_n "(cached) $ac_c" 1>&6
5992 else
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* System header to define __stub macros and hopefully few prototypes,
5997 which can conflict with char $ac_func(); below. */
5998 #include <assert.h>
5999 /* Override any gcc2 internal prototype to avoid an error. */
6000 /* We use char because int might match the return type of a gcc2
6001 builtin and then its argument prototype would still apply. */
6002 char $ac_func();
6003
6004 int main() {
6005
6006 /* The GNU C library defines this for functions which it implements
6007 to always fail with ENOSYS. Some functions are actually named
6008 something starting with __ and the normal name is an alias. */
6009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6010 choke me
6011 #else
6012 $ac_func();
6013 #endif
6014
6015 ; return 0; }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6018 rm -rf conftest*
6019 eval "ac_cv_func_$ac_func=yes"
6020 else
6021 echo "configure: failed program was:" >&5
6022 cat conftest.$ac_ext >&5
6023 rm -rf conftest*
6024 eval "ac_cv_func_$ac_func=no"
6025 fi
6026 rm -f conftest*
6027 fi
6028
6029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6030 echo "$ac_t""yes" 1>&6
6031 cat >> confdefs.h <<EOF
6032 #define CRAY_STACKSEG_END $ac_func
6033 EOF
6034
6035 break
6036 else
6037 echo "$ac_t""no" 1>&6
6038 fi
6039
6040 done
6041 fi
6042
6043 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6044 echo "configure:6045: checking stack direction for C alloca" >&5
6045 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6046 echo $ac_n "(cached) $ac_c" 1>&6
6047 else
6048 if test "$cross_compiling" = yes; then
6049 ac_cv_c_stack_direction=0
6050 else
6051 cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.h"
6054 find_stack_direction ()
6055 {
6056 static char *addr = 0;
6057 auto char dummy;
6058 if (addr == 0)
6059 {
6060 addr = &dummy;
6061 return find_stack_direction ();
6062 }
6063 else
6064 return (&dummy > addr) ? 1 : -1;
6065 }
6066 main ()
6067 {
6068 exit (find_stack_direction() < 0);
6069 }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6072 then
6073 ac_cv_c_stack_direction=1
6074 else
6075 echo "configure: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6077 rm -fr conftest*
6078 ac_cv_c_stack_direction=-1
6079 fi
6080 rm -fr conftest*
6081 fi
6082
6083 fi
6084
6085 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6086 cat >> confdefs.h <<EOF
6087 #define STACK_DIRECTION $ac_cv_c_stack_direction
6088 EOF
6089
6090 fi
6091
6092 for ac_hdr in unistd.h
6093 do
6094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6096 echo "configure:6097: checking for $ac_hdr" >&5
6097 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6098 echo $ac_n "(cached) $ac_c" 1>&6
6099 else
6100 cat > conftest.$ac_ext <<EOF
6101 #line 6102 "configure"
6102 #include "confdefs.h"
6103 #include <$ac_hdr>
6104 EOF
6105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6106 { (eval echo configure:6107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6108 if test -z "$ac_err"; then
6109 rm -rf conftest*
6110 eval "ac_cv_header_$ac_safe=yes"
6111 else
6112 echo "$ac_err" >&5
6113 echo "configure: failed program was:" >&5
6114 cat conftest.$ac_ext >&5
6115 rm -rf conftest*
6116 eval "ac_cv_header_$ac_safe=no"
6117 fi
6118 rm -f conftest*
6119 fi
6120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6121 echo "$ac_t""yes" 1>&6
6122 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6123 cat >> confdefs.h <<EOF
6124 #define $ac_tr_hdr 1
6125 EOF
6126
6127 else
6128 echo "$ac_t""no" 1>&6
6129 fi
6130 done
6131
6132 for ac_func in getpagesize
6133 do
6134 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6135 echo "configure:6136: checking for $ac_func" >&5
6136 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6137 echo $ac_n "(cached) $ac_c" 1>&6
6138 else
6139 cat > conftest.$ac_ext <<EOF
6140 #line 6141 "configure"
6141 #include "confdefs.h"
6142 /* System header to define __stub macros and hopefully few prototypes,
6143 which can conflict with char $ac_func(); below. */
6144 #include <assert.h>
6145 /* Override any gcc2 internal prototype to avoid an error. */
6146 /* We use char because int might match the return type of a gcc2
6147 builtin and then its argument prototype would still apply. */
6148 char $ac_func();
6149
6150 int main() {
6151
6152 /* The GNU C library defines this for functions which it implements
6153 to always fail with ENOSYS. Some functions are actually named
6154 something starting with __ and the normal name is an alias. */
6155 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6156 choke me
6157 #else
6158 $ac_func();
6159 #endif
6160
6161 ; return 0; }
6162 EOF
6163 if { (eval echo configure:6164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6164 rm -rf conftest*
6165 eval "ac_cv_func_$ac_func=yes"
6166 else
6167 echo "configure: failed program was:" >&5
6168 cat conftest.$ac_ext >&5
6169 rm -rf conftest*
6170 eval "ac_cv_func_$ac_func=no"
6171 fi
6172 rm -f conftest*
6173 fi
6174
6175 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6176 echo "$ac_t""yes" 1>&6
6177 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6178 cat >> confdefs.h <<EOF
6179 #define $ac_tr_func 1
6180 EOF
6181
6182 else
6183 echo "$ac_t""no" 1>&6
6184 fi
6185 done
6186
6187 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6188 echo "configure:6189: checking for working mmap" >&5
6189 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6190 echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192 if test "$cross_compiling" = yes; then
6193 ac_cv_func_mmap_fixed_mapped=no
6194 else
6195 cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198
6199 /* Thanks to Mike Haertel and Jim Avera for this test.
6200 Here is a matrix of mmap possibilities:
6201 mmap private not fixed
6202 mmap private fixed at somewhere currently unmapped
6203 mmap private fixed at somewhere already mapped
6204 mmap shared not fixed
6205 mmap shared fixed at somewhere currently unmapped
6206 mmap shared fixed at somewhere already mapped
6207 For private mappings, we should verify that changes cannot be read()
6208 back from the file, nor mmap's back from the file at a different
6209 address. (There have been systems where private was not correctly
6210 implemented like the infamous i386 svr4.0, and systems where the
6211 VM page cache was not coherent with the filesystem buffer cache
6212 like early versions of FreeBSD and possibly contemporary NetBSD.)
6213 For shared mappings, we should conversely verify that changes get
6214 propogated back to all the places they're supposed to be.
6215
6216 Grep wants private fixed already mapped.
6217 The main things grep needs to know about mmap are:
6218 * does it exist and is it safe to write into the mmap'd area
6219 * how to use it (BSD variants) */
6220 #include <sys/types.h>
6221 #include <fcntl.h>
6222 #include <sys/mman.h>
6223
6224 /* This mess was copied from the GNU getpagesize.h. */
6225 #ifndef HAVE_GETPAGESIZE
6226 # ifdef HAVE_UNISTD_H
6227 # include <unistd.h>
6228 # endif
6229
6230 /* Assume that all systems that can run configure have sys/param.h. */
6231 # ifndef HAVE_SYS_PARAM_H
6232 # define HAVE_SYS_PARAM_H 1
6233 # endif
6234
6235 # ifdef _SC_PAGESIZE
6236 # define getpagesize() sysconf(_SC_PAGESIZE)
6237 # else /* no _SC_PAGESIZE */
6238 # ifdef HAVE_SYS_PARAM_H
6239 # include <sys/param.h>
6240 # ifdef EXEC_PAGESIZE
6241 # define getpagesize() EXEC_PAGESIZE
6242 # else /* no EXEC_PAGESIZE */
6243 # ifdef NBPG
6244 # define getpagesize() NBPG * CLSIZE
6245 # ifndef CLSIZE
6246 # define CLSIZE 1
6247 # endif /* no CLSIZE */
6248 # else /* no NBPG */
6249 # ifdef NBPC
6250 # define getpagesize() NBPC
6251 # else /* no NBPC */
6252 # ifdef PAGESIZE
6253 # define getpagesize() PAGESIZE
6254 # endif /* PAGESIZE */
6255 # endif /* no NBPC */
6256 # endif /* no NBPG */
6257 # endif /* no EXEC_PAGESIZE */
6258 # else /* no HAVE_SYS_PARAM_H */
6259 # define getpagesize() 8192 /* punt totally */
6260 # endif /* no HAVE_SYS_PARAM_H */
6261 # endif /* no _SC_PAGESIZE */
6262
6263 #endif /* no HAVE_GETPAGESIZE */
6264
6265 #ifdef __cplusplus
6266 extern "C" { void *malloc(unsigned); }
6267 #else
6268 char *malloc();
6269 #endif
6270
6271 int
6272 main()
6273 {
6274 char *data, *data2, *data3;
6275 int i, pagesize;
6276 int fd;
6277
6278 pagesize = getpagesize();
6279
6280 /*
6281 * First, make a file with some known garbage in it.
6282 */
6283 data = malloc(pagesize);
6284 if (!data)
6285 exit(1);
6286 for (i = 0; i < pagesize; ++i)
6287 *(data + i) = rand();
6288 umask(0);
6289 fd = creat("conftestmmap", 0600);
6290 if (fd < 0)
6291 exit(1);
6292 if (write(fd, data, pagesize) != pagesize)
6293 exit(1);
6294 close(fd);
6295
6296 /*
6297 * Next, try to mmap the file at a fixed address which
6298 * already has something else allocated at it. If we can,
6299 * also make sure that we see the same garbage.
6300 */
6301 fd = open("conftestmmap", O_RDWR);
6302 if (fd < 0)
6303 exit(1);
6304 data2 = malloc(2 * pagesize);
6305 if (!data2)
6306 exit(1);
6307 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6308 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6309 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6310 exit(1);
6311 for (i = 0; i < pagesize; ++i)
6312 if (*(data + i) != *(data2 + i))
6313 exit(1);
6314
6315 /*
6316 * Finally, make sure that changes to the mapped area
6317 * do not percolate back to the file as seen by read().
6318 * (This is a bug on some variants of i386 svr4.0.)
6319 */
6320 for (i = 0; i < pagesize; ++i)
6321 *(data2 + i) = *(data2 + i) + 1;
6322 data3 = malloc(pagesize);
6323 if (!data3)
6324 exit(1);
6325 if (read(fd, data3, pagesize) != pagesize)
6326 exit(1);
6327 for (i = 0; i < pagesize; ++i)
6328 if (*(data + i) != *(data3 + i))
6329 exit(1);
6330 close(fd);
6331 unlink("conftestmmap");
6332 exit(0);
6333 }
6334
6335 EOF
6336 if { (eval echo configure:6337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6337 then
6338 ac_cv_func_mmap_fixed_mapped=yes
6339 else
6340 echo "configure: failed program was:" >&5
6341 cat conftest.$ac_ext >&5
6342 rm -fr conftest*
6343 ac_cv_func_mmap_fixed_mapped=no
6344 fi
6345 rm -fr conftest*
6346 fi
6347
6348 fi
6349
6350 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6351 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6352 cat >> confdefs.h <<\EOF
6353 #define HAVE_MMAP 1
6354 EOF
6355
6356 fi
6357
6358 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6359 echo "configure:6360: checking for pid_t" >&5
6360 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6361 echo $ac_n "(cached) $ac_c" 1>&6
6362 else
6363 cat > conftest.$ac_ext <<EOF
6364 #line 6365 "configure"
6365 #include "confdefs.h"
6366 #include <sys/types.h>
6367 #if STDC_HEADERS
6368 #include <stdlib.h>
6369 #include <stddef.h>
6370 #endif
6371 EOF
6372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6373 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6374 rm -rf conftest*
6375 ac_cv_type_pid_t=yes
6376 else
6377 rm -rf conftest*
6378 ac_cv_type_pid_t=no
6379 fi
6380 rm -f conftest*
6381
6382 fi
6383 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6384 if test $ac_cv_type_pid_t = no; then
6385 cat >> confdefs.h <<\EOF
6386 #define pid_t int
6387 EOF
6388
6389 fi
6390
6391 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6392 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6393 echo "configure:6394: checking for vfork.h" >&5
6394 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6395 echo $ac_n "(cached) $ac_c" 1>&6
6396 else
6397 cat > conftest.$ac_ext <<EOF
6398 #line 6399 "configure"
6399 #include "confdefs.h"
6400 #include <vfork.h>
6401 EOF
6402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6403 { (eval echo configure:6404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6405 if test -z "$ac_err"; then
6406 rm -rf conftest*
6407 eval "ac_cv_header_$ac_safe=yes"
6408 else
6409 echo "$ac_err" >&5
6410 echo "configure: failed program was:" >&5
6411 cat conftest.$ac_ext >&5
6412 rm -rf conftest*
6413 eval "ac_cv_header_$ac_safe=no"
6414 fi
6415 rm -f conftest*
6416 fi
6417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6418 echo "$ac_t""yes" 1>&6
6419 cat >> confdefs.h <<\EOF
6420 #define HAVE_VFORK_H 1
6421 EOF
6422
6423 else
6424 echo "$ac_t""no" 1>&6
6425 fi
6426
6427 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6428 echo "configure:6429: checking for working vfork" >&5
6429 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6430 echo $ac_n "(cached) $ac_c" 1>&6
6431 else
6432 if test "$cross_compiling" = yes; then
6433 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6434 echo "configure:6435: checking for vfork" >&5
6435 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6436 echo $ac_n "(cached) $ac_c" 1>&6
6437 else
6438 cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441 /* System header to define __stub macros and hopefully few prototypes,
6442 which can conflict with char vfork(); below. */
6443 #include <assert.h>
6444 /* Override any gcc2 internal prototype to avoid an error. */
6445 /* We use char because int might match the return type of a gcc2
6446 builtin and then its argument prototype would still apply. */
6447 char vfork();
6448
6449 int main() {
6450
6451 /* The GNU C library defines this for functions which it implements
6452 to always fail with ENOSYS. Some functions are actually named
6453 something starting with __ and the normal name is an alias. */
6454 #if defined (__stub_vfork) || defined (__stub___vfork)
6455 choke me
6456 #else
6457 vfork();
6458 #endif
6459
6460 ; return 0; }
6461 EOF
6462 if { (eval echo configure:6463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6463 rm -rf conftest*
6464 eval "ac_cv_func_vfork=yes"
6465 else
6466 echo "configure: failed program was:" >&5
6467 cat conftest.$ac_ext >&5
6468 rm -rf conftest*
6469 eval "ac_cv_func_vfork=no"
6470 fi
6471 rm -f conftest*
6472 fi
6473
6474 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6475 echo "$ac_t""yes" 1>&6
6476 :
6477 else
6478 echo "$ac_t""no" 1>&6
6479 fi
6480
6481 ac_cv_func_vfork_works=$ac_cv_func_vfork
6482 else
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 /* Thanks to Paul Eggert for this test. */
6487 #include <stdio.h>
6488 #include <sys/types.h>
6489 #include <sys/stat.h>
6490 #ifdef HAVE_UNISTD_H
6491 #include <unistd.h>
6492 #endif
6493 #ifdef HAVE_VFORK_H
6494 #include <vfork.h>
6495 #endif
6496 /* On some sparc systems, changes by the child to local and incoming
6497 argument registers are propagated back to the parent.
6498 The compiler is told about this with #include <vfork.h>,
6499 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6500 Test for this by using a static variable whose address
6501 is put into a register that is clobbered by the vfork. */
6502 static
6503 #ifdef __cplusplus
6504 sparc_address_test (int arg)
6505 #else
6506 sparc_address_test (arg) int arg;
6507 #endif
6508 {
6509 static pid_t child;
6510 if (!child) {
6511 child = vfork ();
6512 if (child < 0) {
6513 perror ("vfork");
6514 _exit(2);
6515 }
6516 if (!child) {
6517 arg = getpid();
6518 write(-1, "", 0);
6519 _exit (arg);
6520 }
6521 }
6522 }
6523 main() {
6524 pid_t parent = getpid ();
6525 pid_t child;
6526
6527 sparc_address_test ();
6528
6529 child = vfork ();
6530
6531 if (child == 0) {
6532 /* Here is another test for sparc vfork register problems.
6533 This test uses lots of local variables, at least
6534 as many local variables as main has allocated so far
6535 including compiler temporaries. 4 locals are enough for
6536 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6537 A buggy compiler should reuse the register of parent
6538 for one of the local variables, since it will think that
6539 parent can't possibly be used any more in this routine.
6540 Assigning to the local variable will thus munge parent
6541 in the parent process. */
6542 pid_t
6543 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6544 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6545 /* Convince the compiler that p..p7 are live; otherwise, it might
6546 use the same hardware register for all 8 local variables. */
6547 if (p != p1 || p != p2 || p != p3 || p != p4
6548 || p != p5 || p != p6 || p != p7)
6549 _exit(1);
6550
6551 /* On some systems (e.g. IRIX 3.3),
6552 vfork doesn't separate parent from child file descriptors.
6553 If the child closes a descriptor before it execs or exits,
6554 this munges the parent's descriptor as well.
6555 Test for this by closing stdout in the child. */
6556 _exit(close(fileno(stdout)) != 0);
6557 } else {
6558 int status;
6559 struct stat st;
6560
6561 while (wait(&status) != child)
6562 ;
6563 exit(
6564 /* Was there some problem with vforking? */
6565 child < 0
6566
6567 /* Did the child fail? (This shouldn't happen.) */
6568 || status
6569
6570 /* Did the vfork/compiler bug occur? */
6571 || parent != getpid()
6572
6573 /* Did the file descriptor bug occur? */
6574 || fstat(fileno(stdout), &st) != 0
6575 );
6576 }
6577 }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6580 then
6581 ac_cv_func_vfork_works=yes
6582 else
6583 echo "configure: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 rm -fr conftest*
6586 ac_cv_func_vfork_works=no
6587 fi
6588 rm -fr conftest*
6589 fi
6590
6591 fi
6592
6593 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6594 if test $ac_cv_func_vfork_works = no; then
6595 cat >> confdefs.h <<\EOF
6596 #define vfork fork
6597 EOF
6598
6599 fi
6600
6601 for ac_func in canonicalize_file_name realpath
6602 do
6603 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6604 echo "configure:6605: checking for $ac_func" >&5
6605 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6606 echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608 cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 /* System header to define __stub macros and hopefully few prototypes,
6612 which can conflict with char $ac_func(); below. */
6613 #include <assert.h>
6614 /* Override any gcc2 internal prototype to avoid an error. */
6615 /* We use char because int might match the return type of a gcc2
6616 builtin and then its argument prototype would still apply. */
6617 char $ac_func();
6618
6619 int main() {
6620
6621 /* The GNU C library defines this for functions which it implements
6622 to always fail with ENOSYS. Some functions are actually named
6623 something starting with __ and the normal name is an alias. */
6624 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6625 choke me
6626 #else
6627 $ac_func();
6628 #endif
6629
6630 ; return 0; }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6633 rm -rf conftest*
6634 eval "ac_cv_func_$ac_func=yes"
6635 else
6636 echo "configure: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 rm -rf conftest*
6639 eval "ac_cv_func_$ac_func=no"
6640 fi
6641 rm -f conftest*
6642 fi
6643
6644 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6645 echo "$ac_t""yes" 1>&6
6646 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6647 cat >> confdefs.h <<EOF
6648 #define $ac_tr_func 1
6649 EOF
6650
6651 else
6652 echo "$ac_t""no" 1>&6
6653 fi
6654 done
6655
6656 for ac_func in poll
6657 do
6658 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6659 echo "configure:6660: checking for $ac_func" >&5
6660 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6661 echo $ac_n "(cached) $ac_c" 1>&6
6662 else
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 /* System header to define __stub macros and hopefully few prototypes,
6667 which can conflict with char $ac_func(); below. */
6668 #include <assert.h>
6669 /* Override any gcc2 internal prototype to avoid an error. */
6670 /* We use char because int might match the return type of a gcc2
6671 builtin and then its argument prototype would still apply. */
6672 char $ac_func();
6673
6674 int main() {
6675
6676 /* The GNU C library defines this for functions which it implements
6677 to always fail with ENOSYS. Some functions are actually named
6678 something starting with __ and the normal name is an alias. */
6679 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6680 choke me
6681 #else
6682 $ac_func();
6683 #endif
6684
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6688 rm -rf conftest*
6689 eval "ac_cv_func_$ac_func=yes"
6690 else
6691 echo "configure: failed program was:" >&5
6692 cat conftest.$ac_ext >&5
6693 rm -rf conftest*
6694 eval "ac_cv_func_$ac_func=no"
6695 fi
6696 rm -f conftest*
6697 fi
6698
6699 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6700 echo "$ac_t""yes" 1>&6
6701 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6702 cat >> confdefs.h <<EOF
6703 #define $ac_tr_func 1
6704 EOF
6705
6706 else
6707 echo "$ac_t""no" 1>&6
6708 fi
6709 done
6710
6711 for ac_func in pread64
6712 do
6713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6714 echo "configure:6715: checking for $ac_func" >&5
6715 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6716 echo $ac_n "(cached) $ac_c" 1>&6
6717 else
6718 cat > conftest.$ac_ext <<EOF
6719 #line 6720 "configure"
6720 #include "confdefs.h"
6721 /* System header to define __stub macros and hopefully few prototypes,
6722 which can conflict with char $ac_func(); below. */
6723 #include <assert.h>
6724 /* Override any gcc2 internal prototype to avoid an error. */
6725 /* We use char because int might match the return type of a gcc2
6726 builtin and then its argument prototype would still apply. */
6727 char $ac_func();
6728
6729 int main() {
6730
6731 /* The GNU C library defines this for functions which it implements
6732 to always fail with ENOSYS. Some functions are actually named
6733 something starting with __ and the normal name is an alias. */
6734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6735 choke me
6736 #else
6737 $ac_func();
6738 #endif
6739
6740 ; return 0; }
6741 EOF
6742 if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6743 rm -rf conftest*
6744 eval "ac_cv_func_$ac_func=yes"
6745 else
6746 echo "configure: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6748 rm -rf conftest*
6749 eval "ac_cv_func_$ac_func=no"
6750 fi
6751 rm -f conftest*
6752 fi
6753
6754 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6755 echo "$ac_t""yes" 1>&6
6756 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6757 cat >> confdefs.h <<EOF
6758 #define $ac_tr_func 1
6759 EOF
6760
6761 else
6762 echo "$ac_t""no" 1>&6
6763 fi
6764 done
6765
6766 for ac_func in sbrk
6767 do
6768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6769 echo "configure:6770: checking for $ac_func" >&5
6770 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6771 echo $ac_n "(cached) $ac_c" 1>&6
6772 else
6773 cat > conftest.$ac_ext <<EOF
6774 #line 6775 "configure"
6775 #include "confdefs.h"
6776 /* System header to define __stub macros and hopefully few prototypes,
6777 which can conflict with char $ac_func(); below. */
6778 #include <assert.h>
6779 /* Override any gcc2 internal prototype to avoid an error. */
6780 /* We use char because int might match the return type of a gcc2
6781 builtin and then its argument prototype would still apply. */
6782 char $ac_func();
6783
6784 int main() {
6785
6786 /* The GNU C library defines this for functions which it implements
6787 to always fail with ENOSYS. Some functions are actually named
6788 something starting with __ and the normal name is an alias. */
6789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6790 choke me
6791 #else
6792 $ac_func();
6793 #endif
6794
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798 rm -rf conftest*
6799 eval "ac_cv_func_$ac_func=yes"
6800 else
6801 echo "configure: failed program was:" >&5
6802 cat conftest.$ac_ext >&5
6803 rm -rf conftest*
6804 eval "ac_cv_func_$ac_func=no"
6805 fi
6806 rm -f conftest*
6807 fi
6808
6809 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6810 echo "$ac_t""yes" 1>&6
6811 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6812 cat >> confdefs.h <<EOF
6813 #define $ac_tr_func 1
6814 EOF
6815
6816 else
6817 echo "$ac_t""no" 1>&6
6818 fi
6819 done
6820
6821 for ac_func in setpgid setpgrp
6822 do
6823 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6824 echo "configure:6825: checking for $ac_func" >&5
6825 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6826 echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828 cat > conftest.$ac_ext <<EOF
6829 #line 6830 "configure"
6830 #include "confdefs.h"
6831 /* System header to define __stub macros and hopefully few prototypes,
6832 which can conflict with char $ac_func(); below. */
6833 #include <assert.h>
6834 /* Override any gcc2 internal prototype to avoid an error. */
6835 /* We use char because int might match the return type of a gcc2
6836 builtin and then its argument prototype would still apply. */
6837 char $ac_func();
6838
6839 int main() {
6840
6841 /* The GNU C library defines this for functions which it implements
6842 to always fail with ENOSYS. Some functions are actually named
6843 something starting with __ and the normal name is an alias. */
6844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6845 choke me
6846 #else
6847 $ac_func();
6848 #endif
6849
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6853 rm -rf conftest*
6854 eval "ac_cv_func_$ac_func=yes"
6855 else
6856 echo "configure: failed program was:" >&5
6857 cat conftest.$ac_ext >&5
6858 rm -rf conftest*
6859 eval "ac_cv_func_$ac_func=no"
6860 fi
6861 rm -f conftest*
6862 fi
6863
6864 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6865 echo "$ac_t""yes" 1>&6
6866 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6867 cat >> confdefs.h <<EOF
6868 #define $ac_tr_func 1
6869 EOF
6870
6871 else
6872 echo "$ac_t""no" 1>&6
6873 fi
6874 done
6875
6876 for ac_func in sigaction sigprocmask sigsetmask
6877 do
6878 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6879 echo "configure:6880: checking for $ac_func" >&5
6880 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6881 echo $ac_n "(cached) $ac_c" 1>&6
6882 else
6883 cat > conftest.$ac_ext <<EOF
6884 #line 6885 "configure"
6885 #include "confdefs.h"
6886 /* System header to define __stub macros and hopefully few prototypes,
6887 which can conflict with char $ac_func(); below. */
6888 #include <assert.h>
6889 /* Override any gcc2 internal prototype to avoid an error. */
6890 /* We use char because int might match the return type of a gcc2
6891 builtin and then its argument prototype would still apply. */
6892 char $ac_func();
6893
6894 int main() {
6895
6896 /* The GNU C library defines this for functions which it implements
6897 to always fail with ENOSYS. Some functions are actually named
6898 something starting with __ and the normal name is an alias. */
6899 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6900 choke me
6901 #else
6902 $ac_func();
6903 #endif
6904
6905 ; return 0; }
6906 EOF
6907 if { (eval echo configure:6908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6908 rm -rf conftest*
6909 eval "ac_cv_func_$ac_func=yes"
6910 else
6911 echo "configure: failed program was:" >&5
6912 cat conftest.$ac_ext >&5
6913 rm -rf conftest*
6914 eval "ac_cv_func_$ac_func=no"
6915 fi
6916 rm -f conftest*
6917 fi
6918
6919 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6920 echo "$ac_t""yes" 1>&6
6921 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6922 cat >> confdefs.h <<EOF
6923 #define $ac_tr_func 1
6924 EOF
6925
6926 else
6927 echo "$ac_t""no" 1>&6
6928 fi
6929 done
6930
6931 for ac_func in socketpair
6932 do
6933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6934 echo "configure:6935: checking for $ac_func" >&5
6935 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6936 echo $ac_n "(cached) $ac_c" 1>&6
6937 else
6938 cat > conftest.$ac_ext <<EOF
6939 #line 6940 "configure"
6940 #include "confdefs.h"
6941 /* System header to define __stub macros and hopefully few prototypes,
6942 which can conflict with char $ac_func(); below. */
6943 #include <assert.h>
6944 /* Override any gcc2 internal prototype to avoid an error. */
6945 /* We use char because int might match the return type of a gcc2
6946 builtin and then its argument prototype would still apply. */
6947 char $ac_func();
6948
6949 int main() {
6950
6951 /* The GNU C library defines this for functions which it implements
6952 to always fail with ENOSYS. Some functions are actually named
6953 something starting with __ and the normal name is an alias. */
6954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6955 choke me
6956 #else
6957 $ac_func();
6958 #endif
6959
6960 ; return 0; }
6961 EOF
6962 if { (eval echo configure:6963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6963 rm -rf conftest*
6964 eval "ac_cv_func_$ac_func=yes"
6965 else
6966 echo "configure: failed program was:" >&5
6967 cat conftest.$ac_ext >&5
6968 rm -rf conftest*
6969 eval "ac_cv_func_$ac_func=no"
6970 fi
6971 rm -f conftest*
6972 fi
6973
6974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6975 echo "$ac_t""yes" 1>&6
6976 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6977 cat >> confdefs.h <<EOF
6978 #define $ac_tr_func 1
6979 EOF
6980
6981 else
6982 echo "$ac_t""no" 1>&6
6983 fi
6984 done
6985
6986 for ac_func in syscall
6987 do
6988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6989 echo "configure:6990: checking for $ac_func" >&5
6990 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6991 echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993 cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 /* System header to define __stub macros and hopefully few prototypes,
6997 which can conflict with char $ac_func(); below. */
6998 #include <assert.h>
6999 /* Override any gcc2 internal prototype to avoid an error. */
7000 /* We use char because int might match the return type of a gcc2
7001 builtin and then its argument prototype would still apply. */
7002 char $ac_func();
7003
7004 int main() {
7005
7006 /* The GNU C library defines this for functions which it implements
7007 to always fail with ENOSYS. Some functions are actually named
7008 something starting with __ and the normal name is an alias. */
7009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7010 choke me
7011 #else
7012 $ac_func();
7013 #endif
7014
7015 ; return 0; }
7016 EOF
7017 if { (eval echo configure:7018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7018 rm -rf conftest*
7019 eval "ac_cv_func_$ac_func=yes"
7020 else
7021 echo "configure: failed program was:" >&5
7022 cat conftest.$ac_ext >&5
7023 rm -rf conftest*
7024 eval "ac_cv_func_$ac_func=no"
7025 fi
7026 rm -f conftest*
7027 fi
7028
7029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7030 echo "$ac_t""yes" 1>&6
7031 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7032 cat >> confdefs.h <<EOF
7033 #define $ac_tr_func 1
7034 EOF
7035
7036 else
7037 echo "$ac_t""no" 1>&6
7038 fi
7039 done
7040
7041
7042 if test "$cross_compiling" = no; then
7043 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7044 echo "configure:7045: checking whether setpgrp takes no argument" >&5
7045 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7046 echo $ac_n "(cached) $ac_c" 1>&6
7047 else
7048 if test "$cross_compiling" = yes; then
7049 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
7050 else
7051 cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054
7055 #ifdef HAVE_UNISTD_H
7056 #include <unistd.h>
7057 #endif
7058
7059 /*
7060 * If this system has a BSD-style setpgrp, which takes arguments, exit
7061 * successfully.
7062 */
7063 main()
7064 {
7065 if (setpgrp(1,1) == -1)
7066 exit(0);
7067 else
7068 exit(1);
7069 }
7070
7071 EOF
7072 if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7073 then
7074 ac_cv_func_setpgrp_void=no
7075 else
7076 echo "configure: failed program was:" >&5
7077 cat conftest.$ac_ext >&5
7078 rm -fr conftest*
7079 ac_cv_func_setpgrp_void=yes
7080 fi
7081 rm -fr conftest*
7082 fi
7083
7084
7085 fi
7086
7087 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7088 if test $ac_cv_func_setpgrp_void = yes; then
7089 cat >> confdefs.h <<\EOF
7090 #define SETPGRP_VOID 1
7091 EOF
7092
7093 fi
7094
7095 else
7096 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7097 echo "configure:7098: checking whether setpgrp takes no argument" >&5
7098 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104
7105 #include <unistd.h>
7106
7107 int main() {
7108
7109 if (setpgrp(1,1) == -1)
7110 exit (0);
7111 else
7112 exit (1);
7113
7114 ; return 0; }
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7117 rm -rf conftest*
7118 ac_cv_func_setpgrp_void=no
7119 else
7120 echo "configure: failed program was:" >&5
7121 cat conftest.$ac_ext >&5
7122 rm -rf conftest*
7123 ac_cv_func_setpgrp_void=yes
7124 fi
7125 rm -f conftest*
7126 fi
7127
7128 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7129 if test $ac_cv_func_setpgrp_void = yes; then
7130 cat >> confdefs.h <<\EOF
7131 #define SETPGRP_VOID 1
7132 EOF
7133
7134 fi
7135 fi
7136
7137 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7138 # since sigsetjmp might only be defined as a macro.
7139 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7140 echo "configure:7141: checking for sigsetjmp" >&5
7141 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
7142 echo $ac_n "(cached) $ac_c" 1>&6
7143 else
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147
7148 #include <setjmp.h>
7149
7150 int main() {
7151 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7152 ; return 0; }
7153 EOF
7154 if { (eval echo configure:7155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7155 rm -rf conftest*
7156 gdb_cv_func_sigsetjmp=yes
7157 else
7158 echo "configure: failed program was:" >&5
7159 cat conftest.$ac_ext >&5
7160 rm -rf conftest*
7161 gdb_cv_func_sigsetjmp=no
7162 fi
7163 rm -f conftest*
7164 fi
7165
7166 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7167 if test $gdb_cv_func_sigsetjmp = yes; then
7168 cat >> confdefs.h <<\EOF
7169 #define HAVE_SIGSETJMP 1
7170 EOF
7171
7172 fi
7173
7174 # Assume we'll default to using the included libiberty regex.
7175 gdb_use_included_regex=yes
7176
7177 # However, if the system regex is GNU regex, then default to *not*
7178 # using the included regex.
7179 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7180 echo "configure:7181: checking for GNU regex" >&5
7181 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7182 echo $ac_n "(cached) $ac_c" 1>&6
7183 else
7184 cat > conftest.$ac_ext <<EOF
7185 #line 7186 "configure"
7186 #include "confdefs.h"
7187 #include <gnu-versions.h>
7188 int main() {
7189 #define REGEX_INTERFACE_VERSION 1
7190 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7191 # error "Version mismatch"
7192 #endif
7193 ; return 0; }
7194 EOF
7195 if { (eval echo configure:7196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7196 rm -rf conftest*
7197 gdb_cv_have_gnu_regex=yes
7198 else
7199 echo "configure: failed program was:" >&5
7200 cat conftest.$ac_ext >&5
7201 rm -rf conftest*
7202 gdb_cv_have_gnu_regex=no
7203 fi
7204 rm -f conftest*
7205 fi
7206
7207 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7208 if test $gdb_cv_have_gnu_regex = yes; then
7209 gdb_use_included_regex=no
7210 fi
7211
7212 # Check whether --with-included-regex or --without-included-regex was given.
7213 if test "${with_included_regex+set}" = set; then
7214 withval="$with_included_regex"
7215 gdb_with_regex=$withval
7216 else
7217 gdb_with_regex=$gdb_use_included_regex
7218 fi
7219
7220 if test "$gdb_with_regex" = yes; then
7221 cat >> confdefs.h <<\EOF
7222 #define USE_INCLUDED_REGEX 1
7223 EOF
7224
7225 fi
7226
7227 # See if <machine/reg.h> degines `struct reg'.
7228 echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7229 echo "configure:7230: checking for struct reg in machine/reg.h" >&5
7230 if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7231 echo $ac_n "(cached) $ac_c" 1>&6
7232 else
7233 cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 #include <sys/types.h>
7237 #include <machine/reg.h>
7238 int main() {
7239 struct reg r;
7240 ; return 0; }
7241 EOF
7242 if { (eval echo configure:7243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7243 rm -rf conftest*
7244 gdb_cv_struct_reg=yes
7245 else
7246 echo "configure: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7248 rm -rf conftest*
7249 gdb_cv_struct_reg=no
7250 fi
7251 rm -f conftest*
7252 fi
7253
7254 echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7255 if test $gdb_cv_struct_reg = yes; then
7256 cat >> confdefs.h <<\EOF
7257 #define HAVE_STRUCT_REG 1
7258 EOF
7259
7260 fi
7261
7262 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7263 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7264 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7265 echo "configure:7266: checking for r_fs in struct reg" >&5
7266 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7267 echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269 cat > conftest.$ac_ext <<EOF
7270 #line 7271 "configure"
7271 #include "confdefs.h"
7272 #include <machine/reg.h>
7273 int main() {
7274 struct reg r; r.r_fs;
7275 ; return 0; }
7276 EOF
7277 if { (eval echo configure:7278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7278 rm -rf conftest*
7279 gdb_cv_struct_reg_r_fs=yes
7280 else
7281 echo "configure: failed program was:" >&5
7282 cat conftest.$ac_ext >&5
7283 rm -rf conftest*
7284 gdb_cv_struct_reg_r_fs=no
7285 fi
7286 rm -f conftest*
7287 fi
7288
7289 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7290 if test $gdb_cv_struct_reg_r_fs = yes; then
7291 cat >> confdefs.h <<\EOF
7292 #define HAVE_STRUCT_REG_R_FS 1
7293 EOF
7294
7295 fi
7296 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7297 echo "configure:7298: checking for r_gs in struct reg" >&5
7298 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7299 echo $ac_n "(cached) $ac_c" 1>&6
7300 else
7301 cat > conftest.$ac_ext <<EOF
7302 #line 7303 "configure"
7303 #include "confdefs.h"
7304 #include <machine/reg.h>
7305 int main() {
7306 struct reg r; r.r_gs;
7307 ; return 0; }
7308 EOF
7309 if { (eval echo configure:7310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7310 rm -rf conftest*
7311 gdb_cv_struct_reg_r_gs=yes
7312 else
7313 echo "configure: failed program was:" >&5
7314 cat conftest.$ac_ext >&5
7315 rm -rf conftest*
7316 gdb_cv_struct_reg_r_gs=no
7317 fi
7318 rm -f conftest*
7319 fi
7320
7321 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7322 if test $gdb_cv_struct_reg_r_gs = yes; then
7323 cat >> confdefs.h <<\EOF
7324 #define HAVE_STRUCT_REG_R_GS 1
7325 EOF
7326
7327 fi
7328
7329 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7330 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7331 echo "configure:7332: checking for PTRACE_GETREGS" >&5
7332 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
7333 echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335 cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 #include <sys/ptrace.h>
7339 int main() {
7340 PTRACE_GETREGS;
7341 ; return 0; }
7342 EOF
7343 if { (eval echo configure:7344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7344 rm -rf conftest*
7345 gdb_cv_have_ptrace_getregs=yes
7346 else
7347 echo "configure: failed program was:" >&5
7348 cat conftest.$ac_ext >&5
7349 rm -rf conftest*
7350 gdb_cv_have_ptrace_getregs=no
7351 fi
7352 rm -f conftest*
7353 fi
7354
7355 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7356 if test $gdb_cv_have_ptrace_getregs = yes; then
7357 cat >> confdefs.h <<\EOF
7358 #define HAVE_PTRACE_GETREGS 1
7359 EOF
7360
7361 fi
7362
7363 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7364 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7365 echo "configure:7366: checking for PTRACE_GETFPXREGS" >&5
7366 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
7367 echo $ac_n "(cached) $ac_c" 1>&6
7368 else
7369 cat > conftest.$ac_ext <<EOF
7370 #line 7371 "configure"
7371 #include "confdefs.h"
7372 #include <sys/ptrace.h>
7373 int main() {
7374 PTRACE_GETFPXREGS;
7375 ; return 0; }
7376 EOF
7377 if { (eval echo configure:7378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7378 rm -rf conftest*
7379 gdb_cv_have_ptrace_getfpxregs=yes
7380 else
7381 echo "configure: failed program was:" >&5
7382 cat conftest.$ac_ext >&5
7383 rm -rf conftest*
7384 gdb_cv_have_ptrace_getfpxregs=no
7385 fi
7386 rm -f conftest*
7387 fi
7388
7389 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7390 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7391 cat >> confdefs.h <<\EOF
7392 #define HAVE_PTRACE_GETFPXREGS 1
7393 EOF
7394
7395 fi
7396
7397 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7398 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7399 echo "configure:7400: checking for PT_GETDBREGS" >&5
7400 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
7401 echo $ac_n "(cached) $ac_c" 1>&6
7402 else
7403 cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406 #include <sys/types.h>
7407 #include <sys/ptrace.h>
7408 int main() {
7409 PT_GETDBREGS;
7410 ; return 0; }
7411 EOF
7412 if { (eval echo configure:7413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7413 rm -rf conftest*
7414 gdb_cv_have_pt_getdbregs=yes
7415 else
7416 echo "configure: failed program was:" >&5
7417 cat conftest.$ac_ext >&5
7418 rm -rf conftest*
7419 gdb_cv_have_pt_getdbregs=no
7420 fi
7421 rm -f conftest*
7422 fi
7423
7424 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7425 if test $gdb_cv_have_pt_getdbregs = yes; then
7426 cat >> confdefs.h <<\EOF
7427 #define HAVE_PT_GETDBREGS 1
7428 EOF
7429
7430 fi
7431
7432 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7433 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7434 echo "configure:7435: checking for PT_GETXMMREGS" >&5
7435 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
7436 echo $ac_n "(cached) $ac_c" 1>&6
7437 else
7438 cat > conftest.$ac_ext <<EOF
7439 #line 7440 "configure"
7440 #include "confdefs.h"
7441 #include <sys/types.h>
7442 #include <sys/ptrace.h>
7443 int main() {
7444 PT_GETXMMREGS;
7445 ; return 0; }
7446 EOF
7447 if { (eval echo configure:7448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7448 rm -rf conftest*
7449 gdb_cv_have_pt_getxmmregs=yes
7450 else
7451 echo "configure: failed program was:" >&5
7452 cat conftest.$ac_ext >&5
7453 rm -rf conftest*
7454 gdb_cv_have_pt_getxmmregs=no
7455 fi
7456 rm -f conftest*
7457 fi
7458
7459 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7460 if test $gdb_cv_have_pt_getxmmregs = yes; then
7461 cat >> confdefs.h <<\EOF
7462 #define HAVE_PT_GETXMMREGS 1
7463 EOF
7464
7465 fi
7466
7467 # See if stdint.h provides the uintptr_t type.
7468 # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
7469 echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7470 echo "configure:7471: checking for uintptr_t in stdint.h" >&5
7471 if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7472 echo $ac_n "(cached) $ac_c" 1>&6
7473 else
7474 cat > conftest.$ac_ext <<EOF
7475 #line 7476 "configure"
7476 #include "confdefs.h"
7477 #include <stdint.h>
7478 int main() {
7479 uintptr_t foo = 0;
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7483 rm -rf conftest*
7484 gdb_cv_have_uintptr_t=yes
7485 else
7486 echo "configure: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 rm -rf conftest*
7489 gdb_cv_have_uintptr_t=no
7490 fi
7491 rm -f conftest*
7492 fi
7493
7494 echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7495 if test $gdb_cv_have_uintptr_t = yes; then
7496 cat >> confdefs.h <<\EOF
7497 #define HAVE_UINTPTR_T 1
7498 EOF
7499
7500 fi
7501
7502 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7503 echo "configure:7504: checking whether malloc must be declared" >&5
7504 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
7505 echo $ac_n "(cached) $ac_c" 1>&6
7506 else
7507 cat > conftest.$ac_ext <<EOF
7508 #line 7509 "configure"
7509 #include "confdefs.h"
7510
7511 #include <stdio.h>
7512 #ifdef HAVE_STRING_H
7513 #include <string.h>
7514 #else
7515 #ifdef HAVE_STRINGS_H
7516 #include <strings.h>
7517 #endif
7518 #endif
7519 #ifdef HAVE_STDLIB_H
7520 #include <stdlib.h>
7521 #endif
7522 #ifdef HAVE_UNISTD_H
7523 #include <unistd.h>
7524 #endif
7525 int main() {
7526 char *(*pfn) = (char *(*)) malloc
7527 ; return 0; }
7528 EOF
7529 if { (eval echo configure:7530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7530 rm -rf conftest*
7531 bfd_cv_decl_needed_malloc=no
7532 else
7533 echo "configure: failed program was:" >&5
7534 cat conftest.$ac_ext >&5
7535 rm -rf conftest*
7536 bfd_cv_decl_needed_malloc=yes
7537 fi
7538 rm -f conftest*
7539 fi
7540
7541 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7542 if test $bfd_cv_decl_needed_malloc = yes; then
7543 cat >> confdefs.h <<\EOF
7544 #define NEED_DECLARATION_MALLOC 1
7545 EOF
7546
7547 fi
7548
7549 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7550 echo "configure:7551: checking whether realloc must be declared" >&5
7551 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
7552 echo $ac_n "(cached) $ac_c" 1>&6
7553 else
7554 cat > conftest.$ac_ext <<EOF
7555 #line 7556 "configure"
7556 #include "confdefs.h"
7557
7558 #include <stdio.h>
7559 #ifdef HAVE_STRING_H
7560 #include <string.h>
7561 #else
7562 #ifdef HAVE_STRINGS_H
7563 #include <strings.h>
7564 #endif
7565 #endif
7566 #ifdef HAVE_STDLIB_H
7567 #include <stdlib.h>
7568 #endif
7569 #ifdef HAVE_UNISTD_H
7570 #include <unistd.h>
7571 #endif
7572 int main() {
7573 char *(*pfn) = (char *(*)) realloc
7574 ; return 0; }
7575 EOF
7576 if { (eval echo configure:7577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7577 rm -rf conftest*
7578 bfd_cv_decl_needed_realloc=no
7579 else
7580 echo "configure: failed program was:" >&5
7581 cat conftest.$ac_ext >&5
7582 rm -rf conftest*
7583 bfd_cv_decl_needed_realloc=yes
7584 fi
7585 rm -f conftest*
7586 fi
7587
7588 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7589 if test $bfd_cv_decl_needed_realloc = yes; then
7590 cat >> confdefs.h <<\EOF
7591 #define NEED_DECLARATION_REALLOC 1
7592 EOF
7593
7594 fi
7595
7596 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7597 echo "configure:7598: checking whether free must be declared" >&5
7598 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
7599 echo $ac_n "(cached) $ac_c" 1>&6
7600 else
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7604
7605 #include <stdio.h>
7606 #ifdef HAVE_STRING_H
7607 #include <string.h>
7608 #else
7609 #ifdef HAVE_STRINGS_H
7610 #include <strings.h>
7611 #endif
7612 #endif
7613 #ifdef HAVE_STDLIB_H
7614 #include <stdlib.h>
7615 #endif
7616 #ifdef HAVE_UNISTD_H
7617 #include <unistd.h>
7618 #endif
7619 int main() {
7620 char *(*pfn) = (char *(*)) free
7621 ; return 0; }
7622 EOF
7623 if { (eval echo configure:7624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7624 rm -rf conftest*
7625 bfd_cv_decl_needed_free=no
7626 else
7627 echo "configure: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
7629 rm -rf conftest*
7630 bfd_cv_decl_needed_free=yes
7631 fi
7632 rm -f conftest*
7633 fi
7634
7635 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7636 if test $bfd_cv_decl_needed_free = yes; then
7637 cat >> confdefs.h <<\EOF
7638 #define NEED_DECLARATION_FREE 1
7639 EOF
7640
7641 fi
7642
7643 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
7644 echo "configure:7645: checking whether strerror must be declared" >&5
7645 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
7646 echo $ac_n "(cached) $ac_c" 1>&6
7647 else
7648 cat > conftest.$ac_ext <<EOF
7649 #line 7650 "configure"
7650 #include "confdefs.h"
7651
7652 #include <stdio.h>
7653 #ifdef HAVE_STRING_H
7654 #include <string.h>
7655 #else
7656 #ifdef HAVE_STRINGS_H
7657 #include <strings.h>
7658 #endif
7659 #endif
7660 #ifdef HAVE_STDLIB_H
7661 #include <stdlib.h>
7662 #endif
7663 #ifdef HAVE_UNISTD_H
7664 #include <unistd.h>
7665 #endif
7666 int main() {
7667 char *(*pfn) = (char *(*)) strerror
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7671 rm -rf conftest*
7672 bfd_cv_decl_needed_strerror=no
7673 else
7674 echo "configure: failed program was:" >&5
7675 cat conftest.$ac_ext >&5
7676 rm -rf conftest*
7677 bfd_cv_decl_needed_strerror=yes
7678 fi
7679 rm -f conftest*
7680 fi
7681
7682 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7683 if test $bfd_cv_decl_needed_strerror = yes; then
7684 cat >> confdefs.h <<\EOF
7685 #define NEED_DECLARATION_STRERROR 1
7686 EOF
7687
7688 fi
7689
7690 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
7691 echo "configure:7692: checking whether strdup must be declared" >&5
7692 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
7693 echo $ac_n "(cached) $ac_c" 1>&6
7694 else
7695 cat > conftest.$ac_ext <<EOF
7696 #line 7697 "configure"
7697 #include "confdefs.h"
7698
7699 #include <stdio.h>
7700 #ifdef HAVE_STRING_H
7701 #include <string.h>
7702 #else
7703 #ifdef HAVE_STRINGS_H
7704 #include <strings.h>
7705 #endif
7706 #endif
7707 #ifdef HAVE_STDLIB_H
7708 #include <stdlib.h>
7709 #endif
7710 #ifdef HAVE_UNISTD_H
7711 #include <unistd.h>
7712 #endif
7713 int main() {
7714 char *(*pfn) = (char *(*)) strdup
7715 ; return 0; }
7716 EOF
7717 if { (eval echo configure:7718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7718 rm -rf conftest*
7719 bfd_cv_decl_needed_strdup=no
7720 else
7721 echo "configure: failed program was:" >&5
7722 cat conftest.$ac_ext >&5
7723 rm -rf conftest*
7724 bfd_cv_decl_needed_strdup=yes
7725 fi
7726 rm -f conftest*
7727 fi
7728
7729 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7730 if test $bfd_cv_decl_needed_strdup = yes; then
7731 cat >> confdefs.h <<\EOF
7732 #define NEED_DECLARATION_STRDUP 1
7733 EOF
7734
7735 fi
7736
7737 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
7738 echo "configure:7739: checking whether strstr must be declared" >&5
7739 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
7740 echo $ac_n "(cached) $ac_c" 1>&6
7741 else
7742 cat > conftest.$ac_ext <<EOF
7743 #line 7744 "configure"
7744 #include "confdefs.h"
7745
7746 #include <stdio.h>
7747 #ifdef HAVE_STRING_H
7748 #include <string.h>
7749 #else
7750 #ifdef HAVE_STRINGS_H
7751 #include <strings.h>
7752 #endif
7753 #endif
7754 #ifdef HAVE_STDLIB_H
7755 #include <stdlib.h>
7756 #endif
7757 #ifdef HAVE_UNISTD_H
7758 #include <unistd.h>
7759 #endif
7760 int main() {
7761 char *(*pfn) = (char *(*)) strstr
7762 ; return 0; }
7763 EOF
7764 if { (eval echo configure:7765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7765 rm -rf conftest*
7766 bfd_cv_decl_needed_strstr=no
7767 else
7768 echo "configure: failed program was:" >&5
7769 cat conftest.$ac_ext >&5
7770 rm -rf conftest*
7771 bfd_cv_decl_needed_strstr=yes
7772 fi
7773 rm -f conftest*
7774 fi
7775
7776 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7777 if test $bfd_cv_decl_needed_strstr = yes; then
7778 cat >> confdefs.h <<\EOF
7779 #define NEED_DECLARATION_STRSTR 1
7780 EOF
7781
7782 fi
7783
7784 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7785 echo "configure:7786: checking whether canonicalize_file_name must be declared" >&5
7786 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
7787 echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789 cat > conftest.$ac_ext <<EOF
7790 #line 7791 "configure"
7791 #include "confdefs.h"
7792
7793 #include <stdio.h>
7794 #ifdef HAVE_STRING_H
7795 #include <string.h>
7796 #else
7797 #ifdef HAVE_STRINGS_H
7798 #include <strings.h>
7799 #endif
7800 #endif
7801 #ifdef HAVE_STDLIB_H
7802 #include <stdlib.h>
7803 #endif
7804 #ifdef HAVE_UNISTD_H
7805 #include <unistd.h>
7806 #endif
7807 int main() {
7808 char *(*pfn) = (char *(*)) canonicalize_file_name
7809 ; return 0; }
7810 EOF
7811 if { (eval echo configure:7812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7812 rm -rf conftest*
7813 bfd_cv_decl_needed_canonicalize_file_name=no
7814 else
7815 echo "configure: failed program was:" >&5
7816 cat conftest.$ac_ext >&5
7817 rm -rf conftest*
7818 bfd_cv_decl_needed_canonicalize_file_name=yes
7819 fi
7820 rm -f conftest*
7821 fi
7822
7823 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7824 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7825 cat >> confdefs.h <<\EOF
7826 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
7827 EOF
7828
7829 fi
7830
7831
7832 # The following save_state_t checkery is only necessary for HPUX
7833 # versions earlier than 10.20. When those fade from memory, this
7834 # could be expunged. --jsm 1999-03-22
7835
7836 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
7837 echo "configure:7838: checking for HPUX save_state structure" >&5
7838 cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <machine/save_state.h>
7842 EOF
7843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7844 egrep "save_state_t" >/dev/null 2>&1; then
7845 rm -rf conftest*
7846 gdb_cv_hpux_savestate=yes
7847 else
7848 rm -rf conftest*
7849 gdb_cv_hpux_savestate=no
7850 fi
7851 rm -f conftest*
7852
7853 cat > conftest.$ac_ext <<EOF
7854 #line 7855 "configure"
7855 #include "confdefs.h"
7856 #include <machine/save_state.h>
7857 EOF
7858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7859 egrep "ss_wide" >/dev/null 2>&1; then
7860 rm -rf conftest*
7861 gdb_cv_hpux_sswide=yes
7862 else
7863 rm -rf conftest*
7864 gdb_cv_hpux_sswide=no
7865 fi
7866 rm -f conftest*
7867
7868 if test $gdb_cv_hpux_savestate = yes
7869 then
7870 cat >> confdefs.h <<\EOF
7871 #define HAVE_STRUCT_SAVE_STATE_T 1
7872 EOF
7873
7874 fi
7875 if test $gdb_cv_hpux_sswide = yes
7876 then
7877 cat >> confdefs.h <<\EOF
7878 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
7879 EOF
7880
7881 fi
7882 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7883
7884
7885 # If we are configured native on GNU/Linux, work around problems with
7886 # sys/procfs.h
7887 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
7888
7889 if test "${target}" = "${host}"; then
7890 case "${host}" in
7891 i[3456]86-*-linux*)
7892 cat >> confdefs.h <<\EOF
7893 #define START_INFERIOR_TRAPS_EXPECTED 2
7894 EOF
7895
7896 cat >> confdefs.h <<\EOF
7897 #define sys_quotactl 1
7898 EOF
7899
7900 ;;
7901 ia64-*-aix*)
7902 cat >> confdefs.h <<\EOF
7903 #define NEW_PROC_API 1
7904 EOF
7905
7906 ;;
7907 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7908 cat >> confdefs.h <<\EOF
7909 #define NEW_PROC_API 1
7910 EOF
7911
7912 ;;
7913 *-*-solaris2.[678])
7914 cat >> confdefs.h <<\EOF
7915 #define NEW_PROC_API 1
7916 EOF
7917
7918 ;;
7919 esac
7920 fi
7921
7922 if test "$ac_cv_header_sys_procfs_h" = yes; then
7923 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
7924 echo "configure:7925: checking for pstatus_t in sys/procfs.h" >&5
7925 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
7926 echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928 cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931
7932 #define _SYSCALL32
7933 #include <sys/procfs.h>
7934 int main() {
7935 pstatus_t avar
7936 ; return 0; }
7937 EOF
7938 if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7939 rm -rf conftest*
7940 bfd_cv_have_sys_procfs_type_pstatus_t=yes
7941 else
7942 echo "configure: failed program was:" >&5
7943 cat conftest.$ac_ext >&5
7944 rm -rf conftest*
7945 bfd_cv_have_sys_procfs_type_pstatus_t=no
7946
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
7952 cat >> confdefs.h <<\EOF
7953 #define HAVE_PSTATUS_T 1
7954 EOF
7955
7956 fi
7957 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
7958
7959 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
7960 echo "configure:7961: checking for prrun_t in sys/procfs.h" >&5
7961 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
7962 echo $ac_n "(cached) $ac_c" 1>&6
7963 else
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967
7968 #define _SYSCALL32
7969 #include <sys/procfs.h>
7970 int main() {
7971 prrun_t avar
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975 rm -rf conftest*
7976 bfd_cv_have_sys_procfs_type_prrun_t=yes
7977 else
7978 echo "configure: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 rm -rf conftest*
7981 bfd_cv_have_sys_procfs_type_prrun_t=no
7982
7983 fi
7984 rm -f conftest*
7985 fi
7986
7987 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
7988 cat >> confdefs.h <<\EOF
7989 #define HAVE_PRRUN_T 1
7990 EOF
7991
7992 fi
7993 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
7994
7995 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
7996 echo "configure:7997: checking for gregset_t in sys/procfs.h" >&5
7997 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
7998 echo $ac_n "(cached) $ac_c" 1>&6
7999 else
8000 cat > conftest.$ac_ext <<EOF
8001 #line 8002 "configure"
8002 #include "confdefs.h"
8003
8004 #define _SYSCALL32
8005 #include <sys/procfs.h>
8006 int main() {
8007 gregset_t avar
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8011 rm -rf conftest*
8012 bfd_cv_have_sys_procfs_type_gregset_t=yes
8013 else
8014 echo "configure: failed program was:" >&5
8015 cat conftest.$ac_ext >&5
8016 rm -rf conftest*
8017 bfd_cv_have_sys_procfs_type_gregset_t=no
8018
8019 fi
8020 rm -f conftest*
8021 fi
8022
8023 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8024 cat >> confdefs.h <<\EOF
8025 #define HAVE_GREGSET_T 1
8026 EOF
8027
8028 fi
8029 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
8030
8031 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
8032 echo "configure:8033: checking for fpregset_t in sys/procfs.h" >&5
8033 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
8034 echo $ac_n "(cached) $ac_c" 1>&6
8035 else
8036 cat > conftest.$ac_ext <<EOF
8037 #line 8038 "configure"
8038 #include "confdefs.h"
8039
8040 #define _SYSCALL32
8041 #include <sys/procfs.h>
8042 int main() {
8043 fpregset_t avar
8044 ; return 0; }
8045 EOF
8046 if { (eval echo configure:8047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8047 rm -rf conftest*
8048 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8049 else
8050 echo "configure: failed program was:" >&5
8051 cat conftest.$ac_ext >&5
8052 rm -rf conftest*
8053 bfd_cv_have_sys_procfs_type_fpregset_t=no
8054
8055 fi
8056 rm -f conftest*
8057 fi
8058
8059 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8060 cat >> confdefs.h <<\EOF
8061 #define HAVE_FPREGSET_T 1
8062 EOF
8063
8064 fi
8065 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
8066
8067 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
8068 echo "configure:8069: checking for prgregset_t in sys/procfs.h" >&5
8069 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
8070 echo $ac_n "(cached) $ac_c" 1>&6
8071 else
8072 cat > conftest.$ac_ext <<EOF
8073 #line 8074 "configure"
8074 #include "confdefs.h"
8075
8076 #define _SYSCALL32
8077 #include <sys/procfs.h>
8078 int main() {
8079 prgregset_t avar
8080 ; return 0; }
8081 EOF
8082 if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8083 rm -rf conftest*
8084 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8085 else
8086 echo "configure: failed program was:" >&5
8087 cat conftest.$ac_ext >&5
8088 rm -rf conftest*
8089 bfd_cv_have_sys_procfs_type_prgregset_t=no
8090
8091 fi
8092 rm -f conftest*
8093 fi
8094
8095 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8096 cat >> confdefs.h <<\EOF
8097 #define HAVE_PRGREGSET_T 1
8098 EOF
8099
8100 fi
8101 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
8102
8103 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
8104 echo "configure:8105: checking for prfpregset_t in sys/procfs.h" >&5
8105 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
8106 echo $ac_n "(cached) $ac_c" 1>&6
8107 else
8108 cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111
8112 #define _SYSCALL32
8113 #include <sys/procfs.h>
8114 int main() {
8115 prfpregset_t avar
8116 ; return 0; }
8117 EOF
8118 if { (eval echo configure:8119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8119 rm -rf conftest*
8120 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8121 else
8122 echo "configure: failed program was:" >&5
8123 cat conftest.$ac_ext >&5
8124 rm -rf conftest*
8125 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8126
8127 fi
8128 rm -f conftest*
8129 fi
8130
8131 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8132 cat >> confdefs.h <<\EOF
8133 #define HAVE_PRFPREGSET_T 1
8134 EOF
8135
8136 fi
8137 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
8138
8139 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
8140 echo "configure:8141: checking for prgregset32_t in sys/procfs.h" >&5
8141 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
8142 echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144 cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147
8148 #define _SYSCALL32
8149 #include <sys/procfs.h>
8150 int main() {
8151 prgregset32_t avar
8152 ; return 0; }
8153 EOF
8154 if { (eval echo configure:8155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8155 rm -rf conftest*
8156 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8157 else
8158 echo "configure: failed program was:" >&5
8159 cat conftest.$ac_ext >&5
8160 rm -rf conftest*
8161 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8162
8163 fi
8164 rm -f conftest*
8165 fi
8166
8167 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8168 cat >> confdefs.h <<\EOF
8169 #define HAVE_PRGREGSET32_T 1
8170 EOF
8171
8172 fi
8173 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
8174
8175 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
8176 echo "configure:8177: checking for prfpregset32_t in sys/procfs.h" >&5
8177 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
8178 echo $ac_n "(cached) $ac_c" 1>&6
8179 else
8180 cat > conftest.$ac_ext <<EOF
8181 #line 8182 "configure"
8182 #include "confdefs.h"
8183
8184 #define _SYSCALL32
8185 #include <sys/procfs.h>
8186 int main() {
8187 prfpregset32_t avar
8188 ; return 0; }
8189 EOF
8190 if { (eval echo configure:8191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8191 rm -rf conftest*
8192 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
8193 else
8194 echo "configure: failed program was:" >&5
8195 cat conftest.$ac_ext >&5
8196 rm -rf conftest*
8197 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8198
8199 fi
8200 rm -f conftest*
8201 fi
8202
8203 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8204 cat >> confdefs.h <<\EOF
8205 #define HAVE_PRFPREGSET32_T 1
8206 EOF
8207
8208 fi
8209 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
8210
8211 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
8212 echo "configure:8213: checking for lwpid_t in sys/procfs.h" >&5
8213 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
8214 echo $ac_n "(cached) $ac_c" 1>&6
8215 else
8216 cat > conftest.$ac_ext <<EOF
8217 #line 8218 "configure"
8218 #include "confdefs.h"
8219
8220 #define _SYSCALL32
8221 #include <sys/procfs.h>
8222 int main() {
8223 lwpid_t avar
8224 ; return 0; }
8225 EOF
8226 if { (eval echo configure:8227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8227 rm -rf conftest*
8228 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8229 else
8230 echo "configure: failed program was:" >&5
8231 cat conftest.$ac_ext >&5
8232 rm -rf conftest*
8233 bfd_cv_have_sys_procfs_type_lwpid_t=no
8234
8235 fi
8236 rm -f conftest*
8237 fi
8238
8239 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8240 cat >> confdefs.h <<\EOF
8241 #define HAVE_LWPID_T 1
8242 EOF
8243
8244 fi
8245 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
8246
8247 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
8248 echo "configure:8249: checking for psaddr_t in sys/procfs.h" >&5
8249 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
8250 echo $ac_n "(cached) $ac_c" 1>&6
8251 else
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255
8256 #define _SYSCALL32
8257 #include <sys/procfs.h>
8258 int main() {
8259 psaddr_t avar
8260 ; return 0; }
8261 EOF
8262 if { (eval echo configure:8263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8263 rm -rf conftest*
8264 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8265 else
8266 echo "configure: failed program was:" >&5
8267 cat conftest.$ac_ext >&5
8268 rm -rf conftest*
8269 bfd_cv_have_sys_procfs_type_psaddr_t=no
8270
8271 fi
8272 rm -f conftest*
8273 fi
8274
8275 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8276 cat >> confdefs.h <<\EOF
8277 #define HAVE_PSADDR_T 1
8278 EOF
8279
8280 fi
8281 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
8282
8283 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
8284 echo "configure:8285: checking for prsysent_t in sys/procfs.h" >&5
8285 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
8286 echo $ac_n "(cached) $ac_c" 1>&6
8287 else
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291
8292 #define _SYSCALL32
8293 #include <sys/procfs.h>
8294 int main() {
8295 prsysent_t avar
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8299 rm -rf conftest*
8300 bfd_cv_have_sys_procfs_type_prsysent_t=yes
8301 else
8302 echo "configure: failed program was:" >&5
8303 cat conftest.$ac_ext >&5
8304 rm -rf conftest*
8305 bfd_cv_have_sys_procfs_type_prsysent_t=no
8306
8307 fi
8308 rm -f conftest*
8309 fi
8310
8311 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8312 cat >> confdefs.h <<\EOF
8313 #define HAVE_PRSYSENT_T 1
8314 EOF
8315
8316 fi
8317 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
8318
8319 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
8320 echo "configure:8321: checking for pr_sigset_t in sys/procfs.h" >&5
8321 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
8322 echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324 cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327
8328 #define _SYSCALL32
8329 #include <sys/procfs.h>
8330 int main() {
8331 pr_sigset_t avar
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8335 rm -rf conftest*
8336 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
8337 else
8338 echo "configure: failed program was:" >&5
8339 cat conftest.$ac_ext >&5
8340 rm -rf conftest*
8341 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8342
8343 fi
8344 rm -f conftest*
8345 fi
8346
8347 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8348 cat >> confdefs.h <<\EOF
8349 #define HAVE_PR_SIGSET_T 1
8350 EOF
8351
8352 fi
8353 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
8354
8355 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
8356 echo "configure:8357: checking for pr_sigaction64_t in sys/procfs.h" >&5
8357 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
8358 echo $ac_n "(cached) $ac_c" 1>&6
8359 else
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363
8364 #define _SYSCALL32
8365 #include <sys/procfs.h>
8366 int main() {
8367 pr_sigaction64_t avar
8368 ; return 0; }
8369 EOF
8370 if { (eval echo configure:8371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8371 rm -rf conftest*
8372 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
8373 else
8374 echo "configure: failed program was:" >&5
8375 cat conftest.$ac_ext >&5
8376 rm -rf conftest*
8377 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8378
8379 fi
8380 rm -f conftest*
8381 fi
8382
8383 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8384 cat >> confdefs.h <<\EOF
8385 #define HAVE_PR_SIGACTION64_T 1
8386 EOF
8387
8388 fi
8389 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8390
8391 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
8392 echo "configure:8393: checking for pr_siginfo64_t in sys/procfs.h" >&5
8393 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8394 echo $ac_n "(cached) $ac_c" 1>&6
8395 else
8396 cat > conftest.$ac_ext <<EOF
8397 #line 8398 "configure"
8398 #include "confdefs.h"
8399
8400 #define _SYSCALL32
8401 #include <sys/procfs.h>
8402 int main() {
8403 pr_siginfo64_t avar
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8407 rm -rf conftest*
8408 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8409 else
8410 echo "configure: failed program was:" >&5
8411 cat conftest.$ac_ext >&5
8412 rm -rf conftest*
8413 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8414
8415 fi
8416 rm -f conftest*
8417 fi
8418
8419 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8420 cat >> confdefs.h <<\EOF
8421 #define HAVE_PR_SIGINFO64_T 1
8422 EOF
8423
8424 fi
8425 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8426
8427
8428
8429
8430
8431 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8432 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
8433 echo "configure:8434: checking whether prfpregset_t type is broken" >&5
8434 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
8435 echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437 if test "$cross_compiling" = yes; then
8438 gdb_cv_prfpregset_t_broken=yes
8439 else
8440 cat > conftest.$ac_ext <<EOF
8441 #line 8442 "configure"
8442 #include "confdefs.h"
8443 #include <sys/procfs.h>
8444 int main ()
8445 {
8446 if (sizeof (prfpregset_t) == sizeof (void *))
8447 return 1;
8448 return 0;
8449 }
8450 EOF
8451 if { (eval echo configure:8452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8452 then
8453 gdb_cv_prfpregset_t_broken=no
8454 else
8455 echo "configure: failed program was:" >&5
8456 cat conftest.$ac_ext >&5
8457 rm -fr conftest*
8458 gdb_cv_prfpregset_t_broken=yes
8459 fi
8460 rm -fr conftest*
8461 fi
8462
8463 fi
8464
8465 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8466 if test $gdb_cv_prfpregset_t_broken = yes; then
8467 cat >> confdefs.h <<\EOF
8468 #define PRFPREGSET_T_BROKEN 1
8469 EOF
8470
8471 fi
8472 fi
8473
8474
8475 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
8476 echo "configure:8477: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
8477 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
8478 echo $ac_n "(cached) $ac_c" 1>&6
8479 else
8480 cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 #include <unistd.h>
8484 #include <sys/types.h>
8485 #include <sys/procfs.h>
8486
8487 int main() {
8488
8489 int dummy;;
8490 dummy = ioctl(0, PIOCSET, &dummy);
8491
8492 ; return 0; }
8493 EOF
8494 if { (eval echo configure:8495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8495 rm -rf conftest*
8496 gdb_cv_have_procfs_piocset=yes
8497 else
8498 echo "configure: failed program was:" >&5
8499 cat conftest.$ac_ext >&5
8500 rm -rf conftest*
8501 gdb_cv_have_procfs_piocset=no
8502 fi
8503 rm -f conftest*
8504 fi
8505
8506 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8507 if test $gdb_cv_have_procfs_piocset = yes; then
8508 cat >> confdefs.h <<\EOF
8509 #define HAVE_PROCFS_PIOCSET 1
8510 EOF
8511
8512 fi
8513 fi
8514
8515 if test ${host} = ${target} ; then
8516
8517 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
8518 echo "configure:8519: checking for member l_addr in struct link_map" >&5
8519 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
8520 echo $ac_n "(cached) $ac_c" 1>&6
8521 else
8522 cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 #include <link.h>
8526 int main() {
8527 struct link_map lm; (void) lm.l_addr;
8528 ; return 0; }
8529 EOF
8530 if { (eval echo configure:8531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8531 rm -rf conftest*
8532 gdb_cv_have_struct_link_map_with_l_members=yes
8533 else
8534 echo "configure: failed program was:" >&5
8535 cat conftest.$ac_ext >&5
8536 rm -rf conftest*
8537 gdb_cv_have_struct_link_map_with_l_members=no
8538 fi
8539 rm -f conftest*
8540 fi
8541
8542 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8543 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8544 cat >> confdefs.h <<\EOF
8545 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
8546 EOF
8547
8548 fi
8549
8550
8551 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
8552 echo "configure:8553: checking for member lm_addr in struct link_map" >&5
8553 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8554 echo $ac_n "(cached) $ac_c" 1>&6
8555 else
8556 cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <sys/types.h>
8560 #include <link.h>
8561 int main() {
8562 struct link_map lm; (void) lm.lm_addr;
8563 ; return 0; }
8564 EOF
8565 if { (eval echo configure:8566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8566 rm -rf conftest*
8567 gdb_cv_have_struct_link_map_with_lm_members=yes
8568 else
8569 echo "configure: failed program was:" >&5
8570 cat conftest.$ac_ext >&5
8571 rm -rf conftest*
8572 gdb_cv_have_struct_link_map_with_lm_members=no
8573 fi
8574 rm -f conftest*
8575 fi
8576
8577 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8578 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8579 cat >> confdefs.h <<\EOF
8580 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8581 EOF
8582
8583 fi
8584
8585
8586 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
8587 echo "configure:8588: checking for member som_addr in struct so_map" >&5
8588 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
8589 echo $ac_n "(cached) $ac_c" 1>&6
8590 else
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 #include <sys/types.h>
8595 #ifdef HAVE_NLIST_H
8596 #include <nlist.h>
8597 #endif
8598 #include <link.h>
8599 int main() {
8600 struct so_map lm; (void) lm.som_addr;
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8604 rm -rf conftest*
8605 gdb_cv_have_struct_so_map_with_som_members=yes
8606 else
8607 echo "configure: failed program was:" >&5
8608 cat conftest.$ac_ext >&5
8609 rm -rf conftest*
8610 gdb_cv_have_struct_so_map_with_som_members=no
8611 fi
8612 rm -f conftest*
8613 fi
8614
8615 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8616 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8617 cat >> confdefs.h <<\EOF
8618 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8619 EOF
8620
8621 fi
8622
8623
8624 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
8625 echo "configure:8626: checking for struct link_map32 in sys/link.h" >&5
8626 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8627 echo $ac_n "(cached) $ac_c" 1>&6
8628 else
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 #define _SYSCALL32
8633 #include <sys/link.h>
8634 int main() {
8635 struct link_map32 l;
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8639 rm -rf conftest*
8640 gdb_cv_have_struct_link_map32=yes
8641 else
8642 echo "configure: failed program was:" >&5
8643 cat conftest.$ac_ext >&5
8644 rm -rf conftest*
8645 gdb_cv_have_struct_link_map32=no
8646 fi
8647 rm -f conftest*
8648 fi
8649
8650 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8651 if test $gdb_cv_have_struct_link_map32 = yes; then
8652 cat >> confdefs.h <<\EOF
8653 #define HAVE_STRUCT_LINK_MAP32 1
8654 EOF
8655
8656 cat >> confdefs.h <<\EOF
8657 #define _SYSCALL32 1
8658 EOF
8659
8660 fi
8661 fi
8662
8663
8664 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
8665 echo "configure:8666: checking for long long support in compiler" >&5
8666 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8667 echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669 cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672
8673 int main() {
8674
8675 extern long long foo;
8676 switch (foo & 2) { case 0: return 1; }
8677
8678 ; return 0; }
8679 EOF
8680 if { (eval echo configure:8681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8681 rm -rf conftest*
8682 gdb_cv_c_long_long=yes
8683 else
8684 echo "configure: failed program was:" >&5
8685 cat conftest.$ac_ext >&5
8686 rm -rf conftest*
8687 gdb_cv_c_long_long=no
8688 fi
8689 rm -f conftest*
8690 fi
8691
8692 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8693 if test $gdb_cv_c_long_long = yes; then
8694 cat >> confdefs.h <<\EOF
8695 #define CC_HAS_LONG_LONG 1
8696 EOF
8697
8698 fi
8699
8700
8701 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
8702 echo "configure:8703: checking for long long support in printf" >&5
8703 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8704 echo $ac_n "(cached) $ac_c" 1>&6
8705 else
8706 if test "$cross_compiling" = yes; then
8707 gdb_cv_printf_has_long_long=no
8708 else
8709 cat > conftest.$ac_ext <<EOF
8710 #line 8711 "configure"
8711 #include "confdefs.h"
8712
8713 int main () {
8714 char buf[32];
8715 long long l = 0;
8716 l = (l << 16) + 0x0123;
8717 l = (l << 16) + 0x4567;
8718 l = (l << 16) + 0x89ab;
8719 l = (l << 16) + 0xcdef;
8720 sprintf (buf, "0x%016llx", l);
8721 return (strcmp ("0x0123456789abcdef", buf));
8722 }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8725 then
8726 gdb_cv_printf_has_long_long=yes
8727 else
8728 echo "configure: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8730 rm -fr conftest*
8731 gdb_cv_printf_has_long_long=no
8732 fi
8733 rm -fr conftest*
8734 fi
8735
8736 fi
8737
8738 if test $gdb_cv_printf_has_long_long = yes; then
8739 cat >> confdefs.h <<\EOF
8740 #define PRINTF_HAS_LONG_LONG 1
8741 EOF
8742
8743 fi
8744 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8745
8746
8747 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8748 echo "configure:8749: checking for long double support in compiler" >&5
8749 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8750 echo $ac_n "(cached) $ac_c" 1>&6
8751 else
8752 cat > conftest.$ac_ext <<EOF
8753 #line 8754 "configure"
8754 #include "confdefs.h"
8755
8756 int main() {
8757 long double foo;
8758 ; return 0; }
8759 EOF
8760 if { (eval echo configure:8761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8761 rm -rf conftest*
8762 ac_cv_c_long_double=yes
8763 else
8764 echo "configure: failed program was:" >&5
8765 cat conftest.$ac_ext >&5
8766 rm -rf conftest*
8767 ac_cv_c_long_double=no
8768 fi
8769 rm -f conftest*
8770 fi
8771
8772 echo "$ac_t""$ac_cv_c_long_double" 1>&6
8773 if test $ac_cv_c_long_double = yes; then
8774 cat >> confdefs.h <<\EOF
8775 #define HAVE_LONG_DOUBLE 1
8776 EOF
8777
8778 fi
8779
8780
8781 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8782 echo "configure:8783: checking for long double support in printf" >&5
8783 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8784 echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786 if test "$cross_compiling" = yes; then
8787 gdb_cv_printf_has_long_double=no
8788 else
8789 cat > conftest.$ac_ext <<EOF
8790 #line 8791 "configure"
8791 #include "confdefs.h"
8792
8793 int main () {
8794 char buf[16];
8795 long double f = 3.141592653;
8796 sprintf (buf, "%Lg", f);
8797 return (strncmp ("3.14159", buf, 7));
8798 }
8799 EOF
8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8801 then
8802 gdb_cv_printf_has_long_double=yes
8803 else
8804 echo "configure: failed program was:" >&5
8805 cat conftest.$ac_ext >&5
8806 rm -fr conftest*
8807 gdb_cv_printf_has_long_double=no
8808 fi
8809 rm -fr conftest*
8810 fi
8811
8812 fi
8813
8814 if test $gdb_cv_printf_has_long_double = yes; then
8815 cat >> confdefs.h <<\EOF
8816 #define PRINTF_HAS_LONG_DOUBLE 1
8817 EOF
8818
8819 fi
8820 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8821
8822
8823 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
8824 echo "configure:8825: checking for long double support in scanf" >&5
8825 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8826 echo $ac_n "(cached) $ac_c" 1>&6
8827 else
8828 if test "$cross_compiling" = yes; then
8829 gdb_cv_scanf_has_long_double=no
8830 else
8831 cat > conftest.$ac_ext <<EOF
8832 #line 8833 "configure"
8833 #include "confdefs.h"
8834
8835 int main () {
8836 char *buf = "3.141592653";
8837 long double f = 0;
8838 sscanf (buf, "%Lg", &f);
8839 return !(f > 3.14159 && f < 3.14160);
8840 }
8841 EOF
8842 if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8843 then
8844 gdb_cv_scanf_has_long_double=yes
8845 else
8846 echo "configure: failed program was:" >&5
8847 cat conftest.$ac_ext >&5
8848 rm -fr conftest*
8849 gdb_cv_scanf_has_long_double=no
8850 fi
8851 rm -fr conftest*
8852 fi
8853
8854 fi
8855
8856 if test $gdb_cv_scanf_has_long_double = yes; then
8857 cat >> confdefs.h <<\EOF
8858 #define SCANF_HAS_LONG_DOUBLE 1
8859 EOF
8860
8861 fi
8862 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
8863
8864 case ${host_os} in
8865 aix*)
8866 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
8867 echo "configure:8868: checking for -bbigtoc option" >&5
8868 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8869 echo $ac_n "(cached) $ac_c" 1>&6
8870 else
8871
8872 SAVE_LDFLAGS=$LDFLAGS
8873
8874 case $GCC in
8875 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8876 *) gdb_cv_bigtoc=-bbigtoc ;;
8877 esac
8878
8879 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8880 cat > conftest.$ac_ext <<EOF
8881 #line 8882 "configure"
8882 #include "confdefs.h"
8883
8884 int main() {
8885 int i;
8886 ; return 0; }
8887 EOF
8888 if { (eval echo configure:8889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8889 :
8890 else
8891 echo "configure: failed program was:" >&5
8892 cat conftest.$ac_ext >&5
8893 rm -rf conftest*
8894 gdb_cv_bigtoc=
8895 fi
8896 rm -f conftest*
8897
8898 fi
8899
8900 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8901 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8902 ;;
8903 esac
8904
8905
8906
8907 if test ${build} = ${host} -a ${host} = ${target} ; then
8908 case ${host_os} in
8909 hpux*)
8910 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
8911 echo "configure:8912: checking for HPUX/OSF thread support" >&5
8912 if test -f /usr/include/dce/cma_config.h ; then
8913 if test "$GCC" = "yes" ; then
8914 echo "$ac_t""yes" 1>&6
8915 cat >> confdefs.h <<\EOF
8916 #define HAVE_HPUX_THREAD_SUPPORT 1
8917 EOF
8918
8919 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
8920 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8921 else
8922 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8923 fi
8924 else
8925 echo "$ac_t""no" 1>&6
8926 fi
8927 ;;
8928 solaris*)
8929 # See if thread_db library is around for Solaris thread debugging.
8930 # Note that we must explicitly test for version 1 of the library
8931 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8932 # the same API.
8933 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
8934 echo "configure:8935: checking for Solaris thread debugging library" >&5
8935 if test -f /usr/lib/libthread_db.so.1 ; then
8936 echo "$ac_t""yes" 1>&6
8937 cat >> confdefs.h <<\EOF
8938 #define HAVE_THREAD_DB_LIB 1
8939 EOF
8940
8941 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
8942 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8943 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8944 echo "configure:8945: checking for dlopen in -ldl" >&5
8945 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8946 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8947 echo $ac_n "(cached) $ac_c" 1>&6
8948 else
8949 ac_save_LIBS="$LIBS"
8950 LIBS="-ldl $LIBS"
8951 cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* Override any gcc2 internal prototype to avoid an error. */
8955 /* We use char because int might match the return type of a gcc2
8956 builtin and then its argument prototype would still apply. */
8957 char dlopen();
8958
8959 int main() {
8960 dlopen()
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964 rm -rf conftest*
8965 eval "ac_cv_lib_$ac_lib_var=yes"
8966 else
8967 echo "configure: failed program was:" >&5
8968 cat conftest.$ac_ext >&5
8969 rm -rf conftest*
8970 eval "ac_cv_lib_$ac_lib_var=no"
8971 fi
8972 rm -f conftest*
8973 LIBS="$ac_save_LIBS"
8974
8975 fi
8976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8977 echo "$ac_t""yes" 1>&6
8978 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8979 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8980 cat >> confdefs.h <<EOF
8981 #define $ac_tr_lib 1
8982 EOF
8983
8984 LIBS="-ldl $LIBS"
8985
8986 else
8987 echo "$ac_t""no" 1>&6
8988 fi
8989
8990 if test "$GCC" = "yes" ; then
8991 # The GNU linker requires the -export-dynamic option to make
8992 # all symbols visible in the dynamic symbol table.
8993 hold_ldflags=$LDFLAGS
8994 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
8995 echo "configure:8996: checking for the ld -export-dynamic flag" >&5
8996 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8997 cat > conftest.$ac_ext <<EOF
8998 #line 8999 "configure"
8999 #include "confdefs.h"
9000
9001 int main() {
9002 int i;
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9006 rm -rf conftest*
9007 found=yes
9008 else
9009 echo "configure: failed program was:" >&5
9010 cat conftest.$ac_ext >&5
9011 rm -rf conftest*
9012 found=no
9013 fi
9014 rm -f conftest*
9015 LDFLAGS=$hold_ldflags
9016 echo "$ac_t""$found" 1>&6
9017 if test $found = yes; then
9018 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9019 fi
9020 fi
9021 # Sun randomly tweaked the prototypes in <proc_service.h>
9022 # at one point.
9023 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9024 echo "configure:9025: checking if <proc_service.h> is old" >&5
9025 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9026 echo $ac_n "(cached) $ac_c" 1>&6
9027 else
9028
9029 cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032
9033 #include <proc_service.h>
9034 ps_err_e ps_pdwrite
9035 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9036
9037 int main() {
9038
9039 ; return 0; }
9040 EOF
9041 if { (eval echo configure:9042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9042 rm -rf conftest*
9043 gdb_cv_proc_service_is_old=no
9044 else
9045 echo "configure: failed program was:" >&5
9046 cat conftest.$ac_ext >&5
9047 rm -rf conftest*
9048 gdb_cv_proc_service_is_old=yes
9049 fi
9050 rm -f conftest*
9051
9052 fi
9053
9054 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9055 if test $gdb_cv_proc_service_is_old = yes; then
9056 cat >> confdefs.h <<\EOF
9057 #define PROC_SERVICE_IS_OLD 1
9058 EOF
9059
9060 fi
9061 else
9062 echo "$ac_t""no" 1>&6
9063 fi
9064 ;;
9065 aix*)
9066 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9067 echo "configure:9068: checking for AiX thread debugging library" >&5
9068 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9069 echo $ac_n "(cached) $ac_c" 1>&6
9070 else
9071 cat > conftest.$ac_ext <<EOF
9072 #line 9073 "configure"
9073 #include "confdefs.h"
9074 #include <sys/pthdebug.h>
9075 int main() {
9076 #ifndef PTHDB_VERSION_3
9077 #error
9078 #endif
9079 ; return 0; }
9080 EOF
9081 if { (eval echo configure:9082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9082 rm -rf conftest*
9083 gdb_cv_have_aix_thread_debug=yes
9084 else
9085 echo "configure: failed program was:" >&5
9086 cat conftest.$ac_ext >&5
9087 rm -rf conftest*
9088 gdb_cv_have_aix_thread_debug=no
9089 fi
9090 rm -f conftest*
9091 fi
9092
9093 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9094 if test $gdb_cv_have_aix_thread_debug = yes; then
9095 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9096 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
9097 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9098 fi
9099 ;;
9100 esac
9101
9102 fi
9103
9104 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9105 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9106 echo "configure:9107: checking whether <thread_db.h> has TD_NOTALLOC" >&5
9107 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9108 echo $ac_n "(cached) $ac_c" 1>&6
9109 else
9110 cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113 #include <thread_db.h>
9114 int main() {
9115 int i = TD_NOTALLOC;
9116 ; return 0; }
9117 EOF
9118 if { (eval echo configure:9119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9119 rm -rf conftest*
9120 gdb_cv_thread_db_h_has_td_notalloc=yes
9121 else
9122 echo "configure: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124 rm -rf conftest*
9125 gdb_cv_thread_db_h_has_td_notalloc=no
9126
9127 fi
9128 rm -f conftest*
9129
9130 fi
9131
9132 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9133 fi
9134 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9135 cat >> confdefs.h <<\EOF
9136 #define THREAD_DB_HAS_TD_NOTALLOC 1
9137 EOF
9138
9139 fi
9140
9141 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9142 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9143 echo "configure:9144: checking whether <sys/syscall.h> has __NR_tkill" >&5
9144 if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9145 echo $ac_n "(cached) $ac_c" 1>&6
9146 else
9147 cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150 #include <sys/syscall.h>
9151 int main() {
9152 int i = __NR_tkill;
9153 ; return 0; }
9154 EOF
9155 if { (eval echo configure:9156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9156 rm -rf conftest*
9157 gdb_cv_sys_syscall_h_has_tkill=yes
9158 else
9159 echo "configure: failed program was:" >&5
9160 cat conftest.$ac_ext >&5
9161 rm -rf conftest*
9162 gdb_cv_sys_syscall_h_has_tkill=no
9163
9164 fi
9165 rm -f conftest*
9166
9167 fi
9168
9169 echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9170 fi
9171 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9172 cat >> confdefs.h <<\EOF
9173 #define HAVE_TKILL_SYSCALL 1
9174 EOF
9175
9176 fi
9177
9178
9179 # Check whether --with-sysroot or --without-sysroot was given.
9180 if test "${with_sysroot+set}" = set; then
9181 withval="$with_sysroot"
9182
9183 case ${with_sysroot} in
9184 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
9185 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9186 esac
9187
9188 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9189
9190 if test "x$exec_prefix" = xNONE; then
9191 if test "x$prefix" = xNONE; then
9192 test_prefix=/usr/local
9193 else
9194 test_prefix=$prefix
9195 fi
9196 else
9197 test_prefix=$exec_prefix
9198 fi
9199 case ${TARGET_SYSTEM_ROOT} in
9200 "${test_prefix}"|"${test_prefix}/"*|\
9201 '${exec_prefix}'|'${exec_prefix}/'*)
9202 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9203 TARGET_SYSTEM_ROOT_DEFINE="$t"
9204 ;;
9205 esac
9206
9207 else
9208
9209 TARGET_SYSTEM_ROOT=
9210 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9211
9212 fi
9213
9214
9215
9216
9217 # NOTE: Don't add -Wall or -Wunused, they both include
9218 # -Wunused-parameter which reports bogus warnings.
9219 # NOTE: If you add to this list, remember to update
9220 # gdb/doc/gdbint.texinfo.
9221 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9222 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
9223 -Wunused-label"
9224 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9225 # -Wunused-function -Wunused-variable -Wunused-value
9226 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
9227 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9228 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9229 # -Woverloaded-virtual -Winline -Werror"
9230 # Check whether --enable-build-warnings or --disable-build-warnings was given.
9231 if test "${enable_build_warnings+set}" = set; then
9232 enableval="$enable_build_warnings"
9233 case "${enableval}" in
9234 yes) ;;
9235 no) build_warnings="-w";;
9236 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9237 build_warnings="${build_warnings} ${t}";;
9238 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9239 build_warnings="${t} ${build_warnings}";;
9240 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9241 esac
9242 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9243 echo "Setting compiler warning flags = $build_warnings" 6>&1
9244 fi
9245 fi
9246 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9247 if test "${enable_gdb_build_warnings+set}" = set; then
9248 enableval="$enable_gdb_build_warnings"
9249 case "${enableval}" in
9250 yes) ;;
9251 no) build_warnings="-w";;
9252 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9253 build_warnings="${build_warnings} ${t}";;
9254 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9255 build_warnings="${t} ${build_warnings}";;
9256 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9257 esac
9258 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9259 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9260 fi
9261 fi
9262 WARN_CFLAGS=""
9263 WERROR_CFLAGS=""
9264 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9265 then
9266 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9267 echo "configure:9268: checking compiler warning flags" >&5
9268 # Separate out the -Werror flag as some files just cannot be
9269 # compiled with it enabled.
9270 for w in ${build_warnings}; do
9271 case $w in
9272 -Werr*) WERROR_CFLAGS=-Werror ;;
9273 *) # Check that GCC accepts it
9274 saved_CFLAGS="$CFLAGS"
9275 CFLAGS="$CFLAGS $w"
9276 cat > conftest.$ac_ext <<EOF
9277 #line 9278 "configure"
9278 #include "confdefs.h"
9279
9280 int main() {
9281
9282 ; return 0; }
9283 EOF
9284 if { (eval echo configure:9285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9285 rm -rf conftest*
9286 WARN_CFLAGS="${WARN_CFLAGS} $w"
9287 else
9288 echo "configure: failed program was:" >&5
9289 cat conftest.$ac_ext >&5
9290 fi
9291 rm -f conftest*
9292 CFLAGS="$saved_CFLAGS"
9293 esac
9294 done
9295 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
9296 fi
9297
9298
9299
9300 # In the Cygwin environment, we need some additional flags.
9301 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9302 echo "configure:9303: checking for cygwin" >&5
9303 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9304 echo $ac_n "(cached) $ac_c" 1>&6
9305 else
9306 cat > conftest.$ac_ext <<EOF
9307 #line 9308 "configure"
9308 #include "confdefs.h"
9309
9310 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
9311 lose
9312 #endif
9313 EOF
9314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9315 egrep "lose" >/dev/null 2>&1; then
9316 rm -rf conftest*
9317 gdb_cv_os_cygwin=yes
9318 else
9319 rm -rf conftest*
9320 gdb_cv_os_cygwin=no
9321 fi
9322 rm -f conftest*
9323
9324 fi
9325
9326 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9327
9328
9329 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9330 case ${host} in
9331 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9332 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
9333 esac
9334
9335
9336 # libreadline needs libuser32.a in a cygwin environment
9337 WIN32LIBS=
9338 if test x$gdb_cv_os_cygwin = xyes; then
9339 WIN32LIBS="-luser32"
9340 case "${target}" in
9341 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9342 ;;
9343 esac
9344 fi
9345
9346
9347 LIBGUI="../libgui/src/libgui.a"
9348 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9349
9350
9351
9352 WIN32LDAPP=
9353
9354
9355
9356 configdir="unix"
9357
9358 GDBTKLIBS=
9359 if test "${enable_gdbtk}" = "yes"; then
9360
9361 # Gdbtk must have an absolute path to srcdir in order to run
9362 # properly when not installed.
9363 here=`pwd`
9364 cd ${srcdir}
9365 GDBTK_SRC_DIR=`pwd`
9366 cd $here
9367
9368
9369 #
9370 # Ok, lets find the tcl configuration
9371 # First, look for one uninstalled.
9372 # the alternative search directory is invoked by --with-tclconfig
9373 #
9374
9375 if test x"${no_tcl}" = x ; then
9376 # we reset no_tcl in case something fails here
9377 no_tcl=true
9378 # Check whether --with-tclconfig or --without-tclconfig was given.
9379 if test "${with_tclconfig+set}" = set; then
9380 withval="$with_tclconfig"
9381 with_tclconfig=${withval}
9382 fi
9383
9384 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9385 echo "configure:9386: checking for Tcl configuration" >&5
9386 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9387 echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389
9390
9391 # First check to see if --with-tclconfig was specified.
9392 if test x"${with_tclconfig}" != x ; then
9393 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9394 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9395 else
9396 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9397 fi
9398 fi
9399
9400 # then check for a private Tcl installation
9401 if test x"${ac_cv_c_tclconfig}" = x ; then
9402 for i in \
9403 ../tcl \
9404 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9405 ../../tcl \
9406 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9407 ../../../tcl \
9408 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9409 if test -f "$i/${configdir}/tclConfig.sh" ; then
9410 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9411 break
9412 fi
9413 done
9414 fi
9415 # check in a few common install locations
9416 if test x"${ac_cv_c_tclconfig}" = x ; then
9417 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9418 if test -f "$i/tclConfig.sh" ; then
9419 ac_cv_c_tclconfig=`(cd $i; pwd)`
9420 break
9421 fi
9422 done
9423 fi
9424 # check in a few other private locations
9425 if test x"${ac_cv_c_tclconfig}" = x ; then
9426 for i in \
9427 ${srcdir}/../tcl \
9428 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9429 if test -f "$i/${configdir}/tclConfig.sh" ; then
9430 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9431 break
9432 fi
9433 done
9434 fi
9435
9436 fi
9437
9438 if test x"${ac_cv_c_tclconfig}" = x ; then
9439 TCLCONFIG="# no Tcl configs found"
9440 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9441 else
9442 no_tcl=
9443 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9444 echo "$ac_t""found $TCLCONFIG" 1>&6
9445 fi
9446 fi
9447
9448 if test -z "${no_tcl}"; then
9449
9450 . $TCLCONFIG
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478 #
9479 # Ok, lets find the tk configuration
9480 # First, look for one uninstalled.
9481 # the alternative search directory is invoked by --with-tkconfig
9482 #
9483
9484 if test x"${no_tk}" = x ; then
9485 # we reset no_tk in case something fails here
9486 no_tk=true
9487 # Check whether --with-tkconfig or --without-tkconfig was given.
9488 if test "${with_tkconfig+set}" = set; then
9489 withval="$with_tkconfig"
9490 with_tkconfig=${withval}
9491 fi
9492
9493 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9494 echo "configure:9495: checking for Tk configuration" >&5
9495 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9496 echo $ac_n "(cached) $ac_c" 1>&6
9497 else
9498
9499
9500 # First check to see if --with-tkconfig was specified.
9501 if test x"${with_tkconfig}" != x ; then
9502 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9503 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9504 else
9505 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9506 fi
9507 fi
9508
9509 # then check for a private Tk library
9510 if test x"${ac_cv_c_tkconfig}" = x ; then
9511 for i in \
9512 ../tk \
9513 `ls -dr ../tk[4-9]* 2>/dev/null` \
9514 ../../tk \
9515 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9516 ../../../tk \
9517 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9518 if test -f "$i/${configdir}/tkConfig.sh" ; then
9519 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9520 break
9521 fi
9522 done
9523 fi
9524 # check in a few common install locations
9525 if test x"${ac_cv_c_tkconfig}" = x ; then
9526 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9527 if test -f "$i/tkConfig.sh" ; then
9528 ac_cv_c_tkconfig=`(cd $i; pwd)`
9529 break
9530 fi
9531 done
9532 fi
9533 # check in a few other private locations
9534 if test x"${ac_cv_c_tkconfig}" = x ; then
9535 for i in \
9536 ${srcdir}/../tk \
9537 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9538 if test -f "$i/${configdir}/tkConfig.sh" ; then
9539 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9540 break
9541 fi
9542 done
9543 fi
9544
9545 fi
9546
9547 if test x"${ac_cv_c_tkconfig}" = x ; then
9548 TKCONFIG="# no Tk configs found"
9549 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9550 else
9551 no_tk=
9552 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9553 echo "$ac_t""found $TKCONFIG" 1>&6
9554 fi
9555 fi
9556
9557
9558
9559 # now look for Tcl library stuff
9560
9561 case "${host}" in
9562 *-*-cygwin*)
9563 tcldir=../tcl/win/
9564 ;;
9565 *)
9566 tcldir=../tcl/unix/
9567 ;;
9568 esac
9569
9570 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9571
9572 # If $no_tk is nonempty, then we can't do Tk, and there is no
9573 # point to doing Tcl.
9574 if test -z "${no_tk}"; then
9575
9576 if test -f "$TKCONFIG" ; then
9577 . $TKCONFIG
9578 fi
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593 #
9594 # Ok, lets find the tcl source trees so we can use the headers
9595 # Warning: transition of version 9 to 10 will break this algorithm
9596 # because 10 sorts before 9. We also look for just tcl. We have to
9597 # be careful that we don't match stuff like tclX by accident.
9598 # the alternative search directory is involked by --with-tclinclude
9599 #
9600
9601 no_tcl=true
9602 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9603 echo "configure:9604: checking for Tcl private headers. dir=${configdir}" >&5
9604 # Check whether --with-tclinclude or --without-tclinclude was given.
9605 if test "${with_tclinclude+set}" = set; then
9606 withval="$with_tclinclude"
9607 with_tclinclude=${withval}
9608 fi
9609
9610 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9611 echo $ac_n "(cached) $ac_c" 1>&6
9612 else
9613
9614 # first check to see if --with-tclinclude was specified
9615 if test x"${with_tclinclude}" != x ; then
9616 if test -f ${with_tclinclude}/tclInt.h ; then
9617 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9618 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9619 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9620 else
9621 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9622 fi
9623 fi
9624
9625 # next check if it came with Tcl configuration file
9626 if test x"${ac_cv_c_tclconfig}" = x ; then
9627 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9628 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9629 fi
9630 fi
9631
9632 # next check in private source directory
9633 #
9634 # since ls returns lowest version numbers first, reverse its output
9635 if test x"${ac_cv_c_tclh}" = x ; then
9636 for i in \
9637 ${srcdir}/../tcl \
9638 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9639 ${srcdir}/../../tcl \
9640 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9641 ${srcdir}/../../../tcl \
9642 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9643 if test -f $i/generic/tclInt.h ; then
9644 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9645 break
9646 fi
9647 done
9648 fi
9649 # finally check in a few common install locations
9650 #
9651 # since ls returns lowest version numbers first, reverse its output
9652 if test x"${ac_cv_c_tclh}" = x ; then
9653 for i in \
9654 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9655 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9656 /usr/local/src/tcl \
9657 /usr/local/lib/tcl \
9658 ${prefix}/include ; do
9659 if test -f $i/generic/tclInt.h ; then
9660 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9661 break
9662 fi
9663 done
9664 fi
9665 # see if one is installed
9666 if test x"${ac_cv_c_tclh}" = x ; then
9667 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9668 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9669 echo "configure:9670: checking for tclInt.h" >&5
9670 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9671 echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673 cat > conftest.$ac_ext <<EOF
9674 #line 9675 "configure"
9675 #include "confdefs.h"
9676 #include <tclInt.h>
9677 EOF
9678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9679 { (eval echo configure:9680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9681 if test -z "$ac_err"; then
9682 rm -rf conftest*
9683 eval "ac_cv_header_$ac_safe=yes"
9684 else
9685 echo "$ac_err" >&5
9686 echo "configure: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 rm -rf conftest*
9689 eval "ac_cv_header_$ac_safe=no"
9690 fi
9691 rm -f conftest*
9692 fi
9693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9694 echo "$ac_t""yes" 1>&6
9695 ac_cv_c_tclh=installed
9696 else
9697 echo "$ac_t""no" 1>&6
9698 ac_cv_c_tclh=""
9699 fi
9700
9701 fi
9702
9703 fi
9704
9705 if test x"${ac_cv_c_tclh}" = x ; then
9706 TCLHDIR="# no Tcl private headers found"
9707 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9708 fi
9709 if test x"${ac_cv_c_tclh}" != x ; then
9710 no_tcl=""
9711 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9712 echo "$ac_t""is installed" 1>&6
9713 TCLHDIR=""
9714 else
9715 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9716 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9717 TCLHDIR="-I${ac_cv_c_tclh}"
9718 fi
9719 fi
9720
9721
9722
9723
9724 #
9725 # Ok, lets find the tk source trees so we can use the headers
9726 # If the directory (presumably symlink) named "tk" exists, use that one
9727 # in preference to any others. Same logic is used when choosing library
9728 # and again with Tcl. The search order is the best place to look first, then in
9729 # decreasing significance. The loop breaks if the trigger file is found.
9730 # Note the gross little conversion here of srcdir by cd'ing to the found
9731 # directory. This converts the path from a relative to an absolute, so
9732 # recursive cache variables for the path will work right. We check all
9733 # the possible paths in one loop rather than many seperate loops to speed
9734 # things up.
9735 # the alternative search directory is involked by --with-tkinclude
9736 #
9737 no_tk=true
9738 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9739 echo "configure:9740: checking for Tk private headers" >&5
9740 # Check whether --with-tkinclude or --without-tkinclude was given.
9741 if test "${with_tkinclude+set}" = set; then
9742 withval="$with_tkinclude"
9743 with_tkinclude=${withval}
9744 fi
9745
9746 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9747 echo $ac_n "(cached) $ac_c" 1>&6
9748 else
9749
9750 # first check to see if --with-tkinclude was specified
9751 if test x"${with_tkinclude}" != x ; then
9752 if test -f ${with_tkinclude}/tk.h ; then
9753 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9754 elif test -f ${with_tkinclude}/generic/tk.h ; then
9755 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9756 else
9757 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9758 fi
9759 fi
9760
9761 # next check if it came with Tk configuration file
9762 if test x"${ac_cv_c_tkconfig}" = x ; then
9763 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9764 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9765 fi
9766 fi
9767
9768 # next check in private source directory
9769 #
9770 # since ls returns lowest version numbers first, reverse its output
9771 if test x"${ac_cv_c_tkh}" = x ; then
9772 for i in \
9773 ${srcdir}/../tk \
9774 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9775 ${srcdir}/../../tk \
9776 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9777 ${srcdir}/../../../tk \
9778 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9779 if test -f $i/generic/tk.h ; then
9780 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9781 break
9782 fi
9783 done
9784 fi
9785 # finally check in a few common install locations
9786 #
9787 # since ls returns lowest version numbers first, reverse its output
9788 if test x"${ac_cv_c_tkh}" = x ; then
9789 for i in \
9790 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9791 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9792 /usr/local/src/tk \
9793 /usr/local/lib/tk \
9794 ${prefix}/include ; do
9795 if test -f $i/generic/tk.h ; then
9796 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9797 break
9798 fi
9799 done
9800 fi
9801 # see if one is installed
9802 if test x"${ac_cv_c_tkh}" = x ; then
9803 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9804 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9805 echo "configure:9806: checking for tk.h" >&5
9806 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9807 echo $ac_n "(cached) $ac_c" 1>&6
9808 else
9809 cat > conftest.$ac_ext <<EOF
9810 #line 9811 "configure"
9811 #include "confdefs.h"
9812 #include <tk.h>
9813 EOF
9814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9815 { (eval echo configure:9816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9817 if test -z "$ac_err"; then
9818 rm -rf conftest*
9819 eval "ac_cv_header_$ac_safe=yes"
9820 else
9821 echo "$ac_err" >&5
9822 echo "configure: failed program was:" >&5
9823 cat conftest.$ac_ext >&5
9824 rm -rf conftest*
9825 eval "ac_cv_header_$ac_safe=no"
9826 fi
9827 rm -f conftest*
9828 fi
9829 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9830 echo "$ac_t""yes" 1>&6
9831 ac_cv_c_tkh=installed
9832 else
9833 echo "$ac_t""no" 1>&6
9834 ac_cv_c_tkh=""
9835 fi
9836
9837 fi
9838
9839 fi
9840
9841 if test x"${ac_cv_c_tkh}" != x ; then
9842 no_tk=""
9843 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9844 echo "$ac_t""is installed" 1>&6
9845 TKHDIR=""
9846 else
9847 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9848 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9849 TKHDIR="-I${ac_cv_c_tkh}"
9850 fi
9851 else
9852 TKHDIR="# no Tk directory found"
9853 echo "configure: warning: Can't find Tk private headers" 1>&2
9854 no_tk=true
9855 fi
9856
9857
9858
9859
9860 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9861 echo "configure:9862: checking for Itcl private headers. srcdir=${srcdir}" >&5
9862 if test x"${ac_cv_c_itclh}" = x ; then
9863 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9864 if test -f $i/generic/itcl.h ; then
9865 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9866 break
9867 fi
9868 done
9869 fi
9870 if test x"${ac_cv_c_itclh}" = x ; then
9871 ITCLHDIR="# no Itcl private headers found"
9872 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9873 fi
9874 if test x"${ac_cv_c_itclh}" != x ; then
9875 ITCLHDIR="-I${ac_cv_c_itclh}"
9876 fi
9877 # should always be here
9878 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
9879
9880 #AC_SUBST(ITCLLIB)
9881
9882
9883 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9884 echo "configure:9885: checking for Itk private headers. srcdir=${srcdir}" >&5
9885 if test x"${ac_cv_c_itkh}" = x ; then
9886 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9887 if test -f $i/generic/itk.h ; then
9888 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9889 break
9890 fi
9891 done
9892 fi
9893 if test x"${ac_cv_c_itkh}" = x ; then
9894 ITKHDIR="# no Itk private headers found"
9895 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9896 fi
9897 if test x"${ac_cv_c_itkh}" != x ; then
9898 ITKHDIR="-I${ac_cv_c_itkh}"
9899 fi
9900 # should always be here
9901 # ITKLIB="../itcl/itk/unix/libitk.a"
9902
9903 #AC_SUBST(ITKLIB)
9904
9905
9906
9907 # now look for Tk library stuff
9908
9909 case "${host}" in
9910 *-*-cygwin*)
9911 tkdir=../tk/win/
9912 ;;
9913 *)
9914 tkdir=../tk/unix/
9915 ;;
9916 esac
9917
9918 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9919
9920 # now look for Itcl library stuff
9921
9922
9923 #
9924 # Ok, lets find the itcl configuration
9925 # First, look for one uninstalled.
9926 # the alternative search directory is invoked by --with-itclconfig
9927 #
9928
9929 if test x"${no_itcl}" = x ; then
9930 # we reset no_itcl in case something fails here
9931 no_itcl=true
9932 # Check whether --with-itclconfig or --without-itclconfig was given.
9933 if test "${with_itclconfig+set}" = set; then
9934 withval="$with_itclconfig"
9935 with_itclconfig=${withval}
9936 fi
9937
9938 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
9939 echo "configure:9940: checking for Itcl configuration" >&5
9940 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9941 echo $ac_n "(cached) $ac_c" 1>&6
9942 else
9943
9944
9945 # First check to see if --with-itclconfig was specified.
9946 if test x"${with_itclconfig}" != x ; then
9947 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9948 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9949 else
9950 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9951 fi
9952 fi
9953
9954 # then check for a private Itcl library
9955 if test x"${ac_cv_c_itclconfig}" = x ; then
9956 for i in \
9957 ../itcl/itcl \
9958 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9959 ../../itcl \
9960 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9961 ../../../itcl \
9962 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9963 if test -f "$i/itclConfig.sh" ; then
9964 ac_cv_c_itclconfig=`(cd $i; pwd)`
9965 break
9966 fi
9967 done
9968 fi
9969 # check in a few common install locations
9970 if test x"${ac_cv_c_itclconfig}" = x ; then
9971 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9972 if test -f "$i/itclConfig.sh" ; then
9973 ac_cv_c_itclconfig=`(cd $i; pwd)`
9974 break
9975 fi
9976 done
9977 fi
9978 # check in a few other private locations
9979 if test x"${ac_cv_c_itclconfig}" = x ; then
9980 for i in \
9981 ${srcdir}/../itcl/itcl \
9982 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9983 if test -f "$i/itclConfig.sh" ; then
9984 ac_cv_c_itclconfig=`(cd $i; pwd)`
9985 break
9986 fi
9987 done
9988 fi
9989
9990 fi
9991
9992 if test x"${ac_cv_c_itclconfig}" = x ; then
9993 ITCLCONFIG="# no Itcl configs found"
9994 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9995 else
9996 no_itcl=
9997 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9998 echo "$ac_t""found $ITCLCONFIG" 1>&6
9999 fi
10000 fi
10001
10002 if test -z "${no_itcl}"; then
10003
10004 if test -f "$ITCLCONFIG" ; then
10005 . $ITCLCONFIG
10006 fi
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
10020 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
10021 fi
10022
10023
10024 # now look for Itk library stuff
10025
10026 #
10027 # Ok, lets find the itk configuration
10028 # First, look for one uninstalled.
10029 # the alternative search directory is invoked by --with-itkconfig
10030 #
10031
10032 if test x"${no_itk}" = x ; then
10033 # we reset no_itk in case something fails here
10034 no_itk=true
10035 # Check whether --with-itkconfig or --without-itkconfig was given.
10036 if test "${with_itkconfig+set}" = set; then
10037 withval="$with_itkconfig"
10038 with_itkconfig=${withval}
10039 fi
10040
10041 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
10042 echo "configure:10043: checking for Itk configuration" >&5
10043 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10044 echo $ac_n "(cached) $ac_c" 1>&6
10045 else
10046
10047
10048 # First check to see if --with-itkconfig was specified.
10049 if test x"${with_itkconfig}" != x ; then
10050 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10051 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10052 else
10053 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10054 fi
10055 fi
10056
10057 # then check for a private Itk library
10058 if test x"${ac_cv_c_itkconfig}" = x ; then
10059 for i in \
10060 ../itcl/itk \
10061 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10062 ../../itk \
10063 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10064 ../../../itk \
10065 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10066 if test -f "$i/itkConfig.sh" ; then
10067 ac_cv_c_itkconfig=`(cd $i; pwd)`
10068 break
10069 fi
10070 done
10071 fi
10072 # check in a few common install locations
10073 if test x"${ac_cv_c_itkconfig}" = x ; then
10074 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10075 if test -f "$i/itkConfig.sh" ; then
10076 ac_cv_c_itkconfig=`(cd $i; pwd)`
10077 break
10078 fi
10079 done
10080 fi
10081 # check in a few other private locations
10082 if test x"${ac_cv_c_itkconfig}" = x ; then
10083 for i in \
10084 ${srcdir}/../itcl/itk \
10085 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10086 if test -f "$i/itkConfig.sh" ; then
10087 ac_cv_c_itkconfig=`(cd $i; pwd)`
10088 break
10089 fi
10090 done
10091 fi
10092
10093 fi
10094
10095 if test x"${ac_cv_c_itkconfig}" = x ; then
10096 ITKCONFIG="# no Itk configs found"
10097 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10098 else
10099 no_itk=
10100 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10101 echo "$ac_t""found $ITKCONFIG" 1>&6
10102 fi
10103 fi
10104
10105
10106 if test -z "${no_itcl}"; then
10107
10108 if test -f "$ITKCONFIG" ; then
10109 . $ITKCONFIG
10110 fi
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123 ITKLIB="${ITK_BUILD_LIB_SPEC}"
10124 ITK_DEPS="${ITK_LIB_FULL_PATH}"
10125 fi
10126
10127 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
10128 # Tcl/Tk 8.1 require -fwritable strings. I don't
10129 # know whether 8.2 will or not, but I bet it will.
10130 # I don't have to worry about 7.x since we don't support it.
10131 GDBTK_CFLAGS=""
10132 if test "$GCC" = "yes"; then
10133 if test "$TCL_VERSION" != "8.0" ; then
10134 GDBTK_CFLAGS="-fwritable-strings"
10135 fi
10136 fi
10137
10138 # Include some libraries that Tcl and Tk want.
10139 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
10140 # Yes, the ordering seems wrong here. But it isn't.
10141 # TK_LIBS is the list of libraries that need to be linked
10142 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10143 # were in LIBS then any link tests after this point would
10144 # try to include things like `$(LIBGUI)', which wouldn't work.
10145 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
10146
10147 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10148 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10149 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10150 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
10151 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
10152 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
10153 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
10154 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
10155
10156 if test x$gdb_cv_os_cygwin = xyes; then
10157 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10158 WIN32LDAPP="-Wl,--subsystem,console"
10159 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10160 fi
10161 fi
10162 fi
10163
10164 configdirs="${configdirs} gdbtk"
10165 fi
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180 # If we find X, set shell vars x_includes and x_libraries to the
10181 # paths, otherwise set no_x=yes.
10182 # Uses ac_ vars as temps to allow command line to override cache and checks.
10183 # --without-x overrides everything else, but does not touch the cache.
10184 echo $ac_n "checking for X""... $ac_c" 1>&6
10185 echo "configure:10186: checking for X" >&5
10186
10187 # Check whether --with-x or --without-x was given.
10188 if test "${with_x+set}" = set; then
10189 withval="$with_x"
10190 :
10191 fi
10192
10193 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10194 if test "x$with_x" = xno; then
10195 # The user explicitly disabled X.
10196 have_x=disabled
10197 else
10198 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10199 # Both variables are already set.
10200 have_x=yes
10201 else
10202 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10203 echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205 # One or both of the vars are not set, and there is no cached value.
10206 ac_x_includes=NO ac_x_libraries=NO
10207 rm -fr conftestdir
10208 if mkdir conftestdir; then
10209 cd conftestdir
10210 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10211 cat > Imakefile <<'EOF'
10212 acfindx:
10213 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10214 EOF
10215 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10216 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10217 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10218 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10219 for ac_extension in a so sl; do
10220 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10221 test -f $ac_im_libdir/libX11.$ac_extension; then
10222 ac_im_usrlibdir=$ac_im_libdir; break
10223 fi
10224 done
10225 # Screen out bogus values from the imake configuration. They are
10226 # bogus both because they are the default anyway, and because
10227 # using them would break gcc on systems where it needs fixed includes.
10228 case "$ac_im_incroot" in
10229 /usr/include) ;;
10230 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10231 esac
10232 case "$ac_im_usrlibdir" in
10233 /usr/lib | /lib) ;;
10234 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10235 esac
10236 fi
10237 cd ..
10238 rm -fr conftestdir
10239 fi
10240
10241 if test "$ac_x_includes" = NO; then
10242 # Guess where to find include files, by looking for this one X11 .h file.
10243 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10244
10245 # First, try using that file with no special directory specified.
10246 cat > conftest.$ac_ext <<EOF
10247 #line 10248 "configure"
10248 #include "confdefs.h"
10249 #include <$x_direct_test_include>
10250 EOF
10251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10252 { (eval echo configure:10253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10254 if test -z "$ac_err"; then
10255 rm -rf conftest*
10256 # We can compile using X headers with no special include directory.
10257 ac_x_includes=
10258 else
10259 echo "$ac_err" >&5
10260 echo "configure: failed program was:" >&5
10261 cat conftest.$ac_ext >&5
10262 rm -rf conftest*
10263 # Look for the header file in a standard set of common directories.
10264 # Check X11 before X11Rn because it is often a symlink to the current release.
10265 for ac_dir in \
10266 /usr/X11/include \
10267 /usr/X11R6/include \
10268 /usr/X11R5/include \
10269 /usr/X11R4/include \
10270 \
10271 /usr/include/X11 \
10272 /usr/include/X11R6 \
10273 /usr/include/X11R5 \
10274 /usr/include/X11R4 \
10275 \
10276 /usr/local/X11/include \
10277 /usr/local/X11R6/include \
10278 /usr/local/X11R5/include \
10279 /usr/local/X11R4/include \
10280 \
10281 /usr/local/include/X11 \
10282 /usr/local/include/X11R6 \
10283 /usr/local/include/X11R5 \
10284 /usr/local/include/X11R4 \
10285 \
10286 /usr/X386/include \
10287 /usr/x386/include \
10288 /usr/XFree86/include/X11 \
10289 \
10290 /usr/include \
10291 /usr/local/include \
10292 /usr/unsupported/include \
10293 /usr/athena/include \
10294 /usr/local/x11r5/include \
10295 /usr/lpp/Xamples/include \
10296 \
10297 /usr/openwin/include \
10298 /usr/openwin/share/include \
10299 ; \
10300 do
10301 if test -r "$ac_dir/$x_direct_test_include"; then
10302 ac_x_includes=$ac_dir
10303 break
10304 fi
10305 done
10306 fi
10307 rm -f conftest*
10308 fi # $ac_x_includes = NO
10309
10310 if test "$ac_x_libraries" = NO; then
10311 # Check for the libraries.
10312
10313 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10314 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10315
10316 # See if we find them without any special options.
10317 # Don't add to $LIBS permanently.
10318 ac_save_LIBS="$LIBS"
10319 LIBS="-l$x_direct_test_library $LIBS"
10320 cat > conftest.$ac_ext <<EOF
10321 #line 10322 "configure"
10322 #include "confdefs.h"
10323
10324 int main() {
10325 ${x_direct_test_function}()
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329 rm -rf conftest*
10330 LIBS="$ac_save_LIBS"
10331 # We can link X programs with no special library path.
10332 ac_x_libraries=
10333 else
10334 echo "configure: failed program was:" >&5
10335 cat conftest.$ac_ext >&5
10336 rm -rf conftest*
10337 LIBS="$ac_save_LIBS"
10338 # First see if replacing the include by lib works.
10339 # Check X11 before X11Rn because it is often a symlink to the current release.
10340 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10341 /usr/X11/lib \
10342 /usr/X11R6/lib \
10343 /usr/X11R5/lib \
10344 /usr/X11R4/lib \
10345 \
10346 /usr/lib/X11 \
10347 /usr/lib/X11R6 \
10348 /usr/lib/X11R5 \
10349 /usr/lib/X11R4 \
10350 \
10351 /usr/local/X11/lib \
10352 /usr/local/X11R6/lib \
10353 /usr/local/X11R5/lib \
10354 /usr/local/X11R4/lib \
10355 \
10356 /usr/local/lib/X11 \
10357 /usr/local/lib/X11R6 \
10358 /usr/local/lib/X11R5 \
10359 /usr/local/lib/X11R4 \
10360 \
10361 /usr/X386/lib \
10362 /usr/x386/lib \
10363 /usr/XFree86/lib/X11 \
10364 \
10365 /usr/lib \
10366 /usr/local/lib \
10367 /usr/unsupported/lib \
10368 /usr/athena/lib \
10369 /usr/local/x11r5/lib \
10370 /usr/lpp/Xamples/lib \
10371 /lib/usr/lib/X11 \
10372 \
10373 /usr/openwin/lib \
10374 /usr/openwin/share/lib \
10375 ; \
10376 do
10377 for ac_extension in a so sl; do
10378 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10379 ac_x_libraries=$ac_dir
10380 break 2
10381 fi
10382 done
10383 done
10384 fi
10385 rm -f conftest*
10386 fi # $ac_x_libraries = NO
10387
10388 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10389 # Didn't find X anywhere. Cache the known absence of X.
10390 ac_cv_have_x="have_x=no"
10391 else
10392 # Record where we found X for the cache.
10393 ac_cv_have_x="have_x=yes \
10394 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10395 fi
10396 fi
10397 fi
10398 eval "$ac_cv_have_x"
10399 fi # $with_x != no
10400
10401 if test "$have_x" != yes; then
10402 echo "$ac_t""$have_x" 1>&6
10403 no_x=yes
10404 else
10405 # If each of the values was on the command line, it overrides each guess.
10406 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10407 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10408 # Update the cache value to reflect the command line values.
10409 ac_cv_have_x="have_x=yes \
10410 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10411 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10412 fi
10413
10414
10415
10416 # Unlike the sim directory, whether a simulator is linked is controlled by
10417 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10418 # This code just checks for a few cases where we'd like to ignore those
10419 # definitions, even when they're present in the '.mt' file. These cases
10420 # are when --disable-sim is specified, or if the simulator directory is
10421 # not part of the source tree.
10422 #
10423 # Check whether --enable-sim or --disable-sim was given.
10424 if test "${enable_sim+set}" = set; then
10425 enableval="$enable_sim"
10426 echo "enable_sim = $enable_sim";
10427 echo "enableval = ${enableval}";
10428 case "${enableval}" in
10429 yes) ignore_sim=false ;;
10430 no) ignore_sim=true ;;
10431 *) ignore_sim=false ;;
10432 esac
10433 else
10434 ignore_sim=false
10435 fi
10436
10437
10438 if test ! -d "${srcdir}/../sim"; then
10439 ignore_sim=true
10440 fi
10441
10442 if test "${ignore_sim}" = "true"; then
10443 IGNORE_SIM="SIM="
10444 IGNORE_SIM_OBS="SIM_OBS="
10445 else
10446 IGNORE_SIM=""
10447 IGNORE_SIM_OBS=""
10448 cat >> confdefs.h <<\EOF
10449 #define WITH_SIM 1
10450 EOF
10451
10452 fi
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469 # target_subdir is used by the testsuite to find the target libraries.
10470 target_subdir=
10471 if test "${host}" != "${target}"; then
10472 target_subdir="${target_alias}/"
10473 fi
10474
10475
10476 frags=
10477 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10478 if test ! -f ${host_makefile_frag}; then
10479 # When building a native debuger the .mh file containing things
10480 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10481 # since it no longer contains anything useful.
10482 if test "${target}" = "${host}"; then
10483 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10484 else
10485 host_makefile_frag=/dev/null
10486 fi
10487 fi
10488 frags="$frags $host_makefile_frag"
10489
10490 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10491 if test ! -f ${target_makefile_frag}; then
10492 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10493 fi
10494 frags="$frags $target_makefile_frag"
10495
10496
10497
10498
10499
10500 hostfile=`sed -n '
10501 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10502 ' ${host_makefile_frag}`
10503
10504 targetfile=`sed -n '
10505 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10506 ' ${target_makefile_frag}`
10507
10508 if test "${target}" = "${host}"; then
10509 # We pick this up from the host configuration file (.mh) because we
10510 # do not have a native configuration Makefile fragment.
10511 nativefile=`sed -n '
10512 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10513 ' ${host_makefile_frag}`
10514 fi
10515
10516
10517 if test x"${gdb_osabi}" != x ; then
10518 cat >> confdefs.h <<EOF
10519 #define GDB_OSABI_DEFAULT $gdb_osabi
10520 EOF
10521
10522 fi
10523
10524 # Enable multi-ice-gdb-server.
10525 # Check whether --enable-multi-ice or --disable-multi-ice was given.
10526 if test "${enable_multi_ice+set}" = set; then
10527 enableval="$enable_multi_ice"
10528 case $enableval in
10529 yes | no)
10530 ;;
10531 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10532 esac
10533 fi
10534
10535 if test "x$enable_multi_ice" = xyes; then
10536 configdirs="$configdirs multi-ice"
10537 fi
10538
10539 # We only build gdbserver automatically if host and target are the same.
10540 if test "x$target" = "x$host"; then
10541 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
10542 echo "configure:10543: checking whether gdbserver is supported on this host" >&5
10543 if test "x$build_gdbserver" = xyes; then
10544 configdirs="$configdirs gdbserver"
10545 echo "$ac_t""yes" 1>&6
10546 else
10547 echo "$ac_t""no" 1>&6
10548 fi
10549 fi
10550
10551 subdirs="doc testsuite $configdirs"
10552
10553
10554 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
10555 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10556 # version.
10557
10558 files=
10559 links=
10560
10561 rm -f xm.h
10562 xm_h=""
10563 if test "${hostfile}" != ""; then
10564 xm_h=xm.h
10565 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10566 files="${files} ${GDB_XM_FILE}"
10567 links="${links} xm.h"
10568 cat >> confdefs.h <<EOF
10569 #define GDB_XM_FILE ${GDB_XM_FILE}
10570 EOF
10571
10572 fi
10573
10574
10575 rm -f tm.h
10576 tm_h=""
10577 if test "${targetfile}" != ""; then
10578 tm_h=tm.h
10579 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10580 files="${files} ${GDB_TM_FILE}"
10581 links="${links} tm.h"
10582 cat >> confdefs.h <<EOF
10583 #define GDB_TM_FILE ${GDB_TM_FILE}
10584 EOF
10585
10586 fi
10587
10588
10589 rm -f nm.h
10590 nm_h=""
10591 if test "${nativefile}" != ""; then
10592 nm_h=nm.h
10593 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10594 files="${files} ${GDB_NM_FILE}"
10595 links="${links} nm.h"
10596 cat >> confdefs.h <<EOF
10597 #define GDB_NM_FILE ${GDB_NM_FILE}
10598 EOF
10599
10600 fi
10601
10602
10603
10604
10605 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
10606 echo "configure:10607: checking for Cygwin environment" >&5
10607 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10608 echo $ac_n "(cached) $ac_c" 1>&6
10609 else
10610 cat > conftest.$ac_ext <<EOF
10611 #line 10612 "configure"
10612 #include "confdefs.h"
10613
10614 int main() {
10615
10616 #ifndef __CYGWIN__
10617 #define __CYGWIN__ __CYGWIN32__
10618 #endif
10619 return __CYGWIN__;
10620 ; return 0; }
10621 EOF
10622 if { (eval echo configure:10623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10623 rm -rf conftest*
10624 ac_cv_cygwin=yes
10625 else
10626 echo "configure: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 rm -rf conftest*
10629 ac_cv_cygwin=no
10630 fi
10631 rm -f conftest*
10632 rm -f conftest*
10633 fi
10634
10635 echo "$ac_t""$ac_cv_cygwin" 1>&6
10636 CYGWIN=
10637 test "$ac_cv_cygwin" = yes && CYGWIN=yes
10638 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
10639 echo "configure:10640: checking for mingw32 environment" >&5
10640 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10641 echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643 cat > conftest.$ac_ext <<EOF
10644 #line 10645 "configure"
10645 #include "confdefs.h"
10646
10647 int main() {
10648 return __MINGW32__;
10649 ; return 0; }
10650 EOF
10651 if { (eval echo configure:10652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10652 rm -rf conftest*
10653 ac_cv_mingw32=yes
10654 else
10655 echo "configure: failed program was:" >&5
10656 cat conftest.$ac_ext >&5
10657 rm -rf conftest*
10658 ac_cv_mingw32=no
10659 fi
10660 rm -f conftest*
10661 rm -f conftest*
10662 fi
10663
10664 echo "$ac_t""$ac_cv_mingw32" 1>&6
10665 MINGW32=
10666 test "$ac_cv_mingw32" = yes && MINGW32=yes
10667
10668
10669 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
10670 echo "configure:10671: checking for executable suffix" >&5
10671 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10672 echo $ac_n "(cached) $ac_c" 1>&6
10673 else
10674 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10675 ac_cv_exeext=.exe
10676 else
10677 rm -f conftest*
10678 echo 'int main () { return 0; }' > conftest.$ac_ext
10679 ac_cv_exeext=
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
10681 for file in conftest.*; do
10682 case $file in
10683 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
10684 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10685 esac
10686 done
10687 else
10688 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10689 fi
10690 rm -f conftest*
10691 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10692 fi
10693 fi
10694
10695 EXEEXT=""
10696 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10697 echo "$ac_t""${ac_cv_exeext}" 1>&6
10698 ac_exeext=$EXEEXT
10699
10700
10701
10702 cat >> confdefs.h <<\EOF
10703 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10704 EOF
10705
10706
10707
10708
10709 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10710 if test "${with_libiconv_prefix+set}" = set; then
10711 withval="$with_libiconv_prefix"
10712
10713 for dir in `echo "$withval" | tr : ' '`; do
10714 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10715 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10716 done
10717
10718 fi
10719
10720
10721 echo $ac_n "checking for iconv""... $ac_c" 1>&6
10722 echo "configure:10723: checking for iconv" >&5
10723 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10724 echo $ac_n "(cached) $ac_c" 1>&6
10725 else
10726
10727 am_cv_func_iconv="no, consider installing GNU libiconv"
10728 am_cv_lib_iconv=no
10729 cat > conftest.$ac_ext <<EOF
10730 #line 10731 "configure"
10731 #include "confdefs.h"
10732 #include <stdlib.h>
10733 #include <iconv.h>
10734 int main() {
10735 iconv_t cd = iconv_open("","");
10736 iconv(cd,NULL,NULL,NULL,NULL);
10737 iconv_close(cd);
10738 ; return 0; }
10739 EOF
10740 if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10741 rm -rf conftest*
10742 am_cv_func_iconv=yes
10743 else
10744 echo "configure: failed program was:" >&5
10745 cat conftest.$ac_ext >&5
10746 fi
10747 rm -f conftest*
10748 if test "$am_cv_func_iconv" != yes; then
10749 am_save_LIBS="$LIBS"
10750 LIBS="$LIBS -liconv"
10751 cat > conftest.$ac_ext <<EOF
10752 #line 10753 "configure"
10753 #include "confdefs.h"
10754 #include <stdlib.h>
10755 #include <iconv.h>
10756 int main() {
10757 iconv_t cd = iconv_open("","");
10758 iconv(cd,NULL,NULL,NULL,NULL);
10759 iconv_close(cd);
10760 ; return 0; }
10761 EOF
10762 if { (eval echo configure:10763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10763 rm -rf conftest*
10764 am_cv_lib_iconv=yes
10765 am_cv_func_iconv=yes
10766 else
10767 echo "configure: failed program was:" >&5
10768 cat conftest.$ac_ext >&5
10769 fi
10770 rm -f conftest*
10771 LIBS="$am_save_LIBS"
10772 fi
10773
10774 fi
10775
10776 echo "$ac_t""$am_cv_func_iconv" 1>&6
10777 if test "$am_cv_func_iconv" = yes; then
10778 cat >> confdefs.h <<\EOF
10779 #define HAVE_ICONV 1
10780 EOF
10781
10782 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
10783 echo "configure:10784: checking for iconv declaration" >&5
10784 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10785 echo $ac_n "(cached) $ac_c" 1>&6
10786 else
10787
10788 cat > conftest.$ac_ext <<EOF
10789 #line 10790 "configure"
10790 #include "confdefs.h"
10791
10792 #include <stdlib.h>
10793 #include <iconv.h>
10794 extern
10795 #ifdef __cplusplus
10796 "C"
10797 #endif
10798 #if defined(__STDC__) || defined(__cplusplus)
10799 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10800 #else
10801 size_t iconv();
10802 #endif
10803
10804 int main() {
10805
10806 ; return 0; }
10807 EOF
10808 if { (eval echo configure:10809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10809 rm -rf conftest*
10810 am_cv_proto_iconv_arg1=""
10811 else
10812 echo "configure: failed program was:" >&5
10813 cat conftest.$ac_ext >&5
10814 rm -rf conftest*
10815 am_cv_proto_iconv_arg1="const"
10816 fi
10817 rm -f conftest*
10818 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
10819 fi
10820
10821 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10822 echo "$ac_t""${ac_t:-
10823 }$am_cv_proto_iconv" 1>&6
10824 cat >> confdefs.h <<EOF
10825 #define ICONV_CONST $am_cv_proto_iconv_arg1
10826 EOF
10827
10828 fi
10829 LIBICONV=
10830 if test "$am_cv_lib_iconv" = yes; then
10831 LIBICONV="-liconv"
10832 fi
10833
10834
10835
10836 trap '' 1 2 15
10837 cat > confcache <<\EOF
10838 # This file is a shell script that caches the results of configure
10839 # tests run on this system so they can be shared between configure
10840 # scripts and configure runs. It is not useful on other systems.
10841 # If it contains results you don't want to keep, you may remove or edit it.
10842 #
10843 # By default, configure uses ./config.cache as the cache file,
10844 # creating it if it does not exist already. You can give configure
10845 # the --cache-file=FILE option to use a different cache file; that is
10846 # what configure does when it calls configure scripts in
10847 # subdirectories, so they share the cache.
10848 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10849 # config.status only pays attention to the cache file if you give it the
10850 # --recheck option to rerun configure.
10851 #
10852 EOF
10853 # The following way of writing the cache mishandles newlines in values,
10854 # but we know of no workaround that is simple, portable, and efficient.
10855 # So, don't put newlines in cache variables' values.
10856 # Ultrix sh set writes to stderr and can't be redirected directly,
10857 # and sets the high bit in the cache file unless we assign to the vars.
10858 (set) 2>&1 |
10859 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10860 *ac_space=\ *)
10861 # `set' does not quote correctly, so add quotes (double-quote substitution
10862 # turns \\\\ into \\, and sed turns \\ into \).
10863 sed -n \
10864 -e "s/'/'\\\\''/g" \
10865 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10866 ;;
10867 *)
10868 # `set' quotes correctly as required by POSIX, so do not add quotes.
10869 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10870 ;;
10871 esac >> confcache
10872 if cmp -s $cache_file confcache; then
10873 :
10874 else
10875 if test -w $cache_file; then
10876 echo "updating cache $cache_file"
10877 cat confcache > $cache_file
10878 else
10879 echo "not updating unwritable cache $cache_file"
10880 fi
10881 fi
10882 rm -f confcache
10883
10884 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10885
10886 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10887 # Let make expand exec_prefix.
10888 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10889
10890 # Any assignment to VPATH causes Sun make to only execute
10891 # the first set of double-colon rules, so remove it if not needed.
10892 # If there is a colon in the path, we need to keep it.
10893 if test "x$srcdir" = x.; then
10894 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10895 fi
10896
10897 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10898
10899 DEFS=-DHAVE_CONFIG_H
10900
10901 # Without the "./", some shells look in PATH for config.status.
10902 : ${CONFIG_STATUS=./config.status}
10903
10904 echo creating $CONFIG_STATUS
10905 rm -f $CONFIG_STATUS
10906 cat > $CONFIG_STATUS <<EOF
10907 #! /bin/sh
10908 # Generated automatically by configure.
10909 # Run this file to recreate the current configuration.
10910 # This directory was configured as follows,
10911 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10912 #
10913 # $0 $ac_configure_args
10914 #
10915 # Compiler output produced by configure, useful for debugging
10916 # configure, is in ./config.log if it exists.
10917
10918 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10919 for ac_option
10920 do
10921 case "\$ac_option" in
10922 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10923 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10924 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10925 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10926 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10927 exit 0 ;;
10928 -help | --help | --hel | --he | --h)
10929 echo "\$ac_cs_usage"; exit 0 ;;
10930 *) echo "\$ac_cs_usage"; exit 1 ;;
10931 esac
10932 done
10933
10934 ac_given_srcdir=$srcdir
10935 ac_given_INSTALL="$INSTALL"
10936
10937 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10938 EOF
10939 cat >> $CONFIG_STATUS <<EOF
10940
10941 # Protect against being on the right side of a sed subst in config.status.
10942 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10943 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10944 $ac_vpsub
10945 $extrasub
10946 s%@SHELL@%$SHELL%g
10947 s%@CFLAGS@%$CFLAGS%g
10948 s%@CPPFLAGS@%$CPPFLAGS%g
10949 s%@CXXFLAGS@%$CXXFLAGS%g
10950 s%@FFLAGS@%$FFLAGS%g
10951 s%@DEFS@%$DEFS%g
10952 s%@LDFLAGS@%$LDFLAGS%g
10953 s%@LIBS@%$LIBS%g
10954 s%@exec_prefix@%$exec_prefix%g
10955 s%@prefix@%$prefix%g
10956 s%@program_transform_name@%$program_transform_name%g
10957 s%@bindir@%$bindir%g
10958 s%@sbindir@%$sbindir%g
10959 s%@libexecdir@%$libexecdir%g
10960 s%@datadir@%$datadir%g
10961 s%@sysconfdir@%$sysconfdir%g
10962 s%@sharedstatedir@%$sharedstatedir%g
10963 s%@localstatedir@%$localstatedir%g
10964 s%@libdir@%$libdir%g
10965 s%@includedir@%$includedir%g
10966 s%@oldincludedir@%$oldincludedir%g
10967 s%@infodir@%$infodir%g
10968 s%@mandir@%$mandir%g
10969 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10970 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10971 s%@MAINT@%$MAINT%g
10972 s%@CC@%$CC%g
10973 s%@CPP@%$CPP%g
10974 s%@host@%$host%g
10975 s%@host_alias@%$host_alias%g
10976 s%@host_cpu@%$host_cpu%g
10977 s%@host_vendor@%$host_vendor%g
10978 s%@host_os@%$host_os%g
10979 s%@target@%$target%g
10980 s%@target_alias@%$target_alias%g
10981 s%@target_cpu@%$target_cpu%g
10982 s%@target_vendor@%$target_vendor%g
10983 s%@target_os@%$target_os%g
10984 s%@build@%$build%g
10985 s%@build_alias@%$build_alias%g
10986 s%@build_cpu@%$build_cpu%g
10987 s%@build_vendor@%$build_vendor%g
10988 s%@build_os@%$build_os%g
10989 s%@RANLIB@%$RANLIB%g
10990 s%@SET_MAKE@%$SET_MAKE%g
10991 s%@ALLOCA@%$ALLOCA%g
10992 s%@USE_NLS@%$USE_NLS%g
10993 s%@MSGFMT@%$MSGFMT%g
10994 s%@GMSGFMT@%$GMSGFMT%g
10995 s%@XGETTEXT@%$XGETTEXT%g
10996 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10997 s%@CATALOGS@%$CATALOGS%g
10998 s%@CATOBJEXT@%$CATOBJEXT%g
10999 s%@DATADIRNAME@%$DATADIRNAME%g
11000 s%@GMOFILES@%$GMOFILES%g
11001 s%@INSTOBJEXT@%$INSTOBJEXT%g
11002 s%@INTLDEPS@%$INTLDEPS%g
11003 s%@INTLLIBS@%$INTLLIBS%g
11004 s%@INTLOBJS@%$INTLOBJS%g
11005 s%@POFILES@%$POFILES%g
11006 s%@POSUB@%$POSUB%g
11007 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11008 s%@GT_NO@%$GT_NO%g
11009 s%@GT_YES@%$GT_YES%g
11010 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11011 s%@l@%$l%g
11012 s%@subdirs@%$subdirs%g
11013 s%@AWK@%$AWK%g
11014 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11015 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11016 s%@INSTALL_DATA@%$INSTALL_DATA%g
11017 s%@LN_S@%$LN_S%g
11018 s%@YACC@%$YACC%g
11019 s%@AR@%$AR%g
11020 s%@DLLTOOL@%$DLLTOOL%g
11021 s%@WINDRES@%$WINDRES%g
11022 s%@MIG@%$MIG%g
11023 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
11024 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11025 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
11026 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
11027 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
11028 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
11029 s%@WIN32LIBS@%$WIN32LIBS%g
11030 s%@LIBGUI@%$LIBGUI%g
11031 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
11032 s%@WIN32LDAPP@%$WIN32LDAPP%g
11033 s%@TCL_VERSION@%$TCL_VERSION%g
11034 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11035 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11036 s%@TCL_CC@%$TCL_CC%g
11037 s%@TCL_DEFS@%$TCL_DEFS%g
11038 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11039 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11040 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11041 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11042 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11043 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11044 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
11045 s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
11046 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11047 s%@TCL_RANLIB@%$TCL_RANLIB%g
11048 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11049 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11050 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11051 s%@TK_VERSION@%$TK_VERSION%g
11052 s%@TK_DEFS@%$TK_DEFS%g
11053 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11054 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11055 s%@TK_XLIBSW@%$TK_XLIBSW%g
11056 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11057 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11058 s%@TCLHDIR@%$TCLHDIR%g
11059 s%@TKHDIR@%$TKHDIR%g
11060 s%@ITCLHDIR@%$ITCLHDIR%g
11061 s%@ITKHDIR@%$ITKHDIR%g
11062 s%@ITCL_VERSION@%$ITCL_VERSION%g
11063 s%@ITCL_DEFS@%$ITCL_DEFS%g
11064 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11065 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11066 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11067 s%@ITK_VERSION@%$ITK_VERSION%g
11068 s%@ITK_DEFS@%$ITK_DEFS%g
11069 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11070 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11071 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
11072 s%@X_CFLAGS@%$X_CFLAGS%g
11073 s%@X_LDFLAGS@%$X_LDFLAGS%g
11074 s%@X_LIBS@%$X_LIBS%g
11075 s%@TCL_DEPS@%$TCL_DEPS%g
11076 s%@TK_DEPS@%$TK_DEPS%g
11077 s%@ITCLLIB@%$ITCLLIB%g
11078 s%@ITCL_DEPS@%$ITCL_DEPS%g
11079 s%@ITKLIB@%$ITKLIB%g
11080 s%@ITK_DEPS@%$ITK_DEPS%g
11081 s%@GDBTKLIBS@%$GDBTKLIBS%g
11082 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
11083 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
11084 s%@IGNORE_SIM@%$IGNORE_SIM%g
11085 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
11086 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
11087 s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
11088 s%@CONFIG_OBS@%$CONFIG_OBS%g
11089 s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
11090 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11091 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
11092 s%@CONFIG_INITS@%$CONFIG_INITS%g
11093 s%@CONFIG_ALL@%$CONFIG_ALL%g
11094 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
11095 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11096 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
11097 s%@target_subdir@%$target_subdir%g
11098 /@host_makefile_frag@/r $host_makefile_frag
11099 s%@host_makefile_frag@%%g
11100 /@target_makefile_frag@/r $target_makefile_frag
11101 s%@target_makefile_frag@%%g
11102 s%@frags@%$frags%g
11103 s%@xm_h@%$xm_h%g
11104 s%@tm_h@%$tm_h%g
11105 s%@nm_h@%$nm_h%g
11106 s%@EXEEXT@%$EXEEXT%g
11107 s%@LIBICONV@%$LIBICONV%g
11108
11109 CEOF
11110 EOF
11111
11112 cat >> $CONFIG_STATUS <<\EOF
11113
11114 # Split the substitutions into bite-sized pieces for seds with
11115 # small command number limits, like on Digital OSF/1 and HP-UX.
11116 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11117 ac_file=1 # Number of current file.
11118 ac_beg=1 # First line for current file.
11119 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11120 ac_more_lines=:
11121 ac_sed_cmds=""
11122 while $ac_more_lines; do
11123 if test $ac_beg -gt 1; then
11124 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11125 else
11126 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11127 fi
11128 if test ! -s conftest.s$ac_file; then
11129 ac_more_lines=false
11130 rm -f conftest.s$ac_file
11131 else
11132 if test -z "$ac_sed_cmds"; then
11133 ac_sed_cmds="sed -f conftest.s$ac_file"
11134 else
11135 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11136 fi
11137 ac_file=`expr $ac_file + 1`
11138 ac_beg=$ac_end
11139 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11140 fi
11141 done
11142 if test -z "$ac_sed_cmds"; then
11143 ac_sed_cmds=cat
11144 fi
11145 EOF
11146
11147 cat >> $CONFIG_STATUS <<EOF
11148
11149 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
11150 EOF
11151 cat >> $CONFIG_STATUS <<\EOF
11152 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11153 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11154 case "$ac_file" in
11155 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11156 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11157 *) ac_file_in="${ac_file}.in" ;;
11158 esac
11159
11160 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11161
11162 # Remove last slash and all that follows it. Not all systems have dirname.
11163 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11164 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11165 # The file is in a subdirectory.
11166 test ! -d "$ac_dir" && mkdir "$ac_dir"
11167 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11168 # A "../" for each directory in $ac_dir_suffix.
11169 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11170 else
11171 ac_dir_suffix= ac_dots=
11172 fi
11173
11174 case "$ac_given_srcdir" in
11175 .) srcdir=.
11176 if test -z "$ac_dots"; then top_srcdir=.
11177 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11178 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11179 *) # Relative path.
11180 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11181 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11182 esac
11183
11184 case "$ac_given_INSTALL" in
11185 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11186 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11187 esac
11188
11189 echo creating "$ac_file"
11190 rm -f "$ac_file"
11191 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11192 case "$ac_file" in
11193 *Makefile*) ac_comsub="1i\\
11194 # $configure_input" ;;
11195 *) ac_comsub= ;;
11196 esac
11197
11198 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11199 sed -e "$ac_comsub
11200 s%@configure_input@%$configure_input%g
11201 s%@srcdir@%$srcdir%g
11202 s%@top_srcdir@%$top_srcdir%g
11203 s%@INSTALL@%$INSTALL%g
11204 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11205 fi; done
11206 rm -f conftest.s*
11207
11208 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11209 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11210 #
11211 # ac_d sets the value in "#define NAME VALUE" lines.
11212 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11213 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11214 ac_dC='\3'
11215 ac_dD='%g'
11216 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11217 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11218 ac_uB='\([ ]\)%\1#\2define\3'
11219 ac_uC=' '
11220 ac_uD='\4%g'
11221 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11222 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11223 ac_eB='$%\1#\2define\3'
11224 ac_eC=' '
11225 ac_eD='%g'
11226
11227 if test "${CONFIG_HEADERS+set}" != set; then
11228 EOF
11229 cat >> $CONFIG_STATUS <<EOF
11230 CONFIG_HEADERS="config.h:config.in"
11231 EOF
11232 cat >> $CONFIG_STATUS <<\EOF
11233 fi
11234 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11235 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11236 case "$ac_file" in
11237 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11238 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11239 *) ac_file_in="${ac_file}.in" ;;
11240 esac
11241
11242 echo creating $ac_file
11243
11244 rm -f conftest.frag conftest.in conftest.out
11245 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11246 cat $ac_file_inputs > conftest.in
11247
11248 EOF
11249
11250 # Transform confdefs.h into a sed script conftest.vals that substitutes
11251 # the proper values into config.h.in to produce config.h. And first:
11252 # Protect against being on the right side of a sed subst in config.status.
11253 # Protect against being in an unquoted here document in config.status.
11254 rm -f conftest.vals
11255 cat > conftest.hdr <<\EOF
11256 s/[\\&%]/\\&/g
11257 s%[\\$`]%\\&%g
11258 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11259 s%ac_d%ac_u%gp
11260 s%ac_u%ac_e%gp
11261 EOF
11262 sed -n -f conftest.hdr confdefs.h > conftest.vals
11263 rm -f conftest.hdr
11264
11265 # This sed command replaces #undef with comments. This is necessary, for
11266 # example, in the case of _POSIX_SOURCE, which is predefined and required
11267 # on some systems where configure will not decide to define it.
11268 cat >> conftest.vals <<\EOF
11269 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11270 EOF
11271
11272 # Break up conftest.vals because some shells have a limit on
11273 # the size of here documents, and old seds have small limits too.
11274
11275 rm -f conftest.tail
11276 while :
11277 do
11278 ac_lines=`grep -c . conftest.vals`
11279 # grep -c gives empty output for an empty file on some AIX systems.
11280 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11281 # Write a limited-size here document to conftest.frag.
11282 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11283 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11284 echo 'CEOF
11285 sed -f conftest.frag conftest.in > conftest.out
11286 rm -f conftest.in
11287 mv conftest.out conftest.in
11288 ' >> $CONFIG_STATUS
11289 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11290 rm -f conftest.vals
11291 mv conftest.tail conftest.vals
11292 done
11293 rm -f conftest.vals
11294
11295 cat >> $CONFIG_STATUS <<\EOF
11296 rm -f conftest.frag conftest.h
11297 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11298 cat conftest.in >> conftest.h
11299 rm -f conftest.in
11300 if cmp -s $ac_file conftest.h 2>/dev/null; then
11301 echo "$ac_file is unchanged"
11302 rm -f conftest.h
11303 else
11304 # Remove last slash and all that follows it. Not all systems have dirname.
11305 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11306 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11307 # The file is in a subdirectory.
11308 test ! -d "$ac_dir" && mkdir "$ac_dir"
11309 fi
11310 rm -f $ac_file
11311 mv conftest.h $ac_file
11312 fi
11313 fi; done
11314
11315 EOF
11316
11317 cat >> $CONFIG_STATUS <<EOF
11318 ac_sources="$files"
11319 ac_dests="$links"
11320 EOF
11321
11322 cat >> $CONFIG_STATUS <<\EOF
11323 srcdir=$ac_given_srcdir
11324 while test -n "$ac_sources"; do
11325 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11326 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11327
11328 echo "linking $srcdir/$ac_source to $ac_dest"
11329
11330 if test ! -r $srcdir/$ac_source; then
11331 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11332 fi
11333 rm -f $ac_dest
11334
11335 # Make relative symlinks.
11336 # Remove last slash and all that follows it. Not all systems have dirname.
11337 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11338 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11339 # The dest file is in a subdirectory.
11340 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11341 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11342 # A "../" for each directory in $ac_dest_dir_suffix.
11343 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11344 else
11345 ac_dest_dir_suffix= ac_dots=
11346 fi
11347
11348 case "$srcdir" in
11349 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11350 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11351 esac
11352
11353 # Make a symlink if possible; otherwise try a hard link.
11354 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11355 ln $srcdir/$ac_source $ac_dest; then :
11356 else
11357 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11358 fi
11359 done
11360 EOF
11361 cat >> $CONFIG_STATUS <<EOF
11362
11363 gdb_host_cpu=$gdb_host_cpu
11364 gdb_target_cpu=$gdb_target_cpu
11365 nativefile=$nativefile
11366
11367 EOF
11368 cat >> $CONFIG_STATUS <<\EOF
11369
11370 if test "${nativefile}" = ""; then
11371 < Makefile \
11372 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11373 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
11374 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11375 > Makefile.tem
11376 mv -f Makefile.tem Makefile
11377 fi
11378
11379 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11380 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11381 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11382 mv -f Makefile.tmp Makefile
11383
11384
11385 case x$CONFIG_HEADERS in
11386 xconfig.h:config.in)
11387 echo > stamp-h ;;
11388 esac
11389
11390 exit 0
11391 EOF
11392 chmod +x $CONFIG_STATUS
11393 rm -fr confdefs* $ac_clean_files
11394 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11395
11396 if test "$no_recursion" != yes; then
11397
11398 # Remove --cache-file and --srcdir arguments so they do not pile up.
11399 ac_sub_configure_args=
11400 ac_prev=
11401 for ac_arg in $ac_configure_args; do
11402 if test -n "$ac_prev"; then
11403 ac_prev=
11404 continue
11405 fi
11406 case "$ac_arg" in
11407 -cache-file | --cache-file | --cache-fil | --cache-fi \
11408 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11409 ac_prev=cache_file ;;
11410 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11411 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11412 ;;
11413 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11414 ac_prev=srcdir ;;
11415 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11416 ;;
11417 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11418 esac
11419 done
11420
11421 for ac_config_dir in doc testsuite $configdirs; do
11422
11423 # Do not complain, so a configure script can configure whichever
11424 # parts of a large source tree are present.
11425 if test ! -d $srcdir/$ac_config_dir; then
11426 continue
11427 fi
11428
11429 echo configuring in $ac_config_dir
11430
11431 case "$srcdir" in
11432 .) ;;
11433 *)
11434 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11435 else
11436 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11437 fi
11438 ;;
11439 esac
11440
11441 ac_popdir=`pwd`
11442 cd $ac_config_dir
11443
11444 # A "../" for each directory in /$ac_config_dir.
11445 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11446
11447 case "$srcdir" in
11448 .) # No --srcdir option. We are building in place.
11449 ac_sub_srcdir=$srcdir ;;
11450 /*) # Absolute path.
11451 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11452 *) # Relative path.
11453 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11454 esac
11455
11456 # Check for guested configure; otherwise get Cygnus style configure.
11457 if test -f $ac_sub_srcdir/configure; then
11458 ac_sub_configure=$ac_sub_srcdir/configure
11459 elif test -f $ac_sub_srcdir/configure.in; then
11460 ac_sub_configure=$ac_configure
11461 else
11462 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11463 ac_sub_configure=
11464 fi
11465
11466 # The recursion is here.
11467 if test -n "$ac_sub_configure"; then
11468
11469 # Make the cache file name correct relative to the subdirectory.
11470 case "$cache_file" in
11471 /*) ac_sub_cache_file=$cache_file ;;
11472 *) # Relative path.
11473 ac_sub_cache_file="$ac_dots$cache_file" ;;
11474 esac
11475 case "$ac_given_INSTALL" in
11476 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11477 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11478 esac
11479
11480 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11481 # The eval makes quoting arguments work.
11482 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11483 then :
11484 else
11485 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11486 fi
11487 fi
11488
11489 cd $ac_popdir
11490 done
11491 fi
11492
11493
11494 exit 0
This page took 0.326028 seconds and 4 git commands to generate.