* configure.in: Really disable the TUI if an enhanced curses
[binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19 ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
21 ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
23 ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25 ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
27 ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
29 ac_help="$ac_help
30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
31 ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
33 ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
35 ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
39 ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
41 ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
43 ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
45 ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47 ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49 ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51 ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53 ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55 ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
57 ac_help="$ac_help
58 --with-x use the X Window System"
59 ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
61 ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
63 ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
65
66 # Initialize some variables set by options.
67 # The variables have the same names as the options, with
68 # dashes changed to underlines.
69 build=NONE
70 cache_file=./config.cache
71 exec_prefix=NONE
72 host=NONE
73 no_create=
74 nonopt=NONE
75 no_recursion=
76 prefix=NONE
77 program_prefix=NONE
78 program_suffix=NONE
79 program_transform_name=s,x,x,
80 silent=
81 site=
82 sitefile=
83 srcdir=
84 target=NONE
85 verbose=
86 x_includes=NONE
87 x_libraries=NONE
88 bindir='${exec_prefix}/bin'
89 sbindir='${exec_prefix}/sbin'
90 libexecdir='${exec_prefix}/libexec'
91 datadir='${prefix}/share'
92 sysconfdir='${prefix}/etc'
93 sharedstatedir='${prefix}/com'
94 localstatedir='${prefix}/var'
95 libdir='${exec_prefix}/lib'
96 includedir='${prefix}/include'
97 oldincludedir='/usr/include'
98 infodir='${prefix}/info'
99 mandir='${prefix}/man'
100
101 # Initialize some other variables.
102 subdirs=
103 MFLAGS= MAKEFLAGS=
104 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
197 --site-file=FILE use FILE as the site file
198 --version print the version of autoconf that created configure
199 Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223 EOF
224 cat << EOF
225 Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229 Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236 EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451 done
452
453 if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468 exec 6>/dev/null
469 else
470 exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set. These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525 else
526 ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
545 fi
546 else
547 CONFIG_SITE="$sitefile"
548 fi
549 for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554 done
555
556 if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559 else
560 echo "creating cache $cache_file"
561 > $cache_file
562 fi
563
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
570
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577 ' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581 else
582 ac_n= ac_c='\c' ac_t=
583 fi
584
585
586
587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
588 echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590 if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593 else
594 USE_MAINTAINER_MODE=no
595 fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600 if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603 else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606 fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
610
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617 else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620 else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631 fi
632 fi
633 CC="$ac_cv_prog_CC"
634 if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636 else
637 echo "$ac_t""no" 1>&6
638 fi
639
640 if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647 else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650 else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666 if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679 fi
680 fi
681 fi
682 CC="$ac_cv_prog_CC"
683 if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685 else
686 echo "$ac_t""no" 1>&6
687 fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717 else
718 echo "$ac_t""no" 1>&6
719 fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729 ac_ext=c
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 cat > conftest.$ac_ext << EOF
737
738 #line 739 "configure"
739 #include "confdefs.h"
740
741 main(){return(0);}
742 EOF
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751 else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755 fi
756 rm -fr conftest*
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767 fi
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
772
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777 else
778 cat > conftest.c <<EOF
779 #ifdef __GNUC__
780 yes;
781 #endif
782 EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
784 ac_cv_prog_gcc=yes
785 else
786 ac_cv_prog_gcc=no
787 fi
788 fi
789
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792 if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794 else
795 GCC=
796 fi
797
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
800 CFLAGS=
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809 else
810 ac_cv_prog_cc_g=no
811 fi
812 rm -f conftest*
813
814 fi
815
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825 else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831 fi
832
833 cat >> confdefs.h <<\EOF
834 #define _GNU_SOURCE 1
835 EOF
836
837
838 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
839 echo "configure:840: checking how to run the C preprocessor" >&5
840 # On Suns, sometimes $CPP names a directory.
841 if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843 fi
844 if test -z "$CPP"; then
845 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847 else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
854 #line 855 "configure"
855 #include "confdefs.h"
856 #include <assert.h>
857 Syntax Error
858 EOF
859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
860 { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862 if test -z "$ac_err"; then
863 :
864 else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
871 #line 872 "configure"
872 #include "confdefs.h"
873 #include <assert.h>
874 Syntax Error
875 EOF
876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
877 { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879 if test -z "$ac_err"; then
880 :
881 else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
888 #line 889 "configure"
889 #include "confdefs.h"
890 #include <assert.h>
891 Syntax Error
892 EOF
893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
894 { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896 if test -z "$ac_err"; then
897 :
898 else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904 fi
905 rm -f conftest*
906 fi
907 rm -f conftest*
908 fi
909 rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911 fi
912 CPP="$ac_cv_prog_CPP"
913 else
914 ac_cv_prog_CPP="$CPP"
915 fi
916 echo "$ac_t""$CPP" 1>&6
917
918 echo $ac_n "checking for AIX""... $ac_c" 1>&6
919 echo "configure:920: checking for AIX" >&5
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
923 #ifdef _AIX
924 yes
925 #endif
926
927 EOF
928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932 #define _ALL_SOURCE 1
933 EOF
934
935 else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938 fi
939 rm -f conftest*
940
941
942 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
943 echo "configure:944: checking for POSIXized ISC" >&5
944 if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946 then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950 #define _POSIX_SOURCE 1
951 EOF
952
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
958 else
959 echo "$ac_t""no" 1>&6
960 ISC=
961 fi
962
963
964
965
966 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
967 echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
968 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970 else
971 am_cv_prog_cc_stdc=no
972 ac_save_CC="$CC"
973 # Don't try gcc -ansi; that turns off useful extensions and
974 # breaks some systems' header files.
975 # AIX -qlanglvl=ansi
976 # Ultrix and OSF/1 -std1
977 # HP-UX 10.20 and later -Ae
978 # HP-UX older versions -Aa -D_HPUX_SOURCE
979 # SVR4 -Xc -D__EXTENSIONS__
980 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
981 do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
984 #line 985 "configure"
985 #include "confdefs.h"
986 #include <stdarg.h>
987 #include <stdio.h>
988 #include <sys/types.h>
989 #include <sys/stat.h>
990 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991 struct buf { int x; };
992 FILE * (*rcsopen) (struct buf *, struct stat *, int);
993 static char *e (p, i)
994 char **p;
995 int i;
996 {
997 return p[i];
998 }
999 static char *f (char * (*g) (char **, int), char **p, ...)
1000 {
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007 }
1008 int test (int i, double x);
1009 struct s1 {int (*f) (int a);};
1010 struct s2 {int (*f) (double a);};
1011 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012 int argc;
1013 char **argv;
1014
1015 int main() {
1016
1017 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019 ; return 0; }
1020 EOF
1021 if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024 else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027 fi
1028 rm -f conftest*
1029 done
1030 CC="$ac_save_CC"
1031
1032 fi
1033
1034 if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036 else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038 fi
1039 case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042 esac
1043
1044
1045 ac_aux_dir=
1046 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056 done
1057 if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059 fi
1060 ac_config_guess=$ac_aux_dir/config.guess
1061 ac_config_sub=$ac_aux_dir/config.sub
1062 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065 # Do some error checking and defaulting for the host and target type.
1066 # The inputs are:
1067 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068 #
1069 # The rules are:
1070 # 1. You are not allowed to specify --host, --target, and nonopt at the
1071 # same time.
1072 # 2. Host defaults to nonopt.
1073 # 3. If nonopt is not specified, then host defaults to the current host,
1074 # as determined by config.guess.
1075 # 4. Target and build default to nonopt.
1076 # 5. If nonopt is not specified, then target and build default to host.
1077
1078 # The aliases save the names the user supplied, while $host etc.
1079 # will get canonicalized.
1080 case $host---$target---$nonopt in
1081 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083 esac
1084
1085
1086 # Make sure we can run config.sub.
1087 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089 fi
1090
1091 echo $ac_n "checking host system type""... $ac_c" 1>&6
1092 echo "configure:1093: checking host system type" >&5
1093
1094 host_alias=$host
1095 case "$host_alias" in
1096 NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104 esac
1105
1106 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110 echo "$ac_t""$host" 1>&6
1111
1112 echo $ac_n "checking target system type""... $ac_c" 1>&6
1113 echo "configure:1114: checking target system type" >&5
1114
1115 target_alias=$target
1116 case "$target_alias" in
1117 NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122 esac
1123
1124 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 echo "$ac_t""$target" 1>&6
1129
1130 echo $ac_n "checking build system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking build system type" >&5
1132
1133 build_alias=$build
1134 case "$build_alias" in
1135 NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140 esac
1141
1142 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146 echo "$ac_t""$build" 1>&6
1147
1148 test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
1154 # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155 # doesn't support cross-compilation, but the one from Autoconf 2.5x
1156 # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157 # deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1158 # AC_PROG_RANLIB. This can be removed when we switch to Autoconf
1159 # 2.5x.
1160 if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162 else
1163 ac_tool_prefix=
1164 fi
1165
1166 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1169 echo "configure:1170: checking for $ac_word" >&5
1170 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175 else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186 fi
1187 fi
1188 RANLIB="$ac_cv_prog_RANLIB"
1189 if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191 else
1192 echo "$ac_t""no" 1>&6
1193 fi
1194
1195
1196 if test -z "$ac_cv_prog_RANLIB"; then
1197 if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199 set dummy ranlib; ac_word=$2
1200 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1201 echo "configure:1202: checking for $ac_word" >&5
1202 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207 else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219 fi
1220 fi
1221 RANLIB="$ac_cv_prog_RANLIB"
1222 if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224 else
1225 echo "$ac_t""no" 1>&6
1226 fi
1227
1228 else
1229 RANLIB=":"
1230 fi
1231 fi
1232
1233
1234
1235 CONFIG_OBS=
1236 CONFIG_DEPS=
1237 CONFIG_SRCS=
1238 ENABLE_CFLAGS=
1239
1240 CONFIG_ALL=
1241 CONFIG_CLEAN=
1242 CONFIG_INSTALL=
1243 CONFIG_UNINSTALL=
1244
1245
1246 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1247 echo "configure:1248: checking whether ${MAKE-make} sets \${MAKE}" >&5
1248 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1249 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252 cat > conftestmake <<\EOF
1253 all:
1254 @echo 'ac_maketemp="${MAKE}"'
1255 EOF
1256 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1257 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1258 if test -n "$ac_maketemp"; then
1259 eval ac_cv_prog_make_${ac_make}_set=yes
1260 else
1261 eval ac_cv_prog_make_${ac_make}_set=no
1262 fi
1263 rm -f conftestmake
1264 fi
1265 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1266 echo "$ac_t""yes" 1>&6
1267 SET_MAKE=
1268 else
1269 echo "$ac_t""no" 1>&6
1270 SET_MAKE="MAKE=${MAKE-make}"
1271 fi
1272
1273 # Extract the first word of "ranlib", so it can be a program name with args.
1274 set dummy ranlib; ac_word=$2
1275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1276 echo "configure:1277: checking for $ac_word" >&5
1277 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279 else
1280 if test -n "$RANLIB"; then
1281 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1282 else
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286 test -z "$ac_dir" && ac_dir=.
1287 if test -f $ac_dir/$ac_word; then
1288 ac_cv_prog_RANLIB="ranlib"
1289 break
1290 fi
1291 done
1292 IFS="$ac_save_ifs"
1293 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1294 fi
1295 fi
1296 RANLIB="$ac_cv_prog_RANLIB"
1297 if test -n "$RANLIB"; then
1298 echo "$ac_t""$RANLIB" 1>&6
1299 else
1300 echo "$ac_t""no" 1>&6
1301 fi
1302
1303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1304 echo "configure:1305: checking for ANSI C header files" >&5
1305 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308 cat > conftest.$ac_ext <<EOF
1309 #line 1310 "configure"
1310 #include "confdefs.h"
1311 #include <stdlib.h>
1312 #include <stdarg.h>
1313 #include <string.h>
1314 #include <float.h>
1315 EOF
1316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1317 { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319 if test -z "$ac_err"; then
1320 rm -rf conftest*
1321 ac_cv_header_stdc=yes
1322 else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 ac_cv_header_stdc=no
1328 fi
1329 rm -f conftest*
1330
1331 if test $ac_cv_header_stdc = yes; then
1332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1335 "configure"
1335 #include "confdefs.h"
1336 #include <string.h>
1337 EOF
1338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "memchr" >/dev/null 2>&1; then
1340 :
1341 else
1342 rm -rf conftest*
1343 ac_cv_header_stdc=no
1344 fi
1345 rm -f conftest*
1346
1347 fi
1348
1349 if test $ac_cv_header_stdc = yes; then
1350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 #include <stdlib.h>
1355 EOF
1356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357 egrep "free" >/dev/null 2>&1; then
1358 :
1359 else
1360 rm -rf conftest*
1361 ac_cv_header_stdc=no
1362 fi
1363 rm -f conftest*
1364
1365 fi
1366
1367 if test $ac_cv_header_stdc = yes; then
1368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1369 if test "$cross_compiling" = yes; then
1370 :
1371 else
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 #include <ctype.h>
1376 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1377 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1378 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1379 int main () { int i; for (i = 0; i < 256; i++)
1380 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1381 exit (0); }
1382
1383 EOF
1384 if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1385 then
1386 :
1387 else
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1390 rm -fr conftest*
1391 ac_cv_header_stdc=no
1392 fi
1393 rm -fr conftest*
1394 fi
1395
1396 fi
1397 fi
1398
1399 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1400 if test $ac_cv_header_stdc = yes; then
1401 cat >> confdefs.h <<\EOF
1402 #define STDC_HEADERS 1
1403 EOF
1404
1405 fi
1406
1407 echo $ac_n "checking for working const""... $ac_c" 1>&6
1408 echo "configure:1409: checking for working const" >&5
1409 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412 cat > conftest.$ac_ext <<EOF
1413 #line 1414 "configure"
1414 #include "confdefs.h"
1415
1416 int main() {
1417
1418 /* Ultrix mips cc rejects this. */
1419 typedef int charset[2]; const charset x;
1420 /* SunOS 4.1.1 cc rejects this. */
1421 char const *const *ccp;
1422 char **p;
1423 /* NEC SVR4.0.2 mips cc rejects this. */
1424 struct point {int x, y;};
1425 static struct point const zero = {0,0};
1426 /* AIX XL C 1.02.0.0 rejects this.
1427 It does not let you subtract one const X* pointer from another in an arm
1428 of an if-expression whose if-part is not a constant expression */
1429 const char *g = "string";
1430 ccp = &g + (g ? g-g : 0);
1431 /* HPUX 7.0 cc rejects these. */
1432 ++ccp;
1433 p = (char**) ccp;
1434 ccp = (char const *const *) p;
1435 { /* SCO 3.2v4 cc rejects this. */
1436 char *t;
1437 char const *s = 0 ? (char *) 0 : (char const *) 0;
1438
1439 *t++ = 0;
1440 }
1441 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1442 int x[] = {25, 17};
1443 const int *foo = &x[0];
1444 ++foo;
1445 }
1446 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1447 typedef const int *iptr;
1448 iptr p = 0;
1449 ++p;
1450 }
1451 { /* AIX XL C 1.02.0.0 rejects this saying
1452 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1453 struct s { int j; const int *ap[3]; };
1454 struct s *b; b->j = 5;
1455 }
1456 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1457 const int foo = 10;
1458 }
1459
1460 ; return 0; }
1461 EOF
1462 if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1463 rm -rf conftest*
1464 ac_cv_c_const=yes
1465 else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 ac_cv_c_const=no
1470 fi
1471 rm -f conftest*
1472 fi
1473
1474 echo "$ac_t""$ac_cv_c_const" 1>&6
1475 if test $ac_cv_c_const = no; then
1476 cat >> confdefs.h <<\EOF
1477 #define const
1478 EOF
1479
1480 fi
1481
1482 echo $ac_n "checking for inline""... $ac_c" 1>&6
1483 echo "configure:1484: checking for inline" >&5
1484 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487 ac_cv_c_inline=no
1488 for ac_kw in inline __inline__ __inline; do
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492
1493 int main() {
1494 } $ac_kw foo() {
1495 ; return 0; }
1496 EOF
1497 if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1498 rm -rf conftest*
1499 ac_cv_c_inline=$ac_kw; break
1500 else
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1503 fi
1504 rm -f conftest*
1505 done
1506
1507 fi
1508
1509 echo "$ac_t""$ac_cv_c_inline" 1>&6
1510 case "$ac_cv_c_inline" in
1511 inline | yes) ;;
1512 no) cat >> confdefs.h <<\EOF
1513 #define inline
1514 EOF
1515 ;;
1516 *) cat >> confdefs.h <<EOF
1517 #define inline $ac_cv_c_inline
1518 EOF
1519 ;;
1520 esac
1521
1522 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1523 echo "configure:1524: checking for off_t" >&5
1524 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527 cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <sys/types.h>
1531 #if STDC_HEADERS
1532 #include <stdlib.h>
1533 #include <stddef.h>
1534 #endif
1535 EOF
1536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1537 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1538 rm -rf conftest*
1539 ac_cv_type_off_t=yes
1540 else
1541 rm -rf conftest*
1542 ac_cv_type_off_t=no
1543 fi
1544 rm -f conftest*
1545
1546 fi
1547 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1548 if test $ac_cv_type_off_t = no; then
1549 cat >> confdefs.h <<\EOF
1550 #define off_t long
1551 EOF
1552
1553 fi
1554
1555 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1556 echo "configure:1557: checking for size_t" >&5
1557 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559 else
1560 cat > conftest.$ac_ext <<EOF
1561 #line 1562 "configure"
1562 #include "confdefs.h"
1563 #include <sys/types.h>
1564 #if STDC_HEADERS
1565 #include <stdlib.h>
1566 #include <stddef.h>
1567 #endif
1568 EOF
1569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1571 rm -rf conftest*
1572 ac_cv_type_size_t=yes
1573 else
1574 rm -rf conftest*
1575 ac_cv_type_size_t=no
1576 fi
1577 rm -f conftest*
1578
1579 fi
1580 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1581 if test $ac_cv_type_size_t = no; then
1582 cat >> confdefs.h <<\EOF
1583 #define size_t unsigned
1584 EOF
1585
1586 fi
1587
1588 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1589 # for constant arguments. Useless!
1590 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1591 echo "configure:1592: checking for working alloca.h" >&5
1592 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595 cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598 #include <alloca.h>
1599 int main() {
1600 char *p = alloca(2 * sizeof(int));
1601 ; return 0; }
1602 EOF
1603 if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1604 rm -rf conftest*
1605 ac_cv_header_alloca_h=yes
1606 else
1607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1609 rm -rf conftest*
1610 ac_cv_header_alloca_h=no
1611 fi
1612 rm -f conftest*
1613 fi
1614
1615 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1616 if test $ac_cv_header_alloca_h = yes; then
1617 cat >> confdefs.h <<\EOF
1618 #define HAVE_ALLOCA_H 1
1619 EOF
1620
1621 fi
1622
1623 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1624 echo "configure:1625: checking for alloca" >&5
1625 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628 cat > conftest.$ac_ext <<EOF
1629 #line 1630 "configure"
1630 #include "confdefs.h"
1631
1632 #ifdef __GNUC__
1633 # define alloca __builtin_alloca
1634 #else
1635 # ifdef _MSC_VER
1636 # include <malloc.h>
1637 # define alloca _alloca
1638 # else
1639 # if HAVE_ALLOCA_H
1640 # include <alloca.h>
1641 # else
1642 # ifdef _AIX
1643 #pragma alloca
1644 # else
1645 # ifndef alloca /* predefined by HP cc +Olibcalls */
1646 char *alloca ();
1647 # endif
1648 # endif
1649 # endif
1650 # endif
1651 #endif
1652
1653 int main() {
1654 char *p = (char *) alloca(1);
1655 ; return 0; }
1656 EOF
1657 if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1658 rm -rf conftest*
1659 ac_cv_func_alloca_works=yes
1660 else
1661 echo "configure: failed program was:" >&5
1662 cat conftest.$ac_ext >&5
1663 rm -rf conftest*
1664 ac_cv_func_alloca_works=no
1665 fi
1666 rm -f conftest*
1667 fi
1668
1669 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1670 if test $ac_cv_func_alloca_works = yes; then
1671 cat >> confdefs.h <<\EOF
1672 #define HAVE_ALLOCA 1
1673 EOF
1674
1675 fi
1676
1677 if test $ac_cv_func_alloca_works = no; then
1678 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1679 # that cause trouble. Some versions do not even contain alloca or
1680 # contain a buggy version. If you still want to use their alloca,
1681 # use ar to extract alloca.o from them instead of compiling alloca.c.
1682 ALLOCA=alloca.${ac_objext}
1683 cat >> confdefs.h <<\EOF
1684 #define C_ALLOCA 1
1685 EOF
1686
1687
1688 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1689 echo "configure:1690: checking whether alloca needs Cray hooks" >&5
1690 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1691 echo $ac_n "(cached) $ac_c" 1>&6
1692 else
1693 cat > conftest.$ac_ext <<EOF
1694 #line 1695 "configure"
1695 #include "confdefs.h"
1696 #if defined(CRAY) && ! defined(CRAY2)
1697 webecray
1698 #else
1699 wenotbecray
1700 #endif
1701
1702 EOF
1703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1704 egrep "webecray" >/dev/null 2>&1; then
1705 rm -rf conftest*
1706 ac_cv_os_cray=yes
1707 else
1708 rm -rf conftest*
1709 ac_cv_os_cray=no
1710 fi
1711 rm -f conftest*
1712
1713 fi
1714
1715 echo "$ac_t""$ac_cv_os_cray" 1>&6
1716 if test $ac_cv_os_cray = yes; then
1717 for ac_func in _getb67 GETB67 getb67; do
1718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1719 echo "configure:1720: checking for $ac_func" >&5
1720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723 cat > conftest.$ac_ext <<EOF
1724 #line 1725 "configure"
1725 #include "confdefs.h"
1726 /* System header to define __stub macros and hopefully few prototypes,
1727 which can conflict with char $ac_func(); below. */
1728 #include <assert.h>
1729 /* Override any gcc2 internal prototype to avoid an error. */
1730 /* We use char because int might match the return type of a gcc2
1731 builtin and then its argument prototype would still apply. */
1732 char $ac_func();
1733
1734 int main() {
1735
1736 /* The GNU C library defines this for functions which it implements
1737 to always fail with ENOSYS. Some functions are actually named
1738 something starting with __ and the normal name is an alias. */
1739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1740 choke me
1741 #else
1742 $ac_func();
1743 #endif
1744
1745 ; return 0; }
1746 EOF
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1748 rm -rf conftest*
1749 eval "ac_cv_func_$ac_func=yes"
1750 else
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 rm -rf conftest*
1754 eval "ac_cv_func_$ac_func=no"
1755 fi
1756 rm -f conftest*
1757 fi
1758
1759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1760 echo "$ac_t""yes" 1>&6
1761 cat >> confdefs.h <<EOF
1762 #define CRAY_STACKSEG_END $ac_func
1763 EOF
1764
1765 break
1766 else
1767 echo "$ac_t""no" 1>&6
1768 fi
1769
1770 done
1771 fi
1772
1773 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1774 echo "configure:1775: checking stack direction for C alloca" >&5
1775 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778 if test "$cross_compiling" = yes; then
1779 ac_cv_c_stack_direction=0
1780 else
1781 cat > conftest.$ac_ext <<EOF
1782 #line 1783 "configure"
1783 #include "confdefs.h"
1784 find_stack_direction ()
1785 {
1786 static char *addr = 0;
1787 auto char dummy;
1788 if (addr == 0)
1789 {
1790 addr = &dummy;
1791 return find_stack_direction ();
1792 }
1793 else
1794 return (&dummy > addr) ? 1 : -1;
1795 }
1796 main ()
1797 {
1798 exit (find_stack_direction() < 0);
1799 }
1800 EOF
1801 if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1802 then
1803 ac_cv_c_stack_direction=1
1804 else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -fr conftest*
1808 ac_cv_c_stack_direction=-1
1809 fi
1810 rm -fr conftest*
1811 fi
1812
1813 fi
1814
1815 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1816 cat >> confdefs.h <<EOF
1817 #define STACK_DIRECTION $ac_cv_c_stack_direction
1818 EOF
1819
1820 fi
1821
1822 for ac_hdr in unistd.h
1823 do
1824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1826 echo "configure:1827: checking for $ac_hdr" >&5
1827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1828 echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830 cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 #include <$ac_hdr>
1834 EOF
1835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1836 { (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1838 if test -z "$ac_err"; then
1839 rm -rf conftest*
1840 eval "ac_cv_header_$ac_safe=yes"
1841 else
1842 echo "$ac_err" >&5
1843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 rm -rf conftest*
1846 eval "ac_cv_header_$ac_safe=no"
1847 fi
1848 rm -f conftest*
1849 fi
1850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1851 echo "$ac_t""yes" 1>&6
1852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1853 cat >> confdefs.h <<EOF
1854 #define $ac_tr_hdr 1
1855 EOF
1856
1857 else
1858 echo "$ac_t""no" 1>&6
1859 fi
1860 done
1861
1862 for ac_func in getpagesize
1863 do
1864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_func" >&5
1866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 /* System header to define __stub macros and hopefully few prototypes,
1873 which can conflict with char $ac_func(); below. */
1874 #include <assert.h>
1875 /* Override any gcc2 internal prototype to avoid an error. */
1876 /* We use char because int might match the return type of a gcc2
1877 builtin and then its argument prototype would still apply. */
1878 char $ac_func();
1879
1880 int main() {
1881
1882 /* The GNU C library defines this for functions which it implements
1883 to always fail with ENOSYS. Some functions are actually named
1884 something starting with __ and the normal name is an alias. */
1885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886 choke me
1887 #else
1888 $ac_func();
1889 #endif
1890
1891 ; return 0; }
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=yes"
1896 else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_func_$ac_func=no"
1901 fi
1902 rm -f conftest*
1903 fi
1904
1905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906 echo "$ac_t""yes" 1>&6
1907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908 cat >> confdefs.h <<EOF
1909 #define $ac_tr_func 1
1910 EOF
1911
1912 else
1913 echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1918 echo "configure:1919: checking for working mmap" >&5
1919 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922 if test "$cross_compiling" = yes; then
1923 ac_cv_func_mmap_fixed_mapped=no
1924 else
1925 cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928
1929 /* Thanks to Mike Haertel and Jim Avera for this test.
1930 Here is a matrix of mmap possibilities:
1931 mmap private not fixed
1932 mmap private fixed at somewhere currently unmapped
1933 mmap private fixed at somewhere already mapped
1934 mmap shared not fixed
1935 mmap shared fixed at somewhere currently unmapped
1936 mmap shared fixed at somewhere already mapped
1937 For private mappings, we should verify that changes cannot be read()
1938 back from the file, nor mmap's back from the file at a different
1939 address. (There have been systems where private was not correctly
1940 implemented like the infamous i386 svr4.0, and systems where the
1941 VM page cache was not coherent with the filesystem buffer cache
1942 like early versions of FreeBSD and possibly contemporary NetBSD.)
1943 For shared mappings, we should conversely verify that changes get
1944 propogated back to all the places they're supposed to be.
1945
1946 Grep wants private fixed already mapped.
1947 The main things grep needs to know about mmap are:
1948 * does it exist and is it safe to write into the mmap'd area
1949 * how to use it (BSD variants) */
1950 #include <sys/types.h>
1951 #include <fcntl.h>
1952 #include <sys/mman.h>
1953
1954 /* This mess was copied from the GNU getpagesize.h. */
1955 #ifndef HAVE_GETPAGESIZE
1956 # ifdef HAVE_UNISTD_H
1957 # include <unistd.h>
1958 # endif
1959
1960 /* Assume that all systems that can run configure have sys/param.h. */
1961 # ifndef HAVE_SYS_PARAM_H
1962 # define HAVE_SYS_PARAM_H 1
1963 # endif
1964
1965 # ifdef _SC_PAGESIZE
1966 # define getpagesize() sysconf(_SC_PAGESIZE)
1967 # else /* no _SC_PAGESIZE */
1968 # ifdef HAVE_SYS_PARAM_H
1969 # include <sys/param.h>
1970 # ifdef EXEC_PAGESIZE
1971 # define getpagesize() EXEC_PAGESIZE
1972 # else /* no EXEC_PAGESIZE */
1973 # ifdef NBPG
1974 # define getpagesize() NBPG * CLSIZE
1975 # ifndef CLSIZE
1976 # define CLSIZE 1
1977 # endif /* no CLSIZE */
1978 # else /* no NBPG */
1979 # ifdef NBPC
1980 # define getpagesize() NBPC
1981 # else /* no NBPC */
1982 # ifdef PAGESIZE
1983 # define getpagesize() PAGESIZE
1984 # endif /* PAGESIZE */
1985 # endif /* no NBPC */
1986 # endif /* no NBPG */
1987 # endif /* no EXEC_PAGESIZE */
1988 # else /* no HAVE_SYS_PARAM_H */
1989 # define getpagesize() 8192 /* punt totally */
1990 # endif /* no HAVE_SYS_PARAM_H */
1991 # endif /* no _SC_PAGESIZE */
1992
1993 #endif /* no HAVE_GETPAGESIZE */
1994
1995 #ifdef __cplusplus
1996 extern "C" { void *malloc(unsigned); }
1997 #else
1998 char *malloc();
1999 #endif
2000
2001 int
2002 main()
2003 {
2004 char *data, *data2, *data3;
2005 int i, pagesize;
2006 int fd;
2007
2008 pagesize = getpagesize();
2009
2010 /*
2011 * First, make a file with some known garbage in it.
2012 */
2013 data = malloc(pagesize);
2014 if (!data)
2015 exit(1);
2016 for (i = 0; i < pagesize; ++i)
2017 *(data + i) = rand();
2018 umask(0);
2019 fd = creat("conftestmmap", 0600);
2020 if (fd < 0)
2021 exit(1);
2022 if (write(fd, data, pagesize) != pagesize)
2023 exit(1);
2024 close(fd);
2025
2026 /*
2027 * Next, try to mmap the file at a fixed address which
2028 * already has something else allocated at it. If we can,
2029 * also make sure that we see the same garbage.
2030 */
2031 fd = open("conftestmmap", O_RDWR);
2032 if (fd < 0)
2033 exit(1);
2034 data2 = malloc(2 * pagesize);
2035 if (!data2)
2036 exit(1);
2037 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2038 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2039 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2040 exit(1);
2041 for (i = 0; i < pagesize; ++i)
2042 if (*(data + i) != *(data2 + i))
2043 exit(1);
2044
2045 /*
2046 * Finally, make sure that changes to the mapped area
2047 * do not percolate back to the file as seen by read().
2048 * (This is a bug on some variants of i386 svr4.0.)
2049 */
2050 for (i = 0; i < pagesize; ++i)
2051 *(data2 + i) = *(data2 + i) + 1;
2052 data3 = malloc(pagesize);
2053 if (!data3)
2054 exit(1);
2055 if (read(fd, data3, pagesize) != pagesize)
2056 exit(1);
2057 for (i = 0; i < pagesize; ++i)
2058 if (*(data + i) != *(data3 + i))
2059 exit(1);
2060 close(fd);
2061 unlink("conftestmmap");
2062 exit(0);
2063 }
2064
2065 EOF
2066 if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2067 then
2068 ac_cv_func_mmap_fixed_mapped=yes
2069 else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -fr conftest*
2073 ac_cv_func_mmap_fixed_mapped=no
2074 fi
2075 rm -fr conftest*
2076 fi
2077
2078 fi
2079
2080 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2081 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2082 cat >> confdefs.h <<\EOF
2083 #define HAVE_MMAP 1
2084 EOF
2085
2086 fi
2087
2088
2089 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2090 unistd.h values.h sys/param.h
2091 do
2092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2094 echo "configure:2095: checking for $ac_hdr" >&5
2095 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2096 echo $ac_n "(cached) $ac_c" 1>&6
2097 else
2098 cat > conftest.$ac_ext <<EOF
2099 #line 2100 "configure"
2100 #include "confdefs.h"
2101 #include <$ac_hdr>
2102 EOF
2103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2104 { (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2106 if test -z "$ac_err"; then
2107 rm -rf conftest*
2108 eval "ac_cv_header_$ac_safe=yes"
2109 else
2110 echo "$ac_err" >&5
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -rf conftest*
2114 eval "ac_cv_header_$ac_safe=no"
2115 fi
2116 rm -f conftest*
2117 fi
2118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2119 echo "$ac_t""yes" 1>&6
2120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2121 cat >> confdefs.h <<EOF
2122 #define $ac_tr_hdr 1
2123 EOF
2124
2125 else
2126 echo "$ac_t""no" 1>&6
2127 fi
2128 done
2129
2130 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2131 __argz_count __argz_stringify __argz_next
2132 do
2133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2134 echo "configure:2135: checking for $ac_func" >&5
2135 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137 else
2138 cat > conftest.$ac_ext <<EOF
2139 #line 2140 "configure"
2140 #include "confdefs.h"
2141 /* System header to define __stub macros and hopefully few prototypes,
2142 which can conflict with char $ac_func(); below. */
2143 #include <assert.h>
2144 /* Override any gcc2 internal prototype to avoid an error. */
2145 /* We use char because int might match the return type of a gcc2
2146 builtin and then its argument prototype would still apply. */
2147 char $ac_func();
2148
2149 int main() {
2150
2151 /* The GNU C library defines this for functions which it implements
2152 to always fail with ENOSYS. Some functions are actually named
2153 something starting with __ and the normal name is an alias. */
2154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2155 choke me
2156 #else
2157 $ac_func();
2158 #endif
2159
2160 ; return 0; }
2161 EOF
2162 if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2163 rm -rf conftest*
2164 eval "ac_cv_func_$ac_func=yes"
2165 else
2166 echo "configure: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 rm -rf conftest*
2169 eval "ac_cv_func_$ac_func=no"
2170 fi
2171 rm -f conftest*
2172 fi
2173
2174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2175 echo "$ac_t""yes" 1>&6
2176 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2177 cat >> confdefs.h <<EOF
2178 #define $ac_tr_func 1
2179 EOF
2180
2181 else
2182 echo "$ac_t""no" 1>&6
2183 fi
2184 done
2185
2186
2187 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2188 for ac_func in stpcpy
2189 do
2190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_func" >&5
2192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 /* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $ac_func(); below. */
2200 #include <assert.h>
2201 /* Override any gcc2 internal prototype to avoid an error. */
2202 /* We use char because int might match the return type of a gcc2
2203 builtin and then its argument prototype would still apply. */
2204 char $ac_func();
2205
2206 int main() {
2207
2208 /* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2212 choke me
2213 #else
2214 $ac_func();
2215 #endif
2216
2217 ; return 0; }
2218 EOF
2219 if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2220 rm -rf conftest*
2221 eval "ac_cv_func_$ac_func=yes"
2222 else
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2225 rm -rf conftest*
2226 eval "ac_cv_func_$ac_func=no"
2227 fi
2228 rm -f conftest*
2229 fi
2230
2231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2232 echo "$ac_t""yes" 1>&6
2233 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2234 cat >> confdefs.h <<EOF
2235 #define $ac_tr_func 1
2236 EOF
2237
2238 else
2239 echo "$ac_t""no" 1>&6
2240 fi
2241 done
2242
2243 fi
2244 if test "${ac_cv_func_stpcpy}" = "yes"; then
2245 cat >> confdefs.h <<\EOF
2246 #define HAVE_STPCPY 1
2247 EOF
2248
2249 fi
2250
2251 if test $ac_cv_header_locale_h = yes; then
2252 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2253 echo "configure:2254: checking for LC_MESSAGES" >&5
2254 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256 else
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2259 "configure"
2259 #include "confdefs.h"
2260 #include <locale.h>
2261 int main() {
2262 return LC_MESSAGES
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266 rm -rf conftest*
2267 am_cv_val_LC_MESSAGES=yes
2268 else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 am_cv_val_LC_MESSAGES=no
2273 fi
2274 rm -f conftest*
2275 fi
2276
2277 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2278 if test $am_cv_val_LC_MESSAGES = yes; then
2279 cat >> confdefs.h <<\EOF
2280 #define HAVE_LC_MESSAGES 1
2281 EOF
2282
2283 fi
2284 fi
2285 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2286 echo "configure:2287: checking whether NLS is requested" >&5
2287 # Check whether --enable-nls or --disable-nls was given.
2288 if test "${enable_nls+set}" = set; then
2289 enableval="$enable_nls"
2290 USE_NLS=$enableval
2291 else
2292 USE_NLS=yes
2293 fi
2294
2295 echo "$ac_t""$USE_NLS" 1>&6
2296
2297
2298 USE_INCLUDED_LIBINTL=no
2299
2300 if test "$USE_NLS" = "yes"; then
2301 cat >> confdefs.h <<\EOF
2302 #define ENABLE_NLS 1
2303 EOF
2304
2305 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2306 echo "configure:2307: checking whether included gettext is requested" >&5
2307 # Check whether --with-included-gettext or --without-included-gettext was given.
2308 if test "${with_included_gettext+set}" = set; then
2309 withval="$with_included_gettext"
2310 nls_cv_force_use_gnu_gettext=$withval
2311 else
2312 nls_cv_force_use_gnu_gettext=no
2313 fi
2314
2315 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2316
2317 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2318 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2319 nls_cv_header_intl=
2320 nls_cv_header_libgt=
2321 CATOBJEXT=NONE
2322
2323 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2324 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2325 echo "configure:2326: checking for libintl.h" >&5
2326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329 cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <libintl.h>
2333 EOF
2334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2335 { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2337 if test -z "$ac_err"; then
2338 rm -rf conftest*
2339 eval "ac_cv_header_$ac_safe=yes"
2340 else
2341 echo "$ac_err" >&5
2342 echo "configure: failed program was:" >&5
2343 cat conftest.$ac_ext >&5
2344 rm -rf conftest*
2345 eval "ac_cv_header_$ac_safe=no"
2346 fi
2347 rm -f conftest*
2348 fi
2349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350 echo "$ac_t""yes" 1>&6
2351 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2352 echo "configure:2353: checking for gettext in libc" >&5
2353 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #include <libintl.h>
2360 int main() {
2361 return (int) gettext ("")
2362 ; return 0; }
2363 EOF
2364 if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2365 rm -rf conftest*
2366 gt_cv_func_gettext_libc=yes
2367 else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -rf conftest*
2371 gt_cv_func_gettext_libc=no
2372 fi
2373 rm -f conftest*
2374 fi
2375
2376 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2377
2378 if test "$gt_cv_func_gettext_libc" != "yes"; then
2379 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2380 echo "configure:2381: checking for bindtextdomain in -lintl" >&5
2381 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2382 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385 ac_save_LIBS="$LIBS"
2386 LIBS="-lintl $LIBS"
2387 cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 /* Override any gcc2 internal prototype to avoid an error. */
2391 /* We use char because int might match the return type of a gcc2
2392 builtin and then its argument prototype would still apply. */
2393 char bindtextdomain();
2394
2395 int main() {
2396 bindtextdomain()
2397 ; return 0; }
2398 EOF
2399 if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2400 rm -rf conftest*
2401 eval "ac_cv_lib_$ac_lib_var=yes"
2402 else
2403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -rf conftest*
2406 eval "ac_cv_lib_$ac_lib_var=no"
2407 fi
2408 rm -f conftest*
2409 LIBS="$ac_save_LIBS"
2410
2411 fi
2412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2413 echo "$ac_t""yes" 1>&6
2414 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2415 echo "configure:2416: checking for gettext in libintl" >&5
2416 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418 else
2419 cat > conftest.$ac_ext <<EOF
2420 #line 2421 "configure"
2421 #include "confdefs.h"
2422
2423 int main() {
2424 return (int) gettext ("")
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2428 rm -rf conftest*
2429 gt_cv_func_gettext_libintl=yes
2430 else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 gt_cv_func_gettext_libintl=no
2435 fi
2436 rm -f conftest*
2437 fi
2438
2439 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2440 else
2441 echo "$ac_t""no" 1>&6
2442 fi
2443
2444 fi
2445
2446 if test "$gt_cv_func_gettext_libc" = "yes" \
2447 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2448 cat >> confdefs.h <<\EOF
2449 #define HAVE_GETTEXT 1
2450 EOF
2451
2452 # Extract the first word of "msgfmt", so it can be a program name with args.
2453 set dummy msgfmt; ac_word=$2
2454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2455 echo "configure:2456: checking for $ac_word" >&5
2456 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2458 else
2459 case "$MSGFMT" in
2460 /*)
2461 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2462 ;;
2463 *)
2464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2465 for ac_dir in $PATH; do
2466 test -z "$ac_dir" && ac_dir=.
2467 if test -f $ac_dir/$ac_word; then
2468 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2469 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2470 break
2471 fi
2472 fi
2473 done
2474 IFS="$ac_save_ifs"
2475 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2476 ;;
2477 esac
2478 fi
2479 MSGFMT="$ac_cv_path_MSGFMT"
2480 if test -n "$MSGFMT"; then
2481 echo "$ac_t""$MSGFMT" 1>&6
2482 else
2483 echo "$ac_t""no" 1>&6
2484 fi
2485 if test "$MSGFMT" != "no"; then
2486 for ac_func in dcgettext
2487 do
2488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2489 echo "configure:2490: checking for $ac_func" >&5
2490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 /* System header to define __stub macros and hopefully few prototypes,
2497 which can conflict with char $ac_func(); below. */
2498 #include <assert.h>
2499 /* Override any gcc2 internal prototype to avoid an error. */
2500 /* We use char because int might match the return type of a gcc2
2501 builtin and then its argument prototype would still apply. */
2502 char $ac_func();
2503
2504 int main() {
2505
2506 /* The GNU C library defines this for functions which it implements
2507 to always fail with ENOSYS. Some functions are actually named
2508 something starting with __ and the normal name is an alias. */
2509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2510 choke me
2511 #else
2512 $ac_func();
2513 #endif
2514
2515 ; return 0; }
2516 EOF
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2518 rm -rf conftest*
2519 eval "ac_cv_func_$ac_func=yes"
2520 else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -rf conftest*
2524 eval "ac_cv_func_$ac_func=no"
2525 fi
2526 rm -f conftest*
2527 fi
2528
2529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2530 echo "$ac_t""yes" 1>&6
2531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2532 cat >> confdefs.h <<EOF
2533 #define $ac_tr_func 1
2534 EOF
2535
2536 else
2537 echo "$ac_t""no" 1>&6
2538 fi
2539 done
2540
2541 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2542 set dummy gmsgfmt; ac_word=$2
2543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_word" >&5
2545 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548 case "$GMSGFMT" in
2549 /*)
2550 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2551 ;;
2552 ?:/*)
2553 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2554 ;;
2555 *)
2556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2557 ac_dummy="$PATH"
2558 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 if test -f $ac_dir/$ac_word; then
2561 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2562 break
2563 fi
2564 done
2565 IFS="$ac_save_ifs"
2566 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2567 ;;
2568 esac
2569 fi
2570 GMSGFMT="$ac_cv_path_GMSGFMT"
2571 if test -n "$GMSGFMT"; then
2572 echo "$ac_t""$GMSGFMT" 1>&6
2573 else
2574 echo "$ac_t""no" 1>&6
2575 fi
2576
2577 # Extract the first word of "xgettext", so it can be a program name with args.
2578 set dummy xgettext; ac_word=$2
2579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2580 echo "configure:2581: checking for $ac_word" >&5
2581 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2583 else
2584 case "$XGETTEXT" in
2585 /*)
2586 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2587 ;;
2588 *)
2589 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2590 for ac_dir in $PATH; do
2591 test -z "$ac_dir" && ac_dir=.
2592 if test -f $ac_dir/$ac_word; then
2593 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2594 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2595 break
2596 fi
2597 fi
2598 done
2599 IFS="$ac_save_ifs"
2600 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2601 ;;
2602 esac
2603 fi
2604 XGETTEXT="$ac_cv_path_XGETTEXT"
2605 if test -n "$XGETTEXT"; then
2606 echo "$ac_t""$XGETTEXT" 1>&6
2607 else
2608 echo "$ac_t""no" 1>&6
2609 fi
2610
2611 cat > conftest.$ac_ext <<EOF
2612 #line 2613 "configure"
2613 #include "confdefs.h"
2614
2615 int main() {
2616 extern int _nl_msg_cat_cntr;
2617 return _nl_msg_cat_cntr
2618 ; return 0; }
2619 EOF
2620 if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2621 rm -rf conftest*
2622 CATOBJEXT=.gmo
2623 DATADIRNAME=share
2624 else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 CATOBJEXT=.mo
2629 DATADIRNAME=lib
2630 fi
2631 rm -f conftest*
2632 INSTOBJEXT=.mo
2633 fi
2634 fi
2635
2636 else
2637 echo "$ac_t""no" 1>&6
2638 fi
2639
2640
2641
2642 if test "$CATOBJEXT" = "NONE"; then
2643 nls_cv_use_gnu_gettext=yes
2644 fi
2645 fi
2646
2647 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2648 INTLOBJS="\$(GETTOBJS)"
2649 # Extract the first word of "msgfmt", so it can be a program name with args.
2650 set dummy msgfmt; ac_word=$2
2651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2652 echo "configure:2653: checking for $ac_word" >&5
2653 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656 case "$MSGFMT" in
2657 /*)
2658 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2659 ;;
2660 *)
2661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2662 for ac_dir in $PATH; do
2663 test -z "$ac_dir" && ac_dir=.
2664 if test -f $ac_dir/$ac_word; then
2665 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2666 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2667 break
2668 fi
2669 fi
2670 done
2671 IFS="$ac_save_ifs"
2672 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2673 ;;
2674 esac
2675 fi
2676 MSGFMT="$ac_cv_path_MSGFMT"
2677 if test -n "$MSGFMT"; then
2678 echo "$ac_t""$MSGFMT" 1>&6
2679 else
2680 echo "$ac_t""no" 1>&6
2681 fi
2682
2683 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2684 set dummy gmsgfmt; ac_word=$2
2685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686 echo "configure:2687: checking for $ac_word" >&5
2687 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2688 echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690 case "$GMSGFMT" in
2691 /*)
2692 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2693 ;;
2694 ?:/*)
2695 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2696 ;;
2697 *)
2698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2699 ac_dummy="$PATH"
2700 for ac_dir in $ac_dummy; do
2701 test -z "$ac_dir" && ac_dir=.
2702 if test -f $ac_dir/$ac_word; then
2703 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2704 break
2705 fi
2706 done
2707 IFS="$ac_save_ifs"
2708 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2709 ;;
2710 esac
2711 fi
2712 GMSGFMT="$ac_cv_path_GMSGFMT"
2713 if test -n "$GMSGFMT"; then
2714 echo "$ac_t""$GMSGFMT" 1>&6
2715 else
2716 echo "$ac_t""no" 1>&6
2717 fi
2718
2719 # Extract the first word of "xgettext", so it can be a program name with args.
2720 set dummy xgettext; ac_word=$2
2721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2722 echo "configure:2723: checking for $ac_word" >&5
2723 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726 case "$XGETTEXT" in
2727 /*)
2728 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2729 ;;
2730 *)
2731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2732 for ac_dir in $PATH; do
2733 test -z "$ac_dir" && ac_dir=.
2734 if test -f $ac_dir/$ac_word; then
2735 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2736 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2737 break
2738 fi
2739 fi
2740 done
2741 IFS="$ac_save_ifs"
2742 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2743 ;;
2744 esac
2745 fi
2746 XGETTEXT="$ac_cv_path_XGETTEXT"
2747 if test -n "$XGETTEXT"; then
2748 echo "$ac_t""$XGETTEXT" 1>&6
2749 else
2750 echo "$ac_t""no" 1>&6
2751 fi
2752
2753
2754 USE_INCLUDED_LIBINTL=yes
2755 CATOBJEXT=.gmo
2756 INSTOBJEXT=.mo
2757 DATADIRNAME=share
2758 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2759 INTLLIBS=$INTLDEPS
2760 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2761 nls_cv_header_intl=libintl.h
2762 nls_cv_header_libgt=libgettext.h
2763 fi
2764
2765 if test "$XGETTEXT" != ":"; then
2766 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2767 : ;
2768 else
2769 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2770 XGETTEXT=":"
2771 fi
2772 fi
2773
2774 # We need to process the po/ directory.
2775 POSUB=po
2776 else
2777 DATADIRNAME=share
2778 nls_cv_header_intl=libintl.h
2779 nls_cv_header_libgt=libgettext.h
2780 fi
2781
2782 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2783 # because some of the sources are only built for this goal.
2784 if test "$PACKAGE" = gettext; then
2785 USE_NLS=yes
2786 USE_INCLUDED_LIBINTL=yes
2787 fi
2788
2789 for lang in $ALL_LINGUAS; do
2790 GMOFILES="$GMOFILES $lang.gmo"
2791 POFILES="$POFILES $lang.po"
2792 done
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807 if test "x$CATOBJEXT" != "x"; then
2808 if test "x$ALL_LINGUAS" = "x"; then
2809 LINGUAS=
2810 else
2811 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2812 echo "configure:2813: checking for catalogs to be installed" >&5
2813 NEW_LINGUAS=
2814 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2815 case "$ALL_LINGUAS" in
2816 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2817 esac
2818 done
2819 LINGUAS=$NEW_LINGUAS
2820 echo "$ac_t""$LINGUAS" 1>&6
2821 fi
2822
2823 if test -n "$LINGUAS"; then
2824 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2825 fi
2826 fi
2827
2828 if test $ac_cv_header_locale_h = yes; then
2829 INCLUDE_LOCALE_H="#include <locale.h>"
2830 else
2831 INCLUDE_LOCALE_H="\
2832 /* The system does not provide the header <locale.h>. Take care yourself. */"
2833 fi
2834
2835
2836 if test -f $srcdir/po2tbl.sed.in; then
2837 if test "$CATOBJEXT" = ".cat"; then
2838 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2839 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2840 echo "configure:2841: checking for linux/version.h" >&5
2841 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <linux/version.h>
2848 EOF
2849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2850 { (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2852 if test -z "$ac_err"; then
2853 rm -rf conftest*
2854 eval "ac_cv_header_$ac_safe=yes"
2855 else
2856 echo "$ac_err" >&5
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 eval "ac_cv_header_$ac_safe=no"
2861 fi
2862 rm -f conftest*
2863 fi
2864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2865 echo "$ac_t""yes" 1>&6
2866 msgformat=linux
2867 else
2868 echo "$ac_t""no" 1>&6
2869 msgformat=xopen
2870 fi
2871
2872
2873 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2874 fi
2875 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2876 $srcdir/po2tbl.sed.in > po2tbl.sed
2877 fi
2878
2879 if test "$PACKAGE" = "gettext"; then
2880 GT_NO="#NO#"
2881 GT_YES=
2882 else
2883 GT_NO=
2884 GT_YES="#YES#"
2885 fi
2886
2887
2888
2889 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2890
2891
2892 l=
2893
2894
2895 if test -f $srcdir/po/POTFILES.in; then
2896 test -d po || mkdir po
2897 if test "x$srcdir" != "x."; then
2898 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2899 posrcprefix="$srcdir/"
2900 else
2901 posrcprefix="../$srcdir/"
2902 fi
2903 else
2904 posrcprefix="../"
2905 fi
2906 rm -f po/POTFILES
2907 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2908 < $srcdir/po/POTFILES.in > po/POTFILES
2909 fi
2910
2911
2912 localedir='${datadir}/locale'
2913
2914
2915 if test "x$POSUB" != x; then
2916
2917 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2918 echo "configure:2919: checking for catalogs to be installed" >&5
2919 # Look for .po and .gmo files in the source directory.
2920 CATALOGS=
2921 XLINGUAS=
2922 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
2923 # If there aren't any .gmo files the shell will give us the
2924 # literal string "../path/to/srcdir/po/*.gmo" which has to be
2925 # weeded out.
2926 case "$cat" in *\**)
2927 continue;;
2928 esac
2929 # The quadruple backslash is collapsed to a double backslash
2930 # by the backticks, then collapsed again by the double quotes,
2931 # leaving us with one backslash in the sed expression (right
2932 # before the dot that mustn't act as a wildcard).
2933 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
2934 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
2935 # The user is allowed to set LINGUAS to a list of languages to
2936 # install catalogs for. If it's empty that means "all of them."
2937 if test "x$LINGUAS" = x; then
2938 CATALOGS="$CATALOGS $cat"
2939 XLINGUAS="$XLINGUAS $lang"
2940 else
2941 case "$LINGUAS" in *$lang*)
2942 CATALOGS="$CATALOGS $cat"
2943 XLINGUAS="$XLINGUAS $lang"
2944 ;;
2945 esac
2946 fi
2947 done
2948 LINGUAS="$XLINGUAS"
2949 echo "$ac_t""$LINGUAS" 1>&6
2950
2951 CONFIG_ALL="$CONFIG_ALL all-po"
2952 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
2953 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
2954 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
2955 fi
2956
2957 PACKAGE=gdb
2958 cat >> confdefs.h <<EOF
2959 #define PACKAGE "$PACKAGE"
2960 EOF
2961
2962
2963
2964 debugdir=${libdir}/debug
2965
2966 # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2967 if test "${with_separate_debug_dir+set}" = set; then
2968 withval="$with_separate_debug_dir"
2969 debugdir="${withval}"
2970 fi
2971
2972
2973
2974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2976 ac_define_dir=`eval echo $debugdir`
2977 ac_define_dir=`eval echo $ac_define_dir`
2978 cat >> confdefs.h <<EOF
2979 #define DEBUGDIR "$ac_define_dir"
2980 EOF
2981
2982
2983 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
2984
2985 subdirs="doc testsuite"
2986
2987 configdirs=
2988
2989 . $srcdir/configure.host
2990
2991 . $srcdir/configure.tgt
2992
2993 # Fetch the default architecture and default target vector from BFD.
2994 targ=$target; . $srcdir/../bfd/config.bfd
2995
2996 # We only want the first architecture, so strip off the others if
2997 # there is more than one.
2998 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2999
3000 if test "x$targ_archs" != x; then
3001 cat >> confdefs.h <<EOF
3002 #define DEFAULT_BFD_ARCH $targ_archs
3003 EOF
3004
3005 fi
3006 if test "x$targ_defvec" != x; then
3007 cat >> confdefs.h <<EOF
3008 #define DEFAULT_BFD_VEC $targ_defvec
3009 EOF
3010
3011 fi
3012
3013 if test "$program_transform_name" = s,x,x,; then
3014 program_transform_name=
3015 else
3016 # Double any \ or $. echo might interpret backslashes.
3017 cat <<\EOF_SED > conftestsed
3018 s,\\,\\\\,g; s,\$,$$,g
3019 EOF_SED
3020 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3021 rm -f conftestsed
3022 fi
3023 test "$program_prefix" != NONE &&
3024 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3025 # Use a double $ so make ignores it.
3026 test "$program_suffix" != NONE &&
3027 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3028
3029 # sed with no file args requires a program.
3030 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3031
3032
3033 # The CLI cannot be disabled yet, but may be in the future.
3034
3035 # Enable CLI.
3036 # Check whether --enable-gdbcli or --disable-gdbcli was given.
3037 if test "${enable_gdbcli+set}" = set; then
3038 enableval="$enable_gdbcli"
3039 case $enableval in
3040 yes)
3041 ;;
3042 no)
3043 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
3044 *)
3045 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3046 esac
3047 else
3048 enable_gdbcli=yes
3049 fi
3050
3051 if test x"$enable_gdbcli" = xyes; then
3052 if test -d $srcdir/cli; then
3053 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3054 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3055 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3056 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3057 fi
3058 fi
3059
3060 # Enable MI.
3061 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3062 if test "${enable_gdbmi+set}" = set; then
3063 enableval="$enable_gdbmi"
3064 case $enableval in
3065 yes | no)
3066 ;;
3067 *)
3068 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3069 esac
3070 else
3071 enable_gdbmi=yes
3072 fi
3073
3074 if test x"$enable_gdbmi" = xyes; then
3075 if test -d $srcdir/mi; then
3076 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3077 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3078 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3079 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3080 fi
3081 fi
3082
3083 # Enable TUI.
3084 # Check whether --enable-tui or --disable-tui was given.
3085 if test "${enable_tui+set}" = set; then
3086 enableval="$enable_tui"
3087 case $enableval in
3088 yes | no)
3089 ;;
3090 *)
3091 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3092 esac
3093 else
3094 enable_tui=yes
3095 fi
3096
3097
3098 # Enable gdbtk.
3099 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3100 if test "${enable_gdbtk+set}" = set; then
3101 enableval="$enable_gdbtk"
3102 case $enableval in
3103 yes | no)
3104 ;;
3105 *)
3106 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3107 esac
3108 else
3109 if test -d $srcdir/gdbtk; then
3110 enable_gdbtk=yes
3111 else
3112 enable_gdbtk=no
3113 fi
3114 fi
3115
3116 # We unconditionally disable gdbtk tests on selected platforms.
3117 case $host_os in
3118 go32* | windows*)
3119 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3120 enable_gdbtk=no ;;
3121 esac
3122
3123 # Libunwind support.
3124 # Check whether --with-libunwind or --without-libunwind was given.
3125 if test "${with_libunwind+set}" = set; then
3126 withval="$with_libunwind"
3127 case "${withval}" in
3128 yes) enable_libunwind=yes ;;
3129 no) enable_libunwind=no ;;
3130 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3131 esac
3132 else
3133
3134 for ac_hdr in libunwind.h
3135 do
3136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3138 echo "configure:3139: checking for $ac_hdr" >&5
3139 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3140 echo $ac_n "(cached) $ac_c" 1>&6
3141 else
3142 cat > conftest.$ac_ext <<EOF
3143 #line 3144 "configure"
3144 #include "confdefs.h"
3145 #include <$ac_hdr>
3146 EOF
3147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3148 { (eval echo configure:3149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3150 if test -z "$ac_err"; then
3151 rm -rf conftest*
3152 eval "ac_cv_header_$ac_safe=yes"
3153 else
3154 echo "$ac_err" >&5
3155 echo "configure: failed program was:" >&5
3156 cat conftest.$ac_ext >&5
3157 rm -rf conftest*
3158 eval "ac_cv_header_$ac_safe=no"
3159 fi
3160 rm -f conftest*
3161 fi
3162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3163 echo "$ac_t""yes" 1>&6
3164 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3165 cat >> confdefs.h <<EOF
3166 #define $ac_tr_hdr 1
3167 EOF
3168
3169 else
3170 echo "$ac_t""no" 1>&6
3171 fi
3172 done
3173
3174 for ac_hdr in libunwind-ia64.h
3175 do
3176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3178 echo "configure:3179: checking for $ac_hdr" >&5
3179 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3180 echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182 cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 #include <$ac_hdr>
3186 EOF
3187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3188 { (eval echo configure:3189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3190 if test -z "$ac_err"; then
3191 rm -rf conftest*
3192 eval "ac_cv_header_$ac_safe=yes"
3193 else
3194 echo "$ac_err" >&5
3195 echo "configure: failed program was:" >&5
3196 cat conftest.$ac_ext >&5
3197 rm -rf conftest*
3198 eval "ac_cv_header_$ac_safe=no"
3199 fi
3200 rm -f conftest*
3201 fi
3202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3203 echo "$ac_t""yes" 1>&6
3204 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3205 cat >> confdefs.h <<EOF
3206 #define $ac_tr_hdr 1
3207 EOF
3208
3209 else
3210 echo "$ac_t""no" 1>&6
3211 fi
3212 done
3213
3214 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3215 enable_libunwind=yes;
3216 fi
3217
3218 fi
3219
3220
3221 if test x"$enable_libunwind" = xyes; then
3222 for ac_hdr in libunwind.h
3223 do
3224 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3225 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3226 echo "configure:3227: checking for $ac_hdr" >&5
3227 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3228 echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230 cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233 #include <$ac_hdr>
3234 EOF
3235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3236 { (eval echo configure:3237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3238 if test -z "$ac_err"; then
3239 rm -rf conftest*
3240 eval "ac_cv_header_$ac_safe=yes"
3241 else
3242 echo "$ac_err" >&5
3243 echo "configure: failed program was:" >&5
3244 cat conftest.$ac_ext >&5
3245 rm -rf conftest*
3246 eval "ac_cv_header_$ac_safe=no"
3247 fi
3248 rm -f conftest*
3249 fi
3250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3251 echo "$ac_t""yes" 1>&6
3252 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3253 cat >> confdefs.h <<EOF
3254 #define $ac_tr_hdr 1
3255 EOF
3256
3257 else
3258 echo "$ac_t""no" 1>&6
3259 fi
3260 done
3261
3262 for ac_hdr in libunwind-ia64.h
3263 do
3264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3266 echo "configure:3267: checking for $ac_hdr" >&5
3267 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3268 echo $ac_n "(cached) $ac_c" 1>&6
3269 else
3270 cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 #include <$ac_hdr>
3274 EOF
3275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3276 { (eval echo configure:3277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3278 if test -z "$ac_err"; then
3279 rm -rf conftest*
3280 eval "ac_cv_header_$ac_safe=yes"
3281 else
3282 echo "$ac_err" >&5
3283 echo "configure: failed program was:" >&5
3284 cat conftest.$ac_ext >&5
3285 rm -rf conftest*
3286 eval "ac_cv_header_$ac_safe=no"
3287 fi
3288 rm -f conftest*
3289 fi
3290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3291 echo "$ac_t""yes" 1>&6
3292 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3293 cat >> confdefs.h <<EOF
3294 #define $ac_tr_hdr 1
3295 EOF
3296
3297 else
3298 echo "$ac_t""no" 1>&6
3299 fi
3300 done
3301
3302 cat >> confdefs.h <<\EOF
3303 #define HAVE_LIBUNWIND 1
3304 EOF
3305
3306 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3307 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3308 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3309 fi
3310
3311 # Profiling support.
3312 # Check whether --enable-profiling or --disable-profiling was given.
3313 if test "${enable_profiling+set}" = set; then
3314 enableval="$enable_profiling"
3315 case $enableval in
3316 yes | no)
3317 ;;
3318 *)
3319 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3320 esac
3321 else
3322 enable_profiling=no
3323 fi
3324
3325
3326 for ac_func in monstartup _mcleanup
3327 do
3328 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3329 echo "configure:3330: checking for $ac_func" >&5
3330 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3331 echo $ac_n "(cached) $ac_c" 1>&6
3332 else
3333 cat > conftest.$ac_ext <<EOF
3334 #line 3335 "configure"
3335 #include "confdefs.h"
3336 /* System header to define __stub macros and hopefully few prototypes,
3337 which can conflict with char $ac_func(); below. */
3338 #include <assert.h>
3339 /* Override any gcc2 internal prototype to avoid an error. */
3340 /* We use char because int might match the return type of a gcc2
3341 builtin and then its argument prototype would still apply. */
3342 char $ac_func();
3343
3344 int main() {
3345
3346 /* The GNU C library defines this for functions which it implements
3347 to always fail with ENOSYS. Some functions are actually named
3348 something starting with __ and the normal name is an alias. */
3349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3350 choke me
3351 #else
3352 $ac_func();
3353 #endif
3354
3355 ; return 0; }
3356 EOF
3357 if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3358 rm -rf conftest*
3359 eval "ac_cv_func_$ac_func=yes"
3360 else
3361 echo "configure: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
3363 rm -rf conftest*
3364 eval "ac_cv_func_$ac_func=no"
3365 fi
3366 rm -f conftest*
3367 fi
3368
3369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3370 echo "$ac_t""yes" 1>&6
3371 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3372 cat >> confdefs.h <<EOF
3373 #define $ac_tr_func 1
3374 EOF
3375
3376 else
3377 echo "$ac_t""no" 1>&6
3378 fi
3379 done
3380
3381 echo $ac_n "checking for _etext""... $ac_c" 1>&6
3382 echo "configure:3383: checking for _etext" >&5
3383 if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3384 echo $ac_n "(cached) $ac_c" 1>&6
3385 else
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3389 #include <stdlib.h>
3390 extern char _etext;
3391
3392 int main() {
3393 free (&_etext);
3394 ; return 0; }
3395 EOF
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3397 rm -rf conftest*
3398 ac_cv_var__etext=yes
3399 else
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3402 rm -rf conftest*
3403 ac_cv_var__etext=no
3404 fi
3405 rm -f conftest*
3406 fi
3407
3408 echo "$ac_t""$ac_cv_var__etext" 1>&6
3409 if test $ac_cv_var__etext = yes; then
3410 cat >> confdefs.h <<\EOF
3411 #define HAVE__ETEXT 1
3412 EOF
3413
3414 fi
3415 if test "$enable_profiling" = yes ; then
3416 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3417 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3418 fi
3419 PROFILE_CFLAGS=-pg
3420 OLD_CFLAGS="$CFLAGS"
3421 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3422
3423 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3424 echo "configure:3425: checking whether $CC supports -pg" >&5
3425 if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
3426 echo $ac_n "(cached) $ac_c" 1>&6
3427 else
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3431
3432 int main() {
3433 int x;
3434 ; return 0; }
3435 EOF
3436 if { (eval echo configure:3437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3437 rm -rf conftest*
3438 ac_cv_cc_supports_pg=yes
3439 else
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3442 rm -rf conftest*
3443 ac_cv_cc_supports_pg=no
3444 fi
3445 rm -f conftest*
3446 fi
3447
3448 echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
3449
3450 if test $ac_cv_cc_supports_pg = no; then
3451 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3452 fi
3453
3454 CFLAGS="$OLD_CFLAGS"
3455 fi
3456
3457 # --------------------- #
3458 # Checks for programs. #
3459 # --------------------- #
3460
3461 for ac_prog in mawk gawk nawk awk
3462 do
3463 # Extract the first word of "$ac_prog", so it can be a program name with args.
3464 set dummy $ac_prog; ac_word=$2
3465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3466 echo "configure:3467: checking for $ac_word" >&5
3467 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3468 echo $ac_n "(cached) $ac_c" 1>&6
3469 else
3470 if test -n "$AWK"; then
3471 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3472 else
3473 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3474 ac_dummy="$PATH"
3475 for ac_dir in $ac_dummy; do
3476 test -z "$ac_dir" && ac_dir=.
3477 if test -f $ac_dir/$ac_word; then
3478 ac_cv_prog_AWK="$ac_prog"
3479 break
3480 fi
3481 done
3482 IFS="$ac_save_ifs"
3483 fi
3484 fi
3485 AWK="$ac_cv_prog_AWK"
3486 if test -n "$AWK"; then
3487 echo "$ac_t""$AWK" 1>&6
3488 else
3489 echo "$ac_t""no" 1>&6
3490 fi
3491
3492 test -n "$AWK" && break
3493 done
3494
3495 # Find a good install program. We prefer a C program (faster),
3496 # so one script is as good as another. But avoid the broken or
3497 # incompatible versions:
3498 # SysV /etc/install, /usr/sbin/install
3499 # SunOS /usr/etc/install
3500 # IRIX /sbin/install
3501 # AIX /bin/install
3502 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3503 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3504 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3505 # ./install, which can be erroneously created by make from ./install.sh.
3506 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3507 echo "configure:3508: checking for a BSD compatible install" >&5
3508 if test -z "$INSTALL"; then
3509 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3510 echo $ac_n "(cached) $ac_c" 1>&6
3511 else
3512 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3513 for ac_dir in $PATH; do
3514 # Account for people who put trailing slashes in PATH elements.
3515 case "$ac_dir/" in
3516 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3517 *)
3518 # OSF1 and SCO ODT 3.0 have their own names for install.
3519 # Don't use installbsd from OSF since it installs stuff as root
3520 # by default.
3521 for ac_prog in ginstall scoinst install; do
3522 if test -f $ac_dir/$ac_prog; then
3523 if test $ac_prog = install &&
3524 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3525 # AIX install. It has an incompatible calling convention.
3526 :
3527 else
3528 ac_cv_path_install="$ac_dir/$ac_prog -c"
3529 break 2
3530 fi
3531 fi
3532 done
3533 ;;
3534 esac
3535 done
3536 IFS="$ac_save_IFS"
3537
3538 fi
3539 if test "${ac_cv_path_install+set}" = set; then
3540 INSTALL="$ac_cv_path_install"
3541 else
3542 # As a last resort, use the slow shell script. We don't cache a
3543 # path for INSTALL within a source directory, because that will
3544 # break other packages using the cache if that directory is
3545 # removed, or if the path is relative.
3546 INSTALL="$ac_install_sh"
3547 fi
3548 fi
3549 echo "$ac_t""$INSTALL" 1>&6
3550
3551 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3552 # It thinks the first close brace ends the variable substitution.
3553 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3554
3555 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3556
3557 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3558
3559 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3560 echo "configure:3561: checking whether ln -s works" >&5
3561 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3562 echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564 rm -f conftestdata
3565 if ln -s X conftestdata 2>/dev/null
3566 then
3567 rm -f conftestdata
3568 ac_cv_prog_LN_S="ln -s"
3569 else
3570 ac_cv_prog_LN_S=ln
3571 fi
3572 fi
3573 LN_S="$ac_cv_prog_LN_S"
3574 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3575 echo "$ac_t""yes" 1>&6
3576 else
3577 echo "$ac_t""no" 1>&6
3578 fi
3579
3580 # Extract the first word of "ranlib", so it can be a program name with args.
3581 set dummy ranlib; ac_word=$2
3582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3583 echo "configure:3584: checking for $ac_word" >&5
3584 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3585 echo $ac_n "(cached) $ac_c" 1>&6
3586 else
3587 if test -n "$RANLIB"; then
3588 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3589 else
3590 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3591 ac_dummy="$PATH"
3592 for ac_dir in $ac_dummy; do
3593 test -z "$ac_dir" && ac_dir=.
3594 if test -f $ac_dir/$ac_word; then
3595 ac_cv_prog_RANLIB="ranlib"
3596 break
3597 fi
3598 done
3599 IFS="$ac_save_ifs"
3600 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3601 fi
3602 fi
3603 RANLIB="$ac_cv_prog_RANLIB"
3604 if test -n "$RANLIB"; then
3605 echo "$ac_t""$RANLIB" 1>&6
3606 else
3607 echo "$ac_t""no" 1>&6
3608 fi
3609
3610 for ac_prog in 'bison -y' byacc
3611 do
3612 # Extract the first word of "$ac_prog", so it can be a program name with args.
3613 set dummy $ac_prog; ac_word=$2
3614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3615 echo "configure:3616: checking for $ac_word" >&5
3616 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3617 echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619 if test -n "$YACC"; then
3620 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3621 else
3622 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625 test -z "$ac_dir" && ac_dir=.
3626 if test -f $ac_dir/$ac_word; then
3627 ac_cv_prog_YACC="$ac_prog"
3628 break
3629 fi
3630 done
3631 IFS="$ac_save_ifs"
3632 fi
3633 fi
3634 YACC="$ac_cv_prog_YACC"
3635 if test -n "$YACC"; then
3636 echo "$ac_t""$YACC" 1>&6
3637 else
3638 echo "$ac_t""no" 1>&6
3639 fi
3640
3641 test -n "$YACC" && break
3642 done
3643 test -n "$YACC" || YACC="yacc"
3644
3645
3646 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3647 set dummy ${ac_tool_prefix}ar; ac_word=$2
3648 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3649 echo "configure:3650: checking for $ac_word" >&5
3650 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3651 echo $ac_n "(cached) $ac_c" 1>&6
3652 else
3653 if test -n "$AR"; then
3654 ac_cv_prog_AR="$AR" # Let the user override the test.
3655 else
3656 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3657 ac_dummy="$PATH"
3658 for ac_dir in $ac_dummy; do
3659 test -z "$ac_dir" && ac_dir=.
3660 if test -f $ac_dir/$ac_word; then
3661 ac_cv_prog_AR="${ac_tool_prefix}ar"
3662 break
3663 fi
3664 done
3665 IFS="$ac_save_ifs"
3666 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3667 fi
3668 fi
3669 AR="$ac_cv_prog_AR"
3670 if test -n "$AR"; then
3671 echo "$ac_t""$AR" 1>&6
3672 else
3673 echo "$ac_t""no" 1>&6
3674 fi
3675
3676
3677
3678 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3679 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3680 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $ac_word" >&5
3682 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3683 echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685 if test -n "$DLLTOOL"; then
3686 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3687 else
3688 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3689 ac_dummy="$PATH"
3690 for ac_dir in $ac_dummy; do
3691 test -z "$ac_dir" && ac_dir=.
3692 if test -f $ac_dir/$ac_word; then
3693 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3694 break
3695 fi
3696 done
3697 IFS="$ac_save_ifs"
3698 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3699 fi
3700 fi
3701 DLLTOOL="$ac_cv_prog_DLLTOOL"
3702 if test -n "$DLLTOOL"; then
3703 echo "$ac_t""$DLLTOOL" 1>&6
3704 else
3705 echo "$ac_t""no" 1>&6
3706 fi
3707
3708
3709
3710 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3711 set dummy ${ac_tool_prefix}windres; ac_word=$2
3712 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3713 echo "configure:3714: checking for $ac_word" >&5
3714 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3715 echo $ac_n "(cached) $ac_c" 1>&6
3716 else
3717 if test -n "$WINDRES"; then
3718 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3719 else
3720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3721 ac_dummy="$PATH"
3722 for ac_dir in $ac_dummy; do
3723 test -z "$ac_dir" && ac_dir=.
3724 if test -f $ac_dir/$ac_word; then
3725 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3726 break
3727 fi
3728 done
3729 IFS="$ac_save_ifs"
3730 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3731 fi
3732 fi
3733 WINDRES="$ac_cv_prog_WINDRES"
3734 if test -n "$WINDRES"; then
3735 echo "$ac_t""$WINDRES" 1>&6
3736 else
3737 echo "$ac_t""no" 1>&6
3738 fi
3739
3740
3741
3742
3743 # Needed for GNU/Hurd.
3744 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3745 set dummy ${ac_tool_prefix}mig; ac_word=$2
3746 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3747 echo "configure:3748: checking for $ac_word" >&5
3748 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3749 echo $ac_n "(cached) $ac_c" 1>&6
3750 else
3751 if test -n "$MIG"; then
3752 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3753 else
3754 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3755 ac_dummy="$PATH"
3756 for ac_dir in $ac_dummy; do
3757 test -z "$ac_dir" && ac_dir=.
3758 if test -f $ac_dir/$ac_word; then
3759 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3760 break
3761 fi
3762 done
3763 IFS="$ac_save_ifs"
3764 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3765 fi
3766 fi
3767 MIG="$ac_cv_prog_MIG"
3768 if test -n "$MIG"; then
3769 echo "$ac_t""$MIG" 1>&6
3770 else
3771 echo "$ac_t""no" 1>&6
3772 fi
3773
3774
3775
3776
3777 # ---------------------- #
3778 # Checks for libraries. #
3779 # ---------------------- #
3780
3781 # We might need to link with -lm; most simulators need it.
3782 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3783 echo "configure:3784: checking for main in -lm" >&5
3784 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3786 echo $ac_n "(cached) $ac_c" 1>&6
3787 else
3788 ac_save_LIBS="$LIBS"
3789 LIBS="-lm $LIBS"
3790 cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793
3794 int main() {
3795 main()
3796 ; return 0; }
3797 EOF
3798 if { (eval echo configure:3799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3799 rm -rf conftest*
3800 eval "ac_cv_lib_$ac_lib_var=yes"
3801 else
3802 echo "configure: failed program was:" >&5
3803 cat conftest.$ac_ext >&5
3804 rm -rf conftest*
3805 eval "ac_cv_lib_$ac_lib_var=no"
3806 fi
3807 rm -f conftest*
3808 LIBS="$ac_save_LIBS"
3809
3810 fi
3811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3812 echo "$ac_t""yes" 1>&6
3813 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3814 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3815 cat >> confdefs.h <<EOF
3816 #define $ac_tr_lib 1
3817 EOF
3818
3819 LIBS="-lm $LIBS"
3820
3821 else
3822 echo "$ac_t""no" 1>&6
3823 fi
3824
3825
3826 # We need to link with -lw to get `wctype' on Solaris before Solaris
3827 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3828 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3829 # is known to have this problem). Therefore we avoid libw if we can.
3830 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3831 echo "configure:3832: checking for wctype" >&5
3832 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3833 echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 /* System header to define __stub macros and hopefully few prototypes,
3839 which can conflict with char wctype(); below. */
3840 #include <assert.h>
3841 /* Override any gcc2 internal prototype to avoid an error. */
3842 /* We use char because int might match the return type of a gcc2
3843 builtin and then its argument prototype would still apply. */
3844 char wctype();
3845
3846 int main() {
3847
3848 /* The GNU C library defines this for functions which it implements
3849 to always fail with ENOSYS. Some functions are actually named
3850 something starting with __ and the normal name is an alias. */
3851 #if defined (__stub_wctype) || defined (__stub___wctype)
3852 choke me
3853 #else
3854 wctype();
3855 #endif
3856
3857 ; return 0; }
3858 EOF
3859 if { (eval echo configure:3860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3860 rm -rf conftest*
3861 eval "ac_cv_func_wctype=yes"
3862 else
3863 echo "configure: failed program was:" >&5
3864 cat conftest.$ac_ext >&5
3865 rm -rf conftest*
3866 eval "ac_cv_func_wctype=no"
3867 fi
3868 rm -f conftest*
3869 fi
3870
3871 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3872 echo "$ac_t""yes" 1>&6
3873 :
3874 else
3875 echo "$ac_t""no" 1>&6
3876 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3877 echo "configure:3878: checking for wctype in -lw" >&5
3878 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3879 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3880 echo $ac_n "(cached) $ac_c" 1>&6
3881 else
3882 ac_save_LIBS="$LIBS"
3883 LIBS="-lw $LIBS"
3884 cat > conftest.$ac_ext <<EOF
3885 #line 3886 "configure"
3886 #include "confdefs.h"
3887 /* Override any gcc2 internal prototype to avoid an error. */
3888 /* We use char because int might match the return type of a gcc2
3889 builtin and then its argument prototype would still apply. */
3890 char wctype();
3891
3892 int main() {
3893 wctype()
3894 ; return 0; }
3895 EOF
3896 if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3897 rm -rf conftest*
3898 eval "ac_cv_lib_$ac_lib_var=yes"
3899 else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 eval "ac_cv_lib_$ac_lib_var=no"
3904 fi
3905 rm -f conftest*
3906 LIBS="$ac_save_LIBS"
3907
3908 fi
3909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3910 echo "$ac_t""yes" 1>&6
3911 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3912 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3913 cat >> confdefs.h <<EOF
3914 #define $ac_tr_lib 1
3915 EOF
3916
3917 LIBS="-lw $LIBS"
3918
3919 else
3920 echo "$ac_t""no" 1>&6
3921 fi
3922
3923 fi
3924
3925
3926 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3927
3928 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3929 echo "configure:3930: checking for library containing gethostbyname" >&5
3930 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3931 echo $ac_n "(cached) $ac_c" 1>&6
3932 else
3933 ac_func_search_save_LIBS="$LIBS"
3934 ac_cv_search_gethostbyname="no"
3935 cat > conftest.$ac_ext <<EOF
3936 #line 3937 "configure"
3937 #include "confdefs.h"
3938 /* Override any gcc2 internal prototype to avoid an error. */
3939 /* We use char because int might match the return type of a gcc2
3940 builtin and then its argument prototype would still apply. */
3941 char gethostbyname();
3942
3943 int main() {
3944 gethostbyname()
3945 ; return 0; }
3946 EOF
3947 if { (eval echo configure:3948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3948 rm -rf conftest*
3949 ac_cv_search_gethostbyname="none required"
3950 else
3951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953 fi
3954 rm -f conftest*
3955 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3956 LIBS="-l$i $ac_func_search_save_LIBS"
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960 /* Override any gcc2 internal prototype to avoid an error. */
3961 /* We use char because int might match the return type of a gcc2
3962 builtin and then its argument prototype would still apply. */
3963 char gethostbyname();
3964
3965 int main() {
3966 gethostbyname()
3967 ; return 0; }
3968 EOF
3969 if { (eval echo configure:3970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3970 rm -rf conftest*
3971 ac_cv_search_gethostbyname="-l$i"
3972 break
3973 else
3974 echo "configure: failed program was:" >&5
3975 cat conftest.$ac_ext >&5
3976 fi
3977 rm -f conftest*
3978 done
3979 LIBS="$ac_func_search_save_LIBS"
3980 fi
3981
3982 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3983 if test "$ac_cv_search_gethostbyname" != "no"; then
3984 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3985
3986 else :
3987
3988 fi
3989
3990 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
3991
3992 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
3993 echo "configure:3994: checking for library containing socketpair" >&5
3994 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3995 echo $ac_n "(cached) $ac_c" 1>&6
3996 else
3997 ac_func_search_save_LIBS="$LIBS"
3998 ac_cv_search_socketpair="no"
3999 cat > conftest.$ac_ext <<EOF
4000 #line 4001 "configure"
4001 #include "confdefs.h"
4002 /* Override any gcc2 internal prototype to avoid an error. */
4003 /* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005 char socketpair();
4006
4007 int main() {
4008 socketpair()
4009 ; return 0; }
4010 EOF
4011 if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4012 rm -rf conftest*
4013 ac_cv_search_socketpair="none required"
4014 else
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017 fi
4018 rm -f conftest*
4019 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4020 LIBS="-l$i $ac_func_search_save_LIBS"
4021 cat > conftest.$ac_ext <<EOF
4022 #line 4023 "configure"
4023 #include "confdefs.h"
4024 /* Override any gcc2 internal prototype to avoid an error. */
4025 /* We use char because int might match the return type of a gcc2
4026 builtin and then its argument prototype would still apply. */
4027 char socketpair();
4028
4029 int main() {
4030 socketpair()
4031 ; return 0; }
4032 EOF
4033 if { (eval echo configure:4034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4034 rm -rf conftest*
4035 ac_cv_search_socketpair="-l$i"
4036 break
4037 else
4038 echo "configure: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 fi
4041 rm -f conftest*
4042 done
4043 LIBS="$ac_func_search_save_LIBS"
4044 fi
4045
4046 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4047 if test "$ac_cv_search_socketpair" != "no"; then
4048 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4049
4050 else :
4051
4052 fi
4053
4054 # For the TUI, we need enhanced curses functionality.
4055 #
4056 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
4057 # curses library because the latter might not provide all the
4058 # functionality we need. However, this leads to problems on systems
4059 # where the linker searches /usr/local/lib, but the compiler doesn't
4060 # search /usr/local/include, if ncurses is installed in /usr/local. A
4061 # default installation of ncurses on alpha*-dec-osf* will lead to such
4062 # a situation.
4063
4064 echo $ac_n "checking for library containing waddstr""... $ac_c" 1>&6
4065 echo "configure:4066: checking for library containing waddstr" >&5
4066 if eval "test \"`echo '$''{'ac_cv_search_waddstr'+set}'`\" = set"; then
4067 echo $ac_n "(cached) $ac_c" 1>&6
4068 else
4069 ac_func_search_save_LIBS="$LIBS"
4070 ac_cv_search_waddstr="no"
4071 cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074 /* Override any gcc2 internal prototype to avoid an error. */
4075 /* We use char because int might match the return type of a gcc2
4076 builtin and then its argument prototype would still apply. */
4077 char waddstr();
4078
4079 int main() {
4080 waddstr()
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4084 rm -rf conftest*
4085 ac_cv_search_waddstr="none required"
4086 else
4087 echo "configure: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 fi
4090 rm -f conftest*
4091 test "$ac_cv_search_waddstr" = "no" && for i in ncurses cursesX curses; do
4092 LIBS="-l$i $ac_func_search_save_LIBS"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 /* Override any gcc2 internal prototype to avoid an error. */
4097 /* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
4099 char waddstr();
4100
4101 int main() {
4102 waddstr()
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106 rm -rf conftest*
4107 ac_cv_search_waddstr="-l$i"
4108 break
4109 else
4110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 fi
4113 rm -f conftest*
4114 done
4115 LIBS="$ac_func_search_save_LIBS"
4116 fi
4117
4118 echo "$ac_t""$ac_cv_search_waddstr" 1>&6
4119 if test "$ac_cv_search_waddstr" != "no"; then
4120 test "$ac_cv_search_waddstr" = "none required" || LIBS="$ac_cv_search_waddstr $LIBS"
4121
4122 else :
4123
4124 fi
4125
4126 # Since GDB uses Readline, we need termcap functionality. In many
4127 # cases this will be provided by the curses library, but some systems
4128 # have a seperate termcap library, or no curses library at all.
4129
4130 case $host_os in
4131 cygwin*)
4132 if test -d $srcdir/libtermcap; then
4133 LIBS="../libtermcap/libtermcap.a $LIBS"
4134 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4135 fi ;;
4136 go32* | *djgpp*)
4137 ac_cv_search_tgetent="none required"
4138 ;;
4139 esac
4140
4141 # These are the libraries checked by Readline.
4142
4143 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4144 echo "configure:4145: checking for library containing tgetent" >&5
4145 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4146 echo $ac_n "(cached) $ac_c" 1>&6
4147 else
4148 ac_func_search_save_LIBS="$LIBS"
4149 ac_cv_search_tgetent="no"
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 /* Override any gcc2 internal prototype to avoid an error. */
4154 /* We use char because int might match the return type of a gcc2
4155 builtin and then its argument prototype would still apply. */
4156 char tgetent();
4157
4158 int main() {
4159 tgetent()
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4163 rm -rf conftest*
4164 ac_cv_search_tgetent="none required"
4165 else
4166 echo "configure: failed program was:" >&5
4167 cat conftest.$ac_ext >&5
4168 fi
4169 rm -f conftest*
4170 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo curses ncurses; do
4171 LIBS="-l$i $ac_func_search_save_LIBS"
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175 /* Override any gcc2 internal prototype to avoid an error. */
4176 /* We use char because int might match the return type of a gcc2
4177 builtin and then its argument prototype would still apply. */
4178 char tgetent();
4179
4180 int main() {
4181 tgetent()
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4185 rm -rf conftest*
4186 ac_cv_search_tgetent="-l$i"
4187 break
4188 else
4189 echo "configure: failed program was:" >&5
4190 cat conftest.$ac_ext >&5
4191 fi
4192 rm -f conftest*
4193 done
4194 LIBS="$ac_func_search_save_LIBS"
4195 fi
4196
4197 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4198 if test "$ac_cv_search_tgetent" != "no"; then
4199 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4200
4201 else :
4202
4203 fi
4204
4205 if test "$ac_cv_search_tgetent" = no; then
4206 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4207 fi
4208
4209 # ------------------------- #
4210 # Checks for header files. #
4211 # ------------------------- #
4212
4213 ac_header_dirent=no
4214 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4215 do
4216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4217 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4218 echo "configure:4219: checking for $ac_hdr that defines DIR" >&5
4219 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4220 echo $ac_n "(cached) $ac_c" 1>&6
4221 else
4222 cat > conftest.$ac_ext <<EOF
4223 #line 4224 "configure"
4224 #include "confdefs.h"
4225 #include <sys/types.h>
4226 #include <$ac_hdr>
4227 int main() {
4228 DIR *dirp = 0;
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4232 rm -rf conftest*
4233 eval "ac_cv_header_dirent_$ac_safe=yes"
4234 else
4235 echo "configure: failed program was:" >&5
4236 cat conftest.$ac_ext >&5
4237 rm -rf conftest*
4238 eval "ac_cv_header_dirent_$ac_safe=no"
4239 fi
4240 rm -f conftest*
4241 fi
4242 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4243 echo "$ac_t""yes" 1>&6
4244 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4245 cat >> confdefs.h <<EOF
4246 #define $ac_tr_hdr 1
4247 EOF
4248 ac_header_dirent=$ac_hdr; break
4249 else
4250 echo "$ac_t""no" 1>&6
4251 fi
4252 done
4253 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4254 if test $ac_header_dirent = dirent.h; then
4255 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4256 echo "configure:4257: checking for opendir in -ldir" >&5
4257 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4258 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
4260 else
4261 ac_save_LIBS="$LIBS"
4262 LIBS="-ldir $LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error. */
4267 /* We use char because int might match the return type of a gcc2
4268 builtin and then its argument prototype would still apply. */
4269 char opendir();
4270
4271 int main() {
4272 opendir()
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276 rm -rf conftest*
4277 eval "ac_cv_lib_$ac_lib_var=yes"
4278 else
4279 echo "configure: failed program was:" >&5
4280 cat conftest.$ac_ext >&5
4281 rm -rf conftest*
4282 eval "ac_cv_lib_$ac_lib_var=no"
4283 fi
4284 rm -f conftest*
4285 LIBS="$ac_save_LIBS"
4286
4287 fi
4288 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4289 echo "$ac_t""yes" 1>&6
4290 LIBS="$LIBS -ldir"
4291 else
4292 echo "$ac_t""no" 1>&6
4293 fi
4294
4295 else
4296 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4297 echo "configure:4298: checking for opendir in -lx" >&5
4298 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4299 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4300 echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302 ac_save_LIBS="$LIBS"
4303 LIBS="-lx $LIBS"
4304 cat > conftest.$ac_ext <<EOF
4305 #line 4306 "configure"
4306 #include "confdefs.h"
4307 /* Override any gcc2 internal prototype to avoid an error. */
4308 /* We use char because int might match the return type of a gcc2
4309 builtin and then its argument prototype would still apply. */
4310 char opendir();
4311
4312 int main() {
4313 opendir()
4314 ; return 0; }
4315 EOF
4316 if { (eval echo configure:4317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4317 rm -rf conftest*
4318 eval "ac_cv_lib_$ac_lib_var=yes"
4319 else
4320 echo "configure: failed program was:" >&5
4321 cat conftest.$ac_ext >&5
4322 rm -rf conftest*
4323 eval "ac_cv_lib_$ac_lib_var=no"
4324 fi
4325 rm -f conftest*
4326 LIBS="$ac_save_LIBS"
4327
4328 fi
4329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4330 echo "$ac_t""yes" 1>&6
4331 LIBS="$LIBS -lx"
4332 else
4333 echo "$ac_t""no" 1>&6
4334 fi
4335
4336 fi
4337
4338 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4339 echo "configure:4340: checking whether stat file-mode macros are broken" >&5
4340 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4342 else
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 #include <sys/types.h>
4347 #include <sys/stat.h>
4348
4349 #if defined(S_ISBLK) && defined(S_IFDIR)
4350 # if S_ISBLK (S_IFDIR)
4351 You lose.
4352 # endif
4353 #endif
4354
4355 #if defined(S_ISBLK) && defined(S_IFCHR)
4356 # if S_ISBLK (S_IFCHR)
4357 You lose.
4358 # endif
4359 #endif
4360
4361 #if defined(S_ISLNK) && defined(S_IFREG)
4362 # if S_ISLNK (S_IFREG)
4363 You lose.
4364 # endif
4365 #endif
4366
4367 #if defined(S_ISSOCK) && defined(S_IFREG)
4368 # if S_ISSOCK (S_IFREG)
4369 You lose.
4370 # endif
4371 #endif
4372
4373 EOF
4374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4375 egrep "You lose" >/dev/null 2>&1; then
4376 rm -rf conftest*
4377 ac_cv_header_stat_broken=yes
4378 else
4379 rm -rf conftest*
4380 ac_cv_header_stat_broken=no
4381 fi
4382 rm -f conftest*
4383
4384 fi
4385
4386 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4387 if test $ac_cv_header_stat_broken = yes; then
4388 cat >> confdefs.h <<\EOF
4389 #define STAT_MACROS_BROKEN 1
4390 EOF
4391
4392 fi
4393
4394 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4395 echo "configure:4396: checking for ANSI C header files" >&5
4396 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4397 echo $ac_n "(cached) $ac_c" 1>&6
4398 else
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4402 #include <stdlib.h>
4403 #include <stdarg.h>
4404 #include <string.h>
4405 #include <float.h>
4406 EOF
4407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4408 { (eval echo configure:4409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4410 if test -z "$ac_err"; then
4411 rm -rf conftest*
4412 ac_cv_header_stdc=yes
4413 else
4414 echo "$ac_err" >&5
4415 echo "configure: failed program was:" >&5
4416 cat conftest.$ac_ext >&5
4417 rm -rf conftest*
4418 ac_cv_header_stdc=no
4419 fi
4420 rm -f conftest*
4421
4422 if test $ac_cv_header_stdc = yes; then
4423 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4424 cat > conftest.$ac_ext <<EOF
4425 #line 4426 "configure"
4426 #include "confdefs.h"
4427 #include <string.h>
4428 EOF
4429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4430 egrep "memchr" >/dev/null 2>&1; then
4431 :
4432 else
4433 rm -rf conftest*
4434 ac_cv_header_stdc=no
4435 fi
4436 rm -f conftest*
4437
4438 fi
4439
4440 if test $ac_cv_header_stdc = yes; then
4441 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 #include <stdlib.h>
4446 EOF
4447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4448 egrep "free" >/dev/null 2>&1; then
4449 :
4450 else
4451 rm -rf conftest*
4452 ac_cv_header_stdc=no
4453 fi
4454 rm -f conftest*
4455
4456 fi
4457
4458 if test $ac_cv_header_stdc = yes; then
4459 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4460 if test "$cross_compiling" = yes; then
4461 :
4462 else
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 #include <ctype.h>
4467 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4468 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4469 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4470 int main () { int i; for (i = 0; i < 256; i++)
4471 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4472 exit (0); }
4473
4474 EOF
4475 if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4476 then
4477 :
4478 else
4479 echo "configure: failed program was:" >&5
4480 cat conftest.$ac_ext >&5
4481 rm -fr conftest*
4482 ac_cv_header_stdc=no
4483 fi
4484 rm -fr conftest*
4485 fi
4486
4487 fi
4488 fi
4489
4490 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4491 if test $ac_cv_header_stdc = yes; then
4492 cat >> confdefs.h <<\EOF
4493 #define STDC_HEADERS 1
4494 EOF
4495
4496 fi
4497
4498 for ac_hdr in link.h
4499 do
4500 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4501 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4502 echo "configure:4503: checking for $ac_hdr" >&5
4503 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4504 echo $ac_n "(cached) $ac_c" 1>&6
4505 else
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <$ac_hdr>
4510 EOF
4511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4512 { (eval echo configure:4513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4514 if test -z "$ac_err"; then
4515 rm -rf conftest*
4516 eval "ac_cv_header_$ac_safe=yes"
4517 else
4518 echo "$ac_err" >&5
4519 echo "configure: failed program was:" >&5
4520 cat conftest.$ac_ext >&5
4521 rm -rf conftest*
4522 eval "ac_cv_header_$ac_safe=no"
4523 fi
4524 rm -f conftest*
4525 fi
4526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4527 echo "$ac_t""yes" 1>&6
4528 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4529 cat >> confdefs.h <<EOF
4530 #define $ac_tr_hdr 1
4531 EOF
4532
4533 else
4534 echo "$ac_t""no" 1>&6
4535 fi
4536 done
4537
4538 for ac_hdr in machine/reg.h
4539 do
4540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4541 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4542 echo "configure:4543: checking for $ac_hdr" >&5
4543 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4544 echo $ac_n "(cached) $ac_c" 1>&6
4545 else
4546 cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549 #include <$ac_hdr>
4550 EOF
4551 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4552 { (eval echo configure:4553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4553 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4554 if test -z "$ac_err"; then
4555 rm -rf conftest*
4556 eval "ac_cv_header_$ac_safe=yes"
4557 else
4558 echo "$ac_err" >&5
4559 echo "configure: failed program was:" >&5
4560 cat conftest.$ac_ext >&5
4561 rm -rf conftest*
4562 eval "ac_cv_header_$ac_safe=no"
4563 fi
4564 rm -f conftest*
4565 fi
4566 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4567 echo "$ac_t""yes" 1>&6
4568 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4569 cat >> confdefs.h <<EOF
4570 #define $ac_tr_hdr 1
4571 EOF
4572
4573 else
4574 echo "$ac_t""no" 1>&6
4575 fi
4576 done
4577
4578 for ac_hdr in nlist.h
4579 do
4580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4582 echo "configure:4583: checking for $ac_hdr" >&5
4583 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4584 echo $ac_n "(cached) $ac_c" 1>&6
4585 else
4586 cat > conftest.$ac_ext <<EOF
4587 #line 4588 "configure"
4588 #include "confdefs.h"
4589 #include <$ac_hdr>
4590 EOF
4591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4592 { (eval echo configure:4593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4594 if test -z "$ac_err"; then
4595 rm -rf conftest*
4596 eval "ac_cv_header_$ac_safe=yes"
4597 else
4598 echo "$ac_err" >&5
4599 echo "configure: failed program was:" >&5
4600 cat conftest.$ac_ext >&5
4601 rm -rf conftest*
4602 eval "ac_cv_header_$ac_safe=no"
4603 fi
4604 rm -f conftest*
4605 fi
4606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4607 echo "$ac_t""yes" 1>&6
4608 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4609 cat >> confdefs.h <<EOF
4610 #define $ac_tr_hdr 1
4611 EOF
4612
4613 else
4614 echo "$ac_t""no" 1>&6
4615 fi
4616 done
4617
4618 for ac_hdr in poll.h sys/poll.h
4619 do
4620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4622 echo "configure:4623: checking for $ac_hdr" >&5
4623 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4624 echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 #include <$ac_hdr>
4630 EOF
4631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4632 { (eval echo configure:4633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4634 if test -z "$ac_err"; then
4635 rm -rf conftest*
4636 eval "ac_cv_header_$ac_safe=yes"
4637 else
4638 echo "$ac_err" >&5
4639 echo "configure: failed program was:" >&5
4640 cat conftest.$ac_ext >&5
4641 rm -rf conftest*
4642 eval "ac_cv_header_$ac_safe=no"
4643 fi
4644 rm -f conftest*
4645 fi
4646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4647 echo "$ac_t""yes" 1>&6
4648 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4649 cat >> confdefs.h <<EOF
4650 #define $ac_tr_hdr 1
4651 EOF
4652
4653 else
4654 echo "$ac_t""no" 1>&6
4655 fi
4656 done
4657
4658 for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
4659 do
4660 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4661 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4662 echo "configure:4663: checking for $ac_hdr" >&5
4663 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4664 echo $ac_n "(cached) $ac_c" 1>&6
4665 else
4666 cat > conftest.$ac_ext <<EOF
4667 #line 4668 "configure"
4668 #include "confdefs.h"
4669 #include <$ac_hdr>
4670 EOF
4671 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4672 { (eval echo configure:4673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4673 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4674 if test -z "$ac_err"; then
4675 rm -rf conftest*
4676 eval "ac_cv_header_$ac_safe=yes"
4677 else
4678 echo "$ac_err" >&5
4679 echo "configure: failed program was:" >&5
4680 cat conftest.$ac_ext >&5
4681 rm -rf conftest*
4682 eval "ac_cv_header_$ac_safe=no"
4683 fi
4684 rm -f conftest*
4685 fi
4686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4687 echo "$ac_t""yes" 1>&6
4688 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4689 cat >> confdefs.h <<EOF
4690 #define $ac_tr_hdr 1
4691 EOF
4692
4693 else
4694 echo "$ac_t""no" 1>&6
4695 fi
4696 done
4697
4698 for ac_hdr in stddef.h
4699 do
4700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4702 echo "configure:4703: checking for $ac_hdr" >&5
4703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4704 echo $ac_n "(cached) $ac_c" 1>&6
4705 else
4706 cat > conftest.$ac_ext <<EOF
4707 #line 4708 "configure"
4708 #include "confdefs.h"
4709 #include <$ac_hdr>
4710 EOF
4711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4712 { (eval echo configure:4713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4714 if test -z "$ac_err"; then
4715 rm -rf conftest*
4716 eval "ac_cv_header_$ac_safe=yes"
4717 else
4718 echo "$ac_err" >&5
4719 echo "configure: failed program was:" >&5
4720 cat conftest.$ac_ext >&5
4721 rm -rf conftest*
4722 eval "ac_cv_header_$ac_safe=no"
4723 fi
4724 rm -f conftest*
4725 fi
4726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4727 echo "$ac_t""yes" 1>&6
4728 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4729 cat >> confdefs.h <<EOF
4730 #define $ac_tr_hdr 1
4731 EOF
4732
4733 else
4734 echo "$ac_t""no" 1>&6
4735 fi
4736 done
4737
4738 for ac_hdr in stdlib.h
4739 do
4740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_hdr" >&5
4743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4745 else
4746 cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4749 #include <$ac_hdr>
4750 EOF
4751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4752 { (eval echo configure:4753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4754 if test -z "$ac_err"; then
4755 rm -rf conftest*
4756 eval "ac_cv_header_$ac_safe=yes"
4757 else
4758 echo "$ac_err" >&5
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 rm -rf conftest*
4762 eval "ac_cv_header_$ac_safe=no"
4763 fi
4764 rm -f conftest*
4765 fi
4766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4769 cat >> confdefs.h <<EOF
4770 #define $ac_tr_hdr 1
4771 EOF
4772
4773 else
4774 echo "$ac_t""no" 1>&6
4775 fi
4776 done
4777
4778 for ac_hdr in stdint.h
4779 do
4780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4782 echo "configure:4783: checking for $ac_hdr" >&5
4783 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4784 echo $ac_n "(cached) $ac_c" 1>&6
4785 else
4786 cat > conftest.$ac_ext <<EOF
4787 #line 4788 "configure"
4788 #include "confdefs.h"
4789 #include <$ac_hdr>
4790 EOF
4791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4792 { (eval echo configure:4793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4794 if test -z "$ac_err"; then
4795 rm -rf conftest*
4796 eval "ac_cv_header_$ac_safe=yes"
4797 else
4798 echo "$ac_err" >&5
4799 echo "configure: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
4801 rm -rf conftest*
4802 eval "ac_cv_header_$ac_safe=no"
4803 fi
4804 rm -f conftest*
4805 fi
4806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4807 echo "$ac_t""yes" 1>&6
4808 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4809 cat >> confdefs.h <<EOF
4810 #define $ac_tr_hdr 1
4811 EOF
4812
4813 else
4814 echo "$ac_t""no" 1>&6
4815 fi
4816 done
4817
4818 for ac_hdr in string.h memory.h strings.h
4819 do
4820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4822 echo "configure:4823: checking for $ac_hdr" >&5
4823 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4824 echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 #include <$ac_hdr>
4830 EOF
4831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4832 { (eval echo configure:4833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4834 if test -z "$ac_err"; then
4835 rm -rf conftest*
4836 eval "ac_cv_header_$ac_safe=yes"
4837 else
4838 echo "$ac_err" >&5
4839 echo "configure: failed program was:" >&5
4840 cat conftest.$ac_ext >&5
4841 rm -rf conftest*
4842 eval "ac_cv_header_$ac_safe=no"
4843 fi
4844 rm -f conftest*
4845 fi
4846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4847 echo "$ac_t""yes" 1>&6
4848 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4849 cat >> confdefs.h <<EOF
4850 #define $ac_tr_hdr 1
4851 EOF
4852
4853 else
4854 echo "$ac_t""no" 1>&6
4855 fi
4856 done
4857
4858 for ac_hdr in sys/fault.h
4859 do
4860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4862 echo "configure:4863: checking for $ac_hdr" >&5
4863 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4864 echo $ac_n "(cached) $ac_c" 1>&6
4865 else
4866 cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 #include <$ac_hdr>
4870 EOF
4871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4872 { (eval echo configure:4873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4874 if test -z "$ac_err"; then
4875 rm -rf conftest*
4876 eval "ac_cv_header_$ac_safe=yes"
4877 else
4878 echo "$ac_err" >&5
4879 echo "configure: failed program was:" >&5
4880 cat conftest.$ac_ext >&5
4881 rm -rf conftest*
4882 eval "ac_cv_header_$ac_safe=no"
4883 fi
4884 rm -f conftest*
4885 fi
4886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4887 echo "$ac_t""yes" 1>&6
4888 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4889 cat >> confdefs.h <<EOF
4890 #define $ac_tr_hdr 1
4891 EOF
4892
4893 else
4894 echo "$ac_t""no" 1>&6
4895 fi
4896 done
4897
4898 for ac_hdr in sys/file.h
4899 do
4900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4902 echo "configure:4903: checking for $ac_hdr" >&5
4903 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4904 echo $ac_n "(cached) $ac_c" 1>&6
4905 else
4906 cat > conftest.$ac_ext <<EOF
4907 #line 4908 "configure"
4908 #include "confdefs.h"
4909 #include <$ac_hdr>
4910 EOF
4911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4912 { (eval echo configure:4913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4914 if test -z "$ac_err"; then
4915 rm -rf conftest*
4916 eval "ac_cv_header_$ac_safe=yes"
4917 else
4918 echo "$ac_err" >&5
4919 echo "configure: failed program was:" >&5
4920 cat conftest.$ac_ext >&5
4921 rm -rf conftest*
4922 eval "ac_cv_header_$ac_safe=no"
4923 fi
4924 rm -f conftest*
4925 fi
4926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4927 echo "$ac_t""yes" 1>&6
4928 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4929 cat >> confdefs.h <<EOF
4930 #define $ac_tr_hdr 1
4931 EOF
4932
4933 else
4934 echo "$ac_t""no" 1>&6
4935 fi
4936 done
4937
4938 for ac_hdr in sys/filio.h
4939 do
4940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4942 echo "configure:4943: checking for $ac_hdr" >&5
4943 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4944 echo $ac_n "(cached) $ac_c" 1>&6
4945 else
4946 cat > conftest.$ac_ext <<EOF
4947 #line 4948 "configure"
4948 #include "confdefs.h"
4949 #include <$ac_hdr>
4950 EOF
4951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4952 { (eval echo configure:4953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4954 if test -z "$ac_err"; then
4955 rm -rf conftest*
4956 eval "ac_cv_header_$ac_safe=yes"
4957 else
4958 echo "$ac_err" >&5
4959 echo "configure: failed program was:" >&5
4960 cat conftest.$ac_ext >&5
4961 rm -rf conftest*
4962 eval "ac_cv_header_$ac_safe=no"
4963 fi
4964 rm -f conftest*
4965 fi
4966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4967 echo "$ac_t""yes" 1>&6
4968 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4969 cat >> confdefs.h <<EOF
4970 #define $ac_tr_hdr 1
4971 EOF
4972
4973 else
4974 echo "$ac_t""no" 1>&6
4975 fi
4976 done
4977
4978 for ac_hdr in sys/ioctl.h
4979 do
4980 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4981 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4982 echo "configure:4983: checking for $ac_hdr" >&5
4983 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4984 echo $ac_n "(cached) $ac_c" 1>&6
4985 else
4986 cat > conftest.$ac_ext <<EOF
4987 #line 4988 "configure"
4988 #include "confdefs.h"
4989 #include <$ac_hdr>
4990 EOF
4991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4992 { (eval echo configure:4993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4994 if test -z "$ac_err"; then
4995 rm -rf conftest*
4996 eval "ac_cv_header_$ac_safe=yes"
4997 else
4998 echo "$ac_err" >&5
4999 echo "configure: failed program was:" >&5
5000 cat conftest.$ac_ext >&5
5001 rm -rf conftest*
5002 eval "ac_cv_header_$ac_safe=no"
5003 fi
5004 rm -f conftest*
5005 fi
5006 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5007 echo "$ac_t""yes" 1>&6
5008 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5009 cat >> confdefs.h <<EOF
5010 #define $ac_tr_hdr 1
5011 EOF
5012
5013 else
5014 echo "$ac_t""no" 1>&6
5015 fi
5016 done
5017
5018 for ac_hdr in sys/param.h
5019 do
5020 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5021 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5022 echo "configure:5023: checking for $ac_hdr" >&5
5023 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5024 echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026 cat > conftest.$ac_ext <<EOF
5027 #line 5028 "configure"
5028 #include "confdefs.h"
5029 #include <$ac_hdr>
5030 EOF
5031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5032 { (eval echo configure:5033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5034 if test -z "$ac_err"; then
5035 rm -rf conftest*
5036 eval "ac_cv_header_$ac_safe=yes"
5037 else
5038 echo "$ac_err" >&5
5039 echo "configure: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 rm -rf conftest*
5042 eval "ac_cv_header_$ac_safe=no"
5043 fi
5044 rm -f conftest*
5045 fi
5046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5047 echo "$ac_t""yes" 1>&6
5048 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5049 cat >> confdefs.h <<EOF
5050 #define $ac_tr_hdr 1
5051 EOF
5052
5053 else
5054 echo "$ac_t""no" 1>&6
5055 fi
5056 done
5057
5058 for ac_hdr in sys/proc.h
5059 do
5060 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5061 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5062 echo "configure:5063: checking for $ac_hdr" >&5
5063 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5064 echo $ac_n "(cached) $ac_c" 1>&6
5065 else
5066 cat > conftest.$ac_ext <<EOF
5067 #line 5068 "configure"
5068 #include "confdefs.h"
5069 #include <$ac_hdr>
5070 EOF
5071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5072 { (eval echo configure:5073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5074 if test -z "$ac_err"; then
5075 rm -rf conftest*
5076 eval "ac_cv_header_$ac_safe=yes"
5077 else
5078 echo "$ac_err" >&5
5079 echo "configure: failed program was:" >&5
5080 cat conftest.$ac_ext >&5
5081 rm -rf conftest*
5082 eval "ac_cv_header_$ac_safe=no"
5083 fi
5084 rm -f conftest*
5085 fi
5086 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5087 echo "$ac_t""yes" 1>&6
5088 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5089 cat >> confdefs.h <<EOF
5090 #define $ac_tr_hdr 1
5091 EOF
5092
5093 else
5094 echo "$ac_t""no" 1>&6
5095 fi
5096 done
5097
5098 for ac_hdr in sys/procfs.h
5099 do
5100 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5101 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5102 echo "configure:5103: checking for $ac_hdr" >&5
5103 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5104 echo $ac_n "(cached) $ac_c" 1>&6
5105 else
5106 cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109 #include <$ac_hdr>
5110 EOF
5111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5112 { (eval echo configure:5113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5113 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5114 if test -z "$ac_err"; then
5115 rm -rf conftest*
5116 eval "ac_cv_header_$ac_safe=yes"
5117 else
5118 echo "$ac_err" >&5
5119 echo "configure: failed program was:" >&5
5120 cat conftest.$ac_ext >&5
5121 rm -rf conftest*
5122 eval "ac_cv_header_$ac_safe=no"
5123 fi
5124 rm -f conftest*
5125 fi
5126 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5127 echo "$ac_t""yes" 1>&6
5128 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5129 cat >> confdefs.h <<EOF
5130 #define $ac_tr_hdr 1
5131 EOF
5132
5133 else
5134 echo "$ac_t""no" 1>&6
5135 fi
5136 done
5137
5138 for ac_hdr in sys/ptrace.h ptrace.h
5139 do
5140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5142 echo "configure:5143: checking for $ac_hdr" >&5
5143 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+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 <$ac_hdr>
5150 EOF
5151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5152 { (eval echo configure:5153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5154 if test -z "$ac_err"; then
5155 rm -rf conftest*
5156 eval "ac_cv_header_$ac_safe=yes"
5157 else
5158 echo "$ac_err" >&5
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 eval "ac_cv_header_$ac_safe=no"
5163 fi
5164 rm -f conftest*
5165 fi
5166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5167 echo "$ac_t""yes" 1>&6
5168 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5169 cat >> confdefs.h <<EOF
5170 #define $ac_tr_hdr 1
5171 EOF
5172
5173 else
5174 echo "$ac_t""no" 1>&6
5175 fi
5176 done
5177
5178 for ac_hdr in sys/reg.h sys/debugreg.h
5179 do
5180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5182 echo "configure:5183: checking for $ac_hdr" >&5
5183 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5184 echo $ac_n "(cached) $ac_c" 1>&6
5185 else
5186 cat > conftest.$ac_ext <<EOF
5187 #line 5188 "configure"
5188 #include "confdefs.h"
5189 #include <$ac_hdr>
5190 EOF
5191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5192 { (eval echo configure:5193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5194 if test -z "$ac_err"; then
5195 rm -rf conftest*
5196 eval "ac_cv_header_$ac_safe=yes"
5197 else
5198 echo "$ac_err" >&5
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5201 rm -rf conftest*
5202 eval "ac_cv_header_$ac_safe=no"
5203 fi
5204 rm -f conftest*
5205 fi
5206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5207 echo "$ac_t""yes" 1>&6
5208 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5209 cat >> confdefs.h <<EOF
5210 #define $ac_tr_hdr 1
5211 EOF
5212
5213 else
5214 echo "$ac_t""no" 1>&6
5215 fi
5216 done
5217
5218 for ac_hdr in sys/select.h
5219 do
5220 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5221 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5222 echo "configure:5223: checking for $ac_hdr" >&5
5223 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5224 echo $ac_n "(cached) $ac_c" 1>&6
5225 else
5226 cat > conftest.$ac_ext <<EOF
5227 #line 5228 "configure"
5228 #include "confdefs.h"
5229 #include <$ac_hdr>
5230 EOF
5231 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5232 { (eval echo configure:5233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5233 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5234 if test -z "$ac_err"; then
5235 rm -rf conftest*
5236 eval "ac_cv_header_$ac_safe=yes"
5237 else
5238 echo "$ac_err" >&5
5239 echo "configure: failed program was:" >&5
5240 cat conftest.$ac_ext >&5
5241 rm -rf conftest*
5242 eval "ac_cv_header_$ac_safe=no"
5243 fi
5244 rm -f conftest*
5245 fi
5246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5247 echo "$ac_t""yes" 1>&6
5248 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5249 cat >> confdefs.h <<EOF
5250 #define $ac_tr_hdr 1
5251 EOF
5252
5253 else
5254 echo "$ac_t""no" 1>&6
5255 fi
5256 done
5257
5258 for ac_hdr in sys/syscall.h
5259 do
5260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5262 echo "configure:5263: checking for $ac_hdr" >&5
5263 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5264 echo $ac_n "(cached) $ac_c" 1>&6
5265 else
5266 cat > conftest.$ac_ext <<EOF
5267 #line 5268 "configure"
5268 #include "confdefs.h"
5269 #include <$ac_hdr>
5270 EOF
5271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5272 { (eval echo configure:5273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5274 if test -z "$ac_err"; then
5275 rm -rf conftest*
5276 eval "ac_cv_header_$ac_safe=yes"
5277 else
5278 echo "$ac_err" >&5
5279 echo "configure: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 rm -rf conftest*
5282 eval "ac_cv_header_$ac_safe=no"
5283 fi
5284 rm -f conftest*
5285 fi
5286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5287 echo "$ac_t""yes" 1>&6
5288 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5289 cat >> confdefs.h <<EOF
5290 #define $ac_tr_hdr 1
5291 EOF
5292
5293 else
5294 echo "$ac_t""no" 1>&6
5295 fi
5296 done
5297
5298 for ac_hdr in sys/types.h
5299 do
5300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5302 echo "configure:5303: checking for $ac_hdr" >&5
5303 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5304 echo $ac_n "(cached) $ac_c" 1>&6
5305 else
5306 cat > conftest.$ac_ext <<EOF
5307 #line 5308 "configure"
5308 #include "confdefs.h"
5309 #include <$ac_hdr>
5310 EOF
5311 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5312 { (eval echo configure:5313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5313 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5314 if test -z "$ac_err"; then
5315 rm -rf conftest*
5316 eval "ac_cv_header_$ac_safe=yes"
5317 else
5318 echo "$ac_err" >&5
5319 echo "configure: failed program was:" >&5
5320 cat conftest.$ac_ext >&5
5321 rm -rf conftest*
5322 eval "ac_cv_header_$ac_safe=no"
5323 fi
5324 rm -f conftest*
5325 fi
5326 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5327 echo "$ac_t""yes" 1>&6
5328 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5329 cat >> confdefs.h <<EOF
5330 #define $ac_tr_hdr 1
5331 EOF
5332
5333 else
5334 echo "$ac_t""no" 1>&6
5335 fi
5336 done
5337
5338 for ac_hdr in sys/user.h
5339 do
5340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5342 echo "configure:5343: checking for $ac_hdr" >&5
5343 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5344 echo $ac_n "(cached) $ac_c" 1>&6
5345 else
5346 cat > conftest.$ac_ext <<EOF
5347 #line 5348 "configure"
5348 #include "confdefs.h"
5349 #include <$ac_hdr>
5350 EOF
5351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5352 { (eval echo configure:5353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5354 if test -z "$ac_err"; then
5355 rm -rf conftest*
5356 eval "ac_cv_header_$ac_safe=yes"
5357 else
5358 echo "$ac_err" >&5
5359 echo "configure: failed program was:" >&5
5360 cat conftest.$ac_ext >&5
5361 rm -rf conftest*
5362 eval "ac_cv_header_$ac_safe=no"
5363 fi
5364 rm -f conftest*
5365 fi
5366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5367 echo "$ac_t""yes" 1>&6
5368 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5369 cat >> confdefs.h <<EOF
5370 #define $ac_tr_hdr 1
5371 EOF
5372
5373 else
5374 echo "$ac_t""no" 1>&6
5375 fi
5376 done
5377
5378 for ac_hdr in sys/wait.h wait.h
5379 do
5380 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5381 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5382 echo "configure:5383: checking for $ac_hdr" >&5
5383 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5384 echo $ac_n "(cached) $ac_c" 1>&6
5385 else
5386 cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 #include <$ac_hdr>
5390 EOF
5391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5392 { (eval echo configure:5393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5394 if test -z "$ac_err"; then
5395 rm -rf conftest*
5396 eval "ac_cv_header_$ac_safe=yes"
5397 else
5398 echo "$ac_err" >&5
5399 echo "configure: failed program was:" >&5
5400 cat conftest.$ac_ext >&5
5401 rm -rf conftest*
5402 eval "ac_cv_header_$ac_safe=no"
5403 fi
5404 rm -f conftest*
5405 fi
5406 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5407 echo "$ac_t""yes" 1>&6
5408 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5409 cat >> confdefs.h <<EOF
5410 #define $ac_tr_hdr 1
5411 EOF
5412
5413 else
5414 echo "$ac_t""no" 1>&6
5415 fi
5416 done
5417
5418 for ac_hdr in termios.h termio.h sgtty.h
5419 do
5420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5422 echo "configure:5423: checking for $ac_hdr" >&5
5423 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5424 echo $ac_n "(cached) $ac_c" 1>&6
5425 else
5426 cat > conftest.$ac_ext <<EOF
5427 #line 5428 "configure"
5428 #include "confdefs.h"
5429 #include <$ac_hdr>
5430 EOF
5431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5432 { (eval echo configure:5433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5434 if test -z "$ac_err"; then
5435 rm -rf conftest*
5436 eval "ac_cv_header_$ac_safe=yes"
5437 else
5438 echo "$ac_err" >&5
5439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
5441 rm -rf conftest*
5442 eval "ac_cv_header_$ac_safe=no"
5443 fi
5444 rm -f conftest*
5445 fi
5446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5447 echo "$ac_t""yes" 1>&6
5448 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5449 cat >> confdefs.h <<EOF
5450 #define $ac_tr_hdr 1
5451 EOF
5452
5453 else
5454 echo "$ac_t""no" 1>&6
5455 fi
5456 done
5457
5458 for ac_hdr in unistd.h
5459 do
5460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5462 echo "configure:5463: checking for $ac_hdr" >&5
5463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5464 echo $ac_n "(cached) $ac_c" 1>&6
5465 else
5466 cat > conftest.$ac_ext <<EOF
5467 #line 5468 "configure"
5468 #include "confdefs.h"
5469 #include <$ac_hdr>
5470 EOF
5471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5472 { (eval echo configure:5473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5474 if test -z "$ac_err"; then
5475 rm -rf conftest*
5476 eval "ac_cv_header_$ac_safe=yes"
5477 else
5478 echo "$ac_err" >&5
5479 echo "configure: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5481 rm -rf conftest*
5482 eval "ac_cv_header_$ac_safe=no"
5483 fi
5484 rm -f conftest*
5485 fi
5486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5487 echo "$ac_t""yes" 1>&6
5488 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5489 cat >> confdefs.h <<EOF
5490 #define $ac_tr_hdr 1
5491 EOF
5492
5493 else
5494 echo "$ac_t""no" 1>&6
5495 fi
5496 done
5497
5498
5499 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5500 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5501 # think that we don't have <curses.h> if we're using GCC.
5502 case $host_os in
5503 solaris2.[789])
5504 if test "$GCC" = yes; then
5505 cat >> confdefs.h <<\EOF
5506 #define _MSE_INT_H 1
5507 EOF
5508
5509 fi ;;
5510 esac
5511 for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h
5512 do
5513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5515 echo "configure:5516: checking for $ac_hdr" >&5
5516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5517 echo $ac_n "(cached) $ac_c" 1>&6
5518 else
5519 cat > conftest.$ac_ext <<EOF
5520 #line 5521 "configure"
5521 #include "confdefs.h"
5522 #include <$ac_hdr>
5523 EOF
5524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5525 { (eval echo configure:5526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5527 if test -z "$ac_err"; then
5528 rm -rf conftest*
5529 eval "ac_cv_header_$ac_safe=yes"
5530 else
5531 echo "$ac_err" >&5
5532 echo "configure: failed program was:" >&5
5533 cat conftest.$ac_ext >&5
5534 rm -rf conftest*
5535 eval "ac_cv_header_$ac_safe=no"
5536 fi
5537 rm -f conftest*
5538 fi
5539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5540 echo "$ac_t""yes" 1>&6
5541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5542 cat >> confdefs.h <<EOF
5543 #define $ac_tr_hdr 1
5544 EOF
5545
5546 else
5547 echo "$ac_t""no" 1>&6
5548 fi
5549 done
5550
5551
5552 # FIXME: kettenis/20030102: In most cases we include these
5553 # unconditionally, so what's the point in checking these?
5554 for ac_hdr in ctype.h time.h
5555 do
5556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5557 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5558 echo "configure:5559: checking for $ac_hdr" >&5
5559 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5560 echo $ac_n "(cached) $ac_c" 1>&6
5561 else
5562 cat > conftest.$ac_ext <<EOF
5563 #line 5564 "configure"
5564 #include "confdefs.h"
5565 #include <$ac_hdr>
5566 EOF
5567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5568 { (eval echo configure:5569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5570 if test -z "$ac_err"; then
5571 rm -rf conftest*
5572 eval "ac_cv_header_$ac_safe=yes"
5573 else
5574 echo "$ac_err" >&5
5575 echo "configure: failed program was:" >&5
5576 cat conftest.$ac_ext >&5
5577 rm -rf conftest*
5578 eval "ac_cv_header_$ac_safe=no"
5579 fi
5580 rm -f conftest*
5581 fi
5582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5583 echo "$ac_t""yes" 1>&6
5584 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5585 cat >> confdefs.h <<EOF
5586 #define $ac_tr_hdr 1
5587 EOF
5588
5589 else
5590 echo "$ac_t""no" 1>&6
5591 fi
5592 done
5593
5594
5595 echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5596 echo "configure:5597: checking for member st_blocks in struct stat" >&5
5597 if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5598 echo $ac_n "(cached) $ac_c" 1>&6
5599 else
5600 cat > conftest.$ac_ext <<EOF
5601 #line 5602 "configure"
5602 #include "confdefs.h"
5603 #include <sys/types.h>
5604 #include <sys/stat.h>
5605 int main() {
5606 struct stat st; (void) st.st_blocks;
5607 ; return 0; }
5608 EOF
5609 if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5610 rm -rf conftest*
5611 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5612 else
5613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 rm -rf conftest*
5616 gdb_cv_have_struct_stat_with_st_blocks_member=no
5617 fi
5618 rm -f conftest*
5619 fi
5620
5621 echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5622 if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5623 cat >> confdefs.h <<\EOF
5624 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
5625 EOF
5626
5627 fi
5628
5629 # ------------------------- #
5630 # Checks for declarations. #
5631 # ------------------------- #
5632
5633 for ac_func in getopt
5634 do
5635 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5636 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5637 echo "configure:5638: checking whether $ac_func is declared" >&5
5638 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5639 echo $ac_n "(cached) $ac_c" 1>&6
5640 else
5641 cat > conftest.$ac_ext <<EOF
5642 #line 5643 "configure"
5643 #include "confdefs.h"
5644 #undef $ac_tr_decl
5645 #define $ac_tr_decl 1
5646
5647
5648 int main() {
5649 #ifndef $ac_func
5650 char *(*pfn) = (char *(*)) $ac_func ;
5651 #endif
5652 ; return 0; }
5653 EOF
5654 if { (eval echo configure:5655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5655 rm -rf conftest*
5656 eval "gcc_cv_have_decl_$ac_func=yes"
5657 else
5658 echo "configure: failed program was:" >&5
5659 cat conftest.$ac_ext >&5
5660 rm -rf conftest*
5661 eval "gcc_cv_have_decl_$ac_func=no"
5662 fi
5663 rm -f conftest*
5664 fi
5665
5666 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5667 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5668 #define $ac_tr_decl 1
5669 EOF
5670
5671 else
5672 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5673 #define $ac_tr_decl 0
5674 EOF
5675
5676 fi
5677
5678 done
5679 if test x = y ; then
5680 cat >> confdefs.h <<\EOF
5681 #define HAVE_DECL_GETOPT 1
5682 EOF
5683 fi
5684
5685
5686 # ------------------ #
5687 # Checks for types. #
5688 # ------------------ #
5689
5690 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5691 echo "configure:5692: checking return type of signal handlers" >&5
5692 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5693 echo $ac_n "(cached) $ac_c" 1>&6
5694 else
5695 cat > conftest.$ac_ext <<EOF
5696 #line 5697 "configure"
5697 #include "confdefs.h"
5698 #include <sys/types.h>
5699 #include <signal.h>
5700 #ifdef signal
5701 #undef signal
5702 #endif
5703 #ifdef __cplusplus
5704 extern "C" void (*signal (int, void (*)(int)))(int);
5705 #else
5706 void (*signal ()) ();
5707 #endif
5708
5709 int main() {
5710 int i;
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5714 rm -rf conftest*
5715 ac_cv_type_signal=void
5716 else
5717 echo "configure: failed program was:" >&5
5718 cat conftest.$ac_ext >&5
5719 rm -rf conftest*
5720 ac_cv_type_signal=int
5721 fi
5722 rm -f conftest*
5723 fi
5724
5725 echo "$ac_t""$ac_cv_type_signal" 1>&6
5726 cat >> confdefs.h <<EOF
5727 #define RETSIGTYPE $ac_cv_type_signal
5728 EOF
5729
5730
5731
5732 # ------------------------------------- #
5733 # Checks for compiler characteristics. #
5734 # ------------------------------------- #
5735
5736 echo $ac_n "checking for working const""... $ac_c" 1>&6
5737 echo "configure:5738: checking for working const" >&5
5738 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5739 echo $ac_n "(cached) $ac_c" 1>&6
5740 else
5741 cat > conftest.$ac_ext <<EOF
5742 #line 5743 "configure"
5743 #include "confdefs.h"
5744
5745 int main() {
5746
5747 /* Ultrix mips cc rejects this. */
5748 typedef int charset[2]; const charset x;
5749 /* SunOS 4.1.1 cc rejects this. */
5750 char const *const *ccp;
5751 char **p;
5752 /* NEC SVR4.0.2 mips cc rejects this. */
5753 struct point {int x, y;};
5754 static struct point const zero = {0,0};
5755 /* AIX XL C 1.02.0.0 rejects this.
5756 It does not let you subtract one const X* pointer from another in an arm
5757 of an if-expression whose if-part is not a constant expression */
5758 const char *g = "string";
5759 ccp = &g + (g ? g-g : 0);
5760 /* HPUX 7.0 cc rejects these. */
5761 ++ccp;
5762 p = (char**) ccp;
5763 ccp = (char const *const *) p;
5764 { /* SCO 3.2v4 cc rejects this. */
5765 char *t;
5766 char const *s = 0 ? (char *) 0 : (char const *) 0;
5767
5768 *t++ = 0;
5769 }
5770 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5771 int x[] = {25, 17};
5772 const int *foo = &x[0];
5773 ++foo;
5774 }
5775 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5776 typedef const int *iptr;
5777 iptr p = 0;
5778 ++p;
5779 }
5780 { /* AIX XL C 1.02.0.0 rejects this saying
5781 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5782 struct s { int j; const int *ap[3]; };
5783 struct s *b; b->j = 5;
5784 }
5785 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5786 const int foo = 10;
5787 }
5788
5789 ; return 0; }
5790 EOF
5791 if { (eval echo configure:5792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5792 rm -rf conftest*
5793 ac_cv_c_const=yes
5794 else
5795 echo "configure: failed program was:" >&5
5796 cat conftest.$ac_ext >&5
5797 rm -rf conftest*
5798 ac_cv_c_const=no
5799 fi
5800 rm -f conftest*
5801 fi
5802
5803 echo "$ac_t""$ac_cv_c_const" 1>&6
5804 if test $ac_cv_c_const = no; then
5805 cat >> confdefs.h <<\EOF
5806 #define const
5807 EOF
5808
5809 fi
5810
5811 echo $ac_n "checking for inline""... $ac_c" 1>&6
5812 echo "configure:5813: checking for inline" >&5
5813 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5814 echo $ac_n "(cached) $ac_c" 1>&6
5815 else
5816 ac_cv_c_inline=no
5817 for ac_kw in inline __inline__ __inline; do
5818 cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821
5822 int main() {
5823 } $ac_kw foo() {
5824 ; return 0; }
5825 EOF
5826 if { (eval echo configure:5827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5827 rm -rf conftest*
5828 ac_cv_c_inline=$ac_kw; break
5829 else
5830 echo "configure: failed program was:" >&5
5831 cat conftest.$ac_ext >&5
5832 fi
5833 rm -f conftest*
5834 done
5835
5836 fi
5837
5838 echo "$ac_t""$ac_cv_c_inline" 1>&6
5839 case "$ac_cv_c_inline" in
5840 inline | yes) ;;
5841 no) cat >> confdefs.h <<\EOF
5842 #define inline
5843 EOF
5844 ;;
5845 *) cat >> confdefs.h <<EOF
5846 #define inline $ac_cv_c_inline
5847 EOF
5848 ;;
5849 esac
5850
5851
5852 # ------------------------------ #
5853 # Checks for library functions. #
5854 # ------------------------------ #
5855
5856 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5857 # for constant arguments. Useless!
5858 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5859 echo "configure:5860: checking for working alloca.h" >&5
5860 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5861 echo $ac_n "(cached) $ac_c" 1>&6
5862 else
5863 cat > conftest.$ac_ext <<EOF
5864 #line 5865 "configure"
5865 #include "confdefs.h"
5866 #include <alloca.h>
5867 int main() {
5868 char *p = alloca(2 * sizeof(int));
5869 ; return 0; }
5870 EOF
5871 if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5872 rm -rf conftest*
5873 ac_cv_header_alloca_h=yes
5874 else
5875 echo "configure: failed program was:" >&5
5876 cat conftest.$ac_ext >&5
5877 rm -rf conftest*
5878 ac_cv_header_alloca_h=no
5879 fi
5880 rm -f conftest*
5881 fi
5882
5883 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5884 if test $ac_cv_header_alloca_h = yes; then
5885 cat >> confdefs.h <<\EOF
5886 #define HAVE_ALLOCA_H 1
5887 EOF
5888
5889 fi
5890
5891 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5892 echo "configure:5893: checking for alloca" >&5
5893 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5894 echo $ac_n "(cached) $ac_c" 1>&6
5895 else
5896 cat > conftest.$ac_ext <<EOF
5897 #line 5898 "configure"
5898 #include "confdefs.h"
5899
5900 #ifdef __GNUC__
5901 # define alloca __builtin_alloca
5902 #else
5903 # ifdef _MSC_VER
5904 # include <malloc.h>
5905 # define alloca _alloca
5906 # else
5907 # if HAVE_ALLOCA_H
5908 # include <alloca.h>
5909 # else
5910 # ifdef _AIX
5911 #pragma alloca
5912 # else
5913 # ifndef alloca /* predefined by HP cc +Olibcalls */
5914 char *alloca ();
5915 # endif
5916 # endif
5917 # endif
5918 # endif
5919 #endif
5920
5921 int main() {
5922 char *p = (char *) alloca(1);
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926 rm -rf conftest*
5927 ac_cv_func_alloca_works=yes
5928 else
5929 echo "configure: failed program was:" >&5
5930 cat conftest.$ac_ext >&5
5931 rm -rf conftest*
5932 ac_cv_func_alloca_works=no
5933 fi
5934 rm -f conftest*
5935 fi
5936
5937 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5938 if test $ac_cv_func_alloca_works = yes; then
5939 cat >> confdefs.h <<\EOF
5940 #define HAVE_ALLOCA 1
5941 EOF
5942
5943 fi
5944
5945 if test $ac_cv_func_alloca_works = no; then
5946 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5947 # that cause trouble. Some versions do not even contain alloca or
5948 # contain a buggy version. If you still want to use their alloca,
5949 # use ar to extract alloca.o from them instead of compiling alloca.c.
5950 ALLOCA=alloca.${ac_objext}
5951 cat >> confdefs.h <<\EOF
5952 #define C_ALLOCA 1
5953 EOF
5954
5955
5956 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5957 echo "configure:5958: checking whether alloca needs Cray hooks" >&5
5958 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5959 echo $ac_n "(cached) $ac_c" 1>&6
5960 else
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 #if defined(CRAY) && ! defined(CRAY2)
5965 webecray
5966 #else
5967 wenotbecray
5968 #endif
5969
5970 EOF
5971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5972 egrep "webecray" >/dev/null 2>&1; then
5973 rm -rf conftest*
5974 ac_cv_os_cray=yes
5975 else
5976 rm -rf conftest*
5977 ac_cv_os_cray=no
5978 fi
5979 rm -f conftest*
5980
5981 fi
5982
5983 echo "$ac_t""$ac_cv_os_cray" 1>&6
5984 if test $ac_cv_os_cray = yes; then
5985 for ac_func in _getb67 GETB67 getb67; do
5986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5987 echo "configure:5988: checking for $ac_func" >&5
5988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5989 echo $ac_n "(cached) $ac_c" 1>&6
5990 else
5991 cat > conftest.$ac_ext <<EOF
5992 #line 5993 "configure"
5993 #include "confdefs.h"
5994 /* System header to define __stub macros and hopefully few prototypes,
5995 which can conflict with char $ac_func(); below. */
5996 #include <assert.h>
5997 /* Override any gcc2 internal prototype to avoid an error. */
5998 /* We use char because int might match the return type of a gcc2
5999 builtin and then its argument prototype would still apply. */
6000 char $ac_func();
6001
6002 int main() {
6003
6004 /* The GNU C library defines this for functions which it implements
6005 to always fail with ENOSYS. Some functions are actually named
6006 something starting with __ and the normal name is an alias. */
6007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6008 choke me
6009 #else
6010 $ac_func();
6011 #endif
6012
6013 ; return 0; }
6014 EOF
6015 if { (eval echo configure:6016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6016 rm -rf conftest*
6017 eval "ac_cv_func_$ac_func=yes"
6018 else
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6021 rm -rf conftest*
6022 eval "ac_cv_func_$ac_func=no"
6023 fi
6024 rm -f conftest*
6025 fi
6026
6027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6028 echo "$ac_t""yes" 1>&6
6029 cat >> confdefs.h <<EOF
6030 #define CRAY_STACKSEG_END $ac_func
6031 EOF
6032
6033 break
6034 else
6035 echo "$ac_t""no" 1>&6
6036 fi
6037
6038 done
6039 fi
6040
6041 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6042 echo "configure:6043: checking stack direction for C alloca" >&5
6043 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046 if test "$cross_compiling" = yes; then
6047 ac_cv_c_stack_direction=0
6048 else
6049 cat > conftest.$ac_ext <<EOF
6050 #line 6051 "configure"
6051 #include "confdefs.h"
6052 find_stack_direction ()
6053 {
6054 static char *addr = 0;
6055 auto char dummy;
6056 if (addr == 0)
6057 {
6058 addr = &dummy;
6059 return find_stack_direction ();
6060 }
6061 else
6062 return (&dummy > addr) ? 1 : -1;
6063 }
6064 main ()
6065 {
6066 exit (find_stack_direction() < 0);
6067 }
6068 EOF
6069 if { (eval echo configure:6070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6070 then
6071 ac_cv_c_stack_direction=1
6072 else
6073 echo "configure: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 rm -fr conftest*
6076 ac_cv_c_stack_direction=-1
6077 fi
6078 rm -fr conftest*
6079 fi
6080
6081 fi
6082
6083 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6084 cat >> confdefs.h <<EOF
6085 #define STACK_DIRECTION $ac_cv_c_stack_direction
6086 EOF
6087
6088 fi
6089
6090 for ac_hdr in unistd.h
6091 do
6092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6094 echo "configure:6095: checking for $ac_hdr" >&5
6095 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6096 echo $ac_n "(cached) $ac_c" 1>&6
6097 else
6098 cat > conftest.$ac_ext <<EOF
6099 #line 6100 "configure"
6100 #include "confdefs.h"
6101 #include <$ac_hdr>
6102 EOF
6103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6104 { (eval echo configure:6105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6106 if test -z "$ac_err"; then
6107 rm -rf conftest*
6108 eval "ac_cv_header_$ac_safe=yes"
6109 else
6110 echo "$ac_err" >&5
6111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 rm -rf conftest*
6114 eval "ac_cv_header_$ac_safe=no"
6115 fi
6116 rm -f conftest*
6117 fi
6118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6119 echo "$ac_t""yes" 1>&6
6120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6121 cat >> confdefs.h <<EOF
6122 #define $ac_tr_hdr 1
6123 EOF
6124
6125 else
6126 echo "$ac_t""no" 1>&6
6127 fi
6128 done
6129
6130 for ac_func in getpagesize
6131 do
6132 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6133 echo "configure:6134: checking for $ac_func" >&5
6134 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6135 echo $ac_n "(cached) $ac_c" 1>&6
6136 else
6137 cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141 which can conflict with char $ac_func(); below. */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error. */
6144 /* We use char because int might match the return type of a gcc2
6145 builtin and then its argument prototype would still apply. */
6146 char $ac_func();
6147
6148 int main() {
6149
6150 /* The GNU C library defines this for functions which it implements
6151 to always fail with ENOSYS. Some functions are actually named
6152 something starting with __ and the normal name is an alias. */
6153 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6154 choke me
6155 #else
6156 $ac_func();
6157 #endif
6158
6159 ; return 0; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6162 rm -rf conftest*
6163 eval "ac_cv_func_$ac_func=yes"
6164 else
6165 echo "configure: failed program was:" >&5
6166 cat conftest.$ac_ext >&5
6167 rm -rf conftest*
6168 eval "ac_cv_func_$ac_func=no"
6169 fi
6170 rm -f conftest*
6171 fi
6172
6173 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6174 echo "$ac_t""yes" 1>&6
6175 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6176 cat >> confdefs.h <<EOF
6177 #define $ac_tr_func 1
6178 EOF
6179
6180 else
6181 echo "$ac_t""no" 1>&6
6182 fi
6183 done
6184
6185 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6186 echo "configure:6187: checking for working mmap" >&5
6187 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190 if test "$cross_compiling" = yes; then
6191 ac_cv_func_mmap_fixed_mapped=no
6192 else
6193 cat > conftest.$ac_ext <<EOF
6194 #line 6195 "configure"
6195 #include "confdefs.h"
6196
6197 /* Thanks to Mike Haertel and Jim Avera for this test.
6198 Here is a matrix of mmap possibilities:
6199 mmap private not fixed
6200 mmap private fixed at somewhere currently unmapped
6201 mmap private fixed at somewhere already mapped
6202 mmap shared not fixed
6203 mmap shared fixed at somewhere currently unmapped
6204 mmap shared fixed at somewhere already mapped
6205 For private mappings, we should verify that changes cannot be read()
6206 back from the file, nor mmap's back from the file at a different
6207 address. (There have been systems where private was not correctly
6208 implemented like the infamous i386 svr4.0, and systems where the
6209 VM page cache was not coherent with the filesystem buffer cache
6210 like early versions of FreeBSD and possibly contemporary NetBSD.)
6211 For shared mappings, we should conversely verify that changes get
6212 propogated back to all the places they're supposed to be.
6213
6214 Grep wants private fixed already mapped.
6215 The main things grep needs to know about mmap are:
6216 * does it exist and is it safe to write into the mmap'd area
6217 * how to use it (BSD variants) */
6218 #include <sys/types.h>
6219 #include <fcntl.h>
6220 #include <sys/mman.h>
6221
6222 /* This mess was copied from the GNU getpagesize.h. */
6223 #ifndef HAVE_GETPAGESIZE
6224 # ifdef HAVE_UNISTD_H
6225 # include <unistd.h>
6226 # endif
6227
6228 /* Assume that all systems that can run configure have sys/param.h. */
6229 # ifndef HAVE_SYS_PARAM_H
6230 # define HAVE_SYS_PARAM_H 1
6231 # endif
6232
6233 # ifdef _SC_PAGESIZE
6234 # define getpagesize() sysconf(_SC_PAGESIZE)
6235 # else /* no _SC_PAGESIZE */
6236 # ifdef HAVE_SYS_PARAM_H
6237 # include <sys/param.h>
6238 # ifdef EXEC_PAGESIZE
6239 # define getpagesize() EXEC_PAGESIZE
6240 # else /* no EXEC_PAGESIZE */
6241 # ifdef NBPG
6242 # define getpagesize() NBPG * CLSIZE
6243 # ifndef CLSIZE
6244 # define CLSIZE 1
6245 # endif /* no CLSIZE */
6246 # else /* no NBPG */
6247 # ifdef NBPC
6248 # define getpagesize() NBPC
6249 # else /* no NBPC */
6250 # ifdef PAGESIZE
6251 # define getpagesize() PAGESIZE
6252 # endif /* PAGESIZE */
6253 # endif /* no NBPC */
6254 # endif /* no NBPG */
6255 # endif /* no EXEC_PAGESIZE */
6256 # else /* no HAVE_SYS_PARAM_H */
6257 # define getpagesize() 8192 /* punt totally */
6258 # endif /* no HAVE_SYS_PARAM_H */
6259 # endif /* no _SC_PAGESIZE */
6260
6261 #endif /* no HAVE_GETPAGESIZE */
6262
6263 #ifdef __cplusplus
6264 extern "C" { void *malloc(unsigned); }
6265 #else
6266 char *malloc();
6267 #endif
6268
6269 int
6270 main()
6271 {
6272 char *data, *data2, *data3;
6273 int i, pagesize;
6274 int fd;
6275
6276 pagesize = getpagesize();
6277
6278 /*
6279 * First, make a file with some known garbage in it.
6280 */
6281 data = malloc(pagesize);
6282 if (!data)
6283 exit(1);
6284 for (i = 0; i < pagesize; ++i)
6285 *(data + i) = rand();
6286 umask(0);
6287 fd = creat("conftestmmap", 0600);
6288 if (fd < 0)
6289 exit(1);
6290 if (write(fd, data, pagesize) != pagesize)
6291 exit(1);
6292 close(fd);
6293
6294 /*
6295 * Next, try to mmap the file at a fixed address which
6296 * already has something else allocated at it. If we can,
6297 * also make sure that we see the same garbage.
6298 */
6299 fd = open("conftestmmap", O_RDWR);
6300 if (fd < 0)
6301 exit(1);
6302 data2 = malloc(2 * pagesize);
6303 if (!data2)
6304 exit(1);
6305 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6306 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6307 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6308 exit(1);
6309 for (i = 0; i < pagesize; ++i)
6310 if (*(data + i) != *(data2 + i))
6311 exit(1);
6312
6313 /*
6314 * Finally, make sure that changes to the mapped area
6315 * do not percolate back to the file as seen by read().
6316 * (This is a bug on some variants of i386 svr4.0.)
6317 */
6318 for (i = 0; i < pagesize; ++i)
6319 *(data2 + i) = *(data2 + i) + 1;
6320 data3 = malloc(pagesize);
6321 if (!data3)
6322 exit(1);
6323 if (read(fd, data3, pagesize) != pagesize)
6324 exit(1);
6325 for (i = 0; i < pagesize; ++i)
6326 if (*(data + i) != *(data3 + i))
6327 exit(1);
6328 close(fd);
6329 unlink("conftestmmap");
6330 exit(0);
6331 }
6332
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6335 then
6336 ac_cv_func_mmap_fixed_mapped=yes
6337 else
6338 echo "configure: failed program was:" >&5
6339 cat conftest.$ac_ext >&5
6340 rm -fr conftest*
6341 ac_cv_func_mmap_fixed_mapped=no
6342 fi
6343 rm -fr conftest*
6344 fi
6345
6346 fi
6347
6348 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6349 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6350 cat >> confdefs.h <<\EOF
6351 #define HAVE_MMAP 1
6352 EOF
6353
6354 fi
6355
6356 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6357 echo "configure:6358: checking for pid_t" >&5
6358 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6359 echo $ac_n "(cached) $ac_c" 1>&6
6360 else
6361 cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364 #include <sys/types.h>
6365 #if STDC_HEADERS
6366 #include <stdlib.h>
6367 #include <stddef.h>
6368 #endif
6369 EOF
6370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6371 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6372 rm -rf conftest*
6373 ac_cv_type_pid_t=yes
6374 else
6375 rm -rf conftest*
6376 ac_cv_type_pid_t=no
6377 fi
6378 rm -f conftest*
6379
6380 fi
6381 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6382 if test $ac_cv_type_pid_t = no; then
6383 cat >> confdefs.h <<\EOF
6384 #define pid_t int
6385 EOF
6386
6387 fi
6388
6389 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6390 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6391 echo "configure:6392: checking for vfork.h" >&5
6392 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6393 echo $ac_n "(cached) $ac_c" 1>&6
6394 else
6395 cat > conftest.$ac_ext <<EOF
6396 #line 6397 "configure"
6397 #include "confdefs.h"
6398 #include <vfork.h>
6399 EOF
6400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6401 { (eval echo configure:6402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6403 if test -z "$ac_err"; then
6404 rm -rf conftest*
6405 eval "ac_cv_header_$ac_safe=yes"
6406 else
6407 echo "$ac_err" >&5
6408 echo "configure: failed program was:" >&5
6409 cat conftest.$ac_ext >&5
6410 rm -rf conftest*
6411 eval "ac_cv_header_$ac_safe=no"
6412 fi
6413 rm -f conftest*
6414 fi
6415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6416 echo "$ac_t""yes" 1>&6
6417 cat >> confdefs.h <<\EOF
6418 #define HAVE_VFORK_H 1
6419 EOF
6420
6421 else
6422 echo "$ac_t""no" 1>&6
6423 fi
6424
6425 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6426 echo "configure:6427: checking for working vfork" >&5
6427 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6428 echo $ac_n "(cached) $ac_c" 1>&6
6429 else
6430 if test "$cross_compiling" = yes; then
6431 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6432 echo "configure:6433: checking for vfork" >&5
6433 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6434 echo $ac_n "(cached) $ac_c" 1>&6
6435 else
6436 cat > conftest.$ac_ext <<EOF
6437 #line 6438 "configure"
6438 #include "confdefs.h"
6439 /* System header to define __stub macros and hopefully few prototypes,
6440 which can conflict with char vfork(); below. */
6441 #include <assert.h>
6442 /* Override any gcc2 internal prototype to avoid an error. */
6443 /* We use char because int might match the return type of a gcc2
6444 builtin and then its argument prototype would still apply. */
6445 char vfork();
6446
6447 int main() {
6448
6449 /* The GNU C library defines this for functions which it implements
6450 to always fail with ENOSYS. Some functions are actually named
6451 something starting with __ and the normal name is an alias. */
6452 #if defined (__stub_vfork) || defined (__stub___vfork)
6453 choke me
6454 #else
6455 vfork();
6456 #endif
6457
6458 ; return 0; }
6459 EOF
6460 if { (eval echo configure:6461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6461 rm -rf conftest*
6462 eval "ac_cv_func_vfork=yes"
6463 else
6464 echo "configure: failed program was:" >&5
6465 cat conftest.$ac_ext >&5
6466 rm -rf conftest*
6467 eval "ac_cv_func_vfork=no"
6468 fi
6469 rm -f conftest*
6470 fi
6471
6472 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6473 echo "$ac_t""yes" 1>&6
6474 :
6475 else
6476 echo "$ac_t""no" 1>&6
6477 fi
6478
6479 ac_cv_func_vfork_works=$ac_cv_func_vfork
6480 else
6481 cat > conftest.$ac_ext <<EOF
6482 #line 6483 "configure"
6483 #include "confdefs.h"
6484 /* Thanks to Paul Eggert for this test. */
6485 #include <stdio.h>
6486 #include <sys/types.h>
6487 #include <sys/stat.h>
6488 #ifdef HAVE_UNISTD_H
6489 #include <unistd.h>
6490 #endif
6491 #ifdef HAVE_VFORK_H
6492 #include <vfork.h>
6493 #endif
6494 /* On some sparc systems, changes by the child to local and incoming
6495 argument registers are propagated back to the parent.
6496 The compiler is told about this with #include <vfork.h>,
6497 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6498 Test for this by using a static variable whose address
6499 is put into a register that is clobbered by the vfork. */
6500 static
6501 #ifdef __cplusplus
6502 sparc_address_test (int arg)
6503 #else
6504 sparc_address_test (arg) int arg;
6505 #endif
6506 {
6507 static pid_t child;
6508 if (!child) {
6509 child = vfork ();
6510 if (child < 0) {
6511 perror ("vfork");
6512 _exit(2);
6513 }
6514 if (!child) {
6515 arg = getpid();
6516 write(-1, "", 0);
6517 _exit (arg);
6518 }
6519 }
6520 }
6521 main() {
6522 pid_t parent = getpid ();
6523 pid_t child;
6524
6525 sparc_address_test ();
6526
6527 child = vfork ();
6528
6529 if (child == 0) {
6530 /* Here is another test for sparc vfork register problems.
6531 This test uses lots of local variables, at least
6532 as many local variables as main has allocated so far
6533 including compiler temporaries. 4 locals are enough for
6534 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6535 A buggy compiler should reuse the register of parent
6536 for one of the local variables, since it will think that
6537 parent can't possibly be used any more in this routine.
6538 Assigning to the local variable will thus munge parent
6539 in the parent process. */
6540 pid_t
6541 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6542 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6543 /* Convince the compiler that p..p7 are live; otherwise, it might
6544 use the same hardware register for all 8 local variables. */
6545 if (p != p1 || p != p2 || p != p3 || p != p4
6546 || p != p5 || p != p6 || p != p7)
6547 _exit(1);
6548
6549 /* On some systems (e.g. IRIX 3.3),
6550 vfork doesn't separate parent from child file descriptors.
6551 If the child closes a descriptor before it execs or exits,
6552 this munges the parent's descriptor as well.
6553 Test for this by closing stdout in the child. */
6554 _exit(close(fileno(stdout)) != 0);
6555 } else {
6556 int status;
6557 struct stat st;
6558
6559 while (wait(&status) != child)
6560 ;
6561 exit(
6562 /* Was there some problem with vforking? */
6563 child < 0
6564
6565 /* Did the child fail? (This shouldn't happen.) */
6566 || status
6567
6568 /* Did the vfork/compiler bug occur? */
6569 || parent != getpid()
6570
6571 /* Did the file descriptor bug occur? */
6572 || fstat(fileno(stdout), &st) != 0
6573 );
6574 }
6575 }
6576 EOF
6577 if { (eval echo configure:6578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6578 then
6579 ac_cv_func_vfork_works=yes
6580 else
6581 echo "configure: failed program was:" >&5
6582 cat conftest.$ac_ext >&5
6583 rm -fr conftest*
6584 ac_cv_func_vfork_works=no
6585 fi
6586 rm -fr conftest*
6587 fi
6588
6589 fi
6590
6591 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6592 if test $ac_cv_func_vfork_works = no; then
6593 cat >> confdefs.h <<\EOF
6594 #define vfork fork
6595 EOF
6596
6597 fi
6598
6599 for ac_func in canonicalize_file_name realpath
6600 do
6601 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6602 echo "configure:6603: checking for $ac_func" >&5
6603 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6604 echo $ac_n "(cached) $ac_c" 1>&6
6605 else
6606 cat > conftest.$ac_ext <<EOF
6607 #line 6608 "configure"
6608 #include "confdefs.h"
6609 /* System header to define __stub macros and hopefully few prototypes,
6610 which can conflict with char $ac_func(); below. */
6611 #include <assert.h>
6612 /* Override any gcc2 internal prototype to avoid an error. */
6613 /* We use char because int might match the return type of a gcc2
6614 builtin and then its argument prototype would still apply. */
6615 char $ac_func();
6616
6617 int main() {
6618
6619 /* The GNU C library defines this for functions which it implements
6620 to always fail with ENOSYS. Some functions are actually named
6621 something starting with __ and the normal name is an alias. */
6622 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6623 choke me
6624 #else
6625 $ac_func();
6626 #endif
6627
6628 ; return 0; }
6629 EOF
6630 if { (eval echo configure:6631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6631 rm -rf conftest*
6632 eval "ac_cv_func_$ac_func=yes"
6633 else
6634 echo "configure: failed program was:" >&5
6635 cat conftest.$ac_ext >&5
6636 rm -rf conftest*
6637 eval "ac_cv_func_$ac_func=no"
6638 fi
6639 rm -f conftest*
6640 fi
6641
6642 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6643 echo "$ac_t""yes" 1>&6
6644 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6645 cat >> confdefs.h <<EOF
6646 #define $ac_tr_func 1
6647 EOF
6648
6649 else
6650 echo "$ac_t""no" 1>&6
6651 fi
6652 done
6653
6654 for ac_func in poll
6655 do
6656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6657 echo "configure:6658: checking for $ac_func" >&5
6658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665 which can conflict with char $ac_func(); below. */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error. */
6668 /* We use char because int might match the return type of a gcc2
6669 builtin and then its argument prototype would still apply. */
6670 char $ac_func();
6671
6672 int main() {
6673
6674 /* The GNU C library defines this for functions which it implements
6675 to always fail with ENOSYS. Some functions are actually named
6676 something starting with __ and the normal name is an alias. */
6677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678 choke me
6679 #else
6680 $ac_func();
6681 #endif
6682
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686 rm -rf conftest*
6687 eval "ac_cv_func_$ac_func=yes"
6688 else
6689 echo "configure: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 rm -rf conftest*
6692 eval "ac_cv_func_$ac_func=no"
6693 fi
6694 rm -f conftest*
6695 fi
6696
6697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6698 echo "$ac_t""yes" 1>&6
6699 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6700 cat >> confdefs.h <<EOF
6701 #define $ac_tr_func 1
6702 EOF
6703
6704 else
6705 echo "$ac_t""no" 1>&6
6706 fi
6707 done
6708
6709 for ac_func in pread64
6710 do
6711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6712 echo "configure:6713: checking for $ac_func" >&5
6713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6714 echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 /* System header to define __stub macros and hopefully few prototypes,
6720 which can conflict with char $ac_func(); below. */
6721 #include <assert.h>
6722 /* Override any gcc2 internal prototype to avoid an error. */
6723 /* We use char because int might match the return type of a gcc2
6724 builtin and then its argument prototype would still apply. */
6725 char $ac_func();
6726
6727 int main() {
6728
6729 /* The GNU C library defines this for functions which it implements
6730 to always fail with ENOSYS. Some functions are actually named
6731 something starting with __ and the normal name is an alias. */
6732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6733 choke me
6734 #else
6735 $ac_func();
6736 #endif
6737
6738 ; return 0; }
6739 EOF
6740 if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6741 rm -rf conftest*
6742 eval "ac_cv_func_$ac_func=yes"
6743 else
6744 echo "configure: failed program was:" >&5
6745 cat conftest.$ac_ext >&5
6746 rm -rf conftest*
6747 eval "ac_cv_func_$ac_func=no"
6748 fi
6749 rm -f conftest*
6750 fi
6751
6752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6753 echo "$ac_t""yes" 1>&6
6754 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6755 cat >> confdefs.h <<EOF
6756 #define $ac_tr_func 1
6757 EOF
6758
6759 else
6760 echo "$ac_t""no" 1>&6
6761 fi
6762 done
6763
6764 for ac_func in sbrk
6765 do
6766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6767 echo "configure:6768: checking for $ac_func" >&5
6768 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6769 echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775 which can conflict with char $ac_func(); below. */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error. */
6778 /* We use char because int might match the return type of a gcc2
6779 builtin and then its argument prototype would still apply. */
6780 char $ac_func();
6781
6782 int main() {
6783
6784 /* The GNU C library defines this for functions which it implements
6785 to always fail with ENOSYS. Some functions are actually named
6786 something starting with __ and the normal name is an alias. */
6787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6788 choke me
6789 #else
6790 $ac_func();
6791 #endif
6792
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796 rm -rf conftest*
6797 eval "ac_cv_func_$ac_func=yes"
6798 else
6799 echo "configure: failed program was:" >&5
6800 cat conftest.$ac_ext >&5
6801 rm -rf conftest*
6802 eval "ac_cv_func_$ac_func=no"
6803 fi
6804 rm -f conftest*
6805 fi
6806
6807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6808 echo "$ac_t""yes" 1>&6
6809 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6810 cat >> confdefs.h <<EOF
6811 #define $ac_tr_func 1
6812 EOF
6813
6814 else
6815 echo "$ac_t""no" 1>&6
6816 fi
6817 done
6818
6819 for ac_func in setpgid setpgrp
6820 do
6821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6822 echo "configure:6823: checking for $ac_func" >&5
6823 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6824 echo $ac_n "(cached) $ac_c" 1>&6
6825 else
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* System header to define __stub macros and hopefully few prototypes,
6830 which can conflict with char $ac_func(); below. */
6831 #include <assert.h>
6832 /* Override any gcc2 internal prototype to avoid an error. */
6833 /* We use char because int might match the return type of a gcc2
6834 builtin and then its argument prototype would still apply. */
6835 char $ac_func();
6836
6837 int main() {
6838
6839 /* The GNU C library defines this for functions which it implements
6840 to always fail with ENOSYS. Some functions are actually named
6841 something starting with __ and the normal name is an alias. */
6842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6843 choke me
6844 #else
6845 $ac_func();
6846 #endif
6847
6848 ; return 0; }
6849 EOF
6850 if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6851 rm -rf conftest*
6852 eval "ac_cv_func_$ac_func=yes"
6853 else
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6856 rm -rf conftest*
6857 eval "ac_cv_func_$ac_func=no"
6858 fi
6859 rm -f conftest*
6860 fi
6861
6862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6863 echo "$ac_t""yes" 1>&6
6864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6865 cat >> confdefs.h <<EOF
6866 #define $ac_tr_func 1
6867 EOF
6868
6869 else
6870 echo "$ac_t""no" 1>&6
6871 fi
6872 done
6873
6874 for ac_func in sigaction sigprocmask sigsetmask
6875 do
6876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6877 echo "configure:6878: checking for $ac_func" >&5
6878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6879 echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881 cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 /* System header to define __stub macros and hopefully few prototypes,
6885 which can conflict with char $ac_func(); below. */
6886 #include <assert.h>
6887 /* Override any gcc2 internal prototype to avoid an error. */
6888 /* We use char because int might match the return type of a gcc2
6889 builtin and then its argument prototype would still apply. */
6890 char $ac_func();
6891
6892 int main() {
6893
6894 /* The GNU C library defines this for functions which it implements
6895 to always fail with ENOSYS. Some functions are actually named
6896 something starting with __ and the normal name is an alias. */
6897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6898 choke me
6899 #else
6900 $ac_func();
6901 #endif
6902
6903 ; return 0; }
6904 EOF
6905 if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6906 rm -rf conftest*
6907 eval "ac_cv_func_$ac_func=yes"
6908 else
6909 echo "configure: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6911 rm -rf conftest*
6912 eval "ac_cv_func_$ac_func=no"
6913 fi
6914 rm -f conftest*
6915 fi
6916
6917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6918 echo "$ac_t""yes" 1>&6
6919 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6920 cat >> confdefs.h <<EOF
6921 #define $ac_tr_func 1
6922 EOF
6923
6924 else
6925 echo "$ac_t""no" 1>&6
6926 fi
6927 done
6928
6929 for ac_func in socketpair
6930 do
6931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6932 echo "configure:6933: checking for $ac_func" >&5
6933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6934 echo $ac_n "(cached) $ac_c" 1>&6
6935 else
6936 cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939 /* System header to define __stub macros and hopefully few prototypes,
6940 which can conflict with char $ac_func(); below. */
6941 #include <assert.h>
6942 /* Override any gcc2 internal prototype to avoid an error. */
6943 /* We use char because int might match the return type of a gcc2
6944 builtin and then its argument prototype would still apply. */
6945 char $ac_func();
6946
6947 int main() {
6948
6949 /* The GNU C library defines this for functions which it implements
6950 to always fail with ENOSYS. Some functions are actually named
6951 something starting with __ and the normal name is an alias. */
6952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6953 choke me
6954 #else
6955 $ac_func();
6956 #endif
6957
6958 ; return 0; }
6959 EOF
6960 if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6961 rm -rf conftest*
6962 eval "ac_cv_func_$ac_func=yes"
6963 else
6964 echo "configure: failed program was:" >&5
6965 cat conftest.$ac_ext >&5
6966 rm -rf conftest*
6967 eval "ac_cv_func_$ac_func=no"
6968 fi
6969 rm -f conftest*
6970 fi
6971
6972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6973 echo "$ac_t""yes" 1>&6
6974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6975 cat >> confdefs.h <<EOF
6976 #define $ac_tr_func 1
6977 EOF
6978
6979 else
6980 echo "$ac_t""no" 1>&6
6981 fi
6982 done
6983
6984 for ac_func in syscall
6985 do
6986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6987 echo "configure:6988: checking for $ac_func" >&5
6988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6989 echo $ac_n "(cached) $ac_c" 1>&6
6990 else
6991 cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994 /* System header to define __stub macros and hopefully few prototypes,
6995 which can conflict with char $ac_func(); below. */
6996 #include <assert.h>
6997 /* Override any gcc2 internal prototype to avoid an error. */
6998 /* We use char because int might match the return type of a gcc2
6999 builtin and then its argument prototype would still apply. */
7000 char $ac_func();
7001
7002 int main() {
7003
7004 /* The GNU C library defines this for functions which it implements
7005 to always fail with ENOSYS. Some functions are actually named
7006 something starting with __ and the normal name is an alias. */
7007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7008 choke me
7009 #else
7010 $ac_func();
7011 #endif
7012
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016 rm -rf conftest*
7017 eval "ac_cv_func_$ac_func=yes"
7018 else
7019 echo "configure: failed program was:" >&5
7020 cat conftest.$ac_ext >&5
7021 rm -rf conftest*
7022 eval "ac_cv_func_$ac_func=no"
7023 fi
7024 rm -f conftest*
7025 fi
7026
7027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7028 echo "$ac_t""yes" 1>&6
7029 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7030 cat >> confdefs.h <<EOF
7031 #define $ac_tr_func 1
7032 EOF
7033
7034 else
7035 echo "$ac_t""no" 1>&6
7036 fi
7037 done
7038
7039 for ac_func in ttrace
7040 do
7041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7042 echo "configure:7043: checking for $ac_func" >&5
7043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7044 echo $ac_n "(cached) $ac_c" 1>&6
7045 else
7046 cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049 /* System header to define __stub macros and hopefully few prototypes,
7050 which can conflict with char $ac_func(); below. */
7051 #include <assert.h>
7052 /* Override any gcc2 internal prototype to avoid an error. */
7053 /* We use char because int might match the return type of a gcc2
7054 builtin and then its argument prototype would still apply. */
7055 char $ac_func();
7056
7057 int main() {
7058
7059 /* The GNU C library defines this for functions which it implements
7060 to always fail with ENOSYS. Some functions are actually named
7061 something starting with __ and the normal name is an alias. */
7062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7063 choke me
7064 #else
7065 $ac_func();
7066 #endif
7067
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7071 rm -rf conftest*
7072 eval "ac_cv_func_$ac_func=yes"
7073 else
7074 echo "configure: failed program was:" >&5
7075 cat conftest.$ac_ext >&5
7076 rm -rf conftest*
7077 eval "ac_cv_func_$ac_func=no"
7078 fi
7079 rm -f conftest*
7080 fi
7081
7082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7083 echo "$ac_t""yes" 1>&6
7084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7085 cat >> confdefs.h <<EOF
7086 #define $ac_tr_func 1
7087 EOF
7088
7089 else
7090 echo "$ac_t""no" 1>&6
7091 fi
7092 done
7093
7094 for ac_func in wborder
7095 do
7096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7097 echo "configure:7098: checking for $ac_func" >&5
7098 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101 cat > conftest.$ac_ext <<EOF
7102 #line 7103 "configure"
7103 #include "confdefs.h"
7104 /* System header to define __stub macros and hopefully few prototypes,
7105 which can conflict with char $ac_func(); below. */
7106 #include <assert.h>
7107 /* Override any gcc2 internal prototype to avoid an error. */
7108 /* We use char because int might match the return type of a gcc2
7109 builtin and then its argument prototype would still apply. */
7110 char $ac_func();
7111
7112 int main() {
7113
7114 /* The GNU C library defines this for functions which it implements
7115 to always fail with ENOSYS. Some functions are actually named
7116 something starting with __ and the normal name is an alias. */
7117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7118 choke me
7119 #else
7120 $ac_func();
7121 #endif
7122
7123 ; return 0; }
7124 EOF
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7126 rm -rf conftest*
7127 eval "ac_cv_func_$ac_func=yes"
7128 else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -rf conftest*
7132 eval "ac_cv_func_$ac_func=no"
7133 fi
7134 rm -f conftest*
7135 fi
7136
7137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7138 echo "$ac_t""yes" 1>&6
7139 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7140 cat >> confdefs.h <<EOF
7141 #define $ac_tr_func 1
7142 EOF
7143
7144 else
7145 echo "$ac_t""no" 1>&6
7146 fi
7147 done
7148
7149
7150 # Check the return and argument types of ptrace. No canned test for
7151 # this, so roll our own.
7152 gdb_ptrace_headers='
7153 #if HAVE_SYS_TYPES_H
7154 # include <sys/types.h>
7155 #endif
7156 #if HAVE_SYS_PTRACE_H
7157 # include <sys/ptrace.h>
7158 #endif
7159 #if HAVE_UNISTD_H
7160 # include <unistd.h>
7161 #endif
7162 '
7163 # There is no point in checking if we don't have a prototype.
7164 for ac_func in ptrace
7165 do
7166 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7167 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
7168 echo "configure:7169: checking whether $ac_func is declared" >&5
7169 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
7170 echo $ac_n "(cached) $ac_c" 1>&6
7171 else
7172 cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7175 #undef $ac_tr_decl
7176 #define $ac_tr_decl 1
7177 $gdb_ptrace_headers
7178
7179 int main() {
7180 #ifndef $ac_func
7181 char *(*pfn) = (char *(*)) $ac_func ;
7182 #endif
7183 ; return 0; }
7184 EOF
7185 if { (eval echo configure:7186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7186 rm -rf conftest*
7187 eval "gcc_cv_have_decl_$ac_func=yes"
7188 else
7189 echo "configure: failed program was:" >&5
7190 cat conftest.$ac_ext >&5
7191 rm -rf conftest*
7192 eval "gcc_cv_have_decl_$ac_func=no"
7193 fi
7194 rm -f conftest*
7195 fi
7196
7197 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
7198 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
7199 #define $ac_tr_decl 1
7200 EOF
7201
7202 else
7203 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
7204 #define $ac_tr_decl 0
7205 EOF
7206
7207 : ${gdb_cv_func_ptrace_ret='int'}
7208 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7209
7210 fi
7211
7212 done
7213 if test x = y ; then
7214 cat >> confdefs.h <<\EOF
7215 #define HAVE_DECL_PTRACE 1
7216 EOF
7217 fi
7218
7219 # Check return type.
7220 echo $ac_n "checking return type of ptrace""... $ac_c" 1>&6
7221 echo "configure:7222: checking return type of ptrace" >&5
7222 if eval "test \"`echo '$''{'gdb_cv_func_ptrace_ret'+set}'`\" = set"; then
7223 echo $ac_n "(cached) $ac_c" 1>&6
7224 else
7225 cat > conftest.$ac_ext <<EOF
7226 #line 7227 "configure"
7227 #include "confdefs.h"
7228 $gdb_ptrace_headers
7229 int main() {
7230 extern int ptrace ();
7231 ; return 0; }
7232 EOF
7233 if { (eval echo configure:7234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7234 rm -rf conftest*
7235 gdb_cv_func_ptrace_ret='int'
7236 else
7237 echo "configure: failed program was:" >&5
7238 cat conftest.$ac_ext >&5
7239 rm -rf conftest*
7240 gdb_cv_func_ptrace_ret='long'
7241 fi
7242 rm -f conftest*
7243 fi
7244
7245 echo "$ac_t""$gdb_cv_func_ptrace_ret" 1>&6
7246 cat >> confdefs.h <<EOF
7247 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
7248 EOF
7249
7250 # Check argument types.
7251 echo $ac_n "checking types of arguments for ptrace""... $ac_c" 1>&6
7252 echo "configure:7253: checking types of arguments for ptrace" >&5
7253 if eval "test \"`echo '$''{'gdb_cv_func_ptrace_args'+set}'`\" = set"; then
7254 echo $ac_n "(cached) $ac_c" 1>&6
7255 else
7256
7257 for gdb_arg1 in 'int' 'long'; do
7258 for gdb_arg2 in 'pid_t' 'int' 'long'; do
7259 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long'; do
7260 for gdb_arg4 in 'int' 'long'; do
7261 cat > conftest.$ac_ext <<EOF
7262 #line 7263 "configure"
7263 #include "confdefs.h"
7264 $gdb_ptrace_headers
7265 int main() {
7266
7267 extern $gdb_cv_func_ptrace_ret
7268 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
7269
7270 ; return 0; }
7271 EOF
7272 if { (eval echo configure:7273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7273 rm -rf conftest*
7274 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
7275 break 4;
7276 else
7277 echo "configure: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279 fi
7280 rm -f conftest*
7281 for gdb_arg5 in 'int *' 'int' 'long'; do
7282 cat > conftest.$ac_ext <<EOF
7283 #line 7284 "configure"
7284 #include "confdefs.h"
7285 $gdb_ptrace_headers
7286 int main() {
7287
7288 extern $gdb_cv_func_ptrace_ret
7289 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
7290
7291 ; return 0; }
7292 EOF
7293 if { (eval echo configure:7294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7294 rm -rf conftest*
7295
7296 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
7297 break 5;
7298 else
7299 echo "configure: failed program was:" >&5
7300 cat conftest.$ac_ext >&5
7301 fi
7302 rm -f conftest*
7303 done
7304 done
7305 done
7306 done
7307 done
7308 # Provide a safe default value.
7309 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
7310
7311 fi
7312
7313 echo "$ac_t""$gdb_cv_func_ptrace_args" 1>&6
7314 ac_save_IFS=$IFS; IFS=','
7315 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
7316 IFS=$ac_save_IFS
7317 shift
7318 cat >> confdefs.h <<EOF
7319 #define PTRACE_TYPE_ARG3 $3
7320 EOF
7321
7322 if test -n "$5"; then
7323 cat >> confdefs.h <<EOF
7324 #define PTRACE_TYPE_ARG5 $5
7325 EOF
7326
7327 fi
7328
7329 if test "$cross_compiling" = no; then
7330 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7331 echo "configure:7332: checking whether setpgrp takes no argument" >&5
7332 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7333 echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335 if test "$cross_compiling" = yes; then
7336 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
7337 else
7338 cat > conftest.$ac_ext <<EOF
7339 #line 7340 "configure"
7340 #include "confdefs.h"
7341
7342 #ifdef HAVE_UNISTD_H
7343 #include <unistd.h>
7344 #endif
7345
7346 /*
7347 * If this system has a BSD-style setpgrp, which takes arguments, exit
7348 * successfully.
7349 */
7350 main()
7351 {
7352 if (setpgrp(1,1) == -1)
7353 exit(0);
7354 else
7355 exit(1);
7356 }
7357
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7360 then
7361 ac_cv_func_setpgrp_void=no
7362 else
7363 echo "configure: failed program was:" >&5
7364 cat conftest.$ac_ext >&5
7365 rm -fr conftest*
7366 ac_cv_func_setpgrp_void=yes
7367 fi
7368 rm -fr conftest*
7369 fi
7370
7371
7372 fi
7373
7374 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7375 if test $ac_cv_func_setpgrp_void = yes; then
7376 cat >> confdefs.h <<\EOF
7377 #define SETPGRP_VOID 1
7378 EOF
7379
7380 fi
7381
7382 else
7383 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7384 echo "configure:7385: checking whether setpgrp takes no argument" >&5
7385 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387 else
7388 cat > conftest.$ac_ext <<EOF
7389 #line 7390 "configure"
7390 #include "confdefs.h"
7391
7392 #include <unistd.h>
7393
7394 int main() {
7395
7396 if (setpgrp(1,1) == -1)
7397 exit (0);
7398 else
7399 exit (1);
7400
7401 ; return 0; }
7402 EOF
7403 if { (eval echo configure:7404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7404 rm -rf conftest*
7405 ac_cv_func_setpgrp_void=no
7406 else
7407 echo "configure: failed program was:" >&5
7408 cat conftest.$ac_ext >&5
7409 rm -rf conftest*
7410 ac_cv_func_setpgrp_void=yes
7411 fi
7412 rm -f conftest*
7413 fi
7414
7415 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7416 if test $ac_cv_func_setpgrp_void = yes; then
7417 cat >> confdefs.h <<\EOF
7418 #define SETPGRP_VOID 1
7419 EOF
7420
7421 fi
7422 fi
7423
7424 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7425 # since sigsetjmp might only be defined as a macro.
7426 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7427 echo "configure:7428: checking for sigsetjmp" >&5
7428 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
7429 echo $ac_n "(cached) $ac_c" 1>&6
7430 else
7431 cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434
7435 #include <setjmp.h>
7436
7437 int main() {
7438 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7439 ; return 0; }
7440 EOF
7441 if { (eval echo configure:7442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7442 rm -rf conftest*
7443 gdb_cv_func_sigsetjmp=yes
7444 else
7445 echo "configure: failed program was:" >&5
7446 cat conftest.$ac_ext >&5
7447 rm -rf conftest*
7448 gdb_cv_func_sigsetjmp=no
7449 fi
7450 rm -f conftest*
7451 fi
7452
7453 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7454 if test $gdb_cv_func_sigsetjmp = yes; then
7455 cat >> confdefs.h <<\EOF
7456 #define HAVE_SIGSETJMP 1
7457 EOF
7458
7459 fi
7460
7461 # Assume we'll default to using the included libiberty regex.
7462 gdb_use_included_regex=yes
7463
7464 # However, if the system regex is GNU regex, then default to *not*
7465 # using the included regex.
7466 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7467 echo "configure:7468: checking for GNU regex" >&5
7468 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7469 echo $ac_n "(cached) $ac_c" 1>&6
7470 else
7471 cat > conftest.$ac_ext <<EOF
7472 #line 7473 "configure"
7473 #include "confdefs.h"
7474 #include <gnu-versions.h>
7475 int main() {
7476 #define REGEX_INTERFACE_VERSION 1
7477 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7478 # error "Version mismatch"
7479 #endif
7480 ; return 0; }
7481 EOF
7482 if { (eval echo configure:7483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7483 rm -rf conftest*
7484 gdb_cv_have_gnu_regex=yes
7485 else
7486 echo "configure: failed program was:" >&5
7487 cat conftest.$ac_ext >&5
7488 rm -rf conftest*
7489 gdb_cv_have_gnu_regex=no
7490 fi
7491 rm -f conftest*
7492 fi
7493
7494 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7495 if test $gdb_cv_have_gnu_regex = yes; then
7496 gdb_use_included_regex=no
7497 fi
7498
7499 # Check whether --with-included-regex or --without-included-regex was given.
7500 if test "${with_included_regex+set}" = set; then
7501 withval="$with_included_regex"
7502 gdb_with_regex=$withval
7503 else
7504 gdb_with_regex=$gdb_use_included_regex
7505 fi
7506
7507 if test "$gdb_with_regex" = yes; then
7508 cat >> confdefs.h <<\EOF
7509 #define USE_INCLUDED_REGEX 1
7510 EOF
7511
7512 fi
7513
7514 # See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7515 echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
7516 echo "configure:7517: checking for td_pcb in struct thread" >&5
7517 if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7518 echo $ac_n "(cached) $ac_c" 1>&6
7519 else
7520 cat > conftest.$ac_ext <<EOF
7521 #line 7522 "configure"
7522 #include "confdefs.h"
7523 #include <sys/param.h>
7524 #include <sys/proc.h>
7525 int main() {
7526 struct thread td; td.td_pcb;
7527 ; return 0; }
7528 EOF
7529 if { (eval echo configure:7530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7530 rm -rf conftest*
7531 gdb_cv_struct_thread_td_pcb=yes
7532 else
7533 echo "configure: failed program was:" >&5
7534 cat conftest.$ac_ext >&5
7535 rm -rf conftest*
7536 gdb_cv_struct_thread_td_pcb=no
7537 fi
7538 rm -f conftest*
7539 fi
7540
7541 echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7542 if test $gdb_cv_struct_thread_td_pcb = yes; then
7543 cat >> confdefs.h <<\EOF
7544 #define HAVE_STRUCT_THREAD_TD_PCB 1
7545 EOF
7546
7547 fi
7548
7549 # See if <sys/lwp.h> defines `struct lwp`.
7550 echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
7551 echo "configure:7552: checking for struct lwp" >&5
7552 if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
7553 echo $ac_n "(cached) $ac_c" 1>&6
7554 else
7555 cat > conftest.$ac_ext <<EOF
7556 #line 7557 "configure"
7557 #include "confdefs.h"
7558 #include <sys/param.h>
7559 #include <sys/lwp.h>
7560 int main() {
7561 struct lwp l;
7562 ; return 0; }
7563 EOF
7564 if { (eval echo configure:7565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7565 rm -rf conftest*
7566 gdb_cv_struct_lwp=yes
7567 else
7568 echo "configure: failed program was:" >&5
7569 cat conftest.$ac_ext >&5
7570 rm -rf conftest*
7571 gdb_cv_struct_lwp=no
7572 fi
7573 rm -f conftest*
7574 fi
7575
7576 echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
7577 if test $gdb_cv_struct_lwp = yes; then
7578 cat >> confdefs.h <<\EOF
7579 #define HAVE_STRUCT_LWP 1
7580 EOF
7581
7582 fi
7583
7584 # See if <machine/reg.h> degines `struct reg'.
7585 echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7586 echo "configure:7587: checking for struct reg in machine/reg.h" >&5
7587 if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7588 echo $ac_n "(cached) $ac_c" 1>&6
7589 else
7590 cat > conftest.$ac_ext <<EOF
7591 #line 7592 "configure"
7592 #include "confdefs.h"
7593 #include <sys/types.h>
7594 #include <machine/reg.h>
7595 int main() {
7596 struct reg r;
7597 ; return 0; }
7598 EOF
7599 if { (eval echo configure:7600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7600 rm -rf conftest*
7601 gdb_cv_struct_reg=yes
7602 else
7603 echo "configure: failed program was:" >&5
7604 cat conftest.$ac_ext >&5
7605 rm -rf conftest*
7606 gdb_cv_struct_reg=no
7607 fi
7608 rm -f conftest*
7609 fi
7610
7611 echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7612 if test $gdb_cv_struct_reg = yes; then
7613 cat >> confdefs.h <<\EOF
7614 #define HAVE_STRUCT_REG 1
7615 EOF
7616
7617 fi
7618
7619 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7620 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7621 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7622 echo "configure:7623: checking for r_fs in struct reg" >&5
7623 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7624 echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626 cat > conftest.$ac_ext <<EOF
7627 #line 7628 "configure"
7628 #include "confdefs.h"
7629 #include <machine/reg.h>
7630 int main() {
7631 struct reg r; r.r_fs;
7632 ; return 0; }
7633 EOF
7634 if { (eval echo configure:7635: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7635 rm -rf conftest*
7636 gdb_cv_struct_reg_r_fs=yes
7637 else
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 rm -rf conftest*
7641 gdb_cv_struct_reg_r_fs=no
7642 fi
7643 rm -f conftest*
7644 fi
7645
7646 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7647 if test $gdb_cv_struct_reg_r_fs = yes; then
7648 cat >> confdefs.h <<\EOF
7649 #define HAVE_STRUCT_REG_R_FS 1
7650 EOF
7651
7652 fi
7653 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7654 echo "configure:7655: checking for r_gs in struct reg" >&5
7655 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7656 echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658 cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 #include <machine/reg.h>
7662 int main() {
7663 struct reg r; r.r_gs;
7664 ; return 0; }
7665 EOF
7666 if { (eval echo configure:7667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7667 rm -rf conftest*
7668 gdb_cv_struct_reg_r_gs=yes
7669 else
7670 echo "configure: failed program was:" >&5
7671 cat conftest.$ac_ext >&5
7672 rm -rf conftest*
7673 gdb_cv_struct_reg_r_gs=no
7674 fi
7675 rm -f conftest*
7676 fi
7677
7678 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7679 if test $gdb_cv_struct_reg_r_gs = yes; then
7680 cat >> confdefs.h <<\EOF
7681 #define HAVE_STRUCT_REG_R_GS 1
7682 EOF
7683
7684 fi
7685
7686 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7687 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7688 echo "configure:7689: checking for PTRACE_GETREGS" >&5
7689 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
7690 echo $ac_n "(cached) $ac_c" 1>&6
7691 else
7692 cat > conftest.$ac_ext <<EOF
7693 #line 7694 "configure"
7694 #include "confdefs.h"
7695 #include <sys/ptrace.h>
7696 int main() {
7697 PTRACE_GETREGS;
7698 ; return 0; }
7699 EOF
7700 if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7701 rm -rf conftest*
7702 gdb_cv_have_ptrace_getregs=yes
7703 else
7704 echo "configure: failed program was:" >&5
7705 cat conftest.$ac_ext >&5
7706 rm -rf conftest*
7707 gdb_cv_have_ptrace_getregs=no
7708 fi
7709 rm -f conftest*
7710 fi
7711
7712 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7713 if test $gdb_cv_have_ptrace_getregs = yes; then
7714 cat >> confdefs.h <<\EOF
7715 #define HAVE_PTRACE_GETREGS 1
7716 EOF
7717
7718 fi
7719
7720 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7721 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7722 echo "configure:7723: checking for PTRACE_GETFPXREGS" >&5
7723 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
7724 echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726 cat > conftest.$ac_ext <<EOF
7727 #line 7728 "configure"
7728 #include "confdefs.h"
7729 #include <sys/ptrace.h>
7730 int main() {
7731 PTRACE_GETFPXREGS;
7732 ; return 0; }
7733 EOF
7734 if { (eval echo configure:7735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7735 rm -rf conftest*
7736 gdb_cv_have_ptrace_getfpxregs=yes
7737 else
7738 echo "configure: failed program was:" >&5
7739 cat conftest.$ac_ext >&5
7740 rm -rf conftest*
7741 gdb_cv_have_ptrace_getfpxregs=no
7742 fi
7743 rm -f conftest*
7744 fi
7745
7746 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7747 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7748 cat >> confdefs.h <<\EOF
7749 #define HAVE_PTRACE_GETFPXREGS 1
7750 EOF
7751
7752 fi
7753
7754 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7755 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7756 echo "configure:7757: checking for PT_GETDBREGS" >&5
7757 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
7758 echo $ac_n "(cached) $ac_c" 1>&6
7759 else
7760 cat > conftest.$ac_ext <<EOF
7761 #line 7762 "configure"
7762 #include "confdefs.h"
7763 #include <sys/types.h>
7764 #include <sys/ptrace.h>
7765 int main() {
7766 PT_GETDBREGS;
7767 ; return 0; }
7768 EOF
7769 if { (eval echo configure:7770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7770 rm -rf conftest*
7771 gdb_cv_have_pt_getdbregs=yes
7772 else
7773 echo "configure: failed program was:" >&5
7774 cat conftest.$ac_ext >&5
7775 rm -rf conftest*
7776 gdb_cv_have_pt_getdbregs=no
7777 fi
7778 rm -f conftest*
7779 fi
7780
7781 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7782 if test $gdb_cv_have_pt_getdbregs = yes; then
7783 cat >> confdefs.h <<\EOF
7784 #define HAVE_PT_GETDBREGS 1
7785 EOF
7786
7787 fi
7788
7789 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7790 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7791 echo "configure:7792: checking for PT_GETXMMREGS" >&5
7792 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
7793 echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795 cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798 #include <sys/types.h>
7799 #include <sys/ptrace.h>
7800 int main() {
7801 PT_GETXMMREGS;
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7805 rm -rf conftest*
7806 gdb_cv_have_pt_getxmmregs=yes
7807 else
7808 echo "configure: failed program was:" >&5
7809 cat conftest.$ac_ext >&5
7810 rm -rf conftest*
7811 gdb_cv_have_pt_getxmmregs=no
7812 fi
7813 rm -f conftest*
7814 fi
7815
7816 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7817 if test $gdb_cv_have_pt_getxmmregs = yes; then
7818 cat >> confdefs.h <<\EOF
7819 #define HAVE_PT_GETXMMREGS 1
7820 EOF
7821
7822 fi
7823
7824 # See if stdint.h provides the uintptr_t type.
7825 # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
7826 echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7827 echo "configure:7828: checking for uintptr_t in stdint.h" >&5
7828 if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7829 echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831 cat > conftest.$ac_ext <<EOF
7832 #line 7833 "configure"
7833 #include "confdefs.h"
7834 #include <stdint.h>
7835 int main() {
7836 uintptr_t foo = 0;
7837 ; return 0; }
7838 EOF
7839 if { (eval echo configure:7840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7840 rm -rf conftest*
7841 gdb_cv_have_uintptr_t=yes
7842 else
7843 echo "configure: failed program was:" >&5
7844 cat conftest.$ac_ext >&5
7845 rm -rf conftest*
7846 gdb_cv_have_uintptr_t=no
7847 fi
7848 rm -f conftest*
7849 fi
7850
7851 echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7852 if test $gdb_cv_have_uintptr_t = yes; then
7853 cat >> confdefs.h <<\EOF
7854 #define HAVE_UINTPTR_T 1
7855 EOF
7856
7857 fi
7858
7859 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7860 echo "configure:7861: checking whether malloc must be declared" >&5
7861 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
7862 echo $ac_n "(cached) $ac_c" 1>&6
7863 else
7864 cat > conftest.$ac_ext <<EOF
7865 #line 7866 "configure"
7866 #include "confdefs.h"
7867
7868 #include <stdio.h>
7869 #ifdef HAVE_STRING_H
7870 #include <string.h>
7871 #else
7872 #ifdef HAVE_STRINGS_H
7873 #include <strings.h>
7874 #endif
7875 #endif
7876 #ifdef HAVE_STDLIB_H
7877 #include <stdlib.h>
7878 #endif
7879 #ifdef HAVE_UNISTD_H
7880 #include <unistd.h>
7881 #endif
7882 int main() {
7883 char *(*pfn) = (char *(*)) malloc
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7887 rm -rf conftest*
7888 bfd_cv_decl_needed_malloc=no
7889 else
7890 echo "configure: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 rm -rf conftest*
7893 bfd_cv_decl_needed_malloc=yes
7894 fi
7895 rm -f conftest*
7896 fi
7897
7898 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7899 if test $bfd_cv_decl_needed_malloc = yes; then
7900 cat >> confdefs.h <<\EOF
7901 #define NEED_DECLARATION_MALLOC 1
7902 EOF
7903
7904 fi
7905
7906 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7907 echo "configure:7908: checking whether realloc must be declared" >&5
7908 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
7909 echo $ac_n "(cached) $ac_c" 1>&6
7910 else
7911 cat > conftest.$ac_ext <<EOF
7912 #line 7913 "configure"
7913 #include "confdefs.h"
7914
7915 #include <stdio.h>
7916 #ifdef HAVE_STRING_H
7917 #include <string.h>
7918 #else
7919 #ifdef HAVE_STRINGS_H
7920 #include <strings.h>
7921 #endif
7922 #endif
7923 #ifdef HAVE_STDLIB_H
7924 #include <stdlib.h>
7925 #endif
7926 #ifdef HAVE_UNISTD_H
7927 #include <unistd.h>
7928 #endif
7929 int main() {
7930 char *(*pfn) = (char *(*)) realloc
7931 ; return 0; }
7932 EOF
7933 if { (eval echo configure:7934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7934 rm -rf conftest*
7935 bfd_cv_decl_needed_realloc=no
7936 else
7937 echo "configure: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 rm -rf conftest*
7940 bfd_cv_decl_needed_realloc=yes
7941 fi
7942 rm -f conftest*
7943 fi
7944
7945 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7946 if test $bfd_cv_decl_needed_realloc = yes; then
7947 cat >> confdefs.h <<\EOF
7948 #define NEED_DECLARATION_REALLOC 1
7949 EOF
7950
7951 fi
7952
7953 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7954 echo "configure:7955: checking whether free must be declared" >&5
7955 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
7956 echo $ac_n "(cached) $ac_c" 1>&6
7957 else
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961
7962 #include <stdio.h>
7963 #ifdef HAVE_STRING_H
7964 #include <string.h>
7965 #else
7966 #ifdef HAVE_STRINGS_H
7967 #include <strings.h>
7968 #endif
7969 #endif
7970 #ifdef HAVE_STDLIB_H
7971 #include <stdlib.h>
7972 #endif
7973 #ifdef HAVE_UNISTD_H
7974 #include <unistd.h>
7975 #endif
7976 int main() {
7977 char *(*pfn) = (char *(*)) free
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7981 rm -rf conftest*
7982 bfd_cv_decl_needed_free=no
7983 else
7984 echo "configure: failed program was:" >&5
7985 cat conftest.$ac_ext >&5
7986 rm -rf conftest*
7987 bfd_cv_decl_needed_free=yes
7988 fi
7989 rm -f conftest*
7990 fi
7991
7992 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7993 if test $bfd_cv_decl_needed_free = yes; then
7994 cat >> confdefs.h <<\EOF
7995 #define NEED_DECLARATION_FREE 1
7996 EOF
7997
7998 fi
7999
8000 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
8001 echo "configure:8002: checking whether strerror must be declared" >&5
8002 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
8003 echo $ac_n "(cached) $ac_c" 1>&6
8004 else
8005 cat > conftest.$ac_ext <<EOF
8006 #line 8007 "configure"
8007 #include "confdefs.h"
8008
8009 #include <stdio.h>
8010 #ifdef HAVE_STRING_H
8011 #include <string.h>
8012 #else
8013 #ifdef HAVE_STRINGS_H
8014 #include <strings.h>
8015 #endif
8016 #endif
8017 #ifdef HAVE_STDLIB_H
8018 #include <stdlib.h>
8019 #endif
8020 #ifdef HAVE_UNISTD_H
8021 #include <unistd.h>
8022 #endif
8023 int main() {
8024 char *(*pfn) = (char *(*)) strerror
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8028 rm -rf conftest*
8029 bfd_cv_decl_needed_strerror=no
8030 else
8031 echo "configure: failed program was:" >&5
8032 cat conftest.$ac_ext >&5
8033 rm -rf conftest*
8034 bfd_cv_decl_needed_strerror=yes
8035 fi
8036 rm -f conftest*
8037 fi
8038
8039 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
8040 if test $bfd_cv_decl_needed_strerror = yes; then
8041 cat >> confdefs.h <<\EOF
8042 #define NEED_DECLARATION_STRERROR 1
8043 EOF
8044
8045 fi
8046
8047 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
8048 echo "configure:8049: checking whether strdup must be declared" >&5
8049 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
8050 echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052 cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055
8056 #include <stdio.h>
8057 #ifdef HAVE_STRING_H
8058 #include <string.h>
8059 #else
8060 #ifdef HAVE_STRINGS_H
8061 #include <strings.h>
8062 #endif
8063 #endif
8064 #ifdef HAVE_STDLIB_H
8065 #include <stdlib.h>
8066 #endif
8067 #ifdef HAVE_UNISTD_H
8068 #include <unistd.h>
8069 #endif
8070 int main() {
8071 char *(*pfn) = (char *(*)) strdup
8072 ; return 0; }
8073 EOF
8074 if { (eval echo configure:8075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8075 rm -rf conftest*
8076 bfd_cv_decl_needed_strdup=no
8077 else
8078 echo "configure: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 rm -rf conftest*
8081 bfd_cv_decl_needed_strdup=yes
8082 fi
8083 rm -f conftest*
8084 fi
8085
8086 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
8087 if test $bfd_cv_decl_needed_strdup = yes; then
8088 cat >> confdefs.h <<\EOF
8089 #define NEED_DECLARATION_STRDUP 1
8090 EOF
8091
8092 fi
8093
8094 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
8095 echo "configure:8096: checking whether strstr must be declared" >&5
8096 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
8097 echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099 cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102
8103 #include <stdio.h>
8104 #ifdef HAVE_STRING_H
8105 #include <string.h>
8106 #else
8107 #ifdef HAVE_STRINGS_H
8108 #include <strings.h>
8109 #endif
8110 #endif
8111 #ifdef HAVE_STDLIB_H
8112 #include <stdlib.h>
8113 #endif
8114 #ifdef HAVE_UNISTD_H
8115 #include <unistd.h>
8116 #endif
8117 int main() {
8118 char *(*pfn) = (char *(*)) strstr
8119 ; return 0; }
8120 EOF
8121 if { (eval echo configure:8122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8122 rm -rf conftest*
8123 bfd_cv_decl_needed_strstr=no
8124 else
8125 echo "configure: failed program was:" >&5
8126 cat conftest.$ac_ext >&5
8127 rm -rf conftest*
8128 bfd_cv_decl_needed_strstr=yes
8129 fi
8130 rm -f conftest*
8131 fi
8132
8133 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
8134 if test $bfd_cv_decl_needed_strstr = yes; then
8135 cat >> confdefs.h <<\EOF
8136 #define NEED_DECLARATION_STRSTR 1
8137 EOF
8138
8139 fi
8140
8141 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
8142 echo "configure:8143: checking whether canonicalize_file_name must be declared" >&5
8143 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
8144 echo $ac_n "(cached) $ac_c" 1>&6
8145 else
8146 cat > conftest.$ac_ext <<EOF
8147 #line 8148 "configure"
8148 #include "confdefs.h"
8149
8150 #include <stdio.h>
8151 #ifdef HAVE_STRING_H
8152 #include <string.h>
8153 #else
8154 #ifdef HAVE_STRINGS_H
8155 #include <strings.h>
8156 #endif
8157 #endif
8158 #ifdef HAVE_STDLIB_H
8159 #include <stdlib.h>
8160 #endif
8161 #ifdef HAVE_UNISTD_H
8162 #include <unistd.h>
8163 #endif
8164 int main() {
8165 char *(*pfn) = (char *(*)) canonicalize_file_name
8166 ; return 0; }
8167 EOF
8168 if { (eval echo configure:8169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8169 rm -rf conftest*
8170 bfd_cv_decl_needed_canonicalize_file_name=no
8171 else
8172 echo "configure: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174 rm -rf conftest*
8175 bfd_cv_decl_needed_canonicalize_file_name=yes
8176 fi
8177 rm -f conftest*
8178 fi
8179
8180 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
8181 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
8182 cat >> confdefs.h <<\EOF
8183 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
8184 EOF
8185
8186 fi
8187
8188
8189 # The following save_state_t checkery is only necessary for HPUX
8190 # versions earlier than 10.20. When those fade from memory, this
8191 # could be expunged. --jsm 1999-03-22
8192
8193 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
8194 echo "configure:8195: checking for HPUX save_state structure" >&5
8195 cat > conftest.$ac_ext <<EOF
8196 #line 8197 "configure"
8197 #include "confdefs.h"
8198 #include <machine/save_state.h>
8199 EOF
8200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8201 egrep "save_state_t" >/dev/null 2>&1; then
8202 rm -rf conftest*
8203 gdb_cv_hpux_savestate=yes
8204 else
8205 rm -rf conftest*
8206 gdb_cv_hpux_savestate=no
8207 fi
8208 rm -f conftest*
8209
8210 cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 #include <machine/save_state.h>
8214 EOF
8215 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8216 egrep "ss_wide" >/dev/null 2>&1; then
8217 rm -rf conftest*
8218 gdb_cv_hpux_sswide=yes
8219 else
8220 rm -rf conftest*
8221 gdb_cv_hpux_sswide=no
8222 fi
8223 rm -f conftest*
8224
8225 if test $gdb_cv_hpux_savestate = yes
8226 then
8227 cat >> confdefs.h <<\EOF
8228 #define HAVE_STRUCT_SAVE_STATE_T 1
8229 EOF
8230
8231 fi
8232 if test $gdb_cv_hpux_sswide = yes
8233 then
8234 cat >> confdefs.h <<\EOF
8235 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
8236 EOF
8237
8238 fi
8239 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8240
8241
8242 # If we are configured native on GNU/Linux, work around problems with
8243 # sys/procfs.h
8244 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
8245
8246 if test "${target}" = "${host}"; then
8247 case "${host}" in
8248 i[3456]86-*-linux*)
8249 cat >> confdefs.h <<\EOF
8250 #define START_INFERIOR_TRAPS_EXPECTED 2
8251 EOF
8252
8253 cat >> confdefs.h <<\EOF
8254 #define sys_quotactl 1
8255 EOF
8256
8257 ;;
8258 ia64-*-aix*)
8259 cat >> confdefs.h <<\EOF
8260 #define NEW_PROC_API 1
8261 EOF
8262
8263 ;;
8264 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8265 cat >> confdefs.h <<\EOF
8266 #define NEW_PROC_API 1
8267 EOF
8268
8269 ;;
8270 *-*-solaris2.[6789])
8271 cat >> confdefs.h <<\EOF
8272 #define NEW_PROC_API 1
8273 EOF
8274
8275 ;;
8276 mips-sgi-irix5*)
8277 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8278 cat >> confdefs.h <<\EOF
8279 #define _KMEMUSER 1
8280 EOF
8281
8282 ;;
8283 esac
8284 fi
8285
8286 if test "$ac_cv_header_sys_procfs_h" = yes; then
8287 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
8288 echo "configure:8289: checking for pstatus_t in sys/procfs.h" >&5
8289 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
8290 echo $ac_n "(cached) $ac_c" 1>&6
8291 else
8292 cat > conftest.$ac_ext <<EOF
8293 #line 8294 "configure"
8294 #include "confdefs.h"
8295
8296 #define _SYSCALL32
8297 #include <sys/procfs.h>
8298 int main() {
8299 pstatus_t avar
8300 ; return 0; }
8301 EOF
8302 if { (eval echo configure:8303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8303 rm -rf conftest*
8304 bfd_cv_have_sys_procfs_type_pstatus_t=yes
8305 else
8306 echo "configure: failed program was:" >&5
8307 cat conftest.$ac_ext >&5
8308 rm -rf conftest*
8309 bfd_cv_have_sys_procfs_type_pstatus_t=no
8310
8311 fi
8312 rm -f conftest*
8313 fi
8314
8315 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
8316 cat >> confdefs.h <<\EOF
8317 #define HAVE_PSTATUS_T 1
8318 EOF
8319
8320 fi
8321 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
8322
8323 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
8324 echo "configure:8325: checking for prrun_t in sys/procfs.h" >&5
8325 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
8326 echo $ac_n "(cached) $ac_c" 1>&6
8327 else
8328 cat > conftest.$ac_ext <<EOF
8329 #line 8330 "configure"
8330 #include "confdefs.h"
8331
8332 #define _SYSCALL32
8333 #include <sys/procfs.h>
8334 int main() {
8335 prrun_t avar
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8339 rm -rf conftest*
8340 bfd_cv_have_sys_procfs_type_prrun_t=yes
8341 else
8342 echo "configure: failed program was:" >&5
8343 cat conftest.$ac_ext >&5
8344 rm -rf conftest*
8345 bfd_cv_have_sys_procfs_type_prrun_t=no
8346
8347 fi
8348 rm -f conftest*
8349 fi
8350
8351 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
8352 cat >> confdefs.h <<\EOF
8353 #define HAVE_PRRUN_T 1
8354 EOF
8355
8356 fi
8357 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
8358
8359 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
8360 echo "configure:8361: checking for gregset_t in sys/procfs.h" >&5
8361 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
8362 echo $ac_n "(cached) $ac_c" 1>&6
8363 else
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367
8368 #define _SYSCALL32
8369 #include <sys/procfs.h>
8370 int main() {
8371 gregset_t avar
8372 ; return 0; }
8373 EOF
8374 if { (eval echo configure:8375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8375 rm -rf conftest*
8376 bfd_cv_have_sys_procfs_type_gregset_t=yes
8377 else
8378 echo "configure: failed program was:" >&5
8379 cat conftest.$ac_ext >&5
8380 rm -rf conftest*
8381 bfd_cv_have_sys_procfs_type_gregset_t=no
8382
8383 fi
8384 rm -f conftest*
8385 fi
8386
8387 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8388 cat >> confdefs.h <<\EOF
8389 #define HAVE_GREGSET_T 1
8390 EOF
8391
8392 fi
8393 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
8394
8395 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
8396 echo "configure:8397: checking for fpregset_t in sys/procfs.h" >&5
8397 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
8398 echo $ac_n "(cached) $ac_c" 1>&6
8399 else
8400 cat > conftest.$ac_ext <<EOF
8401 #line 8402 "configure"
8402 #include "confdefs.h"
8403
8404 #define _SYSCALL32
8405 #include <sys/procfs.h>
8406 int main() {
8407 fpregset_t avar
8408 ; return 0; }
8409 EOF
8410 if { (eval echo configure:8411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8411 rm -rf conftest*
8412 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8413 else
8414 echo "configure: failed program was:" >&5
8415 cat conftest.$ac_ext >&5
8416 rm -rf conftest*
8417 bfd_cv_have_sys_procfs_type_fpregset_t=no
8418
8419 fi
8420 rm -f conftest*
8421 fi
8422
8423 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8424 cat >> confdefs.h <<\EOF
8425 #define HAVE_FPREGSET_T 1
8426 EOF
8427
8428 fi
8429 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
8430
8431 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
8432 echo "configure:8433: checking for prgregset_t in sys/procfs.h" >&5
8433 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
8434 echo $ac_n "(cached) $ac_c" 1>&6
8435 else
8436 cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439
8440 #define _SYSCALL32
8441 #include <sys/procfs.h>
8442 int main() {
8443 prgregset_t avar
8444 ; return 0; }
8445 EOF
8446 if { (eval echo configure:8447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8447 rm -rf conftest*
8448 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8449 else
8450 echo "configure: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 rm -rf conftest*
8453 bfd_cv_have_sys_procfs_type_prgregset_t=no
8454
8455 fi
8456 rm -f conftest*
8457 fi
8458
8459 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8460 cat >> confdefs.h <<\EOF
8461 #define HAVE_PRGREGSET_T 1
8462 EOF
8463
8464 fi
8465 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
8466
8467 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
8468 echo "configure:8469: checking for prfpregset_t in sys/procfs.h" >&5
8469 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
8470 echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475
8476 #define _SYSCALL32
8477 #include <sys/procfs.h>
8478 int main() {
8479 prfpregset_t avar
8480 ; return 0; }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8483 rm -rf conftest*
8484 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8485 else
8486 echo "configure: failed program was:" >&5
8487 cat conftest.$ac_ext >&5
8488 rm -rf conftest*
8489 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8490
8491 fi
8492 rm -f conftest*
8493 fi
8494
8495 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8496 cat >> confdefs.h <<\EOF
8497 #define HAVE_PRFPREGSET_T 1
8498 EOF
8499
8500 fi
8501 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
8502
8503 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
8504 echo "configure:8505: checking for prgregset32_t in sys/procfs.h" >&5
8505 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
8506 echo $ac_n "(cached) $ac_c" 1>&6
8507 else
8508 cat > conftest.$ac_ext <<EOF
8509 #line 8510 "configure"
8510 #include "confdefs.h"
8511
8512 #define _SYSCALL32
8513 #include <sys/procfs.h>
8514 int main() {
8515 prgregset32_t avar
8516 ; return 0; }
8517 EOF
8518 if { (eval echo configure:8519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8519 rm -rf conftest*
8520 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8521 else
8522 echo "configure: failed program was:" >&5
8523 cat conftest.$ac_ext >&5
8524 rm -rf conftest*
8525 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8526
8527 fi
8528 rm -f conftest*
8529 fi
8530
8531 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8532 cat >> confdefs.h <<\EOF
8533 #define HAVE_PRGREGSET32_T 1
8534 EOF
8535
8536 fi
8537 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
8538
8539 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
8540 echo "configure:8541: checking for prfpregset32_t in sys/procfs.h" >&5
8541 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
8542 echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544 cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547
8548 #define _SYSCALL32
8549 #include <sys/procfs.h>
8550 int main() {
8551 prfpregset32_t avar
8552 ; return 0; }
8553 EOF
8554 if { (eval echo configure:8555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8555 rm -rf conftest*
8556 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
8557 else
8558 echo "configure: failed program was:" >&5
8559 cat conftest.$ac_ext >&5
8560 rm -rf conftest*
8561 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8562
8563 fi
8564 rm -f conftest*
8565 fi
8566
8567 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8568 cat >> confdefs.h <<\EOF
8569 #define HAVE_PRFPREGSET32_T 1
8570 EOF
8571
8572 fi
8573 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
8574
8575 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
8576 echo "configure:8577: checking for lwpid_t in sys/procfs.h" >&5
8577 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
8578 echo $ac_n "(cached) $ac_c" 1>&6
8579 else
8580 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583
8584 #define _SYSCALL32
8585 #include <sys/procfs.h>
8586 int main() {
8587 lwpid_t avar
8588 ; return 0; }
8589 EOF
8590 if { (eval echo configure:8591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8591 rm -rf conftest*
8592 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8593 else
8594 echo "configure: failed program was:" >&5
8595 cat conftest.$ac_ext >&5
8596 rm -rf conftest*
8597 bfd_cv_have_sys_procfs_type_lwpid_t=no
8598
8599 fi
8600 rm -f conftest*
8601 fi
8602
8603 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8604 cat >> confdefs.h <<\EOF
8605 #define HAVE_LWPID_T 1
8606 EOF
8607
8608 fi
8609 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
8610
8611 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
8612 echo "configure:8613: checking for psaddr_t in sys/procfs.h" >&5
8613 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
8614 echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616 cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619
8620 #define _SYSCALL32
8621 #include <sys/procfs.h>
8622 int main() {
8623 psaddr_t avar
8624 ; return 0; }
8625 EOF
8626 if { (eval echo configure:8627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8627 rm -rf conftest*
8628 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8629 else
8630 echo "configure: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 rm -rf conftest*
8633 bfd_cv_have_sys_procfs_type_psaddr_t=no
8634
8635 fi
8636 rm -f conftest*
8637 fi
8638
8639 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8640 cat >> confdefs.h <<\EOF
8641 #define HAVE_PSADDR_T 1
8642 EOF
8643
8644 fi
8645 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
8646
8647 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
8648 echo "configure:8649: checking for prsysent_t in sys/procfs.h" >&5
8649 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
8650 echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652 cat > conftest.$ac_ext <<EOF
8653 #line 8654 "configure"
8654 #include "confdefs.h"
8655
8656 #define _SYSCALL32
8657 #include <sys/procfs.h>
8658 int main() {
8659 prsysent_t avar
8660 ; return 0; }
8661 EOF
8662 if { (eval echo configure:8663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8663 rm -rf conftest*
8664 bfd_cv_have_sys_procfs_type_prsysent_t=yes
8665 else
8666 echo "configure: failed program was:" >&5
8667 cat conftest.$ac_ext >&5
8668 rm -rf conftest*
8669 bfd_cv_have_sys_procfs_type_prsysent_t=no
8670
8671 fi
8672 rm -f conftest*
8673 fi
8674
8675 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8676 cat >> confdefs.h <<\EOF
8677 #define HAVE_PRSYSENT_T 1
8678 EOF
8679
8680 fi
8681 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
8682
8683 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
8684 echo "configure:8685: checking for pr_sigset_t in sys/procfs.h" >&5
8685 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
8686 echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688 cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691
8692 #define _SYSCALL32
8693 #include <sys/procfs.h>
8694 int main() {
8695 pr_sigset_t avar
8696 ; return 0; }
8697 EOF
8698 if { (eval echo configure:8699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8699 rm -rf conftest*
8700 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
8701 else
8702 echo "configure: failed program was:" >&5
8703 cat conftest.$ac_ext >&5
8704 rm -rf conftest*
8705 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8706
8707 fi
8708 rm -f conftest*
8709 fi
8710
8711 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8712 cat >> confdefs.h <<\EOF
8713 #define HAVE_PR_SIGSET_T 1
8714 EOF
8715
8716 fi
8717 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
8718
8719 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
8720 echo "configure:8721: checking for pr_sigaction64_t in sys/procfs.h" >&5
8721 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
8722 echo $ac_n "(cached) $ac_c" 1>&6
8723 else
8724 cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727
8728 #define _SYSCALL32
8729 #include <sys/procfs.h>
8730 int main() {
8731 pr_sigaction64_t avar
8732 ; return 0; }
8733 EOF
8734 if { (eval echo configure:8735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8735 rm -rf conftest*
8736 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
8737 else
8738 echo "configure: failed program was:" >&5
8739 cat conftest.$ac_ext >&5
8740 rm -rf conftest*
8741 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8742
8743 fi
8744 rm -f conftest*
8745 fi
8746
8747 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8748 cat >> confdefs.h <<\EOF
8749 #define HAVE_PR_SIGACTION64_T 1
8750 EOF
8751
8752 fi
8753 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8754
8755 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
8756 echo "configure:8757: checking for pr_siginfo64_t in sys/procfs.h" >&5
8757 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8758 echo $ac_n "(cached) $ac_c" 1>&6
8759 else
8760 cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763
8764 #define _SYSCALL32
8765 #include <sys/procfs.h>
8766 int main() {
8767 pr_siginfo64_t avar
8768 ; return 0; }
8769 EOF
8770 if { (eval echo configure:8771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8771 rm -rf conftest*
8772 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8773 else
8774 echo "configure: failed program was:" >&5
8775 cat conftest.$ac_ext >&5
8776 rm -rf conftest*
8777 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8778
8779 fi
8780 rm -f conftest*
8781 fi
8782
8783 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8784 cat >> confdefs.h <<\EOF
8785 #define HAVE_PR_SIGINFO64_T 1
8786 EOF
8787
8788 fi
8789 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8790
8791
8792
8793
8794
8795 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8796 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
8797 echo "configure:8798: checking whether prfpregset_t type is broken" >&5
8798 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
8799 echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801 if test "$cross_compiling" = yes; then
8802 gdb_cv_prfpregset_t_broken=yes
8803 else
8804 cat > conftest.$ac_ext <<EOF
8805 #line 8806 "configure"
8806 #include "confdefs.h"
8807 #include <sys/procfs.h>
8808 int main ()
8809 {
8810 if (sizeof (prfpregset_t) == sizeof (void *))
8811 return 1;
8812 return 0;
8813 }
8814 EOF
8815 if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8816 then
8817 gdb_cv_prfpregset_t_broken=no
8818 else
8819 echo "configure: failed program was:" >&5
8820 cat conftest.$ac_ext >&5
8821 rm -fr conftest*
8822 gdb_cv_prfpregset_t_broken=yes
8823 fi
8824 rm -fr conftest*
8825 fi
8826
8827 fi
8828
8829 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8830 if test $gdb_cv_prfpregset_t_broken = yes; then
8831 cat >> confdefs.h <<\EOF
8832 #define PRFPREGSET_T_BROKEN 1
8833 EOF
8834
8835 fi
8836 fi
8837
8838
8839 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
8840 echo "configure:8841: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
8841 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
8842 echo $ac_n "(cached) $ac_c" 1>&6
8843 else
8844 cat > conftest.$ac_ext <<EOF
8845 #line 8846 "configure"
8846 #include "confdefs.h"
8847 #include <unistd.h>
8848 #include <sys/types.h>
8849 #include <sys/procfs.h>
8850
8851 int main() {
8852
8853 int dummy;;
8854 dummy = ioctl(0, PIOCSET, &dummy);
8855
8856 ; return 0; }
8857 EOF
8858 if { (eval echo configure:8859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8859 rm -rf conftest*
8860 gdb_cv_have_procfs_piocset=yes
8861 else
8862 echo "configure: failed program was:" >&5
8863 cat conftest.$ac_ext >&5
8864 rm -rf conftest*
8865 gdb_cv_have_procfs_piocset=no
8866 fi
8867 rm -f conftest*
8868 fi
8869
8870 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8871 if test $gdb_cv_have_procfs_piocset = yes; then
8872 cat >> confdefs.h <<\EOF
8873 #define HAVE_PROCFS_PIOCSET 1
8874 EOF
8875
8876 fi
8877 fi
8878
8879 if test ${host} = ${target} ; then
8880
8881 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
8882 echo "configure:8883: checking for member l_addr in struct link_map" >&5
8883 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
8884 echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886 cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 #include <link.h>
8890 int main() {
8891 struct link_map lm; (void) lm.l_addr;
8892 ; return 0; }
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8895 rm -rf conftest*
8896 gdb_cv_have_struct_link_map_with_l_members=yes
8897 else
8898 echo "configure: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 rm -rf conftest*
8901 gdb_cv_have_struct_link_map_with_l_members=no
8902 fi
8903 rm -f conftest*
8904 fi
8905
8906 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8907 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8908 cat >> confdefs.h <<\EOF
8909 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
8910 EOF
8911
8912 fi
8913
8914
8915 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
8916 echo "configure:8917: checking for member lm_addr in struct link_map" >&5
8917 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8918 echo $ac_n "(cached) $ac_c" 1>&6
8919 else
8920 cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 #include <sys/types.h>
8924 #include <link.h>
8925 int main() {
8926 struct link_map lm; (void) lm.lm_addr;
8927 ; return 0; }
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8930 rm -rf conftest*
8931 gdb_cv_have_struct_link_map_with_lm_members=yes
8932 else
8933 echo "configure: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8935 rm -rf conftest*
8936 gdb_cv_have_struct_link_map_with_lm_members=no
8937 fi
8938 rm -f conftest*
8939 fi
8940
8941 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8942 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8943 cat >> confdefs.h <<\EOF
8944 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8945 EOF
8946
8947 fi
8948
8949
8950 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
8951 echo "configure:8952: checking for member som_addr in struct so_map" >&5
8952 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
8953 echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955 cat > conftest.$ac_ext <<EOF
8956 #line 8957 "configure"
8957 #include "confdefs.h"
8958 #include <sys/types.h>
8959 #ifdef HAVE_NLIST_H
8960 #include <nlist.h>
8961 #endif
8962 #include <link.h>
8963 int main() {
8964 struct so_map lm; (void) lm.som_addr;
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8968 rm -rf conftest*
8969 gdb_cv_have_struct_so_map_with_som_members=yes
8970 else
8971 echo "configure: failed program was:" >&5
8972 cat conftest.$ac_ext >&5
8973 rm -rf conftest*
8974 gdb_cv_have_struct_so_map_with_som_members=no
8975 fi
8976 rm -f conftest*
8977 fi
8978
8979 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8980 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8981 cat >> confdefs.h <<\EOF
8982 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8983 EOF
8984
8985 fi
8986
8987
8988 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
8989 echo "configure:8990: checking for struct link_map32 in sys/link.h" >&5
8990 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8991 echo $ac_n "(cached) $ac_c" 1>&6
8992 else
8993 cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 #define _SYSCALL32
8997 #include <sys/link.h>
8998 int main() {
8999 struct link_map32 l;
9000 ; return 0; }
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9003 rm -rf conftest*
9004 gdb_cv_have_struct_link_map32=yes
9005 else
9006 echo "configure: failed program was:" >&5
9007 cat conftest.$ac_ext >&5
9008 rm -rf conftest*
9009 gdb_cv_have_struct_link_map32=no
9010 fi
9011 rm -f conftest*
9012 fi
9013
9014 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
9015 if test $gdb_cv_have_struct_link_map32 = yes; then
9016 cat >> confdefs.h <<\EOF
9017 #define HAVE_STRUCT_LINK_MAP32 1
9018 EOF
9019
9020 cat >> confdefs.h <<\EOF
9021 #define _SYSCALL32 1
9022 EOF
9023
9024 fi
9025 fi
9026
9027
9028 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
9029 echo "configure:9030: checking for long long support in compiler" >&5
9030 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
9031 echo $ac_n "(cached) $ac_c" 1>&6
9032 else
9033 cat > conftest.$ac_ext <<EOF
9034 #line 9035 "configure"
9035 #include "confdefs.h"
9036
9037 int main() {
9038
9039 extern long long foo;
9040 switch (foo & 2) { case 0: return 1; }
9041
9042 ; return 0; }
9043 EOF
9044 if { (eval echo configure:9045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9045 rm -rf conftest*
9046 gdb_cv_c_long_long=yes
9047 else
9048 echo "configure: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9050 rm -rf conftest*
9051 gdb_cv_c_long_long=no
9052 fi
9053 rm -f conftest*
9054 fi
9055
9056 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
9057 if test $gdb_cv_c_long_long = yes; then
9058 cat >> confdefs.h <<\EOF
9059 #define CC_HAS_LONG_LONG 1
9060 EOF
9061
9062 fi
9063
9064
9065 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
9066 echo "configure:9067: checking for long long support in printf" >&5
9067 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
9068 echo $ac_n "(cached) $ac_c" 1>&6
9069 else
9070 if test "$cross_compiling" = yes; then
9071 gdb_cv_printf_has_long_long=no
9072 else
9073 cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9076
9077 int main () {
9078 char buf[32];
9079 long long l = 0;
9080 l = (l << 16) + 0x0123;
9081 l = (l << 16) + 0x4567;
9082 l = (l << 16) + 0x89ab;
9083 l = (l << 16) + 0xcdef;
9084 sprintf (buf, "0x%016llx", l);
9085 return (strcmp ("0x0123456789abcdef", buf));
9086 }
9087 EOF
9088 if { (eval echo configure:9089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9089 then
9090 gdb_cv_printf_has_long_long=yes
9091 else
9092 echo "configure: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094 rm -fr conftest*
9095 gdb_cv_printf_has_long_long=no
9096 fi
9097 rm -fr conftest*
9098 fi
9099
9100 fi
9101
9102 if test $gdb_cv_printf_has_long_long = yes; then
9103 cat >> confdefs.h <<\EOF
9104 #define PRINTF_HAS_LONG_LONG 1
9105 EOF
9106
9107 fi
9108 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
9109
9110
9111 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
9112 echo "configure:9113: checking for long double support in compiler" >&5
9113 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
9114 echo $ac_n "(cached) $ac_c" 1>&6
9115 else
9116 cat > conftest.$ac_ext <<EOF
9117 #line 9118 "configure"
9118 #include "confdefs.h"
9119
9120 int main() {
9121 long double foo;
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9125 rm -rf conftest*
9126 ac_cv_c_long_double=yes
9127 else
9128 echo "configure: failed program was:" >&5
9129 cat conftest.$ac_ext >&5
9130 rm -rf conftest*
9131 ac_cv_c_long_double=no
9132 fi
9133 rm -f conftest*
9134 fi
9135
9136 echo "$ac_t""$ac_cv_c_long_double" 1>&6
9137 if test $ac_cv_c_long_double = yes; then
9138 cat >> confdefs.h <<\EOF
9139 #define HAVE_LONG_DOUBLE 1
9140 EOF
9141
9142 fi
9143
9144
9145 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
9146 echo "configure:9147: checking for long double support in printf" >&5
9147 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
9148 echo $ac_n "(cached) $ac_c" 1>&6
9149 else
9150 if test "$cross_compiling" = yes; then
9151 gdb_cv_printf_has_long_double=no
9152 else
9153 cat > conftest.$ac_ext <<EOF
9154 #line 9155 "configure"
9155 #include "confdefs.h"
9156
9157 int main () {
9158 char buf[16];
9159 long double f = 3.141592653;
9160 sprintf (buf, "%Lg", f);
9161 return (strncmp ("3.14159", buf, 7));
9162 }
9163 EOF
9164 if { (eval echo configure:9165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9165 then
9166 gdb_cv_printf_has_long_double=yes
9167 else
9168 echo "configure: failed program was:" >&5
9169 cat conftest.$ac_ext >&5
9170 rm -fr conftest*
9171 gdb_cv_printf_has_long_double=no
9172 fi
9173 rm -fr conftest*
9174 fi
9175
9176 fi
9177
9178 if test $gdb_cv_printf_has_long_double = yes; then
9179 cat >> confdefs.h <<\EOF
9180 #define PRINTF_HAS_LONG_DOUBLE 1
9181 EOF
9182
9183 fi
9184 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
9185
9186
9187 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
9188 echo "configure:9189: checking for long double support in scanf" >&5
9189 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
9190 echo $ac_n "(cached) $ac_c" 1>&6
9191 else
9192 if test "$cross_compiling" = yes; then
9193 gdb_cv_scanf_has_long_double=no
9194 else
9195 cat > conftest.$ac_ext <<EOF
9196 #line 9197 "configure"
9197 #include "confdefs.h"
9198
9199 int main () {
9200 char *buf = "3.141592653";
9201 long double f = 0;
9202 sscanf (buf, "%Lg", &f);
9203 return !(f > 3.14159 && f < 3.14160);
9204 }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9207 then
9208 gdb_cv_scanf_has_long_double=yes
9209 else
9210 echo "configure: failed program was:" >&5
9211 cat conftest.$ac_ext >&5
9212 rm -fr conftest*
9213 gdb_cv_scanf_has_long_double=no
9214 fi
9215 rm -fr conftest*
9216 fi
9217
9218 fi
9219
9220 if test $gdb_cv_scanf_has_long_double = yes; then
9221 cat >> confdefs.h <<\EOF
9222 #define SCANF_HAS_LONG_DOUBLE 1
9223 EOF
9224
9225 fi
9226 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
9227
9228 case ${host_os} in
9229 aix*)
9230 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
9231 echo "configure:9232: checking for -bbigtoc option" >&5
9232 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9233 echo $ac_n "(cached) $ac_c" 1>&6
9234 else
9235
9236 SAVE_LDFLAGS=$LDFLAGS
9237
9238 case $GCC in
9239 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9240 *) gdb_cv_bigtoc=-bbigtoc ;;
9241 esac
9242
9243 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9244 cat > conftest.$ac_ext <<EOF
9245 #line 9246 "configure"
9246 #include "confdefs.h"
9247
9248 int main() {
9249 int i;
9250 ; return 0; }
9251 EOF
9252 if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9253 :
9254 else
9255 echo "configure: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 rm -rf conftest*
9258 gdb_cv_bigtoc=
9259 fi
9260 rm -f conftest*
9261 LDFLAGS="${SAVE_LDFLAGS}"
9262
9263 fi
9264
9265 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9266 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9267 ;;
9268 esac
9269
9270
9271
9272 if test ${build} = ${host} -a ${host} = ${target} ; then
9273 case ${host_os} in
9274 hpux*)
9275 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
9276 echo "configure:9277: checking for HPUX/OSF thread support" >&5
9277 if test -f /usr/include/dce/cma_config.h ; then
9278 if test "$GCC" = "yes" ; then
9279 echo "$ac_t""yes" 1>&6
9280 cat >> confdefs.h <<\EOF
9281 #define HAVE_HPUX_THREAD_SUPPORT 1
9282 EOF
9283
9284 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
9285 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9286 else
9287 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9288 fi
9289 else
9290 echo "$ac_t""no" 1>&6
9291 fi
9292 ;;
9293 solaris*)
9294 # See if thread_db library is around for Solaris thread debugging.
9295 # Note that we must explicitly test for version 1 of the library
9296 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9297 # the same API.
9298 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
9299 echo "configure:9300: checking for Solaris thread debugging library" >&5
9300 if test -f /usr/lib/libthread_db.so.1 ; then
9301 echo "$ac_t""yes" 1>&6
9302 cat >> confdefs.h <<\EOF
9303 #define HAVE_THREAD_DB_LIB 1
9304 EOF
9305
9306 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
9307 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9308 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9309 echo "configure:9310: checking for dlopen in -ldl" >&5
9310 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9312 echo $ac_n "(cached) $ac_c" 1>&6
9313 else
9314 ac_save_LIBS="$LIBS"
9315 LIBS="-ldl $LIBS"
9316 cat > conftest.$ac_ext <<EOF
9317 #line 9318 "configure"
9318 #include "confdefs.h"
9319 /* Override any gcc2 internal prototype to avoid an error. */
9320 /* We use char because int might match the return type of a gcc2
9321 builtin and then its argument prototype would still apply. */
9322 char dlopen();
9323
9324 int main() {
9325 dlopen()
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9329 rm -rf conftest*
9330 eval "ac_cv_lib_$ac_lib_var=yes"
9331 else
9332 echo "configure: failed program was:" >&5
9333 cat conftest.$ac_ext >&5
9334 rm -rf conftest*
9335 eval "ac_cv_lib_$ac_lib_var=no"
9336 fi
9337 rm -f conftest*
9338 LIBS="$ac_save_LIBS"
9339
9340 fi
9341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9342 echo "$ac_t""yes" 1>&6
9343 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345 cat >> confdefs.h <<EOF
9346 #define $ac_tr_lib 1
9347 EOF
9348
9349 LIBS="-ldl $LIBS"
9350
9351 else
9352 echo "$ac_t""no" 1>&6
9353 fi
9354
9355 if test "$GCC" = "yes" ; then
9356 # The GNU linker requires the -export-dynamic option to make
9357 # all symbols visible in the dynamic symbol table.
9358 hold_ldflags=$LDFLAGS
9359 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
9360 echo "configure:9361: checking for the ld -export-dynamic flag" >&5
9361 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9362 cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365
9366 int main() {
9367 int i;
9368 ; return 0; }
9369 EOF
9370 if { (eval echo configure:9371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9371 rm -rf conftest*
9372 found=yes
9373 else
9374 echo "configure: failed program was:" >&5
9375 cat conftest.$ac_ext >&5
9376 rm -rf conftest*
9377 found=no
9378 fi
9379 rm -f conftest*
9380 LDFLAGS=$hold_ldflags
9381 echo "$ac_t""$found" 1>&6
9382 if test $found = yes; then
9383 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9384 fi
9385 fi
9386 # Sun randomly tweaked the prototypes in <proc_service.h>
9387 # at one point.
9388 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9389 echo "configure:9390: checking if <proc_service.h> is old" >&5
9390 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9391 echo $ac_n "(cached) $ac_c" 1>&6
9392 else
9393
9394 cat > conftest.$ac_ext <<EOF
9395 #line 9396 "configure"
9396 #include "confdefs.h"
9397
9398 #include <proc_service.h>
9399 ps_err_e ps_pdwrite
9400 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9401
9402 int main() {
9403
9404 ; return 0; }
9405 EOF
9406 if { (eval echo configure:9407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9407 rm -rf conftest*
9408 gdb_cv_proc_service_is_old=no
9409 else
9410 echo "configure: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9412 rm -rf conftest*
9413 gdb_cv_proc_service_is_old=yes
9414 fi
9415 rm -f conftest*
9416
9417 fi
9418
9419 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9420 if test $gdb_cv_proc_service_is_old = yes; then
9421 cat >> confdefs.h <<\EOF
9422 #define PROC_SERVICE_IS_OLD 1
9423 EOF
9424
9425 fi
9426 else
9427 echo "$ac_t""no" 1>&6
9428 fi
9429 ;;
9430 aix*)
9431 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9432 echo "configure:9433: checking for AiX thread debugging library" >&5
9433 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9434 echo $ac_n "(cached) $ac_c" 1>&6
9435 else
9436 cat > conftest.$ac_ext <<EOF
9437 #line 9438 "configure"
9438 #include "confdefs.h"
9439 #include <sys/pthdebug.h>
9440 int main() {
9441 #ifndef PTHDB_VERSION_3
9442 #error
9443 #endif
9444 ; return 0; }
9445 EOF
9446 if { (eval echo configure:9447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9447 rm -rf conftest*
9448 gdb_cv_have_aix_thread_debug=yes
9449 else
9450 echo "configure: failed program was:" >&5
9451 cat conftest.$ac_ext >&5
9452 rm -rf conftest*
9453 gdb_cv_have_aix_thread_debug=no
9454 fi
9455 rm -f conftest*
9456 fi
9457
9458 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9459 if test $gdb_cv_have_aix_thread_debug = yes; then
9460 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9461 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
9462 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9463 fi
9464 ;;
9465 esac
9466
9467 fi
9468
9469 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9470 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9471 echo "configure:9472: checking whether <thread_db.h> has TD_NOTALLOC" >&5
9472 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9473 echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475 cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 #include <thread_db.h>
9479 int main() {
9480 int i = TD_NOTALLOC;
9481 ; return 0; }
9482 EOF
9483 if { (eval echo configure:9484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9484 rm -rf conftest*
9485 gdb_cv_thread_db_h_has_td_notalloc=yes
9486 else
9487 echo "configure: failed program was:" >&5
9488 cat conftest.$ac_ext >&5
9489 rm -rf conftest*
9490 gdb_cv_thread_db_h_has_td_notalloc=no
9491
9492 fi
9493 rm -f conftest*
9494
9495 fi
9496
9497 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9498 fi
9499 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9500 cat >> confdefs.h <<\EOF
9501 #define THREAD_DB_HAS_TD_NOTALLOC 1
9502 EOF
9503
9504 fi
9505
9506 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9507 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9508 echo "configure:9509: checking whether <sys/syscall.h> has __NR_tkill" >&5
9509 if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9510 echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512 cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 #include <sys/syscall.h>
9516 int main() {
9517 int i = __NR_tkill;
9518 ; return 0; }
9519 EOF
9520 if { (eval echo configure:9521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9521 rm -rf conftest*
9522 gdb_cv_sys_syscall_h_has_tkill=yes
9523 else
9524 echo "configure: failed program was:" >&5
9525 cat conftest.$ac_ext >&5
9526 rm -rf conftest*
9527 gdb_cv_sys_syscall_h_has_tkill=no
9528
9529 fi
9530 rm -f conftest*
9531
9532 fi
9533
9534 echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9535 fi
9536 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9537 cat >> confdefs.h <<\EOF
9538 #define HAVE_TKILL_SYSCALL 1
9539 EOF
9540
9541 fi
9542
9543
9544 # Check whether --with-sysroot or --without-sysroot was given.
9545 if test "${with_sysroot+set}" = set; then
9546 withval="$with_sysroot"
9547
9548 case ${with_sysroot} in
9549 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
9550 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9551 esac
9552
9553 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9554
9555 if test "x$exec_prefix" = xNONE; then
9556 if test "x$prefix" = xNONE; then
9557 test_prefix=/usr/local
9558 else
9559 test_prefix=$prefix
9560 fi
9561 else
9562 test_prefix=$exec_prefix
9563 fi
9564 case ${TARGET_SYSTEM_ROOT} in
9565 "${test_prefix}"|"${test_prefix}/"*|\
9566 '${exec_prefix}'|'${exec_prefix}/'*)
9567 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9568 TARGET_SYSTEM_ROOT_DEFINE="$t"
9569 ;;
9570 esac
9571
9572 else
9573
9574 TARGET_SYSTEM_ROOT=
9575 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9576
9577 fi
9578
9579
9580
9581
9582 # NOTE: Don't add -Wall or -Wunused, they both include
9583 # -Wunused-parameter which reports bogus warnings.
9584 # NOTE: If you add to this list, remember to update
9585 # gdb/doc/gdbint.texinfo.
9586 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9587 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
9588 -Wunused-label -Wunused-function"
9589 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9590 # -Wunused-function -Wunused-variable -Wunused-value
9591 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
9592 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9593 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9594 # -Woverloaded-virtual -Winline -Werror"
9595 # Check whether --enable-build-warnings or --disable-build-warnings was given.
9596 if test "${enable_build_warnings+set}" = set; then
9597 enableval="$enable_build_warnings"
9598 case "${enableval}" in
9599 yes) ;;
9600 no) build_warnings="-w";;
9601 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9602 build_warnings="${build_warnings} ${t}";;
9603 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9604 build_warnings="${t} ${build_warnings}";;
9605 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9606 esac
9607 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9608 echo "Setting compiler warning flags = $build_warnings" 6>&1
9609 fi
9610 fi
9611 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9612 if test "${enable_gdb_build_warnings+set}" = set; then
9613 enableval="$enable_gdb_build_warnings"
9614 case "${enableval}" in
9615 yes) ;;
9616 no) build_warnings="-w";;
9617 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9618 build_warnings="${build_warnings} ${t}";;
9619 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9620 build_warnings="${t} ${build_warnings}";;
9621 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9622 esac
9623 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9624 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9625 fi
9626 fi
9627 WARN_CFLAGS=""
9628 WERROR_CFLAGS=""
9629 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9630 then
9631 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9632 echo "configure:9633: checking compiler warning flags" >&5
9633 # Separate out the -Werror flag as some files just cannot be
9634 # compiled with it enabled.
9635 for w in ${build_warnings}; do
9636 case $w in
9637 -Werr*) WERROR_CFLAGS=-Werror ;;
9638 *) # Check that GCC accepts it
9639 saved_CFLAGS="$CFLAGS"
9640 CFLAGS="$CFLAGS $w"
9641 cat > conftest.$ac_ext <<EOF
9642 #line 9643 "configure"
9643 #include "confdefs.h"
9644
9645 int main() {
9646
9647 ; return 0; }
9648 EOF
9649 if { (eval echo configure:9650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9650 rm -rf conftest*
9651 WARN_CFLAGS="${WARN_CFLAGS} $w"
9652 else
9653 echo "configure: failed program was:" >&5
9654 cat conftest.$ac_ext >&5
9655 fi
9656 rm -f conftest*
9657 CFLAGS="$saved_CFLAGS"
9658 esac
9659 done
9660 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
9661 fi
9662
9663
9664
9665 # In the Cygwin environment, we need some additional flags.
9666 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9667 echo "configure:9668: checking for cygwin" >&5
9668 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9669 echo $ac_n "(cached) $ac_c" 1>&6
9670 else
9671 cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674
9675 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
9676 lose
9677 #endif
9678 EOF
9679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9680 egrep "lose" >/dev/null 2>&1; then
9681 rm -rf conftest*
9682 gdb_cv_os_cygwin=yes
9683 else
9684 rm -rf conftest*
9685 gdb_cv_os_cygwin=no
9686 fi
9687 rm -f conftest*
9688
9689 fi
9690
9691 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9692
9693
9694 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9695 case ${host} in
9696 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9697 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
9698 esac
9699
9700
9701 # libreadline needs libuser32.a in a cygwin environment
9702 WIN32LIBS=
9703 if test x$gdb_cv_os_cygwin = xyes; then
9704 WIN32LIBS="-luser32"
9705 case "${target}" in
9706 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9707 ;;
9708 esac
9709 fi
9710
9711
9712 LIBGUI="../libgui/src/libgui.a"
9713 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9714
9715
9716
9717 WIN32LDAPP=
9718
9719
9720
9721 case "${host}" in
9722 *-*-cygwin*)
9723 configdir="win"
9724 ;;
9725 *)
9726 configdir="unix"
9727 ;;
9728 esac
9729
9730 GDBTKLIBS=
9731 if test "${enable_gdbtk}" = "yes"; then
9732
9733 # Gdbtk must have an absolute path to srcdir in order to run
9734 # properly when not installed.
9735 here=`pwd`
9736 cd ${srcdir}
9737 GDBTK_SRC_DIR=`pwd`
9738 cd $here
9739
9740
9741 #
9742 # Ok, lets find the tcl configuration
9743 # First, look for one uninstalled.
9744 # the alternative search directory is invoked by --with-tclconfig
9745 #
9746
9747 if test x"${no_tcl}" = x ; then
9748 # we reset no_tcl in case something fails here
9749 no_tcl=true
9750 # Check whether --with-tclconfig or --without-tclconfig was given.
9751 if test "${with_tclconfig+set}" = set; then
9752 withval="$with_tclconfig"
9753 with_tclconfig=${withval}
9754 fi
9755
9756 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9757 echo "configure:9758: checking for Tcl configuration" >&5
9758 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9759 echo $ac_n "(cached) $ac_c" 1>&6
9760 else
9761
9762
9763 # First check to see if --with-tclconfig was specified.
9764 if test x"${with_tclconfig}" != x ; then
9765 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9766 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9767 else
9768 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9769 fi
9770 fi
9771
9772 # then check for a private Tcl installation
9773 if test x"${ac_cv_c_tclconfig}" = x ; then
9774 for i in \
9775 ../tcl \
9776 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9777 ../../tcl \
9778 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9779 ../../../tcl \
9780 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9781 if test -f "$i/${configdir}/tclConfig.sh" ; then
9782 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9783 break
9784 fi
9785 done
9786 fi
9787 # check in a few common install locations
9788 if test x"${ac_cv_c_tclconfig}" = x ; then
9789 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9790 if test -f "$i/tclConfig.sh" ; then
9791 ac_cv_c_tclconfig=`(cd $i; pwd)`
9792 break
9793 fi
9794 done
9795 fi
9796 # check in a few other private locations
9797 if test x"${ac_cv_c_tclconfig}" = x ; then
9798 for i in \
9799 ${srcdir}/../tcl \
9800 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9801 if test -f "$i/${configdir}/tclConfig.sh" ; then
9802 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9803 break
9804 fi
9805 done
9806 fi
9807
9808 fi
9809
9810 if test x"${ac_cv_c_tclconfig}" = x ; then
9811 TCLCONFIG="# no Tcl configs found"
9812 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9813 else
9814 no_tcl=
9815 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9816 echo "$ac_t""found $TCLCONFIG" 1>&6
9817 fi
9818 fi
9819
9820 if test -z "${no_tcl}"; then
9821
9822 . $TCLCONFIG
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850 #
9851 # Ok, lets find the tk configuration
9852 # First, look for one uninstalled.
9853 # the alternative search directory is invoked by --with-tkconfig
9854 #
9855
9856 if test x"${no_tk}" = x ; then
9857 # we reset no_tk in case something fails here
9858 no_tk=true
9859 # Check whether --with-tkconfig or --without-tkconfig was given.
9860 if test "${with_tkconfig+set}" = set; then
9861 withval="$with_tkconfig"
9862 with_tkconfig=${withval}
9863 fi
9864
9865 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9866 echo "configure:9867: checking for Tk configuration" >&5
9867 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9868 echo $ac_n "(cached) $ac_c" 1>&6
9869 else
9870
9871
9872 # First check to see if --with-tkconfig was specified.
9873 if test x"${with_tkconfig}" != x ; then
9874 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9875 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9876 else
9877 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9878 fi
9879 fi
9880
9881 # then check for a private Tk library
9882 if test x"${ac_cv_c_tkconfig}" = x ; then
9883 for i in \
9884 ../tk \
9885 `ls -dr ../tk[4-9]* 2>/dev/null` \
9886 ../../tk \
9887 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9888 ../../../tk \
9889 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9890 if test -f "$i/${configdir}/tkConfig.sh" ; then
9891 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9892 break
9893 fi
9894 done
9895 fi
9896 # check in a few common install locations
9897 if test x"${ac_cv_c_tkconfig}" = x ; then
9898 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9899 if test -f "$i/tkConfig.sh" ; then
9900 ac_cv_c_tkconfig=`(cd $i; pwd)`
9901 break
9902 fi
9903 done
9904 fi
9905 # check in a few other private locations
9906 if test x"${ac_cv_c_tkconfig}" = x ; then
9907 for i in \
9908 ${srcdir}/../tk \
9909 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9910 if test -f "$i/${configdir}/tkConfig.sh" ; then
9911 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9912 break
9913 fi
9914 done
9915 fi
9916
9917 fi
9918
9919 if test x"${ac_cv_c_tkconfig}" = x ; then
9920 TKCONFIG="# no Tk configs found"
9921 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9922 else
9923 no_tk=
9924 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9925 echo "$ac_t""found $TKCONFIG" 1>&6
9926 fi
9927 fi
9928
9929
9930
9931 # now look for Tcl library stuff
9932
9933 tcldir="../tcl/${configdir}/"
9934
9935 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9936
9937 # If $no_tk is nonempty, then we can't do Tk, and there is no
9938 # point to doing Tcl.
9939 if test -z "${no_tk}"; then
9940
9941 if test -f "$TKCONFIG" ; then
9942 . $TKCONFIG
9943 fi
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958 #
9959 # Ok, lets find the tcl source trees so we can use the headers
9960 # Warning: transition of version 9 to 10 will break this algorithm
9961 # because 10 sorts before 9. We also look for just tcl. We have to
9962 # be careful that we don't match stuff like tclX by accident.
9963 # the alternative search directory is involked by --with-tclinclude
9964 #
9965
9966 no_tcl=true
9967 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9968 echo "configure:9969: checking for Tcl private headers. dir=${configdir}" >&5
9969 # Check whether --with-tclinclude or --without-tclinclude was given.
9970 if test "${with_tclinclude+set}" = set; then
9971 withval="$with_tclinclude"
9972 with_tclinclude=${withval}
9973 fi
9974
9975 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9976 echo $ac_n "(cached) $ac_c" 1>&6
9977 else
9978
9979 # first check to see if --with-tclinclude was specified
9980 if test x"${with_tclinclude}" != x ; then
9981 if test -f ${with_tclinclude}/tclInt.h ; then
9982 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9983 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9984 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9985 else
9986 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9987 fi
9988 fi
9989
9990 # next check if it came with Tcl configuration file
9991 if test x"${ac_cv_c_tclconfig}" = x ; then
9992 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9993 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9994 fi
9995 fi
9996
9997 # next check in private source directory
9998 #
9999 # since ls returns lowest version numbers first, reverse its output
10000 if test x"${ac_cv_c_tclh}" = x ; then
10001 for i in \
10002 ${srcdir}/../tcl \
10003 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
10004 ${srcdir}/../../tcl \
10005 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
10006 ${srcdir}/../../../tcl \
10007 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
10008 if test -f $i/generic/tclInt.h ; then
10009 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10010 break
10011 fi
10012 done
10013 fi
10014 # finally check in a few common install locations
10015 #
10016 # since ls returns lowest version numbers first, reverse its output
10017 if test x"${ac_cv_c_tclh}" = x ; then
10018 for i in \
10019 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
10020 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
10021 /usr/local/src/tcl \
10022 /usr/local/lib/tcl \
10023 ${prefix}/include ; do
10024 if test -f $i/generic/tclInt.h ; then
10025 ac_cv_c_tclh=`(cd $i/generic; pwd)`
10026 break
10027 fi
10028 done
10029 fi
10030 # see if one is installed
10031 if test x"${ac_cv_c_tclh}" = x ; then
10032 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
10033 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
10034 echo "configure:10035: checking for tclInt.h" >&5
10035 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10036 echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038 cat > conftest.$ac_ext <<EOF
10039 #line 10040 "configure"
10040 #include "confdefs.h"
10041 #include <tclInt.h>
10042 EOF
10043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10044 { (eval echo configure:10045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10046 if test -z "$ac_err"; then
10047 rm -rf conftest*
10048 eval "ac_cv_header_$ac_safe=yes"
10049 else
10050 echo "$ac_err" >&5
10051 echo "configure: failed program was:" >&5
10052 cat conftest.$ac_ext >&5
10053 rm -rf conftest*
10054 eval "ac_cv_header_$ac_safe=no"
10055 fi
10056 rm -f conftest*
10057 fi
10058 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10059 echo "$ac_t""yes" 1>&6
10060 ac_cv_c_tclh=installed
10061 else
10062 echo "$ac_t""no" 1>&6
10063 ac_cv_c_tclh=""
10064 fi
10065
10066 fi
10067
10068 fi
10069
10070 if test x"${ac_cv_c_tclh}" = x ; then
10071 TCLHDIR="# no Tcl private headers found"
10072 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
10073 fi
10074 if test x"${ac_cv_c_tclh}" != x ; then
10075 no_tcl=""
10076 if test x"${ac_cv_c_tclh}" = x"installed" ; then
10077 echo "$ac_t""is installed" 1>&6
10078 TCLHDIR=""
10079 else
10080 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
10081 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
10082 TCLHDIR="-I${ac_cv_c_tclh}"
10083 fi
10084 fi
10085
10086
10087
10088
10089 #
10090 # Ok, lets find the tk source trees so we can use the headers
10091 # If the directory (presumably symlink) named "tk" exists, use that one
10092 # in preference to any others. Same logic is used when choosing library
10093 # and again with Tcl. The search order is the best place to look first, then in
10094 # decreasing significance. The loop breaks if the trigger file is found.
10095 # Note the gross little conversion here of srcdir by cd'ing to the found
10096 # directory. This converts the path from a relative to an absolute, so
10097 # recursive cache variables for the path will work right. We check all
10098 # the possible paths in one loop rather than many seperate loops to speed
10099 # things up.
10100 # the alternative search directory is involked by --with-tkinclude
10101 #
10102 no_tk=true
10103 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
10104 echo "configure:10105: checking for Tk private headers" >&5
10105 # Check whether --with-tkinclude or --without-tkinclude was given.
10106 if test "${with_tkinclude+set}" = set; then
10107 withval="$with_tkinclude"
10108 with_tkinclude=${withval}
10109 fi
10110
10111 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
10112 echo $ac_n "(cached) $ac_c" 1>&6
10113 else
10114
10115 # first check to see if --with-tkinclude was specified
10116 if test x"${with_tkinclude}" != x ; then
10117 if test -f ${with_tkinclude}/tk.h ; then
10118 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
10119 elif test -f ${with_tkinclude}/generic/tk.h ; then
10120 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
10121 else
10122 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
10123 fi
10124 fi
10125
10126 # next check if it came with Tk configuration file
10127 if test x"${ac_cv_c_tkconfig}" = x ; then
10128 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
10129 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
10130 fi
10131 fi
10132
10133 # next check in private source directory
10134 #
10135 # since ls returns lowest version numbers first, reverse its output
10136 if test x"${ac_cv_c_tkh}" = x ; then
10137 for i in \
10138 ${srcdir}/../tk \
10139 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
10140 ${srcdir}/../../tk \
10141 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
10142 ${srcdir}/../../../tk \
10143 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
10144 if test -f $i/generic/tk.h ; then
10145 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10146 break
10147 fi
10148 done
10149 fi
10150 # finally check in a few common install locations
10151 #
10152 # since ls returns lowest version numbers first, reverse its output
10153 if test x"${ac_cv_c_tkh}" = x ; then
10154 for i in \
10155 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
10156 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
10157 /usr/local/src/tk \
10158 /usr/local/lib/tk \
10159 ${prefix}/include ; do
10160 if test -f $i/generic/tk.h ; then
10161 ac_cv_c_tkh=`(cd $i/generic; pwd)`
10162 break
10163 fi
10164 done
10165 fi
10166 # see if one is installed
10167 if test x"${ac_cv_c_tkh}" = x ; then
10168 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
10169 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
10170 echo "configure:10171: checking for tk.h" >&5
10171 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
10172 echo $ac_n "(cached) $ac_c" 1>&6
10173 else
10174 cat > conftest.$ac_ext <<EOF
10175 #line 10176 "configure"
10176 #include "confdefs.h"
10177 #include <tk.h>
10178 EOF
10179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10180 { (eval echo configure:10181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10182 if test -z "$ac_err"; then
10183 rm -rf conftest*
10184 eval "ac_cv_header_$ac_safe=yes"
10185 else
10186 echo "$ac_err" >&5
10187 echo "configure: failed program was:" >&5
10188 cat conftest.$ac_ext >&5
10189 rm -rf conftest*
10190 eval "ac_cv_header_$ac_safe=no"
10191 fi
10192 rm -f conftest*
10193 fi
10194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10195 echo "$ac_t""yes" 1>&6
10196 ac_cv_c_tkh=installed
10197 else
10198 echo "$ac_t""no" 1>&6
10199 ac_cv_c_tkh=""
10200 fi
10201
10202 fi
10203
10204 fi
10205
10206 if test x"${ac_cv_c_tkh}" != x ; then
10207 no_tk=""
10208 if test x"${ac_cv_c_tkh}" = x"installed" ; then
10209 echo "$ac_t""is installed" 1>&6
10210 TKHDIR=""
10211 else
10212 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
10213 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
10214 TKHDIR="-I${ac_cv_c_tkh}"
10215 fi
10216 else
10217 TKHDIR="# no Tk directory found"
10218 echo "configure: warning: Can't find Tk private headers" 1>&2
10219 no_tk=true
10220 fi
10221
10222
10223
10224
10225 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
10226 echo "configure:10227: checking for Itcl private headers. srcdir=${srcdir}" >&5
10227 if test x"${ac_cv_c_itclh}" = x ; then
10228 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
10229 if test -f $i/generic/itcl.h ; then
10230 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10231 break
10232 fi
10233 done
10234 fi
10235 if test x"${ac_cv_c_itclh}" = x ; then
10236 ITCLHDIR="# no Itcl private headers found"
10237 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10238 fi
10239 if test x"${ac_cv_c_itclh}" != x ; then
10240 ITCLHDIR="-I${ac_cv_c_itclh}"
10241 fi
10242 # should always be here
10243 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
10244
10245 #AC_SUBST(ITCLLIB)
10246
10247
10248 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
10249 echo "configure:10250: checking for Itk private headers. srcdir=${srcdir}" >&5
10250 if test x"${ac_cv_c_itkh}" = x ; then
10251 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10252 if test -f $i/generic/itk.h ; then
10253 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10254 break
10255 fi
10256 done
10257 fi
10258 if test x"${ac_cv_c_itkh}" = x ; then
10259 ITKHDIR="# no Itk private headers found"
10260 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10261 fi
10262 if test x"${ac_cv_c_itkh}" != x ; then
10263 ITKHDIR="-I${ac_cv_c_itkh}"
10264 fi
10265 # should always be here
10266 # ITKLIB="../itcl/itk/unix/libitk.a"
10267
10268 #AC_SUBST(ITKLIB)
10269
10270
10271
10272 # now look for Tk library stuff
10273
10274 tkdir="../tk/${configdir}/"
10275
10276 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10277
10278 # now look for Itcl library stuff
10279
10280
10281 #
10282 # Ok, lets find the itcl configuration
10283 # First, look for one uninstalled.
10284 # the alternative search directory is invoked by --with-itclconfig
10285 #
10286
10287 if test x"${no_itcl}" = x ; then
10288 # we reset no_itcl in case something fails here
10289 no_itcl=true
10290 # Check whether --with-itclconfig or --without-itclconfig was given.
10291 if test "${with_itclconfig+set}" = set; then
10292 withval="$with_itclconfig"
10293 with_itclconfig=${withval}
10294 fi
10295
10296 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
10297 echo "configure:10298: checking for Itcl configuration" >&5
10298 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10299 echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301
10302
10303 # First check to see if --with-itclconfig was specified.
10304 if test x"${with_itclconfig}" != x ; then
10305 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10306 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10307 else
10308 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10309 fi
10310 fi
10311
10312 # then check for a private Itcl library
10313 if test x"${ac_cv_c_itclconfig}" = x ; then
10314 for i in \
10315 ../itcl/itcl \
10316 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10317 ../../itcl \
10318 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10319 ../../../itcl \
10320 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10321 if test -f "$i/itclConfig.sh" ; then
10322 ac_cv_c_itclconfig=`(cd $i; pwd)`
10323 break
10324 fi
10325 done
10326 fi
10327 # check in a few common install locations
10328 if test x"${ac_cv_c_itclconfig}" = x ; then
10329 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10330 if test -f "$i/itclConfig.sh" ; then
10331 ac_cv_c_itclconfig=`(cd $i; pwd)`
10332 break
10333 fi
10334 done
10335 fi
10336 # check in a few other private locations
10337 if test x"${ac_cv_c_itclconfig}" = x ; then
10338 for i in \
10339 ${srcdir}/../itcl/itcl \
10340 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10341 if test -f "$i/itclConfig.sh" ; then
10342 ac_cv_c_itclconfig=`(cd $i; pwd)`
10343 break
10344 fi
10345 done
10346 fi
10347
10348 fi
10349
10350 if test x"${ac_cv_c_itclconfig}" = x ; then
10351 ITCLCONFIG="# no Itcl configs found"
10352 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10353 else
10354 no_itcl=
10355 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10356 echo "$ac_t""found $ITCLCONFIG" 1>&6
10357 fi
10358 fi
10359
10360 if test -z "${no_itcl}"; then
10361
10362 if test -f "$ITCLCONFIG" ; then
10363 . $ITCLCONFIG
10364 fi
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
10378 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
10379 fi
10380
10381
10382 # now look for Itk library stuff
10383
10384 #
10385 # Ok, lets find the itk configuration
10386 # First, look for one uninstalled.
10387 # the alternative search directory is invoked by --with-itkconfig
10388 #
10389
10390 if test x"${no_itk}" = x ; then
10391 # we reset no_itk in case something fails here
10392 no_itk=true
10393 # Check whether --with-itkconfig or --without-itkconfig was given.
10394 if test "${with_itkconfig+set}" = set; then
10395 withval="$with_itkconfig"
10396 with_itkconfig=${withval}
10397 fi
10398
10399 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
10400 echo "configure:10401: checking for Itk configuration" >&5
10401 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10402 echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404
10405
10406 # First check to see if --with-itkconfig was specified.
10407 if test x"${with_itkconfig}" != x ; then
10408 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10409 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10410 else
10411 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10412 fi
10413 fi
10414
10415 # then check for a private Itk library
10416 if test x"${ac_cv_c_itkconfig}" = x ; then
10417 for i in \
10418 ../itcl/itk \
10419 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10420 ../../itk \
10421 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10422 ../../../itk \
10423 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10424 if test -f "$i/itkConfig.sh" ; then
10425 ac_cv_c_itkconfig=`(cd $i; pwd)`
10426 break
10427 fi
10428 done
10429 fi
10430 # check in a few common install locations
10431 if test x"${ac_cv_c_itkconfig}" = x ; then
10432 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10433 if test -f "$i/itkConfig.sh" ; then
10434 ac_cv_c_itkconfig=`(cd $i; pwd)`
10435 break
10436 fi
10437 done
10438 fi
10439 # check in a few other private locations
10440 if test x"${ac_cv_c_itkconfig}" = x ; then
10441 for i in \
10442 ${srcdir}/../itcl/itk \
10443 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10444 if test -f "$i/itkConfig.sh" ; then
10445 ac_cv_c_itkconfig=`(cd $i; pwd)`
10446 break
10447 fi
10448 done
10449 fi
10450
10451 fi
10452
10453 if test x"${ac_cv_c_itkconfig}" = x ; then
10454 ITKCONFIG="# no Itk configs found"
10455 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10456 else
10457 no_itk=
10458 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10459 echo "$ac_t""found $ITKCONFIG" 1>&6
10460 fi
10461 fi
10462
10463
10464 if test -z "${no_itcl}"; then
10465
10466 if test -f "$ITKCONFIG" ; then
10467 . $ITKCONFIG
10468 fi
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481 ITKLIB="${ITK_BUILD_LIB_SPEC}"
10482 ITK_DEPS="${ITK_LIB_FULL_PATH}"
10483 fi
10484
10485 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
10486 # Tcl/Tk 8.1 require -fwritable strings. I don't
10487 # know whether 8.2 will or not, but I bet it will.
10488 # I don't have to worry about 7.x since we don't support it.
10489 GDBTK_CFLAGS=""
10490 if test "$GCC" = "yes"; then
10491 if test "$TCL_VERSION" != "8.0" ; then
10492 GDBTK_CFLAGS="-fwritable-strings"
10493 fi
10494 fi
10495
10496 # Include some libraries that Tcl and Tk want.
10497 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
10498 # Yes, the ordering seems wrong here. But it isn't.
10499 # TK_LIBS is the list of libraries that need to be linked
10500 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10501 # were in LIBS then any link tests after this point would
10502 # try to include things like `$(LIBGUI)', which wouldn't work.
10503 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
10504
10505 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10506 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10507 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10508 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10509 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10510 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10511 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
10512
10513 if test x$gdb_cv_os_cygwin = xyes; then
10514 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10515 WIN32LDAPP="-Wl,--subsystem,console"
10516 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10517 fi
10518 fi
10519 fi
10520
10521 configdirs="${configdirs} gdbtk"
10522 fi
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537 # If we find X, set shell vars x_includes and x_libraries to the
10538 # paths, otherwise set no_x=yes.
10539 # Uses ac_ vars as temps to allow command line to override cache and checks.
10540 # --without-x overrides everything else, but does not touch the cache.
10541 echo $ac_n "checking for X""... $ac_c" 1>&6
10542 echo "configure:10543: checking for X" >&5
10543
10544 # Check whether --with-x or --without-x was given.
10545 if test "${with_x+set}" = set; then
10546 withval="$with_x"
10547 :
10548 fi
10549
10550 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10551 if test "x$with_x" = xno; then
10552 # The user explicitly disabled X.
10553 have_x=disabled
10554 else
10555 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10556 # Both variables are already set.
10557 have_x=yes
10558 else
10559 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10560 echo $ac_n "(cached) $ac_c" 1>&6
10561 else
10562 # One or both of the vars are not set, and there is no cached value.
10563 ac_x_includes=NO ac_x_libraries=NO
10564 rm -fr conftestdir
10565 if mkdir conftestdir; then
10566 cd conftestdir
10567 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10568 cat > Imakefile <<'EOF'
10569 acfindx:
10570 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10571 EOF
10572 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10573 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10574 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10575 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10576 for ac_extension in a so sl; do
10577 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10578 test -f $ac_im_libdir/libX11.$ac_extension; then
10579 ac_im_usrlibdir=$ac_im_libdir; break
10580 fi
10581 done
10582 # Screen out bogus values from the imake configuration. They are
10583 # bogus both because they are the default anyway, and because
10584 # using them would break gcc on systems where it needs fixed includes.
10585 case "$ac_im_incroot" in
10586 /usr/include) ;;
10587 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10588 esac
10589 case "$ac_im_usrlibdir" in
10590 /usr/lib | /lib) ;;
10591 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10592 esac
10593 fi
10594 cd ..
10595 rm -fr conftestdir
10596 fi
10597
10598 if test "$ac_x_includes" = NO; then
10599 # Guess where to find include files, by looking for this one X11 .h file.
10600 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10601
10602 # First, try using that file with no special directory specified.
10603 cat > conftest.$ac_ext <<EOF
10604 #line 10605 "configure"
10605 #include "confdefs.h"
10606 #include <$x_direct_test_include>
10607 EOF
10608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10609 { (eval echo configure:10610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10611 if test -z "$ac_err"; then
10612 rm -rf conftest*
10613 # We can compile using X headers with no special include directory.
10614 ac_x_includes=
10615 else
10616 echo "$ac_err" >&5
10617 echo "configure: failed program was:" >&5
10618 cat conftest.$ac_ext >&5
10619 rm -rf conftest*
10620 # Look for the header file in a standard set of common directories.
10621 # Check X11 before X11Rn because it is often a symlink to the current release.
10622 for ac_dir in \
10623 /usr/X11/include \
10624 /usr/X11R6/include \
10625 /usr/X11R5/include \
10626 /usr/X11R4/include \
10627 \
10628 /usr/include/X11 \
10629 /usr/include/X11R6 \
10630 /usr/include/X11R5 \
10631 /usr/include/X11R4 \
10632 \
10633 /usr/local/X11/include \
10634 /usr/local/X11R6/include \
10635 /usr/local/X11R5/include \
10636 /usr/local/X11R4/include \
10637 \
10638 /usr/local/include/X11 \
10639 /usr/local/include/X11R6 \
10640 /usr/local/include/X11R5 \
10641 /usr/local/include/X11R4 \
10642 \
10643 /usr/X386/include \
10644 /usr/x386/include \
10645 /usr/XFree86/include/X11 \
10646 \
10647 /usr/include \
10648 /usr/local/include \
10649 /usr/unsupported/include \
10650 /usr/athena/include \
10651 /usr/local/x11r5/include \
10652 /usr/lpp/Xamples/include \
10653 \
10654 /usr/openwin/include \
10655 /usr/openwin/share/include \
10656 ; \
10657 do
10658 if test -r "$ac_dir/$x_direct_test_include"; then
10659 ac_x_includes=$ac_dir
10660 break
10661 fi
10662 done
10663 fi
10664 rm -f conftest*
10665 fi # $ac_x_includes = NO
10666
10667 if test "$ac_x_libraries" = NO; then
10668 # Check for the libraries.
10669
10670 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10671 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10672
10673 # See if we find them without any special options.
10674 # Don't add to $LIBS permanently.
10675 ac_save_LIBS="$LIBS"
10676 LIBS="-l$x_direct_test_library $LIBS"
10677 cat > conftest.$ac_ext <<EOF
10678 #line 10679 "configure"
10679 #include "confdefs.h"
10680
10681 int main() {
10682 ${x_direct_test_function}()
10683 ; return 0; }
10684 EOF
10685 if { (eval echo configure:10686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10686 rm -rf conftest*
10687 LIBS="$ac_save_LIBS"
10688 # We can link X programs with no special library path.
10689 ac_x_libraries=
10690 else
10691 echo "configure: failed program was:" >&5
10692 cat conftest.$ac_ext >&5
10693 rm -rf conftest*
10694 LIBS="$ac_save_LIBS"
10695 # First see if replacing the include by lib works.
10696 # Check X11 before X11Rn because it is often a symlink to the current release.
10697 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10698 /usr/X11/lib \
10699 /usr/X11R6/lib \
10700 /usr/X11R5/lib \
10701 /usr/X11R4/lib \
10702 \
10703 /usr/lib/X11 \
10704 /usr/lib/X11R6 \
10705 /usr/lib/X11R5 \
10706 /usr/lib/X11R4 \
10707 \
10708 /usr/local/X11/lib \
10709 /usr/local/X11R6/lib \
10710 /usr/local/X11R5/lib \
10711 /usr/local/X11R4/lib \
10712 \
10713 /usr/local/lib/X11 \
10714 /usr/local/lib/X11R6 \
10715 /usr/local/lib/X11R5 \
10716 /usr/local/lib/X11R4 \
10717 \
10718 /usr/X386/lib \
10719 /usr/x386/lib \
10720 /usr/XFree86/lib/X11 \
10721 \
10722 /usr/lib \
10723 /usr/local/lib \
10724 /usr/unsupported/lib \
10725 /usr/athena/lib \
10726 /usr/local/x11r5/lib \
10727 /usr/lpp/Xamples/lib \
10728 /lib/usr/lib/X11 \
10729 \
10730 /usr/openwin/lib \
10731 /usr/openwin/share/lib \
10732 ; \
10733 do
10734 for ac_extension in a so sl; do
10735 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10736 ac_x_libraries=$ac_dir
10737 break 2
10738 fi
10739 done
10740 done
10741 fi
10742 rm -f conftest*
10743 fi # $ac_x_libraries = NO
10744
10745 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10746 # Didn't find X anywhere. Cache the known absence of X.
10747 ac_cv_have_x="have_x=no"
10748 else
10749 # Record where we found X for the cache.
10750 ac_cv_have_x="have_x=yes \
10751 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10752 fi
10753 fi
10754 fi
10755 eval "$ac_cv_have_x"
10756 fi # $with_x != no
10757
10758 if test "$have_x" != yes; then
10759 echo "$ac_t""$have_x" 1>&6
10760 no_x=yes
10761 else
10762 # If each of the values was on the command line, it overrides each guess.
10763 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10764 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10765 # Update the cache value to reflect the command line values.
10766 ac_cv_have_x="have_x=yes \
10767 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10768 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10769 fi
10770
10771
10772 # Check whether we should enable the TUI, but only do so if we really
10773 # can.
10774 if test x"$enable_tui" = xyes; then
10775 if test -d $srcdir/tui; then
10776 if test "$ac_cv_search_waddstr" != no; then
10777 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
10778 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
10779 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
10780 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
10781 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
10782 CONFIG_ALL="${CONFIG_ALL} all-tui"
10783 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
10784 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
10785 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
10786 else
10787 echo "configure: warning: no enhanced curses library found; disabling TUI" 1>&2
10788 fi
10789 fi
10790 fi
10791
10792 # Unlike the sim directory, whether a simulator is linked is controlled by
10793 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10794 # This code just checks for a few cases where we'd like to ignore those
10795 # definitions, even when they're present in the '.mt' file. These cases
10796 # are when --disable-sim is specified, or if the simulator directory is
10797 # not part of the source tree.
10798 #
10799 # Check whether --enable-sim or --disable-sim was given.
10800 if test "${enable_sim+set}" = set; then
10801 enableval="$enable_sim"
10802 echo "enable_sim = $enable_sim";
10803 echo "enableval = ${enableval}";
10804 case "${enableval}" in
10805 yes) ignore_sim=false ;;
10806 no) ignore_sim=true ;;
10807 *) ignore_sim=false ;;
10808 esac
10809 else
10810 ignore_sim=false
10811 fi
10812
10813
10814 if test ! -d "${srcdir}/../sim"; then
10815 ignore_sim=true
10816 fi
10817
10818 if test "${ignore_sim}" = "true"; then
10819 IGNORE_SIM="SIM="
10820 IGNORE_SIM_OBS="SIM_OBS="
10821 else
10822 IGNORE_SIM=""
10823 IGNORE_SIM_OBS=""
10824 cat >> confdefs.h <<\EOF
10825 #define WITH_SIM 1
10826 EOF
10827
10828 fi
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843 # List of host floatformats.
10844 cat >> confdefs.h <<EOF
10845 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10846 EOF
10847
10848 cat >> confdefs.h <<EOF
10849 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10850 EOF
10851
10852 cat >> confdefs.h <<EOF
10853 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10854 EOF
10855
10856
10857 # target_subdir is used by the testsuite to find the target libraries.
10858 target_subdir=
10859 if test "${host}" != "${target}"; then
10860 target_subdir="${target_alias}/"
10861 fi
10862
10863
10864 frags=
10865 if test "${target}" = "${host}"; then
10866 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10867 if test ! -f ${host_makefile_frag}; then
10868 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10869 fi
10870 frags="$frags $host_makefile_frag"
10871 else
10872 host_makefile_frag=/dev/null
10873 fi
10874
10875 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10876 if test ! -f ${target_makefile_frag}; then
10877 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10878 fi
10879 frags="$frags $target_makefile_frag"
10880
10881
10882
10883
10884
10885 hostfile=`sed -n '
10886 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10887 ' ${host_makefile_frag}`
10888
10889 targetfile=`sed -n '
10890 s/DEPRECATED_TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10891 ' ${target_makefile_frag}`
10892
10893 if test "${target}" = "${host}"; then
10894 # We pick this up from the host configuration file (.mh) because we
10895 # do not have a native configuration Makefile fragment.
10896 nativefile=`sed -n '
10897 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10898 ' ${host_makefile_frag}`
10899 fi
10900
10901
10902 if test x"${gdb_osabi}" != x ; then
10903 cat >> confdefs.h <<EOF
10904 #define GDB_OSABI_DEFAULT $gdb_osabi
10905 EOF
10906
10907 fi
10908
10909 # Enable multi-ice-gdb-server.
10910 # Check whether --enable-multi-ice or --disable-multi-ice was given.
10911 if test "${enable_multi_ice+set}" = set; then
10912 enableval="$enable_multi_ice"
10913 case $enableval in
10914 yes | no)
10915 ;;
10916 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10917 esac
10918 fi
10919
10920 if test "x$enable_multi_ice" = xyes; then
10921 configdirs="$configdirs multi-ice"
10922 fi
10923
10924 # We only build gdbserver automatically if host and target are the same.
10925 if test "x$target" = "x$host"; then
10926 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
10927 echo "configure:10928: checking whether gdbserver is supported on this host" >&5
10928 if test "x$build_gdbserver" = xyes; then
10929 configdirs="$configdirs gdbserver"
10930 echo "$ac_t""yes" 1>&6
10931 else
10932 echo "$ac_t""no" 1>&6
10933 fi
10934 fi
10935
10936 subdirs="doc testsuite $configdirs"
10937
10938
10939 # If hostfile (XM_FILE) and/or targetfile (DEPRECATED_TM_FILE) and/or
10940 # nativefile (NAT_FILE) is not set in config/*/*.m[ht] files, we link
10941 # to an empty version.
10942
10943 files=
10944 links=
10945
10946 rm -f xm.h
10947 xm_h=""
10948 if test "${hostfile}" != ""; then
10949 xm_h=xm.h
10950 case "${hostfile}" in
10951 xm-*.h ) GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}" ;;
10952 * ) GDB_XM_FILE="${hostfile}"
10953 esac
10954 files="${files} ${GDB_XM_FILE}"
10955 links="${links} xm.h"
10956 cat >> confdefs.h <<EOF
10957 #define GDB_XM_FILE "${GDB_XM_FILE}"
10958 EOF
10959
10960 fi
10961
10962
10963 rm -f tm.h
10964 tm_h=""
10965 if test "${targetfile}" != ""; then
10966 tm_h=tm.h
10967 case "${targetfile}" in
10968 tm-*.h ) GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}" ;;
10969 * ) GDB_TM_FILE="${targetfile}"
10970 esac
10971 files="${files} ${GDB_TM_FILE}"
10972 links="${links} tm.h"
10973 cat >> confdefs.h <<EOF
10974 #define GDB_TM_FILE "${GDB_TM_FILE}"
10975 EOF
10976
10977 fi
10978
10979
10980 rm -f nm.h
10981 nm_h=""
10982 if test "${nativefile}" != ""; then
10983 nm_h=nm.h
10984 case "${nativefile}" in
10985 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
10986 * ) GDB_NM_FILE="${nativefile}"
10987 esac
10988 files="${files} ${GDB_NM_FILE}"
10989 links="${links} nm.h"
10990 cat >> confdefs.h <<EOF
10991 #define GDB_NM_FILE "${GDB_NM_FILE}"
10992 EOF
10993
10994 fi
10995
10996
10997
10998
10999 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
11000 echo "configure:11001: checking for Cygwin environment" >&5
11001 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
11002 echo $ac_n "(cached) $ac_c" 1>&6
11003 else
11004 cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007
11008 int main() {
11009
11010 #ifndef __CYGWIN__
11011 #define __CYGWIN__ __CYGWIN32__
11012 #endif
11013 return __CYGWIN__;
11014 ; return 0; }
11015 EOF
11016 if { (eval echo configure:11017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11017 rm -rf conftest*
11018 ac_cv_cygwin=yes
11019 else
11020 echo "configure: failed program was:" >&5
11021 cat conftest.$ac_ext >&5
11022 rm -rf conftest*
11023 ac_cv_cygwin=no
11024 fi
11025 rm -f conftest*
11026 rm -f conftest*
11027 fi
11028
11029 echo "$ac_t""$ac_cv_cygwin" 1>&6
11030 CYGWIN=
11031 test "$ac_cv_cygwin" = yes && CYGWIN=yes
11032 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
11033 echo "configure:11034: checking for mingw32 environment" >&5
11034 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
11035 echo $ac_n "(cached) $ac_c" 1>&6
11036 else
11037 cat > conftest.$ac_ext <<EOF
11038 #line 11039 "configure"
11039 #include "confdefs.h"
11040
11041 int main() {
11042 return __MINGW32__;
11043 ; return 0; }
11044 EOF
11045 if { (eval echo configure:11046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11046 rm -rf conftest*
11047 ac_cv_mingw32=yes
11048 else
11049 echo "configure: failed program was:" >&5
11050 cat conftest.$ac_ext >&5
11051 rm -rf conftest*
11052 ac_cv_mingw32=no
11053 fi
11054 rm -f conftest*
11055 rm -f conftest*
11056 fi
11057
11058 echo "$ac_t""$ac_cv_mingw32" 1>&6
11059 MINGW32=
11060 test "$ac_cv_mingw32" = yes && MINGW32=yes
11061
11062
11063 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
11064 echo "configure:11065: checking for executable suffix" >&5
11065 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
11066 echo $ac_n "(cached) $ac_c" 1>&6
11067 else
11068 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
11069 ac_cv_exeext=.exe
11070 else
11071 rm -f conftest*
11072 echo 'int main () { return 0; }' > conftest.$ac_ext
11073 ac_cv_exeext=
11074 if { (eval echo configure:11075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
11075 for file in conftest.*; do
11076 case $file in
11077 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
11078 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
11079 esac
11080 done
11081 else
11082 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
11083 fi
11084 rm -f conftest*
11085 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
11086 fi
11087 fi
11088
11089 EXEEXT=""
11090 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
11091 echo "$ac_t""${ac_cv_exeext}" 1>&6
11092 ac_exeext=$EXEEXT
11093
11094
11095
11096 cat >> confdefs.h <<\EOF
11097 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
11098 EOF
11099
11100
11101
11102
11103 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
11104 if test "${with_libiconv_prefix+set}" = set; then
11105 withval="$with_libiconv_prefix"
11106
11107 for dir in `echo "$withval" | tr : ' '`; do
11108 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
11109 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
11110 done
11111
11112 fi
11113
11114
11115 echo $ac_n "checking for iconv""... $ac_c" 1>&6
11116 echo "configure:11117: checking for iconv" >&5
11117 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
11118 echo $ac_n "(cached) $ac_c" 1>&6
11119 else
11120
11121 am_cv_func_iconv="no, consider installing GNU libiconv"
11122 am_cv_lib_iconv=no
11123 cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <stdlib.h>
11127 #include <iconv.h>
11128 int main() {
11129 iconv_t cd = iconv_open("","");
11130 iconv(cd,NULL,NULL,NULL,NULL);
11131 iconv_close(cd);
11132 ; return 0; }
11133 EOF
11134 if { (eval echo configure:11135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11135 rm -rf conftest*
11136 am_cv_func_iconv=yes
11137 else
11138 echo "configure: failed program was:" >&5
11139 cat conftest.$ac_ext >&5
11140 fi
11141 rm -f conftest*
11142 if test "$am_cv_func_iconv" != yes; then
11143 am_save_LIBS="$LIBS"
11144 LIBS="$LIBS -liconv"
11145 cat > conftest.$ac_ext <<EOF
11146 #line 11147 "configure"
11147 #include "confdefs.h"
11148 #include <stdlib.h>
11149 #include <iconv.h>
11150 int main() {
11151 iconv_t cd = iconv_open("","");
11152 iconv(cd,NULL,NULL,NULL,NULL);
11153 iconv_close(cd);
11154 ; return 0; }
11155 EOF
11156 if { (eval echo configure:11157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11157 rm -rf conftest*
11158 am_cv_lib_iconv=yes
11159 am_cv_func_iconv=yes
11160 else
11161 echo "configure: failed program was:" >&5
11162 cat conftest.$ac_ext >&5
11163 fi
11164 rm -f conftest*
11165 LIBS="$am_save_LIBS"
11166 fi
11167
11168 fi
11169
11170 echo "$ac_t""$am_cv_func_iconv" 1>&6
11171 if test "$am_cv_func_iconv" = yes; then
11172 cat >> confdefs.h <<\EOF
11173 #define HAVE_ICONV 1
11174 EOF
11175
11176 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
11177 echo "configure:11178: checking for iconv declaration" >&5
11178 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
11179 echo $ac_n "(cached) $ac_c" 1>&6
11180 else
11181
11182 cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185
11186 #include <stdlib.h>
11187 #include <iconv.h>
11188 extern
11189 #ifdef __cplusplus
11190 "C"
11191 #endif
11192 #if defined(__STDC__) || defined(__cplusplus)
11193 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
11194 #else
11195 size_t iconv();
11196 #endif
11197
11198 int main() {
11199
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11203 rm -rf conftest*
11204 am_cv_proto_iconv_arg1=""
11205 else
11206 echo "configure: failed program was:" >&5
11207 cat conftest.$ac_ext >&5
11208 rm -rf conftest*
11209 am_cv_proto_iconv_arg1="const"
11210 fi
11211 rm -f conftest*
11212 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);"
11213 fi
11214
11215 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11216 echo "$ac_t""${ac_t:-
11217 }$am_cv_proto_iconv" 1>&6
11218 cat >> confdefs.h <<EOF
11219 #define ICONV_CONST $am_cv_proto_iconv_arg1
11220 EOF
11221
11222 fi
11223 LIBICONV=
11224 if test "$am_cv_lib_iconv" = yes; then
11225 LIBICONV="-liconv"
11226 fi
11227
11228
11229
11230 trap '' 1 2 15
11231 cat > confcache <<\EOF
11232 # This file is a shell script that caches the results of configure
11233 # tests run on this system so they can be shared between configure
11234 # scripts and configure runs. It is not useful on other systems.
11235 # If it contains results you don't want to keep, you may remove or edit it.
11236 #
11237 # By default, configure uses ./config.cache as the cache file,
11238 # creating it if it does not exist already. You can give configure
11239 # the --cache-file=FILE option to use a different cache file; that is
11240 # what configure does when it calls configure scripts in
11241 # subdirectories, so they share the cache.
11242 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11243 # config.status only pays attention to the cache file if you give it the
11244 # --recheck option to rerun configure.
11245 #
11246 EOF
11247 # The following way of writing the cache mishandles newlines in values,
11248 # but we know of no workaround that is simple, portable, and efficient.
11249 # So, don't put newlines in cache variables' values.
11250 # Ultrix sh set writes to stderr and can't be redirected directly,
11251 # and sets the high bit in the cache file unless we assign to the vars.
11252 (set) 2>&1 |
11253 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11254 *ac_space=\ *)
11255 # `set' does not quote correctly, so add quotes (double-quote substitution
11256 # turns \\\\ into \\, and sed turns \\ into \).
11257 sed -n \
11258 -e "s/'/'\\\\''/g" \
11259 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11260 ;;
11261 *)
11262 # `set' quotes correctly as required by POSIX, so do not add quotes.
11263 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11264 ;;
11265 esac >> confcache
11266 if cmp -s $cache_file confcache; then
11267 :
11268 else
11269 if test -w $cache_file; then
11270 echo "updating cache $cache_file"
11271 cat confcache > $cache_file
11272 else
11273 echo "not updating unwritable cache $cache_file"
11274 fi
11275 fi
11276 rm -f confcache
11277
11278 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11279
11280 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11281 # Let make expand exec_prefix.
11282 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11283
11284 # Any assignment to VPATH causes Sun make to only execute
11285 # the first set of double-colon rules, so remove it if not needed.
11286 # If there is a colon in the path, we need to keep it.
11287 if test "x$srcdir" = x.; then
11288 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11289 fi
11290
11291 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11292
11293 DEFS=-DHAVE_CONFIG_H
11294
11295 # Without the "./", some shells look in PATH for config.status.
11296 : ${CONFIG_STATUS=./config.status}
11297
11298 echo creating $CONFIG_STATUS
11299 rm -f $CONFIG_STATUS
11300 cat > $CONFIG_STATUS <<EOF
11301 #! /bin/sh
11302 # Generated automatically by configure.
11303 # Run this file to recreate the current configuration.
11304 # This directory was configured as follows,
11305 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11306 #
11307 # $0 $ac_configure_args
11308 #
11309 # Compiler output produced by configure, useful for debugging
11310 # configure, is in ./config.log if it exists.
11311
11312 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11313 for ac_option
11314 do
11315 case "\$ac_option" in
11316 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11317 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11318 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11319 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11320 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11321 exit 0 ;;
11322 -help | --help | --hel | --he | --h)
11323 echo "\$ac_cs_usage"; exit 0 ;;
11324 *) echo "\$ac_cs_usage"; exit 1 ;;
11325 esac
11326 done
11327
11328 ac_given_srcdir=$srcdir
11329 ac_given_INSTALL="$INSTALL"
11330
11331 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11332 EOF
11333 cat >> $CONFIG_STATUS <<EOF
11334
11335 # Protect against being on the right side of a sed subst in config.status.
11336 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11337 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11338 $ac_vpsub
11339 $extrasub
11340 s%@SHELL@%$SHELL%g
11341 s%@CFLAGS@%$CFLAGS%g
11342 s%@CPPFLAGS@%$CPPFLAGS%g
11343 s%@CXXFLAGS@%$CXXFLAGS%g
11344 s%@FFLAGS@%$FFLAGS%g
11345 s%@DEFS@%$DEFS%g
11346 s%@LDFLAGS@%$LDFLAGS%g
11347 s%@LIBS@%$LIBS%g
11348 s%@exec_prefix@%$exec_prefix%g
11349 s%@prefix@%$prefix%g
11350 s%@program_transform_name@%$program_transform_name%g
11351 s%@bindir@%$bindir%g
11352 s%@sbindir@%$sbindir%g
11353 s%@libexecdir@%$libexecdir%g
11354 s%@datadir@%$datadir%g
11355 s%@sysconfdir@%$sysconfdir%g
11356 s%@sharedstatedir@%$sharedstatedir%g
11357 s%@localstatedir@%$localstatedir%g
11358 s%@libdir@%$libdir%g
11359 s%@includedir@%$includedir%g
11360 s%@oldincludedir@%$oldincludedir%g
11361 s%@infodir@%$infodir%g
11362 s%@mandir@%$mandir%g
11363 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11364 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11365 s%@MAINT@%$MAINT%g
11366 s%@CC@%$CC%g
11367 s%@CPP@%$CPP%g
11368 s%@host@%$host%g
11369 s%@host_alias@%$host_alias%g
11370 s%@host_cpu@%$host_cpu%g
11371 s%@host_vendor@%$host_vendor%g
11372 s%@host_os@%$host_os%g
11373 s%@target@%$target%g
11374 s%@target_alias@%$target_alias%g
11375 s%@target_cpu@%$target_cpu%g
11376 s%@target_vendor@%$target_vendor%g
11377 s%@target_os@%$target_os%g
11378 s%@build@%$build%g
11379 s%@build_alias@%$build_alias%g
11380 s%@build_cpu@%$build_cpu%g
11381 s%@build_vendor@%$build_vendor%g
11382 s%@build_os@%$build_os%g
11383 s%@RANLIB@%$RANLIB%g
11384 s%@SET_MAKE@%$SET_MAKE%g
11385 s%@ALLOCA@%$ALLOCA%g
11386 s%@USE_NLS@%$USE_NLS%g
11387 s%@MSGFMT@%$MSGFMT%g
11388 s%@GMSGFMT@%$GMSGFMT%g
11389 s%@XGETTEXT@%$XGETTEXT%g
11390 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11391 s%@CATALOGS@%$CATALOGS%g
11392 s%@CATOBJEXT@%$CATOBJEXT%g
11393 s%@DATADIRNAME@%$DATADIRNAME%g
11394 s%@GMOFILES@%$GMOFILES%g
11395 s%@INSTOBJEXT@%$INSTOBJEXT%g
11396 s%@INTLDEPS@%$INTLDEPS%g
11397 s%@INTLLIBS@%$INTLLIBS%g
11398 s%@INTLOBJS@%$INTLOBJS%g
11399 s%@POFILES@%$POFILES%g
11400 s%@POSUB@%$POSUB%g
11401 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11402 s%@GT_NO@%$GT_NO%g
11403 s%@GT_YES@%$GT_YES%g
11404 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11405 s%@l@%$l%g
11406 s%@localedir@%$localedir%g
11407 s%@PACKAGE@%$PACKAGE%g
11408 s%@subdirs@%$subdirs%g
11409 s%@AWK@%$AWK%g
11410 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11411 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11412 s%@INSTALL_DATA@%$INSTALL_DATA%g
11413 s%@LN_S@%$LN_S%g
11414 s%@YACC@%$YACC%g
11415 s%@AR@%$AR%g
11416 s%@DLLTOOL@%$DLLTOOL%g
11417 s%@WINDRES@%$WINDRES%g
11418 s%@MIG@%$MIG%g
11419 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
11420 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11421 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
11422 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
11423 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
11424 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
11425 s%@WIN32LIBS@%$WIN32LIBS%g
11426 s%@LIBGUI@%$LIBGUI%g
11427 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
11428 s%@WIN32LDAPP@%$WIN32LDAPP%g
11429 s%@TCL_VERSION@%$TCL_VERSION%g
11430 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11431 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11432 s%@TCL_CC@%$TCL_CC%g
11433 s%@TCL_DEFS@%$TCL_DEFS%g
11434 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11435 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11436 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11437 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11438 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11439 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11440 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
11441 s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
11442 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11443 s%@TCL_RANLIB@%$TCL_RANLIB%g
11444 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11445 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11446 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11447 s%@TK_VERSION@%$TK_VERSION%g
11448 s%@TK_DEFS@%$TK_DEFS%g
11449 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11450 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11451 s%@TK_XLIBSW@%$TK_XLIBSW%g
11452 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11453 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11454 s%@TCLHDIR@%$TCLHDIR%g
11455 s%@TKHDIR@%$TKHDIR%g
11456 s%@ITCLHDIR@%$ITCLHDIR%g
11457 s%@ITKHDIR@%$ITKHDIR%g
11458 s%@ITCL_VERSION@%$ITCL_VERSION%g
11459 s%@ITCL_DEFS@%$ITCL_DEFS%g
11460 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11461 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11462 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11463 s%@ITK_VERSION@%$ITK_VERSION%g
11464 s%@ITK_DEFS@%$ITK_DEFS%g
11465 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11466 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11467 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
11468 s%@X_CFLAGS@%$X_CFLAGS%g
11469 s%@X_LDFLAGS@%$X_LDFLAGS%g
11470 s%@X_LIBS@%$X_LIBS%g
11471 s%@TCL_DEPS@%$TCL_DEPS%g
11472 s%@TK_DEPS@%$TK_DEPS%g
11473 s%@ITCLLIB@%$ITCLLIB%g
11474 s%@ITCL_DEPS@%$ITCL_DEPS%g
11475 s%@ITKLIB@%$ITKLIB%g
11476 s%@ITK_DEPS@%$ITK_DEPS%g
11477 s%@GDBTKLIBS@%$GDBTKLIBS%g
11478 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
11479 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
11480 s%@IGNORE_SIM@%$IGNORE_SIM%g
11481 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
11482 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
11483 s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
11484 s%@CONFIG_OBS@%$CONFIG_OBS%g
11485 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11486 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
11487 s%@CONFIG_ALL@%$CONFIG_ALL%g
11488 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
11489 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11490 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
11491 s%@target_subdir@%$target_subdir%g
11492 /@host_makefile_frag@/r $host_makefile_frag
11493 s%@host_makefile_frag@%%g
11494 /@target_makefile_frag@/r $target_makefile_frag
11495 s%@target_makefile_frag@%%g
11496 s%@frags@%$frags%g
11497 s%@xm_h@%$xm_h%g
11498 s%@tm_h@%$tm_h%g
11499 s%@nm_h@%$nm_h%g
11500 s%@EXEEXT@%$EXEEXT%g
11501 s%@LIBICONV@%$LIBICONV%g
11502
11503 CEOF
11504 EOF
11505
11506 cat >> $CONFIG_STATUS <<\EOF
11507
11508 # Split the substitutions into bite-sized pieces for seds with
11509 # small command number limits, like on Digital OSF/1 and HP-UX.
11510 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11511 ac_file=1 # Number of current file.
11512 ac_beg=1 # First line for current file.
11513 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11514 ac_more_lines=:
11515 ac_sed_cmds=""
11516 while $ac_more_lines; do
11517 if test $ac_beg -gt 1; then
11518 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11519 else
11520 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11521 fi
11522 if test ! -s conftest.s$ac_file; then
11523 ac_more_lines=false
11524 rm -f conftest.s$ac_file
11525 else
11526 if test -z "$ac_sed_cmds"; then
11527 ac_sed_cmds="sed -f conftest.s$ac_file"
11528 else
11529 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11530 fi
11531 ac_file=`expr $ac_file + 1`
11532 ac_beg=$ac_end
11533 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11534 fi
11535 done
11536 if test -z "$ac_sed_cmds"; then
11537 ac_sed_cmds=cat
11538 fi
11539 EOF
11540
11541 cat >> $CONFIG_STATUS <<EOF
11542
11543 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
11544 EOF
11545 cat >> $CONFIG_STATUS <<\EOF
11546 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11547 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11548 case "$ac_file" in
11549 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11550 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11551 *) ac_file_in="${ac_file}.in" ;;
11552 esac
11553
11554 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11555
11556 # Remove last slash and all that follows it. Not all systems have dirname.
11557 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11558 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11559 # The file is in a subdirectory.
11560 test ! -d "$ac_dir" && mkdir "$ac_dir"
11561 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11562 # A "../" for each directory in $ac_dir_suffix.
11563 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11564 else
11565 ac_dir_suffix= ac_dots=
11566 fi
11567
11568 case "$ac_given_srcdir" in
11569 .) srcdir=.
11570 if test -z "$ac_dots"; then top_srcdir=.
11571 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11572 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11573 *) # Relative path.
11574 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11575 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11576 esac
11577
11578 case "$ac_given_INSTALL" in
11579 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11580 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11581 esac
11582
11583 echo creating "$ac_file"
11584 rm -f "$ac_file"
11585 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11586 case "$ac_file" in
11587 *Makefile*) ac_comsub="1i\\
11588 # $configure_input" ;;
11589 *) ac_comsub= ;;
11590 esac
11591
11592 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11593 sed -e "$ac_comsub
11594 s%@configure_input@%$configure_input%g
11595 s%@srcdir@%$srcdir%g
11596 s%@top_srcdir@%$top_srcdir%g
11597 s%@INSTALL@%$INSTALL%g
11598 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11599 fi; done
11600 rm -f conftest.s*
11601
11602 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11603 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11604 #
11605 # ac_d sets the value in "#define NAME VALUE" lines.
11606 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11607 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11608 ac_dC='\3'
11609 ac_dD='%g'
11610 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11611 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11612 ac_uB='\([ ]\)%\1#\2define\3'
11613 ac_uC=' '
11614 ac_uD='\4%g'
11615 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11616 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11617 ac_eB='$%\1#\2define\3'
11618 ac_eC=' '
11619 ac_eD='%g'
11620
11621 if test "${CONFIG_HEADERS+set}" != set; then
11622 EOF
11623 cat >> $CONFIG_STATUS <<EOF
11624 CONFIG_HEADERS="config.h:config.in"
11625 EOF
11626 cat >> $CONFIG_STATUS <<\EOF
11627 fi
11628 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11629 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11630 case "$ac_file" in
11631 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11632 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11633 *) ac_file_in="${ac_file}.in" ;;
11634 esac
11635
11636 echo creating $ac_file
11637
11638 rm -f conftest.frag conftest.in conftest.out
11639 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11640 cat $ac_file_inputs > conftest.in
11641
11642 EOF
11643
11644 # Transform confdefs.h into a sed script conftest.vals that substitutes
11645 # the proper values into config.h.in to produce config.h. And first:
11646 # Protect against being on the right side of a sed subst in config.status.
11647 # Protect against being in an unquoted here document in config.status.
11648 rm -f conftest.vals
11649 cat > conftest.hdr <<\EOF
11650 s/[\\&%]/\\&/g
11651 s%[\\$`]%\\&%g
11652 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11653 s%ac_d%ac_u%gp
11654 s%ac_u%ac_e%gp
11655 EOF
11656 sed -n -f conftest.hdr confdefs.h > conftest.vals
11657 rm -f conftest.hdr
11658
11659 # This sed command replaces #undef with comments. This is necessary, for
11660 # example, in the case of _POSIX_SOURCE, which is predefined and required
11661 # on some systems where configure will not decide to define it.
11662 cat >> conftest.vals <<\EOF
11663 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11664 EOF
11665
11666 # Break up conftest.vals because some shells have a limit on
11667 # the size of here documents, and old seds have small limits too.
11668
11669 rm -f conftest.tail
11670 while :
11671 do
11672 ac_lines=`grep -c . conftest.vals`
11673 # grep -c gives empty output for an empty file on some AIX systems.
11674 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11675 # Write a limited-size here document to conftest.frag.
11676 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11677 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11678 echo 'CEOF
11679 sed -f conftest.frag conftest.in > conftest.out
11680 rm -f conftest.in
11681 mv conftest.out conftest.in
11682 ' >> $CONFIG_STATUS
11683 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11684 rm -f conftest.vals
11685 mv conftest.tail conftest.vals
11686 done
11687 rm -f conftest.vals
11688
11689 cat >> $CONFIG_STATUS <<\EOF
11690 rm -f conftest.frag conftest.h
11691 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11692 cat conftest.in >> conftest.h
11693 rm -f conftest.in
11694 if cmp -s $ac_file conftest.h 2>/dev/null; then
11695 echo "$ac_file is unchanged"
11696 rm -f conftest.h
11697 else
11698 # Remove last slash and all that follows it. Not all systems have dirname.
11699 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11700 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11701 # The file is in a subdirectory.
11702 test ! -d "$ac_dir" && mkdir "$ac_dir"
11703 fi
11704 rm -f $ac_file
11705 mv conftest.h $ac_file
11706 fi
11707 fi; done
11708
11709 EOF
11710
11711 cat >> $CONFIG_STATUS <<EOF
11712 ac_sources="$files"
11713 ac_dests="$links"
11714 EOF
11715
11716 cat >> $CONFIG_STATUS <<\EOF
11717 srcdir=$ac_given_srcdir
11718 while test -n "$ac_sources"; do
11719 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11720 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11721
11722 echo "linking $srcdir/$ac_source to $ac_dest"
11723
11724 if test ! -r $srcdir/$ac_source; then
11725 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11726 fi
11727 rm -f $ac_dest
11728
11729 # Make relative symlinks.
11730 # Remove last slash and all that follows it. Not all systems have dirname.
11731 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11732 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11733 # The dest file is in a subdirectory.
11734 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11735 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11736 # A "../" for each directory in $ac_dest_dir_suffix.
11737 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11738 else
11739 ac_dest_dir_suffix= ac_dots=
11740 fi
11741
11742 case "$srcdir" in
11743 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11744 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11745 esac
11746
11747 # Make a symlink if possible; otherwise try a hard link.
11748 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11749 ln $srcdir/$ac_source $ac_dest; then :
11750 else
11751 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11752 fi
11753 done
11754 EOF
11755 cat >> $CONFIG_STATUS <<EOF
11756
11757 gdb_host_cpu=$gdb_host_cpu
11758 gdb_target_cpu=$gdb_target_cpu
11759 nativefile=$nativefile
11760
11761 EOF
11762 cat >> $CONFIG_STATUS <<\EOF
11763
11764
11765 sed -e '/^DEPRECATED_TM_FILE[ ]*=/s,^DEPRECATED_TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11766 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11767 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11768 mv -f Makefile.tmp Makefile
11769
11770
11771 case x$CONFIG_HEADERS in
11772 xconfig.h:config.in)
11773 echo > stamp-h ;;
11774 esac
11775
11776 exit 0
11777 EOF
11778 chmod +x $CONFIG_STATUS
11779 rm -fr confdefs* $ac_clean_files
11780 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11781
11782 if test "$no_recursion" != yes; then
11783
11784 # Remove --cache-file and --srcdir arguments so they do not pile up.
11785 ac_sub_configure_args=
11786 ac_prev=
11787 for ac_arg in $ac_configure_args; do
11788 if test -n "$ac_prev"; then
11789 ac_prev=
11790 continue
11791 fi
11792 case "$ac_arg" in
11793 -cache-file | --cache-file | --cache-fil | --cache-fi \
11794 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11795 ac_prev=cache_file ;;
11796 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11797 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11798 ;;
11799 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11800 ac_prev=srcdir ;;
11801 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11802 ;;
11803 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11804 esac
11805 done
11806
11807 for ac_config_dir in doc testsuite $configdirs; do
11808
11809 # Do not complain, so a configure script can configure whichever
11810 # parts of a large source tree are present.
11811 if test ! -d $srcdir/$ac_config_dir; then
11812 continue
11813 fi
11814
11815 echo configuring in $ac_config_dir
11816
11817 case "$srcdir" in
11818 .) ;;
11819 *)
11820 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11821 else
11822 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11823 fi
11824 ;;
11825 esac
11826
11827 ac_popdir=`pwd`
11828 cd $ac_config_dir
11829
11830 # A "../" for each directory in /$ac_config_dir.
11831 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11832
11833 case "$srcdir" in
11834 .) # No --srcdir option. We are building in place.
11835 ac_sub_srcdir=$srcdir ;;
11836 /*) # Absolute path.
11837 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11838 *) # Relative path.
11839 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11840 esac
11841
11842 # Check for guested configure; otherwise get Cygnus style configure.
11843 if test -f $ac_sub_srcdir/configure; then
11844 ac_sub_configure=$ac_sub_srcdir/configure
11845 elif test -f $ac_sub_srcdir/configure.in; then
11846 ac_sub_configure=$ac_configure
11847 else
11848 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11849 ac_sub_configure=
11850 fi
11851
11852 # The recursion is here.
11853 if test -n "$ac_sub_configure"; then
11854
11855 # Make the cache file name correct relative to the subdirectory.
11856 case "$cache_file" in
11857 /*) ac_sub_cache_file=$cache_file ;;
11858 *) # Relative path.
11859 ac_sub_cache_file="$ac_dots$cache_file" ;;
11860 esac
11861 case "$ac_given_INSTALL" in
11862 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11863 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11864 esac
11865
11866 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11867 # The eval makes quoting arguments work.
11868 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11869 then :
11870 else
11871 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11872 fi
11873 fi
11874
11875 cd $ac_popdir
11876 done
11877 fi
11878
11879
11880 exit 0