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