* configure.in: Set $configdir to the right OS specific value.
[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 srcdir=
83 target=NONE
84 verbose=
85 x_includes=NONE
86 x_libraries=NONE
87 bindir='${exec_prefix}/bin'
88 sbindir='${exec_prefix}/sbin'
89 libexecdir='${exec_prefix}/libexec'
90 datadir='${prefix}/share'
91 sysconfdir='${prefix}/etc'
92 sharedstatedir='${prefix}/com'
93 localstatedir='${prefix}/var'
94 libdir='${exec_prefix}/lib'
95 includedir='${prefix}/include'
96 oldincludedir='/usr/include'
97 infodir='${prefix}/info'
98 mandir='${prefix}/man'
99
100 # Initialize some other variables.
101 subdirs=
102 MFLAGS= MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 ac_max_here_lines=12
106
107 ac_prev=
108 for ac_option
109 do
110
111 # If the previous option needs an argument, assign it.
112 if test -n "$ac_prev"; then
113 eval "$ac_prev=\$ac_option"
114 ac_prev=
115 continue
116 fi
117
118 case "$ac_option" in
119 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
120 *) ac_optarg= ;;
121 esac
122
123 # Accept the important Cygnus configure options, so we can diagnose typos.
124
125 case "$ac_option" in
126
127 -bindir | --bindir | --bindi | --bind | --bin | --bi)
128 ac_prev=bindir ;;
129 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
130 bindir="$ac_optarg" ;;
131
132 -build | --build | --buil | --bui | --bu)
133 ac_prev=build ;;
134 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
135 build="$ac_optarg" ;;
136
137 -cache-file | --cache-file | --cache-fil | --cache-fi \
138 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
139 ac_prev=cache_file ;;
140 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
141 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
142 cache_file="$ac_optarg" ;;
143
144 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
145 ac_prev=datadir ;;
146 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
147 | --da=*)
148 datadir="$ac_optarg" ;;
149
150 -disable-* | --disable-*)
151 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
152 # Reject names that are not valid shell variable names.
153 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
154 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
155 fi
156 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157 eval "enable_${ac_feature}=no" ;;
158
159 -enable-* | --enable-*)
160 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
161 # Reject names that are not valid shell variable names.
162 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
163 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
164 fi
165 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
166 case "$ac_option" in
167 *=*) ;;
168 *) ac_optarg=yes ;;
169 esac
170 eval "enable_${ac_feature}='$ac_optarg'" ;;
171
172 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
173 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
174 | --exec | --exe | --ex)
175 ac_prev=exec_prefix ;;
176 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
177 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
178 | --exec=* | --exe=* | --ex=*)
179 exec_prefix="$ac_optarg" ;;
180
181 -gas | --gas | --ga | --g)
182 # Obsolete; use --with-gas.
183 with_gas=yes ;;
184
185 -help | --help | --hel | --he)
186 # Omit some internal or obsolete options to make the list less imposing.
187 # This message is too long to be a string in the A/UX 3.1 sh.
188 cat << EOF
189 Usage: configure [options] [host]
190 Options: [defaults in brackets after descriptions]
191 Configuration:
192 --cache-file=FILE cache test results in FILE
193 --help print this message
194 --no-create do not create output files
195 --quiet, --silent do not print \`checking...' messages
196 --version print the version of autoconf that created configure
197 Directory and file names:
198 --prefix=PREFIX install architecture-independent files in PREFIX
199 [$ac_default_prefix]
200 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
201 [same as prefix]
202 --bindir=DIR user executables in DIR [EPREFIX/bin]
203 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
204 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
205 --datadir=DIR read-only architecture-independent data in DIR
206 [PREFIX/share]
207 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
208 --sharedstatedir=DIR modifiable architecture-independent data in DIR
209 [PREFIX/com]
210 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
211 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
212 --includedir=DIR C header files in DIR [PREFIX/include]
213 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
214 --infodir=DIR info documentation in DIR [PREFIX/info]
215 --mandir=DIR man documentation in DIR [PREFIX/man]
216 --srcdir=DIR find the sources in DIR [configure dir or ..]
217 --program-prefix=PREFIX prepend PREFIX to installed program names
218 --program-suffix=SUFFIX append SUFFIX to installed program names
219 --program-transform-name=PROGRAM
220 run sed PROGRAM on installed program names
221 EOF
222 cat << EOF
223 Host type:
224 --build=BUILD configure for building on BUILD [BUILD=HOST]
225 --host=HOST configure for HOST [guessed]
226 --target=TARGET configure for TARGET [TARGET=HOST]
227 Features and packages:
228 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
229 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
230 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
231 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
232 --x-includes=DIR X include files are in DIR
233 --x-libraries=DIR X library files are in DIR
234 EOF
235 if test -n "$ac_help"; then
236 echo "--enable and --with options recognized:$ac_help"
237 fi
238 exit 0 ;;
239
240 -host | --host | --hos | --ho)
241 ac_prev=host ;;
242 -host=* | --host=* | --hos=* | --ho=*)
243 host="$ac_optarg" ;;
244
245 -includedir | --includedir | --includedi | --included | --include \
246 | --includ | --inclu | --incl | --inc)
247 ac_prev=includedir ;;
248 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249 | --includ=* | --inclu=* | --incl=* | --inc=*)
250 includedir="$ac_optarg" ;;
251
252 -infodir | --infodir | --infodi | --infod | --info | --inf)
253 ac_prev=infodir ;;
254 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255 infodir="$ac_optarg" ;;
256
257 -libdir | --libdir | --libdi | --libd)
258 ac_prev=libdir ;;
259 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 libdir="$ac_optarg" ;;
261
262 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263 | --libexe | --libex | --libe)
264 ac_prev=libexecdir ;;
265 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266 | --libexe=* | --libex=* | --libe=*)
267 libexecdir="$ac_optarg" ;;
268
269 -localstatedir | --localstatedir | --localstatedi | --localstated \
270 | --localstate | --localstat | --localsta | --localst \
271 | --locals | --local | --loca | --loc | --lo)
272 ac_prev=localstatedir ;;
273 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276 localstatedir="$ac_optarg" ;;
277
278 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279 ac_prev=mandir ;;
280 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281 mandir="$ac_optarg" ;;
282
283 -nfp | --nfp | --nf)
284 # Obsolete; use --without-fp.
285 with_fp=no ;;
286
287 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288 | --no-cr | --no-c)
289 no_create=yes ;;
290
291 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 no_recursion=yes ;;
294
295 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297 | --oldin | --oldi | --old | --ol | --o)
298 ac_prev=oldincludedir ;;
299 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302 oldincludedir="$ac_optarg" ;;
303
304 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305 ac_prev=prefix ;;
306 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 prefix="$ac_optarg" ;;
308
309 -program-prefix | --program-prefix | --program-prefi | --program-pref \
310 | --program-pre | --program-pr | --program-p)
311 ac_prev=program_prefix ;;
312 -program-prefix=* | --program-prefix=* | --program-prefi=* \
313 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314 program_prefix="$ac_optarg" ;;
315
316 -program-suffix | --program-suffix | --program-suffi | --program-suff \
317 | --program-suf | --program-su | --program-s)
318 ac_prev=program_suffix ;;
319 -program-suffix=* | --program-suffix=* | --program-suffi=* \
320 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321 program_suffix="$ac_optarg" ;;
322
323 -program-transform-name | --program-transform-name \
324 | --program-transform-nam | --program-transform-na \
325 | --program-transform-n | --program-transform- \
326 | --program-transform | --program-transfor \
327 | --program-transfo | --program-transf \
328 | --program-trans | --program-tran \
329 | --progr-tra | --program-tr | --program-t)
330 ac_prev=program_transform_name ;;
331 -program-transform-name=* | --program-transform-name=* \
332 | --program-transform-nam=* | --program-transform-na=* \
333 | --program-transform-n=* | --program-transform-=* \
334 | --program-transform=* | --program-transfor=* \
335 | --program-transfo=* | --program-transf=* \
336 | --program-trans=* | --program-tran=* \
337 | --progr-tra=* | --program-tr=* | --program-t=*)
338 program_transform_name="$ac_optarg" ;;
339
340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341 | -silent | --silent | --silen | --sile | --sil)
342 silent=yes ;;
343
344 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345 ac_prev=sbindir ;;
346 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347 | --sbi=* | --sb=*)
348 sbindir="$ac_optarg" ;;
349
350 -sharedstatedir | --sharedstatedir | --sharedstatedi \
351 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352 | --sharedst | --shareds | --shared | --share | --shar \
353 | --sha | --sh)
354 ac_prev=sharedstatedir ;;
355 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358 | --sha=* | --sh=*)
359 sharedstatedir="$ac_optarg" ;;
360
361 -site | --site | --sit)
362 ac_prev=site ;;
363 -site=* | --site=* | --sit=*)
364 site="$ac_optarg" ;;
365
366 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
367 ac_prev=srcdir ;;
368 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369 srcdir="$ac_optarg" ;;
370
371 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
372 | --syscon | --sysco | --sysc | --sys | --sy)
373 ac_prev=sysconfdir ;;
374 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
375 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
376 sysconfdir="$ac_optarg" ;;
377
378 -target | --target | --targe | --targ | --tar | --ta | --t)
379 ac_prev=target ;;
380 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
381 target="$ac_optarg" ;;
382
383 -v | -verbose | --verbose | --verbos | --verbo | --verb)
384 verbose=yes ;;
385
386 -version | --version | --versio | --versi | --vers)
387 echo "configure generated by autoconf version 2.13"
388 exit 0 ;;
389
390 -with-* | --with-*)
391 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
392 # Reject names that are not valid shell variable names.
393 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 case "$ac_option" in
398 *=*) ;;
399 *) ac_optarg=yes ;;
400 esac
401 eval "with_${ac_package}='$ac_optarg'" ;;
402
403 -without-* | --without-*)
404 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
405 # Reject names that are not valid shell variable names.
406 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
407 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408 fi
409 ac_package=`echo $ac_package| sed 's/-/_/g'`
410 eval "with_${ac_package}=no" ;;
411
412 --x)
413 # Obsolete; use --with-x.
414 with_x=yes ;;
415
416 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
417 | --x-incl | --x-inc | --x-in | --x-i)
418 ac_prev=x_includes ;;
419 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
420 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
421 x_includes="$ac_optarg" ;;
422
423 -x-libraries | --x-libraries | --x-librarie | --x-librari \
424 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
425 ac_prev=x_libraries ;;
426 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
427 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
428 x_libraries="$ac_optarg" ;;
429
430 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
431 ;;
432
433 *)
434 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
435 echo "configure: warning: $ac_option: invalid host type" 1>&2
436 fi
437 if test "x$nonopt" != xNONE; then
438 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
439 fi
440 nonopt="$ac_option"
441 ;;
442
443 esac
444 done
445
446 if test -n "$ac_prev"; then
447 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
448 fi
449
450 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
451
452 # File descriptor usage:
453 # 0 standard input
454 # 1 file creation
455 # 2 errors and warnings
456 # 3 some systems may open it to /dev/tty
457 # 4 used on the Kubota Titan
458 # 6 checking for... messages and results
459 # 5 compiler messages saved in config.log
460 if test "$silent" = yes; then
461 exec 6>/dev/null
462 else
463 exec 6>&1
464 fi
465 exec 5>./config.log
466
467 echo "\
468 This file contains any messages produced by compilers while
469 running configure, to aid debugging if configure makes a mistake.
470 " 1>&5
471
472 # Strip out --no-create and --no-recursion so they do not pile up.
473 # Also quote any args containing shell metacharacters.
474 ac_configure_args=
475 for ac_arg
476 do
477 case "$ac_arg" in
478 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
479 | --no-cr | --no-c) ;;
480 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
481 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
482 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
483 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
484 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
485 esac
486 done
487
488 # NLS nuisances.
489 # Only set these to C if already set. These must not be set unconditionally
490 # because not all systems understand e.g. LANG=C (notably SCO).
491 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
492 # Non-C LC_CTYPE values break the ctype check.
493 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
494 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
495 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
496 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
497
498 # confdefs.h avoids OS command line length limits that DEFS can exceed.
499 rm -rf conftest* confdefs.h
500 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
501 echo > confdefs.h
502
503 # A filename unique to this package, relative to the directory that
504 # configure is in, which we can look for to find out if srcdir is correct.
505 ac_unique_file=main.c
506
507 # Find the source files, if location was not specified.
508 if test -z "$srcdir"; then
509 ac_srcdir_defaulted=yes
510 # Try the directory containing this script, then its parent.
511 ac_prog=$0
512 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
513 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
514 srcdir=$ac_confdir
515 if test ! -r $srcdir/$ac_unique_file; then
516 srcdir=..
517 fi
518 else
519 ac_srcdir_defaulted=no
520 fi
521 if test ! -r $srcdir/$ac_unique_file; then
522 if test "$ac_srcdir_defaulted" = yes; then
523 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
524 else
525 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
526 fi
527 fi
528 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
529
530 # Prefer explicitly selected file to automatically selected ones.
531 if test -z "$CONFIG_SITE"; then
532 if test "x$prefix" != xNONE; then
533 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
534 else
535 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
536 fi
537 fi
538 for ac_site_file in $CONFIG_SITE; do
539 if test -r "$ac_site_file"; then
540 echo "loading site script $ac_site_file"
541 . "$ac_site_file"
542 fi
543 done
544
545 if test -r "$cache_file"; then
546 echo "loading cache $cache_file"
547 . $cache_file
548 else
549 echo "creating cache $cache_file"
550 > $cache_file
551 fi
552
553 ac_ext=c
554 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
555 ac_cpp='$CPP $CPPFLAGS'
556 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
557 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
558 cross_compiling=$ac_cv_prog_cc_cross
559
560 ac_exeext=
561 ac_objext=o
562 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
563 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
564 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
565 ac_n= ac_c='
566 ' ac_t=' '
567 else
568 ac_n=-n ac_c= ac_t=
569 fi
570 else
571 ac_n= ac_c='\c' ac_t=
572 fi
573
574
575
576 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
577 echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
578 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
579 if test "${enable_maintainer_mode+set}" = set; then
580 enableval="$enable_maintainer_mode"
581 USE_MAINTAINER_MODE=$enableval
582 else
583 USE_MAINTAINER_MODE=no
584 fi
585
586 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
587
588
589 if test $USE_MAINTAINER_MODE = yes; then
590 MAINTAINER_MODE_TRUE=
591 MAINTAINER_MODE_FALSE='#'
592 else
593 MAINTAINER_MODE_TRUE='#'
594 MAINTAINER_MODE_FALSE=
595 fi
596 MAINT=$MAINTAINER_MODE_TRUE
597
598
599
600 # Extract the first word of "gcc", so it can be a program name with args.
601 set dummy gcc; ac_word=$2
602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
603 echo "configure:604: checking for $ac_word" >&5
604 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605 echo $ac_n "(cached) $ac_c" 1>&6
606 else
607 if test -n "$CC"; then
608 ac_cv_prog_CC="$CC" # Let the user override the test.
609 else
610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
611 ac_dummy="$PATH"
612 for ac_dir in $ac_dummy; do
613 test -z "$ac_dir" && ac_dir=.
614 if test -f $ac_dir/$ac_word; then
615 ac_cv_prog_CC="gcc"
616 break
617 fi
618 done
619 IFS="$ac_save_ifs"
620 fi
621 fi
622 CC="$ac_cv_prog_CC"
623 if test -n "$CC"; then
624 echo "$ac_t""$CC" 1>&6
625 else
626 echo "$ac_t""no" 1>&6
627 fi
628
629 if test -z "$CC"; then
630 # Extract the first word of "cc", so it can be a program name with args.
631 set dummy cc; ac_word=$2
632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
633 echo "configure:634: checking for $ac_word" >&5
634 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
636 else
637 if test -n "$CC"; then
638 ac_cv_prog_CC="$CC" # Let the user override the test.
639 else
640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
641 ac_prog_rejected=no
642 ac_dummy="$PATH"
643 for ac_dir in $ac_dummy; do
644 test -z "$ac_dir" && ac_dir=.
645 if test -f $ac_dir/$ac_word; then
646 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
647 ac_prog_rejected=yes
648 continue
649 fi
650 ac_cv_prog_CC="cc"
651 break
652 fi
653 done
654 IFS="$ac_save_ifs"
655 if test $ac_prog_rejected = yes; then
656 # We found a bogon in the path, so make sure we never use it.
657 set dummy $ac_cv_prog_CC
658 shift
659 if test $# -gt 0; then
660 # We chose a different compiler from the bogus one.
661 # However, it has the same basename, so the bogon will be chosen
662 # first if we set CC to just the basename; use the full file name.
663 shift
664 set dummy "$ac_dir/$ac_word" "$@"
665 shift
666 ac_cv_prog_CC="$@"
667 fi
668 fi
669 fi
670 fi
671 CC="$ac_cv_prog_CC"
672 if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
674 else
675 echo "$ac_t""no" 1>&6
676 fi
677
678 if test -z "$CC"; then
679 case "`uname -s`" in
680 *win32* | *WIN32*)
681 # Extract the first word of "cl", so it can be a program name with args.
682 set dummy cl; ac_word=$2
683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
684 echo "configure:685: checking for $ac_word" >&5
685 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
687 else
688 if test -n "$CC"; then
689 ac_cv_prog_CC="$CC" # Let the user override the test.
690 else
691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 ac_dummy="$PATH"
693 for ac_dir in $ac_dummy; do
694 test -z "$ac_dir" && ac_dir=.
695 if test -f $ac_dir/$ac_word; then
696 ac_cv_prog_CC="cl"
697 break
698 fi
699 done
700 IFS="$ac_save_ifs"
701 fi
702 fi
703 CC="$ac_cv_prog_CC"
704 if test -n "$CC"; then
705 echo "$ac_t""$CC" 1>&6
706 else
707 echo "$ac_t""no" 1>&6
708 fi
709 ;;
710 esac
711 fi
712 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
713 fi
714
715 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
716 echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
717
718 ac_ext=c
719 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
720 ac_cpp='$CPP $CPPFLAGS'
721 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
722 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
723 cross_compiling=$ac_cv_prog_cc_cross
724
725 cat > conftest.$ac_ext << EOF
726
727 #line 728 "configure"
728 #include "confdefs.h"
729
730 main(){return(0);}
731 EOF
732 if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
733 ac_cv_prog_cc_works=yes
734 # If we can't run a trivial program, we are probably using a cross compiler.
735 if (./conftest; exit) 2>/dev/null; then
736 ac_cv_prog_cc_cross=no
737 else
738 ac_cv_prog_cc_cross=yes
739 fi
740 else
741 echo "configure: failed program was:" >&5
742 cat conftest.$ac_ext >&5
743 ac_cv_prog_cc_works=no
744 fi
745 rm -fr conftest*
746 ac_ext=c
747 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
748 ac_cpp='$CPP $CPPFLAGS'
749 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
750 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
751 cross_compiling=$ac_cv_prog_cc_cross
752
753 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
754 if test $ac_cv_prog_cc_works = no; then
755 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
756 fi
757 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
758 echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
759 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
760 cross_compiling=$ac_cv_prog_cc_cross
761
762 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
763 echo "configure:764: checking whether we are using GNU C" >&5
764 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766 else
767 cat > conftest.c <<EOF
768 #ifdef __GNUC__
769 yes;
770 #endif
771 EOF
772 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
773 ac_cv_prog_gcc=yes
774 else
775 ac_cv_prog_gcc=no
776 fi
777 fi
778
779 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
780
781 if test $ac_cv_prog_gcc = yes; then
782 GCC=yes
783 else
784 GCC=
785 fi
786
787 ac_test_CFLAGS="${CFLAGS+set}"
788 ac_save_CFLAGS="$CFLAGS"
789 CFLAGS=
790 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
791 echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
792 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794 else
795 echo 'void f(){}' > conftest.c
796 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
797 ac_cv_prog_cc_g=yes
798 else
799 ac_cv_prog_cc_g=no
800 fi
801 rm -f conftest*
802
803 fi
804
805 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
806 if test "$ac_test_CFLAGS" = set; then
807 CFLAGS="$ac_save_CFLAGS"
808 elif test $ac_cv_prog_cc_g = yes; then
809 if test "$GCC" = yes; then
810 CFLAGS="-g -O2"
811 else
812 CFLAGS="-g"
813 fi
814 else
815 if test "$GCC" = yes; then
816 CFLAGS="-O2"
817 else
818 CFLAGS=
819 fi
820 fi
821
822 cat >> confdefs.h <<\EOF
823 #define _GNU_SOURCE 1
824 EOF
825
826
827 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
828 echo "configure:829: checking how to run the C preprocessor" >&5
829 # On Suns, sometimes $CPP names a directory.
830 if test -n "$CPP" && test -d "$CPP"; then
831 CPP=
832 fi
833 if test -z "$CPP"; then
834 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
835 echo $ac_n "(cached) $ac_c" 1>&6
836 else
837 # This must be in double quotes, not single quotes, because CPP may get
838 # substituted into the Makefile and "${CC-cc}" will confuse make.
839 CPP="${CC-cc} -E"
840 # On the NeXT, cc -E runs the code through the compiler's parser,
841 # not just through cpp.
842 cat > conftest.$ac_ext <<EOF
843 #line 844 "configure"
844 #include "confdefs.h"
845 #include <assert.h>
846 Syntax Error
847 EOF
848 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
849 { (eval echo configure:850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
850 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
851 if test -z "$ac_err"; then
852 :
853 else
854 echo "$ac_err" >&5
855 echo "configure: failed program was:" >&5
856 cat conftest.$ac_ext >&5
857 rm -rf conftest*
858 CPP="${CC-cc} -E -traditional-cpp"
859 cat > conftest.$ac_ext <<EOF
860 #line 861 "configure"
861 #include "confdefs.h"
862 #include <assert.h>
863 Syntax Error
864 EOF
865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
866 { (eval echo configure:867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
868 if test -z "$ac_err"; then
869 :
870 else
871 echo "$ac_err" >&5
872 echo "configure: failed program was:" >&5
873 cat conftest.$ac_ext >&5
874 rm -rf conftest*
875 CPP="${CC-cc} -nologo -E"
876 cat > conftest.$ac_ext <<EOF
877 #line 878 "configure"
878 #include "confdefs.h"
879 #include <assert.h>
880 Syntax Error
881 EOF
882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
883 { (eval echo configure:884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
885 if test -z "$ac_err"; then
886 :
887 else
888 echo "$ac_err" >&5
889 echo "configure: failed program was:" >&5
890 cat conftest.$ac_ext >&5
891 rm -rf conftest*
892 CPP=/lib/cpp
893 fi
894 rm -f conftest*
895 fi
896 rm -f conftest*
897 fi
898 rm -f conftest*
899 ac_cv_prog_CPP="$CPP"
900 fi
901 CPP="$ac_cv_prog_CPP"
902 else
903 ac_cv_prog_CPP="$CPP"
904 fi
905 echo "$ac_t""$CPP" 1>&6
906
907 echo $ac_n "checking for AIX""... $ac_c" 1>&6
908 echo "configure:909: checking for AIX" >&5
909 cat > conftest.$ac_ext <<EOF
910 #line 911 "configure"
911 #include "confdefs.h"
912 #ifdef _AIX
913 yes
914 #endif
915
916 EOF
917 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
918 egrep "yes" >/dev/null 2>&1; then
919 rm -rf conftest*
920 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
921 #define _ALL_SOURCE 1
922 EOF
923
924 else
925 rm -rf conftest*
926 echo "$ac_t""no" 1>&6
927 fi
928 rm -f conftest*
929
930
931 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
932 echo "configure:933: checking for POSIXized ISC" >&5
933 if test -d /etc/conf/kconfig.d &&
934 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
935 then
936 echo "$ac_t""yes" 1>&6
937 ISC=yes # If later tests want to check for ISC.
938 cat >> confdefs.h <<\EOF
939 #define _POSIX_SOURCE 1
940 EOF
941
942 if test "$GCC" = yes; then
943 CC="$CC -posix"
944 else
945 CC="$CC -Xp"
946 fi
947 else
948 echo "$ac_t""no" 1>&6
949 ISC=
950 fi
951
952
953
954
955 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
956 echo "configure:957: checking for ${CC-cc} option to accept ANSI C" >&5
957 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
958 echo $ac_n "(cached) $ac_c" 1>&6
959 else
960 am_cv_prog_cc_stdc=no
961 ac_save_CC="$CC"
962 # Don't try gcc -ansi; that turns off useful extensions and
963 # breaks some systems' header files.
964 # AIX -qlanglvl=ansi
965 # Ultrix and OSF/1 -std1
966 # HP-UX 10.20 and later -Ae
967 # HP-UX older versions -Aa -D_HPUX_SOURCE
968 # SVR4 -Xc -D__EXTENSIONS__
969 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
970 do
971 CC="$ac_save_CC $ac_arg"
972 cat > conftest.$ac_ext <<EOF
973 #line 974 "configure"
974 #include "confdefs.h"
975 #include <stdarg.h>
976 #include <stdio.h>
977 #include <sys/types.h>
978 #include <sys/stat.h>
979 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
980 struct buf { int x; };
981 FILE * (*rcsopen) (struct buf *, struct stat *, int);
982 static char *e (p, i)
983 char **p;
984 int i;
985 {
986 return p[i];
987 }
988 static char *f (char * (*g) (char **, int), char **p, ...)
989 {
990 char *s;
991 va_list v;
992 va_start (v,p);
993 s = g (p, va_arg (v,int));
994 va_end (v);
995 return s;
996 }
997 int test (int i, double x);
998 struct s1 {int (*f) (int a);};
999 struct s2 {int (*f) (double a);};
1000 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1001 int argc;
1002 char **argv;
1003
1004 int main() {
1005
1006 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1007
1008 ; return 0; }
1009 EOF
1010 if { (eval echo configure:1011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1011 rm -rf conftest*
1012 am_cv_prog_cc_stdc="$ac_arg"; break
1013 else
1014 echo "configure: failed program was:" >&5
1015 cat conftest.$ac_ext >&5
1016 fi
1017 rm -f conftest*
1018 done
1019 CC="$ac_save_CC"
1020
1021 fi
1022
1023 if test -z "$am_cv_prog_cc_stdc"; then
1024 echo "$ac_t""none needed" 1>&6
1025 else
1026 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1027 fi
1028 case "x$am_cv_prog_cc_stdc" in
1029 x|xno) ;;
1030 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1031 esac
1032
1033
1034 ac_aux_dir=
1035 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1036 if test -f $ac_dir/install-sh; then
1037 ac_aux_dir=$ac_dir
1038 ac_install_sh="$ac_aux_dir/install-sh -c"
1039 break
1040 elif test -f $ac_dir/install.sh; then
1041 ac_aux_dir=$ac_dir
1042 ac_install_sh="$ac_aux_dir/install.sh -c"
1043 break
1044 fi
1045 done
1046 if test -z "$ac_aux_dir"; then
1047 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1048 fi
1049 ac_config_guess=$ac_aux_dir/config.guess
1050 ac_config_sub=$ac_aux_dir/config.sub
1051 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1052
1053
1054 # Do some error checking and defaulting for the host and target type.
1055 # The inputs are:
1056 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1057 #
1058 # The rules are:
1059 # 1. You are not allowed to specify --host, --target, and nonopt at the
1060 # same time.
1061 # 2. Host defaults to nonopt.
1062 # 3. If nonopt is not specified, then host defaults to the current host,
1063 # as determined by config.guess.
1064 # 4. Target and build default to nonopt.
1065 # 5. If nonopt is not specified, then target and build default to host.
1066
1067 # The aliases save the names the user supplied, while $host etc.
1068 # will get canonicalized.
1069 case $host---$target---$nonopt in
1070 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1071 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1072 esac
1073
1074
1075 # Make sure we can run config.sub.
1076 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1077 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1078 fi
1079
1080 echo $ac_n "checking host system type""... $ac_c" 1>&6
1081 echo "configure:1082: checking host system type" >&5
1082
1083 host_alias=$host
1084 case "$host_alias" in
1085 NONE)
1086 case $nonopt in
1087 NONE)
1088 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1089 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1090 fi ;;
1091 *) host_alias=$nonopt ;;
1092 esac ;;
1093 esac
1094
1095 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1096 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1097 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1098 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1099 echo "$ac_t""$host" 1>&6
1100
1101 echo $ac_n "checking target system type""... $ac_c" 1>&6
1102 echo "configure:1103: checking target system type" >&5
1103
1104 target_alias=$target
1105 case "$target_alias" in
1106 NONE)
1107 case $nonopt in
1108 NONE) target_alias=$host_alias ;;
1109 *) target_alias=$nonopt ;;
1110 esac ;;
1111 esac
1112
1113 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1114 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1115 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1116 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1117 echo "$ac_t""$target" 1>&6
1118
1119 echo $ac_n "checking build system type""... $ac_c" 1>&6
1120 echo "configure:1121: checking build system type" >&5
1121
1122 build_alias=$build
1123 case "$build_alias" in
1124 NONE)
1125 case $nonopt in
1126 NONE) build_alias=$host_alias ;;
1127 *) build_alias=$nonopt ;;
1128 esac ;;
1129 esac
1130
1131 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1132 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1133 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1134 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1135 echo "$ac_t""$build" 1>&6
1136
1137 test "$host_alias" != "$target_alias" &&
1138 test "$program_prefix$program_suffix$program_transform_name" = \
1139 NONENONEs,x,x, &&
1140 program_prefix=${target_alias}-
1141
1142
1143 # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1144 # doesn't support cross-compilation, but the one from Autoconf 2.5x
1145 # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1146 # deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1147 # AC_PROG_RANLIB. This can be removed when we switch to Autoconf
1148 # 2.5x.
1149 if test $host != $build; then
1150 ac_tool_prefix=${host_alias}-
1151 else
1152 ac_tool_prefix=
1153 fi
1154
1155 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1156 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1160 echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162 if test -n "$RANLIB"; then
1163 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1164 else
1165 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1166 ac_dummy="$PATH"
1167 for ac_dir in $ac_dummy; do
1168 test -z "$ac_dir" && ac_dir=.
1169 if test -f $ac_dir/$ac_word; then
1170 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1171 break
1172 fi
1173 done
1174 IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 RANLIB="$ac_cv_prog_RANLIB"
1178 if test -n "$RANLIB"; then
1179 echo "$ac_t""$RANLIB" 1>&6
1180 else
1181 echo "$ac_t""no" 1>&6
1182 fi
1183
1184
1185 if test -z "$ac_cv_prog_RANLIB"; then
1186 if test -n "$ac_tool_prefix"; then
1187 # Extract the first word of "ranlib", so it can be a program name with args.
1188 set dummy ranlib; ac_word=$2
1189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1190 echo "configure:1191: checking for $ac_word" >&5
1191 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194 if test -n "$RANLIB"; then
1195 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1196 else
1197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1198 ac_dummy="$PATH"
1199 for ac_dir in $ac_dummy; do
1200 test -z "$ac_dir" && ac_dir=.
1201 if test -f $ac_dir/$ac_word; then
1202 ac_cv_prog_RANLIB="ranlib"
1203 break
1204 fi
1205 done
1206 IFS="$ac_save_ifs"
1207 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1208 fi
1209 fi
1210 RANLIB="$ac_cv_prog_RANLIB"
1211 if test -n "$RANLIB"; then
1212 echo "$ac_t""$RANLIB" 1>&6
1213 else
1214 echo "$ac_t""no" 1>&6
1215 fi
1216
1217 else
1218 RANLIB=":"
1219 fi
1220 fi
1221
1222
1223 ALL_LINGUAS=
1224 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1225 echo "configure:1226: checking whether ${MAKE-make} sets \${MAKE}" >&5
1226 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1227 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230 cat > conftestmake <<\EOF
1231 all:
1232 @echo 'ac_maketemp="${MAKE}"'
1233 EOF
1234 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1235 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1236 if test -n "$ac_maketemp"; then
1237 eval ac_cv_prog_make_${ac_make}_set=yes
1238 else
1239 eval ac_cv_prog_make_${ac_make}_set=no
1240 fi
1241 rm -f conftestmake
1242 fi
1243 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1244 echo "$ac_t""yes" 1>&6
1245 SET_MAKE=
1246 else
1247 echo "$ac_t""no" 1>&6
1248 SET_MAKE="MAKE=${MAKE-make}"
1249 fi
1250
1251 # Extract the first word of "ranlib", so it can be a program name with args.
1252 set dummy ranlib; ac_word=$2
1253 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1254 echo "configure:1255: checking for $ac_word" >&5
1255 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1256 echo $ac_n "(cached) $ac_c" 1>&6
1257 else
1258 if test -n "$RANLIB"; then
1259 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1260 else
1261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1262 ac_dummy="$PATH"
1263 for ac_dir in $ac_dummy; do
1264 test -z "$ac_dir" && ac_dir=.
1265 if test -f $ac_dir/$ac_word; then
1266 ac_cv_prog_RANLIB="ranlib"
1267 break
1268 fi
1269 done
1270 IFS="$ac_save_ifs"
1271 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1272 fi
1273 fi
1274 RANLIB="$ac_cv_prog_RANLIB"
1275 if test -n "$RANLIB"; then
1276 echo "$ac_t""$RANLIB" 1>&6
1277 else
1278 echo "$ac_t""no" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1282 echo "configure:1283: checking for ANSI C header files" >&5
1283 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1285 else
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1289 #include <stdlib.h>
1290 #include <stdarg.h>
1291 #include <string.h>
1292 #include <float.h>
1293 EOF
1294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1295 { (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1297 if test -z "$ac_err"; then
1298 rm -rf conftest*
1299 ac_cv_header_stdc=yes
1300 else
1301 echo "$ac_err" >&5
1302 echo "configure: failed program was:" >&5
1303 cat conftest.$ac_ext >&5
1304 rm -rf conftest*
1305 ac_cv_header_stdc=no
1306 fi
1307 rm -f conftest*
1308
1309 if test $ac_cv_header_stdc = yes; then
1310 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1311 cat > conftest.$ac_ext <<EOF
1312 #line 1313 "configure"
1313 #include "confdefs.h"
1314 #include <string.h>
1315 EOF
1316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1317 egrep "memchr" >/dev/null 2>&1; then
1318 :
1319 else
1320 rm -rf conftest*
1321 ac_cv_header_stdc=no
1322 fi
1323 rm -f conftest*
1324
1325 fi
1326
1327 if test $ac_cv_header_stdc = yes; then
1328 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1329 cat > conftest.$ac_ext <<EOF
1330 #line 1331 "configure"
1331 #include "confdefs.h"
1332 #include <stdlib.h>
1333 EOF
1334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1335 egrep "free" >/dev/null 2>&1; then
1336 :
1337 else
1338 rm -rf conftest*
1339 ac_cv_header_stdc=no
1340 fi
1341 rm -f conftest*
1342
1343 fi
1344
1345 if test $ac_cv_header_stdc = yes; then
1346 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1347 if test "$cross_compiling" = yes; then
1348 :
1349 else
1350 cat > conftest.$ac_ext <<EOF
1351 #line 1352 "configure"
1352 #include "confdefs.h"
1353 #include <ctype.h>
1354 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1355 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1356 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1357 int main () { int i; for (i = 0; i < 256; i++)
1358 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1359 exit (0); }
1360
1361 EOF
1362 if { (eval echo configure:1363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1363 then
1364 :
1365 else
1366 echo "configure: failed program was:" >&5
1367 cat conftest.$ac_ext >&5
1368 rm -fr conftest*
1369 ac_cv_header_stdc=no
1370 fi
1371 rm -fr conftest*
1372 fi
1373
1374 fi
1375 fi
1376
1377 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1378 if test $ac_cv_header_stdc = yes; then
1379 cat >> confdefs.h <<\EOF
1380 #define STDC_HEADERS 1
1381 EOF
1382
1383 fi
1384
1385 echo $ac_n "checking for working const""... $ac_c" 1>&6
1386 echo "configure:1387: checking for working const" >&5
1387 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1388 echo $ac_n "(cached) $ac_c" 1>&6
1389 else
1390 cat > conftest.$ac_ext <<EOF
1391 #line 1392 "configure"
1392 #include "confdefs.h"
1393
1394 int main() {
1395
1396 /* Ultrix mips cc rejects this. */
1397 typedef int charset[2]; const charset x;
1398 /* SunOS 4.1.1 cc rejects this. */
1399 char const *const *ccp;
1400 char **p;
1401 /* NEC SVR4.0.2 mips cc rejects this. */
1402 struct point {int x, y;};
1403 static struct point const zero = {0,0};
1404 /* AIX XL C 1.02.0.0 rejects this.
1405 It does not let you subtract one const X* pointer from another in an arm
1406 of an if-expression whose if-part is not a constant expression */
1407 const char *g = "string";
1408 ccp = &g + (g ? g-g : 0);
1409 /* HPUX 7.0 cc rejects these. */
1410 ++ccp;
1411 p = (char**) ccp;
1412 ccp = (char const *const *) p;
1413 { /* SCO 3.2v4 cc rejects this. */
1414 char *t;
1415 char const *s = 0 ? (char *) 0 : (char const *) 0;
1416
1417 *t++ = 0;
1418 }
1419 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1420 int x[] = {25, 17};
1421 const int *foo = &x[0];
1422 ++foo;
1423 }
1424 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1425 typedef const int *iptr;
1426 iptr p = 0;
1427 ++p;
1428 }
1429 { /* AIX XL C 1.02.0.0 rejects this saying
1430 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1431 struct s { int j; const int *ap[3]; };
1432 struct s *b; b->j = 5;
1433 }
1434 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1435 const int foo = 10;
1436 }
1437
1438 ; return 0; }
1439 EOF
1440 if { (eval echo configure:1441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1441 rm -rf conftest*
1442 ac_cv_c_const=yes
1443 else
1444 echo "configure: failed program was:" >&5
1445 cat conftest.$ac_ext >&5
1446 rm -rf conftest*
1447 ac_cv_c_const=no
1448 fi
1449 rm -f conftest*
1450 fi
1451
1452 echo "$ac_t""$ac_cv_c_const" 1>&6
1453 if test $ac_cv_c_const = no; then
1454 cat >> confdefs.h <<\EOF
1455 #define const
1456 EOF
1457
1458 fi
1459
1460 echo $ac_n "checking for inline""... $ac_c" 1>&6
1461 echo "configure:1462: checking for inline" >&5
1462 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464 else
1465 ac_cv_c_inline=no
1466 for ac_kw in inline __inline__ __inline; do
1467 cat > conftest.$ac_ext <<EOF
1468 #line 1469 "configure"
1469 #include "confdefs.h"
1470
1471 int main() {
1472 } $ac_kw foo() {
1473 ; return 0; }
1474 EOF
1475 if { (eval echo configure:1476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1476 rm -rf conftest*
1477 ac_cv_c_inline=$ac_kw; break
1478 else
1479 echo "configure: failed program was:" >&5
1480 cat conftest.$ac_ext >&5
1481 fi
1482 rm -f conftest*
1483 done
1484
1485 fi
1486
1487 echo "$ac_t""$ac_cv_c_inline" 1>&6
1488 case "$ac_cv_c_inline" in
1489 inline | yes) ;;
1490 no) cat >> confdefs.h <<\EOF
1491 #define inline
1492 EOF
1493 ;;
1494 *) cat >> confdefs.h <<EOF
1495 #define inline $ac_cv_c_inline
1496 EOF
1497 ;;
1498 esac
1499
1500 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1501 echo "configure:1502: checking for off_t" >&5
1502 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1503 echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505 cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508 #include <sys/types.h>
1509 #if STDC_HEADERS
1510 #include <stdlib.h>
1511 #include <stddef.h>
1512 #endif
1513 EOF
1514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1515 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1516 rm -rf conftest*
1517 ac_cv_type_off_t=yes
1518 else
1519 rm -rf conftest*
1520 ac_cv_type_off_t=no
1521 fi
1522 rm -f conftest*
1523
1524 fi
1525 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1526 if test $ac_cv_type_off_t = no; then
1527 cat >> confdefs.h <<\EOF
1528 #define off_t long
1529 EOF
1530
1531 fi
1532
1533 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1534 echo "configure:1535: checking for size_t" >&5
1535 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
1537 else
1538 cat > conftest.$ac_ext <<EOF
1539 #line 1540 "configure"
1540 #include "confdefs.h"
1541 #include <sys/types.h>
1542 #if STDC_HEADERS
1543 #include <stdlib.h>
1544 #include <stddef.h>
1545 #endif
1546 EOF
1547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1548 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1549 rm -rf conftest*
1550 ac_cv_type_size_t=yes
1551 else
1552 rm -rf conftest*
1553 ac_cv_type_size_t=no
1554 fi
1555 rm -f conftest*
1556
1557 fi
1558 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1559 if test $ac_cv_type_size_t = no; then
1560 cat >> confdefs.h <<\EOF
1561 #define size_t unsigned
1562 EOF
1563
1564 fi
1565
1566 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1567 # for constant arguments. Useless!
1568 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1569 echo "configure:1570: checking for working alloca.h" >&5
1570 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573 cat > conftest.$ac_ext <<EOF
1574 #line 1575 "configure"
1575 #include "confdefs.h"
1576 #include <alloca.h>
1577 int main() {
1578 char *p = alloca(2 * sizeof(int));
1579 ; return 0; }
1580 EOF
1581 if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1582 rm -rf conftest*
1583 ac_cv_header_alloca_h=yes
1584 else
1585 echo "configure: failed program was:" >&5
1586 cat conftest.$ac_ext >&5
1587 rm -rf conftest*
1588 ac_cv_header_alloca_h=no
1589 fi
1590 rm -f conftest*
1591 fi
1592
1593 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1594 if test $ac_cv_header_alloca_h = yes; then
1595 cat >> confdefs.h <<\EOF
1596 #define HAVE_ALLOCA_H 1
1597 EOF
1598
1599 fi
1600
1601 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1602 echo "configure:1603: checking for alloca" >&5
1603 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1604 echo $ac_n "(cached) $ac_c" 1>&6
1605 else
1606 cat > conftest.$ac_ext <<EOF
1607 #line 1608 "configure"
1608 #include "confdefs.h"
1609
1610 #ifdef __GNUC__
1611 # define alloca __builtin_alloca
1612 #else
1613 # ifdef _MSC_VER
1614 # include <malloc.h>
1615 # define alloca _alloca
1616 # else
1617 # if HAVE_ALLOCA_H
1618 # include <alloca.h>
1619 # else
1620 # ifdef _AIX
1621 #pragma alloca
1622 # else
1623 # ifndef alloca /* predefined by HP cc +Olibcalls */
1624 char *alloca ();
1625 # endif
1626 # endif
1627 # endif
1628 # endif
1629 #endif
1630
1631 int main() {
1632 char *p = (char *) alloca(1);
1633 ; return 0; }
1634 EOF
1635 if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1636 rm -rf conftest*
1637 ac_cv_func_alloca_works=yes
1638 else
1639 echo "configure: failed program was:" >&5
1640 cat conftest.$ac_ext >&5
1641 rm -rf conftest*
1642 ac_cv_func_alloca_works=no
1643 fi
1644 rm -f conftest*
1645 fi
1646
1647 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1648 if test $ac_cv_func_alloca_works = yes; then
1649 cat >> confdefs.h <<\EOF
1650 #define HAVE_ALLOCA 1
1651 EOF
1652
1653 fi
1654
1655 if test $ac_cv_func_alloca_works = no; then
1656 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1657 # that cause trouble. Some versions do not even contain alloca or
1658 # contain a buggy version. If you still want to use their alloca,
1659 # use ar to extract alloca.o from them instead of compiling alloca.c.
1660 ALLOCA=alloca.${ac_objext}
1661 cat >> confdefs.h <<\EOF
1662 #define C_ALLOCA 1
1663 EOF
1664
1665
1666 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1667 echo "configure:1668: checking whether alloca needs Cray hooks" >&5
1668 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1669 echo $ac_n "(cached) $ac_c" 1>&6
1670 else
1671 cat > conftest.$ac_ext <<EOF
1672 #line 1673 "configure"
1673 #include "confdefs.h"
1674 #if defined(CRAY) && ! defined(CRAY2)
1675 webecray
1676 #else
1677 wenotbecray
1678 #endif
1679
1680 EOF
1681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1682 egrep "webecray" >/dev/null 2>&1; then
1683 rm -rf conftest*
1684 ac_cv_os_cray=yes
1685 else
1686 rm -rf conftest*
1687 ac_cv_os_cray=no
1688 fi
1689 rm -f conftest*
1690
1691 fi
1692
1693 echo "$ac_t""$ac_cv_os_cray" 1>&6
1694 if test $ac_cv_os_cray = yes; then
1695 for ac_func in _getb67 GETB67 getb67; do
1696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1697 echo "configure:1698: checking for $ac_func" >&5
1698 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700 else
1701 cat > conftest.$ac_ext <<EOF
1702 #line 1703 "configure"
1703 #include "confdefs.h"
1704 /* System header to define __stub macros and hopefully few prototypes,
1705 which can conflict with char $ac_func(); below. */
1706 #include <assert.h>
1707 /* Override any gcc2 internal prototype to avoid an error. */
1708 /* We use char because int might match the return type of a gcc2
1709 builtin and then its argument prototype would still apply. */
1710 char $ac_func();
1711
1712 int main() {
1713
1714 /* The GNU C library defines this for functions which it implements
1715 to always fail with ENOSYS. Some functions are actually named
1716 something starting with __ and the normal name is an alias. */
1717 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1718 choke me
1719 #else
1720 $ac_func();
1721 #endif
1722
1723 ; return 0; }
1724 EOF
1725 if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1726 rm -rf conftest*
1727 eval "ac_cv_func_$ac_func=yes"
1728 else
1729 echo "configure: failed program was:" >&5
1730 cat conftest.$ac_ext >&5
1731 rm -rf conftest*
1732 eval "ac_cv_func_$ac_func=no"
1733 fi
1734 rm -f conftest*
1735 fi
1736
1737 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1738 echo "$ac_t""yes" 1>&6
1739 cat >> confdefs.h <<EOF
1740 #define CRAY_STACKSEG_END $ac_func
1741 EOF
1742
1743 break
1744 else
1745 echo "$ac_t""no" 1>&6
1746 fi
1747
1748 done
1749 fi
1750
1751 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1752 echo "configure:1753: checking stack direction for C alloca" >&5
1753 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1754 echo $ac_n "(cached) $ac_c" 1>&6
1755 else
1756 if test "$cross_compiling" = yes; then
1757 ac_cv_c_stack_direction=0
1758 else
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 find_stack_direction ()
1763 {
1764 static char *addr = 0;
1765 auto char dummy;
1766 if (addr == 0)
1767 {
1768 addr = &dummy;
1769 return find_stack_direction ();
1770 }
1771 else
1772 return (&dummy > addr) ? 1 : -1;
1773 }
1774 main ()
1775 {
1776 exit (find_stack_direction() < 0);
1777 }
1778 EOF
1779 if { (eval echo configure:1780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1780 then
1781 ac_cv_c_stack_direction=1
1782 else
1783 echo "configure: failed program was:" >&5
1784 cat conftest.$ac_ext >&5
1785 rm -fr conftest*
1786 ac_cv_c_stack_direction=-1
1787 fi
1788 rm -fr conftest*
1789 fi
1790
1791 fi
1792
1793 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1794 cat >> confdefs.h <<EOF
1795 #define STACK_DIRECTION $ac_cv_c_stack_direction
1796 EOF
1797
1798 fi
1799
1800 for ac_hdr in unistd.h
1801 do
1802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1804 echo "configure:1805: checking for $ac_hdr" >&5
1805 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 #include <$ac_hdr>
1812 EOF
1813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1814 { (eval echo configure:1815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1816 if test -z "$ac_err"; then
1817 rm -rf conftest*
1818 eval "ac_cv_header_$ac_safe=yes"
1819 else
1820 echo "$ac_err" >&5
1821 echo "configure: failed program was:" >&5
1822 cat conftest.$ac_ext >&5
1823 rm -rf conftest*
1824 eval "ac_cv_header_$ac_safe=no"
1825 fi
1826 rm -f conftest*
1827 fi
1828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1829 echo "$ac_t""yes" 1>&6
1830 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1831 cat >> confdefs.h <<EOF
1832 #define $ac_tr_hdr 1
1833 EOF
1834
1835 else
1836 echo "$ac_t""no" 1>&6
1837 fi
1838 done
1839
1840 for ac_func in getpagesize
1841 do
1842 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1843 echo "configure:1844: checking for $ac_func" >&5
1844 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847 cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850 /* System header to define __stub macros and hopefully few prototypes,
1851 which can conflict with char $ac_func(); below. */
1852 #include <assert.h>
1853 /* Override any gcc2 internal prototype to avoid an error. */
1854 /* We use char because int might match the return type of a gcc2
1855 builtin and then its argument prototype would still apply. */
1856 char $ac_func();
1857
1858 int main() {
1859
1860 /* The GNU C library defines this for functions which it implements
1861 to always fail with ENOSYS. Some functions are actually named
1862 something starting with __ and the normal name is an alias. */
1863 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1864 choke me
1865 #else
1866 $ac_func();
1867 #endif
1868
1869 ; return 0; }
1870 EOF
1871 if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1872 rm -rf conftest*
1873 eval "ac_cv_func_$ac_func=yes"
1874 else
1875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 rm -rf conftest*
1878 eval "ac_cv_func_$ac_func=no"
1879 fi
1880 rm -f conftest*
1881 fi
1882
1883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1884 echo "$ac_t""yes" 1>&6
1885 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1886 cat >> confdefs.h <<EOF
1887 #define $ac_tr_func 1
1888 EOF
1889
1890 else
1891 echo "$ac_t""no" 1>&6
1892 fi
1893 done
1894
1895 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1896 echo "configure:1897: checking for working mmap" >&5
1897 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1899 else
1900 if test "$cross_compiling" = yes; then
1901 ac_cv_func_mmap_fixed_mapped=no
1902 else
1903 cat > conftest.$ac_ext <<EOF
1904 #line 1905 "configure"
1905 #include "confdefs.h"
1906
1907 /* Thanks to Mike Haertel and Jim Avera for this test.
1908 Here is a matrix of mmap possibilities:
1909 mmap private not fixed
1910 mmap private fixed at somewhere currently unmapped
1911 mmap private fixed at somewhere already mapped
1912 mmap shared not fixed
1913 mmap shared fixed at somewhere currently unmapped
1914 mmap shared fixed at somewhere already mapped
1915 For private mappings, we should verify that changes cannot be read()
1916 back from the file, nor mmap's back from the file at a different
1917 address. (There have been systems where private was not correctly
1918 implemented like the infamous i386 svr4.0, and systems where the
1919 VM page cache was not coherent with the filesystem buffer cache
1920 like early versions of FreeBSD and possibly contemporary NetBSD.)
1921 For shared mappings, we should conversely verify that changes get
1922 propogated back to all the places they're supposed to be.
1923
1924 Grep wants private fixed already mapped.
1925 The main things grep needs to know about mmap are:
1926 * does it exist and is it safe to write into the mmap'd area
1927 * how to use it (BSD variants) */
1928 #include <sys/types.h>
1929 #include <fcntl.h>
1930 #include <sys/mman.h>
1931
1932 /* This mess was copied from the GNU getpagesize.h. */
1933 #ifndef HAVE_GETPAGESIZE
1934 # ifdef HAVE_UNISTD_H
1935 # include <unistd.h>
1936 # endif
1937
1938 /* Assume that all systems that can run configure have sys/param.h. */
1939 # ifndef HAVE_SYS_PARAM_H
1940 # define HAVE_SYS_PARAM_H 1
1941 # endif
1942
1943 # ifdef _SC_PAGESIZE
1944 # define getpagesize() sysconf(_SC_PAGESIZE)
1945 # else /* no _SC_PAGESIZE */
1946 # ifdef HAVE_SYS_PARAM_H
1947 # include <sys/param.h>
1948 # ifdef EXEC_PAGESIZE
1949 # define getpagesize() EXEC_PAGESIZE
1950 # else /* no EXEC_PAGESIZE */
1951 # ifdef NBPG
1952 # define getpagesize() NBPG * CLSIZE
1953 # ifndef CLSIZE
1954 # define CLSIZE 1
1955 # endif /* no CLSIZE */
1956 # else /* no NBPG */
1957 # ifdef NBPC
1958 # define getpagesize() NBPC
1959 # else /* no NBPC */
1960 # ifdef PAGESIZE
1961 # define getpagesize() PAGESIZE
1962 # endif /* PAGESIZE */
1963 # endif /* no NBPC */
1964 # endif /* no NBPG */
1965 # endif /* no EXEC_PAGESIZE */
1966 # else /* no HAVE_SYS_PARAM_H */
1967 # define getpagesize() 8192 /* punt totally */
1968 # endif /* no HAVE_SYS_PARAM_H */
1969 # endif /* no _SC_PAGESIZE */
1970
1971 #endif /* no HAVE_GETPAGESIZE */
1972
1973 #ifdef __cplusplus
1974 extern "C" { void *malloc(unsigned); }
1975 #else
1976 char *malloc();
1977 #endif
1978
1979 int
1980 main()
1981 {
1982 char *data, *data2, *data3;
1983 int i, pagesize;
1984 int fd;
1985
1986 pagesize = getpagesize();
1987
1988 /*
1989 * First, make a file with some known garbage in it.
1990 */
1991 data = malloc(pagesize);
1992 if (!data)
1993 exit(1);
1994 for (i = 0; i < pagesize; ++i)
1995 *(data + i) = rand();
1996 umask(0);
1997 fd = creat("conftestmmap", 0600);
1998 if (fd < 0)
1999 exit(1);
2000 if (write(fd, data, pagesize) != pagesize)
2001 exit(1);
2002 close(fd);
2003
2004 /*
2005 * Next, try to mmap the file at a fixed address which
2006 * already has something else allocated at it. If we can,
2007 * also make sure that we see the same garbage.
2008 */
2009 fd = open("conftestmmap", O_RDWR);
2010 if (fd < 0)
2011 exit(1);
2012 data2 = malloc(2 * pagesize);
2013 if (!data2)
2014 exit(1);
2015 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2016 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2017 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2018 exit(1);
2019 for (i = 0; i < pagesize; ++i)
2020 if (*(data + i) != *(data2 + i))
2021 exit(1);
2022
2023 /*
2024 * Finally, make sure that changes to the mapped area
2025 * do not percolate back to the file as seen by read().
2026 * (This is a bug on some variants of i386 svr4.0.)
2027 */
2028 for (i = 0; i < pagesize; ++i)
2029 *(data2 + i) = *(data2 + i) + 1;
2030 data3 = malloc(pagesize);
2031 if (!data3)
2032 exit(1);
2033 if (read(fd, data3, pagesize) != pagesize)
2034 exit(1);
2035 for (i = 0; i < pagesize; ++i)
2036 if (*(data + i) != *(data3 + i))
2037 exit(1);
2038 close(fd);
2039 unlink("conftestmmap");
2040 exit(0);
2041 }
2042
2043 EOF
2044 if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2045 then
2046 ac_cv_func_mmap_fixed_mapped=yes
2047 else
2048 echo "configure: failed program was:" >&5
2049 cat conftest.$ac_ext >&5
2050 rm -fr conftest*
2051 ac_cv_func_mmap_fixed_mapped=no
2052 fi
2053 rm -fr conftest*
2054 fi
2055
2056 fi
2057
2058 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2059 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2060 cat >> confdefs.h <<\EOF
2061 #define HAVE_MMAP 1
2062 EOF
2063
2064 fi
2065
2066
2067 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2068 unistd.h values.h sys/param.h
2069 do
2070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2072 echo "configure:2073: checking for $ac_hdr" >&5
2073 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2074 echo $ac_n "(cached) $ac_c" 1>&6
2075 else
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <$ac_hdr>
2080 EOF
2081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2082 { (eval echo configure:2083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2084 if test -z "$ac_err"; then
2085 rm -rf conftest*
2086 eval "ac_cv_header_$ac_safe=yes"
2087 else
2088 echo "$ac_err" >&5
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 eval "ac_cv_header_$ac_safe=no"
2093 fi
2094 rm -f conftest*
2095 fi
2096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2097 echo "$ac_t""yes" 1>&6
2098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2099 cat >> confdefs.h <<EOF
2100 #define $ac_tr_hdr 1
2101 EOF
2102
2103 else
2104 echo "$ac_t""no" 1>&6
2105 fi
2106 done
2107
2108 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2109 __argz_count __argz_stringify __argz_next
2110 do
2111 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2112 echo "configure:2113: checking for $ac_func" >&5
2113 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2114 echo $ac_n "(cached) $ac_c" 1>&6
2115 else
2116 cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119 /* System header to define __stub macros and hopefully few prototypes,
2120 which can conflict with char $ac_func(); below. */
2121 #include <assert.h>
2122 /* Override any gcc2 internal prototype to avoid an error. */
2123 /* We use char because int might match the return type of a gcc2
2124 builtin and then its argument prototype would still apply. */
2125 char $ac_func();
2126
2127 int main() {
2128
2129 /* The GNU C library defines this for functions which it implements
2130 to always fail with ENOSYS. Some functions are actually named
2131 something starting with __ and the normal name is an alias. */
2132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2133 choke me
2134 #else
2135 $ac_func();
2136 #endif
2137
2138 ; return 0; }
2139 EOF
2140 if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141 rm -rf conftest*
2142 eval "ac_cv_func_$ac_func=yes"
2143 else
2144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
2146 rm -rf conftest*
2147 eval "ac_cv_func_$ac_func=no"
2148 fi
2149 rm -f conftest*
2150 fi
2151
2152 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2153 echo "$ac_t""yes" 1>&6
2154 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2155 cat >> confdefs.h <<EOF
2156 #define $ac_tr_func 1
2157 EOF
2158
2159 else
2160 echo "$ac_t""no" 1>&6
2161 fi
2162 done
2163
2164
2165 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2166 for ac_func in stpcpy
2167 do
2168 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2169 echo "configure:2170: checking for $ac_func" >&5
2170 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2171 echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173 cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 /* System header to define __stub macros and hopefully few prototypes,
2177 which can conflict with char $ac_func(); below. */
2178 #include <assert.h>
2179 /* Override any gcc2 internal prototype to avoid an error. */
2180 /* We use char because int might match the return type of a gcc2
2181 builtin and then its argument prototype would still apply. */
2182 char $ac_func();
2183
2184 int main() {
2185
2186 /* The GNU C library defines this for functions which it implements
2187 to always fail with ENOSYS. Some functions are actually named
2188 something starting with __ and the normal name is an alias. */
2189 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2190 choke me
2191 #else
2192 $ac_func();
2193 #endif
2194
2195 ; return 0; }
2196 EOF
2197 if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2198 rm -rf conftest*
2199 eval "ac_cv_func_$ac_func=yes"
2200 else
2201 echo "configure: failed program was:" >&5
2202 cat conftest.$ac_ext >&5
2203 rm -rf conftest*
2204 eval "ac_cv_func_$ac_func=no"
2205 fi
2206 rm -f conftest*
2207 fi
2208
2209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2210 echo "$ac_t""yes" 1>&6
2211 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2212 cat >> confdefs.h <<EOF
2213 #define $ac_tr_func 1
2214 EOF
2215
2216 else
2217 echo "$ac_t""no" 1>&6
2218 fi
2219 done
2220
2221 fi
2222 if test "${ac_cv_func_stpcpy}" = "yes"; then
2223 cat >> confdefs.h <<\EOF
2224 #define HAVE_STPCPY 1
2225 EOF
2226
2227 fi
2228
2229 if test $ac_cv_header_locale_h = yes; then
2230 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2231 echo "configure:2232: checking for LC_MESSAGES" >&5
2232 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2233 echo $ac_n "(cached) $ac_c" 1>&6
2234 else
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2238 #include <locale.h>
2239 int main() {
2240 return LC_MESSAGES
2241 ; return 0; }
2242 EOF
2243 if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2244 rm -rf conftest*
2245 am_cv_val_LC_MESSAGES=yes
2246 else
2247 echo "configure: failed program was:" >&5
2248 cat conftest.$ac_ext >&5
2249 rm -rf conftest*
2250 am_cv_val_LC_MESSAGES=no
2251 fi
2252 rm -f conftest*
2253 fi
2254
2255 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2256 if test $am_cv_val_LC_MESSAGES = yes; then
2257 cat >> confdefs.h <<\EOF
2258 #define HAVE_LC_MESSAGES 1
2259 EOF
2260
2261 fi
2262 fi
2263 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2264 echo "configure:2265: checking whether NLS is requested" >&5
2265 # Check whether --enable-nls or --disable-nls was given.
2266 if test "${enable_nls+set}" = set; then
2267 enableval="$enable_nls"
2268 USE_NLS=$enableval
2269 else
2270 USE_NLS=yes
2271 fi
2272
2273 echo "$ac_t""$USE_NLS" 1>&6
2274
2275
2276 USE_INCLUDED_LIBINTL=no
2277
2278 if test "$USE_NLS" = "yes"; then
2279 cat >> confdefs.h <<\EOF
2280 #define ENABLE_NLS 1
2281 EOF
2282
2283 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2284 echo "configure:2285: checking whether included gettext is requested" >&5
2285 # Check whether --with-included-gettext or --without-included-gettext was given.
2286 if test "${with_included_gettext+set}" = set; then
2287 withval="$with_included_gettext"
2288 nls_cv_force_use_gnu_gettext=$withval
2289 else
2290 nls_cv_force_use_gnu_gettext=no
2291 fi
2292
2293 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2294
2295 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2296 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2297 nls_cv_header_intl=
2298 nls_cv_header_libgt=
2299 CATOBJEXT=NONE
2300
2301 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2302 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2303 echo "configure:2304: checking for libintl.h" >&5
2304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2305 echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307 cat > conftest.$ac_ext <<EOF
2308 #line 2309 "configure"
2309 #include "confdefs.h"
2310 #include <libintl.h>
2311 EOF
2312 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2313 { (eval echo configure:2314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2314 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2315 if test -z "$ac_err"; then
2316 rm -rf conftest*
2317 eval "ac_cv_header_$ac_safe=yes"
2318 else
2319 echo "$ac_err" >&5
2320 echo "configure: failed program was:" >&5
2321 cat conftest.$ac_ext >&5
2322 rm -rf conftest*
2323 eval "ac_cv_header_$ac_safe=no"
2324 fi
2325 rm -f conftest*
2326 fi
2327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2328 echo "$ac_t""yes" 1>&6
2329 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2330 echo "configure:2331: checking for gettext in libc" >&5
2331 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
2333 else
2334 cat > conftest.$ac_ext <<EOF
2335 #line 2336 "configure"
2336 #include "confdefs.h"
2337 #include <libintl.h>
2338 int main() {
2339 return (int) gettext ("")
2340 ; return 0; }
2341 EOF
2342 if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2343 rm -rf conftest*
2344 gt_cv_func_gettext_libc=yes
2345 else
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2348 rm -rf conftest*
2349 gt_cv_func_gettext_libc=no
2350 fi
2351 rm -f conftest*
2352 fi
2353
2354 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2355
2356 if test "$gt_cv_func_gettext_libc" != "yes"; then
2357 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2358 echo "configure:2359: checking for bindtextdomain in -lintl" >&5
2359 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2361 echo $ac_n "(cached) $ac_c" 1>&6
2362 else
2363 ac_save_LIBS="$LIBS"
2364 LIBS="-lintl $LIBS"
2365 cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 /* Override any gcc2 internal prototype to avoid an error. */
2369 /* We use char because int might match the return type of a gcc2
2370 builtin and then its argument prototype would still apply. */
2371 char bindtextdomain();
2372
2373 int main() {
2374 bindtextdomain()
2375 ; return 0; }
2376 EOF
2377 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2378 rm -rf conftest*
2379 eval "ac_cv_lib_$ac_lib_var=yes"
2380 else
2381 echo "configure: failed program was:" >&5
2382 cat conftest.$ac_ext >&5
2383 rm -rf conftest*
2384 eval "ac_cv_lib_$ac_lib_var=no"
2385 fi
2386 rm -f conftest*
2387 LIBS="$ac_save_LIBS"
2388
2389 fi
2390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2391 echo "$ac_t""yes" 1>&6
2392 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2393 echo "configure:2394: checking for gettext in libintl" >&5
2394 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2396 else
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400
2401 int main() {
2402 return (int) gettext ("")
2403 ; return 0; }
2404 EOF
2405 if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2406 rm -rf conftest*
2407 gt_cv_func_gettext_libintl=yes
2408 else
2409 echo "configure: failed program was:" >&5
2410 cat conftest.$ac_ext >&5
2411 rm -rf conftest*
2412 gt_cv_func_gettext_libintl=no
2413 fi
2414 rm -f conftest*
2415 fi
2416
2417 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2418 else
2419 echo "$ac_t""no" 1>&6
2420 fi
2421
2422 fi
2423
2424 if test "$gt_cv_func_gettext_libc" = "yes" \
2425 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2426 cat >> confdefs.h <<\EOF
2427 #define HAVE_GETTEXT 1
2428 EOF
2429
2430 # Extract the first word of "msgfmt", so it can be a program name with args.
2431 set dummy msgfmt; ac_word=$2
2432 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2433 echo "configure:2434: checking for $ac_word" >&5
2434 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2435 echo $ac_n "(cached) $ac_c" 1>&6
2436 else
2437 case "$MSGFMT" in
2438 /*)
2439 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2440 ;;
2441 *)
2442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2443 for ac_dir in $PATH; do
2444 test -z "$ac_dir" && ac_dir=.
2445 if test -f $ac_dir/$ac_word; then
2446 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2447 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2448 break
2449 fi
2450 fi
2451 done
2452 IFS="$ac_save_ifs"
2453 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2454 ;;
2455 esac
2456 fi
2457 MSGFMT="$ac_cv_path_MSGFMT"
2458 if test -n "$MSGFMT"; then
2459 echo "$ac_t""$MSGFMT" 1>&6
2460 else
2461 echo "$ac_t""no" 1>&6
2462 fi
2463 if test "$MSGFMT" != "no"; then
2464 for ac_func in dcgettext
2465 do
2466 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2467 echo "configure:2468: checking for $ac_func" >&5
2468 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2469 echo $ac_n "(cached) $ac_c" 1>&6
2470 else
2471 cat > conftest.$ac_ext <<EOF
2472 #line 2473 "configure"
2473 #include "confdefs.h"
2474 /* System header to define __stub macros and hopefully few prototypes,
2475 which can conflict with char $ac_func(); below. */
2476 #include <assert.h>
2477 /* Override any gcc2 internal prototype to avoid an error. */
2478 /* We use char because int might match the return type of a gcc2
2479 builtin and then its argument prototype would still apply. */
2480 char $ac_func();
2481
2482 int main() {
2483
2484 /* The GNU C library defines this for functions which it implements
2485 to always fail with ENOSYS. Some functions are actually named
2486 something starting with __ and the normal name is an alias. */
2487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2488 choke me
2489 #else
2490 $ac_func();
2491 #endif
2492
2493 ; return 0; }
2494 EOF
2495 if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2496 rm -rf conftest*
2497 eval "ac_cv_func_$ac_func=yes"
2498 else
2499 echo "configure: failed program was:" >&5
2500 cat conftest.$ac_ext >&5
2501 rm -rf conftest*
2502 eval "ac_cv_func_$ac_func=no"
2503 fi
2504 rm -f conftest*
2505 fi
2506
2507 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2508 echo "$ac_t""yes" 1>&6
2509 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2510 cat >> confdefs.h <<EOF
2511 #define $ac_tr_func 1
2512 EOF
2513
2514 else
2515 echo "$ac_t""no" 1>&6
2516 fi
2517 done
2518
2519 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2520 set dummy gmsgfmt; ac_word=$2
2521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2522 echo "configure:2523: checking for $ac_word" >&5
2523 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2524 echo $ac_n "(cached) $ac_c" 1>&6
2525 else
2526 case "$GMSGFMT" in
2527 /*)
2528 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2529 ;;
2530 ?:/*)
2531 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2532 ;;
2533 *)
2534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2535 ac_dummy="$PATH"
2536 for ac_dir in $ac_dummy; do
2537 test -z "$ac_dir" && ac_dir=.
2538 if test -f $ac_dir/$ac_word; then
2539 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2540 break
2541 fi
2542 done
2543 IFS="$ac_save_ifs"
2544 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2545 ;;
2546 esac
2547 fi
2548 GMSGFMT="$ac_cv_path_GMSGFMT"
2549 if test -n "$GMSGFMT"; then
2550 echo "$ac_t""$GMSGFMT" 1>&6
2551 else
2552 echo "$ac_t""no" 1>&6
2553 fi
2554
2555 # Extract the first word of "xgettext", so it can be a program name with args.
2556 set dummy xgettext; ac_word=$2
2557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2558 echo "configure:2559: checking for $ac_word" >&5
2559 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2560 echo $ac_n "(cached) $ac_c" 1>&6
2561 else
2562 case "$XGETTEXT" in
2563 /*)
2564 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2565 ;;
2566 *)
2567 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2568 for ac_dir in $PATH; do
2569 test -z "$ac_dir" && ac_dir=.
2570 if test -f $ac_dir/$ac_word; then
2571 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2572 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2573 break
2574 fi
2575 fi
2576 done
2577 IFS="$ac_save_ifs"
2578 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2579 ;;
2580 esac
2581 fi
2582 XGETTEXT="$ac_cv_path_XGETTEXT"
2583 if test -n "$XGETTEXT"; then
2584 echo "$ac_t""$XGETTEXT" 1>&6
2585 else
2586 echo "$ac_t""no" 1>&6
2587 fi
2588
2589 cat > conftest.$ac_ext <<EOF
2590 #line 2591 "configure"
2591 #include "confdefs.h"
2592
2593 int main() {
2594 extern int _nl_msg_cat_cntr;
2595 return _nl_msg_cat_cntr
2596 ; return 0; }
2597 EOF
2598 if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2599 rm -rf conftest*
2600 CATOBJEXT=.gmo
2601 DATADIRNAME=share
2602 else
2603 echo "configure: failed program was:" >&5
2604 cat conftest.$ac_ext >&5
2605 rm -rf conftest*
2606 CATOBJEXT=.mo
2607 DATADIRNAME=lib
2608 fi
2609 rm -f conftest*
2610 INSTOBJEXT=.mo
2611 fi
2612 fi
2613
2614 else
2615 echo "$ac_t""no" 1>&6
2616 fi
2617
2618
2619
2620 if test "$CATOBJEXT" = "NONE"; then
2621 nls_cv_use_gnu_gettext=yes
2622 fi
2623 fi
2624
2625 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2626 INTLOBJS="\$(GETTOBJS)"
2627 # Extract the first word of "msgfmt", so it can be a program name with args.
2628 set dummy msgfmt; ac_word=$2
2629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2630 echo "configure:2631: checking for $ac_word" >&5
2631 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634 case "$MSGFMT" in
2635 /*)
2636 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2637 ;;
2638 *)
2639 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2640 for ac_dir in $PATH; do
2641 test -z "$ac_dir" && ac_dir=.
2642 if test -f $ac_dir/$ac_word; then
2643 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2644 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2645 break
2646 fi
2647 fi
2648 done
2649 IFS="$ac_save_ifs"
2650 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2651 ;;
2652 esac
2653 fi
2654 MSGFMT="$ac_cv_path_MSGFMT"
2655 if test -n "$MSGFMT"; then
2656 echo "$ac_t""$MSGFMT" 1>&6
2657 else
2658 echo "$ac_t""no" 1>&6
2659 fi
2660
2661 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2662 set dummy gmsgfmt; ac_word=$2
2663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2664 echo "configure:2665: checking for $ac_word" >&5
2665 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2666 echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668 case "$GMSGFMT" in
2669 /*)
2670 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2671 ;;
2672 ?:/*)
2673 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2674 ;;
2675 *)
2676 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2677 ac_dummy="$PATH"
2678 for ac_dir in $ac_dummy; do
2679 test -z "$ac_dir" && ac_dir=.
2680 if test -f $ac_dir/$ac_word; then
2681 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2682 break
2683 fi
2684 done
2685 IFS="$ac_save_ifs"
2686 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2687 ;;
2688 esac
2689 fi
2690 GMSGFMT="$ac_cv_path_GMSGFMT"
2691 if test -n "$GMSGFMT"; then
2692 echo "$ac_t""$GMSGFMT" 1>&6
2693 else
2694 echo "$ac_t""no" 1>&6
2695 fi
2696
2697 # Extract the first word of "xgettext", so it can be a program name with args.
2698 set dummy xgettext; ac_word=$2
2699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2700 echo "configure:2701: checking for $ac_word" >&5
2701 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2702 echo $ac_n "(cached) $ac_c" 1>&6
2703 else
2704 case "$XGETTEXT" in
2705 /*)
2706 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2707 ;;
2708 *)
2709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2710 for ac_dir in $PATH; do
2711 test -z "$ac_dir" && ac_dir=.
2712 if test -f $ac_dir/$ac_word; then
2713 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2714 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2715 break
2716 fi
2717 fi
2718 done
2719 IFS="$ac_save_ifs"
2720 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2721 ;;
2722 esac
2723 fi
2724 XGETTEXT="$ac_cv_path_XGETTEXT"
2725 if test -n "$XGETTEXT"; then
2726 echo "$ac_t""$XGETTEXT" 1>&6
2727 else
2728 echo "$ac_t""no" 1>&6
2729 fi
2730
2731
2732 USE_INCLUDED_LIBINTL=yes
2733 CATOBJEXT=.gmo
2734 INSTOBJEXT=.mo
2735 DATADIRNAME=share
2736 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2737 INTLLIBS=$INTLDEPS
2738 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2739 nls_cv_header_intl=libintl.h
2740 nls_cv_header_libgt=libgettext.h
2741 fi
2742
2743 if test "$XGETTEXT" != ":"; then
2744 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2745 : ;
2746 else
2747 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2748 XGETTEXT=":"
2749 fi
2750 fi
2751
2752 # We need to process the po/ directory.
2753 POSUB=po
2754 else
2755 DATADIRNAME=share
2756 nls_cv_header_intl=libintl.h
2757 nls_cv_header_libgt=libgettext.h
2758 fi
2759
2760 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2761 # because some of the sources are only built for this goal.
2762 if test "$PACKAGE" = gettext; then
2763 USE_NLS=yes
2764 USE_INCLUDED_LIBINTL=yes
2765 fi
2766
2767 for lang in $ALL_LINGUAS; do
2768 GMOFILES="$GMOFILES $lang.gmo"
2769 POFILES="$POFILES $lang.po"
2770 done
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785 if test "x$CATOBJEXT" != "x"; then
2786 if test "x$ALL_LINGUAS" = "x"; then
2787 LINGUAS=
2788 else
2789 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2790 echo "configure:2791: checking for catalogs to be installed" >&5
2791 NEW_LINGUAS=
2792 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2793 case "$ALL_LINGUAS" in
2794 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2795 esac
2796 done
2797 LINGUAS=$NEW_LINGUAS
2798 echo "$ac_t""$LINGUAS" 1>&6
2799 fi
2800
2801 if test -n "$LINGUAS"; then
2802 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2803 fi
2804 fi
2805
2806 if test $ac_cv_header_locale_h = yes; then
2807 INCLUDE_LOCALE_H="#include <locale.h>"
2808 else
2809 INCLUDE_LOCALE_H="\
2810 /* The system does not provide the header <locale.h>. Take care yourself. */"
2811 fi
2812
2813
2814 if test -f $srcdir/po2tbl.sed.in; then
2815 if test "$CATOBJEXT" = ".cat"; then
2816 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2817 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2818 echo "configure:2819: checking for linux/version.h" >&5
2819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
2821 else
2822 cat > conftest.$ac_ext <<EOF
2823 #line 2824 "configure"
2824 #include "confdefs.h"
2825 #include <linux/version.h>
2826 EOF
2827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2828 { (eval echo configure:2829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2830 if test -z "$ac_err"; then
2831 rm -rf conftest*
2832 eval "ac_cv_header_$ac_safe=yes"
2833 else
2834 echo "$ac_err" >&5
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
2837 rm -rf conftest*
2838 eval "ac_cv_header_$ac_safe=no"
2839 fi
2840 rm -f conftest*
2841 fi
2842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2843 echo "$ac_t""yes" 1>&6
2844 msgformat=linux
2845 else
2846 echo "$ac_t""no" 1>&6
2847 msgformat=xopen
2848 fi
2849
2850
2851 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2852 fi
2853 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2854 $srcdir/po2tbl.sed.in > po2tbl.sed
2855 fi
2856
2857 if test "$PACKAGE" = "gettext"; then
2858 GT_NO="#NO#"
2859 GT_YES=
2860 else
2861 GT_NO=
2862 GT_YES="#YES#"
2863 fi
2864
2865
2866
2867 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2868
2869
2870 l=
2871
2872
2873 if test -f $srcdir/po/POTFILES.in; then
2874 test -d po || mkdir po
2875 if test "x$srcdir" != "x."; then
2876 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2877 posrcprefix="$srcdir/"
2878 else
2879 posrcprefix="../$srcdir/"
2880 fi
2881 else
2882 posrcprefix="../"
2883 fi
2884 rm -f po/POTFILES
2885 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2886 < $srcdir/po/POTFILES.in > po/POTFILES
2887 fi
2888
2889 cat >> confdefs.h <<\EOF
2890 #define PACKAGE "gdb"
2891 EOF
2892
2893
2894 debugdir=${libdir}/debug
2895
2896 # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2897 if test "${with_separate_debug_dir+set}" = set; then
2898 withval="$with_separate_debug_dir"
2899 debugdir="${withval}"
2900 fi
2901
2902
2903
2904 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2905 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2906 ac_define_dir=`eval echo $debugdir`
2907 ac_define_dir=`eval echo $ac_define_dir`
2908 cat >> confdefs.h <<EOF
2909 #define DEBUGDIR "$ac_define_dir"
2910 EOF
2911
2912
2913 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
2914
2915
2916 CONFIG_OBS=
2917 CONFIG_DEPS=
2918 CONFIG_SRCS=
2919 ENABLE_CFLAGS=
2920 CONFIG_ALL=
2921 CONFIG_CLEAN=
2922 CONFIG_INSTALL=
2923 CONFIG_UNINSTALL=
2924
2925 subdirs="doc testsuite"
2926
2927 configdirs=
2928
2929 . $srcdir/configure.host
2930
2931 . $srcdir/configure.tgt
2932
2933 # Fetch the default architecture and default target vector from BFD.
2934 targ=$target; . $srcdir/../bfd/config.bfd
2935
2936 # We only want the first architecture, so strip off the others if
2937 # there is more than one.
2938 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2939
2940 if test "x$targ_archs" != x; then
2941 cat >> confdefs.h <<EOF
2942 #define DEFAULT_BFD_ARCH $targ_archs
2943 EOF
2944
2945 fi
2946 if test "x$targ_defvec" != x; then
2947 cat >> confdefs.h <<EOF
2948 #define DEFAULT_BFD_VEC $targ_defvec
2949 EOF
2950
2951 fi
2952
2953 if test "$program_transform_name" = s,x,x,; then
2954 program_transform_name=
2955 else
2956 # Double any \ or $. echo might interpret backslashes.
2957 cat <<\EOF_SED > conftestsed
2958 s,\\,\\\\,g; s,\$,$$,g
2959 EOF_SED
2960 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2961 rm -f conftestsed
2962 fi
2963 test "$program_prefix" != NONE &&
2964 program_transform_name="s,^,${program_prefix},; $program_transform_name"
2965 # Use a double $ so make ignores it.
2966 test "$program_suffix" != NONE &&
2967 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2968
2969 # sed with no file args requires a program.
2970 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2971
2972
2973 # The CLI cannot be disabled yet, but may be in the future.
2974
2975 # Enable CLI.
2976 # Check whether --enable-gdbcli or --disable-gdbcli was given.
2977 if test "${enable_gdbcli+set}" = set; then
2978 enableval="$enable_gdbcli"
2979 case $enableval in
2980 yes)
2981 ;;
2982 no)
2983 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2984 *)
2985 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2986 esac
2987 else
2988 enable_gdbcli=yes
2989 fi
2990
2991 if test x"$enable_gdbcli" = xyes; then
2992 if test -d $srcdir/cli; then
2993 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2994 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2995 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2996 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
2997 fi
2998 fi
2999
3000 # Enable MI.
3001 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3002 if test "${enable_gdbmi+set}" = set; then
3003 enableval="$enable_gdbmi"
3004 case $enableval in
3005 yes | no)
3006 ;;
3007 *)
3008 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3009 esac
3010 else
3011 enable_gdbmi=yes
3012 fi
3013
3014 if test x"$enable_gdbmi" = xyes; then
3015 if test -d $srcdir/mi; then
3016 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3017 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3018 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3019 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3020 fi
3021 fi
3022
3023 # Enable TUI.
3024 # Check whether --enable-tui or --disable-tui was given.
3025 if test "${enable_tui+set}" = set; then
3026 enableval="$enable_tui"
3027 case $enableval in
3028 yes | no)
3029 ;;
3030 *)
3031 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3032 esac
3033 else
3034 enable_tui=yes
3035 fi
3036
3037 if test x"$enable_tui" = xyes; then
3038 if test -d $srcdir/tui; then
3039 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
3040 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3041 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3042 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3043 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3044 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3045 CONFIG_ALL="${CONFIG_ALL} all-tui"
3046 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3047 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3048 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
3049 fi
3050 fi
3051 fi
3052
3053 # Enable gdbtk.
3054 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3055 if test "${enable_gdbtk+set}" = set; then
3056 enableval="$enable_gdbtk"
3057 case $enableval in
3058 yes | no)
3059 ;;
3060 *)
3061 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3062 esac
3063 else
3064 if test -d $srcdir/gdbtk; then
3065 enable_gdbtk=yes
3066 else
3067 enable_gdbtk=no
3068 fi
3069 fi
3070
3071 # We unconditionally disable gdbtk tests on selected platforms.
3072 case $host_os in
3073 go32* | windows*)
3074 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3075 enable_gdbtk=no ;;
3076 esac
3077
3078 # Libunwind support.
3079 # Check whether --with-libunwind or --without-libunwind was given.
3080 if test "${with_libunwind+set}" = set; then
3081 withval="$with_libunwind"
3082 case "${withval}" in
3083 yes) enable_libunwind=yes ;;
3084 no) enable_libunwind=no ;;
3085 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3086 esac
3087 else
3088
3089 for ac_hdr in libunwind.h
3090 do
3091 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3092 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3093 echo "configure:3094: checking for $ac_hdr" >&5
3094 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3095 echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097 cat > conftest.$ac_ext <<EOF
3098 #line 3099 "configure"
3099 #include "confdefs.h"
3100 #include <$ac_hdr>
3101 EOF
3102 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3103 { (eval echo configure:3104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3104 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3105 if test -z "$ac_err"; then
3106 rm -rf conftest*
3107 eval "ac_cv_header_$ac_safe=yes"
3108 else
3109 echo "$ac_err" >&5
3110 echo "configure: failed program was:" >&5
3111 cat conftest.$ac_ext >&5
3112 rm -rf conftest*
3113 eval "ac_cv_header_$ac_safe=no"
3114 fi
3115 rm -f conftest*
3116 fi
3117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3118 echo "$ac_t""yes" 1>&6
3119 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3120 cat >> confdefs.h <<EOF
3121 #define $ac_tr_hdr 1
3122 EOF
3123
3124 else
3125 echo "$ac_t""no" 1>&6
3126 fi
3127 done
3128
3129 for ac_hdr in libunwind-ia64.h
3130 do
3131 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3132 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3133 echo "configure:3134: checking for $ac_hdr" >&5
3134 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3135 echo $ac_n "(cached) $ac_c" 1>&6
3136 else
3137 cat > conftest.$ac_ext <<EOF
3138 #line 3139 "configure"
3139 #include "confdefs.h"
3140 #include <$ac_hdr>
3141 EOF
3142 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3143 { (eval echo configure:3144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3144 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3145 if test -z "$ac_err"; then
3146 rm -rf conftest*
3147 eval "ac_cv_header_$ac_safe=yes"
3148 else
3149 echo "$ac_err" >&5
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3152 rm -rf conftest*
3153 eval "ac_cv_header_$ac_safe=no"
3154 fi
3155 rm -f conftest*
3156 fi
3157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3158 echo "$ac_t""yes" 1>&6
3159 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3160 cat >> confdefs.h <<EOF
3161 #define $ac_tr_hdr 1
3162 EOF
3163
3164 else
3165 echo "$ac_t""no" 1>&6
3166 fi
3167 done
3168
3169 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3170 enable_libunwind=yes;
3171 fi
3172
3173 fi
3174
3175
3176 if test x"$enable_libunwind" = xyes; then
3177 for ac_hdr in libunwind.h
3178 do
3179 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3180 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3181 echo "configure:3182: checking for $ac_hdr" >&5
3182 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3183 echo $ac_n "(cached) $ac_c" 1>&6
3184 else
3185 cat > conftest.$ac_ext <<EOF
3186 #line 3187 "configure"
3187 #include "confdefs.h"
3188 #include <$ac_hdr>
3189 EOF
3190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3191 { (eval echo configure:3192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3193 if test -z "$ac_err"; then
3194 rm -rf conftest*
3195 eval "ac_cv_header_$ac_safe=yes"
3196 else
3197 echo "$ac_err" >&5
3198 echo "configure: failed program was:" >&5
3199 cat conftest.$ac_ext >&5
3200 rm -rf conftest*
3201 eval "ac_cv_header_$ac_safe=no"
3202 fi
3203 rm -f conftest*
3204 fi
3205 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3206 echo "$ac_t""yes" 1>&6
3207 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3208 cat >> confdefs.h <<EOF
3209 #define $ac_tr_hdr 1
3210 EOF
3211
3212 else
3213 echo "$ac_t""no" 1>&6
3214 fi
3215 done
3216
3217 for ac_hdr in libunwind-ia64.h
3218 do
3219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3221 echo "configure:3222: checking for $ac_hdr" >&5
3222 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3223 echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225 cat > conftest.$ac_ext <<EOF
3226 #line 3227 "configure"
3227 #include "confdefs.h"
3228 #include <$ac_hdr>
3229 EOF
3230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3231 { (eval echo configure:3232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3233 if test -z "$ac_err"; then
3234 rm -rf conftest*
3235 eval "ac_cv_header_$ac_safe=yes"
3236 else
3237 echo "$ac_err" >&5
3238 echo "configure: failed program was:" >&5
3239 cat conftest.$ac_ext >&5
3240 rm -rf conftest*
3241 eval "ac_cv_header_$ac_safe=no"
3242 fi
3243 rm -f conftest*
3244 fi
3245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3246 echo "$ac_t""yes" 1>&6
3247 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3248 cat >> confdefs.h <<EOF
3249 #define $ac_tr_hdr 1
3250 EOF
3251
3252 else
3253 echo "$ac_t""no" 1>&6
3254 fi
3255 done
3256
3257 cat >> confdefs.h <<\EOF
3258 #define HAVE_LIBUNWIND 1
3259 EOF
3260
3261 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3262 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3263 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3264 fi
3265
3266 # Profiling support.
3267 # Check whether --enable-profiling or --disable-profiling was given.
3268 if test "${enable_profiling+set}" = set; then
3269 enableval="$enable_profiling"
3270 case $enableval in
3271 yes | no)
3272 ;;
3273 *)
3274 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3275 esac
3276 else
3277 enable_profiling=no
3278 fi
3279
3280
3281 for ac_func in monstartup _mcleanup
3282 do
3283 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3284 echo "configure:3285: checking for $ac_func" >&5
3285 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3286 echo $ac_n "(cached) $ac_c" 1>&6
3287 else
3288 cat > conftest.$ac_ext <<EOF
3289 #line 3290 "configure"
3290 #include "confdefs.h"
3291 /* System header to define __stub macros and hopefully few prototypes,
3292 which can conflict with char $ac_func(); below. */
3293 #include <assert.h>
3294 /* Override any gcc2 internal prototype to avoid an error. */
3295 /* We use char because int might match the return type of a gcc2
3296 builtin and then its argument prototype would still apply. */
3297 char $ac_func();
3298
3299 int main() {
3300
3301 /* The GNU C library defines this for functions which it implements
3302 to always fail with ENOSYS. Some functions are actually named
3303 something starting with __ and the normal name is an alias. */
3304 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3305 choke me
3306 #else
3307 $ac_func();
3308 #endif
3309
3310 ; return 0; }
3311 EOF
3312 if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3313 rm -rf conftest*
3314 eval "ac_cv_func_$ac_func=yes"
3315 else
3316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
3318 rm -rf conftest*
3319 eval "ac_cv_func_$ac_func=no"
3320 fi
3321 rm -f conftest*
3322 fi
3323
3324 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3325 echo "$ac_t""yes" 1>&6
3326 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3327 cat >> confdefs.h <<EOF
3328 #define $ac_tr_func 1
3329 EOF
3330
3331 else
3332 echo "$ac_t""no" 1>&6
3333 fi
3334 done
3335
3336 echo $ac_n "checking for _etext""... $ac_c" 1>&6
3337 echo "configure:3338: checking for _etext" >&5
3338 if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3339 echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341 cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <stdlib.h>
3345 extern char _etext;
3346
3347 int main() {
3348 free (&_etext);
3349 ; return 0; }
3350 EOF
3351 if { (eval echo configure:3352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3352 rm -rf conftest*
3353 ac_cv_var__etext=yes
3354 else
3355 echo "configure: failed program was:" >&5
3356 cat conftest.$ac_ext >&5
3357 rm -rf conftest*
3358 ac_cv_var__etext=no
3359 fi
3360 rm -f conftest*
3361 fi
3362
3363 echo "$ac_t""$ac_cv_var__etext" 1>&6
3364 if test $ac_cv_var__etext = yes; then
3365 cat >> confdefs.h <<\EOF
3366 #define HAVE__ETEXT 1
3367 EOF
3368
3369 fi
3370 if test "$enable_profiling" = yes ; then
3371 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3372 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3373 fi
3374 PROFILE_CFLAGS=-pg
3375 OLD_CFLAGS="$CFLAGS"
3376 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3377
3378 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3379 echo "configure:3380: checking whether $CC supports -pg" >&5
3380 if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
3381 echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383 cat > conftest.$ac_ext <<EOF
3384 #line 3385 "configure"
3385 #include "confdefs.h"
3386
3387 int main() {
3388 int x;
3389 ; return 0; }
3390 EOF
3391 if { (eval echo configure:3392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3392 rm -rf conftest*
3393 ac_cv_cc_supports_pg=yes
3394 else
3395 echo "configure: failed program was:" >&5
3396 cat conftest.$ac_ext >&5
3397 rm -rf conftest*
3398 ac_cv_cc_supports_pg=no
3399 fi
3400 rm -f conftest*
3401 fi
3402
3403 echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
3404
3405 if test $ac_cv_cc_supports_pg = no; then
3406 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3407 fi
3408
3409 CFLAGS="$OLD_CFLAGS"
3410 fi
3411
3412 # --------------------- #
3413 # Checks for programs. #
3414 # --------------------- #
3415
3416 for ac_prog in mawk gawk nawk awk
3417 do
3418 # Extract the first word of "$ac_prog", so it can be a program name with args.
3419 set dummy $ac_prog; ac_word=$2
3420 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3421 echo "configure:3422: checking for $ac_word" >&5
3422 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3423 echo $ac_n "(cached) $ac_c" 1>&6
3424 else
3425 if test -n "$AWK"; then
3426 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3427 else
3428 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3429 ac_dummy="$PATH"
3430 for ac_dir in $ac_dummy; do
3431 test -z "$ac_dir" && ac_dir=.
3432 if test -f $ac_dir/$ac_word; then
3433 ac_cv_prog_AWK="$ac_prog"
3434 break
3435 fi
3436 done
3437 IFS="$ac_save_ifs"
3438 fi
3439 fi
3440 AWK="$ac_cv_prog_AWK"
3441 if test -n "$AWK"; then
3442 echo "$ac_t""$AWK" 1>&6
3443 else
3444 echo "$ac_t""no" 1>&6
3445 fi
3446
3447 test -n "$AWK" && break
3448 done
3449
3450 # Find a good install program. We prefer a C program (faster),
3451 # so one script is as good as another. But avoid the broken or
3452 # incompatible versions:
3453 # SysV /etc/install, /usr/sbin/install
3454 # SunOS /usr/etc/install
3455 # IRIX /sbin/install
3456 # AIX /bin/install
3457 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3458 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3459 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3460 # ./install, which can be erroneously created by make from ./install.sh.
3461 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3462 echo "configure:3463: checking for a BSD compatible install" >&5
3463 if test -z "$INSTALL"; then
3464 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3465 echo $ac_n "(cached) $ac_c" 1>&6
3466 else
3467 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3468 for ac_dir in $PATH; do
3469 # Account for people who put trailing slashes in PATH elements.
3470 case "$ac_dir/" in
3471 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3472 *)
3473 # OSF1 and SCO ODT 3.0 have their own names for install.
3474 # Don't use installbsd from OSF since it installs stuff as root
3475 # by default.
3476 for ac_prog in ginstall scoinst install; do
3477 if test -f $ac_dir/$ac_prog; then
3478 if test $ac_prog = install &&
3479 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3480 # AIX install. It has an incompatible calling convention.
3481 :
3482 else
3483 ac_cv_path_install="$ac_dir/$ac_prog -c"
3484 break 2
3485 fi
3486 fi
3487 done
3488 ;;
3489 esac
3490 done
3491 IFS="$ac_save_IFS"
3492
3493 fi
3494 if test "${ac_cv_path_install+set}" = set; then
3495 INSTALL="$ac_cv_path_install"
3496 else
3497 # As a last resort, use the slow shell script. We don't cache a
3498 # path for INSTALL within a source directory, because that will
3499 # break other packages using the cache if that directory is
3500 # removed, or if the path is relative.
3501 INSTALL="$ac_install_sh"
3502 fi
3503 fi
3504 echo "$ac_t""$INSTALL" 1>&6
3505
3506 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3507 # It thinks the first close brace ends the variable substitution.
3508 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3509
3510 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3511
3512 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3513
3514 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3515 echo "configure:3516: checking whether ln -s works" >&5
3516 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3517 echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519 rm -f conftestdata
3520 if ln -s X conftestdata 2>/dev/null
3521 then
3522 rm -f conftestdata
3523 ac_cv_prog_LN_S="ln -s"
3524 else
3525 ac_cv_prog_LN_S=ln
3526 fi
3527 fi
3528 LN_S="$ac_cv_prog_LN_S"
3529 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3530 echo "$ac_t""yes" 1>&6
3531 else
3532 echo "$ac_t""no" 1>&6
3533 fi
3534
3535 # Extract the first word of "ranlib", so it can be a program name with args.
3536 set dummy ranlib; ac_word=$2
3537 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3538 echo "configure:3539: checking for $ac_word" >&5
3539 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3540 echo $ac_n "(cached) $ac_c" 1>&6
3541 else
3542 if test -n "$RANLIB"; then
3543 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3544 else
3545 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3546 ac_dummy="$PATH"
3547 for ac_dir in $ac_dummy; do
3548 test -z "$ac_dir" && ac_dir=.
3549 if test -f $ac_dir/$ac_word; then
3550 ac_cv_prog_RANLIB="ranlib"
3551 break
3552 fi
3553 done
3554 IFS="$ac_save_ifs"
3555 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3556 fi
3557 fi
3558 RANLIB="$ac_cv_prog_RANLIB"
3559 if test -n "$RANLIB"; then
3560 echo "$ac_t""$RANLIB" 1>&6
3561 else
3562 echo "$ac_t""no" 1>&6
3563 fi
3564
3565 for ac_prog in 'bison -y' byacc
3566 do
3567 # Extract the first word of "$ac_prog", so it can be a program name with args.
3568 set dummy $ac_prog; ac_word=$2
3569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3570 echo "configure:3571: checking for $ac_word" >&5
3571 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3573 else
3574 if test -n "$YACC"; then
3575 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3576 else
3577 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3578 ac_dummy="$PATH"
3579 for ac_dir in $ac_dummy; do
3580 test -z "$ac_dir" && ac_dir=.
3581 if test -f $ac_dir/$ac_word; then
3582 ac_cv_prog_YACC="$ac_prog"
3583 break
3584 fi
3585 done
3586 IFS="$ac_save_ifs"
3587 fi
3588 fi
3589 YACC="$ac_cv_prog_YACC"
3590 if test -n "$YACC"; then
3591 echo "$ac_t""$YACC" 1>&6
3592 else
3593 echo "$ac_t""no" 1>&6
3594 fi
3595
3596 test -n "$YACC" && break
3597 done
3598 test -n "$YACC" || YACC="yacc"
3599
3600
3601 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3602 set dummy ${ac_tool_prefix}ar; ac_word=$2
3603 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3604 echo "configure:3605: checking for $ac_word" >&5
3605 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3606 echo $ac_n "(cached) $ac_c" 1>&6
3607 else
3608 if test -n "$AR"; then
3609 ac_cv_prog_AR="$AR" # Let the user override the test.
3610 else
3611 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3612 ac_dummy="$PATH"
3613 for ac_dir in $ac_dummy; do
3614 test -z "$ac_dir" && ac_dir=.
3615 if test -f $ac_dir/$ac_word; then
3616 ac_cv_prog_AR="${ac_tool_prefix}ar"
3617 break
3618 fi
3619 done
3620 IFS="$ac_save_ifs"
3621 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3622 fi
3623 fi
3624 AR="$ac_cv_prog_AR"
3625 if test -n "$AR"; then
3626 echo "$ac_t""$AR" 1>&6
3627 else
3628 echo "$ac_t""no" 1>&6
3629 fi
3630
3631
3632
3633 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3634 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3636 echo "configure:3637: checking for $ac_word" >&5
3637 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3638 echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640 if test -n "$DLLTOOL"; then
3641 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3642 else
3643 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3644 ac_dummy="$PATH"
3645 for ac_dir in $ac_dummy; do
3646 test -z "$ac_dir" && ac_dir=.
3647 if test -f $ac_dir/$ac_word; then
3648 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3649 break
3650 fi
3651 done
3652 IFS="$ac_save_ifs"
3653 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3654 fi
3655 fi
3656 DLLTOOL="$ac_cv_prog_DLLTOOL"
3657 if test -n "$DLLTOOL"; then
3658 echo "$ac_t""$DLLTOOL" 1>&6
3659 else
3660 echo "$ac_t""no" 1>&6
3661 fi
3662
3663
3664
3665 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3666 set dummy ${ac_tool_prefix}windres; ac_word=$2
3667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3668 echo "configure:3669: checking for $ac_word" >&5
3669 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3670 echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672 if test -n "$WINDRES"; then
3673 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3674 else
3675 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3676 ac_dummy="$PATH"
3677 for ac_dir in $ac_dummy; do
3678 test -z "$ac_dir" && ac_dir=.
3679 if test -f $ac_dir/$ac_word; then
3680 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3681 break
3682 fi
3683 done
3684 IFS="$ac_save_ifs"
3685 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3686 fi
3687 fi
3688 WINDRES="$ac_cv_prog_WINDRES"
3689 if test -n "$WINDRES"; then
3690 echo "$ac_t""$WINDRES" 1>&6
3691 else
3692 echo "$ac_t""no" 1>&6
3693 fi
3694
3695
3696
3697
3698 # Needed for GNU/Hurd.
3699 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3700 set dummy ${ac_tool_prefix}mig; ac_word=$2
3701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3702 echo "configure:3703: checking for $ac_word" >&5
3703 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3704 echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706 if test -n "$MIG"; then
3707 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3708 else
3709 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3710 ac_dummy="$PATH"
3711 for ac_dir in $ac_dummy; do
3712 test -z "$ac_dir" && ac_dir=.
3713 if test -f $ac_dir/$ac_word; then
3714 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3715 break
3716 fi
3717 done
3718 IFS="$ac_save_ifs"
3719 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3720 fi
3721 fi
3722 MIG="$ac_cv_prog_MIG"
3723 if test -n "$MIG"; then
3724 echo "$ac_t""$MIG" 1>&6
3725 else
3726 echo "$ac_t""no" 1>&6
3727 fi
3728
3729
3730
3731
3732 # ---------------------- #
3733 # Checks for libraries. #
3734 # ---------------------- #
3735
3736 # We might need to link with -lm; most simulators need it.
3737 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3738 echo "configure:3739: checking for main in -lm" >&5
3739 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3741 echo $ac_n "(cached) $ac_c" 1>&6
3742 else
3743 ac_save_LIBS="$LIBS"
3744 LIBS="-lm $LIBS"
3745 cat > conftest.$ac_ext <<EOF
3746 #line 3747 "configure"
3747 #include "confdefs.h"
3748
3749 int main() {
3750 main()
3751 ; return 0; }
3752 EOF
3753 if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3754 rm -rf conftest*
3755 eval "ac_cv_lib_$ac_lib_var=yes"
3756 else
3757 echo "configure: failed program was:" >&5
3758 cat conftest.$ac_ext >&5
3759 rm -rf conftest*
3760 eval "ac_cv_lib_$ac_lib_var=no"
3761 fi
3762 rm -f conftest*
3763 LIBS="$ac_save_LIBS"
3764
3765 fi
3766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3767 echo "$ac_t""yes" 1>&6
3768 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3769 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3770 cat >> confdefs.h <<EOF
3771 #define $ac_tr_lib 1
3772 EOF
3773
3774 LIBS="-lm $LIBS"
3775
3776 else
3777 echo "$ac_t""no" 1>&6
3778 fi
3779
3780
3781 # We need to link with -lw to get `wctype' on Solaris before Solaris
3782 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3783 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3784 # is known to have this problem). Therefore we avoid libw if we can.
3785 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3786 echo "configure:3787: checking for wctype" >&5
3787 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3788 echo $ac_n "(cached) $ac_c" 1>&6
3789 else
3790 cat > conftest.$ac_ext <<EOF
3791 #line 3792 "configure"
3792 #include "confdefs.h"
3793 /* System header to define __stub macros and hopefully few prototypes,
3794 which can conflict with char wctype(); below. */
3795 #include <assert.h>
3796 /* Override any gcc2 internal prototype to avoid an error. */
3797 /* We use char because int might match the return type of a gcc2
3798 builtin and then its argument prototype would still apply. */
3799 char wctype();
3800
3801 int main() {
3802
3803 /* The GNU C library defines this for functions which it implements
3804 to always fail with ENOSYS. Some functions are actually named
3805 something starting with __ and the normal name is an alias. */
3806 #if defined (__stub_wctype) || defined (__stub___wctype)
3807 choke me
3808 #else
3809 wctype();
3810 #endif
3811
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3815 rm -rf conftest*
3816 eval "ac_cv_func_wctype=yes"
3817 else
3818 echo "configure: failed program was:" >&5
3819 cat conftest.$ac_ext >&5
3820 rm -rf conftest*
3821 eval "ac_cv_func_wctype=no"
3822 fi
3823 rm -f conftest*
3824 fi
3825
3826 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 :
3829 else
3830 echo "$ac_t""no" 1>&6
3831 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3832 echo "configure:3833: checking for wctype in -lw" >&5
3833 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3834 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3835 echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837 ac_save_LIBS="$LIBS"
3838 LIBS="-lw $LIBS"
3839 cat > conftest.$ac_ext <<EOF
3840 #line 3841 "configure"
3841 #include "confdefs.h"
3842 /* Override any gcc2 internal prototype to avoid an error. */
3843 /* We use char because int might match the return type of a gcc2
3844 builtin and then its argument prototype would still apply. */
3845 char wctype();
3846
3847 int main() {
3848 wctype()
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3852 rm -rf conftest*
3853 eval "ac_cv_lib_$ac_lib_var=yes"
3854 else
3855 echo "configure: failed program was:" >&5
3856 cat conftest.$ac_ext >&5
3857 rm -rf conftest*
3858 eval "ac_cv_lib_$ac_lib_var=no"
3859 fi
3860 rm -f conftest*
3861 LIBS="$ac_save_LIBS"
3862
3863 fi
3864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3865 echo "$ac_t""yes" 1>&6
3866 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3867 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3868 cat >> confdefs.h <<EOF
3869 #define $ac_tr_lib 1
3870 EOF
3871
3872 LIBS="-lw $LIBS"
3873
3874 else
3875 echo "$ac_t""no" 1>&6
3876 fi
3877
3878 fi
3879
3880
3881 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3882
3883 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3884 echo "configure:3885: checking for library containing gethostbyname" >&5
3885 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3886 echo $ac_n "(cached) $ac_c" 1>&6
3887 else
3888 ac_func_search_save_LIBS="$LIBS"
3889 ac_cv_search_gethostbyname="no"
3890 cat > conftest.$ac_ext <<EOF
3891 #line 3892 "configure"
3892 #include "confdefs.h"
3893 /* Override any gcc2 internal prototype to avoid an error. */
3894 /* We use char because int might match the return type of a gcc2
3895 builtin and then its argument prototype would still apply. */
3896 char gethostbyname();
3897
3898 int main() {
3899 gethostbyname()
3900 ; return 0; }
3901 EOF
3902 if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3903 rm -rf conftest*
3904 ac_cv_search_gethostbyname="none required"
3905 else
3906 echo "configure: failed program was:" >&5
3907 cat conftest.$ac_ext >&5
3908 fi
3909 rm -f conftest*
3910 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3911 LIBS="-l$i $ac_func_search_save_LIBS"
3912 cat > conftest.$ac_ext <<EOF
3913 #line 3914 "configure"
3914 #include "confdefs.h"
3915 /* Override any gcc2 internal prototype to avoid an error. */
3916 /* We use char because int might match the return type of a gcc2
3917 builtin and then its argument prototype would still apply. */
3918 char gethostbyname();
3919
3920 int main() {
3921 gethostbyname()
3922 ; return 0; }
3923 EOF
3924 if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3925 rm -rf conftest*
3926 ac_cv_search_gethostbyname="-l$i"
3927 break
3928 else
3929 echo "configure: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3931 fi
3932 rm -f conftest*
3933 done
3934 LIBS="$ac_func_search_save_LIBS"
3935 fi
3936
3937 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3938 if test "$ac_cv_search_gethostbyname" != "no"; then
3939 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
3940
3941 else :
3942
3943 fi
3944
3945 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
3946
3947 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
3948 echo "configure:3949: checking for library containing socketpair" >&5
3949 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3950 echo $ac_n "(cached) $ac_c" 1>&6
3951 else
3952 ac_func_search_save_LIBS="$LIBS"
3953 ac_cv_search_socketpair="no"
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 /* Override any gcc2 internal prototype to avoid an error. */
3958 /* We use char because int might match the return type of a gcc2
3959 builtin and then its argument prototype would still apply. */
3960 char socketpair();
3961
3962 int main() {
3963 socketpair()
3964 ; return 0; }
3965 EOF
3966 if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3967 rm -rf conftest*
3968 ac_cv_search_socketpair="none required"
3969 else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 fi
3973 rm -f conftest*
3974 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3975 LIBS="-l$i $ac_func_search_save_LIBS"
3976 cat > conftest.$ac_ext <<EOF
3977 #line 3978 "configure"
3978 #include "confdefs.h"
3979 /* Override any gcc2 internal prototype to avoid an error. */
3980 /* We use char because int might match the return type of a gcc2
3981 builtin and then its argument prototype would still apply. */
3982 char socketpair();
3983
3984 int main() {
3985 socketpair()
3986 ; return 0; }
3987 EOF
3988 if { (eval echo configure:3989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3989 rm -rf conftest*
3990 ac_cv_search_socketpair="-l$i"
3991 break
3992 else
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 fi
3996 rm -f conftest*
3997 done
3998 LIBS="$ac_func_search_save_LIBS"
3999 fi
4000
4001 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4002 if test "$ac_cv_search_socketpair" != "no"; then
4003 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4004
4005 else :
4006
4007 fi
4008
4009 # Since GDB uses Readline, we need termcap functionality, so we need
4010 # to find a library that provides that. When GDB is configured with
4011 # the TUI, we need full curses functionality.
4012
4013 case $host_os in
4014 cygwin*)
4015 if test -d $srcdir/libtermcap; then
4016 LIBS="../libtermcap/libtermcap.a $LIBS"
4017 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4018 fi ;;
4019 go32* | *djgpp*)
4020 ac_cv_search_tgetent="none required"
4021 ;;
4022 aix*)
4023 # Readline prefers curses over termcap on AIX.
4024 # ??? Why?
4025
4026 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4027 echo "configure:4028: checking for library containing tgetent" >&5
4028 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4029 echo $ac_n "(cached) $ac_c" 1>&6
4030 else
4031 ac_func_search_save_LIBS="$LIBS"
4032 ac_cv_search_tgetent="no"
4033 cat > conftest.$ac_ext <<EOF
4034 #line 4035 "configure"
4035 #include "confdefs.h"
4036 /* Override any gcc2 internal prototype to avoid an error. */
4037 /* We use char because int might match the return type of a gcc2
4038 builtin and then its argument prototype would still apply. */
4039 char tgetent();
4040
4041 int main() {
4042 tgetent()
4043 ; return 0; }
4044 EOF
4045 if { (eval echo configure:4046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4046 rm -rf conftest*
4047 ac_cv_search_tgetent="none required"
4048 else
4049 echo "configure: failed program was:" >&5
4050 cat conftest.$ac_ext >&5
4051 fi
4052 rm -f conftest*
4053 test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4054 LIBS="-l$i $ac_func_search_save_LIBS"
4055 cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 /* Override any gcc2 internal prototype to avoid an error. */
4059 /* We use char because int might match the return type of a gcc2
4060 builtin and then its argument prototype would still apply. */
4061 char tgetent();
4062
4063 int main() {
4064 tgetent()
4065 ; return 0; }
4066 EOF
4067 if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4068 rm -rf conftest*
4069 ac_cv_search_tgetent="-l$i"
4070 break
4071 else
4072 echo "configure: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4074 fi
4075 rm -f conftest*
4076 done
4077 LIBS="$ac_func_search_save_LIBS"
4078 fi
4079
4080 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4081 if test "$ac_cv_search_tgetent" != "no"; then
4082 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4083
4084 else :
4085
4086 fi
4087 ;;
4088 esac
4089
4090 # Note: We used to check for libtermlib and libterminfo too, but
4091 # Readline doesn't, so I think we're safe with leaving them out.
4092
4093 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4094 echo "configure:4095: checking for library containing tgetent" >&5
4095 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4096 echo $ac_n "(cached) $ac_c" 1>&6
4097 else
4098 ac_func_search_save_LIBS="$LIBS"
4099 ac_cv_search_tgetent="no"
4100 cat > conftest.$ac_ext <<EOF
4101 #line 4102 "configure"
4102 #include "confdefs.h"
4103 /* Override any gcc2 internal prototype to avoid an error. */
4104 /* We use char because int might match the return type of a gcc2
4105 builtin and then its argument prototype would still apply. */
4106 char tgetent();
4107
4108 int main() {
4109 tgetent()
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4113 rm -rf conftest*
4114 ac_cv_search_tgetent="none required"
4115 else
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4118 fi
4119 rm -f conftest*
4120 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4121 LIBS="-l$i $ac_func_search_save_LIBS"
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 /* Override any gcc2 internal prototype to avoid an error. */
4126 /* We use char because int might match the return type of a gcc2
4127 builtin and then its argument prototype would still apply. */
4128 char tgetent();
4129
4130 int main() {
4131 tgetent()
4132 ; return 0; }
4133 EOF
4134 if { (eval echo configure:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4135 rm -rf conftest*
4136 ac_cv_search_tgetent="-l$i"
4137 break
4138 else
4139 echo "configure: failed program was:" >&5
4140 cat conftest.$ac_ext >&5
4141 fi
4142 rm -f conftest*
4143 done
4144 LIBS="$ac_func_search_save_LIBS"
4145 fi
4146
4147 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4148 if test "$ac_cv_search_tgetent" != "no"; then
4149 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4150
4151 else :
4152
4153 fi
4154
4155 if test "$ac_cv_search_tgetent" = no; then
4156 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4157 fi
4158
4159 # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4160 # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4161 # Makefile fragments. That's why we need to have `Hcurses' before
4162 # `curses'. I don't see why we should use HP curses if a more
4163 # standard curses is available, except that according to HP's
4164 # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4165 # HP-UX 10.10 and 10.20.
4166
4167 # FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
4168 # and probably other platforms. AC_SEARCH_LIBS finds the library
4169 # in a place such as /usr/local/lib/libncurses.a, but does not
4170 # do anything to look for the matching include files.
4171 # -- chastain 2004-05-01
4172
4173
4174 echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4175 echo "configure:4176: checking for library containing initscr" >&5
4176 if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4177 echo $ac_n "(cached) $ac_c" 1>&6
4178 else
4179 ac_func_search_save_LIBS="$LIBS"
4180 ac_cv_search_initscr="no"
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 /* Override any gcc2 internal prototype to avoid an error. */
4185 /* We use char because int might match the return type of a gcc2
4186 builtin and then its argument prototype would still apply. */
4187 char initscr();
4188
4189 int main() {
4190 initscr()
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4194 rm -rf conftest*
4195 ac_cv_search_initscr="none required"
4196 else
4197 echo "configure: failed program was:" >&5
4198 cat conftest.$ac_ext >&5
4199 fi
4200 rm -f conftest*
4201 test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses pdcurses; do
4202 LIBS="-l$i $ac_func_search_save_LIBS"
4203 cat > conftest.$ac_ext <<EOF
4204 #line 4205 "configure"
4205 #include "confdefs.h"
4206 /* Override any gcc2 internal prototype to avoid an error. */
4207 /* We use char because int might match the return type of a gcc2
4208 builtin and then its argument prototype would still apply. */
4209 char initscr();
4210
4211 int main() {
4212 initscr()
4213 ; return 0; }
4214 EOF
4215 if { (eval echo configure:4216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4216 rm -rf conftest*
4217 ac_cv_search_initscr="-l$i"
4218 break
4219 else
4220 echo "configure: failed program was:" >&5
4221 cat conftest.$ac_ext >&5
4222 fi
4223 rm -f conftest*
4224 done
4225 LIBS="$ac_func_search_save_LIBS"
4226 fi
4227
4228 echo "$ac_t""$ac_cv_search_initscr" 1>&6
4229 if test "$ac_cv_search_initscr" != "no"; then
4230 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4231
4232 else :
4233 echo "configure: warning: no curses library found" 1>&2
4234 fi
4235
4236 # Check whether the wborder function is provided by the curses
4237 # library detected above. In certain implementations such as
4238 # the HP/UX Hcurses for instance, this function is provided by an
4239 # additional library. So if we did not find this function inside
4240 # the curses library, try some alternate libraries we know might
4241 # provide it.
4242
4243 echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
4244 echo "configure:4245: checking for library containing wborder" >&5
4245 if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4246 echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248 ac_func_search_save_LIBS="$LIBS"
4249 ac_cv_search_wborder="no"
4250 cat > conftest.$ac_ext <<EOF
4251 #line 4252 "configure"
4252 #include "confdefs.h"
4253 /* Override any gcc2 internal prototype to avoid an error. */
4254 /* We use char because int might match the return type of a gcc2
4255 builtin and then its argument prototype would still apply. */
4256 char wborder();
4257
4258 int main() {
4259 wborder()
4260 ; return 0; }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4263 rm -rf conftest*
4264 ac_cv_search_wborder="none required"
4265 else
4266 echo "configure: failed program was:" >&5
4267 cat conftest.$ac_ext >&5
4268 fi
4269 rm -f conftest*
4270 test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4271 LIBS="-l$i $ac_func_search_save_LIBS"
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 /* Override any gcc2 internal prototype to avoid an error. */
4276 /* We use char because int might match the return type of a gcc2
4277 builtin and then its argument prototype would still apply. */
4278 char wborder();
4279
4280 int main() {
4281 wborder()
4282 ; return 0; }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4285 rm -rf conftest*
4286 ac_cv_search_wborder="-l$i"
4287 break
4288 else
4289 echo "configure: failed program was:" >&5
4290 cat conftest.$ac_ext >&5
4291 fi
4292 rm -f conftest*
4293 done
4294 LIBS="$ac_func_search_save_LIBS"
4295 fi
4296
4297 echo "$ac_t""$ac_cv_search_wborder" 1>&6
4298 if test "$ac_cv_search_wborder" != "no"; then
4299 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4300
4301 else :
4302 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4303 fi
4304
4305 # ------------------------- #
4306 # Checks for header files. #
4307 # ------------------------- #
4308
4309 ac_header_dirent=no
4310 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4311 do
4312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4313 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4314 echo "configure:4315: checking for $ac_hdr that defines DIR" >&5
4315 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4316 echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318 cat > conftest.$ac_ext <<EOF
4319 #line 4320 "configure"
4320 #include "confdefs.h"
4321 #include <sys/types.h>
4322 #include <$ac_hdr>
4323 int main() {
4324 DIR *dirp = 0;
4325 ; return 0; }
4326 EOF
4327 if { (eval echo configure:4328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4328 rm -rf conftest*
4329 eval "ac_cv_header_dirent_$ac_safe=yes"
4330 else
4331 echo "configure: failed program was:" >&5
4332 cat conftest.$ac_ext >&5
4333 rm -rf conftest*
4334 eval "ac_cv_header_dirent_$ac_safe=no"
4335 fi
4336 rm -f conftest*
4337 fi
4338 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4339 echo "$ac_t""yes" 1>&6
4340 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4341 cat >> confdefs.h <<EOF
4342 #define $ac_tr_hdr 1
4343 EOF
4344 ac_header_dirent=$ac_hdr; break
4345 else
4346 echo "$ac_t""no" 1>&6
4347 fi
4348 done
4349 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4350 if test $ac_header_dirent = dirent.h; then
4351 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4352 echo "configure:4353: checking for opendir in -ldir" >&5
4353 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4354 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4355 echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357 ac_save_LIBS="$LIBS"
4358 LIBS="-ldir $LIBS"
4359 cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 /* Override any gcc2 internal prototype to avoid an error. */
4363 /* We use char because int might match the return type of a gcc2
4364 builtin and then its argument prototype would still apply. */
4365 char opendir();
4366
4367 int main() {
4368 opendir()
4369 ; return 0; }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4372 rm -rf conftest*
4373 eval "ac_cv_lib_$ac_lib_var=yes"
4374 else
4375 echo "configure: failed program was:" >&5
4376 cat conftest.$ac_ext >&5
4377 rm -rf conftest*
4378 eval "ac_cv_lib_$ac_lib_var=no"
4379 fi
4380 rm -f conftest*
4381 LIBS="$ac_save_LIBS"
4382
4383 fi
4384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4385 echo "$ac_t""yes" 1>&6
4386 LIBS="$LIBS -ldir"
4387 else
4388 echo "$ac_t""no" 1>&6
4389 fi
4390
4391 else
4392 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4393 echo "configure:4394: checking for opendir in -lx" >&5
4394 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4395 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4396 echo $ac_n "(cached) $ac_c" 1>&6
4397 else
4398 ac_save_LIBS="$LIBS"
4399 LIBS="-lx $LIBS"
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 /* Override any gcc2 internal prototype to avoid an error. */
4404 /* We use char because int might match the return type of a gcc2
4405 builtin and then its argument prototype would still apply. */
4406 char opendir();
4407
4408 int main() {
4409 opendir()
4410 ; return 0; }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4413 rm -rf conftest*
4414 eval "ac_cv_lib_$ac_lib_var=yes"
4415 else
4416 echo "configure: failed program was:" >&5
4417 cat conftest.$ac_ext >&5
4418 rm -rf conftest*
4419 eval "ac_cv_lib_$ac_lib_var=no"
4420 fi
4421 rm -f conftest*
4422 LIBS="$ac_save_LIBS"
4423
4424 fi
4425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4426 echo "$ac_t""yes" 1>&6
4427 LIBS="$LIBS -lx"
4428 else
4429 echo "$ac_t""no" 1>&6
4430 fi
4431
4432 fi
4433
4434 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4435 echo "configure:4436: checking whether stat file-mode macros are broken" >&5
4436 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439 cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4442 #include <sys/types.h>
4443 #include <sys/stat.h>
4444
4445 #if defined(S_ISBLK) && defined(S_IFDIR)
4446 # if S_ISBLK (S_IFDIR)
4447 You lose.
4448 # endif
4449 #endif
4450
4451 #if defined(S_ISBLK) && defined(S_IFCHR)
4452 # if S_ISBLK (S_IFCHR)
4453 You lose.
4454 # endif
4455 #endif
4456
4457 #if defined(S_ISLNK) && defined(S_IFREG)
4458 # if S_ISLNK (S_IFREG)
4459 You lose.
4460 # endif
4461 #endif
4462
4463 #if defined(S_ISSOCK) && defined(S_IFREG)
4464 # if S_ISSOCK (S_IFREG)
4465 You lose.
4466 # endif
4467 #endif
4468
4469 EOF
4470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4471 egrep "You lose" >/dev/null 2>&1; then
4472 rm -rf conftest*
4473 ac_cv_header_stat_broken=yes
4474 else
4475 rm -rf conftest*
4476 ac_cv_header_stat_broken=no
4477 fi
4478 rm -f conftest*
4479
4480 fi
4481
4482 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4483 if test $ac_cv_header_stat_broken = yes; then
4484 cat >> confdefs.h <<\EOF
4485 #define STAT_MACROS_BROKEN 1
4486 EOF
4487
4488 fi
4489
4490 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4491 echo "configure:4492: checking for ANSI C header files" >&5
4492 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4493 echo $ac_n "(cached) $ac_c" 1>&6
4494 else
4495 cat > conftest.$ac_ext <<EOF
4496 #line 4497 "configure"
4497 #include "confdefs.h"
4498 #include <stdlib.h>
4499 #include <stdarg.h>
4500 #include <string.h>
4501 #include <float.h>
4502 EOF
4503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4504 { (eval echo configure:4505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4506 if test -z "$ac_err"; then
4507 rm -rf conftest*
4508 ac_cv_header_stdc=yes
4509 else
4510 echo "$ac_err" >&5
4511 echo "configure: failed program was:" >&5
4512 cat conftest.$ac_ext >&5
4513 rm -rf conftest*
4514 ac_cv_header_stdc=no
4515 fi
4516 rm -f conftest*
4517
4518 if test $ac_cv_header_stdc = yes; then
4519 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4520 cat > conftest.$ac_ext <<EOF
4521 #line 4522 "configure"
4522 #include "confdefs.h"
4523 #include <string.h>
4524 EOF
4525 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4526 egrep "memchr" >/dev/null 2>&1; then
4527 :
4528 else
4529 rm -rf conftest*
4530 ac_cv_header_stdc=no
4531 fi
4532 rm -f conftest*
4533
4534 fi
4535
4536 if test $ac_cv_header_stdc = yes; then
4537 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 #include <stdlib.h>
4542 EOF
4543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4544 egrep "free" >/dev/null 2>&1; then
4545 :
4546 else
4547 rm -rf conftest*
4548 ac_cv_header_stdc=no
4549 fi
4550 rm -f conftest*
4551
4552 fi
4553
4554 if test $ac_cv_header_stdc = yes; then
4555 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4556 if test "$cross_compiling" = yes; then
4557 :
4558 else
4559 cat > conftest.$ac_ext <<EOF
4560 #line 4561 "configure"
4561 #include "confdefs.h"
4562 #include <ctype.h>
4563 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4564 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4565 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4566 int main () { int i; for (i = 0; i < 256; i++)
4567 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4568 exit (0); }
4569
4570 EOF
4571 if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4572 then
4573 :
4574 else
4575 echo "configure: failed program was:" >&5
4576 cat conftest.$ac_ext >&5
4577 rm -fr conftest*
4578 ac_cv_header_stdc=no
4579 fi
4580 rm -fr conftest*
4581 fi
4582
4583 fi
4584 fi
4585
4586 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4587 if test $ac_cv_header_stdc = yes; then
4588 cat >> confdefs.h <<\EOF
4589 #define STDC_HEADERS 1
4590 EOF
4591
4592 fi
4593
4594 for ac_hdr in link.h
4595 do
4596 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4597 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4598 echo "configure:4599: checking for $ac_hdr" >&5
4599 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4600 echo $ac_n "(cached) $ac_c" 1>&6
4601 else
4602 cat > conftest.$ac_ext <<EOF
4603 #line 4604 "configure"
4604 #include "confdefs.h"
4605 #include <$ac_hdr>
4606 EOF
4607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4608 { (eval echo configure:4609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4610 if test -z "$ac_err"; then
4611 rm -rf conftest*
4612 eval "ac_cv_header_$ac_safe=yes"
4613 else
4614 echo "$ac_err" >&5
4615 echo "configure: failed program was:" >&5
4616 cat conftest.$ac_ext >&5
4617 rm -rf conftest*
4618 eval "ac_cv_header_$ac_safe=no"
4619 fi
4620 rm -f conftest*
4621 fi
4622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4623 echo "$ac_t""yes" 1>&6
4624 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4625 cat >> confdefs.h <<EOF
4626 #define $ac_tr_hdr 1
4627 EOF
4628
4629 else
4630 echo "$ac_t""no" 1>&6
4631 fi
4632 done
4633
4634 for ac_hdr in machine/reg.h
4635 do
4636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4638 echo "configure:4639: checking for $ac_hdr" >&5
4639 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4640 echo $ac_n "(cached) $ac_c" 1>&6
4641 else
4642 cat > conftest.$ac_ext <<EOF
4643 #line 4644 "configure"
4644 #include "confdefs.h"
4645 #include <$ac_hdr>
4646 EOF
4647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4648 { (eval echo configure:4649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4650 if test -z "$ac_err"; then
4651 rm -rf conftest*
4652 eval "ac_cv_header_$ac_safe=yes"
4653 else
4654 echo "$ac_err" >&5
4655 echo "configure: failed program was:" >&5
4656 cat conftest.$ac_ext >&5
4657 rm -rf conftest*
4658 eval "ac_cv_header_$ac_safe=no"
4659 fi
4660 rm -f conftest*
4661 fi
4662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4663 echo "$ac_t""yes" 1>&6
4664 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4665 cat >> confdefs.h <<EOF
4666 #define $ac_tr_hdr 1
4667 EOF
4668
4669 else
4670 echo "$ac_t""no" 1>&6
4671 fi
4672 done
4673
4674 for ac_hdr in nlist.h
4675 do
4676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4678 echo "configure:4679: checking for $ac_hdr" >&5
4679 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4680 echo $ac_n "(cached) $ac_c" 1>&6
4681 else
4682 cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 #include <$ac_hdr>
4686 EOF
4687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4688 { (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4690 if test -z "$ac_err"; then
4691 rm -rf conftest*
4692 eval "ac_cv_header_$ac_safe=yes"
4693 else
4694 echo "$ac_err" >&5
4695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -rf conftest*
4698 eval "ac_cv_header_$ac_safe=no"
4699 fi
4700 rm -f conftest*
4701 fi
4702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4703 echo "$ac_t""yes" 1>&6
4704 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4705 cat >> confdefs.h <<EOF
4706 #define $ac_tr_hdr 1
4707 EOF
4708
4709 else
4710 echo "$ac_t""no" 1>&6
4711 fi
4712 done
4713
4714 for ac_hdr in poll.h sys/poll.h
4715 do
4716 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4717 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_hdr" >&5
4719 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4720 echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 #include <$ac_hdr>
4726 EOF
4727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4728 { (eval echo configure:4729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4730 if test -z "$ac_err"; then
4731 rm -rf conftest*
4732 eval "ac_cv_header_$ac_safe=yes"
4733 else
4734 echo "$ac_err" >&5
4735 echo "configure: failed program was:" >&5
4736 cat conftest.$ac_ext >&5
4737 rm -rf conftest*
4738 eval "ac_cv_header_$ac_safe=no"
4739 fi
4740 rm -f conftest*
4741 fi
4742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4743 echo "$ac_t""yes" 1>&6
4744 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4745 cat >> confdefs.h <<EOF
4746 #define $ac_tr_hdr 1
4747 EOF
4748
4749 else
4750 echo "$ac_t""no" 1>&6
4751 fi
4752 done
4753
4754 for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
4755 do
4756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4758 echo "configure:4759: checking for $ac_hdr" >&5
4759 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4760 echo $ac_n "(cached) $ac_c" 1>&6
4761 else
4762 cat > conftest.$ac_ext <<EOF
4763 #line 4764 "configure"
4764 #include "confdefs.h"
4765 #include <$ac_hdr>
4766 EOF
4767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4768 { (eval echo configure:4769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4770 if test -z "$ac_err"; then
4771 rm -rf conftest*
4772 eval "ac_cv_header_$ac_safe=yes"
4773 else
4774 echo "$ac_err" >&5
4775 echo "configure: failed program was:" >&5
4776 cat conftest.$ac_ext >&5
4777 rm -rf conftest*
4778 eval "ac_cv_header_$ac_safe=no"
4779 fi
4780 rm -f conftest*
4781 fi
4782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4783 echo "$ac_t""yes" 1>&6
4784 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4785 cat >> confdefs.h <<EOF
4786 #define $ac_tr_hdr 1
4787 EOF
4788
4789 else
4790 echo "$ac_t""no" 1>&6
4791 fi
4792 done
4793
4794 for ac_hdr in stddef.h
4795 do
4796 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4797 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4798 echo "configure:4799: checking for $ac_hdr" >&5
4799 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4800 echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802 cat > conftest.$ac_ext <<EOF
4803 #line 4804 "configure"
4804 #include "confdefs.h"
4805 #include <$ac_hdr>
4806 EOF
4807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4808 { (eval echo configure:4809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4810 if test -z "$ac_err"; then
4811 rm -rf conftest*
4812 eval "ac_cv_header_$ac_safe=yes"
4813 else
4814 echo "$ac_err" >&5
4815 echo "configure: failed program was:" >&5
4816 cat conftest.$ac_ext >&5
4817 rm -rf conftest*
4818 eval "ac_cv_header_$ac_safe=no"
4819 fi
4820 rm -f conftest*
4821 fi
4822 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4823 echo "$ac_t""yes" 1>&6
4824 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4825 cat >> confdefs.h <<EOF
4826 #define $ac_tr_hdr 1
4827 EOF
4828
4829 else
4830 echo "$ac_t""no" 1>&6
4831 fi
4832 done
4833
4834 for ac_hdr in stdlib.h
4835 do
4836 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4837 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4838 echo "configure:4839: checking for $ac_hdr" >&5
4839 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4840 echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842 cat > conftest.$ac_ext <<EOF
4843 #line 4844 "configure"
4844 #include "confdefs.h"
4845 #include <$ac_hdr>
4846 EOF
4847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4848 { (eval echo configure:4849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4850 if test -z "$ac_err"; then
4851 rm -rf conftest*
4852 eval "ac_cv_header_$ac_safe=yes"
4853 else
4854 echo "$ac_err" >&5
4855 echo "configure: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 rm -rf conftest*
4858 eval "ac_cv_header_$ac_safe=no"
4859 fi
4860 rm -f conftest*
4861 fi
4862 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4863 echo "$ac_t""yes" 1>&6
4864 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4865 cat >> confdefs.h <<EOF
4866 #define $ac_tr_hdr 1
4867 EOF
4868
4869 else
4870 echo "$ac_t""no" 1>&6
4871 fi
4872 done
4873
4874 for ac_hdr in stdint.h
4875 do
4876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4878 echo "configure:4879: checking for $ac_hdr" >&5
4879 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4880 echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4885 #include <$ac_hdr>
4886 EOF
4887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4888 { (eval echo configure:4889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4890 if test -z "$ac_err"; then
4891 rm -rf conftest*
4892 eval "ac_cv_header_$ac_safe=yes"
4893 else
4894 echo "$ac_err" >&5
4895 echo "configure: failed program was:" >&5
4896 cat conftest.$ac_ext >&5
4897 rm -rf conftest*
4898 eval "ac_cv_header_$ac_safe=no"
4899 fi
4900 rm -f conftest*
4901 fi
4902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4903 echo "$ac_t""yes" 1>&6
4904 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4905 cat >> confdefs.h <<EOF
4906 #define $ac_tr_hdr 1
4907 EOF
4908
4909 else
4910 echo "$ac_t""no" 1>&6
4911 fi
4912 done
4913
4914 for ac_hdr in string.h memory.h strings.h
4915 do
4916 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4917 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4918 echo "configure:4919: checking for $ac_hdr" >&5
4919 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4920 echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4925 #include <$ac_hdr>
4926 EOF
4927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4928 { (eval echo configure:4929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4930 if test -z "$ac_err"; then
4931 rm -rf conftest*
4932 eval "ac_cv_header_$ac_safe=yes"
4933 else
4934 echo "$ac_err" >&5
4935 echo "configure: failed program was:" >&5
4936 cat conftest.$ac_ext >&5
4937 rm -rf conftest*
4938 eval "ac_cv_header_$ac_safe=no"
4939 fi
4940 rm -f conftest*
4941 fi
4942 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4943 echo "$ac_t""yes" 1>&6
4944 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4945 cat >> confdefs.h <<EOF
4946 #define $ac_tr_hdr 1
4947 EOF
4948
4949 else
4950 echo "$ac_t""no" 1>&6
4951 fi
4952 done
4953
4954 for ac_hdr in sys/fault.h
4955 do
4956 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4957 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4958 echo "configure:4959: checking for $ac_hdr" >&5
4959 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4960 echo $ac_n "(cached) $ac_c" 1>&6
4961 else
4962 cat > conftest.$ac_ext <<EOF
4963 #line 4964 "configure"
4964 #include "confdefs.h"
4965 #include <$ac_hdr>
4966 EOF
4967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4968 { (eval echo configure:4969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4970 if test -z "$ac_err"; then
4971 rm -rf conftest*
4972 eval "ac_cv_header_$ac_safe=yes"
4973 else
4974 echo "$ac_err" >&5
4975 echo "configure: failed program was:" >&5
4976 cat conftest.$ac_ext >&5
4977 rm -rf conftest*
4978 eval "ac_cv_header_$ac_safe=no"
4979 fi
4980 rm -f conftest*
4981 fi
4982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4983 echo "$ac_t""yes" 1>&6
4984 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4985 cat >> confdefs.h <<EOF
4986 #define $ac_tr_hdr 1
4987 EOF
4988
4989 else
4990 echo "$ac_t""no" 1>&6
4991 fi
4992 done
4993
4994 for ac_hdr in sys/file.h
4995 do
4996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4998 echo "configure:4999: checking for $ac_hdr" >&5
4999 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5000 echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002 cat > conftest.$ac_ext <<EOF
5003 #line 5004 "configure"
5004 #include "confdefs.h"
5005 #include <$ac_hdr>
5006 EOF
5007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5008 { (eval echo configure:5009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5010 if test -z "$ac_err"; then
5011 rm -rf conftest*
5012 eval "ac_cv_header_$ac_safe=yes"
5013 else
5014 echo "$ac_err" >&5
5015 echo "configure: failed program was:" >&5
5016 cat conftest.$ac_ext >&5
5017 rm -rf conftest*
5018 eval "ac_cv_header_$ac_safe=no"
5019 fi
5020 rm -f conftest*
5021 fi
5022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5023 echo "$ac_t""yes" 1>&6
5024 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5025 cat >> confdefs.h <<EOF
5026 #define $ac_tr_hdr 1
5027 EOF
5028
5029 else
5030 echo "$ac_t""no" 1>&6
5031 fi
5032 done
5033
5034 for ac_hdr in sys/filio.h
5035 do
5036 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5037 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5038 echo "configure:5039: checking for $ac_hdr" >&5
5039 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5040 echo $ac_n "(cached) $ac_c" 1>&6
5041 else
5042 cat > conftest.$ac_ext <<EOF
5043 #line 5044 "configure"
5044 #include "confdefs.h"
5045 #include <$ac_hdr>
5046 EOF
5047 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5048 { (eval echo configure:5049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5049 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5050 if test -z "$ac_err"; then
5051 rm -rf conftest*
5052 eval "ac_cv_header_$ac_safe=yes"
5053 else
5054 echo "$ac_err" >&5
5055 echo "configure: failed program was:" >&5
5056 cat conftest.$ac_ext >&5
5057 rm -rf conftest*
5058 eval "ac_cv_header_$ac_safe=no"
5059 fi
5060 rm -f conftest*
5061 fi
5062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5063 echo "$ac_t""yes" 1>&6
5064 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5065 cat >> confdefs.h <<EOF
5066 #define $ac_tr_hdr 1
5067 EOF
5068
5069 else
5070 echo "$ac_t""no" 1>&6
5071 fi
5072 done
5073
5074 for ac_hdr in sys/ioctl.h
5075 do
5076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5078 echo "configure:5079: checking for $ac_hdr" >&5
5079 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5080 echo $ac_n "(cached) $ac_c" 1>&6
5081 else
5082 cat > conftest.$ac_ext <<EOF
5083 #line 5084 "configure"
5084 #include "confdefs.h"
5085 #include <$ac_hdr>
5086 EOF
5087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5088 { (eval echo configure:5089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5090 if test -z "$ac_err"; then
5091 rm -rf conftest*
5092 eval "ac_cv_header_$ac_safe=yes"
5093 else
5094 echo "$ac_err" >&5
5095 echo "configure: failed program was:" >&5
5096 cat conftest.$ac_ext >&5
5097 rm -rf conftest*
5098 eval "ac_cv_header_$ac_safe=no"
5099 fi
5100 rm -f conftest*
5101 fi
5102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5103 echo "$ac_t""yes" 1>&6
5104 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5105 cat >> confdefs.h <<EOF
5106 #define $ac_tr_hdr 1
5107 EOF
5108
5109 else
5110 echo "$ac_t""no" 1>&6
5111 fi
5112 done
5113
5114 for ac_hdr in sys/param.h
5115 do
5116 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5117 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5118 echo "configure:5119: checking for $ac_hdr" >&5
5119 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5120 echo $ac_n "(cached) $ac_c" 1>&6
5121 else
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5125 #include <$ac_hdr>
5126 EOF
5127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5128 { (eval echo configure:5129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5130 if test -z "$ac_err"; then
5131 rm -rf conftest*
5132 eval "ac_cv_header_$ac_safe=yes"
5133 else
5134 echo "$ac_err" >&5
5135 echo "configure: failed program was:" >&5
5136 cat conftest.$ac_ext >&5
5137 rm -rf conftest*
5138 eval "ac_cv_header_$ac_safe=no"
5139 fi
5140 rm -f conftest*
5141 fi
5142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5143 echo "$ac_t""yes" 1>&6
5144 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5145 cat >> confdefs.h <<EOF
5146 #define $ac_tr_hdr 1
5147 EOF
5148
5149 else
5150 echo "$ac_t""no" 1>&6
5151 fi
5152 done
5153
5154 for ac_hdr in sys/proc.h
5155 do
5156 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5157 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5158 echo "configure:5159: checking for $ac_hdr" >&5
5159 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5160 echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162 cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165 #include <$ac_hdr>
5166 EOF
5167 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5168 { (eval echo configure:5169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5169 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5170 if test -z "$ac_err"; then
5171 rm -rf conftest*
5172 eval "ac_cv_header_$ac_safe=yes"
5173 else
5174 echo "$ac_err" >&5
5175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
5177 rm -rf conftest*
5178 eval "ac_cv_header_$ac_safe=no"
5179 fi
5180 rm -f conftest*
5181 fi
5182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5183 echo "$ac_t""yes" 1>&6
5184 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5185 cat >> confdefs.h <<EOF
5186 #define $ac_tr_hdr 1
5187 EOF
5188
5189 else
5190 echo "$ac_t""no" 1>&6
5191 fi
5192 done
5193
5194 for ac_hdr in sys/procfs.h
5195 do
5196 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5197 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5198 echo "configure:5199: checking for $ac_hdr" >&5
5199 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5200 echo $ac_n "(cached) $ac_c" 1>&6
5201 else
5202 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 #include <$ac_hdr>
5206 EOF
5207 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5208 { (eval echo configure:5209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5209 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5210 if test -z "$ac_err"; then
5211 rm -rf conftest*
5212 eval "ac_cv_header_$ac_safe=yes"
5213 else
5214 echo "$ac_err" >&5
5215 echo "configure: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
5217 rm -rf conftest*
5218 eval "ac_cv_header_$ac_safe=no"
5219 fi
5220 rm -f conftest*
5221 fi
5222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5223 echo "$ac_t""yes" 1>&6
5224 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5225 cat >> confdefs.h <<EOF
5226 #define $ac_tr_hdr 1
5227 EOF
5228
5229 else
5230 echo "$ac_t""no" 1>&6
5231 fi
5232 done
5233
5234 for ac_hdr in sys/ptrace.h ptrace.h
5235 do
5236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5238 echo "configure:5239: checking for $ac_hdr" >&5
5239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5240 echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5245 #include <$ac_hdr>
5246 EOF
5247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5248 { (eval echo configure:5249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5250 if test -z "$ac_err"; then
5251 rm -rf conftest*
5252 eval "ac_cv_header_$ac_safe=yes"
5253 else
5254 echo "$ac_err" >&5
5255 echo "configure: failed program was:" >&5
5256 cat conftest.$ac_ext >&5
5257 rm -rf conftest*
5258 eval "ac_cv_header_$ac_safe=no"
5259 fi
5260 rm -f conftest*
5261 fi
5262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5263 echo "$ac_t""yes" 1>&6
5264 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5265 cat >> confdefs.h <<EOF
5266 #define $ac_tr_hdr 1
5267 EOF
5268
5269 else
5270 echo "$ac_t""no" 1>&6
5271 fi
5272 done
5273
5274 for ac_hdr in sys/reg.h sys/debugreg.h
5275 do
5276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5278 echo "configure:5279: checking for $ac_hdr" >&5
5279 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5280 echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 #include <$ac_hdr>
5286 EOF
5287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5288 { (eval echo configure:5289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5290 if test -z "$ac_err"; then
5291 rm -rf conftest*
5292 eval "ac_cv_header_$ac_safe=yes"
5293 else
5294 echo "$ac_err" >&5
5295 echo "configure: failed program was:" >&5
5296 cat conftest.$ac_ext >&5
5297 rm -rf conftest*
5298 eval "ac_cv_header_$ac_safe=no"
5299 fi
5300 rm -f conftest*
5301 fi
5302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5303 echo "$ac_t""yes" 1>&6
5304 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5305 cat >> confdefs.h <<EOF
5306 #define $ac_tr_hdr 1
5307 EOF
5308
5309 else
5310 echo "$ac_t""no" 1>&6
5311 fi
5312 done
5313
5314 for ac_hdr in sys/select.h
5315 do
5316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5318 echo "configure:5319: checking for $ac_hdr" >&5
5319 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5320 echo $ac_n "(cached) $ac_c" 1>&6
5321 else
5322 cat > conftest.$ac_ext <<EOF
5323 #line 5324 "configure"
5324 #include "confdefs.h"
5325 #include <$ac_hdr>
5326 EOF
5327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5328 { (eval echo configure:5329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5330 if test -z "$ac_err"; then
5331 rm -rf conftest*
5332 eval "ac_cv_header_$ac_safe=yes"
5333 else
5334 echo "$ac_err" >&5
5335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 rm -rf conftest*
5338 eval "ac_cv_header_$ac_safe=no"
5339 fi
5340 rm -f conftest*
5341 fi
5342 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5343 echo "$ac_t""yes" 1>&6
5344 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5345 cat >> confdefs.h <<EOF
5346 #define $ac_tr_hdr 1
5347 EOF
5348
5349 else
5350 echo "$ac_t""no" 1>&6
5351 fi
5352 done
5353
5354 for ac_hdr in sys/syscall.h
5355 do
5356 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5357 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5358 echo "configure:5359: checking for $ac_hdr" >&5
5359 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5360 echo $ac_n "(cached) $ac_c" 1>&6
5361 else
5362 cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365 #include <$ac_hdr>
5366 EOF
5367 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5368 { (eval echo configure:5369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5369 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5370 if test -z "$ac_err"; then
5371 rm -rf conftest*
5372 eval "ac_cv_header_$ac_safe=yes"
5373 else
5374 echo "$ac_err" >&5
5375 echo "configure: failed program was:" >&5
5376 cat conftest.$ac_ext >&5
5377 rm -rf conftest*
5378 eval "ac_cv_header_$ac_safe=no"
5379 fi
5380 rm -f conftest*
5381 fi
5382 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5383 echo "$ac_t""yes" 1>&6
5384 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5385 cat >> confdefs.h <<EOF
5386 #define $ac_tr_hdr 1
5387 EOF
5388
5389 else
5390 echo "$ac_t""no" 1>&6
5391 fi
5392 done
5393
5394 for ac_hdr in sys/user.h
5395 do
5396 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5397 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5398 echo "configure:5399: checking for $ac_hdr" >&5
5399 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5400 echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405 #include <$ac_hdr>
5406 EOF
5407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5408 { (eval echo configure:5409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5410 if test -z "$ac_err"; then
5411 rm -rf conftest*
5412 eval "ac_cv_header_$ac_safe=yes"
5413 else
5414 echo "$ac_err" >&5
5415 echo "configure: failed program was:" >&5
5416 cat conftest.$ac_ext >&5
5417 rm -rf conftest*
5418 eval "ac_cv_header_$ac_safe=no"
5419 fi
5420 rm -f conftest*
5421 fi
5422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5423 echo "$ac_t""yes" 1>&6
5424 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5425 cat >> confdefs.h <<EOF
5426 #define $ac_tr_hdr 1
5427 EOF
5428
5429 else
5430 echo "$ac_t""no" 1>&6
5431 fi
5432 done
5433
5434 for ac_hdr in sys/wait.h wait.h
5435 do
5436 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5437 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5438 echo "configure:5439: checking for $ac_hdr" >&5
5439 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5440 echo $ac_n "(cached) $ac_c" 1>&6
5441 else
5442 cat > conftest.$ac_ext <<EOF
5443 #line 5444 "configure"
5444 #include "confdefs.h"
5445 #include <$ac_hdr>
5446 EOF
5447 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5448 { (eval echo configure:5449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5449 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5450 if test -z "$ac_err"; then
5451 rm -rf conftest*
5452 eval "ac_cv_header_$ac_safe=yes"
5453 else
5454 echo "$ac_err" >&5
5455 echo "configure: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
5457 rm -rf conftest*
5458 eval "ac_cv_header_$ac_safe=no"
5459 fi
5460 rm -f conftest*
5461 fi
5462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5463 echo "$ac_t""yes" 1>&6
5464 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5465 cat >> confdefs.h <<EOF
5466 #define $ac_tr_hdr 1
5467 EOF
5468
5469 else
5470 echo "$ac_t""no" 1>&6
5471 fi
5472 done
5473
5474 for ac_hdr in termios.h termio.h sgtty.h
5475 do
5476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5478 echo "configure:5479: checking for $ac_hdr" >&5
5479 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5480 echo $ac_n "(cached) $ac_c" 1>&6
5481 else
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 #include <$ac_hdr>
5486 EOF
5487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5488 { (eval echo configure:5489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5490 if test -z "$ac_err"; then
5491 rm -rf conftest*
5492 eval "ac_cv_header_$ac_safe=yes"
5493 else
5494 echo "$ac_err" >&5
5495 echo "configure: failed program was:" >&5
5496 cat conftest.$ac_ext >&5
5497 rm -rf conftest*
5498 eval "ac_cv_header_$ac_safe=no"
5499 fi
5500 rm -f conftest*
5501 fi
5502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
5504 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5505 cat >> confdefs.h <<EOF
5506 #define $ac_tr_hdr 1
5507 EOF
5508
5509 else
5510 echo "$ac_t""no" 1>&6
5511 fi
5512 done
5513
5514 for ac_hdr in unistd.h
5515 do
5516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5518 echo "configure:5519: checking for $ac_hdr" >&5
5519 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5520 echo $ac_n "(cached) $ac_c" 1>&6
5521 else
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 #include <$ac_hdr>
5526 EOF
5527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5528 { (eval echo configure:5529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5530 if test -z "$ac_err"; then
5531 rm -rf conftest*
5532 eval "ac_cv_header_$ac_safe=yes"
5533 else
5534 echo "$ac_err" >&5
5535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
5537 rm -rf conftest*
5538 eval "ac_cv_header_$ac_safe=no"
5539 fi
5540 rm -f conftest*
5541 fi
5542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5543 echo "$ac_t""yes" 1>&6
5544 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5545 cat >> confdefs.h <<EOF
5546 #define $ac_tr_hdr 1
5547 EOF
5548
5549 else
5550 echo "$ac_t""no" 1>&6
5551 fi
5552 done
5553
5554
5555 # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5556 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5557 # think that we don't have <curses.h> if we're using GCC.
5558 case $host_os in
5559 solaris2.[78])
5560 if test "$GCC" = yes; then
5561 cat >> confdefs.h <<\EOF
5562 #define _MSE_INT_H 1
5563 EOF
5564
5565 fi ;;
5566 esac
5567 for ac_hdr in curses.h ncurses.h term.h
5568 do
5569 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5570 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5571 echo "configure:5572: checking for $ac_hdr" >&5
5572 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5573 echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575 cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 #include <$ac_hdr>
5579 EOF
5580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5581 { (eval echo configure:5582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5583 if test -z "$ac_err"; then
5584 rm -rf conftest*
5585 eval "ac_cv_header_$ac_safe=yes"
5586 else
5587 echo "$ac_err" >&5
5588 echo "configure: failed program was:" >&5
5589 cat conftest.$ac_ext >&5
5590 rm -rf conftest*
5591 eval "ac_cv_header_$ac_safe=no"
5592 fi
5593 rm -f conftest*
5594 fi
5595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5596 echo "$ac_t""yes" 1>&6
5597 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5598 cat >> confdefs.h <<EOF
5599 #define $ac_tr_hdr 1
5600 EOF
5601
5602 else
5603 echo "$ac_t""no" 1>&6
5604 fi
5605 done
5606
5607
5608 # FIXME: kettenis/20030102: In most cases we include these
5609 # unconditionally, so what's the point in checking these?
5610 for ac_hdr in ctype.h time.h
5611 do
5612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5614 echo "configure:5615: checking for $ac_hdr" >&5
5615 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5616 echo $ac_n "(cached) $ac_c" 1>&6
5617 else
5618 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621 #include <$ac_hdr>
5622 EOF
5623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5624 { (eval echo configure:5625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5626 if test -z "$ac_err"; then
5627 rm -rf conftest*
5628 eval "ac_cv_header_$ac_safe=yes"
5629 else
5630 echo "$ac_err" >&5
5631 echo "configure: failed program was:" >&5
5632 cat conftest.$ac_ext >&5
5633 rm -rf conftest*
5634 eval "ac_cv_header_$ac_safe=no"
5635 fi
5636 rm -f conftest*
5637 fi
5638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5639 echo "$ac_t""yes" 1>&6
5640 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5641 cat >> confdefs.h <<EOF
5642 #define $ac_tr_hdr 1
5643 EOF
5644
5645 else
5646 echo "$ac_t""no" 1>&6
5647 fi
5648 done
5649
5650
5651 echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5652 echo "configure:5653: checking for member st_blocks in struct stat" >&5
5653 if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5654 echo $ac_n "(cached) $ac_c" 1>&6
5655 else
5656 cat > conftest.$ac_ext <<EOF
5657 #line 5658 "configure"
5658 #include "confdefs.h"
5659 #include <sys/types.h>
5660 #include <sys/stat.h>
5661 int main() {
5662 struct stat st; (void) st.st_blocks;
5663 ; return 0; }
5664 EOF
5665 if { (eval echo configure:5666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5666 rm -rf conftest*
5667 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5668 else
5669 echo "configure: failed program was:" >&5
5670 cat conftest.$ac_ext >&5
5671 rm -rf conftest*
5672 gdb_cv_have_struct_stat_with_st_blocks_member=no
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5678 if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5679 cat >> confdefs.h <<\EOF
5680 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
5681 EOF
5682
5683 fi
5684 # ------------------------- #
5685 # Checks for declarations. #
5686 # ------------------------- #
5687
5688 for ac_func in getopt
5689 do
5690 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5691 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5692 echo "configure:5693: checking whether $ac_func is declared" >&5
5693 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5694 echo $ac_n "(cached) $ac_c" 1>&6
5695 else
5696 cat > conftest.$ac_ext <<EOF
5697 #line 5698 "configure"
5698 #include "confdefs.h"
5699 #undef $ac_tr_decl
5700 #define $ac_tr_decl 1
5701
5702
5703 int main() {
5704 #ifndef $ac_func
5705 char *(*pfn) = (char *(*)) $ac_func ;
5706 #endif
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5710 rm -rf conftest*
5711 eval "gcc_cv_have_decl_$ac_func=yes"
5712 else
5713 echo "configure: failed program was:" >&5
5714 cat conftest.$ac_ext >&5
5715 rm -rf conftest*
5716 eval "gcc_cv_have_decl_$ac_func=no"
5717 fi
5718 rm -f conftest*
5719 fi
5720
5721 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5722 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5723 #define $ac_tr_decl 1
5724 EOF
5725
5726 else
5727 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5728 #define $ac_tr_decl 0
5729 EOF
5730
5731 fi
5732
5733 done
5734 if test x = y ; then
5735 cat >> confdefs.h <<\EOF
5736 #define HAVE_DECL_GETOPT 1
5737 EOF
5738 fi
5739
5740
5741 # ------------------ #
5742 # Checks for types. #
5743 # ------------------ #
5744
5745 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5746 echo "configure:5747: checking return type of signal handlers" >&5
5747 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5748 echo $ac_n "(cached) $ac_c" 1>&6
5749 else
5750 cat > conftest.$ac_ext <<EOF
5751 #line 5752 "configure"
5752 #include "confdefs.h"
5753 #include <sys/types.h>
5754 #include <signal.h>
5755 #ifdef signal
5756 #undef signal
5757 #endif
5758 #ifdef __cplusplus
5759 extern "C" void (*signal (int, void (*)(int)))(int);
5760 #else
5761 void (*signal ()) ();
5762 #endif
5763
5764 int main() {
5765 int i;
5766 ; return 0; }
5767 EOF
5768 if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5769 rm -rf conftest*
5770 ac_cv_type_signal=void
5771 else
5772 echo "configure: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 rm -rf conftest*
5775 ac_cv_type_signal=int
5776 fi
5777 rm -f conftest*
5778 fi
5779
5780 echo "$ac_t""$ac_cv_type_signal" 1>&6
5781 cat >> confdefs.h <<EOF
5782 #define RETSIGTYPE $ac_cv_type_signal
5783 EOF
5784
5785
5786
5787 # ------------------------------------- #
5788 # Checks for compiler characteristics. #
5789 # ------------------------------------- #
5790
5791 echo $ac_n "checking for working const""... $ac_c" 1>&6
5792 echo "configure:5793: checking for working const" >&5
5793 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5794 echo $ac_n "(cached) $ac_c" 1>&6
5795 else
5796 cat > conftest.$ac_ext <<EOF
5797 #line 5798 "configure"
5798 #include "confdefs.h"
5799
5800 int main() {
5801
5802 /* Ultrix mips cc rejects this. */
5803 typedef int charset[2]; const charset x;
5804 /* SunOS 4.1.1 cc rejects this. */
5805 char const *const *ccp;
5806 char **p;
5807 /* NEC SVR4.0.2 mips cc rejects this. */
5808 struct point {int x, y;};
5809 static struct point const zero = {0,0};
5810 /* AIX XL C 1.02.0.0 rejects this.
5811 It does not let you subtract one const X* pointer from another in an arm
5812 of an if-expression whose if-part is not a constant expression */
5813 const char *g = "string";
5814 ccp = &g + (g ? g-g : 0);
5815 /* HPUX 7.0 cc rejects these. */
5816 ++ccp;
5817 p = (char**) ccp;
5818 ccp = (char const *const *) p;
5819 { /* SCO 3.2v4 cc rejects this. */
5820 char *t;
5821 char const *s = 0 ? (char *) 0 : (char const *) 0;
5822
5823 *t++ = 0;
5824 }
5825 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5826 int x[] = {25, 17};
5827 const int *foo = &x[0];
5828 ++foo;
5829 }
5830 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5831 typedef const int *iptr;
5832 iptr p = 0;
5833 ++p;
5834 }
5835 { /* AIX XL C 1.02.0.0 rejects this saying
5836 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5837 struct s { int j; const int *ap[3]; };
5838 struct s *b; b->j = 5;
5839 }
5840 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5841 const int foo = 10;
5842 }
5843
5844 ; return 0; }
5845 EOF
5846 if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5847 rm -rf conftest*
5848 ac_cv_c_const=yes
5849 else
5850 echo "configure: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5852 rm -rf conftest*
5853 ac_cv_c_const=no
5854 fi
5855 rm -f conftest*
5856 fi
5857
5858 echo "$ac_t""$ac_cv_c_const" 1>&6
5859 if test $ac_cv_c_const = no; then
5860 cat >> confdefs.h <<\EOF
5861 #define const
5862 EOF
5863
5864 fi
5865
5866 echo $ac_n "checking for inline""... $ac_c" 1>&6
5867 echo "configure:5868: checking for inline" >&5
5868 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5869 echo $ac_n "(cached) $ac_c" 1>&6
5870 else
5871 ac_cv_c_inline=no
5872 for ac_kw in inline __inline__ __inline; do
5873 cat > conftest.$ac_ext <<EOF
5874 #line 5875 "configure"
5875 #include "confdefs.h"
5876
5877 int main() {
5878 } $ac_kw foo() {
5879 ; return 0; }
5880 EOF
5881 if { (eval echo configure:5882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5882 rm -rf conftest*
5883 ac_cv_c_inline=$ac_kw; break
5884 else
5885 echo "configure: failed program was:" >&5
5886 cat conftest.$ac_ext >&5
5887 fi
5888 rm -f conftest*
5889 done
5890
5891 fi
5892
5893 echo "$ac_t""$ac_cv_c_inline" 1>&6
5894 case "$ac_cv_c_inline" in
5895 inline | yes) ;;
5896 no) cat >> confdefs.h <<\EOF
5897 #define inline
5898 EOF
5899 ;;
5900 *) cat >> confdefs.h <<EOF
5901 #define inline $ac_cv_c_inline
5902 EOF
5903 ;;
5904 esac
5905
5906
5907 # ------------------------------ #
5908 # Checks for library functions. #
5909 # ------------------------------ #
5910
5911 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5912 # for constant arguments. Useless!
5913 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5914 echo "configure:5915: checking for working alloca.h" >&5
5915 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
5917 else
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921 #include <alloca.h>
5922 int main() {
5923 char *p = alloca(2 * sizeof(int));
5924 ; return 0; }
5925 EOF
5926 if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5927 rm -rf conftest*
5928 ac_cv_header_alloca_h=yes
5929 else
5930 echo "configure: failed program was:" >&5
5931 cat conftest.$ac_ext >&5
5932 rm -rf conftest*
5933 ac_cv_header_alloca_h=no
5934 fi
5935 rm -f conftest*
5936 fi
5937
5938 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5939 if test $ac_cv_header_alloca_h = yes; then
5940 cat >> confdefs.h <<\EOF
5941 #define HAVE_ALLOCA_H 1
5942 EOF
5943
5944 fi
5945
5946 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5947 echo "configure:5948: checking for alloca" >&5
5948 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5949 echo $ac_n "(cached) $ac_c" 1>&6
5950 else
5951 cat > conftest.$ac_ext <<EOF
5952 #line 5953 "configure"
5953 #include "confdefs.h"
5954
5955 #ifdef __GNUC__
5956 # define alloca __builtin_alloca
5957 #else
5958 # ifdef _MSC_VER
5959 # include <malloc.h>
5960 # define alloca _alloca
5961 # else
5962 # if HAVE_ALLOCA_H
5963 # include <alloca.h>
5964 # else
5965 # ifdef _AIX
5966 #pragma alloca
5967 # else
5968 # ifndef alloca /* predefined by HP cc +Olibcalls */
5969 char *alloca ();
5970 # endif
5971 # endif
5972 # endif
5973 # endif
5974 #endif
5975
5976 int main() {
5977 char *p = (char *) alloca(1);
5978 ; return 0; }
5979 EOF
5980 if { (eval echo configure:5981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5981 rm -rf conftest*
5982 ac_cv_func_alloca_works=yes
5983 else
5984 echo "configure: failed program was:" >&5
5985 cat conftest.$ac_ext >&5
5986 rm -rf conftest*
5987 ac_cv_func_alloca_works=no
5988 fi
5989 rm -f conftest*
5990 fi
5991
5992 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5993 if test $ac_cv_func_alloca_works = yes; then
5994 cat >> confdefs.h <<\EOF
5995 #define HAVE_ALLOCA 1
5996 EOF
5997
5998 fi
5999
6000 if test $ac_cv_func_alloca_works = no; then
6001 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6002 # that cause trouble. Some versions do not even contain alloca or
6003 # contain a buggy version. If you still want to use their alloca,
6004 # use ar to extract alloca.o from them instead of compiling alloca.c.
6005 ALLOCA=alloca.${ac_objext}
6006 cat >> confdefs.h <<\EOF
6007 #define C_ALLOCA 1
6008 EOF
6009
6010
6011 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6012 echo "configure:6013: checking whether alloca needs Cray hooks" >&5
6013 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6014 echo $ac_n "(cached) $ac_c" 1>&6
6015 else
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 #if defined(CRAY) && ! defined(CRAY2)
6020 webecray
6021 #else
6022 wenotbecray
6023 #endif
6024
6025 EOF
6026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6027 egrep "webecray" >/dev/null 2>&1; then
6028 rm -rf conftest*
6029 ac_cv_os_cray=yes
6030 else
6031 rm -rf conftest*
6032 ac_cv_os_cray=no
6033 fi
6034 rm -f conftest*
6035
6036 fi
6037
6038 echo "$ac_t""$ac_cv_os_cray" 1>&6
6039 if test $ac_cv_os_cray = yes; then
6040 for ac_func in _getb67 GETB67 getb67; do
6041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6042 echo "configure:6043: checking for $ac_func" >&5
6043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6044 echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046 cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* System header to define __stub macros and hopefully few prototypes,
6050 which can conflict with char $ac_func(); below. */
6051 #include <assert.h>
6052 /* Override any gcc2 internal prototype to avoid an error. */
6053 /* We use char because int might match the return type of a gcc2
6054 builtin and then its argument prototype would still apply. */
6055 char $ac_func();
6056
6057 int main() {
6058
6059 /* The GNU C library defines this for functions which it implements
6060 to always fail with ENOSYS. Some functions are actually named
6061 something starting with __ and the normal name is an alias. */
6062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6063 choke me
6064 #else
6065 $ac_func();
6066 #endif
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071 rm -rf conftest*
6072 eval "ac_cv_func_$ac_func=yes"
6073 else
6074 echo "configure: failed program was:" >&5
6075 cat conftest.$ac_ext >&5
6076 rm -rf conftest*
6077 eval "ac_cv_func_$ac_func=no"
6078 fi
6079 rm -f conftest*
6080 fi
6081
6082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6083 echo "$ac_t""yes" 1>&6
6084 cat >> confdefs.h <<EOF
6085 #define CRAY_STACKSEG_END $ac_func
6086 EOF
6087
6088 break
6089 else
6090 echo "$ac_t""no" 1>&6
6091 fi
6092
6093 done
6094 fi
6095
6096 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6097 echo "configure:6098: checking stack direction for C alloca" >&5
6098 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6099 echo $ac_n "(cached) $ac_c" 1>&6
6100 else
6101 if test "$cross_compiling" = yes; then
6102 ac_cv_c_stack_direction=0
6103 else
6104 cat > conftest.$ac_ext <<EOF
6105 #line 6106 "configure"
6106 #include "confdefs.h"
6107 find_stack_direction ()
6108 {
6109 static char *addr = 0;
6110 auto char dummy;
6111 if (addr == 0)
6112 {
6113 addr = &dummy;
6114 return find_stack_direction ();
6115 }
6116 else
6117 return (&dummy > addr) ? 1 : -1;
6118 }
6119 main ()
6120 {
6121 exit (find_stack_direction() < 0);
6122 }
6123 EOF
6124 if { (eval echo configure:6125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6125 then
6126 ac_cv_c_stack_direction=1
6127 else
6128 echo "configure: failed program was:" >&5
6129 cat conftest.$ac_ext >&5
6130 rm -fr conftest*
6131 ac_cv_c_stack_direction=-1
6132 fi
6133 rm -fr conftest*
6134 fi
6135
6136 fi
6137
6138 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6139 cat >> confdefs.h <<EOF
6140 #define STACK_DIRECTION $ac_cv_c_stack_direction
6141 EOF
6142
6143 fi
6144
6145 for ac_hdr in unistd.h
6146 do
6147 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6148 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6149 echo "configure:6150: checking for $ac_hdr" >&5
6150 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6151 echo $ac_n "(cached) $ac_c" 1>&6
6152 else
6153 cat > conftest.$ac_ext <<EOF
6154 #line 6155 "configure"
6155 #include "confdefs.h"
6156 #include <$ac_hdr>
6157 EOF
6158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6159 { (eval echo configure:6160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6161 if test -z "$ac_err"; then
6162 rm -rf conftest*
6163 eval "ac_cv_header_$ac_safe=yes"
6164 else
6165 echo "$ac_err" >&5
6166 echo "configure: failed program was:" >&5
6167 cat conftest.$ac_ext >&5
6168 rm -rf conftest*
6169 eval "ac_cv_header_$ac_safe=no"
6170 fi
6171 rm -f conftest*
6172 fi
6173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6174 echo "$ac_t""yes" 1>&6
6175 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6176 cat >> confdefs.h <<EOF
6177 #define $ac_tr_hdr 1
6178 EOF
6179
6180 else
6181 echo "$ac_t""no" 1>&6
6182 fi
6183 done
6184
6185 for ac_func in getpagesize
6186 do
6187 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6188 echo "configure:6189: checking for $ac_func" >&5
6189 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6190 echo $ac_n "(cached) $ac_c" 1>&6
6191 else
6192 cat > conftest.$ac_ext <<EOF
6193 #line 6194 "configure"
6194 #include "confdefs.h"
6195 /* System header to define __stub macros and hopefully few prototypes,
6196 which can conflict with char $ac_func(); below. */
6197 #include <assert.h>
6198 /* Override any gcc2 internal prototype to avoid an error. */
6199 /* We use char because int might match the return type of a gcc2
6200 builtin and then its argument prototype would still apply. */
6201 char $ac_func();
6202
6203 int main() {
6204
6205 /* The GNU C library defines this for functions which it implements
6206 to always fail with ENOSYS. Some functions are actually named
6207 something starting with __ and the normal name is an alias. */
6208 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6209 choke me
6210 #else
6211 $ac_func();
6212 #endif
6213
6214 ; return 0; }
6215 EOF
6216 if { (eval echo configure:6217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6217 rm -rf conftest*
6218 eval "ac_cv_func_$ac_func=yes"
6219 else
6220 echo "configure: failed program was:" >&5
6221 cat conftest.$ac_ext >&5
6222 rm -rf conftest*
6223 eval "ac_cv_func_$ac_func=no"
6224 fi
6225 rm -f conftest*
6226 fi
6227
6228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6229 echo "$ac_t""yes" 1>&6
6230 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6231 cat >> confdefs.h <<EOF
6232 #define $ac_tr_func 1
6233 EOF
6234
6235 else
6236 echo "$ac_t""no" 1>&6
6237 fi
6238 done
6239
6240 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6241 echo "configure:6242: checking for working mmap" >&5
6242 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6243 echo $ac_n "(cached) $ac_c" 1>&6
6244 else
6245 if test "$cross_compiling" = yes; then
6246 ac_cv_func_mmap_fixed_mapped=no
6247 else
6248 cat > conftest.$ac_ext <<EOF
6249 #line 6250 "configure"
6250 #include "confdefs.h"
6251
6252 /* Thanks to Mike Haertel and Jim Avera for this test.
6253 Here is a matrix of mmap possibilities:
6254 mmap private not fixed
6255 mmap private fixed at somewhere currently unmapped
6256 mmap private fixed at somewhere already mapped
6257 mmap shared not fixed
6258 mmap shared fixed at somewhere currently unmapped
6259 mmap shared fixed at somewhere already mapped
6260 For private mappings, we should verify that changes cannot be read()
6261 back from the file, nor mmap's back from the file at a different
6262 address. (There have been systems where private was not correctly
6263 implemented like the infamous i386 svr4.0, and systems where the
6264 VM page cache was not coherent with the filesystem buffer cache
6265 like early versions of FreeBSD and possibly contemporary NetBSD.)
6266 For shared mappings, we should conversely verify that changes get
6267 propogated back to all the places they're supposed to be.
6268
6269 Grep wants private fixed already mapped.
6270 The main things grep needs to know about mmap are:
6271 * does it exist and is it safe to write into the mmap'd area
6272 * how to use it (BSD variants) */
6273 #include <sys/types.h>
6274 #include <fcntl.h>
6275 #include <sys/mman.h>
6276
6277 /* This mess was copied from the GNU getpagesize.h. */
6278 #ifndef HAVE_GETPAGESIZE
6279 # ifdef HAVE_UNISTD_H
6280 # include <unistd.h>
6281 # endif
6282
6283 /* Assume that all systems that can run configure have sys/param.h. */
6284 # ifndef HAVE_SYS_PARAM_H
6285 # define HAVE_SYS_PARAM_H 1
6286 # endif
6287
6288 # ifdef _SC_PAGESIZE
6289 # define getpagesize() sysconf(_SC_PAGESIZE)
6290 # else /* no _SC_PAGESIZE */
6291 # ifdef HAVE_SYS_PARAM_H
6292 # include <sys/param.h>
6293 # ifdef EXEC_PAGESIZE
6294 # define getpagesize() EXEC_PAGESIZE
6295 # else /* no EXEC_PAGESIZE */
6296 # ifdef NBPG
6297 # define getpagesize() NBPG * CLSIZE
6298 # ifndef CLSIZE
6299 # define CLSIZE 1
6300 # endif /* no CLSIZE */
6301 # else /* no NBPG */
6302 # ifdef NBPC
6303 # define getpagesize() NBPC
6304 # else /* no NBPC */
6305 # ifdef PAGESIZE
6306 # define getpagesize() PAGESIZE
6307 # endif /* PAGESIZE */
6308 # endif /* no NBPC */
6309 # endif /* no NBPG */
6310 # endif /* no EXEC_PAGESIZE */
6311 # else /* no HAVE_SYS_PARAM_H */
6312 # define getpagesize() 8192 /* punt totally */
6313 # endif /* no HAVE_SYS_PARAM_H */
6314 # endif /* no _SC_PAGESIZE */
6315
6316 #endif /* no HAVE_GETPAGESIZE */
6317
6318 #ifdef __cplusplus
6319 extern "C" { void *malloc(unsigned); }
6320 #else
6321 char *malloc();
6322 #endif
6323
6324 int
6325 main()
6326 {
6327 char *data, *data2, *data3;
6328 int i, pagesize;
6329 int fd;
6330
6331 pagesize = getpagesize();
6332
6333 /*
6334 * First, make a file with some known garbage in it.
6335 */
6336 data = malloc(pagesize);
6337 if (!data)
6338 exit(1);
6339 for (i = 0; i < pagesize; ++i)
6340 *(data + i) = rand();
6341 umask(0);
6342 fd = creat("conftestmmap", 0600);
6343 if (fd < 0)
6344 exit(1);
6345 if (write(fd, data, pagesize) != pagesize)
6346 exit(1);
6347 close(fd);
6348
6349 /*
6350 * Next, try to mmap the file at a fixed address which
6351 * already has something else allocated at it. If we can,
6352 * also make sure that we see the same garbage.
6353 */
6354 fd = open("conftestmmap", O_RDWR);
6355 if (fd < 0)
6356 exit(1);
6357 data2 = malloc(2 * pagesize);
6358 if (!data2)
6359 exit(1);
6360 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6361 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6362 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6363 exit(1);
6364 for (i = 0; i < pagesize; ++i)
6365 if (*(data + i) != *(data2 + i))
6366 exit(1);
6367
6368 /*
6369 * Finally, make sure that changes to the mapped area
6370 * do not percolate back to the file as seen by read().
6371 * (This is a bug on some variants of i386 svr4.0.)
6372 */
6373 for (i = 0; i < pagesize; ++i)
6374 *(data2 + i) = *(data2 + i) + 1;
6375 data3 = malloc(pagesize);
6376 if (!data3)
6377 exit(1);
6378 if (read(fd, data3, pagesize) != pagesize)
6379 exit(1);
6380 for (i = 0; i < pagesize; ++i)
6381 if (*(data + i) != *(data3 + i))
6382 exit(1);
6383 close(fd);
6384 unlink("conftestmmap");
6385 exit(0);
6386 }
6387
6388 EOF
6389 if { (eval echo configure:6390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6390 then
6391 ac_cv_func_mmap_fixed_mapped=yes
6392 else
6393 echo "configure: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 rm -fr conftest*
6396 ac_cv_func_mmap_fixed_mapped=no
6397 fi
6398 rm -fr conftest*
6399 fi
6400
6401 fi
6402
6403 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6404 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6405 cat >> confdefs.h <<\EOF
6406 #define HAVE_MMAP 1
6407 EOF
6408
6409 fi
6410
6411 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6412 echo "configure:6413: checking for pid_t" >&5
6413 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6414 echo $ac_n "(cached) $ac_c" 1>&6
6415 else
6416 cat > conftest.$ac_ext <<EOF
6417 #line 6418 "configure"
6418 #include "confdefs.h"
6419 #include <sys/types.h>
6420 #if STDC_HEADERS
6421 #include <stdlib.h>
6422 #include <stddef.h>
6423 #endif
6424 EOF
6425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6426 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6427 rm -rf conftest*
6428 ac_cv_type_pid_t=yes
6429 else
6430 rm -rf conftest*
6431 ac_cv_type_pid_t=no
6432 fi
6433 rm -f conftest*
6434
6435 fi
6436 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6437 if test $ac_cv_type_pid_t = no; then
6438 cat >> confdefs.h <<\EOF
6439 #define pid_t int
6440 EOF
6441
6442 fi
6443
6444 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6445 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6446 echo "configure:6447: checking for vfork.h" >&5
6447 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6448 echo $ac_n "(cached) $ac_c" 1>&6
6449 else
6450 cat > conftest.$ac_ext <<EOF
6451 #line 6452 "configure"
6452 #include "confdefs.h"
6453 #include <vfork.h>
6454 EOF
6455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6456 { (eval echo configure:6457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6458 if test -z "$ac_err"; then
6459 rm -rf conftest*
6460 eval "ac_cv_header_$ac_safe=yes"
6461 else
6462 echo "$ac_err" >&5
6463 echo "configure: failed program was:" >&5
6464 cat conftest.$ac_ext >&5
6465 rm -rf conftest*
6466 eval "ac_cv_header_$ac_safe=no"
6467 fi
6468 rm -f conftest*
6469 fi
6470 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6471 echo "$ac_t""yes" 1>&6
6472 cat >> confdefs.h <<\EOF
6473 #define HAVE_VFORK_H 1
6474 EOF
6475
6476 else
6477 echo "$ac_t""no" 1>&6
6478 fi
6479
6480 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6481 echo "configure:6482: checking for working vfork" >&5
6482 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6483 echo $ac_n "(cached) $ac_c" 1>&6
6484 else
6485 if test "$cross_compiling" = yes; then
6486 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6487 echo "configure:6488: checking for vfork" >&5
6488 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6489 echo $ac_n "(cached) $ac_c" 1>&6
6490 else
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* System header to define __stub macros and hopefully few prototypes,
6495 which can conflict with char vfork(); below. */
6496 #include <assert.h>
6497 /* Override any gcc2 internal prototype to avoid an error. */
6498 /* We use char because int might match the return type of a gcc2
6499 builtin and then its argument prototype would still apply. */
6500 char vfork();
6501
6502 int main() {
6503
6504 /* The GNU C library defines this for functions which it implements
6505 to always fail with ENOSYS. Some functions are actually named
6506 something starting with __ and the normal name is an alias. */
6507 #if defined (__stub_vfork) || defined (__stub___vfork)
6508 choke me
6509 #else
6510 vfork();
6511 #endif
6512
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516 rm -rf conftest*
6517 eval "ac_cv_func_vfork=yes"
6518 else
6519 echo "configure: failed program was:" >&5
6520 cat conftest.$ac_ext >&5
6521 rm -rf conftest*
6522 eval "ac_cv_func_vfork=no"
6523 fi
6524 rm -f conftest*
6525 fi
6526
6527 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6528 echo "$ac_t""yes" 1>&6
6529 :
6530 else
6531 echo "$ac_t""no" 1>&6
6532 fi
6533
6534 ac_cv_func_vfork_works=$ac_cv_func_vfork
6535 else
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539 /* Thanks to Paul Eggert for this test. */
6540 #include <stdio.h>
6541 #include <sys/types.h>
6542 #include <sys/stat.h>
6543 #ifdef HAVE_UNISTD_H
6544 #include <unistd.h>
6545 #endif
6546 #ifdef HAVE_VFORK_H
6547 #include <vfork.h>
6548 #endif
6549 /* On some sparc systems, changes by the child to local and incoming
6550 argument registers are propagated back to the parent.
6551 The compiler is told about this with #include <vfork.h>,
6552 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6553 Test for this by using a static variable whose address
6554 is put into a register that is clobbered by the vfork. */
6555 static
6556 #ifdef __cplusplus
6557 sparc_address_test (int arg)
6558 #else
6559 sparc_address_test (arg) int arg;
6560 #endif
6561 {
6562 static pid_t child;
6563 if (!child) {
6564 child = vfork ();
6565 if (child < 0) {
6566 perror ("vfork");
6567 _exit(2);
6568 }
6569 if (!child) {
6570 arg = getpid();
6571 write(-1, "", 0);
6572 _exit (arg);
6573 }
6574 }
6575 }
6576 main() {
6577 pid_t parent = getpid ();
6578 pid_t child;
6579
6580 sparc_address_test ();
6581
6582 child = vfork ();
6583
6584 if (child == 0) {
6585 /* Here is another test for sparc vfork register problems.
6586 This test uses lots of local variables, at least
6587 as many local variables as main has allocated so far
6588 including compiler temporaries. 4 locals are enough for
6589 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6590 A buggy compiler should reuse the register of parent
6591 for one of the local variables, since it will think that
6592 parent can't possibly be used any more in this routine.
6593 Assigning to the local variable will thus munge parent
6594 in the parent process. */
6595 pid_t
6596 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6597 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6598 /* Convince the compiler that p..p7 are live; otherwise, it might
6599 use the same hardware register for all 8 local variables. */
6600 if (p != p1 || p != p2 || p != p3 || p != p4
6601 || p != p5 || p != p6 || p != p7)
6602 _exit(1);
6603
6604 /* On some systems (e.g. IRIX 3.3),
6605 vfork doesn't separate parent from child file descriptors.
6606 If the child closes a descriptor before it execs or exits,
6607 this munges the parent's descriptor as well.
6608 Test for this by closing stdout in the child. */
6609 _exit(close(fileno(stdout)) != 0);
6610 } else {
6611 int status;
6612 struct stat st;
6613
6614 while (wait(&status) != child)
6615 ;
6616 exit(
6617 /* Was there some problem with vforking? */
6618 child < 0
6619
6620 /* Did the child fail? (This shouldn't happen.) */
6621 || status
6622
6623 /* Did the vfork/compiler bug occur? */
6624 || parent != getpid()
6625
6626 /* Did the file descriptor bug occur? */
6627 || fstat(fileno(stdout), &st) != 0
6628 );
6629 }
6630 }
6631 EOF
6632 if { (eval echo configure:6633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6633 then
6634 ac_cv_func_vfork_works=yes
6635 else
6636 echo "configure: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 rm -fr conftest*
6639 ac_cv_func_vfork_works=no
6640 fi
6641 rm -fr conftest*
6642 fi
6643
6644 fi
6645
6646 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6647 if test $ac_cv_func_vfork_works = no; then
6648 cat >> confdefs.h <<\EOF
6649 #define vfork fork
6650 EOF
6651
6652 fi
6653
6654 for ac_func in canonicalize_file_name realpath
6655 do
6656 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6657 echo "configure:6658: checking for $ac_func" >&5
6658 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6660 else
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* System header to define __stub macros and hopefully few prototypes,
6665 which can conflict with char $ac_func(); below. */
6666 #include <assert.h>
6667 /* Override any gcc2 internal prototype to avoid an error. */
6668 /* We use char because int might match the return type of a gcc2
6669 builtin and then its argument prototype would still apply. */
6670 char $ac_func();
6671
6672 int main() {
6673
6674 /* The GNU C library defines this for functions which it implements
6675 to always fail with ENOSYS. Some functions are actually named
6676 something starting with __ and the normal name is an alias. */
6677 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6678 choke me
6679 #else
6680 $ac_func();
6681 #endif
6682
6683 ; return 0; }
6684 EOF
6685 if { (eval echo configure:6686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6686 rm -rf conftest*
6687 eval "ac_cv_func_$ac_func=yes"
6688 else
6689 echo "configure: failed program was:" >&5
6690 cat conftest.$ac_ext >&5
6691 rm -rf conftest*
6692 eval "ac_cv_func_$ac_func=no"
6693 fi
6694 rm -f conftest*
6695 fi
6696
6697 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6698 echo "$ac_t""yes" 1>&6
6699 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6700 cat >> confdefs.h <<EOF
6701 #define $ac_tr_func 1
6702 EOF
6703
6704 else
6705 echo "$ac_t""no" 1>&6
6706 fi
6707 done
6708
6709 for ac_func in poll
6710 do
6711 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6712 echo "configure:6713: checking for $ac_func" >&5
6713 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6714 echo $ac_n "(cached) $ac_c" 1>&6
6715 else
6716 cat > conftest.$ac_ext <<EOF
6717 #line 6718 "configure"
6718 #include "confdefs.h"
6719 /* System header to define __stub macros and hopefully few prototypes,
6720 which can conflict with char $ac_func(); below. */
6721 #include <assert.h>
6722 /* Override any gcc2 internal prototype to avoid an error. */
6723 /* We use char because int might match the return type of a gcc2
6724 builtin and then its argument prototype would still apply. */
6725 char $ac_func();
6726
6727 int main() {
6728
6729 /* The GNU C library defines this for functions which it implements
6730 to always fail with ENOSYS. Some functions are actually named
6731 something starting with __ and the normal name is an alias. */
6732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6733 choke me
6734 #else
6735 $ac_func();
6736 #endif
6737
6738 ; return 0; }
6739 EOF
6740 if { (eval echo configure:6741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6741 rm -rf conftest*
6742 eval "ac_cv_func_$ac_func=yes"
6743 else
6744 echo "configure: failed program was:" >&5
6745 cat conftest.$ac_ext >&5
6746 rm -rf conftest*
6747 eval "ac_cv_func_$ac_func=no"
6748 fi
6749 rm -f conftest*
6750 fi
6751
6752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6753 echo "$ac_t""yes" 1>&6
6754 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6755 cat >> confdefs.h <<EOF
6756 #define $ac_tr_func 1
6757 EOF
6758
6759 else
6760 echo "$ac_t""no" 1>&6
6761 fi
6762 done
6763
6764 for ac_func in pread64
6765 do
6766 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6767 echo "configure:6768: checking for $ac_func" >&5
6768 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6769 echo $ac_n "(cached) $ac_c" 1>&6
6770 else
6771 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* System header to define __stub macros and hopefully few prototypes,
6775 which can conflict with char $ac_func(); below. */
6776 #include <assert.h>
6777 /* Override any gcc2 internal prototype to avoid an error. */
6778 /* We use char because int might match the return type of a gcc2
6779 builtin and then its argument prototype would still apply. */
6780 char $ac_func();
6781
6782 int main() {
6783
6784 /* The GNU C library defines this for functions which it implements
6785 to always fail with ENOSYS. Some functions are actually named
6786 something starting with __ and the normal name is an alias. */
6787 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6788 choke me
6789 #else
6790 $ac_func();
6791 #endif
6792
6793 ; return 0; }
6794 EOF
6795 if { (eval echo configure:6796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796 rm -rf conftest*
6797 eval "ac_cv_func_$ac_func=yes"
6798 else
6799 echo "configure: failed program was:" >&5
6800 cat conftest.$ac_ext >&5
6801 rm -rf conftest*
6802 eval "ac_cv_func_$ac_func=no"
6803 fi
6804 rm -f conftest*
6805 fi
6806
6807 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6808 echo "$ac_t""yes" 1>&6
6809 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6810 cat >> confdefs.h <<EOF
6811 #define $ac_tr_func 1
6812 EOF
6813
6814 else
6815 echo "$ac_t""no" 1>&6
6816 fi
6817 done
6818
6819 for ac_func in sbrk
6820 do
6821 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6822 echo "configure:6823: checking for $ac_func" >&5
6823 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6824 echo $ac_n "(cached) $ac_c" 1>&6
6825 else
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* System header to define __stub macros and hopefully few prototypes,
6830 which can conflict with char $ac_func(); below. */
6831 #include <assert.h>
6832 /* Override any gcc2 internal prototype to avoid an error. */
6833 /* We use char because int might match the return type of a gcc2
6834 builtin and then its argument prototype would still apply. */
6835 char $ac_func();
6836
6837 int main() {
6838
6839 /* The GNU C library defines this for functions which it implements
6840 to always fail with ENOSYS. Some functions are actually named
6841 something starting with __ and the normal name is an alias. */
6842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6843 choke me
6844 #else
6845 $ac_func();
6846 #endif
6847
6848 ; return 0; }
6849 EOF
6850 if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6851 rm -rf conftest*
6852 eval "ac_cv_func_$ac_func=yes"
6853 else
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6856 rm -rf conftest*
6857 eval "ac_cv_func_$ac_func=no"
6858 fi
6859 rm -f conftest*
6860 fi
6861
6862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6863 echo "$ac_t""yes" 1>&6
6864 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6865 cat >> confdefs.h <<EOF
6866 #define $ac_tr_func 1
6867 EOF
6868
6869 else
6870 echo "$ac_t""no" 1>&6
6871 fi
6872 done
6873
6874 for ac_func in setpgid setpgrp
6875 do
6876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6877 echo "configure:6878: checking for $ac_func" >&5
6878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6879 echo $ac_n "(cached) $ac_c" 1>&6
6880 else
6881 cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 /* System header to define __stub macros and hopefully few prototypes,
6885 which can conflict with char $ac_func(); below. */
6886 #include <assert.h>
6887 /* Override any gcc2 internal prototype to avoid an error. */
6888 /* We use char because int might match the return type of a gcc2
6889 builtin and then its argument prototype would still apply. */
6890 char $ac_func();
6891
6892 int main() {
6893
6894 /* The GNU C library defines this for functions which it implements
6895 to always fail with ENOSYS. Some functions are actually named
6896 something starting with __ and the normal name is an alias. */
6897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6898 choke me
6899 #else
6900 $ac_func();
6901 #endif
6902
6903 ; return 0; }
6904 EOF
6905 if { (eval echo configure:6906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6906 rm -rf conftest*
6907 eval "ac_cv_func_$ac_func=yes"
6908 else
6909 echo "configure: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6911 rm -rf conftest*
6912 eval "ac_cv_func_$ac_func=no"
6913 fi
6914 rm -f conftest*
6915 fi
6916
6917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6918 echo "$ac_t""yes" 1>&6
6919 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6920 cat >> confdefs.h <<EOF
6921 #define $ac_tr_func 1
6922 EOF
6923
6924 else
6925 echo "$ac_t""no" 1>&6
6926 fi
6927 done
6928
6929 for ac_func in sigaction sigprocmask sigsetmask
6930 do
6931 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6932 echo "configure:6933: checking for $ac_func" >&5
6933 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6934 echo $ac_n "(cached) $ac_c" 1>&6
6935 else
6936 cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939 /* System header to define __stub macros and hopefully few prototypes,
6940 which can conflict with char $ac_func(); below. */
6941 #include <assert.h>
6942 /* Override any gcc2 internal prototype to avoid an error. */
6943 /* We use char because int might match the return type of a gcc2
6944 builtin and then its argument prototype would still apply. */
6945 char $ac_func();
6946
6947 int main() {
6948
6949 /* The GNU C library defines this for functions which it implements
6950 to always fail with ENOSYS. Some functions are actually named
6951 something starting with __ and the normal name is an alias. */
6952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6953 choke me
6954 #else
6955 $ac_func();
6956 #endif
6957
6958 ; return 0; }
6959 EOF
6960 if { (eval echo configure:6961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6961 rm -rf conftest*
6962 eval "ac_cv_func_$ac_func=yes"
6963 else
6964 echo "configure: failed program was:" >&5
6965 cat conftest.$ac_ext >&5
6966 rm -rf conftest*
6967 eval "ac_cv_func_$ac_func=no"
6968 fi
6969 rm -f conftest*
6970 fi
6971
6972 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6973 echo "$ac_t""yes" 1>&6
6974 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6975 cat >> confdefs.h <<EOF
6976 #define $ac_tr_func 1
6977 EOF
6978
6979 else
6980 echo "$ac_t""no" 1>&6
6981 fi
6982 done
6983
6984 for ac_func in socketpair
6985 do
6986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6987 echo "configure:6988: checking for $ac_func" >&5
6988 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6989 echo $ac_n "(cached) $ac_c" 1>&6
6990 else
6991 cat > conftest.$ac_ext <<EOF
6992 #line 6993 "configure"
6993 #include "confdefs.h"
6994 /* System header to define __stub macros and hopefully few prototypes,
6995 which can conflict with char $ac_func(); below. */
6996 #include <assert.h>
6997 /* Override any gcc2 internal prototype to avoid an error. */
6998 /* We use char because int might match the return type of a gcc2
6999 builtin and then its argument prototype would still apply. */
7000 char $ac_func();
7001
7002 int main() {
7003
7004 /* The GNU C library defines this for functions which it implements
7005 to always fail with ENOSYS. Some functions are actually named
7006 something starting with __ and the normal name is an alias. */
7007 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7008 choke me
7009 #else
7010 $ac_func();
7011 #endif
7012
7013 ; return 0; }
7014 EOF
7015 if { (eval echo configure:7016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7016 rm -rf conftest*
7017 eval "ac_cv_func_$ac_func=yes"
7018 else
7019 echo "configure: failed program was:" >&5
7020 cat conftest.$ac_ext >&5
7021 rm -rf conftest*
7022 eval "ac_cv_func_$ac_func=no"
7023 fi
7024 rm -f conftest*
7025 fi
7026
7027 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7028 echo "$ac_t""yes" 1>&6
7029 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7030 cat >> confdefs.h <<EOF
7031 #define $ac_tr_func 1
7032 EOF
7033
7034 else
7035 echo "$ac_t""no" 1>&6
7036 fi
7037 done
7038
7039 for ac_func in syscall
7040 do
7041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7042 echo "configure:7043: checking for $ac_func" >&5
7043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7044 echo $ac_n "(cached) $ac_c" 1>&6
7045 else
7046 cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049 /* System header to define __stub macros and hopefully few prototypes,
7050 which can conflict with char $ac_func(); below. */
7051 #include <assert.h>
7052 /* Override any gcc2 internal prototype to avoid an error. */
7053 /* We use char because int might match the return type of a gcc2
7054 builtin and then its argument prototype would still apply. */
7055 char $ac_func();
7056
7057 int main() {
7058
7059 /* The GNU C library defines this for functions which it implements
7060 to always fail with ENOSYS. Some functions are actually named
7061 something starting with __ and the normal name is an alias. */
7062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7063 choke me
7064 #else
7065 $ac_func();
7066 #endif
7067
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7071 rm -rf conftest*
7072 eval "ac_cv_func_$ac_func=yes"
7073 else
7074 echo "configure: failed program was:" >&5
7075 cat conftest.$ac_ext >&5
7076 rm -rf conftest*
7077 eval "ac_cv_func_$ac_func=no"
7078 fi
7079 rm -f conftest*
7080 fi
7081
7082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7083 echo "$ac_t""yes" 1>&6
7084 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7085 cat >> confdefs.h <<EOF
7086 #define $ac_tr_func 1
7087 EOF
7088
7089 else
7090 echo "$ac_t""no" 1>&6
7091 fi
7092 done
7093
7094
7095 if test "$cross_compiling" = no; then
7096 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7097 echo "configure:7098: checking whether setpgrp takes no argument" >&5
7098 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7099 echo $ac_n "(cached) $ac_c" 1>&6
7100 else
7101 if test "$cross_compiling" = yes; then
7102 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
7103 else
7104 cat > conftest.$ac_ext <<EOF
7105 #line 7106 "configure"
7106 #include "confdefs.h"
7107
7108 #ifdef HAVE_UNISTD_H
7109 #include <unistd.h>
7110 #endif
7111
7112 /*
7113 * If this system has a BSD-style setpgrp, which takes arguments, exit
7114 * successfully.
7115 */
7116 main()
7117 {
7118 if (setpgrp(1,1) == -1)
7119 exit(0);
7120 else
7121 exit(1);
7122 }
7123
7124 EOF
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7126 then
7127 ac_cv_func_setpgrp_void=no
7128 else
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7131 rm -fr conftest*
7132 ac_cv_func_setpgrp_void=yes
7133 fi
7134 rm -fr conftest*
7135 fi
7136
7137
7138 fi
7139
7140 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7141 if test $ac_cv_func_setpgrp_void = yes; then
7142 cat >> confdefs.h <<\EOF
7143 #define SETPGRP_VOID 1
7144 EOF
7145
7146 fi
7147
7148 else
7149 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7150 echo "configure:7151: checking whether setpgrp takes no argument" >&5
7151 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7152 echo $ac_n "(cached) $ac_c" 1>&6
7153 else
7154 cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157
7158 #include <unistd.h>
7159
7160 int main() {
7161
7162 if (setpgrp(1,1) == -1)
7163 exit (0);
7164 else
7165 exit (1);
7166
7167 ; return 0; }
7168 EOF
7169 if { (eval echo configure:7170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7170 rm -rf conftest*
7171 ac_cv_func_setpgrp_void=no
7172 else
7173 echo "configure: failed program was:" >&5
7174 cat conftest.$ac_ext >&5
7175 rm -rf conftest*
7176 ac_cv_func_setpgrp_void=yes
7177 fi
7178 rm -f conftest*
7179 fi
7180
7181 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7182 if test $ac_cv_func_setpgrp_void = yes; then
7183 cat >> confdefs.h <<\EOF
7184 #define SETPGRP_VOID 1
7185 EOF
7186
7187 fi
7188 fi
7189
7190 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7191 # since sigsetjmp might only be defined as a macro.
7192 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7193 echo "configure:7194: checking for sigsetjmp" >&5
7194 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
7195 echo $ac_n "(cached) $ac_c" 1>&6
7196 else
7197 cat > conftest.$ac_ext <<EOF
7198 #line 7199 "configure"
7199 #include "confdefs.h"
7200
7201 #include <setjmp.h>
7202
7203 int main() {
7204 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7205 ; return 0; }
7206 EOF
7207 if { (eval echo configure:7208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7208 rm -rf conftest*
7209 gdb_cv_func_sigsetjmp=yes
7210 else
7211 echo "configure: failed program was:" >&5
7212 cat conftest.$ac_ext >&5
7213 rm -rf conftest*
7214 gdb_cv_func_sigsetjmp=no
7215 fi
7216 rm -f conftest*
7217 fi
7218
7219 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7220 if test $gdb_cv_func_sigsetjmp = yes; then
7221 cat >> confdefs.h <<\EOF
7222 #define HAVE_SIGSETJMP 1
7223 EOF
7224
7225 fi
7226
7227 # Assume we'll default to using the included libiberty regex.
7228 gdb_use_included_regex=yes
7229
7230 # However, if the system regex is GNU regex, then default to *not*
7231 # using the included regex.
7232 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7233 echo "configure:7234: checking for GNU regex" >&5
7234 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7235 echo $ac_n "(cached) $ac_c" 1>&6
7236 else
7237 cat > conftest.$ac_ext <<EOF
7238 #line 7239 "configure"
7239 #include "confdefs.h"
7240 #include <gnu-versions.h>
7241 int main() {
7242 #define REGEX_INTERFACE_VERSION 1
7243 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7244 # error "Version mismatch"
7245 #endif
7246 ; return 0; }
7247 EOF
7248 if { (eval echo configure:7249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7249 rm -rf conftest*
7250 gdb_cv_have_gnu_regex=yes
7251 else
7252 echo "configure: failed program was:" >&5
7253 cat conftest.$ac_ext >&5
7254 rm -rf conftest*
7255 gdb_cv_have_gnu_regex=no
7256 fi
7257 rm -f conftest*
7258 fi
7259
7260 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7261 if test $gdb_cv_have_gnu_regex = yes; then
7262 gdb_use_included_regex=no
7263 fi
7264
7265 # Check whether --with-included-regex or --without-included-regex was given.
7266 if test "${with_included_regex+set}" = set; then
7267 withval="$with_included_regex"
7268 gdb_with_regex=$withval
7269 else
7270 gdb_with_regex=$gdb_use_included_regex
7271 fi
7272
7273 if test "$gdb_with_regex" = yes; then
7274 cat >> confdefs.h <<\EOF
7275 #define USE_INCLUDED_REGEX 1
7276 EOF
7277
7278 fi
7279
7280 # See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7281 echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
7282 echo "configure:7283: checking for td_pcb in struct thread" >&5
7283 if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7284 echo $ac_n "(cached) $ac_c" 1>&6
7285 else
7286 cat > conftest.$ac_ext <<EOF
7287 #line 7288 "configure"
7288 #include "confdefs.h"
7289 #include <sys/proc.h>
7290 int main() {
7291 struct thread td; td.td_pcb;
7292 ; return 0; }
7293 EOF
7294 if { (eval echo configure:7295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7295 rm -rf conftest*
7296 gdb_cv_struct_thread_td_pcb=yes
7297 else
7298 echo "configure: failed program was:" >&5
7299 cat conftest.$ac_ext >&5
7300 rm -rf conftest*
7301 gdb_cv_struct_thread_td_pcb=no
7302 fi
7303 rm -f conftest*
7304 fi
7305
7306 echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7307 if test $gdb_cv_struct_thread_td_pcb = yes; then
7308 cat >> confdefs.h <<\EOF
7309 #define HAVE_STRUCT_THREAD_TD_PCB 1
7310 EOF
7311
7312 fi
7313
7314 # See if <machine/reg.h> degines `struct reg'.
7315 echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7316 echo "configure:7317: checking for struct reg in machine/reg.h" >&5
7317 if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7318 echo $ac_n "(cached) $ac_c" 1>&6
7319 else
7320 cat > conftest.$ac_ext <<EOF
7321 #line 7322 "configure"
7322 #include "confdefs.h"
7323 #include <sys/types.h>
7324 #include <machine/reg.h>
7325 int main() {
7326 struct reg r;
7327 ; return 0; }
7328 EOF
7329 if { (eval echo configure:7330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7330 rm -rf conftest*
7331 gdb_cv_struct_reg=yes
7332 else
7333 echo "configure: failed program was:" >&5
7334 cat conftest.$ac_ext >&5
7335 rm -rf conftest*
7336 gdb_cv_struct_reg=no
7337 fi
7338 rm -f conftest*
7339 fi
7340
7341 echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7342 if test $gdb_cv_struct_reg = yes; then
7343 cat >> confdefs.h <<\EOF
7344 #define HAVE_STRUCT_REG 1
7345 EOF
7346
7347 fi
7348
7349 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7350 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7351 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7352 echo "configure:7353: checking for r_fs in struct reg" >&5
7353 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7354 echo $ac_n "(cached) $ac_c" 1>&6
7355 else
7356 cat > conftest.$ac_ext <<EOF
7357 #line 7358 "configure"
7358 #include "confdefs.h"
7359 #include <machine/reg.h>
7360 int main() {
7361 struct reg r; r.r_fs;
7362 ; return 0; }
7363 EOF
7364 if { (eval echo configure:7365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7365 rm -rf conftest*
7366 gdb_cv_struct_reg_r_fs=yes
7367 else
7368 echo "configure: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 rm -rf conftest*
7371 gdb_cv_struct_reg_r_fs=no
7372 fi
7373 rm -f conftest*
7374 fi
7375
7376 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7377 if test $gdb_cv_struct_reg_r_fs = yes; then
7378 cat >> confdefs.h <<\EOF
7379 #define HAVE_STRUCT_REG_R_FS 1
7380 EOF
7381
7382 fi
7383 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7384 echo "configure:7385: checking for r_gs in struct reg" >&5
7385 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7386 echo $ac_n "(cached) $ac_c" 1>&6
7387 else
7388 cat > conftest.$ac_ext <<EOF
7389 #line 7390 "configure"
7390 #include "confdefs.h"
7391 #include <machine/reg.h>
7392 int main() {
7393 struct reg r; r.r_gs;
7394 ; return 0; }
7395 EOF
7396 if { (eval echo configure:7397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7397 rm -rf conftest*
7398 gdb_cv_struct_reg_r_gs=yes
7399 else
7400 echo "configure: failed program was:" >&5
7401 cat conftest.$ac_ext >&5
7402 rm -rf conftest*
7403 gdb_cv_struct_reg_r_gs=no
7404 fi
7405 rm -f conftest*
7406 fi
7407
7408 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7409 if test $gdb_cv_struct_reg_r_gs = yes; then
7410 cat >> confdefs.h <<\EOF
7411 #define HAVE_STRUCT_REG_R_GS 1
7412 EOF
7413
7414 fi
7415
7416 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7417 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7418 echo "configure:7419: checking for PTRACE_GETREGS" >&5
7419 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
7420 echo $ac_n "(cached) $ac_c" 1>&6
7421 else
7422 cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 #include <sys/ptrace.h>
7426 int main() {
7427 PTRACE_GETREGS;
7428 ; return 0; }
7429 EOF
7430 if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7431 rm -rf conftest*
7432 gdb_cv_have_ptrace_getregs=yes
7433 else
7434 echo "configure: failed program was:" >&5
7435 cat conftest.$ac_ext >&5
7436 rm -rf conftest*
7437 gdb_cv_have_ptrace_getregs=no
7438 fi
7439 rm -f conftest*
7440 fi
7441
7442 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7443 if test $gdb_cv_have_ptrace_getregs = yes; then
7444 cat >> confdefs.h <<\EOF
7445 #define HAVE_PTRACE_GETREGS 1
7446 EOF
7447
7448 fi
7449
7450 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7451 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7452 echo "configure:7453: checking for PTRACE_GETFPXREGS" >&5
7453 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
7454 echo $ac_n "(cached) $ac_c" 1>&6
7455 else
7456 cat > conftest.$ac_ext <<EOF
7457 #line 7458 "configure"
7458 #include "confdefs.h"
7459 #include <sys/ptrace.h>
7460 int main() {
7461 PTRACE_GETFPXREGS;
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7465 rm -rf conftest*
7466 gdb_cv_have_ptrace_getfpxregs=yes
7467 else
7468 echo "configure: failed program was:" >&5
7469 cat conftest.$ac_ext >&5
7470 rm -rf conftest*
7471 gdb_cv_have_ptrace_getfpxregs=no
7472 fi
7473 rm -f conftest*
7474 fi
7475
7476 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7477 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7478 cat >> confdefs.h <<\EOF
7479 #define HAVE_PTRACE_GETFPXREGS 1
7480 EOF
7481
7482 fi
7483
7484 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7485 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7486 echo "configure:7487: checking for PT_GETDBREGS" >&5
7487 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+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 <sys/types.h>
7494 #include <sys/ptrace.h>
7495 int main() {
7496 PT_GETDBREGS;
7497 ; return 0; }
7498 EOF
7499 if { (eval echo configure:7500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7500 rm -rf conftest*
7501 gdb_cv_have_pt_getdbregs=yes
7502 else
7503 echo "configure: failed program was:" >&5
7504 cat conftest.$ac_ext >&5
7505 rm -rf conftest*
7506 gdb_cv_have_pt_getdbregs=no
7507 fi
7508 rm -f conftest*
7509 fi
7510
7511 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7512 if test $gdb_cv_have_pt_getdbregs = yes; then
7513 cat >> confdefs.h <<\EOF
7514 #define HAVE_PT_GETDBREGS 1
7515 EOF
7516
7517 fi
7518
7519 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7520 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7521 echo "configure:7522: checking for PT_GETXMMREGS" >&5
7522 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
7523 echo $ac_n "(cached) $ac_c" 1>&6
7524 else
7525 cat > conftest.$ac_ext <<EOF
7526 #line 7527 "configure"
7527 #include "confdefs.h"
7528 #include <sys/types.h>
7529 #include <sys/ptrace.h>
7530 int main() {
7531 PT_GETXMMREGS;
7532 ; return 0; }
7533 EOF
7534 if { (eval echo configure:7535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7535 rm -rf conftest*
7536 gdb_cv_have_pt_getxmmregs=yes
7537 else
7538 echo "configure: failed program was:" >&5
7539 cat conftest.$ac_ext >&5
7540 rm -rf conftest*
7541 gdb_cv_have_pt_getxmmregs=no
7542 fi
7543 rm -f conftest*
7544 fi
7545
7546 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7547 if test $gdb_cv_have_pt_getxmmregs = yes; then
7548 cat >> confdefs.h <<\EOF
7549 #define HAVE_PT_GETXMMREGS 1
7550 EOF
7551
7552 fi
7553
7554 # See if stdint.h provides the uintptr_t type.
7555 # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
7556 echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7557 echo "configure:7558: checking for uintptr_t in stdint.h" >&5
7558 if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7559 echo $ac_n "(cached) $ac_c" 1>&6
7560 else
7561 cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 #include <stdint.h>
7565 int main() {
7566 uintptr_t foo = 0;
7567 ; return 0; }
7568 EOF
7569 if { (eval echo configure:7570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7570 rm -rf conftest*
7571 gdb_cv_have_uintptr_t=yes
7572 else
7573 echo "configure: failed program was:" >&5
7574 cat conftest.$ac_ext >&5
7575 rm -rf conftest*
7576 gdb_cv_have_uintptr_t=no
7577 fi
7578 rm -f conftest*
7579 fi
7580
7581 echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7582 if test $gdb_cv_have_uintptr_t = yes; then
7583 cat >> confdefs.h <<\EOF
7584 #define HAVE_UINTPTR_T 1
7585 EOF
7586
7587 fi
7588
7589 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7590 echo "configure:7591: checking whether malloc must be declared" >&5
7591 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
7592 echo $ac_n "(cached) $ac_c" 1>&6
7593 else
7594 cat > conftest.$ac_ext <<EOF
7595 #line 7596 "configure"
7596 #include "confdefs.h"
7597
7598 #include <stdio.h>
7599 #ifdef HAVE_STRING_H
7600 #include <string.h>
7601 #else
7602 #ifdef HAVE_STRINGS_H
7603 #include <strings.h>
7604 #endif
7605 #endif
7606 #ifdef HAVE_STDLIB_H
7607 #include <stdlib.h>
7608 #endif
7609 #ifdef HAVE_UNISTD_H
7610 #include <unistd.h>
7611 #endif
7612 int main() {
7613 char *(*pfn) = (char *(*)) malloc
7614 ; return 0; }
7615 EOF
7616 if { (eval echo configure:7617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7617 rm -rf conftest*
7618 bfd_cv_decl_needed_malloc=no
7619 else
7620 echo "configure: failed program was:" >&5
7621 cat conftest.$ac_ext >&5
7622 rm -rf conftest*
7623 bfd_cv_decl_needed_malloc=yes
7624 fi
7625 rm -f conftest*
7626 fi
7627
7628 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7629 if test $bfd_cv_decl_needed_malloc = yes; then
7630 cat >> confdefs.h <<\EOF
7631 #define NEED_DECLARATION_MALLOC 1
7632 EOF
7633
7634 fi
7635
7636 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7637 echo "configure:7638: checking whether realloc must be declared" >&5
7638 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
7639 echo $ac_n "(cached) $ac_c" 1>&6
7640 else
7641 cat > conftest.$ac_ext <<EOF
7642 #line 7643 "configure"
7643 #include "confdefs.h"
7644
7645 #include <stdio.h>
7646 #ifdef HAVE_STRING_H
7647 #include <string.h>
7648 #else
7649 #ifdef HAVE_STRINGS_H
7650 #include <strings.h>
7651 #endif
7652 #endif
7653 #ifdef HAVE_STDLIB_H
7654 #include <stdlib.h>
7655 #endif
7656 #ifdef HAVE_UNISTD_H
7657 #include <unistd.h>
7658 #endif
7659 int main() {
7660 char *(*pfn) = (char *(*)) realloc
7661 ; return 0; }
7662 EOF
7663 if { (eval echo configure:7664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7664 rm -rf conftest*
7665 bfd_cv_decl_needed_realloc=no
7666 else
7667 echo "configure: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669 rm -rf conftest*
7670 bfd_cv_decl_needed_realloc=yes
7671 fi
7672 rm -f conftest*
7673 fi
7674
7675 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7676 if test $bfd_cv_decl_needed_realloc = yes; then
7677 cat >> confdefs.h <<\EOF
7678 #define NEED_DECLARATION_REALLOC 1
7679 EOF
7680
7681 fi
7682
7683 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7684 echo "configure:7685: checking whether free must be declared" >&5
7685 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
7686 echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688 cat > conftest.$ac_ext <<EOF
7689 #line 7690 "configure"
7690 #include "confdefs.h"
7691
7692 #include <stdio.h>
7693 #ifdef HAVE_STRING_H
7694 #include <string.h>
7695 #else
7696 #ifdef HAVE_STRINGS_H
7697 #include <strings.h>
7698 #endif
7699 #endif
7700 #ifdef HAVE_STDLIB_H
7701 #include <stdlib.h>
7702 #endif
7703 #ifdef HAVE_UNISTD_H
7704 #include <unistd.h>
7705 #endif
7706 int main() {
7707 char *(*pfn) = (char *(*)) free
7708 ; return 0; }
7709 EOF
7710 if { (eval echo configure:7711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7711 rm -rf conftest*
7712 bfd_cv_decl_needed_free=no
7713 else
7714 echo "configure: failed program was:" >&5
7715 cat conftest.$ac_ext >&5
7716 rm -rf conftest*
7717 bfd_cv_decl_needed_free=yes
7718 fi
7719 rm -f conftest*
7720 fi
7721
7722 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7723 if test $bfd_cv_decl_needed_free = yes; then
7724 cat >> confdefs.h <<\EOF
7725 #define NEED_DECLARATION_FREE 1
7726 EOF
7727
7728 fi
7729
7730 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
7731 echo "configure:7732: checking whether strerror must be declared" >&5
7732 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
7733 echo $ac_n "(cached) $ac_c" 1>&6
7734 else
7735 cat > conftest.$ac_ext <<EOF
7736 #line 7737 "configure"
7737 #include "confdefs.h"
7738
7739 #include <stdio.h>
7740 #ifdef HAVE_STRING_H
7741 #include <string.h>
7742 #else
7743 #ifdef HAVE_STRINGS_H
7744 #include <strings.h>
7745 #endif
7746 #endif
7747 #ifdef HAVE_STDLIB_H
7748 #include <stdlib.h>
7749 #endif
7750 #ifdef HAVE_UNISTD_H
7751 #include <unistd.h>
7752 #endif
7753 int main() {
7754 char *(*pfn) = (char *(*)) strerror
7755 ; return 0; }
7756 EOF
7757 if { (eval echo configure:7758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7758 rm -rf conftest*
7759 bfd_cv_decl_needed_strerror=no
7760 else
7761 echo "configure: failed program was:" >&5
7762 cat conftest.$ac_ext >&5
7763 rm -rf conftest*
7764 bfd_cv_decl_needed_strerror=yes
7765 fi
7766 rm -f conftest*
7767 fi
7768
7769 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7770 if test $bfd_cv_decl_needed_strerror = yes; then
7771 cat >> confdefs.h <<\EOF
7772 #define NEED_DECLARATION_STRERROR 1
7773 EOF
7774
7775 fi
7776
7777 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
7778 echo "configure:7779: checking whether strdup must be declared" >&5
7779 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
7780 echo $ac_n "(cached) $ac_c" 1>&6
7781 else
7782 cat > conftest.$ac_ext <<EOF
7783 #line 7784 "configure"
7784 #include "confdefs.h"
7785
7786 #include <stdio.h>
7787 #ifdef HAVE_STRING_H
7788 #include <string.h>
7789 #else
7790 #ifdef HAVE_STRINGS_H
7791 #include <strings.h>
7792 #endif
7793 #endif
7794 #ifdef HAVE_STDLIB_H
7795 #include <stdlib.h>
7796 #endif
7797 #ifdef HAVE_UNISTD_H
7798 #include <unistd.h>
7799 #endif
7800 int main() {
7801 char *(*pfn) = (char *(*)) strdup
7802 ; return 0; }
7803 EOF
7804 if { (eval echo configure:7805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7805 rm -rf conftest*
7806 bfd_cv_decl_needed_strdup=no
7807 else
7808 echo "configure: failed program was:" >&5
7809 cat conftest.$ac_ext >&5
7810 rm -rf conftest*
7811 bfd_cv_decl_needed_strdup=yes
7812 fi
7813 rm -f conftest*
7814 fi
7815
7816 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7817 if test $bfd_cv_decl_needed_strdup = yes; then
7818 cat >> confdefs.h <<\EOF
7819 #define NEED_DECLARATION_STRDUP 1
7820 EOF
7821
7822 fi
7823
7824 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
7825 echo "configure:7826: checking whether strstr must be declared" >&5
7826 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
7827 echo $ac_n "(cached) $ac_c" 1>&6
7828 else
7829 cat > conftest.$ac_ext <<EOF
7830 #line 7831 "configure"
7831 #include "confdefs.h"
7832
7833 #include <stdio.h>
7834 #ifdef HAVE_STRING_H
7835 #include <string.h>
7836 #else
7837 #ifdef HAVE_STRINGS_H
7838 #include <strings.h>
7839 #endif
7840 #endif
7841 #ifdef HAVE_STDLIB_H
7842 #include <stdlib.h>
7843 #endif
7844 #ifdef HAVE_UNISTD_H
7845 #include <unistd.h>
7846 #endif
7847 int main() {
7848 char *(*pfn) = (char *(*)) strstr
7849 ; return 0; }
7850 EOF
7851 if { (eval echo configure:7852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7852 rm -rf conftest*
7853 bfd_cv_decl_needed_strstr=no
7854 else
7855 echo "configure: failed program was:" >&5
7856 cat conftest.$ac_ext >&5
7857 rm -rf conftest*
7858 bfd_cv_decl_needed_strstr=yes
7859 fi
7860 rm -f conftest*
7861 fi
7862
7863 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7864 if test $bfd_cv_decl_needed_strstr = yes; then
7865 cat >> confdefs.h <<\EOF
7866 #define NEED_DECLARATION_STRSTR 1
7867 EOF
7868
7869 fi
7870
7871 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7872 echo "configure:7873: checking whether canonicalize_file_name must be declared" >&5
7873 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
7874 echo $ac_n "(cached) $ac_c" 1>&6
7875 else
7876 cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879
7880 #include <stdio.h>
7881 #ifdef HAVE_STRING_H
7882 #include <string.h>
7883 #else
7884 #ifdef HAVE_STRINGS_H
7885 #include <strings.h>
7886 #endif
7887 #endif
7888 #ifdef HAVE_STDLIB_H
7889 #include <stdlib.h>
7890 #endif
7891 #ifdef HAVE_UNISTD_H
7892 #include <unistd.h>
7893 #endif
7894 int main() {
7895 char *(*pfn) = (char *(*)) canonicalize_file_name
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7899 rm -rf conftest*
7900 bfd_cv_decl_needed_canonicalize_file_name=no
7901 else
7902 echo "configure: failed program was:" >&5
7903 cat conftest.$ac_ext >&5
7904 rm -rf conftest*
7905 bfd_cv_decl_needed_canonicalize_file_name=yes
7906 fi
7907 rm -f conftest*
7908 fi
7909
7910 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7911 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7912 cat >> confdefs.h <<\EOF
7913 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
7914 EOF
7915
7916 fi
7917
7918
7919 # The following save_state_t checkery is only necessary for HPUX
7920 # versions earlier than 10.20. When those fade from memory, this
7921 # could be expunged. --jsm 1999-03-22
7922
7923 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
7924 echo "configure:7925: checking for HPUX save_state structure" >&5
7925 cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928 #include <machine/save_state.h>
7929 EOF
7930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7931 egrep "save_state_t" >/dev/null 2>&1; then
7932 rm -rf conftest*
7933 gdb_cv_hpux_savestate=yes
7934 else
7935 rm -rf conftest*
7936 gdb_cv_hpux_savestate=no
7937 fi
7938 rm -f conftest*
7939
7940 cat > conftest.$ac_ext <<EOF
7941 #line 7942 "configure"
7942 #include "confdefs.h"
7943 #include <machine/save_state.h>
7944 EOF
7945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7946 egrep "ss_wide" >/dev/null 2>&1; then
7947 rm -rf conftest*
7948 gdb_cv_hpux_sswide=yes
7949 else
7950 rm -rf conftest*
7951 gdb_cv_hpux_sswide=no
7952 fi
7953 rm -f conftest*
7954
7955 if test $gdb_cv_hpux_savestate = yes
7956 then
7957 cat >> confdefs.h <<\EOF
7958 #define HAVE_STRUCT_SAVE_STATE_T 1
7959 EOF
7960
7961 fi
7962 if test $gdb_cv_hpux_sswide = yes
7963 then
7964 cat >> confdefs.h <<\EOF
7965 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
7966 EOF
7967
7968 fi
7969 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7970
7971
7972 # If we are configured native on GNU/Linux, work around problems with
7973 # sys/procfs.h
7974 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
7975
7976 if test "${target}" = "${host}"; then
7977 case "${host}" in
7978 i[3456]86-*-linux*)
7979 cat >> confdefs.h <<\EOF
7980 #define START_INFERIOR_TRAPS_EXPECTED 2
7981 EOF
7982
7983 cat >> confdefs.h <<\EOF
7984 #define sys_quotactl 1
7985 EOF
7986
7987 ;;
7988 ia64-*-aix*)
7989 cat >> confdefs.h <<\EOF
7990 #define NEW_PROC_API 1
7991 EOF
7992
7993 ;;
7994 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7995 cat >> confdefs.h <<\EOF
7996 #define NEW_PROC_API 1
7997 EOF
7998
7999 ;;
8000 *-*-solaris2.[6789])
8001 cat >> confdefs.h <<\EOF
8002 #define NEW_PROC_API 1
8003 EOF
8004
8005 ;;
8006 mips-sgi-irix5*)
8007 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8008 cat >> confdefs.h <<\EOF
8009 #define _KMEMUSER 1
8010 EOF
8011
8012 ;;
8013 esac
8014 fi
8015
8016 if test "$ac_cv_header_sys_procfs_h" = yes; then
8017 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
8018 echo "configure:8019: checking for pstatus_t in sys/procfs.h" >&5
8019 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
8020 echo $ac_n "(cached) $ac_c" 1>&6
8021 else
8022 cat > conftest.$ac_ext <<EOF
8023 #line 8024 "configure"
8024 #include "confdefs.h"
8025
8026 #define _SYSCALL32
8027 #include <sys/procfs.h>
8028 int main() {
8029 pstatus_t avar
8030 ; return 0; }
8031 EOF
8032 if { (eval echo configure:8033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8033 rm -rf conftest*
8034 bfd_cv_have_sys_procfs_type_pstatus_t=yes
8035 else
8036 echo "configure: failed program was:" >&5
8037 cat conftest.$ac_ext >&5
8038 rm -rf conftest*
8039 bfd_cv_have_sys_procfs_type_pstatus_t=no
8040
8041 fi
8042 rm -f conftest*
8043 fi
8044
8045 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
8046 cat >> confdefs.h <<\EOF
8047 #define HAVE_PSTATUS_T 1
8048 EOF
8049
8050 fi
8051 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
8052
8053 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
8054 echo "configure:8055: checking for prrun_t in sys/procfs.h" >&5
8055 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
8056 echo $ac_n "(cached) $ac_c" 1>&6
8057 else
8058 cat > conftest.$ac_ext <<EOF
8059 #line 8060 "configure"
8060 #include "confdefs.h"
8061
8062 #define _SYSCALL32
8063 #include <sys/procfs.h>
8064 int main() {
8065 prrun_t avar
8066 ; return 0; }
8067 EOF
8068 if { (eval echo configure:8069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8069 rm -rf conftest*
8070 bfd_cv_have_sys_procfs_type_prrun_t=yes
8071 else
8072 echo "configure: failed program was:" >&5
8073 cat conftest.$ac_ext >&5
8074 rm -rf conftest*
8075 bfd_cv_have_sys_procfs_type_prrun_t=no
8076
8077 fi
8078 rm -f conftest*
8079 fi
8080
8081 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
8082 cat >> confdefs.h <<\EOF
8083 #define HAVE_PRRUN_T 1
8084 EOF
8085
8086 fi
8087 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
8088
8089 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
8090 echo "configure:8091: checking for gregset_t in sys/procfs.h" >&5
8091 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
8092 echo $ac_n "(cached) $ac_c" 1>&6
8093 else
8094 cat > conftest.$ac_ext <<EOF
8095 #line 8096 "configure"
8096 #include "confdefs.h"
8097
8098 #define _SYSCALL32
8099 #include <sys/procfs.h>
8100 int main() {
8101 gregset_t avar
8102 ; return 0; }
8103 EOF
8104 if { (eval echo configure:8105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8105 rm -rf conftest*
8106 bfd_cv_have_sys_procfs_type_gregset_t=yes
8107 else
8108 echo "configure: failed program was:" >&5
8109 cat conftest.$ac_ext >&5
8110 rm -rf conftest*
8111 bfd_cv_have_sys_procfs_type_gregset_t=no
8112
8113 fi
8114 rm -f conftest*
8115 fi
8116
8117 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8118 cat >> confdefs.h <<\EOF
8119 #define HAVE_GREGSET_T 1
8120 EOF
8121
8122 fi
8123 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
8124
8125 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
8126 echo "configure:8127: checking for fpregset_t in sys/procfs.h" >&5
8127 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
8128 echo $ac_n "(cached) $ac_c" 1>&6
8129 else
8130 cat > conftest.$ac_ext <<EOF
8131 #line 8132 "configure"
8132 #include "confdefs.h"
8133
8134 #define _SYSCALL32
8135 #include <sys/procfs.h>
8136 int main() {
8137 fpregset_t avar
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_have_sys_procfs_type_fpregset_t=yes
8143 else
8144 echo "configure: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 rm -rf conftest*
8147 bfd_cv_have_sys_procfs_type_fpregset_t=no
8148
8149 fi
8150 rm -f conftest*
8151 fi
8152
8153 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8154 cat >> confdefs.h <<\EOF
8155 #define HAVE_FPREGSET_T 1
8156 EOF
8157
8158 fi
8159 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
8160
8161 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
8162 echo "configure:8163: checking for prgregset_t in sys/procfs.h" >&5
8163 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
8164 echo $ac_n "(cached) $ac_c" 1>&6
8165 else
8166 cat > conftest.$ac_ext <<EOF
8167 #line 8168 "configure"
8168 #include "confdefs.h"
8169
8170 #define _SYSCALL32
8171 #include <sys/procfs.h>
8172 int main() {
8173 prgregset_t avar
8174 ; return 0; }
8175 EOF
8176 if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8177 rm -rf conftest*
8178 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8179 else
8180 echo "configure: failed program was:" >&5
8181 cat conftest.$ac_ext >&5
8182 rm -rf conftest*
8183 bfd_cv_have_sys_procfs_type_prgregset_t=no
8184
8185 fi
8186 rm -f conftest*
8187 fi
8188
8189 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8190 cat >> confdefs.h <<\EOF
8191 #define HAVE_PRGREGSET_T 1
8192 EOF
8193
8194 fi
8195 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
8196
8197 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
8198 echo "configure:8199: checking for prfpregset_t in sys/procfs.h" >&5
8199 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
8200 echo $ac_n "(cached) $ac_c" 1>&6
8201 else
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205
8206 #define _SYSCALL32
8207 #include <sys/procfs.h>
8208 int main() {
8209 prfpregset_t avar
8210 ; return 0; }
8211 EOF
8212 if { (eval echo configure:8213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8213 rm -rf conftest*
8214 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8215 else
8216 echo "configure: failed program was:" >&5
8217 cat conftest.$ac_ext >&5
8218 rm -rf conftest*
8219 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8220
8221 fi
8222 rm -f conftest*
8223 fi
8224
8225 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8226 cat >> confdefs.h <<\EOF
8227 #define HAVE_PRFPREGSET_T 1
8228 EOF
8229
8230 fi
8231 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
8232
8233 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
8234 echo "configure:8235: checking for prgregset32_t in sys/procfs.h" >&5
8235 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
8236 echo $ac_n "(cached) $ac_c" 1>&6
8237 else
8238 cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241
8242 #define _SYSCALL32
8243 #include <sys/procfs.h>
8244 int main() {
8245 prgregset32_t avar
8246 ; return 0; }
8247 EOF
8248 if { (eval echo configure:8249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8249 rm -rf conftest*
8250 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8251 else
8252 echo "configure: failed program was:" >&5
8253 cat conftest.$ac_ext >&5
8254 rm -rf conftest*
8255 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8256
8257 fi
8258 rm -f conftest*
8259 fi
8260
8261 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8262 cat >> confdefs.h <<\EOF
8263 #define HAVE_PRGREGSET32_T 1
8264 EOF
8265
8266 fi
8267 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
8268
8269 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
8270 echo "configure:8271: checking for prfpregset32_t in sys/procfs.h" >&5
8271 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
8272 echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274 cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277
8278 #define _SYSCALL32
8279 #include <sys/procfs.h>
8280 int main() {
8281 prfpregset32_t avar
8282 ; return 0; }
8283 EOF
8284 if { (eval echo configure:8285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8285 rm -rf conftest*
8286 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
8287 else
8288 echo "configure: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 rm -rf conftest*
8291 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8292
8293 fi
8294 rm -f conftest*
8295 fi
8296
8297 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8298 cat >> confdefs.h <<\EOF
8299 #define HAVE_PRFPREGSET32_T 1
8300 EOF
8301
8302 fi
8303 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
8304
8305 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
8306 echo "configure:8307: checking for lwpid_t in sys/procfs.h" >&5
8307 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
8308 echo $ac_n "(cached) $ac_c" 1>&6
8309 else
8310 cat > conftest.$ac_ext <<EOF
8311 #line 8312 "configure"
8312 #include "confdefs.h"
8313
8314 #define _SYSCALL32
8315 #include <sys/procfs.h>
8316 int main() {
8317 lwpid_t avar
8318 ; return 0; }
8319 EOF
8320 if { (eval echo configure:8321: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8321 rm -rf conftest*
8322 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8323 else
8324 echo "configure: failed program was:" >&5
8325 cat conftest.$ac_ext >&5
8326 rm -rf conftest*
8327 bfd_cv_have_sys_procfs_type_lwpid_t=no
8328
8329 fi
8330 rm -f conftest*
8331 fi
8332
8333 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8334 cat >> confdefs.h <<\EOF
8335 #define HAVE_LWPID_T 1
8336 EOF
8337
8338 fi
8339 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
8340
8341 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
8342 echo "configure:8343: checking for psaddr_t in sys/procfs.h" >&5
8343 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
8344 echo $ac_n "(cached) $ac_c" 1>&6
8345 else
8346 cat > conftest.$ac_ext <<EOF
8347 #line 8348 "configure"
8348 #include "confdefs.h"
8349
8350 #define _SYSCALL32
8351 #include <sys/procfs.h>
8352 int main() {
8353 psaddr_t avar
8354 ; return 0; }
8355 EOF
8356 if { (eval echo configure:8357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8357 rm -rf conftest*
8358 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8359 else
8360 echo "configure: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8362 rm -rf conftest*
8363 bfd_cv_have_sys_procfs_type_psaddr_t=no
8364
8365 fi
8366 rm -f conftest*
8367 fi
8368
8369 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8370 cat >> confdefs.h <<\EOF
8371 #define HAVE_PSADDR_T 1
8372 EOF
8373
8374 fi
8375 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
8376
8377 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
8378 echo "configure:8379: checking for prsysent_t in sys/procfs.h" >&5
8379 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
8380 echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382 cat > conftest.$ac_ext <<EOF
8383 #line 8384 "configure"
8384 #include "confdefs.h"
8385
8386 #define _SYSCALL32
8387 #include <sys/procfs.h>
8388 int main() {
8389 prsysent_t avar
8390 ; return 0; }
8391 EOF
8392 if { (eval echo configure:8393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8393 rm -rf conftest*
8394 bfd_cv_have_sys_procfs_type_prsysent_t=yes
8395 else
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 rm -rf conftest*
8399 bfd_cv_have_sys_procfs_type_prsysent_t=no
8400
8401 fi
8402 rm -f conftest*
8403 fi
8404
8405 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8406 cat >> confdefs.h <<\EOF
8407 #define HAVE_PRSYSENT_T 1
8408 EOF
8409
8410 fi
8411 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
8412
8413 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
8414 echo "configure:8415: checking for pr_sigset_t in sys/procfs.h" >&5
8415 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
8416 echo $ac_n "(cached) $ac_c" 1>&6
8417 else
8418 cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421
8422 #define _SYSCALL32
8423 #include <sys/procfs.h>
8424 int main() {
8425 pr_sigset_t avar
8426 ; return 0; }
8427 EOF
8428 if { (eval echo configure:8429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8429 rm -rf conftest*
8430 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
8431 else
8432 echo "configure: failed program was:" >&5
8433 cat conftest.$ac_ext >&5
8434 rm -rf conftest*
8435 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8436
8437 fi
8438 rm -f conftest*
8439 fi
8440
8441 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8442 cat >> confdefs.h <<\EOF
8443 #define HAVE_PR_SIGSET_T 1
8444 EOF
8445
8446 fi
8447 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
8448
8449 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
8450 echo "configure:8451: checking for pr_sigaction64_t in sys/procfs.h" >&5
8451 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
8452 echo $ac_n "(cached) $ac_c" 1>&6
8453 else
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457
8458 #define _SYSCALL32
8459 #include <sys/procfs.h>
8460 int main() {
8461 pr_sigaction64_t avar
8462 ; return 0; }
8463 EOF
8464 if { (eval echo configure:8465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8465 rm -rf conftest*
8466 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
8467 else
8468 echo "configure: failed program was:" >&5
8469 cat conftest.$ac_ext >&5
8470 rm -rf conftest*
8471 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8472
8473 fi
8474 rm -f conftest*
8475 fi
8476
8477 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8478 cat >> confdefs.h <<\EOF
8479 #define HAVE_PR_SIGACTION64_T 1
8480 EOF
8481
8482 fi
8483 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8484
8485 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
8486 echo "configure:8487: checking for pr_siginfo64_t in sys/procfs.h" >&5
8487 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8488 echo $ac_n "(cached) $ac_c" 1>&6
8489 else
8490 cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493
8494 #define _SYSCALL32
8495 #include <sys/procfs.h>
8496 int main() {
8497 pr_siginfo64_t avar
8498 ; return 0; }
8499 EOF
8500 if { (eval echo configure:8501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8501 rm -rf conftest*
8502 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8503 else
8504 echo "configure: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 rm -rf conftest*
8507 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8508
8509 fi
8510 rm -f conftest*
8511 fi
8512
8513 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8514 cat >> confdefs.h <<\EOF
8515 #define HAVE_PR_SIGINFO64_T 1
8516 EOF
8517
8518 fi
8519 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8520
8521
8522
8523
8524
8525 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8526 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
8527 echo "configure:8528: checking whether prfpregset_t type is broken" >&5
8528 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
8529 echo $ac_n "(cached) $ac_c" 1>&6
8530 else
8531 if test "$cross_compiling" = yes; then
8532 gdb_cv_prfpregset_t_broken=yes
8533 else
8534 cat > conftest.$ac_ext <<EOF
8535 #line 8536 "configure"
8536 #include "confdefs.h"
8537 #include <sys/procfs.h>
8538 int main ()
8539 {
8540 if (sizeof (prfpregset_t) == sizeof (void *))
8541 return 1;
8542 return 0;
8543 }
8544 EOF
8545 if { (eval echo configure:8546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8546 then
8547 gdb_cv_prfpregset_t_broken=no
8548 else
8549 echo "configure: failed program was:" >&5
8550 cat conftest.$ac_ext >&5
8551 rm -fr conftest*
8552 gdb_cv_prfpregset_t_broken=yes
8553 fi
8554 rm -fr conftest*
8555 fi
8556
8557 fi
8558
8559 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8560 if test $gdb_cv_prfpregset_t_broken = yes; then
8561 cat >> confdefs.h <<\EOF
8562 #define PRFPREGSET_T_BROKEN 1
8563 EOF
8564
8565 fi
8566 fi
8567
8568
8569 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
8570 echo "configure:8571: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
8571 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
8572 echo $ac_n "(cached) $ac_c" 1>&6
8573 else
8574 cat > conftest.$ac_ext <<EOF
8575 #line 8576 "configure"
8576 #include "confdefs.h"
8577 #include <unistd.h>
8578 #include <sys/types.h>
8579 #include <sys/procfs.h>
8580
8581 int main() {
8582
8583 int dummy;;
8584 dummy = ioctl(0, PIOCSET, &dummy);
8585
8586 ; return 0; }
8587 EOF
8588 if { (eval echo configure:8589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8589 rm -rf conftest*
8590 gdb_cv_have_procfs_piocset=yes
8591 else
8592 echo "configure: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 rm -rf conftest*
8595 gdb_cv_have_procfs_piocset=no
8596 fi
8597 rm -f conftest*
8598 fi
8599
8600 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8601 if test $gdb_cv_have_procfs_piocset = yes; then
8602 cat >> confdefs.h <<\EOF
8603 #define HAVE_PROCFS_PIOCSET 1
8604 EOF
8605
8606 fi
8607 fi
8608
8609 if test ${host} = ${target} ; then
8610
8611 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
8612 echo "configure:8613: checking for member l_addr in struct link_map" >&5
8613 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
8614 echo $ac_n "(cached) $ac_c" 1>&6
8615 else
8616 cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619 #include <link.h>
8620 int main() {
8621 struct link_map lm; (void) lm.l_addr;
8622 ; return 0; }
8623 EOF
8624 if { (eval echo configure:8625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8625 rm -rf conftest*
8626 gdb_cv_have_struct_link_map_with_l_members=yes
8627 else
8628 echo "configure: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 rm -rf conftest*
8631 gdb_cv_have_struct_link_map_with_l_members=no
8632 fi
8633 rm -f conftest*
8634 fi
8635
8636 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8637 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8638 cat >> confdefs.h <<\EOF
8639 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
8640 EOF
8641
8642 fi
8643
8644
8645 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
8646 echo "configure:8647: checking for member lm_addr in struct link_map" >&5
8647 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8648 echo $ac_n "(cached) $ac_c" 1>&6
8649 else
8650 cat > conftest.$ac_ext <<EOF
8651 #line 8652 "configure"
8652 #include "confdefs.h"
8653 #include <sys/types.h>
8654 #include <link.h>
8655 int main() {
8656 struct link_map lm; (void) lm.lm_addr;
8657 ; return 0; }
8658 EOF
8659 if { (eval echo configure:8660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8660 rm -rf conftest*
8661 gdb_cv_have_struct_link_map_with_lm_members=yes
8662 else
8663 echo "configure: failed program was:" >&5
8664 cat conftest.$ac_ext >&5
8665 rm -rf conftest*
8666 gdb_cv_have_struct_link_map_with_lm_members=no
8667 fi
8668 rm -f conftest*
8669 fi
8670
8671 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8672 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8673 cat >> confdefs.h <<\EOF
8674 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8675 EOF
8676
8677 fi
8678
8679
8680 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
8681 echo "configure:8682: checking for member som_addr in struct so_map" >&5
8682 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
8683 echo $ac_n "(cached) $ac_c" 1>&6
8684 else
8685 cat > conftest.$ac_ext <<EOF
8686 #line 8687 "configure"
8687 #include "confdefs.h"
8688 #include <sys/types.h>
8689 #ifdef HAVE_NLIST_H
8690 #include <nlist.h>
8691 #endif
8692 #include <link.h>
8693 int main() {
8694 struct so_map lm; (void) lm.som_addr;
8695 ; return 0; }
8696 EOF
8697 if { (eval echo configure:8698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8698 rm -rf conftest*
8699 gdb_cv_have_struct_so_map_with_som_members=yes
8700 else
8701 echo "configure: failed program was:" >&5
8702 cat conftest.$ac_ext >&5
8703 rm -rf conftest*
8704 gdb_cv_have_struct_so_map_with_som_members=no
8705 fi
8706 rm -f conftest*
8707 fi
8708
8709 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8710 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8711 cat >> confdefs.h <<\EOF
8712 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8713 EOF
8714
8715 fi
8716
8717
8718 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
8719 echo "configure:8720: checking for struct link_map32 in sys/link.h" >&5
8720 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8721 echo $ac_n "(cached) $ac_c" 1>&6
8722 else
8723 cat > conftest.$ac_ext <<EOF
8724 #line 8725 "configure"
8725 #include "confdefs.h"
8726 #define _SYSCALL32
8727 #include <sys/link.h>
8728 int main() {
8729 struct link_map32 l;
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8733 rm -rf conftest*
8734 gdb_cv_have_struct_link_map32=yes
8735 else
8736 echo "configure: failed program was:" >&5
8737 cat conftest.$ac_ext >&5
8738 rm -rf conftest*
8739 gdb_cv_have_struct_link_map32=no
8740 fi
8741 rm -f conftest*
8742 fi
8743
8744 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8745 if test $gdb_cv_have_struct_link_map32 = yes; then
8746 cat >> confdefs.h <<\EOF
8747 #define HAVE_STRUCT_LINK_MAP32 1
8748 EOF
8749
8750 cat >> confdefs.h <<\EOF
8751 #define _SYSCALL32 1
8752 EOF
8753
8754 fi
8755 fi
8756
8757
8758 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
8759 echo "configure:8760: checking for long long support in compiler" >&5
8760 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8761 echo $ac_n "(cached) $ac_c" 1>&6
8762 else
8763 cat > conftest.$ac_ext <<EOF
8764 #line 8765 "configure"
8765 #include "confdefs.h"
8766
8767 int main() {
8768
8769 extern long long foo;
8770 switch (foo & 2) { case 0: return 1; }
8771
8772 ; return 0; }
8773 EOF
8774 if { (eval echo configure:8775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8775 rm -rf conftest*
8776 gdb_cv_c_long_long=yes
8777 else
8778 echo "configure: failed program was:" >&5
8779 cat conftest.$ac_ext >&5
8780 rm -rf conftest*
8781 gdb_cv_c_long_long=no
8782 fi
8783 rm -f conftest*
8784 fi
8785
8786 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8787 if test $gdb_cv_c_long_long = yes; then
8788 cat >> confdefs.h <<\EOF
8789 #define CC_HAS_LONG_LONG 1
8790 EOF
8791
8792 fi
8793
8794
8795 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
8796 echo "configure:8797: checking for long long support in printf" >&5
8797 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8798 echo $ac_n "(cached) $ac_c" 1>&6
8799 else
8800 if test "$cross_compiling" = yes; then
8801 gdb_cv_printf_has_long_long=no
8802 else
8803 cat > conftest.$ac_ext <<EOF
8804 #line 8805 "configure"
8805 #include "confdefs.h"
8806
8807 int main () {
8808 char buf[32];
8809 long long l = 0;
8810 l = (l << 16) + 0x0123;
8811 l = (l << 16) + 0x4567;
8812 l = (l << 16) + 0x89ab;
8813 l = (l << 16) + 0xcdef;
8814 sprintf (buf, "0x%016llx", l);
8815 return (strcmp ("0x0123456789abcdef", buf));
8816 }
8817 EOF
8818 if { (eval echo configure:8819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8819 then
8820 gdb_cv_printf_has_long_long=yes
8821 else
8822 echo "configure: failed program was:" >&5
8823 cat conftest.$ac_ext >&5
8824 rm -fr conftest*
8825 gdb_cv_printf_has_long_long=no
8826 fi
8827 rm -fr conftest*
8828 fi
8829
8830 fi
8831
8832 if test $gdb_cv_printf_has_long_long = yes; then
8833 cat >> confdefs.h <<\EOF
8834 #define PRINTF_HAS_LONG_LONG 1
8835 EOF
8836
8837 fi
8838 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8839
8840
8841 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8842 echo "configure:8843: checking for long double support in compiler" >&5
8843 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8844 echo $ac_n "(cached) $ac_c" 1>&6
8845 else
8846 cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8849
8850 int main() {
8851 long double foo;
8852 ; return 0; }
8853 EOF
8854 if { (eval echo configure:8855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8855 rm -rf conftest*
8856 ac_cv_c_long_double=yes
8857 else
8858 echo "configure: failed program was:" >&5
8859 cat conftest.$ac_ext >&5
8860 rm -rf conftest*
8861 ac_cv_c_long_double=no
8862 fi
8863 rm -f conftest*
8864 fi
8865
8866 echo "$ac_t""$ac_cv_c_long_double" 1>&6
8867 if test $ac_cv_c_long_double = yes; then
8868 cat >> confdefs.h <<\EOF
8869 #define HAVE_LONG_DOUBLE 1
8870 EOF
8871
8872 fi
8873
8874
8875 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8876 echo "configure:8877: checking for long double support in printf" >&5
8877 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8878 echo $ac_n "(cached) $ac_c" 1>&6
8879 else
8880 if test "$cross_compiling" = yes; then
8881 gdb_cv_printf_has_long_double=no
8882 else
8883 cat > conftest.$ac_ext <<EOF
8884 #line 8885 "configure"
8885 #include "confdefs.h"
8886
8887 int main () {
8888 char buf[16];
8889 long double f = 3.141592653;
8890 sprintf (buf, "%Lg", f);
8891 return (strncmp ("3.14159", buf, 7));
8892 }
8893 EOF
8894 if { (eval echo configure:8895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8895 then
8896 gdb_cv_printf_has_long_double=yes
8897 else
8898 echo "configure: failed program was:" >&5
8899 cat conftest.$ac_ext >&5
8900 rm -fr conftest*
8901 gdb_cv_printf_has_long_double=no
8902 fi
8903 rm -fr conftest*
8904 fi
8905
8906 fi
8907
8908 if test $gdb_cv_printf_has_long_double = yes; then
8909 cat >> confdefs.h <<\EOF
8910 #define PRINTF_HAS_LONG_DOUBLE 1
8911 EOF
8912
8913 fi
8914 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8915
8916
8917 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
8918 echo "configure:8919: checking for long double support in scanf" >&5
8919 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8920 echo $ac_n "(cached) $ac_c" 1>&6
8921 else
8922 if test "$cross_compiling" = yes; then
8923 gdb_cv_scanf_has_long_double=no
8924 else
8925 cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8928
8929 int main () {
8930 char *buf = "3.141592653";
8931 long double f = 0;
8932 sscanf (buf, "%Lg", &f);
8933 return !(f > 3.14159 && f < 3.14160);
8934 }
8935 EOF
8936 if { (eval echo configure:8937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8937 then
8938 gdb_cv_scanf_has_long_double=yes
8939 else
8940 echo "configure: failed program was:" >&5
8941 cat conftest.$ac_ext >&5
8942 rm -fr conftest*
8943 gdb_cv_scanf_has_long_double=no
8944 fi
8945 rm -fr conftest*
8946 fi
8947
8948 fi
8949
8950 if test $gdb_cv_scanf_has_long_double = yes; then
8951 cat >> confdefs.h <<\EOF
8952 #define SCANF_HAS_LONG_DOUBLE 1
8953 EOF
8954
8955 fi
8956 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
8957
8958 case ${host_os} in
8959 aix*)
8960 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
8961 echo "configure:8962: checking for -bbigtoc option" >&5
8962 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8963 echo $ac_n "(cached) $ac_c" 1>&6
8964 else
8965
8966 SAVE_LDFLAGS=$LDFLAGS
8967
8968 case $GCC in
8969 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8970 *) gdb_cv_bigtoc=-bbigtoc ;;
8971 esac
8972
8973 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8974 cat > conftest.$ac_ext <<EOF
8975 #line 8976 "configure"
8976 #include "confdefs.h"
8977
8978 int main() {
8979 int i;
8980 ; return 0; }
8981 EOF
8982 if { (eval echo configure:8983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8983 :
8984 else
8985 echo "configure: failed program was:" >&5
8986 cat conftest.$ac_ext >&5
8987 rm -rf conftest*
8988 gdb_cv_bigtoc=
8989 fi
8990 rm -f conftest*
8991 LDFLAGS="${SAVE_LDFLAGS}"
8992
8993 fi
8994
8995 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8996 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8997 ;;
8998 esac
8999
9000
9001
9002 if test ${build} = ${host} -a ${host} = ${target} ; then
9003 case ${host_os} in
9004 hpux*)
9005 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
9006 echo "configure:9007: checking for HPUX/OSF thread support" >&5
9007 if test -f /usr/include/dce/cma_config.h ; then
9008 if test "$GCC" = "yes" ; then
9009 echo "$ac_t""yes" 1>&6
9010 cat >> confdefs.h <<\EOF
9011 #define HAVE_HPUX_THREAD_SUPPORT 1
9012 EOF
9013
9014 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
9015 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9016 else
9017 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9018 fi
9019 else
9020 echo "$ac_t""no" 1>&6
9021 fi
9022 ;;
9023 solaris*)
9024 # See if thread_db library is around for Solaris thread debugging.
9025 # Note that we must explicitly test for version 1 of the library
9026 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9027 # the same API.
9028 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
9029 echo "configure:9030: checking for Solaris thread debugging library" >&5
9030 if test -f /usr/lib/libthread_db.so.1 ; then
9031 echo "$ac_t""yes" 1>&6
9032 cat >> confdefs.h <<\EOF
9033 #define HAVE_THREAD_DB_LIB 1
9034 EOF
9035
9036 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
9037 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9038 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9039 echo "configure:9040: checking for dlopen in -ldl" >&5
9040 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9041 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9042 echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044 ac_save_LIBS="$LIBS"
9045 LIBS="-ldl $LIBS"
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 /* Override any gcc2 internal prototype to avoid an error. */
9050 /* We use char because int might match the return type of a gcc2
9051 builtin and then its argument prototype would still apply. */
9052 char dlopen();
9053
9054 int main() {
9055 dlopen()
9056 ; return 0; }
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9059 rm -rf conftest*
9060 eval "ac_cv_lib_$ac_lib_var=yes"
9061 else
9062 echo "configure: failed program was:" >&5
9063 cat conftest.$ac_ext >&5
9064 rm -rf conftest*
9065 eval "ac_cv_lib_$ac_lib_var=no"
9066 fi
9067 rm -f conftest*
9068 LIBS="$ac_save_LIBS"
9069
9070 fi
9071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9072 echo "$ac_t""yes" 1>&6
9073 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9074 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9075 cat >> confdefs.h <<EOF
9076 #define $ac_tr_lib 1
9077 EOF
9078
9079 LIBS="-ldl $LIBS"
9080
9081 else
9082 echo "$ac_t""no" 1>&6
9083 fi
9084
9085 if test "$GCC" = "yes" ; then
9086 # The GNU linker requires the -export-dynamic option to make
9087 # all symbols visible in the dynamic symbol table.
9088 hold_ldflags=$LDFLAGS
9089 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
9090 echo "configure:9091: checking for the ld -export-dynamic flag" >&5
9091 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9092 cat > conftest.$ac_ext <<EOF
9093 #line 9094 "configure"
9094 #include "confdefs.h"
9095
9096 int main() {
9097 int i;
9098 ; return 0; }
9099 EOF
9100 if { (eval echo configure:9101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9101 rm -rf conftest*
9102 found=yes
9103 else
9104 echo "configure: failed program was:" >&5
9105 cat conftest.$ac_ext >&5
9106 rm -rf conftest*
9107 found=no
9108 fi
9109 rm -f conftest*
9110 LDFLAGS=$hold_ldflags
9111 echo "$ac_t""$found" 1>&6
9112 if test $found = yes; then
9113 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9114 fi
9115 fi
9116 # Sun randomly tweaked the prototypes in <proc_service.h>
9117 # at one point.
9118 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9119 echo "configure:9120: checking if <proc_service.h> is old" >&5
9120 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9121 echo $ac_n "(cached) $ac_c" 1>&6
9122 else
9123
9124 cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127
9128 #include <proc_service.h>
9129 ps_err_e ps_pdwrite
9130 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9131
9132 int main() {
9133
9134 ; return 0; }
9135 EOF
9136 if { (eval echo configure:9137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9137 rm -rf conftest*
9138 gdb_cv_proc_service_is_old=no
9139 else
9140 echo "configure: failed program was:" >&5
9141 cat conftest.$ac_ext >&5
9142 rm -rf conftest*
9143 gdb_cv_proc_service_is_old=yes
9144 fi
9145 rm -f conftest*
9146
9147 fi
9148
9149 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9150 if test $gdb_cv_proc_service_is_old = yes; then
9151 cat >> confdefs.h <<\EOF
9152 #define PROC_SERVICE_IS_OLD 1
9153 EOF
9154
9155 fi
9156 else
9157 echo "$ac_t""no" 1>&6
9158 fi
9159 ;;
9160 aix*)
9161 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9162 echo "configure:9163: checking for AiX thread debugging library" >&5
9163 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9164 echo $ac_n "(cached) $ac_c" 1>&6
9165 else
9166 cat > conftest.$ac_ext <<EOF
9167 #line 9168 "configure"
9168 #include "confdefs.h"
9169 #include <sys/pthdebug.h>
9170 int main() {
9171 #ifndef PTHDB_VERSION_3
9172 #error
9173 #endif
9174 ; return 0; }
9175 EOF
9176 if { (eval echo configure:9177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9177 rm -rf conftest*
9178 gdb_cv_have_aix_thread_debug=yes
9179 else
9180 echo "configure: failed program was:" >&5
9181 cat conftest.$ac_ext >&5
9182 rm -rf conftest*
9183 gdb_cv_have_aix_thread_debug=no
9184 fi
9185 rm -f conftest*
9186 fi
9187
9188 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9189 if test $gdb_cv_have_aix_thread_debug = yes; then
9190 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9191 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
9192 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9193 fi
9194 ;;
9195 esac
9196
9197 fi
9198
9199 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9200 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9201 echo "configure:9202: checking whether <thread_db.h> has TD_NOTALLOC" >&5
9202 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9203 echo $ac_n "(cached) $ac_c" 1>&6
9204 else
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208 #include <thread_db.h>
9209 int main() {
9210 int i = TD_NOTALLOC;
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9214 rm -rf conftest*
9215 gdb_cv_thread_db_h_has_td_notalloc=yes
9216 else
9217 echo "configure: failed program was:" >&5
9218 cat conftest.$ac_ext >&5
9219 rm -rf conftest*
9220 gdb_cv_thread_db_h_has_td_notalloc=no
9221
9222 fi
9223 rm -f conftest*
9224
9225 fi
9226
9227 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9228 fi
9229 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9230 cat >> confdefs.h <<\EOF
9231 #define THREAD_DB_HAS_TD_NOTALLOC 1
9232 EOF
9233
9234 fi
9235
9236 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9237 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9238 echo "configure:9239: checking whether <sys/syscall.h> has __NR_tkill" >&5
9239 if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9240 echo $ac_n "(cached) $ac_c" 1>&6
9241 else
9242 cat > conftest.$ac_ext <<EOF
9243 #line 9244 "configure"
9244 #include "confdefs.h"
9245 #include <sys/syscall.h>
9246 int main() {
9247 int i = __NR_tkill;
9248 ; return 0; }
9249 EOF
9250 if { (eval echo configure:9251: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9251 rm -rf conftest*
9252 gdb_cv_sys_syscall_h_has_tkill=yes
9253 else
9254 echo "configure: failed program was:" >&5
9255 cat conftest.$ac_ext >&5
9256 rm -rf conftest*
9257 gdb_cv_sys_syscall_h_has_tkill=no
9258
9259 fi
9260 rm -f conftest*
9261
9262 fi
9263
9264 echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9265 fi
9266 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9267 cat >> confdefs.h <<\EOF
9268 #define HAVE_TKILL_SYSCALL 1
9269 EOF
9270
9271 fi
9272
9273
9274 # Check whether --with-sysroot or --without-sysroot was given.
9275 if test "${with_sysroot+set}" = set; then
9276 withval="$with_sysroot"
9277
9278 case ${with_sysroot} in
9279 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
9280 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9281 esac
9282
9283 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9284
9285 if test "x$exec_prefix" = xNONE; then
9286 if test "x$prefix" = xNONE; then
9287 test_prefix=/usr/local
9288 else
9289 test_prefix=$prefix
9290 fi
9291 else
9292 test_prefix=$exec_prefix
9293 fi
9294 case ${TARGET_SYSTEM_ROOT} in
9295 "${test_prefix}"|"${test_prefix}/"*|\
9296 '${exec_prefix}'|'${exec_prefix}/'*)
9297 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9298 TARGET_SYSTEM_ROOT_DEFINE="$t"
9299 ;;
9300 esac
9301
9302 else
9303
9304 TARGET_SYSTEM_ROOT=
9305 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9306
9307 fi
9308
9309
9310
9311
9312 # NOTE: Don't add -Wall or -Wunused, they both include
9313 # -Wunused-parameter which reports bogus warnings.
9314 # NOTE: If you add to this list, remember to update
9315 # gdb/doc/gdbint.texinfo.
9316 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9317 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
9318 -Wunused-label -Wunused-function"
9319 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9320 # -Wunused-function -Wunused-variable -Wunused-value
9321 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
9322 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9323 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9324 # -Woverloaded-virtual -Winline -Werror"
9325 # Check whether --enable-build-warnings or --disable-build-warnings was given.
9326 if test "${enable_build_warnings+set}" = set; then
9327 enableval="$enable_build_warnings"
9328 case "${enableval}" in
9329 yes) ;;
9330 no) build_warnings="-w";;
9331 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9332 build_warnings="${build_warnings} ${t}";;
9333 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9334 build_warnings="${t} ${build_warnings}";;
9335 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9336 esac
9337 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9338 echo "Setting compiler warning flags = $build_warnings" 6>&1
9339 fi
9340 fi
9341 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9342 if test "${enable_gdb_build_warnings+set}" = set; then
9343 enableval="$enable_gdb_build_warnings"
9344 case "${enableval}" in
9345 yes) ;;
9346 no) build_warnings="-w";;
9347 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9348 build_warnings="${build_warnings} ${t}";;
9349 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9350 build_warnings="${t} ${build_warnings}";;
9351 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9352 esac
9353 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9354 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9355 fi
9356 fi
9357 WARN_CFLAGS=""
9358 WERROR_CFLAGS=""
9359 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9360 then
9361 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9362 echo "configure:9363: checking compiler warning flags" >&5
9363 # Separate out the -Werror flag as some files just cannot be
9364 # compiled with it enabled.
9365 for w in ${build_warnings}; do
9366 case $w in
9367 -Werr*) WERROR_CFLAGS=-Werror ;;
9368 *) # Check that GCC accepts it
9369 saved_CFLAGS="$CFLAGS"
9370 CFLAGS="$CFLAGS $w"
9371 cat > conftest.$ac_ext <<EOF
9372 #line 9373 "configure"
9373 #include "confdefs.h"
9374
9375 int main() {
9376
9377 ; return 0; }
9378 EOF
9379 if { (eval echo configure:9380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9380 rm -rf conftest*
9381 WARN_CFLAGS="${WARN_CFLAGS} $w"
9382 else
9383 echo "configure: failed program was:" >&5
9384 cat conftest.$ac_ext >&5
9385 fi
9386 rm -f conftest*
9387 CFLAGS="$saved_CFLAGS"
9388 esac
9389 done
9390 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
9391 fi
9392
9393
9394
9395 # In the Cygwin environment, we need some additional flags.
9396 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9397 echo "configure:9398: checking for cygwin" >&5
9398 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9399 echo $ac_n "(cached) $ac_c" 1>&6
9400 else
9401 cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404
9405 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
9406 lose
9407 #endif
9408 EOF
9409 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9410 egrep "lose" >/dev/null 2>&1; then
9411 rm -rf conftest*
9412 gdb_cv_os_cygwin=yes
9413 else
9414 rm -rf conftest*
9415 gdb_cv_os_cygwin=no
9416 fi
9417 rm -f conftest*
9418
9419 fi
9420
9421 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9422
9423
9424 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9425 case ${host} in
9426 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9427 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
9428 esac
9429
9430
9431 # libreadline needs libuser32.a in a cygwin environment
9432 WIN32LIBS=
9433 if test x$gdb_cv_os_cygwin = xyes; then
9434 WIN32LIBS="-luser32"
9435 case "${target}" in
9436 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9437 ;;
9438 esac
9439 fi
9440
9441
9442 LIBGUI="../libgui/src/libgui.a"
9443 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9444
9445
9446
9447 WIN32LDAPP=
9448
9449
9450
9451 case "${host}" in
9452 *-*-cygwin*)
9453 configdir="win"
9454 ;;
9455 *)
9456 configdir="unix"
9457 ;;
9458 esac
9459
9460 GDBTKLIBS=
9461 if test "${enable_gdbtk}" = "yes"; then
9462
9463 # Gdbtk must have an absolute path to srcdir in order to run
9464 # properly when not installed.
9465 here=`pwd`
9466 cd ${srcdir}
9467 GDBTK_SRC_DIR=`pwd`
9468 cd $here
9469
9470
9471 #
9472 # Ok, lets find the tcl configuration
9473 # First, look for one uninstalled.
9474 # the alternative search directory is invoked by --with-tclconfig
9475 #
9476
9477 if test x"${no_tcl}" = x ; then
9478 # we reset no_tcl in case something fails here
9479 no_tcl=true
9480 # Check whether --with-tclconfig or --without-tclconfig was given.
9481 if test "${with_tclconfig+set}" = set; then
9482 withval="$with_tclconfig"
9483 with_tclconfig=${withval}
9484 fi
9485
9486 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9487 echo "configure:9488: checking for Tcl configuration" >&5
9488 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9489 echo $ac_n "(cached) $ac_c" 1>&6
9490 else
9491
9492
9493 # First check to see if --with-tclconfig was specified.
9494 if test x"${with_tclconfig}" != x ; then
9495 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9496 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9497 else
9498 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9499 fi
9500 fi
9501
9502 # then check for a private Tcl installation
9503 if test x"${ac_cv_c_tclconfig}" = x ; then
9504 for i in \
9505 ../tcl \
9506 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9507 ../../tcl \
9508 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9509 ../../../tcl \
9510 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9511 if test -f "$i/${configdir}/tclConfig.sh" ; then
9512 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9513 break
9514 fi
9515 done
9516 fi
9517 # check in a few common install locations
9518 if test x"${ac_cv_c_tclconfig}" = x ; then
9519 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9520 if test -f "$i/tclConfig.sh" ; then
9521 ac_cv_c_tclconfig=`(cd $i; pwd)`
9522 break
9523 fi
9524 done
9525 fi
9526 # check in a few other private locations
9527 if test x"${ac_cv_c_tclconfig}" = x ; then
9528 for i in \
9529 ${srcdir}/../tcl \
9530 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9531 if test -f "$i/${configdir}/tclConfig.sh" ; then
9532 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9533 break
9534 fi
9535 done
9536 fi
9537
9538 fi
9539
9540 if test x"${ac_cv_c_tclconfig}" = x ; then
9541 TCLCONFIG="# no Tcl configs found"
9542 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9543 else
9544 no_tcl=
9545 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9546 echo "$ac_t""found $TCLCONFIG" 1>&6
9547 fi
9548 fi
9549
9550 if test -z "${no_tcl}"; then
9551
9552 . $TCLCONFIG
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580 #
9581 # Ok, lets find the tk configuration
9582 # First, look for one uninstalled.
9583 # the alternative search directory is invoked by --with-tkconfig
9584 #
9585
9586 if test x"${no_tk}" = x ; then
9587 # we reset no_tk in case something fails here
9588 no_tk=true
9589 # Check whether --with-tkconfig or --without-tkconfig was given.
9590 if test "${with_tkconfig+set}" = set; then
9591 withval="$with_tkconfig"
9592 with_tkconfig=${withval}
9593 fi
9594
9595 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9596 echo "configure:9597: checking for Tk configuration" >&5
9597 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9598 echo $ac_n "(cached) $ac_c" 1>&6
9599 else
9600
9601
9602 # First check to see if --with-tkconfig was specified.
9603 if test x"${with_tkconfig}" != x ; then
9604 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9605 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9606 else
9607 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9608 fi
9609 fi
9610
9611 # then check for a private Tk library
9612 if test x"${ac_cv_c_tkconfig}" = x ; then
9613 for i in \
9614 ../tk \
9615 `ls -dr ../tk[4-9]* 2>/dev/null` \
9616 ../../tk \
9617 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9618 ../../../tk \
9619 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9620 if test -f "$i/${configdir}/tkConfig.sh" ; then
9621 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9622 break
9623 fi
9624 done
9625 fi
9626 # check in a few common install locations
9627 if test x"${ac_cv_c_tkconfig}" = x ; then
9628 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9629 if test -f "$i/tkConfig.sh" ; then
9630 ac_cv_c_tkconfig=`(cd $i; pwd)`
9631 break
9632 fi
9633 done
9634 fi
9635 # check in a few other private locations
9636 if test x"${ac_cv_c_tkconfig}" = x ; then
9637 for i in \
9638 ${srcdir}/../tk \
9639 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9640 if test -f "$i/${configdir}/tkConfig.sh" ; then
9641 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9642 break
9643 fi
9644 done
9645 fi
9646
9647 fi
9648
9649 if test x"${ac_cv_c_tkconfig}" = x ; then
9650 TKCONFIG="# no Tk configs found"
9651 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9652 else
9653 no_tk=
9654 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9655 echo "$ac_t""found $TKCONFIG" 1>&6
9656 fi
9657 fi
9658
9659
9660
9661 # now look for Tcl library stuff
9662
9663 tcldir="../tcl/${configdir}/"
9664
9665 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9666
9667 # If $no_tk is nonempty, then we can't do Tk, and there is no
9668 # point to doing Tcl.
9669 if test -z "${no_tk}"; then
9670
9671 if test -f "$TKCONFIG" ; then
9672 . $TKCONFIG
9673 fi
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688 #
9689 # Ok, lets find the tcl source trees so we can use the headers
9690 # Warning: transition of version 9 to 10 will break this algorithm
9691 # because 10 sorts before 9. We also look for just tcl. We have to
9692 # be careful that we don't match stuff like tclX by accident.
9693 # the alternative search directory is involked by --with-tclinclude
9694 #
9695
9696 no_tcl=true
9697 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9698 echo "configure:9699: checking for Tcl private headers. dir=${configdir}" >&5
9699 # Check whether --with-tclinclude or --without-tclinclude was given.
9700 if test "${with_tclinclude+set}" = set; then
9701 withval="$with_tclinclude"
9702 with_tclinclude=${withval}
9703 fi
9704
9705 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9706 echo $ac_n "(cached) $ac_c" 1>&6
9707 else
9708
9709 # first check to see if --with-tclinclude was specified
9710 if test x"${with_tclinclude}" != x ; then
9711 if test -f ${with_tclinclude}/tclInt.h ; then
9712 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9713 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9714 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9715 else
9716 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9717 fi
9718 fi
9719
9720 # next check if it came with Tcl configuration file
9721 if test x"${ac_cv_c_tclconfig}" = x ; then
9722 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9723 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9724 fi
9725 fi
9726
9727 # next check in private source directory
9728 #
9729 # since ls returns lowest version numbers first, reverse its output
9730 if test x"${ac_cv_c_tclh}" = x ; then
9731 for i in \
9732 ${srcdir}/../tcl \
9733 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9734 ${srcdir}/../../tcl \
9735 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9736 ${srcdir}/../../../tcl \
9737 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9738 if test -f $i/generic/tclInt.h ; then
9739 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9740 break
9741 fi
9742 done
9743 fi
9744 # finally check in a few common install locations
9745 #
9746 # since ls returns lowest version numbers first, reverse its output
9747 if test x"${ac_cv_c_tclh}" = x ; then
9748 for i in \
9749 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9750 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9751 /usr/local/src/tcl \
9752 /usr/local/lib/tcl \
9753 ${prefix}/include ; do
9754 if test -f $i/generic/tclInt.h ; then
9755 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9756 break
9757 fi
9758 done
9759 fi
9760 # see if one is installed
9761 if test x"${ac_cv_c_tclh}" = x ; then
9762 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9763 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9764 echo "configure:9765: checking for tclInt.h" >&5
9765 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9766 echo $ac_n "(cached) $ac_c" 1>&6
9767 else
9768 cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 #include <tclInt.h>
9772 EOF
9773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9774 { (eval echo configure:9775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9776 if test -z "$ac_err"; then
9777 rm -rf conftest*
9778 eval "ac_cv_header_$ac_safe=yes"
9779 else
9780 echo "$ac_err" >&5
9781 echo "configure: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 rm -rf conftest*
9784 eval "ac_cv_header_$ac_safe=no"
9785 fi
9786 rm -f conftest*
9787 fi
9788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9789 echo "$ac_t""yes" 1>&6
9790 ac_cv_c_tclh=installed
9791 else
9792 echo "$ac_t""no" 1>&6
9793 ac_cv_c_tclh=""
9794 fi
9795
9796 fi
9797
9798 fi
9799
9800 if test x"${ac_cv_c_tclh}" = x ; then
9801 TCLHDIR="# no Tcl private headers found"
9802 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9803 fi
9804 if test x"${ac_cv_c_tclh}" != x ; then
9805 no_tcl=""
9806 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9807 echo "$ac_t""is installed" 1>&6
9808 TCLHDIR=""
9809 else
9810 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9811 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9812 TCLHDIR="-I${ac_cv_c_tclh}"
9813 fi
9814 fi
9815
9816
9817
9818
9819 #
9820 # Ok, lets find the tk source trees so we can use the headers
9821 # If the directory (presumably symlink) named "tk" exists, use that one
9822 # in preference to any others. Same logic is used when choosing library
9823 # and again with Tcl. The search order is the best place to look first, then in
9824 # decreasing significance. The loop breaks if the trigger file is found.
9825 # Note the gross little conversion here of srcdir by cd'ing to the found
9826 # directory. This converts the path from a relative to an absolute, so
9827 # recursive cache variables for the path will work right. We check all
9828 # the possible paths in one loop rather than many seperate loops to speed
9829 # things up.
9830 # the alternative search directory is involked by --with-tkinclude
9831 #
9832 no_tk=true
9833 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9834 echo "configure:9835: checking for Tk private headers" >&5
9835 # Check whether --with-tkinclude or --without-tkinclude was given.
9836 if test "${with_tkinclude+set}" = set; then
9837 withval="$with_tkinclude"
9838 with_tkinclude=${withval}
9839 fi
9840
9841 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9842 echo $ac_n "(cached) $ac_c" 1>&6
9843 else
9844
9845 # first check to see if --with-tkinclude was specified
9846 if test x"${with_tkinclude}" != x ; then
9847 if test -f ${with_tkinclude}/tk.h ; then
9848 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9849 elif test -f ${with_tkinclude}/generic/tk.h ; then
9850 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9851 else
9852 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9853 fi
9854 fi
9855
9856 # next check if it came with Tk configuration file
9857 if test x"${ac_cv_c_tkconfig}" = x ; then
9858 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9859 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9860 fi
9861 fi
9862
9863 # next check in private source directory
9864 #
9865 # since ls returns lowest version numbers first, reverse its output
9866 if test x"${ac_cv_c_tkh}" = x ; then
9867 for i in \
9868 ${srcdir}/../tk \
9869 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9870 ${srcdir}/../../tk \
9871 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9872 ${srcdir}/../../../tk \
9873 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9874 if test -f $i/generic/tk.h ; then
9875 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9876 break
9877 fi
9878 done
9879 fi
9880 # finally check in a few common install locations
9881 #
9882 # since ls returns lowest version numbers first, reverse its output
9883 if test x"${ac_cv_c_tkh}" = x ; then
9884 for i in \
9885 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9886 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9887 /usr/local/src/tk \
9888 /usr/local/lib/tk \
9889 ${prefix}/include ; do
9890 if test -f $i/generic/tk.h ; then
9891 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9892 break
9893 fi
9894 done
9895 fi
9896 # see if one is installed
9897 if test x"${ac_cv_c_tkh}" = x ; then
9898 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9899 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9900 echo "configure:9901: checking for tk.h" >&5
9901 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9902 echo $ac_n "(cached) $ac_c" 1>&6
9903 else
9904 cat > conftest.$ac_ext <<EOF
9905 #line 9906 "configure"
9906 #include "confdefs.h"
9907 #include <tk.h>
9908 EOF
9909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9910 { (eval echo configure:9911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9912 if test -z "$ac_err"; then
9913 rm -rf conftest*
9914 eval "ac_cv_header_$ac_safe=yes"
9915 else
9916 echo "$ac_err" >&5
9917 echo "configure: failed program was:" >&5
9918 cat conftest.$ac_ext >&5
9919 rm -rf conftest*
9920 eval "ac_cv_header_$ac_safe=no"
9921 fi
9922 rm -f conftest*
9923 fi
9924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9925 echo "$ac_t""yes" 1>&6
9926 ac_cv_c_tkh=installed
9927 else
9928 echo "$ac_t""no" 1>&6
9929 ac_cv_c_tkh=""
9930 fi
9931
9932 fi
9933
9934 fi
9935
9936 if test x"${ac_cv_c_tkh}" != x ; then
9937 no_tk=""
9938 if test x"${ac_cv_c_tkh}" = x"installed" ; then
9939 echo "$ac_t""is installed" 1>&6
9940 TKHDIR=""
9941 else
9942 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9943 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9944 TKHDIR="-I${ac_cv_c_tkh}"
9945 fi
9946 else
9947 TKHDIR="# no Tk directory found"
9948 echo "configure: warning: Can't find Tk private headers" 1>&2
9949 no_tk=true
9950 fi
9951
9952
9953
9954
9955 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9956 echo "configure:9957: checking for Itcl private headers. srcdir=${srcdir}" >&5
9957 if test x"${ac_cv_c_itclh}" = x ; then
9958 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9959 if test -f $i/generic/itcl.h ; then
9960 ac_cv_c_itclh=`(cd $i/generic; pwd)`
9961 break
9962 fi
9963 done
9964 fi
9965 if test x"${ac_cv_c_itclh}" = x ; then
9966 ITCLHDIR="# no Itcl private headers found"
9967 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9968 fi
9969 if test x"${ac_cv_c_itclh}" != x ; then
9970 ITCLHDIR="-I${ac_cv_c_itclh}"
9971 fi
9972 # should always be here
9973 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
9974
9975 #AC_SUBST(ITCLLIB)
9976
9977
9978 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9979 echo "configure:9980: checking for Itk private headers. srcdir=${srcdir}" >&5
9980 if test x"${ac_cv_c_itkh}" = x ; then
9981 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9982 if test -f $i/generic/itk.h ; then
9983 ac_cv_c_itkh=`(cd $i/generic; pwd)`
9984 break
9985 fi
9986 done
9987 fi
9988 if test x"${ac_cv_c_itkh}" = x ; then
9989 ITKHDIR="# no Itk private headers found"
9990 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9991 fi
9992 if test x"${ac_cv_c_itkh}" != x ; then
9993 ITKHDIR="-I${ac_cv_c_itkh}"
9994 fi
9995 # should always be here
9996 # ITKLIB="../itcl/itk/unix/libitk.a"
9997
9998 #AC_SUBST(ITKLIB)
9999
10000
10001
10002 # now look for Tk library stuff
10003
10004 tkdir="../tk/${configdir}/"
10005
10006 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10007
10008 # now look for Itcl library stuff
10009
10010
10011 #
10012 # Ok, lets find the itcl configuration
10013 # First, look for one uninstalled.
10014 # the alternative search directory is invoked by --with-itclconfig
10015 #
10016
10017 if test x"${no_itcl}" = x ; then
10018 # we reset no_itcl in case something fails here
10019 no_itcl=true
10020 # Check whether --with-itclconfig or --without-itclconfig was given.
10021 if test "${with_itclconfig+set}" = set; then
10022 withval="$with_itclconfig"
10023 with_itclconfig=${withval}
10024 fi
10025
10026 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
10027 echo "configure:10028: checking for Itcl configuration" >&5
10028 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10029 echo $ac_n "(cached) $ac_c" 1>&6
10030 else
10031
10032
10033 # First check to see if --with-itclconfig was specified.
10034 if test x"${with_itclconfig}" != x ; then
10035 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10036 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10037 else
10038 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10039 fi
10040 fi
10041
10042 # then check for a private Itcl library
10043 if test x"${ac_cv_c_itclconfig}" = x ; then
10044 for i in \
10045 ../itcl/itcl \
10046 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10047 ../../itcl \
10048 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10049 ../../../itcl \
10050 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10051 if test -f "$i/itclConfig.sh" ; then
10052 ac_cv_c_itclconfig=`(cd $i; pwd)`
10053 break
10054 fi
10055 done
10056 fi
10057 # check in a few common install locations
10058 if test x"${ac_cv_c_itclconfig}" = x ; then
10059 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10060 if test -f "$i/itclConfig.sh" ; then
10061 ac_cv_c_itclconfig=`(cd $i; pwd)`
10062 break
10063 fi
10064 done
10065 fi
10066 # check in a few other private locations
10067 if test x"${ac_cv_c_itclconfig}" = x ; then
10068 for i in \
10069 ${srcdir}/../itcl/itcl \
10070 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10071 if test -f "$i/itclConfig.sh" ; then
10072 ac_cv_c_itclconfig=`(cd $i; pwd)`
10073 break
10074 fi
10075 done
10076 fi
10077
10078 fi
10079
10080 if test x"${ac_cv_c_itclconfig}" = x ; then
10081 ITCLCONFIG="# no Itcl configs found"
10082 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10083 else
10084 no_itcl=
10085 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10086 echo "$ac_t""found $ITCLCONFIG" 1>&6
10087 fi
10088 fi
10089
10090 if test -z "${no_itcl}"; then
10091
10092 if test -f "$ITCLCONFIG" ; then
10093 . $ITCLCONFIG
10094 fi
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
10108 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
10109 fi
10110
10111
10112 # now look for Itk library stuff
10113
10114 #
10115 # Ok, lets find the itk configuration
10116 # First, look for one uninstalled.
10117 # the alternative search directory is invoked by --with-itkconfig
10118 #
10119
10120 if test x"${no_itk}" = x ; then
10121 # we reset no_itk in case something fails here
10122 no_itk=true
10123 # Check whether --with-itkconfig or --without-itkconfig was given.
10124 if test "${with_itkconfig+set}" = set; then
10125 withval="$with_itkconfig"
10126 with_itkconfig=${withval}
10127 fi
10128
10129 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
10130 echo "configure:10131: checking for Itk configuration" >&5
10131 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10132 echo $ac_n "(cached) $ac_c" 1>&6
10133 else
10134
10135
10136 # First check to see if --with-itkconfig was specified.
10137 if test x"${with_itkconfig}" != x ; then
10138 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10139 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10140 else
10141 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10142 fi
10143 fi
10144
10145 # then check for a private Itk library
10146 if test x"${ac_cv_c_itkconfig}" = x ; then
10147 for i in \
10148 ../itcl/itk \
10149 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10150 ../../itk \
10151 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10152 ../../../itk \
10153 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10154 if test -f "$i/itkConfig.sh" ; then
10155 ac_cv_c_itkconfig=`(cd $i; pwd)`
10156 break
10157 fi
10158 done
10159 fi
10160 # check in a few common install locations
10161 if test x"${ac_cv_c_itkconfig}" = x ; then
10162 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10163 if test -f "$i/itkConfig.sh" ; then
10164 ac_cv_c_itkconfig=`(cd $i; pwd)`
10165 break
10166 fi
10167 done
10168 fi
10169 # check in a few other private locations
10170 if test x"${ac_cv_c_itkconfig}" = x ; then
10171 for i in \
10172 ${srcdir}/../itcl/itk \
10173 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10174 if test -f "$i/itkConfig.sh" ; then
10175 ac_cv_c_itkconfig=`(cd $i; pwd)`
10176 break
10177 fi
10178 done
10179 fi
10180
10181 fi
10182
10183 if test x"${ac_cv_c_itkconfig}" = x ; then
10184 ITKCONFIG="# no Itk configs found"
10185 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10186 else
10187 no_itk=
10188 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10189 echo "$ac_t""found $ITKCONFIG" 1>&6
10190 fi
10191 fi
10192
10193
10194 if test -z "${no_itcl}"; then
10195
10196 if test -f "$ITKCONFIG" ; then
10197 . $ITKCONFIG
10198 fi
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211 ITKLIB="${ITK_BUILD_LIB_SPEC}"
10212 ITK_DEPS="${ITK_LIB_FULL_PATH}"
10213 fi
10214
10215 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
10216 # Tcl/Tk 8.1 require -fwritable strings. I don't
10217 # know whether 8.2 will or not, but I bet it will.
10218 # I don't have to worry about 7.x since we don't support it.
10219 GDBTK_CFLAGS=""
10220 if test "$GCC" = "yes"; then
10221 if test "$TCL_VERSION" != "8.0" ; then
10222 GDBTK_CFLAGS="-fwritable-strings"
10223 fi
10224 fi
10225
10226 # Include some libraries that Tcl and Tk want.
10227 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
10228 # Yes, the ordering seems wrong here. But it isn't.
10229 # TK_LIBS is the list of libraries that need to be linked
10230 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10231 # were in LIBS then any link tests after this point would
10232 # try to include things like `$(LIBGUI)', which wouldn't work.
10233 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
10234
10235 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10236 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10237 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10238 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10239 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10240 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10241 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
10242
10243 if test x$gdb_cv_os_cygwin = xyes; then
10244 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10245 WIN32LDAPP="-Wl,--subsystem,console"
10246 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10247 fi
10248 fi
10249 fi
10250
10251 configdirs="${configdirs} gdbtk"
10252 fi
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267 # If we find X, set shell vars x_includes and x_libraries to the
10268 # paths, otherwise set no_x=yes.
10269 # Uses ac_ vars as temps to allow command line to override cache and checks.
10270 # --without-x overrides everything else, but does not touch the cache.
10271 echo $ac_n "checking for X""... $ac_c" 1>&6
10272 echo "configure:10273: checking for X" >&5
10273
10274 # Check whether --with-x or --without-x was given.
10275 if test "${with_x+set}" = set; then
10276 withval="$with_x"
10277 :
10278 fi
10279
10280 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10281 if test "x$with_x" = xno; then
10282 # The user explicitly disabled X.
10283 have_x=disabled
10284 else
10285 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10286 # Both variables are already set.
10287 have_x=yes
10288 else
10289 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10290 echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292 # One or both of the vars are not set, and there is no cached value.
10293 ac_x_includes=NO ac_x_libraries=NO
10294 rm -fr conftestdir
10295 if mkdir conftestdir; then
10296 cd conftestdir
10297 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10298 cat > Imakefile <<'EOF'
10299 acfindx:
10300 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10301 EOF
10302 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10303 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10304 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10305 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10306 for ac_extension in a so sl; do
10307 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10308 test -f $ac_im_libdir/libX11.$ac_extension; then
10309 ac_im_usrlibdir=$ac_im_libdir; break
10310 fi
10311 done
10312 # Screen out bogus values from the imake configuration. They are
10313 # bogus both because they are the default anyway, and because
10314 # using them would break gcc on systems where it needs fixed includes.
10315 case "$ac_im_incroot" in
10316 /usr/include) ;;
10317 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10318 esac
10319 case "$ac_im_usrlibdir" in
10320 /usr/lib | /lib) ;;
10321 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10322 esac
10323 fi
10324 cd ..
10325 rm -fr conftestdir
10326 fi
10327
10328 if test "$ac_x_includes" = NO; then
10329 # Guess where to find include files, by looking for this one X11 .h file.
10330 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10331
10332 # First, try using that file with no special directory specified.
10333 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 #include <$x_direct_test_include>
10337 EOF
10338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10339 { (eval echo configure:10340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10341 if test -z "$ac_err"; then
10342 rm -rf conftest*
10343 # We can compile using X headers with no special include directory.
10344 ac_x_includes=
10345 else
10346 echo "$ac_err" >&5
10347 echo "configure: failed program was:" >&5
10348 cat conftest.$ac_ext >&5
10349 rm -rf conftest*
10350 # Look for the header file in a standard set of common directories.
10351 # Check X11 before X11Rn because it is often a symlink to the current release.
10352 for ac_dir in \
10353 /usr/X11/include \
10354 /usr/X11R6/include \
10355 /usr/X11R5/include \
10356 /usr/X11R4/include \
10357 \
10358 /usr/include/X11 \
10359 /usr/include/X11R6 \
10360 /usr/include/X11R5 \
10361 /usr/include/X11R4 \
10362 \
10363 /usr/local/X11/include \
10364 /usr/local/X11R6/include \
10365 /usr/local/X11R5/include \
10366 /usr/local/X11R4/include \
10367 \
10368 /usr/local/include/X11 \
10369 /usr/local/include/X11R6 \
10370 /usr/local/include/X11R5 \
10371 /usr/local/include/X11R4 \
10372 \
10373 /usr/X386/include \
10374 /usr/x386/include \
10375 /usr/XFree86/include/X11 \
10376 \
10377 /usr/include \
10378 /usr/local/include \
10379 /usr/unsupported/include \
10380 /usr/athena/include \
10381 /usr/local/x11r5/include \
10382 /usr/lpp/Xamples/include \
10383 \
10384 /usr/openwin/include \
10385 /usr/openwin/share/include \
10386 ; \
10387 do
10388 if test -r "$ac_dir/$x_direct_test_include"; then
10389 ac_x_includes=$ac_dir
10390 break
10391 fi
10392 done
10393 fi
10394 rm -f conftest*
10395 fi # $ac_x_includes = NO
10396
10397 if test "$ac_x_libraries" = NO; then
10398 # Check for the libraries.
10399
10400 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10401 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10402
10403 # See if we find them without any special options.
10404 # Don't add to $LIBS permanently.
10405 ac_save_LIBS="$LIBS"
10406 LIBS="-l$x_direct_test_library $LIBS"
10407 cat > conftest.$ac_ext <<EOF
10408 #line 10409 "configure"
10409 #include "confdefs.h"
10410
10411 int main() {
10412 ${x_direct_test_function}()
10413 ; return 0; }
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10416 rm -rf conftest*
10417 LIBS="$ac_save_LIBS"
10418 # We can link X programs with no special library path.
10419 ac_x_libraries=
10420 else
10421 echo "configure: failed program was:" >&5
10422 cat conftest.$ac_ext >&5
10423 rm -rf conftest*
10424 LIBS="$ac_save_LIBS"
10425 # First see if replacing the include by lib works.
10426 # Check X11 before X11Rn because it is often a symlink to the current release.
10427 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10428 /usr/X11/lib \
10429 /usr/X11R6/lib \
10430 /usr/X11R5/lib \
10431 /usr/X11R4/lib \
10432 \
10433 /usr/lib/X11 \
10434 /usr/lib/X11R6 \
10435 /usr/lib/X11R5 \
10436 /usr/lib/X11R4 \
10437 \
10438 /usr/local/X11/lib \
10439 /usr/local/X11R6/lib \
10440 /usr/local/X11R5/lib \
10441 /usr/local/X11R4/lib \
10442 \
10443 /usr/local/lib/X11 \
10444 /usr/local/lib/X11R6 \
10445 /usr/local/lib/X11R5 \
10446 /usr/local/lib/X11R4 \
10447 \
10448 /usr/X386/lib \
10449 /usr/x386/lib \
10450 /usr/XFree86/lib/X11 \
10451 \
10452 /usr/lib \
10453 /usr/local/lib \
10454 /usr/unsupported/lib \
10455 /usr/athena/lib \
10456 /usr/local/x11r5/lib \
10457 /usr/lpp/Xamples/lib \
10458 /lib/usr/lib/X11 \
10459 \
10460 /usr/openwin/lib \
10461 /usr/openwin/share/lib \
10462 ; \
10463 do
10464 for ac_extension in a so sl; do
10465 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10466 ac_x_libraries=$ac_dir
10467 break 2
10468 fi
10469 done
10470 done
10471 fi
10472 rm -f conftest*
10473 fi # $ac_x_libraries = NO
10474
10475 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10476 # Didn't find X anywhere. Cache the known absence of X.
10477 ac_cv_have_x="have_x=no"
10478 else
10479 # Record where we found X for the cache.
10480 ac_cv_have_x="have_x=yes \
10481 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10482 fi
10483 fi
10484 fi
10485 eval "$ac_cv_have_x"
10486 fi # $with_x != no
10487
10488 if test "$have_x" != yes; then
10489 echo "$ac_t""$have_x" 1>&6
10490 no_x=yes
10491 else
10492 # If each of the values was on the command line, it overrides each guess.
10493 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10494 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10495 # Update the cache value to reflect the command line values.
10496 ac_cv_have_x="have_x=yes \
10497 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10498 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10499 fi
10500
10501
10502
10503 # Unlike the sim directory, whether a simulator is linked is controlled by
10504 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10505 # This code just checks for a few cases where we'd like to ignore those
10506 # definitions, even when they're present in the '.mt' file. These cases
10507 # are when --disable-sim is specified, or if the simulator directory is
10508 # not part of the source tree.
10509 #
10510 # Check whether --enable-sim or --disable-sim was given.
10511 if test "${enable_sim+set}" = set; then
10512 enableval="$enable_sim"
10513 echo "enable_sim = $enable_sim";
10514 echo "enableval = ${enableval}";
10515 case "${enableval}" in
10516 yes) ignore_sim=false ;;
10517 no) ignore_sim=true ;;
10518 *) ignore_sim=false ;;
10519 esac
10520 else
10521 ignore_sim=false
10522 fi
10523
10524
10525 if test ! -d "${srcdir}/../sim"; then
10526 ignore_sim=true
10527 fi
10528
10529 if test "${ignore_sim}" = "true"; then
10530 IGNORE_SIM="SIM="
10531 IGNORE_SIM_OBS="SIM_OBS="
10532 else
10533 IGNORE_SIM=""
10534 IGNORE_SIM_OBS=""
10535 cat >> confdefs.h <<\EOF
10536 #define WITH_SIM 1
10537 EOF
10538
10539 fi
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554 # target_subdir is used by the testsuite to find the target libraries.
10555 target_subdir=
10556 if test "${host}" != "${target}"; then
10557 target_subdir="${target_alias}/"
10558 fi
10559
10560
10561 frags=
10562 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10563 if test ! -f ${host_makefile_frag}; then
10564 # When building a native debuger the .mh file containing things
10565 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10566 # since it no longer contains anything useful.
10567 if test "${target}" = "${host}"; then
10568 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10569 else
10570 host_makefile_frag=/dev/null
10571 fi
10572 fi
10573 frags="$frags $host_makefile_frag"
10574
10575 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10576 if test ! -f ${target_makefile_frag}; then
10577 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10578 fi
10579 frags="$frags $target_makefile_frag"
10580
10581
10582
10583
10584
10585 hostfile=`sed -n '
10586 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10587 ' ${host_makefile_frag}`
10588
10589 targetfile=`sed -n '
10590 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10591 ' ${target_makefile_frag}`
10592
10593 if test "${target}" = "${host}"; then
10594 # We pick this up from the host configuration file (.mh) because we
10595 # do not have a native configuration Makefile fragment.
10596 nativefile=`sed -n '
10597 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10598 ' ${host_makefile_frag}`
10599 fi
10600
10601
10602 if test x"${gdb_osabi}" != x ; then
10603 cat >> confdefs.h <<EOF
10604 #define GDB_OSABI_DEFAULT $gdb_osabi
10605 EOF
10606
10607 fi
10608
10609 # Enable multi-ice-gdb-server.
10610 # Check whether --enable-multi-ice or --disable-multi-ice was given.
10611 if test "${enable_multi_ice+set}" = set; then
10612 enableval="$enable_multi_ice"
10613 case $enableval in
10614 yes | no)
10615 ;;
10616 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10617 esac
10618 fi
10619
10620 if test "x$enable_multi_ice" = xyes; then
10621 configdirs="$configdirs multi-ice"
10622 fi
10623
10624 # We only build gdbserver automatically if host and target are the same.
10625 if test "x$target" = "x$host"; then
10626 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
10627 echo "configure:10628: checking whether gdbserver is supported on this host" >&5
10628 if test "x$build_gdbserver" = xyes; then
10629 configdirs="$configdirs gdbserver"
10630 echo "$ac_t""yes" 1>&6
10631 else
10632 echo "$ac_t""no" 1>&6
10633 fi
10634 fi
10635
10636 subdirs="doc testsuite $configdirs"
10637
10638
10639 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
10640 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10641 # version.
10642
10643 files=
10644 links=
10645
10646 rm -f xm.h
10647 xm_h=""
10648 if test "${hostfile}" != ""; then
10649 xm_h=xm.h
10650 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10651 files="${files} ${GDB_XM_FILE}"
10652 links="${links} xm.h"
10653 cat >> confdefs.h <<EOF
10654 #define GDB_XM_FILE ${GDB_XM_FILE}
10655 EOF
10656
10657 fi
10658
10659
10660 rm -f tm.h
10661 tm_h=""
10662 if test "${targetfile}" != ""; then
10663 tm_h=tm.h
10664 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10665 files="${files} ${GDB_TM_FILE}"
10666 links="${links} tm.h"
10667 cat >> confdefs.h <<EOF
10668 #define GDB_TM_FILE ${GDB_TM_FILE}
10669 EOF
10670
10671 fi
10672
10673
10674 rm -f nm.h
10675 nm_h=""
10676 if test "${nativefile}" != ""; then
10677 nm_h=nm.h
10678 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10679 files="${files} ${GDB_NM_FILE}"
10680 links="${links} nm.h"
10681 cat >> confdefs.h <<EOF
10682 #define GDB_NM_FILE ${GDB_NM_FILE}
10683 EOF
10684
10685 fi
10686
10687
10688
10689
10690 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
10691 echo "configure:10692: checking for Cygwin environment" >&5
10692 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10693 echo $ac_n "(cached) $ac_c" 1>&6
10694 else
10695 cat > conftest.$ac_ext <<EOF
10696 #line 10697 "configure"
10697 #include "confdefs.h"
10698
10699 int main() {
10700
10701 #ifndef __CYGWIN__
10702 #define __CYGWIN__ __CYGWIN32__
10703 #endif
10704 return __CYGWIN__;
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10708 rm -rf conftest*
10709 ac_cv_cygwin=yes
10710 else
10711 echo "configure: failed program was:" >&5
10712 cat conftest.$ac_ext >&5
10713 rm -rf conftest*
10714 ac_cv_cygwin=no
10715 fi
10716 rm -f conftest*
10717 rm -f conftest*
10718 fi
10719
10720 echo "$ac_t""$ac_cv_cygwin" 1>&6
10721 CYGWIN=
10722 test "$ac_cv_cygwin" = yes && CYGWIN=yes
10723 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
10724 echo "configure:10725: checking for mingw32 environment" >&5
10725 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10726 echo $ac_n "(cached) $ac_c" 1>&6
10727 else
10728 cat > conftest.$ac_ext <<EOF
10729 #line 10730 "configure"
10730 #include "confdefs.h"
10731
10732 int main() {
10733 return __MINGW32__;
10734 ; return 0; }
10735 EOF
10736 if { (eval echo configure:10737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10737 rm -rf conftest*
10738 ac_cv_mingw32=yes
10739 else
10740 echo "configure: failed program was:" >&5
10741 cat conftest.$ac_ext >&5
10742 rm -rf conftest*
10743 ac_cv_mingw32=no
10744 fi
10745 rm -f conftest*
10746 rm -f conftest*
10747 fi
10748
10749 echo "$ac_t""$ac_cv_mingw32" 1>&6
10750 MINGW32=
10751 test "$ac_cv_mingw32" = yes && MINGW32=yes
10752
10753
10754 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
10755 echo "configure:10756: checking for executable suffix" >&5
10756 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10757 echo $ac_n "(cached) $ac_c" 1>&6
10758 else
10759 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10760 ac_cv_exeext=.exe
10761 else
10762 rm -f conftest*
10763 echo 'int main () { return 0; }' > conftest.$ac_ext
10764 ac_cv_exeext=
10765 if { (eval echo configure:10766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
10766 for file in conftest.*; do
10767 case $file in
10768 *.c | *.o | *.obj) ;;
10769 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10770 esac
10771 done
10772 else
10773 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10774 fi
10775 rm -f conftest*
10776 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10777 fi
10778 fi
10779
10780 EXEEXT=""
10781 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10782 echo "$ac_t""${ac_cv_exeext}" 1>&6
10783 ac_exeext=$EXEEXT
10784
10785
10786
10787 cat >> confdefs.h <<\EOF
10788 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10789 EOF
10790
10791
10792
10793
10794 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10795 if test "${with_libiconv_prefix+set}" = set; then
10796 withval="$with_libiconv_prefix"
10797
10798 for dir in `echo "$withval" | tr : ' '`; do
10799 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10800 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10801 done
10802
10803 fi
10804
10805
10806 echo $ac_n "checking for iconv""... $ac_c" 1>&6
10807 echo "configure:10808: checking for iconv" >&5
10808 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10809 echo $ac_n "(cached) $ac_c" 1>&6
10810 else
10811
10812 am_cv_func_iconv="no, consider installing GNU libiconv"
10813 am_cv_lib_iconv=no
10814 cat > conftest.$ac_ext <<EOF
10815 #line 10816 "configure"
10816 #include "confdefs.h"
10817 #include <stdlib.h>
10818 #include <iconv.h>
10819 int main() {
10820 iconv_t cd = iconv_open("","");
10821 iconv(cd,NULL,NULL,NULL,NULL);
10822 iconv_close(cd);
10823 ; return 0; }
10824 EOF
10825 if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10826 rm -rf conftest*
10827 am_cv_func_iconv=yes
10828 else
10829 echo "configure: failed program was:" >&5
10830 cat conftest.$ac_ext >&5
10831 fi
10832 rm -f conftest*
10833 if test "$am_cv_func_iconv" != yes; then
10834 am_save_LIBS="$LIBS"
10835 LIBS="$LIBS -liconv"
10836 cat > conftest.$ac_ext <<EOF
10837 #line 10838 "configure"
10838 #include "confdefs.h"
10839 #include <stdlib.h>
10840 #include <iconv.h>
10841 int main() {
10842 iconv_t cd = iconv_open("","");
10843 iconv(cd,NULL,NULL,NULL,NULL);
10844 iconv_close(cd);
10845 ; return 0; }
10846 EOF
10847 if { (eval echo configure:10848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10848 rm -rf conftest*
10849 am_cv_lib_iconv=yes
10850 am_cv_func_iconv=yes
10851 else
10852 echo "configure: failed program was:" >&5
10853 cat conftest.$ac_ext >&5
10854 fi
10855 rm -f conftest*
10856 LIBS="$am_save_LIBS"
10857 fi
10858
10859 fi
10860
10861 echo "$ac_t""$am_cv_func_iconv" 1>&6
10862 if test "$am_cv_func_iconv" = yes; then
10863 cat >> confdefs.h <<\EOF
10864 #define HAVE_ICONV 1
10865 EOF
10866
10867 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
10868 echo "configure:10869: checking for iconv declaration" >&5
10869 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10870 echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872
10873 cat > conftest.$ac_ext <<EOF
10874 #line 10875 "configure"
10875 #include "confdefs.h"
10876
10877 #include <stdlib.h>
10878 #include <iconv.h>
10879 extern
10880 #ifdef __cplusplus
10881 "C"
10882 #endif
10883 #if defined(__STDC__) || defined(__cplusplus)
10884 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10885 #else
10886 size_t iconv();
10887 #endif
10888
10889 int main() {
10890
10891 ; return 0; }
10892 EOF
10893 if { (eval echo configure:10894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10894 rm -rf conftest*
10895 am_cv_proto_iconv_arg1=""
10896 else
10897 echo "configure: failed program was:" >&5
10898 cat conftest.$ac_ext >&5
10899 rm -rf conftest*
10900 am_cv_proto_iconv_arg1="const"
10901 fi
10902 rm -f conftest*
10903 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);"
10904 fi
10905
10906 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10907 echo "$ac_t""${ac_t:-
10908 }$am_cv_proto_iconv" 1>&6
10909 cat >> confdefs.h <<EOF
10910 #define ICONV_CONST $am_cv_proto_iconv_arg1
10911 EOF
10912
10913 fi
10914 LIBICONV=
10915 if test "$am_cv_lib_iconv" = yes; then
10916 LIBICONV="-liconv"
10917 fi
10918
10919
10920
10921 trap '' 1 2 15
10922 cat > confcache <<\EOF
10923 # This file is a shell script that caches the results of configure
10924 # tests run on this system so they can be shared between configure
10925 # scripts and configure runs. It is not useful on other systems.
10926 # If it contains results you don't want to keep, you may remove or edit it.
10927 #
10928 # By default, configure uses ./config.cache as the cache file,
10929 # creating it if it does not exist already. You can give configure
10930 # the --cache-file=FILE option to use a different cache file; that is
10931 # what configure does when it calls configure scripts in
10932 # subdirectories, so they share the cache.
10933 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10934 # config.status only pays attention to the cache file if you give it the
10935 # --recheck option to rerun configure.
10936 #
10937 EOF
10938 # The following way of writing the cache mishandles newlines in values,
10939 # but we know of no workaround that is simple, portable, and efficient.
10940 # So, don't put newlines in cache variables' values.
10941 # Ultrix sh set writes to stderr and can't be redirected directly,
10942 # and sets the high bit in the cache file unless we assign to the vars.
10943 (set) 2>&1 |
10944 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10945 *ac_space=\ *)
10946 # `set' does not quote correctly, so add quotes (double-quote substitution
10947 # turns \\\\ into \\, and sed turns \\ into \).
10948 sed -n \
10949 -e "s/'/'\\\\''/g" \
10950 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10951 ;;
10952 *)
10953 # `set' quotes correctly as required by POSIX, so do not add quotes.
10954 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10955 ;;
10956 esac >> confcache
10957 if cmp -s $cache_file confcache; then
10958 :
10959 else
10960 if test -w $cache_file; then
10961 echo "updating cache $cache_file"
10962 cat confcache > $cache_file
10963 else
10964 echo "not updating unwritable cache $cache_file"
10965 fi
10966 fi
10967 rm -f confcache
10968
10969 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10970
10971 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10972 # Let make expand exec_prefix.
10973 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10974
10975 # Any assignment to VPATH causes Sun make to only execute
10976 # the first set of double-colon rules, so remove it if not needed.
10977 # If there is a colon in the path, we need to keep it.
10978 if test "x$srcdir" = x.; then
10979 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10980 fi
10981
10982 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10983
10984 DEFS=-DHAVE_CONFIG_H
10985
10986 # Without the "./", some shells look in PATH for config.status.
10987 : ${CONFIG_STATUS=./config.status}
10988
10989 echo creating $CONFIG_STATUS
10990 rm -f $CONFIG_STATUS
10991 cat > $CONFIG_STATUS <<EOF
10992 #! /bin/sh
10993 # Generated automatically by configure.
10994 # Run this file to recreate the current configuration.
10995 # This directory was configured as follows,
10996 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10997 #
10998 # $0 $ac_configure_args
10999 #
11000 # Compiler output produced by configure, useful for debugging
11001 # configure, is in ./config.log if it exists.
11002
11003 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11004 for ac_option
11005 do
11006 case "\$ac_option" in
11007 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11008 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11009 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11010 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11011 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11012 exit 0 ;;
11013 -help | --help | --hel | --he | --h)
11014 echo "\$ac_cs_usage"; exit 0 ;;
11015 *) echo "\$ac_cs_usage"; exit 1 ;;
11016 esac
11017 done
11018
11019 ac_given_srcdir=$srcdir
11020 ac_given_INSTALL="$INSTALL"
11021
11022 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11023 EOF
11024 cat >> $CONFIG_STATUS <<EOF
11025
11026 # Protect against being on the right side of a sed subst in config.status.
11027 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11028 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11029 $ac_vpsub
11030 $extrasub
11031 s%@SHELL@%$SHELL%g
11032 s%@CFLAGS@%$CFLAGS%g
11033 s%@CPPFLAGS@%$CPPFLAGS%g
11034 s%@CXXFLAGS@%$CXXFLAGS%g
11035 s%@FFLAGS@%$FFLAGS%g
11036 s%@DEFS@%$DEFS%g
11037 s%@LDFLAGS@%$LDFLAGS%g
11038 s%@LIBS@%$LIBS%g
11039 s%@exec_prefix@%$exec_prefix%g
11040 s%@prefix@%$prefix%g
11041 s%@program_transform_name@%$program_transform_name%g
11042 s%@bindir@%$bindir%g
11043 s%@sbindir@%$sbindir%g
11044 s%@libexecdir@%$libexecdir%g
11045 s%@datadir@%$datadir%g
11046 s%@sysconfdir@%$sysconfdir%g
11047 s%@sharedstatedir@%$sharedstatedir%g
11048 s%@localstatedir@%$localstatedir%g
11049 s%@libdir@%$libdir%g
11050 s%@includedir@%$includedir%g
11051 s%@oldincludedir@%$oldincludedir%g
11052 s%@infodir@%$infodir%g
11053 s%@mandir@%$mandir%g
11054 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11055 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11056 s%@MAINT@%$MAINT%g
11057 s%@CC@%$CC%g
11058 s%@CPP@%$CPP%g
11059 s%@host@%$host%g
11060 s%@host_alias@%$host_alias%g
11061 s%@host_cpu@%$host_cpu%g
11062 s%@host_vendor@%$host_vendor%g
11063 s%@host_os@%$host_os%g
11064 s%@target@%$target%g
11065 s%@target_alias@%$target_alias%g
11066 s%@target_cpu@%$target_cpu%g
11067 s%@target_vendor@%$target_vendor%g
11068 s%@target_os@%$target_os%g
11069 s%@build@%$build%g
11070 s%@build_alias@%$build_alias%g
11071 s%@build_cpu@%$build_cpu%g
11072 s%@build_vendor@%$build_vendor%g
11073 s%@build_os@%$build_os%g
11074 s%@RANLIB@%$RANLIB%g
11075 s%@SET_MAKE@%$SET_MAKE%g
11076 s%@ALLOCA@%$ALLOCA%g
11077 s%@USE_NLS@%$USE_NLS%g
11078 s%@MSGFMT@%$MSGFMT%g
11079 s%@GMSGFMT@%$GMSGFMT%g
11080 s%@XGETTEXT@%$XGETTEXT%g
11081 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11082 s%@CATALOGS@%$CATALOGS%g
11083 s%@CATOBJEXT@%$CATOBJEXT%g
11084 s%@DATADIRNAME@%$DATADIRNAME%g
11085 s%@GMOFILES@%$GMOFILES%g
11086 s%@INSTOBJEXT@%$INSTOBJEXT%g
11087 s%@INTLDEPS@%$INTLDEPS%g
11088 s%@INTLLIBS@%$INTLLIBS%g
11089 s%@INTLOBJS@%$INTLOBJS%g
11090 s%@POFILES@%$POFILES%g
11091 s%@POSUB@%$POSUB%g
11092 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11093 s%@GT_NO@%$GT_NO%g
11094 s%@GT_YES@%$GT_YES%g
11095 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11096 s%@l@%$l%g
11097 s%@subdirs@%$subdirs%g
11098 s%@AWK@%$AWK%g
11099 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11100 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11101 s%@INSTALL_DATA@%$INSTALL_DATA%g
11102 s%@LN_S@%$LN_S%g
11103 s%@YACC@%$YACC%g
11104 s%@AR@%$AR%g
11105 s%@DLLTOOL@%$DLLTOOL%g
11106 s%@WINDRES@%$WINDRES%g
11107 s%@MIG@%$MIG%g
11108 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
11109 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11110 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
11111 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
11112 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
11113 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
11114 s%@WIN32LIBS@%$WIN32LIBS%g
11115 s%@LIBGUI@%$LIBGUI%g
11116 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
11117 s%@WIN32LDAPP@%$WIN32LDAPP%g
11118 s%@TCL_VERSION@%$TCL_VERSION%g
11119 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11120 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11121 s%@TCL_CC@%$TCL_CC%g
11122 s%@TCL_DEFS@%$TCL_DEFS%g
11123 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11124 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11125 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11126 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11127 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11128 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11129 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
11130 s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
11131 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11132 s%@TCL_RANLIB@%$TCL_RANLIB%g
11133 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11134 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11135 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11136 s%@TK_VERSION@%$TK_VERSION%g
11137 s%@TK_DEFS@%$TK_DEFS%g
11138 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11139 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11140 s%@TK_XLIBSW@%$TK_XLIBSW%g
11141 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11142 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11143 s%@TCLHDIR@%$TCLHDIR%g
11144 s%@TKHDIR@%$TKHDIR%g
11145 s%@ITCLHDIR@%$ITCLHDIR%g
11146 s%@ITKHDIR@%$ITKHDIR%g
11147 s%@ITCL_VERSION@%$ITCL_VERSION%g
11148 s%@ITCL_DEFS@%$ITCL_DEFS%g
11149 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11150 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11151 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11152 s%@ITK_VERSION@%$ITK_VERSION%g
11153 s%@ITK_DEFS@%$ITK_DEFS%g
11154 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11155 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11156 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
11157 s%@X_CFLAGS@%$X_CFLAGS%g
11158 s%@X_LDFLAGS@%$X_LDFLAGS%g
11159 s%@X_LIBS@%$X_LIBS%g
11160 s%@TCL_DEPS@%$TCL_DEPS%g
11161 s%@TK_DEPS@%$TK_DEPS%g
11162 s%@ITCLLIB@%$ITCLLIB%g
11163 s%@ITCL_DEPS@%$ITCL_DEPS%g
11164 s%@ITKLIB@%$ITKLIB%g
11165 s%@ITK_DEPS@%$ITK_DEPS%g
11166 s%@GDBTKLIBS@%$GDBTKLIBS%g
11167 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
11168 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
11169 s%@IGNORE_SIM@%$IGNORE_SIM%g
11170 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
11171 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
11172 s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
11173 s%@CONFIG_OBS@%$CONFIG_OBS%g
11174 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11175 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
11176 s%@CONFIG_ALL@%$CONFIG_ALL%g
11177 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
11178 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11179 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
11180 s%@target_subdir@%$target_subdir%g
11181 /@host_makefile_frag@/r $host_makefile_frag
11182 s%@host_makefile_frag@%%g
11183 /@target_makefile_frag@/r $target_makefile_frag
11184 s%@target_makefile_frag@%%g
11185 s%@frags@%$frags%g
11186 s%@xm_h@%$xm_h%g
11187 s%@tm_h@%$tm_h%g
11188 s%@nm_h@%$nm_h%g
11189 s%@EXEEXT@%$EXEEXT%g
11190 s%@LIBICONV@%$LIBICONV%g
11191
11192 CEOF
11193 EOF
11194
11195 cat >> $CONFIG_STATUS <<\EOF
11196
11197 # Split the substitutions into bite-sized pieces for seds with
11198 # small command number limits, like on Digital OSF/1 and HP-UX.
11199 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11200 ac_file=1 # Number of current file.
11201 ac_beg=1 # First line for current file.
11202 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11203 ac_more_lines=:
11204 ac_sed_cmds=""
11205 while $ac_more_lines; do
11206 if test $ac_beg -gt 1; then
11207 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11208 else
11209 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11210 fi
11211 if test ! -s conftest.s$ac_file; then
11212 ac_more_lines=false
11213 rm -f conftest.s$ac_file
11214 else
11215 if test -z "$ac_sed_cmds"; then
11216 ac_sed_cmds="sed -f conftest.s$ac_file"
11217 else
11218 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11219 fi
11220 ac_file=`expr $ac_file + 1`
11221 ac_beg=$ac_end
11222 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11223 fi
11224 done
11225 if test -z "$ac_sed_cmds"; then
11226 ac_sed_cmds=cat
11227 fi
11228 EOF
11229
11230 cat >> $CONFIG_STATUS <<EOF
11231
11232 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
11233 EOF
11234 cat >> $CONFIG_STATUS <<\EOF
11235 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11236 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11237 case "$ac_file" in
11238 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11239 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11240 *) ac_file_in="${ac_file}.in" ;;
11241 esac
11242
11243 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11244
11245 # Remove last slash and all that follows it. Not all systems have dirname.
11246 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11247 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11248 # The file is in a subdirectory.
11249 test ! -d "$ac_dir" && mkdir "$ac_dir"
11250 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11251 # A "../" for each directory in $ac_dir_suffix.
11252 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11253 else
11254 ac_dir_suffix= ac_dots=
11255 fi
11256
11257 case "$ac_given_srcdir" in
11258 .) srcdir=.
11259 if test -z "$ac_dots"; then top_srcdir=.
11260 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11261 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11262 *) # Relative path.
11263 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11264 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11265 esac
11266
11267 case "$ac_given_INSTALL" in
11268 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11269 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11270 esac
11271
11272 echo creating "$ac_file"
11273 rm -f "$ac_file"
11274 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11275 case "$ac_file" in
11276 *Makefile*) ac_comsub="1i\\
11277 # $configure_input" ;;
11278 *) ac_comsub= ;;
11279 esac
11280
11281 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11282 sed -e "$ac_comsub
11283 s%@configure_input@%$configure_input%g
11284 s%@srcdir@%$srcdir%g
11285 s%@top_srcdir@%$top_srcdir%g
11286 s%@INSTALL@%$INSTALL%g
11287 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11288 fi; done
11289 rm -f conftest.s*
11290
11291 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11292 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11293 #
11294 # ac_d sets the value in "#define NAME VALUE" lines.
11295 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11296 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11297 ac_dC='\3'
11298 ac_dD='%g'
11299 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11300 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11301 ac_uB='\([ ]\)%\1#\2define\3'
11302 ac_uC=' '
11303 ac_uD='\4%g'
11304 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11305 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11306 ac_eB='$%\1#\2define\3'
11307 ac_eC=' '
11308 ac_eD='%g'
11309
11310 if test "${CONFIG_HEADERS+set}" != set; then
11311 EOF
11312 cat >> $CONFIG_STATUS <<EOF
11313 CONFIG_HEADERS="config.h:config.in"
11314 EOF
11315 cat >> $CONFIG_STATUS <<\EOF
11316 fi
11317 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11318 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11319 case "$ac_file" in
11320 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11321 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11322 *) ac_file_in="${ac_file}.in" ;;
11323 esac
11324
11325 echo creating $ac_file
11326
11327 rm -f conftest.frag conftest.in conftest.out
11328 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11329 cat $ac_file_inputs > conftest.in
11330
11331 EOF
11332
11333 # Transform confdefs.h into a sed script conftest.vals that substitutes
11334 # the proper values into config.h.in to produce config.h. And first:
11335 # Protect against being on the right side of a sed subst in config.status.
11336 # Protect against being in an unquoted here document in config.status.
11337 rm -f conftest.vals
11338 cat > conftest.hdr <<\EOF
11339 s/[\\&%]/\\&/g
11340 s%[\\$`]%\\&%g
11341 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11342 s%ac_d%ac_u%gp
11343 s%ac_u%ac_e%gp
11344 EOF
11345 sed -n -f conftest.hdr confdefs.h > conftest.vals
11346 rm -f conftest.hdr
11347
11348 # This sed command replaces #undef with comments. This is necessary, for
11349 # example, in the case of _POSIX_SOURCE, which is predefined and required
11350 # on some systems where configure will not decide to define it.
11351 cat >> conftest.vals <<\EOF
11352 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11353 EOF
11354
11355 # Break up conftest.vals because some shells have a limit on
11356 # the size of here documents, and old seds have small limits too.
11357
11358 rm -f conftest.tail
11359 while :
11360 do
11361 ac_lines=`grep -c . conftest.vals`
11362 # grep -c gives empty output for an empty file on some AIX systems.
11363 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11364 # Write a limited-size here document to conftest.frag.
11365 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11366 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11367 echo 'CEOF
11368 sed -f conftest.frag conftest.in > conftest.out
11369 rm -f conftest.in
11370 mv conftest.out conftest.in
11371 ' >> $CONFIG_STATUS
11372 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11373 rm -f conftest.vals
11374 mv conftest.tail conftest.vals
11375 done
11376 rm -f conftest.vals
11377
11378 cat >> $CONFIG_STATUS <<\EOF
11379 rm -f conftest.frag conftest.h
11380 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11381 cat conftest.in >> conftest.h
11382 rm -f conftest.in
11383 if cmp -s $ac_file conftest.h 2>/dev/null; then
11384 echo "$ac_file is unchanged"
11385 rm -f conftest.h
11386 else
11387 # Remove last slash and all that follows it. Not all systems have dirname.
11388 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11389 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11390 # The file is in a subdirectory.
11391 test ! -d "$ac_dir" && mkdir "$ac_dir"
11392 fi
11393 rm -f $ac_file
11394 mv conftest.h $ac_file
11395 fi
11396 fi; done
11397
11398 EOF
11399
11400 cat >> $CONFIG_STATUS <<EOF
11401 ac_sources="$files"
11402 ac_dests="$links"
11403 EOF
11404
11405 cat >> $CONFIG_STATUS <<\EOF
11406 srcdir=$ac_given_srcdir
11407 while test -n "$ac_sources"; do
11408 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11409 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11410
11411 echo "linking $srcdir/$ac_source to $ac_dest"
11412
11413 if test ! -r $srcdir/$ac_source; then
11414 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11415 fi
11416 rm -f $ac_dest
11417
11418 # Make relative symlinks.
11419 # Remove last slash and all that follows it. Not all systems have dirname.
11420 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11421 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11422 # The dest file is in a subdirectory.
11423 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11424 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11425 # A "../" for each directory in $ac_dest_dir_suffix.
11426 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11427 else
11428 ac_dest_dir_suffix= ac_dots=
11429 fi
11430
11431 case "$srcdir" in
11432 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11433 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11434 esac
11435
11436 # Make a symlink if possible; otherwise try a hard link.
11437 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11438 ln $srcdir/$ac_source $ac_dest; then :
11439 else
11440 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11441 fi
11442 done
11443 EOF
11444 cat >> $CONFIG_STATUS <<EOF
11445
11446 gdb_host_cpu=$gdb_host_cpu
11447 gdb_target_cpu=$gdb_target_cpu
11448 nativefile=$nativefile
11449
11450 EOF
11451 cat >> $CONFIG_STATUS <<\EOF
11452
11453 if test "${nativefile}" = ""; then
11454 < Makefile \
11455 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11456 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
11457 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11458 > Makefile.tem
11459 mv -f Makefile.tem Makefile
11460 fi
11461
11462 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11463 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11464 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11465 mv -f Makefile.tmp Makefile
11466
11467
11468 case x$CONFIG_HEADERS in
11469 xconfig.h:config.in)
11470 echo > stamp-h ;;
11471 esac
11472
11473 exit 0
11474 EOF
11475 chmod +x $CONFIG_STATUS
11476 rm -fr confdefs* $ac_clean_files
11477 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11478
11479 if test "$no_recursion" != yes; then
11480
11481 # Remove --cache-file and --srcdir arguments so they do not pile up.
11482 ac_sub_configure_args=
11483 ac_prev=
11484 for ac_arg in $ac_configure_args; do
11485 if test -n "$ac_prev"; then
11486 ac_prev=
11487 continue
11488 fi
11489 case "$ac_arg" in
11490 -cache-file | --cache-file | --cache-fil | --cache-fi \
11491 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11492 ac_prev=cache_file ;;
11493 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11494 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11495 ;;
11496 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11497 ac_prev=srcdir ;;
11498 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11499 ;;
11500 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11501 esac
11502 done
11503
11504 for ac_config_dir in doc testsuite $configdirs; do
11505
11506 # Do not complain, so a configure script can configure whichever
11507 # parts of a large source tree are present.
11508 if test ! -d $srcdir/$ac_config_dir; then
11509 continue
11510 fi
11511
11512 echo configuring in $ac_config_dir
11513
11514 case "$srcdir" in
11515 .) ;;
11516 *)
11517 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11518 else
11519 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11520 fi
11521 ;;
11522 esac
11523
11524 ac_popdir=`pwd`
11525 cd $ac_config_dir
11526
11527 # A "../" for each directory in /$ac_config_dir.
11528 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11529
11530 case "$srcdir" in
11531 .) # No --srcdir option. We are building in place.
11532 ac_sub_srcdir=$srcdir ;;
11533 /*) # Absolute path.
11534 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11535 *) # Relative path.
11536 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11537 esac
11538
11539 # Check for guested configure; otherwise get Cygnus style configure.
11540 if test -f $ac_sub_srcdir/configure; then
11541 ac_sub_configure=$ac_sub_srcdir/configure
11542 elif test -f $ac_sub_srcdir/configure.in; then
11543 ac_sub_configure=$ac_configure
11544 else
11545 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11546 ac_sub_configure=
11547 fi
11548
11549 # The recursion is here.
11550 if test -n "$ac_sub_configure"; then
11551
11552 # Make the cache file name correct relative to the subdirectory.
11553 case "$cache_file" in
11554 /*) ac_sub_cache_file=$cache_file ;;
11555 *) # Relative path.
11556 ac_sub_cache_file="$ac_dots$cache_file" ;;
11557 esac
11558 case "$ac_given_INSTALL" in
11559 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11560 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11561 esac
11562
11563 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11564 # The eval makes quoting arguments work.
11565 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11566 then :
11567 else
11568 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11569 fi
11570 fi
11571
11572 cd $ac_popdir
11573 done
11574 fi
11575
11576
11577 exit 0