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