* configure.in: Create "Checks for programs" section, and move
[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 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3512 echo "configure:3513: checking return type of signal handlers" >&5
3513 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3514 echo $ac_n "(cached) $ac_c" 1>&6
3515 else
3516 cat > conftest.$ac_ext <<EOF
3517 #line 3518 "configure"
3518 #include "confdefs.h"
3519 #include <sys/types.h>
3520 #include <signal.h>
3521 #ifdef signal
3522 #undef signal
3523 #endif
3524 #ifdef __cplusplus
3525 extern "C" void (*signal (int, void (*)(int)))(int);
3526 #else
3527 void (*signal ()) ();
3528 #endif
3529
3530 int main() {
3531 int i;
3532 ; return 0; }
3533 EOF
3534 if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3535 rm -rf conftest*
3536 ac_cv_type_signal=void
3537 else
3538 echo "configure: failed program was:" >&5
3539 cat conftest.$ac_ext >&5
3540 rm -rf conftest*
3541 ac_cv_type_signal=int
3542 fi
3543 rm -f conftest*
3544 fi
3545
3546 echo "$ac_t""$ac_cv_type_signal" 1>&6
3547 cat >> confdefs.h <<EOF
3548 #define RETSIGTYPE $ac_cv_type_signal
3549 EOF
3550
3551
3552
3553 ac_header_dirent=no
3554 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3555 do
3556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3557 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3558 echo "configure:3559: checking for $ac_hdr that defines DIR" >&5
3559 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3560 echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562 cat > conftest.$ac_ext <<EOF
3563 #line 3564 "configure"
3564 #include "confdefs.h"
3565 #include <sys/types.h>
3566 #include <$ac_hdr>
3567 int main() {
3568 DIR *dirp = 0;
3569 ; return 0; }
3570 EOF
3571 if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3572 rm -rf conftest*
3573 eval "ac_cv_header_dirent_$ac_safe=yes"
3574 else
3575 echo "configure: failed program was:" >&5
3576 cat conftest.$ac_ext >&5
3577 rm -rf conftest*
3578 eval "ac_cv_header_dirent_$ac_safe=no"
3579 fi
3580 rm -f conftest*
3581 fi
3582 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3583 echo "$ac_t""yes" 1>&6
3584 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3585 cat >> confdefs.h <<EOF
3586 #define $ac_tr_hdr 1
3587 EOF
3588 ac_header_dirent=$ac_hdr; break
3589 else
3590 echo "$ac_t""no" 1>&6
3591 fi
3592 done
3593 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3594 if test $ac_header_dirent = dirent.h; then
3595 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3596 echo "configure:3597: checking for opendir in -ldir" >&5
3597 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3599 echo $ac_n "(cached) $ac_c" 1>&6
3600 else
3601 ac_save_LIBS="$LIBS"
3602 LIBS="-ldir $LIBS"
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 /* Override any gcc2 internal prototype to avoid an error. */
3607 /* We use char because int might match the return type of a gcc2
3608 builtin and then its argument prototype would still apply. */
3609 char opendir();
3610
3611 int main() {
3612 opendir()
3613 ; return 0; }
3614 EOF
3615 if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3616 rm -rf conftest*
3617 eval "ac_cv_lib_$ac_lib_var=yes"
3618 else
3619 echo "configure: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 rm -rf conftest*
3622 eval "ac_cv_lib_$ac_lib_var=no"
3623 fi
3624 rm -f conftest*
3625 LIBS="$ac_save_LIBS"
3626
3627 fi
3628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3629 echo "$ac_t""yes" 1>&6
3630 LIBS="$LIBS -ldir"
3631 else
3632 echo "$ac_t""no" 1>&6
3633 fi
3634
3635 else
3636 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3637 echo "configure:3638: checking for opendir in -lx" >&5
3638 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3639 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3640 echo $ac_n "(cached) $ac_c" 1>&6
3641 else
3642 ac_save_LIBS="$LIBS"
3643 LIBS="-lx $LIBS"
3644 cat > conftest.$ac_ext <<EOF
3645 #line 3646 "configure"
3646 #include "confdefs.h"
3647 /* Override any gcc2 internal prototype to avoid an error. */
3648 /* We use char because int might match the return type of a gcc2
3649 builtin and then its argument prototype would still apply. */
3650 char opendir();
3651
3652 int main() {
3653 opendir()
3654 ; return 0; }
3655 EOF
3656 if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3657 rm -rf conftest*
3658 eval "ac_cv_lib_$ac_lib_var=yes"
3659 else
3660 echo "configure: failed program was:" >&5
3661 cat conftest.$ac_ext >&5
3662 rm -rf conftest*
3663 eval "ac_cv_lib_$ac_lib_var=no"
3664 fi
3665 rm -f conftest*
3666 LIBS="$ac_save_LIBS"
3667
3668 fi
3669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3670 echo "$ac_t""yes" 1>&6
3671 LIBS="$LIBS -lx"
3672 else
3673 echo "$ac_t""no" 1>&6
3674 fi
3675
3676 fi
3677
3678 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3679 echo "configure:3680: checking for ANSI C header files" >&5
3680 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3681 echo $ac_n "(cached) $ac_c" 1>&6
3682 else
3683 cat > conftest.$ac_ext <<EOF
3684 #line 3685 "configure"
3685 #include "confdefs.h"
3686 #include <stdlib.h>
3687 #include <stdarg.h>
3688 #include <string.h>
3689 #include <float.h>
3690 EOF
3691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3692 { (eval echo configure:3693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3693 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3694 if test -z "$ac_err"; then
3695 rm -rf conftest*
3696 ac_cv_header_stdc=yes
3697 else
3698 echo "$ac_err" >&5
3699 echo "configure: failed program was:" >&5
3700 cat conftest.$ac_ext >&5
3701 rm -rf conftest*
3702 ac_cv_header_stdc=no
3703 fi
3704 rm -f conftest*
3705
3706 if test $ac_cv_header_stdc = yes; then
3707 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <string.h>
3712 EOF
3713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3714 egrep "memchr" >/dev/null 2>&1; then
3715 :
3716 else
3717 rm -rf conftest*
3718 ac_cv_header_stdc=no
3719 fi
3720 rm -f conftest*
3721
3722 fi
3723
3724 if test $ac_cv_header_stdc = yes; then
3725 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3726 cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 #include <stdlib.h>
3730 EOF
3731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3732 egrep "free" >/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 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3744 if test "$cross_compiling" = yes; then
3745 :
3746 else
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 #include <ctype.h>
3751 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3752 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3753 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3754 int main () { int i; for (i = 0; i < 256; i++)
3755 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3756 exit (0); }
3757
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3760 then
3761 :
3762 else
3763 echo "configure: failed program was:" >&5
3764 cat conftest.$ac_ext >&5
3765 rm -fr conftest*
3766 ac_cv_header_stdc=no
3767 fi
3768 rm -fr conftest*
3769 fi
3770
3771 fi
3772 fi
3773
3774 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3775 if test $ac_cv_header_stdc = yes; then
3776 cat >> confdefs.h <<\EOF
3777 #define STDC_HEADERS 1
3778 EOF
3779
3780 fi
3781
3782
3783
3784 case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
3785 cat >> confdefs.h <<\EOF
3786 #define _MSE_INT_H 1
3787 EOF
3788
3789 esac; esac
3790
3791 for ac_hdr in ctype.h nlist.h link.h thread_db.h proc_service.h \
3792 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3793 string.h sys/procfs.h sys/proc.h sys/ptrace.h sys/reg.h stdint.h \
3794 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3795 wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
3796 time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
3797 sys/filio.h \
3798 curses.h ncurses.h \
3799 poll.h sys/poll.h
3800 do
3801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3803 echo "configure:3804: checking for $ac_hdr" >&5
3804 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3805 echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807 cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 #include <$ac_hdr>
3811 EOF
3812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3813 { (eval echo configure:3814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3815 if test -z "$ac_err"; then
3816 rm -rf conftest*
3817 eval "ac_cv_header_$ac_safe=yes"
3818 else
3819 echo "$ac_err" >&5
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822 rm -rf conftest*
3823 eval "ac_cv_header_$ac_safe=no"
3824 fi
3825 rm -f conftest*
3826 fi
3827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3828 echo "$ac_t""yes" 1>&6
3829 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3830 cat >> confdefs.h <<EOF
3831 #define $ac_tr_hdr 1
3832 EOF
3833
3834 else
3835 echo "$ac_t""no" 1>&6
3836 fi
3837 done
3838
3839 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3840 echo "configure:3841: checking whether stat file-mode macros are broken" >&5
3841 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3842 echo $ac_n "(cached) $ac_c" 1>&6
3843 else
3844 cat > conftest.$ac_ext <<EOF
3845 #line 3846 "configure"
3846 #include "confdefs.h"
3847 #include <sys/types.h>
3848 #include <sys/stat.h>
3849
3850 #if defined(S_ISBLK) && defined(S_IFDIR)
3851 # if S_ISBLK (S_IFDIR)
3852 You lose.
3853 # endif
3854 #endif
3855
3856 #if defined(S_ISBLK) && defined(S_IFCHR)
3857 # if S_ISBLK (S_IFCHR)
3858 You lose.
3859 # endif
3860 #endif
3861
3862 #if defined(S_ISLNK) && defined(S_IFREG)
3863 # if S_ISLNK (S_IFREG)
3864 You lose.
3865 # endif
3866 #endif
3867
3868 #if defined(S_ISSOCK) && defined(S_IFREG)
3869 # if S_ISSOCK (S_IFREG)
3870 You lose.
3871 # endif
3872 #endif
3873
3874 EOF
3875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3876 egrep "You lose" >/dev/null 2>&1; then
3877 rm -rf conftest*
3878 ac_cv_header_stat_broken=yes
3879 else
3880 rm -rf conftest*
3881 ac_cv_header_stat_broken=no
3882 fi
3883 rm -f conftest*
3884
3885 fi
3886
3887 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3888 if test $ac_cv_header_stat_broken = yes; then
3889 cat >> confdefs.h <<\EOF
3890 #define STAT_MACROS_BROKEN 1
3891 EOF
3892
3893 fi
3894
3895
3896 echo $ac_n "checking for working const""... $ac_c" 1>&6
3897 echo "configure:3898: checking for working const" >&5
3898 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3899 echo $ac_n "(cached) $ac_c" 1>&6
3900 else
3901 cat > conftest.$ac_ext <<EOF
3902 #line 3903 "configure"
3903 #include "confdefs.h"
3904
3905 int main() {
3906
3907 /* Ultrix mips cc rejects this. */
3908 typedef int charset[2]; const charset x;
3909 /* SunOS 4.1.1 cc rejects this. */
3910 char const *const *ccp;
3911 char **p;
3912 /* NEC SVR4.0.2 mips cc rejects this. */
3913 struct point {int x, y;};
3914 static struct point const zero = {0,0};
3915 /* AIX XL C 1.02.0.0 rejects this.
3916 It does not let you subtract one const X* pointer from another in an arm
3917 of an if-expression whose if-part is not a constant expression */
3918 const char *g = "string";
3919 ccp = &g + (g ? g-g : 0);
3920 /* HPUX 7.0 cc rejects these. */
3921 ++ccp;
3922 p = (char**) ccp;
3923 ccp = (char const *const *) p;
3924 { /* SCO 3.2v4 cc rejects this. */
3925 char *t;
3926 char const *s = 0 ? (char *) 0 : (char const *) 0;
3927
3928 *t++ = 0;
3929 }
3930 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3931 int x[] = {25, 17};
3932 const int *foo = &x[0];
3933 ++foo;
3934 }
3935 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3936 typedef const int *iptr;
3937 iptr p = 0;
3938 ++p;
3939 }
3940 { /* AIX XL C 1.02.0.0 rejects this saying
3941 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3942 struct s { int j; const int *ap[3]; };
3943 struct s *b; b->j = 5;
3944 }
3945 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3946 const int foo = 10;
3947 }
3948
3949 ; return 0; }
3950 EOF
3951 if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3952 rm -rf conftest*
3953 ac_cv_c_const=yes
3954 else
3955 echo "configure: failed program was:" >&5
3956 cat conftest.$ac_ext >&5
3957 rm -rf conftest*
3958 ac_cv_c_const=no
3959 fi
3960 rm -f conftest*
3961 fi
3962
3963 echo "$ac_t""$ac_cv_c_const" 1>&6
3964 if test $ac_cv_c_const = no; then
3965 cat >> confdefs.h <<\EOF
3966 #define const
3967 EOF
3968
3969 fi
3970
3971 echo $ac_n "checking for inline""... $ac_c" 1>&6
3972 echo "configure:3973: checking for inline" >&5
3973 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3974 echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976 ac_cv_c_inline=no
3977 for ac_kw in inline __inline__ __inline; do
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981
3982 int main() {
3983 } $ac_kw foo() {
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987 rm -rf conftest*
3988 ac_cv_c_inline=$ac_kw; break
3989 else
3990 echo "configure: failed program was:" >&5
3991 cat conftest.$ac_ext >&5
3992 fi
3993 rm -f conftest*
3994 done
3995
3996 fi
3997
3998 echo "$ac_t""$ac_cv_c_inline" 1>&6
3999 case "$ac_cv_c_inline" in
4000 inline | yes) ;;
4001 no) cat >> confdefs.h <<\EOF
4002 #define inline
4003 EOF
4004 ;;
4005 *) cat >> confdefs.h <<EOF
4006 #define inline $ac_cv_c_inline
4007 EOF
4008 ;;
4009 esac
4010
4011
4012 for ac_func in btowc canonicalize_file_name isascii poll \
4013 realpath sbrk setpgid setpgrp sigaction sigprocmask sigsetmask
4014 do
4015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4016 echo "configure:4017: checking for $ac_func" >&5
4017 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 /* System header to define __stub macros and hopefully few prototypes,
4024 which can conflict with char $ac_func(); below. */
4025 #include <assert.h>
4026 /* Override any gcc2 internal prototype to avoid an error. */
4027 /* We use char because int might match the return type of a gcc2
4028 builtin and then its argument prototype would still apply. */
4029 char $ac_func();
4030
4031 int main() {
4032
4033 /* The GNU C library defines this for functions which it implements
4034 to always fail with ENOSYS. Some functions are actually named
4035 something starting with __ and the normal name is an alias. */
4036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4037 choke me
4038 #else
4039 $ac_func();
4040 #endif
4041
4042 ; return 0; }
4043 EOF
4044 if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4045 rm -rf conftest*
4046 eval "ac_cv_func_$ac_func=yes"
4047 else
4048 echo "configure: failed program was:" >&5
4049 cat conftest.$ac_ext >&5
4050 rm -rf conftest*
4051 eval "ac_cv_func_$ac_func=no"
4052 fi
4053 rm -f conftest*
4054 fi
4055
4056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4057 echo "$ac_t""yes" 1>&6
4058 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4059 cat >> confdefs.h <<EOF
4060 #define $ac_tr_func 1
4061 EOF
4062
4063 else
4064 echo "$ac_t""no" 1>&6
4065 fi
4066 done
4067
4068 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4069 # for constant arguments. Useless!
4070 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4071 echo "configure:4072: checking for working alloca.h" >&5
4072 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4073 echo $ac_n "(cached) $ac_c" 1>&6
4074 else
4075 cat > conftest.$ac_ext <<EOF
4076 #line 4077 "configure"
4077 #include "confdefs.h"
4078 #include <alloca.h>
4079 int main() {
4080 char *p = alloca(2 * sizeof(int));
4081 ; return 0; }
4082 EOF
4083 if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4084 rm -rf conftest*
4085 ac_cv_header_alloca_h=yes
4086 else
4087 echo "configure: failed program was:" >&5
4088 cat conftest.$ac_ext >&5
4089 rm -rf conftest*
4090 ac_cv_header_alloca_h=no
4091 fi
4092 rm -f conftest*
4093 fi
4094
4095 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4096 if test $ac_cv_header_alloca_h = yes; then
4097 cat >> confdefs.h <<\EOF
4098 #define HAVE_ALLOCA_H 1
4099 EOF
4100
4101 fi
4102
4103 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4104 echo "configure:4105: checking for alloca" >&5
4105 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4106 echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4111
4112 #ifdef __GNUC__
4113 # define alloca __builtin_alloca
4114 #else
4115 # ifdef _MSC_VER
4116 # include <malloc.h>
4117 # define alloca _alloca
4118 # else
4119 # if HAVE_ALLOCA_H
4120 # include <alloca.h>
4121 # else
4122 # ifdef _AIX
4123 #pragma alloca
4124 # else
4125 # ifndef alloca /* predefined by HP cc +Olibcalls */
4126 char *alloca ();
4127 # endif
4128 # endif
4129 # endif
4130 # endif
4131 #endif
4132
4133 int main() {
4134 char *p = (char *) alloca(1);
4135 ; return 0; }
4136 EOF
4137 if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4138 rm -rf conftest*
4139 ac_cv_func_alloca_works=yes
4140 else
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4143 rm -rf conftest*
4144 ac_cv_func_alloca_works=no
4145 fi
4146 rm -f conftest*
4147 fi
4148
4149 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4150 if test $ac_cv_func_alloca_works = yes; then
4151 cat >> confdefs.h <<\EOF
4152 #define HAVE_ALLOCA 1
4153 EOF
4154
4155 fi
4156
4157 if test $ac_cv_func_alloca_works = no; then
4158 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4159 # that cause trouble. Some versions do not even contain alloca or
4160 # contain a buggy version. If you still want to use their alloca,
4161 # use ar to extract alloca.o from them instead of compiling alloca.c.
4162 ALLOCA=alloca.${ac_objext}
4163 cat >> confdefs.h <<\EOF
4164 #define C_ALLOCA 1
4165 EOF
4166
4167
4168 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4169 echo "configure:4170: checking whether alloca needs Cray hooks" >&5
4170 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4171 echo $ac_n "(cached) $ac_c" 1>&6
4172 else
4173 cat > conftest.$ac_ext <<EOF
4174 #line 4175 "configure"
4175 #include "confdefs.h"
4176 #if defined(CRAY) && ! defined(CRAY2)
4177 webecray
4178 #else
4179 wenotbecray
4180 #endif
4181
4182 EOF
4183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4184 egrep "webecray" >/dev/null 2>&1; then
4185 rm -rf conftest*
4186 ac_cv_os_cray=yes
4187 else
4188 rm -rf conftest*
4189 ac_cv_os_cray=no
4190 fi
4191 rm -f conftest*
4192
4193 fi
4194
4195 echo "$ac_t""$ac_cv_os_cray" 1>&6
4196 if test $ac_cv_os_cray = yes; then
4197 for ac_func in _getb67 GETB67 getb67; do
4198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4199 echo "configure:4200: checking for $ac_func" >&5
4200 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4201 echo $ac_n "(cached) $ac_c" 1>&6
4202 else
4203 cat > conftest.$ac_ext <<EOF
4204 #line 4205 "configure"
4205 #include "confdefs.h"
4206 /* System header to define __stub macros and hopefully few prototypes,
4207 which can conflict with char $ac_func(); below. */
4208 #include <assert.h>
4209 /* Override any gcc2 internal prototype to avoid an error. */
4210 /* We use char because int might match the return type of a gcc2
4211 builtin and then its argument prototype would still apply. */
4212 char $ac_func();
4213
4214 int main() {
4215
4216 /* The GNU C library defines this for functions which it implements
4217 to always fail with ENOSYS. Some functions are actually named
4218 something starting with __ and the normal name is an alias. */
4219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4220 choke me
4221 #else
4222 $ac_func();
4223 #endif
4224
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4228 rm -rf conftest*
4229 eval "ac_cv_func_$ac_func=yes"
4230 else
4231 echo "configure: failed program was:" >&5
4232 cat conftest.$ac_ext >&5
4233 rm -rf conftest*
4234 eval "ac_cv_func_$ac_func=no"
4235 fi
4236 rm -f conftest*
4237 fi
4238
4239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4240 echo "$ac_t""yes" 1>&6
4241 cat >> confdefs.h <<EOF
4242 #define CRAY_STACKSEG_END $ac_func
4243 EOF
4244
4245 break
4246 else
4247 echo "$ac_t""no" 1>&6
4248 fi
4249
4250 done
4251 fi
4252
4253 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4254 echo "configure:4255: checking stack direction for C alloca" >&5
4255 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4256 echo $ac_n "(cached) $ac_c" 1>&6
4257 else
4258 if test "$cross_compiling" = yes; then
4259 ac_cv_c_stack_direction=0
4260 else
4261 cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 find_stack_direction ()
4265 {
4266 static char *addr = 0;
4267 auto char dummy;
4268 if (addr == 0)
4269 {
4270 addr = &dummy;
4271 return find_stack_direction ();
4272 }
4273 else
4274 return (&dummy > addr) ? 1 : -1;
4275 }
4276 main ()
4277 {
4278 exit (find_stack_direction() < 0);
4279 }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4282 then
4283 ac_cv_c_stack_direction=1
4284 else
4285 echo "configure: failed program was:" >&5
4286 cat conftest.$ac_ext >&5
4287 rm -fr conftest*
4288 ac_cv_c_stack_direction=-1
4289 fi
4290 rm -fr conftest*
4291 fi
4292
4293 fi
4294
4295 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4296 cat >> confdefs.h <<EOF
4297 #define STACK_DIRECTION $ac_cv_c_stack_direction
4298 EOF
4299
4300 fi
4301
4302 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
4303 echo "configure:4304: checking for pid_t" >&5
4304 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
4305 echo $ac_n "(cached) $ac_c" 1>&6
4306 else
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 #include <sys/types.h>
4311 #if STDC_HEADERS
4312 #include <stdlib.h>
4313 #include <stddef.h>
4314 #endif
4315 EOF
4316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4317 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4318 rm -rf conftest*
4319 ac_cv_type_pid_t=yes
4320 else
4321 rm -rf conftest*
4322 ac_cv_type_pid_t=no
4323 fi
4324 rm -f conftest*
4325
4326 fi
4327 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
4328 if test $ac_cv_type_pid_t = no; then
4329 cat >> confdefs.h <<\EOF
4330 #define pid_t int
4331 EOF
4332
4333 fi
4334
4335 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
4336 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
4337 echo "configure:4338: checking for vfork.h" >&5
4338 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4339 echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341 cat > conftest.$ac_ext <<EOF
4342 #line 4343 "configure"
4343 #include "confdefs.h"
4344 #include <vfork.h>
4345 EOF
4346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4347 { (eval echo configure:4348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4349 if test -z "$ac_err"; then
4350 rm -rf conftest*
4351 eval "ac_cv_header_$ac_safe=yes"
4352 else
4353 echo "$ac_err" >&5
4354 echo "configure: failed program was:" >&5
4355 cat conftest.$ac_ext >&5
4356 rm -rf conftest*
4357 eval "ac_cv_header_$ac_safe=no"
4358 fi
4359 rm -f conftest*
4360 fi
4361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4362 echo "$ac_t""yes" 1>&6
4363 cat >> confdefs.h <<\EOF
4364 #define HAVE_VFORK_H 1
4365 EOF
4366
4367 else
4368 echo "$ac_t""no" 1>&6
4369 fi
4370
4371 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
4372 echo "configure:4373: checking for working vfork" >&5
4373 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
4374 echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376 if test "$cross_compiling" = yes; then
4377 echo $ac_n "checking for vfork""... $ac_c" 1>&6
4378 echo "configure:4379: checking for vfork" >&5
4379 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
4380 echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382 cat > conftest.$ac_ext <<EOF
4383 #line 4384 "configure"
4384 #include "confdefs.h"
4385 /* System header to define __stub macros and hopefully few prototypes,
4386 which can conflict with char vfork(); below. */
4387 #include <assert.h>
4388 /* Override any gcc2 internal prototype to avoid an error. */
4389 /* We use char because int might match the return type of a gcc2
4390 builtin and then its argument prototype would still apply. */
4391 char vfork();
4392
4393 int main() {
4394
4395 /* The GNU C library defines this for functions which it implements
4396 to always fail with ENOSYS. Some functions are actually named
4397 something starting with __ and the normal name is an alias. */
4398 #if defined (__stub_vfork) || defined (__stub___vfork)
4399 choke me
4400 #else
4401 vfork();
4402 #endif
4403
4404 ; return 0; }
4405 EOF
4406 if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4407 rm -rf conftest*
4408 eval "ac_cv_func_vfork=yes"
4409 else
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4412 rm -rf conftest*
4413 eval "ac_cv_func_vfork=no"
4414 fi
4415 rm -f conftest*
4416 fi
4417
4418 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
4419 echo "$ac_t""yes" 1>&6
4420 :
4421 else
4422 echo "$ac_t""no" 1>&6
4423 fi
4424
4425 ac_cv_func_vfork_works=$ac_cv_func_vfork
4426 else
4427 cat > conftest.$ac_ext <<EOF
4428 #line 4429 "configure"
4429 #include "confdefs.h"
4430 /* Thanks to Paul Eggert for this test. */
4431 #include <stdio.h>
4432 #include <sys/types.h>
4433 #include <sys/stat.h>
4434 #ifdef HAVE_UNISTD_H
4435 #include <unistd.h>
4436 #endif
4437 #ifdef HAVE_VFORK_H
4438 #include <vfork.h>
4439 #endif
4440 /* On some sparc systems, changes by the child to local and incoming
4441 argument registers are propagated back to the parent.
4442 The compiler is told about this with #include <vfork.h>,
4443 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
4444 Test for this by using a static variable whose address
4445 is put into a register that is clobbered by the vfork. */
4446 static
4447 #ifdef __cplusplus
4448 sparc_address_test (int arg)
4449 #else
4450 sparc_address_test (arg) int arg;
4451 #endif
4452 {
4453 static pid_t child;
4454 if (!child) {
4455 child = vfork ();
4456 if (child < 0) {
4457 perror ("vfork");
4458 _exit(2);
4459 }
4460 if (!child) {
4461 arg = getpid();
4462 write(-1, "", 0);
4463 _exit (arg);
4464 }
4465 }
4466 }
4467 main() {
4468 pid_t parent = getpid ();
4469 pid_t child;
4470
4471 sparc_address_test ();
4472
4473 child = vfork ();
4474
4475 if (child == 0) {
4476 /* Here is another test for sparc vfork register problems.
4477 This test uses lots of local variables, at least
4478 as many local variables as main has allocated so far
4479 including compiler temporaries. 4 locals are enough for
4480 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
4481 A buggy compiler should reuse the register of parent
4482 for one of the local variables, since it will think that
4483 parent can't possibly be used any more in this routine.
4484 Assigning to the local variable will thus munge parent
4485 in the parent process. */
4486 pid_t
4487 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
4488 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
4489 /* Convince the compiler that p..p7 are live; otherwise, it might
4490 use the same hardware register for all 8 local variables. */
4491 if (p != p1 || p != p2 || p != p3 || p != p4
4492 || p != p5 || p != p6 || p != p7)
4493 _exit(1);
4494
4495 /* On some systems (e.g. IRIX 3.3),
4496 vfork doesn't separate parent from child file descriptors.
4497 If the child closes a descriptor before it execs or exits,
4498 this munges the parent's descriptor as well.
4499 Test for this by closing stdout in the child. */
4500 _exit(close(fileno(stdout)) != 0);
4501 } else {
4502 int status;
4503 struct stat st;
4504
4505 while (wait(&status) != child)
4506 ;
4507 exit(
4508 /* Was there some problem with vforking? */
4509 child < 0
4510
4511 /* Did the child fail? (This shouldn't happen.) */
4512 || status
4513
4514 /* Did the vfork/compiler bug occur? */
4515 || parent != getpid()
4516
4517 /* Did the file descriptor bug occur? */
4518 || fstat(fileno(stdout), &st) != 0
4519 );
4520 }
4521 }
4522 EOF
4523 if { (eval echo configure:4524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4524 then
4525 ac_cv_func_vfork_works=yes
4526 else
4527 echo "configure: failed program was:" >&5
4528 cat conftest.$ac_ext >&5
4529 rm -fr conftest*
4530 ac_cv_func_vfork_works=no
4531 fi
4532 rm -fr conftest*
4533 fi
4534
4535 fi
4536
4537 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
4538 if test $ac_cv_func_vfork_works = no; then
4539 cat >> confdefs.h <<\EOF
4540 #define vfork fork
4541 EOF
4542
4543 fi
4544
4545 if test "$cross_compiling" = no; then
4546 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4547 echo "configure:4548: checking whether setpgrp takes no argument" >&5
4548 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4549 echo $ac_n "(cached) $ac_c" 1>&6
4550 else
4551 if test "$cross_compiling" = yes; then
4552 { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4553 else
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557
4558 #ifdef HAVE_UNISTD_H
4559 #include <unistd.h>
4560 #endif
4561
4562 /*
4563 * If this system has a BSD-style setpgrp, which takes arguments, exit
4564 * successfully.
4565 */
4566 main()
4567 {
4568 if (setpgrp(1,1) == -1)
4569 exit(0);
4570 else
4571 exit(1);
4572 }
4573
4574 EOF
4575 if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4576 then
4577 ac_cv_func_setpgrp_void=no
4578 else
4579 echo "configure: failed program was:" >&5
4580 cat conftest.$ac_ext >&5
4581 rm -fr conftest*
4582 ac_cv_func_setpgrp_void=yes
4583 fi
4584 rm -fr conftest*
4585 fi
4586
4587
4588 fi
4589
4590 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4591 if test $ac_cv_func_setpgrp_void = yes; then
4592 cat >> confdefs.h <<\EOF
4593 #define SETPGRP_VOID 1
4594 EOF
4595
4596 fi
4597
4598 else
4599 echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4600 echo "configure:4601: checking whether setpgrp takes no argument" >&5
4601 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4602 echo $ac_n "(cached) $ac_c" 1>&6
4603 else
4604 cat > conftest.$ac_ext <<EOF
4605 #line 4606 "configure"
4606 #include "confdefs.h"
4607
4608 #include <unistd.h>
4609
4610 int main() {
4611
4612 if (setpgrp(1,1) == -1)
4613 exit (0);
4614 else
4615 exit (1);
4616
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4620 rm -rf conftest*
4621 ac_cv_func_setpgrp_void=no
4622 else
4623 echo "configure: failed program was:" >&5
4624 cat conftest.$ac_ext >&5
4625 rm -rf conftest*
4626 ac_cv_func_setpgrp_void=yes
4627 fi
4628 rm -f conftest*
4629 fi
4630
4631 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4632 if test $ac_cv_func_setpgrp_void = yes; then
4633 cat >> confdefs.h <<\EOF
4634 #define SETPGRP_VOID 1
4635 EOF
4636
4637 fi
4638 fi
4639
4640 # Check if sigsetjmp is available. Using AC_CHECK_FUNCS won't do
4641 # since sigsetjmp might only be defined as a macro.
4642 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
4643 echo "configure:4644: checking for sigsetjmp" >&5
4644 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4645 echo $ac_n "(cached) $ac_c" 1>&6
4646 else
4647 cat > conftest.$ac_ext <<EOF
4648 #line 4649 "configure"
4649 #include "confdefs.h"
4650
4651 #include <setjmp.h>
4652
4653 int main() {
4654 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4655 ; return 0; }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4658 rm -rf conftest*
4659 gdb_cv_func_sigsetjmp=yes
4660 else
4661 echo "configure: failed program was:" >&5
4662 cat conftest.$ac_ext >&5
4663 rm -rf conftest*
4664 gdb_cv_func_sigsetjmp=no
4665 fi
4666 rm -f conftest*
4667 fi
4668
4669 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4670 if test $gdb_cv_func_sigsetjmp = yes; then
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_SIGSETJMP 1
4673 EOF
4674
4675 fi
4676
4677 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
4678 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4679 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
4680 echo "configure:4681: checking for r_fs in struct reg" >&5
4681 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
4682 echo $ac_n "(cached) $ac_c" 1>&6
4683 else
4684 cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687 #include <machine/reg.h>
4688 int main() {
4689 struct reg r; r.r_fs;
4690 ; return 0; }
4691 EOF
4692 if { (eval echo configure:4693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4693 rm -rf conftest*
4694 gdb_cv_struct_reg_r_fs=yes
4695 else
4696 echo "configure: failed program was:" >&5
4697 cat conftest.$ac_ext >&5
4698 rm -rf conftest*
4699 gdb_cv_struct_reg_r_fs=no
4700 fi
4701 rm -f conftest*
4702 fi
4703
4704 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4705 if test $gdb_cv_struct_reg_r_fs = yes; then
4706 cat >> confdefs.h <<\EOF
4707 #define HAVE_STRUCT_REG_R_FS 1
4708 EOF
4709
4710 fi
4711 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
4712 echo "configure:4713: checking for r_gs in struct reg" >&5
4713 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
4714 echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716 cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 #include <machine/reg.h>
4720 int main() {
4721 struct reg r; r.r_gs;
4722 ; return 0; }
4723 EOF
4724 if { (eval echo configure:4725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4725 rm -rf conftest*
4726 gdb_cv_struct_reg_r_gs=yes
4727 else
4728 echo "configure: failed program was:" >&5
4729 cat conftest.$ac_ext >&5
4730 rm -rf conftest*
4731 gdb_cv_struct_reg_r_gs=no
4732 fi
4733 rm -f conftest*
4734 fi
4735
4736 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4737 if test $gdb_cv_struct_reg_r_gs = yes; then
4738 cat >> confdefs.h <<\EOF
4739 #define HAVE_STRUCT_REG_R_GS 1
4740 EOF
4741
4742 fi
4743
4744 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
4745 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
4746 echo "configure:4747: checking for PTRACE_GETREGS" >&5
4747 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4748 echo $ac_n "(cached) $ac_c" 1>&6
4749 else
4750 cat > conftest.$ac_ext <<EOF
4751 #line 4752 "configure"
4752 #include "confdefs.h"
4753 #include <sys/ptrace.h>
4754 int main() {
4755 PTRACE_GETREGS;
4756 ; return 0; }
4757 EOF
4758 if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4759 rm -rf conftest*
4760 gdb_cv_have_ptrace_getregs=yes
4761 else
4762 echo "configure: failed program was:" >&5
4763 cat conftest.$ac_ext >&5
4764 rm -rf conftest*
4765 gdb_cv_have_ptrace_getregs=no
4766 fi
4767 rm -f conftest*
4768 fi
4769
4770 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
4771 if test $gdb_cv_have_ptrace_getregs = yes; then
4772 cat >> confdefs.h <<\EOF
4773 #define HAVE_PTRACE_GETREGS 1
4774 EOF
4775
4776 fi
4777
4778 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
4779 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
4780 echo "configure:4781: checking for PTRACE_GETFPXREGS" >&5
4781 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+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 <sys/ptrace.h>
4788 int main() {
4789 PTRACE_GETFPXREGS;
4790 ; return 0; }
4791 EOF
4792 if { (eval echo configure:4793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4793 rm -rf conftest*
4794 gdb_cv_have_ptrace_getfpxregs=yes
4795 else
4796 echo "configure: failed program was:" >&5
4797 cat conftest.$ac_ext >&5
4798 rm -rf conftest*
4799 gdb_cv_have_ptrace_getfpxregs=no
4800 fi
4801 rm -f conftest*
4802 fi
4803
4804 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4805 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
4806 cat >> confdefs.h <<\EOF
4807 #define HAVE_PTRACE_GETFPXREGS 1
4808 EOF
4809
4810 fi
4811
4812 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4813 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
4814 echo "configure:4815: checking for PT_GETDBREGS" >&5
4815 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
4816 echo $ac_n "(cached) $ac_c" 1>&6
4817 else
4818 cat > conftest.$ac_ext <<EOF
4819 #line 4820 "configure"
4820 #include "confdefs.h"
4821 #include <sys/types.h>
4822 #include <sys/ptrace.h>
4823 int main() {
4824 PT_GETDBREGS;
4825 ; return 0; }
4826 EOF
4827 if { (eval echo configure:4828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4828 rm -rf conftest*
4829 gdb_cv_have_pt_getdbregs=yes
4830 else
4831 echo "configure: failed program was:" >&5
4832 cat conftest.$ac_ext >&5
4833 rm -rf conftest*
4834 gdb_cv_have_pt_getdbregs=no
4835 fi
4836 rm -f conftest*
4837 fi
4838
4839 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4840 if test $gdb_cv_have_pt_getdbregs = yes; then
4841 cat >> confdefs.h <<\EOF
4842 #define HAVE_PT_GETDBREGS 1
4843 EOF
4844
4845 fi
4846
4847 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
4848 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
4849 echo "configure:4850: checking for PT_GETXMMREGS" >&5
4850 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
4851 echo $ac_n "(cached) $ac_c" 1>&6
4852 else
4853 cat > conftest.$ac_ext <<EOF
4854 #line 4855 "configure"
4855 #include "confdefs.h"
4856 #include <sys/types.h>
4857 #include <sys/ptrace.h>
4858 int main() {
4859 PT_GETXMMREGS;
4860 ; return 0; }
4861 EOF
4862 if { (eval echo configure:4863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4863 rm -rf conftest*
4864 gdb_cv_have_pt_getxmmregs=yes
4865 else
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4868 rm -rf conftest*
4869 gdb_cv_have_pt_getxmmregs=no
4870 fi
4871 rm -f conftest*
4872 fi
4873
4874 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
4875 if test $gdb_cv_have_pt_getxmmregs = yes; then
4876 cat >> confdefs.h <<\EOF
4877 #define HAVE_PT_GETXMMREGS 1
4878 EOF
4879
4880 fi
4881
4882
4883 for ac_func in socketpair
4884 do
4885 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4886 echo "configure:4887: checking for $ac_func" >&5
4887 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4888 echo $ac_n "(cached) $ac_c" 1>&6
4889 else
4890 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 /* System header to define __stub macros and hopefully few prototypes,
4894 which can conflict with char $ac_func(); below. */
4895 #include <assert.h>
4896 /* Override any gcc2 internal prototype to avoid an error. */
4897 /* We use char because int might match the return type of a gcc2
4898 builtin and then its argument prototype would still apply. */
4899 char $ac_func();
4900
4901 int main() {
4902
4903 /* The GNU C library defines this for functions which it implements
4904 to always fail with ENOSYS. Some functions are actually named
4905 something starting with __ and the normal name is an alias. */
4906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4907 choke me
4908 #else
4909 $ac_func();
4910 #endif
4911
4912 ; return 0; }
4913 EOF
4914 if { (eval echo configure:4915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4915 rm -rf conftest*
4916 eval "ac_cv_func_$ac_func=yes"
4917 else
4918 echo "configure: failed program was:" >&5
4919 cat conftest.$ac_ext >&5
4920 rm -rf conftest*
4921 eval "ac_cv_func_$ac_func=no"
4922 fi
4923 rm -f conftest*
4924 fi
4925
4926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4927 echo "$ac_t""yes" 1>&6
4928 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4929 cat >> confdefs.h <<EOF
4930 #define $ac_tr_func 1
4931 EOF
4932
4933 else
4934 echo "$ac_t""no" 1>&6
4935 fi
4936 done
4937
4938
4939
4940 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4941 echo "configure:4942: checking whether malloc must be declared" >&5
4942 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4943 echo $ac_n "(cached) $ac_c" 1>&6
4944 else
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4948
4949 #include <stdio.h>
4950 #ifdef HAVE_STRING_H
4951 #include <string.h>
4952 #else
4953 #ifdef HAVE_STRINGS_H
4954 #include <strings.h>
4955 #endif
4956 #endif
4957 #ifdef HAVE_STDLIB_H
4958 #include <stdlib.h>
4959 #endif
4960 #ifdef HAVE_UNISTD_H
4961 #include <unistd.h>
4962 #endif
4963 int main() {
4964 char *(*pfn) = (char *(*)) malloc
4965 ; return 0; }
4966 EOF
4967 if { (eval echo configure:4968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4968 rm -rf conftest*
4969 bfd_cv_decl_needed_malloc=no
4970 else
4971 echo "configure: failed program was:" >&5
4972 cat conftest.$ac_ext >&5
4973 rm -rf conftest*
4974 bfd_cv_decl_needed_malloc=yes
4975 fi
4976 rm -f conftest*
4977 fi
4978
4979 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4980 if test $bfd_cv_decl_needed_malloc = yes; then
4981 cat >> confdefs.h <<\EOF
4982 #define NEED_DECLARATION_MALLOC 1
4983 EOF
4984
4985 fi
4986
4987 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4988 echo "configure:4989: checking whether realloc must be declared" >&5
4989 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4991 else
4992 cat > conftest.$ac_ext <<EOF
4993 #line 4994 "configure"
4994 #include "confdefs.h"
4995
4996 #include <stdio.h>
4997 #ifdef HAVE_STRING_H
4998 #include <string.h>
4999 #else
5000 #ifdef HAVE_STRINGS_H
5001 #include <strings.h>
5002 #endif
5003 #endif
5004 #ifdef HAVE_STDLIB_H
5005 #include <stdlib.h>
5006 #endif
5007 #ifdef HAVE_UNISTD_H
5008 #include <unistd.h>
5009 #endif
5010 int main() {
5011 char *(*pfn) = (char *(*)) realloc
5012 ; return 0; }
5013 EOF
5014 if { (eval echo configure:5015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5015 rm -rf conftest*
5016 bfd_cv_decl_needed_realloc=no
5017 else
5018 echo "configure: failed program was:" >&5
5019 cat conftest.$ac_ext >&5
5020 rm -rf conftest*
5021 bfd_cv_decl_needed_realloc=yes
5022 fi
5023 rm -f conftest*
5024 fi
5025
5026 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
5027 if test $bfd_cv_decl_needed_realloc = yes; then
5028 cat >> confdefs.h <<\EOF
5029 #define NEED_DECLARATION_REALLOC 1
5030 EOF
5031
5032 fi
5033
5034 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
5035 echo "configure:5036: checking whether free must be declared" >&5
5036 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
5037 echo $ac_n "(cached) $ac_c" 1>&6
5038 else
5039 cat > conftest.$ac_ext <<EOF
5040 #line 5041 "configure"
5041 #include "confdefs.h"
5042
5043 #include <stdio.h>
5044 #ifdef HAVE_STRING_H
5045 #include <string.h>
5046 #else
5047 #ifdef HAVE_STRINGS_H
5048 #include <strings.h>
5049 #endif
5050 #endif
5051 #ifdef HAVE_STDLIB_H
5052 #include <stdlib.h>
5053 #endif
5054 #ifdef HAVE_UNISTD_H
5055 #include <unistd.h>
5056 #endif
5057 int main() {
5058 char *(*pfn) = (char *(*)) free
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5062 rm -rf conftest*
5063 bfd_cv_decl_needed_free=no
5064 else
5065 echo "configure: failed program was:" >&5
5066 cat conftest.$ac_ext >&5
5067 rm -rf conftest*
5068 bfd_cv_decl_needed_free=yes
5069 fi
5070 rm -f conftest*
5071 fi
5072
5073 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
5074 if test $bfd_cv_decl_needed_free = yes; then
5075 cat >> confdefs.h <<\EOF
5076 #define NEED_DECLARATION_FREE 1
5077 EOF
5078
5079 fi
5080
5081 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
5082 echo "configure:5083: checking whether strerror must be declared" >&5
5083 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
5084 echo $ac_n "(cached) $ac_c" 1>&6
5085 else
5086 cat > conftest.$ac_ext <<EOF
5087 #line 5088 "configure"
5088 #include "confdefs.h"
5089
5090 #include <stdio.h>
5091 #ifdef HAVE_STRING_H
5092 #include <string.h>
5093 #else
5094 #ifdef HAVE_STRINGS_H
5095 #include <strings.h>
5096 #endif
5097 #endif
5098 #ifdef HAVE_STDLIB_H
5099 #include <stdlib.h>
5100 #endif
5101 #ifdef HAVE_UNISTD_H
5102 #include <unistd.h>
5103 #endif
5104 int main() {
5105 char *(*pfn) = (char *(*)) strerror
5106 ; return 0; }
5107 EOF
5108 if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5109 rm -rf conftest*
5110 bfd_cv_decl_needed_strerror=no
5111 else
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115 bfd_cv_decl_needed_strerror=yes
5116 fi
5117 rm -f conftest*
5118 fi
5119
5120 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
5121 if test $bfd_cv_decl_needed_strerror = yes; then
5122 cat >> confdefs.h <<\EOF
5123 #define NEED_DECLARATION_STRERROR 1
5124 EOF
5125
5126 fi
5127
5128 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
5129 echo "configure:5130: checking whether strdup must be declared" >&5
5130 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
5131 echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133 cat > conftest.$ac_ext <<EOF
5134 #line 5135 "configure"
5135 #include "confdefs.h"
5136
5137 #include <stdio.h>
5138 #ifdef HAVE_STRING_H
5139 #include <string.h>
5140 #else
5141 #ifdef HAVE_STRINGS_H
5142 #include <strings.h>
5143 #endif
5144 #endif
5145 #ifdef HAVE_STDLIB_H
5146 #include <stdlib.h>
5147 #endif
5148 #ifdef HAVE_UNISTD_H
5149 #include <unistd.h>
5150 #endif
5151 int main() {
5152 char *(*pfn) = (char *(*)) strdup
5153 ; return 0; }
5154 EOF
5155 if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5156 rm -rf conftest*
5157 bfd_cv_decl_needed_strdup=no
5158 else
5159 echo "configure: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161 rm -rf conftest*
5162 bfd_cv_decl_needed_strdup=yes
5163 fi
5164 rm -f conftest*
5165 fi
5166
5167 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
5168 if test $bfd_cv_decl_needed_strdup = yes; then
5169 cat >> confdefs.h <<\EOF
5170 #define NEED_DECLARATION_STRDUP 1
5171 EOF
5172
5173 fi
5174
5175 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
5176 echo "configure:5177: checking whether strstr must be declared" >&5
5177 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
5178 echo $ac_n "(cached) $ac_c" 1>&6
5179 else
5180 cat > conftest.$ac_ext <<EOF
5181 #line 5182 "configure"
5182 #include "confdefs.h"
5183
5184 #include <stdio.h>
5185 #ifdef HAVE_STRING_H
5186 #include <string.h>
5187 #else
5188 #ifdef HAVE_STRINGS_H
5189 #include <strings.h>
5190 #endif
5191 #endif
5192 #ifdef HAVE_STDLIB_H
5193 #include <stdlib.h>
5194 #endif
5195 #ifdef HAVE_UNISTD_H
5196 #include <unistd.h>
5197 #endif
5198 int main() {
5199 char *(*pfn) = (char *(*)) strstr
5200 ; return 0; }
5201 EOF
5202 if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5203 rm -rf conftest*
5204 bfd_cv_decl_needed_strstr=no
5205 else
5206 echo "configure: failed program was:" >&5
5207 cat conftest.$ac_ext >&5
5208 rm -rf conftest*
5209 bfd_cv_decl_needed_strstr=yes
5210 fi
5211 rm -f conftest*
5212 fi
5213
5214 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
5215 if test $bfd_cv_decl_needed_strstr = yes; then
5216 cat >> confdefs.h <<\EOF
5217 #define NEED_DECLARATION_STRSTR 1
5218 EOF
5219
5220 fi
5221
5222 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
5223 echo "configure:5224: checking whether canonicalize_file_name must be declared" >&5
5224 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
5225 echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227 cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230
5231 #include <stdio.h>
5232 #ifdef HAVE_STRING_H
5233 #include <string.h>
5234 #else
5235 #ifdef HAVE_STRINGS_H
5236 #include <strings.h>
5237 #endif
5238 #endif
5239 #ifdef HAVE_STDLIB_H
5240 #include <stdlib.h>
5241 #endif
5242 #ifdef HAVE_UNISTD_H
5243 #include <unistd.h>
5244 #endif
5245 int main() {
5246 char *(*pfn) = (char *(*)) canonicalize_file_name
5247 ; return 0; }
5248 EOF
5249 if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5250 rm -rf conftest*
5251 bfd_cv_decl_needed_canonicalize_file_name=no
5252 else
5253 echo "configure: failed program was:" >&5
5254 cat conftest.$ac_ext >&5
5255 rm -rf conftest*
5256 bfd_cv_decl_needed_canonicalize_file_name=yes
5257 fi
5258 rm -f conftest*
5259 fi
5260
5261 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
5262 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
5263 cat >> confdefs.h <<\EOF
5264 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
5265 EOF
5266
5267 fi
5268
5269
5270 # The following save_state_t checkery is only necessary for HPUX
5271 # versions earlier than 10.20. When those fade from memory, this
5272 # could be expunged. --jsm 1999-03-22
5273
5274 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
5275 echo "configure:5276: checking for HPUX save_state structure" >&5
5276 cat > conftest.$ac_ext <<EOF
5277 #line 5278 "configure"
5278 #include "confdefs.h"
5279 #include <machine/save_state.h>
5280 EOF
5281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5282 egrep "save_state_t" >/dev/null 2>&1; then
5283 rm -rf conftest*
5284 gdb_cv_hpux_savestate=yes
5285 else
5286 rm -rf conftest*
5287 gdb_cv_hpux_savestate=no
5288 fi
5289 rm -f conftest*
5290
5291 cat > conftest.$ac_ext <<EOF
5292 #line 5293 "configure"
5293 #include "confdefs.h"
5294 #include <machine/save_state.h>
5295 EOF
5296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5297 egrep "ss_wide" >/dev/null 2>&1; then
5298 rm -rf conftest*
5299 gdb_cv_hpux_sswide=yes
5300 else
5301 rm -rf conftest*
5302 gdb_cv_hpux_sswide=no
5303 fi
5304 rm -f conftest*
5305
5306 if test $gdb_cv_hpux_savestate = yes
5307 then
5308 cat >> confdefs.h <<\EOF
5309 #define HAVE_STRUCT_SAVE_STATE_T 1
5310 EOF
5311
5312 fi
5313 if test $gdb_cv_hpux_sswide = yes
5314 then
5315 cat >> confdefs.h <<\EOF
5316 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
5317 EOF
5318
5319 fi
5320 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
5321
5322
5323 # If we are configured native on GNU/Linux, work around problems with
5324 # sys/procfs.h
5325 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
5326
5327 if test "${target}" = "${host}"; then
5328 case "${host}" in
5329 i[3456]86-*-linux*)
5330 cat >> confdefs.h <<\EOF
5331 #define START_INFERIOR_TRAPS_EXPECTED 2
5332 EOF
5333
5334 cat >> confdefs.h <<\EOF
5335 #define sys_quotactl 1
5336 EOF
5337
5338 ;;
5339 ia64-*-aix*)
5340 cat >> confdefs.h <<\EOF
5341 #define NEW_PROC_API 1
5342 EOF
5343
5344 ;;
5345 *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
5346 cat >> confdefs.h <<\EOF
5347 #define NEW_PROC_API 1
5348 EOF
5349
5350 ;;
5351 *-*-solaris2.[678])
5352 cat >> confdefs.h <<\EOF
5353 #define NEW_PROC_API 1
5354 EOF
5355
5356 ;;
5357 esac
5358 fi
5359
5360 if test "$ac_cv_header_sys_procfs_h" = yes; then
5361 echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
5362 echo "configure:5363: checking for pstatus_t in sys/procfs.h" >&5
5363 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
5364 echo $ac_n "(cached) $ac_c" 1>&6
5365 else
5366 cat > conftest.$ac_ext <<EOF
5367 #line 5368 "configure"
5368 #include "confdefs.h"
5369
5370 #define _SYSCALL32
5371 #include <sys/procfs.h>
5372 int main() {
5373 pstatus_t avar
5374 ; return 0; }
5375 EOF
5376 if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5377 rm -rf conftest*
5378 bfd_cv_have_sys_procfs_type_pstatus_t=yes
5379 else
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
5382 rm -rf conftest*
5383 bfd_cv_have_sys_procfs_type_pstatus_t=no
5384
5385 fi
5386 rm -f conftest*
5387 fi
5388
5389 if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
5390 cat >> confdefs.h <<\EOF
5391 #define HAVE_PSTATUS_T 1
5392 EOF
5393
5394 fi
5395 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
5396
5397 echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
5398 echo "configure:5399: checking for prrun_t in sys/procfs.h" >&5
5399 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
5400 echo $ac_n "(cached) $ac_c" 1>&6
5401 else
5402 cat > conftest.$ac_ext <<EOF
5403 #line 5404 "configure"
5404 #include "confdefs.h"
5405
5406 #define _SYSCALL32
5407 #include <sys/procfs.h>
5408 int main() {
5409 prrun_t avar
5410 ; return 0; }
5411 EOF
5412 if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5413 rm -rf conftest*
5414 bfd_cv_have_sys_procfs_type_prrun_t=yes
5415 else
5416 echo "configure: failed program was:" >&5
5417 cat conftest.$ac_ext >&5
5418 rm -rf conftest*
5419 bfd_cv_have_sys_procfs_type_prrun_t=no
5420
5421 fi
5422 rm -f conftest*
5423 fi
5424
5425 if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
5426 cat >> confdefs.h <<\EOF
5427 #define HAVE_PRRUN_T 1
5428 EOF
5429
5430 fi
5431 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
5432
5433 echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
5434 echo "configure:5435: checking for gregset_t in sys/procfs.h" >&5
5435 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
5436 echo $ac_n "(cached) $ac_c" 1>&6
5437 else
5438 cat > conftest.$ac_ext <<EOF
5439 #line 5440 "configure"
5440 #include "confdefs.h"
5441
5442 #define _SYSCALL32
5443 #include <sys/procfs.h>
5444 int main() {
5445 gregset_t avar
5446 ; return 0; }
5447 EOF
5448 if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5449 rm -rf conftest*
5450 bfd_cv_have_sys_procfs_type_gregset_t=yes
5451 else
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 rm -rf conftest*
5455 bfd_cv_have_sys_procfs_type_gregset_t=no
5456
5457 fi
5458 rm -f conftest*
5459 fi
5460
5461 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
5462 cat >> confdefs.h <<\EOF
5463 #define HAVE_GREGSET_T 1
5464 EOF
5465
5466 fi
5467 echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
5468
5469 echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
5470 echo "configure:5471: checking for fpregset_t in sys/procfs.h" >&5
5471 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
5472 echo $ac_n "(cached) $ac_c" 1>&6
5473 else
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5477
5478 #define _SYSCALL32
5479 #include <sys/procfs.h>
5480 int main() {
5481 fpregset_t avar
5482 ; return 0; }
5483 EOF
5484 if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5485 rm -rf conftest*
5486 bfd_cv_have_sys_procfs_type_fpregset_t=yes
5487 else
5488 echo "configure: failed program was:" >&5
5489 cat conftest.$ac_ext >&5
5490 rm -rf conftest*
5491 bfd_cv_have_sys_procfs_type_fpregset_t=no
5492
5493 fi
5494 rm -f conftest*
5495 fi
5496
5497 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5498 cat >> confdefs.h <<\EOF
5499 #define HAVE_FPREGSET_T 1
5500 EOF
5501
5502 fi
5503 echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5504
5505 echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
5506 echo "configure:5507: checking for prgregset_t in sys/procfs.h" >&5
5507 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5508 echo $ac_n "(cached) $ac_c" 1>&6
5509 else
5510 cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513
5514 #define _SYSCALL32
5515 #include <sys/procfs.h>
5516 int main() {
5517 prgregset_t avar
5518 ; return 0; }
5519 EOF
5520 if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5521 rm -rf conftest*
5522 bfd_cv_have_sys_procfs_type_prgregset_t=yes
5523 else
5524 echo "configure: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5526 rm -rf conftest*
5527 bfd_cv_have_sys_procfs_type_prgregset_t=no
5528
5529 fi
5530 rm -f conftest*
5531 fi
5532
5533 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5534 cat >> confdefs.h <<\EOF
5535 #define HAVE_PRGREGSET_T 1
5536 EOF
5537
5538 fi
5539 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5540
5541 echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
5542 echo "configure:5543: checking for prfpregset_t in sys/procfs.h" >&5
5543 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5544 echo $ac_n "(cached) $ac_c" 1>&6
5545 else
5546 cat > conftest.$ac_ext <<EOF
5547 #line 5548 "configure"
5548 #include "confdefs.h"
5549
5550 #define _SYSCALL32
5551 #include <sys/procfs.h>
5552 int main() {
5553 prfpregset_t avar
5554 ; return 0; }
5555 EOF
5556 if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5557 rm -rf conftest*
5558 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5559 else
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5562 rm -rf conftest*
5563 bfd_cv_have_sys_procfs_type_prfpregset_t=no
5564
5565 fi
5566 rm -f conftest*
5567 fi
5568
5569 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5570 cat >> confdefs.h <<\EOF
5571 #define HAVE_PRFPREGSET_T 1
5572 EOF
5573
5574 fi
5575 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5576
5577 echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
5578 echo "configure:5579: checking for prgregset32_t in sys/procfs.h" >&5
5579 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581 else
5582 cat > conftest.$ac_ext <<EOF
5583 #line 5584 "configure"
5584 #include "confdefs.h"
5585
5586 #define _SYSCALL32
5587 #include <sys/procfs.h>
5588 int main() {
5589 prgregset32_t avar
5590 ; return 0; }
5591 EOF
5592 if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5593 rm -rf conftest*
5594 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5595 else
5596 echo "configure: failed program was:" >&5
5597 cat conftest.$ac_ext >&5
5598 rm -rf conftest*
5599 bfd_cv_have_sys_procfs_type_prgregset32_t=no
5600
5601 fi
5602 rm -f conftest*
5603 fi
5604
5605 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5606 cat >> confdefs.h <<\EOF
5607 #define HAVE_PRGREGSET32_T 1
5608 EOF
5609
5610 fi
5611 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5612
5613 echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
5614 echo "configure:5615: checking for prfpregset32_t in sys/procfs.h" >&5
5615 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5616 echo $ac_n "(cached) $ac_c" 1>&6
5617 else
5618 cat > conftest.$ac_ext <<EOF
5619 #line 5620 "configure"
5620 #include "confdefs.h"
5621
5622 #define _SYSCALL32
5623 #include <sys/procfs.h>
5624 int main() {
5625 prfpregset32_t avar
5626 ; return 0; }
5627 EOF
5628 if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5629 rm -rf conftest*
5630 bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5631 else
5632 echo "configure: failed program was:" >&5
5633 cat conftest.$ac_ext >&5
5634 rm -rf conftest*
5635 bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5636
5637 fi
5638 rm -f conftest*
5639 fi
5640
5641 if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5642 cat >> confdefs.h <<\EOF
5643 #define HAVE_PRFPREGSET32_T 1
5644 EOF
5645
5646 fi
5647 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5648
5649 echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
5650 echo "configure:5651: checking for lwpid_t in sys/procfs.h" >&5
5651 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5652 echo $ac_n "(cached) $ac_c" 1>&6
5653 else
5654 cat > conftest.$ac_ext <<EOF
5655 #line 5656 "configure"
5656 #include "confdefs.h"
5657
5658 #define _SYSCALL32
5659 #include <sys/procfs.h>
5660 int main() {
5661 lwpid_t avar
5662 ; return 0; }
5663 EOF
5664 if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5665 rm -rf conftest*
5666 bfd_cv_have_sys_procfs_type_lwpid_t=yes
5667 else
5668 echo "configure: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5670 rm -rf conftest*
5671 bfd_cv_have_sys_procfs_type_lwpid_t=no
5672
5673 fi
5674 rm -f conftest*
5675 fi
5676
5677 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5678 cat >> confdefs.h <<\EOF
5679 #define HAVE_LWPID_T 1
5680 EOF
5681
5682 fi
5683 echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5684
5685 echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
5686 echo "configure:5687: checking for psaddr_t in sys/procfs.h" >&5
5687 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5688 echo $ac_n "(cached) $ac_c" 1>&6
5689 else
5690 cat > conftest.$ac_ext <<EOF
5691 #line 5692 "configure"
5692 #include "confdefs.h"
5693
5694 #define _SYSCALL32
5695 #include <sys/procfs.h>
5696 int main() {
5697 psaddr_t avar
5698 ; return 0; }
5699 EOF
5700 if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5701 rm -rf conftest*
5702 bfd_cv_have_sys_procfs_type_psaddr_t=yes
5703 else
5704 echo "configure: failed program was:" >&5
5705 cat conftest.$ac_ext >&5
5706 rm -rf conftest*
5707 bfd_cv_have_sys_procfs_type_psaddr_t=no
5708
5709 fi
5710 rm -f conftest*
5711 fi
5712
5713 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5714 cat >> confdefs.h <<\EOF
5715 #define HAVE_PSADDR_T 1
5716 EOF
5717
5718 fi
5719 echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5720
5721 echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
5722 echo "configure:5723: checking for prsysent_t in sys/procfs.h" >&5
5723 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5724 echo $ac_n "(cached) $ac_c" 1>&6
5725 else
5726 cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729
5730 #define _SYSCALL32
5731 #include <sys/procfs.h>
5732 int main() {
5733 prsysent_t avar
5734 ; return 0; }
5735 EOF
5736 if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5737 rm -rf conftest*
5738 bfd_cv_have_sys_procfs_type_prsysent_t=yes
5739 else
5740 echo "configure: failed program was:" >&5
5741 cat conftest.$ac_ext >&5
5742 rm -rf conftest*
5743 bfd_cv_have_sys_procfs_type_prsysent_t=no
5744
5745 fi
5746 rm -f conftest*
5747 fi
5748
5749 if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5750 cat >> confdefs.h <<\EOF
5751 #define HAVE_PRSYSENT_T 1
5752 EOF
5753
5754 fi
5755 echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5756
5757 echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
5758 echo "configure:5759: checking for pr_sigset_t in sys/procfs.h" >&5
5759 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5760 echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762 cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765
5766 #define _SYSCALL32
5767 #include <sys/procfs.h>
5768 int main() {
5769 pr_sigset_t avar
5770 ; return 0; }
5771 EOF
5772 if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5773 rm -rf conftest*
5774 bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5775 else
5776 echo "configure: failed program was:" >&5
5777 cat conftest.$ac_ext >&5
5778 rm -rf conftest*
5779 bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5780
5781 fi
5782 rm -f conftest*
5783 fi
5784
5785 if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5786 cat >> confdefs.h <<\EOF
5787 #define HAVE_PR_SIGSET_T 1
5788 EOF
5789
5790 fi
5791 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5792
5793 echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
5794 echo "configure:5795: checking for pr_sigaction64_t in sys/procfs.h" >&5
5795 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
5796 echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798 cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801
5802 #define _SYSCALL32
5803 #include <sys/procfs.h>
5804 int main() {
5805 pr_sigaction64_t avar
5806 ; return 0; }
5807 EOF
5808 if { (eval echo configure:5809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5809 rm -rf conftest*
5810 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5811 else
5812 echo "configure: failed program was:" >&5
5813 cat conftest.$ac_ext >&5
5814 rm -rf conftest*
5815 bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5816
5817 fi
5818 rm -f conftest*
5819 fi
5820
5821 if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5822 cat >> confdefs.h <<\EOF
5823 #define HAVE_PR_SIGACTION64_T 1
5824 EOF
5825
5826 fi
5827 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5828
5829 echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
5830 echo "configure:5831: checking for pr_siginfo64_t in sys/procfs.h" >&5
5831 if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5832 echo $ac_n "(cached) $ac_c" 1>&6
5833 else
5834 cat > conftest.$ac_ext <<EOF
5835 #line 5836 "configure"
5836 #include "confdefs.h"
5837
5838 #define _SYSCALL32
5839 #include <sys/procfs.h>
5840 int main() {
5841 pr_siginfo64_t avar
5842 ; return 0; }
5843 EOF
5844 if { (eval echo configure:5845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5845 rm -rf conftest*
5846 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5847 else
5848 echo "configure: failed program was:" >&5
5849 cat conftest.$ac_ext >&5
5850 rm -rf conftest*
5851 bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5852
5853 fi
5854 rm -f conftest*
5855 fi
5856
5857 if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5858 cat >> confdefs.h <<\EOF
5859 #define HAVE_PR_SIGINFO64_T 1
5860 EOF
5861
5862 fi
5863 echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5864
5865
5866
5867
5868
5869 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5870 echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
5871 echo "configure:5872: checking whether prfpregset_t type is broken" >&5
5872 if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5873 echo $ac_n "(cached) $ac_c" 1>&6
5874 else
5875 if test "$cross_compiling" = yes; then
5876 gdb_cv_prfpregset_t_broken=yes
5877 else
5878 cat > conftest.$ac_ext <<EOF
5879 #line 5880 "configure"
5880 #include "confdefs.h"
5881 #include <sys/procfs.h>
5882 int main ()
5883 {
5884 if (sizeof (prfpregset_t) == sizeof (void *))
5885 return 1;
5886 return 0;
5887 }
5888 EOF
5889 if { (eval echo configure:5890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5890 then
5891 gdb_cv_prfpregset_t_broken=no
5892 else
5893 echo "configure: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
5895 rm -fr conftest*
5896 gdb_cv_prfpregset_t_broken=yes
5897 fi
5898 rm -fr conftest*
5899 fi
5900
5901 fi
5902
5903 echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5904 if test $gdb_cv_prfpregset_t_broken = yes; then
5905 cat >> confdefs.h <<\EOF
5906 #define PRFPREGSET_T_BROKEN 1
5907 EOF
5908
5909 fi
5910 fi
5911
5912
5913 echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
5914 echo "configure:5915: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
5915 if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
5917 else
5918 cat > conftest.$ac_ext <<EOF
5919 #line 5920 "configure"
5920 #include "confdefs.h"
5921 #include <unistd.h>
5922 #include <sys/types.h>
5923 #include <sys/procfs.h>
5924
5925 int main() {
5926
5927 int dummy;;
5928 dummy = ioctl(0, PIOCSET, &dummy);
5929
5930 ; return 0; }
5931 EOF
5932 if { (eval echo configure:5933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5933 rm -rf conftest*
5934 gdb_cv_have_procfs_piocset=yes
5935 else
5936 echo "configure: failed program was:" >&5
5937 cat conftest.$ac_ext >&5
5938 rm -rf conftest*
5939 gdb_cv_have_procfs_piocset=no
5940 fi
5941 rm -f conftest*
5942 fi
5943
5944 echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5945 if test $gdb_cv_have_procfs_piocset = yes; then
5946 cat >> confdefs.h <<\EOF
5947 #define HAVE_PROCFS_PIOCSET 1
5948 EOF
5949
5950 fi
5951 fi
5952
5953 if test ${host} = ${target} ; then
5954
5955 echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
5956 echo "configure:5957: checking for member l_addr in struct link_map" >&5
5957 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5958 echo $ac_n "(cached) $ac_c" 1>&6
5959 else
5960 cat > conftest.$ac_ext <<EOF
5961 #line 5962 "configure"
5962 #include "confdefs.h"
5963 #include <link.h>
5964 int main() {
5965 struct link_map lm; (void) lm.l_addr;
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5969 rm -rf conftest*
5970 gdb_cv_have_struct_link_map_with_l_members=yes
5971 else
5972 echo "configure: failed program was:" >&5
5973 cat conftest.$ac_ext >&5
5974 rm -rf conftest*
5975 gdb_cv_have_struct_link_map_with_l_members=no
5976 fi
5977 rm -f conftest*
5978 fi
5979
5980 echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5981 if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5982 cat >> confdefs.h <<\EOF
5983 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5984 EOF
5985
5986 fi
5987
5988
5989 echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
5990 echo "configure:5991: checking for member lm_addr in struct link_map" >&5
5991 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5992 echo $ac_n "(cached) $ac_c" 1>&6
5993 else
5994 cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 #include <sys/types.h>
5998 #include <link.h>
5999 int main() {
6000 struct link_map lm; (void) lm.lm_addr;
6001 ; return 0; }
6002 EOF
6003 if { (eval echo configure:6004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6004 rm -rf conftest*
6005 gdb_cv_have_struct_link_map_with_lm_members=yes
6006 else
6007 echo "configure: failed program was:" >&5
6008 cat conftest.$ac_ext >&5
6009 rm -rf conftest*
6010 gdb_cv_have_struct_link_map_with_lm_members=no
6011 fi
6012 rm -f conftest*
6013 fi
6014
6015 echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
6016 if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
6017 cat >> confdefs.h <<\EOF
6018 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
6019 EOF
6020
6021 fi
6022
6023
6024 echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
6025 echo "configure:6026: checking for member som_addr in struct so_map" >&5
6026 if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
6027 echo $ac_n "(cached) $ac_c" 1>&6
6028 else
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 #include <sys/types.h>
6033 #ifdef HAVE_NLIST_H
6034 #include <nlist.h>
6035 #endif
6036 #include <link.h>
6037 int main() {
6038 struct so_map lm; (void) lm.som_addr;
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6042 rm -rf conftest*
6043 gdb_cv_have_struct_so_map_with_som_members=yes
6044 else
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 gdb_cv_have_struct_so_map_with_som_members=no
6049 fi
6050 rm -f conftest*
6051 fi
6052
6053 echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
6054 if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
6055 cat >> confdefs.h <<\EOF
6056 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
6057 EOF
6058
6059 fi
6060
6061
6062 echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
6063 echo "configure:6064: checking for struct link_map32 in sys/link.h" >&5
6064 if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
6065 echo $ac_n "(cached) $ac_c" 1>&6
6066 else
6067 cat > conftest.$ac_ext <<EOF
6068 #line 6069 "configure"
6069 #include "confdefs.h"
6070 #define _SYSCALL32
6071 #include <sys/link.h>
6072 int main() {
6073 struct link_map32 l;
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6077 rm -rf conftest*
6078 gdb_cv_have_struct_link_map32=yes
6079 else
6080 echo "configure: failed program was:" >&5
6081 cat conftest.$ac_ext >&5
6082 rm -rf conftest*
6083 gdb_cv_have_struct_link_map32=no
6084 fi
6085 rm -f conftest*
6086 fi
6087
6088 echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
6089 if test $gdb_cv_have_struct_link_map32 = yes; then
6090 cat >> confdefs.h <<\EOF
6091 #define HAVE_STRUCT_LINK_MAP32 1
6092 EOF
6093
6094 cat >> confdefs.h <<\EOF
6095 #define _SYSCALL32 1
6096 EOF
6097
6098 fi
6099 fi
6100
6101
6102 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
6103 echo "configure:6104: checking for long long support in compiler" >&5
6104 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
6105 echo $ac_n "(cached) $ac_c" 1>&6
6106 else
6107 cat > conftest.$ac_ext <<EOF
6108 #line 6109 "configure"
6109 #include "confdefs.h"
6110
6111 int main() {
6112
6113 extern long long foo;
6114 switch (foo & 2) { case 0: return 1; }
6115
6116 ; return 0; }
6117 EOF
6118 if { (eval echo configure:6119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6119 rm -rf conftest*
6120 gdb_cv_c_long_long=yes
6121 else
6122 echo "configure: failed program was:" >&5
6123 cat conftest.$ac_ext >&5
6124 rm -rf conftest*
6125 gdb_cv_c_long_long=no
6126 fi
6127 rm -f conftest*
6128 fi
6129
6130 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
6131 if test $gdb_cv_c_long_long = yes; then
6132 cat >> confdefs.h <<\EOF
6133 #define CC_HAS_LONG_LONG 1
6134 EOF
6135
6136 fi
6137
6138
6139 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
6140 echo "configure:6141: checking for long long support in printf" >&5
6141 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
6142 echo $ac_n "(cached) $ac_c" 1>&6
6143 else
6144 if test "$cross_compiling" = yes; then
6145 gdb_cv_printf_has_long_long=no
6146 else
6147 cat > conftest.$ac_ext <<EOF
6148 #line 6149 "configure"
6149 #include "confdefs.h"
6150
6151 int main () {
6152 char buf[32];
6153 long long l = 0;
6154 l = (l << 16) + 0x0123;
6155 l = (l << 16) + 0x4567;
6156 l = (l << 16) + 0x89ab;
6157 l = (l << 16) + 0xcdef;
6158 sprintf (buf, "0x%016llx", l);
6159 return (strcmp ("0x0123456789abcdef", buf));
6160 }
6161 EOF
6162 if { (eval echo configure:6163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6163 then
6164 gdb_cv_printf_has_long_long=yes
6165 else
6166 echo "configure: failed program was:" >&5
6167 cat conftest.$ac_ext >&5
6168 rm -fr conftest*
6169 gdb_cv_printf_has_long_long=no
6170 fi
6171 rm -fr conftest*
6172 fi
6173
6174 fi
6175
6176 if test $gdb_cv_printf_has_long_long = yes; then
6177 cat >> confdefs.h <<\EOF
6178 #define PRINTF_HAS_LONG_LONG 1
6179 EOF
6180
6181 fi
6182 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
6183
6184
6185 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
6186 echo "configure:6187: checking for long double support in compiler" >&5
6187 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
6189 else
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193
6194 int main() {
6195 long double foo;
6196 ; return 0; }
6197 EOF
6198 if { (eval echo configure:6199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6199 rm -rf conftest*
6200 ac_cv_c_long_double=yes
6201 else
6202 echo "configure: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6204 rm -rf conftest*
6205 ac_cv_c_long_double=no
6206 fi
6207 rm -f conftest*
6208 fi
6209
6210 echo "$ac_t""$ac_cv_c_long_double" 1>&6
6211 if test $ac_cv_c_long_double = yes; then
6212 cat >> confdefs.h <<\EOF
6213 #define HAVE_LONG_DOUBLE 1
6214 EOF
6215
6216 fi
6217
6218
6219 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
6220 echo "configure:6221: checking for long double support in printf" >&5
6221 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
6222 echo $ac_n "(cached) $ac_c" 1>&6
6223 else
6224 if test "$cross_compiling" = yes; then
6225 gdb_cv_printf_has_long_double=no
6226 else
6227 cat > conftest.$ac_ext <<EOF
6228 #line 6229 "configure"
6229 #include "confdefs.h"
6230
6231 int main () {
6232 char buf[16];
6233 long double f = 3.141592653;
6234 sprintf (buf, "%Lg", f);
6235 return (strncmp ("3.14159", buf, 7));
6236 }
6237 EOF
6238 if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6239 then
6240 gdb_cv_printf_has_long_double=yes
6241 else
6242 echo "configure: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 rm -fr conftest*
6245 gdb_cv_printf_has_long_double=no
6246 fi
6247 rm -fr conftest*
6248 fi
6249
6250 fi
6251
6252 if test $gdb_cv_printf_has_long_double = yes; then
6253 cat >> confdefs.h <<\EOF
6254 #define PRINTF_HAS_LONG_DOUBLE 1
6255 EOF
6256
6257 fi
6258 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
6259
6260
6261 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
6262 echo "configure:6263: checking for long double support in scanf" >&5
6263 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
6264 echo $ac_n "(cached) $ac_c" 1>&6
6265 else
6266 if test "$cross_compiling" = yes; then
6267 gdb_cv_scanf_has_long_double=no
6268 else
6269 cat > conftest.$ac_ext <<EOF
6270 #line 6271 "configure"
6271 #include "confdefs.h"
6272
6273 int main () {
6274 char *buf = "3.141592653";
6275 long double f = 0;
6276 sscanf (buf, "%Lg", &f);
6277 return !(f > 3.14159 && f < 3.14160);
6278 }
6279 EOF
6280 if { (eval echo configure:6281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6281 then
6282 gdb_cv_scanf_has_long_double=yes
6283 else
6284 echo "configure: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 rm -fr conftest*
6287 gdb_cv_scanf_has_long_double=no
6288 fi
6289 rm -fr conftest*
6290 fi
6291
6292 fi
6293
6294 if test $gdb_cv_scanf_has_long_double = yes; then
6295 cat >> confdefs.h <<\EOF
6296 #define SCANF_HAS_LONG_DOUBLE 1
6297 EOF
6298
6299 fi
6300 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
6301
6302 for ac_hdr in unistd.h
6303 do
6304 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6305 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6306 echo "configure:6307: checking for $ac_hdr" >&5
6307 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6308 echo $ac_n "(cached) $ac_c" 1>&6
6309 else
6310 cat > conftest.$ac_ext <<EOF
6311 #line 6312 "configure"
6312 #include "confdefs.h"
6313 #include <$ac_hdr>
6314 EOF
6315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6316 { (eval echo configure:6317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6318 if test -z "$ac_err"; then
6319 rm -rf conftest*
6320 eval "ac_cv_header_$ac_safe=yes"
6321 else
6322 echo "$ac_err" >&5
6323 echo "configure: failed program was:" >&5
6324 cat conftest.$ac_ext >&5
6325 rm -rf conftest*
6326 eval "ac_cv_header_$ac_safe=no"
6327 fi
6328 rm -f conftest*
6329 fi
6330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6331 echo "$ac_t""yes" 1>&6
6332 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6333 cat >> confdefs.h <<EOF
6334 #define $ac_tr_hdr 1
6335 EOF
6336
6337 else
6338 echo "$ac_t""no" 1>&6
6339 fi
6340 done
6341
6342 for ac_func in getpagesize
6343 do
6344 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6345 echo "configure:6346: checking for $ac_func" >&5
6346 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6347 echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349 cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352 /* System header to define __stub macros and hopefully few prototypes,
6353 which can conflict with char $ac_func(); below. */
6354 #include <assert.h>
6355 /* Override any gcc2 internal prototype to avoid an error. */
6356 /* We use char because int might match the return type of a gcc2
6357 builtin and then its argument prototype would still apply. */
6358 char $ac_func();
6359
6360 int main() {
6361
6362 /* The GNU C library defines this for functions which it implements
6363 to always fail with ENOSYS. Some functions are actually named
6364 something starting with __ and the normal name is an alias. */
6365 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6366 choke me
6367 #else
6368 $ac_func();
6369 #endif
6370
6371 ; return 0; }
6372 EOF
6373 if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6374 rm -rf conftest*
6375 eval "ac_cv_func_$ac_func=yes"
6376 else
6377 echo "configure: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 rm -rf conftest*
6380 eval "ac_cv_func_$ac_func=no"
6381 fi
6382 rm -f conftest*
6383 fi
6384
6385 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6386 echo "$ac_t""yes" 1>&6
6387 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6388 cat >> confdefs.h <<EOF
6389 #define $ac_tr_func 1
6390 EOF
6391
6392 else
6393 echo "$ac_t""no" 1>&6
6394 fi
6395 done
6396
6397 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6398 echo "configure:6399: checking for working mmap" >&5
6399 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6400 echo $ac_n "(cached) $ac_c" 1>&6
6401 else
6402 if test "$cross_compiling" = yes; then
6403 ac_cv_func_mmap_fixed_mapped=no
6404 else
6405 cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408
6409 /* Thanks to Mike Haertel and Jim Avera for this test.
6410 Here is a matrix of mmap possibilities:
6411 mmap private not fixed
6412 mmap private fixed at somewhere currently unmapped
6413 mmap private fixed at somewhere already mapped
6414 mmap shared not fixed
6415 mmap shared fixed at somewhere currently unmapped
6416 mmap shared fixed at somewhere already mapped
6417 For private mappings, we should verify that changes cannot be read()
6418 back from the file, nor mmap's back from the file at a different
6419 address. (There have been systems where private was not correctly
6420 implemented like the infamous i386 svr4.0, and systems where the
6421 VM page cache was not coherent with the filesystem buffer cache
6422 like early versions of FreeBSD and possibly contemporary NetBSD.)
6423 For shared mappings, we should conversely verify that changes get
6424 propogated back to all the places they're supposed to be.
6425
6426 Grep wants private fixed already mapped.
6427 The main things grep needs to know about mmap are:
6428 * does it exist and is it safe to write into the mmap'd area
6429 * how to use it (BSD variants) */
6430 #include <sys/types.h>
6431 #include <fcntl.h>
6432 #include <sys/mman.h>
6433
6434 /* This mess was copied from the GNU getpagesize.h. */
6435 #ifndef HAVE_GETPAGESIZE
6436 # ifdef HAVE_UNISTD_H
6437 # include <unistd.h>
6438 # endif
6439
6440 /* Assume that all systems that can run configure have sys/param.h. */
6441 # ifndef HAVE_SYS_PARAM_H
6442 # define HAVE_SYS_PARAM_H 1
6443 # endif
6444
6445 # ifdef _SC_PAGESIZE
6446 # define getpagesize() sysconf(_SC_PAGESIZE)
6447 # else /* no _SC_PAGESIZE */
6448 # ifdef HAVE_SYS_PARAM_H
6449 # include <sys/param.h>
6450 # ifdef EXEC_PAGESIZE
6451 # define getpagesize() EXEC_PAGESIZE
6452 # else /* no EXEC_PAGESIZE */
6453 # ifdef NBPG
6454 # define getpagesize() NBPG * CLSIZE
6455 # ifndef CLSIZE
6456 # define CLSIZE 1
6457 # endif /* no CLSIZE */
6458 # else /* no NBPG */
6459 # ifdef NBPC
6460 # define getpagesize() NBPC
6461 # else /* no NBPC */
6462 # ifdef PAGESIZE
6463 # define getpagesize() PAGESIZE
6464 # endif /* PAGESIZE */
6465 # endif /* no NBPC */
6466 # endif /* no NBPG */
6467 # endif /* no EXEC_PAGESIZE */
6468 # else /* no HAVE_SYS_PARAM_H */
6469 # define getpagesize() 8192 /* punt totally */
6470 # endif /* no HAVE_SYS_PARAM_H */
6471 # endif /* no _SC_PAGESIZE */
6472
6473 #endif /* no HAVE_GETPAGESIZE */
6474
6475 #ifdef __cplusplus
6476 extern "C" { void *malloc(unsigned); }
6477 #else
6478 char *malloc();
6479 #endif
6480
6481 int
6482 main()
6483 {
6484 char *data, *data2, *data3;
6485 int i, pagesize;
6486 int fd;
6487
6488 pagesize = getpagesize();
6489
6490 /*
6491 * First, make a file with some known garbage in it.
6492 */
6493 data = malloc(pagesize);
6494 if (!data)
6495 exit(1);
6496 for (i = 0; i < pagesize; ++i)
6497 *(data + i) = rand();
6498 umask(0);
6499 fd = creat("conftestmmap", 0600);
6500 if (fd < 0)
6501 exit(1);
6502 if (write(fd, data, pagesize) != pagesize)
6503 exit(1);
6504 close(fd);
6505
6506 /*
6507 * Next, try to mmap the file at a fixed address which
6508 * already has something else allocated at it. If we can,
6509 * also make sure that we see the same garbage.
6510 */
6511 fd = open("conftestmmap", O_RDWR);
6512 if (fd < 0)
6513 exit(1);
6514 data2 = malloc(2 * pagesize);
6515 if (!data2)
6516 exit(1);
6517 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6518 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6519 MAP_PRIVATE | MAP_FIXED, fd, 0L))
6520 exit(1);
6521 for (i = 0; i < pagesize; ++i)
6522 if (*(data + i) != *(data2 + i))
6523 exit(1);
6524
6525 /*
6526 * Finally, make sure that changes to the mapped area
6527 * do not percolate back to the file as seen by read().
6528 * (This is a bug on some variants of i386 svr4.0.)
6529 */
6530 for (i = 0; i < pagesize; ++i)
6531 *(data2 + i) = *(data2 + i) + 1;
6532 data3 = malloc(pagesize);
6533 if (!data3)
6534 exit(1);
6535 if (read(fd, data3, pagesize) != pagesize)
6536 exit(1);
6537 for (i = 0; i < pagesize; ++i)
6538 if (*(data + i) != *(data3 + i))
6539 exit(1);
6540 close(fd);
6541 unlink("conftestmmap");
6542 exit(0);
6543 }
6544
6545 EOF
6546 if { (eval echo configure:6547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6547 then
6548 ac_cv_func_mmap_fixed_mapped=yes
6549 else
6550 echo "configure: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
6552 rm -fr conftest*
6553 ac_cv_func_mmap_fixed_mapped=no
6554 fi
6555 rm -fr conftest*
6556 fi
6557
6558 fi
6559
6560 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6561 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6562 cat >> confdefs.h <<\EOF
6563 #define HAVE_MMAP 1
6564 EOF
6565
6566 fi
6567
6568
6569 case ${host_os} in
6570 aix*)
6571 echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
6572 echo "configure:6573: checking for -bbigtoc option" >&5
6573 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
6574 echo $ac_n "(cached) $ac_c" 1>&6
6575 else
6576
6577 SAVE_LDFLAGS=$LDFLAGS
6578
6579 case $GCC in
6580 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
6581 *) gdb_cv_bigtoc=-bbigtoc ;;
6582 esac
6583
6584 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
6585 cat > conftest.$ac_ext <<EOF
6586 #line 6587 "configure"
6587 #include "confdefs.h"
6588
6589 int main() {
6590 int i;
6591 ; return 0; }
6592 EOF
6593 if { (eval echo configure:6594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6594 :
6595 else
6596 echo "configure: failed program was:" >&5
6597 cat conftest.$ac_ext >&5
6598 rm -rf conftest*
6599 gdb_cv_bigtoc=
6600 fi
6601 rm -f conftest*
6602
6603 fi
6604
6605 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
6606 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
6607 ;;
6608 esac
6609
6610
6611
6612 if test ${build} = ${host} -a ${host} = ${target} ; then
6613 case ${host_os} in
6614 hpux*)
6615 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
6616 echo "configure:6617: checking for HPUX/OSF thread support" >&5
6617 if test -f /usr/include/dce/cma_config.h ; then
6618 if test "$GCC" = "yes" ; then
6619 echo "$ac_t""yes" 1>&6
6620 cat >> confdefs.h <<\EOF
6621 #define HAVE_HPUX_THREAD_SUPPORT 1
6622 EOF
6623
6624 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
6625 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6626 else
6627 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6628 fi
6629 else
6630 echo "$ac_t""no" 1>&6
6631 fi
6632 ;;
6633 solaris*)
6634 # See if thread_db library is around for Solaris thread debugging.
6635 # Note that we must explicitly test for version 1 of the library
6636 # because version 0 (present on Solaris 2.4 or earlier) doesn't have
6637 # the same API.
6638 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
6639 echo "configure:6640: checking for Solaris thread debugging library" >&5
6640 if test -f /usr/lib/libthread_db.so.1 ; then
6641 echo "$ac_t""yes" 1>&6
6642 cat >> confdefs.h <<\EOF
6643 #define HAVE_THREAD_DB_LIB 1
6644 EOF
6645
6646 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
6647 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6648 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6649 echo "configure:6650: checking for dlopen in -ldl" >&5
6650 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6651 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6652 echo $ac_n "(cached) $ac_c" 1>&6
6653 else
6654 ac_save_LIBS="$LIBS"
6655 LIBS="-ldl $LIBS"
6656 cat > conftest.$ac_ext <<EOF
6657 #line 6658 "configure"
6658 #include "confdefs.h"
6659 /* Override any gcc2 internal prototype to avoid an error. */
6660 /* We use char because int might match the return type of a gcc2
6661 builtin and then its argument prototype would still apply. */
6662 char dlopen();
6663
6664 int main() {
6665 dlopen()
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669 rm -rf conftest*
6670 eval "ac_cv_lib_$ac_lib_var=yes"
6671 else
6672 echo "configure: failed program was:" >&5
6673 cat conftest.$ac_ext >&5
6674 rm -rf conftest*
6675 eval "ac_cv_lib_$ac_lib_var=no"
6676 fi
6677 rm -f conftest*
6678 LIBS="$ac_save_LIBS"
6679
6680 fi
6681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6682 echo "$ac_t""yes" 1>&6
6683 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6684 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6685 cat >> confdefs.h <<EOF
6686 #define $ac_tr_lib 1
6687 EOF
6688
6689 LIBS="-ldl $LIBS"
6690
6691 else
6692 echo "$ac_t""no" 1>&6
6693 fi
6694
6695 if test "$GCC" = "yes" ; then
6696 # The GNU linker requires the -export-dynamic option to make
6697 # all symbols visible in the dynamic symbol table.
6698 hold_ldflags=$LDFLAGS
6699 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
6700 echo "configure:6701: checking for the ld -export-dynamic flag" >&5
6701 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6702 cat > conftest.$ac_ext <<EOF
6703 #line 6704 "configure"
6704 #include "confdefs.h"
6705
6706 int main() {
6707 int i;
6708 ; return 0; }
6709 EOF
6710 if { (eval echo configure:6711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6711 rm -rf conftest*
6712 found=yes
6713 else
6714 echo "configure: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716 rm -rf conftest*
6717 found=no
6718 fi
6719 rm -f conftest*
6720 LDFLAGS=$hold_ldflags
6721 echo "$ac_t""$found" 1>&6
6722 if test $found = yes; then
6723 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6724 fi
6725 fi
6726 # Sun randomly tweaked the prototypes in <proc_service.h>
6727 # at one point.
6728 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
6729 echo "configure:6730: checking if <proc_service.h> is old" >&5
6730 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6731 echo $ac_n "(cached) $ac_c" 1>&6
6732 else
6733
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737
6738 #include <proc_service.h>
6739 ps_err_e ps_pdwrite
6740 (struct ps_prochandle*, psaddr_t, const void*, size_t);
6741
6742 int main() {
6743
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6747 rm -rf conftest*
6748 gdb_cv_proc_service_is_old=no
6749 else
6750 echo "configure: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6752 rm -rf conftest*
6753 gdb_cv_proc_service_is_old=yes
6754 fi
6755 rm -f conftest*
6756
6757 fi
6758
6759 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6760 if test $gdb_cv_proc_service_is_old = yes; then
6761 cat >> confdefs.h <<\EOF
6762 #define PROC_SERVICE_IS_OLD 1
6763 EOF
6764
6765 fi
6766 else
6767 echo "$ac_t""no" 1>&6
6768 fi
6769 ;;
6770 aix*)
6771 echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
6772 echo "configure:6773: checking for AiX thread debugging library" >&5
6773 if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
6774 echo $ac_n "(cached) $ac_c" 1>&6
6775 else
6776 cat > conftest.$ac_ext <<EOF
6777 #line 6778 "configure"
6778 #include "confdefs.h"
6779 #include <sys/pthdebug.h>
6780 int main() {
6781 #ifndef PTHDB_VERSION_3
6782 #error
6783 #endif
6784 ; return 0; }
6785 EOF
6786 if { (eval echo configure:6787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6787 rm -rf conftest*
6788 gdb_cv_have_aix_thread_debug=yes
6789 else
6790 echo "configure: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6792 rm -rf conftest*
6793 gdb_cv_have_aix_thread_debug=no
6794 fi
6795 rm -f conftest*
6796 fi
6797
6798 echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
6799 if test $gdb_cv_have_aix_thread_debug = yes; then
6800 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
6801 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
6802 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
6803 fi
6804 ;;
6805 esac
6806
6807 fi
6808
6809 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
6810 echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
6811 echo "configure:6812: checking whether <thread_db.h> has TD_NOTALLOC" >&5
6812 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
6813 echo $ac_n "(cached) $ac_c" 1>&6
6814 else
6815 cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6818 #include <thread_db.h>
6819 int main() {
6820 int i = TD_NOTALLOC;
6821 ; return 0; }
6822 EOF
6823 if { (eval echo configure:6824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6824 rm -rf conftest*
6825 gdb_cv_thread_db_h_has_td_notalloc=yes
6826 else
6827 echo "configure: failed program was:" >&5
6828 cat conftest.$ac_ext >&5
6829 rm -rf conftest*
6830 gdb_cv_thread_db_h_has_td_notalloc=no
6831
6832 fi
6833 rm -f conftest*
6834
6835 fi
6836
6837 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
6838 fi
6839 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
6840 cat >> confdefs.h <<\EOF
6841 #define THREAD_DB_HAS_TD_NOTALLOC 1
6842 EOF
6843
6844 fi
6845
6846 if test $host = $target; then
6847 case $target in
6848 *-linux*)
6849 save_CFLAGS=$CFLAGS
6850 CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
6851 cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 #include <unistd.h>
6855 int main() {
6856 pread64 (0, NULL, 0, 0);
6857 ; return 0; }
6858 EOF
6859 if { (eval echo configure:6860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6860 rm -rf conftest*
6861 ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
6862 cat >> confdefs.h <<\EOF
6863 #define HAVE_PREAD64 1
6864 EOF
6865
6866 else
6867 echo "configure: failed program was:" >&5
6868 cat conftest.$ac_ext >&5
6869 fi
6870 rm -f conftest*
6871 CFLAGS=$save_CFLAGS
6872 ;;
6873 esac
6874 fi
6875
6876
6877 # Check whether --enable-gdbcli or --disable-gdbcli was given.
6878 if test "${enable_gdbcli+set}" = set; then
6879 enableval="$enable_gdbcli"
6880
6881 case "${enableval}" in
6882 yes) enable_gdbcli=yes ;;
6883 "") enable_gdbcli=yes ;;
6884 no)
6885 { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6886 ;;
6887 *)
6888 { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
6889 ;;
6890 esac
6891
6892 else
6893 enable_gdbcli=yes
6894 fi
6895
6896 case ${enable_gdbcli} in
6897 "yes" )
6898 if test -d "${srcdir}/cli" ; then
6899 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6900 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
6901 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
6902 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6903 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6904 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6905 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6906 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6907 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6908 fi
6909 ;;
6910 esac
6911
6912
6913 # Check whether --enable-gdbmi or --disable-gdbmi was given.
6914 if test "${enable_gdbmi+set}" = set; then
6915 enableval="$enable_gdbmi"
6916
6917 case "${enable_gdbmi}" in
6918 yes | no) ;;
6919 "") enable_gdbmi=yes ;;
6920 *)
6921 { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6922 ;;
6923 esac
6924
6925 else
6926 enable_gdbmi=yes
6927 fi
6928
6929 case ${enable_gdbmi} in
6930 "yes" )
6931 if test -d "${srcdir}/mi" ; then
6932 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6933 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
6934 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
6935 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
6936 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
6937 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6938 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
6939 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6940 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
6941 fi
6942 ;;
6943 esac
6944
6945 # Configure UI_OUT by default (before 5.2 it can be disabled)
6946 # It must be configured if gdbmi is configured
6947
6948 UIOUT_CFLAGS=
6949
6950
6951 # Check whether --with-uiout or --without-uiout was given.
6952 if test "${with_uiout+set}" = set; then
6953 withval="$with_uiout"
6954 case "${withval}" in
6955 yes) want_uiout=true ;;
6956 no) if test $enable_gdbmi = yes; then
6957 { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6958 else
6959 want_uiout=false
6960 fi ;;
6961 *) { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6962 esac
6963 else
6964 want_uiout=true
6965 fi
6966
6967 if test $want_uiout = true; then
6968 UIOUT_CFLAGS="-DUI_OUT=1"
6969 fi
6970
6971 # Check whether --enable-tui or --disable-tui was given.
6972 if test "${enable_tui+set}" = set; then
6973 enableval="$enable_tui"
6974
6975 case "${enable_tui}" in
6976 yes | no) ;;
6977 "") enable_tui=yes ;;
6978 *)
6979 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6980 ;;
6981 esac
6982
6983 fi
6984
6985 case ${enable_tui} in
6986 "yes" )
6987 if test -d "${srcdir}/tui" ; then
6988 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6989 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
6990 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
6991 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6992 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6993 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6994 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6995 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6996 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6997 fi
6998 ;;
6999 esac
7000
7001 # Check whether --enable-netrom or --disable-netrom was given.
7002 if test "${enable_netrom+set}" = set; then
7003 enableval="$enable_netrom"
7004 case "${enableval}" in
7005 yes) enable_netrom=yes ;;
7006 no) enable_netrom=no ;;
7007 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
7008 esac
7009 fi
7010
7011
7012 if test "${enable_netrom}" = "yes"; then
7013 CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o"
7014 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
7015 fi
7016
7017
7018 # NOTE: Don't add -Wall or -Wunused, they both include
7019 # -Wunused-parameter which reports bogus warnings.
7020 # NOTE: If you add to this list, remember to update
7021 # gdb/doc/gdbint.texinfo.
7022 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
7023 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
7024 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
7025 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
7026 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
7027 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
7028 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
7029 # -Woverloaded-virtual -Winline -Werror"
7030 # Check whether --enable-build-warnings or --disable-build-warnings was given.
7031 if test "${enable_build_warnings+set}" = set; then
7032 enableval="$enable_build_warnings"
7033 case "${enableval}" in
7034 yes) ;;
7035 no) build_warnings="-w";;
7036 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7037 build_warnings="${build_warnings} ${t}";;
7038 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7039 build_warnings="${t} ${build_warnings}";;
7040 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
7041 esac
7042 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
7043 echo "Setting compiler warning flags = $build_warnings" 6>&1
7044 fi
7045 fi
7046 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
7047 if test "${enable_gdb_build_warnings+set}" = set; then
7048 enableval="$enable_gdb_build_warnings"
7049 case "${enableval}" in
7050 yes) ;;
7051 no) build_warnings="-w";;
7052 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7053 build_warnings="${build_warnings} ${t}";;
7054 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
7055 build_warnings="${t} ${build_warnings}";;
7056 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
7057 esac
7058 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
7059 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
7060 fi
7061 fi
7062 WARN_CFLAGS=""
7063 WERROR_CFLAGS=""
7064 if test "x${build_warnings}" != x -a "x$GCC" = xyes
7065 then
7066 echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
7067 echo "configure:7068: checking compiler warning flags" >&5
7068 # Separate out the -Werror flag as some files just cannot be
7069 # compiled with it enabled.
7070 for w in ${build_warnings}; do
7071 case $w in
7072 -Werr*) WERROR_CFLAGS=-Werror ;;
7073 *) # Check that GCC accepts it
7074 saved_CFLAGS="$CFLAGS"
7075 CFLAGS="$CFLAGS $w"
7076 cat > conftest.$ac_ext <<EOF
7077 #line 7078 "configure"
7078 #include "confdefs.h"
7079
7080 int main() {
7081
7082 ; return 0; }
7083 EOF
7084 if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7085 rm -rf conftest*
7086 WARN_CFLAGS="${WARN_CFLAGS} $w"
7087 else
7088 echo "configure: failed program was:" >&5
7089 cat conftest.$ac_ext >&5
7090 fi
7091 rm -f conftest*
7092 CFLAGS="$saved_CFLAGS"
7093 esac
7094 done
7095 echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
7096 fi
7097
7098
7099
7100 MMALLOC_CFLAGS=
7101 MMALLOC=
7102
7103
7104
7105 # Check whether --with-mmalloc or --without-mmalloc was given.
7106 if test "${with_mmalloc+set}" = set; then
7107 withval="$with_mmalloc"
7108 case "${withval}" in
7109 yes) want_mmalloc=true ;;
7110 no) want_mmalloc=false;;
7111 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
7112 esac
7113 else
7114 want_mmalloc=false
7115 fi
7116
7117 if test x$want_mmalloc = xtrue; then
7118 cat >> confdefs.h <<\EOF
7119 #define USE_MMALLOC 1
7120 EOF
7121
7122 cat >> confdefs.h <<\EOF
7123 #define MMCHECK_FORCE 1
7124 EOF
7125
7126 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
7127 MMALLOC='../mmalloc/libmmalloc.a'
7128 fi
7129
7130 # Check whether --with-included-regex or --without-included-regex was given.
7131 if test "${with_included_regex+set}" = set; then
7132 withval="$with_included_regex"
7133 case "${withval}" in
7134 yes) want_included_regex=true ;;
7135 no) want_included_regex=false;;
7136 *) { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
7137 esac
7138 else
7139 want_included_regex=true
7140 fi
7141
7142 if test $want_included_regex = false; then
7143 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
7144 echo "configure:7145: checking for GNU regex" >&5
7145 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
7146 echo $ac_n "(cached) $ac_c" 1>&6
7147 else
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7151 #include <gnu-versions.h>
7152 #include <sys/types.h>
7153 #include <regex.h>
7154 int main() {
7155 #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
7156 #error No valid GNU regex.
7157 #endif
7158
7159 ; return 0; }
7160 EOF
7161 if { (eval echo configure:7162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7162 rm -rf conftest*
7163 gdb_cv_have_gnu_regex=yes
7164 else
7165 echo "configure: failed program was:" >&5
7166 cat conftest.$ac_ext >&5
7167 rm -rf conftest*
7168 gdb_cv_have_gnu_regex=no
7169 fi
7170 rm -f conftest*
7171 fi
7172
7173 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
7174 if test $gdb_cv_have_gnu_regex = no; then
7175 want_included_regex=true
7176 fi
7177 fi
7178
7179 if test x${want_included_regex} = xtrue; then
7180 REGEX="gnu-regex.o"
7181 cat >> confdefs.h <<\EOF
7182 #define USE_INCLUDED_REGEX 1
7183 EOF
7184
7185 fi
7186
7187
7188 # In the Cygwin environment, we need some additional flags.
7189 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
7190 echo "configure:7191: checking for cygwin" >&5
7191 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
7192 echo $ac_n "(cached) $ac_c" 1>&6
7193 else
7194 cat > conftest.$ac_ext <<EOF
7195 #line 7196 "configure"
7196 #include "confdefs.h"
7197
7198 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
7199 lose
7200 #endif
7201 EOF
7202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7203 egrep "lose" >/dev/null 2>&1; then
7204 rm -rf conftest*
7205 gdb_cv_os_cygwin=yes
7206 else
7207 rm -rf conftest*
7208 gdb_cv_os_cygwin=no
7209 fi
7210 rm -f conftest*
7211
7212 fi
7213
7214 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
7215
7216
7217 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
7218 case ${host} in
7219 *go32* ) SER_HARDWIRE=ser-go32.o ;;
7220 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
7221 esac
7222
7223
7224
7225 if test x$gdb_host = xgo32; then
7226 TERM_LIB=
7227 else
7228 if test x$gdb_cv_os_cygwin = xyes; then
7229 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
7230 else
7231 TERM_LIB=
7232 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
7233 echo "configure:7234: checking for tgetent in -lncurses" >&5
7234 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
7235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7236 echo $ac_n "(cached) $ac_c" 1>&6
7237 else
7238 ac_save_LIBS="$LIBS"
7239 LIBS="-lncurses $LIBS"
7240 cat > conftest.$ac_ext <<EOF
7241 #line 7242 "configure"
7242 #include "confdefs.h"
7243 /* Override any gcc2 internal prototype to avoid an error. */
7244 /* We use char because int might match the return type of a gcc2
7245 builtin and then its argument prototype would still apply. */
7246 char tgetent();
7247
7248 int main() {
7249 tgetent()
7250 ; return 0; }
7251 EOF
7252 if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7253 rm -rf conftest*
7254 eval "ac_cv_lib_$ac_lib_var=yes"
7255 else
7256 echo "configure: failed program was:" >&5
7257 cat conftest.$ac_ext >&5
7258 rm -rf conftest*
7259 eval "ac_cv_lib_$ac_lib_var=no"
7260 fi
7261 rm -f conftest*
7262 LIBS="$ac_save_LIBS"
7263
7264 fi
7265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7266 echo "$ac_t""yes" 1>&6
7267 TERM_LIB=-lncurses
7268 else
7269 echo "$ac_t""no" 1>&6
7270 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
7271 echo "configure:7272: checking for tgetent in -lHcurses" >&5
7272 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
7273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7274 echo $ac_n "(cached) $ac_c" 1>&6
7275 else
7276 ac_save_LIBS="$LIBS"
7277 LIBS="-lHcurses $LIBS"
7278 cat > conftest.$ac_ext <<EOF
7279 #line 7280 "configure"
7280 #include "confdefs.h"
7281 /* Override any gcc2 internal prototype to avoid an error. */
7282 /* We use char because int might match the return type of a gcc2
7283 builtin and then its argument prototype would still apply. */
7284 char tgetent();
7285
7286 int main() {
7287 tgetent()
7288 ; return 0; }
7289 EOF
7290 if { (eval echo configure:7291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7291 rm -rf conftest*
7292 eval "ac_cv_lib_$ac_lib_var=yes"
7293 else
7294 echo "configure: failed program was:" >&5
7295 cat conftest.$ac_ext >&5
7296 rm -rf conftest*
7297 eval "ac_cv_lib_$ac_lib_var=no"
7298 fi
7299 rm -f conftest*
7300 LIBS="$ac_save_LIBS"
7301
7302 fi
7303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7304 echo "$ac_t""yes" 1>&6
7305 TERM_LIB=-lHcurses
7306 else
7307 echo "$ac_t""no" 1>&6
7308 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
7309 echo "configure:7310: checking for tgetent in -ltermlib" >&5
7310 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
7311 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7312 echo $ac_n "(cached) $ac_c" 1>&6
7313 else
7314 ac_save_LIBS="$LIBS"
7315 LIBS="-ltermlib $LIBS"
7316 cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 /* Override any gcc2 internal prototype to avoid an error. */
7320 /* We use char because int might match the return type of a gcc2
7321 builtin and then its argument prototype would still apply. */
7322 char tgetent();
7323
7324 int main() {
7325 tgetent()
7326 ; return 0; }
7327 EOF
7328 if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7329 rm -rf conftest*
7330 eval "ac_cv_lib_$ac_lib_var=yes"
7331 else
7332 echo "configure: failed program was:" >&5
7333 cat conftest.$ac_ext >&5
7334 rm -rf conftest*
7335 eval "ac_cv_lib_$ac_lib_var=no"
7336 fi
7337 rm -f conftest*
7338 LIBS="$ac_save_LIBS"
7339
7340 fi
7341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7342 echo "$ac_t""yes" 1>&6
7343 TERM_LIB=-ltermlib
7344 else
7345 echo "$ac_t""no" 1>&6
7346 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
7347 echo "configure:7348: checking for tgetent in -ltermcap" >&5
7348 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
7349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7350 echo $ac_n "(cached) $ac_c" 1>&6
7351 else
7352 ac_save_LIBS="$LIBS"
7353 LIBS="-ltermcap $LIBS"
7354 cat > conftest.$ac_ext <<EOF
7355 #line 7356 "configure"
7356 #include "confdefs.h"
7357 /* Override any gcc2 internal prototype to avoid an error. */
7358 /* We use char because int might match the return type of a gcc2
7359 builtin and then its argument prototype would still apply. */
7360 char tgetent();
7361
7362 int main() {
7363 tgetent()
7364 ; return 0; }
7365 EOF
7366 if { (eval echo configure:7367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7367 rm -rf conftest*
7368 eval "ac_cv_lib_$ac_lib_var=yes"
7369 else
7370 echo "configure: failed program was:" >&5
7371 cat conftest.$ac_ext >&5
7372 rm -rf conftest*
7373 eval "ac_cv_lib_$ac_lib_var=no"
7374 fi
7375 rm -f conftest*
7376 LIBS="$ac_save_LIBS"
7377
7378 fi
7379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7380 echo "$ac_t""yes" 1>&6
7381 TERM_LIB=-ltermcap
7382 else
7383 echo "$ac_t""no" 1>&6
7384 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
7385 echo "configure:7386: checking for tgetent in -lcurses" >&5
7386 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
7387 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7388 echo $ac_n "(cached) $ac_c" 1>&6
7389 else
7390 ac_save_LIBS="$LIBS"
7391 LIBS="-lcurses $LIBS"
7392 cat > conftest.$ac_ext <<EOF
7393 #line 7394 "configure"
7394 #include "confdefs.h"
7395 /* Override any gcc2 internal prototype to avoid an error. */
7396 /* We use char because int might match the return type of a gcc2
7397 builtin and then its argument prototype would still apply. */
7398 char tgetent();
7399
7400 int main() {
7401 tgetent()
7402 ; return 0; }
7403 EOF
7404 if { (eval echo configure:7405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7405 rm -rf conftest*
7406 eval "ac_cv_lib_$ac_lib_var=yes"
7407 else
7408 echo "configure: failed program was:" >&5
7409 cat conftest.$ac_ext >&5
7410 rm -rf conftest*
7411 eval "ac_cv_lib_$ac_lib_var=no"
7412 fi
7413 rm -f conftest*
7414 LIBS="$ac_save_LIBS"
7415
7416 fi
7417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7418 echo "$ac_t""yes" 1>&6
7419 TERM_LIB=-lcurses
7420 else
7421 echo "$ac_t""no" 1>&6
7422 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
7423 echo "configure:7424: checking for tgetent in -lterminfo" >&5
7424 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
7425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7426 echo $ac_n "(cached) $ac_c" 1>&6
7427 else
7428 ac_save_LIBS="$LIBS"
7429 LIBS="-lterminfo $LIBS"
7430 cat > conftest.$ac_ext <<EOF
7431 #line 7432 "configure"
7432 #include "confdefs.h"
7433 /* Override any gcc2 internal prototype to avoid an error. */
7434 /* We use char because int might match the return type of a gcc2
7435 builtin and then its argument prototype would still apply. */
7436 char tgetent();
7437
7438 int main() {
7439 tgetent()
7440 ; return 0; }
7441 EOF
7442 if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7443 rm -rf conftest*
7444 eval "ac_cv_lib_$ac_lib_var=yes"
7445 else
7446 echo "configure: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 rm -rf conftest*
7449 eval "ac_cv_lib_$ac_lib_var=no"
7450 fi
7451 rm -f conftest*
7452 LIBS="$ac_save_LIBS"
7453
7454 fi
7455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7456 echo "$ac_t""yes" 1>&6
7457 TERM_LIB=-lterminfo
7458 else
7459 echo "$ac_t""no" 1>&6
7460 fi
7461
7462 fi
7463
7464 fi
7465
7466 fi
7467
7468 fi
7469
7470 fi
7471
7472
7473 if test "x$TERM_LIB" = x
7474 then
7475 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
7476 fi
7477 fi
7478 fi
7479
7480
7481 # libreadline needs libuser32.a in a cygwin environment
7482 WIN32LIBS=
7483 if test x$gdb_cv_os_cygwin = xyes; then
7484 WIN32LIBS="-luser32"
7485 case "${target}" in
7486 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
7487 ;;
7488 esac
7489 fi
7490
7491
7492 LIBGUI="../libgui/src/libgui.a"
7493 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
7494
7495
7496
7497 # Check whether --with-cpu or --without-cpu was given.
7498 if test "${with_cpu+set}" = set; then
7499 withval="$with_cpu"
7500 case "${target}" in
7501 powerpc-* | powerpcle-* )
7502 ## It would be nice to keep this table in sync with the one in
7503 ## gcc/configure.
7504 case "${with_cpu}" in
7505 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
7506 | 604 | 750 )
7507 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
7508 ;;
7509 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
7510 ## These are all RS6000 variants, as far as GDB is concerned.
7511 with_cpu=rs6000
7512 ;;
7513 603e | ec603e )
7514 with_cpu=603
7515 ;;
7516 604e )
7517 with_cpu=604
7518 ;;
7519 * )
7520 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
7521 with_cpu=ppc-uisa
7522 ;;
7523 esac
7524 ;;
7525 * )
7526 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
7527 ;;
7528 esac
7529 cat >> confdefs.h <<EOF
7530 #define TARGET_CPU_DEFAULT "${with_cpu}"
7531 EOF
7532
7533
7534 fi
7535
7536
7537
7538 # Check whether --enable-gdbtk or --disable-gdbtk was given.
7539 if test "${enable_gdbtk+set}" = set; then
7540 enableval="$enable_gdbtk"
7541 case "${enableval}" in
7542 yes)
7543 case "$host" in
7544 *go32*)
7545 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7546 enable_gdbtk=no ;;
7547 *windows*)
7548 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
7549 enable_gdbtk=no ;;
7550 *)
7551 enable_gdbtk=yes ;;
7552 esac ;;
7553 no)
7554 enable_gdbtk=no ;;
7555 *)
7556 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7557 esac
7558 else
7559
7560 # Default is on for everything but go32 and Cygwin
7561 case "$host" in
7562 *go32* | *windows*)
7563 ;;
7564 *)
7565 if test -d "${srcdir}/gdbtk" ; then
7566 enable_gdbtk=yes
7567 fi
7568 ;;
7569 esac
7570
7571 fi
7572
7573
7574 WIN32LDAPP=
7575
7576
7577
7578 configdir="unix"
7579
7580 GDBTKLIBS=
7581 if test "${enable_gdbtk}" = "yes"; then
7582
7583 # Gdbtk must have an absolute path to srcdir in order to run
7584 # properly when not installed.
7585 here=`pwd`
7586 cd ${srcdir}
7587 GDBTK_SRC_DIR=`pwd`
7588 cd $here
7589
7590
7591 #
7592 # Ok, lets find the tcl configuration
7593 # First, look for one uninstalled.
7594 # the alternative search directory is invoked by --with-tclconfig
7595 #
7596
7597 if test x"${no_tcl}" = x ; then
7598 # we reset no_tcl in case something fails here
7599 no_tcl=true
7600 # Check whether --with-tclconfig or --without-tclconfig was given.
7601 if test "${with_tclconfig+set}" = set; then
7602 withval="$with_tclconfig"
7603 with_tclconfig=${withval}
7604 fi
7605
7606 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
7607 echo "configure:7608: checking for Tcl configuration" >&5
7608 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7609 echo $ac_n "(cached) $ac_c" 1>&6
7610 else
7611
7612
7613 # First check to see if --with-tclconfig was specified.
7614 if test x"${with_tclconfig}" != x ; then
7615 if test -f "${with_tclconfig}/tclConfig.sh" ; then
7616 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7617 else
7618 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7619 fi
7620 fi
7621
7622 # then check for a private Tcl installation
7623 if test x"${ac_cv_c_tclconfig}" = x ; then
7624 for i in \
7625 ../tcl \
7626 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7627 ../../tcl \
7628 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7629 ../../../tcl \
7630 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7631 if test -f "$i/${configdir}/tclConfig.sh" ; then
7632 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7633 break
7634 fi
7635 done
7636 fi
7637 # check in a few common install locations
7638 if test x"${ac_cv_c_tclconfig}" = x ; then
7639 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7640 if test -f "$i/tclConfig.sh" ; then
7641 ac_cv_c_tclconfig=`(cd $i; pwd)`
7642 break
7643 fi
7644 done
7645 fi
7646 # check in a few other private locations
7647 if test x"${ac_cv_c_tclconfig}" = x ; then
7648 for i in \
7649 ${srcdir}/../tcl \
7650 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7651 if test -f "$i/${configdir}/tclConfig.sh" ; then
7652 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7653 break
7654 fi
7655 done
7656 fi
7657
7658 fi
7659
7660 if test x"${ac_cv_c_tclconfig}" = x ; then
7661 TCLCONFIG="# no Tcl configs found"
7662 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7663 else
7664 no_tcl=
7665 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7666 echo "$ac_t""found $TCLCONFIG" 1>&6
7667 fi
7668 fi
7669
7670 if test -z "${no_tcl}"; then
7671
7672 . $TCLCONFIG
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699 #
7700 # Ok, lets find the tk configuration
7701 # First, look for one uninstalled.
7702 # the alternative search directory is invoked by --with-tkconfig
7703 #
7704
7705 if test x"${no_tk}" = x ; then
7706 # we reset no_tk in case something fails here
7707 no_tk=true
7708 # Check whether --with-tkconfig or --without-tkconfig was given.
7709 if test "${with_tkconfig+set}" = set; then
7710 withval="$with_tkconfig"
7711 with_tkconfig=${withval}
7712 fi
7713
7714 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
7715 echo "configure:7716: checking for Tk configuration" >&5
7716 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7717 echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719
7720
7721 # First check to see if --with-tkconfig was specified.
7722 if test x"${with_tkconfig}" != x ; then
7723 if test -f "${with_tkconfig}/tkConfig.sh" ; then
7724 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7725 else
7726 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7727 fi
7728 fi
7729
7730 # then check for a private Tk library
7731 if test x"${ac_cv_c_tkconfig}" = x ; then
7732 for i in \
7733 ../tk \
7734 `ls -dr ../tk[4-9]* 2>/dev/null` \
7735 ../../tk \
7736 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7737 ../../../tk \
7738 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7739 if test -f "$i/${configdir}/tkConfig.sh" ; then
7740 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7741 break
7742 fi
7743 done
7744 fi
7745 # check in a few common install locations
7746 if test x"${ac_cv_c_tkconfig}" = x ; then
7747 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7748 if test -f "$i/tkConfig.sh" ; then
7749 ac_cv_c_tkconfig=`(cd $i; pwd)`
7750 break
7751 fi
7752 done
7753 fi
7754 # check in a few other private locations
7755 if test x"${ac_cv_c_tkconfig}" = x ; then
7756 for i in \
7757 ${srcdir}/../tk \
7758 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7759 if test -f "$i/${configdir}/tkConfig.sh" ; then
7760 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7761 break
7762 fi
7763 done
7764 fi
7765
7766 fi
7767
7768 if test x"${ac_cv_c_tkconfig}" = x ; then
7769 TKCONFIG="# no Tk configs found"
7770 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7771 else
7772 no_tk=
7773 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7774 echo "$ac_t""found $TKCONFIG" 1>&6
7775 fi
7776 fi
7777
7778
7779
7780 # now look for Tcl library stuff
7781
7782 case "${host}" in
7783 *-*-cygwin*)
7784 tcldir=../tcl/win/
7785 ;;
7786 *)
7787 tcldir=../tcl/unix/
7788 ;;
7789 esac
7790
7791 TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7792
7793 # If $no_tk is nonempty, then we can't do Tk, and there is no
7794 # point to doing Tcl.
7795 if test -z "${no_tk}"; then
7796
7797 if test -f "$TKCONFIG" ; then
7798 . $TKCONFIG
7799 fi
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814 #
7815 # Ok, lets find the tcl source trees so we can use the headers
7816 # Warning: transition of version 9 to 10 will break this algorithm
7817 # because 10 sorts before 9. We also look for just tcl. We have to
7818 # be careful that we don't match stuff like tclX by accident.
7819 # the alternative search directory is involked by --with-tclinclude
7820 #
7821
7822 no_tcl=true
7823 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
7824 echo "configure:7825: checking for Tcl private headers. dir=${configdir}" >&5
7825 # Check whether --with-tclinclude or --without-tclinclude was given.
7826 if test "${with_tclinclude+set}" = set; then
7827 withval="$with_tclinclude"
7828 with_tclinclude=${withval}
7829 fi
7830
7831 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7832 echo $ac_n "(cached) $ac_c" 1>&6
7833 else
7834
7835 # first check to see if --with-tclinclude was specified
7836 if test x"${with_tclinclude}" != x ; then
7837 if test -f ${with_tclinclude}/tclInt.h ; then
7838 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7839 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7840 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7841 else
7842 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7843 fi
7844 fi
7845
7846 # next check if it came with Tcl configuration file
7847 if test x"${ac_cv_c_tclconfig}" = x ; then
7848 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7849 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7850 fi
7851 fi
7852
7853 # next check in private source directory
7854 #
7855 # since ls returns lowest version numbers first, reverse its output
7856 if test x"${ac_cv_c_tclh}" = x ; then
7857 for i in \
7858 ${srcdir}/../tcl \
7859 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7860 ${srcdir}/../../tcl \
7861 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7862 ${srcdir}/../../../tcl \
7863 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7864 if test -f $i/generic/tclInt.h ; then
7865 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7866 break
7867 fi
7868 done
7869 fi
7870 # finally check in a few common install locations
7871 #
7872 # since ls returns lowest version numbers first, reverse its output
7873 if test x"${ac_cv_c_tclh}" = x ; then
7874 for i in \
7875 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7876 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7877 /usr/local/src/tcl \
7878 /usr/local/lib/tcl \
7879 ${prefix}/include ; do
7880 if test -f $i/generic/tclInt.h ; then
7881 ac_cv_c_tclh=`(cd $i/generic; pwd)`
7882 break
7883 fi
7884 done
7885 fi
7886 # see if one is installed
7887 if test x"${ac_cv_c_tclh}" = x ; then
7888 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7889 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
7890 echo "configure:7891: checking for tclInt.h" >&5
7891 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7892 echo $ac_n "(cached) $ac_c" 1>&6
7893 else
7894 cat > conftest.$ac_ext <<EOF
7895 #line 7896 "configure"
7896 #include "confdefs.h"
7897 #include <tclInt.h>
7898 EOF
7899 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7900 { (eval echo configure:7901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7901 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7902 if test -z "$ac_err"; then
7903 rm -rf conftest*
7904 eval "ac_cv_header_$ac_safe=yes"
7905 else
7906 echo "$ac_err" >&5
7907 echo "configure: failed program was:" >&5
7908 cat conftest.$ac_ext >&5
7909 rm -rf conftest*
7910 eval "ac_cv_header_$ac_safe=no"
7911 fi
7912 rm -f conftest*
7913 fi
7914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7915 echo "$ac_t""yes" 1>&6
7916 ac_cv_c_tclh=installed
7917 else
7918 echo "$ac_t""no" 1>&6
7919 ac_cv_c_tclh=""
7920 fi
7921
7922 fi
7923
7924 fi
7925
7926 if test x"${ac_cv_c_tclh}" = x ; then
7927 TCLHDIR="# no Tcl private headers found"
7928 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7929 fi
7930 if test x"${ac_cv_c_tclh}" != x ; then
7931 no_tcl=""
7932 if test x"${ac_cv_c_tclh}" = x"installed" ; then
7933 echo "$ac_t""is installed" 1>&6
7934 TCLHDIR=""
7935 else
7936 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7937 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7938 TCLHDIR="-I${ac_cv_c_tclh}"
7939 fi
7940 fi
7941
7942
7943
7944
7945 #
7946 # Ok, lets find the tk source trees so we can use the headers
7947 # If the directory (presumably symlink) named "tk" exists, use that one
7948 # in preference to any others. Same logic is used when choosing library
7949 # and again with Tcl. The search order is the best place to look first, then in
7950 # decreasing significance. The loop breaks if the trigger file is found.
7951 # Note the gross little conversion here of srcdir by cd'ing to the found
7952 # directory. This converts the path from a relative to an absolute, so
7953 # recursive cache variables for the path will work right. We check all
7954 # the possible paths in one loop rather than many seperate loops to speed
7955 # things up.
7956 # the alternative search directory is involked by --with-tkinclude
7957 #
7958 no_tk=true
7959 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
7960 echo "configure:7961: checking for Tk private headers" >&5
7961 # Check whether --with-tkinclude or --without-tkinclude was given.
7962 if test "${with_tkinclude+set}" = set; then
7963 withval="$with_tkinclude"
7964 with_tkinclude=${withval}
7965 fi
7966
7967 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7968 echo $ac_n "(cached) $ac_c" 1>&6
7969 else
7970
7971 # first check to see if --with-tkinclude was specified
7972 if test x"${with_tkinclude}" != x ; then
7973 if test -f ${with_tkinclude}/tk.h ; then
7974 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7975 elif test -f ${with_tkinclude}/generic/tk.h ; then
7976 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7977 else
7978 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7979 fi
7980 fi
7981
7982 # next check if it came with Tk configuration file
7983 if test x"${ac_cv_c_tkconfig}" = x ; then
7984 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7985 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7986 fi
7987 fi
7988
7989 # next check in private source directory
7990 #
7991 # since ls returns lowest version numbers first, reverse its output
7992 if test x"${ac_cv_c_tkh}" = x ; then
7993 for i in \
7994 ${srcdir}/../tk \
7995 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7996 ${srcdir}/../../tk \
7997 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7998 ${srcdir}/../../../tk \
7999 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
8000 if test -f $i/generic/tk.h ; then
8001 ac_cv_c_tkh=`(cd $i/generic; pwd)`
8002 break
8003 fi
8004 done
8005 fi
8006 # finally check in a few common install locations
8007 #
8008 # since ls returns lowest version numbers first, reverse its output
8009 if test x"${ac_cv_c_tkh}" = x ; then
8010 for i in \
8011 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
8012 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
8013 /usr/local/src/tk \
8014 /usr/local/lib/tk \
8015 ${prefix}/include ; do
8016 if test -f $i/generic/tk.h ; then
8017 ac_cv_c_tkh=`(cd $i/generic; pwd)`
8018 break
8019 fi
8020 done
8021 fi
8022 # see if one is installed
8023 if test x"${ac_cv_c_tkh}" = x ; then
8024 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
8025 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
8026 echo "configure:8027: checking for tk.h" >&5
8027 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8028 echo $ac_n "(cached) $ac_c" 1>&6
8029 else
8030 cat > conftest.$ac_ext <<EOF
8031 #line 8032 "configure"
8032 #include "confdefs.h"
8033 #include <tk.h>
8034 EOF
8035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8036 { (eval echo configure:8037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8038 if test -z "$ac_err"; then
8039 rm -rf conftest*
8040 eval "ac_cv_header_$ac_safe=yes"
8041 else
8042 echo "$ac_err" >&5
8043 echo "configure: failed program was:" >&5
8044 cat conftest.$ac_ext >&5
8045 rm -rf conftest*
8046 eval "ac_cv_header_$ac_safe=no"
8047 fi
8048 rm -f conftest*
8049 fi
8050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8051 echo "$ac_t""yes" 1>&6
8052 ac_cv_c_tkh=installed
8053 else
8054 echo "$ac_t""no" 1>&6
8055 ac_cv_c_tkh=""
8056 fi
8057
8058 fi
8059
8060 fi
8061
8062 if test x"${ac_cv_c_tkh}" != x ; then
8063 no_tk=""
8064 if test x"${ac_cv_c_tkh}" = x"installed" ; then
8065 echo "$ac_t""is installed" 1>&6
8066 TKHDIR=""
8067 else
8068 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
8069 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
8070 TKHDIR="-I${ac_cv_c_tkh}"
8071 fi
8072 else
8073 TKHDIR="# no Tk directory found"
8074 echo "configure: warning: Can't find Tk private headers" 1>&2
8075 no_tk=true
8076 fi
8077
8078
8079
8080
8081 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
8082 echo "configure:8083: checking for Itcl private headers. srcdir=${srcdir}" >&5
8083 if test x"${ac_cv_c_itclh}" = x ; then
8084 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
8085 if test -f $i/generic/itcl.h ; then
8086 ac_cv_c_itclh=`(cd $i/generic; pwd)`
8087 break
8088 fi
8089 done
8090 fi
8091 if test x"${ac_cv_c_itclh}" = x ; then
8092 ITCLHDIR="# no Itcl private headers found"
8093 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
8094 fi
8095 if test x"${ac_cv_c_itclh}" != x ; then
8096 ITCLHDIR="-I${ac_cv_c_itclh}"
8097 fi
8098 # should always be here
8099 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
8100
8101 #AC_SUBST(ITCLLIB)
8102
8103
8104 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
8105 echo "configure:8106: checking for Itk private headers. srcdir=${srcdir}" >&5
8106 if test x"${ac_cv_c_itkh}" = x ; then
8107 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
8108 if test -f $i/generic/itk.h ; then
8109 ac_cv_c_itkh=`(cd $i/generic; pwd)`
8110 break
8111 fi
8112 done
8113 fi
8114 if test x"${ac_cv_c_itkh}" = x ; then
8115 ITKHDIR="# no Itk private headers found"
8116 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
8117 fi
8118 if test x"${ac_cv_c_itkh}" != x ; then
8119 ITKHDIR="-I${ac_cv_c_itkh}"
8120 fi
8121 # should always be here
8122 # ITKLIB="../itcl/itk/unix/libitk.a"
8123
8124 #AC_SUBST(ITKLIB)
8125
8126
8127
8128 # now look for Tk library stuff
8129
8130 case "${host}" in
8131 *-*-cygwin*)
8132 tkdir=../tk/win/
8133 ;;
8134 *)
8135 tkdir=../tk/unix/
8136 ;;
8137 esac
8138
8139 TK_DEPS="${tkdir}${TK_LIB_FILE}"
8140
8141 # now look for Itcl library stuff
8142
8143
8144 #
8145 # Ok, lets find the itcl configuration
8146 # First, look for one uninstalled.
8147 # the alternative search directory is invoked by --with-itclconfig
8148 #
8149
8150 if test x"${no_itcl}" = x ; then
8151 # we reset no_itcl in case something fails here
8152 no_itcl=true
8153 # Check whether --with-itclconfig or --without-itclconfig was given.
8154 if test "${with_itclconfig+set}" = set; then
8155 withval="$with_itclconfig"
8156 with_itclconfig=${withval}
8157 fi
8158
8159 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
8160 echo "configure:8161: checking for Itcl configuration" >&5
8161 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
8162 echo $ac_n "(cached) $ac_c" 1>&6
8163 else
8164
8165
8166 # First check to see if --with-itclconfig was specified.
8167 if test x"${with_itclconfig}" != x ; then
8168 if test -f "${with_itclconfig}/itclConfig.sh" ; then
8169 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
8170 else
8171 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
8172 fi
8173 fi
8174
8175 # then check for a private Itcl library
8176 if test x"${ac_cv_c_itclconfig}" = x ; then
8177 for i in \
8178 ../itcl/itcl \
8179 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
8180 ../../itcl \
8181 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
8182 ../../../itcl \
8183 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
8184 if test -f "$i/itclConfig.sh" ; then
8185 ac_cv_c_itclconfig=`(cd $i; pwd)`
8186 break
8187 fi
8188 done
8189 fi
8190 # check in a few common install locations
8191 if test x"${ac_cv_c_itclconfig}" = x ; then
8192 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8193 if test -f "$i/itclConfig.sh" ; then
8194 ac_cv_c_itclconfig=`(cd $i; pwd)`
8195 break
8196 fi
8197 done
8198 fi
8199 # check in a few other private locations
8200 if test x"${ac_cv_c_itclconfig}" = x ; then
8201 for i in \
8202 ${srcdir}/../itcl/itcl \
8203 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
8204 if test -f "$i/itclConfig.sh" ; then
8205 ac_cv_c_itclconfig=`(cd $i; pwd)`
8206 break
8207 fi
8208 done
8209 fi
8210
8211 fi
8212
8213 if test x"${ac_cv_c_itclconfig}" = x ; then
8214 ITCLCONFIG="# no Itcl configs found"
8215 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
8216 else
8217 no_itcl=
8218 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
8219 echo "$ac_t""found $ITCLCONFIG" 1>&6
8220 fi
8221 fi
8222
8223 if test -z "${no_itcl}"; then
8224
8225 if test -f "$ITCLCONFIG" ; then
8226 . $ITCLCONFIG
8227 fi
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
8241 ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
8242 fi
8243
8244
8245 # now look for Itk library stuff
8246
8247 #
8248 # Ok, lets find the itk configuration
8249 # First, look for one uninstalled.
8250 # the alternative search directory is invoked by --with-itkconfig
8251 #
8252
8253 if test x"${no_itk}" = x ; then
8254 # we reset no_itk in case something fails here
8255 no_itk=true
8256 # Check whether --with-itkconfig or --without-itkconfig was given.
8257 if test "${with_itkconfig+set}" = set; then
8258 withval="$with_itkconfig"
8259 with_itkconfig=${withval}
8260 fi
8261
8262 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
8263 echo "configure:8264: checking for Itk configuration" >&5
8264 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
8265 echo $ac_n "(cached) $ac_c" 1>&6
8266 else
8267
8268
8269 # First check to see if --with-itkconfig was specified.
8270 if test x"${with_itkconfig}" != x ; then
8271 if test -f "${with_itkconfig}/itkConfig.sh" ; then
8272 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
8273 else
8274 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
8275 fi
8276 fi
8277
8278 # then check for a private Itk library
8279 if test x"${ac_cv_c_itkconfig}" = x ; then
8280 for i in \
8281 ../itcl/itk \
8282 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
8283 ../../itk \
8284 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
8285 ../../../itk \
8286 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
8287 if test -f "$i/itkConfig.sh" ; then
8288 ac_cv_c_itkconfig=`(cd $i; pwd)`
8289 break
8290 fi
8291 done
8292 fi
8293 # check in a few common install locations
8294 if test x"${ac_cv_c_itkconfig}" = x ; then
8295 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8296 if test -f "$i/itkConfig.sh" ; then
8297 ac_cv_c_itkconfig=`(cd $i; pwd)`
8298 break
8299 fi
8300 done
8301 fi
8302 # check in a few other private locations
8303 if test x"${ac_cv_c_itkconfig}" = x ; then
8304 for i in \
8305 ${srcdir}/../itcl/itk \
8306 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
8307 if test -f "$i/itkConfig.sh" ; then
8308 ac_cv_c_itkconfig=`(cd $i; pwd)`
8309 break
8310 fi
8311 done
8312 fi
8313
8314 fi
8315
8316 if test x"${ac_cv_c_itkconfig}" = x ; then
8317 ITKCONFIG="# no Itk configs found"
8318 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
8319 else
8320 no_itk=
8321 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
8322 echo "$ac_t""found $ITKCONFIG" 1>&6
8323 fi
8324 fi
8325
8326
8327 if test -z "${no_itcl}"; then
8328
8329 if test -f "$ITKCONFIG" ; then
8330 . $ITKCONFIG
8331 fi
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344 ITKLIB="${ITK_BUILD_LIB_SPEC}"
8345 ITK_DEPS="${ITK_LIB_FULL_PATH}"
8346 fi
8347
8348 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
8349 # Tcl/Tk 8.1 require -fwritable strings. I don't
8350 # know whether 8.2 will or not, but I bet it will.
8351 # I don't have to worry about 7.x since we don't support it.
8352 GDBTK_CFLAGS=""
8353 if test "$GCC" = "yes"; then
8354 if test "$TCL_VERSION" != "8.0" ; then
8355 GDBTK_CFLAGS="-fwritable-strings"
8356 fi
8357 fi
8358
8359 # Include some libraries that Tcl and Tk want.
8360 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
8361 # Yes, the ordering seems wrong here. But it isn't.
8362 # TK_LIBS is the list of libraries that need to be linked
8363 # after Tcl/Tk. Note that this isn't put into LIBS. If it
8364 # were in LIBS then any link tests after this point would
8365 # try to include things like `$(LIBGUI)', which wouldn't work.
8366 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
8367
8368 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
8369 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
8370 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
8371 CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
8372 CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
8373 CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
8374 CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
8375 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
8376
8377 if test x$gdb_cv_os_cygwin = xyes; then
8378 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
8379 WIN32LDAPP="-Wl,--subsystem,console"
8380 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
8381 fi
8382 fi
8383 fi
8384
8385 SUBDIRS="${SUBDIRS} gdbtk"
8386 configdirs="${configdirs} gdbtk"
8387 fi
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402 # If we find X, set shell vars x_includes and x_libraries to the
8403 # paths, otherwise set no_x=yes.
8404 # Uses ac_ vars as temps to allow command line to override cache and checks.
8405 # --without-x overrides everything else, but does not touch the cache.
8406 echo $ac_n "checking for X""... $ac_c" 1>&6
8407 echo "configure:8408: checking for X" >&5
8408
8409 # Check whether --with-x or --without-x was given.
8410 if test "${with_x+set}" = set; then
8411 withval="$with_x"
8412 :
8413 fi
8414
8415 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8416 if test "x$with_x" = xno; then
8417 # The user explicitly disabled X.
8418 have_x=disabled
8419 else
8420 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8421 # Both variables are already set.
8422 have_x=yes
8423 else
8424 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8425 echo $ac_n "(cached) $ac_c" 1>&6
8426 else
8427 # One or both of the vars are not set, and there is no cached value.
8428 ac_x_includes=NO ac_x_libraries=NO
8429 rm -fr conftestdir
8430 if mkdir conftestdir; then
8431 cd conftestdir
8432 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8433 cat > Imakefile <<'EOF'
8434 acfindx:
8435 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8436 EOF
8437 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8438 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8439 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8440 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8441 for ac_extension in a so sl; do
8442 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8443 test -f $ac_im_libdir/libX11.$ac_extension; then
8444 ac_im_usrlibdir=$ac_im_libdir; break
8445 fi
8446 done
8447 # Screen out bogus values from the imake configuration. They are
8448 # bogus both because they are the default anyway, and because
8449 # using them would break gcc on systems where it needs fixed includes.
8450 case "$ac_im_incroot" in
8451 /usr/include) ;;
8452 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8453 esac
8454 case "$ac_im_usrlibdir" in
8455 /usr/lib | /lib) ;;
8456 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8457 esac
8458 fi
8459 cd ..
8460 rm -fr conftestdir
8461 fi
8462
8463 if test "$ac_x_includes" = NO; then
8464 # Guess where to find include files, by looking for this one X11 .h file.
8465 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8466
8467 # First, try using that file with no special directory specified.
8468 cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 #include <$x_direct_test_include>
8472 EOF
8473 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8474 { (eval echo configure:8475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8475 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8476 if test -z "$ac_err"; then
8477 rm -rf conftest*
8478 # We can compile using X headers with no special include directory.
8479 ac_x_includes=
8480 else
8481 echo "$ac_err" >&5
8482 echo "configure: failed program was:" >&5
8483 cat conftest.$ac_ext >&5
8484 rm -rf conftest*
8485 # Look for the header file in a standard set of common directories.
8486 # Check X11 before X11Rn because it is often a symlink to the current release.
8487 for ac_dir in \
8488 /usr/X11/include \
8489 /usr/X11R6/include \
8490 /usr/X11R5/include \
8491 /usr/X11R4/include \
8492 \
8493 /usr/include/X11 \
8494 /usr/include/X11R6 \
8495 /usr/include/X11R5 \
8496 /usr/include/X11R4 \
8497 \
8498 /usr/local/X11/include \
8499 /usr/local/X11R6/include \
8500 /usr/local/X11R5/include \
8501 /usr/local/X11R4/include \
8502 \
8503 /usr/local/include/X11 \
8504 /usr/local/include/X11R6 \
8505 /usr/local/include/X11R5 \
8506 /usr/local/include/X11R4 \
8507 \
8508 /usr/X386/include \
8509 /usr/x386/include \
8510 /usr/XFree86/include/X11 \
8511 \
8512 /usr/include \
8513 /usr/local/include \
8514 /usr/unsupported/include \
8515 /usr/athena/include \
8516 /usr/local/x11r5/include \
8517 /usr/lpp/Xamples/include \
8518 \
8519 /usr/openwin/include \
8520 /usr/openwin/share/include \
8521 ; \
8522 do
8523 if test -r "$ac_dir/$x_direct_test_include"; then
8524 ac_x_includes=$ac_dir
8525 break
8526 fi
8527 done
8528 fi
8529 rm -f conftest*
8530 fi # $ac_x_includes = NO
8531
8532 if test "$ac_x_libraries" = NO; then
8533 # Check for the libraries.
8534
8535 test -z "$x_direct_test_library" && x_direct_test_library=Xt
8536 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8537
8538 # See if we find them without any special options.
8539 # Don't add to $LIBS permanently.
8540 ac_save_LIBS="$LIBS"
8541 LIBS="-l$x_direct_test_library $LIBS"
8542 cat > conftest.$ac_ext <<EOF
8543 #line 8544 "configure"
8544 #include "confdefs.h"
8545
8546 int main() {
8547 ${x_direct_test_function}()
8548 ; return 0; }
8549 EOF
8550 if { (eval echo configure:8551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8551 rm -rf conftest*
8552 LIBS="$ac_save_LIBS"
8553 # We can link X programs with no special library path.
8554 ac_x_libraries=
8555 else
8556 echo "configure: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558 rm -rf conftest*
8559 LIBS="$ac_save_LIBS"
8560 # First see if replacing the include by lib works.
8561 # Check X11 before X11Rn because it is often a symlink to the current release.
8562 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8563 /usr/X11/lib \
8564 /usr/X11R6/lib \
8565 /usr/X11R5/lib \
8566 /usr/X11R4/lib \
8567 \
8568 /usr/lib/X11 \
8569 /usr/lib/X11R6 \
8570 /usr/lib/X11R5 \
8571 /usr/lib/X11R4 \
8572 \
8573 /usr/local/X11/lib \
8574 /usr/local/X11R6/lib \
8575 /usr/local/X11R5/lib \
8576 /usr/local/X11R4/lib \
8577 \
8578 /usr/local/lib/X11 \
8579 /usr/local/lib/X11R6 \
8580 /usr/local/lib/X11R5 \
8581 /usr/local/lib/X11R4 \
8582 \
8583 /usr/X386/lib \
8584 /usr/x386/lib \
8585 /usr/XFree86/lib/X11 \
8586 \
8587 /usr/lib \
8588 /usr/local/lib \
8589 /usr/unsupported/lib \
8590 /usr/athena/lib \
8591 /usr/local/x11r5/lib \
8592 /usr/lpp/Xamples/lib \
8593 /lib/usr/lib/X11 \
8594 \
8595 /usr/openwin/lib \
8596 /usr/openwin/share/lib \
8597 ; \
8598 do
8599 for ac_extension in a so sl; do
8600 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8601 ac_x_libraries=$ac_dir
8602 break 2
8603 fi
8604 done
8605 done
8606 fi
8607 rm -f conftest*
8608 fi # $ac_x_libraries = NO
8609
8610 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8611 # Didn't find X anywhere. Cache the known absence of X.
8612 ac_cv_have_x="have_x=no"
8613 else
8614 # Record where we found X for the cache.
8615 ac_cv_have_x="have_x=yes \
8616 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8617 fi
8618 fi
8619 fi
8620 eval "$ac_cv_have_x"
8621 fi # $with_x != no
8622
8623 if test "$have_x" != yes; then
8624 echo "$ac_t""$have_x" 1>&6
8625 no_x=yes
8626 else
8627 # If each of the values was on the command line, it overrides each guess.
8628 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8629 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8630 # Update the cache value to reflect the command line values.
8631 ac_cv_have_x="have_x=yes \
8632 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8633 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8634 fi
8635
8636
8637
8638 # Unlike the sim directory, whether a simulator is linked is controlled by
8639 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.
8640 # This code just checks for a few cases where we'd like to ignore those
8641 # definitions, even when they're present in the '.mt' file. These cases
8642 # are when --disable-sim is specified, or if the simulator directory is
8643 # not part of the source tree.
8644 #
8645 # Check whether --enable-sim or --disable-sim was given.
8646 if test "${enable_sim+set}" = set; then
8647 enableval="$enable_sim"
8648 echo "enable_sim = $enable_sim";
8649 echo "enableval = ${enableval}";
8650 case "${enableval}" in
8651 yes) ignore_sim=false ;;
8652 no) ignore_sim=true ;;
8653 *) ignore_sim=false ;;
8654 esac
8655 else
8656 ignore_sim=false
8657 fi
8658
8659
8660 if test ! -d "${srcdir}/../sim"; then
8661 ignore_sim=true
8662 fi
8663
8664 if test "${ignore_sim}" = "true"; then
8665 IGNORE_SIM="SIM="
8666 IGNORE_SIM_OBS="SIM_OBS="
8667 else
8668 IGNORE_SIM=""
8669 IGNORE_SIM_OBS=""
8670 cat >> confdefs.h <<\EOF
8671 #define WITH_SIM 1
8672 EOF
8673
8674 fi
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690 # Begin stuff to support --enable-shared
8691 # Check whether --enable-shared or --disable-shared was given.
8692 if test "${enable_shared+set}" = set; then
8693 enableval="$enable_shared"
8694 case "${enableval}" in
8695 yes) shared=true ;;
8696 no) shared=false ;;
8697 *) shared=true ;;
8698 esac
8699 fi
8700
8701 HLDFLAGS=
8702 HLDENV=
8703 # If we have shared libraries, try to set rpath reasonably.
8704 if test "${shared}" = "true"; then
8705 case "${host}" in
8706 *-*-hpux*)
8707 HLDFLAGS='-Wl,+s,+b,$(libdir)'
8708 ;;
8709 *-*-irix5* | *-*-irix6*)
8710 HLDFLAGS='-Wl,-rpath,$(libdir)'
8711 ;;
8712 *-*-linux*aout*)
8713 ;;
8714 *-*-linux* | *-pc-linux-gnu*)
8715 HLDFLAGS='-Wl,-rpath,$(libdir)'
8716 ;;
8717 *-*-solaris*)
8718 HLDFLAGS='-R $(libdir)'
8719 ;;
8720 *-*-sysv4*)
8721 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;'
8722 ;;
8723 esac
8724 fi
8725
8726 # On SunOS, if the linker supports the -rpath option, use it to
8727 # prevent ../bfd and ../opcodes from being included in the run time
8728 # search path.
8729 case "${host}" in
8730 *-*-sunos*)
8731 echo 'main () { }' > conftest.c
8732 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8733 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8734 :
8735 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8736 :
8737 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8738 :
8739 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8740 :
8741 elif test "${shared}" = "true"; then
8742 HLDFLAGS='-Wl,-rpath=$(libdir)'
8743 else
8744 HLDFLAGS='-Wl,-rpath='
8745 fi
8746 rm -f conftest.t conftest.c conftest
8747 ;;
8748 esac
8749
8750
8751 # End stuff to support --enable-shared
8752
8753 # target_subdir is used by the testsuite to find the target libraries.
8754 target_subdir=
8755 if test "${host}" != "${target}"; then
8756 target_subdir="${target_alias}/"
8757 fi
8758
8759
8760 frags=
8761 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8762 if test ! -f ${host_makefile_frag}; then
8763 # When building a native debuger the .mh file containing things
8764 # like NATDEPFILES is needed. Cross debuggers don't need .mh
8765 # since it no longer contains anything useful.
8766 if test "${target}" = "${host}"; then
8767 { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
8768 else
8769 host_makefile_frag=/dev/null
8770 fi
8771 fi
8772 frags="$frags $host_makefile_frag"
8773
8774 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8775 if test ! -f ${target_makefile_frag}; then
8776 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8777 fi
8778 frags="$frags $target_makefile_frag"
8779
8780
8781
8782
8783
8784 hostfile=`sed -n '
8785 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8786 ' ${host_makefile_frag}`
8787
8788 targetfile=`sed -n '
8789 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8790 ' ${target_makefile_frag}`
8791
8792 GDB_MULTI_ARCH=`sed -n '
8793 s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ ]*/\1/p
8794 ' ${target_makefile_frag}`
8795
8796 if test "${target}" = "${host}"; then
8797 # We pick this up from the host configuration file (.mh) because we
8798 # do not have a native configuration Makefile fragment.
8799 nativefile=`sed -n '
8800 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
8801 ' ${host_makefile_frag}`
8802 fi
8803
8804
8805 # New targets should just set gdb_multi_arch=yes in configure.tgt.
8806 # Old targets being converted can either do that or set GDB_MULTI_ARCH
8807 # in the target specific makefile frag. Eventually gdb_multi_arch=yes
8808 # will be the default.
8809 if test x"${GDB_MULTI_ARCH}" = x ; then
8810 case "${gdb_multi_arch}" in
8811 yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8812 no ) GDB_MULTI_ARCH=0 ;;
8813 0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8814 esac
8815 fi
8816 if test x"${GDB_MULTI_ARCH}" != x ; then
8817 cat >> confdefs.h <<EOF
8818 #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8819 EOF
8820
8821 fi
8822 # Warn the user when they use an old practice
8823 case "${GDB_MULTI_ARCH}" in
8824 "" ) ;;
8825 0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8826 echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8827 GDB_MULTI_ARCH_PURE )
8828 if test x"${targetfile}" != x ; then
8829 echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
8830 targetfile=""
8831 fi ;;
8832 *) { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8833 esac
8834
8835 if test "${enable_multi_ice}" = "yes"; then
8836 SUBDIRS="${SUBDIRS} multi-ice"
8837 fi
8838
8839 # ``gdbserver'' can only be built in a native configuration.
8840 if test x"${target}" = x"${host}"; then
8841 echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
8842 echo "configure:8843: checking whether gdbserver is supported on this host" >&5
8843 if test x"${build_gdbserver}" = xyes ; then
8844 configdirs="${configdirs} gdbserver"
8845 SUBDIRS="${SUBDIRS} gdbserver"
8846 echo "$ac_t""yes" 1>&6
8847 else
8848 echo "$ac_t""no" 1>&6
8849 fi
8850 fi
8851
8852
8853
8854 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
8855 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8856 # version.
8857
8858 files=
8859 links=
8860
8861 rm -f xm.h
8862 xm_h=""
8863 if test "${hostfile}" != ""; then
8864 xm_h=xm.h
8865 GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8866 files="${files} ${GDB_XM_FILE}"
8867 links="${links} xm.h"
8868 cat >> confdefs.h <<EOF
8869 #define GDB_XM_FILE ${GDB_XM_FILE}
8870 EOF
8871
8872 fi
8873
8874
8875 rm -f tm.h
8876 tm_h=""
8877 if test "${targetfile}" != ""; then
8878 tm_h=tm.h
8879 GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8880 files="${files} ${GDB_TM_FILE}"
8881 links="${links} tm.h"
8882 cat >> confdefs.h <<EOF
8883 #define GDB_TM_FILE ${GDB_TM_FILE}
8884 EOF
8885
8886 fi
8887
8888
8889 rm -f nm.h
8890 nm_h=""
8891 if test "${nativefile}" != ""; then
8892 nm_h=nm.h
8893 GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8894 files="${files} ${GDB_NM_FILE}"
8895 links="${links} nm.h"
8896 cat >> confdefs.h <<EOF
8897 #define GDB_NM_FILE ${GDB_NM_FILE}
8898 EOF
8899
8900 fi
8901
8902
8903
8904
8905 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8906 echo "configure:8907: checking for Cygwin environment" >&5
8907 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8908 echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910 cat > conftest.$ac_ext <<EOF
8911 #line 8912 "configure"
8912 #include "confdefs.h"
8913
8914 int main() {
8915
8916 #ifndef __CYGWIN__
8917 #define __CYGWIN__ __CYGWIN32__
8918 #endif
8919 return __CYGWIN__;
8920 ; return 0; }
8921 EOF
8922 if { (eval echo configure:8923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8923 rm -rf conftest*
8924 ac_cv_cygwin=yes
8925 else
8926 echo "configure: failed program was:" >&5
8927 cat conftest.$ac_ext >&5
8928 rm -rf conftest*
8929 ac_cv_cygwin=no
8930 fi
8931 rm -f conftest*
8932 rm -f conftest*
8933 fi
8934
8935 echo "$ac_t""$ac_cv_cygwin" 1>&6
8936 CYGWIN=
8937 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8938 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8939 echo "configure:8940: checking for mingw32 environment" >&5
8940 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8941 echo $ac_n "(cached) $ac_c" 1>&6
8942 else
8943 cat > conftest.$ac_ext <<EOF
8944 #line 8945 "configure"
8945 #include "confdefs.h"
8946
8947 int main() {
8948 return __MINGW32__;
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8952 rm -rf conftest*
8953 ac_cv_mingw32=yes
8954 else
8955 echo "configure: failed program was:" >&5
8956 cat conftest.$ac_ext >&5
8957 rm -rf conftest*
8958 ac_cv_mingw32=no
8959 fi
8960 rm -f conftest*
8961 rm -f conftest*
8962 fi
8963
8964 echo "$ac_t""$ac_cv_mingw32" 1>&6
8965 MINGW32=
8966 test "$ac_cv_mingw32" = yes && MINGW32=yes
8967
8968
8969 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8970 echo "configure:8971: checking for executable suffix" >&5
8971 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8972 echo $ac_n "(cached) $ac_c" 1>&6
8973 else
8974 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8975 ac_cv_exeext=.exe
8976 else
8977 rm -f conftest*
8978 echo 'int main () { return 0; }' > conftest.$ac_ext
8979 ac_cv_exeext=
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8981 for file in conftest.*; do
8982 case $file in
8983 *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
8984 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8985 esac
8986 done
8987 else
8988 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8989 fi
8990 rm -f conftest*
8991 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8992 fi
8993 fi
8994
8995 EXEEXT=""
8996 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8997 echo "$ac_t""${ac_cv_exeext}" 1>&6
8998 ac_exeext=$EXEEXT
8999
9000
9001
9002 cat >> confdefs.h <<\EOF
9003 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
9004 EOF
9005
9006
9007
9008
9009 # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9010 if test "${with_libiconv_prefix+set}" = set; then
9011 withval="$with_libiconv_prefix"
9012
9013 for dir in `echo "$withval" | tr : ' '`; do
9014 if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
9015 if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
9016 done
9017
9018 fi
9019
9020
9021 echo $ac_n "checking for iconv""... $ac_c" 1>&6
9022 echo "configure:9023: checking for iconv" >&5
9023 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
9024 echo $ac_n "(cached) $ac_c" 1>&6
9025 else
9026
9027 am_cv_func_iconv="no, consider installing GNU libiconv"
9028 am_cv_lib_iconv=no
9029 cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032 #include <stdlib.h>
9033 #include <iconv.h>
9034 int main() {
9035 iconv_t cd = iconv_open("","");
9036 iconv(cd,NULL,NULL,NULL,NULL);
9037 iconv_close(cd);
9038 ; return 0; }
9039 EOF
9040 if { (eval echo configure:9041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9041 rm -rf conftest*
9042 am_cv_func_iconv=yes
9043 else
9044 echo "configure: failed program was:" >&5
9045 cat conftest.$ac_ext >&5
9046 fi
9047 rm -f conftest*
9048 if test "$am_cv_func_iconv" != yes; then
9049 am_save_LIBS="$LIBS"
9050 LIBS="$LIBS -liconv"
9051 cat > conftest.$ac_ext <<EOF
9052 #line 9053 "configure"
9053 #include "confdefs.h"
9054 #include <stdlib.h>
9055 #include <iconv.h>
9056 int main() {
9057 iconv_t cd = iconv_open("","");
9058 iconv(cd,NULL,NULL,NULL,NULL);
9059 iconv_close(cd);
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063 rm -rf conftest*
9064 am_cv_lib_iconv=yes
9065 am_cv_func_iconv=yes
9066 else
9067 echo "configure: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9069 fi
9070 rm -f conftest*
9071 LIBS="$am_save_LIBS"
9072 fi
9073
9074 fi
9075
9076 echo "$ac_t""$am_cv_func_iconv" 1>&6
9077 if test "$am_cv_func_iconv" = yes; then
9078 cat >> confdefs.h <<\EOF
9079 #define HAVE_ICONV 1
9080 EOF
9081
9082 echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
9083 echo "configure:9084: checking for iconv declaration" >&5
9084 if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
9085 echo $ac_n "(cached) $ac_c" 1>&6
9086 else
9087
9088 cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091
9092 #include <stdlib.h>
9093 #include <iconv.h>
9094 extern
9095 #ifdef __cplusplus
9096 "C"
9097 #endif
9098 #if defined(__STDC__) || defined(__cplusplus)
9099 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9100 #else
9101 size_t iconv();
9102 #endif
9103
9104 int main() {
9105
9106 ; return 0; }
9107 EOF
9108 if { (eval echo configure:9109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9109 rm -rf conftest*
9110 am_cv_proto_iconv_arg1=""
9111 else
9112 echo "configure: failed program was:" >&5
9113 cat conftest.$ac_ext >&5
9114 rm -rf conftest*
9115 am_cv_proto_iconv_arg1="const"
9116 fi
9117 rm -f conftest*
9118 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);"
9119 fi
9120
9121 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9122 echo "$ac_t""${ac_t:-
9123 }$am_cv_proto_iconv" 1>&6
9124 cat >> confdefs.h <<EOF
9125 #define ICONV_CONST $am_cv_proto_iconv_arg1
9126 EOF
9127
9128 fi
9129 LIBICONV=
9130 if test "$am_cv_lib_iconv" = yes; then
9131 LIBICONV="-liconv"
9132 fi
9133
9134
9135
9136 subdirs="$configdirs"
9137
9138 trap '' 1 2 15
9139 cat > confcache <<\EOF
9140 # This file is a shell script that caches the results of configure
9141 # tests run on this system so they can be shared between configure
9142 # scripts and configure runs. It is not useful on other systems.
9143 # If it contains results you don't want to keep, you may remove or edit it.
9144 #
9145 # By default, configure uses ./config.cache as the cache file,
9146 # creating it if it does not exist already. You can give configure
9147 # the --cache-file=FILE option to use a different cache file; that is
9148 # what configure does when it calls configure scripts in
9149 # subdirectories, so they share the cache.
9150 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9151 # config.status only pays attention to the cache file if you give it the
9152 # --recheck option to rerun configure.
9153 #
9154 EOF
9155 # The following way of writing the cache mishandles newlines in values,
9156 # but we know of no workaround that is simple, portable, and efficient.
9157 # So, don't put newlines in cache variables' values.
9158 # Ultrix sh set writes to stderr and can't be redirected directly,
9159 # and sets the high bit in the cache file unless we assign to the vars.
9160 (set) 2>&1 |
9161 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9162 *ac_space=\ *)
9163 # `set' does not quote correctly, so add quotes (double-quote substitution
9164 # turns \\\\ into \\, and sed turns \\ into \).
9165 sed -n \
9166 -e "s/'/'\\\\''/g" \
9167 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9168 ;;
9169 *)
9170 # `set' quotes correctly as required by POSIX, so do not add quotes.
9171 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9172 ;;
9173 esac >> confcache
9174 if cmp -s $cache_file confcache; then
9175 :
9176 else
9177 if test -w $cache_file; then
9178 echo "updating cache $cache_file"
9179 cat confcache > $cache_file
9180 else
9181 echo "not updating unwritable cache $cache_file"
9182 fi
9183 fi
9184 rm -f confcache
9185
9186 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9187
9188 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9189 # Let make expand exec_prefix.
9190 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9191
9192 # Any assignment to VPATH causes Sun make to only execute
9193 # the first set of double-colon rules, so remove it if not needed.
9194 # If there is a colon in the path, we need to keep it.
9195 if test "x$srcdir" = x.; then
9196 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9197 fi
9198
9199 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9200
9201 DEFS=-DHAVE_CONFIG_H
9202
9203 # Without the "./", some shells look in PATH for config.status.
9204 : ${CONFIG_STATUS=./config.status}
9205
9206 echo creating $CONFIG_STATUS
9207 rm -f $CONFIG_STATUS
9208 cat > $CONFIG_STATUS <<EOF
9209 #! /bin/sh
9210 # Generated automatically by configure.
9211 # Run this file to recreate the current configuration.
9212 # This directory was configured as follows,
9213 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9214 #
9215 # $0 $ac_configure_args
9216 #
9217 # Compiler output produced by configure, useful for debugging
9218 # configure, is in ./config.log if it exists.
9219
9220 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9221 for ac_option
9222 do
9223 case "\$ac_option" in
9224 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9225 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9226 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9227 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9228 echo "$CONFIG_STATUS generated by autoconf version 2.13"
9229 exit 0 ;;
9230 -help | --help | --hel | --he | --h)
9231 echo "\$ac_cs_usage"; exit 0 ;;
9232 *) echo "\$ac_cs_usage"; exit 1 ;;
9233 esac
9234 done
9235
9236 ac_given_srcdir=$srcdir
9237 ac_given_INSTALL="$INSTALL"
9238
9239 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9240 EOF
9241 cat >> $CONFIG_STATUS <<EOF
9242
9243 # Protect against being on the right side of a sed subst in config.status.
9244 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9245 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9246 $ac_vpsub
9247 $extrasub
9248 s%@SHELL@%$SHELL%g
9249 s%@CFLAGS@%$CFLAGS%g
9250 s%@CPPFLAGS@%$CPPFLAGS%g
9251 s%@CXXFLAGS@%$CXXFLAGS%g
9252 s%@FFLAGS@%$FFLAGS%g
9253 s%@DEFS@%$DEFS%g
9254 s%@LDFLAGS@%$LDFLAGS%g
9255 s%@LIBS@%$LIBS%g
9256 s%@exec_prefix@%$exec_prefix%g
9257 s%@prefix@%$prefix%g
9258 s%@program_transform_name@%$program_transform_name%g
9259 s%@bindir@%$bindir%g
9260 s%@sbindir@%$sbindir%g
9261 s%@libexecdir@%$libexecdir%g
9262 s%@datadir@%$datadir%g
9263 s%@sysconfdir@%$sysconfdir%g
9264 s%@sharedstatedir@%$sharedstatedir%g
9265 s%@localstatedir@%$localstatedir%g
9266 s%@libdir@%$libdir%g
9267 s%@includedir@%$includedir%g
9268 s%@oldincludedir@%$oldincludedir%g
9269 s%@infodir@%$infodir%g
9270 s%@mandir@%$mandir%g
9271 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
9272 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
9273 s%@MAINT@%$MAINT%g
9274 s%@CC@%$CC%g
9275 s%@CPP@%$CPP%g
9276 s%@host@%$host%g
9277 s%@host_alias@%$host_alias%g
9278 s%@host_cpu@%$host_cpu%g
9279 s%@host_vendor@%$host_vendor%g
9280 s%@host_os@%$host_os%g
9281 s%@target@%$target%g
9282 s%@target_alias@%$target_alias%g
9283 s%@target_cpu@%$target_cpu%g
9284 s%@target_vendor@%$target_vendor%g
9285 s%@target_os@%$target_os%g
9286 s%@build@%$build%g
9287 s%@build_alias@%$build_alias%g
9288 s%@build_cpu@%$build_cpu%g
9289 s%@build_vendor@%$build_vendor%g
9290 s%@build_os@%$build_os%g
9291 s%@RANLIB@%$RANLIB%g
9292 s%@SET_MAKE@%$SET_MAKE%g
9293 s%@ALLOCA@%$ALLOCA%g
9294 s%@USE_NLS@%$USE_NLS%g
9295 s%@MSGFMT@%$MSGFMT%g
9296 s%@GMSGFMT@%$GMSGFMT%g
9297 s%@XGETTEXT@%$XGETTEXT%g
9298 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
9299 s%@CATALOGS@%$CATALOGS%g
9300 s%@CATOBJEXT@%$CATOBJEXT%g
9301 s%@DATADIRNAME@%$DATADIRNAME%g
9302 s%@GMOFILES@%$GMOFILES%g
9303 s%@INSTOBJEXT@%$INSTOBJEXT%g
9304 s%@INTLDEPS@%$INTLDEPS%g
9305 s%@INTLLIBS@%$INTLLIBS%g
9306 s%@INTLOBJS@%$INTLOBJS%g
9307 s%@POFILES@%$POFILES%g
9308 s%@POSUB@%$POSUB%g
9309 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
9310 s%@GT_NO@%$GT_NO%g
9311 s%@GT_YES@%$GT_YES%g
9312 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
9313 s%@l@%$l%g
9314 s%@AWK@%$AWK%g
9315 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
9316 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
9317 s%@INSTALL_DATA@%$INSTALL_DATA%g
9318 s%@LN_S@%$LN_S%g
9319 s%@YACC@%$YACC%g
9320 s%@AR@%$AR%g
9321 s%@DLLTOOL@%$DLLTOOL%g
9322 s%@WINDRES@%$WINDRES%g
9323 s%@MIG@%$MIG%g
9324 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
9325 s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
9326 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
9327 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
9328 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
9329 s%@MMALLOC@%$MMALLOC%g
9330 s%@REGEX@%$REGEX%g
9331 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
9332 s%@TERM_LIB@%$TERM_LIB%g
9333 s%@WIN32LIBS@%$WIN32LIBS%g
9334 s%@LIBGUI@%$LIBGUI%g
9335 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
9336 s%@WIN32LDAPP@%$WIN32LDAPP%g
9337 s%@TCL_VERSION@%$TCL_VERSION%g
9338 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
9339 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
9340 s%@TCL_CC@%$TCL_CC%g
9341 s%@TCL_DEFS@%$TCL_DEFS%g
9342 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
9343 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
9344 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
9345 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
9346 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
9347 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
9348 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
9349 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
9350 s%@TCL_RANLIB@%$TCL_RANLIB%g
9351 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
9352 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
9353 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
9354 s%@TK_VERSION@%$TK_VERSION%g
9355 s%@TK_DEFS@%$TK_DEFS%g
9356 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
9357 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
9358 s%@TK_XLIBSW@%$TK_XLIBSW%g
9359 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
9360 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
9361 s%@TCLHDIR@%$TCLHDIR%g
9362 s%@TKHDIR@%$TKHDIR%g
9363 s%@ITCLHDIR@%$ITCLHDIR%g
9364 s%@ITKHDIR@%$ITKHDIR%g
9365 s%@ITCL_VERSION@%$ITCL_VERSION%g
9366 s%@ITCL_DEFS@%$ITCL_DEFS%g
9367 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
9368 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
9369 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
9370 s%@ITK_VERSION@%$ITK_VERSION%g
9371 s%@ITK_DEFS@%$ITK_DEFS%g
9372 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
9373 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
9374 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
9375 s%@X_CFLAGS@%$X_CFLAGS%g
9376 s%@X_LDFLAGS@%$X_LDFLAGS%g
9377 s%@X_LIBS@%$X_LIBS%g
9378 s%@TCL_DEPS@%$TCL_DEPS%g
9379 s%@TK_DEPS@%$TK_DEPS%g
9380 s%@ITCLLIB@%$ITCLLIB%g
9381 s%@ITCL_DEPS@%$ITCL_DEPS%g
9382 s%@ITKLIB@%$ITKLIB%g
9383 s%@ITK_DEPS@%$ITK_DEPS%g
9384 s%@GDBTKLIBS@%$GDBTKLIBS%g
9385 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
9386 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
9387 s%@IGNORE_SIM@%$IGNORE_SIM%g
9388 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
9389 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
9390 s%@CONFIG_OBS@%$CONFIG_OBS%g
9391 s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
9392 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
9393 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
9394 s%@CONFIG_INITS@%$CONFIG_INITS%g
9395 s%@CONFIG_ALL@%$CONFIG_ALL%g
9396 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
9397 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
9398 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
9399 s%@HLDFLAGS@%$HLDFLAGS%g
9400 s%@HLDENV@%$HLDENV%g
9401 s%@target_subdir@%$target_subdir%g
9402 /@host_makefile_frag@/r $host_makefile_frag
9403 s%@host_makefile_frag@%%g
9404 /@target_makefile_frag@/r $target_makefile_frag
9405 s%@target_makefile_frag@%%g
9406 s%@frags@%$frags%g
9407 s%@SUBDIRS@%$SUBDIRS%g
9408 s%@xm_h@%$xm_h%g
9409 s%@tm_h@%$tm_h%g
9410 s%@nm_h@%$nm_h%g
9411 s%@EXEEXT@%$EXEEXT%g
9412 s%@LIBICONV@%$LIBICONV%g
9413 s%@subdirs@%$subdirs%g
9414
9415 CEOF
9416 EOF
9417
9418 cat >> $CONFIG_STATUS <<\EOF
9419
9420 # Split the substitutions into bite-sized pieces for seds with
9421 # small command number limits, like on Digital OSF/1 and HP-UX.
9422 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9423 ac_file=1 # Number of current file.
9424 ac_beg=1 # First line for current file.
9425 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9426 ac_more_lines=:
9427 ac_sed_cmds=""
9428 while $ac_more_lines; do
9429 if test $ac_beg -gt 1; then
9430 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9431 else
9432 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9433 fi
9434 if test ! -s conftest.s$ac_file; then
9435 ac_more_lines=false
9436 rm -f conftest.s$ac_file
9437 else
9438 if test -z "$ac_sed_cmds"; then
9439 ac_sed_cmds="sed -f conftest.s$ac_file"
9440 else
9441 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9442 fi
9443 ac_file=`expr $ac_file + 1`
9444 ac_beg=$ac_end
9445 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9446 fi
9447 done
9448 if test -z "$ac_sed_cmds"; then
9449 ac_sed_cmds=cat
9450 fi
9451 EOF
9452
9453 cat >> $CONFIG_STATUS <<EOF
9454
9455 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
9456 EOF
9457 cat >> $CONFIG_STATUS <<\EOF
9458 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9459 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9460 case "$ac_file" in
9461 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9462 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9463 *) ac_file_in="${ac_file}.in" ;;
9464 esac
9465
9466 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9467
9468 # Remove last slash and all that follows it. Not all systems have dirname.
9469 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9470 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9471 # The file is in a subdirectory.
9472 test ! -d "$ac_dir" && mkdir "$ac_dir"
9473 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9474 # A "../" for each directory in $ac_dir_suffix.
9475 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9476 else
9477 ac_dir_suffix= ac_dots=
9478 fi
9479
9480 case "$ac_given_srcdir" in
9481 .) srcdir=.
9482 if test -z "$ac_dots"; then top_srcdir=.
9483 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9484 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9485 *) # Relative path.
9486 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9487 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9488 esac
9489
9490 case "$ac_given_INSTALL" in
9491 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9492 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9493 esac
9494
9495 echo creating "$ac_file"
9496 rm -f "$ac_file"
9497 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9498 case "$ac_file" in
9499 *Makefile*) ac_comsub="1i\\
9500 # $configure_input" ;;
9501 *) ac_comsub= ;;
9502 esac
9503
9504 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9505 sed -e "$ac_comsub
9506 s%@configure_input@%$configure_input%g
9507 s%@srcdir@%$srcdir%g
9508 s%@top_srcdir@%$top_srcdir%g
9509 s%@INSTALL@%$INSTALL%g
9510 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9511 fi; done
9512 rm -f conftest.s*
9513
9514 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9515 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9516 #
9517 # ac_d sets the value in "#define NAME VALUE" lines.
9518 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9519 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9520 ac_dC='\3'
9521 ac_dD='%g'
9522 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9523 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9524 ac_uB='\([ ]\)%\1#\2define\3'
9525 ac_uC=' '
9526 ac_uD='\4%g'
9527 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9528 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9529 ac_eB='$%\1#\2define\3'
9530 ac_eC=' '
9531 ac_eD='%g'
9532
9533 if test "${CONFIG_HEADERS+set}" != set; then
9534 EOF
9535 cat >> $CONFIG_STATUS <<EOF
9536 CONFIG_HEADERS="config.h:config.in"
9537 EOF
9538 cat >> $CONFIG_STATUS <<\EOF
9539 fi
9540 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9541 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9542 case "$ac_file" in
9543 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9544 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9545 *) ac_file_in="${ac_file}.in" ;;
9546 esac
9547
9548 echo creating $ac_file
9549
9550 rm -f conftest.frag conftest.in conftest.out
9551 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9552 cat $ac_file_inputs > conftest.in
9553
9554 EOF
9555
9556 # Transform confdefs.h into a sed script conftest.vals that substitutes
9557 # the proper values into config.h.in to produce config.h. And first:
9558 # Protect against being on the right side of a sed subst in config.status.
9559 # Protect against being in an unquoted here document in config.status.
9560 rm -f conftest.vals
9561 cat > conftest.hdr <<\EOF
9562 s/[\\&%]/\\&/g
9563 s%[\\$`]%\\&%g
9564 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9565 s%ac_d%ac_u%gp
9566 s%ac_u%ac_e%gp
9567 EOF
9568 sed -n -f conftest.hdr confdefs.h > conftest.vals
9569 rm -f conftest.hdr
9570
9571 # This sed command replaces #undef with comments. This is necessary, for
9572 # example, in the case of _POSIX_SOURCE, which is predefined and required
9573 # on some systems where configure will not decide to define it.
9574 cat >> conftest.vals <<\EOF
9575 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9576 EOF
9577
9578 # Break up conftest.vals because some shells have a limit on
9579 # the size of here documents, and old seds have small limits too.
9580
9581 rm -f conftest.tail
9582 while :
9583 do
9584 ac_lines=`grep -c . conftest.vals`
9585 # grep -c gives empty output for an empty file on some AIX systems.
9586 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9587 # Write a limited-size here document to conftest.frag.
9588 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9589 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9590 echo 'CEOF
9591 sed -f conftest.frag conftest.in > conftest.out
9592 rm -f conftest.in
9593 mv conftest.out conftest.in
9594 ' >> $CONFIG_STATUS
9595 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9596 rm -f conftest.vals
9597 mv conftest.tail conftest.vals
9598 done
9599 rm -f conftest.vals
9600
9601 cat >> $CONFIG_STATUS <<\EOF
9602 rm -f conftest.frag conftest.h
9603 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9604 cat conftest.in >> conftest.h
9605 rm -f conftest.in
9606 if cmp -s $ac_file conftest.h 2>/dev/null; then
9607 echo "$ac_file is unchanged"
9608 rm -f conftest.h
9609 else
9610 # Remove last slash and all that follows it. Not all systems have dirname.
9611 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9612 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9613 # The file is in a subdirectory.
9614 test ! -d "$ac_dir" && mkdir "$ac_dir"
9615 fi
9616 rm -f $ac_file
9617 mv conftest.h $ac_file
9618 fi
9619 fi; done
9620
9621 EOF
9622
9623 cat >> $CONFIG_STATUS <<EOF
9624 ac_sources="$files"
9625 ac_dests="$links"
9626 EOF
9627
9628 cat >> $CONFIG_STATUS <<\EOF
9629 srcdir=$ac_given_srcdir
9630 while test -n "$ac_sources"; do
9631 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9632 set $ac_sources; ac_source=$1; shift; ac_sources=$*
9633
9634 echo "linking $srcdir/$ac_source to $ac_dest"
9635
9636 if test ! -r $srcdir/$ac_source; then
9637 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9638 fi
9639 rm -f $ac_dest
9640
9641 # Make relative symlinks.
9642 # Remove last slash and all that follows it. Not all systems have dirname.
9643 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9644 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9645 # The dest file is in a subdirectory.
9646 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9647 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9648 # A "../" for each directory in $ac_dest_dir_suffix.
9649 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9650 else
9651 ac_dest_dir_suffix= ac_dots=
9652 fi
9653
9654 case "$srcdir" in
9655 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9656 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9657 esac
9658
9659 # Make a symlink if possible; otherwise try a hard link.
9660 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9661 ln $srcdir/$ac_source $ac_dest; then :
9662 else
9663 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9664 fi
9665 done
9666 EOF
9667 cat >> $CONFIG_STATUS <<EOF
9668
9669 gdb_host_cpu=$gdb_host_cpu
9670 gdb_target_cpu=$gdb_target_cpu
9671 nativefile=$nativefile
9672
9673 EOF
9674 cat >> $CONFIG_STATUS <<\EOF
9675
9676 if test "${nativefile}" = ""; then
9677 < Makefile \
9678 sed -e '/^NATDEPFILES[ ]*=.*\\$/,/[^\\]$/s/^/# /' \
9679 -e '/^NATDEPFILES[ ]*=/s/^/# /' \
9680 | sed -e '/^\(NATDEPFILES[ ]*[+]=[ ]*\)/s//# \1/' \
9681 > Makefile.tem
9682 mv -f Makefile.tem Makefile
9683 fi
9684
9685 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
9686 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
9687 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9688 mv -f Makefile.tmp Makefile
9689
9690
9691 case x$CONFIG_HEADERS in
9692 xconfig.h:config.in)
9693 echo > stamp-h ;;
9694 esac
9695
9696 exit 0
9697 EOF
9698 chmod +x $CONFIG_STATUS
9699 rm -fr confdefs* $ac_clean_files
9700 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9701
9702 if test "$no_recursion" != yes; then
9703
9704 # Remove --cache-file and --srcdir arguments so they do not pile up.
9705 ac_sub_configure_args=
9706 ac_prev=
9707 for ac_arg in $ac_configure_args; do
9708 if test -n "$ac_prev"; then
9709 ac_prev=
9710 continue
9711 fi
9712 case "$ac_arg" in
9713 -cache-file | --cache-file | --cache-fil | --cache-fi \
9714 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9715 ac_prev=cache_file ;;
9716 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9717 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9718 ;;
9719 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9720 ac_prev=srcdir ;;
9721 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9722 ;;
9723 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9724 esac
9725 done
9726
9727 for ac_config_dir in $configdirs; do
9728
9729 # Do not complain, so a configure script can configure whichever
9730 # parts of a large source tree are present.
9731 if test ! -d $srcdir/$ac_config_dir; then
9732 continue
9733 fi
9734
9735 echo configuring in $ac_config_dir
9736
9737 case "$srcdir" in
9738 .) ;;
9739 *)
9740 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9741 else
9742 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9743 fi
9744 ;;
9745 esac
9746
9747 ac_popdir=`pwd`
9748 cd $ac_config_dir
9749
9750 # A "../" for each directory in /$ac_config_dir.
9751 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9752
9753 case "$srcdir" in
9754 .) # No --srcdir option. We are building in place.
9755 ac_sub_srcdir=$srcdir ;;
9756 /*) # Absolute path.
9757 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9758 *) # Relative path.
9759 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9760 esac
9761
9762 # Check for guested configure; otherwise get Cygnus style configure.
9763 if test -f $ac_sub_srcdir/configure; then
9764 ac_sub_configure=$ac_sub_srcdir/configure
9765 elif test -f $ac_sub_srcdir/configure.in; then
9766 ac_sub_configure=$ac_configure
9767 else
9768 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9769 ac_sub_configure=
9770 fi
9771
9772 # The recursion is here.
9773 if test -n "$ac_sub_configure"; then
9774
9775 # Make the cache file name correct relative to the subdirectory.
9776 case "$cache_file" in
9777 /*) ac_sub_cache_file=$cache_file ;;
9778 *) # Relative path.
9779 ac_sub_cache_file="$ac_dots$cache_file" ;;
9780 esac
9781 case "$ac_given_INSTALL" in
9782 [/$]*) INSTALL="$ac_given_INSTALL" ;;
9783 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9784 esac
9785
9786 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9787 # The eval makes quoting arguments work.
9788 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9789 then :
9790 else
9791 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9792 fi
9793 fi
9794
9795 cd $ac_popdir
9796 done
9797 fi
9798
9799
9800 exit 0