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