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