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