* i386gnu-nat.c (gnu_store_registers): Fix typo.
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-maintainer-mode enable make rules and dependencies not useful
16 (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18 --disable-nls do not use Native Language Support"
19 ac_help="$ac_help
20 --with-included-gettext use the GNU gettext library included here"
21 ac_help="$ac_help
22 --with-separate-debug-dir=path Look for global separate debug info in this path [LIBDIR/debug]"
23 ac_help="$ac_help
24 --disable-gdbcli disable command-line interface (CLI)"
25 ac_help="$ac_help
26 --disable-gdbmi disable machine-interface (MI)"
27 ac_help="$ac_help
28 --enable-tui enable full-screen terminal user interface (TUI)"
29 ac_help="$ac_help
30 --enable-gdbtk enable gdbtk graphical user interface (GUI)"
31 ac_help="$ac_help
32 --with-libunwind Use libunwind frame unwinding support"
33 ac_help="$ac_help
34 --enable-profiling enable profiling of GDB"
35 ac_help="$ac_help
36 --without-included-regex don't use included regex; this is the default
37 on systems with version 2 of the GNU C library
38 (use with caution on other system)"
39 ac_help="$ac_help
40 --with-sysroot[=DIR] Search for usr/lib et al within DIR."
41 ac_help="$ac_help
42 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
43 ac_help="$ac_help
44 --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
45 ac_help="$ac_help
46 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
47 ac_help="$ac_help
48 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
49 ac_help="$ac_help
50 --with-tclinclude=DIR Directory where tcl private headers are"
51 ac_help="$ac_help
52 --with-tkinclude=DIR Directory where tk private headers are"
53 ac_help="$ac_help
54 --with-itclconfig Directory containing itcl configuration (itclConfig.sh)"
55 ac_help="$ac_help
56 --with-itkconfig Directory containing itk configuration (itkConfig.sh)"
57 ac_help="$ac_help
58 --with-x use the X Window System"
59 ac_help="$ac_help
60 --enable-sim Link gdb with simulator"
61 ac_help="$ac_help
62 --enable-multi-ice build the multi-ice-gdb-server"
63 ac_help="$ac_help
64 --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib"
65
66 # Initialize some variables set by options.
67 # The variables have the same names as the options, with
68 # dashes changed to underlines.
69 build=NONE
70 cache_file=./config.cache
71 exec_prefix=NONE
72 host=NONE
73 no_create=
74 nonopt=NONE
75 no_recursion=
76 prefix=NONE
77 program_prefix=NONE
78 program_suffix=NONE
79 program_transform_name=s,x,x,
80 silent=
81 site=
82 sitefile=
83 srcdir=
84 target=NONE
85 verbose=
86 x_includes=NONE
87 x_libraries=NONE
88 bindir='${exec_prefix}/bin'
89 sbindir='${exec_prefix}/sbin'
90 libexecdir='${exec_prefix}/libexec'
91 datadir='${prefix}/share'
92 sysconfdir='${prefix}/etc'
93 sharedstatedir='${prefix}/com'
94 localstatedir='${prefix}/var'
95 libdir='${exec_prefix}/lib'
96 includedir='${prefix}/include'
97 oldincludedir='/usr/include'
98 infodir='${prefix}/info'
99 mandir='${prefix}/man'
100
101 # Initialize some other variables.
102 subdirs=
103 MFLAGS= MAKEFLAGS=
104 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112 # If the previous option needs an argument, assign it.
113 if test -n "$ac_prev"; then
114 eval "$ac_prev=\$ac_option"
115 ac_prev=
116 continue
117 fi
118
119 case "$ac_option" in
120 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121 *) ac_optarg= ;;
122 esac
123
124 # Accept the important Cygnus configure options, so we can diagnose typos.
125
126 case "$ac_option" in
127
128 -bindir | --bindir | --bindi | --bind | --bin | --bi)
129 ac_prev=bindir ;;
130 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131 bindir="$ac_optarg" ;;
132
133 -build | --build | --buil | --bui | --bu)
134 ac_prev=build ;;
135 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136 build="$ac_optarg" ;;
137
138 -cache-file | --cache-file | --cache-fil | --cache-fi \
139 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140 ac_prev=cache_file ;;
141 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143 cache_file="$ac_optarg" ;;
144
145 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146 ac_prev=datadir ;;
147 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148 | --da=*)
149 datadir="$ac_optarg" ;;
150
151 -disable-* | --disable-*)
152 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153 # Reject names that are not valid shell variable names.
154 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156 fi
157 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158 eval "enable_${ac_feature}=no" ;;
159
160 -enable-* | --enable-*)
161 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162 # Reject names that are not valid shell variable names.
163 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165 fi
166 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167 case "$ac_option" in
168 *=*) ;;
169 *) ac_optarg=yes ;;
170 esac
171 eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175 | --exec | --exe | --ex)
176 ac_prev=exec_prefix ;;
177 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179 | --exec=* | --exe=* | --ex=*)
180 exec_prefix="$ac_optarg" ;;
181
182 -gas | --gas | --ga | --g)
183 # Obsolete; use --with-gas.
184 with_gas=yes ;;
185
186 -help | --help | --hel | --he)
187 # Omit some internal or obsolete options to make the list less imposing.
188 # This message is too long to be a string in the A/UX 3.1 sh.
189 cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193 --cache-file=FILE cache test results in FILE
194 --help print this message
195 --no-create do not create output files
196 --quiet, --silent do not print \`checking...' messages
197 --site-file=FILE use FILE as the site file
198 --version print the version of autoconf that created configure
199 Directory and file names:
200 --prefix=PREFIX install architecture-independent files in PREFIX
201 [$ac_default_prefix]
202 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
203 [same as prefix]
204 --bindir=DIR user executables in DIR [EPREFIX/bin]
205 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
206 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
207 --datadir=DIR read-only architecture-independent data in DIR
208 [PREFIX/share]
209 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
210 --sharedstatedir=DIR modifiable architecture-independent data in DIR
211 [PREFIX/com]
212 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
213 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
214 --includedir=DIR C header files in DIR [PREFIX/include]
215 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
216 --infodir=DIR info documentation in DIR [PREFIX/info]
217 --mandir=DIR man documentation in DIR [PREFIX/man]
218 --srcdir=DIR find the sources in DIR [configure dir or ..]
219 --program-prefix=PREFIX prepend PREFIX to installed program names
220 --program-suffix=SUFFIX append SUFFIX to installed program names
221 --program-transform-name=PROGRAM
222 run sed PROGRAM on installed program names
223 EOF
224 cat << EOF
225 Host type:
226 --build=BUILD configure for building on BUILD [BUILD=HOST]
227 --host=HOST configure for HOST [guessed]
228 --target=TARGET configure for TARGET [TARGET=HOST]
229 Features and packages:
230 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
231 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
234 --x-includes=DIR X include files are in DIR
235 --x-libraries=DIR X library files are in DIR
236 EOF
237 if test -n "$ac_help"; then
238 echo "--enable and --with options recognized:$ac_help"
239 fi
240 exit 0 ;;
241
242 -host | --host | --hos | --ho)
243 ac_prev=host ;;
244 -host=* | --host=* | --hos=* | --ho=*)
245 host="$ac_optarg" ;;
246
247 -includedir | --includedir | --includedi | --included | --include \
248 | --includ | --inclu | --incl | --inc)
249 ac_prev=includedir ;;
250 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251 | --includ=* | --inclu=* | --incl=* | --inc=*)
252 includedir="$ac_optarg" ;;
253
254 -infodir | --infodir | --infodi | --infod | --info | --inf)
255 ac_prev=infodir ;;
256 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257 infodir="$ac_optarg" ;;
258
259 -libdir | --libdir | --libdi | --libd)
260 ac_prev=libdir ;;
261 -libdir=* | --libdir=* | --libdi=* | --libd=*)
262 libdir="$ac_optarg" ;;
263
264 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265 | --libexe | --libex | --libe)
266 ac_prev=libexecdir ;;
267 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268 | --libexe=* | --libex=* | --libe=*)
269 libexecdir="$ac_optarg" ;;
270
271 -localstatedir | --localstatedir | --localstatedi | --localstated \
272 | --localstate | --localstat | --localsta | --localst \
273 | --locals | --local | --loca | --loc | --lo)
274 ac_prev=localstatedir ;;
275 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278 localstatedir="$ac_optarg" ;;
279
280 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281 ac_prev=mandir ;;
282 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283 mandir="$ac_optarg" ;;
284
285 -nfp | --nfp | --nf)
286 # Obsolete; use --without-fp.
287 with_fp=no ;;
288
289 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290 | --no-cr | --no-c)
291 no_create=yes ;;
292
293 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295 no_recursion=yes ;;
296
297 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299 | --oldin | --oldi | --old | --ol | --o)
300 ac_prev=oldincludedir ;;
301 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304 oldincludedir="$ac_optarg" ;;
305
306 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307 ac_prev=prefix ;;
308 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309 prefix="$ac_optarg" ;;
310
311 -program-prefix | --program-prefix | --program-prefi | --program-pref \
312 | --program-pre | --program-pr | --program-p)
313 ac_prev=program_prefix ;;
314 -program-prefix=* | --program-prefix=* | --program-prefi=* \
315 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316 program_prefix="$ac_optarg" ;;
317
318 -program-suffix | --program-suffix | --program-suffi | --program-suff \
319 | --program-suf | --program-su | --program-s)
320 ac_prev=program_suffix ;;
321 -program-suffix=* | --program-suffix=* | --program-suffi=* \
322 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323 program_suffix="$ac_optarg" ;;
324
325 -program-transform-name | --program-transform-name \
326 | --program-transform-nam | --program-transform-na \
327 | --program-transform-n | --program-transform- \
328 | --program-transform | --program-transfor \
329 | --program-transfo | --program-transf \
330 | --program-trans | --program-tran \
331 | --progr-tra | --program-tr | --program-t)
332 ac_prev=program_transform_name ;;
333 -program-transform-name=* | --program-transform-name=* \
334 | --program-transform-nam=* | --program-transform-na=* \
335 | --program-transform-n=* | --program-transform-=* \
336 | --program-transform=* | --program-transfor=* \
337 | --program-transfo=* | --program-transf=* \
338 | --program-trans=* | --program-tran=* \
339 | --progr-tra=* | --program-tr=* | --program-t=*)
340 program_transform_name="$ac_optarg" ;;
341
342 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343 | -silent | --silent | --silen | --sile | --sil)
344 silent=yes ;;
345
346 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347 ac_prev=sbindir ;;
348 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349 | --sbi=* | --sb=*)
350 sbindir="$ac_optarg" ;;
351
352 -sharedstatedir | --sharedstatedir | --sharedstatedi \
353 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354 | --sharedst | --shareds | --shared | --share | --shar \
355 | --sha | --sh)
356 ac_prev=sharedstatedir ;;
357 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360 | --sha=* | --sh=*)
361 sharedstatedir="$ac_optarg" ;;
362
363 -site | --site | --sit)
364 ac_prev=site ;;
365 -site=* | --site=* | --sit=*)
366 site="$ac_optarg" ;;
367
368 -site-file | --site-file | --site-fil | --site-fi | --site-f)
369 ac_prev=sitefile ;;
370 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371 sitefile="$ac_optarg" ;;
372
373 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374 ac_prev=srcdir ;;
375 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376 srcdir="$ac_optarg" ;;
377
378 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379 | --syscon | --sysco | --sysc | --sys | --sy)
380 ac_prev=sysconfdir ;;
381 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383 sysconfdir="$ac_optarg" ;;
384
385 -target | --target | --targe | --targ | --tar | --ta | --t)
386 ac_prev=target ;;
387 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388 target="$ac_optarg" ;;
389
390 -v | -verbose | --verbose | --verbos | --verbo | --verb)
391 verbose=yes ;;
392
393 -version | --version | --versio | --versi | --vers)
394 echo "configure generated by autoconf version 2.13"
395 exit 0 ;;
396
397 -with-* | --with-*)
398 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399 # Reject names that are not valid shell variable names.
400 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402 fi
403 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 case "$ac_option" in
405 *=*) ;;
406 *) ac_optarg=yes ;;
407 esac
408 eval "with_${ac_package}='$ac_optarg'" ;;
409
410 -without-* | --without-*)
411 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412 # Reject names that are not valid shell variable names.
413 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415 fi
416 ac_package=`echo $ac_package| sed 's/-/_/g'`
417 eval "with_${ac_package}=no" ;;
418
419 --x)
420 # Obsolete; use --with-x.
421 with_x=yes ;;
422
423 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424 | --x-incl | --x-inc | --x-in | --x-i)
425 ac_prev=x_includes ;;
426 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428 x_includes="$ac_optarg" ;;
429
430 -x-libraries | --x-libraries | --x-librarie | --x-librari \
431 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432 ac_prev=x_libraries ;;
433 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435 x_libraries="$ac_optarg" ;;
436
437 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438 ;;
439
440 *)
441 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442 echo "configure: warning: $ac_option: invalid host type" 1>&2
443 fi
444 if test "x$nonopt" != xNONE; then
445 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446 fi
447 nonopt="$ac_option"
448 ;;
449
450 esac
451 done
452
453 if test -n "$ac_prev"; then
454 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468 exec 6>/dev/null
469 else
470 exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484 case "$ac_arg" in
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486 | --no-cr | --no-c) ;;
487 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set. These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516 ac_srcdir_defaulted=yes
517 # Try the directory containing this script, then its parent.
518 ac_prog=$0
519 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521 srcdir=$ac_confdir
522 if test ! -r $srcdir/$ac_unique_file; then
523 srcdir=..
524 fi
525 else
526 ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529 if test "$ac_srcdir_defaulted" = yes; then
530 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531 else
532 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533 fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$sitefile"; then
539 if test -z "$CONFIG_SITE"; then
540 if test "x$prefix" != xNONE; then
541 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542 else
543 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544 fi
545 fi
546 else
547 CONFIG_SITE="$sitefile"
548 fi
549 for ac_site_file in $CONFIG_SITE; do
550 if test -r "$ac_site_file"; then
551 echo "loading site script $ac_site_file"
552 . "$ac_site_file"
553 fi
554 done
555
556 if test -r "$cache_file"; then
557 echo "loading cache $cache_file"
558 . $cache_file
559 else
560 echo "creating cache $cache_file"
561 > $cache_file
562 fi
563
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
570
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
575 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576 ac_n= ac_c='
577 ' ac_t=' '
578 else
579 ac_n=-n ac_c= ac_t=
580 fi
581 else
582 ac_n= ac_c='\c' ac_t=
583 fi
584
585
586
587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
588 echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
589 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590 if test "${enable_maintainer_mode+set}" = set; then
591 enableval="$enable_maintainer_mode"
592 USE_MAINTAINER_MODE=$enableval
593 else
594 USE_MAINTAINER_MODE=no
595 fi
596
597 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598
599
600 if test $USE_MAINTAINER_MODE = yes; then
601 MAINTAINER_MODE_TRUE=
602 MAINTAINER_MODE_FALSE='#'
603 else
604 MAINTAINER_MODE_TRUE='#'
605 MAINTAINER_MODE_FALSE=
606 fi
607 MAINT=$MAINTAINER_MODE_TRUE
608
609
610
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616 echo $ac_n "(cached) $ac_c" 1>&6
617 else
618 if test -n "$CC"; then
619 ac_cv_prog_CC="$CC" # Let the user override the test.
620 else
621 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
622 ac_dummy="$PATH"
623 for ac_dir in $ac_dummy; do
624 test -z "$ac_dir" && ac_dir=.
625 if test -f $ac_dir/$ac_word; then
626 ac_cv_prog_CC="gcc"
627 break
628 fi
629 done
630 IFS="$ac_save_ifs"
631 fi
632 fi
633 CC="$ac_cv_prog_CC"
634 if test -n "$CC"; then
635 echo "$ac_t""$CC" 1>&6
636 else
637 echo "$ac_t""no" 1>&6
638 fi
639
640 if test -z "$CC"; then
641 # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646 echo $ac_n "(cached) $ac_c" 1>&6
647 else
648 if test -n "$CC"; then
649 ac_cv_prog_CC="$CC" # Let the user override the test.
650 else
651 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 ac_prog_rejected=no
653 ac_dummy="$PATH"
654 for ac_dir in $ac_dummy; do
655 test -z "$ac_dir" && ac_dir=.
656 if test -f $ac_dir/$ac_word; then
657 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658 ac_prog_rejected=yes
659 continue
660 fi
661 ac_cv_prog_CC="cc"
662 break
663 fi
664 done
665 IFS="$ac_save_ifs"
666 if test $ac_prog_rejected = yes; then
667 # We found a bogon in the path, so make sure we never use it.
668 set dummy $ac_cv_prog_CC
669 shift
670 if test $# -gt 0; then
671 # We chose a different compiler from the bogus one.
672 # However, it has the same basename, so the bogon will be chosen
673 # first if we set CC to just the basename; use the full file name.
674 shift
675 set dummy "$ac_dir/$ac_word" "$@"
676 shift
677 ac_cv_prog_CC="$@"
678 fi
679 fi
680 fi
681 fi
682 CC="$ac_cv_prog_CC"
683 if test -n "$CC"; then
684 echo "$ac_t""$CC" 1>&6
685 else
686 echo "$ac_t""no" 1>&6
687 fi
688
689 if test -z "$CC"; then
690 case "`uname -s`" in
691 *win32* | *WIN32*)
692 # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697 echo $ac_n "(cached) $ac_c" 1>&6
698 else
699 if test -n "$CC"; then
700 ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
703 ac_dummy="$PATH"
704 for ac_dir in $ac_dummy; do
705 test -z "$ac_dir" && ac_dir=.
706 if test -f $ac_dir/$ac_word; then
707 ac_cv_prog_CC="cl"
708 break
709 fi
710 done
711 IFS="$ac_save_ifs"
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716 echo "$ac_t""$CC" 1>&6
717 else
718 echo "$ac_t""no" 1>&6
719 fi
720 ;;
721 esac
722 fi
723 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729 ac_ext=c
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 cat > conftest.$ac_ext << EOF
737
738 #line 739 "configure"
739 #include "confdefs.h"
740
741 main(){return(0);}
742 EOF
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744 ac_cv_prog_cc_works=yes
745 # If we can't run a trivial program, we are probably using a cross compiler.
746 if (./conftest; exit) 2>/dev/null; then
747 ac_cv_prog_cc_cross=no
748 else
749 ac_cv_prog_cc_cross=yes
750 fi
751 else
752 echo "configure: failed program was:" >&5
753 cat conftest.$ac_ext >&5
754 ac_cv_prog_cc_works=no
755 fi
756 rm -fr conftest*
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767 fi
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
772
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776 echo $ac_n "(cached) $ac_c" 1>&6
777 else
778 cat > conftest.c <<EOF
779 #ifdef __GNUC__
780 yes;
781 #endif
782 EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
784 ac_cv_prog_gcc=yes
785 else
786 ac_cv_prog_gcc=no
787 fi
788 fi
789
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792 if test $ac_cv_prog_gcc = yes; then
793 GCC=yes
794 else
795 GCC=
796 fi
797
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
800 CFLAGS=
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804 echo $ac_n "(cached) $ac_c" 1>&6
805 else
806 echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808 ac_cv_prog_cc_g=yes
809 else
810 ac_cv_prog_cc_g=no
811 fi
812 rm -f conftest*
813
814 fi
815
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818 CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820 if test "$GCC" = yes; then
821 CFLAGS="-g -O2"
822 else
823 CFLAGS="-g"
824 fi
825 else
826 if test "$GCC" = yes; then
827 CFLAGS="-O2"
828 else
829 CFLAGS=
830 fi
831 fi
832
833 cat >> confdefs.h <<\EOF
834 #define _GNU_SOURCE 1
835 EOF
836
837
838 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
839 echo "configure:840: checking how to run the C preprocessor" >&5
840 # On Suns, sometimes $CPP names a directory.
841 if test -n "$CPP" && test -d "$CPP"; then
842 CPP=
843 fi
844 if test -z "$CPP"; then
845 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
846 echo $ac_n "(cached) $ac_c" 1>&6
847 else
848 # This must be in double quotes, not single quotes, because CPP may get
849 # substituted into the Makefile and "${CC-cc}" will confuse make.
850 CPP="${CC-cc} -E"
851 # On the NeXT, cc -E runs the code through the compiler's parser,
852 # not just through cpp.
853 cat > conftest.$ac_ext <<EOF
854 #line 855 "configure"
855 #include "confdefs.h"
856 #include <assert.h>
857 Syntax Error
858 EOF
859 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
860 { (eval echo configure:861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
861 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
862 if test -z "$ac_err"; then
863 :
864 else
865 echo "$ac_err" >&5
866 echo "configure: failed program was:" >&5
867 cat conftest.$ac_ext >&5
868 rm -rf conftest*
869 CPP="${CC-cc} -E -traditional-cpp"
870 cat > conftest.$ac_ext <<EOF
871 #line 872 "configure"
872 #include "confdefs.h"
873 #include <assert.h>
874 Syntax Error
875 EOF
876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
877 { (eval echo configure:878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
879 if test -z "$ac_err"; then
880 :
881 else
882 echo "$ac_err" >&5
883 echo "configure: failed program was:" >&5
884 cat conftest.$ac_ext >&5
885 rm -rf conftest*
886 CPP="${CC-cc} -nologo -E"
887 cat > conftest.$ac_ext <<EOF
888 #line 889 "configure"
889 #include "confdefs.h"
890 #include <assert.h>
891 Syntax Error
892 EOF
893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
894 { (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
896 if test -z "$ac_err"; then
897 :
898 else
899 echo "$ac_err" >&5
900 echo "configure: failed program was:" >&5
901 cat conftest.$ac_ext >&5
902 rm -rf conftest*
903 CPP=/lib/cpp
904 fi
905 rm -f conftest*
906 fi
907 rm -f conftest*
908 fi
909 rm -f conftest*
910 ac_cv_prog_CPP="$CPP"
911 fi
912 CPP="$ac_cv_prog_CPP"
913 else
914 ac_cv_prog_CPP="$CPP"
915 fi
916 echo "$ac_t""$CPP" 1>&6
917
918 echo $ac_n "checking for AIX""... $ac_c" 1>&6
919 echo "configure:920: checking for AIX" >&5
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
923 #ifdef _AIX
924 yes
925 #endif
926
927 EOF
928 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
929 egrep "yes" >/dev/null 2>&1; then
930 rm -rf conftest*
931 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
932 #define _ALL_SOURCE 1
933 EOF
934
935 else
936 rm -rf conftest*
937 echo "$ac_t""no" 1>&6
938 fi
939 rm -f conftest*
940
941
942 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
943 echo "configure:944: checking for POSIXized ISC" >&5
944 if test -d /etc/conf/kconfig.d &&
945 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
946 then
947 echo "$ac_t""yes" 1>&6
948 ISC=yes # If later tests want to check for ISC.
949 cat >> confdefs.h <<\EOF
950 #define _POSIX_SOURCE 1
951 EOF
952
953 if test "$GCC" = yes; then
954 CC="$CC -posix"
955 else
956 CC="$CC -Xp"
957 fi
958 else
959 echo "$ac_t""no" 1>&6
960 ISC=
961 fi
962
963
964
965
966 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
967 echo "configure:968: checking for ${CC-cc} option to accept ANSI C" >&5
968 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
969 echo $ac_n "(cached) $ac_c" 1>&6
970 else
971 am_cv_prog_cc_stdc=no
972 ac_save_CC="$CC"
973 # Don't try gcc -ansi; that turns off useful extensions and
974 # breaks some systems' header files.
975 # AIX -qlanglvl=ansi
976 # Ultrix and OSF/1 -std1
977 # HP-UX 10.20 and later -Ae
978 # HP-UX older versions -Aa -D_HPUX_SOURCE
979 # SVR4 -Xc -D__EXTENSIONS__
980 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
981 do
982 CC="$ac_save_CC $ac_arg"
983 cat > conftest.$ac_ext <<EOF
984 #line 985 "configure"
985 #include "confdefs.h"
986 #include <stdarg.h>
987 #include <stdio.h>
988 #include <sys/types.h>
989 #include <sys/stat.h>
990 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
991 struct buf { int x; };
992 FILE * (*rcsopen) (struct buf *, struct stat *, int);
993 static char *e (p, i)
994 char **p;
995 int i;
996 {
997 return p[i];
998 }
999 static char *f (char * (*g) (char **, int), char **p, ...)
1000 {
1001 char *s;
1002 va_list v;
1003 va_start (v,p);
1004 s = g (p, va_arg (v,int));
1005 va_end (v);
1006 return s;
1007 }
1008 int test (int i, double x);
1009 struct s1 {int (*f) (int a);};
1010 struct s2 {int (*f) (double a);};
1011 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1012 int argc;
1013 char **argv;
1014
1015 int main() {
1016
1017 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
1018
1019 ; return 0; }
1020 EOF
1021 if { (eval echo configure:1022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1022 rm -rf conftest*
1023 am_cv_prog_cc_stdc="$ac_arg"; break
1024 else
1025 echo "configure: failed program was:" >&5
1026 cat conftest.$ac_ext >&5
1027 fi
1028 rm -f conftest*
1029 done
1030 CC="$ac_save_CC"
1031
1032 fi
1033
1034 if test -z "$am_cv_prog_cc_stdc"; then
1035 echo "$ac_t""none needed" 1>&6
1036 else
1037 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1038 fi
1039 case "x$am_cv_prog_cc_stdc" in
1040 x|xno) ;;
1041 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1042 esac
1043
1044
1045 ac_aux_dir=
1046 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1047 if test -f $ac_dir/install-sh; then
1048 ac_aux_dir=$ac_dir
1049 ac_install_sh="$ac_aux_dir/install-sh -c"
1050 break
1051 elif test -f $ac_dir/install.sh; then
1052 ac_aux_dir=$ac_dir
1053 ac_install_sh="$ac_aux_dir/install.sh -c"
1054 break
1055 fi
1056 done
1057 if test -z "$ac_aux_dir"; then
1058 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1059 fi
1060 ac_config_guess=$ac_aux_dir/config.guess
1061 ac_config_sub=$ac_aux_dir/config.sub
1062 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1063
1064
1065 # Do some error checking and defaulting for the host and target type.
1066 # The inputs are:
1067 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1068 #
1069 # The rules are:
1070 # 1. You are not allowed to specify --host, --target, and nonopt at the
1071 # same time.
1072 # 2. Host defaults to nonopt.
1073 # 3. If nonopt is not specified, then host defaults to the current host,
1074 # as determined by config.guess.
1075 # 4. Target and build default to nonopt.
1076 # 5. If nonopt is not specified, then target and build default to host.
1077
1078 # The aliases save the names the user supplied, while $host etc.
1079 # will get canonicalized.
1080 case $host---$target---$nonopt in
1081 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1082 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1083 esac
1084
1085
1086 # Make sure we can run config.sub.
1087 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1088 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1089 fi
1090
1091 echo $ac_n "checking host system type""... $ac_c" 1>&6
1092 echo "configure:1093: checking host system type" >&5
1093
1094 host_alias=$host
1095 case "$host_alias" in
1096 NONE)
1097 case $nonopt in
1098 NONE)
1099 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1100 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1101 fi ;;
1102 *) host_alias=$nonopt ;;
1103 esac ;;
1104 esac
1105
1106 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1107 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1108 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1109 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1110 echo "$ac_t""$host" 1>&6
1111
1112 echo $ac_n "checking target system type""... $ac_c" 1>&6
1113 echo "configure:1114: checking target system type" >&5
1114
1115 target_alias=$target
1116 case "$target_alias" in
1117 NONE)
1118 case $nonopt in
1119 NONE) target_alias=$host_alias ;;
1120 *) target_alias=$nonopt ;;
1121 esac ;;
1122 esac
1123
1124 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1125 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1126 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1127 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1128 echo "$ac_t""$target" 1>&6
1129
1130 echo $ac_n "checking build system type""... $ac_c" 1>&6
1131 echo "configure:1132: checking build system type" >&5
1132
1133 build_alias=$build
1134 case "$build_alias" in
1135 NONE)
1136 case $nonopt in
1137 NONE) build_alias=$host_alias ;;
1138 *) build_alias=$nonopt ;;
1139 esac ;;
1140 esac
1141
1142 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1143 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1144 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1145 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1146 echo "$ac_t""$build" 1>&6
1147
1148 test "$host_alias" != "$target_alias" &&
1149 test "$program_prefix$program_suffix$program_transform_name" = \
1150 NONENONEs,x,x, &&
1151 program_prefix=${target_alias}-
1152
1153
1154 # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1155 # doesn't support cross-compilation, but the one from Autoconf 2.5x
1156 # does. Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1157 # deal with the lossage. Note that CY_GNU_GETTEXT currently calls
1158 # AC_PROG_RANLIB. This can be removed when we switch to Autoconf
1159 # 2.5x.
1160 if test $host != $build; then
1161 ac_tool_prefix=${host_alias}-
1162 else
1163 ac_tool_prefix=
1164 fi
1165
1166 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1167 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1168 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1169 echo "configure:1170: checking for $ac_word" >&5
1170 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1171 echo $ac_n "(cached) $ac_c" 1>&6
1172 else
1173 if test -n "$RANLIB"; then
1174 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1175 else
1176 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1177 ac_dummy="$PATH"
1178 for ac_dir in $ac_dummy; do
1179 test -z "$ac_dir" && ac_dir=.
1180 if test -f $ac_dir/$ac_word; then
1181 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1182 break
1183 fi
1184 done
1185 IFS="$ac_save_ifs"
1186 fi
1187 fi
1188 RANLIB="$ac_cv_prog_RANLIB"
1189 if test -n "$RANLIB"; then
1190 echo "$ac_t""$RANLIB" 1>&6
1191 else
1192 echo "$ac_t""no" 1>&6
1193 fi
1194
1195
1196 if test -z "$ac_cv_prog_RANLIB"; then
1197 if test -n "$ac_tool_prefix"; then
1198 # Extract the first word of "ranlib", so it can be a program name with args.
1199 set dummy ranlib; ac_word=$2
1200 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1201 echo "configure:1202: checking for $ac_word" >&5
1202 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1203 echo $ac_n "(cached) $ac_c" 1>&6
1204 else
1205 if test -n "$RANLIB"; then
1206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1207 else
1208 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1209 ac_dummy="$PATH"
1210 for ac_dir in $ac_dummy; do
1211 test -z "$ac_dir" && ac_dir=.
1212 if test -f $ac_dir/$ac_word; then
1213 ac_cv_prog_RANLIB="ranlib"
1214 break
1215 fi
1216 done
1217 IFS="$ac_save_ifs"
1218 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1219 fi
1220 fi
1221 RANLIB="$ac_cv_prog_RANLIB"
1222 if test -n "$RANLIB"; then
1223 echo "$ac_t""$RANLIB" 1>&6
1224 else
1225 echo "$ac_t""no" 1>&6
1226 fi
1227
1228 else
1229 RANLIB=":"
1230 fi
1231 fi
1232
1233
1234
1235 CONFIG_OBS=
1236 CONFIG_DEPS=
1237 CONFIG_SRCS=
1238 ENABLE_CFLAGS=
1239
1240 CONFIG_ALL=
1241 CONFIG_CLEAN=
1242 CONFIG_INSTALL=
1243 CONFIG_UNINSTALL=
1244
1245
1246 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1247 echo "configure:1248: checking whether ${MAKE-make} sets \${MAKE}" >&5
1248 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1249 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1250 echo $ac_n "(cached) $ac_c" 1>&6
1251 else
1252 cat > conftestmake <<\EOF
1253 all:
1254 @echo 'ac_maketemp="${MAKE}"'
1255 EOF
1256 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1257 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1258 if test -n "$ac_maketemp"; then
1259 eval ac_cv_prog_make_${ac_make}_set=yes
1260 else
1261 eval ac_cv_prog_make_${ac_make}_set=no
1262 fi
1263 rm -f conftestmake
1264 fi
1265 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1266 echo "$ac_t""yes" 1>&6
1267 SET_MAKE=
1268 else
1269 echo "$ac_t""no" 1>&6
1270 SET_MAKE="MAKE=${MAKE-make}"
1271 fi
1272
1273 # Extract the first word of "ranlib", so it can be a program name with args.
1274 set dummy ranlib; ac_word=$2
1275 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1276 echo "configure:1277: checking for $ac_word" >&5
1277 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1278 echo $ac_n "(cached) $ac_c" 1>&6
1279 else
1280 if test -n "$RANLIB"; then
1281 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1282 else
1283 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1284 ac_dummy="$PATH"
1285 for ac_dir in $ac_dummy; do
1286 test -z "$ac_dir" && ac_dir=.
1287 if test -f $ac_dir/$ac_word; then
1288 ac_cv_prog_RANLIB="ranlib"
1289 break
1290 fi
1291 done
1292 IFS="$ac_save_ifs"
1293 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1294 fi
1295 fi
1296 RANLIB="$ac_cv_prog_RANLIB"
1297 if test -n "$RANLIB"; then
1298 echo "$ac_t""$RANLIB" 1>&6
1299 else
1300 echo "$ac_t""no" 1>&6
1301 fi
1302
1303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1304 echo "configure:1305: checking for ANSI C header files" >&5
1305 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1307 else
1308 cat > conftest.$ac_ext <<EOF
1309 #line 1310 "configure"
1310 #include "confdefs.h"
1311 #include <stdlib.h>
1312 #include <stdarg.h>
1313 #include <string.h>
1314 #include <float.h>
1315 EOF
1316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1317 { (eval echo configure:1318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1319 if test -z "$ac_err"; then
1320 rm -rf conftest*
1321 ac_cv_header_stdc=yes
1322 else
1323 echo "$ac_err" >&5
1324 echo "configure: failed program was:" >&5
1325 cat conftest.$ac_ext >&5
1326 rm -rf conftest*
1327 ac_cv_header_stdc=no
1328 fi
1329 rm -f conftest*
1330
1331 if test $ac_cv_header_stdc = yes; then
1332 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1333 cat > conftest.$ac_ext <<EOF
1334 #line 1335 "configure"
1335 #include "confdefs.h"
1336 #include <string.h>
1337 EOF
1338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1339 egrep "memchr" >/dev/null 2>&1; then
1340 :
1341 else
1342 rm -rf conftest*
1343 ac_cv_header_stdc=no
1344 fi
1345 rm -f conftest*
1346
1347 fi
1348
1349 if test $ac_cv_header_stdc = yes; then
1350 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 #include <stdlib.h>
1355 EOF
1356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1357 egrep "free" >/dev/null 2>&1; then
1358 :
1359 else
1360 rm -rf conftest*
1361 ac_cv_header_stdc=no
1362 fi
1363 rm -f conftest*
1364
1365 fi
1366
1367 if test $ac_cv_header_stdc = yes; then
1368 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1369 if test "$cross_compiling" = yes; then
1370 :
1371 else
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1375 #include <ctype.h>
1376 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1377 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1378 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1379 int main () { int i; for (i = 0; i < 256; i++)
1380 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1381 exit (0); }
1382
1383 EOF
1384 if { (eval echo configure:1385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1385 then
1386 :
1387 else
1388 echo "configure: failed program was:" >&5
1389 cat conftest.$ac_ext >&5
1390 rm -fr conftest*
1391 ac_cv_header_stdc=no
1392 fi
1393 rm -fr conftest*
1394 fi
1395
1396 fi
1397 fi
1398
1399 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1400 if test $ac_cv_header_stdc = yes; then
1401 cat >> confdefs.h <<\EOF
1402 #define STDC_HEADERS 1
1403 EOF
1404
1405 fi
1406
1407 echo $ac_n "checking for working const""... $ac_c" 1>&6
1408 echo "configure:1409: checking for working const" >&5
1409 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1410 echo $ac_n "(cached) $ac_c" 1>&6
1411 else
1412 cat > conftest.$ac_ext <<EOF
1413 #line 1414 "configure"
1414 #include "confdefs.h"
1415
1416 int main() {
1417
1418 /* Ultrix mips cc rejects this. */
1419 typedef int charset[2]; const charset x;
1420 /* SunOS 4.1.1 cc rejects this. */
1421 char const *const *ccp;
1422 char **p;
1423 /* NEC SVR4.0.2 mips cc rejects this. */
1424 struct point {int x, y;};
1425 static struct point const zero = {0,0};
1426 /* AIX XL C 1.02.0.0 rejects this.
1427 It does not let you subtract one const X* pointer from another in an arm
1428 of an if-expression whose if-part is not a constant expression */
1429 const char *g = "string";
1430 ccp = &g + (g ? g-g : 0);
1431 /* HPUX 7.0 cc rejects these. */
1432 ++ccp;
1433 p = (char**) ccp;
1434 ccp = (char const *const *) p;
1435 { /* SCO 3.2v4 cc rejects this. */
1436 char *t;
1437 char const *s = 0 ? (char *) 0 : (char const *) 0;
1438
1439 *t++ = 0;
1440 }
1441 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1442 int x[] = {25, 17};
1443 const int *foo = &x[0];
1444 ++foo;
1445 }
1446 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1447 typedef const int *iptr;
1448 iptr p = 0;
1449 ++p;
1450 }
1451 { /* AIX XL C 1.02.0.0 rejects this saying
1452 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1453 struct s { int j; const int *ap[3]; };
1454 struct s *b; b->j = 5;
1455 }
1456 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1457 const int foo = 10;
1458 }
1459
1460 ; return 0; }
1461 EOF
1462 if { (eval echo configure:1463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1463 rm -rf conftest*
1464 ac_cv_c_const=yes
1465 else
1466 echo "configure: failed program was:" >&5
1467 cat conftest.$ac_ext >&5
1468 rm -rf conftest*
1469 ac_cv_c_const=no
1470 fi
1471 rm -f conftest*
1472 fi
1473
1474 echo "$ac_t""$ac_cv_c_const" 1>&6
1475 if test $ac_cv_c_const = no; then
1476 cat >> confdefs.h <<\EOF
1477 #define const
1478 EOF
1479
1480 fi
1481
1482 echo $ac_n "checking for inline""... $ac_c" 1>&6
1483 echo "configure:1484: checking for inline" >&5
1484 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1485 echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487 ac_cv_c_inline=no
1488 for ac_kw in inline __inline__ __inline; do
1489 cat > conftest.$ac_ext <<EOF
1490 #line 1491 "configure"
1491 #include "confdefs.h"
1492
1493 int main() {
1494 } $ac_kw foo() {
1495 ; return 0; }
1496 EOF
1497 if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1498 rm -rf conftest*
1499 ac_cv_c_inline=$ac_kw; break
1500 else
1501 echo "configure: failed program was:" >&5
1502 cat conftest.$ac_ext >&5
1503 fi
1504 rm -f conftest*
1505 done
1506
1507 fi
1508
1509 echo "$ac_t""$ac_cv_c_inline" 1>&6
1510 case "$ac_cv_c_inline" in
1511 inline | yes) ;;
1512 no) cat >> confdefs.h <<\EOF
1513 #define inline
1514 EOF
1515 ;;
1516 *) cat >> confdefs.h <<EOF
1517 #define inline $ac_cv_c_inline
1518 EOF
1519 ;;
1520 esac
1521
1522 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1523 echo "configure:1524: checking for off_t" >&5
1524 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1525 echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527 cat > conftest.$ac_ext <<EOF
1528 #line 1529 "configure"
1529 #include "confdefs.h"
1530 #include <sys/types.h>
1531 #if STDC_HEADERS
1532 #include <stdlib.h>
1533 #include <stddef.h>
1534 #endif
1535 EOF
1536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1537 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1538 rm -rf conftest*
1539 ac_cv_type_off_t=yes
1540 else
1541 rm -rf conftest*
1542 ac_cv_type_off_t=no
1543 fi
1544 rm -f conftest*
1545
1546 fi
1547 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1548 if test $ac_cv_type_off_t = no; then
1549 cat >> confdefs.h <<\EOF
1550 #define off_t long
1551 EOF
1552
1553 fi
1554
1555 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1556 echo "configure:1557: checking for size_t" >&5
1557 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1558 echo $ac_n "(cached) $ac_c" 1>&6
1559 else
1560 cat > conftest.$ac_ext <<EOF
1561 #line 1562 "configure"
1562 #include "confdefs.h"
1563 #include <sys/types.h>
1564 #if STDC_HEADERS
1565 #include <stdlib.h>
1566 #include <stddef.h>
1567 #endif
1568 EOF
1569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1570 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1571 rm -rf conftest*
1572 ac_cv_type_size_t=yes
1573 else
1574 rm -rf conftest*
1575 ac_cv_type_size_t=no
1576 fi
1577 rm -f conftest*
1578
1579 fi
1580 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1581 if test $ac_cv_type_size_t = no; then
1582 cat >> confdefs.h <<\EOF
1583 #define size_t unsigned
1584 EOF
1585
1586 fi
1587
1588 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1589 # for constant arguments. Useless!
1590 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1591 echo "configure:1592: checking for working alloca.h" >&5
1592 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1593 echo $ac_n "(cached) $ac_c" 1>&6
1594 else
1595 cat > conftest.$ac_ext <<EOF
1596 #line 1597 "configure"
1597 #include "confdefs.h"
1598 #include <alloca.h>
1599 int main() {
1600 char *p = alloca(2 * sizeof(int));
1601 ; return 0; }
1602 EOF
1603 if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1604 rm -rf conftest*
1605 ac_cv_header_alloca_h=yes
1606 else
1607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
1609 rm -rf conftest*
1610 ac_cv_header_alloca_h=no
1611 fi
1612 rm -f conftest*
1613 fi
1614
1615 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1616 if test $ac_cv_header_alloca_h = yes; then
1617 cat >> confdefs.h <<\EOF
1618 #define HAVE_ALLOCA_H 1
1619 EOF
1620
1621 fi
1622
1623 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1624 echo "configure:1625: checking for alloca" >&5
1625 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1626 echo $ac_n "(cached) $ac_c" 1>&6
1627 else
1628 cat > conftest.$ac_ext <<EOF
1629 #line 1630 "configure"
1630 #include "confdefs.h"
1631
1632 #ifdef __GNUC__
1633 # define alloca __builtin_alloca
1634 #else
1635 # ifdef _MSC_VER
1636 # include <malloc.h>
1637 # define alloca _alloca
1638 # else
1639 # if HAVE_ALLOCA_H
1640 # include <alloca.h>
1641 # else
1642 # ifdef _AIX
1643 #pragma alloca
1644 # else
1645 # ifndef alloca /* predefined by HP cc +Olibcalls */
1646 char *alloca ();
1647 # endif
1648 # endif
1649 # endif
1650 # endif
1651 #endif
1652
1653 int main() {
1654 char *p = (char *) alloca(1);
1655 ; return 0; }
1656 EOF
1657 if { (eval echo configure:1658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1658 rm -rf conftest*
1659 ac_cv_func_alloca_works=yes
1660 else
1661 echo "configure: failed program was:" >&5
1662 cat conftest.$ac_ext >&5
1663 rm -rf conftest*
1664 ac_cv_func_alloca_works=no
1665 fi
1666 rm -f conftest*
1667 fi
1668
1669 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1670 if test $ac_cv_func_alloca_works = yes; then
1671 cat >> confdefs.h <<\EOF
1672 #define HAVE_ALLOCA 1
1673 EOF
1674
1675 fi
1676
1677 if test $ac_cv_func_alloca_works = no; then
1678 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1679 # that cause trouble. Some versions do not even contain alloca or
1680 # contain a buggy version. If you still want to use their alloca,
1681 # use ar to extract alloca.o from them instead of compiling alloca.c.
1682 ALLOCA=alloca.${ac_objext}
1683 cat >> confdefs.h <<\EOF
1684 #define C_ALLOCA 1
1685 EOF
1686
1687
1688 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1689 echo "configure:1690: checking whether alloca needs Cray hooks" >&5
1690 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1691 echo $ac_n "(cached) $ac_c" 1>&6
1692 else
1693 cat > conftest.$ac_ext <<EOF
1694 #line 1695 "configure"
1695 #include "confdefs.h"
1696 #if defined(CRAY) && ! defined(CRAY2)
1697 webecray
1698 #else
1699 wenotbecray
1700 #endif
1701
1702 EOF
1703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1704 egrep "webecray" >/dev/null 2>&1; then
1705 rm -rf conftest*
1706 ac_cv_os_cray=yes
1707 else
1708 rm -rf conftest*
1709 ac_cv_os_cray=no
1710 fi
1711 rm -f conftest*
1712
1713 fi
1714
1715 echo "$ac_t""$ac_cv_os_cray" 1>&6
1716 if test $ac_cv_os_cray = yes; then
1717 for ac_func in _getb67 GETB67 getb67; do
1718 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1719 echo "configure:1720: checking for $ac_func" >&5
1720 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723 cat > conftest.$ac_ext <<EOF
1724 #line 1725 "configure"
1725 #include "confdefs.h"
1726 /* System header to define __stub macros and hopefully few prototypes,
1727 which can conflict with char $ac_func(); below. */
1728 #include <assert.h>
1729 /* Override any gcc2 internal prototype to avoid an error. */
1730 /* We use char because int might match the return type of a gcc2
1731 builtin and then its argument prototype would still apply. */
1732 char $ac_func();
1733
1734 int main() {
1735
1736 /* The GNU C library defines this for functions which it implements
1737 to always fail with ENOSYS. Some functions are actually named
1738 something starting with __ and the normal name is an alias. */
1739 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1740 choke me
1741 #else
1742 $ac_func();
1743 #endif
1744
1745 ; return 0; }
1746 EOF
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1748 rm -rf conftest*
1749 eval "ac_cv_func_$ac_func=yes"
1750 else
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1753 rm -rf conftest*
1754 eval "ac_cv_func_$ac_func=no"
1755 fi
1756 rm -f conftest*
1757 fi
1758
1759 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1760 echo "$ac_t""yes" 1>&6
1761 cat >> confdefs.h <<EOF
1762 #define CRAY_STACKSEG_END $ac_func
1763 EOF
1764
1765 break
1766 else
1767 echo "$ac_t""no" 1>&6
1768 fi
1769
1770 done
1771 fi
1772
1773 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1774 echo "configure:1775: checking stack direction for C alloca" >&5
1775 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1776 echo $ac_n "(cached) $ac_c" 1>&6
1777 else
1778 if test "$cross_compiling" = yes; then
1779 ac_cv_c_stack_direction=0
1780 else
1781 cat > conftest.$ac_ext <<EOF
1782 #line 1783 "configure"
1783 #include "confdefs.h"
1784 find_stack_direction ()
1785 {
1786 static char *addr = 0;
1787 auto char dummy;
1788 if (addr == 0)
1789 {
1790 addr = &dummy;
1791 return find_stack_direction ();
1792 }
1793 else
1794 return (&dummy > addr) ? 1 : -1;
1795 }
1796 main ()
1797 {
1798 exit (find_stack_direction() < 0);
1799 }
1800 EOF
1801 if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1802 then
1803 ac_cv_c_stack_direction=1
1804 else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -fr conftest*
1808 ac_cv_c_stack_direction=-1
1809 fi
1810 rm -fr conftest*
1811 fi
1812
1813 fi
1814
1815 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1816 cat >> confdefs.h <<EOF
1817 #define STACK_DIRECTION $ac_cv_c_stack_direction
1818 EOF
1819
1820 fi
1821
1822 for ac_hdr in unistd.h
1823 do
1824 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1825 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1826 echo "configure:1827: checking for $ac_hdr" >&5
1827 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1828 echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830 cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 #include <$ac_hdr>
1834 EOF
1835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1836 { (eval echo configure:1837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1838 if test -z "$ac_err"; then
1839 rm -rf conftest*
1840 eval "ac_cv_header_$ac_safe=yes"
1841 else
1842 echo "$ac_err" >&5
1843 echo "configure: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 rm -rf conftest*
1846 eval "ac_cv_header_$ac_safe=no"
1847 fi
1848 rm -f conftest*
1849 fi
1850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1851 echo "$ac_t""yes" 1>&6
1852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1853 cat >> confdefs.h <<EOF
1854 #define $ac_tr_hdr 1
1855 EOF
1856
1857 else
1858 echo "$ac_t""no" 1>&6
1859 fi
1860 done
1861
1862 for ac_func in getpagesize
1863 do
1864 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_func" >&5
1866 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1868 else
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 /* System header to define __stub macros and hopefully few prototypes,
1873 which can conflict with char $ac_func(); below. */
1874 #include <assert.h>
1875 /* Override any gcc2 internal prototype to avoid an error. */
1876 /* We use char because int might match the return type of a gcc2
1877 builtin and then its argument prototype would still apply. */
1878 char $ac_func();
1879
1880 int main() {
1881
1882 /* The GNU C library defines this for functions which it implements
1883 to always fail with ENOSYS. Some functions are actually named
1884 something starting with __ and the normal name is an alias. */
1885 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1886 choke me
1887 #else
1888 $ac_func();
1889 #endif
1890
1891 ; return 0; }
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894 rm -rf conftest*
1895 eval "ac_cv_func_$ac_func=yes"
1896 else
1897 echo "configure: failed program was:" >&5
1898 cat conftest.$ac_ext >&5
1899 rm -rf conftest*
1900 eval "ac_cv_func_$ac_func=no"
1901 fi
1902 rm -f conftest*
1903 fi
1904
1905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1906 echo "$ac_t""yes" 1>&6
1907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1908 cat >> confdefs.h <<EOF
1909 #define $ac_tr_func 1
1910 EOF
1911
1912 else
1913 echo "$ac_t""no" 1>&6
1914 fi
1915 done
1916
1917 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1918 echo "configure:1919: checking for working mmap" >&5
1919 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1920 echo $ac_n "(cached) $ac_c" 1>&6
1921 else
1922 if test "$cross_compiling" = yes; then
1923 ac_cv_func_mmap_fixed_mapped=no
1924 else
1925 cat > conftest.$ac_ext <<EOF
1926 #line 1927 "configure"
1927 #include "confdefs.h"
1928
1929 /* Thanks to Mike Haertel and Jim Avera for this test.
1930 Here is a matrix of mmap possibilities:
1931 mmap private not fixed
1932 mmap private fixed at somewhere currently unmapped
1933 mmap private fixed at somewhere already mapped
1934 mmap shared not fixed
1935 mmap shared fixed at somewhere currently unmapped
1936 mmap shared fixed at somewhere already mapped
1937 For private mappings, we should verify that changes cannot be read()
1938 back from the file, nor mmap's back from the file at a different
1939 address. (There have been systems where private was not correctly
1940 implemented like the infamous i386 svr4.0, and systems where the
1941 VM page cache was not coherent with the filesystem buffer cache
1942 like early versions of FreeBSD and possibly contemporary NetBSD.)
1943 For shared mappings, we should conversely verify that changes get
1944 propogated back to all the places they're supposed to be.
1945
1946 Grep wants private fixed already mapped.
1947 The main things grep needs to know about mmap are:
1948 * does it exist and is it safe to write into the mmap'd area
1949 * how to use it (BSD variants) */
1950 #include <sys/types.h>
1951 #include <fcntl.h>
1952 #include <sys/mman.h>
1953
1954 /* This mess was copied from the GNU getpagesize.h. */
1955 #ifndef HAVE_GETPAGESIZE
1956 # ifdef HAVE_UNISTD_H
1957 # include <unistd.h>
1958 # endif
1959
1960 /* Assume that all systems that can run configure have sys/param.h. */
1961 # ifndef HAVE_SYS_PARAM_H
1962 # define HAVE_SYS_PARAM_H 1
1963 # endif
1964
1965 # ifdef _SC_PAGESIZE
1966 # define getpagesize() sysconf(_SC_PAGESIZE)
1967 # else /* no _SC_PAGESIZE */
1968 # ifdef HAVE_SYS_PARAM_H
1969 # include <sys/param.h>
1970 # ifdef EXEC_PAGESIZE
1971 # define getpagesize() EXEC_PAGESIZE
1972 # else /* no EXEC_PAGESIZE */
1973 # ifdef NBPG
1974 # define getpagesize() NBPG * CLSIZE
1975 # ifndef CLSIZE
1976 # define CLSIZE 1
1977 # endif /* no CLSIZE */
1978 # else /* no NBPG */
1979 # ifdef NBPC
1980 # define getpagesize() NBPC
1981 # else /* no NBPC */
1982 # ifdef PAGESIZE
1983 # define getpagesize() PAGESIZE
1984 # endif /* PAGESIZE */
1985 # endif /* no NBPC */
1986 # endif /* no NBPG */
1987 # endif /* no EXEC_PAGESIZE */
1988 # else /* no HAVE_SYS_PARAM_H */
1989 # define getpagesize() 8192 /* punt totally */
1990 # endif /* no HAVE_SYS_PARAM_H */
1991 # endif /* no _SC_PAGESIZE */
1992
1993 #endif /* no HAVE_GETPAGESIZE */
1994
1995 #ifdef __cplusplus
1996 extern "C" { void *malloc(unsigned); }
1997 #else
1998 char *malloc();
1999 #endif
2000
2001 int
2002 main()
2003 {
2004 char *data, *data2, *data3;
2005 int i, pagesize;
2006 int fd;
2007
2008 pagesize = getpagesize();
2009
2010 /*
2011 * First, make a file with some known garbage in it.
2012 */
2013 data = malloc(pagesize);
2014 if (!data)
2015 exit(1);
2016 for (i = 0; i < pagesize; ++i)
2017 *(data + i) = rand();
2018 umask(0);
2019 fd = creat("conftestmmap", 0600);
2020 if (fd < 0)
2021 exit(1);
2022 if (write(fd, data, pagesize) != pagesize)
2023 exit(1);
2024 close(fd);
2025
2026 /*
2027 * Next, try to mmap the file at a fixed address which
2028 * already has something else allocated at it. If we can,
2029 * also make sure that we see the same garbage.
2030 */
2031 fd = open("conftestmmap", O_RDWR);
2032 if (fd < 0)
2033 exit(1);
2034 data2 = malloc(2 * pagesize);
2035 if (!data2)
2036 exit(1);
2037 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2038 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2039 MAP_PRIVATE | MAP_FIXED, fd, 0L))
2040 exit(1);
2041 for (i = 0; i < pagesize; ++i)
2042 if (*(data + i) != *(data2 + i))
2043 exit(1);
2044
2045 /*
2046 * Finally, make sure that changes to the mapped area
2047 * do not percolate back to the file as seen by read().
2048 * (This is a bug on some variants of i386 svr4.0.)
2049 */
2050 for (i = 0; i < pagesize; ++i)
2051 *(data2 + i) = *(data2 + i) + 1;
2052 data3 = malloc(pagesize);
2053 if (!data3)
2054 exit(1);
2055 if (read(fd, data3, pagesize) != pagesize)
2056 exit(1);
2057 for (i = 0; i < pagesize; ++i)
2058 if (*(data + i) != *(data3 + i))
2059 exit(1);
2060 close(fd);
2061 unlink("conftestmmap");
2062 exit(0);
2063 }
2064
2065 EOF
2066 if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2067 then
2068 ac_cv_func_mmap_fixed_mapped=yes
2069 else
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 rm -fr conftest*
2073 ac_cv_func_mmap_fixed_mapped=no
2074 fi
2075 rm -fr conftest*
2076 fi
2077
2078 fi
2079
2080 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2081 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2082 cat >> confdefs.h <<\EOF
2083 #define HAVE_MMAP 1
2084 EOF
2085
2086 fi
2087
2088
2089 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2090 unistd.h values.h sys/param.h
2091 do
2092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2094 echo "configure:2095: checking for $ac_hdr" >&5
2095 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2096 echo $ac_n "(cached) $ac_c" 1>&6
2097 else
2098 cat > conftest.$ac_ext <<EOF
2099 #line 2100 "configure"
2100 #include "confdefs.h"
2101 #include <$ac_hdr>
2102 EOF
2103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2104 { (eval echo configure:2105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2106 if test -z "$ac_err"; then
2107 rm -rf conftest*
2108 eval "ac_cv_header_$ac_safe=yes"
2109 else
2110 echo "$ac_err" >&5
2111 echo "configure: failed program was:" >&5
2112 cat conftest.$ac_ext >&5
2113 rm -rf conftest*
2114 eval "ac_cv_header_$ac_safe=no"
2115 fi
2116 rm -f conftest*
2117 fi
2118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2119 echo "$ac_t""yes" 1>&6
2120 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2121 cat >> confdefs.h <<EOF
2122 #define $ac_tr_hdr 1
2123 EOF
2124
2125 else
2126 echo "$ac_t""no" 1>&6
2127 fi
2128 done
2129
2130 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2131 __argz_count __argz_stringify __argz_next
2132 do
2133 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2134 echo "configure:2135: checking for $ac_func" >&5
2135 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2136 echo $ac_n "(cached) $ac_c" 1>&6
2137 else
2138 cat > conftest.$ac_ext <<EOF
2139 #line 2140 "configure"
2140 #include "confdefs.h"
2141 /* System header to define __stub macros and hopefully few prototypes,
2142 which can conflict with char $ac_func(); below. */
2143 #include <assert.h>
2144 /* Override any gcc2 internal prototype to avoid an error. */
2145 /* We use char because int might match the return type of a gcc2
2146 builtin and then its argument prototype would still apply. */
2147 char $ac_func();
2148
2149 int main() {
2150
2151 /* The GNU C library defines this for functions which it implements
2152 to always fail with ENOSYS. Some functions are actually named
2153 something starting with __ and the normal name is an alias. */
2154 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2155 choke me
2156 #else
2157 $ac_func();
2158 #endif
2159
2160 ; return 0; }
2161 EOF
2162 if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2163 rm -rf conftest*
2164 eval "ac_cv_func_$ac_func=yes"
2165 else
2166 echo "configure: failed program was:" >&5
2167 cat conftest.$ac_ext >&5
2168 rm -rf conftest*
2169 eval "ac_cv_func_$ac_func=no"
2170 fi
2171 rm -f conftest*
2172 fi
2173
2174 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2175 echo "$ac_t""yes" 1>&6
2176 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2177 cat >> confdefs.h <<EOF
2178 #define $ac_tr_func 1
2179 EOF
2180
2181 else
2182 echo "$ac_t""no" 1>&6
2183 fi
2184 done
2185
2186
2187 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2188 for ac_func in stpcpy
2189 do
2190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2191 echo "configure:2192: checking for $ac_func" >&5
2192 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2193 echo $ac_n "(cached) $ac_c" 1>&6
2194 else
2195 cat > conftest.$ac_ext <<EOF
2196 #line 2197 "configure"
2197 #include "confdefs.h"
2198 /* System header to define __stub macros and hopefully few prototypes,
2199 which can conflict with char $ac_func(); below. */
2200 #include <assert.h>
2201 /* Override any gcc2 internal prototype to avoid an error. */
2202 /* We use char because int might match the return type of a gcc2
2203 builtin and then its argument prototype would still apply. */
2204 char $ac_func();
2205
2206 int main() {
2207
2208 /* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2212 choke me
2213 #else
2214 $ac_func();
2215 #endif
2216
2217 ; return 0; }
2218 EOF
2219 if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2220 rm -rf conftest*
2221 eval "ac_cv_func_$ac_func=yes"
2222 else
2223 echo "configure: failed program was:" >&5
2224 cat conftest.$ac_ext >&5
2225 rm -rf conftest*
2226 eval "ac_cv_func_$ac_func=no"
2227 fi
2228 rm -f conftest*
2229 fi
2230
2231 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2232 echo "$ac_t""yes" 1>&6
2233 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2234 cat >> confdefs.h <<EOF
2235 #define $ac_tr_func 1
2236 EOF
2237
2238 else
2239 echo "$ac_t""no" 1>&6
2240 fi
2241 done
2242
2243 fi
2244 if test "${ac_cv_func_stpcpy}" = "yes"; then
2245 cat >> confdefs.h <<\EOF
2246 #define HAVE_STPCPY 1
2247 EOF
2248
2249 fi
2250
2251 if test $ac_cv_header_locale_h = yes; then
2252 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2253 echo "configure:2254: checking for LC_MESSAGES" >&5
2254 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2255 echo $ac_n "(cached) $ac_c" 1>&6
2256 else
2257 cat > conftest.$ac_ext <<EOF
2258 #line 2259 "configure"
2259 #include "confdefs.h"
2260 #include <locale.h>
2261 int main() {
2262 return LC_MESSAGES
2263 ; return 0; }
2264 EOF
2265 if { (eval echo configure:2266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2266 rm -rf conftest*
2267 am_cv_val_LC_MESSAGES=yes
2268 else
2269 echo "configure: failed program was:" >&5
2270 cat conftest.$ac_ext >&5
2271 rm -rf conftest*
2272 am_cv_val_LC_MESSAGES=no
2273 fi
2274 rm -f conftest*
2275 fi
2276
2277 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2278 if test $am_cv_val_LC_MESSAGES = yes; then
2279 cat >> confdefs.h <<\EOF
2280 #define HAVE_LC_MESSAGES 1
2281 EOF
2282
2283 fi
2284 fi
2285 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2286 echo "configure:2287: checking whether NLS is requested" >&5
2287 # Check whether --enable-nls or --disable-nls was given.
2288 if test "${enable_nls+set}" = set; then
2289 enableval="$enable_nls"
2290 USE_NLS=$enableval
2291 else
2292 USE_NLS=yes
2293 fi
2294
2295 echo "$ac_t""$USE_NLS" 1>&6
2296
2297
2298 USE_INCLUDED_LIBINTL=no
2299
2300 if test "$USE_NLS" = "yes"; then
2301 cat >> confdefs.h <<\EOF
2302 #define ENABLE_NLS 1
2303 EOF
2304
2305 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2306 echo "configure:2307: checking whether included gettext is requested" >&5
2307 # Check whether --with-included-gettext or --without-included-gettext was given.
2308 if test "${with_included_gettext+set}" = set; then
2309 withval="$with_included_gettext"
2310 nls_cv_force_use_gnu_gettext=$withval
2311 else
2312 nls_cv_force_use_gnu_gettext=no
2313 fi
2314
2315 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2316
2317 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2318 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2319 nls_cv_header_intl=
2320 nls_cv_header_libgt=
2321 CATOBJEXT=NONE
2322
2323 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2324 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2325 echo "configure:2326: checking for libintl.h" >&5
2326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329 cat > conftest.$ac_ext <<EOF
2330 #line 2331 "configure"
2331 #include "confdefs.h"
2332 #include <libintl.h>
2333 EOF
2334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2335 { (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2337 if test -z "$ac_err"; then
2338 rm -rf conftest*
2339 eval "ac_cv_header_$ac_safe=yes"
2340 else
2341 echo "$ac_err" >&5
2342 echo "configure: failed program was:" >&5
2343 cat conftest.$ac_ext >&5
2344 rm -rf conftest*
2345 eval "ac_cv_header_$ac_safe=no"
2346 fi
2347 rm -f conftest*
2348 fi
2349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2350 echo "$ac_t""yes" 1>&6
2351 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2352 echo "configure:2353: checking for gettext in libc" >&5
2353 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #include <libintl.h>
2360 int main() {
2361 return (int) gettext ("")
2362 ; return 0; }
2363 EOF
2364 if { (eval echo configure:2365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2365 rm -rf conftest*
2366 gt_cv_func_gettext_libc=yes
2367 else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -rf conftest*
2371 gt_cv_func_gettext_libc=no
2372 fi
2373 rm -f conftest*
2374 fi
2375
2376 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2377
2378 if test "$gt_cv_func_gettext_libc" != "yes"; then
2379 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2380 echo "configure:2381: checking for bindtextdomain in -lintl" >&5
2381 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2382 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2383 echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385 ac_save_LIBS="$LIBS"
2386 LIBS="-lintl $LIBS"
2387 cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 /* Override any gcc2 internal prototype to avoid an error. */
2391 /* We use char because int might match the return type of a gcc2
2392 builtin and then its argument prototype would still apply. */
2393 char bindtextdomain();
2394
2395 int main() {
2396 bindtextdomain()
2397 ; return 0; }
2398 EOF
2399 if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2400 rm -rf conftest*
2401 eval "ac_cv_lib_$ac_lib_var=yes"
2402 else
2403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -rf conftest*
2406 eval "ac_cv_lib_$ac_lib_var=no"
2407 fi
2408 rm -f conftest*
2409 LIBS="$ac_save_LIBS"
2410
2411 fi
2412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2413 echo "$ac_t""yes" 1>&6
2414 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2415 echo "configure:2416: checking for gettext in libintl" >&5
2416 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2417 echo $ac_n "(cached) $ac_c" 1>&6
2418 else
2419 cat > conftest.$ac_ext <<EOF
2420 #line 2421 "configure"
2421 #include "confdefs.h"
2422
2423 int main() {
2424 return (int) gettext ("")
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2428 rm -rf conftest*
2429 gt_cv_func_gettext_libintl=yes
2430 else
2431 echo "configure: failed program was:" >&5
2432 cat conftest.$ac_ext >&5
2433 rm -rf conftest*
2434 gt_cv_func_gettext_libintl=no
2435 fi
2436 rm -f conftest*
2437 fi
2438
2439 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2440 else
2441 echo "$ac_t""no" 1>&6
2442 fi
2443
2444 fi
2445
2446 if test "$gt_cv_func_gettext_libc" = "yes" \
2447 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2448 cat >> confdefs.h <<\EOF
2449 #define HAVE_GETTEXT 1
2450 EOF
2451
2452 # Extract the first word of "msgfmt", so it can be a program name with args.
2453 set dummy msgfmt; ac_word=$2
2454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2455 echo "configure:2456: checking for $ac_word" >&5
2456 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
2458 else
2459 case "$MSGFMT" in
2460 /*)
2461 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2462 ;;
2463 *)
2464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2465 for ac_dir in $PATH; do
2466 test -z "$ac_dir" && ac_dir=.
2467 if test -f $ac_dir/$ac_word; then
2468 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2469 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2470 break
2471 fi
2472 fi
2473 done
2474 IFS="$ac_save_ifs"
2475 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2476 ;;
2477 esac
2478 fi
2479 MSGFMT="$ac_cv_path_MSGFMT"
2480 if test -n "$MSGFMT"; then
2481 echo "$ac_t""$MSGFMT" 1>&6
2482 else
2483 echo "$ac_t""no" 1>&6
2484 fi
2485 if test "$MSGFMT" != "no"; then
2486 for ac_func in dcgettext
2487 do
2488 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2489 echo "configure:2490: checking for $ac_func" >&5
2490 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493 cat > conftest.$ac_ext <<EOF
2494 #line 2495 "configure"
2495 #include "confdefs.h"
2496 /* System header to define __stub macros and hopefully few prototypes,
2497 which can conflict with char $ac_func(); below. */
2498 #include <assert.h>
2499 /* Override any gcc2 internal prototype to avoid an error. */
2500 /* We use char because int might match the return type of a gcc2
2501 builtin and then its argument prototype would still apply. */
2502 char $ac_func();
2503
2504 int main() {
2505
2506 /* The GNU C library defines this for functions which it implements
2507 to always fail with ENOSYS. Some functions are actually named
2508 something starting with __ and the normal name is an alias. */
2509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2510 choke me
2511 #else
2512 $ac_func();
2513 #endif
2514
2515 ; return 0; }
2516 EOF
2517 if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2518 rm -rf conftest*
2519 eval "ac_cv_func_$ac_func=yes"
2520 else
2521 echo "configure: failed program was:" >&5
2522 cat conftest.$ac_ext >&5
2523 rm -rf conftest*
2524 eval "ac_cv_func_$ac_func=no"
2525 fi
2526 rm -f conftest*
2527 fi
2528
2529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2530 echo "$ac_t""yes" 1>&6
2531 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2532 cat >> confdefs.h <<EOF
2533 #define $ac_tr_func 1
2534 EOF
2535
2536 else
2537 echo "$ac_t""no" 1>&6
2538 fi
2539 done
2540
2541 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2542 set dummy gmsgfmt; ac_word=$2
2543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_word" >&5
2545 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548 case "$GMSGFMT" in
2549 /*)
2550 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2551 ;;
2552 ?:/*)
2553 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2554 ;;
2555 *)
2556 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2557 ac_dummy="$PATH"
2558 for ac_dir in $ac_dummy; do
2559 test -z "$ac_dir" && ac_dir=.
2560 if test -f $ac_dir/$ac_word; then
2561 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2562 break
2563 fi
2564 done
2565 IFS="$ac_save_ifs"
2566 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2567 ;;
2568 esac
2569 fi
2570 GMSGFMT="$ac_cv_path_GMSGFMT"
2571 if test -n "$GMSGFMT"; then
2572 echo "$ac_t""$GMSGFMT" 1>&6
2573 else
2574 echo "$ac_t""no" 1>&6
2575 fi
2576
2577 # Extract the first word of "xgettext", so it can be a program name with args.
2578 set dummy xgettext; ac_word=$2
2579 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2580 echo "configure:2581: checking for $ac_word" >&5
2581 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2583 else
2584 case "$XGETTEXT" in
2585 /*)
2586 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2587 ;;
2588 *)
2589 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2590 for ac_dir in $PATH; do
2591 test -z "$ac_dir" && ac_dir=.
2592 if test -f $ac_dir/$ac_word; then
2593 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2594 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2595 break
2596 fi
2597 fi
2598 done
2599 IFS="$ac_save_ifs"
2600 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2601 ;;
2602 esac
2603 fi
2604 XGETTEXT="$ac_cv_path_XGETTEXT"
2605 if test -n "$XGETTEXT"; then
2606 echo "$ac_t""$XGETTEXT" 1>&6
2607 else
2608 echo "$ac_t""no" 1>&6
2609 fi
2610
2611 cat > conftest.$ac_ext <<EOF
2612 #line 2613 "configure"
2613 #include "confdefs.h"
2614
2615 int main() {
2616 extern int _nl_msg_cat_cntr;
2617 return _nl_msg_cat_cntr
2618 ; return 0; }
2619 EOF
2620 if { (eval echo configure:2621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2621 rm -rf conftest*
2622 CATOBJEXT=.gmo
2623 DATADIRNAME=share
2624 else
2625 echo "configure: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 rm -rf conftest*
2628 CATOBJEXT=.mo
2629 DATADIRNAME=lib
2630 fi
2631 rm -f conftest*
2632 INSTOBJEXT=.mo
2633 fi
2634 fi
2635
2636 else
2637 echo "$ac_t""no" 1>&6
2638 fi
2639
2640
2641
2642 if test "$CATOBJEXT" = "NONE"; then
2643 nls_cv_use_gnu_gettext=yes
2644 fi
2645 fi
2646
2647 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2648 INTLOBJS="\$(GETTOBJS)"
2649 # Extract the first word of "msgfmt", so it can be a program name with args.
2650 set dummy msgfmt; ac_word=$2
2651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2652 echo "configure:2653: checking for $ac_word" >&5
2653 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
2655 else
2656 case "$MSGFMT" in
2657 /*)
2658 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2659 ;;
2660 *)
2661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2662 for ac_dir in $PATH; do
2663 test -z "$ac_dir" && ac_dir=.
2664 if test -f $ac_dir/$ac_word; then
2665 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2666 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2667 break
2668 fi
2669 fi
2670 done
2671 IFS="$ac_save_ifs"
2672 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2673 ;;
2674 esac
2675 fi
2676 MSGFMT="$ac_cv_path_MSGFMT"
2677 if test -n "$MSGFMT"; then
2678 echo "$ac_t""$MSGFMT" 1>&6
2679 else
2680 echo "$ac_t""no" 1>&6
2681 fi
2682
2683 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2684 set dummy gmsgfmt; ac_word=$2
2685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2686 echo "configure:2687: checking for $ac_word" >&5
2687 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2688 echo $ac_n "(cached) $ac_c" 1>&6
2689 else
2690 case "$GMSGFMT" in
2691 /*)
2692 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2693 ;;
2694 ?:/*)
2695 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2696 ;;
2697 *)
2698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2699 ac_dummy="$PATH"
2700 for ac_dir in $ac_dummy; do
2701 test -z "$ac_dir" && ac_dir=.
2702 if test -f $ac_dir/$ac_word; then
2703 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2704 break
2705 fi
2706 done
2707 IFS="$ac_save_ifs"
2708 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2709 ;;
2710 esac
2711 fi
2712 GMSGFMT="$ac_cv_path_GMSGFMT"
2713 if test -n "$GMSGFMT"; then
2714 echo "$ac_t""$GMSGFMT" 1>&6
2715 else
2716 echo "$ac_t""no" 1>&6
2717 fi
2718
2719 # Extract the first word of "xgettext", so it can be a program name with args.
2720 set dummy xgettext; ac_word=$2
2721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2722 echo "configure:2723: checking for $ac_word" >&5
2723 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2724 echo $ac_n "(cached) $ac_c" 1>&6
2725 else
2726 case "$XGETTEXT" in
2727 /*)
2728 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2729 ;;
2730 *)
2731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2732 for ac_dir in $PATH; do
2733 test -z "$ac_dir" && ac_dir=.
2734 if test -f $ac_dir/$ac_word; then
2735 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2736 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2737 break
2738 fi
2739 fi
2740 done
2741 IFS="$ac_save_ifs"
2742 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2743 ;;
2744 esac
2745 fi
2746 XGETTEXT="$ac_cv_path_XGETTEXT"
2747 if test -n "$XGETTEXT"; then
2748 echo "$ac_t""$XGETTEXT" 1>&6
2749 else
2750 echo "$ac_t""no" 1>&6
2751 fi
2752
2753
2754 USE_INCLUDED_LIBINTL=yes
2755 CATOBJEXT=.gmo
2756 INSTOBJEXT=.mo
2757 DATADIRNAME=share
2758 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2759 INTLLIBS=$INTLDEPS
2760 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2761 nls_cv_header_intl=libintl.h
2762 nls_cv_header_libgt=libgettext.h
2763 fi
2764
2765 if test "$XGETTEXT" != ":"; then
2766 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2767 : ;
2768 else
2769 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2770 XGETTEXT=":"
2771 fi
2772 fi
2773
2774 # We need to process the po/ directory.
2775 POSUB=po
2776 else
2777 DATADIRNAME=share
2778 nls_cv_header_intl=libintl.h
2779 nls_cv_header_libgt=libgettext.h
2780 fi
2781
2782 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2783 # because some of the sources are only built for this goal.
2784 if test "$PACKAGE" = gettext; then
2785 USE_NLS=yes
2786 USE_INCLUDED_LIBINTL=yes
2787 fi
2788
2789 for lang in $ALL_LINGUAS; do
2790 GMOFILES="$GMOFILES $lang.gmo"
2791 POFILES="$POFILES $lang.po"
2792 done
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807 if test "x$CATOBJEXT" != "x"; then
2808 if test "x$ALL_LINGUAS" = "x"; then
2809 LINGUAS=
2810 else
2811 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2812 echo "configure:2813: checking for catalogs to be installed" >&5
2813 NEW_LINGUAS=
2814 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2815 case "$ALL_LINGUAS" in
2816 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2817 esac
2818 done
2819 LINGUAS=$NEW_LINGUAS
2820 echo "$ac_t""$LINGUAS" 1>&6
2821 fi
2822
2823 if test -n "$LINGUAS"; then
2824 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2825 fi
2826 fi
2827
2828 if test $ac_cv_header_locale_h = yes; then
2829 INCLUDE_LOCALE_H="#include <locale.h>"
2830 else
2831 INCLUDE_LOCALE_H="\
2832 /* The system does not provide the header <locale.h>. Take care yourself. */"
2833 fi
2834
2835
2836 if test -f $srcdir/po2tbl.sed.in; then
2837 if test "$CATOBJEXT" = ".cat"; then
2838 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2839 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2840 echo "configure:2841: checking for linux/version.h" >&5
2841 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2842 echo $ac_n "(cached) $ac_c" 1>&6
2843 else
2844 cat > conftest.$ac_ext <<EOF
2845 #line 2846 "configure"
2846 #include "confdefs.h"
2847 #include <linux/version.h>
2848 EOF
2849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2850 { (eval echo configure:2851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2852 if test -z "$ac_err"; then
2853 rm -rf conftest*
2854 eval "ac_cv_header_$ac_safe=yes"
2855 else
2856 echo "$ac_err" >&5
2857 echo "configure: failed program was:" >&5
2858 cat conftest.$ac_ext >&5
2859 rm -rf conftest*
2860 eval "ac_cv_header_$ac_safe=no"
2861 fi
2862 rm -f conftest*
2863 fi
2864 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2865 echo "$ac_t""yes" 1>&6
2866 msgformat=linux
2867 else
2868 echo "$ac_t""no" 1>&6
2869 msgformat=xopen
2870 fi
2871
2872
2873 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2874 fi
2875 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2876 $srcdir/po2tbl.sed.in > po2tbl.sed
2877 fi
2878
2879 if test "$PACKAGE" = "gettext"; then
2880 GT_NO="#NO#"
2881 GT_YES=
2882 else
2883 GT_NO=
2884 GT_YES="#YES#"
2885 fi
2886
2887
2888
2889 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2890
2891
2892 l=
2893
2894
2895 if test -f $srcdir/po/POTFILES.in; then
2896 test -d po || mkdir po
2897 if test "x$srcdir" != "x."; then
2898 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2899 posrcprefix="$srcdir/"
2900 else
2901 posrcprefix="../$srcdir/"
2902 fi
2903 else
2904 posrcprefix="../"
2905 fi
2906 rm -f po/POTFILES
2907 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2908 < $srcdir/po/POTFILES.in > po/POTFILES
2909 fi
2910
2911
2912 localedir='${datadir}/locale'
2913
2914
2915 if test "x$POSUB" != x; then
2916
2917 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2918 echo "configure:2919: checking for catalogs to be installed" >&5
2919 # Look for .po and .gmo files in the source directory.
2920 CATALOGS=
2921 XLINGUAS=
2922 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
2923 # If there aren't any .gmo files the shell will give us the
2924 # literal string "../path/to/srcdir/po/*.gmo" which has to be
2925 # weeded out.
2926 case "$cat" in *\**)
2927 continue;;
2928 esac
2929 # The quadruple backslash is collapsed to a double backslash
2930 # by the backticks, then collapsed again by the double quotes,
2931 # leaving us with one backslash in the sed expression (right
2932 # before the dot that mustn't act as a wildcard).
2933 cat=`echo $cat | sed -e "s!$srcdir/!!" -e "s!\\\\.po!.gmo!"`
2934 lang=`echo $cat | sed -e 's!po/!!' -e "s!\\\\.gmo!!"`
2935 # The user is allowed to set LINGUAS to a list of languages to
2936 # install catalogs for. If it's empty that means "all of them."
2937 if test "x$LINGUAS" = x; then
2938 CATALOGS="$CATALOGS $cat"
2939 XLINGUAS="$XLINGUAS $lang"
2940 else
2941 case "$LINGUAS" in *$lang*)
2942 CATALOGS="$CATALOGS $cat"
2943 XLINGUAS="$XLINGUAS $lang"
2944 ;;
2945 esac
2946 fi
2947 done
2948 LINGUAS="$XLINGUAS"
2949 echo "$ac_t""$LINGUAS" 1>&6
2950
2951 CONFIG_ALL="$CONFIG_ALL all-po"
2952 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
2953 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
2954 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
2955 fi
2956
2957 PACKAGE=gdb
2958 cat >> confdefs.h <<EOF
2959 #define PACKAGE "$PACKAGE"
2960 EOF
2961
2962
2963
2964 debugdir=${libdir}/debug
2965
2966 # Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
2967 if test "${with_separate_debug_dir+set}" = set; then
2968 withval="$with_separate_debug_dir"
2969 debugdir="${withval}"
2970 fi
2971
2972
2973
2974 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
2975 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2976 ac_define_dir=`eval echo $debugdir`
2977 ac_define_dir=`eval echo $ac_define_dir`
2978 cat >> confdefs.h <<EOF
2979 #define DEBUGDIR "$ac_define_dir"
2980 EOF
2981
2982
2983 #AC_DEFINE_UNQUOTED(DEBUGDIR, "$debugdir"),
2984
2985 subdirs="doc testsuite"
2986
2987 configdirs=
2988
2989 . $srcdir/configure.host
2990
2991 . $srcdir/configure.tgt
2992
2993 # Fetch the default architecture and default target vector from BFD.
2994 targ=$target; . $srcdir/../bfd/config.bfd
2995
2996 # We only want the first architecture, so strip off the others if
2997 # there is more than one.
2998 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2999
3000 if test "x$targ_archs" != x; then
3001 cat >> confdefs.h <<EOF
3002 #define DEFAULT_BFD_ARCH $targ_archs
3003 EOF
3004
3005 fi
3006 if test "x$targ_defvec" != x; then
3007 cat >> confdefs.h <<EOF
3008 #define DEFAULT_BFD_VEC $targ_defvec
3009 EOF
3010
3011 fi
3012
3013 if test "$program_transform_name" = s,x,x,; then
3014 program_transform_name=
3015 else
3016 # Double any \ or $. echo might interpret backslashes.
3017 cat <<\EOF_SED > conftestsed
3018 s,\\,\\\\,g; s,\$,$$,g
3019 EOF_SED
3020 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3021 rm -f conftestsed
3022 fi
3023 test "$program_prefix" != NONE &&
3024 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3025 # Use a double $ so make ignores it.
3026 test "$program_suffix" != NONE &&
3027 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3028
3029 # sed with no file args requires a program.
3030 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3031
3032
3033 # The CLI cannot be disabled yet, but may be in the future.
3034
3035 # Enable CLI.
3036 # Check whether --enable-gdbcli or --disable-gdbcli was given.
3037 if test "${enable_gdbcli+set}" = set; then
3038 enableval="$enable_gdbcli"
3039 case $enableval in
3040 yes)
3041 ;;
3042 no)
3043 { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
3044 *)
3045 { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
3046 esac
3047 else
3048 enable_gdbcli=yes
3049 fi
3050
3051 if test x"$enable_gdbcli" = xyes; then
3052 if test -d $srcdir/cli; then
3053 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
3054 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
3055 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
3056 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3057 fi
3058 fi
3059
3060 # Enable MI.
3061 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3062 if test "${enable_gdbmi+set}" = set; then
3063 enableval="$enable_gdbmi"
3064 case $enableval in
3065 yes | no)
3066 ;;
3067 *)
3068 { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3069 esac
3070 else
3071 enable_gdbmi=yes
3072 fi
3073
3074 if test x"$enable_gdbmi" = xyes; then
3075 if test -d $srcdir/mi; then
3076 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3077 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3078 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3079 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3080 fi
3081 fi
3082
3083 # Enable TUI.
3084 # Check whether --enable-tui or --disable-tui was given.
3085 if test "${enable_tui+set}" = set; then
3086 enableval="$enable_tui"
3087 case $enableval in
3088 yes | no)
3089 ;;
3090 *)
3091 { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3092 esac
3093 else
3094 enable_tui=yes
3095 fi
3096
3097 if test x"$enable_tui" = xyes; then
3098 if test -d $srcdir/tui; then
3099 if test "$ac_cv_search_initscr" != no -a "$ac_cv_search_wborder" != no; then
3100 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3101 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3102 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3103 CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3104 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3105 CONFIG_ALL="${CONFIG_ALL} all-tui"
3106 CONFIG_CLEAN="${CONFIG_CLEAN} clean-tui"
3107 CONFIG_INSTALL="${CONFIG_INSTALL} install-tui"
3108 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-tui"
3109 fi
3110 fi
3111 fi
3112
3113 # Enable gdbtk.
3114 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3115 if test "${enable_gdbtk+set}" = set; then
3116 enableval="$enable_gdbtk"
3117 case $enableval in
3118 yes | no)
3119 ;;
3120 *)
3121 { echo "configure: error: bad value $enableval for --enable-gdbtk" 1>&2; exit 1; } ;;
3122 esac
3123 else
3124 if test -d $srcdir/gdbtk; then
3125 enable_gdbtk=yes
3126 else
3127 enable_gdbtk=no
3128 fi
3129 fi
3130
3131 # We unconditionally disable gdbtk tests on selected platforms.
3132 case $host_os in
3133 go32* | windows*)
3134 echo "configure: warning: gdbtk isn't supported on $host; disabling" 1>&2
3135 enable_gdbtk=no ;;
3136 esac
3137
3138 # Libunwind support.
3139 # Check whether --with-libunwind or --without-libunwind was given.
3140 if test "${with_libunwind+set}" = set; then
3141 withval="$with_libunwind"
3142 case "${withval}" in
3143 yes) enable_libunwind=yes ;;
3144 no) enable_libunwind=no ;;
3145 *) { echo "configure: error: bad value ${withval} for GDB with-libunwind option" 1>&2; exit 1; } ;;
3146 esac
3147 else
3148
3149 for ac_hdr in libunwind.h
3150 do
3151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3153 echo "configure:3154: checking for $ac_hdr" >&5
3154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3155 echo $ac_n "(cached) $ac_c" 1>&6
3156 else
3157 cat > conftest.$ac_ext <<EOF
3158 #line 3159 "configure"
3159 #include "confdefs.h"
3160 #include <$ac_hdr>
3161 EOF
3162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3163 { (eval echo configure:3164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3165 if test -z "$ac_err"; then
3166 rm -rf conftest*
3167 eval "ac_cv_header_$ac_safe=yes"
3168 else
3169 echo "$ac_err" >&5
3170 echo "configure: failed program was:" >&5
3171 cat conftest.$ac_ext >&5
3172 rm -rf conftest*
3173 eval "ac_cv_header_$ac_safe=no"
3174 fi
3175 rm -f conftest*
3176 fi
3177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3178 echo "$ac_t""yes" 1>&6
3179 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3180 cat >> confdefs.h <<EOF
3181 #define $ac_tr_hdr 1
3182 EOF
3183
3184 else
3185 echo "$ac_t""no" 1>&6
3186 fi
3187 done
3188
3189 for ac_hdr in libunwind-ia64.h
3190 do
3191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3193 echo "configure:3194: checking for $ac_hdr" >&5
3194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3195 echo $ac_n "(cached) $ac_c" 1>&6
3196 else
3197 cat > conftest.$ac_ext <<EOF
3198 #line 3199 "configure"
3199 #include "confdefs.h"
3200 #include <$ac_hdr>
3201 EOF
3202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3203 { (eval echo configure:3204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3205 if test -z "$ac_err"; then
3206 rm -rf conftest*
3207 eval "ac_cv_header_$ac_safe=yes"
3208 else
3209 echo "$ac_err" >&5
3210 echo "configure: failed program was:" >&5
3211 cat conftest.$ac_ext >&5
3212 rm -rf conftest*
3213 eval "ac_cv_header_$ac_safe=no"
3214 fi
3215 rm -f conftest*
3216 fi
3217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3218 echo "$ac_t""yes" 1>&6
3219 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3220 cat >> confdefs.h <<EOF
3221 #define $ac_tr_hdr 1
3222 EOF
3223
3224 else
3225 echo "$ac_t""no" 1>&6
3226 fi
3227 done
3228
3229 if test x"$ac_cv_header_libunwind_h" = xyes -a x"$ac_cv_header_libunwind_ia64_h" = xyes; then
3230 enable_libunwind=yes;
3231 fi
3232
3233 fi
3234
3235
3236 if test x"$enable_libunwind" = xyes; then
3237 for ac_hdr in libunwind.h
3238 do
3239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3241 echo "configure:3242: checking for $ac_hdr" >&5
3242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <$ac_hdr>
3249 EOF
3250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3251 { (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253 if test -z "$ac_err"; then
3254 rm -rf conftest*
3255 eval "ac_cv_header_$ac_safe=yes"
3256 else
3257 echo "$ac_err" >&5
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 rm -rf conftest*
3261 eval "ac_cv_header_$ac_safe=no"
3262 fi
3263 rm -f conftest*
3264 fi
3265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3268 cat >> confdefs.h <<EOF
3269 #define $ac_tr_hdr 1
3270 EOF
3271
3272 else
3273 echo "$ac_t""no" 1>&6
3274 fi
3275 done
3276
3277 for ac_hdr in libunwind-ia64.h
3278 do
3279 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3280 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3281 echo "configure:3282: checking for $ac_hdr" >&5
3282 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284 else
3285 cat > conftest.$ac_ext <<EOF
3286 #line 3287 "configure"
3287 #include "confdefs.h"
3288 #include <$ac_hdr>
3289 EOF
3290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3291 { (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3293 if test -z "$ac_err"; then
3294 rm -rf conftest*
3295 eval "ac_cv_header_$ac_safe=yes"
3296 else
3297 echo "$ac_err" >&5
3298 echo "configure: failed program was:" >&5
3299 cat conftest.$ac_ext >&5
3300 rm -rf conftest*
3301 eval "ac_cv_header_$ac_safe=no"
3302 fi
3303 rm -f conftest*
3304 fi
3305 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3306 echo "$ac_t""yes" 1>&6
3307 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3308 cat >> confdefs.h <<EOF
3309 #define $ac_tr_hdr 1
3310 EOF
3311
3312 else
3313 echo "$ac_t""no" 1>&6
3314 fi
3315 done
3316
3317 cat >> confdefs.h <<\EOF
3318 #define HAVE_LIBUNWIND 1
3319 EOF
3320
3321 CONFIG_OBS="$CONFIG_OBS libunwind-frame.o"
3322 CONFIG_DEPS="$CONFIG_DEPS libunwind-frame.o"
3323 CONFIG_SRCS="$CONFIG_SRCS libunwind-frame.c"
3324 fi
3325
3326 # Profiling support.
3327 # Check whether --enable-profiling or --disable-profiling was given.
3328 if test "${enable_profiling+set}" = set; then
3329 enableval="$enable_profiling"
3330 case $enableval in
3331 yes | no)
3332 ;;
3333 *)
3334 { echo "configure: error: bad value $enableval for --enable-profile" 1>&2; exit 1; } ;;
3335 esac
3336 else
3337 enable_profiling=no
3338 fi
3339
3340
3341 for ac_func in monstartup _mcleanup
3342 do
3343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3344 echo "configure:3345: checking for $ac_func" >&5
3345 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3346 echo $ac_n "(cached) $ac_c" 1>&6
3347 else
3348 cat > conftest.$ac_ext <<EOF
3349 #line 3350 "configure"
3350 #include "confdefs.h"
3351 /* System header to define __stub macros and hopefully few prototypes,
3352 which can conflict with char $ac_func(); below. */
3353 #include <assert.h>
3354 /* Override any gcc2 internal prototype to avoid an error. */
3355 /* We use char because int might match the return type of a gcc2
3356 builtin and then its argument prototype would still apply. */
3357 char $ac_func();
3358
3359 int main() {
3360
3361 /* The GNU C library defines this for functions which it implements
3362 to always fail with ENOSYS. Some functions are actually named
3363 something starting with __ and the normal name is an alias. */
3364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3365 choke me
3366 #else
3367 $ac_func();
3368 #endif
3369
3370 ; return 0; }
3371 EOF
3372 if { (eval echo configure:3373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3373 rm -rf conftest*
3374 eval "ac_cv_func_$ac_func=yes"
3375 else
3376 echo "configure: failed program was:" >&5
3377 cat conftest.$ac_ext >&5
3378 rm -rf conftest*
3379 eval "ac_cv_func_$ac_func=no"
3380 fi
3381 rm -f conftest*
3382 fi
3383
3384 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3385 echo "$ac_t""yes" 1>&6
3386 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3387 cat >> confdefs.h <<EOF
3388 #define $ac_tr_func 1
3389 EOF
3390
3391 else
3392 echo "$ac_t""no" 1>&6
3393 fi
3394 done
3395
3396 echo $ac_n "checking for _etext""... $ac_c" 1>&6
3397 echo "configure:3398: checking for _etext" >&5
3398 if eval "test \"`echo '$''{'ac_cv_var__etext'+set}'`\" = set"; then
3399 echo $ac_n "(cached) $ac_c" 1>&6
3400 else
3401 cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <stdlib.h>
3405 extern char _etext;
3406
3407 int main() {
3408 free (&_etext);
3409 ; return 0; }
3410 EOF
3411 if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3412 rm -rf conftest*
3413 ac_cv_var__etext=yes
3414 else
3415 echo "configure: failed program was:" >&5
3416 cat conftest.$ac_ext >&5
3417 rm -rf conftest*
3418 ac_cv_var__etext=no
3419 fi
3420 rm -f conftest*
3421 fi
3422
3423 echo "$ac_t""$ac_cv_var__etext" 1>&6
3424 if test $ac_cv_var__etext = yes; then
3425 cat >> confdefs.h <<\EOF
3426 #define HAVE__ETEXT 1
3427 EOF
3428
3429 fi
3430 if test "$enable_profiling" = yes ; then
3431 if test $ac_cv_func_monstartup = no || test $ac_cv_func__mcleanup = no; then
3432 { echo "configure: error: --enable-profiling requires monstartup and _mcleanup" 1>&2; exit 1; }
3433 fi
3434 PROFILE_CFLAGS=-pg
3435 OLD_CFLAGS="$CFLAGS"
3436 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
3437
3438 echo $ac_n "checking whether $CC supports -pg""... $ac_c" 1>&6
3439 echo "configure:3440: checking whether $CC supports -pg" >&5
3440 if eval "test \"`echo '$''{'ac_cv_cc_supports_pg'+set}'`\" = set"; then
3441 echo $ac_n "(cached) $ac_c" 1>&6
3442 else
3443 cat > conftest.$ac_ext <<EOF
3444 #line 3445 "configure"
3445 #include "confdefs.h"
3446
3447 int main() {
3448 int x;
3449 ; return 0; }
3450 EOF
3451 if { (eval echo configure:3452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3452 rm -rf conftest*
3453 ac_cv_cc_supports_pg=yes
3454 else
3455 echo "configure: failed program was:" >&5
3456 cat conftest.$ac_ext >&5
3457 rm -rf conftest*
3458 ac_cv_cc_supports_pg=no
3459 fi
3460 rm -f conftest*
3461 fi
3462
3463 echo "$ac_t""$ac_cv_cc_supports_pg" 1>&6
3464
3465 if test $ac_cv_cc_supports_pg = no; then
3466 { echo "configure: error: --enable-profiling requires a compiler which supports -pg" 1>&2; exit 1; }
3467 fi
3468
3469 CFLAGS="$OLD_CFLAGS"
3470 fi
3471
3472 # --------------------- #
3473 # Checks for programs. #
3474 # --------------------- #
3475
3476 for ac_prog in mawk gawk nawk awk
3477 do
3478 # Extract the first word of "$ac_prog", so it can be a program name with args.
3479 set dummy $ac_prog; ac_word=$2
3480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3481 echo "configure:3482: checking for $ac_word" >&5
3482 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3483 echo $ac_n "(cached) $ac_c" 1>&6
3484 else
3485 if test -n "$AWK"; then
3486 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3487 else
3488 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3489 ac_dummy="$PATH"
3490 for ac_dir in $ac_dummy; do
3491 test -z "$ac_dir" && ac_dir=.
3492 if test -f $ac_dir/$ac_word; then
3493 ac_cv_prog_AWK="$ac_prog"
3494 break
3495 fi
3496 done
3497 IFS="$ac_save_ifs"
3498 fi
3499 fi
3500 AWK="$ac_cv_prog_AWK"
3501 if test -n "$AWK"; then
3502 echo "$ac_t""$AWK" 1>&6
3503 else
3504 echo "$ac_t""no" 1>&6
3505 fi
3506
3507 test -n "$AWK" && break
3508 done
3509
3510 # Find a good install program. We prefer a C program (faster),
3511 # so one script is as good as another. But avoid the broken or
3512 # incompatible versions:
3513 # SysV /etc/install, /usr/sbin/install
3514 # SunOS /usr/etc/install
3515 # IRIX /sbin/install
3516 # AIX /bin/install
3517 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3518 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3519 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3520 # ./install, which can be erroneously created by make from ./install.sh.
3521 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3522 echo "configure:3523: checking for a BSD compatible install" >&5
3523 if test -z "$INSTALL"; then
3524 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3526 else
3527 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
3528 for ac_dir in $PATH; do
3529 # Account for people who put trailing slashes in PATH elements.
3530 case "$ac_dir/" in
3531 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3532 *)
3533 # OSF1 and SCO ODT 3.0 have their own names for install.
3534 # Don't use installbsd from OSF since it installs stuff as root
3535 # by default.
3536 for ac_prog in ginstall scoinst install; do
3537 if test -f $ac_dir/$ac_prog; then
3538 if test $ac_prog = install &&
3539 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3540 # AIX install. It has an incompatible calling convention.
3541 :
3542 else
3543 ac_cv_path_install="$ac_dir/$ac_prog -c"
3544 break 2
3545 fi
3546 fi
3547 done
3548 ;;
3549 esac
3550 done
3551 IFS="$ac_save_IFS"
3552
3553 fi
3554 if test "${ac_cv_path_install+set}" = set; then
3555 INSTALL="$ac_cv_path_install"
3556 else
3557 # As a last resort, use the slow shell script. We don't cache a
3558 # path for INSTALL within a source directory, because that will
3559 # break other packages using the cache if that directory is
3560 # removed, or if the path is relative.
3561 INSTALL="$ac_install_sh"
3562 fi
3563 fi
3564 echo "$ac_t""$INSTALL" 1>&6
3565
3566 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3567 # It thinks the first close brace ends the variable substitution.
3568 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3569
3570 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3571
3572 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3573
3574 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3575 echo "configure:3576: checking whether ln -s works" >&5
3576 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3577 echo $ac_n "(cached) $ac_c" 1>&6
3578 else
3579 rm -f conftestdata
3580 if ln -s X conftestdata 2>/dev/null
3581 then
3582 rm -f conftestdata
3583 ac_cv_prog_LN_S="ln -s"
3584 else
3585 ac_cv_prog_LN_S=ln
3586 fi
3587 fi
3588 LN_S="$ac_cv_prog_LN_S"
3589 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3590 echo "$ac_t""yes" 1>&6
3591 else
3592 echo "$ac_t""no" 1>&6
3593 fi
3594
3595 # Extract the first word of "ranlib", so it can be a program name with args.
3596 set dummy ranlib; ac_word=$2
3597 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3598 echo "configure:3599: checking for $ac_word" >&5
3599 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3600 echo $ac_n "(cached) $ac_c" 1>&6
3601 else
3602 if test -n "$RANLIB"; then
3603 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3604 else
3605 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608 test -z "$ac_dir" && ac_dir=.
3609 if test -f $ac_dir/$ac_word; then
3610 ac_cv_prog_RANLIB="ranlib"
3611 break
3612 fi
3613 done
3614 IFS="$ac_save_ifs"
3615 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3616 fi
3617 fi
3618 RANLIB="$ac_cv_prog_RANLIB"
3619 if test -n "$RANLIB"; then
3620 echo "$ac_t""$RANLIB" 1>&6
3621 else
3622 echo "$ac_t""no" 1>&6
3623 fi
3624
3625 for ac_prog in 'bison -y' byacc
3626 do
3627 # Extract the first word of "$ac_prog", so it can be a program name with args.
3628 set dummy $ac_prog; ac_word=$2
3629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3630 echo "configure:3631: checking for $ac_word" >&5
3631 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3632 echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634 if test -n "$YACC"; then
3635 ac_cv_prog_YACC="$YACC" # Let the user override the test.
3636 else
3637 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3638 ac_dummy="$PATH"
3639 for ac_dir in $ac_dummy; do
3640 test -z "$ac_dir" && ac_dir=.
3641 if test -f $ac_dir/$ac_word; then
3642 ac_cv_prog_YACC="$ac_prog"
3643 break
3644 fi
3645 done
3646 IFS="$ac_save_ifs"
3647 fi
3648 fi
3649 YACC="$ac_cv_prog_YACC"
3650 if test -n "$YACC"; then
3651 echo "$ac_t""$YACC" 1>&6
3652 else
3653 echo "$ac_t""no" 1>&6
3654 fi
3655
3656 test -n "$YACC" && break
3657 done
3658 test -n "$YACC" || YACC="yacc"
3659
3660
3661 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3662 set dummy ${ac_tool_prefix}ar; ac_word=$2
3663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3664 echo "configure:3665: checking for $ac_word" >&5
3665 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668 if test -n "$AR"; then
3669 ac_cv_prog_AR="$AR" # Let the user override the test.
3670 else
3671 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3672 ac_dummy="$PATH"
3673 for ac_dir in $ac_dummy; do
3674 test -z "$ac_dir" && ac_dir=.
3675 if test -f $ac_dir/$ac_word; then
3676 ac_cv_prog_AR="${ac_tool_prefix}ar"
3677 break
3678 fi
3679 done
3680 IFS="$ac_save_ifs"
3681 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3682 fi
3683 fi
3684 AR="$ac_cv_prog_AR"
3685 if test -n "$AR"; then
3686 echo "$ac_t""$AR" 1>&6
3687 else
3688 echo "$ac_t""no" 1>&6
3689 fi
3690
3691
3692
3693 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3694 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3695 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3696 echo "configure:3697: checking for $ac_word" >&5
3697 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3698 echo $ac_n "(cached) $ac_c" 1>&6
3699 else
3700 if test -n "$DLLTOOL"; then
3701 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3702 else
3703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3704 ac_dummy="$PATH"
3705 for ac_dir in $ac_dummy; do
3706 test -z "$ac_dir" && ac_dir=.
3707 if test -f $ac_dir/$ac_word; then
3708 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3709 break
3710 fi
3711 done
3712 IFS="$ac_save_ifs"
3713 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3714 fi
3715 fi
3716 DLLTOOL="$ac_cv_prog_DLLTOOL"
3717 if test -n "$DLLTOOL"; then
3718 echo "$ac_t""$DLLTOOL" 1>&6
3719 else
3720 echo "$ac_t""no" 1>&6
3721 fi
3722
3723
3724
3725 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3726 set dummy ${ac_tool_prefix}windres; ac_word=$2
3727 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3728 echo "configure:3729: checking for $ac_word" >&5
3729 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3730 echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732 if test -n "$WINDRES"; then
3733 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3734 else
3735 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3736 ac_dummy="$PATH"
3737 for ac_dir in $ac_dummy; do
3738 test -z "$ac_dir" && ac_dir=.
3739 if test -f $ac_dir/$ac_word; then
3740 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3741 break
3742 fi
3743 done
3744 IFS="$ac_save_ifs"
3745 test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3746 fi
3747 fi
3748 WINDRES="$ac_cv_prog_WINDRES"
3749 if test -n "$WINDRES"; then
3750 echo "$ac_t""$WINDRES" 1>&6
3751 else
3752 echo "$ac_t""no" 1>&6
3753 fi
3754
3755
3756
3757
3758 # Needed for GNU/Hurd.
3759 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3760 set dummy ${ac_tool_prefix}mig; ac_word=$2
3761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3762 echo "configure:3763: checking for $ac_word" >&5
3763 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766 if test -n "$MIG"; then
3767 ac_cv_prog_MIG="$MIG" # Let the user override the test.
3768 else
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3770 ac_dummy="$PATH"
3771 for ac_dir in $ac_dummy; do
3772 test -z "$ac_dir" && ac_dir=.
3773 if test -f $ac_dir/$ac_word; then
3774 ac_cv_prog_MIG="${ac_tool_prefix}mig"
3775 break
3776 fi
3777 done
3778 IFS="$ac_save_ifs"
3779 test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3780 fi
3781 fi
3782 MIG="$ac_cv_prog_MIG"
3783 if test -n "$MIG"; then
3784 echo "$ac_t""$MIG" 1>&6
3785 else
3786 echo "$ac_t""no" 1>&6
3787 fi
3788
3789
3790
3791
3792 # ---------------------- #
3793 # Checks for libraries. #
3794 # ---------------------- #
3795
3796 # We might need to link with -lm; most simulators need it.
3797 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3798 echo "configure:3799: checking for main in -lm" >&5
3799 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803 ac_save_LIBS="$LIBS"
3804 LIBS="-lm $LIBS"
3805 cat > conftest.$ac_ext <<EOF
3806 #line 3807 "configure"
3807 #include "confdefs.h"
3808
3809 int main() {
3810 main()
3811 ; return 0; }
3812 EOF
3813 if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3814 rm -rf conftest*
3815 eval "ac_cv_lib_$ac_lib_var=yes"
3816 else
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 rm -rf conftest*
3820 eval "ac_cv_lib_$ac_lib_var=no"
3821 fi
3822 rm -f conftest*
3823 LIBS="$ac_save_LIBS"
3824
3825 fi
3826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3829 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3830 cat >> confdefs.h <<EOF
3831 #define $ac_tr_lib 1
3832 EOF
3833
3834 LIBS="-lm $LIBS"
3835
3836 else
3837 echo "$ac_t""no" 1>&6
3838 fi
3839
3840
3841 # We need to link with -lw to get `wctype' on Solaris before Solaris
3842 # 2.6. Solaris 2.6 and beyond have this function in libc, and have a
3843 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3844 # is known to have this problem). Therefore we avoid libw if we can.
3845 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3846 echo "configure:3847: checking for wctype" >&5
3847 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3848 echo $ac_n "(cached) $ac_c" 1>&6
3849 else
3850 cat > conftest.$ac_ext <<EOF
3851 #line 3852 "configure"
3852 #include "confdefs.h"
3853 /* System header to define __stub macros and hopefully few prototypes,
3854 which can conflict with char wctype(); below. */
3855 #include <assert.h>
3856 /* Override any gcc2 internal prototype to avoid an error. */
3857 /* We use char because int might match the return type of a gcc2
3858 builtin and then its argument prototype would still apply. */
3859 char wctype();
3860
3861 int main() {
3862
3863 /* The GNU C library defines this for functions which it implements
3864 to always fail with ENOSYS. Some functions are actually named
3865 something starting with __ and the normal name is an alias. */
3866 #if defined (__stub_wctype) || defined (__stub___wctype)
3867 choke me
3868 #else
3869 wctype();
3870 #endif
3871
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3875 rm -rf conftest*
3876 eval "ac_cv_func_wctype=yes"
3877 else
3878 echo "configure: failed program was:" >&5
3879 cat conftest.$ac_ext >&5
3880 rm -rf conftest*
3881 eval "ac_cv_func_wctype=no"
3882 fi
3883 rm -f conftest*
3884 fi
3885
3886 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3887 echo "$ac_t""yes" 1>&6
3888 :
3889 else
3890 echo "$ac_t""no" 1>&6
3891 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3892 echo "configure:3893: checking for wctype in -lw" >&5
3893 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3894 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3895 echo $ac_n "(cached) $ac_c" 1>&6
3896 else
3897 ac_save_LIBS="$LIBS"
3898 LIBS="-lw $LIBS"
3899 cat > conftest.$ac_ext <<EOF
3900 #line 3901 "configure"
3901 #include "confdefs.h"
3902 /* Override any gcc2 internal prototype to avoid an error. */
3903 /* We use char because int might match the return type of a gcc2
3904 builtin and then its argument prototype would still apply. */
3905 char wctype();
3906
3907 int main() {
3908 wctype()
3909 ; return 0; }
3910 EOF
3911 if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3912 rm -rf conftest*
3913 eval "ac_cv_lib_$ac_lib_var=yes"
3914 else
3915 echo "configure: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 rm -rf conftest*
3918 eval "ac_cv_lib_$ac_lib_var=no"
3919 fi
3920 rm -f conftest*
3921 LIBS="$ac_save_LIBS"
3922
3923 fi
3924 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3925 echo "$ac_t""yes" 1>&6
3926 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3927 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3928 cat >> confdefs.h <<EOF
3929 #define $ac_tr_lib 1
3930 EOF
3931
3932 LIBS="-lw $LIBS"
3933
3934 else
3935 echo "$ac_t""no" 1>&6
3936 fi
3937
3938 fi
3939
3940
3941 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
3942
3943 echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
3944 echo "configure:3945: checking for library containing gethostbyname" >&5
3945 if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
3946 echo $ac_n "(cached) $ac_c" 1>&6
3947 else
3948 ac_func_search_save_LIBS="$LIBS"
3949 ac_cv_search_gethostbyname="no"
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* Override any gcc2 internal prototype to avoid an error. */
3954 /* We use char because int might match the return type of a gcc2
3955 builtin and then its argument prototype would still apply. */
3956 char gethostbyname();
3957
3958 int main() {
3959 gethostbyname()
3960 ; return 0; }
3961 EOF
3962 if { (eval echo configure:3963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3963 rm -rf conftest*
3964 ac_cv_search_gethostbyname="none required"
3965 else
3966 echo "configure: failed program was:" >&5
3967 cat conftest.$ac_ext >&5
3968 fi
3969 rm -f conftest*
3970 test "$ac_cv_search_gethostbyname" = "no" && for i in nsl; do
3971 LIBS="-l$i $ac_func_search_save_LIBS"
3972 cat > conftest.$ac_ext <<EOF
3973 #line 3974 "configure"
3974 #include "confdefs.h"
3975 /* Override any gcc2 internal prototype to avoid an error. */
3976 /* We use char because int might match the return type of a gcc2
3977 builtin and then its argument prototype would still apply. */
3978 char gethostbyname();
3979
3980 int main() {
3981 gethostbyname()
3982 ; return 0; }
3983 EOF
3984 if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3985 rm -rf conftest*
3986 ac_cv_search_gethostbyname="-l$i"
3987 break
3988 else
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3991 fi
3992 rm -f conftest*
3993 done
3994 LIBS="$ac_func_search_save_LIBS"
3995 fi
3996
3997 echo "$ac_t""$ac_cv_search_gethostbyname" 1>&6
3998 if test "$ac_cv_search_gethostbyname" != "no"; then
3999 test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS"
4000
4001 else :
4002
4003 fi
4004
4005 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
4006
4007 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
4008 echo "configure:4009: checking for library containing socketpair" >&5
4009 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
4010 echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012 ac_func_search_save_LIBS="$LIBS"
4013 ac_cv_search_socketpair="no"
4014 cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 /* Override any gcc2 internal prototype to avoid an error. */
4018 /* We use char because int might match the return type of a gcc2
4019 builtin and then its argument prototype would still apply. */
4020 char socketpair();
4021
4022 int main() {
4023 socketpair()
4024 ; return 0; }
4025 EOF
4026 if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4027 rm -rf conftest*
4028 ac_cv_search_socketpair="none required"
4029 else
4030 echo "configure: failed program was:" >&5
4031 cat conftest.$ac_ext >&5
4032 fi
4033 rm -f conftest*
4034 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
4035 LIBS="-l$i $ac_func_search_save_LIBS"
4036 cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4039 /* Override any gcc2 internal prototype to avoid an error. */
4040 /* We use char because int might match the return type of a gcc2
4041 builtin and then its argument prototype would still apply. */
4042 char socketpair();
4043
4044 int main() {
4045 socketpair()
4046 ; return 0; }
4047 EOF
4048 if { (eval echo configure:4049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4049 rm -rf conftest*
4050 ac_cv_search_socketpair="-l$i"
4051 break
4052 else
4053 echo "configure: failed program was:" >&5
4054 cat conftest.$ac_ext >&5
4055 fi
4056 rm -f conftest*
4057 done
4058 LIBS="$ac_func_search_save_LIBS"
4059 fi
4060
4061 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
4062 if test "$ac_cv_search_socketpair" != "no"; then
4063 test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
4064
4065 else :
4066
4067 fi
4068
4069 # Since GDB uses Readline, we need termcap functionality, so we need
4070 # to find a library that provides that. When GDB is configured with
4071 # the TUI, we need full curses functionality.
4072
4073 case $host_os in
4074 cygwin*)
4075 if test -d $srcdir/libtermcap; then
4076 LIBS="../libtermcap/libtermcap.a $LIBS"
4077 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
4078 fi ;;
4079 go32* | *djgpp*)
4080 ac_cv_search_tgetent="none required"
4081 ;;
4082 aix*)
4083 # Readline prefers curses over termcap on AIX.
4084 # ??? Why?
4085
4086 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4087 echo "configure:4088: checking for library containing tgetent" >&5
4088 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4089 echo $ac_n "(cached) $ac_c" 1>&6
4090 else
4091 ac_func_search_save_LIBS="$LIBS"
4092 ac_cv_search_tgetent="no"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 /* Override any gcc2 internal prototype to avoid an error. */
4097 /* We use char because int might match the return type of a gcc2
4098 builtin and then its argument prototype would still apply. */
4099 char tgetent();
4100
4101 int main() {
4102 tgetent()
4103 ; return 0; }
4104 EOF
4105 if { (eval echo configure:4106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4106 rm -rf conftest*
4107 ac_cv_search_tgetent="none required"
4108 else
4109 echo "configure: failed program was:" >&5
4110 cat conftest.$ac_ext >&5
4111 fi
4112 rm -f conftest*
4113 test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
4114 LIBS="-l$i $ac_func_search_save_LIBS"
4115 cat > conftest.$ac_ext <<EOF
4116 #line 4117 "configure"
4117 #include "confdefs.h"
4118 /* Override any gcc2 internal prototype to avoid an error. */
4119 /* We use char because int might match the return type of a gcc2
4120 builtin and then its argument prototype would still apply. */
4121 char tgetent();
4122
4123 int main() {
4124 tgetent()
4125 ; return 0; }
4126 EOF
4127 if { (eval echo configure:4128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4128 rm -rf conftest*
4129 ac_cv_search_tgetent="-l$i"
4130 break
4131 else
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4134 fi
4135 rm -f conftest*
4136 done
4137 LIBS="$ac_func_search_save_LIBS"
4138 fi
4139
4140 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4141 if test "$ac_cv_search_tgetent" != "no"; then
4142 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4143
4144 else :
4145
4146 fi
4147 ;;
4148 esac
4149
4150 # Note: We used to check for libtermlib and libterminfo too, but
4151 # Readline doesn't, so I think we're safe with leaving them out.
4152
4153 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
4154 echo "configure:4155: checking for library containing tgetent" >&5
4155 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
4156 echo $ac_n "(cached) $ac_c" 1>&6
4157 else
4158 ac_func_search_save_LIBS="$LIBS"
4159 ac_cv_search_tgetent="no"
4160 cat > conftest.$ac_ext <<EOF
4161 #line 4162 "configure"
4162 #include "confdefs.h"
4163 /* Override any gcc2 internal prototype to avoid an error. */
4164 /* We use char because int might match the return type of a gcc2
4165 builtin and then its argument prototype would still apply. */
4166 char tgetent();
4167
4168 int main() {
4169 tgetent()
4170 ; return 0; }
4171 EOF
4172 if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4173 rm -rf conftest*
4174 ac_cv_search_tgetent="none required"
4175 else
4176 echo "configure: failed program was:" >&5
4177 cat conftest.$ac_ext >&5
4178 fi
4179 rm -f conftest*
4180 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
4181 LIBS="-l$i $ac_func_search_save_LIBS"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 /* Override any gcc2 internal prototype to avoid an error. */
4186 /* We use char because int might match the return type of a gcc2
4187 builtin and then its argument prototype would still apply. */
4188 char tgetent();
4189
4190 int main() {
4191 tgetent()
4192 ; return 0; }
4193 EOF
4194 if { (eval echo configure:4195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4195 rm -rf conftest*
4196 ac_cv_search_tgetent="-l$i"
4197 break
4198 else
4199 echo "configure: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
4201 fi
4202 rm -f conftest*
4203 done
4204 LIBS="$ac_func_search_save_LIBS"
4205 fi
4206
4207 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
4208 if test "$ac_cv_search_tgetent" != "no"; then
4209 test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
4210
4211 else :
4212
4213 fi
4214
4215 if test "$ac_cv_search_tgetent" = no; then
4216 { echo "configure: error: no termcap library found" 1>&2; exit 1; }
4217 fi
4218
4219 # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
4220 # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
4221 # Makefile fragments. That's why we need to have `Hcurses' before
4222 # `curses'. I don't see why we should use HP curses if a more
4223 # standard curses is available, except that according to HP's
4224 # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
4225 # HP-UX 10.10 and 10.20.
4226
4227 # FIXME: ncurses does not work on native alphaev68-dec-osf5.1,
4228 # and probably other platforms. AC_SEARCH_LIBS finds the library
4229 # in a place such as /usr/local/lib/libncurses.a, but does not
4230 # do anything to look for the matching include files.
4231 # -- chastain 2004-05-01
4232
4233
4234 echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
4235 echo "configure:4236: checking for library containing initscr" >&5
4236 if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
4237 echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239 ac_func_search_save_LIBS="$LIBS"
4240 ac_cv_search_initscr="no"
4241 cat > conftest.$ac_ext <<EOF
4242 #line 4243 "configure"
4243 #include "confdefs.h"
4244 /* Override any gcc2 internal prototype to avoid an error. */
4245 /* We use char because int might match the return type of a gcc2
4246 builtin and then its argument prototype would still apply. */
4247 char initscr();
4248
4249 int main() {
4250 initscr()
4251 ; return 0; }
4252 EOF
4253 if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4254 rm -rf conftest*
4255 ac_cv_search_initscr="none required"
4256 else
4257 echo "configure: failed program was:" >&5
4258 cat conftest.$ac_ext >&5
4259 fi
4260 rm -f conftest*
4261 test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses cursesX curses pdcurses; do
4262 LIBS="-l$i $ac_func_search_save_LIBS"
4263 cat > conftest.$ac_ext <<EOF
4264 #line 4265 "configure"
4265 #include "confdefs.h"
4266 /* Override any gcc2 internal prototype to avoid an error. */
4267 /* We use char because int might match the return type of a gcc2
4268 builtin and then its argument prototype would still apply. */
4269 char initscr();
4270
4271 int main() {
4272 initscr()
4273 ; return 0; }
4274 EOF
4275 if { (eval echo configure:4276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276 rm -rf conftest*
4277 ac_cv_search_initscr="-l$i"
4278 break
4279 else
4280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4282 fi
4283 rm -f conftest*
4284 done
4285 LIBS="$ac_func_search_save_LIBS"
4286 fi
4287
4288 echo "$ac_t""$ac_cv_search_initscr" 1>&6
4289 if test "$ac_cv_search_initscr" != "no"; then
4290 test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
4291
4292 else :
4293 echo "configure: warning: no curses library found" 1>&2
4294 fi
4295
4296 # Check whether the wborder function is provided by the curses
4297 # library detected above. In certain implementations such as
4298 # the HP/UX Hcurses for instance, this function is provided by an
4299 # additional library. So if we did not find this function inside
4300 # the curses library, try some alternate libraries we know might
4301 # provide it.
4302
4303 echo $ac_n "checking for library containing wborder""... $ac_c" 1>&6
4304 echo "configure:4305: checking for library containing wborder" >&5
4305 if eval "test \"`echo '$''{'ac_cv_search_wborder'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308 ac_func_search_save_LIBS="$LIBS"
4309 ac_cv_search_wborder="no"
4310 cat > conftest.$ac_ext <<EOF
4311 #line 4312 "configure"
4312 #include "confdefs.h"
4313 /* Override any gcc2 internal prototype to avoid an error. */
4314 /* We use char because int might match the return type of a gcc2
4315 builtin and then its argument prototype would still apply. */
4316 char wborder();
4317
4318 int main() {
4319 wborder()
4320 ; return 0; }
4321 EOF
4322 if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4323 rm -rf conftest*
4324 ac_cv_search_wborder="none required"
4325 else
4326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 fi
4329 rm -f conftest*
4330 test "$ac_cv_search_wborder" = "no" && for i in cur_colr; do
4331 LIBS="-l$i $ac_func_search_save_LIBS"
4332 cat > conftest.$ac_ext <<EOF
4333 #line 4334 "configure"
4334 #include "confdefs.h"
4335 /* Override any gcc2 internal prototype to avoid an error. */
4336 /* We use char because int might match the return type of a gcc2
4337 builtin and then its argument prototype would still apply. */
4338 char wborder();
4339
4340 int main() {
4341 wborder()
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4345 rm -rf conftest*
4346 ac_cv_search_wborder="-l$i"
4347 break
4348 else
4349 echo "configure: failed program was:" >&5
4350 cat conftest.$ac_ext >&5
4351 fi
4352 rm -f conftest*
4353 done
4354 LIBS="$ac_func_search_save_LIBS"
4355 fi
4356
4357 echo "$ac_t""$ac_cv_search_wborder" 1>&6
4358 if test "$ac_cv_search_wborder" != "no"; then
4359 test "$ac_cv_search_wborder" = "none required" || LIBS="$ac_cv_search_wborder $LIBS"
4360
4361 else :
4362 echo "configure: warning: wborder function not found, tui will be disabled" 1>&2
4363 fi
4364
4365 # ------------------------- #
4366 # Checks for header files. #
4367 # ------------------------- #
4368
4369 ac_header_dirent=no
4370 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4371 do
4372 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4373 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4374 echo "configure:4375: checking for $ac_hdr that defines DIR" >&5
4375 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378 cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 #include <sys/types.h>
4382 #include <$ac_hdr>
4383 int main() {
4384 DIR *dirp = 0;
4385 ; return 0; }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4388 rm -rf conftest*
4389 eval "ac_cv_header_dirent_$ac_safe=yes"
4390 else
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 eval "ac_cv_header_dirent_$ac_safe=no"
4395 fi
4396 rm -f conftest*
4397 fi
4398 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4399 echo "$ac_t""yes" 1>&6
4400 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4401 cat >> confdefs.h <<EOF
4402 #define $ac_tr_hdr 1
4403 EOF
4404 ac_header_dirent=$ac_hdr; break
4405 else
4406 echo "$ac_t""no" 1>&6
4407 fi
4408 done
4409 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4410 if test $ac_header_dirent = dirent.h; then
4411 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4412 echo "configure:4413: checking for opendir in -ldir" >&5
4413 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4414 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4415 echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417 ac_save_LIBS="$LIBS"
4418 LIBS="-ldir $LIBS"
4419 cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 /* Override any gcc2 internal prototype to avoid an error. */
4423 /* We use char because int might match the return type of a gcc2
4424 builtin and then its argument prototype would still apply. */
4425 char opendir();
4426
4427 int main() {
4428 opendir()
4429 ; return 0; }
4430 EOF
4431 if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4432 rm -rf conftest*
4433 eval "ac_cv_lib_$ac_lib_var=yes"
4434 else
4435 echo "configure: failed program was:" >&5
4436 cat conftest.$ac_ext >&5
4437 rm -rf conftest*
4438 eval "ac_cv_lib_$ac_lib_var=no"
4439 fi
4440 rm -f conftest*
4441 LIBS="$ac_save_LIBS"
4442
4443 fi
4444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4445 echo "$ac_t""yes" 1>&6
4446 LIBS="$LIBS -ldir"
4447 else
4448 echo "$ac_t""no" 1>&6
4449 fi
4450
4451 else
4452 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4453 echo "configure:4454: checking for opendir in -lx" >&5
4454 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4455 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4456 echo $ac_n "(cached) $ac_c" 1>&6
4457 else
4458 ac_save_LIBS="$LIBS"
4459 LIBS="-lx $LIBS"
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 /* Override any gcc2 internal prototype to avoid an error. */
4464 /* We use char because int might match the return type of a gcc2
4465 builtin and then its argument prototype would still apply. */
4466 char opendir();
4467
4468 int main() {
4469 opendir()
4470 ; return 0; }
4471 EOF
4472 if { (eval echo configure:4473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4473 rm -rf conftest*
4474 eval "ac_cv_lib_$ac_lib_var=yes"
4475 else
4476 echo "configure: failed program was:" >&5
4477 cat conftest.$ac_ext >&5
4478 rm -rf conftest*
4479 eval "ac_cv_lib_$ac_lib_var=no"
4480 fi
4481 rm -f conftest*
4482 LIBS="$ac_save_LIBS"
4483
4484 fi
4485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4486 echo "$ac_t""yes" 1>&6
4487 LIBS="$LIBS -lx"
4488 else
4489 echo "$ac_t""no" 1>&6
4490 fi
4491
4492 fi
4493
4494 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
4495 echo "configure:4496: checking whether stat file-mode macros are broken" >&5
4496 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
4497 echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 #include <sys/types.h>
4503 #include <sys/stat.h>
4504
4505 #if defined(S_ISBLK) && defined(S_IFDIR)
4506 # if S_ISBLK (S_IFDIR)
4507 You lose.
4508 # endif
4509 #endif
4510
4511 #if defined(S_ISBLK) && defined(S_IFCHR)
4512 # if S_ISBLK (S_IFCHR)
4513 You lose.
4514 # endif
4515 #endif
4516
4517 #if defined(S_ISLNK) && defined(S_IFREG)
4518 # if S_ISLNK (S_IFREG)
4519 You lose.
4520 # endif
4521 #endif
4522
4523 #if defined(S_ISSOCK) && defined(S_IFREG)
4524 # if S_ISSOCK (S_IFREG)
4525 You lose.
4526 # endif
4527 #endif
4528
4529 EOF
4530 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4531 egrep "You lose" >/dev/null 2>&1; then
4532 rm -rf conftest*
4533 ac_cv_header_stat_broken=yes
4534 else
4535 rm -rf conftest*
4536 ac_cv_header_stat_broken=no
4537 fi
4538 rm -f conftest*
4539
4540 fi
4541
4542 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
4543 if test $ac_cv_header_stat_broken = yes; then
4544 cat >> confdefs.h <<\EOF
4545 #define STAT_MACROS_BROKEN 1
4546 EOF
4547
4548 fi
4549
4550 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4551 echo "configure:4552: checking for ANSI C header files" >&5
4552 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4553 echo $ac_n "(cached) $ac_c" 1>&6
4554 else
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <stdlib.h>
4559 #include <stdarg.h>
4560 #include <string.h>
4561 #include <float.h>
4562 EOF
4563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4564 { (eval echo configure:4565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4566 if test -z "$ac_err"; then
4567 rm -rf conftest*
4568 ac_cv_header_stdc=yes
4569 else
4570 echo "$ac_err" >&5
4571 echo "configure: failed program was:" >&5
4572 cat conftest.$ac_ext >&5
4573 rm -rf conftest*
4574 ac_cv_header_stdc=no
4575 fi
4576 rm -f conftest*
4577
4578 if test $ac_cv_header_stdc = yes; then
4579 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4580 cat > conftest.$ac_ext <<EOF
4581 #line 4582 "configure"
4582 #include "confdefs.h"
4583 #include <string.h>
4584 EOF
4585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4586 egrep "memchr" >/dev/null 2>&1; then
4587 :
4588 else
4589 rm -rf conftest*
4590 ac_cv_header_stdc=no
4591 fi
4592 rm -f conftest*
4593
4594 fi
4595
4596 if test $ac_cv_header_stdc = yes; then
4597 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 #include <stdlib.h>
4602 EOF
4603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4604 egrep "free" >/dev/null 2>&1; then
4605 :
4606 else
4607 rm -rf conftest*
4608 ac_cv_header_stdc=no
4609 fi
4610 rm -f conftest*
4611
4612 fi
4613
4614 if test $ac_cv_header_stdc = yes; then
4615 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4616 if test "$cross_compiling" = yes; then
4617 :
4618 else
4619 cat > conftest.$ac_ext <<EOF
4620 #line 4621 "configure"
4621 #include "confdefs.h"
4622 #include <ctype.h>
4623 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4624 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4625 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4626 int main () { int i; for (i = 0; i < 256; i++)
4627 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4628 exit (0); }
4629
4630 EOF
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4632 then
4633 :
4634 else
4635 echo "configure: failed program was:" >&5
4636 cat conftest.$ac_ext >&5
4637 rm -fr conftest*
4638 ac_cv_header_stdc=no
4639 fi
4640 rm -fr conftest*
4641 fi
4642
4643 fi
4644 fi
4645
4646 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4647 if test $ac_cv_header_stdc = yes; then
4648 cat >> confdefs.h <<\EOF
4649 #define STDC_HEADERS 1
4650 EOF
4651
4652 fi
4653
4654 for ac_hdr in link.h
4655 do
4656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4658 echo "configure:4659: checking for $ac_hdr" >&5
4659 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4660 echo $ac_n "(cached) $ac_c" 1>&6
4661 else
4662 cat > conftest.$ac_ext <<EOF
4663 #line 4664 "configure"
4664 #include "confdefs.h"
4665 #include <$ac_hdr>
4666 EOF
4667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4668 { (eval echo configure:4669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4670 if test -z "$ac_err"; then
4671 rm -rf conftest*
4672 eval "ac_cv_header_$ac_safe=yes"
4673 else
4674 echo "$ac_err" >&5
4675 echo "configure: failed program was:" >&5
4676 cat conftest.$ac_ext >&5
4677 rm -rf conftest*
4678 eval "ac_cv_header_$ac_safe=no"
4679 fi
4680 rm -f conftest*
4681 fi
4682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4683 echo "$ac_t""yes" 1>&6
4684 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4685 cat >> confdefs.h <<EOF
4686 #define $ac_tr_hdr 1
4687 EOF
4688
4689 else
4690 echo "$ac_t""no" 1>&6
4691 fi
4692 done
4693
4694 for ac_hdr in machine/reg.h
4695 do
4696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4698 echo "configure:4699: checking for $ac_hdr" >&5
4699 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4700 echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702 cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 #include <$ac_hdr>
4706 EOF
4707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4708 { (eval echo configure:4709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4710 if test -z "$ac_err"; then
4711 rm -rf conftest*
4712 eval "ac_cv_header_$ac_safe=yes"
4713 else
4714 echo "$ac_err" >&5
4715 echo "configure: failed program was:" >&5
4716 cat conftest.$ac_ext >&5
4717 rm -rf conftest*
4718 eval "ac_cv_header_$ac_safe=no"
4719 fi
4720 rm -f conftest*
4721 fi
4722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4723 echo "$ac_t""yes" 1>&6
4724 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4725 cat >> confdefs.h <<EOF
4726 #define $ac_tr_hdr 1
4727 EOF
4728
4729 else
4730 echo "$ac_t""no" 1>&6
4731 fi
4732 done
4733
4734 for ac_hdr in nlist.h
4735 do
4736 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4737 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4738 echo "configure:4739: checking for $ac_hdr" >&5
4739 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4740 echo $ac_n "(cached) $ac_c" 1>&6
4741 else
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <$ac_hdr>
4746 EOF
4747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4748 { (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750 if test -z "$ac_err"; then
4751 rm -rf conftest*
4752 eval "ac_cv_header_$ac_safe=yes"
4753 else
4754 echo "$ac_err" >&5
4755 echo "configure: failed program was:" >&5
4756 cat conftest.$ac_ext >&5
4757 rm -rf conftest*
4758 eval "ac_cv_header_$ac_safe=no"
4759 fi
4760 rm -f conftest*
4761 fi
4762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4763 echo "$ac_t""yes" 1>&6
4764 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4765 cat >> confdefs.h <<EOF
4766 #define $ac_tr_hdr 1
4767 EOF
4768
4769 else
4770 echo "$ac_t""no" 1>&6
4771 fi
4772 done
4773
4774 for ac_hdr in poll.h sys/poll.h
4775 do
4776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4778 echo "configure:4779: checking for $ac_hdr" >&5
4779 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4780 echo $ac_n "(cached) $ac_c" 1>&6
4781 else
4782 cat > conftest.$ac_ext <<EOF
4783 #line 4784 "configure"
4784 #include "confdefs.h"
4785 #include <$ac_hdr>
4786 EOF
4787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4788 { (eval echo configure:4789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4790 if test -z "$ac_err"; then
4791 rm -rf conftest*
4792 eval "ac_cv_header_$ac_safe=yes"
4793 else
4794 echo "$ac_err" >&5
4795 echo "configure: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 rm -rf conftest*
4798 eval "ac_cv_header_$ac_safe=no"
4799 fi
4800 rm -f conftest*
4801 fi
4802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4803 echo "$ac_t""yes" 1>&6
4804 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4805 cat >> confdefs.h <<EOF
4806 #define $ac_tr_hdr 1
4807 EOF
4808
4809 else
4810 echo "$ac_t""no" 1>&6
4811 fi
4812 done
4813
4814 for ac_hdr in proc_service.h thread_db.h gnu/libc-version.h
4815 do
4816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4818 echo "configure:4819: checking for $ac_hdr" >&5
4819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4820 echo $ac_n "(cached) $ac_c" 1>&6
4821 else
4822 cat > conftest.$ac_ext <<EOF
4823 #line 4824 "configure"
4824 #include "confdefs.h"
4825 #include <$ac_hdr>
4826 EOF
4827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4828 { (eval echo configure:4829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4830 if test -z "$ac_err"; then
4831 rm -rf conftest*
4832 eval "ac_cv_header_$ac_safe=yes"
4833 else
4834 echo "$ac_err" >&5
4835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
4837 rm -rf conftest*
4838 eval "ac_cv_header_$ac_safe=no"
4839 fi
4840 rm -f conftest*
4841 fi
4842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4843 echo "$ac_t""yes" 1>&6
4844 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4845 cat >> confdefs.h <<EOF
4846 #define $ac_tr_hdr 1
4847 EOF
4848
4849 else
4850 echo "$ac_t""no" 1>&6
4851 fi
4852 done
4853
4854 for ac_hdr in stddef.h
4855 do
4856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4858 echo "configure:4859: checking for $ac_hdr" >&5
4859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4860 echo $ac_n "(cached) $ac_c" 1>&6
4861 else
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 #include <$ac_hdr>
4866 EOF
4867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4868 { (eval echo configure:4869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4870 if test -z "$ac_err"; then
4871 rm -rf conftest*
4872 eval "ac_cv_header_$ac_safe=yes"
4873 else
4874 echo "$ac_err" >&5
4875 echo "configure: failed program was:" >&5
4876 cat conftest.$ac_ext >&5
4877 rm -rf conftest*
4878 eval "ac_cv_header_$ac_safe=no"
4879 fi
4880 rm -f conftest*
4881 fi
4882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4883 echo "$ac_t""yes" 1>&6
4884 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4885 cat >> confdefs.h <<EOF
4886 #define $ac_tr_hdr 1
4887 EOF
4888
4889 else
4890 echo "$ac_t""no" 1>&6
4891 fi
4892 done
4893
4894 for ac_hdr in stdlib.h
4895 do
4896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4898 echo "configure:4899: checking for $ac_hdr" >&5
4899 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4900 echo $ac_n "(cached) $ac_c" 1>&6
4901 else
4902 cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905 #include <$ac_hdr>
4906 EOF
4907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4908 { (eval echo configure:4909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4910 if test -z "$ac_err"; then
4911 rm -rf conftest*
4912 eval "ac_cv_header_$ac_safe=yes"
4913 else
4914 echo "$ac_err" >&5
4915 echo "configure: failed program was:" >&5
4916 cat conftest.$ac_ext >&5
4917 rm -rf conftest*
4918 eval "ac_cv_header_$ac_safe=no"
4919 fi
4920 rm -f conftest*
4921 fi
4922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4923 echo "$ac_t""yes" 1>&6
4924 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4925 cat >> confdefs.h <<EOF
4926 #define $ac_tr_hdr 1
4927 EOF
4928
4929 else
4930 echo "$ac_t""no" 1>&6
4931 fi
4932 done
4933
4934 for ac_hdr in stdint.h
4935 do
4936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4938 echo "configure:4939: checking for $ac_hdr" >&5
4939 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4940 echo $ac_n "(cached) $ac_c" 1>&6
4941 else
4942 cat > conftest.$ac_ext <<EOF
4943 #line 4944 "configure"
4944 #include "confdefs.h"
4945 #include <$ac_hdr>
4946 EOF
4947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4948 { (eval echo configure:4949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4950 if test -z "$ac_err"; then
4951 rm -rf conftest*
4952 eval "ac_cv_header_$ac_safe=yes"
4953 else
4954 echo "$ac_err" >&5
4955 echo "configure: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 rm -rf conftest*
4958 eval "ac_cv_header_$ac_safe=no"
4959 fi
4960 rm -f conftest*
4961 fi
4962 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4963 echo "$ac_t""yes" 1>&6
4964 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4965 cat >> confdefs.h <<EOF
4966 #define $ac_tr_hdr 1
4967 EOF
4968
4969 else
4970 echo "$ac_t""no" 1>&6
4971 fi
4972 done
4973
4974 for ac_hdr in string.h memory.h strings.h
4975 do
4976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4978 echo "configure:4979: checking for $ac_hdr" >&5
4979 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4980 echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982 cat > conftest.$ac_ext <<EOF
4983 #line 4984 "configure"
4984 #include "confdefs.h"
4985 #include <$ac_hdr>
4986 EOF
4987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4988 { (eval echo configure:4989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4990 if test -z "$ac_err"; then
4991 rm -rf conftest*
4992 eval "ac_cv_header_$ac_safe=yes"
4993 else
4994 echo "$ac_err" >&5
4995 echo "configure: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 rm -rf conftest*
4998 eval "ac_cv_header_$ac_safe=no"
4999 fi
5000 rm -f conftest*
5001 fi
5002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5003 echo "$ac_t""yes" 1>&6
5004 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5005 cat >> confdefs.h <<EOF
5006 #define $ac_tr_hdr 1
5007 EOF
5008
5009 else
5010 echo "$ac_t""no" 1>&6
5011 fi
5012 done
5013
5014 for ac_hdr in sys/fault.h
5015 do
5016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5018 echo "configure:5019: checking for $ac_hdr" >&5
5019 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5020 echo $ac_n "(cached) $ac_c" 1>&6
5021 else
5022 cat > conftest.$ac_ext <<EOF
5023 #line 5024 "configure"
5024 #include "confdefs.h"
5025 #include <$ac_hdr>
5026 EOF
5027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5028 { (eval echo configure:5029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5030 if test -z "$ac_err"; then
5031 rm -rf conftest*
5032 eval "ac_cv_header_$ac_safe=yes"
5033 else
5034 echo "$ac_err" >&5
5035 echo "configure: failed program was:" >&5
5036 cat conftest.$ac_ext >&5
5037 rm -rf conftest*
5038 eval "ac_cv_header_$ac_safe=no"
5039 fi
5040 rm -f conftest*
5041 fi
5042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5043 echo "$ac_t""yes" 1>&6
5044 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5045 cat >> confdefs.h <<EOF
5046 #define $ac_tr_hdr 1
5047 EOF
5048
5049 else
5050 echo "$ac_t""no" 1>&6
5051 fi
5052 done
5053
5054 for ac_hdr in sys/file.h
5055 do
5056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5057 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5058 echo "configure:5059: checking for $ac_hdr" >&5
5059 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5060 echo $ac_n "(cached) $ac_c" 1>&6
5061 else
5062 cat > conftest.$ac_ext <<EOF
5063 #line 5064 "configure"
5064 #include "confdefs.h"
5065 #include <$ac_hdr>
5066 EOF
5067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5068 { (eval echo configure:5069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5070 if test -z "$ac_err"; then
5071 rm -rf conftest*
5072 eval "ac_cv_header_$ac_safe=yes"
5073 else
5074 echo "$ac_err" >&5
5075 echo "configure: failed program was:" >&5
5076 cat conftest.$ac_ext >&5
5077 rm -rf conftest*
5078 eval "ac_cv_header_$ac_safe=no"
5079 fi
5080 rm -f conftest*
5081 fi
5082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5083 echo "$ac_t""yes" 1>&6
5084 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5085 cat >> confdefs.h <<EOF
5086 #define $ac_tr_hdr 1
5087 EOF
5088
5089 else
5090 echo "$ac_t""no" 1>&6
5091 fi
5092 done
5093
5094 for ac_hdr in sys/filio.h
5095 do
5096 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5097 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5098 echo "configure:5099: checking for $ac_hdr" >&5
5099 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5100 echo $ac_n "(cached) $ac_c" 1>&6
5101 else
5102 cat > conftest.$ac_ext <<EOF
5103 #line 5104 "configure"
5104 #include "confdefs.h"
5105 #include <$ac_hdr>
5106 EOF
5107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5108 { (eval echo configure:5109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5110 if test -z "$ac_err"; then
5111 rm -rf conftest*
5112 eval "ac_cv_header_$ac_safe=yes"
5113 else
5114 echo "$ac_err" >&5
5115 echo "configure: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 rm -rf conftest*
5118 eval "ac_cv_header_$ac_safe=no"
5119 fi
5120 rm -f conftest*
5121 fi
5122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5123 echo "$ac_t""yes" 1>&6
5124 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5125 cat >> confdefs.h <<EOF
5126 #define $ac_tr_hdr 1
5127 EOF
5128
5129 else
5130 echo "$ac_t""no" 1>&6
5131 fi
5132 done
5133
5134 for ac_hdr in sys/ioctl.h
5135 do
5136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5138 echo "configure:5139: checking for $ac_hdr" >&5
5139 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5140 echo $ac_n "(cached) $ac_c" 1>&6
5141 else
5142 cat > conftest.$ac_ext <<EOF
5143 #line 5144 "configure"
5144 #include "confdefs.h"
5145 #include <$ac_hdr>
5146 EOF
5147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5148 { (eval echo configure:5149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5150 if test -z "$ac_err"; then
5151 rm -rf conftest*
5152 eval "ac_cv_header_$ac_safe=yes"
5153 else
5154 echo "$ac_err" >&5
5155 echo "configure: failed program was:" >&5
5156 cat conftest.$ac_ext >&5
5157 rm -rf conftest*
5158 eval "ac_cv_header_$ac_safe=no"
5159 fi
5160 rm -f conftest*
5161 fi
5162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5163 echo "$ac_t""yes" 1>&6
5164 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5165 cat >> confdefs.h <<EOF
5166 #define $ac_tr_hdr 1
5167 EOF
5168
5169 else
5170 echo "$ac_t""no" 1>&6
5171 fi
5172 done
5173
5174 for ac_hdr in sys/param.h
5175 do
5176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5178 echo "configure:5179: checking for $ac_hdr" >&5
5179 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5180 echo $ac_n "(cached) $ac_c" 1>&6
5181 else
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 #include <$ac_hdr>
5186 EOF
5187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5188 { (eval echo configure:5189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5190 if test -z "$ac_err"; then
5191 rm -rf conftest*
5192 eval "ac_cv_header_$ac_safe=yes"
5193 else
5194 echo "$ac_err" >&5
5195 echo "configure: failed program was:" >&5
5196 cat conftest.$ac_ext >&5
5197 rm -rf conftest*
5198 eval "ac_cv_header_$ac_safe=no"
5199 fi
5200 rm -f conftest*
5201 fi
5202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5203 echo "$ac_t""yes" 1>&6
5204 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5205 cat >> confdefs.h <<EOF
5206 #define $ac_tr_hdr 1
5207 EOF
5208
5209 else
5210 echo "$ac_t""no" 1>&6
5211 fi
5212 done
5213
5214 for ac_hdr in sys/proc.h
5215 do
5216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5218 echo "configure:5219: checking for $ac_hdr" >&5
5219 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5220 echo $ac_n "(cached) $ac_c" 1>&6
5221 else
5222 cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225 #include <$ac_hdr>
5226 EOF
5227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5228 { (eval echo configure:5229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5230 if test -z "$ac_err"; then
5231 rm -rf conftest*
5232 eval "ac_cv_header_$ac_safe=yes"
5233 else
5234 echo "$ac_err" >&5
5235 echo "configure: failed program was:" >&5
5236 cat conftest.$ac_ext >&5
5237 rm -rf conftest*
5238 eval "ac_cv_header_$ac_safe=no"
5239 fi
5240 rm -f conftest*
5241 fi
5242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5243 echo "$ac_t""yes" 1>&6
5244 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5245 cat >> confdefs.h <<EOF
5246 #define $ac_tr_hdr 1
5247 EOF
5248
5249 else
5250 echo "$ac_t""no" 1>&6
5251 fi
5252 done
5253
5254 for ac_hdr in sys/procfs.h
5255 do
5256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5258 echo "configure:5259: checking for $ac_hdr" >&5
5259 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5260 echo $ac_n "(cached) $ac_c" 1>&6
5261 else
5262 cat > conftest.$ac_ext <<EOF
5263 #line 5264 "configure"
5264 #include "confdefs.h"
5265 #include <$ac_hdr>
5266 EOF
5267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5268 { (eval echo configure:5269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5270 if test -z "$ac_err"; then
5271 rm -rf conftest*
5272 eval "ac_cv_header_$ac_safe=yes"
5273 else
5274 echo "$ac_err" >&5
5275 echo "configure: failed program was:" >&5
5276 cat conftest.$ac_ext >&5
5277 rm -rf conftest*
5278 eval "ac_cv_header_$ac_safe=no"
5279 fi
5280 rm -f conftest*
5281 fi
5282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5283 echo "$ac_t""yes" 1>&6
5284 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5285 cat >> confdefs.h <<EOF
5286 #define $ac_tr_hdr 1
5287 EOF
5288
5289 else
5290 echo "$ac_t""no" 1>&6
5291 fi
5292 done
5293
5294 for ac_hdr in sys/ptrace.h ptrace.h
5295 do
5296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5298 echo "configure:5299: checking for $ac_hdr" >&5
5299 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5300 echo $ac_n "(cached) $ac_c" 1>&6
5301 else
5302 cat > conftest.$ac_ext <<EOF
5303 #line 5304 "configure"
5304 #include "confdefs.h"
5305 #include <$ac_hdr>
5306 EOF
5307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5308 { (eval echo configure:5309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5310 if test -z "$ac_err"; then
5311 rm -rf conftest*
5312 eval "ac_cv_header_$ac_safe=yes"
5313 else
5314 echo "$ac_err" >&5
5315 echo "configure: failed program was:" >&5
5316 cat conftest.$ac_ext >&5
5317 rm -rf conftest*
5318 eval "ac_cv_header_$ac_safe=no"
5319 fi
5320 rm -f conftest*
5321 fi
5322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5323 echo "$ac_t""yes" 1>&6
5324 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5325 cat >> confdefs.h <<EOF
5326 #define $ac_tr_hdr 1
5327 EOF
5328
5329 else
5330 echo "$ac_t""no" 1>&6
5331 fi
5332 done
5333
5334 for ac_hdr in sys/reg.h sys/debugreg.h
5335 do
5336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5338 echo "configure:5339: checking for $ac_hdr" >&5
5339 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
5341 else
5342 cat > conftest.$ac_ext <<EOF
5343 #line 5344 "configure"
5344 #include "confdefs.h"
5345 #include <$ac_hdr>
5346 EOF
5347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5348 { (eval echo configure:5349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5350 if test -z "$ac_err"; then
5351 rm -rf conftest*
5352 eval "ac_cv_header_$ac_safe=yes"
5353 else
5354 echo "$ac_err" >&5
5355 echo "configure: failed program was:" >&5
5356 cat conftest.$ac_ext >&5
5357 rm -rf conftest*
5358 eval "ac_cv_header_$ac_safe=no"
5359 fi
5360 rm -f conftest*
5361 fi
5362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5363 echo "$ac_t""yes" 1>&6
5364 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5365 cat >> confdefs.h <<EOF
5366 #define $ac_tr_hdr 1
5367 EOF
5368
5369 else
5370 echo "$ac_t""no" 1>&6
5371 fi
5372 done
5373
5374 for ac_hdr in sys/select.h
5375 do
5376 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5377 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5378 echo "configure:5379: checking for $ac_hdr" >&5
5379 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5380 echo $ac_n "(cached) $ac_c" 1>&6
5381 else
5382 cat > conftest.$ac_ext <<EOF
5383 #line 5384 "configure"
5384 #include "confdefs.h"
5385 #include <$ac_hdr>
5386 EOF
5387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5388 { (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5389 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5390 if test -z "$ac_err"; then
5391 rm -rf conftest*
5392 eval "ac_cv_header_$ac_safe=yes"
5393 else
5394 echo "$ac_err" >&5
5395 echo "configure: failed program was:" >&5
5396 cat conftest.$ac_ext >&5
5397 rm -rf conftest*
5398 eval "ac_cv_header_$ac_safe=no"
5399 fi
5400 rm -f conftest*
5401 fi
5402 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5403 echo "$ac_t""yes" 1>&6
5404 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5405 cat >> confdefs.h <<EOF
5406 #define $ac_tr_hdr 1
5407 EOF
5408
5409 else
5410 echo "$ac_t""no" 1>&6
5411 fi
5412 done
5413
5414 for ac_hdr in sys/syscall.h
5415 do
5416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5418 echo "configure:5419: checking for $ac_hdr" >&5
5419 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5420 echo $ac_n "(cached) $ac_c" 1>&6
5421 else
5422 cat > conftest.$ac_ext <<EOF
5423 #line 5424 "configure"
5424 #include "confdefs.h"
5425 #include <$ac_hdr>
5426 EOF
5427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5428 { (eval echo configure:5429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5430 if test -z "$ac_err"; then
5431 rm -rf conftest*
5432 eval "ac_cv_header_$ac_safe=yes"
5433 else
5434 echo "$ac_err" >&5
5435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 rm -rf conftest*
5438 eval "ac_cv_header_$ac_safe=no"
5439 fi
5440 rm -f conftest*
5441 fi
5442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5443 echo "$ac_t""yes" 1>&6
5444 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5445 cat >> confdefs.h <<EOF
5446 #define $ac_tr_hdr 1
5447 EOF
5448
5449 else
5450 echo "$ac_t""no" 1>&6
5451 fi
5452 done
5453
5454 for ac_hdr in sys/user.h
5455 do
5456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5458 echo "configure:5459: checking for $ac_hdr" >&5
5459 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5460 echo $ac_n "(cached) $ac_c" 1>&6
5461 else
5462 cat > conftest.$ac_ext <<EOF
5463 #line 5464 "configure"
5464 #include "confdefs.h"
5465 #include <$ac_hdr>
5466 EOF
5467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5468 { (eval echo configure:5469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5470 if test -z "$ac_err"; then
5471 rm -rf conftest*
5472 eval "ac_cv_header_$ac_safe=yes"
5473 else
5474 echo "$ac_err" >&5
5475 echo "configure: failed program was:" >&5
5476 cat conftest.$ac_ext >&5
5477 rm -rf conftest*
5478 eval "ac_cv_header_$ac_safe=no"
5479 fi
5480 rm -f conftest*
5481 fi
5482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5483 echo "$ac_t""yes" 1>&6
5484 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5485 cat >> confdefs.h <<EOF
5486 #define $ac_tr_hdr 1
5487 EOF
5488
5489 else
5490 echo "$ac_t""no" 1>&6
5491 fi
5492 done
5493
5494 for ac_hdr in sys/wait.h wait.h
5495 do
5496 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5497 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5498 echo "configure:5499: checking for $ac_hdr" >&5
5499 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5500 echo $ac_n "(cached) $ac_c" 1>&6
5501 else
5502 cat > conftest.$ac_ext <<EOF
5503 #line 5504 "configure"
5504 #include "confdefs.h"
5505 #include <$ac_hdr>
5506 EOF
5507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5508 { (eval echo configure:5509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5510 if test -z "$ac_err"; then
5511 rm -rf conftest*
5512 eval "ac_cv_header_$ac_safe=yes"
5513 else
5514 echo "$ac_err" >&5
5515 echo "configure: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517 rm -rf conftest*
5518 eval "ac_cv_header_$ac_safe=no"
5519 fi
5520 rm -f conftest*
5521 fi
5522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5523 echo "$ac_t""yes" 1>&6
5524 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5525 cat >> confdefs.h <<EOF
5526 #define $ac_tr_hdr 1
5527 EOF
5528
5529 else
5530 echo "$ac_t""no" 1>&6
5531 fi
5532 done
5533
5534 for ac_hdr in termios.h termio.h sgtty.h
5535 do
5536 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5537 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5538 echo "configure:5539: checking for $ac_hdr" >&5
5539 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5540 echo $ac_n "(cached) $ac_c" 1>&6
5541 else
5542 cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 #include <$ac_hdr>
5546 EOF
5547 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5548 { (eval echo configure:5549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5549 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5550 if test -z "$ac_err"; then
5551 rm -rf conftest*
5552 eval "ac_cv_header_$ac_safe=yes"
5553 else
5554 echo "$ac_err" >&5
5555 echo "configure: failed program was:" >&5
5556 cat conftest.$ac_ext >&5
5557 rm -rf conftest*
5558 eval "ac_cv_header_$ac_safe=no"
5559 fi
5560 rm -f conftest*
5561 fi
5562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5563 echo "$ac_t""yes" 1>&6
5564 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5565 cat >> confdefs.h <<EOF
5566 #define $ac_tr_hdr 1
5567 EOF
5568
5569 else
5570 echo "$ac_t""no" 1>&6
5571 fi
5572 done
5573
5574 for ac_hdr in unistd.h
5575 do
5576 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5577 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5578 echo "configure:5579: checking for $ac_hdr" >&5
5579 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581 else
5582 cat > conftest.$ac_ext <<EOF
5583 #line 5584 "configure"
5584 #include "confdefs.h"
5585 #include <$ac_hdr>
5586 EOF
5587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5588 { (eval echo configure:5589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5589 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5590 if test -z "$ac_err"; then
5591 rm -rf conftest*
5592 eval "ac_cv_header_$ac_safe=yes"
5593 else
5594 echo "$ac_err" >&5
5595 echo "configure: failed program was:" >&5
5596 cat conftest.$ac_ext >&5
5597 rm -rf conftest*
5598 eval "ac_cv_header_$ac_safe=no"
5599 fi
5600 rm -f conftest*
5601 fi
5602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5603 echo "$ac_t""yes" 1>&6
5604 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5605 cat >> confdefs.h <<EOF
5606 #define $ac_tr_hdr 1
5607 EOF
5608
5609 else
5610 echo "$ac_t""no" 1>&6
5611 fi
5612 done
5613
5614
5615 # On Solaris 2.[789], we need to define _MSE_INT_H to avoid a clash
5616 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5617 # think that we don't have <curses.h> if we're using GCC.
5618 case $host_os in
5619 solaris2.[789])
5620 if test "$GCC" = yes; then
5621 cat >> confdefs.h <<\EOF
5622 #define _MSE_INT_H 1
5623 EOF
5624
5625 fi ;;
5626 esac
5627 for ac_hdr in curses.h cursesX.h ncurses.h term.h
5628 do
5629 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5630 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5631 echo "configure:5632: checking for $ac_hdr" >&5
5632 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5633 echo $ac_n "(cached) $ac_c" 1>&6
5634 else
5635 cat > conftest.$ac_ext <<EOF
5636 #line 5637 "configure"
5637 #include "confdefs.h"
5638 #include <$ac_hdr>
5639 EOF
5640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5641 { (eval echo configure:5642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5643 if test -z "$ac_err"; then
5644 rm -rf conftest*
5645 eval "ac_cv_header_$ac_safe=yes"
5646 else
5647 echo "$ac_err" >&5
5648 echo "configure: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
5650 rm -rf conftest*
5651 eval "ac_cv_header_$ac_safe=no"
5652 fi
5653 rm -f conftest*
5654 fi
5655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5656 echo "$ac_t""yes" 1>&6
5657 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5658 cat >> confdefs.h <<EOF
5659 #define $ac_tr_hdr 1
5660 EOF
5661
5662 else
5663 echo "$ac_t""no" 1>&6
5664 fi
5665 done
5666
5667
5668 # FIXME: kettenis/20030102: In most cases we include these
5669 # unconditionally, so what's the point in checking these?
5670 for ac_hdr in ctype.h time.h
5671 do
5672 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5673 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5674 echo "configure:5675: checking for $ac_hdr" >&5
5675 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5676 echo $ac_n "(cached) $ac_c" 1>&6
5677 else
5678 cat > conftest.$ac_ext <<EOF
5679 #line 5680 "configure"
5680 #include "confdefs.h"
5681 #include <$ac_hdr>
5682 EOF
5683 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5684 { (eval echo configure:5685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5685 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5686 if test -z "$ac_err"; then
5687 rm -rf conftest*
5688 eval "ac_cv_header_$ac_safe=yes"
5689 else
5690 echo "$ac_err" >&5
5691 echo "configure: failed program was:" >&5
5692 cat conftest.$ac_ext >&5
5693 rm -rf conftest*
5694 eval "ac_cv_header_$ac_safe=no"
5695 fi
5696 rm -f conftest*
5697 fi
5698 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5699 echo "$ac_t""yes" 1>&6
5700 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5701 cat >> confdefs.h <<EOF
5702 #define $ac_tr_hdr 1
5703 EOF
5704
5705 else
5706 echo "$ac_t""no" 1>&6
5707 fi
5708 done
5709
5710
5711 echo $ac_n "checking for member st_blocks in struct stat""... $ac_c" 1>&6
5712 echo "configure:5713: checking for member st_blocks in struct stat" >&5
5713 if eval "test \"`echo '$''{'gdb_cv_have_struct_stat_with_st_blocks_member'+set}'`\" = set"; then
5714 echo $ac_n "(cached) $ac_c" 1>&6
5715 else
5716 cat > conftest.$ac_ext <<EOF
5717 #line 5718 "configure"
5718 #include "confdefs.h"
5719 #include <sys/types.h>
5720 #include <sys/stat.h>
5721 int main() {
5722 struct stat st; (void) st.st_blocks;
5723 ; return 0; }
5724 EOF
5725 if { (eval echo configure:5726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5726 rm -rf conftest*
5727 gdb_cv_have_struct_stat_with_st_blocks_member=yes
5728 else
5729 echo "configure: failed program was:" >&5
5730 cat conftest.$ac_ext >&5
5731 rm -rf conftest*
5732 gdb_cv_have_struct_stat_with_st_blocks_member=no
5733 fi
5734 rm -f conftest*
5735 fi
5736
5737 echo "$ac_t""$gdb_cv_have_struct_stat_with_st_blocks_member" 1>&6
5738 if test $gdb_cv_have_struct_stat_with_st_blocks_member = yes; then
5739 cat >> confdefs.h <<\EOF
5740 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
5741 EOF
5742
5743 fi
5744 # ------------------------- #
5745 # Checks for declarations. #
5746 # ------------------------- #
5747
5748 for ac_func in getopt
5749 do
5750 ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5751 echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
5752 echo "configure:5753: checking whether $ac_func is declared" >&5
5753 if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755 else
5756 cat > conftest.$ac_ext <<EOF
5757 #line 5758 "configure"
5758 #include "confdefs.h"
5759 #undef $ac_tr_decl
5760 #define $ac_tr_decl 1
5761
5762
5763 int main() {
5764 #ifndef $ac_func
5765 char *(*pfn) = (char *(*)) $ac_func ;
5766 #endif
5767 ; return 0; }
5768 EOF
5769 if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5770 rm -rf conftest*
5771 eval "gcc_cv_have_decl_$ac_func=yes"
5772 else
5773 echo "configure: failed program was:" >&5
5774 cat conftest.$ac_ext >&5
5775 rm -rf conftest*
5776 eval "gcc_cv_have_decl_$ac_func=no"
5777 fi
5778 rm -f conftest*
5779 fi
5780
5781 if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
5782 echo "$ac_t""yes" 1>&6 ; cat >> confdefs.h <<EOF
5783 #define $ac_tr_decl 1
5784 EOF
5785
5786 else
5787 echo "$ac_t""no" 1>&6 ; cat >> confdefs.h <<EOF
5788 #define $ac_tr_decl 0
5789 EOF
5790
5791 fi
5792
5793 done
5794 if test x = y ; then
5795 cat >> confdefs.h <<\EOF
5796 #define HAVE_DECL_GETOPT 1
5797 EOF
5798 fi
5799
5800
5801 # ------------------ #
5802 # Checks for types. #
5803 # ------------------ #
5804
5805 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5806 echo "configure:5807: checking return type of signal handlers" >&5
5807 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5808 echo $ac_n "(cached) $ac_c" 1>&6
5809 else
5810 cat > conftest.$ac_ext <<EOF
5811 #line 5812 "configure"
5812 #include "confdefs.h"
5813 #include <sys/types.h>
5814 #include <signal.h>
5815 #ifdef signal
5816 #undef signal
5817 #endif
5818 #ifdef __cplusplus
5819 extern "C" void (*signal (int, void (*)(int)))(int);
5820 #else
5821 void (*signal ()) ();
5822 #endif
5823
5824 int main() {
5825 int i;
5826 ; return 0; }
5827 EOF
5828 if { (eval echo configure:5829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5829 rm -rf conftest*
5830 ac_cv_type_signal=void
5831 else
5832 echo "configure: failed program was:" >&5
5833 cat conftest.$ac_ext >&5
5834 rm -rf conftest*
5835 ac_cv_type_signal=int
5836 fi
5837 rm -f conftest*
5838 fi
5839
5840 echo "$ac_t""$ac_cv_type_signal" 1>&6
5841 cat >> confdefs.h <<EOF
5842 #define RETSIGTYPE $ac_cv_type_signal
5843 EOF
5844
5845
5846
5847 # ------------------------------------- #
5848 # Checks for compiler characteristics. #
5849 # ------------------------------------- #
5850
5851 echo $ac_n "checking for working const""... $ac_c" 1>&6
5852 echo "configure:5853: checking for working const" >&5
5853 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5854 echo $ac_n "(cached) $ac_c" 1>&6
5855 else
5856 cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859
5860 int main() {
5861
5862 /* Ultrix mips cc rejects this. */
5863 typedef int charset[2]; const charset x;
5864 /* SunOS 4.1.1 cc rejects this. */
5865 char const *const *ccp;
5866 char **p;
5867 /* NEC SVR4.0.2 mips cc rejects this. */
5868 struct point {int x, y;};
5869 static struct point const zero = {0,0};
5870 /* AIX XL C 1.02.0.0 rejects this.
5871 It does not let you subtract one const X* pointer from another in an arm
5872 of an if-expression whose if-part is not a constant expression */
5873 const char *g = "string";
5874 ccp = &g + (g ? g-g : 0);
5875 /* HPUX 7.0 cc rejects these. */
5876 ++ccp;
5877 p = (char**) ccp;
5878 ccp = (char const *const *) p;
5879 { /* SCO 3.2v4 cc rejects this. */
5880 char *t;
5881 char const *s = 0 ? (char *) 0 : (char const *) 0;
5882
5883 *t++ = 0;
5884 }
5885 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5886 int x[] = {25, 17};
5887 const int *foo = &x[0];
5888 ++foo;
5889 }
5890 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5891 typedef const int *iptr;
5892 iptr p = 0;
5893 ++p;
5894 }
5895 { /* AIX XL C 1.02.0.0 rejects this saying
5896 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5897 struct s { int j; const int *ap[3]; };
5898 struct s *b; b->j = 5;
5899 }
5900 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5901 const int foo = 10;
5902 }
5903
5904 ; return 0; }
5905 EOF
5906 if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5907 rm -rf conftest*
5908 ac_cv_c_const=yes
5909 else
5910 echo "configure: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 rm -rf conftest*
5913 ac_cv_c_const=no
5914 fi
5915 rm -f conftest*
5916 fi
5917
5918 echo "$ac_t""$ac_cv_c_const" 1>&6
5919 if test $ac_cv_c_const = no; then
5920 cat >> confdefs.h <<\EOF
5921 #define const
5922 EOF
5923
5924 fi
5925
5926 echo $ac_n "checking for inline""... $ac_c" 1>&6
5927 echo "configure:5928: checking for inline" >&5
5928 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5929 echo $ac_n "(cached) $ac_c" 1>&6
5930 else
5931 ac_cv_c_inline=no
5932 for ac_kw in inline __inline__ __inline; do
5933 cat > conftest.$ac_ext <<EOF
5934 #line 5935 "configure"
5935 #include "confdefs.h"
5936
5937 int main() {
5938 } $ac_kw foo() {
5939 ; return 0; }
5940 EOF
5941 if { (eval echo configure:5942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5942 rm -rf conftest*
5943 ac_cv_c_inline=$ac_kw; break
5944 else
5945 echo "configure: failed program was:" >&5
5946 cat conftest.$ac_ext >&5
5947 fi
5948 rm -f conftest*
5949 done
5950
5951 fi
5952
5953 echo "$ac_t""$ac_cv_c_inline" 1>&6
5954 case "$ac_cv_c_inline" in
5955 inline | yes) ;;
5956 no) cat >> confdefs.h <<\EOF
5957 #define inline
5958 EOF
5959 ;;
5960 *) cat >> confdefs.h <<EOF
5961 #define inline $ac_cv_c_inline
5962 EOF
5963 ;;
5964 esac
5965
5966
5967 # ------------------------------ #
5968 # Checks for library functions. #
5969 # ------------------------------ #
5970
5971 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5972 # for constant arguments. Useless!
5973 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5974 echo "configure:5975: checking for working alloca.h" >&5
5975 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5976 echo $ac_n "(cached) $ac_c" 1>&6
5977 else
5978 cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 #include <alloca.h>
5982 int main() {
5983 char *p = alloca(2 * sizeof(int));
5984 ; return 0; }
5985 EOF
5986 if { (eval echo configure:5987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5987 rm -rf conftest*
5988 ac_cv_header_alloca_h=yes
5989 else
5990 echo "configure: failed program was:" >&5
5991 cat conftest.$ac_ext >&5
5992 rm -rf conftest*
5993 ac_cv_header_alloca_h=no
5994 fi
5995 rm -f conftest*
5996 fi
5997
5998 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5999 if test $ac_cv_header_alloca_h = yes; then
6000 cat >> confdefs.h <<\EOF
6001 #define HAVE_ALLOCA_H 1
6002 EOF
6003
6004 fi
6005
6006 echo $ac_n "checking for alloca""... $ac_c" 1>&6
6007 echo "configure:6008: checking for alloca" >&5
6008 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
6009 echo $ac_n "(cached) $ac_c" 1>&6
6010 else
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014
6015 #ifdef __GNUC__
6016 # define alloca __builtin_alloca
6017 #else
6018 # ifdef _MSC_VER
6019 # include <malloc.h>
6020 # define alloca _alloca
6021 # else
6022 # if HAVE_ALLOCA_H
6023 # include <alloca.h>
6024 # else
6025 # ifdef _AIX
6026 #pragma alloca
6027 # else
6028 # ifndef alloca /* predefined by HP cc +Olibcalls */
6029 char *alloca ();
6030 # endif
6031 # endif
6032 # endif
6033 # endif
6034 #endif
6035
6036 int main() {
6037 char *p = (char *) alloca(1);
6038 ; return 0; }
6039 EOF
6040 if { (eval echo configure:6041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6041 rm -rf conftest*
6042 ac_cv_func_alloca_works=yes
6043 else
6044 echo "configure: failed program was:" >&5
6045 cat conftest.$ac_ext >&5
6046 rm -rf conftest*
6047 ac_cv_func_alloca_works=no
6048 fi
6049 rm -f conftest*
6050 fi
6051
6052 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
6053 if test $ac_cv_func_alloca_works = yes; then
6054 cat >> confdefs.h <<\EOF
6055 #define HAVE_ALLOCA 1
6056 EOF
6057
6058 fi
6059
6060 if test $ac_cv_func_alloca_works = no; then
6061 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6062 # that cause trouble. Some versions do not even contain alloca or
6063 # contain a buggy version. If you still want to use their alloca,
6064 # use ar to extract alloca.o from them instead of compiling alloca.c.
6065 ALLOCA=alloca.${ac_objext}
6066 cat >> confdefs.h <<\EOF
6067 #define C_ALLOCA 1
6068 EOF
6069
6070
6071 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
6072 echo "configure:6073: checking whether alloca needs Cray hooks" >&5
6073 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
6074 echo $ac_n "(cached) $ac_c" 1>&6
6075 else
6076 cat > conftest.$ac_ext <<EOF
6077 #line 6078 "configure"
6078 #include "confdefs.h"
6079 #if defined(CRAY) && ! defined(CRAY2)
6080 webecray
6081 #else
6082 wenotbecray
6083 #endif
6084
6085 EOF
6086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6087 egrep "webecray" >/dev/null 2>&1; then
6088 rm -rf conftest*
6089 ac_cv_os_cray=yes
6090 else
6091 rm -rf conftest*
6092 ac_cv_os_cray=no
6093 fi
6094 rm -f conftest*
6095
6096 fi
6097
6098 echo "$ac_t""$ac_cv_os_cray" 1>&6
6099 if test $ac_cv_os_cray = yes; then
6100 for ac_func in _getb67 GETB67 getb67; do
6101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6102 echo "configure:6103: checking for $ac_func" >&5
6103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6104 echo $ac_n "(cached) $ac_c" 1>&6
6105 else
6106 cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6109 /* System header to define __stub macros and hopefully few prototypes,
6110 which can conflict with char $ac_func(); below. */
6111 #include <assert.h>
6112 /* Override any gcc2 internal prototype to avoid an error. */
6113 /* We use char because int might match the return type of a gcc2
6114 builtin and then its argument prototype would still apply. */
6115 char $ac_func();
6116
6117 int main() {
6118
6119 /* The GNU C library defines this for functions which it implements
6120 to always fail with ENOSYS. Some functions are actually named
6121 something starting with __ and the normal name is an alias. */
6122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6123 choke me
6124 #else
6125 $ac_func();
6126 #endif
6127
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131 rm -rf conftest*
6132 eval "ac_cv_func_$ac_func=yes"
6133 else
6134 echo "configure: failed program was:" >&5
6135 cat conftest.$ac_ext >&5
6136 rm -rf conftest*
6137 eval "ac_cv_func_$ac_func=no"
6138 fi
6139 rm -f conftest*
6140 fi
6141
6142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6143 echo "$ac_t""yes" 1>&6
6144 cat >> confdefs.h <<EOF
6145 #define CRAY_STACKSEG_END $ac_func
6146 EOF
6147
6148 break
6149 else
6150 echo "$ac_t""no" 1>&6
6151 fi
6152
6153 done
6154 fi
6155
6156 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
6157 echo "configure:6158: checking stack direction for C alloca" >&5
6158 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
6159 echo $ac_n "(cached) $ac_c" 1>&6
6160 else
6161 if test "$cross_compiling" = yes; then
6162 ac_cv_c_stack_direction=0
6163 else
6164 cat > conftest.$ac_ext <<EOF
6165 #line 6166 "configure"
6166 #include "confdefs.h"
6167 find_stack_direction ()
6168 {
6169 static char *addr = 0;
6170 auto char dummy;
6171 if (addr == 0)
6172 {
6173 addr = &dummy;
6174 return find_stack_direction ();
6175 }
6176 else
6177 return (&dummy > addr) ? 1 : -1;
6178 }
6179 main ()
6180 {
6181 exit (find_stack_direction() < 0);
6182 }
6183 EOF
6184 if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6185 then
6186 ac_cv_c_stack_direction=1
6187 else
6188 echo "configure: failed program was:" >&5
6189 cat conftest.$ac_ext >&5
6190 rm -fr conftest*
6191 ac_cv_c_stack_direction=-1
6192 fi
6193 rm -fr conftest*
6194 fi
6195
6196 fi
6197
6198 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
6199 cat >> confdefs.h <<EOF
6200 #define STACK_DIRECTION $ac_cv_c_stack_direction
6201 EOF
6202
6203 fi
6204
6205 for ac_hdr in unistd.h
6206 do
6207 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6208 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6209 echo "configure:6210: checking for $ac_hdr" >&5
6210 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6211 echo $ac_n "(cached) $ac_c" 1>&6
6212 else
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 #include <$ac_hdr>
6217 EOF
6218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6219 { (eval echo configure:6220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6221 if test -z "$ac_err"; then
6222 rm -rf conftest*
6223 eval "ac_cv_header_$ac_safe=yes"
6224 else
6225 echo "$ac_err" >&5
6226 echo "configure: failed program was:" >&5
6227 cat conftest.$ac_ext >&5
6228 rm -rf conftest*
6229 eval "ac_cv_header_$ac_safe=no"
6230 fi
6231 rm -f conftest*
6232 fi
6233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6234 echo "$ac_t""yes" 1>&6
6235 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6236 cat >> confdefs.h <<EOF
6237 #define $ac_tr_hdr 1
6238 EOF
6239
6240 else
6241 echo "$ac_t""no" 1>&6
6242 fi
6243 done
6244
6245 for ac_func in getpagesize
6246 do
6247 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6248 echo "configure:6249: checking for $ac_func" >&5
6249 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6250 echo $ac_n "(cached) $ac_c" 1>&6
6251 else
6252 cat > conftest.$ac_ext <<EOF
6253 #line 6254 "configure"
6254 #include "confdefs.h"
6255 /* System header to define __stub macros and hopefully few prototypes,
6256 which can conflict with char $ac_func(); below. */
6257 #include <assert.h>
6258 /* Override any gcc2 internal prototype to avoid an error. */
6259 /* We use char because int might match the return type of a gcc2
6260 builtin and then its argument prototype would still apply. */
6261 char $ac_func();
6262
6263 int main() {
6264
6265 /* The GNU C library defines this for functions which it implements
6266 to always fail with ENOSYS. Some functions are actually named
6267 something starting with __ and the normal name is an alias. */
6268 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6269 choke me
6270 #else
6271 $ac_func();
6272 #endif
6273
6274 ; return 0; }
6275 EOF
6276 if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6277 rm -rf conftest*
6278 eval "ac_cv_func_$ac_func=yes"
6279 else
6280 echo "configure: failed program was:" >&5
6281 cat conftest.$ac_ext >&5
6282 rm -rf conftest*
6283 eval "ac_cv_func_$ac_func=no"
6284 fi
6285 rm -f conftest*
6286 fi
6287
6288 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6289 echo "$ac_t""yes" 1>&6
6290 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6291 cat >> confdefs.h <<EOF
6292 #define $ac_tr_func 1
6293 EOF
6294
6295 else
6296 echo "$ac_t""no" 1>&6
6297 fi
6298 done
6299
6300 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6301 echo "configure:6302: checking for working mmap" >&5
6302 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6303 echo $ac_n "(cached) $ac_c" 1>&6
6304 else
6305 if test "$cross_compiling" = yes; then
6306 ac_cv_func_mmap_fixed_mapped=no
6307 else
6308 cat > conftest.$ac_ext <<EOF
6309 #line 6310 "configure"
6310 #include "confdefs.h"
6311
6312 /* Thanks to Mike Haertel and Jim Avera for this test.
6313 Here is a matrix of mmap possibilities:
6314 mmap private not fixed
6315 mmap private fixed at somewhere currently unmapped
6316 mmap private fixed at somewhere already mapped
6317 mmap shared not fixed
6318 mmap shared fixed at somewhere currently unmapped
6319 mmap shared fixed at somewhere already mapped
6320 For private mappings, we should verify that changes cannot be read()
6321 back from the file, nor mmap's back from the file at a different
6322 address. (There have been systems where private was not correctly
6323 implemented like the infamous i386 svr4.0, and systems where the
6324 VM page cache was not coherent with the filesystem buffer cache
6325 like early versions of FreeBSD and possibly contemporary NetBSD.)
6326 For shared mappings, we should conversely verify that changes get
6327 propogated back to all the places they're supposed to be.
6328
6329 Grep wants private fixed already mapped.
6330 The main things grep needs to know about mmap are:
6331 * does it exist and is it safe to write into the mmap'd area
6332 * how to use it (BSD variants) */
6333 #include <sys/types.h>
6334 #include <fcntl.h>
6335 #include <sys/mman.h>
6336
6337 /* This mess was copied from the GNU getpagesize.h. */
6338 #ifndef HAVE_GETPAGESIZE
6339 # ifdef HAVE_UNISTD_H
6340 # include <unistd.h>
6341 # endif
6342
6343 /* Assume that all systems that can run configure have sys/param.h. */
6344 # ifndef HAVE_SYS_PARAM_H
6345 # define HAVE_SYS_PARAM_H 1
6346 # endif
6347
6348 # ifdef _SC_PAGESIZE
6349 # define getpagesize() sysconf(_SC_PAGESIZE)
6350 # else /* no _SC_PAGESIZE */
6351 # ifdef HAVE_SYS_PARAM_H
6352 # include <sys/param.h>
6353 # ifdef EXEC_PAGESIZE
6354 # define getpagesize() EXEC_PAGESIZE
6355 # else /* no EXEC_PAGESIZE */
6356 # ifdef NBPG
6357 # define getpagesize() NBPG * CLSIZE
6358 # ifndef CLSIZE
6359 # define CLSIZE 1
6360 # endif /* no CLSIZE */
6361 # else /* no NBPG */
6362 # ifdef NBPC
6363 # define getpagesize() NBPC
6364 # else /* no NBPC */
6365 # ifdef PAGESIZE
6366 # define getpagesize() PAGESIZE
6367 # endif /* PAGESIZE */
6368 # endif /* no NBPC */
6369 # endif /* no NBPG */
6370 # endif /* no EXEC_PAGESIZE */
6371 # else /* no HAVE_SYS_PARAM_H */
6372 # define getpagesize() 8192 /* punt totally */
6373 # endif /* no HAVE_SYS_PARAM_H */
6374 # endif /* no _SC_PAGESIZE */
6375
6376 #endif /* no HAVE_GETPAGESIZE */
6377
6378 #ifdef __cplusplus
6379 extern "C" { void *malloc(unsigned); }
6380 #else
6381 char *malloc();
6382 #endif
6383
6384 int
6385 main()
6386 {
6387 char *data, *data2, *data3;
6388 int i, pagesize;
6389 int fd;
6390
6391 pagesize = getpagesize();
6392
6393 /*
6394 * First, make a file with some known garbage in it.
6395 */
6396 data = malloc(pagesize);
6397 if (!data)
6398 exit(1);
6399 for (i = 0; i < pagesize; ++i)
6400 *(data + i) = rand();
6401 umask(0);
6402 fd = creat("conftestmmap", 0600);
6403 if (fd < 0)
6404 exit(1);
6405 if (write(fd, data, pagesize) != pagesize)
6406 exit(1);
6407 close(fd);
6408
6409 /*
6410 * Next, try to mmap the file at a fixed address which
6411 * already has something else allocated at it. If we can,
6412 * also make sure that we see the same garbage.
6413 */
6414 fd = open("conftestmmap", O_RDWR);
6415 if (fd < 0)
6416 exit(1);
6417 data2 = malloc(2 * pagesize);
6418 if (!data2)
6419 exit(1);
6420 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6421 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6422 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6423 exit(1);
6424 for (i = 0; i < pagesize; ++i)
6425 if (*(data + i) != *(data2 + i))
6426 exit(1);
6427
6428 /*
6429 * Finally, make sure that changes to the mapped area
6430 * do not percolate back to the file as seen by read().
6431 * (This is a bug on some variants of i386 svr4.0.)
6432 */
6433 for (i = 0; i < pagesize; ++i)
6434 *(data2 + i) = *(data2 + i) + 1;
6435 data3 = malloc(pagesize);
6436 if (!data3)
6437 exit(1);
6438 if (read(fd, data3, pagesize) != pagesize)
6439 exit(1);
6440 for (i = 0; i < pagesize; ++i)
6441 if (*(data + i) != *(data3 + i))
6442 exit(1);
6443 close(fd);
6444 unlink("conftestmmap");
6445 exit(0);
6446 }
6447
6448 EOF
6449 if { (eval echo configure:6450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6450 then
6451 ac_cv_func_mmap_fixed_mapped=yes
6452 else
6453 echo "configure: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 rm -fr conftest*
6456 ac_cv_func_mmap_fixed_mapped=no
6457 fi
6458 rm -fr conftest*
6459 fi
6460
6461 fi
6462
6463 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6464 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6465 cat >> confdefs.h <<\EOF
6466 #define HAVE_MMAP 1
6467 EOF
6468
6469 fi
6470
6471 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
6472 echo "configure:6473: checking for pid_t" >&5
6473 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
6474 echo $ac_n "(cached) $ac_c" 1>&6
6475 else
6476 cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479 #include <sys/types.h>
6480 #if STDC_HEADERS
6481 #include <stdlib.h>
6482 #include <stddef.h>
6483 #endif
6484 EOF
6485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6486 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6487 rm -rf conftest*
6488 ac_cv_type_pid_t=yes
6489 else
6490 rm -rf conftest*
6491 ac_cv_type_pid_t=no
6492 fi
6493 rm -f conftest*
6494
6495 fi
6496 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
6497 if test $ac_cv_type_pid_t = no; then
6498 cat >> confdefs.h <<\EOF
6499 #define pid_t int
6500 EOF
6501
6502 fi
6503
6504 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
6505 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
6506 echo "configure:6507: checking for vfork.h" >&5
6507 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6508 echo $ac_n "(cached) $ac_c" 1>&6
6509 else
6510 cat > conftest.$ac_ext <<EOF
6511 #line 6512 "configure"
6512 #include "confdefs.h"
6513 #include <vfork.h>
6514 EOF
6515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6516 { (eval echo configure:6517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6518 if test -z "$ac_err"; then
6519 rm -rf conftest*
6520 eval "ac_cv_header_$ac_safe=yes"
6521 else
6522 echo "$ac_err" >&5
6523 echo "configure: failed program was:" >&5
6524 cat conftest.$ac_ext >&5
6525 rm -rf conftest*
6526 eval "ac_cv_header_$ac_safe=no"
6527 fi
6528 rm -f conftest*
6529 fi
6530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6531 echo "$ac_t""yes" 1>&6
6532 cat >> confdefs.h <<\EOF
6533 #define HAVE_VFORK_H 1
6534 EOF
6535
6536 else
6537 echo "$ac_t""no" 1>&6
6538 fi
6539
6540 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
6541 echo "configure:6542: checking for working vfork" >&5
6542 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
6543 echo $ac_n "(cached) $ac_c" 1>&6
6544 else
6545 if test "$cross_compiling" = yes; then
6546 echo $ac_n "checking for vfork""... $ac_c" 1>&6
6547 echo "configure:6548: checking for vfork" >&5
6548 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
6549 echo $ac_n "(cached) $ac_c" 1>&6
6550 else
6551 cat > conftest.$ac_ext <<EOF
6552 #line 6553 "configure"
6553 #include "confdefs.h"
6554 /* System header to define __stub macros and hopefully few prototypes,
6555 which can conflict with char vfork(); below. */
6556 #include <assert.h>
6557 /* Override any gcc2 internal prototype to avoid an error. */
6558 /* We use char because int might match the return type of a gcc2
6559 builtin and then its argument prototype would still apply. */
6560 char vfork();
6561
6562 int main() {
6563
6564 /* The GNU C library defines this for functions which it implements
6565 to always fail with ENOSYS. Some functions are actually named
6566 something starting with __ and the normal name is an alias. */
6567 #if defined (__stub_vfork) || defined (__stub___vfork)
6568 choke me
6569 #else
6570 vfork();
6571 #endif
6572
6573 ; return 0; }
6574 EOF
6575 if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6576 rm -rf conftest*
6577 eval "ac_cv_func_vfork=yes"
6578 else
6579 echo "configure: failed program was:" >&5
6580 cat conftest.$ac_ext >&5
6581 rm -rf conftest*
6582 eval "ac_cv_func_vfork=no"
6583 fi
6584 rm -f conftest*
6585 fi
6586
6587 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
6588 echo "$ac_t""yes" 1>&6
6589 :
6590 else
6591 echo "$ac_t""no" 1>&6
6592 fi
6593
6594 ac_cv_func_vfork_works=$ac_cv_func_vfork
6595 else
6596 cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599 /* Thanks to Paul Eggert for this test. */
6600 #include <stdio.h>
6601 #include <sys/types.h>
6602 #include <sys/stat.h>
6603 #ifdef HAVE_UNISTD_H
6604 #include <unistd.h>
6605 #endif
6606 #ifdef HAVE_VFORK_H
6607 #include <vfork.h>
6608 #endif
6609 /* On some sparc systems, changes by the child to local and incoming
6610 argument registers are propagated back to the parent.
6611 The compiler is told about this with #include <vfork.h>,
6612 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
6613 Test for this by using a static variable whose address
6614 is put into a register that is clobbered by the vfork. */
6615 static
6616 #ifdef __cplusplus
6617 sparc_address_test (int arg)
6618 #else
6619 sparc_address_test (arg) int arg;
6620 #endif
6621 {
6622 static pid_t child;
6623 if (!child) {
6624 child = vfork ();
6625 if (child < 0) {
6626 perror ("vfork");
6627 _exit(2);
6628 }
6629 if (!child) {
6630 arg = getpid();
6631 write(-1, "", 0);
6632 _exit (arg);
6633 }
6634 }
6635 }
6636 main() {
6637 pid_t parent = getpid ();
6638 pid_t child;
6639
6640 sparc_address_test ();
6641
6642 child = vfork ();
6643
6644 if (child == 0) {
6645 /* Here is another test for sparc vfork register problems.
6646 This test uses lots of local variables, at least
6647 as many local variables as main has allocated so far
6648 including compiler temporaries. 4 locals are enough for
6649 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
6650 A buggy compiler should reuse the register of parent
6651 for one of the local variables, since it will think that
6652 parent can't possibly be used any more in this routine.
6653 Assigning to the local variable will thus munge parent
6654 in the parent process. */
6655 pid_t
6656 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
6657 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
6658 /* Convince the compiler that p..p7 are live; otherwise, it might
6659 use the same hardware register for all 8 local variables. */
6660 if (p != p1 || p != p2 || p != p3 || p != p4
6661 || p != p5 || p != p6 || p != p7)
6662 _exit(1);
6663
6664 /* On some systems (e.g. IRIX 3.3),
6665 vfork doesn't separate parent from child file descriptors.
6666 If the child closes a descriptor before it execs or exits,
6667 this munges the parent's descriptor as well.
6668 Test for this by closing stdout in the child. */
6669 _exit(close(fileno(stdout)) != 0);
6670 } else {
6671 int status;
6672 struct stat st;
6673
6674 while (wait(&status) != child)
6675 ;
6676 exit(
6677 /* Was there some problem with vforking? */
6678 child < 0
6679
6680 /* Did the child fail? (This shouldn't happen.) */
6681 || status
6682
6683 /* Did the vfork/compiler bug occur? */
6684 || parent != getpid()
6685
6686 /* Did the file descriptor bug occur? */
6687 || fstat(fileno(stdout), &st) != 0
6688 );
6689 }
6690 }
6691 EOF
6692 if { (eval echo configure:6693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6693 then
6694 ac_cv_func_vfork_works=yes
6695 else
6696 echo "configure: failed program was:" >&5
6697 cat conftest.$ac_ext >&5
6698 rm -fr conftest*
6699 ac_cv_func_vfork_works=no
6700 fi
6701 rm -fr conftest*
6702 fi
6703
6704 fi
6705
6706 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6707 if test $ac_cv_func_vfork_works = no; then
6708 cat >> confdefs.h <<\EOF
6709 #define vfork fork
6710 EOF
6711
6712 fi
6713
6714 for ac_func in canonicalize_file_name realpath
6715 do
6716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6717 echo "configure:6718: checking for $ac_func" >&5
6718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6719 echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721 cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 /* System header to define __stub macros and hopefully few prototypes,
6725 which can conflict with char $ac_func(); below. */
6726 #include <assert.h>
6727 /* Override any gcc2 internal prototype to avoid an error. */
6728 /* We use char because int might match the return type of a gcc2
6729 builtin and then its argument prototype would still apply. */
6730 char $ac_func();
6731
6732 int main() {
6733
6734 /* The GNU C library defines this for functions which it implements
6735 to always fail with ENOSYS. Some functions are actually named
6736 something starting with __ and the normal name is an alias. */
6737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6738 choke me
6739 #else
6740 $ac_func();
6741 #endif
6742
6743 ; return 0; }
6744 EOF
6745 if { (eval echo configure:6746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6746 rm -rf conftest*
6747 eval "ac_cv_func_$ac_func=yes"
6748 else
6749 echo "configure: failed program was:" >&5
6750 cat conftest.$ac_ext >&5
6751 rm -rf conftest*
6752 eval "ac_cv_func_$ac_func=no"
6753 fi
6754 rm -f conftest*
6755 fi
6756
6757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6758 echo "$ac_t""yes" 1>&6
6759 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6760 cat >> confdefs.h <<EOF
6761 #define $ac_tr_func 1
6762 EOF
6763
6764 else
6765 echo "$ac_t""no" 1>&6
6766 fi
6767 done
6768
6769 for ac_func in poll
6770 do
6771 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6772 echo "configure:6773: checking for $ac_func" >&5
6773 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6774 echo $ac_n "(cached) $ac_c" 1>&6
6775 else
6776 cat > conftest.$ac_ext <<EOF
6777 #line 6778 "configure"
6778 #include "confdefs.h"
6779 /* System header to define __stub macros and hopefully few prototypes,
6780 which can conflict with char $ac_func(); below. */
6781 #include <assert.h>
6782 /* Override any gcc2 internal prototype to avoid an error. */
6783 /* We use char because int might match the return type of a gcc2
6784 builtin and then its argument prototype would still apply. */
6785 char $ac_func();
6786
6787 int main() {
6788
6789 /* The GNU C library defines this for functions which it implements
6790 to always fail with ENOSYS. Some functions are actually named
6791 something starting with __ and the normal name is an alias. */
6792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6793 choke me
6794 #else
6795 $ac_func();
6796 #endif
6797
6798 ; return 0; }
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6801 rm -rf conftest*
6802 eval "ac_cv_func_$ac_func=yes"
6803 else
6804 echo "configure: failed program was:" >&5
6805 cat conftest.$ac_ext >&5
6806 rm -rf conftest*
6807 eval "ac_cv_func_$ac_func=no"
6808 fi
6809 rm -f conftest*
6810 fi
6811
6812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6813 echo "$ac_t""yes" 1>&6
6814 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6815 cat >> confdefs.h <<EOF
6816 #define $ac_tr_func 1
6817 EOF
6818
6819 else
6820 echo "$ac_t""no" 1>&6
6821 fi
6822 done
6823
6824 for ac_func in pread64
6825 do
6826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6827 echo "configure:6828: checking for $ac_func" >&5
6828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6829 echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* System header to define __stub macros and hopefully few prototypes,
6835 which can conflict with char $ac_func(); below. */
6836 #include <assert.h>
6837 /* Override any gcc2 internal prototype to avoid an error. */
6838 /* We use char because int might match the return type of a gcc2
6839 builtin and then its argument prototype would still apply. */
6840 char $ac_func();
6841
6842 int main() {
6843
6844 /* The GNU C library defines this for functions which it implements
6845 to always fail with ENOSYS. Some functions are actually named
6846 something starting with __ and the normal name is an alias. */
6847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6848 choke me
6849 #else
6850 $ac_func();
6851 #endif
6852
6853 ; return 0; }
6854 EOF
6855 if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6856 rm -rf conftest*
6857 eval "ac_cv_func_$ac_func=yes"
6858 else
6859 echo "configure: failed program was:" >&5
6860 cat conftest.$ac_ext >&5
6861 rm -rf conftest*
6862 eval "ac_cv_func_$ac_func=no"
6863 fi
6864 rm -f conftest*
6865 fi
6866
6867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6868 echo "$ac_t""yes" 1>&6
6869 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6870 cat >> confdefs.h <<EOF
6871 #define $ac_tr_func 1
6872 EOF
6873
6874 else
6875 echo "$ac_t""no" 1>&6
6876 fi
6877 done
6878
6879 for ac_func in sbrk
6880 do
6881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6882 echo "configure:6883: checking for $ac_func" >&5
6883 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6884 echo $ac_n "(cached) $ac_c" 1>&6
6885 else
6886 cat > conftest.$ac_ext <<EOF
6887 #line 6888 "configure"
6888 #include "confdefs.h"
6889 /* System header to define __stub macros and hopefully few prototypes,
6890 which can conflict with char $ac_func(); below. */
6891 #include <assert.h>
6892 /* Override any gcc2 internal prototype to avoid an error. */
6893 /* We use char because int might match the return type of a gcc2
6894 builtin and then its argument prototype would still apply. */
6895 char $ac_func();
6896
6897 int main() {
6898
6899 /* The GNU C library defines this for functions which it implements
6900 to always fail with ENOSYS. Some functions are actually named
6901 something starting with __ and the normal name is an alias. */
6902 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6903 choke me
6904 #else
6905 $ac_func();
6906 #endif
6907
6908 ; return 0; }
6909 EOF
6910 if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6911 rm -rf conftest*
6912 eval "ac_cv_func_$ac_func=yes"
6913 else
6914 echo "configure: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 rm -rf conftest*
6917 eval "ac_cv_func_$ac_func=no"
6918 fi
6919 rm -f conftest*
6920 fi
6921
6922 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6923 echo "$ac_t""yes" 1>&6
6924 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6925 cat >> confdefs.h <<EOF
6926 #define $ac_tr_func 1
6927 EOF
6928
6929 else
6930 echo "$ac_t""no" 1>&6
6931 fi
6932 done
6933
6934 for ac_func in setpgid setpgrp
6935 do
6936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6937 echo "configure:6938: checking for $ac_func" >&5
6938 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6939 echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 /* System header to define __stub macros and hopefully few prototypes,
6945 which can conflict with char $ac_func(); below. */
6946 #include <assert.h>
6947 /* Override any gcc2 internal prototype to avoid an error. */
6948 /* We use char because int might match the return type of a gcc2
6949 builtin and then its argument prototype would still apply. */
6950 char $ac_func();
6951
6952 int main() {
6953
6954 /* The GNU C library defines this for functions which it implements
6955 to always fail with ENOSYS. Some functions are actually named
6956 something starting with __ and the normal name is an alias. */
6957 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6958 choke me
6959 #else
6960 $ac_func();
6961 #endif
6962
6963 ; return 0; }
6964 EOF
6965 if { (eval echo configure:6966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6966 rm -rf conftest*
6967 eval "ac_cv_func_$ac_func=yes"
6968 else
6969 echo "configure: failed program was:" >&5
6970 cat conftest.$ac_ext >&5
6971 rm -rf conftest*
6972 eval "ac_cv_func_$ac_func=no"
6973 fi
6974 rm -f conftest*
6975 fi
6976
6977 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6978 echo "$ac_t""yes" 1>&6
6979 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6980 cat >> confdefs.h <<EOF
6981 #define $ac_tr_func 1
6982 EOF
6983
6984 else
6985 echo "$ac_t""no" 1>&6
6986 fi
6987 done
6988
6989 for ac_func in sigaction sigprocmask sigsetmask
6990 do
6991 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6992 echo "configure:6993: checking for $ac_func" >&5
6993 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6994 echo $ac_n "(cached) $ac_c" 1>&6
6995 else
6996 cat > conftest.$ac_ext <<EOF
6997 #line 6998 "configure"
6998 #include "confdefs.h"
6999 /* System header to define __stub macros and hopefully few prototypes,
7000 which can conflict with char $ac_func(); below. */
7001 #include <assert.h>
7002 /* Override any gcc2 internal prototype to avoid an error. */
7003 /* We use char because int might match the return type of a gcc2
7004 builtin and then its argument prototype would still apply. */
7005 char $ac_func();
7006
7007 int main() {
7008
7009 /* The GNU C library defines this for functions which it implements
7010 to always fail with ENOSYS. Some functions are actually named
7011 something starting with __ and the normal name is an alias. */
7012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7013 choke me
7014 #else
7015 $ac_func();
7016 #endif
7017
7018 ; return 0; }
7019 EOF
7020 if { (eval echo configure:7021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7021 rm -rf conftest*
7022 eval "ac_cv_func_$ac_func=yes"
7023 else
7024 echo "configure: failed program was:" >&5
7025 cat conftest.$ac_ext >&5
7026 rm -rf conftest*
7027 eval "ac_cv_func_$ac_func=no"
7028 fi
7029 rm -f conftest*
7030 fi
7031
7032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7033 echo "$ac_t""yes" 1>&6
7034 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7035 cat >> confdefs.h <<EOF
7036 #define $ac_tr_func 1
7037 EOF
7038
7039 else
7040 echo "$ac_t""no" 1>&6
7041 fi
7042 done
7043
7044 for ac_func in socketpair
7045 do
7046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7047 echo "configure:7048: checking for $ac_func" >&5
7048 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7049 echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051 cat > conftest.$ac_ext <<EOF
7052 #line 7053 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055 which can conflict with char $ac_func(); below. */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error. */
7058 /* We use char because int might match the return type of a gcc2
7059 builtin and then its argument prototype would still apply. */
7060 char $ac_func();
7061
7062 int main() {
7063
7064 /* The GNU C library defines this for functions which it implements
7065 to always fail with ENOSYS. Some functions are actually named
7066 something starting with __ and the normal name is an alias. */
7067 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7068 choke me
7069 #else
7070 $ac_func();
7071 #endif
7072
7073 ; return 0; }
7074 EOF
7075 if { (eval echo configure:7076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7076 rm -rf conftest*
7077 eval "ac_cv_func_$ac_func=yes"
7078 else
7079 echo "configure: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081 rm -rf conftest*
7082 eval "ac_cv_func_$ac_func=no"
7083 fi
7084 rm -f conftest*
7085 fi
7086
7087 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7088 echo "$ac_t""yes" 1>&6
7089 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7090 cat >> confdefs.h <<EOF
7091 #define $ac_tr_func 1
7092 EOF
7093
7094 else
7095 echo "$ac_t""no" 1>&6
7096 fi
7097 done
7098
7099 for ac_func in syscall
7100 do
7101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7102 echo "configure:7103: checking for $ac_func" >&5
7103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7104 echo $ac_n "(cached) $ac_c" 1>&6
7105 else
7106 cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109 /* System header to define __stub macros and hopefully few prototypes,
7110 which can conflict with char $ac_func(); below. */
7111 #include <assert.h>
7112 /* Override any gcc2 internal prototype to avoid an error. */
7113 /* We use char because int might match the return type of a gcc2
7114 builtin and then its argument prototype would still apply. */
7115 char $ac_func();
7116
7117 int main() {
7118
7119 /* The GNU C library defines this for functions which it implements
7120 to always fail with ENOSYS. Some functions are actually named
7121 something starting with __ and the normal name is an alias. */
7122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7123 choke me
7124 #else
7125 $ac_func();
7126 #endif
7127
7128 ; return 0; }
7129 EOF
7130 if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7131 rm -rf conftest*
7132 eval "ac_cv_func_$ac_func=yes"
7133 else
7134 echo "configure: failed program was:" >&5
7135 cat conftest.$ac_ext >&5
7136 rm -rf conftest*
7137 eval "ac_cv_func_$ac_func=no"
7138 fi
7139 rm -f conftest*
7140 fi
7141
7142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7143 echo "$ac_t""yes" 1>&6
7144 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7145 cat >> confdefs.h <<EOF
7146 #define $ac_tr_func 1
7147 EOF
7148
7149 else
7150 echo "$ac_t""no" 1>&6
7151 fi
7152 done
7153
7154
7155 if test "$cross_compiling" = no; then
7156 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7157 echo "configure:7158: checking whether setpgrp takes no argument" >&5
7158 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7159 echo $ac_n "(cached) $ac_c" 1>&6
7160 else
7161 if test "$cross_compiling" = yes; then
7162 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
7163 else
7164 cat > conftest.$ac_ext <<EOF
7165 #line 7166 "configure"
7166 #include "confdefs.h"
7167
7168 #ifdef HAVE_UNISTD_H
7169 #include <unistd.h>
7170 #endif
7171
7172 /*
7173 * If this system has a BSD-style setpgrp, which takes arguments, exit
7174 * successfully.
7175 */
7176 main()
7177 {
7178 if (setpgrp(1,1) == -1)
7179 exit(0);
7180 else
7181 exit(1);
7182 }
7183
7184 EOF
7185 if { (eval echo configure:7186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7186 then
7187 ac_cv_func_setpgrp_void=no
7188 else
7189 echo "configure: failed program was:" >&5
7190 cat conftest.$ac_ext >&5
7191 rm -fr conftest*
7192 ac_cv_func_setpgrp_void=yes
7193 fi
7194 rm -fr conftest*
7195 fi
7196
7197
7198 fi
7199
7200 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7201 if test $ac_cv_func_setpgrp_void = yes; then
7202 cat >> confdefs.h <<\EOF
7203 #define SETPGRP_VOID 1
7204 EOF
7205
7206 fi
7207
7208 else
7209 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
7210 echo "configure:7211: checking whether setpgrp takes no argument" >&5
7211 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
7212 echo $ac_n "(cached) $ac_c" 1>&6
7213 else
7214 cat > conftest.$ac_ext <<EOF
7215 #line 7216 "configure"
7216 #include "confdefs.h"
7217
7218 #include <unistd.h>
7219
7220 int main() {
7221
7222 if (setpgrp(1,1) == -1)
7223 exit (0);
7224 else
7225 exit (1);
7226
7227 ; return 0; }
7228 EOF
7229 if { (eval echo configure:7230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7230 rm -rf conftest*
7231 ac_cv_func_setpgrp_void=no
7232 else
7233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7235 rm -rf conftest*
7236 ac_cv_func_setpgrp_void=yes
7237 fi
7238 rm -f conftest*
7239 fi
7240
7241 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
7242 if test $ac_cv_func_setpgrp_void = yes; then
7243 cat >> confdefs.h <<\EOF
7244 #define SETPGRP_VOID 1
7245 EOF
7246
7247 fi
7248 fi
7249
7250 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
7251 # since sigsetjmp might only be defined as a macro.
7252 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
7253 echo "configure:7254: checking for sigsetjmp" >&5
7254 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
7255 echo $ac_n "(cached) $ac_c" 1>&6
7256 else
7257 cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260
7261 #include <setjmp.h>
7262
7263 int main() {
7264 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
7265 ; return 0; }
7266 EOF
7267 if { (eval echo configure:7268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7268 rm -rf conftest*
7269 gdb_cv_func_sigsetjmp=yes
7270 else
7271 echo "configure: failed program was:" >&5
7272 cat conftest.$ac_ext >&5
7273 rm -rf conftest*
7274 gdb_cv_func_sigsetjmp=no
7275 fi
7276 rm -f conftest*
7277 fi
7278
7279 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
7280 if test $gdb_cv_func_sigsetjmp = yes; then
7281 cat >> confdefs.h <<\EOF
7282 #define HAVE_SIGSETJMP 1
7283 EOF
7284
7285 fi
7286
7287 # Assume we'll default to using the included libiberty regex.
7288 gdb_use_included_regex=yes
7289
7290 # However, if the system regex is GNU regex, then default to *not*
7291 # using the included regex.
7292 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7293 echo "configure:7294: checking for GNU regex" >&5
7294 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7295 echo $ac_n "(cached) $ac_c" 1>&6
7296 else
7297 cat > conftest.$ac_ext <<EOF
7298 #line 7299 "configure"
7299 #include "confdefs.h"
7300 #include <gnu-versions.h>
7301 int main() {
7302 #define REGEX_INTERFACE_VERSION 1
7303 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
7304 # error "Version mismatch"
7305 #endif
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7309 rm -rf conftest*
7310 gdb_cv_have_gnu_regex=yes
7311 else
7312 echo "configure: failed program was:" >&5
7313 cat conftest.$ac_ext >&5
7314 rm -rf conftest*
7315 gdb_cv_have_gnu_regex=no
7316 fi
7317 rm -f conftest*
7318 fi
7319
7320 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7321 if test $gdb_cv_have_gnu_regex = yes; then
7322 gdb_use_included_regex=no
7323 fi
7324
7325 # Check whether --with-included-regex or --without-included-regex was given.
7326 if test "${with_included_regex+set}" = set; then
7327 withval="$with_included_regex"
7328 gdb_with_regex=$withval
7329 else
7330 gdb_with_regex=$gdb_use_included_regex
7331 fi
7332
7333 if test "$gdb_with_regex" = yes; then
7334 cat >> confdefs.h <<\EOF
7335 #define USE_INCLUDED_REGEX 1
7336 EOF
7337
7338 fi
7339
7340 # See if <sys/proc.h> defines `struct thread' with a td_pcb member.
7341 echo $ac_n "checking for td_pcb in struct thread""... $ac_c" 1>&6
7342 echo "configure:7343: checking for td_pcb in struct thread" >&5
7343 if eval "test \"`echo '$''{'gdb_cv_struct_thread_td_pcb'+set}'`\" = set"; then
7344 echo $ac_n "(cached) $ac_c" 1>&6
7345 else
7346 cat > conftest.$ac_ext <<EOF
7347 #line 7348 "configure"
7348 #include "confdefs.h"
7349 #include <sys/param.h>
7350 #include <sys/proc.h>
7351 int main() {
7352 struct thread td; td.td_pcb;
7353 ; return 0; }
7354 EOF
7355 if { (eval echo configure:7356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7356 rm -rf conftest*
7357 gdb_cv_struct_thread_td_pcb=yes
7358 else
7359 echo "configure: failed program was:" >&5
7360 cat conftest.$ac_ext >&5
7361 rm -rf conftest*
7362 gdb_cv_struct_thread_td_pcb=no
7363 fi
7364 rm -f conftest*
7365 fi
7366
7367 echo "$ac_t""$gdb_cv_struct_thread_td_pcb" 1>&6
7368 if test $gdb_cv_struct_thread_td_pcb = yes; then
7369 cat >> confdefs.h <<\EOF
7370 #define HAVE_STRUCT_THREAD_TD_PCB 1
7371 EOF
7372
7373 fi
7374
7375 # See if <sys/lwp.h> defines `struct lwp`.
7376 echo $ac_n "checking for struct lwp""... $ac_c" 1>&6
7377 echo "configure:7378: checking for struct lwp" >&5
7378 if eval "test \"`echo '$''{'gdb_cv_struct_lwp'+set}'`\" = set"; then
7379 echo $ac_n "(cached) $ac_c" 1>&6
7380 else
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384 #include <sys/param.h>
7385 #include <sys/lwp.h>
7386 int main() {
7387 struct lwp l;
7388 ; return 0; }
7389 EOF
7390 if { (eval echo configure:7391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7391 rm -rf conftest*
7392 gdb_cv_struct_lwp=yes
7393 else
7394 echo "configure: failed program was:" >&5
7395 cat conftest.$ac_ext >&5
7396 rm -rf conftest*
7397 gdb_cv_struct_lwp=no
7398 fi
7399 rm -f conftest*
7400 fi
7401
7402 echo "$ac_t""$gdb_cv_struct_lwp" 1>&6
7403 if test $gdb_cv_struct_lwp = yes; then
7404 cat >> confdefs.h <<\EOF
7405 #define HAVE_STRUCT_LWP 1
7406 EOF
7407
7408 fi
7409
7410 # See if <machine/reg.h> degines `struct reg'.
7411 echo $ac_n "checking for struct reg in machine/reg.h""... $ac_c" 1>&6
7412 echo "configure:7413: checking for struct reg in machine/reg.h" >&5
7413 if eval "test \"`echo '$''{'gdb_cv_struct_reg'+set}'`\" = set"; then
7414 echo $ac_n "(cached) $ac_c" 1>&6
7415 else
7416 cat > conftest.$ac_ext <<EOF
7417 #line 7418 "configure"
7418 #include "confdefs.h"
7419 #include <sys/types.h>
7420 #include <machine/reg.h>
7421 int main() {
7422 struct reg r;
7423 ; return 0; }
7424 EOF
7425 if { (eval echo configure:7426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7426 rm -rf conftest*
7427 gdb_cv_struct_reg=yes
7428 else
7429 echo "configure: failed program was:" >&5
7430 cat conftest.$ac_ext >&5
7431 rm -rf conftest*
7432 gdb_cv_struct_reg=no
7433 fi
7434 rm -f conftest*
7435 fi
7436
7437 echo "$ac_t""$gdb_cv_struct_reg" 1>&6
7438 if test $gdb_cv_struct_reg = yes; then
7439 cat >> confdefs.h <<\EOF
7440 #define HAVE_STRUCT_REG 1
7441 EOF
7442
7443 fi
7444
7445 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
7446 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
7447 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
7448 echo "configure:7449: checking for r_fs in struct reg" >&5
7449 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
7450 echo $ac_n "(cached) $ac_c" 1>&6
7451 else
7452 cat > conftest.$ac_ext <<EOF
7453 #line 7454 "configure"
7454 #include "confdefs.h"
7455 #include <machine/reg.h>
7456 int main() {
7457 struct reg r; r.r_fs;
7458 ; return 0; }
7459 EOF
7460 if { (eval echo configure:7461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7461 rm -rf conftest*
7462 gdb_cv_struct_reg_r_fs=yes
7463 else
7464 echo "configure: failed program was:" >&5
7465 cat conftest.$ac_ext >&5
7466 rm -rf conftest*
7467 gdb_cv_struct_reg_r_fs=no
7468 fi
7469 rm -f conftest*
7470 fi
7471
7472 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
7473 if test $gdb_cv_struct_reg_r_fs = yes; then
7474 cat >> confdefs.h <<\EOF
7475 #define HAVE_STRUCT_REG_R_FS 1
7476 EOF
7477
7478 fi
7479 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
7480 echo "configure:7481: checking for r_gs in struct reg" >&5
7481 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
7482 echo $ac_n "(cached) $ac_c" 1>&6
7483 else
7484 cat > conftest.$ac_ext <<EOF
7485 #line 7486 "configure"
7486 #include "confdefs.h"
7487 #include <machine/reg.h>
7488 int main() {
7489 struct reg r; r.r_gs;
7490 ; return 0; }
7491 EOF
7492 if { (eval echo configure:7493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7493 rm -rf conftest*
7494 gdb_cv_struct_reg_r_gs=yes
7495 else
7496 echo "configure: failed program was:" >&5
7497 cat conftest.$ac_ext >&5
7498 rm -rf conftest*
7499 gdb_cv_struct_reg_r_gs=no
7500 fi
7501 rm -f conftest*
7502 fi
7503
7504 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
7505 if test $gdb_cv_struct_reg_r_gs = yes; then
7506 cat >> confdefs.h <<\EOF
7507 #define HAVE_STRUCT_REG_R_GS 1
7508 EOF
7509
7510 fi
7511
7512 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
7513 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
7514 echo "configure:7515: checking for PTRACE_GETREGS" >&5
7515 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
7516 echo $ac_n "(cached) $ac_c" 1>&6
7517 else
7518 cat > conftest.$ac_ext <<EOF
7519 #line 7520 "configure"
7520 #include "confdefs.h"
7521 #include <sys/ptrace.h>
7522 int main() {
7523 PTRACE_GETREGS;
7524 ; return 0; }
7525 EOF
7526 if { (eval echo configure:7527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7527 rm -rf conftest*
7528 gdb_cv_have_ptrace_getregs=yes
7529 else
7530 echo "configure: failed program was:" >&5
7531 cat conftest.$ac_ext >&5
7532 rm -rf conftest*
7533 gdb_cv_have_ptrace_getregs=no
7534 fi
7535 rm -f conftest*
7536 fi
7537
7538 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
7539 if test $gdb_cv_have_ptrace_getregs = yes; then
7540 cat >> confdefs.h <<\EOF
7541 #define HAVE_PTRACE_GETREGS 1
7542 EOF
7543
7544 fi
7545
7546 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
7547 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
7548 echo "configure:7549: checking for PTRACE_GETFPXREGS" >&5
7549 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
7550 echo $ac_n "(cached) $ac_c" 1>&6
7551 else
7552 cat > conftest.$ac_ext <<EOF
7553 #line 7554 "configure"
7554 #include "confdefs.h"
7555 #include <sys/ptrace.h>
7556 int main() {
7557 PTRACE_GETFPXREGS;
7558 ; return 0; }
7559 EOF
7560 if { (eval echo configure:7561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7561 rm -rf conftest*
7562 gdb_cv_have_ptrace_getfpxregs=yes
7563 else
7564 echo "configure: failed program was:" >&5
7565 cat conftest.$ac_ext >&5
7566 rm -rf conftest*
7567 gdb_cv_have_ptrace_getfpxregs=no
7568 fi
7569 rm -f conftest*
7570 fi
7571
7572 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
7573 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
7574 cat >> confdefs.h <<\EOF
7575 #define HAVE_PTRACE_GETFPXREGS 1
7576 EOF
7577
7578 fi
7579
7580 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
7581 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
7582 echo "configure:7583: checking for PT_GETDBREGS" >&5
7583 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
7584 echo $ac_n "(cached) $ac_c" 1>&6
7585 else
7586 cat > conftest.$ac_ext <<EOF
7587 #line 7588 "configure"
7588 #include "confdefs.h"
7589 #include <sys/types.h>
7590 #include <sys/ptrace.h>
7591 int main() {
7592 PT_GETDBREGS;
7593 ; return 0; }
7594 EOF
7595 if { (eval echo configure:7596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7596 rm -rf conftest*
7597 gdb_cv_have_pt_getdbregs=yes
7598 else
7599 echo "configure: failed program was:" >&5
7600 cat conftest.$ac_ext >&5
7601 rm -rf conftest*
7602 gdb_cv_have_pt_getdbregs=no
7603 fi
7604 rm -f conftest*
7605 fi
7606
7607 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
7608 if test $gdb_cv_have_pt_getdbregs = yes; then
7609 cat >> confdefs.h <<\EOF
7610 #define HAVE_PT_GETDBREGS 1
7611 EOF
7612
7613 fi
7614
7615 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
7616 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
7617 echo "configure:7618: checking for PT_GETXMMREGS" >&5
7618 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
7619 echo $ac_n "(cached) $ac_c" 1>&6
7620 else
7621 cat > conftest.$ac_ext <<EOF
7622 #line 7623 "configure"
7623 #include "confdefs.h"
7624 #include <sys/types.h>
7625 #include <sys/ptrace.h>
7626 int main() {
7627 PT_GETXMMREGS;
7628 ; return 0; }
7629 EOF
7630 if { (eval echo configure:7631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7631 rm -rf conftest*
7632 gdb_cv_have_pt_getxmmregs=yes
7633 else
7634 echo "configure: failed program was:" >&5
7635 cat conftest.$ac_ext >&5
7636 rm -rf conftest*
7637 gdb_cv_have_pt_getxmmregs=no
7638 fi
7639 rm -f conftest*
7640 fi
7641
7642 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
7643 if test $gdb_cv_have_pt_getxmmregs = yes; then
7644 cat >> confdefs.h <<\EOF
7645 #define HAVE_PT_GETXMMREGS 1
7646 EOF
7647
7648 fi
7649
7650 # See if stdint.h provides the uintptr_t type.
7651 # Autoconf 2.5X has an improved AC_CHECK_TYPE which will simplify this.
7652 echo $ac_n "checking for uintptr_t in stdint.h""... $ac_c" 1>&6
7653 echo "configure:7654: checking for uintptr_t in stdint.h" >&5
7654 if eval "test \"`echo '$''{'gdb_cv_have_uintptr_t'+set}'`\" = set"; then
7655 echo $ac_n "(cached) $ac_c" 1>&6
7656 else
7657 cat > conftest.$ac_ext <<EOF
7658 #line 7659 "configure"
7659 #include "confdefs.h"
7660 #include <stdint.h>
7661 int main() {
7662 uintptr_t foo = 0;
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7666 rm -rf conftest*
7667 gdb_cv_have_uintptr_t=yes
7668 else
7669 echo "configure: failed program was:" >&5
7670 cat conftest.$ac_ext >&5
7671 rm -rf conftest*
7672 gdb_cv_have_uintptr_t=no
7673 fi
7674 rm -f conftest*
7675 fi
7676
7677 echo "$ac_t""$gdb_cv_have_uintptr_t" 1>&6
7678 if test $gdb_cv_have_uintptr_t = yes; then
7679 cat >> confdefs.h <<\EOF
7680 #define HAVE_UINTPTR_T 1
7681 EOF
7682
7683 fi
7684
7685 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
7686 echo "configure:7687: checking whether malloc must be declared" >&5
7687 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
7688 echo $ac_n "(cached) $ac_c" 1>&6
7689 else
7690 cat > conftest.$ac_ext <<EOF
7691 #line 7692 "configure"
7692 #include "confdefs.h"
7693
7694 #include <stdio.h>
7695 #ifdef HAVE_STRING_H
7696 #include <string.h>
7697 #else
7698 #ifdef HAVE_STRINGS_H
7699 #include <strings.h>
7700 #endif
7701 #endif
7702 #ifdef HAVE_STDLIB_H
7703 #include <stdlib.h>
7704 #endif
7705 #ifdef HAVE_UNISTD_H
7706 #include <unistd.h>
7707 #endif
7708 int main() {
7709 char *(*pfn) = (char *(*)) malloc
7710 ; return 0; }
7711 EOF
7712 if { (eval echo configure:7713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7713 rm -rf conftest*
7714 bfd_cv_decl_needed_malloc=no
7715 else
7716 echo "configure: failed program was:" >&5
7717 cat conftest.$ac_ext >&5
7718 rm -rf conftest*
7719 bfd_cv_decl_needed_malloc=yes
7720 fi
7721 rm -f conftest*
7722 fi
7723
7724 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
7725 if test $bfd_cv_decl_needed_malloc = yes; then
7726 cat >> confdefs.h <<\EOF
7727 #define NEED_DECLARATION_MALLOC 1
7728 EOF
7729
7730 fi
7731
7732 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
7733 echo "configure:7734: checking whether realloc must be declared" >&5
7734 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
7735 echo $ac_n "(cached) $ac_c" 1>&6
7736 else
7737 cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7740
7741 #include <stdio.h>
7742 #ifdef HAVE_STRING_H
7743 #include <string.h>
7744 #else
7745 #ifdef HAVE_STRINGS_H
7746 #include <strings.h>
7747 #endif
7748 #endif
7749 #ifdef HAVE_STDLIB_H
7750 #include <stdlib.h>
7751 #endif
7752 #ifdef HAVE_UNISTD_H
7753 #include <unistd.h>
7754 #endif
7755 int main() {
7756 char *(*pfn) = (char *(*)) realloc
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_decl_needed_realloc=no
7762 else
7763 echo "configure: failed program was:" >&5
7764 cat conftest.$ac_ext >&5
7765 rm -rf conftest*
7766 bfd_cv_decl_needed_realloc=yes
7767 fi
7768 rm -f conftest*
7769 fi
7770
7771 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
7772 if test $bfd_cv_decl_needed_realloc = yes; then
7773 cat >> confdefs.h <<\EOF
7774 #define NEED_DECLARATION_REALLOC 1
7775 EOF
7776
7777 fi
7778
7779 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
7780 echo "configure:7781: checking whether free must be declared" >&5
7781 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
7782 echo $ac_n "(cached) $ac_c" 1>&6
7783 else
7784 cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787
7788 #include <stdio.h>
7789 #ifdef HAVE_STRING_H
7790 #include <string.h>
7791 #else
7792 #ifdef HAVE_STRINGS_H
7793 #include <strings.h>
7794 #endif
7795 #endif
7796 #ifdef HAVE_STDLIB_H
7797 #include <stdlib.h>
7798 #endif
7799 #ifdef HAVE_UNISTD_H
7800 #include <unistd.h>
7801 #endif
7802 int main() {
7803 char *(*pfn) = (char *(*)) free
7804 ; return 0; }
7805 EOF
7806 if { (eval echo configure:7807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7807 rm -rf conftest*
7808 bfd_cv_decl_needed_free=no
7809 else
7810 echo "configure: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7812 rm -rf conftest*
7813 bfd_cv_decl_needed_free=yes
7814 fi
7815 rm -f conftest*
7816 fi
7817
7818 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
7819 if test $bfd_cv_decl_needed_free = yes; then
7820 cat >> confdefs.h <<\EOF
7821 #define NEED_DECLARATION_FREE 1
7822 EOF
7823
7824 fi
7825
7826 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
7827 echo "configure:7828: checking whether strerror must be declared" >&5
7828 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
7829 echo $ac_n "(cached) $ac_c" 1>&6
7830 else
7831 cat > conftest.$ac_ext <<EOF
7832 #line 7833 "configure"
7833 #include "confdefs.h"
7834
7835 #include <stdio.h>
7836 #ifdef HAVE_STRING_H
7837 #include <string.h>
7838 #else
7839 #ifdef HAVE_STRINGS_H
7840 #include <strings.h>
7841 #endif
7842 #endif
7843 #ifdef HAVE_STDLIB_H
7844 #include <stdlib.h>
7845 #endif
7846 #ifdef HAVE_UNISTD_H
7847 #include <unistd.h>
7848 #endif
7849 int main() {
7850 char *(*pfn) = (char *(*)) strerror
7851 ; return 0; }
7852 EOF
7853 if { (eval echo configure:7854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7854 rm -rf conftest*
7855 bfd_cv_decl_needed_strerror=no
7856 else
7857 echo "configure: failed program was:" >&5
7858 cat conftest.$ac_ext >&5
7859 rm -rf conftest*
7860 bfd_cv_decl_needed_strerror=yes
7861 fi
7862 rm -f conftest*
7863 fi
7864
7865 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
7866 if test $bfd_cv_decl_needed_strerror = yes; then
7867 cat >> confdefs.h <<\EOF
7868 #define NEED_DECLARATION_STRERROR 1
7869 EOF
7870
7871 fi
7872
7873 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
7874 echo "configure:7875: checking whether strdup must be declared" >&5
7875 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
7876 echo $ac_n "(cached) $ac_c" 1>&6
7877 else
7878 cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881
7882 #include <stdio.h>
7883 #ifdef HAVE_STRING_H
7884 #include <string.h>
7885 #else
7886 #ifdef HAVE_STRINGS_H
7887 #include <strings.h>
7888 #endif
7889 #endif
7890 #ifdef HAVE_STDLIB_H
7891 #include <stdlib.h>
7892 #endif
7893 #ifdef HAVE_UNISTD_H
7894 #include <unistd.h>
7895 #endif
7896 int main() {
7897 char *(*pfn) = (char *(*)) strdup
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7901 rm -rf conftest*
7902 bfd_cv_decl_needed_strdup=no
7903 else
7904 echo "configure: failed program was:" >&5
7905 cat conftest.$ac_ext >&5
7906 rm -rf conftest*
7907 bfd_cv_decl_needed_strdup=yes
7908 fi
7909 rm -f conftest*
7910 fi
7911
7912 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
7913 if test $bfd_cv_decl_needed_strdup = yes; then
7914 cat >> confdefs.h <<\EOF
7915 #define NEED_DECLARATION_STRDUP 1
7916 EOF
7917
7918 fi
7919
7920 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
7921 echo "configure:7922: checking whether strstr must be declared" >&5
7922 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
7923 echo $ac_n "(cached) $ac_c" 1>&6
7924 else
7925 cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928
7929 #include <stdio.h>
7930 #ifdef HAVE_STRING_H
7931 #include <string.h>
7932 #else
7933 #ifdef HAVE_STRINGS_H
7934 #include <strings.h>
7935 #endif
7936 #endif
7937 #ifdef HAVE_STDLIB_H
7938 #include <stdlib.h>
7939 #endif
7940 #ifdef HAVE_UNISTD_H
7941 #include <unistd.h>
7942 #endif
7943 int main() {
7944 char *(*pfn) = (char *(*)) strstr
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7948 rm -rf conftest*
7949 bfd_cv_decl_needed_strstr=no
7950 else
7951 echo "configure: failed program was:" >&5
7952 cat conftest.$ac_ext >&5
7953 rm -rf conftest*
7954 bfd_cv_decl_needed_strstr=yes
7955 fi
7956 rm -f conftest*
7957 fi
7958
7959 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7960 if test $bfd_cv_decl_needed_strstr = yes; then
7961 cat >> confdefs.h <<\EOF
7962 #define NEED_DECLARATION_STRSTR 1
7963 EOF
7964
7965 fi
7966
7967 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7968 echo "configure:7969: checking whether canonicalize_file_name must be declared" >&5
7969 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
7970 echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972 cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975
7976 #include <stdio.h>
7977 #ifdef HAVE_STRING_H
7978 #include <string.h>
7979 #else
7980 #ifdef HAVE_STRINGS_H
7981 #include <strings.h>
7982 #endif
7983 #endif
7984 #ifdef HAVE_STDLIB_H
7985 #include <stdlib.h>
7986 #endif
7987 #ifdef HAVE_UNISTD_H
7988 #include <unistd.h>
7989 #endif
7990 int main() {
7991 char *(*pfn) = (char *(*)) canonicalize_file_name
7992 ; return 0; }
7993 EOF
7994 if { (eval echo configure:7995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7995 rm -rf conftest*
7996 bfd_cv_decl_needed_canonicalize_file_name=no
7997 else
7998 echo "configure: failed program was:" >&5
7999 cat conftest.$ac_ext >&5
8000 rm -rf conftest*
8001 bfd_cv_decl_needed_canonicalize_file_name=yes
8002 fi
8003 rm -f conftest*
8004 fi
8005
8006 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
8007 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
8008 cat >> confdefs.h <<\EOF
8009 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
8010 EOF
8011
8012 fi
8013
8014
8015 # The following save_state_t checkery is only necessary for HPUX
8016 # versions earlier than 10.20. When those fade from memory, this
8017 # could be expunged. --jsm 1999-03-22
8018
8019 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
8020 echo "configure:8021: checking for HPUX save_state structure" >&5
8021 cat > conftest.$ac_ext <<EOF
8022 #line 8023 "configure"
8023 #include "confdefs.h"
8024 #include <machine/save_state.h>
8025 EOF
8026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8027 egrep "save_state_t" >/dev/null 2>&1; then
8028 rm -rf conftest*
8029 gdb_cv_hpux_savestate=yes
8030 else
8031 rm -rf conftest*
8032 gdb_cv_hpux_savestate=no
8033 fi
8034 rm -f conftest*
8035
8036 cat > conftest.$ac_ext <<EOF
8037 #line 8038 "configure"
8038 #include "confdefs.h"
8039 #include <machine/save_state.h>
8040 EOF
8041 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8042 egrep "ss_wide" >/dev/null 2>&1; then
8043 rm -rf conftest*
8044 gdb_cv_hpux_sswide=yes
8045 else
8046 rm -rf conftest*
8047 gdb_cv_hpux_sswide=no
8048 fi
8049 rm -f conftest*
8050
8051 if test $gdb_cv_hpux_savestate = yes
8052 then
8053 cat >> confdefs.h <<\EOF
8054 #define HAVE_STRUCT_SAVE_STATE_T 1
8055 EOF
8056
8057 fi
8058 if test $gdb_cv_hpux_sswide = yes
8059 then
8060 cat >> confdefs.h <<\EOF
8061 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
8062 EOF
8063
8064 fi
8065 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
8066
8067
8068 # If we are configured native on GNU/Linux, work around problems with
8069 # sys/procfs.h
8070 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
8071
8072 if test "${target}" = "${host}"; then
8073 case "${host}" in
8074 i[3456]86-*-linux*)
8075 cat >> confdefs.h <<\EOF
8076 #define START_INFERIOR_TRAPS_EXPECTED 2
8077 EOF
8078
8079 cat >> confdefs.h <<\EOF
8080 #define sys_quotactl 1
8081 EOF
8082
8083 ;;
8084 ia64-*-aix*)
8085 cat >> confdefs.h <<\EOF
8086 #define NEW_PROC_API 1
8087 EOF
8088
8089 ;;
8090 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
8091 cat >> confdefs.h <<\EOF
8092 #define NEW_PROC_API 1
8093 EOF
8094
8095 ;;
8096 *-*-solaris2.[6789])
8097 cat >> confdefs.h <<\EOF
8098 #define NEW_PROC_API 1
8099 EOF
8100
8101 ;;
8102 mips-sgi-irix5*)
8103 # Work around <sys/proc.h> needing _KMEMUSER problem on IRIX 5.
8104 cat >> confdefs.h <<\EOF
8105 #define _KMEMUSER 1
8106 EOF
8107
8108 ;;
8109 esac
8110 fi
8111
8112 if test "$ac_cv_header_sys_procfs_h" = yes; then
8113 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
8114 echo "configure:8115: checking for pstatus_t in sys/procfs.h" >&5
8115 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
8116 echo $ac_n "(cached) $ac_c" 1>&6
8117 else
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121
8122 #define _SYSCALL32
8123 #include <sys/procfs.h>
8124 int main() {
8125 pstatus_t avar
8126 ; return 0; }
8127 EOF
8128 if { (eval echo configure:8129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8129 rm -rf conftest*
8130 bfd_cv_have_sys_procfs_type_pstatus_t=yes
8131 else
8132 echo "configure: failed program was:" >&5
8133 cat conftest.$ac_ext >&5
8134 rm -rf conftest*
8135 bfd_cv_have_sys_procfs_type_pstatus_t=no
8136
8137 fi
8138 rm -f conftest*
8139 fi
8140
8141 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
8142 cat >> confdefs.h <<\EOF
8143 #define HAVE_PSTATUS_T 1
8144 EOF
8145
8146 fi
8147 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
8148
8149 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
8150 echo "configure:8151: checking for prrun_t in sys/procfs.h" >&5
8151 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
8152 echo $ac_n "(cached) $ac_c" 1>&6
8153 else
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157
8158 #define _SYSCALL32
8159 #include <sys/procfs.h>
8160 int main() {
8161 prrun_t avar
8162 ; return 0; }
8163 EOF
8164 if { (eval echo configure:8165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8165 rm -rf conftest*
8166 bfd_cv_have_sys_procfs_type_prrun_t=yes
8167 else
8168 echo "configure: failed program was:" >&5
8169 cat conftest.$ac_ext >&5
8170 rm -rf conftest*
8171 bfd_cv_have_sys_procfs_type_prrun_t=no
8172
8173 fi
8174 rm -f conftest*
8175 fi
8176
8177 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
8178 cat >> confdefs.h <<\EOF
8179 #define HAVE_PRRUN_T 1
8180 EOF
8181
8182 fi
8183 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
8184
8185 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
8186 echo "configure:8187: checking for gregset_t in sys/procfs.h" >&5
8187 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
8188 echo $ac_n "(cached) $ac_c" 1>&6
8189 else
8190 cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193
8194 #define _SYSCALL32
8195 #include <sys/procfs.h>
8196 int main() {
8197 gregset_t avar
8198 ; return 0; }
8199 EOF
8200 if { (eval echo configure:8201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8201 rm -rf conftest*
8202 bfd_cv_have_sys_procfs_type_gregset_t=yes
8203 else
8204 echo "configure: failed program was:" >&5
8205 cat conftest.$ac_ext >&5
8206 rm -rf conftest*
8207 bfd_cv_have_sys_procfs_type_gregset_t=no
8208
8209 fi
8210 rm -f conftest*
8211 fi
8212
8213 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
8214 cat >> confdefs.h <<\EOF
8215 #define HAVE_GREGSET_T 1
8216 EOF
8217
8218 fi
8219 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
8220
8221 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
8222 echo "configure:8223: checking for fpregset_t in sys/procfs.h" >&5
8223 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
8224 echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226 cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229
8230 #define _SYSCALL32
8231 #include <sys/procfs.h>
8232 int main() {
8233 fpregset_t avar
8234 ; return 0; }
8235 EOF
8236 if { (eval echo configure:8237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8237 rm -rf conftest*
8238 bfd_cv_have_sys_procfs_type_fpregset_t=yes
8239 else
8240 echo "configure: failed program was:" >&5
8241 cat conftest.$ac_ext >&5
8242 rm -rf conftest*
8243 bfd_cv_have_sys_procfs_type_fpregset_t=no
8244
8245 fi
8246 rm -f conftest*
8247 fi
8248
8249 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
8250 cat >> confdefs.h <<\EOF
8251 #define HAVE_FPREGSET_T 1
8252 EOF
8253
8254 fi
8255 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
8256
8257 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
8258 echo "configure:8259: checking for prgregset_t in sys/procfs.h" >&5
8259 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
8260 echo $ac_n "(cached) $ac_c" 1>&6
8261 else
8262 cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265
8266 #define _SYSCALL32
8267 #include <sys/procfs.h>
8268 int main() {
8269 prgregset_t avar
8270 ; return 0; }
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8273 rm -rf conftest*
8274 bfd_cv_have_sys_procfs_type_prgregset_t=yes
8275 else
8276 echo "configure: failed program was:" >&5
8277 cat conftest.$ac_ext >&5
8278 rm -rf conftest*
8279 bfd_cv_have_sys_procfs_type_prgregset_t=no
8280
8281 fi
8282 rm -f conftest*
8283 fi
8284
8285 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
8286 cat >> confdefs.h <<\EOF
8287 #define HAVE_PRGREGSET_T 1
8288 EOF
8289
8290 fi
8291 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
8292
8293 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
8294 echo "configure:8295: checking for prfpregset_t in sys/procfs.h" >&5
8295 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
8296 echo $ac_n "(cached) $ac_c" 1>&6
8297 else
8298 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8301
8302 #define _SYSCALL32
8303 #include <sys/procfs.h>
8304 int main() {
8305 prfpregset_t avar
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8309 rm -rf conftest*
8310 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
8311 else
8312 echo "configure: failed program was:" >&5
8313 cat conftest.$ac_ext >&5
8314 rm -rf conftest*
8315 bfd_cv_have_sys_procfs_type_prfpregset_t=no
8316
8317 fi
8318 rm -f conftest*
8319 fi
8320
8321 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8322 cat >> confdefs.h <<\EOF
8323 #define HAVE_PRFPREGSET_T 1
8324 EOF
8325
8326 fi
8327 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
8328
8329 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
8330 echo "configure:8331: checking for prgregset32_t in sys/procfs.h" >&5
8331 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
8332 echo $ac_n "(cached) $ac_c" 1>&6
8333 else
8334 cat > conftest.$ac_ext <<EOF
8335 #line 8336 "configure"
8336 #include "confdefs.h"
8337
8338 #define _SYSCALL32
8339 #include <sys/procfs.h>
8340 int main() {
8341 prgregset32_t avar
8342 ; return 0; }
8343 EOF
8344 if { (eval echo configure:8345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8345 rm -rf conftest*
8346 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
8347 else
8348 echo "configure: failed program was:" >&5
8349 cat conftest.$ac_ext >&5
8350 rm -rf conftest*
8351 bfd_cv_have_sys_procfs_type_prgregset32_t=no
8352
8353 fi
8354 rm -f conftest*
8355 fi
8356
8357 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
8358 cat >> confdefs.h <<\EOF
8359 #define HAVE_PRGREGSET32_T 1
8360 EOF
8361
8362 fi
8363 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
8364
8365 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
8366 echo "configure:8367: checking for prfpregset32_t in sys/procfs.h" >&5
8367 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
8368 echo $ac_n "(cached) $ac_c" 1>&6
8369 else
8370 cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373
8374 #define _SYSCALL32
8375 #include <sys/procfs.h>
8376 int main() {
8377 prfpregset32_t avar
8378 ; return 0; }
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8381 rm -rf conftest*
8382 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
8383 else
8384 echo "configure: failed program was:" >&5
8385 cat conftest.$ac_ext >&5
8386 rm -rf conftest*
8387 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
8388
8389 fi
8390 rm -f conftest*
8391 fi
8392
8393 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
8394 cat >> confdefs.h <<\EOF
8395 #define HAVE_PRFPREGSET32_T 1
8396 EOF
8397
8398 fi
8399 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
8400
8401 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
8402 echo "configure:8403: checking for lwpid_t in sys/procfs.h" >&5
8403 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
8404 echo $ac_n "(cached) $ac_c" 1>&6
8405 else
8406 cat > conftest.$ac_ext <<EOF
8407 #line 8408 "configure"
8408 #include "confdefs.h"
8409
8410 #define _SYSCALL32
8411 #include <sys/procfs.h>
8412 int main() {
8413 lwpid_t avar
8414 ; return 0; }
8415 EOF
8416 if { (eval echo configure:8417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8417 rm -rf conftest*
8418 bfd_cv_have_sys_procfs_type_lwpid_t=yes
8419 else
8420 echo "configure: failed program was:" >&5
8421 cat conftest.$ac_ext >&5
8422 rm -rf conftest*
8423 bfd_cv_have_sys_procfs_type_lwpid_t=no
8424
8425 fi
8426 rm -f conftest*
8427 fi
8428
8429 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
8430 cat >> confdefs.h <<\EOF
8431 #define HAVE_LWPID_T 1
8432 EOF
8433
8434 fi
8435 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
8436
8437 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
8438 echo "configure:8439: checking for psaddr_t in sys/procfs.h" >&5
8439 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
8440 echo $ac_n "(cached) $ac_c" 1>&6
8441 else
8442 cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445
8446 #define _SYSCALL32
8447 #include <sys/procfs.h>
8448 int main() {
8449 psaddr_t avar
8450 ; return 0; }
8451 EOF
8452 if { (eval echo configure:8453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8453 rm -rf conftest*
8454 bfd_cv_have_sys_procfs_type_psaddr_t=yes
8455 else
8456 echo "configure: failed program was:" >&5
8457 cat conftest.$ac_ext >&5
8458 rm -rf conftest*
8459 bfd_cv_have_sys_procfs_type_psaddr_t=no
8460
8461 fi
8462 rm -f conftest*
8463 fi
8464
8465 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
8466 cat >> confdefs.h <<\EOF
8467 #define HAVE_PSADDR_T 1
8468 EOF
8469
8470 fi
8471 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
8472
8473 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
8474 echo "configure:8475: checking for prsysent_t in sys/procfs.h" >&5
8475 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
8476 echo $ac_n "(cached) $ac_c" 1>&6
8477 else
8478 cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481
8482 #define _SYSCALL32
8483 #include <sys/procfs.h>
8484 int main() {
8485 prsysent_t avar
8486 ; return 0; }
8487 EOF
8488 if { (eval echo configure:8489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8489 rm -rf conftest*
8490 bfd_cv_have_sys_procfs_type_prsysent_t=yes
8491 else
8492 echo "configure: failed program was:" >&5
8493 cat conftest.$ac_ext >&5
8494 rm -rf conftest*
8495 bfd_cv_have_sys_procfs_type_prsysent_t=no
8496
8497 fi
8498 rm -f conftest*
8499 fi
8500
8501 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
8502 cat >> confdefs.h <<\EOF
8503 #define HAVE_PRSYSENT_T 1
8504 EOF
8505
8506 fi
8507 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
8508
8509 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
8510 echo "configure:8511: checking for pr_sigset_t in sys/procfs.h" >&5
8511 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
8512 echo $ac_n "(cached) $ac_c" 1>&6
8513 else
8514 cat > conftest.$ac_ext <<EOF
8515 #line 8516 "configure"
8516 #include "confdefs.h"
8517
8518 #define _SYSCALL32
8519 #include <sys/procfs.h>
8520 int main() {
8521 pr_sigset_t avar
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8525 rm -rf conftest*
8526 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
8527 else
8528 echo "configure: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 rm -rf conftest*
8531 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
8532
8533 fi
8534 rm -f conftest*
8535 fi
8536
8537 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
8538 cat >> confdefs.h <<\EOF
8539 #define HAVE_PR_SIGSET_T 1
8540 EOF
8541
8542 fi
8543 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
8544
8545 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
8546 echo "configure:8547: checking for pr_sigaction64_t in sys/procfs.h" >&5
8547 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
8548 echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553
8554 #define _SYSCALL32
8555 #include <sys/procfs.h>
8556 int main() {
8557 pr_sigaction64_t avar
8558 ; return 0; }
8559 EOF
8560 if { (eval echo configure:8561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8561 rm -rf conftest*
8562 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
8563 else
8564 echo "configure: failed program was:" >&5
8565 cat conftest.$ac_ext >&5
8566 rm -rf conftest*
8567 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
8568
8569 fi
8570 rm -f conftest*
8571 fi
8572
8573 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
8574 cat >> confdefs.h <<\EOF
8575 #define HAVE_PR_SIGACTION64_T 1
8576 EOF
8577
8578 fi
8579 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
8580
8581 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
8582 echo "configure:8583: checking for pr_siginfo64_t in sys/procfs.h" >&5
8583 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
8584 echo $ac_n "(cached) $ac_c" 1>&6
8585 else
8586 cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589
8590 #define _SYSCALL32
8591 #include <sys/procfs.h>
8592 int main() {
8593 pr_siginfo64_t avar
8594 ; return 0; }
8595 EOF
8596 if { (eval echo configure:8597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8597 rm -rf conftest*
8598 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
8599 else
8600 echo "configure: failed program was:" >&5
8601 cat conftest.$ac_ext >&5
8602 rm -rf conftest*
8603 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
8604
8605 fi
8606 rm -f conftest*
8607 fi
8608
8609 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
8610 cat >> confdefs.h <<\EOF
8611 #define HAVE_PR_SIGINFO64_T 1
8612 EOF
8613
8614 fi
8615 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
8616
8617
8618
8619
8620
8621 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
8622 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
8623 echo "configure:8624: checking whether prfpregset_t type is broken" >&5
8624 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
8625 echo $ac_n "(cached) $ac_c" 1>&6
8626 else
8627 if test "$cross_compiling" = yes; then
8628 gdb_cv_prfpregset_t_broken=yes
8629 else
8630 cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 #include <sys/procfs.h>
8634 int main ()
8635 {
8636 if (sizeof (prfpregset_t) == sizeof (void *))
8637 return 1;
8638 return 0;
8639 }
8640 EOF
8641 if { (eval echo configure:8642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8642 then
8643 gdb_cv_prfpregset_t_broken=no
8644 else
8645 echo "configure: failed program was:" >&5
8646 cat conftest.$ac_ext >&5
8647 rm -fr conftest*
8648 gdb_cv_prfpregset_t_broken=yes
8649 fi
8650 rm -fr conftest*
8651 fi
8652
8653 fi
8654
8655 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
8656 if test $gdb_cv_prfpregset_t_broken = yes; then
8657 cat >> confdefs.h <<\EOF
8658 #define PRFPREGSET_T_BROKEN 1
8659 EOF
8660
8661 fi
8662 fi
8663
8664
8665 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
8666 echo "configure:8667: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
8667 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
8668 echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <unistd.h>
8674 #include <sys/types.h>
8675 #include <sys/procfs.h>
8676
8677 int main() {
8678
8679 int dummy;;
8680 dummy = ioctl(0, PIOCSET, &dummy);
8681
8682 ; return 0; }
8683 EOF
8684 if { (eval echo configure:8685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8685 rm -rf conftest*
8686 gdb_cv_have_procfs_piocset=yes
8687 else
8688 echo "configure: failed program was:" >&5
8689 cat conftest.$ac_ext >&5
8690 rm -rf conftest*
8691 gdb_cv_have_procfs_piocset=no
8692 fi
8693 rm -f conftest*
8694 fi
8695
8696 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
8697 if test $gdb_cv_have_procfs_piocset = yes; then
8698 cat >> confdefs.h <<\EOF
8699 #define HAVE_PROCFS_PIOCSET 1
8700 EOF
8701
8702 fi
8703 fi
8704
8705 if test ${host} = ${target} ; then
8706
8707 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
8708 echo "configure:8709: checking for member l_addr in struct link_map" >&5
8709 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
8710 echo $ac_n "(cached) $ac_c" 1>&6
8711 else
8712 cat > conftest.$ac_ext <<EOF
8713 #line 8714 "configure"
8714 #include "confdefs.h"
8715 #include <link.h>
8716 int main() {
8717 struct link_map lm; (void) lm.l_addr;
8718 ; return 0; }
8719 EOF
8720 if { (eval echo configure:8721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8721 rm -rf conftest*
8722 gdb_cv_have_struct_link_map_with_l_members=yes
8723 else
8724 echo "configure: failed program was:" >&5
8725 cat conftest.$ac_ext >&5
8726 rm -rf conftest*
8727 gdb_cv_have_struct_link_map_with_l_members=no
8728 fi
8729 rm -f conftest*
8730 fi
8731
8732 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
8733 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
8734 cat >> confdefs.h <<\EOF
8735 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
8736 EOF
8737
8738 fi
8739
8740
8741 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
8742 echo "configure:8743: checking for member lm_addr in struct link_map" >&5
8743 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
8744 echo $ac_n "(cached) $ac_c" 1>&6
8745 else
8746 cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 #include <sys/types.h>
8750 #include <link.h>
8751 int main() {
8752 struct link_map lm; (void) lm.lm_addr;
8753 ; return 0; }
8754 EOF
8755 if { (eval echo configure:8756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8756 rm -rf conftest*
8757 gdb_cv_have_struct_link_map_with_lm_members=yes
8758 else
8759 echo "configure: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8761 rm -rf conftest*
8762 gdb_cv_have_struct_link_map_with_lm_members=no
8763 fi
8764 rm -f conftest*
8765 fi
8766
8767 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
8768 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
8769 cat >> confdefs.h <<\EOF
8770 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
8771 EOF
8772
8773 fi
8774
8775
8776 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
8777 echo "configure:8778: checking for member som_addr in struct so_map" >&5
8778 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
8779 echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781 cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 #include <sys/types.h>
8785 #ifdef HAVE_NLIST_H
8786 #include <nlist.h>
8787 #endif
8788 #include <link.h>
8789 int main() {
8790 struct so_map lm; (void) lm.som_addr;
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8794 rm -rf conftest*
8795 gdb_cv_have_struct_so_map_with_som_members=yes
8796 else
8797 echo "configure: failed program was:" >&5
8798 cat conftest.$ac_ext >&5
8799 rm -rf conftest*
8800 gdb_cv_have_struct_so_map_with_som_members=no
8801 fi
8802 rm -f conftest*
8803 fi
8804
8805 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
8806 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
8807 cat >> confdefs.h <<\EOF
8808 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
8809 EOF
8810
8811 fi
8812
8813
8814 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
8815 echo "configure:8816: checking for struct link_map32 in sys/link.h" >&5
8816 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
8817 echo $ac_n "(cached) $ac_c" 1>&6
8818 else
8819 cat > conftest.$ac_ext <<EOF
8820 #line 8821 "configure"
8821 #include "confdefs.h"
8822 #define _SYSCALL32
8823 #include <sys/link.h>
8824 int main() {
8825 struct link_map32 l;
8826 ; return 0; }
8827 EOF
8828 if { (eval echo configure:8829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8829 rm -rf conftest*
8830 gdb_cv_have_struct_link_map32=yes
8831 else
8832 echo "configure: failed program was:" >&5
8833 cat conftest.$ac_ext >&5
8834 rm -rf conftest*
8835 gdb_cv_have_struct_link_map32=no
8836 fi
8837 rm -f conftest*
8838 fi
8839
8840 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
8841 if test $gdb_cv_have_struct_link_map32 = yes; then
8842 cat >> confdefs.h <<\EOF
8843 #define HAVE_STRUCT_LINK_MAP32 1
8844 EOF
8845
8846 cat >> confdefs.h <<\EOF
8847 #define _SYSCALL32 1
8848 EOF
8849
8850 fi
8851 fi
8852
8853
8854 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
8855 echo "configure:8856: checking for long long support in compiler" >&5
8856 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
8857 echo $ac_n "(cached) $ac_c" 1>&6
8858 else
8859 cat > conftest.$ac_ext <<EOF
8860 #line 8861 "configure"
8861 #include "confdefs.h"
8862
8863 int main() {
8864
8865 extern long long foo;
8866 switch (foo & 2) { case 0: return 1; }
8867
8868 ; return 0; }
8869 EOF
8870 if { (eval echo configure:8871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8871 rm -rf conftest*
8872 gdb_cv_c_long_long=yes
8873 else
8874 echo "configure: failed program was:" >&5
8875 cat conftest.$ac_ext >&5
8876 rm -rf conftest*
8877 gdb_cv_c_long_long=no
8878 fi
8879 rm -f conftest*
8880 fi
8881
8882 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
8883 if test $gdb_cv_c_long_long = yes; then
8884 cat >> confdefs.h <<\EOF
8885 #define CC_HAS_LONG_LONG 1
8886 EOF
8887
8888 fi
8889
8890
8891 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
8892 echo "configure:8893: checking for long long support in printf" >&5
8893 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
8894 echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896 if test "$cross_compiling" = yes; then
8897 gdb_cv_printf_has_long_long=no
8898 else
8899 cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902
8903 int main () {
8904 char buf[32];
8905 long long l = 0;
8906 l = (l << 16) + 0x0123;
8907 l = (l << 16) + 0x4567;
8908 l = (l << 16) + 0x89ab;
8909 l = (l << 16) + 0xcdef;
8910 sprintf (buf, "0x%016llx", l);
8911 return (strcmp ("0x0123456789abcdef", buf));
8912 }
8913 EOF
8914 if { (eval echo configure:8915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8915 then
8916 gdb_cv_printf_has_long_long=yes
8917 else
8918 echo "configure: failed program was:" >&5
8919 cat conftest.$ac_ext >&5
8920 rm -fr conftest*
8921 gdb_cv_printf_has_long_long=no
8922 fi
8923 rm -fr conftest*
8924 fi
8925
8926 fi
8927
8928 if test $gdb_cv_printf_has_long_long = yes; then
8929 cat >> confdefs.h <<\EOF
8930 #define PRINTF_HAS_LONG_LONG 1
8931 EOF
8932
8933 fi
8934 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8935
8936
8937 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8938 echo "configure:8939: checking for long double support in compiler" >&5
8939 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8940 echo $ac_n "(cached) $ac_c" 1>&6
8941 else
8942 cat > conftest.$ac_ext <<EOF
8943 #line 8944 "configure"
8944 #include "confdefs.h"
8945
8946 int main() {
8947 long double foo;
8948 ; return 0; }
8949 EOF
8950 if { (eval echo configure:8951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8951 rm -rf conftest*
8952 ac_cv_c_long_double=yes
8953 else
8954 echo "configure: failed program was:" >&5
8955 cat conftest.$ac_ext >&5
8956 rm -rf conftest*
8957 ac_cv_c_long_double=no
8958 fi
8959 rm -f conftest*
8960 fi
8961
8962 echo "$ac_t""$ac_cv_c_long_double" 1>&6
8963 if test $ac_cv_c_long_double = yes; then
8964 cat >> confdefs.h <<\EOF
8965 #define HAVE_LONG_DOUBLE 1
8966 EOF
8967
8968 fi
8969
8970
8971 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8972 echo "configure:8973: checking for long double support in printf" >&5
8973 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8974 echo $ac_n "(cached) $ac_c" 1>&6
8975 else
8976 if test "$cross_compiling" = yes; then
8977 gdb_cv_printf_has_long_double=no
8978 else
8979 cat > conftest.$ac_ext <<EOF
8980 #line 8981 "configure"
8981 #include "confdefs.h"
8982
8983 int main () {
8984 char buf[16];
8985 long double f = 3.141592653;
8986 sprintf (buf, "%Lg", f);
8987 return (strncmp ("3.14159", buf, 7));
8988 }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8991 then
8992 gdb_cv_printf_has_long_double=yes
8993 else
8994 echo "configure: failed program was:" >&5
8995 cat conftest.$ac_ext >&5
8996 rm -fr conftest*
8997 gdb_cv_printf_has_long_double=no
8998 fi
8999 rm -fr conftest*
9000 fi
9001
9002 fi
9003
9004 if test $gdb_cv_printf_has_long_double = yes; then
9005 cat >> confdefs.h <<\EOF
9006 #define PRINTF_HAS_LONG_DOUBLE 1
9007 EOF
9008
9009 fi
9010 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
9011
9012
9013 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
9014 echo "configure:9015: checking for long double support in scanf" >&5
9015 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
9016 echo $ac_n "(cached) $ac_c" 1>&6
9017 else
9018 if test "$cross_compiling" = yes; then
9019 gdb_cv_scanf_has_long_double=no
9020 else
9021 cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024
9025 int main () {
9026 char *buf = "3.141592653";
9027 long double f = 0;
9028 sscanf (buf, "%Lg", &f);
9029 return !(f > 3.14159 && f < 3.14160);
9030 }
9031 EOF
9032 if { (eval echo configure:9033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9033 then
9034 gdb_cv_scanf_has_long_double=yes
9035 else
9036 echo "configure: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038 rm -fr conftest*
9039 gdb_cv_scanf_has_long_double=no
9040 fi
9041 rm -fr conftest*
9042 fi
9043
9044 fi
9045
9046 if test $gdb_cv_scanf_has_long_double = yes; then
9047 cat >> confdefs.h <<\EOF
9048 #define SCANF_HAS_LONG_DOUBLE 1
9049 EOF
9050
9051 fi
9052 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
9053
9054 case ${host_os} in
9055 aix*)
9056 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
9057 echo "configure:9058: checking for -bbigtoc option" >&5
9058 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
9059 echo $ac_n "(cached) $ac_c" 1>&6
9060 else
9061
9062 SAVE_LDFLAGS=$LDFLAGS
9063
9064 case $GCC in
9065 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
9066 *) gdb_cv_bigtoc=-bbigtoc ;;
9067 esac
9068
9069 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
9070 cat > conftest.$ac_ext <<EOF
9071 #line 9072 "configure"
9072 #include "confdefs.h"
9073
9074 int main() {
9075 int i;
9076 ; return 0; }
9077 EOF
9078 if { (eval echo configure:9079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9079 :
9080 else
9081 echo "configure: failed program was:" >&5
9082 cat conftest.$ac_ext >&5
9083 rm -rf conftest*
9084 gdb_cv_bigtoc=
9085 fi
9086 rm -f conftest*
9087 LDFLAGS="${SAVE_LDFLAGS}"
9088
9089 fi
9090
9091 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
9092 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
9093 ;;
9094 esac
9095
9096
9097
9098 if test ${build} = ${host} -a ${host} = ${target} ; then
9099 case ${host_os} in
9100 hpux*)
9101 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
9102 echo "configure:9103: checking for HPUX/OSF thread support" >&5
9103 if test -f /usr/include/dce/cma_config.h ; then
9104 if test "$GCC" = "yes" ; then
9105 echo "$ac_t""yes" 1>&6
9106 cat >> confdefs.h <<\EOF
9107 #define HAVE_HPUX_THREAD_SUPPORT 1
9108 EOF
9109
9110 CONFIG_OBS="${CONFIG_OBS} hpux-thread.o"
9111 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
9112 else
9113 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
9114 fi
9115 else
9116 echo "$ac_t""no" 1>&6
9117 fi
9118 ;;
9119 solaris*)
9120 # See if thread_db library is around for Solaris thread debugging.
9121 # Note that we must explicitly test for version 1 of the library
9122 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
9123 # the same API.
9124 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
9125 echo "configure:9126: checking for Solaris thread debugging library" >&5
9126 if test -f /usr/lib/libthread_db.so.1 ; then
9127 echo "$ac_t""yes" 1>&6
9128 cat >> confdefs.h <<\EOF
9129 #define HAVE_THREAD_DB_LIB 1
9130 EOF
9131
9132 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
9133 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
9134 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9135 echo "configure:9136: checking for dlopen in -ldl" >&5
9136 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
9137 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9138 echo $ac_n "(cached) $ac_c" 1>&6
9139 else
9140 ac_save_LIBS="$LIBS"
9141 LIBS="-ldl $LIBS"
9142 cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 /* Override any gcc2 internal prototype to avoid an error. */
9146 /* We use char because int might match the return type of a gcc2
9147 builtin and then its argument prototype would still apply. */
9148 char dlopen();
9149
9150 int main() {
9151 dlopen()
9152 ; return 0; }
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9155 rm -rf conftest*
9156 eval "ac_cv_lib_$ac_lib_var=yes"
9157 else
9158 echo "configure: failed program was:" >&5
9159 cat conftest.$ac_ext >&5
9160 rm -rf conftest*
9161 eval "ac_cv_lib_$ac_lib_var=no"
9162 fi
9163 rm -f conftest*
9164 LIBS="$ac_save_LIBS"
9165
9166 fi
9167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9168 echo "$ac_t""yes" 1>&6
9169 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9170 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9171 cat >> confdefs.h <<EOF
9172 #define $ac_tr_lib 1
9173 EOF
9174
9175 LIBS="-ldl $LIBS"
9176
9177 else
9178 echo "$ac_t""no" 1>&6
9179 fi
9180
9181 if test "$GCC" = "yes" ; then
9182 # The GNU linker requires the -export-dynamic option to make
9183 # all symbols visible in the dynamic symbol table.
9184 hold_ldflags=$LDFLAGS
9185 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
9186 echo "configure:9187: checking for the ld -export-dynamic flag" >&5
9187 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
9188 cat > conftest.$ac_ext <<EOF
9189 #line 9190 "configure"
9190 #include "confdefs.h"
9191
9192 int main() {
9193 int i;
9194 ; return 0; }
9195 EOF
9196 if { (eval echo configure:9197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9197 rm -rf conftest*
9198 found=yes
9199 else
9200 echo "configure: failed program was:" >&5
9201 cat conftest.$ac_ext >&5
9202 rm -rf conftest*
9203 found=no
9204 fi
9205 rm -f conftest*
9206 LDFLAGS=$hold_ldflags
9207 echo "$ac_t""$found" 1>&6
9208 if test $found = yes; then
9209 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
9210 fi
9211 fi
9212 # Sun randomly tweaked the prototypes in <proc_service.h>
9213 # at one point.
9214 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
9215 echo "configure:9216: checking if <proc_service.h> is old" >&5
9216 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
9217 echo $ac_n "(cached) $ac_c" 1>&6
9218 else
9219
9220 cat > conftest.$ac_ext <<EOF
9221 #line 9222 "configure"
9222 #include "confdefs.h"
9223
9224 #include <proc_service.h>
9225 ps_err_e ps_pdwrite
9226 (struct ps_prochandle*, psaddr_t, const void*, size_t);
9227
9228 int main() {
9229
9230 ; return 0; }
9231 EOF
9232 if { (eval echo configure:9233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9233 rm -rf conftest*
9234 gdb_cv_proc_service_is_old=no
9235 else
9236 echo "configure: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9238 rm -rf conftest*
9239 gdb_cv_proc_service_is_old=yes
9240 fi
9241 rm -f conftest*
9242
9243 fi
9244
9245 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
9246 if test $gdb_cv_proc_service_is_old = yes; then
9247 cat >> confdefs.h <<\EOF
9248 #define PROC_SERVICE_IS_OLD 1
9249 EOF
9250
9251 fi
9252 else
9253 echo "$ac_t""no" 1>&6
9254 fi
9255 ;;
9256 aix*)
9257 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
9258 echo "configure:9259: checking for AiX thread debugging library" >&5
9259 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
9260 echo $ac_n "(cached) $ac_c" 1>&6
9261 else
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 #include <sys/pthdebug.h>
9266 int main() {
9267 #ifndef PTHDB_VERSION_3
9268 #error
9269 #endif
9270 ; return 0; }
9271 EOF
9272 if { (eval echo configure:9273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9273 rm -rf conftest*
9274 gdb_cv_have_aix_thread_debug=yes
9275 else
9276 echo "configure: failed program was:" >&5
9277 cat conftest.$ac_ext >&5
9278 rm -rf conftest*
9279 gdb_cv_have_aix_thread_debug=no
9280 fi
9281 rm -f conftest*
9282 fi
9283
9284 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
9285 if test $gdb_cv_have_aix_thread_debug = yes; then
9286 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
9287 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
9288 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
9289 fi
9290 ;;
9291 esac
9292
9293 fi
9294
9295 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
9296 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
9297 echo "configure:9298: checking whether <thread_db.h> has TD_NOTALLOC" >&5
9298 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
9299 echo $ac_n "(cached) $ac_c" 1>&6
9300 else
9301 cat > conftest.$ac_ext <<EOF
9302 #line 9303 "configure"
9303 #include "confdefs.h"
9304 #include <thread_db.h>
9305 int main() {
9306 int i = TD_NOTALLOC;
9307 ; return 0; }
9308 EOF
9309 if { (eval echo configure:9310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9310 rm -rf conftest*
9311 gdb_cv_thread_db_h_has_td_notalloc=yes
9312 else
9313 echo "configure: failed program was:" >&5
9314 cat conftest.$ac_ext >&5
9315 rm -rf conftest*
9316 gdb_cv_thread_db_h_has_td_notalloc=no
9317
9318 fi
9319 rm -f conftest*
9320
9321 fi
9322
9323 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
9324 fi
9325 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
9326 cat >> confdefs.h <<\EOF
9327 #define THREAD_DB_HAS_TD_NOTALLOC 1
9328 EOF
9329
9330 fi
9331
9332 if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
9333 echo $ac_n "checking whether <sys/syscall.h> has __NR_tkill""... $ac_c" 1>&6
9334 echo "configure:9335: checking whether <sys/syscall.h> has __NR_tkill" >&5
9335 if eval "test \"`echo '$''{'gdb_cv_sys_syscall_h_has_tkill'+set}'`\" = set"; then
9336 echo $ac_n "(cached) $ac_c" 1>&6
9337 else
9338 cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341 #include <sys/syscall.h>
9342 int main() {
9343 int i = __NR_tkill;
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9347 rm -rf conftest*
9348 gdb_cv_sys_syscall_h_has_tkill=yes
9349 else
9350 echo "configure: failed program was:" >&5
9351 cat conftest.$ac_ext >&5
9352 rm -rf conftest*
9353 gdb_cv_sys_syscall_h_has_tkill=no
9354
9355 fi
9356 rm -f conftest*
9357
9358 fi
9359
9360 echo "$ac_t""$gdb_cv_sys_syscall_h_has_tkill" 1>&6
9361 fi
9362 if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
9363 cat >> confdefs.h <<\EOF
9364 #define HAVE_TKILL_SYSCALL 1
9365 EOF
9366
9367 fi
9368
9369
9370 # Check whether --with-sysroot or --without-sysroot was given.
9371 if test "${with_sysroot+set}" = set; then
9372 withval="$with_sysroot"
9373
9374 case ${with_sysroot} in
9375 yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
9376 *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
9377 esac
9378
9379 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
9380
9381 if test "x$exec_prefix" = xNONE; then
9382 if test "x$prefix" = xNONE; then
9383 test_prefix=/usr/local
9384 else
9385 test_prefix=$prefix
9386 fi
9387 else
9388 test_prefix=$exec_prefix
9389 fi
9390 case ${TARGET_SYSTEM_ROOT} in
9391 "${test_prefix}"|"${test_prefix}/"*|\
9392 '${exec_prefix}'|'${exec_prefix}/'*)
9393 t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
9394 TARGET_SYSTEM_ROOT_DEFINE="$t"
9395 ;;
9396 esac
9397
9398 else
9399
9400 TARGET_SYSTEM_ROOT=
9401 TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
9402
9403 fi
9404
9405
9406
9407
9408 # NOTE: Don't add -Wall or -Wunused, they both include
9409 # -Wunused-parameter which reports bogus warnings.
9410 # NOTE: If you add to this list, remember to update
9411 # gdb/doc/gdbint.texinfo.
9412 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
9413 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized -Wformat-nonliteral \
9414 -Wunused-label -Wunused-function"
9415 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
9416 # -Wunused-function -Wunused-variable -Wunused-value
9417 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
9418 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
9419 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
9420 # -Woverloaded-virtual -Winline -Werror"
9421 # Check whether --enable-build-warnings or --disable-build-warnings was given.
9422 if test "${enable_build_warnings+set}" = set; then
9423 enableval="$enable_build_warnings"
9424 case "${enableval}" in
9425 yes) ;;
9426 no) build_warnings="-w";;
9427 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9428 build_warnings="${build_warnings} ${t}";;
9429 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9430 build_warnings="${t} ${build_warnings}";;
9431 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9432 esac
9433 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9434 echo "Setting compiler warning flags = $build_warnings" 6>&1
9435 fi
9436 fi
9437 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
9438 if test "${enable_gdb_build_warnings+set}" = set; then
9439 enableval="$enable_gdb_build_warnings"
9440 case "${enableval}" in
9441 yes) ;;
9442 no) build_warnings="-w";;
9443 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9444 build_warnings="${build_warnings} ${t}";;
9445 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
9446 build_warnings="${t} ${build_warnings}";;
9447 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
9448 esac
9449 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
9450 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
9451 fi
9452 fi
9453 WARN_CFLAGS=""
9454 WERROR_CFLAGS=""
9455 if test "x${build_warnings}" != x -a "x$GCC" = xyes
9456 then
9457 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
9458 echo "configure:9459: checking compiler warning flags" >&5
9459 # Separate out the -Werror flag as some files just cannot be
9460 # compiled with it enabled.
9461 for w in ${build_warnings}; do
9462 case $w in
9463 -Werr*) WERROR_CFLAGS=-Werror ;;
9464 *) # Check that GCC accepts it
9465 saved_CFLAGS="$CFLAGS"
9466 CFLAGS="$CFLAGS $w"
9467 cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470
9471 int main() {
9472
9473 ; return 0; }
9474 EOF
9475 if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9476 rm -rf conftest*
9477 WARN_CFLAGS="${WARN_CFLAGS} $w"
9478 else
9479 echo "configure: failed program was:" >&5
9480 cat conftest.$ac_ext >&5
9481 fi
9482 rm -f conftest*
9483 CFLAGS="$saved_CFLAGS"
9484 esac
9485 done
9486 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
9487 fi
9488
9489
9490
9491 # In the Cygwin environment, we need some additional flags.
9492 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
9493 echo "configure:9494: checking for cygwin" >&5
9494 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
9495 echo $ac_n "(cached) $ac_c" 1>&6
9496 else
9497 cat > conftest.$ac_ext <<EOF
9498 #line 9499 "configure"
9499 #include "confdefs.h"
9500
9501 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
9502 lose
9503 #endif
9504 EOF
9505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9506 egrep "lose" >/dev/null 2>&1; then
9507 rm -rf conftest*
9508 gdb_cv_os_cygwin=yes
9509 else
9510 rm -rf conftest*
9511 gdb_cv_os_cygwin=no
9512 fi
9513 rm -f conftest*
9514
9515 fi
9516
9517 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
9518
9519
9520 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
9521 case ${host} in
9522 *go32* ) SER_HARDWIRE=ser-go32.o ;;
9523 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
9524 esac
9525
9526
9527 # libreadline needs libuser32.a in a cygwin environment
9528 WIN32LIBS=
9529 if test x$gdb_cv_os_cygwin = xyes; then
9530 WIN32LIBS="-luser32"
9531 case "${target}" in
9532 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
9533 ;;
9534 esac
9535 fi
9536
9537
9538 LIBGUI="../libgui/src/libgui.a"
9539 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
9540
9541
9542
9543 WIN32LDAPP=
9544
9545
9546
9547 case "${host}" in
9548 *-*-cygwin*)
9549 configdir="win"
9550 ;;
9551 *)
9552 configdir="unix"
9553 ;;
9554 esac
9555
9556 GDBTKLIBS=
9557 if test "${enable_gdbtk}" = "yes"; then
9558
9559 # Gdbtk must have an absolute path to srcdir in order to run
9560 # properly when not installed.
9561 here=`pwd`
9562 cd ${srcdir}
9563 GDBTK_SRC_DIR=`pwd`
9564 cd $here
9565
9566
9567 #
9568 # Ok, lets find the tcl configuration
9569 # First, look for one uninstalled.
9570 # the alternative search directory is invoked by --with-tclconfig
9571 #
9572
9573 if test x"${no_tcl}" = x ; then
9574 # we reset no_tcl in case something fails here
9575 no_tcl=true
9576 # Check whether --with-tclconfig or --without-tclconfig was given.
9577 if test "${with_tclconfig+set}" = set; then
9578 withval="$with_tclconfig"
9579 with_tclconfig=${withval}
9580 fi
9581
9582 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
9583 echo "configure:9584: checking for Tcl configuration" >&5
9584 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
9585 echo $ac_n "(cached) $ac_c" 1>&6
9586 else
9587
9588
9589 # First check to see if --with-tclconfig was specified.
9590 if test x"${with_tclconfig}" != x ; then
9591 if test -f "${with_tclconfig}/tclConfig.sh" ; then
9592 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
9593 else
9594 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
9595 fi
9596 fi
9597
9598 # then check for a private Tcl installation
9599 if test x"${ac_cv_c_tclconfig}" = x ; then
9600 for i in \
9601 ../tcl \
9602 `ls -dr ../tcl[7-9]* 2>/dev/null` \
9603 ../../tcl \
9604 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
9605 ../../../tcl \
9606 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
9607 if test -f "$i/${configdir}/tclConfig.sh" ; then
9608 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9609 break
9610 fi
9611 done
9612 fi
9613 # check in a few common install locations
9614 if test x"${ac_cv_c_tclconfig}" = x ; then
9615 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9616 if test -f "$i/tclConfig.sh" ; then
9617 ac_cv_c_tclconfig=`(cd $i; pwd)`
9618 break
9619 fi
9620 done
9621 fi
9622 # check in a few other private locations
9623 if test x"${ac_cv_c_tclconfig}" = x ; then
9624 for i in \
9625 ${srcdir}/../tcl \
9626 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
9627 if test -f "$i/${configdir}/tclConfig.sh" ; then
9628 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
9629 break
9630 fi
9631 done
9632 fi
9633
9634 fi
9635
9636 if test x"${ac_cv_c_tclconfig}" = x ; then
9637 TCLCONFIG="# no Tcl configs found"
9638 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
9639 else
9640 no_tcl=
9641 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
9642 echo "$ac_t""found $TCLCONFIG" 1>&6
9643 fi
9644 fi
9645
9646 if test -z "${no_tcl}"; then
9647
9648 . $TCLCONFIG
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676 #
9677 # Ok, lets find the tk configuration
9678 # First, look for one uninstalled.
9679 # the alternative search directory is invoked by --with-tkconfig
9680 #
9681
9682 if test x"${no_tk}" = x ; then
9683 # we reset no_tk in case something fails here
9684 no_tk=true
9685 # Check whether --with-tkconfig or --without-tkconfig was given.
9686 if test "${with_tkconfig+set}" = set; then
9687 withval="$with_tkconfig"
9688 with_tkconfig=${withval}
9689 fi
9690
9691 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
9692 echo "configure:9693: checking for Tk configuration" >&5
9693 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
9694 echo $ac_n "(cached) $ac_c" 1>&6
9695 else
9696
9697
9698 # First check to see if --with-tkconfig was specified.
9699 if test x"${with_tkconfig}" != x ; then
9700 if test -f "${with_tkconfig}/tkConfig.sh" ; then
9701 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
9702 else
9703 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
9704 fi
9705 fi
9706
9707 # then check for a private Tk library
9708 if test x"${ac_cv_c_tkconfig}" = x ; then
9709 for i in \
9710 ../tk \
9711 `ls -dr ../tk[4-9]* 2>/dev/null` \
9712 ../../tk \
9713 `ls -dr ../../tk[4-9]* 2>/dev/null` \
9714 ../../../tk \
9715 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
9716 if test -f "$i/${configdir}/tkConfig.sh" ; then
9717 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9718 break
9719 fi
9720 done
9721 fi
9722 # check in a few common install locations
9723 if test x"${ac_cv_c_tkconfig}" = x ; then
9724 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9725 if test -f "$i/tkConfig.sh" ; then
9726 ac_cv_c_tkconfig=`(cd $i; pwd)`
9727 break
9728 fi
9729 done
9730 fi
9731 # check in a few other private locations
9732 if test x"${ac_cv_c_tkconfig}" = x ; then
9733 for i in \
9734 ${srcdir}/../tk \
9735 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
9736 if test -f "$i/${configdir}/tkConfig.sh" ; then
9737 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
9738 break
9739 fi
9740 done
9741 fi
9742
9743 fi
9744
9745 if test x"${ac_cv_c_tkconfig}" = x ; then
9746 TKCONFIG="# no Tk configs found"
9747 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
9748 else
9749 no_tk=
9750 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
9751 echo "$ac_t""found $TKCONFIG" 1>&6
9752 fi
9753 fi
9754
9755
9756
9757 # now look for Tcl library stuff
9758
9759 tcldir="../tcl/${configdir}/"
9760
9761 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
9762
9763 # If $no_tk is nonempty, then we can't do Tk, and there is no
9764 # point to doing Tcl.
9765 if test -z "${no_tk}"; then
9766
9767 if test -f "$TKCONFIG" ; then
9768 . $TKCONFIG
9769 fi
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784 #
9785 # Ok, lets find the tcl source trees so we can use the headers
9786 # Warning: transition of version 9 to 10 will break this algorithm
9787 # because 10 sorts before 9. We also look for just tcl. We have to
9788 # be careful that we don't match stuff like tclX by accident.
9789 # the alternative search directory is involked by --with-tclinclude
9790 #
9791
9792 no_tcl=true
9793 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
9794 echo "configure:9795: checking for Tcl private headers. dir=${configdir}" >&5
9795 # Check whether --with-tclinclude or --without-tclinclude was given.
9796 if test "${with_tclinclude+set}" = set; then
9797 withval="$with_tclinclude"
9798 with_tclinclude=${withval}
9799 fi
9800
9801 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
9802 echo $ac_n "(cached) $ac_c" 1>&6
9803 else
9804
9805 # first check to see if --with-tclinclude was specified
9806 if test x"${with_tclinclude}" != x ; then
9807 if test -f ${with_tclinclude}/tclInt.h ; then
9808 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
9809 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
9810 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
9811 else
9812 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9813 fi
9814 fi
9815
9816 # next check if it came with Tcl configuration file
9817 if test x"${ac_cv_c_tclconfig}" = x ; then
9818 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
9819 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
9820 fi
9821 fi
9822
9823 # next check in private source directory
9824 #
9825 # since ls returns lowest version numbers first, reverse its output
9826 if test x"${ac_cv_c_tclh}" = x ; then
9827 for i in \
9828 ${srcdir}/../tcl \
9829 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
9830 ${srcdir}/../../tcl \
9831 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
9832 ${srcdir}/../../../tcl \
9833 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
9834 if test -f $i/generic/tclInt.h ; then
9835 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9836 break
9837 fi
9838 done
9839 fi
9840 # finally check in a few common install locations
9841 #
9842 # since ls returns lowest version numbers first, reverse its output
9843 if test x"${ac_cv_c_tclh}" = x ; then
9844 for i in \
9845 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
9846 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
9847 /usr/local/src/tcl \
9848 /usr/local/lib/tcl \
9849 ${prefix}/include ; do
9850 if test -f $i/generic/tclInt.h ; then
9851 ac_cv_c_tclh=`(cd $i/generic; pwd)`
9852 break
9853 fi
9854 done
9855 fi
9856 # see if one is installed
9857 if test x"${ac_cv_c_tclh}" = x ; then
9858 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9859 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9860 echo "configure:9861: checking for tclInt.h" >&5
9861 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9862 echo $ac_n "(cached) $ac_c" 1>&6
9863 else
9864 cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867 #include <tclInt.h>
9868 EOF
9869 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9870 { (eval echo configure:9871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9871 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9872 if test -z "$ac_err"; then
9873 rm -rf conftest*
9874 eval "ac_cv_header_$ac_safe=yes"
9875 else
9876 echo "$ac_err" >&5
9877 echo "configure: failed program was:" >&5
9878 cat conftest.$ac_ext >&5
9879 rm -rf conftest*
9880 eval "ac_cv_header_$ac_safe=no"
9881 fi
9882 rm -f conftest*
9883 fi
9884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9885 echo "$ac_t""yes" 1>&6
9886 ac_cv_c_tclh=installed
9887 else
9888 echo "$ac_t""no" 1>&6
9889 ac_cv_c_tclh=""
9890 fi
9891
9892 fi
9893
9894 fi
9895
9896 if test x"${ac_cv_c_tclh}" = x ; then
9897 TCLHDIR="# no Tcl private headers found"
9898 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9899 fi
9900 if test x"${ac_cv_c_tclh}" != x ; then
9901 no_tcl=""
9902 if test x"${ac_cv_c_tclh}" = x"installed" ; then
9903 echo "$ac_t""is installed" 1>&6
9904 TCLHDIR=""
9905 else
9906 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9907 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9908 TCLHDIR="-I${ac_cv_c_tclh}"
9909 fi
9910 fi
9911
9912
9913
9914
9915 #
9916 # Ok, lets find the tk source trees so we can use the headers
9917 # If the directory (presumably symlink) named "tk" exists, use that one
9918 # in preference to any others. Same logic is used when choosing library
9919 # and again with Tcl. The search order is the best place to look first, then in
9920 # decreasing significance. The loop breaks if the trigger file is found.
9921 # Note the gross little conversion here of srcdir by cd'ing to the found
9922 # directory. This converts the path from a relative to an absolute, so
9923 # recursive cache variables for the path will work right. We check all
9924 # the possible paths in one loop rather than many seperate loops to speed
9925 # things up.
9926 # the alternative search directory is involked by --with-tkinclude
9927 #
9928 no_tk=true
9929 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9930 echo "configure:9931: checking for Tk private headers" >&5
9931 # Check whether --with-tkinclude or --without-tkinclude was given.
9932 if test "${with_tkinclude+set}" = set; then
9933 withval="$with_tkinclude"
9934 with_tkinclude=${withval}
9935 fi
9936
9937 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9938 echo $ac_n "(cached) $ac_c" 1>&6
9939 else
9940
9941 # first check to see if --with-tkinclude was specified
9942 if test x"${with_tkinclude}" != x ; then
9943 if test -f ${with_tkinclude}/tk.h ; then
9944 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9945 elif test -f ${with_tkinclude}/generic/tk.h ; then
9946 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9947 else
9948 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9949 fi
9950 fi
9951
9952 # next check if it came with Tk configuration file
9953 if test x"${ac_cv_c_tkconfig}" = x ; then
9954 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9955 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9956 fi
9957 fi
9958
9959 # next check in private source directory
9960 #
9961 # since ls returns lowest version numbers first, reverse its output
9962 if test x"${ac_cv_c_tkh}" = x ; then
9963 for i in \
9964 ${srcdir}/../tk \
9965 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9966 ${srcdir}/../../tk \
9967 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9968 ${srcdir}/../../../tk \
9969 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9970 if test -f $i/generic/tk.h ; then
9971 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9972 break
9973 fi
9974 done
9975 fi
9976 # finally check in a few common install locations
9977 #
9978 # since ls returns lowest version numbers first, reverse its output
9979 if test x"${ac_cv_c_tkh}" = x ; then
9980 for i in \
9981 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9982 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9983 /usr/local/src/tk \
9984 /usr/local/lib/tk \
9985 ${prefix}/include ; do
9986 if test -f $i/generic/tk.h ; then
9987 ac_cv_c_tkh=`(cd $i/generic; pwd)`
9988 break
9989 fi
9990 done
9991 fi
9992 # see if one is installed
9993 if test x"${ac_cv_c_tkh}" = x ; then
9994 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9995 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9996 echo "configure:9997: checking for tk.h" >&5
9997 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9998 echo $ac_n "(cached) $ac_c" 1>&6
9999 else
10000 cat > conftest.$ac_ext <<EOF
10001 #line 10002 "configure"
10002 #include "confdefs.h"
10003 #include <tk.h>
10004 EOF
10005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10006 { (eval echo configure:10007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10008 if test -z "$ac_err"; then
10009 rm -rf conftest*
10010 eval "ac_cv_header_$ac_safe=yes"
10011 else
10012 echo "$ac_err" >&5
10013 echo "configure: failed program was:" >&5
10014 cat conftest.$ac_ext >&5
10015 rm -rf conftest*
10016 eval "ac_cv_header_$ac_safe=no"
10017 fi
10018 rm -f conftest*
10019 fi
10020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10021 echo "$ac_t""yes" 1>&6
10022 ac_cv_c_tkh=installed
10023 else
10024 echo "$ac_t""no" 1>&6
10025 ac_cv_c_tkh=""
10026 fi
10027
10028 fi
10029
10030 fi
10031
10032 if test x"${ac_cv_c_tkh}" != x ; then
10033 no_tk=""
10034 if test x"${ac_cv_c_tkh}" = x"installed" ; then
10035 echo "$ac_t""is installed" 1>&6
10036 TKHDIR=""
10037 else
10038 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
10039 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
10040 TKHDIR="-I${ac_cv_c_tkh}"
10041 fi
10042 else
10043 TKHDIR="# no Tk directory found"
10044 echo "configure: warning: Can't find Tk private headers" 1>&2
10045 no_tk=true
10046 fi
10047
10048
10049
10050
10051 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
10052 echo "configure:10053: checking for Itcl private headers. srcdir=${srcdir}" >&5
10053 if test x"${ac_cv_c_itclh}" = x ; then
10054 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
10055 if test -f $i/generic/itcl.h ; then
10056 ac_cv_c_itclh=`(cd $i/generic; pwd)`
10057 break
10058 fi
10059 done
10060 fi
10061 if test x"${ac_cv_c_itclh}" = x ; then
10062 ITCLHDIR="# no Itcl private headers found"
10063 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
10064 fi
10065 if test x"${ac_cv_c_itclh}" != x ; then
10066 ITCLHDIR="-I${ac_cv_c_itclh}"
10067 fi
10068 # should always be here
10069 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
10070
10071 #AC_SUBST(ITCLLIB)
10072
10073
10074 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
10075 echo "configure:10076: checking for Itk private headers. srcdir=${srcdir}" >&5
10076 if test x"${ac_cv_c_itkh}" = x ; then
10077 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
10078 if test -f $i/generic/itk.h ; then
10079 ac_cv_c_itkh=`(cd $i/generic; pwd)`
10080 break
10081 fi
10082 done
10083 fi
10084 if test x"${ac_cv_c_itkh}" = x ; then
10085 ITKHDIR="# no Itk private headers found"
10086 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
10087 fi
10088 if test x"${ac_cv_c_itkh}" != x ; then
10089 ITKHDIR="-I${ac_cv_c_itkh}"
10090 fi
10091 # should always be here
10092 # ITKLIB="../itcl/itk/unix/libitk.a"
10093
10094 #AC_SUBST(ITKLIB)
10095
10096
10097
10098 # now look for Tk library stuff
10099
10100 tkdir="../tk/${configdir}/"
10101
10102 TK_DEPS="${tkdir}${TK_LIB_FILE}"
10103
10104 # now look for Itcl library stuff
10105
10106
10107 #
10108 # Ok, lets find the itcl configuration
10109 # First, look for one uninstalled.
10110 # the alternative search directory is invoked by --with-itclconfig
10111 #
10112
10113 if test x"${no_itcl}" = x ; then
10114 # we reset no_itcl in case something fails here
10115 no_itcl=true
10116 # Check whether --with-itclconfig or --without-itclconfig was given.
10117 if test "${with_itclconfig+set}" = set; then
10118 withval="$with_itclconfig"
10119 with_itclconfig=${withval}
10120 fi
10121
10122 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
10123 echo "configure:10124: checking for Itcl configuration" >&5
10124 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
10125 echo $ac_n "(cached) $ac_c" 1>&6
10126 else
10127
10128
10129 # First check to see if --with-itclconfig was specified.
10130 if test x"${with_itclconfig}" != x ; then
10131 if test -f "${with_itclconfig}/itclConfig.sh" ; then
10132 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
10133 else
10134 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
10135 fi
10136 fi
10137
10138 # then check for a private Itcl library
10139 if test x"${ac_cv_c_itclconfig}" = x ; then
10140 for i in \
10141 ../itcl/itcl \
10142 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
10143 ../../itcl \
10144 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
10145 ../../../itcl \
10146 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
10147 if test -f "$i/itclConfig.sh" ; then
10148 ac_cv_c_itclconfig=`(cd $i; pwd)`
10149 break
10150 fi
10151 done
10152 fi
10153 # check in a few common install locations
10154 if test x"${ac_cv_c_itclconfig}" = x ; then
10155 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10156 if test -f "$i/itclConfig.sh" ; then
10157 ac_cv_c_itclconfig=`(cd $i; pwd)`
10158 break
10159 fi
10160 done
10161 fi
10162 # check in a few other private locations
10163 if test x"${ac_cv_c_itclconfig}" = x ; then
10164 for i in \
10165 ${srcdir}/../itcl/itcl \
10166 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
10167 if test -f "$i/itclConfig.sh" ; then
10168 ac_cv_c_itclconfig=`(cd $i; pwd)`
10169 break
10170 fi
10171 done
10172 fi
10173
10174 fi
10175
10176 if test x"${ac_cv_c_itclconfig}" = x ; then
10177 ITCLCONFIG="# no Itcl configs found"
10178 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
10179 else
10180 no_itcl=
10181 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
10182 echo "$ac_t""found $ITCLCONFIG" 1>&6
10183 fi
10184 fi
10185
10186 if test -z "${no_itcl}"; then
10187
10188 if test -f "$ITCLCONFIG" ; then
10189 . $ITCLCONFIG
10190 fi
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
10204 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
10205 fi
10206
10207
10208 # now look for Itk library stuff
10209
10210 #
10211 # Ok, lets find the itk configuration
10212 # First, look for one uninstalled.
10213 # the alternative search directory is invoked by --with-itkconfig
10214 #
10215
10216 if test x"${no_itk}" = x ; then
10217 # we reset no_itk in case something fails here
10218 no_itk=true
10219 # Check whether --with-itkconfig or --without-itkconfig was given.
10220 if test "${with_itkconfig+set}" = set; then
10221 withval="$with_itkconfig"
10222 with_itkconfig=${withval}
10223 fi
10224
10225 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
10226 echo "configure:10227: checking for Itk configuration" >&5
10227 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
10228 echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230
10231
10232 # First check to see if --with-itkconfig was specified.
10233 if test x"${with_itkconfig}" != x ; then
10234 if test -f "${with_itkconfig}/itkConfig.sh" ; then
10235 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
10236 else
10237 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
10238 fi
10239 fi
10240
10241 # then check for a private Itk library
10242 if test x"${ac_cv_c_itkconfig}" = x ; then
10243 for i in \
10244 ../itcl/itk \
10245 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
10246 ../../itk \
10247 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
10248 ../../../itk \
10249 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
10250 if test -f "$i/itkConfig.sh" ; then
10251 ac_cv_c_itkconfig=`(cd $i; pwd)`
10252 break
10253 fi
10254 done
10255 fi
10256 # check in a few common install locations
10257 if test x"${ac_cv_c_itkconfig}" = x ; then
10258 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
10259 if test -f "$i/itkConfig.sh" ; then
10260 ac_cv_c_itkconfig=`(cd $i; pwd)`
10261 break
10262 fi
10263 done
10264 fi
10265 # check in a few other private locations
10266 if test x"${ac_cv_c_itkconfig}" = x ; then
10267 for i in \
10268 ${srcdir}/../itcl/itk \
10269 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
10270 if test -f "$i/itkConfig.sh" ; then
10271 ac_cv_c_itkconfig=`(cd $i; pwd)`
10272 break
10273 fi
10274 done
10275 fi
10276
10277 fi
10278
10279 if test x"${ac_cv_c_itkconfig}" = x ; then
10280 ITKCONFIG="# no Itk configs found"
10281 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
10282 else
10283 no_itk=
10284 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
10285 echo "$ac_t""found $ITKCONFIG" 1>&6
10286 fi
10287 fi
10288
10289
10290 if test -z "${no_itcl}"; then
10291
10292 if test -f "$ITKCONFIG" ; then
10293 . $ITKCONFIG
10294 fi
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307 ITKLIB="${ITK_BUILD_LIB_SPEC}"
10308 ITK_DEPS="${ITK_LIB_FULL_PATH}"
10309 fi
10310
10311 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
10312 # Tcl/Tk 8.1 require -fwritable strings. I don't
10313 # know whether 8.2 will or not, but I bet it will.
10314 # I don't have to worry about 7.x since we don't support it.
10315 GDBTK_CFLAGS=""
10316 if test "$GCC" = "yes"; then
10317 if test "$TCL_VERSION" != "8.0" ; then
10318 GDBTK_CFLAGS="-fwritable-strings"
10319 fi
10320 fi
10321
10322 # Include some libraries that Tcl and Tk want.
10323 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
10324 # Yes, the ordering seems wrong here. But it isn't.
10325 # TK_LIBS is the list of libraries that need to be linked
10326 # after Tcl/Tk. Note that this isn't put into LIBS. If it
10327 # were in LIBS then any link tests after this point would
10328 # try to include things like `$(LIBGUI)', which wouldn't work.
10329 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
10330
10331 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
10332 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
10333 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
10334 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
10335 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
10336 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
10337 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
10338
10339 if test x$gdb_cv_os_cygwin = xyes; then
10340 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
10341 WIN32LDAPP="-Wl,--subsystem,console"
10342 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
10343 fi
10344 fi
10345 fi
10346
10347 configdirs="${configdirs} gdbtk"
10348 fi
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363 # If we find X, set shell vars x_includes and x_libraries to the
10364 # paths, otherwise set no_x=yes.
10365 # Uses ac_ vars as temps to allow command line to override cache and checks.
10366 # --without-x overrides everything else, but does not touch the cache.
10367 echo $ac_n "checking for X""... $ac_c" 1>&6
10368 echo "configure:10369: checking for X" >&5
10369
10370 # Check whether --with-x or --without-x was given.
10371 if test "${with_x+set}" = set; then
10372 withval="$with_x"
10373 :
10374 fi
10375
10376 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10377 if test "x$with_x" = xno; then
10378 # The user explicitly disabled X.
10379 have_x=disabled
10380 else
10381 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10382 # Both variables are already set.
10383 have_x=yes
10384 else
10385 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
10386 echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388 # One or both of the vars are not set, and there is no cached value.
10389 ac_x_includes=NO ac_x_libraries=NO
10390 rm -fr conftestdir
10391 if mkdir conftestdir; then
10392 cd conftestdir
10393 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10394 cat > Imakefile <<'EOF'
10395 acfindx:
10396 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10397 EOF
10398 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10399 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10400 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10401 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10402 for ac_extension in a so sl; do
10403 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10404 test -f $ac_im_libdir/libX11.$ac_extension; then
10405 ac_im_usrlibdir=$ac_im_libdir; break
10406 fi
10407 done
10408 # Screen out bogus values from the imake configuration. They are
10409 # bogus both because they are the default anyway, and because
10410 # using them would break gcc on systems where it needs fixed includes.
10411 case "$ac_im_incroot" in
10412 /usr/include) ;;
10413 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
10414 esac
10415 case "$ac_im_usrlibdir" in
10416 /usr/lib | /lib) ;;
10417 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
10418 esac
10419 fi
10420 cd ..
10421 rm -fr conftestdir
10422 fi
10423
10424 if test "$ac_x_includes" = NO; then
10425 # Guess where to find include files, by looking for this one X11 .h file.
10426 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
10427
10428 # First, try using that file with no special directory specified.
10429 cat > conftest.$ac_ext <<EOF
10430 #line 10431 "configure"
10431 #include "confdefs.h"
10432 #include <$x_direct_test_include>
10433 EOF
10434 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10435 { (eval echo configure:10436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10436 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10437 if test -z "$ac_err"; then
10438 rm -rf conftest*
10439 # We can compile using X headers with no special include directory.
10440 ac_x_includes=
10441 else
10442 echo "$ac_err" >&5
10443 echo "configure: failed program was:" >&5
10444 cat conftest.$ac_ext >&5
10445 rm -rf conftest*
10446 # Look for the header file in a standard set of common directories.
10447 # Check X11 before X11Rn because it is often a symlink to the current release.
10448 for ac_dir in \
10449 /usr/X11/include \
10450 /usr/X11R6/include \
10451 /usr/X11R5/include \
10452 /usr/X11R4/include \
10453 \
10454 /usr/include/X11 \
10455 /usr/include/X11R6 \
10456 /usr/include/X11R5 \
10457 /usr/include/X11R4 \
10458 \
10459 /usr/local/X11/include \
10460 /usr/local/X11R6/include \
10461 /usr/local/X11R5/include \
10462 /usr/local/X11R4/include \
10463 \
10464 /usr/local/include/X11 \
10465 /usr/local/include/X11R6 \
10466 /usr/local/include/X11R5 \
10467 /usr/local/include/X11R4 \
10468 \
10469 /usr/X386/include \
10470 /usr/x386/include \
10471 /usr/XFree86/include/X11 \
10472 \
10473 /usr/include \
10474 /usr/local/include \
10475 /usr/unsupported/include \
10476 /usr/athena/include \
10477 /usr/local/x11r5/include \
10478 /usr/lpp/Xamples/include \
10479 \
10480 /usr/openwin/include \
10481 /usr/openwin/share/include \
10482 ; \
10483 do
10484 if test -r "$ac_dir/$x_direct_test_include"; then
10485 ac_x_includes=$ac_dir
10486 break
10487 fi
10488 done
10489 fi
10490 rm -f conftest*
10491 fi # $ac_x_includes = NO
10492
10493 if test "$ac_x_libraries" = NO; then
10494 # Check for the libraries.
10495
10496 test -z "$x_direct_test_library" && x_direct_test_library=Xt
10497 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
10498
10499 # See if we find them without any special options.
10500 # Don't add to $LIBS permanently.
10501 ac_save_LIBS="$LIBS"
10502 LIBS="-l$x_direct_test_library $LIBS"
10503 cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 int main() {
10508 ${x_direct_test_function}()
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512 rm -rf conftest*
10513 LIBS="$ac_save_LIBS"
10514 # We can link X programs with no special library path.
10515 ac_x_libraries=
10516 else
10517 echo "configure: failed program was:" >&5
10518 cat conftest.$ac_ext >&5
10519 rm -rf conftest*
10520 LIBS="$ac_save_LIBS"
10521 # First see if replacing the include by lib works.
10522 # Check X11 before X11Rn because it is often a symlink to the current release.
10523 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
10524 /usr/X11/lib \
10525 /usr/X11R6/lib \
10526 /usr/X11R5/lib \
10527 /usr/X11R4/lib \
10528 \
10529 /usr/lib/X11 \
10530 /usr/lib/X11R6 \
10531 /usr/lib/X11R5 \
10532 /usr/lib/X11R4 \
10533 \
10534 /usr/local/X11/lib \
10535 /usr/local/X11R6/lib \
10536 /usr/local/X11R5/lib \
10537 /usr/local/X11R4/lib \
10538 \
10539 /usr/local/lib/X11 \
10540 /usr/local/lib/X11R6 \
10541 /usr/local/lib/X11R5 \
10542 /usr/local/lib/X11R4 \
10543 \
10544 /usr/X386/lib \
10545 /usr/x386/lib \
10546 /usr/XFree86/lib/X11 \
10547 \
10548 /usr/lib \
10549 /usr/local/lib \
10550 /usr/unsupported/lib \
10551 /usr/athena/lib \
10552 /usr/local/x11r5/lib \
10553 /usr/lpp/Xamples/lib \
10554 /lib/usr/lib/X11 \
10555 \
10556 /usr/openwin/lib \
10557 /usr/openwin/share/lib \
10558 ; \
10559 do
10560 for ac_extension in a so sl; do
10561 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
10562 ac_x_libraries=$ac_dir
10563 break 2
10564 fi
10565 done
10566 done
10567 fi
10568 rm -f conftest*
10569 fi # $ac_x_libraries = NO
10570
10571 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
10572 # Didn't find X anywhere. Cache the known absence of X.
10573 ac_cv_have_x="have_x=no"
10574 else
10575 # Record where we found X for the cache.
10576 ac_cv_have_x="have_x=yes \
10577 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10578 fi
10579 fi
10580 fi
10581 eval "$ac_cv_have_x"
10582 fi # $with_x != no
10583
10584 if test "$have_x" != yes; then
10585 echo "$ac_t""$have_x" 1>&6
10586 no_x=yes
10587 else
10588 # If each of the values was on the command line, it overrides each guess.
10589 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10590 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10591 # Update the cache value to reflect the command line values.
10592 ac_cv_have_x="have_x=yes \
10593 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10594 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
10595 fi
10596
10597
10598
10599 # Unlike the sim directory, whether a simulator is linked is controlled by
10600 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
10601 # This code just checks for a few cases where we'd like to ignore those
10602 # definitions, even when they're present in the '.mt' file. These cases
10603 # are when --disable-sim is specified, or if the simulator directory is
10604 # not part of the source tree.
10605 #
10606 # Check whether --enable-sim or --disable-sim was given.
10607 if test "${enable_sim+set}" = set; then
10608 enableval="$enable_sim"
10609 echo "enable_sim = $enable_sim";
10610 echo "enableval = ${enableval}";
10611 case "${enableval}" in
10612 yes) ignore_sim=false ;;
10613 no) ignore_sim=true ;;
10614 *) ignore_sim=false ;;
10615 esac
10616 else
10617 ignore_sim=false
10618 fi
10619
10620
10621 if test ! -d "${srcdir}/../sim"; then
10622 ignore_sim=true
10623 fi
10624
10625 if test "${ignore_sim}" = "true"; then
10626 IGNORE_SIM="SIM="
10627 IGNORE_SIM_OBS="SIM_OBS="
10628 else
10629 IGNORE_SIM=""
10630 IGNORE_SIM_OBS=""
10631 cat >> confdefs.h <<\EOF
10632 #define WITH_SIM 1
10633 EOF
10634
10635 fi
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650 # List of host floatformats.
10651 cat >> confdefs.h <<EOF
10652 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
10653 EOF
10654
10655 cat >> confdefs.h <<EOF
10656 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
10657 EOF
10658
10659 cat >> confdefs.h <<EOF
10660 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
10661 EOF
10662
10663
10664 # target_subdir is used by the testsuite to find the target libraries.
10665 target_subdir=
10666 if test "${host}" != "${target}"; then
10667 target_subdir="${target_alias}/"
10668 fi
10669
10670
10671 frags=
10672 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
10673 if test ! -f ${host_makefile_frag}; then
10674 # When building a native debuger the .mh file containing things
10675 # like NATDEPFILES is needed. Cross debuggers don't need .mh
10676 # since it no longer contains anything useful.
10677 if test "${target}" = "${host}"; then
10678 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
10679 else
10680 host_makefile_frag=/dev/null
10681 fi
10682 fi
10683 frags="$frags $host_makefile_frag"
10684
10685 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
10686 if test ! -f ${target_makefile_frag}; then
10687 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
10688 fi
10689 frags="$frags $target_makefile_frag"
10690
10691
10692
10693
10694
10695 hostfile=`sed -n '
10696 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10697 ' ${host_makefile_frag}`
10698
10699 targetfile=`sed -n '
10700 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10701 ' ${target_makefile_frag}`
10702
10703 if test "${target}" = "${host}"; then
10704 # We pick this up from the host configuration file (.mh) because we
10705 # do not have a native configuration Makefile fragment.
10706 nativefile=`sed -n '
10707 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
10708 ' ${host_makefile_frag}`
10709 fi
10710
10711
10712 if test x"${gdb_osabi}" != x ; then
10713 cat >> confdefs.h <<EOF
10714 #define GDB_OSABI_DEFAULT $gdb_osabi
10715 EOF
10716
10717 fi
10718
10719 # Enable multi-ice-gdb-server.
10720 # Check whether --enable-multi-ice or --disable-multi-ice was given.
10721 if test "${enable_multi_ice+set}" = set; then
10722 enableval="$enable_multi_ice"
10723 case $enableval in
10724 yes | no)
10725 ;;
10726 *) { echo "configure: error: bad value $enableval for --enable-multi-ice" 1>&2; exit 1; } ;;
10727 esac
10728 fi
10729
10730 if test "x$enable_multi_ice" = xyes; then
10731 configdirs="$configdirs multi-ice"
10732 fi
10733
10734 # We only build gdbserver automatically if host and target are the same.
10735 if test "x$target" = "x$host"; then
10736 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
10737 echo "configure:10738: checking whether gdbserver is supported on this host" >&5
10738 if test "x$build_gdbserver" = xyes; then
10739 configdirs="$configdirs gdbserver"
10740 echo "$ac_t""yes" 1>&6
10741 else
10742 echo "$ac_t""no" 1>&6
10743 fi
10744 fi
10745
10746 subdirs="doc testsuite $configdirs"
10747
10748
10749 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
10750 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
10751 # version.
10752
10753 files=
10754 links=
10755
10756 rm -f xm.h
10757 xm_h=""
10758 if test "${hostfile}" != ""; then
10759 xm_h=xm.h
10760 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
10761 files="${files} ${GDB_XM_FILE}"
10762 links="${links} xm.h"
10763 cat >> confdefs.h <<EOF
10764 #define GDB_XM_FILE ${GDB_XM_FILE}
10765 EOF
10766
10767 fi
10768
10769
10770 rm -f tm.h
10771 tm_h=""
10772 if test "${targetfile}" != ""; then
10773 tm_h=tm.h
10774 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
10775 files="${files} ${GDB_TM_FILE}"
10776 links="${links} tm.h"
10777 cat >> confdefs.h <<EOF
10778 #define GDB_TM_FILE ${GDB_TM_FILE}
10779 EOF
10780
10781 fi
10782
10783
10784 rm -f nm.h
10785 nm_h=""
10786 if test "${nativefile}" != ""; then
10787 nm_h=nm.h
10788 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10789 files="${files} ${GDB_NM_FILE}"
10790 links="${links} nm.h"
10791 cat >> confdefs.h <<EOF
10792 #define GDB_NM_FILE ${GDB_NM_FILE}
10793 EOF
10794
10795 fi
10796
10797
10798
10799
10800 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
10801 echo "configure:10802: checking for Cygwin environment" >&5
10802 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10803 echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805 cat > conftest.$ac_ext <<EOF
10806 #line 10807 "configure"
10807 #include "confdefs.h"
10808
10809 int main() {
10810
10811 #ifndef __CYGWIN__
10812 #define __CYGWIN__ __CYGWIN32__
10813 #endif
10814 return __CYGWIN__;
10815 ; return 0; }
10816 EOF
10817 if { (eval echo configure:10818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10818 rm -rf conftest*
10819 ac_cv_cygwin=yes
10820 else
10821 echo "configure: failed program was:" >&5
10822 cat conftest.$ac_ext >&5
10823 rm -rf conftest*
10824 ac_cv_cygwin=no
10825 fi
10826 rm -f conftest*
10827 rm -f conftest*
10828 fi
10829
10830 echo "$ac_t""$ac_cv_cygwin" 1>&6
10831 CYGWIN=
10832 test "$ac_cv_cygwin" = yes && CYGWIN=yes
10833 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
10834 echo "configure:10835: checking for mingw32 environment" >&5
10835 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10836 echo $ac_n "(cached) $ac_c" 1>&6
10837 else
10838 cat > conftest.$ac_ext <<EOF
10839 #line 10840 "configure"
10840 #include "confdefs.h"
10841
10842 int main() {
10843 return __MINGW32__;
10844 ; return 0; }
10845 EOF
10846 if { (eval echo configure:10847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10847 rm -rf conftest*
10848 ac_cv_mingw32=yes
10849 else
10850 echo "configure: failed program was:" >&5
10851 cat conftest.$ac_ext >&5
10852 rm -rf conftest*
10853 ac_cv_mingw32=no
10854 fi
10855 rm -f conftest*
10856 rm -f conftest*
10857 fi
10858
10859 echo "$ac_t""$ac_cv_mingw32" 1>&6
10860 MINGW32=
10861 test "$ac_cv_mingw32" = yes && MINGW32=yes
10862
10863
10864 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
10865 echo "configure:10866: checking for executable suffix" >&5
10866 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10867 echo $ac_n "(cached) $ac_c" 1>&6
10868 else
10869 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10870 ac_cv_exeext=.exe
10871 else
10872 rm -f conftest*
10873 echo 'int main () { return 0; }' > conftest.$ac_ext
10874 ac_cv_exeext=
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
10876 for file in conftest.*; do
10877 case $file in
10878 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
10879 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10880 esac
10881 done
10882 else
10883 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10884 fi
10885 rm -f conftest*
10886 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10887 fi
10888 fi
10889
10890 EXEEXT=""
10891 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10892 echo "$ac_t""${ac_cv_exeext}" 1>&6
10893 ac_exeext=$EXEEXT
10894
10895
10896
10897 cat >> confdefs.h <<\EOF
10898 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10899 EOF
10900
10901
10902
10903
10904 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10905 if test "${with_libiconv_prefix+set}" = set; then
10906 withval="$with_libiconv_prefix"
10907
10908 for dir in `echo "$withval" | tr : ' '`; do
10909 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10910 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10911 done
10912
10913 fi
10914
10915
10916 echo $ac_n "checking for iconv""... $ac_c" 1>&6
10917 echo "configure:10918: checking for iconv" >&5
10918 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10919 echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921
10922 am_cv_func_iconv="no, consider installing GNU libiconv"
10923 am_cv_lib_iconv=no
10924 cat > conftest.$ac_ext <<EOF
10925 #line 10926 "configure"
10926 #include "confdefs.h"
10927 #include <stdlib.h>
10928 #include <iconv.h>
10929 int main() {
10930 iconv_t cd = iconv_open("","");
10931 iconv(cd,NULL,NULL,NULL,NULL);
10932 iconv_close(cd);
10933 ; return 0; }
10934 EOF
10935 if { (eval echo configure:10936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10936 rm -rf conftest*
10937 am_cv_func_iconv=yes
10938 else
10939 echo "configure: failed program was:" >&5
10940 cat conftest.$ac_ext >&5
10941 fi
10942 rm -f conftest*
10943 if test "$am_cv_func_iconv" != yes; then
10944 am_save_LIBS="$LIBS"
10945 LIBS="$LIBS -liconv"
10946 cat > conftest.$ac_ext <<EOF
10947 #line 10948 "configure"
10948 #include "confdefs.h"
10949 #include <stdlib.h>
10950 #include <iconv.h>
10951 int main() {
10952 iconv_t cd = iconv_open("","");
10953 iconv(cd,NULL,NULL,NULL,NULL);
10954 iconv_close(cd);
10955 ; return 0; }
10956 EOF
10957 if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10958 rm -rf conftest*
10959 am_cv_lib_iconv=yes
10960 am_cv_func_iconv=yes
10961 else
10962 echo "configure: failed program was:" >&5
10963 cat conftest.$ac_ext >&5
10964 fi
10965 rm -f conftest*
10966 LIBS="$am_save_LIBS"
10967 fi
10968
10969 fi
10970
10971 echo "$ac_t""$am_cv_func_iconv" 1>&6
10972 if test "$am_cv_func_iconv" = yes; then
10973 cat >> confdefs.h <<\EOF
10974 #define HAVE_ICONV 1
10975 EOF
10976
10977 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
10978 echo "configure:10979: checking for iconv declaration" >&5
10979 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10980 echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982
10983 cat > conftest.$ac_ext <<EOF
10984 #line 10985 "configure"
10985 #include "confdefs.h"
10986
10987 #include <stdlib.h>
10988 #include <iconv.h>
10989 extern
10990 #ifdef __cplusplus
10991 "C"
10992 #endif
10993 #if defined(__STDC__) || defined(__cplusplus)
10994 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10995 #else
10996 size_t iconv();
10997 #endif
10998
10999 int main() {
11000
11001 ; return 0; }
11002 EOF
11003 if { (eval echo configure:11004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11004 rm -rf conftest*
11005 am_cv_proto_iconv_arg1=""
11006 else
11007 echo "configure: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 rm -rf conftest*
11010 am_cv_proto_iconv_arg1="const"
11011 fi
11012 rm -f conftest*
11013 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);"
11014 fi
11015
11016 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
11017 echo "$ac_t""${ac_t:-
11018 }$am_cv_proto_iconv" 1>&6
11019 cat >> confdefs.h <<EOF
11020 #define ICONV_CONST $am_cv_proto_iconv_arg1
11021 EOF
11022
11023 fi
11024 LIBICONV=
11025 if test "$am_cv_lib_iconv" = yes; then
11026 LIBICONV="-liconv"
11027 fi
11028
11029
11030
11031 trap '' 1 2 15
11032 cat > confcache <<\EOF
11033 # This file is a shell script that caches the results of configure
11034 # tests run on this system so they can be shared between configure
11035 # scripts and configure runs. It is not useful on other systems.
11036 # If it contains results you don't want to keep, you may remove or edit it.
11037 #
11038 # By default, configure uses ./config.cache as the cache file,
11039 # creating it if it does not exist already. You can give configure
11040 # the --cache-file=FILE option to use a different cache file; that is
11041 # what configure does when it calls configure scripts in
11042 # subdirectories, so they share the cache.
11043 # Giving --cache-file=/dev/null disables caching, for debugging configure.
11044 # config.status only pays attention to the cache file if you give it the
11045 # --recheck option to rerun configure.
11046 #
11047 EOF
11048 # The following way of writing the cache mishandles newlines in values,
11049 # but we know of no workaround that is simple, portable, and efficient.
11050 # So, don't put newlines in cache variables' values.
11051 # Ultrix sh set writes to stderr and can't be redirected directly,
11052 # and sets the high bit in the cache file unless we assign to the vars.
11053 (set) 2>&1 |
11054 case `(ac_space=' '; set | grep ac_space) 2>&1` in
11055 *ac_space=\ *)
11056 # `set' does not quote correctly, so add quotes (double-quote substitution
11057 # turns \\\\ into \\, and sed turns \\ into \).
11058 sed -n \
11059 -e "s/'/'\\\\''/g" \
11060 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
11061 ;;
11062 *)
11063 # `set' quotes correctly as required by POSIX, so do not add quotes.
11064 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
11065 ;;
11066 esac >> confcache
11067 if cmp -s $cache_file confcache; then
11068 :
11069 else
11070 if test -w $cache_file; then
11071 echo "updating cache $cache_file"
11072 cat confcache > $cache_file
11073 else
11074 echo "not updating unwritable cache $cache_file"
11075 fi
11076 fi
11077 rm -f confcache
11078
11079 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
11080
11081 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11082 # Let make expand exec_prefix.
11083 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11084
11085 # Any assignment to VPATH causes Sun make to only execute
11086 # the first set of double-colon rules, so remove it if not needed.
11087 # If there is a colon in the path, we need to keep it.
11088 if test "x$srcdir" = x.; then
11089 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
11090 fi
11091
11092 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
11093
11094 DEFS=-DHAVE_CONFIG_H
11095
11096 # Without the "./", some shells look in PATH for config.status.
11097 : ${CONFIG_STATUS=./config.status}
11098
11099 echo creating $CONFIG_STATUS
11100 rm -f $CONFIG_STATUS
11101 cat > $CONFIG_STATUS <<EOF
11102 #! /bin/sh
11103 # Generated automatically by configure.
11104 # Run this file to recreate the current configuration.
11105 # This directory was configured as follows,
11106 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11107 #
11108 # $0 $ac_configure_args
11109 #
11110 # Compiler output produced by configure, useful for debugging
11111 # configure, is in ./config.log if it exists.
11112
11113 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
11114 for ac_option
11115 do
11116 case "\$ac_option" in
11117 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11118 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
11119 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
11120 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
11121 echo "$CONFIG_STATUS generated by autoconf version 2.13"
11122 exit 0 ;;
11123 -help | --help | --hel | --he | --h)
11124 echo "\$ac_cs_usage"; exit 0 ;;
11125 *) echo "\$ac_cs_usage"; exit 1 ;;
11126 esac
11127 done
11128
11129 ac_given_srcdir=$srcdir
11130 ac_given_INSTALL="$INSTALL"
11131
11132 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
11133 EOF
11134 cat >> $CONFIG_STATUS <<EOF
11135
11136 # Protect against being on the right side of a sed subst in config.status.
11137 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
11138 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
11139 $ac_vpsub
11140 $extrasub
11141 s%@SHELL@%$SHELL%g
11142 s%@CFLAGS@%$CFLAGS%g
11143 s%@CPPFLAGS@%$CPPFLAGS%g
11144 s%@CXXFLAGS@%$CXXFLAGS%g
11145 s%@FFLAGS@%$FFLAGS%g
11146 s%@DEFS@%$DEFS%g
11147 s%@LDFLAGS@%$LDFLAGS%g
11148 s%@LIBS@%$LIBS%g
11149 s%@exec_prefix@%$exec_prefix%g
11150 s%@prefix@%$prefix%g
11151 s%@program_transform_name@%$program_transform_name%g
11152 s%@bindir@%$bindir%g
11153 s%@sbindir@%$sbindir%g
11154 s%@libexecdir@%$libexecdir%g
11155 s%@datadir@%$datadir%g
11156 s%@sysconfdir@%$sysconfdir%g
11157 s%@sharedstatedir@%$sharedstatedir%g
11158 s%@localstatedir@%$localstatedir%g
11159 s%@libdir@%$libdir%g
11160 s%@includedir@%$includedir%g
11161 s%@oldincludedir@%$oldincludedir%g
11162 s%@infodir@%$infodir%g
11163 s%@mandir@%$mandir%g
11164 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
11165 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
11166 s%@MAINT@%$MAINT%g
11167 s%@CC@%$CC%g
11168 s%@CPP@%$CPP%g
11169 s%@host@%$host%g
11170 s%@host_alias@%$host_alias%g
11171 s%@host_cpu@%$host_cpu%g
11172 s%@host_vendor@%$host_vendor%g
11173 s%@host_os@%$host_os%g
11174 s%@target@%$target%g
11175 s%@target_alias@%$target_alias%g
11176 s%@target_cpu@%$target_cpu%g
11177 s%@target_vendor@%$target_vendor%g
11178 s%@target_os@%$target_os%g
11179 s%@build@%$build%g
11180 s%@build_alias@%$build_alias%g
11181 s%@build_cpu@%$build_cpu%g
11182 s%@build_vendor@%$build_vendor%g
11183 s%@build_os@%$build_os%g
11184 s%@RANLIB@%$RANLIB%g
11185 s%@SET_MAKE@%$SET_MAKE%g
11186 s%@ALLOCA@%$ALLOCA%g
11187 s%@USE_NLS@%$USE_NLS%g
11188 s%@MSGFMT@%$MSGFMT%g
11189 s%@GMSGFMT@%$GMSGFMT%g
11190 s%@XGETTEXT@%$XGETTEXT%g
11191 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
11192 s%@CATALOGS@%$CATALOGS%g
11193 s%@CATOBJEXT@%$CATOBJEXT%g
11194 s%@DATADIRNAME@%$DATADIRNAME%g
11195 s%@GMOFILES@%$GMOFILES%g
11196 s%@INSTOBJEXT@%$INSTOBJEXT%g
11197 s%@INTLDEPS@%$INTLDEPS%g
11198 s%@INTLLIBS@%$INTLLIBS%g
11199 s%@INTLOBJS@%$INTLOBJS%g
11200 s%@POFILES@%$POFILES%g
11201 s%@POSUB@%$POSUB%g
11202 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
11203 s%@GT_NO@%$GT_NO%g
11204 s%@GT_YES@%$GT_YES%g
11205 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
11206 s%@l@%$l%g
11207 s%@localedir@%$localedir%g
11208 s%@PACKAGE@%$PACKAGE%g
11209 s%@subdirs@%$subdirs%g
11210 s%@AWK@%$AWK%g
11211 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
11212 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
11213 s%@INSTALL_DATA@%$INSTALL_DATA%g
11214 s%@LN_S@%$LN_S%g
11215 s%@YACC@%$YACC%g
11216 s%@AR@%$AR%g
11217 s%@DLLTOOL@%$DLLTOOL%g
11218 s%@WINDRES@%$WINDRES%g
11219 s%@MIG@%$MIG%g
11220 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
11221 s%@TARGET_SYSTEM_ROOT@%$TARGET_SYSTEM_ROOT%g
11222 s%@TARGET_SYSTEM_ROOT_DEFINE@%$TARGET_SYSTEM_ROOT_DEFINE%g
11223 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
11224 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
11225 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
11226 s%@WIN32LIBS@%$WIN32LIBS%g
11227 s%@LIBGUI@%$LIBGUI%g
11228 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
11229 s%@WIN32LDAPP@%$WIN32LDAPP%g
11230 s%@TCL_VERSION@%$TCL_VERSION%g
11231 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
11232 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
11233 s%@TCL_CC@%$TCL_CC%g
11234 s%@TCL_DEFS@%$TCL_DEFS%g
11235 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
11236 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
11237 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
11238 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
11239 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
11240 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
11241 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
11242 s%@TCL_CC_SEARCH_FLAGS@%$TCL_CC_SEARCH_FLAGS%g
11243 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
11244 s%@TCL_RANLIB@%$TCL_RANLIB%g
11245 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
11246 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
11247 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
11248 s%@TK_VERSION@%$TK_VERSION%g
11249 s%@TK_DEFS@%$TK_DEFS%g
11250 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
11251 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
11252 s%@TK_XLIBSW@%$TK_XLIBSW%g
11253 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
11254 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
11255 s%@TCLHDIR@%$TCLHDIR%g
11256 s%@TKHDIR@%$TKHDIR%g
11257 s%@ITCLHDIR@%$ITCLHDIR%g
11258 s%@ITKHDIR@%$ITKHDIR%g
11259 s%@ITCL_VERSION@%$ITCL_VERSION%g
11260 s%@ITCL_DEFS@%$ITCL_DEFS%g
11261 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
11262 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
11263 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
11264 s%@ITK_VERSION@%$ITK_VERSION%g
11265 s%@ITK_DEFS@%$ITK_DEFS%g
11266 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
11267 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
11268 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
11269 s%@X_CFLAGS@%$X_CFLAGS%g
11270 s%@X_LDFLAGS@%$X_LDFLAGS%g
11271 s%@X_LIBS@%$X_LIBS%g
11272 s%@TCL_DEPS@%$TCL_DEPS%g
11273 s%@TK_DEPS@%$TK_DEPS%g
11274 s%@ITCLLIB@%$ITCLLIB%g
11275 s%@ITCL_DEPS@%$ITCL_DEPS%g
11276 s%@ITKLIB@%$ITKLIB%g
11277 s%@ITK_DEPS@%$ITK_DEPS%g
11278 s%@GDBTKLIBS@%$GDBTKLIBS%g
11279 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
11280 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
11281 s%@IGNORE_SIM@%$IGNORE_SIM%g
11282 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
11283 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
11284 s%@PROFILE_CFLAGS@%$PROFILE_CFLAGS%g
11285 s%@CONFIG_OBS@%$CONFIG_OBS%g
11286 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
11287 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
11288 s%@CONFIG_ALL@%$CONFIG_ALL%g
11289 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
11290 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
11291 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
11292 s%@target_subdir@%$target_subdir%g
11293 /@host_makefile_frag@/r $host_makefile_frag
11294 s%@host_makefile_frag@%%g
11295 /@target_makefile_frag@/r $target_makefile_frag
11296 s%@target_makefile_frag@%%g
11297 s%@frags@%$frags%g
11298 s%@xm_h@%$xm_h%g
11299 s%@tm_h@%$tm_h%g
11300 s%@nm_h@%$nm_h%g
11301 s%@EXEEXT@%$EXEEXT%g
11302 s%@LIBICONV@%$LIBICONV%g
11303
11304 CEOF
11305 EOF
11306
11307 cat >> $CONFIG_STATUS <<\EOF
11308
11309 # Split the substitutions into bite-sized pieces for seds with
11310 # small command number limits, like on Digital OSF/1 and HP-UX.
11311 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
11312 ac_file=1 # Number of current file.
11313 ac_beg=1 # First line for current file.
11314 ac_end=$ac_max_sed_cmds # Line after last line for current file.
11315 ac_more_lines=:
11316 ac_sed_cmds=""
11317 while $ac_more_lines; do
11318 if test $ac_beg -gt 1; then
11319 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
11320 else
11321 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
11322 fi
11323 if test ! -s conftest.s$ac_file; then
11324 ac_more_lines=false
11325 rm -f conftest.s$ac_file
11326 else
11327 if test -z "$ac_sed_cmds"; then
11328 ac_sed_cmds="sed -f conftest.s$ac_file"
11329 else
11330 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
11331 fi
11332 ac_file=`expr $ac_file + 1`
11333 ac_beg=$ac_end
11334 ac_end=`expr $ac_end + $ac_max_sed_cmds`
11335 fi
11336 done
11337 if test -z "$ac_sed_cmds"; then
11338 ac_sed_cmds=cat
11339 fi
11340 EOF
11341
11342 cat >> $CONFIG_STATUS <<EOF
11343
11344 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
11345 EOF
11346 cat >> $CONFIG_STATUS <<\EOF
11347 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
11348 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11349 case "$ac_file" in
11350 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11351 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11352 *) ac_file_in="${ac_file}.in" ;;
11353 esac
11354
11355 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
11356
11357 # Remove last slash and all that follows it. Not all systems have dirname.
11358 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11359 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11360 # The file is in a subdirectory.
11361 test ! -d "$ac_dir" && mkdir "$ac_dir"
11362 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
11363 # A "../" for each directory in $ac_dir_suffix.
11364 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
11365 else
11366 ac_dir_suffix= ac_dots=
11367 fi
11368
11369 case "$ac_given_srcdir" in
11370 .) srcdir=.
11371 if test -z "$ac_dots"; then top_srcdir=.
11372 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
11373 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
11374 *) # Relative path.
11375 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
11376 top_srcdir="$ac_dots$ac_given_srcdir" ;;
11377 esac
11378
11379 case "$ac_given_INSTALL" in
11380 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11381 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11382 esac
11383
11384 echo creating "$ac_file"
11385 rm -f "$ac_file"
11386 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
11387 case "$ac_file" in
11388 *Makefile*) ac_comsub="1i\\
11389 # $configure_input" ;;
11390 *) ac_comsub= ;;
11391 esac
11392
11393 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11394 sed -e "$ac_comsub
11395 s%@configure_input@%$configure_input%g
11396 s%@srcdir@%$srcdir%g
11397 s%@top_srcdir@%$top_srcdir%g
11398 s%@INSTALL@%$INSTALL%g
11399 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
11400 fi; done
11401 rm -f conftest.s*
11402
11403 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
11404 # NAME is the cpp macro being defined and VALUE is the value it is being given.
11405 #
11406 # ac_d sets the value in "#define NAME VALUE" lines.
11407 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
11408 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
11409 ac_dC='\3'
11410 ac_dD='%g'
11411 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
11412 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11413 ac_uB='\([ ]\)%\1#\2define\3'
11414 ac_uC=' '
11415 ac_uD='\4%g'
11416 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
11417 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
11418 ac_eB='$%\1#\2define\3'
11419 ac_eC=' '
11420 ac_eD='%g'
11421
11422 if test "${CONFIG_HEADERS+set}" != set; then
11423 EOF
11424 cat >> $CONFIG_STATUS <<EOF
11425 CONFIG_HEADERS="config.h:config.in"
11426 EOF
11427 cat >> $CONFIG_STATUS <<\EOF
11428 fi
11429 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
11430 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
11431 case "$ac_file" in
11432 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
11433 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
11434 *) ac_file_in="${ac_file}.in" ;;
11435 esac
11436
11437 echo creating $ac_file
11438
11439 rm -f conftest.frag conftest.in conftest.out
11440 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
11441 cat $ac_file_inputs > conftest.in
11442
11443 EOF
11444
11445 # Transform confdefs.h into a sed script conftest.vals that substitutes
11446 # the proper values into config.h.in to produce config.h. And first:
11447 # Protect against being on the right side of a sed subst in config.status.
11448 # Protect against being in an unquoted here document in config.status.
11449 rm -f conftest.vals
11450 cat > conftest.hdr <<\EOF
11451 s/[\\&%]/\\&/g
11452 s%[\\$`]%\\&%g
11453 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
11454 s%ac_d%ac_u%gp
11455 s%ac_u%ac_e%gp
11456 EOF
11457 sed -n -f conftest.hdr confdefs.h > conftest.vals
11458 rm -f conftest.hdr
11459
11460 # This sed command replaces #undef with comments. This is necessary, for
11461 # example, in the case of _POSIX_SOURCE, which is predefined and required
11462 # on some systems where configure will not decide to define it.
11463 cat >> conftest.vals <<\EOF
11464 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
11465 EOF
11466
11467 # Break up conftest.vals because some shells have a limit on
11468 # the size of here documents, and old seds have small limits too.
11469
11470 rm -f conftest.tail
11471 while :
11472 do
11473 ac_lines=`grep -c . conftest.vals`
11474 # grep -c gives empty output for an empty file on some AIX systems.
11475 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
11476 # Write a limited-size here document to conftest.frag.
11477 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
11478 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
11479 echo 'CEOF
11480 sed -f conftest.frag conftest.in > conftest.out
11481 rm -f conftest.in
11482 mv conftest.out conftest.in
11483 ' >> $CONFIG_STATUS
11484 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
11485 rm -f conftest.vals
11486 mv conftest.tail conftest.vals
11487 done
11488 rm -f conftest.vals
11489
11490 cat >> $CONFIG_STATUS <<\EOF
11491 rm -f conftest.frag conftest.h
11492 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
11493 cat conftest.in >> conftest.h
11494 rm -f conftest.in
11495 if cmp -s $ac_file conftest.h 2>/dev/null; then
11496 echo "$ac_file is unchanged"
11497 rm -f conftest.h
11498 else
11499 # Remove last slash and all that follows it. Not all systems have dirname.
11500 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
11501 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
11502 # The file is in a subdirectory.
11503 test ! -d "$ac_dir" && mkdir "$ac_dir"
11504 fi
11505 rm -f $ac_file
11506 mv conftest.h $ac_file
11507 fi
11508 fi; done
11509
11510 EOF
11511
11512 cat >> $CONFIG_STATUS <<EOF
11513 ac_sources="$files"
11514 ac_dests="$links"
11515 EOF
11516
11517 cat >> $CONFIG_STATUS <<\EOF
11518 srcdir=$ac_given_srcdir
11519 while test -n "$ac_sources"; do
11520 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
11521 set $ac_sources; ac_source=$1; shift; ac_sources=$*
11522
11523 echo "linking $srcdir/$ac_source to $ac_dest"
11524
11525 if test ! -r $srcdir/$ac_source; then
11526 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
11527 fi
11528 rm -f $ac_dest
11529
11530 # Make relative symlinks.
11531 # Remove last slash and all that follows it. Not all systems have dirname.
11532 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
11533 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
11534 # The dest file is in a subdirectory.
11535 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
11536 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
11537 # A "../" for each directory in $ac_dest_dir_suffix.
11538 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
11539 else
11540 ac_dest_dir_suffix= ac_dots=
11541 fi
11542
11543 case "$srcdir" in
11544 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
11545 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
11546 esac
11547
11548 # Make a symlink if possible; otherwise try a hard link.
11549 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
11550 ln $srcdir/$ac_source $ac_dest; then :
11551 else
11552 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
11553 fi
11554 done
11555 EOF
11556 cat >> $CONFIG_STATUS <<EOF
11557
11558 gdb_host_cpu=$gdb_host_cpu
11559 gdb_target_cpu=$gdb_target_cpu
11560 nativefile=$nativefile
11561
11562 EOF
11563 cat >> $CONFIG_STATUS <<\EOF
11564
11565 if test "${nativefile}" = ""; then
11566 < Makefile \
11567 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
11568 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
11569 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
11570 > Makefile.tem
11571 mv -f Makefile.tem Makefile
11572 fi
11573
11574 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
11575 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
11576 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
11577 mv -f Makefile.tmp Makefile
11578
11579
11580 case x$CONFIG_HEADERS in
11581 xconfig.h:config.in)
11582 echo > stamp-h ;;
11583 esac
11584
11585 exit 0
11586 EOF
11587 chmod +x $CONFIG_STATUS
11588 rm -fr confdefs* $ac_clean_files
11589 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
11590
11591 if test "$no_recursion" != yes; then
11592
11593 # Remove --cache-file and --srcdir arguments so they do not pile up.
11594 ac_sub_configure_args=
11595 ac_prev=
11596 for ac_arg in $ac_configure_args; do
11597 if test -n "$ac_prev"; then
11598 ac_prev=
11599 continue
11600 fi
11601 case "$ac_arg" in
11602 -cache-file | --cache-file | --cache-fil | --cache-fi \
11603 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
11604 ac_prev=cache_file ;;
11605 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
11606 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
11607 ;;
11608 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
11609 ac_prev=srcdir ;;
11610 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
11611 ;;
11612 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
11613 esac
11614 done
11615
11616 for ac_config_dir in doc testsuite $configdirs; do
11617
11618 # Do not complain, so a configure script can configure whichever
11619 # parts of a large source tree are present.
11620 if test ! -d $srcdir/$ac_config_dir; then
11621 continue
11622 fi
11623
11624 echo configuring in $ac_config_dir
11625
11626 case "$srcdir" in
11627 .) ;;
11628 *)
11629 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
11630 else
11631 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
11632 fi
11633 ;;
11634 esac
11635
11636 ac_popdir=`pwd`
11637 cd $ac_config_dir
11638
11639 # A "../" for each directory in /$ac_config_dir.
11640 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
11641
11642 case "$srcdir" in
11643 .) # No --srcdir option. We are building in place.
11644 ac_sub_srcdir=$srcdir ;;
11645 /*) # Absolute path.
11646 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
11647 *) # Relative path.
11648 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
11649 esac
11650
11651 # Check for guested configure; otherwise get Cygnus style configure.
11652 if test -f $ac_sub_srcdir/configure; then
11653 ac_sub_configure=$ac_sub_srcdir/configure
11654 elif test -f $ac_sub_srcdir/configure.in; then
11655 ac_sub_configure=$ac_configure
11656 else
11657 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
11658 ac_sub_configure=
11659 fi
11660
11661 # The recursion is here.
11662 if test -n "$ac_sub_configure"; then
11663
11664 # Make the cache file name correct relative to the subdirectory.
11665 case "$cache_file" in
11666 /*) ac_sub_cache_file=$cache_file ;;
11667 *) # Relative path.
11668 ac_sub_cache_file="$ac_dots$cache_file" ;;
11669 esac
11670 case "$ac_given_INSTALL" in
11671 [/$]*) INSTALL="$ac_given_INSTALL" ;;
11672 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
11673 esac
11674
11675 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
11676 # The eval makes quoting arguments work.
11677 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
11678 then :
11679 else
11680 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
11681 fi
11682 fi
11683
11684 cd $ac_popdir
11685 done
11686 fi
11687
11688
11689 exit 0
This page took 0.301646 seconds and 4 git commands to generate.