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