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