2004-02-07 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_DEPS=
2929 CONFIG_SRCS=
2930 ENABLE_CFLAGS=
2931 CONFIG_ALL=
2932 CONFIG_CLEAN=
2933 CONFIG_INSTALL=
2934 CONFIG_UNINSTALL=
2935
2936 subdirs="doc testsuite"
2937
2938 configdirs=
2939
2940 . $srcdir/configure.host
2941
2942 . $srcdir/configure.tgt
2943
2944 # Fetch the default architecture and default target vector from BFD.
2945 targ=$target; . $srcdir/../bfd/config.bfd
2946
2947 # We only want the first architecture, so strip off the others if
2948 # there is more than one.
2949 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2950
2951 if test "x$targ_archs" != x; then
2952 cat >> confdefs.h <<EOF
2953 #define DEFAULT_BFD_ARCH $targ_archs
2954 EOF
2955
2956 fi
2957 if test "x$targ_defvec" != x; then
2958 cat >> confdefs.h <<EOF
2959 #define DEFAULT_BFD_VEC $targ_defvec
2960 EOF
2961
2962 fi
2963
2964 if test "$program_transform_name" = s,x,x,; then
2965 program_transform_name=
2966 else
2967 # Double any \ or $. echo might interpret backslashes.
2968 cat <<\EOF_SED > conftestsed
2969 s,\\,\\\\,g; s,\$,$$,g
2970 EOF_SED
2971 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2972 rm -f conftestsed
2973 fi
2974 test "$program_prefix" != NONE &&
2975 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2976 # Use a double $ so make ignores it.
2977 test "$program_suffix" != NONE &&
2978 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2979
2980 # sed with no file args requires a program.
2981 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2982
2983
2984 # The CLI cannot be disabled yet, but may be in the future.
2985
2986 # Enable CLI.
2987 # Check whether --enable-gdbcli or --disable-gdbcli was given.
2988 if test "${enable_gdbcli+set}" = set; then
2989 enableval="$enable_gdbcli"
2990 case $enableval in
2991 yes)
2992 ;;
2993 no)
2994 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2995 *)
2996 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2997 esac
2998 else
2999 enable_gdbcli=yes
3000 fi
3001
3002 if test x"$enable_gdbcli" = xyes; then
3003 if test -d $srcdir/cli; then
3004 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3005 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3006 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3007 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3008 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3009 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3010 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3011 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3012 fi
3013 fi
3014
3015 # Enable MI.
3016 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3017 if test "${enable_gdbmi+set}" = set; then
3018 enableval="$enable_gdbmi"
3019 case $enableval in
3020 yes | no)
3021 ;;
3022 *)
3023 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3024 esac
3025 else
3026 enable_gdbmi=yes
3027 fi
3028
3029 if test x"$enable_gdbmi" = xyes; then
3030 if test -d $srcdir/mi; then
3031 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3032 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3033 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3034 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3035 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3036 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3037 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3038 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3039 fi
3040 fi
3041
3042 # Enable TUI.
3043 # Check whether --enable-tui or --disable-tui was given.
3044 if test "${enable_tui+set}" = set; then
3045 enableval="$enable_tui"
3046 case $enableval in
3047 yes | no)
3048 ;;
3049 *)
3050 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3051 esac
3052 fi
3053
3054 if test x"$enable_tui" = xyes; then
3055 if test -d $srcdir/tui; then
3056 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3057 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3058 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3059 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3060 CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3061 CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3062 CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3063 CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3064 need_curses=yes
3065 fi
3066 fi
3067
3068 # Enable gdbtk.
3069 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3070 if test "${enable_gdbtk+set}" = set; then
3071 enableval="$enable_gdbtk"
3072 case $enableval in
3073 yes | no)
3074 ;;
3075 *)
3076 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3077 esac
3078 else
3079 if test -d $srcdir/gdbtk; then
3080 enable_gdbtk=yes
3081 else
3082 enable_gdbtk=no
3083 fi
3084 fi
3085
3086 # We unconditionally disable gdbtk tests on selected platforms.
3087 case $host_os in
3088 go32* | windows*)
3089 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3090 enable_gdbtk=no ;;
3091 esac
3092
3093 # Libunwind support.
3094 # Check whether --with-libunwind or --without-libunwind was given.
3095 if test "${with_libunwind+set}" = set; then
3096 withval="$with_libunwind"
3097 case "${withval}" in
3098 yes) enable_libunwind=yes ;;
3099 no) enable_libunwind=no ;;
3100 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3101 esac
3102 else
3103
3104 for ac_hdr in libunwind.h
3105 do
3106 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3107 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3108 echo "configure:3109: checking for $ac_hdr" >&5
3109 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3110 echo $ac_n "(cached) $ac_c" 1>&6
3111 else
3112 cat > conftest.$ac_ext <<EOF
3113 #line 3114 "configure"
3114 #include "confdefs.h"
3115 #include <$ac_hdr>
3116 EOF
3117 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3118 { (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3119 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3120 if test -z "$ac_err"; then
3121 rm -rf conftest*
3122 eval "ac_cv_header_$ac_safe=yes"
3123 else
3124 echo "$ac_err" >&5
3125 echo "configure: failed program was:" >&5
3126 cat conftest.$ac_ext >&5
3127 rm -rf conftest*
3128 eval "ac_cv_header_$ac_safe=no"
3129 fi
3130 rm -f conftest*
3131 fi
3132 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3133 echo "$ac_t""yes" 1>&6
3134 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3135 cat >> confdefs.h <<EOF
3136 #define $ac_tr_hdr 1
3137 EOF
3138
3139 else
3140 echo "$ac_t""no" 1>&6
3141 fi
3142 done
3143
3144 for ac_hdr in libunwind-ia64.h
3145 do
3146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3148 echo "configure:3149: checking for $ac_hdr" >&5
3149 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3150 echo $ac_n "(cached) $ac_c" 1>&6
3151 else
3152 cat > conftest.$ac_ext <<EOF
3153 #line 3154 "configure"
3154 #include "confdefs.h"
3155 #include <$ac_hdr>
3156 EOF
3157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3158 { (eval echo configure:3159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3160 if test -z "$ac_err"; then
3161 rm -rf conftest*
3162 eval "ac_cv_header_$ac_safe=yes"
3163 else
3164 echo "$ac_err" >&5
3165 echo "configure: failed program was:" >&5
3166 cat conftest.$ac_ext >&5
3167 rm -rf conftest*
3168 eval "ac_cv_header_$ac_safe=no"
3169 fi
3170 rm -f conftest*
3171 fi
3172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3173 echo "$ac_t""yes" 1>&6
3174 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3175 cat >> confdefs.h <<EOF
3176 #define $ac_tr_hdr 1
3177 EOF
3178
3179 else
3180 echo "$ac_t""no" 1>&6
3181 fi
3182 done
3183
3184 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3185 enable_libunwind=yes;
3186 fi
3187
3188 fi
3189
3190
3191 if test x"$enable_libunwind" = xyes; then
3192 for ac_hdr in libunwind.h
3193 do
3194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3196 echo "configure:3197: checking for $ac_hdr" >&5
3197 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3198 echo $ac_n "(cached) $ac_c" 1>&6
3199 else
3200 cat > conftest.$ac_ext <<EOF
3201 #line 3202 "configure"
3202 #include "confdefs.h"
3203 #include <$ac_hdr>
3204 EOF
3205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3206 { (eval echo configure:3207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3208 if test -z "$ac_err"; then
3209 rm -rf conftest*
3210 eval "ac_cv_header_$ac_safe=yes"
3211 else
3212 echo "$ac_err" >&5
3213 echo "configure: failed program was:" >&5
3214 cat conftest.$ac_ext >&5
3215 rm -rf conftest*
3216 eval "ac_cv_header_$ac_safe=no"
3217 fi
3218 rm -f conftest*
3219 fi
3220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3221 echo "$ac_t""yes" 1>&6
3222 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3223 cat >> confdefs.h <<EOF
3224 #define $ac_tr_hdr 1
3225 EOF
3226
3227 else
3228 echo "$ac_t""no" 1>&6
3229 fi
3230 done
3231
3232 for ac_hdr in libunwind-ia64.h
3233 do
3234 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3235 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3236 echo "configure:3237: checking for $ac_hdr" >&5
3237 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3238 echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 #include <$ac_hdr>
3244 EOF
3245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3246 { (eval echo configure:3247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3248 if test -z "$ac_err"; then
3249 rm -rf conftest*
3250 eval "ac_cv_header_$ac_safe=yes"
3251 else
3252 echo "$ac_err" >&5
3253 echo "configure: failed program was:" >&5
3254 cat conftest.$ac_ext >&5
3255 rm -rf conftest*
3256 eval "ac_cv_header_$ac_safe=no"
3257 fi
3258 rm -f conftest*
3259 fi
3260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3261 echo "$ac_t""yes" 1>&6
3262 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3263 cat >> confdefs.h <<EOF
3264 #define $ac_tr_hdr 1
3265 EOF
3266
3267 else
3268 echo "$ac_t""no" 1>&6
3269 fi
3270 done
3271
3272 cat >> confdefs.h <<\EOF
3273 #define HAVE_LIBUNWIND 1
3274 EOF
3275
3276 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3277 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3278 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3279 fi
3280
3281 # Profiling support.
3282 # Check whether --enable-profiling or --disable-profiling was given.
3283 if test "${enable_profiling+set}" = set; then
3284 enableval="$enable_profiling"
3285 case $enableval in
3286 yes | no)
3287 ;;
3288 *)
3289 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3290 esac
3291 else
3292 enable_profiling=no
3293 fi
3294
3295
3296 for ac_func in monstartup _mcleanup
3297 do
3298 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3299 echo "configure:3300: checking for $ac_func" >&5
3300 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3301 echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303 cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306 /* System header to define __stub macros and hopefully few prototypes,
3307 which can conflict with char $ac_func(); below. */
3308 #include <assert.h>
3309 /* Override any gcc2 internal prototype to avoid an error. */
3310 /* We use char because int might match the return type of a gcc2
3311 builtin and then its argument prototype would still apply. */
3312 char $ac_func();
3313
3314 int main() {
3315
3316 /* The GNU C library defines this for functions which it implements
3317 to always fail with ENOSYS. Some functions are actually named
3318 something starting with __ and the normal name is an alias. */
3319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3320 choke me
3321 #else
3322 $ac_func();
3323 #endif
3324
3325 ; return 0; }
3326 EOF
3327 if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3328 rm -rf conftest*
3329 eval "ac_cv_func_$ac_func=yes"
3330 else
3331 echo "configure: failed program was:" >&5
3332 cat conftest.$ac_ext >&5
3333 rm -rf conftest*
3334 eval "ac_cv_func_$ac_func=no"
3335 fi
3336 rm -f conftest*
3337 fi
3338
3339 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3340 echo "$ac_t""yes" 1>&6
3341 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3342 cat >> confdefs.h <<EOF
3343 #define $ac_tr_func 1
3344 EOF
3345
3346 else
3347 echo "$ac_t""no" 1>&6
3348 fi
3349 done
3350
3351 echo $ac_n "checking for _etext""... $ac_c" 1>&6
3352 echo "configure:3353: checking for _etext" >&5
3353 if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3354 echo $ac_n "(cached) $ac_c" 1>&6
3355 else
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 #include <stdlib.h>
3360 extern char _etext;
3361
3362 int main() {
3363 free (&_etext);
3364 ; return 0; }
3365 EOF
3366 if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3367 rm -rf conftest*
3368 ac_cv_var__etext=yes
3369 else
3370 echo "configure: failed program was:" >&5
3371 cat conftest.$ac_ext >&5
3372 rm -rf conftest*
3373 ac_cv_var__etext=no
3374 fi
3375 rm -f conftest*
3376 fi
3377
3378 echo "$ac_t""$ac_cv_var__etext" 1>&6
3379 if test $ac_cv_var__etext = yes; then
3380 cat >> confdefs.h <<\EOF
3381 #define HAVE__ETEXT 1
3382 EOF
3383
3384 fi
3385 if test "$enable_profiling" = yes ; then
3386 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3387 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3388 fi
3389 PROFILE_CFLAGS=-pg
3390 OLD_CFLAGS="$CFLAGS"
3391 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3392
3393 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3394 echo "configure:3395: checking whether $CC supports -pg" >&5
3395 if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
3396 echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401
3402 int main() {
3403 int x;
3404 ; return 0; }
3405 EOF
3406 if { (eval echo configure:3407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3407 rm -rf conftest*
3408 ac_cv_cc_supports_pg=yes
3409 else
3410 echo "configure: failed program was:" >&5
3411 cat conftest.$ac_ext >&5
3412 rm -rf conftest*
3413 ac_cv_cc_supports_pg=no
3414 fi
3415 rm -f conftest*
3416 fi
3417
3418 echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
3419
3420 if test $ac_cv_cc_supports_pg = no; then
3421 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3422 fi
3423
3424 CFLAGS="$OLD_CFLAGS"
3425 fi
3426
3427 # --------------------- #
3428 # Checks for programs. #
3429 # --------------------- #
3430
3431 for ac_prog in mawk gawk nawk awk
3432 do
3433 # Extract the first word of "$ac_prog", so it can be a program name with args.
3434 set dummy $ac_prog; ac_word=$2
3435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3436 echo "configure:3437: checking for $ac_word" >&5
3437 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3438 echo $ac_n "(cached) $ac_c" 1>&6
3439 else
3440 if test -n "$AWK"; then
3441 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3442 else
3443 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3444 ac_dummy="$PATH"
3445 for ac_dir in $ac_dummy; do
3446 test -z "$ac_dir" && ac_dir=.
3447 if test -f $ac_dir/$ac_word; then
3448 ac_cv_prog_AWK="$ac_prog"
3449 break
3450 fi
3451 done
3452 IFS="$ac_save_ifs"
3453 fi
3454 fi
3455 AWK="$ac_cv_prog_AWK"
3456 if test -n "$AWK"; then
3457 echo "$ac_t""$AWK" 1>&6
3458 else
3459 echo "$ac_t""no" 1>&6
3460 fi
3461
3462 test -n "$AWK" && break
3463 done
3464
3465 # Find a good install program. We prefer a C program (faster),
3466 # so one script is as good as another. But avoid the broken or
3467 # incompatible versions:
3468 # SysV /etc/install, /usr/sbin/install
3469 # SunOS /usr/etc/install
3470 # IRIX /sbin/install
3471 # AIX /bin/install
3472 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3473 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3474 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3475 # ./install, which can be erroneously created by make from ./install.sh.
3476 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3477 echo "configure:3478: checking for a BSD compatible install" >&5
3478 if test -z "$INSTALL"; then
3479 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
3481 else
3482 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3483 for ac_dir in $PATH; do
3484 # Account for people who put trailing slashes in PATH elements.
3485 case "$ac_dir/" in
3486 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3487 *)
3488 # OSF1 and SCO ODT 3.0 have their own names for install.
3489 # Don't use installbsd from OSF since it installs stuff as root
3490 # by default.
3491 for ac_prog in ginstall scoinst install; do
3492 if test -f $ac_dir/$ac_prog; then
3493 if test $ac_prog = install &&
3494 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3495 # AIX install. It has an incompatible calling convention.
3496 :
3497 else
3498 ac_cv_path_install="$ac_dir/$ac_prog -c"
3499 break 2
3500 fi
3501 fi
3502 done
3503 ;;
3504 esac
3505 done
3506 IFS="$ac_save_IFS"
3507
3508 fi
3509 if test "${ac_cv_path_install+set}" = set; then
3510 INSTALL="$ac_cv_path_install"
3511 else
3512 # As a last resort, use the slow shell script. We don't cache a
3513 # path for INSTALL within a source directory, because that will
3514 # break other packages using the cache if that directory is
3515 # removed, or if the path is relative.
3516 INSTALL="$ac_install_sh"
3517 fi
3518 fi
3519 echo "$ac_t""$INSTALL" 1>&6
3520
3521 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3522 # It thinks the first close brace ends the variable substitution.
3523 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3524
3525 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3526
3527 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3528
3529 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3530 echo "configure:3531: checking whether ln -s works" >&5
3531 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3532 echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534 rm -f conftestdata
3535 if ln -s X conftestdata 2>/dev/null
3536 then
3537 rm -f conftestdata
3538 ac_cv_prog_LN_S="ln -s"
3539 else
3540 ac_cv_prog_LN_S=ln
3541 fi
3542 fi
3543 LN_S="$ac_cv_prog_LN_S"
3544 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3545 echo "$ac_t""yes" 1>&6
3546 else
3547 echo "$ac_t""no" 1>&6
3548 fi
3549
3550 # Extract the first word of "ranlib", so it can be a program name with args.
3551 set dummy ranlib; ac_word=$2
3552 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3553 echo "configure:3554: checking for $ac_word" >&5
3554 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3555 echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557 if test -n "$RANLIB"; then
3558 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3559 else
3560 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3561 ac_dummy="$PATH"
3562 for ac_dir in $ac_dummy; do
3563 test -z "$ac_dir" && ac_dir=.
3564 if test -f $ac_dir/$ac_word; then
3565 ac_cv_prog_RANLIB="ranlib"
3566 break
3567 fi
3568 done
3569 IFS="$ac_save_ifs"
3570 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3571 fi
3572 fi
3573 RANLIB="$ac_cv_prog_RANLIB"
3574 if test -n "$RANLIB"; then
3575 echo "$ac_t""$RANLIB" 1>&6
3576 else
3577 echo "$ac_t""no" 1>&6
3578 fi
3579
3580 for ac_prog in 'bison -y' byacc
3581 do
3582 # Extract the first word of "$ac_prog", so it can be a program name with args.
3583 set dummy $ac_prog; ac_word=$2
3584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3585 echo "configure:3586: checking for $ac_word" >&5
3586 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3587 echo $ac_n "(cached) $ac_c" 1>&6
3588 else
3589 if test -n "$YACC"; then
3590 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3591 else
3592 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3593 ac_dummy="$PATH"
3594 for ac_dir in $ac_dummy; do
3595 test -z "$ac_dir" && ac_dir=.
3596 if test -f $ac_dir/$ac_word; then
3597 ac_cv_prog_YACC="$ac_prog"
3598 break
3599 fi
3600 done
3601 IFS="$ac_save_ifs"
3602 fi
3603 fi
3604 YACC="$ac_cv_prog_YACC"
3605 if test -n "$YACC"; then
3606 echo "$ac_t""$YACC" 1>&6
3607 else
3608 echo "$ac_t""no" 1>&6
3609 fi
3610
3611 test -n "$YACC" && break
3612 done
3613 test -n "$YACC" || YACC="yacc"
3614
3615
3616 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3617 set dummy ${ac_tool_prefix}ar; ac_word=$2
3618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3619 echo "configure:3620: checking for $ac_word" >&5
3620 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3621 echo $ac_n "(cached) $ac_c" 1>&6
3622 else
3623 if test -n "$AR"; then
3624 ac_cv_prog_AR="$AR" # Let the user override the test.
3625 else
3626 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3627 ac_dummy="$PATH"
3628 for ac_dir in $ac_dummy; do
3629 test -z "$ac_dir" && ac_dir=.
3630 if test -f $ac_dir/$ac_word; then
3631 ac_cv_prog_AR="${ac_tool_prefix}ar"
3632 break
3633 fi
3634 done
3635 IFS="$ac_save_ifs"
3636 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3637 fi
3638 fi
3639 AR="$ac_cv_prog_AR"
3640 if test -n "$AR"; then
3641 echo "$ac_t""$AR" 1>&6
3642 else
3643 echo "$ac_t""no" 1>&6
3644 fi
3645
3646
3647
3648 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3649 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3651 echo "configure:3652: checking for $ac_word" >&5
3652 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3653 echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655 if test -n "$DLLTOOL"; then
3656 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3657 else
3658 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661 test -z "$ac_dir" && ac_dir=.
3662 if test -f $ac_dir/$ac_word; then
3663 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3664 break
3665 fi
3666 done
3667 IFS="$ac_save_ifs"
3668 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3669 fi
3670 fi
3671 DLLTOOL="$ac_cv_prog_DLLTOOL"
3672 if test -n "$DLLTOOL"; then
3673 echo "$ac_t""$DLLTOOL" 1>&6
3674 else
3675 echo "$ac_t""no" 1>&6
3676 fi
3677
3678
3679
3680 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3681 set dummy ${ac_tool_prefix}windres; ac_word=$2
3682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3683 echo "configure:3684: checking for $ac_word" >&5
3684 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3685 echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687 if test -n "$WINDRES"; then
3688 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3689 else
3690 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3691 ac_dummy="$PATH"
3692 for ac_dir in $ac_dummy; do
3693 test -z "$ac_dir" && ac_dir=.
3694 if test -f $ac_dir/$ac_word; then
3695 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3696 break
3697 fi
3698 done
3699 IFS="$ac_save_ifs"
3700 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3701 fi
3702 fi
3703 WINDRES="$ac_cv_prog_WINDRES"
3704 if test -n "$WINDRES"; then
3705 echo "$ac_t""$WINDRES" 1>&6
3706 else
3707 echo "$ac_t""no" 1>&6
3708 fi
3709
3710
3711
3712
3713 # Needed for GNU/Hurd.
3714 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3715 set dummy ${ac_tool_prefix}mig; ac_word=$2
3716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3717 echo "configure:3718: checking for $ac_word" >&5
3718 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
3720 else
3721 if test -n "$MIG"; then
3722 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3723 else
3724 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3725 ac_dummy="$PATH"
3726 for ac_dir in $ac_dummy; do
3727 test -z "$ac_dir" && ac_dir=.
3728 if test -f $ac_dir/$ac_word; then
3729 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3730 break
3731 fi
3732 done
3733 IFS="$ac_save_ifs"
3734 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3735 fi
3736 fi
3737 MIG="$ac_cv_prog_MIG"
3738 if test -n "$MIG"; then
3739 echo "$ac_t""$MIG" 1>&6
3740 else
3741 echo "$ac_t""no" 1>&6
3742 fi
3743
3744
3745
3746
3747 # ---------------------- #
3748 # Checks for libraries. #
3749 # ---------------------- #
3750
3751 # We might need to link with -lm; most simulators need it.
3752 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3753 echo "configure:3754: checking for main in -lm" >&5
3754 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3756 echo $ac_n "(cached) $ac_c" 1>&6
3757 else
3758 ac_save_LIBS="$LIBS"
3759 LIBS="-lm $LIBS"
3760 cat > conftest.$ac_ext <<EOF
3761 #line 3762 "configure"
3762 #include "confdefs.h"
3763
3764 int main() {
3765 main()
3766 ; return 0; }
3767 EOF
3768 if { (eval echo configure:3769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3769 rm -rf conftest*
3770 eval "ac_cv_lib_$ac_lib_var=yes"
3771 else
3772 echo "configure: failed program was:" >&5
3773 cat conftest.$ac_ext >&5
3774 rm -rf conftest*
3775 eval "ac_cv_lib_$ac_lib_var=no"
3776 fi
3777 rm -f conftest*
3778 LIBS="$ac_save_LIBS"
3779
3780 fi
3781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3782 echo "$ac_t""yes" 1>&6
3783 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3784 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3785 cat >> confdefs.h <<EOF
3786 #define $ac_tr_lib 1
3787 EOF
3788
3789 LIBS="-lm $LIBS"
3790
3791 else
3792 echo "$ac_t""no" 1>&6
3793 fi
3794
3795
3796 # We need to link with -lw to get `wctype' on Solaris before Solaris
3797 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3798 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3799 # is known to have this problem). Therefore we avoid libw if we can.
3800 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3801 echo "configure:3802: checking for wctype" >&5
3802 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3803 echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808 /* System header to define __stub macros and hopefully few prototypes,
3809 which can conflict with char wctype(); below. */
3810 #include <assert.h>
3811 /* Override any gcc2 internal prototype to avoid an error. */
3812 /* We use char because int might match the return type of a gcc2
3813 builtin and then its argument prototype would still apply. */
3814 char wctype();
3815
3816 int main() {
3817
3818 /* The GNU C library defines this for functions which it implements
3819 to always fail with ENOSYS. Some functions are actually named
3820 something starting with __ and the normal name is an alias. */
3821 #if defined (__stub_wctype) || defined (__stub___wctype)
3822 choke me
3823 #else
3824 wctype();
3825 #endif
3826
3827 ; return 0; }
3828 EOF
3829 if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3830 rm -rf conftest*
3831 eval "ac_cv_func_wctype=yes"
3832 else
3833 echo "configure: failed program was:" >&5
3834 cat conftest.$ac_ext >&5
3835 rm -rf conftest*
3836 eval "ac_cv_func_wctype=no"
3837 fi
3838 rm -f conftest*
3839 fi
3840
3841 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3842 echo "$ac_t""yes" 1>&6
3843 :
3844 else
3845 echo "$ac_t""no" 1>&6
3846 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3847 echo "configure:3848: checking for wctype in -lw" >&5
3848 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3850 echo $ac_n "(cached) $ac_c" 1>&6
3851 else
3852 ac_save_LIBS="$LIBS"
3853 LIBS="-lw $LIBS"
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 /* Override any gcc2 internal prototype to avoid an error. */
3858 /* We use char because int might match the return type of a gcc2
3859 builtin and then its argument prototype would still apply. */
3860 char wctype();
3861
3862 int main() {
3863 wctype()
3864 ; return 0; }
3865 EOF
3866 if { (eval echo configure:3867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3867 rm -rf conftest*
3868 eval "ac_cv_lib_$ac_lib_var=yes"
3869 else
3870 echo "configure: failed program was:" >&5
3871 cat conftest.$ac_ext >&5
3872 rm -rf conftest*
3873 eval "ac_cv_lib_$ac_lib_var=no"
3874 fi
3875 rm -f conftest*
3876 LIBS="$ac_save_LIBS"
3877
3878 fi
3879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3880 echo "$ac_t""yes" 1>&6
3881 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3882 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3883 cat >> confdefs.h <<EOF
3884 #define $ac_tr_lib 1
3885 EOF
3886
3887 LIBS="-lw $LIBS"
3888
3889 else
3890 echo "$ac_t""no" 1>&6
3891 fi
3892
3893 fi
3894
3895
3896 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3897
3898 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3899 echo "configure:3900: checking for library containing gethostbyname" >&5
3900 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3901 echo $ac_n "(cached) $ac_c" 1>&6
3902 else
3903 ac_func_search_save_LIBS="$LIBS"
3904 ac_cv_search_gethostbyname="no"
3905 cat > conftest.$ac_ext <<EOF
3906 #line 3907 "configure"
3907 #include "confdefs.h"
3908 /* Override any gcc2 internal prototype to avoid an error. */
3909 /* We use char because int might match the return type of a gcc2
3910 builtin and then its argument prototype would still apply. */
3911 char gethostbyname();
3912
3913 int main() {
3914 gethostbyname()
3915 ; return 0; }
3916 EOF
3917 if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3918 rm -rf conftest*
3919 ac_cv_search_gethostbyname="none required"
3920 else
3921 echo "configure: failed program was:" >&5
3922 cat conftest.$ac_ext >&5
3923 fi
3924 rm -f conftest*
3925 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3926 LIBS="-l$i $ac_func_search_save_LIBS"
3927 cat > conftest.$ac_ext <<EOF
3928 #line 3929 "configure"
3929 #include "confdefs.h"
3930 /* Override any gcc2 internal prototype to avoid an error. */
3931 /* We use char because int might match the return type of a gcc2
3932 builtin and then its argument prototype would still apply. */
3933 char gethostbyname();
3934
3935 int main() {
3936 gethostbyname()
3937 ; return 0; }
3938 EOF
3939 if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3940 rm -rf conftest*
3941 ac_cv_search_gethostbyname="-l$i"
3942 break
3943 else
3944 echo "configure: failed program was:" >&5
3945 cat conftest.$ac_ext >&5
3946 fi
3947 rm -f conftest*
3948 done
3949 LIBS="$ac_func_search_save_LIBS"
3950 fi
3951
3952 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3953 if test "$ac_cv_search_gethostbyname" != "no"; then
3954 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3955
3956 else :
3957
3958 fi
3959
3960 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
3961
3962 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
3963 echo "configure:3964: checking for library containing socketpair" >&5
3964 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3965 echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967 ac_func_search_save_LIBS="$LIBS"
3968 ac_cv_search_socketpair="no"
3969 cat > conftest.$ac_ext <<EOF
3970 #line 3971 "configure"
3971 #include "confdefs.h"
3972 /* Override any gcc2 internal prototype to avoid an error. */
3973 /* We use char because int might match the return type of a gcc2
3974 builtin and then its argument prototype would still apply. */
3975 char socketpair();
3976
3977 int main() {
3978 socketpair()
3979 ; return 0; }
3980 EOF
3981 if { (eval echo configure:3982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982 rm -rf conftest*
3983 ac_cv_search_socketpair="none required"
3984 else
3985 echo "configure: failed program was:" >&5
3986 cat conftest.$ac_ext >&5
3987 fi
3988 rm -f conftest*
3989 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3990 LIBS="-l$i $ac_func_search_save_LIBS"
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 /* Override any gcc2 internal prototype to avoid an error. */
3995 /* We use char because int might match the return type of a gcc2
3996 builtin and then its argument prototype would still apply. */
3997 char socketpair();
3998
3999 int main() {
4000 socketpair()
4001 ; return 0; }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4004 rm -rf conftest*
4005 ac_cv_search_socketpair="-l$i"
4006 break
4007 else
4008 echo "configure: failed program was:" >&5
4009 cat conftest.$ac_ext >&5
4010 fi
4011 rm -f conftest*
4012 done
4013 LIBS="$ac_func_search_save_LIBS"
4014 fi
4015
4016 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4017 if test "$ac_cv_search_socketpair" != "no"; then
4018 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4019
4020 else :
4021
4022 fi
4023
4024 # Since GDB uses Readline, we need termcap functionality, so we need
4025 # to find a library that provides that. When GDB is configured with
4026 # --enable-tui, we need full curses functionality.
4027 #
4028 # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4029 # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4030 # Makefile fragments. That's why we need to have `Hcurses' before
4031 # `curses'. I don't see why we should use HP curses if a more
4032 # standard curses is available, except that according to HP's
4033 # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4034 # HP-UX 10.10 and 10.20.
4035
4036 if test "$need_curses" = yes; then
4037
4038 echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4039 echo "configure:4040: checking for library containing initscr" >&5
4040 if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4041 echo $ac_n "(cached) $ac_c" 1>&6
4042 else
4043 ac_func_search_save_LIBS="$LIBS"
4044 ac_cv_search_initscr="no"
4045 cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 /* Override any gcc2 internal prototype to avoid an error. */
4049 /* We use char because int might match the return type of a gcc2
4050 builtin and then its argument prototype would still apply. */
4051 char initscr();
4052
4053 int main() {
4054 initscr()
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4058 rm -rf conftest*
4059 ac_cv_search_initscr="none required"
4060 else
4061 echo "configure: failed program was:" >&5
4062 cat conftest.$ac_ext >&5
4063 fi
4064 rm -f conftest*
4065 test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
4066 LIBS="-l$i $ac_func_search_save_LIBS"
4067 cat > conftest.$ac_ext <<EOF
4068 #line 4069 "configure"
4069 #include "confdefs.h"
4070 /* Override any gcc2 internal prototype to avoid an error. */
4071 /* We use char because int might match the return type of a gcc2
4072 builtin and then its argument prototype would still apply. */
4073 char initscr();
4074
4075 int main() {
4076 initscr()
4077 ; return 0; }
4078 EOF
4079 if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4080 rm -rf conftest*
4081 ac_cv_search_initscr="-l$i"
4082 break
4083 else
4084 echo "configure: failed program was:" >&5
4085 cat conftest.$ac_ext >&5
4086 fi
4087 rm -f conftest*
4088 done
4089 LIBS="$ac_func_search_save_LIBS"
4090 fi
4091
4092 echo "$ac_t""$ac_cv_search_initscr" 1>&6
4093 if test "$ac_cv_search_initscr" != "no"; then
4094 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4095
4096 else :
4097 { echo "configure: error: no curses library found" 1>&2; exit 1; }
4098 fi
4099 fi
4100
4101 case $host_os in
4102 cygwin*)
4103 if test -d $srcdir/libtermcap; then
4104 LIBS="../libtermcap/libtermcap.a $LIBS"
4105 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4106 fi ;;
4107 go32* | *djgpp*)
4108 ac_cv_search_tgetent="none required"
4109 ;;
4110 aix*)
4111 # Readline prefers curses over termcap on AIX.
4112 # ??? Why?
4113
4114 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4115 echo "configure:4116: checking for library containing tgetent" >&5
4116 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4117 echo $ac_n "(cached) $ac_c" 1>&6
4118 else
4119 ac_func_search_save_LIBS="$LIBS"
4120 ac_cv_search_tgetent="no"
4121 cat > conftest.$ac_ext <<EOF
4122 #line 4123 "configure"
4123 #include "confdefs.h"
4124 /* Override any gcc2 internal prototype to avoid an error. */
4125 /* We use char because int might match the return type of a gcc2
4126 builtin and then its argument prototype would still apply. */
4127 char tgetent();
4128
4129 int main() {
4130 tgetent()
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4134 rm -rf conftest*
4135 ac_cv_search_tgetent="none required"
4136 else
4137 echo "configure: failed program was:" >&5
4138 cat conftest.$ac_ext >&5
4139 fi
4140 rm -f conftest*
4141 test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4142 LIBS="-l$i $ac_func_search_save_LIBS"
4143 cat > conftest.$ac_ext <<EOF
4144 #line 4145 "configure"
4145 #include "confdefs.h"
4146 /* Override any gcc2 internal prototype to avoid an error. */
4147 /* We use char because int might match the return type of a gcc2
4148 builtin and then its argument prototype would still apply. */
4149 char tgetent();
4150
4151 int main() {
4152 tgetent()
4153 ; return 0; }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4156 rm -rf conftest*
4157 ac_cv_search_tgetent="-l$i"
4158 break
4159 else
4160 echo "configure: failed program was:" >&5
4161 cat conftest.$ac_ext >&5
4162 fi
4163 rm -f conftest*
4164 done
4165 LIBS="$ac_func_search_save_LIBS"
4166 fi
4167
4168 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4169 if test "$ac_cv_search_tgetent" != "no"; then
4170 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4171
4172 else :
4173
4174 fi
4175 ;;
4176 esac
4177
4178 # Note: We used to check for libtermlib and libterminfo too, but
4179 # Readline doesn't, so I think we're safe with leaving them out.
4180
4181 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4182 echo "configure:4183: checking for library containing tgetent" >&5
4183 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4184 echo $ac_n "(cached) $ac_c" 1>&6
4185 else
4186 ac_func_search_save_LIBS="$LIBS"
4187 ac_cv_search_tgetent="no"
4188 cat > conftest.$ac_ext <<EOF
4189 #line 4190 "configure"
4190 #include "confdefs.h"
4191 /* Override any gcc2 internal prototype to avoid an error. */
4192 /* We use char because int might match the return type of a gcc2
4193 builtin and then its argument prototype would still apply. */
4194 char tgetent();
4195
4196 int main() {
4197 tgetent()
4198 ; return 0; }
4199 EOF
4200 if { (eval echo configure:4201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4201 rm -rf conftest*
4202 ac_cv_search_tgetent="none required"
4203 else
4204 echo "configure: failed program was:" >&5
4205 cat conftest.$ac_ext >&5
4206 fi
4207 rm -f conftest*
4208 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4209 LIBS="-l$i $ac_func_search_save_LIBS"
4210 cat > conftest.$ac_ext <<EOF
4211 #line 4212 "configure"
4212 #include "confdefs.h"
4213 /* Override any gcc2 internal prototype to avoid an error. */
4214 /* We use char because int might match the return type of a gcc2
4215 builtin and then its argument prototype would still apply. */
4216 char tgetent();
4217
4218 int main() {
4219 tgetent()
4220 ; return 0; }
4221 EOF
4222 if { (eval echo configure:4223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4223 rm -rf conftest*
4224 ac_cv_search_tgetent="-l$i"
4225 break
4226 else
4227 echo "configure: failed program was:" >&5
4228 cat conftest.$ac_ext >&5
4229 fi
4230 rm -f conftest*
4231 done
4232 LIBS="$ac_func_search_save_LIBS"
4233 fi
4234
4235 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4236 if test "$ac_cv_search_tgetent" != "no"; then
4237 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4238
4239 else :
4240
4241 fi
4242
4243 if test "$ac_cv_search_tgetent" = no; then
4244 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4245 fi
4246
4247 # ------------------------- #
4248 # Checks for header files. #
4249 # ------------------------- #
4250
4251 ac_header_dirent=no
4252 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4253 do
4254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4255 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_hdr that defines DIR" >&5
4257 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4258 echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260 cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <sys/types.h>
4264 #include <$ac_hdr>
4265 int main() {
4266 DIR *dirp = 0;
4267 ; return 0; }
4268 EOF
4269 if { (eval echo configure:4270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4270 rm -rf conftest*
4271 eval "ac_cv_header_dirent_$ac_safe=yes"
4272 else
4273 echo "configure: failed program was:" >&5
4274 cat conftest.$ac_ext >&5
4275 rm -rf conftest*
4276 eval "ac_cv_header_dirent_$ac_safe=no"
4277 fi
4278 rm -f conftest*
4279 fi
4280 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4281 echo "$ac_t""yes" 1>&6
4282 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4283 cat >> confdefs.h <<EOF
4284 #define $ac_tr_hdr 1
4285 EOF
4286 ac_header_dirent=$ac_hdr; break
4287 else
4288 echo "$ac_t""no" 1>&6
4289 fi
4290 done
4291 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4292 if test $ac_header_dirent = dirent.h; then
4293 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4294 echo "configure:4295: checking for opendir in -ldir" >&5
4295 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4296 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4297 echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299 ac_save_LIBS="$LIBS"
4300 LIBS="-ldir $LIBS"
4301 cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 /* Override any gcc2 internal prototype to avoid an error. */
4305 /* We use char because int might match the return type of a gcc2
4306 builtin and then its argument prototype would still apply. */
4307 char opendir();
4308
4309 int main() {
4310 opendir()
4311 ; return 0; }
4312 EOF
4313 if { (eval echo configure:4314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4314 rm -rf conftest*
4315 eval "ac_cv_lib_$ac_lib_var=yes"
4316 else
4317 echo "configure: failed program was:" >&5
4318 cat conftest.$ac_ext >&5
4319 rm -rf conftest*
4320 eval "ac_cv_lib_$ac_lib_var=no"
4321 fi
4322 rm -f conftest*
4323 LIBS="$ac_save_LIBS"
4324
4325 fi
4326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4327 echo "$ac_t""yes" 1>&6
4328 LIBS="$LIBS -ldir"
4329 else
4330 echo "$ac_t""no" 1>&6
4331 fi
4332
4333 else
4334 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4335 echo "configure:4336: checking for opendir in -lx" >&5
4336 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4338 echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340 ac_save_LIBS="$LIBS"
4341 LIBS="-lx $LIBS"
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 /* Override any gcc2 internal prototype to avoid an error. */
4346 /* We use char because int might match the return type of a gcc2
4347 builtin and then its argument prototype would still apply. */
4348 char opendir();
4349
4350 int main() {
4351 opendir()
4352 ; return 0; }
4353 EOF
4354 if { (eval echo configure:4355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4355 rm -rf conftest*
4356 eval "ac_cv_lib_$ac_lib_var=yes"
4357 else
4358 echo "configure: failed program was:" >&5
4359 cat conftest.$ac_ext >&5
4360 rm -rf conftest*
4361 eval "ac_cv_lib_$ac_lib_var=no"
4362 fi
4363 rm -f conftest*
4364 LIBS="$ac_save_LIBS"
4365
4366 fi
4367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4368 echo "$ac_t""yes" 1>&6
4369 LIBS="$LIBS -lx"
4370 else
4371 echo "$ac_t""no" 1>&6
4372 fi
4373
4374 fi
4375
4376 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4377 echo "configure:4378: checking whether stat file-mode macros are broken" >&5
4378 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4379 echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 #include <sys/types.h>
4385 #include <sys/stat.h>
4386
4387 #if defined(S_ISBLK) && defined(S_IFDIR)
4388 # if S_ISBLK (S_IFDIR)
4389 You lose.
4390 # endif
4391 #endif
4392
4393 #if defined(S_ISBLK) && defined(S_IFCHR)
4394 # if S_ISBLK (S_IFCHR)
4395 You lose.
4396 # endif
4397 #endif
4398
4399 #if defined(S_ISLNK) && defined(S_IFREG)
4400 # if S_ISLNK (S_IFREG)
4401 You lose.
4402 # endif
4403 #endif
4404
4405 #if defined(S_ISSOCK) && defined(S_IFREG)
4406 # if S_ISSOCK (S_IFREG)
4407 You lose.
4408 # endif
4409 #endif
4410
4411 EOF
4412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4413 egrep "You lose" >/dev/null 2>&1; then
4414 rm -rf conftest*
4415 ac_cv_header_stat_broken=yes
4416 else
4417 rm -rf conftest*
4418 ac_cv_header_stat_broken=no
4419 fi
4420 rm -f conftest*
4421
4422 fi
4423
4424 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4425 if test $ac_cv_header_stat_broken = yes; then
4426 cat >> confdefs.h <<\EOF
4427 #define STAT_MACROS_BROKEN 1
4428 EOF
4429
4430 fi
4431
4432 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4433 echo "configure:4434: checking for ANSI C header files" >&5
4434 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4435 echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437 cat > conftest.$ac_ext <<EOF
4438 #line 4439 "configure"
4439 #include "confdefs.h"
4440 #include <stdlib.h>
4441 #include <stdarg.h>
4442 #include <string.h>
4443 #include <float.h>
4444 EOF
4445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4446 { (eval echo configure:4447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4448 if test -z "$ac_err"; then
4449 rm -rf conftest*
4450 ac_cv_header_stdc=yes
4451 else
4452 echo "$ac_err" >&5
4453 echo "configure: failed program was:" >&5
4454 cat conftest.$ac_ext >&5
4455 rm -rf conftest*
4456 ac_cv_header_stdc=no
4457 fi
4458 rm -f conftest*
4459
4460 if test $ac_cv_header_stdc = yes; then
4461 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4462 cat > conftest.$ac_ext <<EOF
4463 #line 4464 "configure"
4464 #include "confdefs.h"
4465 #include <string.h>
4466 EOF
4467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4468 egrep "memchr" >/dev/null 2>&1; then
4469 :
4470 else
4471 rm -rf conftest*
4472 ac_cv_header_stdc=no
4473 fi
4474 rm -f conftest*
4475
4476 fi
4477
4478 if test $ac_cv_header_stdc = yes; then
4479 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4480 cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 #include <stdlib.h>
4484 EOF
4485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4486 egrep "free" >/dev/null 2>&1; then
4487 :
4488 else
4489 rm -rf conftest*
4490 ac_cv_header_stdc=no
4491 fi
4492 rm -f conftest*
4493
4494 fi
4495
4496 if test $ac_cv_header_stdc = yes; then
4497 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4498 if test "$cross_compiling" = yes; then
4499 :
4500 else
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 #include <ctype.h>
4505 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4506 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4507 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4508 int main () { int i; for (i = 0; i < 256; i++)
4509 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4510 exit (0); }
4511
4512 EOF
4513 if { (eval echo configure:4514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4514 then
4515 :
4516 else
4517 echo "configure: failed program was:" >&5
4518 cat conftest.$ac_ext >&5
4519 rm -fr conftest*
4520 ac_cv_header_stdc=no
4521 fi
4522 rm -fr conftest*
4523 fi
4524
4525 fi
4526 fi
4527
4528 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4529 if test $ac_cv_header_stdc = yes; then
4530 cat >> confdefs.h <<\EOF
4531 #define STDC_HEADERS 1
4532 EOF
4533
4534 fi
4535
4536 for ac_hdr in link.h
4537 do
4538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4540 echo "configure:4541: checking for $ac_hdr" >&5
4541 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4542 echo $ac_n "(cached) $ac_c" 1>&6
4543 else
4544 cat > conftest.$ac_ext <<EOF
4545 #line 4546 "configure"
4546 #include "confdefs.h"
4547 #include <$ac_hdr>
4548 EOF
4549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4550 { (eval echo configure:4551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4552 if test -z "$ac_err"; then
4553 rm -rf conftest*
4554 eval "ac_cv_header_$ac_safe=yes"
4555 else
4556 echo "$ac_err" >&5
4557 echo "configure: failed program was:" >&5
4558 cat conftest.$ac_ext >&5
4559 rm -rf conftest*
4560 eval "ac_cv_header_$ac_safe=no"
4561 fi
4562 rm -f conftest*
4563 fi
4564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4565 echo "$ac_t""yes" 1>&6
4566 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4567 cat >> confdefs.h <<EOF
4568 #define $ac_tr_hdr 1
4569 EOF
4570
4571 else
4572 echo "$ac_t""no" 1>&6
4573 fi
4574 done
4575
4576 for ac_hdr in machine/reg.h
4577 do
4578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4580 echo "configure:4581: checking for $ac_hdr" >&5
4581 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4582 echo $ac_n "(cached) $ac_c" 1>&6
4583 else
4584 cat > conftest.$ac_ext <<EOF
4585 #line 4586 "configure"
4586 #include "confdefs.h"
4587 #include <$ac_hdr>
4588 EOF
4589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4590 { (eval echo configure:4591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4592 if test -z "$ac_err"; then
4593 rm -rf conftest*
4594 eval "ac_cv_header_$ac_safe=yes"
4595 else
4596 echo "$ac_err" >&5
4597 echo "configure: failed program was:" >&5
4598 cat conftest.$ac_ext >&5
4599 rm -rf conftest*
4600 eval "ac_cv_header_$ac_safe=no"
4601 fi
4602 rm -f conftest*
4603 fi
4604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4605 echo "$ac_t""yes" 1>&6
4606 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4607 cat >> confdefs.h <<EOF
4608 #define $ac_tr_hdr 1
4609 EOF
4610
4611 else
4612 echo "$ac_t""no" 1>&6
4613 fi
4614 done
4615
4616 for ac_hdr in nlist.h
4617 do
4618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_hdr" >&5
4621 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4622 echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624 cat > conftest.$ac_ext <<EOF
4625 #line 4626 "configure"
4626 #include "confdefs.h"
4627 #include <$ac_hdr>
4628 EOF
4629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4630 { (eval echo configure:4631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4632 if test -z "$ac_err"; then
4633 rm -rf conftest*
4634 eval "ac_cv_header_$ac_safe=yes"
4635 else
4636 echo "$ac_err" >&5
4637 echo "configure: failed program was:" >&5
4638 cat conftest.$ac_ext >&5
4639 rm -rf conftest*
4640 eval "ac_cv_header_$ac_safe=no"
4641 fi
4642 rm -f conftest*
4643 fi
4644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4645 echo "$ac_t""yes" 1>&6
4646 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4647 cat >> confdefs.h <<EOF
4648 #define $ac_tr_hdr 1
4649 EOF
4650
4651 else
4652 echo "$ac_t""no" 1>&6
4653 fi
4654 done
4655
4656 for ac_hdr in poll.h sys/poll.h
4657 do
4658 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4659 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_hdr" >&5
4661 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4662 echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664 cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667 #include <$ac_hdr>
4668 EOF
4669 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4670 { (eval echo configure:4671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4671 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4672 if test -z "$ac_err"; then
4673 rm -rf conftest*
4674 eval "ac_cv_header_$ac_safe=yes"
4675 else
4676 echo "$ac_err" >&5
4677 echo "configure: failed program was:" >&5
4678 cat conftest.$ac_ext >&5
4679 rm -rf conftest*
4680 eval "ac_cv_header_$ac_safe=no"
4681 fi
4682 rm -f conftest*
4683 fi
4684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4685 echo "$ac_t""yes" 1>&6
4686 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4687 cat >> confdefs.h <<EOF
4688 #define $ac_tr_hdr 1
4689 EOF
4690
4691 else
4692 echo "$ac_t""no" 1>&6
4693 fi
4694 done
4695
4696 for ac_hdr in proc_service.h thread_db.h
4697 do
4698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_hdr" >&5
4701 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4702 echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704 cat > conftest.$ac_ext <<EOF
4705 #line 4706 "configure"
4706 #include "confdefs.h"
4707 #include <$ac_hdr>
4708 EOF
4709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4710 { (eval echo configure:4711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4712 if test -z "$ac_err"; then
4713 rm -rf conftest*
4714 eval "ac_cv_header_$ac_safe=yes"
4715 else
4716 echo "$ac_err" >&5
4717 echo "configure: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4719 rm -rf conftest*
4720 eval "ac_cv_header_$ac_safe=no"
4721 fi
4722 rm -f conftest*
4723 fi
4724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4725 echo "$ac_t""yes" 1>&6
4726 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4727 cat >> confdefs.h <<EOF
4728 #define $ac_tr_hdr 1
4729 EOF
4730
4731 else
4732 echo "$ac_t""no" 1>&6
4733 fi
4734 done
4735
4736 for ac_hdr in stddef.h
4737 do
4738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4740 echo "configure:4741: checking for $ac_hdr" >&5
4741 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4742 echo $ac_n "(cached) $ac_c" 1>&6
4743 else
4744 cat > conftest.$ac_ext <<EOF
4745 #line 4746 "configure"
4746 #include "confdefs.h"
4747 #include <$ac_hdr>
4748 EOF
4749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4750 { (eval echo configure:4751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4752 if test -z "$ac_err"; then
4753 rm -rf conftest*
4754 eval "ac_cv_header_$ac_safe=yes"
4755 else
4756 echo "$ac_err" >&5
4757 echo "configure: failed program was:" >&5
4758 cat conftest.$ac_ext >&5
4759 rm -rf conftest*
4760 eval "ac_cv_header_$ac_safe=no"
4761 fi
4762 rm -f conftest*
4763 fi
4764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4765 echo "$ac_t""yes" 1>&6
4766 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4767 cat >> confdefs.h <<EOF
4768 #define $ac_tr_hdr 1
4769 EOF
4770
4771 else
4772 echo "$ac_t""no" 1>&6
4773 fi
4774 done
4775
4776 for ac_hdr in stdlib.h
4777 do
4778 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4779 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4780 echo "configure:4781: checking for $ac_hdr" >&5
4781 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4782 echo $ac_n "(cached) $ac_c" 1>&6
4783 else
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 #include <$ac_hdr>
4788 EOF
4789 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4790 { (eval echo configure:4791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4791 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4792 if test -z "$ac_err"; then
4793 rm -rf conftest*
4794 eval "ac_cv_header_$ac_safe=yes"
4795 else
4796 echo "$ac_err" >&5
4797 echo "configure: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4799 rm -rf conftest*
4800 eval "ac_cv_header_$ac_safe=no"
4801 fi
4802 rm -f conftest*
4803 fi
4804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4805 echo "$ac_t""yes" 1>&6
4806 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4807 cat >> confdefs.h <<EOF
4808 #define $ac_tr_hdr 1
4809 EOF
4810
4811 else
4812 echo "$ac_t""no" 1>&6
4813 fi
4814 done
4815
4816 for ac_hdr in stdint.h
4817 do
4818 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4819 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4820 echo "configure:4821: checking for $ac_hdr" >&5
4821 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4822 echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824 cat > conftest.$ac_ext <<EOF
4825 #line 4826 "configure"
4826 #include "confdefs.h"
4827 #include <$ac_hdr>
4828 EOF
4829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4830 { (eval echo configure:4831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4832 if test -z "$ac_err"; then
4833 rm -rf conftest*
4834 eval "ac_cv_header_$ac_safe=yes"
4835 else
4836 echo "$ac_err" >&5
4837 echo "configure: failed program was:" >&5
4838 cat conftest.$ac_ext >&5
4839 rm -rf conftest*
4840 eval "ac_cv_header_$ac_safe=no"
4841 fi
4842 rm -f conftest*
4843 fi
4844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4845 echo "$ac_t""yes" 1>&6
4846 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4847 cat >> confdefs.h <<EOF
4848 #define $ac_tr_hdr 1
4849 EOF
4850
4851 else
4852 echo "$ac_t""no" 1>&6
4853 fi
4854 done
4855
4856 for ac_hdr in string.h memory.h strings.h
4857 do
4858 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4859 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4860 echo "configure:4861: checking for $ac_hdr" >&5
4861 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4862 echo $ac_n "(cached) $ac_c" 1>&6
4863 else
4864 cat > conftest.$ac_ext <<EOF
4865 #line 4866 "configure"
4866 #include "confdefs.h"
4867 #include <$ac_hdr>
4868 EOF
4869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4870 { (eval echo configure:4871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4872 if test -z "$ac_err"; then
4873 rm -rf conftest*
4874 eval "ac_cv_header_$ac_safe=yes"
4875 else
4876 echo "$ac_err" >&5
4877 echo "configure: failed program was:" >&5
4878 cat conftest.$ac_ext >&5
4879 rm -rf conftest*
4880 eval "ac_cv_header_$ac_safe=no"
4881 fi
4882 rm -f conftest*
4883 fi
4884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4885 echo "$ac_t""yes" 1>&6
4886 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4887 cat >> confdefs.h <<EOF
4888 #define $ac_tr_hdr 1
4889 EOF
4890
4891 else
4892 echo "$ac_t""no" 1>&6
4893 fi
4894 done
4895
4896 for ac_hdr in sys/fault.h
4897 do
4898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4900 echo "configure:4901: checking for $ac_hdr" >&5
4901 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4902 echo $ac_n "(cached) $ac_c" 1>&6
4903 else
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 #include <$ac_hdr>
4908 EOF
4909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4910 { (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4912 if test -z "$ac_err"; then
4913 rm -rf conftest*
4914 eval "ac_cv_header_$ac_safe=yes"
4915 else
4916 echo "$ac_err" >&5
4917 echo "configure: failed program was:" >&5
4918 cat conftest.$ac_ext >&5
4919 rm -rf conftest*
4920 eval "ac_cv_header_$ac_safe=no"
4921 fi
4922 rm -f conftest*
4923 fi
4924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4925 echo "$ac_t""yes" 1>&6
4926 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4927 cat >> confdefs.h <<EOF
4928 #define $ac_tr_hdr 1
4929 EOF
4930
4931 else
4932 echo "$ac_t""no" 1>&6
4933 fi
4934 done
4935
4936 for ac_hdr in sys/file.h
4937 do
4938 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4939 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4940 echo "configure:4941: checking for $ac_hdr" >&5
4941 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4942 echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944 cat > conftest.$ac_ext <<EOF
4945 #line 4946 "configure"
4946 #include "confdefs.h"
4947 #include <$ac_hdr>
4948 EOF
4949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4950 { (eval echo configure:4951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4952 if test -z "$ac_err"; then
4953 rm -rf conftest*
4954 eval "ac_cv_header_$ac_safe=yes"
4955 else
4956 echo "$ac_err" >&5
4957 echo "configure: failed program was:" >&5
4958 cat conftest.$ac_ext >&5
4959 rm -rf conftest*
4960 eval "ac_cv_header_$ac_safe=no"
4961 fi
4962 rm -f conftest*
4963 fi
4964 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4965 echo "$ac_t""yes" 1>&6
4966 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4967 cat >> confdefs.h <<EOF
4968 #define $ac_tr_hdr 1
4969 EOF
4970
4971 else
4972 echo "$ac_t""no" 1>&6
4973 fi
4974 done
4975
4976 for ac_hdr in sys/filio.h
4977 do
4978 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4979 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4980 echo "configure:4981: checking for $ac_hdr" >&5
4981 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4982 echo $ac_n "(cached) $ac_c" 1>&6
4983 else
4984 cat > conftest.$ac_ext <<EOF
4985 #line 4986 "configure"
4986 #include "confdefs.h"
4987 #include <$ac_hdr>
4988 EOF
4989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4990 { (eval echo configure:4991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4992 if test -z "$ac_err"; then
4993 rm -rf conftest*
4994 eval "ac_cv_header_$ac_safe=yes"
4995 else
4996 echo "$ac_err" >&5
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 rm -rf conftest*
5000 eval "ac_cv_header_$ac_safe=no"
5001 fi
5002 rm -f conftest*
5003 fi
5004 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5005 echo "$ac_t""yes" 1>&6
5006 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5007 cat >> confdefs.h <<EOF
5008 #define $ac_tr_hdr 1
5009 EOF
5010
5011 else
5012 echo "$ac_t""no" 1>&6
5013 fi
5014 done
5015
5016 for ac_hdr in sys/ioctl.h
5017 do
5018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5020 echo "configure:5021: checking for $ac_hdr" >&5
5021 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5022 echo $ac_n "(cached) $ac_c" 1>&6
5023 else
5024 cat > conftest.$ac_ext <<EOF
5025 #line 5026 "configure"
5026 #include "confdefs.h"
5027 #include <$ac_hdr>
5028 EOF
5029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5030 { (eval echo configure:5031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5032 if test -z "$ac_err"; then
5033 rm -rf conftest*
5034 eval "ac_cv_header_$ac_safe=yes"
5035 else
5036 echo "$ac_err" >&5
5037 echo "configure: failed program was:" >&5
5038 cat conftest.$ac_ext >&5
5039 rm -rf conftest*
5040 eval "ac_cv_header_$ac_safe=no"
5041 fi
5042 rm -f conftest*
5043 fi
5044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5045 echo "$ac_t""yes" 1>&6
5046 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5047 cat >> confdefs.h <<EOF
5048 #define $ac_tr_hdr 1
5049 EOF
5050
5051 else
5052 echo "$ac_t""no" 1>&6
5053 fi
5054 done
5055
5056 for ac_hdr in sys/param.h
5057 do
5058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5060 echo "configure:5061: checking for $ac_hdr" >&5
5061 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5062 echo $ac_n "(cached) $ac_c" 1>&6
5063 else
5064 cat > conftest.$ac_ext <<EOF
5065 #line 5066 "configure"
5066 #include "confdefs.h"
5067 #include <$ac_hdr>
5068 EOF
5069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5070 { (eval echo configure:5071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5072 if test -z "$ac_err"; then
5073 rm -rf conftest*
5074 eval "ac_cv_header_$ac_safe=yes"
5075 else
5076 echo "$ac_err" >&5
5077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
5079 rm -rf conftest*
5080 eval "ac_cv_header_$ac_safe=no"
5081 fi
5082 rm -f conftest*
5083 fi
5084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5085 echo "$ac_t""yes" 1>&6
5086 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5087 cat >> confdefs.h <<EOF
5088 #define $ac_tr_hdr 1
5089 EOF
5090
5091 else
5092 echo "$ac_t""no" 1>&6
5093 fi
5094 done
5095
5096 for ac_hdr in sys/proc.h
5097 do
5098 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5099 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5100 echo "configure:5101: checking for $ac_hdr" >&5
5101 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5102 echo $ac_n "(cached) $ac_c" 1>&6
5103 else
5104 cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107 #include <$ac_hdr>
5108 EOF
5109 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5110 { (eval echo configure:5111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5111 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5112 if test -z "$ac_err"; then
5113 rm -rf conftest*
5114 eval "ac_cv_header_$ac_safe=yes"
5115 else
5116 echo "$ac_err" >&5
5117 echo "configure: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 rm -rf conftest*
5120 eval "ac_cv_header_$ac_safe=no"
5121 fi
5122 rm -f conftest*
5123 fi
5124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5125 echo "$ac_t""yes" 1>&6
5126 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5127 cat >> confdefs.h <<EOF
5128 #define $ac_tr_hdr 1
5129 EOF
5130
5131 else
5132 echo "$ac_t""no" 1>&6
5133 fi
5134 done
5135
5136 for ac_hdr in sys/procfs.h
5137 do
5138 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5139 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5140 echo "configure:5141: checking for $ac_hdr" >&5
5141 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5142 echo $ac_n "(cached) $ac_c" 1>&6
5143 else
5144 cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147 #include <$ac_hdr>
5148 EOF
5149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5150 { (eval echo configure:5151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5152 if test -z "$ac_err"; then
5153 rm -rf conftest*
5154 eval "ac_cv_header_$ac_safe=yes"
5155 else
5156 echo "$ac_err" >&5
5157 echo "configure: failed program was:" >&5
5158 cat conftest.$ac_ext >&5
5159 rm -rf conftest*
5160 eval "ac_cv_header_$ac_safe=no"
5161 fi
5162 rm -f conftest*
5163 fi
5164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5165 echo "$ac_t""yes" 1>&6
5166 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5167 cat >> confdefs.h <<EOF
5168 #define $ac_tr_hdr 1
5169 EOF
5170
5171 else
5172 echo "$ac_t""no" 1>&6
5173 fi
5174 done
5175
5176 for ac_hdr in sys/ptrace.h ptrace.h
5177 do
5178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5180 echo "configure:5181: checking for $ac_hdr" >&5
5181 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5182 echo $ac_n "(cached) $ac_c" 1>&6
5183 else
5184 cat > conftest.$ac_ext <<EOF
5185 #line 5186 "configure"
5186 #include "confdefs.h"
5187 #include <$ac_hdr>
5188 EOF
5189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5190 { (eval echo configure:5191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5192 if test -z "$ac_err"; then
5193 rm -rf conftest*
5194 eval "ac_cv_header_$ac_safe=yes"
5195 else
5196 echo "$ac_err" >&5
5197 echo "configure: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5199 rm -rf conftest*
5200 eval "ac_cv_header_$ac_safe=no"
5201 fi
5202 rm -f conftest*
5203 fi
5204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5205 echo "$ac_t""yes" 1>&6
5206 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5207 cat >> confdefs.h <<EOF
5208 #define $ac_tr_hdr 1
5209 EOF
5210
5211 else
5212 echo "$ac_t""no" 1>&6
5213 fi
5214 done
5215
5216 for ac_hdr in sys/reg.h sys/debugreg.h
5217 do
5218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5220 echo "configure:5221: checking for $ac_hdr" >&5
5221 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5222 echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224 cat > conftest.$ac_ext <<EOF
5225 #line 5226 "configure"
5226 #include "confdefs.h"
5227 #include <$ac_hdr>
5228 EOF
5229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5230 { (eval echo configure:5231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5232 if test -z "$ac_err"; then
5233 rm -rf conftest*
5234 eval "ac_cv_header_$ac_safe=yes"
5235 else
5236 echo "$ac_err" >&5
5237 echo "configure: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
5239 rm -rf conftest*
5240 eval "ac_cv_header_$ac_safe=no"
5241 fi
5242 rm -f conftest*
5243 fi
5244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5245 echo "$ac_t""yes" 1>&6
5246 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5247 cat >> confdefs.h <<EOF
5248 #define $ac_tr_hdr 1
5249 EOF
5250
5251 else
5252 echo "$ac_t""no" 1>&6
5253 fi
5254 done
5255
5256 for ac_hdr in sys/select.h
5257 do
5258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5260 echo "configure:5261: checking for $ac_hdr" >&5
5261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5262 echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264 cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267 #include <$ac_hdr>
5268 EOF
5269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5270 { (eval echo configure:5271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5272 if test -z "$ac_err"; then
5273 rm -rf conftest*
5274 eval "ac_cv_header_$ac_safe=yes"
5275 else
5276 echo "$ac_err" >&5
5277 echo "configure: failed program was:" >&5
5278 cat conftest.$ac_ext >&5
5279 rm -rf conftest*
5280 eval "ac_cv_header_$ac_safe=no"
5281 fi
5282 rm -f conftest*
5283 fi
5284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5285 echo "$ac_t""yes" 1>&6
5286 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5287 cat >> confdefs.h <<EOF
5288 #define $ac_tr_hdr 1
5289 EOF
5290
5291 else
5292 echo "$ac_t""no" 1>&6
5293 fi
5294 done
5295
5296 for ac_hdr in sys/syscall.h
5297 do
5298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5300 echo "configure:5301: checking for $ac_hdr" >&5
5301 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5302 echo $ac_n "(cached) $ac_c" 1>&6
5303 else
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307 #include <$ac_hdr>
5308 EOF
5309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5310 { (eval echo configure:5311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5312 if test -z "$ac_err"; then
5313 rm -rf conftest*
5314 eval "ac_cv_header_$ac_safe=yes"
5315 else
5316 echo "$ac_err" >&5
5317 echo "configure: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
5319 rm -rf conftest*
5320 eval "ac_cv_header_$ac_safe=no"
5321 fi
5322 rm -f conftest*
5323 fi
5324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5325 echo "$ac_t""yes" 1>&6
5326 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5327 cat >> confdefs.h <<EOF
5328 #define $ac_tr_hdr 1
5329 EOF
5330
5331 else
5332 echo "$ac_t""no" 1>&6
5333 fi
5334 done
5335
5336 for ac_hdr in sys/user.h
5337 do
5338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5340 echo "configure:5341: checking for $ac_hdr" >&5
5341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5342 echo $ac_n "(cached) $ac_c" 1>&6
5343 else
5344 cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 #include <$ac_hdr>
5348 EOF
5349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5350 { (eval echo configure:5351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5352 if test -z "$ac_err"; then
5353 rm -rf conftest*
5354 eval "ac_cv_header_$ac_safe=yes"
5355 else
5356 echo "$ac_err" >&5
5357 echo "configure: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 rm -rf conftest*
5360 eval "ac_cv_header_$ac_safe=no"
5361 fi
5362 rm -f conftest*
5363 fi
5364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5365 echo "$ac_t""yes" 1>&6
5366 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5367 cat >> confdefs.h <<EOF
5368 #define $ac_tr_hdr 1
5369 EOF
5370
5371 else
5372 echo "$ac_t""no" 1>&6
5373 fi
5374 done
5375
5376 for ac_hdr in sys/wait.h wait.h
5377 do
5378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5380 echo "configure:5381: checking for $ac_hdr" >&5
5381 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5382 echo $ac_n "(cached) $ac_c" 1>&6
5383 else
5384 cat > conftest.$ac_ext <<EOF
5385 #line 5386 "configure"
5386 #include "confdefs.h"
5387 #include <$ac_hdr>
5388 EOF
5389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5390 { (eval echo configure:5391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5392 if test -z "$ac_err"; then
5393 rm -rf conftest*
5394 eval "ac_cv_header_$ac_safe=yes"
5395 else
5396 echo "$ac_err" >&5
5397 echo "configure: failed program was:" >&5
5398 cat conftest.$ac_ext >&5
5399 rm -rf conftest*
5400 eval "ac_cv_header_$ac_safe=no"
5401 fi
5402 rm -f conftest*
5403 fi
5404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5405 echo "$ac_t""yes" 1>&6
5406 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5407 cat >> confdefs.h <<EOF
5408 #define $ac_tr_hdr 1
5409 EOF
5410
5411 else
5412 echo "$ac_t""no" 1>&6
5413 fi
5414 done
5415
5416 for ac_hdr in termios.h termio.h sgtty.h
5417 do
5418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5420 echo "configure:5421: checking for $ac_hdr" >&5
5421 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
5423 else
5424 cat > conftest.$ac_ext <<EOF
5425 #line 5426 "configure"
5426 #include "confdefs.h"
5427 #include <$ac_hdr>
5428 EOF
5429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5430 { (eval echo configure:5431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5432 if test -z "$ac_err"; then
5433 rm -rf conftest*
5434 eval "ac_cv_header_$ac_safe=yes"
5435 else
5436 echo "$ac_err" >&5
5437 echo "configure: failed program was:" >&5
5438 cat conftest.$ac_ext >&5
5439 rm -rf conftest*
5440 eval "ac_cv_header_$ac_safe=no"
5441 fi
5442 rm -f conftest*
5443 fi
5444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5445 echo "$ac_t""yes" 1>&6
5446 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5447 cat >> confdefs.h <<EOF
5448 #define $ac_tr_hdr 1
5449 EOF
5450
5451 else
5452 echo "$ac_t""no" 1>&6
5453 fi
5454 done
5455
5456 for ac_hdr in unistd.h
5457 do
5458 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5459 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5460 echo "configure:5461: checking for $ac_hdr" >&5
5461 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5462 echo $ac_n "(cached) $ac_c" 1>&6
5463 else
5464 cat > conftest.$ac_ext <<EOF
5465 #line 5466 "configure"
5466 #include "confdefs.h"
5467 #include <$ac_hdr>
5468 EOF
5469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5470 { (eval echo configure:5471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5472 if test -z "$ac_err"; then
5473 rm -rf conftest*
5474 eval "ac_cv_header_$ac_safe=yes"
5475 else
5476 echo "$ac_err" >&5
5477 echo "configure: failed program was:" >&5
5478 cat conftest.$ac_ext >&5
5479 rm -rf conftest*
5480 eval "ac_cv_header_$ac_safe=no"
5481 fi
5482 rm -f conftest*
5483 fi
5484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5485 echo "$ac_t""yes" 1>&6
5486 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5487 cat >> confdefs.h <<EOF
5488 #define $ac_tr_hdr 1
5489 EOF
5490
5491 else
5492 echo "$ac_t""no" 1>&6
5493 fi
5494 done
5495
5496
5497 # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5498 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5499 # think that we don't have <curses.h> if we're using GCC.
5500 case $host_os in
5501 solaris2.[78])
5502 if test "$GCC" = yes; then
5503 cat >> confdefs.h <<\EOF
5504 #define _MSE_INT_H 1
5505 EOF
5506
5507 fi ;;
5508 esac
5509 for ac_hdr in curses.h ncurses.h term.h
5510 do
5511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5513 echo "configure:5514: checking for $ac_hdr" >&5
5514 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5515 echo $ac_n "(cached) $ac_c" 1>&6
5516 else
5517 cat > conftest.$ac_ext <<EOF
5518 #line 5519 "configure"
5519 #include "confdefs.h"
5520 #include <$ac_hdr>
5521 EOF
5522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5523 { (eval echo configure:5524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5525 if test -z "$ac_err"; then
5526 rm -rf conftest*
5527 eval "ac_cv_header_$ac_safe=yes"
5528 else
5529 echo "$ac_err" >&5
5530 echo "configure: failed program was:" >&5
5531 cat conftest.$ac_ext >&5
5532 rm -rf conftest*
5533 eval "ac_cv_header_$ac_safe=no"
5534 fi
5535 rm -f conftest*
5536 fi
5537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5538 echo "$ac_t""yes" 1>&6
5539 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5540 cat >> confdefs.h <<EOF
5541 #define $ac_tr_hdr 1
5542 EOF
5543
5544 else
5545 echo "$ac_t""no" 1>&6
5546 fi
5547 done
5548
5549
5550 # FIXME: kettenis/20030102: In most cases we include these
5551 # unconditionally, so what's the point in checking these?
5552 for ac_hdr in ctype.h time.h
5553 do
5554 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5555 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5556 echo "configure:5557: checking for $ac_hdr" >&5
5557 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5558 echo $ac_n "(cached) $ac_c" 1>&6
5559 else
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <$ac_hdr>
5564 EOF
5565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5566 { (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5568 if test -z "$ac_err"; then
5569 rm -rf conftest*
5570 eval "ac_cv_header_$ac_safe=yes"
5571 else
5572 echo "$ac_err" >&5
5573 echo "configure: failed program was:" >&5
5574 cat conftest.$ac_ext >&5
5575 rm -rf conftest*
5576 eval "ac_cv_header_$ac_safe=no"
5577 fi
5578 rm -f conftest*
5579 fi
5580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5581 echo "$ac_t""yes" 1>&6
5582 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5583 cat >> confdefs.h <<EOF
5584 #define $ac_tr_hdr 1
5585 EOF
5586
5587 else
5588 echo "$ac_t""no" 1>&6
5589 fi
5590 done
5591
5592
5593 echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5594 echo "configure:5595: checking for member st_blocks in struct stat" >&5
5595 if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5596 echo $ac_n "(cached) $ac_c" 1>&6
5597 else
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 #include <sys/types.h>
5602 #include <sys/stat.h>
5603 int main() {
5604 struct stat st; (void) st.st_blocks;
5605 ; return 0; }
5606 EOF
5607 if { (eval echo configure:5608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5608 rm -rf conftest*
5609 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5610 else
5611 echo "configure: failed program was:" >&5
5612 cat conftest.$ac_ext >&5
5613 rm -rf conftest*
5614 gdb_cv_have_struct_stat_with_st_blocks_member=no
5615 fi
5616 rm -f conftest*
5617 fi
5618
5619 echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5620 if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5621 cat >> confdefs.h <<\EOF
5622 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
5623 EOF
5624
5625 fi
5626 # ------------------------- #
5627 # Checks for declarations. #
5628 # ------------------------- #
5629
5630 for ac_func in getopt
5631 do
5632 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5633 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5634 echo "configure:5635: checking whether $ac_func is declared" >&5
5635 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5637 else
5638 cat > conftest.$ac_ext <<EOF
5639 #line 5640 "configure"
5640 #include "confdefs.h"
5641 #undef $ac_tr_decl
5642 #define $ac_tr_decl 1
5643
5644
5645 int main() {
5646 #ifndef $ac_func
5647 char *(*pfn) = (char *(*)) $ac_func ;
5648 #endif
5649 ; return 0; }
5650 EOF
5651 if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5652 rm -rf conftest*
5653 eval "gcc_cv_have_decl_$ac_func=yes"
5654 else
5655 echo "configure: failed program was:" >&5
5656 cat conftest.$ac_ext >&5
5657 rm -rf conftest*
5658 eval "gcc_cv_have_decl_$ac_func=no"
5659 fi
5660 rm -f conftest*
5661 fi
5662
5663 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5664 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5665 #define $ac_tr_decl 1
5666 EOF
5667
5668 else
5669 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5670 #define $ac_tr_decl 0
5671 EOF
5672
5673 fi
5674
5675 done
5676 if test x = y ; then
5677 cat >> confdefs.h <<\EOF
5678 #define HAVE_DECL_GETOPT 1
5679 EOF
5680 fi
5681
5682
5683 # ------------------ #
5684 # Checks for types. #
5685 # ------------------ #
5686
5687 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5688 echo "configure:5689: checking return type of signal handlers" >&5
5689 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5690 echo $ac_n "(cached) $ac_c" 1>&6
5691 else
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5695 #include <sys/types.h>
5696 #include <signal.h>
5697 #ifdef signal
5698 #undef signal
5699 #endif
5700 #ifdef __cplusplus
5701 extern "C" void (*signal (int, void (*)(int)))(int);
5702 #else
5703 void (*signal ()) ();
5704 #endif
5705
5706 int main() {
5707 int i;
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5711 rm -rf conftest*
5712 ac_cv_type_signal=void
5713 else
5714 echo "configure: failed program was:" >&5
5715 cat conftest.$ac_ext >&5
5716 rm -rf conftest*
5717 ac_cv_type_signal=int
5718 fi
5719 rm -f conftest*
5720 fi
5721
5722 echo "$ac_t""$ac_cv_type_signal" 1>&6
5723 cat >> confdefs.h <<EOF
5724 #define RETSIGTYPE $ac_cv_type_signal
5725 EOF
5726
5727
5728
5729 # ------------------------------------- #
5730 # Checks for compiler characteristics. #
5731 # ------------------------------------- #
5732
5733 echo $ac_n "checking for working const""... $ac_c" 1>&6
5734 echo "configure:5735: checking for working const" >&5
5735 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5736 echo $ac_n "(cached) $ac_c" 1>&6
5737 else
5738 cat > conftest.$ac_ext <<EOF
5739 #line 5740 "configure"
5740 #include "confdefs.h"
5741
5742 int main() {
5743
5744 /* Ultrix mips cc rejects this. */
5745 typedef int charset[2]; const charset x;
5746 /* SunOS 4.1.1 cc rejects this. */
5747 char const *const *ccp;
5748 char **p;
5749 /* NEC SVR4.0.2 mips cc rejects this. */
5750 struct point {int x, y;};
5751 static struct point const zero = {0,0};
5752 /* AIX XL C 1.02.0.0 rejects this.
5753 It does not let you subtract one const X* pointer from another in an arm
5754 of an if-expression whose if-part is not a constant expression */
5755 const char *g = "string";
5756 ccp = &g + (g ? g-g : 0);
5757 /* HPUX 7.0 cc rejects these. */
5758 ++ccp;
5759 p = (char**) ccp;
5760 ccp = (char const *const *) p;
5761 { /* SCO 3.2v4 cc rejects this. */
5762 char *t;
5763 char const *s = 0 ? (char *) 0 : (char const *) 0;
5764
5765 *t++ = 0;
5766 }
5767 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5768 int x[] = {25, 17};
5769 const int *foo = &x[0];
5770 ++foo;
5771 }
5772 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5773 typedef const int *iptr;
5774 iptr p = 0;
5775 ++p;
5776 }
5777 { /* AIX XL C 1.02.0.0 rejects this saying
5778 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5779 struct s { int j; const int *ap[3]; };
5780 struct s *b; b->j = 5;
5781 }
5782 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5783 const int foo = 10;
5784 }
5785
5786 ; return 0; }
5787 EOF
5788 if { (eval echo configure:5789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5789 rm -rf conftest*
5790 ac_cv_c_const=yes
5791 else
5792 echo "configure: failed program was:" >&5
5793 cat conftest.$ac_ext >&5
5794 rm -rf conftest*
5795 ac_cv_c_const=no
5796 fi
5797 rm -f conftest*
5798 fi
5799
5800 echo "$ac_t""$ac_cv_c_const" 1>&6
5801 if test $ac_cv_c_const = no; then
5802 cat >> confdefs.h <<\EOF
5803 #define const
5804 EOF
5805
5806 fi
5807
5808 echo $ac_n "checking for inline""... $ac_c" 1>&6
5809 echo "configure:5810: checking for inline" >&5
5810 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5811 echo $ac_n "(cached) $ac_c" 1>&6
5812 else
5813 ac_cv_c_inline=no
5814 for ac_kw in inline __inline__ __inline; do
5815 cat > conftest.$ac_ext <<EOF
5816 #line 5817 "configure"
5817 #include "confdefs.h"
5818
5819 int main() {
5820 } $ac_kw foo() {
5821 ; return 0; }
5822 EOF
5823 if { (eval echo configure:5824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5824 rm -rf conftest*
5825 ac_cv_c_inline=$ac_kw; break
5826 else
5827 echo "configure: failed program was:" >&5
5828 cat conftest.$ac_ext >&5
5829 fi
5830 rm -f conftest*
5831 done
5832
5833 fi
5834
5835 echo "$ac_t""$ac_cv_c_inline" 1>&6
5836 case "$ac_cv_c_inline" in
5837 inline | yes) ;;
5838 no) cat >> confdefs.h <<\EOF
5839 #define inline
5840 EOF
5841 ;;
5842 *) cat >> confdefs.h <<EOF
5843 #define inline $ac_cv_c_inline
5844 EOF
5845 ;;
5846 esac
5847
5848
5849 # ------------------------------ #
5850 # Checks for library functions. #
5851 # ------------------------------ #
5852
5853 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5854 # for constant arguments. Useless!
5855 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5856 echo "configure:5857: checking for working alloca.h" >&5
5857 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5858 echo $ac_n "(cached) $ac_c" 1>&6
5859 else
5860 cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863 #include <alloca.h>
5864 int main() {
5865 char *p = alloca(2 * sizeof(int));
5866 ; return 0; }
5867 EOF
5868 if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5869 rm -rf conftest*
5870 ac_cv_header_alloca_h=yes
5871 else
5872 echo "configure: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 rm -rf conftest*
5875 ac_cv_header_alloca_h=no
5876 fi
5877 rm -f conftest*
5878 fi
5879
5880 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5881 if test $ac_cv_header_alloca_h = yes; then
5882 cat >> confdefs.h <<\EOF
5883 #define HAVE_ALLOCA_H 1
5884 EOF
5885
5886 fi
5887
5888 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5889 echo "configure:5890: checking for alloca" >&5
5890 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5891 echo $ac_n "(cached) $ac_c" 1>&6
5892 else
5893 cat > conftest.$ac_ext <<EOF
5894 #line 5895 "configure"
5895 #include "confdefs.h"
5896
5897 #ifdef __GNUC__
5898 # define alloca __builtin_alloca
5899 #else
5900 # ifdef _MSC_VER
5901 # include <malloc.h>
5902 # define alloca _alloca
5903 # else
5904 # if HAVE_ALLOCA_H
5905 # include <alloca.h>
5906 # else
5907 # ifdef _AIX
5908 #pragma alloca
5909 # else
5910 # ifndef alloca /* predefined by HP cc +Olibcalls */
5911 char *alloca ();
5912 # endif
5913 # endif
5914 # endif
5915 # endif
5916 #endif
5917
5918 int main() {
5919 char *p = (char *) alloca(1);
5920 ; return 0; }
5921 EOF
5922 if { (eval echo configure:5923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5923 rm -rf conftest*
5924 ac_cv_func_alloca_works=yes
5925 else
5926 echo "configure: failed program was:" >&5
5927 cat conftest.$ac_ext >&5
5928 rm -rf conftest*
5929 ac_cv_func_alloca_works=no
5930 fi
5931 rm -f conftest*
5932 fi
5933
5934 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5935 if test $ac_cv_func_alloca_works = yes; then
5936 cat >> confdefs.h <<\EOF
5937 #define HAVE_ALLOCA 1
5938 EOF
5939
5940 fi
5941
5942 if test $ac_cv_func_alloca_works = no; then
5943 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5944 # that cause trouble. Some versions do not even contain alloca or
5945 # contain a buggy version. If you still want to use their alloca,
5946 # use ar to extract alloca.o from them instead of compiling alloca.c.
5947 ALLOCA=alloca.${ac_objext}
5948 cat >> confdefs.h <<\EOF
5949 #define C_ALLOCA 1
5950 EOF
5951
5952
5953 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5954 echo "configure:5955: checking whether alloca needs Cray hooks" >&5
5955 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5956 echo $ac_n "(cached) $ac_c" 1>&6
5957 else
5958 cat > conftest.$ac_ext <<EOF
5959 #line 5960 "configure"
5960 #include "confdefs.h"
5961 #if defined(CRAY) && ! defined(CRAY2)
5962 webecray
5963 #else
5964 wenotbecray
5965 #endif
5966
5967 EOF
5968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5969 egrep "webecray" >/dev/null 2>&1; then
5970 rm -rf conftest*
5971 ac_cv_os_cray=yes
5972 else
5973 rm -rf conftest*
5974 ac_cv_os_cray=no
5975 fi
5976 rm -f conftest*
5977
5978 fi
5979
5980 echo "$ac_t""$ac_cv_os_cray" 1>&6
5981 if test $ac_cv_os_cray = yes; then
5982 for ac_func in _getb67 GETB67 getb67; do
5983 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5984 echo "configure:5985: checking for $ac_func" >&5
5985 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5986 echo $ac_n "(cached) $ac_c" 1>&6
5987 else
5988 cat > conftest.$ac_ext <<EOF
5989 #line 5990 "configure"
5990 #include "confdefs.h"
5991 /* System header to define __stub macros and hopefully few prototypes,
5992 which can conflict with char $ac_func(); below. */
5993 #include <assert.h>
5994 /* Override any gcc2 internal prototype to avoid an error. */
5995 /* We use char because int might match the return type of a gcc2
5996 builtin and then its argument prototype would still apply. */
5997 char $ac_func();
5998
5999 int main() {
6000
6001 /* The GNU C library defines this for functions which it implements
6002 to always fail with ENOSYS. Some functions are actually named
6003 something starting with __ and the normal name is an alias. */
6004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6005 choke me
6006 #else
6007 $ac_func();
6008 #endif
6009
6010 ; return 0; }
6011 EOF
6012 if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6013 rm -rf conftest*
6014 eval "ac_cv_func_$ac_func=yes"
6015 else
6016 echo "configure: failed program was:" >&5
6017 cat conftest.$ac_ext >&5
6018 rm -rf conftest*
6019 eval "ac_cv_func_$ac_func=no"
6020 fi
6021 rm -f conftest*
6022 fi
6023
6024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6025 echo "$ac_t""yes" 1>&6
6026 cat >> confdefs.h <<EOF
6027 #define CRAY_STACKSEG_END $ac_func
6028 EOF
6029
6030 break
6031 else
6032 echo "$ac_t""no" 1>&6
6033 fi
6034
6035 done
6036 fi
6037
6038 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6039 echo "configure:6040: checking stack direction for C alloca" >&5
6040 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6041 echo $ac_n "(cached) $ac_c" 1>&6
6042 else
6043 if test "$cross_compiling" = yes; then
6044 ac_cv_c_stack_direction=0
6045 else
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 find_stack_direction ()
6050 {
6051 static char *addr = 0;
6052 auto char dummy;
6053 if (addr == 0)
6054 {
6055 addr = &dummy;
6056 return find_stack_direction ();
6057 }
6058 else
6059 return (&dummy > addr) ? 1 : -1;
6060 }
6061 main ()
6062 {
6063 exit (find_stack_direction() < 0);
6064 }
6065 EOF
6066 if { (eval echo configure:6067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6067 then
6068 ac_cv_c_stack_direction=1
6069 else
6070 echo "configure: failed program was:" >&5
6071 cat conftest.$ac_ext >&5
6072 rm -fr conftest*
6073 ac_cv_c_stack_direction=-1
6074 fi
6075 rm -fr conftest*
6076 fi
6077
6078 fi
6079
6080 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6081 cat >> confdefs.h <<EOF
6082 #define STACK_DIRECTION $ac_cv_c_stack_direction
6083 EOF
6084
6085 fi
6086
6087 for ac_hdr in unistd.h
6088 do
6089 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6090 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6091 echo "configure:6092: checking for $ac_hdr" >&5
6092 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6093 echo $ac_n "(cached) $ac_c" 1>&6
6094 else
6095 cat > conftest.$ac_ext <<EOF
6096 #line 6097 "configure"
6097 #include "confdefs.h"
6098 #include <$ac_hdr>
6099 EOF
6100 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6101 { (eval echo configure:6102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6102 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6103 if test -z "$ac_err"; then
6104 rm -rf conftest*
6105 eval "ac_cv_header_$ac_safe=yes"
6106 else
6107 echo "$ac_err" >&5
6108 echo "configure: failed program was:" >&5
6109 cat conftest.$ac_ext >&5
6110 rm -rf conftest*
6111 eval "ac_cv_header_$ac_safe=no"
6112 fi
6113 rm -f conftest*
6114 fi
6115 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6116 echo "$ac_t""yes" 1>&6
6117 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6118 cat >> confdefs.h <<EOF
6119 #define $ac_tr_hdr 1
6120 EOF
6121
6122 else
6123 echo "$ac_t""no" 1>&6
6124 fi
6125 done
6126
6127 for ac_func in getpagesize
6128 do
6129 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6130 echo "configure:6131: checking for $ac_func" >&5
6131 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6132 echo $ac_n "(cached) $ac_c" 1>&6
6133 else
6134 cat > conftest.$ac_ext <<EOF
6135 #line 6136 "configure"
6136 #include "confdefs.h"
6137 /* System header to define __stub macros and hopefully few prototypes,
6138 which can conflict with char $ac_func(); below. */
6139 #include <assert.h>
6140 /* Override any gcc2 internal prototype to avoid an error. */
6141 /* We use char because int might match the return type of a gcc2
6142 builtin and then its argument prototype would still apply. */
6143 char $ac_func();
6144
6145 int main() {
6146
6147 /* The GNU C library defines this for functions which it implements
6148 to always fail with ENOSYS. Some functions are actually named
6149 something starting with __ and the normal name is an alias. */
6150 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6151 choke me
6152 #else
6153 $ac_func();
6154 #endif
6155
6156 ; return 0; }
6157 EOF
6158 if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6159 rm -rf conftest*
6160 eval "ac_cv_func_$ac_func=yes"
6161 else
6162 echo "configure: failed program was:" >&5
6163 cat conftest.$ac_ext >&5
6164 rm -rf conftest*
6165 eval "ac_cv_func_$ac_func=no"
6166 fi
6167 rm -f conftest*
6168 fi
6169
6170 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6171 echo "$ac_t""yes" 1>&6
6172 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6173 cat >> confdefs.h <<EOF
6174 #define $ac_tr_func 1
6175 EOF
6176
6177 else
6178 echo "$ac_t""no" 1>&6
6179 fi
6180 done
6181
6182 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6183 echo "configure:6184: checking for working mmap" >&5
6184 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6185 echo $ac_n "(cached) $ac_c" 1>&6
6186 else
6187 if test "$cross_compiling" = yes; then
6188 ac_cv_func_mmap_fixed_mapped=no
6189 else
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193
6194 /* Thanks to Mike Haertel and Jim Avera for this test.
6195 Here is a matrix of mmap possibilities:
6196 mmap private not fixed
6197 mmap private fixed at somewhere currently unmapped
6198 mmap private fixed at somewhere already mapped
6199 mmap shared not fixed
6200 mmap shared fixed at somewhere currently unmapped
6201 mmap shared fixed at somewhere already mapped
6202 For private mappings, we should verify that changes cannot be read()
6203 back from the file, nor mmap's back from the file at a different
6204 address. (There have been systems where private was not correctly
6205 implemented like the infamous i386 svr4.0, and systems where the
6206 VM page cache was not coherent with the filesystem buffer cache
6207 like early versions of FreeBSD and possibly contemporary NetBSD.)
6208 For shared mappings, we should conversely verify that changes get
6209 propogated back to all the places they're supposed to be.
6210
6211 Grep wants private fixed already mapped.
6212 The main things grep needs to know about mmap are:
6213 * does it exist and is it safe to write into the mmap'd area
6214 * how to use it (BSD variants) */
6215 #include <sys/types.h>
6216 #include <fcntl.h>
6217 #include <sys/mman.h>
6218
6219 /* This mess was copied from the GNU getpagesize.h. */
6220 #ifndef HAVE_GETPAGESIZE
6221 # ifdef HAVE_UNISTD_H
6222 # include <unistd.h>
6223 # endif
6224
6225 /* Assume that all systems that can run configure have sys/param.h. */
6226 # ifndef HAVE_SYS_PARAM_H
6227 # define HAVE_SYS_PARAM_H 1
6228 # endif
6229
6230 # ifdef _SC_PAGESIZE
6231 # define getpagesize() sysconf(_SC_PAGESIZE)
6232 # else /* no _SC_PAGESIZE */
6233 # ifdef HAVE_SYS_PARAM_H
6234 # include <sys/param.h>
6235 # ifdef EXEC_PAGESIZE
6236 # define getpagesize() EXEC_PAGESIZE
6237 # else /* no EXEC_PAGESIZE */
6238 # ifdef NBPG
6239 # define getpagesize() NBPG * CLSIZE
6240 # ifndef CLSIZE
6241 # define CLSIZE 1
6242 # endif /* no CLSIZE */
6243 # else /* no NBPG */
6244 # ifdef NBPC
6245 # define getpagesize() NBPC
6246 # else /* no NBPC */
6247 # ifdef PAGESIZE
6248 # define getpagesize() PAGESIZE
6249 # endif /* PAGESIZE */
6250 # endif /* no NBPC */
6251 # endif /* no NBPG */
6252 # endif /* no EXEC_PAGESIZE */
6253 # else /* no HAVE_SYS_PARAM_H */
6254 # define getpagesize() 8192 /* punt totally */
6255 # endif /* no HAVE_SYS_PARAM_H */
6256 # endif /* no _SC_PAGESIZE */
6257
6258 #endif /* no HAVE_GETPAGESIZE */
6259
6260 #ifdef __cplusplus
6261 extern "C" { void *malloc(unsigned); }
6262 #else
6263 char *malloc();
6264 #endif
6265
6266 int
6267 main()
6268 {
6269 char *data, *data2, *data3;
6270 int i, pagesize;
6271 int fd;
6272
6273 pagesize = getpagesize();
6274
6275 /*
6276 * First, make a file with some known garbage in it.
6277 */
6278 data = malloc(pagesize);
6279 if (!data)
6280 exit(1);
6281 for (i = 0; i < pagesize; ++i)
6282 *(data + i) = rand();
6283 umask(0);
6284 fd = creat("conftestmmap", 0600);
6285 if (fd < 0)
6286 exit(1);
6287 if (write(fd, data, pagesize) != pagesize)
6288 exit(1);
6289 close(fd);
6290
6291 /*
6292 * Next, try to mmap the file at a fixed address which
6293 * already has something else allocated at it. If we can,
6294 * also make sure that we see the same garbage.
6295 */
6296 fd = open("conftestmmap", O_RDWR);
6297 if (fd < 0)
6298 exit(1);
6299 data2 = malloc(2 * pagesize);
6300 if (!data2)
6301 exit(1);
6302 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6303 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6304 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6305 exit(1);
6306 for (i = 0; i < pagesize; ++i)
6307 if (*(data + i) != *(data2 + i))
6308 exit(1);
6309
6310 /*
6311 * Finally, make sure that changes to the mapped area
6312 * do not percolate back to the file as seen by read().
6313 * (This is a bug on some variants of i386 svr4.0.)
6314 */
6315 for (i = 0; i < pagesize; ++i)
6316 *(data2 + i) = *(data2 + i) + 1;
6317 data3 = malloc(pagesize);
6318 if (!data3)
6319 exit(1);
6320 if (read(fd, data3, pagesize) != pagesize)
6321 exit(1);
6322 for (i = 0; i < pagesize; ++i)
6323 if (*(data + i) != *(data3 + i))
6324 exit(1);
6325 close(fd);
6326 unlink("conftestmmap");
6327 exit(0);
6328 }
6329
6330 EOF
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6332 then
6333 ac_cv_func_mmap_fixed_mapped=yes
6334 else
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6337 rm -fr conftest*
6338 ac_cv_func_mmap_fixed_mapped=no
6339 fi
6340 rm -fr conftest*
6341 fi
6342
6343 fi
6344
6345 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6346 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6347 cat >> confdefs.h <<\EOF
6348 #define HAVE_MMAP 1
6349 EOF
6350
6351 fi
6352
6353 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6354 echo "configure:6355: checking for pid_t" >&5
6355 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6356 echo $ac_n "(cached) $ac_c" 1>&6
6357 else
6358 cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6361 #include <sys/types.h>
6362 #if STDC_HEADERS
6363 #include <stdlib.h>
6364 #include <stddef.h>
6365 #endif
6366 EOF
6367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6368 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6369 rm -rf conftest*
6370 ac_cv_type_pid_t=yes
6371 else
6372 rm -rf conftest*
6373 ac_cv_type_pid_t=no
6374 fi
6375 rm -f conftest*
6376
6377 fi
6378 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6379 if test $ac_cv_type_pid_t = no; then
6380 cat >> confdefs.h <<\EOF
6381 #define pid_t int
6382 EOF
6383
6384 fi
6385
6386 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6387 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6388 echo "configure:6389: checking for vfork.h" >&5
6389 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6390 echo $ac_n "(cached) $ac_c" 1>&6
6391 else
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 #include <vfork.h>
6396 EOF
6397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6398 { (eval echo configure:6399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6400 if test -z "$ac_err"; then
6401 rm -rf conftest*
6402 eval "ac_cv_header_$ac_safe=yes"
6403 else
6404 echo "$ac_err" >&5
6405 echo "configure: failed program was:" >&5
6406 cat conftest.$ac_ext >&5
6407 rm -rf conftest*
6408 eval "ac_cv_header_$ac_safe=no"
6409 fi
6410 rm -f conftest*
6411 fi
6412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6413 echo "$ac_t""yes" 1>&6
6414 cat >> confdefs.h <<\EOF
6415 #define HAVE_VFORK_H 1
6416 EOF
6417
6418 else
6419 echo "$ac_t""no" 1>&6
6420 fi
6421
6422 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6423 echo "configure:6424: checking for working vfork" >&5
6424 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6425 echo $ac_n "(cached) $ac_c" 1>&6
6426 else
6427 if test "$cross_compiling" = yes; then
6428 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6429 echo "configure:6430: checking for vfork" >&5
6430 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6431 echo $ac_n "(cached) $ac_c" 1>&6
6432 else
6433 cat > conftest.$ac_ext <<EOF
6434 #line 6435 "configure"
6435 #include "confdefs.h"
6436 /* System header to define __stub macros and hopefully few prototypes,
6437 which can conflict with char vfork(); below. */
6438 #include <assert.h>
6439 /* Override any gcc2 internal prototype to avoid an error. */
6440 /* We use char because int might match the return type of a gcc2
6441 builtin and then its argument prototype would still apply. */
6442 char vfork();
6443
6444 int main() {
6445
6446 /* The GNU C library defines this for functions which it implements
6447 to always fail with ENOSYS. Some functions are actually named
6448 something starting with __ and the normal name is an alias. */
6449 #if defined (__stub_vfork) || defined (__stub___vfork)
6450 choke me
6451 #else
6452 vfork();
6453 #endif
6454
6455 ; return 0; }
6456 EOF
6457 if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6458 rm -rf conftest*
6459 eval "ac_cv_func_vfork=yes"
6460 else
6461 echo "configure: failed program was:" >&5
6462 cat conftest.$ac_ext >&5
6463 rm -rf conftest*
6464 eval "ac_cv_func_vfork=no"
6465 fi
6466 rm -f conftest*
6467 fi
6468
6469 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6470 echo "$ac_t""yes" 1>&6
6471 :
6472 else
6473 echo "$ac_t""no" 1>&6
6474 fi
6475
6476 ac_cv_func_vfork_works=$ac_cv_func_vfork
6477 else
6478 cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481 /* Thanks to Paul Eggert for this test. */
6482 #include <stdio.h>
6483 #include <sys/types.h>
6484 #include <sys/stat.h>
6485 #ifdef HAVE_UNISTD_H
6486 #include <unistd.h>
6487 #endif
6488 #ifdef HAVE_VFORK_H
6489 #include <vfork.h>
6490 #endif
6491 /* On some sparc systems, changes by the child to local and incoming
6492 argument registers are propagated back to the parent.
6493 The compiler is told about this with #include <vfork.h>,
6494 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6495 Test for this by using a static variable whose address
6496 is put into a register that is clobbered by the vfork. */
6497 static
6498 #ifdef __cplusplus
6499 sparc_address_test (int arg)
6500 #else
6501 sparc_address_test (arg) int arg;
6502 #endif
6503 {
6504 static pid_t child;
6505 if (!child) {
6506 child = vfork ();
6507 if (child < 0) {
6508 perror ("vfork");
6509 _exit(2);
6510 }
6511 if (!child) {
6512 arg = getpid();
6513 write(-1, "", 0);
6514 _exit (arg);
6515 }
6516 }
6517 }
6518 main() {
6519 pid_t parent = getpid ();
6520 pid_t child;
6521
6522 sparc_address_test ();
6523
6524 child = vfork ();
6525
6526 if (child == 0) {
6527 /* Here is another test for sparc vfork register problems.
6528 This test uses lots of local variables, at least
6529 as many local variables as main has allocated so far
6530 including compiler temporaries. 4 locals are enough for
6531 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6532 A buggy compiler should reuse the register of parent
6533 for one of the local variables, since it will think that
6534 parent can't possibly be used any more in this routine.
6535 Assigning to the local variable will thus munge parent
6536 in the parent process. */
6537 pid_t
6538 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6539 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6540 /* Convince the compiler that p..p7 are live; otherwise, it might
6541 use the same hardware register for all 8 local variables. */
6542 if (p != p1 || p != p2 || p != p3 || p != p4
6543 || p != p5 || p != p6 || p != p7)
6544 _exit(1);
6545
6546 /* On some systems (e.g. IRIX 3.3),
6547 vfork doesn't separate parent from child file descriptors.
6548 If the child closes a descriptor before it execs or exits,
6549 this munges the parent's descriptor as well.
6550 Test for this by closing stdout in the child. */
6551 _exit(close(fileno(stdout)) != 0);
6552 } else {
6553 int status;
6554 struct stat st;
6555
6556 while (wait(&status) != child)
6557 ;
6558 exit(
6559 /* Was there some problem with vforking? */
6560 child < 0
6561
6562 /* Did the child fail? (This shouldn't happen.) */
6563 || status
6564
6565 /* Did the vfork/compiler bug occur? */
6566 || parent != getpid()
6567
6568 /* Did the file descriptor bug occur? */
6569 || fstat(fileno(stdout), &st) != 0
6570 );
6571 }
6572 }
6573 EOF
6574 if { (eval echo configure:6575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6575 then
6576 ac_cv_func_vfork_works=yes
6577 else
6578 echo "configure: failed program was:" >&5
6579 cat conftest.$ac_ext >&5
6580 rm -fr conftest*
6581 ac_cv_func_vfork_works=no
6582 fi
6583 rm -fr conftest*
6584 fi
6585
6586 fi
6587
6588 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6589 if test $ac_cv_func_vfork_works = no; then
6590 cat >> confdefs.h <<\EOF
6591 #define vfork fork
6592 EOF
6593
6594 fi
6595
6596 for ac_func in canonicalize_file_name realpath
6597 do
6598 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6599 echo "configure:6600: checking for $ac_func" >&5
6600 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6601 echo $ac_n "(cached) $ac_c" 1>&6
6602 else
6603 cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 /* System header to define __stub macros and hopefully few prototypes,
6607 which can conflict with char $ac_func(); below. */
6608 #include <assert.h>
6609 /* Override any gcc2 internal prototype to avoid an error. */
6610 /* We use char because int might match the return type of a gcc2
6611 builtin and then its argument prototype would still apply. */
6612 char $ac_func();
6613
6614 int main() {
6615
6616 /* The GNU C library defines this for functions which it implements
6617 to always fail with ENOSYS. Some functions are actually named
6618 something starting with __ and the normal name is an alias. */
6619 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6620 choke me
6621 #else
6622 $ac_func();
6623 #endif
6624
6625 ; return 0; }
6626 EOF
6627 if { (eval echo configure:6628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6628 rm -rf conftest*
6629 eval "ac_cv_func_$ac_func=yes"
6630 else
6631 echo "configure: failed program was:" >&5
6632 cat conftest.$ac_ext >&5
6633 rm -rf conftest*
6634 eval "ac_cv_func_$ac_func=no"
6635 fi
6636 rm -f conftest*
6637 fi
6638
6639 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6640 echo "$ac_t""yes" 1>&6
6641 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6642 cat >> confdefs.h <<EOF
6643 #define $ac_tr_func 1
6644 EOF
6645
6646 else
6647 echo "$ac_t""no" 1>&6
6648 fi
6649 done
6650
6651 for ac_func in poll
6652 do
6653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6654 echo "configure:6655: checking for $ac_func" >&5
6655 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6656 echo $ac_n "(cached) $ac_c" 1>&6
6657 else
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662 which can conflict with char $ac_func(); below. */
6663 #include <assert.h>
6664 /* Override any gcc2 internal prototype to avoid an error. */
6665 /* We use char because int might match the return type of a gcc2
6666 builtin and then its argument prototype would still apply. */
6667 char $ac_func();
6668
6669 int main() {
6670
6671 /* The GNU C library defines this for functions which it implements
6672 to always fail with ENOSYS. Some functions are actually named
6673 something starting with __ and the normal name is an alias. */
6674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6675 choke me
6676 #else
6677 $ac_func();
6678 #endif
6679
6680 ; return 0; }
6681 EOF
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6683 rm -rf conftest*
6684 eval "ac_cv_func_$ac_func=yes"
6685 else
6686 echo "configure: failed program was:" >&5
6687 cat conftest.$ac_ext >&5
6688 rm -rf conftest*
6689 eval "ac_cv_func_$ac_func=no"
6690 fi
6691 rm -f conftest*
6692 fi
6693
6694 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6695 echo "$ac_t""yes" 1>&6
6696 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6697 cat >> confdefs.h <<EOF
6698 #define $ac_tr_func 1
6699 EOF
6700
6701 else
6702 echo "$ac_t""no" 1>&6
6703 fi
6704 done
6705
6706 for ac_func in pread64
6707 do
6708 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6709 echo "configure:6710: checking for $ac_func" >&5
6710 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6711 echo $ac_n "(cached) $ac_c" 1>&6
6712 else
6713 cat > conftest.$ac_ext <<EOF
6714 #line 6715 "configure"
6715 #include "confdefs.h"
6716 /* System header to define __stub macros and hopefully few prototypes,
6717 which can conflict with char $ac_func(); below. */
6718 #include <assert.h>
6719 /* Override any gcc2 internal prototype to avoid an error. */
6720 /* We use char because int might match the return type of a gcc2
6721 builtin and then its argument prototype would still apply. */
6722 char $ac_func();
6723
6724 int main() {
6725
6726 /* The GNU C library defines this for functions which it implements
6727 to always fail with ENOSYS. Some functions are actually named
6728 something starting with __ and the normal name is an alias. */
6729 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6730 choke me
6731 #else
6732 $ac_func();
6733 #endif
6734
6735 ; return 0; }
6736 EOF
6737 if { (eval echo configure:6738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6738 rm -rf conftest*
6739 eval "ac_cv_func_$ac_func=yes"
6740 else
6741 echo "configure: failed program was:" >&5
6742 cat conftest.$ac_ext >&5
6743 rm -rf conftest*
6744 eval "ac_cv_func_$ac_func=no"
6745 fi
6746 rm -f conftest*
6747 fi
6748
6749 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6750 echo "$ac_t""yes" 1>&6
6751 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6752 cat >> confdefs.h <<EOF
6753 #define $ac_tr_func 1
6754 EOF
6755
6756 else
6757 echo "$ac_t""no" 1>&6
6758 fi
6759 done
6760
6761 for ac_func in sbrk
6762 do
6763 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6764 echo "configure:6765: checking for $ac_func" >&5
6765 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6766 echo $ac_n "(cached) $ac_c" 1>&6
6767 else
6768 cat > conftest.$ac_ext <<EOF
6769 #line 6770 "configure"
6770 #include "confdefs.h"
6771 /* System header to define __stub macros and hopefully few prototypes,
6772 which can conflict with char $ac_func(); below. */
6773 #include <assert.h>
6774 /* Override any gcc2 internal prototype to avoid an error. */
6775 /* We use char because int might match the return type of a gcc2
6776 builtin and then its argument prototype would still apply. */
6777 char $ac_func();
6778
6779 int main() {
6780
6781 /* The GNU C library defines this for functions which it implements
6782 to always fail with ENOSYS. Some functions are actually named
6783 something starting with __ and the normal name is an alias. */
6784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6785 choke me
6786 #else
6787 $ac_func();
6788 #endif
6789
6790 ; return 0; }
6791 EOF
6792 if { (eval echo configure:6793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6793 rm -rf conftest*
6794 eval "ac_cv_func_$ac_func=yes"
6795 else
6796 echo "configure: failed program was:" >&5
6797 cat conftest.$ac_ext >&5
6798 rm -rf conftest*
6799 eval "ac_cv_func_$ac_func=no"
6800 fi
6801 rm -f conftest*
6802 fi
6803
6804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6805 echo "$ac_t""yes" 1>&6
6806 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6807 cat >> confdefs.h <<EOF
6808 #define $ac_tr_func 1
6809 EOF
6810
6811 else
6812 echo "$ac_t""no" 1>&6
6813 fi
6814 done
6815
6816 for ac_func in setpgid setpgrp
6817 do
6818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6819 echo "configure:6820: checking for $ac_func" >&5
6820 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6821 echo $ac_n "(cached) $ac_c" 1>&6
6822 else
6823 cat > conftest.$ac_ext <<EOF
6824 #line 6825 "configure"
6825 #include "confdefs.h"
6826 /* System header to define __stub macros and hopefully few prototypes,
6827 which can conflict with char $ac_func(); below. */
6828 #include <assert.h>
6829 /* Override any gcc2 internal prototype to avoid an error. */
6830 /* We use char because int might match the return type of a gcc2
6831 builtin and then its argument prototype would still apply. */
6832 char $ac_func();
6833
6834 int main() {
6835
6836 /* The GNU C library defines this for functions which it implements
6837 to always fail with ENOSYS. Some functions are actually named
6838 something starting with __ and the normal name is an alias. */
6839 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6840 choke me
6841 #else
6842 $ac_func();
6843 #endif
6844
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848 rm -rf conftest*
6849 eval "ac_cv_func_$ac_func=yes"
6850 else
6851 echo "configure: failed program was:" >&5
6852 cat conftest.$ac_ext >&5
6853 rm -rf conftest*
6854 eval "ac_cv_func_$ac_func=no"
6855 fi
6856 rm -f conftest*
6857 fi
6858
6859 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6860 echo "$ac_t""yes" 1>&6
6861 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6862 cat >> confdefs.h <<EOF
6863 #define $ac_tr_func 1
6864 EOF
6865
6866 else
6867 echo "$ac_t""no" 1>&6
6868 fi
6869 done
6870
6871 for ac_func in sigaction sigprocmask sigsetmask
6872 do
6873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6874 echo "configure:6875: checking for $ac_func" >&5
6875 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6876 echo $ac_n "(cached) $ac_c" 1>&6
6877 else
6878 cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 /* System header to define __stub macros and hopefully few prototypes,
6882 which can conflict with char $ac_func(); below. */
6883 #include <assert.h>
6884 /* Override any gcc2 internal prototype to avoid an error. */
6885 /* We use char because int might match the return type of a gcc2
6886 builtin and then its argument prototype would still apply. */
6887 char $ac_func();
6888
6889 int main() {
6890
6891 /* The GNU C library defines this for functions which it implements
6892 to always fail with ENOSYS. Some functions are actually named
6893 something starting with __ and the normal name is an alias. */
6894 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6895 choke me
6896 #else
6897 $ac_func();
6898 #endif
6899
6900 ; return 0; }
6901 EOF
6902 if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6903 rm -rf conftest*
6904 eval "ac_cv_func_$ac_func=yes"
6905 else
6906 echo "configure: failed program was:" >&5
6907 cat conftest.$ac_ext >&5
6908 rm -rf conftest*
6909 eval "ac_cv_func_$ac_func=no"
6910 fi
6911 rm -f conftest*
6912 fi
6913
6914 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6915 echo "$ac_t""yes" 1>&6
6916 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6917 cat >> confdefs.h <<EOF
6918 #define $ac_tr_func 1
6919 EOF
6920
6921 else
6922 echo "$ac_t""no" 1>&6
6923 fi
6924 done
6925
6926 for ac_func in socketpair
6927 do
6928 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6929 echo "configure:6930: checking for $ac_func" >&5
6930 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6931 echo $ac_n "(cached) $ac_c" 1>&6
6932 else
6933 cat > conftest.$ac_ext <<EOF
6934 #line 6935 "configure"
6935 #include "confdefs.h"
6936 /* System header to define __stub macros and hopefully few prototypes,
6937 which can conflict with char $ac_func(); below. */
6938 #include <assert.h>
6939 /* Override any gcc2 internal prototype to avoid an error. */
6940 /* We use char because int might match the return type of a gcc2
6941 builtin and then its argument prototype would still apply. */
6942 char $ac_func();
6943
6944 int main() {
6945
6946 /* The GNU C library defines this for functions which it implements
6947 to always fail with ENOSYS. Some functions are actually named
6948 something starting with __ and the normal name is an alias. */
6949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6950 choke me
6951 #else
6952 $ac_func();
6953 #endif
6954
6955 ; return 0; }
6956 EOF
6957 if { (eval echo configure:6958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6958 rm -rf conftest*
6959 eval "ac_cv_func_$ac_func=yes"
6960 else
6961 echo "configure: failed program was:" >&5
6962 cat conftest.$ac_ext >&5
6963 rm -rf conftest*
6964 eval "ac_cv_func_$ac_func=no"
6965 fi
6966 rm -f conftest*
6967 fi
6968
6969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6970 echo "$ac_t""yes" 1>&6
6971 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6972 cat >> confdefs.h <<EOF
6973 #define $ac_tr_func 1
6974 EOF
6975
6976 else
6977 echo "$ac_t""no" 1>&6
6978 fi
6979 done
6980
6981 for ac_func in syscall
6982 do
6983 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6984 echo "configure:6985: checking for $ac_func" >&5
6985 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6986 echo $ac_n "(cached) $ac_c" 1>&6
6987 else
6988 cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991 /* System header to define __stub macros and hopefully few prototypes,
6992 which can conflict with char $ac_func(); below. */
6993 #include <assert.h>
6994 /* Override any gcc2 internal prototype to avoid an error. */
6995 /* We use char because int might match the return type of a gcc2
6996 builtin and then its argument prototype would still apply. */
6997 char $ac_func();
6998
6999 int main() {
7000
7001 /* The GNU C library defines this for functions which it implements
7002 to always fail with ENOSYS. Some functions are actually named
7003 something starting with __ and the normal name is an alias. */
7004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7005 choke me
7006 #else
7007 $ac_func();
7008 #endif
7009
7010 ; return 0; }
7011 EOF
7012 if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7013 rm -rf conftest*
7014 eval "ac_cv_func_$ac_func=yes"
7015 else
7016 echo "configure: failed program was:" >&5
7017 cat conftest.$ac_ext >&5
7018 rm -rf conftest*
7019 eval "ac_cv_func_$ac_func=no"
7020 fi
7021 rm -f conftest*
7022 fi
7023
7024 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7025 echo "$ac_t""yes" 1>&6
7026 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7027 cat >> confdefs.h <<EOF
7028 #define $ac_tr_func 1
7029 EOF
7030
7031 else
7032 echo "$ac_t""no" 1>&6
7033 fi
7034 done
7035
7036
7037 if test "$cross_compiling" = no; then
7038 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7039 echo "configure:7040: checking whether setpgrp takes no argument" >&5
7040 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7041 echo $ac_n "(cached) $ac_c" 1>&6
7042 else
7043 if test "$cross_compiling" = yes; then
7044 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
7045 else
7046 cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049
7050 #ifdef HAVE_UNISTD_H
7051 #include <unistd.h>
7052 #endif
7053
7054 /*
7055 * If this system has a BSD-style setpgrp, which takes arguments, exit
7056 * successfully.
7057 */
7058 main()
7059 {
7060 if (setpgrp(1,1) == -1)
7061 exit(0);
7062 else
7063 exit(1);
7064 }
7065
7066 EOF
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7068 then
7069 ac_cv_func_setpgrp_void=no
7070 else
7071 echo "configure: failed program was:" >&5
7072 cat conftest.$ac_ext >&5
7073 rm -fr conftest*
7074 ac_cv_func_setpgrp_void=yes
7075 fi
7076 rm -fr conftest*
7077 fi
7078
7079
7080 fi
7081
7082 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7083 if test $ac_cv_func_setpgrp_void = yes; then
7084 cat >> confdefs.h <<\EOF
7085 #define SETPGRP_VOID 1
7086 EOF
7087
7088 fi
7089
7090 else
7091 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7092 echo "configure:7093: checking whether setpgrp takes no argument" >&5
7093 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7094 echo $ac_n "(cached) $ac_c" 1>&6
7095 else
7096 cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099
7100 #include <unistd.h>
7101
7102 int main() {
7103
7104 if (setpgrp(1,1) == -1)
7105 exit (0);
7106 else
7107 exit (1);
7108
7109 ; return 0; }
7110 EOF
7111 if { (eval echo configure:7112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7112 rm -rf conftest*
7113 ac_cv_func_setpgrp_void=no
7114 else
7115 echo "configure: failed program was:" >&5
7116 cat conftest.$ac_ext >&5
7117 rm -rf conftest*
7118 ac_cv_func_setpgrp_void=yes
7119 fi
7120 rm -f conftest*
7121 fi
7122
7123 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7124 if test $ac_cv_func_setpgrp_void = yes; then
7125 cat >> confdefs.h <<\EOF
7126 #define SETPGRP_VOID 1
7127 EOF
7128
7129 fi
7130 fi
7131
7132 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7133 # since sigsetjmp might only be defined as a macro.
7134 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7135 echo "configure:7136: checking for sigsetjmp" >&5
7136 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
7137 echo $ac_n "(cached) $ac_c" 1>&6
7138 else
7139 cat > conftest.$ac_ext <<EOF
7140 #line 7141 "configure"
7141 #include "confdefs.h"
7142
7143 #include <setjmp.h>
7144
7145 int main() {
7146 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7147 ; return 0; }
7148 EOF
7149 if { (eval echo configure:7150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7150 rm -rf conftest*
7151 gdb_cv_func_sigsetjmp=yes
7152 else
7153 echo "configure: failed program was:" >&5
7154 cat conftest.$ac_ext >&5
7155 rm -rf conftest*
7156 gdb_cv_func_sigsetjmp=no
7157 fi
7158 rm -f conftest*
7159 fi
7160
7161 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7162 if test $gdb_cv_func_sigsetjmp = yes; then
7163 cat >> confdefs.h <<\EOF
7164 #define HAVE_SIGSETJMP 1
7165 EOF
7166
7167 fi
7168
7169 # Assume we'll default to using the included libiberty regex.
7170 gdb_use_included_regex=yes
7171
7172 # However, if the system regex is GNU regex, then default to *not*
7173 # using the included regex.
7174 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7175 echo "configure:7176: checking for GNU regex" >&5
7176 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7177 echo $ac_n "(cached) $ac_c" 1>&6
7178 else
7179 cat > conftest.$ac_ext <<EOF
7180 #line 7181 "configure"
7181 #include "confdefs.h"
7182 #include <gnu-versions.h>
7183 int main() {
7184 #define REGEX_INTERFACE_VERSION 1
7185 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7186 # error "Version mismatch"
7187 #endif
7188 ; return 0; }
7189 EOF
7190 if { (eval echo configure:7191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7191 rm -rf conftest*
7192 gdb_cv_have_gnu_regex=yes
7193 else
7194 echo "configure: failed program was:" >&5
7195 cat conftest.$ac_ext >&5
7196 rm -rf conftest*
7197 gdb_cv_have_gnu_regex=no
7198 fi
7199 rm -f conftest*
7200 fi
7201
7202 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7203 if test $gdb_cv_have_gnu_regex = yes; then
7204 gdb_use_included_regex=no
7205 fi
7206
7207 # Check whether --with-included-regex or --without-included-regex was given.
7208 if test "${with_included_regex+set}" = set; then
7209 withval="$with_included_regex"
7210 gdb_with_regex=$withval
7211 else
7212 gdb_with_regex=$gdb_use_included_regex
7213 fi
7214
7215 if test "$gdb_with_regex" = yes; then
7216 cat >> confdefs.h <<\EOF
7217 #define USE_INCLUDED_REGEX 1
7218 EOF
7219
7220 fi
7221
7222 # See if <machine/reg.h> degines `struct reg'.
7223 echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7224 echo "configure:7225: checking for struct reg in machine/reg.h" >&5
7225 if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7226 echo $ac_n "(cached) $ac_c" 1>&6
7227 else
7228 cat > conftest.$ac_ext <<EOF
7229 #line 7230 "configure"
7230 #include "confdefs.h"
7231 #include <sys/types.h>
7232 #include <machine/reg.h>
7233 int main() {
7234 struct reg r;
7235 ; return 0; }
7236 EOF
7237 if { (eval echo configure:7238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7238 rm -rf conftest*
7239 gdb_cv_struct_reg=yes
7240 else
7241 echo "configure: failed program was:" >&5
7242 cat conftest.$ac_ext >&5
7243 rm -rf conftest*
7244 gdb_cv_struct_reg=no
7245 fi
7246 rm -f conftest*
7247 fi
7248
7249 echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7250 if test $gdb_cv_struct_reg = yes; then
7251 cat >> confdefs.h <<\EOF
7252 #define HAVE_STRUCT_REG 1
7253 EOF
7254
7255 fi
7256
7257 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7258 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7259 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7260 echo "configure:7261: checking for r_fs in struct reg" >&5
7261 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7262 echo $ac_n "(cached) $ac_c" 1>&6
7263 else
7264 cat > conftest.$ac_ext <<EOF
7265 #line 7266 "configure"
7266 #include "confdefs.h"
7267 #include <machine/reg.h>
7268 int main() {
7269 struct reg r; r.r_fs;
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7273 rm -rf conftest*
7274 gdb_cv_struct_reg_r_fs=yes
7275 else
7276 echo "configure: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7278 rm -rf conftest*
7279 gdb_cv_struct_reg_r_fs=no
7280 fi
7281 rm -f conftest*
7282 fi
7283
7284 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7285 if test $gdb_cv_struct_reg_r_fs = yes; then
7286 cat >> confdefs.h <<\EOF
7287 #define HAVE_STRUCT_REG_R_FS 1
7288 EOF
7289
7290 fi
7291 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7292 echo "configure:7293: checking for r_gs in struct reg" >&5
7293 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7294 echo $ac_n "(cached) $ac_c" 1>&6
7295 else
7296 cat > conftest.$ac_ext <<EOF
7297 #line 7298 "configure"
7298 #include "confdefs.h"
7299 #include <machine/reg.h>
7300 int main() {
7301 struct reg r; r.r_gs;
7302 ; return 0; }
7303 EOF
7304 if { (eval echo configure:7305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7305 rm -rf conftest*
7306 gdb_cv_struct_reg_r_gs=yes
7307 else
7308 echo "configure: failed program was:" >&5
7309 cat conftest.$ac_ext >&5
7310 rm -rf conftest*
7311 gdb_cv_struct_reg_r_gs=no
7312 fi
7313 rm -f conftest*
7314 fi
7315
7316 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7317 if test $gdb_cv_struct_reg_r_gs = yes; then
7318 cat >> confdefs.h <<\EOF
7319 #define HAVE_STRUCT_REG_R_GS 1
7320 EOF
7321
7322 fi
7323
7324 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7325 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7326 echo "configure:7327: checking for PTRACE_GETREGS" >&5
7327 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
7328 echo $ac_n "(cached) $ac_c" 1>&6
7329 else
7330 cat > conftest.$ac_ext <<EOF
7331 #line 7332 "configure"
7332 #include "confdefs.h"
7333 #include <sys/ptrace.h>
7334 int main() {
7335 PTRACE_GETREGS;
7336 ; return 0; }
7337 EOF
7338 if { (eval echo configure:7339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7339 rm -rf conftest*
7340 gdb_cv_have_ptrace_getregs=yes
7341 else
7342 echo "configure: failed program was:" >&5
7343 cat conftest.$ac_ext >&5
7344 rm -rf conftest*
7345 gdb_cv_have_ptrace_getregs=no
7346 fi
7347 rm -f conftest*
7348 fi
7349
7350 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7351 if test $gdb_cv_have_ptrace_getregs = yes; then
7352 cat >> confdefs.h <<\EOF
7353 #define HAVE_PTRACE_GETREGS 1
7354 EOF
7355
7356 fi
7357
7358 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7359 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7360 echo "configure:7361: checking for PTRACE_GETFPXREGS" >&5
7361 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
7362 echo $ac_n "(cached) $ac_c" 1>&6
7363 else
7364 cat > conftest.$ac_ext <<EOF
7365 #line 7366 "configure"
7366 #include "confdefs.h"
7367 #include <sys/ptrace.h>
7368 int main() {
7369 PTRACE_GETFPXREGS;
7370 ; return 0; }
7371 EOF
7372 if { (eval echo configure:7373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7373 rm -rf conftest*
7374 gdb_cv_have_ptrace_getfpxregs=yes
7375 else
7376 echo "configure: failed program was:" >&5
7377 cat conftest.$ac_ext >&5
7378 rm -rf conftest*
7379 gdb_cv_have_ptrace_getfpxregs=no
7380 fi
7381 rm -f conftest*
7382 fi
7383
7384 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7385 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7386 cat >> confdefs.h <<\EOF
7387 #define HAVE_PTRACE_GETFPXREGS 1
7388 EOF
7389
7390 fi
7391
7392 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7393 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7394 echo "configure:7395: checking for PT_GETDBREGS" >&5
7395 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
7396 echo $ac_n "(cached) $ac_c" 1>&6
7397 else
7398 cat > conftest.$ac_ext <<EOF
7399 #line 7400 "configure"
7400 #include "confdefs.h"
7401 #include <sys/types.h>
7402 #include <sys/ptrace.h>
7403 int main() {
7404 PT_GETDBREGS;
7405 ; return 0; }
7406 EOF
7407 if { (eval echo configure:7408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7408 rm -rf conftest*
7409 gdb_cv_have_pt_getdbregs=yes
7410 else
7411 echo "configure: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 rm -rf conftest*
7414 gdb_cv_have_pt_getdbregs=no
7415 fi
7416 rm -f conftest*
7417 fi
7418
7419 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7420 if test $gdb_cv_have_pt_getdbregs = yes; then
7421 cat >> confdefs.h <<\EOF
7422 #define HAVE_PT_GETDBREGS 1
7423 EOF
7424
7425 fi
7426
7427 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7428 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7429 echo "configure:7430: checking for PT_GETXMMREGS" >&5
7430 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
7431 echo $ac_n "(cached) $ac_c" 1>&6
7432 else
7433 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436 #include <sys/types.h>
7437 #include <sys/ptrace.h>
7438 int main() {
7439 PT_GETXMMREGS;
7440 ; return 0; }
7441 EOF
7442 if { (eval echo configure:7443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7443 rm -rf conftest*
7444 gdb_cv_have_pt_getxmmregs=yes
7445 else
7446 echo "configure: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 rm -rf conftest*
7449 gdb_cv_have_pt_getxmmregs=no
7450 fi
7451 rm -f conftest*
7452 fi
7453
7454 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7455 if test $gdb_cv_have_pt_getxmmregs = yes; then
7456 cat >> confdefs.h <<\EOF
7457 #define HAVE_PT_GETXMMREGS 1
7458 EOF
7459
7460 fi
7461
7462 # See if stdint.h provides the uintptr_t type.
7463 # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
7464 echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7465 echo "configure:7466: checking for uintptr_t in stdint.h" >&5
7466 if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7467 echo $ac_n "(cached) $ac_c" 1>&6
7468 else
7469 cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7472 #include <stdint.h>
7473 int main() {
7474 uintptr_t foo = 0;
7475 ; return 0; }
7476 EOF
7477 if { (eval echo configure:7478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7478 rm -rf conftest*
7479 gdb_cv_have_uintptr_t=yes
7480 else
7481 echo "configure: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7483 rm -rf conftest*
7484 gdb_cv_have_uintptr_t=no
7485 fi
7486 rm -f conftest*
7487 fi
7488
7489 echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7490 if test $gdb_cv_have_uintptr_t = yes; then
7491 cat >> confdefs.h <<\EOF
7492 #define HAVE_UINTPTR_T 1
7493 EOF
7494
7495 fi
7496
7497 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7498 echo "configure:7499: checking whether malloc must be declared" >&5
7499 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
7500 echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502 cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505
7506 #include <stdio.h>
7507 #ifdef HAVE_STRING_H
7508 #include <string.h>
7509 #else
7510 #ifdef HAVE_STRINGS_H
7511 #include <strings.h>
7512 #endif
7513 #endif
7514 #ifdef HAVE_STDLIB_H
7515 #include <stdlib.h>
7516 #endif
7517 #ifdef HAVE_UNISTD_H
7518 #include <unistd.h>
7519 #endif
7520 int main() {
7521 char *(*pfn) = (char *(*)) malloc
7522 ; return 0; }
7523 EOF
7524 if { (eval echo configure:7525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7525 rm -rf conftest*
7526 bfd_cv_decl_needed_malloc=no
7527 else
7528 echo "configure: failed program was:" >&5
7529 cat conftest.$ac_ext >&5
7530 rm -rf conftest*
7531 bfd_cv_decl_needed_malloc=yes
7532 fi
7533 rm -f conftest*
7534 fi
7535
7536 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7537 if test $bfd_cv_decl_needed_malloc = yes; then
7538 cat >> confdefs.h <<\EOF
7539 #define NEED_DECLARATION_MALLOC 1
7540 EOF
7541
7542 fi
7543
7544 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7545 echo "configure:7546: checking whether realloc must be declared" >&5
7546 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
7547 echo $ac_n "(cached) $ac_c" 1>&6
7548 else
7549 cat > conftest.$ac_ext <<EOF
7550 #line 7551 "configure"
7551 #include "confdefs.h"
7552
7553 #include <stdio.h>
7554 #ifdef HAVE_STRING_H
7555 #include <string.h>
7556 #else
7557 #ifdef HAVE_STRINGS_H
7558 #include <strings.h>
7559 #endif
7560 #endif
7561 #ifdef HAVE_STDLIB_H
7562 #include <stdlib.h>
7563 #endif
7564 #ifdef HAVE_UNISTD_H
7565 #include <unistd.h>
7566 #endif
7567 int main() {
7568 char *(*pfn) = (char *(*)) realloc
7569 ; return 0; }
7570 EOF
7571 if { (eval echo configure:7572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7572 rm -rf conftest*
7573 bfd_cv_decl_needed_realloc=no
7574 else
7575 echo "configure: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7577 rm -rf conftest*
7578 bfd_cv_decl_needed_realloc=yes
7579 fi
7580 rm -f conftest*
7581 fi
7582
7583 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7584 if test $bfd_cv_decl_needed_realloc = yes; then
7585 cat >> confdefs.h <<\EOF
7586 #define NEED_DECLARATION_REALLOC 1
7587 EOF
7588
7589 fi
7590
7591 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7592 echo "configure:7593: checking whether free must be declared" >&5
7593 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
7594 echo $ac_n "(cached) $ac_c" 1>&6
7595 else
7596 cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599
7600 #include <stdio.h>
7601 #ifdef HAVE_STRING_H
7602 #include <string.h>
7603 #else
7604 #ifdef HAVE_STRINGS_H
7605 #include <strings.h>
7606 #endif
7607 #endif
7608 #ifdef HAVE_STDLIB_H
7609 #include <stdlib.h>
7610 #endif
7611 #ifdef HAVE_UNISTD_H
7612 #include <unistd.h>
7613 #endif
7614 int main() {
7615 char *(*pfn) = (char *(*)) free
7616 ; return 0; }
7617 EOF
7618 if { (eval echo configure:7619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7619 rm -rf conftest*
7620 bfd_cv_decl_needed_free=no
7621 else
7622 echo "configure: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 rm -rf conftest*
7625 bfd_cv_decl_needed_free=yes
7626 fi
7627 rm -f conftest*
7628 fi
7629
7630 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7631 if test $bfd_cv_decl_needed_free = yes; then
7632 cat >> confdefs.h <<\EOF
7633 #define NEED_DECLARATION_FREE 1
7634 EOF
7635
7636 fi
7637
7638 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
7639 echo "configure:7640: checking whether strerror must be declared" >&5
7640 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
7641 echo $ac_n "(cached) $ac_c" 1>&6
7642 else
7643 cat > conftest.$ac_ext <<EOF
7644 #line 7645 "configure"
7645 #include "confdefs.h"
7646
7647 #include <stdio.h>
7648 #ifdef HAVE_STRING_H
7649 #include <string.h>
7650 #else
7651 #ifdef HAVE_STRINGS_H
7652 #include <strings.h>
7653 #endif
7654 #endif
7655 #ifdef HAVE_STDLIB_H
7656 #include <stdlib.h>
7657 #endif
7658 #ifdef HAVE_UNISTD_H
7659 #include <unistd.h>
7660 #endif
7661 int main() {
7662 char *(*pfn) = (char *(*)) strerror
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7666 rm -rf conftest*
7667 bfd_cv_decl_needed_strerror=no
7668 else
7669 echo "configure: failed program was:" >&5
7670 cat conftest.$ac_ext >&5
7671 rm -rf conftest*
7672 bfd_cv_decl_needed_strerror=yes
7673 fi
7674 rm -f conftest*
7675 fi
7676
7677 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7678 if test $bfd_cv_decl_needed_strerror = yes; then
7679 cat >> confdefs.h <<\EOF
7680 #define NEED_DECLARATION_STRERROR 1
7681 EOF
7682
7683 fi
7684
7685 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
7686 echo "configure:7687: checking whether strdup must be declared" >&5
7687 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
7688 echo $ac_n "(cached) $ac_c" 1>&6
7689 else
7690 cat > conftest.$ac_ext <<EOF
7691 #line 7692 "configure"
7692 #include "confdefs.h"
7693
7694 #include <stdio.h>
7695 #ifdef HAVE_STRING_H
7696 #include <string.h>
7697 #else
7698 #ifdef HAVE_STRINGS_H
7699 #include <strings.h>
7700 #endif
7701 #endif
7702 #ifdef HAVE_STDLIB_H
7703 #include <stdlib.h>
7704 #endif
7705 #ifdef HAVE_UNISTD_H
7706 #include <unistd.h>
7707 #endif
7708 int main() {
7709 char *(*pfn) = (char *(*)) strdup
7710 ; return 0; }
7711 EOF
7712 if { (eval echo configure:7713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7713 rm -rf conftest*
7714 bfd_cv_decl_needed_strdup=no
7715 else
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 rm -rf conftest*
7719 bfd_cv_decl_needed_strdup=yes
7720 fi
7721 rm -f conftest*
7722 fi
7723
7724 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7725 if test $bfd_cv_decl_needed_strdup = yes; then
7726 cat >> confdefs.h <<\EOF
7727 #define NEED_DECLARATION_STRDUP 1
7728 EOF
7729
7730 fi
7731
7732 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
7733 echo "configure:7734: checking whether strstr must be declared" >&5
7734 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
7735 echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737 cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7740
7741 #include <stdio.h>
7742 #ifdef HAVE_STRING_H
7743 #include <string.h>
7744 #else
7745 #ifdef HAVE_STRINGS_H
7746 #include <strings.h>
7747 #endif
7748 #endif
7749 #ifdef HAVE_STDLIB_H
7750 #include <stdlib.h>
7751 #endif
7752 #ifdef HAVE_UNISTD_H
7753 #include <unistd.h>
7754 #endif
7755 int main() {
7756 char *(*pfn) = (char *(*)) strstr
7757 ; return 0; }
7758 EOF
7759 if { (eval echo configure:7760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7760 rm -rf conftest*
7761 bfd_cv_decl_needed_strstr=no
7762 else
7763 echo "configure: failed program was:" >&5
7764 cat conftest.$ac_ext >&5
7765 rm -rf conftest*
7766 bfd_cv_decl_needed_strstr=yes
7767 fi
7768 rm -f conftest*
7769 fi
7770
7771 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7772 if test $bfd_cv_decl_needed_strstr = yes; then
7773 cat >> confdefs.h <<\EOF
7774 #define NEED_DECLARATION_STRSTR 1
7775 EOF
7776
7777 fi
7778
7779 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7780 echo "configure:7781: checking whether canonicalize_file_name must be declared" >&5
7781 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
7782 echo $ac_n "(cached) $ac_c" 1>&6
7783 else
7784 cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787
7788 #include <stdio.h>
7789 #ifdef HAVE_STRING_H
7790 #include <string.h>
7791 #else
7792 #ifdef HAVE_STRINGS_H
7793 #include <strings.h>
7794 #endif
7795 #endif
7796 #ifdef HAVE_STDLIB_H
7797 #include <stdlib.h>
7798 #endif
7799 #ifdef HAVE_UNISTD_H
7800 #include <unistd.h>
7801 #endif
7802 int main() {
7803 char *(*pfn) = (char *(*)) canonicalize_file_name
7804 ; return 0; }
7805 EOF
7806 if { (eval echo configure:7807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7807 rm -rf conftest*
7808 bfd_cv_decl_needed_canonicalize_file_name=no
7809 else
7810 echo "configure: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7812 rm -rf conftest*
7813 bfd_cv_decl_needed_canonicalize_file_name=yes
7814 fi
7815 rm -f conftest*
7816 fi
7817
7818 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7819 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7820 cat >> confdefs.h <<\EOF
7821 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
7822 EOF
7823
7824 fi
7825
7826
7827 # The following save_state_t checkery is only necessary for HPUX
7828 # versions earlier than 10.20. When those fade from memory, this
7829 # could be expunged. --jsm 1999-03-22
7830
7831 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
7832 echo "configure:7833: checking for HPUX save_state structure" >&5
7833 cat > conftest.$ac_ext <<EOF
7834 #line 7835 "configure"
7835 #include "confdefs.h"
7836 #include <machine/save_state.h>
7837 EOF
7838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7839 egrep "save_state_t" >/dev/null 2>&1; then
7840 rm -rf conftest*
7841 gdb_cv_hpux_savestate=yes
7842 else
7843 rm -rf conftest*
7844 gdb_cv_hpux_savestate=no
7845 fi
7846 rm -f conftest*
7847
7848 cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 #include <machine/save_state.h>
7852 EOF
7853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7854 egrep "ss_wide" >/dev/null 2>&1; then
7855 rm -rf conftest*
7856 gdb_cv_hpux_sswide=yes
7857 else
7858 rm -rf conftest*
7859 gdb_cv_hpux_sswide=no
7860 fi
7861 rm -f conftest*
7862
7863 if test $gdb_cv_hpux_savestate = yes
7864 then
7865 cat >> confdefs.h <<\EOF
7866 #define HAVE_STRUCT_SAVE_STATE_T 1
7867 EOF
7868
7869 fi
7870 if test $gdb_cv_hpux_sswide = yes
7871 then
7872 cat >> confdefs.h <<\EOF
7873 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
7874 EOF
7875
7876 fi
7877 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7878
7879
7880 # If we are configured native on GNU/Linux, work around problems with
7881 # sys/procfs.h
7882 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
7883
7884 if test "${target}" = "${host}"; then
7885 case "${host}" in
7886 i[3456]86-*-linux*)
7887 cat >> confdefs.h <<\EOF
7888 #define START_INFERIOR_TRAPS_EXPECTED 2
7889 EOF
7890
7891 cat >> confdefs.h <<\EOF
7892 #define sys_quotactl 1
7893 EOF
7894
7895 ;;
7896 ia64-*-aix*)
7897 cat >> confdefs.h <<\EOF
7898 #define NEW_PROC_API 1
7899 EOF
7900
7901 ;;
7902 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7903 cat >> confdefs.h <<\EOF
7904 #define NEW_PROC_API 1
7905 EOF
7906
7907 ;;
7908 *-*-solaris2.[6789])
7909 cat >> confdefs.h <<\EOF
7910 #define NEW_PROC_API 1
7911 EOF
7912
7913 ;;
7914 esac
7915 fi
7916
7917 if test "$ac_cv_header_sys_procfs_h" = yes; then
7918 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
7919 echo "configure:7920: checking for pstatus_t in sys/procfs.h" >&5
7920 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
7921 echo $ac_n "(cached) $ac_c" 1>&6
7922 else
7923 cat > conftest.$ac_ext <<EOF
7924 #line 7925 "configure"
7925 #include "confdefs.h"
7926
7927 #define _SYSCALL32
7928 #include <sys/procfs.h>
7929 int main() {
7930 pstatus_t avar
7931 ; return 0; }
7932 EOF
7933 if { (eval echo configure:7934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7934 rm -rf conftest*
7935 bfd_cv_have_sys_procfs_type_pstatus_t=yes
7936 else
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 rm -rf conftest*
7940 bfd_cv_have_sys_procfs_type_pstatus_t=no
7941
7942 fi
7943 rm -f conftest*
7944 fi
7945
7946 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
7947 cat >> confdefs.h <<\EOF
7948 #define HAVE_PSTATUS_T 1
7949 EOF
7950
7951 fi
7952 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
7953
7954 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
7955 echo "configure:7956: checking for prrun_t in sys/procfs.h" >&5
7956 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
7957 echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959 cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962
7963 #define _SYSCALL32
7964 #include <sys/procfs.h>
7965 int main() {
7966 prrun_t avar
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7970 rm -rf conftest*
7971 bfd_cv_have_sys_procfs_type_prrun_t=yes
7972 else
7973 echo "configure: failed program was:" >&5
7974 cat conftest.$ac_ext >&5
7975 rm -rf conftest*
7976 bfd_cv_have_sys_procfs_type_prrun_t=no
7977
7978 fi
7979 rm -f conftest*
7980 fi
7981
7982 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
7983 cat >> confdefs.h <<\EOF
7984 #define HAVE_PRRUN_T 1
7985 EOF
7986
7987 fi
7988 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
7989
7990 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
7991 echo "configure:7992: checking for gregset_t in sys/procfs.h" >&5
7992 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
7993 echo $ac_n "(cached) $ac_c" 1>&6
7994 else
7995 cat > conftest.$ac_ext <<EOF
7996 #line 7997 "configure"
7997 #include "confdefs.h"
7998
7999 #define _SYSCALL32
8000 #include <sys/procfs.h>
8001 int main() {
8002 gregset_t avar
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8006 rm -rf conftest*
8007 bfd_cv_have_sys_procfs_type_gregset_t=yes
8008 else
8009 echo "configure: failed program was:" >&5
8010 cat conftest.$ac_ext >&5
8011 rm -rf conftest*
8012 bfd_cv_have_sys_procfs_type_gregset_t=no
8013
8014 fi
8015 rm -f conftest*
8016 fi
8017
8018 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8019 cat >> confdefs.h <<\EOF
8020 #define HAVE_GREGSET_T 1
8021 EOF
8022
8023 fi
8024 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
8025
8026 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
8027 echo "configure:8028: checking for fpregset_t in sys/procfs.h" >&5
8028 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
8029 echo $ac_n "(cached) $ac_c" 1>&6
8030 else
8031 cat > conftest.$ac_ext <<EOF
8032 #line 8033 "configure"
8033 #include "confdefs.h"
8034
8035 #define _SYSCALL32
8036 #include <sys/procfs.h>
8037 int main() {
8038 fpregset_t avar
8039 ; return 0; }
8040 EOF
8041 if { (eval echo configure:8042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8042 rm -rf conftest*
8043 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8044 else
8045 echo "configure: failed program was:" >&5
8046 cat conftest.$ac_ext >&5
8047 rm -rf conftest*
8048 bfd_cv_have_sys_procfs_type_fpregset_t=no
8049
8050 fi
8051 rm -f conftest*
8052 fi
8053
8054 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8055 cat >> confdefs.h <<\EOF
8056 #define HAVE_FPREGSET_T 1
8057 EOF
8058
8059 fi
8060 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
8061
8062 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
8063 echo "configure:8064: checking for prgregset_t in sys/procfs.h" >&5
8064 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
8065 echo $ac_n "(cached) $ac_c" 1>&6
8066 else
8067 cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8070
8071 #define _SYSCALL32
8072 #include <sys/procfs.h>
8073 int main() {
8074 prgregset_t avar
8075 ; return 0; }
8076 EOF
8077 if { (eval echo configure:8078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8078 rm -rf conftest*
8079 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8080 else
8081 echo "configure: failed program was:" >&5
8082 cat conftest.$ac_ext >&5
8083 rm -rf conftest*
8084 bfd_cv_have_sys_procfs_type_prgregset_t=no
8085
8086 fi
8087 rm -f conftest*
8088 fi
8089
8090 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8091 cat >> confdefs.h <<\EOF
8092 #define HAVE_PRGREGSET_T 1
8093 EOF
8094
8095 fi
8096 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
8097
8098 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
8099 echo "configure:8100: checking for prfpregset_t in sys/procfs.h" >&5
8100 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
8101 echo $ac_n "(cached) $ac_c" 1>&6
8102 else
8103 cat > conftest.$ac_ext <<EOF
8104 #line 8105 "configure"
8105 #include "confdefs.h"
8106
8107 #define _SYSCALL32
8108 #include <sys/procfs.h>
8109 int main() {
8110 prfpregset_t avar
8111 ; return 0; }
8112 EOF
8113 if { (eval echo configure:8114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8114 rm -rf conftest*
8115 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8116 else
8117 echo "configure: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8119 rm -rf conftest*
8120 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8121
8122 fi
8123 rm -f conftest*
8124 fi
8125
8126 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8127 cat >> confdefs.h <<\EOF
8128 #define HAVE_PRFPREGSET_T 1
8129 EOF
8130
8131 fi
8132 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
8133
8134 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
8135 echo "configure:8136: checking for prgregset32_t in sys/procfs.h" >&5
8136 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
8137 echo $ac_n "(cached) $ac_c" 1>&6
8138 else
8139 cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142
8143 #define _SYSCALL32
8144 #include <sys/procfs.h>
8145 int main() {
8146 prgregset32_t avar
8147 ; return 0; }
8148 EOF
8149 if { (eval echo configure:8150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8150 rm -rf conftest*
8151 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8152 else
8153 echo "configure: failed program was:" >&5
8154 cat conftest.$ac_ext >&5
8155 rm -rf conftest*
8156 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8157
8158 fi
8159 rm -f conftest*
8160 fi
8161
8162 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8163 cat >> confdefs.h <<\EOF
8164 #define HAVE_PRGREGSET32_T 1
8165 EOF
8166
8167 fi
8168 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
8169
8170 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
8171 echo "configure:8172: checking for prfpregset32_t in sys/procfs.h" >&5
8172 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
8173 echo $ac_n "(cached) $ac_c" 1>&6
8174 else
8175 cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178
8179 #define _SYSCALL32
8180 #include <sys/procfs.h>
8181 int main() {
8182 prfpregset32_t avar
8183 ; return 0; }
8184 EOF
8185 if { (eval echo configure:8186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8186 rm -rf conftest*
8187 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
8188 else
8189 echo "configure: failed program was:" >&5
8190 cat conftest.$ac_ext >&5
8191 rm -rf conftest*
8192 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8193
8194 fi
8195 rm -f conftest*
8196 fi
8197
8198 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8199 cat >> confdefs.h <<\EOF
8200 #define HAVE_PRFPREGSET32_T 1
8201 EOF
8202
8203 fi
8204 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
8205
8206 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
8207 echo "configure:8208: checking for lwpid_t in sys/procfs.h" >&5
8208 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
8209 echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211 cat > conftest.$ac_ext <<EOF
8212 #line 8213 "configure"
8213 #include "confdefs.h"
8214
8215 #define _SYSCALL32
8216 #include <sys/procfs.h>
8217 int main() {
8218 lwpid_t avar
8219 ; return 0; }
8220 EOF
8221 if { (eval echo configure:8222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8222 rm -rf conftest*
8223 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8224 else
8225 echo "configure: failed program was:" >&5
8226 cat conftest.$ac_ext >&5
8227 rm -rf conftest*
8228 bfd_cv_have_sys_procfs_type_lwpid_t=no
8229
8230 fi
8231 rm -f conftest*
8232 fi
8233
8234 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8235 cat >> confdefs.h <<\EOF
8236 #define HAVE_LWPID_T 1
8237 EOF
8238
8239 fi
8240 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
8241
8242 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
8243 echo "configure:8244: checking for psaddr_t in sys/procfs.h" >&5
8244 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
8245 echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247 cat > conftest.$ac_ext <<EOF
8248 #line 8249 "configure"
8249 #include "confdefs.h"
8250
8251 #define _SYSCALL32
8252 #include <sys/procfs.h>
8253 int main() {
8254 psaddr_t avar
8255 ; return 0; }
8256 EOF
8257 if { (eval echo configure:8258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8258 rm -rf conftest*
8259 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8260 else
8261 echo "configure: failed program was:" >&5
8262 cat conftest.$ac_ext >&5
8263 rm -rf conftest*
8264 bfd_cv_have_sys_procfs_type_psaddr_t=no
8265
8266 fi
8267 rm -f conftest*
8268 fi
8269
8270 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8271 cat >> confdefs.h <<\EOF
8272 #define HAVE_PSADDR_T 1
8273 EOF
8274
8275 fi
8276 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
8277
8278 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
8279 echo "configure:8280: checking for prsysent_t in sys/procfs.h" >&5
8280 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
8281 echo $ac_n "(cached) $ac_c" 1>&6
8282 else
8283 cat > conftest.$ac_ext <<EOF
8284 #line 8285 "configure"
8285 #include "confdefs.h"
8286
8287 #define _SYSCALL32
8288 #include <sys/procfs.h>
8289 int main() {
8290 prsysent_t avar
8291 ; return 0; }
8292 EOF
8293 if { (eval echo configure:8294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8294 rm -rf conftest*
8295 bfd_cv_have_sys_procfs_type_prsysent_t=yes
8296 else
8297 echo "configure: failed program was:" >&5
8298 cat conftest.$ac_ext >&5
8299 rm -rf conftest*
8300 bfd_cv_have_sys_procfs_type_prsysent_t=no
8301
8302 fi
8303 rm -f conftest*
8304 fi
8305
8306 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8307 cat >> confdefs.h <<\EOF
8308 #define HAVE_PRSYSENT_T 1
8309 EOF
8310
8311 fi
8312 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
8313
8314 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
8315 echo "configure:8316: checking for pr_sigset_t in sys/procfs.h" >&5
8316 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
8317 echo $ac_n "(cached) $ac_c" 1>&6
8318 else
8319 cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322
8323 #define _SYSCALL32
8324 #include <sys/procfs.h>
8325 int main() {
8326 pr_sigset_t avar
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8330 rm -rf conftest*
8331 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
8332 else
8333 echo "configure: failed program was:" >&5
8334 cat conftest.$ac_ext >&5
8335 rm -rf conftest*
8336 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8337
8338 fi
8339 rm -f conftest*
8340 fi
8341
8342 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8343 cat >> confdefs.h <<\EOF
8344 #define HAVE_PR_SIGSET_T 1
8345 EOF
8346
8347 fi
8348 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
8349
8350 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
8351 echo "configure:8352: checking for pr_sigaction64_t in sys/procfs.h" >&5
8352 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
8353 echo $ac_n "(cached) $ac_c" 1>&6
8354 else
8355 cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358
8359 #define _SYSCALL32
8360 #include <sys/procfs.h>
8361 int main() {
8362 pr_sigaction64_t avar
8363 ; return 0; }
8364 EOF
8365 if { (eval echo configure:8366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8366 rm -rf conftest*
8367 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
8368 else
8369 echo "configure: failed program was:" >&5
8370 cat conftest.$ac_ext >&5
8371 rm -rf conftest*
8372 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8373
8374 fi
8375 rm -f conftest*
8376 fi
8377
8378 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8379 cat >> confdefs.h <<\EOF
8380 #define HAVE_PR_SIGACTION64_T 1
8381 EOF
8382
8383 fi
8384 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8385
8386 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
8387 echo "configure:8388: checking for pr_siginfo64_t in sys/procfs.h" >&5
8388 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8389 echo $ac_n "(cached) $ac_c" 1>&6
8390 else
8391 cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394
8395 #define _SYSCALL32
8396 #include <sys/procfs.h>
8397 int main() {
8398 pr_siginfo64_t avar
8399 ; return 0; }
8400 EOF
8401 if { (eval echo configure:8402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8402 rm -rf conftest*
8403 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8404 else
8405 echo "configure: failed program was:" >&5
8406 cat conftest.$ac_ext >&5
8407 rm -rf conftest*
8408 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8409
8410 fi
8411 rm -f conftest*
8412 fi
8413
8414 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8415 cat >> confdefs.h <<\EOF
8416 #define HAVE_PR_SIGINFO64_T 1
8417 EOF
8418
8419 fi
8420 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8421
8422
8423
8424
8425
8426 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8427 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
8428 echo "configure:8429: checking whether prfpregset_t type is broken" >&5
8429 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
8430 echo $ac_n "(cached) $ac_c" 1>&6
8431 else
8432 if test "$cross_compiling" = yes; then
8433 gdb_cv_prfpregset_t_broken=yes
8434 else
8435 cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438 #include <sys/procfs.h>
8439 int main ()
8440 {
8441 if (sizeof (prfpregset_t) == sizeof (void *))
8442 return 1;
8443 return 0;
8444 }
8445 EOF
8446 if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8447 then
8448 gdb_cv_prfpregset_t_broken=no
8449 else
8450 echo "configure: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 rm -fr conftest*
8453 gdb_cv_prfpregset_t_broken=yes
8454 fi
8455 rm -fr conftest*
8456 fi
8457
8458 fi
8459
8460 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8461 if test $gdb_cv_prfpregset_t_broken = yes; then
8462 cat >> confdefs.h <<\EOF
8463 #define PRFPREGSET_T_BROKEN 1
8464 EOF
8465
8466 fi
8467 fi
8468
8469
8470 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
8471 echo "configure:8472: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
8472 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
8473 echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475 cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8478 #include <unistd.h>
8479 #include <sys/types.h>
8480 #include <sys/procfs.h>
8481
8482 int main() {
8483
8484 int dummy;;
8485 dummy = ioctl(0, PIOCSET, &dummy);
8486
8487 ; return 0; }
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8490 rm -rf conftest*
8491 gdb_cv_have_procfs_piocset=yes
8492 else
8493 echo "configure: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 rm -rf conftest*
8496 gdb_cv_have_procfs_piocset=no
8497 fi
8498 rm -f conftest*
8499 fi
8500
8501 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8502 if test $gdb_cv_have_procfs_piocset = yes; then
8503 cat >> confdefs.h <<\EOF
8504 #define HAVE_PROCFS_PIOCSET 1
8505 EOF
8506
8507 fi
8508 fi
8509
8510 if test ${host} = ${target} ; then
8511
8512 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
8513 echo "configure:8514: checking for member l_addr in struct link_map" >&5
8514 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
8515 echo $ac_n "(cached) $ac_c" 1>&6
8516 else
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <link.h>
8521 int main() {
8522 struct link_map lm; (void) lm.l_addr;
8523 ; return 0; }
8524 EOF
8525 if { (eval echo configure:8526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8526 rm -rf conftest*
8527 gdb_cv_have_struct_link_map_with_l_members=yes
8528 else
8529 echo "configure: failed program was:" >&5
8530 cat conftest.$ac_ext >&5
8531 rm -rf conftest*
8532 gdb_cv_have_struct_link_map_with_l_members=no
8533 fi
8534 rm -f conftest*
8535 fi
8536
8537 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8538 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8539 cat >> confdefs.h <<\EOF
8540 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
8541 EOF
8542
8543 fi
8544
8545
8546 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
8547 echo "configure:8548: checking for member lm_addr in struct link_map" >&5
8548 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8549 echo $ac_n "(cached) $ac_c" 1>&6
8550 else
8551 cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <sys/types.h>
8555 #include <link.h>
8556 int main() {
8557 struct link_map lm; (void) lm.lm_addr;
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8561 rm -rf conftest*
8562 gdb_cv_have_struct_link_map_with_lm_members=yes
8563 else
8564 echo "configure: failed program was:" >&5
8565 cat conftest.$ac_ext >&5
8566 rm -rf conftest*
8567 gdb_cv_have_struct_link_map_with_lm_members=no
8568 fi
8569 rm -f conftest*
8570 fi
8571
8572 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8573 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8574 cat >> confdefs.h <<\EOF
8575 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8576 EOF
8577
8578 fi
8579
8580
8581 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
8582 echo "configure:8583: checking for member som_addr in struct so_map" >&5
8583 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
8584 echo $ac_n "(cached) $ac_c" 1>&6
8585 else
8586 cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <sys/types.h>
8590 #ifdef HAVE_NLIST_H
8591 #include <nlist.h>
8592 #endif
8593 #include <link.h>
8594 int main() {
8595 struct so_map lm; (void) lm.som_addr;
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8599 rm -rf conftest*
8600 gdb_cv_have_struct_so_map_with_som_members=yes
8601 else
8602 echo "configure: failed program was:" >&5
8603 cat conftest.$ac_ext >&5
8604 rm -rf conftest*
8605 gdb_cv_have_struct_so_map_with_som_members=no
8606 fi
8607 rm -f conftest*
8608 fi
8609
8610 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8611 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8612 cat >> confdefs.h <<\EOF
8613 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8614 EOF
8615
8616 fi
8617
8618
8619 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
8620 echo "configure:8621: checking for struct link_map32 in sys/link.h" >&5
8621 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8622 echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624 cat > conftest.$ac_ext <<EOF
8625 #line 8626 "configure"
8626 #include "confdefs.h"
8627 #define _SYSCALL32
8628 #include <sys/link.h>
8629 int main() {
8630 struct link_map32 l;
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8634 rm -rf conftest*
8635 gdb_cv_have_struct_link_map32=yes
8636 else
8637 echo "configure: failed program was:" >&5
8638 cat conftest.$ac_ext >&5
8639 rm -rf conftest*
8640 gdb_cv_have_struct_link_map32=no
8641 fi
8642 rm -f conftest*
8643 fi
8644
8645 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8646 if test $gdb_cv_have_struct_link_map32 = yes; then
8647 cat >> confdefs.h <<\EOF
8648 #define HAVE_STRUCT_LINK_MAP32 1
8649 EOF
8650
8651 cat >> confdefs.h <<\EOF
8652 #define _SYSCALL32 1
8653 EOF
8654
8655 fi
8656 fi
8657
8658
8659 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
8660 echo "configure:8661: checking for long long support in compiler" >&5
8661 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8662 echo $ac_n "(cached) $ac_c" 1>&6
8663 else
8664 cat > conftest.$ac_ext <<EOF
8665 #line 8666 "configure"
8666 #include "confdefs.h"
8667
8668 int main() {
8669
8670 extern long long foo;
8671 switch (foo & 2) { case 0: return 1; }
8672
8673 ; return 0; }
8674 EOF
8675 if { (eval echo configure:8676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8676 rm -rf conftest*
8677 gdb_cv_c_long_long=yes
8678 else
8679 echo "configure: failed program was:" >&5
8680 cat conftest.$ac_ext >&5
8681 rm -rf conftest*
8682 gdb_cv_c_long_long=no
8683 fi
8684 rm -f conftest*
8685 fi
8686
8687 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8688 if test $gdb_cv_c_long_long = yes; then
8689 cat >> confdefs.h <<\EOF
8690 #define CC_HAS_LONG_LONG 1
8691 EOF
8692
8693 fi
8694
8695
8696 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
8697 echo "configure:8698: checking for long long support in printf" >&5
8698 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8699 echo $ac_n "(cached) $ac_c" 1>&6
8700 else
8701 if test "$cross_compiling" = yes; then
8702 gdb_cv_printf_has_long_long=no
8703 else
8704 cat > conftest.$ac_ext <<EOF
8705 #line 8706 "configure"
8706 #include "confdefs.h"
8707
8708 int main () {
8709 char buf[32];
8710 long long l = 0;
8711 l = (l << 16) + 0x0123;
8712 l = (l << 16) + 0x4567;
8713 l = (l << 16) + 0x89ab;
8714 l = (l << 16) + 0xcdef;
8715 sprintf (buf, "0x%016llx", l);
8716 return (strcmp ("0x0123456789abcdef", buf));
8717 }
8718 EOF
8719 if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8720 then
8721 gdb_cv_printf_has_long_long=yes
8722 else
8723 echo "configure: failed program was:" >&5
8724 cat conftest.$ac_ext >&5
8725 rm -fr conftest*
8726 gdb_cv_printf_has_long_long=no
8727 fi
8728 rm -fr conftest*
8729 fi
8730
8731 fi
8732
8733 if test $gdb_cv_printf_has_long_long = yes; then
8734 cat >> confdefs.h <<\EOF
8735 #define PRINTF_HAS_LONG_LONG 1
8736 EOF
8737
8738 fi
8739 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8740
8741
8742 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8743 echo "configure:8744: checking for long double support in compiler" >&5
8744 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8745 echo $ac_n "(cached) $ac_c" 1>&6
8746 else
8747 cat > conftest.$ac_ext <<EOF
8748 #line 8749 "configure"
8749 #include "confdefs.h"
8750
8751 int main() {
8752 long double foo;
8753 ; return 0; }
8754 EOF
8755 if { (eval echo configure:8756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8756 rm -rf conftest*
8757 ac_cv_c_long_double=yes
8758 else
8759 echo "configure: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8761 rm -rf conftest*
8762 ac_cv_c_long_double=no
8763 fi
8764 rm -f conftest*
8765 fi
8766
8767 echo "$ac_t""$ac_cv_c_long_double" 1>&6
8768 if test $ac_cv_c_long_double = yes; then
8769 cat >> confdefs.h <<\EOF
8770 #define HAVE_LONG_DOUBLE 1
8771 EOF
8772
8773 fi
8774
8775
8776 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8777 echo "configure:8778: checking for long double support in printf" >&5
8778 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8779 echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781 if test "$cross_compiling" = yes; then
8782 gdb_cv_printf_has_long_double=no
8783 else
8784 cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787
8788 int main () {
8789 char buf[16];
8790 long double f = 3.141592653;
8791 sprintf (buf, "%Lg", f);
8792 return (strncmp ("3.14159", buf, 7));
8793 }
8794 EOF
8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8796 then
8797 gdb_cv_printf_has_long_double=yes
8798 else
8799 echo "configure: failed program was:" >&5
8800 cat conftest.$ac_ext >&5
8801 rm -fr conftest*
8802 gdb_cv_printf_has_long_double=no
8803 fi
8804 rm -fr conftest*
8805 fi
8806
8807 fi
8808
8809 if test $gdb_cv_printf_has_long_double = yes; then
8810 cat >> confdefs.h <<\EOF
8811 #define PRINTF_HAS_LONG_DOUBLE 1
8812 EOF
8813
8814 fi
8815 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8816
8817
8818 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
8819 echo "configure:8820: checking for long double support in scanf" >&5
8820 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8821 echo $ac_n "(cached) $ac_c" 1>&6
8822 else
8823 if test "$cross_compiling" = yes; then
8824 gdb_cv_scanf_has_long_double=no
8825 else
8826 cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829
8830 int main () {
8831 char *buf = "3.141592653";
8832 long double f = 0;
8833 sscanf (buf, "%Lg", &f);
8834 return !(f > 3.14159 && f < 3.14160);
8835 }
8836 EOF
8837 if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8838 then
8839 gdb_cv_scanf_has_long_double=yes
8840 else
8841 echo "configure: failed program was:" >&5
8842 cat conftest.$ac_ext >&5
8843 rm -fr conftest*
8844 gdb_cv_scanf_has_long_double=no
8845 fi
8846 rm -fr conftest*
8847 fi
8848
8849 fi
8850
8851 if test $gdb_cv_scanf_has_long_double = yes; then
8852 cat >> confdefs.h <<\EOF
8853 #define SCANF_HAS_LONG_DOUBLE 1
8854 EOF
8855
8856 fi
8857 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
8858
8859 case ${host_os} in
8860 aix*)
8861 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
8862 echo "configure:8863: checking for -bbigtoc option" >&5
8863 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8864 echo $ac_n "(cached) $ac_c" 1>&6
8865 else
8866
8867 SAVE_LDFLAGS=$LDFLAGS
8868
8869 case $GCC in
8870 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8871 *) gdb_cv_bigtoc=-bbigtoc ;;
8872 esac
8873
8874 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8875 cat > conftest.$ac_ext <<EOF
8876 #line 8877 "configure"
8877 #include "confdefs.h"
8878
8879 int main() {
8880 int i;
8881 ; return 0; }
8882 EOF
8883 if { (eval echo configure:8884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8884 :
8885 else
8886 echo "configure: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888 rm -rf conftest*
8889 gdb_cv_bigtoc=
8890 fi
8891 rm -f conftest*
8892
8893 fi
8894
8895 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8896 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8897 ;;
8898 esac
8899
8900
8901
8902 if test ${build} = ${host} -a ${host} = ${target} ; then
8903 case ${host_os} in
8904 hpux*)
8905 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
8906 echo "configure:8907: checking for HPUX/OSF thread support" >&5
8907 if test -f /usr/include/dce/cma_config.h ; then
8908 if test "$GCC" = "yes" ; then
8909 echo "$ac_t""yes" 1>&6
8910 cat >> confdefs.h <<\EOF
8911 #define HAVE_HPUX_THREAD_SUPPORT 1
8912 EOF
8913
8914 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
8915 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8916 else
8917 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8918 fi
8919 else
8920 echo "$ac_t""no" 1>&6
8921 fi
8922 ;;
8923 solaris*)
8924 # See if thread_db library is around for Solaris thread debugging.
8925 # Note that we must explicitly test for version 1 of the library
8926 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8927 # the same API.
8928 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
8929 echo "configure:8930: checking for Solaris thread debugging library" >&5
8930 if test -f /usr/lib/libthread_db.so.1 ; then
8931 echo "$ac_t""yes" 1>&6
8932 cat >> confdefs.h <<\EOF
8933 #define HAVE_THREAD_DB_LIB 1
8934 EOF
8935
8936 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
8937 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8938 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8939 echo "configure:8940: checking for dlopen in -ldl" >&5
8940 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8941 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8942 echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944 ac_save_LIBS="$LIBS"
8945 LIBS="-ldl $LIBS"
8946 cat > conftest.$ac_ext <<EOF
8947 #line 8948 "configure"
8948 #include "confdefs.h"
8949 /* Override any gcc2 internal prototype to avoid an error. */
8950 /* We use char because int might match the return type of a gcc2
8951 builtin and then its argument prototype would still apply. */
8952 char dlopen();
8953
8954 int main() {
8955 dlopen()
8956 ; return 0; }
8957 EOF
8958 if { (eval echo configure:8959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8959 rm -rf conftest*
8960 eval "ac_cv_lib_$ac_lib_var=yes"
8961 else
8962 echo "configure: failed program was:" >&5
8963 cat conftest.$ac_ext >&5
8964 rm -rf conftest*
8965 eval "ac_cv_lib_$ac_lib_var=no"
8966 fi
8967 rm -f conftest*
8968 LIBS="$ac_save_LIBS"
8969
8970 fi
8971 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8972 echo "$ac_t""yes" 1>&6
8973 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8974 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8975 cat >> confdefs.h <<EOF
8976 #define $ac_tr_lib 1
8977 EOF
8978
8979 LIBS="-ldl $LIBS"
8980
8981 else
8982 echo "$ac_t""no" 1>&6
8983 fi
8984
8985 if test "$GCC" = "yes" ; then
8986 # The GNU linker requires the -export-dynamic option to make
8987 # all symbols visible in the dynamic symbol table.
8988 hold_ldflags=$LDFLAGS
8989 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
8990 echo "configure:8991: checking for the ld -export-dynamic flag" >&5
8991 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8992 cat > conftest.$ac_ext <<EOF
8993 #line 8994 "configure"
8994 #include "confdefs.h"
8995
8996 int main() {
8997 int i;
8998 ; return 0; }
8999 EOF
9000 if { (eval echo configure:9001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9001 rm -rf conftest*
9002 found=yes
9003 else
9004 echo "configure: failed program was:" >&5
9005 cat conftest.$ac_ext >&5
9006 rm -rf conftest*
9007 found=no
9008 fi
9009 rm -f conftest*
9010 LDFLAGS=$hold_ldflags
9011 echo "$ac_t""$found" 1>&6
9012 if test $found = yes; then
9013 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9014 fi
9015 fi
9016 # Sun randomly tweaked the prototypes in <proc_service.h>
9017 # at one point.
9018 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9019 echo "configure:9020: checking if <proc_service.h> is old" >&5
9020 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9021 echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023
9024 cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027
9028 #include <proc_service.h>
9029 ps_err_e ps_pdwrite
9030 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9031
9032 int main() {
9033
9034 ; return 0; }
9035 EOF
9036 if { (eval echo configure:9037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9037 rm -rf conftest*
9038 gdb_cv_proc_service_is_old=no
9039 else
9040 echo "configure: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 rm -rf conftest*
9043 gdb_cv_proc_service_is_old=yes
9044 fi
9045 rm -f conftest*
9046
9047 fi
9048
9049 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9050 if test $gdb_cv_proc_service_is_old = yes; then
9051 cat >> confdefs.h <<\EOF
9052 #define PROC_SERVICE_IS_OLD 1
9053 EOF
9054
9055 fi
9056 else
9057 echo "$ac_t""no" 1>&6
9058 fi
9059 ;;
9060 aix*)
9061 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9062 echo "configure:9063: checking for AiX thread debugging library" >&5
9063 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9064 echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066 cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 #include <sys/pthdebug.h>
9070 int main() {
9071 #ifndef PTHDB_VERSION_3
9072 #error
9073 #endif
9074 ; return 0; }
9075 EOF
9076 if { (eval echo configure:9077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9077 rm -rf conftest*
9078 gdb_cv_have_aix_thread_debug=yes
9079 else
9080 echo "configure: failed program was:" >&5
9081 cat conftest.$ac_ext >&5
9082 rm -rf conftest*
9083 gdb_cv_have_aix_thread_debug=no
9084 fi
9085 rm -f conftest*
9086 fi
9087
9088 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9089 if test $gdb_cv_have_aix_thread_debug = yes; then
9090 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9091 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
9092 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9093 fi
9094 ;;
9095 esac
9096
9097 fi
9098
9099 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9100 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9101 echo "configure:9102: checking whether <thread_db.h> has TD_NOTALLOC" >&5
9102 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9103 echo $ac_n "(cached) $ac_c" 1>&6
9104 else
9105 cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9108 #include <thread_db.h>
9109 int main() {
9110 int i = TD_NOTALLOC;
9111 ; return 0; }
9112 EOF
9113 if { (eval echo configure:9114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9114 rm -rf conftest*
9115 gdb_cv_thread_db_h_has_td_notalloc=yes
9116 else
9117 echo "configure: failed program was:" >&5
9118 cat conftest.$ac_ext >&5
9119 rm -rf conftest*
9120 gdb_cv_thread_db_h_has_td_notalloc=no
9121
9122 fi
9123 rm -f conftest*
9124
9125 fi
9126
9127 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9128 fi
9129 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9130 cat >> confdefs.h <<\EOF
9131 #define THREAD_DB_HAS_TD_NOTALLOC 1
9132 EOF
9133
9134 fi
9135
9136 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9137 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9138 echo "configure:9139: checking whether <sys/syscall.h> has __NR_tkill" >&5
9139 if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9140 echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142 cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 #include <sys/syscall.h>
9146 int main() {
9147 int i = __NR_tkill;
9148 ; return 0; }
9149 EOF
9150 if { (eval echo configure:9151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9151 rm -rf conftest*
9152 gdb_cv_sys_syscall_h_has_tkill=yes
9153 else
9154 echo "configure: failed program was:" >&5
9155 cat conftest.$ac_ext >&5
9156 rm -rf conftest*
9157 gdb_cv_sys_syscall_h_has_tkill=no
9158
9159 fi
9160 rm -f conftest*
9161
9162 fi
9163
9164 echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9165 fi
9166 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9167 cat >> confdefs.h <<\EOF
9168 #define HAVE_TKILL_SYSCALL 1
9169 EOF
9170
9171 fi
9172
9173
9174 # Check whether --with-sysroot or --without-sysroot was given.
9175 if test "${with_sysroot+set}" = set; then
9176 withval="$with_sysroot"
9177
9178 case ${with_sysroot} in
9179 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
9180 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9181 esac
9182
9183 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9184
9185 if test "x$exec_prefix" = xNONE; then
9186 if test "x$prefix" = xNONE; then
9187 test_prefix=/usr/local
9188 else
9189 test_prefix=$prefix
9190 fi
9191 else
9192 test_prefix=$exec_prefix
9193 fi
9194 case ${TARGET_SYSTEM_ROOT} in
9195 "${test_prefix}"|"${test_prefix}/"*|\
9196 '${exec_prefix}'|'${exec_prefix}/'*)
9197 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9198 TARGET_SYSTEM_ROOT_DEFINE="$t"
9199 ;;
9200 esac
9201
9202 else
9203
9204 TARGET_SYSTEM_ROOT=
9205 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9206
9207 fi
9208
9209
9210
9211
9212 # NOTE: Don't add -Wall or -Wunused, they both include
9213 # -Wunused-parameter which reports bogus warnings.
9214 # NOTE: If you add to this list, remember to update
9215 # gdb/doc/gdbint.texinfo.
9216 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9217 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
9218 -Wunused-label"
9219 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9220 # -Wunused-function -Wunused-variable -Wunused-value
9221 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
9222 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9223 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9224 # -Woverloaded-virtual -Winline -Werror"
9225 # Check whether --enable-build-warnings or --disable-build-warnings was given.
9226 if test "${enable_build_warnings+set}" = set; then
9227 enableval="$enable_build_warnings"
9228 case "${enableval}" in
9229 yes) ;;
9230 no) build_warnings="-w";;
9231 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9232 build_warnings="${build_warnings} ${t}";;
9233 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9234 build_warnings="${t} ${build_warnings}";;
9235 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9236 esac
9237 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9238 echo "Setting compiler warning flags = $build_warnings" 6>&1
9239 fi
9240 fi
9241 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9242 if test "${enable_gdb_build_warnings+set}" = set; then
9243 enableval="$enable_gdb_build_warnings"
9244 case "${enableval}" in
9245 yes) ;;
9246 no) build_warnings="-w";;
9247 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9248 build_warnings="${build_warnings} ${t}";;
9249 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9250 build_warnings="${t} ${build_warnings}";;
9251 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9252 esac
9253 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9254 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9255 fi
9256 fi
9257 WARN_CFLAGS=""
9258 WERROR_CFLAGS=""
9259 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9260 then
9261 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9262 echo "configure:9263: checking compiler warning flags" >&5
9263 # Separate out the -Werror flag as some files just cannot be
9264 # compiled with it enabled.
9265 for w in ${build_warnings}; do
9266 case $w in
9267 -Werr*) WERROR_CFLAGS=-Werror ;;
9268 *) # Check that GCC accepts it
9269 saved_CFLAGS="$CFLAGS"
9270 CFLAGS="$CFLAGS $w"
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274
9275 int main() {
9276
9277 ; return 0; }
9278 EOF
9279 if { (eval echo configure:9280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9280 rm -rf conftest*
9281 WARN_CFLAGS="${WARN_CFLAGS} $w"
9282 else
9283 echo "configure: failed program was:" >&5
9284 cat conftest.$ac_ext >&5
9285 fi
9286 rm -f conftest*
9287 CFLAGS="$saved_CFLAGS"
9288 esac
9289 done
9290 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
9291 fi
9292
9293
9294
9295 # In the Cygwin environment, we need some additional flags.
9296 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9297 echo "configure:9298: checking for cygwin" >&5
9298 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9299 echo $ac_n "(cached) $ac_c" 1>&6
9300 else
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304
9305 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
9306 lose
9307 #endif
9308 EOF
9309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9310 egrep "lose" >/dev/null 2>&1; then
9311 rm -rf conftest*
9312 gdb_cv_os_cygwin=yes
9313 else
9314 rm -rf conftest*
9315 gdb_cv_os_cygwin=no
9316 fi
9317 rm -f conftest*
9318
9319 fi
9320
9321 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9322
9323
9324 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9325 case ${host} in
9326 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9327 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
9328 esac
9329
9330
9331 # libreadline needs libuser32.a in a cygwin environment
9332 WIN32LIBS=
9333 if test x$gdb_cv_os_cygwin = xyes; then
9334 WIN32LIBS="-luser32"
9335 case "${target}" in
9336 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9337 ;;
9338 esac
9339 fi
9340
9341
9342 LIBGUI="../libgui/src/libgui.a"
9343 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9344
9345
9346
9347 WIN32LDAPP=
9348
9349
9350
9351 configdir="unix"
9352
9353 GDBTKLIBS=
9354 if test "${enable_gdbtk}" = "yes"; then
9355
9356 # Gdbtk must have an absolute path to srcdir in order to run
9357 # properly when not installed.
9358 here=`pwd`
9359 cd ${srcdir}
9360 GDBTK_SRC_DIR=`pwd`
9361 cd $here
9362
9363
9364 #
9365 # Ok, lets find the tcl configuration
9366 # First, look for one uninstalled.
9367 # the alternative search directory is invoked by --with-tclconfig
9368 #
9369
9370 if test x"${no_tcl}" = x ; then
9371 # we reset no_tcl in case something fails here
9372 no_tcl=true
9373 # Check whether --with-tclconfig or --without-tclconfig was given.
9374 if test "${with_tclconfig+set}" = set; then
9375 withval="$with_tclconfig"
9376 with_tclconfig=${withval}
9377 fi
9378
9379 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9380 echo "configure:9381: checking for Tcl configuration" >&5
9381 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9382 echo $ac_n "(cached) $ac_c" 1>&6
9383 else
9384
9385
9386 # First check to see if --with-tclconfig was specified.
9387 if test x"${with_tclconfig}" != x ; then
9388 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9389 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9390 else
9391 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9392 fi
9393 fi
9394
9395 # then check for a private Tcl installation
9396 if test x"${ac_cv_c_tclconfig}" = x ; then
9397 for i in \
9398 ../tcl \
9399 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9400 ../../tcl \
9401 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9402 ../../../tcl \
9403 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9404 if test -f "$i/${configdir}/tclConfig.sh" ; then
9405 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9406 break
9407 fi
9408 done
9409 fi
9410 # check in a few common install locations
9411 if test x"${ac_cv_c_tclconfig}" = x ; then
9412 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9413 if test -f "$i/tclConfig.sh" ; then
9414 ac_cv_c_tclconfig=`(cd $i; pwd)`
9415 break
9416 fi
9417 done
9418 fi
9419 # check in a few other private locations
9420 if test x"${ac_cv_c_tclconfig}" = x ; then
9421 for i in \
9422 ${srcdir}/../tcl \
9423 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9424 if test -f "$i/${configdir}/tclConfig.sh" ; then
9425 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9426 break
9427 fi
9428 done
9429 fi
9430
9431 fi
9432
9433 if test x"${ac_cv_c_tclconfig}" = x ; then
9434 TCLCONFIG="# no Tcl configs found"
9435 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9436 else
9437 no_tcl=
9438 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9439 echo "$ac_t""found $TCLCONFIG" 1>&6
9440 fi
9441 fi
9442
9443 if test -z "${no_tcl}"; then
9444
9445 . $TCLCONFIG
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473 #
9474 # Ok, lets find the tk configuration
9475 # First, look for one uninstalled.
9476 # the alternative search directory is invoked by --with-tkconfig
9477 #
9478
9479 if test x"${no_tk}" = x ; then
9480 # we reset no_tk in case something fails here
9481 no_tk=true
9482 # Check whether --with-tkconfig or --without-tkconfig was given.
9483 if test "${with_tkconfig+set}" = set; then
9484 withval="$with_tkconfig"
9485 with_tkconfig=${withval}
9486 fi
9487
9488 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9489 echo "configure:9490: checking for Tk configuration" >&5
9490 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9491 echo $ac_n "(cached) $ac_c" 1>&6
9492 else
9493
9494
9495 # First check to see if --with-tkconfig was specified.
9496 if test x"${with_tkconfig}" != x ; then
9497 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9498 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9499 else
9500 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9501 fi
9502 fi
9503
9504 # then check for a private Tk library
9505 if test x"${ac_cv_c_tkconfig}" = x ; then
9506 for i in \
9507 ../tk \
9508 `ls -dr ../tk[4-9]* 2>/dev/null` \
9509 ../../tk \
9510 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9511 ../../../tk \
9512 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9513 if test -f "$i/${configdir}/tkConfig.sh" ; then
9514 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9515 break
9516 fi
9517 done
9518 fi
9519 # check in a few common install locations
9520 if test x"${ac_cv_c_tkconfig}" = x ; then
9521 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9522 if test -f "$i/tkConfig.sh" ; then
9523 ac_cv_c_tkconfig=`(cd $i; pwd)`
9524 break
9525 fi
9526 done
9527 fi
9528 # check in a few other private locations
9529 if test x"${ac_cv_c_tkconfig}" = x ; then
9530 for i in \
9531 ${srcdir}/../tk \
9532 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9533 if test -f "$i/${configdir}/tkConfig.sh" ; then
9534 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9535 break
9536 fi
9537 done
9538 fi
9539
9540 fi
9541
9542 if test x"${ac_cv_c_tkconfig}" = x ; then
9543 TKCONFIG="# no Tk configs found"
9544 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9545 else
9546 no_tk=
9547 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9548 echo "$ac_t""found $TKCONFIG" 1>&6
9549 fi
9550 fi
9551
9552
9553
9554 # now look for Tcl library stuff
9555
9556 case "${host}" in
9557 *-*-cygwin*)
9558 tcldir=../tcl/win/
9559 ;;
9560 *)
9561 tcldir=../tcl/unix/
9562 ;;
9563 esac
9564
9565 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9566
9567 # If $no_tk is nonempty, then we can't do Tk, and there is no
9568 # point to doing Tcl.
9569 if test -z "${no_tk}"; then
9570
9571 if test -f "$TKCONFIG" ; then
9572 . $TKCONFIG
9573 fi
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588 #
9589 # Ok, lets find the tcl source trees so we can use the headers
9590 # Warning: transition of version 9 to 10 will break this algorithm
9591 # because 10 sorts before 9. We also look for just tcl. We have to
9592 # be careful that we don't match stuff like tclX by accident.
9593 # the alternative search directory is involked by --with-tclinclude
9594 #
9595
9596 no_tcl=true
9597 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9598 echo "configure:9599: checking for Tcl private headers. dir=${configdir}" >&5
9599 # Check whether --with-tclinclude or --without-tclinclude was given.
9600 if test "${with_tclinclude+set}" = set; then
9601 withval="$with_tclinclude"
9602 with_tclinclude=${withval}
9603 fi
9604
9605 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9606 echo $ac_n "(cached) $ac_c" 1>&6
9607 else
9608
9609 # first check to see if --with-tclinclude was specified
9610 if test x"${with_tclinclude}" != x ; then
9611 if test -f ${with_tclinclude}/tclInt.h ; then
9612 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9613 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9614 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9615 else
9616 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9617 fi
9618 fi
9619
9620 # next check if it came with Tcl configuration file
9621 if test x"${ac_cv_c_tclconfig}" = x ; then
9622 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9623 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9624 fi
9625 fi
9626
9627 # next check in private source directory
9628 #
9629 # since ls returns lowest version numbers first, reverse its output
9630 if test x"${ac_cv_c_tclh}" = x ; then
9631 for i in \
9632 ${srcdir}/../tcl \
9633 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9634 ${srcdir}/../../tcl \
9635 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9636 ${srcdir}/../../../tcl \
9637 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9638 if test -f $i/generic/tclInt.h ; then
9639 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9640 break
9641 fi
9642 done
9643 fi
9644 # finally check in a few common install locations
9645 #
9646 # since ls returns lowest version numbers first, reverse its output
9647 if test x"${ac_cv_c_tclh}" = x ; then
9648 for i in \
9649 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9650 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9651 /usr/local/src/tcl \
9652 /usr/local/lib/tcl \
9653 ${prefix}/include ; do
9654 if test -f $i/generic/tclInt.h ; then
9655 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9656 break
9657 fi
9658 done
9659 fi
9660 # see if one is installed
9661 if test x"${ac_cv_c_tclh}" = x ; then
9662 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9663 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9664 echo "configure:9665: checking for tclInt.h" >&5
9665 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9666 echo $ac_n "(cached) $ac_c" 1>&6
9667 else
9668 cat > conftest.$ac_ext <<EOF
9669 #line 9670 "configure"
9670 #include "confdefs.h"
9671 #include <tclInt.h>
9672 EOF
9673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9674 { (eval echo configure:9675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9676 if test -z "$ac_err"; then
9677 rm -rf conftest*
9678 eval "ac_cv_header_$ac_safe=yes"
9679 else
9680 echo "$ac_err" >&5
9681 echo "configure: failed program was:" >&5
9682 cat conftest.$ac_ext >&5
9683 rm -rf conftest*
9684 eval "ac_cv_header_$ac_safe=no"
9685 fi
9686 rm -f conftest*
9687 fi
9688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9689 echo "$ac_t""yes" 1>&6
9690 ac_cv_c_tclh=installed
9691 else
9692 echo "$ac_t""no" 1>&6
9693 ac_cv_c_tclh=""
9694 fi
9695
9696 fi
9697
9698 fi
9699
9700 if test x"${ac_cv_c_tclh}" = x ; then
9701 TCLHDIR="# no Tcl private headers found"
9702 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9703 fi
9704 if test x"${ac_cv_c_tclh}" != x ; then
9705 no_tcl=""
9706 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9707 echo "$ac_t""is installed" 1>&6
9708 TCLHDIR=""
9709 else
9710 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9711 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9712 TCLHDIR="-I${ac_cv_c_tclh}"
9713 fi
9714 fi
9715
9716
9717
9718
9719 #
9720 # Ok, lets find the tk source trees so we can use the headers
9721 # If the directory (presumably symlink) named "tk" exists, use that one
9722 # in preference to any others. Same logic is used when choosing library
9723 # and again with Tcl. The search order is the best place to look first, then in
9724 # decreasing significance. The loop breaks if the trigger file is found.
9725 # Note the gross little conversion here of srcdir by cd'ing to the found
9726 # directory. This converts the path from a relative to an absolute, so
9727 # recursive cache variables for the path will work right. We check all
9728 # the possible paths in one loop rather than many seperate loops to speed
9729 # things up.
9730 # the alternative search directory is involked by --with-tkinclude
9731 #
9732 no_tk=true
9733 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9734 echo "configure:9735: checking for Tk private headers" >&5
9735 # Check whether --with-tkinclude or --without-tkinclude was given.
9736 if test "${with_tkinclude+set}" = set; then
9737 withval="$with_tkinclude"
9738 with_tkinclude=${withval}
9739 fi
9740
9741 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9742 echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744
9745 # first check to see if --with-tkinclude was specified
9746 if test x"${with_tkinclude}" != x ; then
9747 if test -f ${with_tkinclude}/tk.h ; then
9748 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9749 elif test -f ${with_tkinclude}/generic/tk.h ; then
9750 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9751 else
9752 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9753 fi
9754 fi
9755
9756 # next check if it came with Tk configuration file
9757 if test x"${ac_cv_c_tkconfig}" = x ; then
9758 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9759 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9760 fi
9761 fi
9762
9763 # next check in private source directory
9764 #
9765 # since ls returns lowest version numbers first, reverse its output
9766 if test x"${ac_cv_c_tkh}" = x ; then
9767 for i in \
9768 ${srcdir}/../tk \
9769 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9770 ${srcdir}/../../tk \
9771 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9772 ${srcdir}/../../../tk \
9773 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9774 if test -f $i/generic/tk.h ; then
9775 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9776 break
9777 fi
9778 done
9779 fi
9780 # finally check in a few common install locations
9781 #
9782 # since ls returns lowest version numbers first, reverse its output
9783 if test x"${ac_cv_c_tkh}" = x ; then
9784 for i in \
9785 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9786 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9787 /usr/local/src/tk \
9788 /usr/local/lib/tk \
9789 ${prefix}/include ; do
9790 if test -f $i/generic/tk.h ; then
9791 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9792 break
9793 fi
9794 done
9795 fi
9796 # see if one is installed
9797 if test x"${ac_cv_c_tkh}" = x ; then
9798 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9799 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9800 echo "configure:9801: checking for tk.h" >&5
9801 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9802 echo $ac_n "(cached) $ac_c" 1>&6
9803 else
9804 cat > conftest.$ac_ext <<EOF
9805 #line 9806 "configure"
9806 #include "confdefs.h"
9807 #include <tk.h>
9808 EOF
9809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9810 { (eval echo configure:9811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9812 if test -z "$ac_err"; then
9813 rm -rf conftest*
9814 eval "ac_cv_header_$ac_safe=yes"
9815 else
9816 echo "$ac_err" >&5
9817 echo "configure: failed program was:" >&5
9818 cat conftest.$ac_ext >&5
9819 rm -rf conftest*
9820 eval "ac_cv_header_$ac_safe=no"
9821 fi
9822 rm -f conftest*
9823 fi
9824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9825 echo "$ac_t""yes" 1>&6
9826 ac_cv_c_tkh=installed
9827 else
9828 echo "$ac_t""no" 1>&6
9829 ac_cv_c_tkh=""
9830 fi
9831
9832 fi
9833
9834 fi
9835
9836 if test x"${ac_cv_c_tkh}" != x ; then
9837 no_tk=""
9838 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9839 echo "$ac_t""is installed" 1>&6
9840 TKHDIR=""
9841 else
9842 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9843 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9844 TKHDIR="-I${ac_cv_c_tkh}"
9845 fi
9846 else
9847 TKHDIR="# no Tk directory found"
9848 echo "configure: warning: Can't find Tk private headers" 1>&2
9849 no_tk=true
9850 fi
9851
9852
9853
9854
9855 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9856 echo "configure:9857: checking for Itcl private headers. srcdir=${srcdir}" >&5
9857 if test x"${ac_cv_c_itclh}" = x ; then
9858 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9859 if test -f $i/generic/itcl.h ; then
9860 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9861 break
9862 fi
9863 done
9864 fi
9865 if test x"${ac_cv_c_itclh}" = x ; then
9866 ITCLHDIR="# no Itcl private headers found"
9867 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9868 fi
9869 if test x"${ac_cv_c_itclh}" != x ; then
9870 ITCLHDIR="-I${ac_cv_c_itclh}"
9871 fi
9872 # should always be here
9873 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
9874
9875 #AC_SUBST(ITCLLIB)
9876
9877
9878 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9879 echo "configure:9880: checking for Itk private headers. srcdir=${srcdir}" >&5
9880 if test x"${ac_cv_c_itkh}" = x ; then
9881 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9882 if test -f $i/generic/itk.h ; then
9883 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9884 break
9885 fi
9886 done
9887 fi
9888 if test x"${ac_cv_c_itkh}" = x ; then
9889 ITKHDIR="# no Itk private headers found"
9890 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9891 fi
9892 if test x"${ac_cv_c_itkh}" != x ; then
9893 ITKHDIR="-I${ac_cv_c_itkh}"
9894 fi
9895 # should always be here
9896 # ITKLIB="../itcl/itk/unix/libitk.a"
9897
9898 #AC_SUBST(ITKLIB)
9899
9900
9901
9902 # now look for Tk library stuff
9903
9904 case "${host}" in
9905 *-*-cygwin*)
9906 tkdir=../tk/win/
9907 ;;
9908 *)
9909 tkdir=../tk/unix/
9910 ;;
9911 esac
9912
9913 TK_DEPS="${tkdir}${TK_LIB_FILE}"
9914
9915 # now look for Itcl library stuff
9916
9917
9918 #
9919 # Ok, lets find the itcl configuration
9920 # First, look for one uninstalled.
9921 # the alternative search directory is invoked by --with-itclconfig
9922 #
9923
9924 if test x"${no_itcl}" = x ; then
9925 # we reset no_itcl in case something fails here
9926 no_itcl=true
9927 # Check whether --with-itclconfig or --without-itclconfig was given.
9928 if test "${with_itclconfig+set}" = set; then
9929 withval="$with_itclconfig"
9930 with_itclconfig=${withval}
9931 fi
9932
9933 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
9934 echo "configure:9935: checking for Itcl configuration" >&5
9935 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9936 echo $ac_n "(cached) $ac_c" 1>&6
9937 else
9938
9939
9940 # First check to see if --with-itclconfig was specified.
9941 if test x"${with_itclconfig}" != x ; then
9942 if test -f "${with_itclconfig}/itclConfig.sh" ; then
9943 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9944 else
9945 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9946 fi
9947 fi
9948
9949 # then check for a private Itcl library
9950 if test x"${ac_cv_c_itclconfig}" = x ; then
9951 for i in \
9952 ../itcl/itcl \
9953 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9954 ../../itcl \
9955 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9956 ../../../itcl \
9957 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9958 if test -f "$i/itclConfig.sh" ; then
9959 ac_cv_c_itclconfig=`(cd $i; pwd)`
9960 break
9961 fi
9962 done
9963 fi
9964 # check in a few common install locations
9965 if test x"${ac_cv_c_itclconfig}" = x ; then
9966 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9967 if test -f "$i/itclConfig.sh" ; then
9968 ac_cv_c_itclconfig=`(cd $i; pwd)`
9969 break
9970 fi
9971 done
9972 fi
9973 # check in a few other private locations
9974 if test x"${ac_cv_c_itclconfig}" = x ; then
9975 for i in \
9976 ${srcdir}/../itcl/itcl \
9977 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9978 if test -f "$i/itclConfig.sh" ; then
9979 ac_cv_c_itclconfig=`(cd $i; pwd)`
9980 break
9981 fi
9982 done
9983 fi
9984
9985 fi
9986
9987 if test x"${ac_cv_c_itclconfig}" = x ; then
9988 ITCLCONFIG="# no Itcl configs found"
9989 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9990 else
9991 no_itcl=
9992 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9993 echo "$ac_t""found $ITCLCONFIG" 1>&6
9994 fi
9995 fi
9996
9997 if test -z "${no_itcl}"; then
9998
9999 if test -f "$ITCLCONFIG" ; then
10000 . $ITCLCONFIG
10001 fi
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
10015 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
10016 fi
10017
10018
10019 # now look for Itk library stuff
10020
10021 #
10022 # Ok, lets find the itk configuration
10023 # First, look for one uninstalled.
10024 # the alternative search directory is invoked by --with-itkconfig
10025 #
10026
10027 if test x"${no_itk}" = x ; then
10028 # we reset no_itk in case something fails here
10029 no_itk=true
10030 # Check whether --with-itkconfig or --without-itkconfig was given.
10031 if test "${with_itkconfig+set}" = set; then
10032 withval="$with_itkconfig"
10033 with_itkconfig=${withval}
10034 fi
10035
10036 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
10037 echo "configure:10038: checking for Itk configuration" >&5
10038 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10039 echo $ac_n "(cached) $ac_c" 1>&6
10040 else
10041
10042
10043 # First check to see if --with-itkconfig was specified.
10044 if test x"${with_itkconfig}" != x ; then
10045 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10046 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10047 else
10048 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10049 fi
10050 fi
10051
10052 # then check for a private Itk library
10053 if test x"${ac_cv_c_itkconfig}" = x ; then
10054 for i in \
10055 ../itcl/itk \
10056 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10057 ../../itk \
10058 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10059 ../../../itk \
10060 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10061 if test -f "$i/itkConfig.sh" ; then
10062 ac_cv_c_itkconfig=`(cd $i; pwd)`
10063 break
10064 fi
10065 done
10066 fi
10067 # check in a few common install locations
10068 if test x"${ac_cv_c_itkconfig}" = x ; then
10069 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10070 if test -f "$i/itkConfig.sh" ; then
10071 ac_cv_c_itkconfig=`(cd $i; pwd)`
10072 break
10073 fi
10074 done
10075 fi
10076 # check in a few other private locations
10077 if test x"${ac_cv_c_itkconfig}" = x ; then
10078 for i in \
10079 ${srcdir}/../itcl/itk \
10080 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10081 if test -f "$i/itkConfig.sh" ; then
10082 ac_cv_c_itkconfig=`(cd $i; pwd)`
10083 break
10084 fi
10085 done
10086 fi
10087
10088 fi
10089
10090 if test x"${ac_cv_c_itkconfig}" = x ; then
10091 ITKCONFIG="# no Itk configs found"
10092 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10093 else
10094 no_itk=
10095 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10096 echo "$ac_t""found $ITKCONFIG" 1>&6
10097 fi
10098 fi
10099
10100
10101 if test -z "${no_itcl}"; then
10102
10103 if test -f "$ITKCONFIG" ; then
10104 . $ITKCONFIG
10105 fi
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118 ITKLIB="${ITK_BUILD_LIB_SPEC}"
10119 ITK_DEPS="${ITK_LIB_FULL_PATH}"
10120 fi
10121
10122 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
10123 # Tcl/Tk 8.1 require -fwritable strings. I don't
10124 # know whether 8.2 will or not, but I bet it will.
10125 # I don't have to worry about 7.x since we don't support it.
10126 GDBTK_CFLAGS=""
10127 if test "$GCC" = "yes"; then
10128 if test "$TCL_VERSION" != "8.0" ; then
10129 GDBTK_CFLAGS="-fwritable-strings"
10130 fi
10131 fi
10132
10133 # Include some libraries that Tcl and Tk want.
10134 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
10135 # Yes, the ordering seems wrong here. But it isn't.
10136 # TK_LIBS is the list of libraries that need to be linked
10137 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10138 # were in LIBS then any link tests after this point would
10139 # try to include things like `$(LIBGUI)', which wouldn't work.
10140 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
10141
10142 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10143 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10144 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10145 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
10146 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
10147 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
10148 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
10149
10150 if test x$gdb_cv_os_cygwin = xyes; then
10151 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10152 WIN32LDAPP="-Wl,--subsystem,console"
10153 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10154 fi
10155 fi
10156 fi
10157
10158 configdirs="${configdirs} gdbtk"
10159 fi
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174 # If we find X, set shell vars x_includes and x_libraries to the
10175 # paths, otherwise set no_x=yes.
10176 # Uses ac_ vars as temps to allow command line to override cache and checks.
10177 # --without-x overrides everything else, but does not touch the cache.
10178 echo $ac_n "checking for X""... $ac_c" 1>&6
10179 echo "configure:10180: checking for X" >&5
10180
10181 # Check whether --with-x or --without-x was given.
10182 if test "${with_x+set}" = set; then
10183 withval="$with_x"
10184 :
10185 fi
10186
10187 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10188 if test "x$with_x" = xno; then
10189 # The user explicitly disabled X.
10190 have_x=disabled
10191 else
10192 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10193 # Both variables are already set.
10194 have_x=yes
10195 else
10196 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10197 echo $ac_n "(cached) $ac_c" 1>&6
10198 else
10199 # One or both of the vars are not set, and there is no cached value.
10200 ac_x_includes=NO ac_x_libraries=NO
10201 rm -fr conftestdir
10202 if mkdir conftestdir; then
10203 cd conftestdir
10204 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10205 cat > Imakefile <<'EOF'
10206 acfindx:
10207 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10208 EOF
10209 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10210 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10211 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10212 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10213 for ac_extension in a so sl; do
10214 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10215 test -f $ac_im_libdir/libX11.$ac_extension; then
10216 ac_im_usrlibdir=$ac_im_libdir; break
10217 fi
10218 done
10219 # Screen out bogus values from the imake configuration. They are
10220 # bogus both because they are the default anyway, and because
10221 # using them would break gcc on systems where it needs fixed includes.
10222 case "$ac_im_incroot" in
10223 /usr/include) ;;
10224 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10225 esac
10226 case "$ac_im_usrlibdir" in
10227 /usr/lib | /lib) ;;
10228 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10229 esac
10230 fi
10231 cd ..
10232 rm -fr conftestdir
10233 fi
10234
10235 if test "$ac_x_includes" = NO; then
10236 # Guess where to find include files, by looking for this one X11 .h file.
10237 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10238
10239 # First, try using that file with no special directory specified.
10240 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 #include <$x_direct_test_include>
10244 EOF
10245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10246 { (eval echo configure:10247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10248 if test -z "$ac_err"; then
10249 rm -rf conftest*
10250 # We can compile using X headers with no special include directory.
10251 ac_x_includes=
10252 else
10253 echo "$ac_err" >&5
10254 echo "configure: failed program was:" >&5
10255 cat conftest.$ac_ext >&5
10256 rm -rf conftest*
10257 # Look for the header file in a standard set of common directories.
10258 # Check X11 before X11Rn because it is often a symlink to the current release.
10259 for ac_dir in \
10260 /usr/X11/include \
10261 /usr/X11R6/include \
10262 /usr/X11R5/include \
10263 /usr/X11R4/include \
10264 \
10265 /usr/include/X11 \
10266 /usr/include/X11R6 \
10267 /usr/include/X11R5 \
10268 /usr/include/X11R4 \
10269 \
10270 /usr/local/X11/include \
10271 /usr/local/X11R6/include \
10272 /usr/local/X11R5/include \
10273 /usr/local/X11R4/include \
10274 \
10275 /usr/local/include/X11 \
10276 /usr/local/include/X11R6 \
10277 /usr/local/include/X11R5 \
10278 /usr/local/include/X11R4 \
10279 \
10280 /usr/X386/include \
10281 /usr/x386/include \
10282 /usr/XFree86/include/X11 \
10283 \
10284 /usr/include \
10285 /usr/local/include \
10286 /usr/unsupported/include \
10287 /usr/athena/include \
10288 /usr/local/x11r5/include \
10289 /usr/lpp/Xamples/include \
10290 \
10291 /usr/openwin/include \
10292 /usr/openwin/share/include \
10293 ; \
10294 do
10295 if test -r "$ac_dir/$x_direct_test_include"; then
10296 ac_x_includes=$ac_dir
10297 break
10298 fi
10299 done
10300 fi
10301 rm -f conftest*
10302 fi # $ac_x_includes = NO
10303
10304 if test "$ac_x_libraries" = NO; then
10305 # Check for the libraries.
10306
10307 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10308 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10309
10310 # See if we find them without any special options.
10311 # Don't add to $LIBS permanently.
10312 ac_save_LIBS="$LIBS"
10313 LIBS="-l$x_direct_test_library $LIBS"
10314 cat > conftest.$ac_ext <<EOF
10315 #line 10316 "configure"
10316 #include "confdefs.h"
10317
10318 int main() {
10319 ${x_direct_test_function}()
10320 ; return 0; }
10321 EOF
10322 if { (eval echo configure:10323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10323 rm -rf conftest*
10324 LIBS="$ac_save_LIBS"
10325 # We can link X programs with no special library path.
10326 ac_x_libraries=
10327 else
10328 echo "configure: failed program was:" >&5
10329 cat conftest.$ac_ext >&5
10330 rm -rf conftest*
10331 LIBS="$ac_save_LIBS"
10332 # First see if replacing the include by lib works.
10333 # Check X11 before X11Rn because it is often a symlink to the current release.
10334 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10335 /usr/X11/lib \
10336 /usr/X11R6/lib \
10337 /usr/X11R5/lib \
10338 /usr/X11R4/lib \
10339 \
10340 /usr/lib/X11 \
10341 /usr/lib/X11R6 \
10342 /usr/lib/X11R5 \
10343 /usr/lib/X11R4 \
10344 \
10345 /usr/local/X11/lib \
10346 /usr/local/X11R6/lib \
10347 /usr/local/X11R5/lib \
10348 /usr/local/X11R4/lib \
10349 \
10350 /usr/local/lib/X11 \
10351 /usr/local/lib/X11R6 \
10352 /usr/local/lib/X11R5 \
10353 /usr/local/lib/X11R4 \
10354 \
10355 /usr/X386/lib \
10356 /usr/x386/lib \
10357 /usr/XFree86/lib/X11 \
10358 \
10359 /usr/lib \
10360 /usr/local/lib \
10361 /usr/unsupported/lib \
10362 /usr/athena/lib \
10363 /usr/local/x11r5/lib \
10364 /usr/lpp/Xamples/lib \
10365 /lib/usr/lib/X11 \
10366 \
10367 /usr/openwin/lib \
10368 /usr/openwin/share/lib \
10369 ; \
10370 do
10371 for ac_extension in a so sl; do
10372 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10373 ac_x_libraries=$ac_dir
10374 break 2
10375 fi
10376 done
10377 done
10378 fi
10379 rm -f conftest*
10380 fi # $ac_x_libraries = NO
10381
10382 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10383 # Didn't find X anywhere. Cache the known absence of X.
10384 ac_cv_have_x="have_x=no"
10385 else
10386 # Record where we found X for the cache.
10387 ac_cv_have_x="have_x=yes \
10388 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10389 fi
10390 fi
10391 fi
10392 eval "$ac_cv_have_x"
10393 fi # $with_x != no
10394
10395 if test "$have_x" != yes; then
10396 echo "$ac_t""$have_x" 1>&6
10397 no_x=yes
10398 else
10399 # If each of the values was on the command line, it overrides each guess.
10400 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10401 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10402 # Update the cache value to reflect the command line values.
10403 ac_cv_have_x="have_x=yes \
10404 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10405 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10406 fi
10407
10408
10409
10410 # Unlike the sim directory, whether a simulator is linked is controlled by
10411 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10412 # This code just checks for a few cases where we'd like to ignore those
10413 # definitions, even when they're present in the '.mt' file. These cases
10414 # are when --disable-sim is specified, or if the simulator directory is
10415 # not part of the source tree.
10416 #
10417 # Check whether --enable-sim or --disable-sim was given.
10418 if test "${enable_sim+set}" = set; then
10419 enableval="$enable_sim"
10420 echo "enable_sim = $enable_sim";
10421 echo "enableval = ${enableval}";
10422 case "${enableval}" in
10423 yes) ignore_sim=false ;;
10424 no) ignore_sim=true ;;
10425 *) ignore_sim=false ;;
10426 esac
10427 else
10428 ignore_sim=false
10429 fi
10430
10431
10432 if test ! -d "${srcdir}/../sim"; then
10433 ignore_sim=true
10434 fi
10435
10436 if test "${ignore_sim}" = "true"; then
10437 IGNORE_SIM="SIM="
10438 IGNORE_SIM_OBS="SIM_OBS="
10439 else
10440 IGNORE_SIM=""
10441 IGNORE_SIM_OBS=""
10442 cat >> confdefs.h <<\EOF
10443 #define WITH_SIM 1
10444 EOF
10445
10446 fi
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461 # target_subdir is used by the testsuite to find the target libraries.
10462 target_subdir=
10463 if test "${host}" != "${target}"; then
10464 target_subdir="${target_alias}/"
10465 fi
10466
10467
10468 frags=
10469 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10470 if test ! -f ${host_makefile_frag}; then
10471 # When building a native debuger the .mh file containing things
10472 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10473 # since it no longer contains anything useful.
10474 if test "${target}" = "${host}"; then
10475 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10476 else
10477 host_makefile_frag=/dev/null
10478 fi
10479 fi
10480 frags="$frags $host_makefile_frag"
10481
10482 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10483 if test ! -f ${target_makefile_frag}; then
10484 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10485 fi
10486 frags="$frags $target_makefile_frag"
10487
10488
10489
10490
10491
10492 hostfile=`sed -n '
10493 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10494 ' ${host_makefile_frag}`
10495
10496 targetfile=`sed -n '
10497 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10498 ' ${target_makefile_frag}`
10499
10500 if test "${target}" = "${host}"; then
10501 # We pick this up from the host configuration file (.mh) because we
10502 # do not have a native configuration Makefile fragment.
10503 nativefile=`sed -n '
10504 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10505 ' ${host_makefile_frag}`
10506 fi
10507
10508
10509 if test x"${gdb_osabi}" != x ; then
10510 cat >> confdefs.h <<EOF
10511 #define GDB_OSABI_DEFAULT $gdb_osabi
10512 EOF
10513
10514 fi
10515
10516 # Enable multi-ice-gdb-server.
10517 # Check whether --enable-multi-ice or --disable-multi-ice was given.
10518 if test "${enable_multi_ice+set}" = set; then
10519 enableval="$enable_multi_ice"
10520 case $enableval in
10521 yes | no)
10522 ;;
10523 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10524 esac
10525 fi
10526
10527 if test "x$enable_multi_ice" = xyes; then
10528 configdirs="$configdirs multi-ice"
10529 fi
10530
10531 # We only build gdbserver automatically if host and target are the same.
10532 if test "x$target" = "x$host"; then
10533 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
10534 echo "configure:10535: checking whether gdbserver is supported on this host" >&5
10535 if test "x$build_gdbserver" = xyes; then
10536 configdirs="$configdirs gdbserver"
10537 echo "$ac_t""yes" 1>&6
10538 else
10539 echo "$ac_t""no" 1>&6
10540 fi
10541 fi
10542
10543 subdirs="doc testsuite $configdirs"
10544
10545
10546 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
10547 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10548 # version.
10549
10550 files=
10551 links=
10552
10553 rm -f xm.h
10554 xm_h=""
10555 if test "${hostfile}" != ""; then
10556 xm_h=xm.h
10557 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10558 files="${files} ${GDB_XM_FILE}"
10559 links="${links} xm.h"
10560 cat >> confdefs.h <<EOF
10561 #define GDB_XM_FILE ${GDB_XM_FILE}
10562 EOF
10563
10564 fi
10565
10566
10567 rm -f tm.h
10568 tm_h=""
10569 if test "${targetfile}" != ""; then
10570 tm_h=tm.h
10571 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10572 files="${files} ${GDB_TM_FILE}"
10573 links="${links} tm.h"
10574 cat >> confdefs.h <<EOF
10575 #define GDB_TM_FILE ${GDB_TM_FILE}
10576 EOF
10577
10578 fi
10579
10580
10581 rm -f nm.h
10582 nm_h=""
10583 if test "${nativefile}" != ""; then
10584 nm_h=nm.h
10585 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10586 files="${files} ${GDB_NM_FILE}"
10587 links="${links} nm.h"
10588 cat >> confdefs.h <<EOF
10589 #define GDB_NM_FILE ${GDB_NM_FILE}
10590 EOF
10591
10592 fi
10593
10594
10595
10596
10597 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
10598 echo "configure:10599: checking for Cygwin environment" >&5
10599 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10600 echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602 cat > conftest.$ac_ext <<EOF
10603 #line 10604 "configure"
10604 #include "confdefs.h"
10605
10606 int main() {
10607
10608 #ifndef __CYGWIN__
10609 #define __CYGWIN__ __CYGWIN32__
10610 #endif
10611 return __CYGWIN__;
10612 ; return 0; }
10613 EOF
10614 if { (eval echo configure:10615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10615 rm -rf conftest*
10616 ac_cv_cygwin=yes
10617 else
10618 echo "configure: failed program was:" >&5
10619 cat conftest.$ac_ext >&5
10620 rm -rf conftest*
10621 ac_cv_cygwin=no
10622 fi
10623 rm -f conftest*
10624 rm -f conftest*
10625 fi
10626
10627 echo "$ac_t""$ac_cv_cygwin" 1>&6
10628 CYGWIN=
10629 test "$ac_cv_cygwin" = yes && CYGWIN=yes
10630 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
10631 echo "configure:10632: checking for mingw32 environment" >&5
10632 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10633 echo $ac_n "(cached) $ac_c" 1>&6
10634 else
10635 cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638
10639 int main() {
10640 return __MINGW32__;
10641 ; return 0; }
10642 EOF
10643 if { (eval echo configure:10644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10644 rm -rf conftest*
10645 ac_cv_mingw32=yes
10646 else
10647 echo "configure: failed program was:" >&5
10648 cat conftest.$ac_ext >&5
10649 rm -rf conftest*
10650 ac_cv_mingw32=no
10651 fi
10652 rm -f conftest*
10653 rm -f conftest*
10654 fi
10655
10656 echo "$ac_t""$ac_cv_mingw32" 1>&6
10657 MINGW32=
10658 test "$ac_cv_mingw32" = yes && MINGW32=yes
10659
10660
10661 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
10662 echo "configure:10663: checking for executable suffix" >&5
10663 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10664 echo $ac_n "(cached) $ac_c" 1>&6
10665 else
10666 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10667 ac_cv_exeext=.exe
10668 else
10669 rm -f conftest*
10670 echo 'int main () { return 0; }' > conftest.$ac_ext
10671 ac_cv_exeext=
10672 if { (eval echo configure:10673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
10673 for file in conftest.*; do
10674 case $file in
10675 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
10676 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10677 esac
10678 done
10679 else
10680 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10681 fi
10682 rm -f conftest*
10683 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10684 fi
10685 fi
10686
10687 EXEEXT=""
10688 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10689 echo "$ac_t""${ac_cv_exeext}" 1>&6
10690 ac_exeext=$EXEEXT
10691
10692
10693
10694 cat >> confdefs.h <<\EOF
10695 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10696 EOF
10697
10698
10699
10700
10701 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10702 if test "${with_libiconv_prefix+set}" = set; then
10703 withval="$with_libiconv_prefix"
10704
10705 for dir in `echo "$withval" | tr : ' '`; do
10706 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10707 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10708 done
10709
10710 fi
10711
10712
10713 echo $ac_n "checking for iconv""... $ac_c" 1>&6
10714 echo "configure:10715: checking for iconv" >&5
10715 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10716 echo $ac_n "(cached) $ac_c" 1>&6
10717 else
10718
10719 am_cv_func_iconv="no, consider installing GNU libiconv"
10720 am_cv_lib_iconv=no
10721 cat > conftest.$ac_ext <<EOF
10722 #line 10723 "configure"
10723 #include "confdefs.h"
10724 #include <stdlib.h>
10725 #include <iconv.h>
10726 int main() {
10727 iconv_t cd = iconv_open("","");
10728 iconv(cd,NULL,NULL,NULL,NULL);
10729 iconv_close(cd);
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733 rm -rf conftest*
10734 am_cv_func_iconv=yes
10735 else
10736 echo "configure: failed program was:" >&5
10737 cat conftest.$ac_ext >&5
10738 fi
10739 rm -f conftest*
10740 if test "$am_cv_func_iconv" != yes; then
10741 am_save_LIBS="$LIBS"
10742 LIBS="$LIBS -liconv"
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746 #include <stdlib.h>
10747 #include <iconv.h>
10748 int main() {
10749 iconv_t cd = iconv_open("","");
10750 iconv(cd,NULL,NULL,NULL,NULL);
10751 iconv_close(cd);
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10755 rm -rf conftest*
10756 am_cv_lib_iconv=yes
10757 am_cv_func_iconv=yes
10758 else
10759 echo "configure: failed program was:" >&5
10760 cat conftest.$ac_ext >&5
10761 fi
10762 rm -f conftest*
10763 LIBS="$am_save_LIBS"
10764 fi
10765
10766 fi
10767
10768 echo "$ac_t""$am_cv_func_iconv" 1>&6
10769 if test "$am_cv_func_iconv" = yes; then
10770 cat >> confdefs.h <<\EOF
10771 #define HAVE_ICONV 1
10772 EOF
10773
10774 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
10775 echo "configure:10776: checking for iconv declaration" >&5
10776 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10777 echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779
10780 cat > conftest.$ac_ext <<EOF
10781 #line 10782 "configure"
10782 #include "confdefs.h"
10783
10784 #include <stdlib.h>
10785 #include <iconv.h>
10786 extern
10787 #ifdef __cplusplus
10788 "C"
10789 #endif
10790 #if defined(__STDC__) || defined(__cplusplus)
10791 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10792 #else
10793 size_t iconv();
10794 #endif
10795
10796 int main() {
10797
10798 ; return 0; }
10799 EOF
10800 if { (eval echo configure:10801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10801 rm -rf conftest*
10802 am_cv_proto_iconv_arg1=""
10803 else
10804 echo "configure: failed program was:" >&5
10805 cat conftest.$ac_ext >&5
10806 rm -rf conftest*
10807 am_cv_proto_iconv_arg1="const"
10808 fi
10809 rm -f conftest*
10810 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);"
10811 fi
10812
10813 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10814 echo "$ac_t""${ac_t:-
10815 }$am_cv_proto_iconv" 1>&6
10816 cat >> confdefs.h <<EOF
10817 #define ICONV_CONST $am_cv_proto_iconv_arg1
10818 EOF
10819
10820 fi
10821 LIBICONV=
10822 if test "$am_cv_lib_iconv" = yes; then
10823 LIBICONV="-liconv"
10824 fi
10825
10826
10827
10828 trap '' 1 2 15
10829 cat > confcache <<\EOF
10830 # This file is a shell script that caches the results of configure
10831 # tests run on this system so they can be shared between configure
10832 # scripts and configure runs. It is not useful on other systems.
10833 # If it contains results you don't want to keep, you may remove or edit it.
10834 #
10835 # By default, configure uses ./config.cache as the cache file,
10836 # creating it if it does not exist already. You can give configure
10837 # the --cache-file=FILE option to use a different cache file; that is
10838 # what configure does when it calls configure scripts in
10839 # subdirectories, so they share the cache.
10840 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10841 # config.status only pays attention to the cache file if you give it the
10842 # --recheck option to rerun configure.
10843 #
10844 EOF
10845 # The following way of writing the cache mishandles newlines in values,
10846 # but we know of no workaround that is simple, portable, and efficient.
10847 # So, don't put newlines in cache variables' values.
10848 # Ultrix sh set writes to stderr and can't be redirected directly,
10849 # and sets the high bit in the cache file unless we assign to the vars.
10850 (set) 2>&1 |
10851 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10852 *ac_space=\ *)
10853 # `set' does not quote correctly, so add quotes (double-quote substitution
10854 # turns \\\\ into \\, and sed turns \\ into \).
10855 sed -n \
10856 -e "s/'/'\\\\''/g" \
10857 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10858 ;;
10859 *)
10860 # `set' quotes correctly as required by POSIX, so do not add quotes.
10861 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10862 ;;
10863 esac >> confcache
10864 if cmp -s $cache_file confcache; then
10865 :
10866 else
10867 if test -w $cache_file; then
10868 echo "updating cache $cache_file"
10869 cat confcache > $cache_file
10870 else
10871 echo "not updating unwritable cache $cache_file"
10872 fi
10873 fi
10874 rm -f confcache
10875
10876 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10877
10878 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10879 # Let make expand exec_prefix.
10880 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10881
10882 # Any assignment to VPATH causes Sun make to only execute
10883 # the first set of double-colon rules, so remove it if not needed.
10884 # If there is a colon in the path, we need to keep it.
10885 if test "x$srcdir" = x.; then
10886 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10887 fi
10888
10889 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10890
10891 DEFS=-DHAVE_CONFIG_H
10892
10893 # Without the "./", some shells look in PATH for config.status.
10894 : ${CONFIG_STATUS=./config.status}
10895
10896 echo creating $CONFIG_STATUS
10897 rm -f $CONFIG_STATUS
10898 cat > $CONFIG_STATUS <<EOF
10899 #! /bin/sh
10900 # Generated automatically by configure.
10901 # Run this file to recreate the current configuration.
10902 # This directory was configured as follows,
10903 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10904 #
10905 # $0 $ac_configure_args
10906 #
10907 # Compiler output produced by configure, useful for debugging
10908 # configure, is in ./config.log if it exists.
10909
10910 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10911 for ac_option
10912 do
10913 case "\$ac_option" in
10914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10915 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10916 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10917 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10918 echo "$CONFIG_STATUS generated by autoconf version 2.13"
10919 exit 0 ;;
10920 -help | --help | --hel | --he | --h)
10921 echo "\$ac_cs_usage"; exit 0 ;;
10922 *) echo "\$ac_cs_usage"; exit 1 ;;
10923 esac
10924 done
10925
10926 ac_given_srcdir=$srcdir
10927 ac_given_INSTALL="$INSTALL"
10928
10929 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10930 EOF
10931 cat >> $CONFIG_STATUS <<EOF
10932
10933 # Protect against being on the right side of a sed subst in config.status.
10934 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10935 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10936 $ac_vpsub
10937 $extrasub
10938 s%@SHELL@%$SHELL%g
10939 s%@CFLAGS@%$CFLAGS%g
10940 s%@CPPFLAGS@%$CPPFLAGS%g
10941 s%@CXXFLAGS@%$CXXFLAGS%g
10942 s%@FFLAGS@%$FFLAGS%g
10943 s%@DEFS@%$DEFS%g
10944 s%@LDFLAGS@%$LDFLAGS%g
10945 s%@LIBS@%$LIBS%g
10946 s%@exec_prefix@%$exec_prefix%g
10947 s%@prefix@%$prefix%g
10948 s%@program_transform_name@%$program_transform_name%g
10949 s%@bindir@%$bindir%g
10950 s%@sbindir@%$sbindir%g
10951 s%@libexecdir@%$libexecdir%g
10952 s%@datadir@%$datadir%g
10953 s%@sysconfdir@%$sysconfdir%g
10954 s%@sharedstatedir@%$sharedstatedir%g
10955 s%@localstatedir@%$localstatedir%g
10956 s%@libdir@%$libdir%g
10957 s%@includedir@%$includedir%g
10958 s%@oldincludedir@%$oldincludedir%g
10959 s%@infodir@%$infodir%g
10960 s%@mandir@%$mandir%g
10961 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10962 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10963 s%@MAINT@%$MAINT%g
10964 s%@CC@%$CC%g
10965 s%@CPP@%$CPP%g
10966 s%@host@%$host%g
10967 s%@host_alias@%$host_alias%g
10968 s%@host_cpu@%$host_cpu%g
10969 s%@host_vendor@%$host_vendor%g
10970 s%@host_os@%$host_os%g
10971 s%@target@%$target%g
10972 s%@target_alias@%$target_alias%g
10973 s%@target_cpu@%$target_cpu%g
10974 s%@target_vendor@%$target_vendor%g
10975 s%@target_os@%$target_os%g
10976 s%@build@%$build%g
10977 s%@build_alias@%$build_alias%g
10978 s%@build_cpu@%$build_cpu%g
10979 s%@build_vendor@%$build_vendor%g
10980 s%@build_os@%$build_os%g
10981 s%@RANLIB@%$RANLIB%g
10982 s%@SET_MAKE@%$SET_MAKE%g
10983 s%@ALLOCA@%$ALLOCA%g
10984 s%@USE_NLS@%$USE_NLS%g
10985 s%@MSGFMT@%$MSGFMT%g
10986 s%@GMSGFMT@%$GMSGFMT%g
10987 s%@XGETTEXT@%$XGETTEXT%g
10988 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10989 s%@CATALOGS@%$CATALOGS%g
10990 s%@CATOBJEXT@%$CATOBJEXT%g
10991 s%@DATADIRNAME@%$DATADIRNAME%g
10992 s%@GMOFILES@%$GMOFILES%g
10993 s%@INSTOBJEXT@%$INSTOBJEXT%g
10994 s%@INTLDEPS@%$INTLDEPS%g
10995 s%@INTLLIBS@%$INTLLIBS%g
10996 s%@INTLOBJS@%$INTLOBJS%g
10997 s%@POFILES@%$POFILES%g
10998 s%@POSUB@%$POSUB%g
10999 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11000 s%@GT_NO@%$GT_NO%g
11001 s%@GT_YES@%$GT_YES%g
11002 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11003 s%@l@%$l%g
11004 s%@subdirs@%$subdirs%g
11005 s%@AWK@%$AWK%g
11006 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11007 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11008 s%@INSTALL_DATA@%$INSTALL_DATA%g
11009 s%@LN_S@%$LN_S%g
11010 s%@YACC@%$YACC%g
11011 s%@AR@%$AR%g
11012 s%@DLLTOOL@%$DLLTOOL%g
11013 s%@WINDRES@%$WINDRES%g
11014 s%@MIG@%$MIG%g
11015 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
11016 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11017 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
11018 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
11019 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
11020 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
11021 s%@WIN32LIBS@%$WIN32LIBS%g
11022 s%@LIBGUI@%$LIBGUI%g
11023 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
11024 s%@WIN32LDAPP@%$WIN32LDAPP%g
11025 s%@TCL_VERSION@%$TCL_VERSION%g
11026 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11027 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11028 s%@TCL_CC@%$TCL_CC%g
11029 s%@TCL_DEFS@%$TCL_DEFS%g
11030 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11031 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11032 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11033 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11034 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11035 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11036 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
11037 s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
11038 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11039 s%@TCL_RANLIB@%$TCL_RANLIB%g
11040 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11041 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11042 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11043 s%@TK_VERSION@%$TK_VERSION%g
11044 s%@TK_DEFS@%$TK_DEFS%g
11045 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11046 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11047 s%@TK_XLIBSW@%$TK_XLIBSW%g
11048 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11049 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11050 s%@TCLHDIR@%$TCLHDIR%g
11051 s%@TKHDIR@%$TKHDIR%g
11052 s%@ITCLHDIR@%$ITCLHDIR%g
11053 s%@ITKHDIR@%$ITKHDIR%g
11054 s%@ITCL_VERSION@%$ITCL_VERSION%g
11055 s%@ITCL_DEFS@%$ITCL_DEFS%g
11056 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11057 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11058 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11059 s%@ITK_VERSION@%$ITK_VERSION%g
11060 s%@ITK_DEFS@%$ITK_DEFS%g
11061 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11062 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11063 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
11064 s%@X_CFLAGS@%$X_CFLAGS%g
11065 s%@X_LDFLAGS@%$X_LDFLAGS%g
11066 s%@X_LIBS@%$X_LIBS%g
11067 s%@TCL_DEPS@%$TCL_DEPS%g
11068 s%@TK_DEPS@%$TK_DEPS%g
11069 s%@ITCLLIB@%$ITCLLIB%g
11070 s%@ITCL_DEPS@%$ITCL_DEPS%g
11071 s%@ITKLIB@%$ITKLIB%g
11072 s%@ITK_DEPS@%$ITK_DEPS%g
11073 s%@GDBTKLIBS@%$GDBTKLIBS%g
11074 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
11075 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
11076 s%@IGNORE_SIM@%$IGNORE_SIM%g
11077 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
11078 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
11079 s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
11080 s%@CONFIG_OBS@%$CONFIG_OBS%g
11081 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11082 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
11083 s%@CONFIG_ALL@%$CONFIG_ALL%g
11084 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
11085 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11086 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
11087 s%@target_subdir@%$target_subdir%g
11088 /@host_makefile_frag@/r $host_makefile_frag
11089 s%@host_makefile_frag@%%g
11090 /@target_makefile_frag@/r $target_makefile_frag
11091 s%@target_makefile_frag@%%g
11092 s%@frags@%$frags%g
11093 s%@xm_h@%$xm_h%g
11094 s%@tm_h@%$tm_h%g
11095 s%@nm_h@%$nm_h%g
11096 s%@EXEEXT@%$EXEEXT%g
11097 s%@LIBICONV@%$LIBICONV%g
11098
11099 CEOF
11100 EOF
11101
11102 cat >> $CONFIG_STATUS <<\EOF
11103
11104 # Split the substitutions into bite-sized pieces for seds with
11105 # small command number limits, like on Digital OSF/1 and HP-UX.
11106 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11107 ac_file=1 # Number of current file.
11108 ac_beg=1 # First line for current file.
11109 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11110 ac_more_lines=:
11111 ac_sed_cmds=""
11112 while $ac_more_lines; do
11113 if test $ac_beg -gt 1; then
11114 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11115 else
11116 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11117 fi
11118 if test ! -s conftest.s$ac_file; then
11119 ac_more_lines=false
11120 rm -f conftest.s$ac_file
11121 else
11122 if test -z "$ac_sed_cmds"; then
11123 ac_sed_cmds="sed -f conftest.s$ac_file"
11124 else
11125 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11126 fi
11127 ac_file=`expr $ac_file + 1`
11128 ac_beg=$ac_end
11129 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11130 fi
11131 done
11132 if test -z "$ac_sed_cmds"; then
11133 ac_sed_cmds=cat
11134 fi
11135 EOF
11136
11137 cat >> $CONFIG_STATUS <<EOF
11138
11139 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
11140 EOF
11141 cat >> $CONFIG_STATUS <<\EOF
11142 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11143 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11144 case "$ac_file" in
11145 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11146 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11147 *) ac_file_in="${ac_file}.in" ;;
11148 esac
11149
11150 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11151
11152 # Remove last slash and all that follows it. Not all systems have dirname.
11153 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11154 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11155 # The file is in a subdirectory.
11156 test ! -d "$ac_dir" && mkdir "$ac_dir"
11157 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11158 # A "../" for each directory in $ac_dir_suffix.
11159 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11160 else
11161 ac_dir_suffix= ac_dots=
11162 fi
11163
11164 case "$ac_given_srcdir" in
11165 .) srcdir=.
11166 if test -z "$ac_dots"; then top_srcdir=.
11167 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11168 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11169 *) # Relative path.
11170 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11171 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11172 esac
11173
11174 case "$ac_given_INSTALL" in
11175 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11176 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11177 esac
11178
11179 echo creating "$ac_file"
11180 rm -f "$ac_file"
11181 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11182 case "$ac_file" in
11183 *Makefile*) ac_comsub="1i\\
11184 # $configure_input" ;;
11185 *) ac_comsub= ;;
11186 esac
11187
11188 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11189 sed -e "$ac_comsub
11190 s%@configure_input@%$configure_input%g
11191 s%@srcdir@%$srcdir%g
11192 s%@top_srcdir@%$top_srcdir%g
11193 s%@INSTALL@%$INSTALL%g
11194 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11195 fi; done
11196 rm -f conftest.s*
11197
11198 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11199 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11200 #
11201 # ac_d sets the value in "#define NAME VALUE" lines.
11202 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11203 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11204 ac_dC='\3'
11205 ac_dD='%g'
11206 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11207 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11208 ac_uB='\([ ]\)%\1#\2define\3'
11209 ac_uC=' '
11210 ac_uD='\4%g'
11211 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11212 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11213 ac_eB='$%\1#\2define\3'
11214 ac_eC=' '
11215 ac_eD='%g'
11216
11217 if test "${CONFIG_HEADERS+set}" != set; then
11218 EOF
11219 cat >> $CONFIG_STATUS <<EOF
11220 CONFIG_HEADERS="config.h:config.in"
11221 EOF
11222 cat >> $CONFIG_STATUS <<\EOF
11223 fi
11224 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11225 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11226 case "$ac_file" in
11227 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11228 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11229 *) ac_file_in="${ac_file}.in" ;;
11230 esac
11231
11232 echo creating $ac_file
11233
11234 rm -f conftest.frag conftest.in conftest.out
11235 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11236 cat $ac_file_inputs > conftest.in
11237
11238 EOF
11239
11240 # Transform confdefs.h into a sed script conftest.vals that substitutes
11241 # the proper values into config.h.in to produce config.h. And first:
11242 # Protect against being on the right side of a sed subst in config.status.
11243 # Protect against being in an unquoted here document in config.status.
11244 rm -f conftest.vals
11245 cat > conftest.hdr <<\EOF
11246 s/[\\&%]/\\&/g
11247 s%[\\$`]%\\&%g
11248 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11249 s%ac_d%ac_u%gp
11250 s%ac_u%ac_e%gp
11251 EOF
11252 sed -n -f conftest.hdr confdefs.h > conftest.vals
11253 rm -f conftest.hdr
11254
11255 # This sed command replaces #undef with comments. This is necessary, for
11256 # example, in the case of _POSIX_SOURCE, which is predefined and required
11257 # on some systems where configure will not decide to define it.
11258 cat >> conftest.vals <<\EOF
11259 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11260 EOF
11261
11262 # Break up conftest.vals because some shells have a limit on
11263 # the size of here documents, and old seds have small limits too.
11264
11265 rm -f conftest.tail
11266 while :
11267 do
11268 ac_lines=`grep -c . conftest.vals`
11269 # grep -c gives empty output for an empty file on some AIX systems.
11270 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11271 # Write a limited-size here document to conftest.frag.
11272 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11273 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11274 echo 'CEOF
11275 sed -f conftest.frag conftest.in > conftest.out
11276 rm -f conftest.in
11277 mv conftest.out conftest.in
11278 ' >> $CONFIG_STATUS
11279 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11280 rm -f conftest.vals
11281 mv conftest.tail conftest.vals
11282 done
11283 rm -f conftest.vals
11284
11285 cat >> $CONFIG_STATUS <<\EOF
11286 rm -f conftest.frag conftest.h
11287 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11288 cat conftest.in >> conftest.h
11289 rm -f conftest.in
11290 if cmp -s $ac_file conftest.h 2>/dev/null; then
11291 echo "$ac_file is unchanged"
11292 rm -f conftest.h
11293 else
11294 # Remove last slash and all that follows it. Not all systems have dirname.
11295 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11296 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11297 # The file is in a subdirectory.
11298 test ! -d "$ac_dir" && mkdir "$ac_dir"
11299 fi
11300 rm -f $ac_file
11301 mv conftest.h $ac_file
11302 fi
11303 fi; done
11304
11305 EOF
11306
11307 cat >> $CONFIG_STATUS <<EOF
11308 ac_sources="$files"
11309 ac_dests="$links"
11310 EOF
11311
11312 cat >> $CONFIG_STATUS <<\EOF
11313 srcdir=$ac_given_srcdir
11314 while test -n "$ac_sources"; do
11315 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11316 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11317
11318 echo "linking $srcdir/$ac_source to $ac_dest"
11319
11320 if test ! -r $srcdir/$ac_source; then
11321 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11322 fi
11323 rm -f $ac_dest
11324
11325 # Make relative symlinks.
11326 # Remove last slash and all that follows it. Not all systems have dirname.
11327 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11328 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11329 # The dest file is in a subdirectory.
11330 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11331 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11332 # A "../" for each directory in $ac_dest_dir_suffix.
11333 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11334 else
11335 ac_dest_dir_suffix= ac_dots=
11336 fi
11337
11338 case "$srcdir" in
11339 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11340 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11341 esac
11342
11343 # Make a symlink if possible; otherwise try a hard link.
11344 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11345 ln $srcdir/$ac_source $ac_dest; then :
11346 else
11347 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11348 fi
11349 done
11350 EOF
11351 cat >> $CONFIG_STATUS <<EOF
11352
11353 gdb_host_cpu=$gdb_host_cpu
11354 gdb_target_cpu=$gdb_target_cpu
11355 nativefile=$nativefile
11356
11357 EOF
11358 cat >> $CONFIG_STATUS <<\EOF
11359
11360 if test "${nativefile}" = ""; then
11361 < Makefile \
11362 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11363 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
11364 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11365 > Makefile.tem
11366 mv -f Makefile.tem Makefile
11367 fi
11368
11369 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11370 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11371 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11372 mv -f Makefile.tmp Makefile
11373
11374
11375 case x$CONFIG_HEADERS in
11376 xconfig.h:config.in)
11377 echo > stamp-h ;;
11378 esac
11379
11380 exit 0
11381 EOF
11382 chmod +x $CONFIG_STATUS
11383 rm -fr confdefs* $ac_clean_files
11384 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11385
11386 if test "$no_recursion" != yes; then
11387
11388 # Remove --cache-file and --srcdir arguments so they do not pile up.
11389 ac_sub_configure_args=
11390 ac_prev=
11391 for ac_arg in $ac_configure_args; do
11392 if test -n "$ac_prev"; then
11393 ac_prev=
11394 continue
11395 fi
11396 case "$ac_arg" in
11397 -cache-file | --cache-file | --cache-fil | --cache-fi \
11398 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11399 ac_prev=cache_file ;;
11400 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11401 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11402 ;;
11403 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11404 ac_prev=srcdir ;;
11405 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11406 ;;
11407 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11408 esac
11409 done
11410
11411 for ac_config_dir in doc testsuite $configdirs; do
11412
11413 # Do not complain, so a configure script can configure whichever
11414 # parts of a large source tree are present.
11415 if test ! -d $srcdir/$ac_config_dir; then
11416 continue
11417 fi
11418
11419 echo configuring in $ac_config_dir
11420
11421 case "$srcdir" in
11422 .) ;;
11423 *)
11424 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11425 else
11426 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11427 fi
11428 ;;
11429 esac
11430
11431 ac_popdir=`pwd`
11432 cd $ac_config_dir
11433
11434 # A "../" for each directory in /$ac_config_dir.
11435 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11436
11437 case "$srcdir" in
11438 .) # No --srcdir option. We are building in place.
11439 ac_sub_srcdir=$srcdir ;;
11440 /*) # Absolute path.
11441 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11442 *) # Relative path.
11443 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11444 esac
11445
11446 # Check for guested configure; otherwise get Cygnus style configure.
11447 if test -f $ac_sub_srcdir/configure; then
11448 ac_sub_configure=$ac_sub_srcdir/configure
11449 elif test -f $ac_sub_srcdir/configure.in; then
11450 ac_sub_configure=$ac_configure
11451 else
11452 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11453 ac_sub_configure=
11454 fi
11455
11456 # The recursion is here.
11457 if test -n "$ac_sub_configure"; then
11458
11459 # Make the cache file name correct relative to the subdirectory.
11460 case "$cache_file" in
11461 /*) ac_sub_cache_file=$cache_file ;;
11462 *) # Relative path.
11463 ac_sub_cache_file="$ac_dots$cache_file" ;;
11464 esac
11465 case "$ac_given_INSTALL" in
11466 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11467 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11468 esac
11469
11470 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11471 # The eval makes quoting arguments work.
11472 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11473 then :
11474 else
11475 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11476 fi
11477 fi
11478
11479 cd $ac_popdir
11480 done
11481 fi
11482
11483
11484 exit 0
This page took 0.294767 seconds and 5 git commands to generate.