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