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