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