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