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