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