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