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