]> www.wagner.pp.ru Git - oss/ck.git/blob - configure
Ck console graphics toolkit
[oss/ck.git] / 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   --with-tcl=DIR          use Tcl 8.X binaries from DIR"
16 ac_help="$ac_help
17   --enable-shared         build libck as a shared library"
18
19 # Initialize some variables set by options.
20 # The variables have the same names as the options, with
21 # dashes changed to underlines.
22 build=NONE
23 cache_file=./config.cache
24 exec_prefix=NONE
25 host=NONE
26 no_create=
27 nonopt=NONE
28 no_recursion=
29 prefix=NONE
30 program_prefix=NONE
31 program_suffix=NONE
32 program_transform_name=s,x,x,
33 silent=
34 site=
35 srcdir=
36 target=NONE
37 verbose=
38 x_includes=NONE
39 x_libraries=NONE
40 bindir='${exec_prefix}/bin'
41 sbindir='${exec_prefix}/sbin'
42 libexecdir='${exec_prefix}/libexec'
43 datadir='${prefix}/share'
44 sysconfdir='${prefix}/etc'
45 sharedstatedir='${prefix}/com'
46 localstatedir='${prefix}/var'
47 libdir='${exec_prefix}/lib'
48 includedir='${prefix}/include'
49 oldincludedir='/usr/include'
50 infodir='${prefix}/info'
51 mandir='${prefix}/man'
52
53 # Initialize some other variables.
54 subdirs=
55 MFLAGS= MAKEFLAGS=
56 SHELL=${CONFIG_SHELL-/bin/sh}
57 # Maximum number of lines to put in a shell here document.
58 ac_max_here_lines=12
59
60 ac_prev=
61 for ac_option
62 do
63
64   # If the previous option needs an argument, assign it.
65   if test -n "$ac_prev"; then
66     eval "$ac_prev=\$ac_option"
67     ac_prev=
68     continue
69   fi
70
71   case "$ac_option" in
72   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73   *) ac_optarg= ;;
74   esac
75
76   # Accept the important Cygnus configure options, so we can diagnose typos.
77
78   case "$ac_option" in
79
80   -bindir | --bindir | --bindi | --bind | --bin | --bi)
81     ac_prev=bindir ;;
82   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83     bindir="$ac_optarg" ;;
84
85   -build | --build | --buil | --bui | --bu)
86     ac_prev=build ;;
87   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
88     build="$ac_optarg" ;;
89
90   -cache-file | --cache-file | --cache-fil | --cache-fi \
91   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92     ac_prev=cache_file ;;
93   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95     cache_file="$ac_optarg" ;;
96
97   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
98     ac_prev=datadir ;;
99   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100   | --da=*)
101     datadir="$ac_optarg" ;;
102
103   -disable-* | --disable-*)
104     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105     # Reject names that are not valid shell variable names.
106     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108     fi
109     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110     eval "enable_${ac_feature}=no" ;;
111
112   -enable-* | --enable-*)
113     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114     # Reject names that are not valid shell variable names.
115     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117     fi
118     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119     case "$ac_option" in
120       *=*) ;;
121       *) ac_optarg=yes ;;
122     esac
123     eval "enable_${ac_feature}='$ac_optarg'" ;;
124
125   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127   | --exec | --exe | --ex)
128     ac_prev=exec_prefix ;;
129   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131   | --exec=* | --exe=* | --ex=*)
132     exec_prefix="$ac_optarg" ;;
133
134   -gas | --gas | --ga | --g)
135     # Obsolete; use --with-gas.
136     with_gas=yes ;;
137
138   -help | --help | --hel | --he)
139     # Omit some internal or obsolete options to make the list less imposing.
140     # This message is too long to be a string in the A/UX 3.1 sh.
141     cat << EOF
142 Usage: configure [options] [host]
143 Options: [defaults in brackets after descriptions]
144 Configuration:
145   --cache-file=FILE       cache test results in FILE
146   --help                  print this message
147   --no-create             do not create output files
148   --quiet, --silent       do not print \`checking...' messages
149   --version               print the version of autoconf that created configure
150 Directory and file names:
151   --prefix=PREFIX         install architecture-independent files in PREFIX
152                           [$ac_default_prefix]
153   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
154                           [same as prefix]
155   --bindir=DIR            user executables in DIR [EPREFIX/bin]
156   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
157   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
158   --datadir=DIR           read-only architecture-independent data in DIR
159                           [PREFIX/share]
160   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
161   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
162                           [PREFIX/com]
163   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
164   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
165   --includedir=DIR        C header files in DIR [PREFIX/include]
166   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
167   --infodir=DIR           info documentation in DIR [PREFIX/info]
168   --mandir=DIR            man documentation in DIR [PREFIX/man]
169   --srcdir=DIR            find the sources in DIR [configure dir or ..]
170   --program-prefix=PREFIX prepend PREFIX to installed program names
171   --program-suffix=SUFFIX append SUFFIX to installed program names
172   --program-transform-name=PROGRAM
173                           run sed PROGRAM on installed program names
174 EOF
175     cat << EOF
176 Host type:
177   --build=BUILD           configure for building on BUILD [BUILD=HOST]
178   --host=HOST             configure for HOST [guessed]
179   --target=TARGET         configure for TARGET [TARGET=HOST]
180 Features and packages:
181   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
182   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
183   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
184   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
185   --x-includes=DIR        X include files are in DIR
186   --x-libraries=DIR       X library files are in DIR
187 EOF
188     if test -n "$ac_help"; then
189       echo "--enable and --with options recognized:$ac_help"
190     fi
191     exit 0 ;;
192
193   -host | --host | --hos | --ho)
194     ac_prev=host ;;
195   -host=* | --host=* | --hos=* | --ho=*)
196     host="$ac_optarg" ;;
197
198   -includedir | --includedir | --includedi | --included | --include \
199   | --includ | --inclu | --incl | --inc)
200     ac_prev=includedir ;;
201   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202   | --includ=* | --inclu=* | --incl=* | --inc=*)
203     includedir="$ac_optarg" ;;
204
205   -infodir | --infodir | --infodi | --infod | --info | --inf)
206     ac_prev=infodir ;;
207   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208     infodir="$ac_optarg" ;;
209
210   -libdir | --libdir | --libdi | --libd)
211     ac_prev=libdir ;;
212   -libdir=* | --libdir=* | --libdi=* | --libd=*)
213     libdir="$ac_optarg" ;;
214
215   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216   | --libexe | --libex | --libe)
217     ac_prev=libexecdir ;;
218   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219   | --libexe=* | --libex=* | --libe=*)
220     libexecdir="$ac_optarg" ;;
221
222   -localstatedir | --localstatedir | --localstatedi | --localstated \
223   | --localstate | --localstat | --localsta | --localst \
224   | --locals | --local | --loca | --loc | --lo)
225     ac_prev=localstatedir ;;
226   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229     localstatedir="$ac_optarg" ;;
230
231   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
232     ac_prev=mandir ;;
233   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234     mandir="$ac_optarg" ;;
235
236   -nfp | --nfp | --nf)
237     # Obsolete; use --without-fp.
238     with_fp=no ;;
239
240   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241   | --no-cr | --no-c)
242     no_create=yes ;;
243
244   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
246     no_recursion=yes ;;
247
248   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250   | --oldin | --oldi | --old | --ol | --o)
251     ac_prev=oldincludedir ;;
252   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255     oldincludedir="$ac_optarg" ;;
256
257   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
258     ac_prev=prefix ;;
259   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260     prefix="$ac_optarg" ;;
261
262   -program-prefix | --program-prefix | --program-prefi | --program-pref \
263   | --program-pre | --program-pr | --program-p)
264     ac_prev=program_prefix ;;
265   -program-prefix=* | --program-prefix=* | --program-prefi=* \
266   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267     program_prefix="$ac_optarg" ;;
268
269   -program-suffix | --program-suffix | --program-suffi | --program-suff \
270   | --program-suf | --program-su | --program-s)
271     ac_prev=program_suffix ;;
272   -program-suffix=* | --program-suffix=* | --program-suffi=* \
273   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274     program_suffix="$ac_optarg" ;;
275
276   -program-transform-name | --program-transform-name \
277   | --program-transform-nam | --program-transform-na \
278   | --program-transform-n | --program-transform- \
279   | --program-transform | --program-transfor \
280   | --program-transfo | --program-transf \
281   | --program-trans | --program-tran \
282   | --progr-tra | --program-tr | --program-t)
283     ac_prev=program_transform_name ;;
284   -program-transform-name=* | --program-transform-name=* \
285   | --program-transform-nam=* | --program-transform-na=* \
286   | --program-transform-n=* | --program-transform-=* \
287   | --program-transform=* | --program-transfor=* \
288   | --program-transfo=* | --program-transf=* \
289   | --program-trans=* | --program-tran=* \
290   | --progr-tra=* | --program-tr=* | --program-t=*)
291     program_transform_name="$ac_optarg" ;;
292
293   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294   | -silent | --silent | --silen | --sile | --sil)
295     silent=yes ;;
296
297   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
298     ac_prev=sbindir ;;
299   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
300   | --sbi=* | --sb=*)
301     sbindir="$ac_optarg" ;;
302
303   -sharedstatedir | --sharedstatedir | --sharedstatedi \
304   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305   | --sharedst | --shareds | --shared | --share | --shar \
306   | --sha | --sh)
307     ac_prev=sharedstatedir ;;
308   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
311   | --sha=* | --sh=*)
312     sharedstatedir="$ac_optarg" ;;
313
314   -site | --site | --sit)
315     ac_prev=site ;;
316   -site=* | --site=* | --sit=*)
317     site="$ac_optarg" ;;
318
319   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
320     ac_prev=srcdir ;;
321   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322     srcdir="$ac_optarg" ;;
323
324   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325   | --syscon | --sysco | --sysc | --sys | --sy)
326     ac_prev=sysconfdir ;;
327   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329     sysconfdir="$ac_optarg" ;;
330
331   -target | --target | --targe | --targ | --tar | --ta | --t)
332     ac_prev=target ;;
333   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334     target="$ac_optarg" ;;
335
336   -v | -verbose | --verbose | --verbos | --verbo | --verb)
337     verbose=yes ;;
338
339   -version | --version | --versio | --versi | --vers)
340     echo "configure generated by autoconf version 2.13"
341     exit 0 ;;
342
343   -with-* | --with-*)
344     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345     # Reject names that are not valid shell variable names.
346     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
348     fi
349     ac_package=`echo $ac_package| sed 's/-/_/g'`
350     case "$ac_option" in
351       *=*) ;;
352       *) ac_optarg=yes ;;
353     esac
354     eval "with_${ac_package}='$ac_optarg'" ;;
355
356   -without-* | --without-*)
357     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358     # Reject names that are not valid shell variable names.
359     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361     fi
362     ac_package=`echo $ac_package| sed 's/-/_/g'`
363     eval "with_${ac_package}=no" ;;
364
365   --x)
366     # Obsolete; use --with-x.
367     with_x=yes ;;
368
369   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370   | --x-incl | --x-inc | --x-in | --x-i)
371     ac_prev=x_includes ;;
372   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374     x_includes="$ac_optarg" ;;
375
376   -x-libraries | --x-libraries | --x-librarie | --x-librari \
377   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378     ac_prev=x_libraries ;;
379   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381     x_libraries="$ac_optarg" ;;
382
383   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
384     ;;
385
386   *)
387     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388       echo "configure: warning: $ac_option: invalid host type" 1>&2
389     fi
390     if test "x$nonopt" != xNONE; then
391       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
392     fi
393     nonopt="$ac_option"
394     ;;
395
396   esac
397 done
398
399 if test -n "$ac_prev"; then
400   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
401 fi
402
403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
404
405 # File descriptor usage:
406 # 0 standard input
407 # 1 file creation
408 # 2 errors and warnings
409 # 3 some systems may open it to /dev/tty
410 # 4 used on the Kubota Titan
411 # 6 checking for... messages and results
412 # 5 compiler messages saved in config.log
413 if test "$silent" = yes; then
414   exec 6>/dev/null
415 else
416   exec 6>&1
417 fi
418 exec 5>./config.log
419
420 echo "\
421 This file contains any messages produced by compilers while
422 running configure, to aid debugging if configure makes a mistake.
423 " 1>&5
424
425 # Strip out --no-create and --no-recursion so they do not pile up.
426 # Also quote any args containing shell metacharacters.
427 ac_configure_args=
428 for ac_arg
429 do
430   case "$ac_arg" in
431   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432   | --no-cr | --no-c) ;;
433   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
438   esac
439 done
440
441 # NLS nuisances.
442 # Only set these to C if already set.  These must not be set unconditionally
443 # because not all systems understand e.g. LANG=C (notably SCO).
444 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445 # Non-C LC_CTYPE values break the ctype check.
446 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
447 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
450
451 # confdefs.h avoids OS command line length limits that DEFS can exceed.
452 rm -rf conftest* confdefs.h
453 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
454 echo > confdefs.h
455
456 # A filename unique to this package, relative to the directory that
457 # configure is in, which we can look for to find out if srcdir is correct.
458 ac_unique_file=ck.h
459
460 # Find the source files, if location was not specified.
461 if test -z "$srcdir"; then
462   ac_srcdir_defaulted=yes
463   # Try the directory containing this script, then its parent.
464   ac_prog=$0
465   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467   srcdir=$ac_confdir
468   if test ! -r $srcdir/$ac_unique_file; then
469     srcdir=..
470   fi
471 else
472   ac_srcdir_defaulted=no
473 fi
474 if test ! -r $srcdir/$ac_unique_file; then
475   if test "$ac_srcdir_defaulted" = yes; then
476     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
477   else
478     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
479   fi
480 fi
481 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
482
483 # Prefer explicitly selected file to automatically selected ones.
484 if test -z "$CONFIG_SITE"; then
485   if test "x$prefix" != xNONE; then
486     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
487   else
488     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
489   fi
490 fi
491 for ac_site_file in $CONFIG_SITE; do
492   if test -r "$ac_site_file"; then
493     echo "loading site script $ac_site_file"
494     . "$ac_site_file"
495   fi
496 done
497
498 if test -r "$cache_file"; then
499   echo "loading cache $cache_file"
500   . $cache_file
501 else
502   echo "creating cache $cache_file"
503   > $cache_file
504 fi
505
506 ac_ext=c
507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508 ac_cpp='$CPP $CPPFLAGS'
509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511 cross_compiling=$ac_cv_prog_cc_cross
512
513 ac_exeext=
514 ac_objext=o
515 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
518     ac_n= ac_c='
519 ' ac_t='        '
520   else
521     ac_n=-n ac_c= ac_t=
522   fi
523 else
524   ac_n= ac_c='\c' ac_t=
525 fi
526
527
528
529 ac_aux_dir=
530 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
531   if test -f $ac_dir/install-sh; then
532     ac_aux_dir=$ac_dir
533     ac_install_sh="$ac_aux_dir/install-sh -c"
534     break
535   elif test -f $ac_dir/install.sh; then
536     ac_aux_dir=$ac_dir
537     ac_install_sh="$ac_aux_dir/install.sh -c"
538     break
539   fi
540 done
541 if test -z "$ac_aux_dir"; then
542   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
543 fi
544 ac_config_guess=$ac_aux_dir/config.guess
545 ac_config_sub=$ac_aux_dir/config.sub
546 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
547
548 # Find a good install program.  We prefer a C program (faster),
549 # so one script is as good as another.  But avoid the broken or
550 # incompatible versions:
551 # SysV /etc/install, /usr/sbin/install
552 # SunOS /usr/etc/install
553 # IRIX /sbin/install
554 # AIX /bin/install
555 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
556 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
557 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
558 # ./install, which can be erroneously created by make from ./install.sh.
559 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
560 echo "configure:561: checking for a BSD compatible install" >&5
561 if test -z "$INSTALL"; then
562 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
563   echo $ac_n "(cached) $ac_c" 1>&6
564 else
565     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
566   for ac_dir in $PATH; do
567     # Account for people who put trailing slashes in PATH elements.
568     case "$ac_dir/" in
569     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
570     *)
571       # OSF1 and SCO ODT 3.0 have their own names for install.
572       # Don't use installbsd from OSF since it installs stuff as root
573       # by default.
574       for ac_prog in ginstall scoinst install; do
575         if test -f $ac_dir/$ac_prog; then
576           if test $ac_prog = install &&
577             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
578             # AIX install.  It has an incompatible calling convention.
579             :
580           else
581             ac_cv_path_install="$ac_dir/$ac_prog -c"
582             break 2
583           fi
584         fi
585       done
586       ;;
587     esac
588   done
589   IFS="$ac_save_IFS"
590
591 fi
592   if test "${ac_cv_path_install+set}" = set; then
593     INSTALL="$ac_cv_path_install"
594   else
595     # As a last resort, use the slow shell script.  We don't cache a
596     # path for INSTALL within a source directory, because that will
597     # break other packages using the cache if that directory is
598     # removed, or if the path is relative.
599     INSTALL="$ac_install_sh"
600   fi
601 fi
602 echo "$ac_t""$INSTALL" 1>&6
603
604 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
605 # It thinks the first close brace ends the variable substitution.
606 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
607
608 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
609
610 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
611
612 # Extract the first word of "ranlib", so it can be a program name with args.
613 set dummy ranlib; ac_word=$2
614 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
615 echo "configure:616: checking for $ac_word" >&5
616 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
617   echo $ac_n "(cached) $ac_c" 1>&6
618 else
619   if test -n "$RANLIB"; then
620   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
621 else
622   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
623   ac_dummy="$PATH"
624   for ac_dir in $ac_dummy; do
625     test -z "$ac_dir" && ac_dir=.
626     if test -f $ac_dir/$ac_word; then
627       ac_cv_prog_RANLIB="ranlib"
628       break
629     fi
630   done
631   IFS="$ac_save_ifs"
632   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
633 fi
634 fi
635 RANLIB="$ac_cv_prog_RANLIB"
636 if test -n "$RANLIB"; then
637   echo "$ac_t""$RANLIB" 1>&6
638 else
639   echo "$ac_t""no" 1>&6
640 fi
641
642 CC=${CC-cc}
643 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
644 echo "configure:645: checking how to run the C preprocessor" >&5
645 # On Suns, sometimes $CPP names a directory.
646 if test -n "$CPP" && test -d "$CPP"; then
647   CPP=
648 fi
649 if test -z "$CPP"; then
650 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
651   echo $ac_n "(cached) $ac_c" 1>&6
652 else
653     # This must be in double quotes, not single quotes, because CPP may get
654   # substituted into the Makefile and "${CC-cc}" will confuse make.
655   CPP="${CC-cc} -E"
656   # On the NeXT, cc -E runs the code through the compiler's parser,
657   # not just through cpp.
658   cat > conftest.$ac_ext <<EOF
659 #line 660 "configure"
660 #include "confdefs.h"
661 #include <assert.h>
662 Syntax Error
663 EOF
664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
665 { (eval echo configure:666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
667 if test -z "$ac_err"; then
668   :
669 else
670   echo "$ac_err" >&5
671   echo "configure: failed program was:" >&5
672   cat conftest.$ac_ext >&5
673   rm -rf conftest*
674   CPP="${CC-cc} -E -traditional-cpp"
675   cat > conftest.$ac_ext <<EOF
676 #line 677 "configure"
677 #include "confdefs.h"
678 #include <assert.h>
679 Syntax Error
680 EOF
681 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
682 { (eval echo configure:683: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
683 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
684 if test -z "$ac_err"; then
685   :
686 else
687   echo "$ac_err" >&5
688   echo "configure: failed program was:" >&5
689   cat conftest.$ac_ext >&5
690   rm -rf conftest*
691   CPP="${CC-cc} -nologo -E"
692   cat > conftest.$ac_ext <<EOF
693 #line 694 "configure"
694 #include "confdefs.h"
695 #include <assert.h>
696 Syntax Error
697 EOF
698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
699 { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
701 if test -z "$ac_err"; then
702   :
703 else
704   echo "$ac_err" >&5
705   echo "configure: failed program was:" >&5
706   cat conftest.$ac_ext >&5
707   rm -rf conftest*
708   CPP=/lib/cpp
709 fi
710 rm -f conftest*
711 fi
712 rm -f conftest*
713 fi
714 rm -f conftest*
715   ac_cv_prog_CPP="$CPP"
716 fi
717   CPP="$ac_cv_prog_CPP"
718 else
719   ac_cv_prog_CPP="$CPP"
720 fi
721 echo "$ac_t""$CPP" 1>&6
722
723 for ac_hdr in unistd.h limits.h
724 do
725 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
726 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
727 echo "configure:728: checking for $ac_hdr" >&5
728 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
729   echo $ac_n "(cached) $ac_c" 1>&6
730 else
731   cat > conftest.$ac_ext <<EOF
732 #line 733 "configure"
733 #include "confdefs.h"
734 #include <$ac_hdr>
735 EOF
736 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
737 { (eval echo configure:738: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
738 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
739 if test -z "$ac_err"; then
740   rm -rf conftest*
741   eval "ac_cv_header_$ac_safe=yes"
742 else
743   echo "$ac_err" >&5
744   echo "configure: failed program was:" >&5
745   cat conftest.$ac_ext >&5
746   rm -rf conftest*
747   eval "ac_cv_header_$ac_safe=no"
748 fi
749 rm -f conftest*
750 fi
751 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
752   echo "$ac_t""yes" 1>&6
753     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
754   cat >> confdefs.h <<EOF
755 #define $ac_tr_hdr 1
756 EOF
757  
758 else
759   echo "$ac_t""no" 1>&6
760 fi
761 done
762
763
764 #--------------------------------------------------------------------
765 #       Supply a substitute for stdlib.h if it doesn't define strtol,
766 #       strtoul, or strtod (which it doesn't in some versions of SunOS).
767 #--------------------------------------------------------------------
768
769 echo $ac_n "checking stdlib.h""... $ac_c" 1>&6
770 echo "configure:771: checking stdlib.h" >&5
771 cat > conftest.$ac_ext <<EOF
772 #line 773 "configure"
773 #include "confdefs.h"
774 #include <stdlib.h>
775 EOF
776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
777   egrep "strtol" >/dev/null 2>&1; then
778   rm -rf conftest*
779   tk_ok=yes
780 else
781   rm -rf conftest*
782   tk_ok=no
783 fi
784 rm -f conftest*
785
786 cat > conftest.$ac_ext <<EOF
787 #line 788 "configure"
788 #include "confdefs.h"
789 #include <stdlib.h>
790 EOF
791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
792   egrep "strtoul" >/dev/null 2>&1; then
793   :
794 else
795   rm -rf conftest*
796   tk_ok=no
797 fi
798 rm -f conftest*
799
800 cat > conftest.$ac_ext <<EOF
801 #line 802 "configure"
802 #include "confdefs.h"
803 #include <stdlib.h>
804 EOF
805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
806   egrep "strtod" >/dev/null 2>&1; then
807   :
808 else
809   rm -rf conftest*
810   tk_ok=no
811 fi
812 rm -f conftest*
813
814 if test $tk_ok = no; then
815     cat >> confdefs.h <<\EOF
816 #define NO_STDLIB_H 1
817 EOF
818
819 fi
820 echo "$ac_t""$tk_ok" 1>&6
821
822 #--------------------------------------------------------------------
823 #       Check for various typedefs and provide substitutes if
824 #       they don't exist.
825 #--------------------------------------------------------------------
826
827 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
828 echo "configure:829: checking for ANSI C header files" >&5
829 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832   cat > conftest.$ac_ext <<EOF
833 #line 834 "configure"
834 #include "confdefs.h"
835 #include <stdlib.h>
836 #include <stdarg.h>
837 #include <string.h>
838 #include <float.h>
839 EOF
840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
841 { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
843 if test -z "$ac_err"; then
844   rm -rf conftest*
845   ac_cv_header_stdc=yes
846 else
847   echo "$ac_err" >&5
848   echo "configure: failed program was:" >&5
849   cat conftest.$ac_ext >&5
850   rm -rf conftest*
851   ac_cv_header_stdc=no
852 fi
853 rm -f conftest*
854
855 if test $ac_cv_header_stdc = yes; then
856   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
857 cat > conftest.$ac_ext <<EOF
858 #line 859 "configure"
859 #include "confdefs.h"
860 #include <string.h>
861 EOF
862 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
863   egrep "memchr" >/dev/null 2>&1; then
864   :
865 else
866   rm -rf conftest*
867   ac_cv_header_stdc=no
868 fi
869 rm -f conftest*
870
871 fi
872
873 if test $ac_cv_header_stdc = yes; then
874   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
875 cat > conftest.$ac_ext <<EOF
876 #line 877 "configure"
877 #include "confdefs.h"
878 #include <stdlib.h>
879 EOF
880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
881   egrep "free" >/dev/null 2>&1; then
882   :
883 else
884   rm -rf conftest*
885   ac_cv_header_stdc=no
886 fi
887 rm -f conftest*
888
889 fi
890
891 if test $ac_cv_header_stdc = yes; then
892   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
893 if test "$cross_compiling" = yes; then
894   :
895 else
896   cat > conftest.$ac_ext <<EOF
897 #line 898 "configure"
898 #include "confdefs.h"
899 #include <ctype.h>
900 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
901 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
902 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
903 int main () { int i; for (i = 0; i < 256; i++)
904 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
905 exit (0); }
906
907 EOF
908 if { (eval echo configure:909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
909 then
910   :
911 else
912   echo "configure: failed program was:" >&5
913   cat conftest.$ac_ext >&5
914   rm -fr conftest*
915   ac_cv_header_stdc=no
916 fi
917 rm -fr conftest*
918 fi
919
920 fi
921 fi
922
923 echo "$ac_t""$ac_cv_header_stdc" 1>&6
924 if test $ac_cv_header_stdc = yes; then
925   cat >> confdefs.h <<\EOF
926 #define STDC_HEADERS 1
927 EOF
928
929 fi
930
931 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
932 echo "configure:933: checking for mode_t" >&5
933 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
934   echo $ac_n "(cached) $ac_c" 1>&6
935 else
936   cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939 #include <sys/types.h>
940 #if STDC_HEADERS
941 #include <stdlib.h>
942 #include <stddef.h>
943 #endif
944 EOF
945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
946   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
947   rm -rf conftest*
948   ac_cv_type_mode_t=yes
949 else
950   rm -rf conftest*
951   ac_cv_type_mode_t=no
952 fi
953 rm -f conftest*
954
955 fi
956 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
957 if test $ac_cv_type_mode_t = no; then
958   cat >> confdefs.h <<\EOF
959 #define mode_t int
960 EOF
961
962 fi
963
964 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
965 echo "configure:966: checking for pid_t" >&5
966 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
967   echo $ac_n "(cached) $ac_c" 1>&6
968 else
969   cat > conftest.$ac_ext <<EOF
970 #line 971 "configure"
971 #include "confdefs.h"
972 #include <sys/types.h>
973 #if STDC_HEADERS
974 #include <stdlib.h>
975 #include <stddef.h>
976 #endif
977 EOF
978 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
979   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
980   rm -rf conftest*
981   ac_cv_type_pid_t=yes
982 else
983   rm -rf conftest*
984   ac_cv_type_pid_t=no
985 fi
986 rm -f conftest*
987
988 fi
989 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
990 if test $ac_cv_type_pid_t = no; then
991   cat >> confdefs.h <<\EOF
992 #define pid_t int
993 EOF
994
995 fi
996
997 echo $ac_n "checking for size_t""... $ac_c" 1>&6
998 echo "configure:999: checking for size_t" >&5
999 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1000   echo $ac_n "(cached) $ac_c" 1>&6
1001 else
1002   cat > conftest.$ac_ext <<EOF
1003 #line 1004 "configure"
1004 #include "confdefs.h"
1005 #include <sys/types.h>
1006 #if STDC_HEADERS
1007 #include <stdlib.h>
1008 #include <stddef.h>
1009 #endif
1010 EOF
1011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1012   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1013   rm -rf conftest*
1014   ac_cv_type_size_t=yes
1015 else
1016   rm -rf conftest*
1017   ac_cv_type_size_t=no
1018 fi
1019 rm -f conftest*
1020
1021 fi
1022 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1023 if test $ac_cv_type_size_t = no; then
1024   cat >> confdefs.h <<\EOF
1025 #define size_t unsigned
1026 EOF
1027
1028 fi
1029
1030 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
1031 echo "configure:1032: checking for uid_t in sys/types.h" >&5
1032 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035   cat > conftest.$ac_ext <<EOF
1036 #line 1037 "configure"
1037 #include "confdefs.h"
1038 #include <sys/types.h>
1039 EOF
1040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1041   egrep "uid_t" >/dev/null 2>&1; then
1042   rm -rf conftest*
1043   ac_cv_type_uid_t=yes
1044 else
1045   rm -rf conftest*
1046   ac_cv_type_uid_t=no
1047 fi
1048 rm -f conftest*
1049
1050 fi
1051
1052 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
1053 if test $ac_cv_type_uid_t = no; then
1054   cat >> confdefs.h <<\EOF
1055 #define uid_t int
1056 EOF
1057
1058   cat >> confdefs.h <<\EOF
1059 #define gid_t int
1060 EOF
1061
1062 fi
1063
1064
1065 #------------------------------------------------------------------------------
1066 #       What type do signals return? Do we have sigaction ?
1067 #------------------------------------------------------------------------------
1068
1069 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1070 echo "configure:1071: checking return type of signal handlers" >&5
1071 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1072   echo $ac_n "(cached) $ac_c" 1>&6
1073 else
1074   cat > conftest.$ac_ext <<EOF
1075 #line 1076 "configure"
1076 #include "confdefs.h"
1077 #include <sys/types.h>
1078 #include <signal.h>
1079 #ifdef signal
1080 #undef signal
1081 #endif
1082 #ifdef __cplusplus
1083 extern "C" void (*signal (int, void (*)(int)))(int);
1084 #else
1085 void (*signal ()) ();
1086 #endif
1087
1088 int main() {
1089 int i;
1090 ; return 0; }
1091 EOF
1092 if { (eval echo configure:1093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1093   rm -rf conftest*
1094   ac_cv_type_signal=void
1095 else
1096   echo "configure: failed program was:" >&5
1097   cat conftest.$ac_ext >&5
1098   rm -rf conftest*
1099   ac_cv_type_signal=int
1100 fi
1101 rm -f conftest*
1102 fi
1103
1104 echo "$ac_t""$ac_cv_type_signal" 1>&6
1105 cat >> confdefs.h <<EOF
1106 #define RETSIGTYPE $ac_cv_type_signal
1107 EOF
1108
1109
1110 for ac_func in sigaction
1111 do
1112 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1113 echo "configure:1114: checking for $ac_func" >&5
1114 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1115   echo $ac_n "(cached) $ac_c" 1>&6
1116 else
1117   cat > conftest.$ac_ext <<EOF
1118 #line 1119 "configure"
1119 #include "confdefs.h"
1120 /* System header to define __stub macros and hopefully few prototypes,
1121     which can conflict with char $ac_func(); below.  */
1122 #include <assert.h>
1123 /* Override any gcc2 internal prototype to avoid an error.  */
1124 /* We use char because int might match the return type of a gcc2
1125     builtin and then its argument prototype would still apply.  */
1126 char $ac_func();
1127
1128 int main() {
1129
1130 /* The GNU C library defines this for functions which it implements
1131     to always fail with ENOSYS.  Some functions are actually named
1132     something starting with __ and the normal name is an alias.  */
1133 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1134 choke me
1135 #else
1136 $ac_func();
1137 #endif
1138
1139 ; return 0; }
1140 EOF
1141 if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1142   rm -rf conftest*
1143   eval "ac_cv_func_$ac_func=yes"
1144 else
1145   echo "configure: failed program was:" >&5
1146   cat conftest.$ac_ext >&5
1147   rm -rf conftest*
1148   eval "ac_cv_func_$ac_func=no"
1149 fi
1150 rm -f conftest*
1151 fi
1152
1153 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1154   echo "$ac_t""yes" 1>&6
1155     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1156   cat >> confdefs.h <<EOF
1157 #define $ac_tr_func 1
1158 EOF
1159  
1160 else
1161   echo "$ac_t""no" 1>&6
1162 fi
1163 done
1164
1165
1166 #--------------------------------------------------------------------
1167 #       See if there was a command-line option for where Tcl is;  if
1168 #       not, assume that its top-level directory is a sibling of ours.
1169 #--------------------------------------------------------------------
1170
1171 # Check whether --with-tcl or --without-tcl was given.
1172 if test "${with_tcl+set}" = set; then
1173   withval="$with_tcl"
1174   TCL_BIN_DIR=$withval
1175 else
1176   TCL_BIN_DIR=`cd ../tcl8.0/unix ; pwd`
1177 fi
1178
1179 if test ! -d $TCL_BIN_DIR ; then
1180     { echo "configure: error: Tcl directory $TCL_BIN_DIR doesn't exist" 1>&2; exit 1; }
1181 fi
1182
1183 #--------------------------------------------------------------------
1184 #       Read in configuration information generated by Tcl for shared
1185 #       libraries, and arrange for it to be substituted into our
1186 #       Makefile.
1187 #--------------------------------------------------------------------
1188
1189 if test -r $TCL_BIN_DIR/tclConfig.sh ; then
1190     file=$TCL_BIN_DIR/tclConfig.sh
1191     if test -d $TCL_BIN_DIR/../generic ; then
1192         TCL_DIR=`cd $TCL_BIN_DIR/../generic ; pwd`
1193     elif test -d $TCL_BIN_DIR/../include ; then
1194         TCL_DIR=`cd $TCL_BIN_DIR/../include ; pwd`
1195     else
1196         TCL_DIR=$TCL_BIN_DIR
1197     fi
1198     . $file
1199     CC=$TCL_CC
1200     SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
1201     SHLIB_LD=$TCL_SHLIB_LD
1202     SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
1203     SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
1204     SHLIB_VERSION=$TCL_SHLIB_VERSION
1205     DL_LIBS=$TCL_DL_LIBS
1206     LD_FLAGS=$TCL_LD_FLAGS
1207     LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
1208 else
1209     TCL_DIR=$TCL_BIN_DIR
1210     TCL_LIB_FILE=libtcl.a
1211     TCL_LIB_VERSIONS_OK=no
1212     TCL_BUILD_LIB_SPEC="-L$TCL_BIN_DIR -ltcl"
1213         TCL_INCLUDE_SPEC="-I$TCL_DIR"
1214 fi
1215
1216 echo $ac_n "checking Ck version""... $ac_c" 1>&6
1217 echo "configure:1218: checking Ck version" >&5
1218 if test "${TCL_VERSION}" = "7.4"; then
1219     VERSION=4.0
1220     CK_VERSION=4.0
1221     CK_MAJOR_VERSION=4
1222     CK_MINOR_VERSION=0
1223 elif test "${TCL_VERSION}" = "7.5"; then
1224     VERSION=4.1
1225     CK_VERSION=4.1
1226     CK_MAJOR_VERSION=4
1227     CK_MINOR_VERSION=1
1228 elif test "${TCL_VERSION}" = "7.6"; then
1229     VERSION=4.2
1230     CK_VERSION=4.2
1231     CK_MAJOR_VERSION=4
1232     CK_MINOR_VERSION=2
1233 else
1234     # Assume Tcl8.0 or higher
1235     VERSION=$TCL_VERSION
1236     CK_VERSION=$VERSION
1237     CK_MAJOR_VERSION=$TCL_MAJOR_VERSION
1238     CK_MINOR_VERSION=$TCL_MINOR_VERSION
1239 fi
1240 echo "$ac_t""${CK_VERSION}" 1>&6
1241
1242 #--------------------------------------------------------------------
1243 #       Include sys/select.h if it exists and if it supplies things
1244 #       that appear to be useful and aren't already in sys/types.h.
1245 #       This appears to be true only on the RS/6000 under AIX.  Some
1246 #       systems like OSF/1 have a sys/select.h that's of no use, and
1247 #       other systems like SCO UNIX have a sys/select.h that's
1248 #       pernicious.  If "fd_set" isn't defined anywhere then set a
1249 #       special flag.
1250 #--------------------------------------------------------------------
1251
1252 echo $ac_n "checking fd_set and sys/select""... $ac_c" 1>&6
1253 echo "configure:1254: checking fd_set and sys/select" >&5
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1257 #include <sys/types.h>
1258 int main() {
1259 fd_set readMask, writeMask;
1260 ; return 0; }
1261 EOF
1262 if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1263   rm -rf conftest*
1264   tk_ok=yes
1265 else
1266   echo "configure: failed program was:" >&5
1267   cat conftest.$ac_ext >&5
1268   rm -rf conftest*
1269   tk_ok=no
1270 fi
1271 rm -f conftest*
1272 if test $tk_ok = no; then
1273     cat > conftest.$ac_ext <<EOF
1274 #line 1275 "configure"
1275 #include "confdefs.h"
1276 #include <sys/select.h>
1277 EOF
1278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1279   egrep "fd_mask" >/dev/null 2>&1; then
1280   rm -rf conftest*
1281   tk_ok=yes
1282 fi
1283 rm -f conftest*
1284
1285     if test $tk_ok = yes; then
1286         cat >> confdefs.h <<\EOF
1287 #define HAVE_SYS_SELECT_H 1
1288 EOF
1289
1290     fi
1291 fi
1292 echo "$ac_t""$tk_ok" 1>&6
1293 if test $tk_ok = no; then
1294     cat >> confdefs.h <<\EOF
1295 #define NO_FD_SET 1
1296 EOF
1297
1298 fi
1299
1300 #---------------------------------------------------------------------
1301 #       Locate the curses header files and the curses library archive.
1302 #       The order is:
1303 #               ../ncurses
1304 #               /usr/include and /usr/lib
1305 #               /opt/ncurses
1306 #               /usr/local
1307 #               /usr/local/ncurses
1308 #---------------------------------------------------------------------
1309
1310 echo checking for curses/ncurses header files
1311 CURSESINCLUDES=nope
1312 USE_NCURSES=0
1313 dirs="../ncurses/include /usr/include /usr/include/ncurses /opt/ncurses/include /usr/local/include /usr/local/include/ncurses"
1314 for i in $dirs ; do
1315     if test -r $i/ncurses.h; then
1316         echo $ac_n "checking ncurses headers""... $ac_c" 1>&6
1317 echo "configure:1318: checking ncurses headers" >&5
1318         tk_oldCFlags=$CFLAGS
1319         CFLAGS="$CFLAGS -I$i"
1320         cat > conftest.$ac_ext <<EOF
1321 #line 1322 "configure"
1322 #include "confdefs.h"
1323 #include <ncurses.h>
1324 int main() {
1325 int c; initscr(); c = ACS_ULCORNER; curs_set(1);
1326 ; return 0; }
1327 EOF
1328 if { (eval echo configure:1329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1329   rm -rf conftest*
1330   echo "$ac_t""yes" 1>&6
1331             CURSESINCLUDES="-I$i"
1332 else
1333   echo "configure: failed program was:" >&5
1334   cat conftest.$ac_ext >&5
1335   rm -rf conftest*
1336   echo "$ac_t""no" 1>&6
1337 fi
1338 rm -f conftest*
1339         CFLAGS=$tk_oldCFlags
1340         if test "$CURSESINCLUDES" != nope; then
1341             USE_NCURSES=1
1342             break
1343         fi
1344     fi
1345     if test -r $i/curses.h; then
1346         echo $ac_n "checking curses headers""... $ac_c" 1>&6
1347 echo "configure:1348: checking curses headers" >&5
1348         tk_oldCFlags=$CFLAGS
1349         CFLAGS="$CFLAGS -I$i"
1350         cat > conftest.$ac_ext <<EOF
1351 #line 1352 "configure"
1352 #include "confdefs.h"
1353 #include <curses.h>
1354 int main() {
1355 int c; initscr(); c = ACS_ULCORNER; curs_set(1);
1356 ; return 0; }
1357 EOF
1358 if { (eval echo configure:1359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1359   rm -rf conftest*
1360   echo "$ac_t""yes" 1>&6
1361             CURSESINCLUDES="-I$i"
1362 else
1363   echo "configure: failed program was:" >&5
1364   cat conftest.$ac_ext >&5
1365   rm -rf conftest*
1366   echo "$ac_t""no" 1>&6
1367 fi
1368 rm -f conftest*
1369         CFLAGS=$tk_oldCFlags
1370         if test "$CURSESINCLUDES" != nope; then
1371             break
1372         fi
1373     fi
1374 done
1375 if test "$CURSESINCLUDES" = nope; then
1376     echo "Warning:  couldn't find any curses header file."
1377     CURSESINCLUDES="# no header file found"
1378 else
1379     if test $USE_NCURSES = 1 ; then
1380         echo "using ncurses.h from $CURSESINCLUDES"
1381     else
1382         echo "using curses.h from $CURSESINCLUDES"
1383     fi
1384 fi
1385
1386 echo checking for curses/ncurses library files
1387 CURSESLIBSW=nope
1388 dirs="../ncurses/lib /usr/lib /usr/lib/ncurses /opt/ncurses/lib /usr/local/lib /usr/local/ncurses/lib"
1389 for i in $dirs ; do
1390   if test $USE_NCURSES = 0 ; then
1391     if test -r $i/libcurses.a || test -r $i/libcurses$SHLIB_SUFFIX ; then
1392         echo $ac_n "checking curses library""... $ac_c" 1>&6
1393 echo "configure:1394: checking curses library" >&5
1394         tk_oldCFlags=$CFLAGS
1395         CFLAGS="$CFLAGS $CURSESINCLUDES"
1396         if test "$i" = "/usr/lib" ; then
1397             LIBSW="-lcurses -ltermcap"
1398         else
1399             LIBSW="-L$i -lcurses -ltermcap"
1400         fi
1401         tk_oldLibs=$LIBS
1402         LIBS="$LIBSW"
1403         cat > conftest.$ac_ext <<EOF
1404 #line 1405 "configure"
1405 #include "confdefs.h"
1406 #include <curses.h>
1407 int main() {
1408 int c; initscr(); c = ACS_ULCORNER; curs_set(1);
1409 ; return 0; }
1410 EOF
1411 if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1412   rm -rf conftest*
1413   echo "$ac_t""yes" 1>&6
1414              CURSESLIBSW="$LIBSW"
1415 else
1416   echo "configure: failed program was:" >&5
1417   cat conftest.$ac_ext >&5
1418   rm -rf conftest*
1419   echo "$ac_t""no" 1>&6
1420 fi
1421 rm -f conftest*
1422         CFLAGS=$tk_oldCFlags
1423         LIBS=$tk_oldLibs
1424         if test "$CURSESLIBSW" != nope; then
1425             break
1426         fi
1427     fi
1428   else
1429     if test -r $i/libncurses.a || test -r $i/libncurses$SHLIB_SUFFIX ; then
1430         echo $ac_n "checking ncurses library""... $ac_c" 1>&6
1431 echo "configure:1432: checking ncurses library" >&5
1432         tk_oldCFlags=$CFLAGS
1433         CFLAGS="$CFLAGS $CURSESINCLUDES"
1434         if test "$i" = "/usr/lib" ; then
1435             LIBSW="-lncurses"
1436         else
1437             LIBSW="-L$i -lncurses"
1438         fi
1439         tk_oldLibs=$LIBS
1440         LIBS="$LIBSW"
1441         cat > conftest.$ac_ext <<EOF
1442 #line 1443 "configure"
1443 #include "confdefs.h"
1444 #include <ncurses.h>
1445 int main() {
1446 int c; initscr(); c = ACS_ULCORNER; curs_set(1);
1447 ; return 0; }
1448 EOF
1449 if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1450   rm -rf conftest*
1451   echo "$ac_t""yes" 1>&6
1452              CURSESLIBSW="$LIBSW"
1453 else
1454   echo "configure: failed program was:" >&5
1455   cat conftest.$ac_ext >&5
1456   rm -rf conftest*
1457   echo "$ac_t""no" 1>&6
1458 fi
1459 rm -f conftest*
1460         CFLAGS=$tk_oldCFlags
1461         LIBS=$tk_oldLibs
1462         if test "$CURSESLIBSW" != nope; then
1463             break
1464         fi
1465     fi
1466   fi
1467 done
1468
1469 if test "$CURSESLIBSW" = nope ; then
1470     echo "Warning:  couldn't find the curses library archive.  Using -lcurses."
1471     CURSESLIBSW="-lcurses -ltermcap"
1472 else
1473     echo "using curses library: $CURSESLIBSW"
1474     echo $ac_n "checking curses scr_dump function""... $ac_c" 1>&6
1475 echo "configure:1476: checking curses scr_dump function" >&5
1476     tk_oldCFlags=$CFLAGS
1477     CFLAGS="$CFLAGS $CURSESINCLUDES"
1478     tk_oldLibs=$LIBS
1479     LIBS="$CURSESLIBSW"
1480     if test $USE_NCURSES = 1 ; then
1481         cat > conftest.$ac_ext <<EOF
1482 #line 1483 "configure"
1483 #include "confdefs.h"
1484 #include <ncurses.h>
1485 int main() {
1486 int c; initscr(); scr_dump("xx");
1487 ; return 0; }
1488 EOF
1489 if { (eval echo configure:1490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1490   rm -rf conftest*
1491   echo "$ac_t""yes" 1>&6
1492            cat >> confdefs.h <<\EOF
1493 #define HAVE_SCR_DUMP 1
1494 EOF
1495
1496 else
1497   echo "configure: failed program was:" >&5
1498   cat conftest.$ac_ext >&5
1499   rm -rf conftest*
1500   echo "$ac_t""no" 1>&6
1501 fi
1502 rm -f conftest*
1503     else
1504         cat > conftest.$ac_ext <<EOF
1505 #line 1506 "configure"
1506 #include "confdefs.h"
1507 #include <curses.h>
1508 int main() {
1509 int c; initscr(); scr_dump("xx");
1510 ; return 0; }
1511 EOF
1512 if { (eval echo configure:1513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1513   rm -rf conftest*
1514   echo "$ac_t""yes" 1>&6
1515            cat >> confdefs.h <<\EOF
1516 #define HAVE_SCR_DUMP 1
1517 EOF
1518
1519 else
1520   echo "configure: failed program was:" >&5
1521   cat conftest.$ac_ext >&5
1522   rm -rf conftest*
1523   echo "$ac_t""no" 1>&6
1524 fi
1525 rm -f conftest*
1526     fi
1527     CFLAGS=$tk_oldCFlags
1528     LIBS=$tk_oldLibs
1529 fi
1530
1531 if test $USE_NCURSES = 1 ; then
1532     USE_NCURSES="-DUSE_NCURSES"
1533 else
1534     USE_NCURSES=""
1535 fi
1536
1537 #---------------------------------------------------------------------
1538 #       Check for GPM (General Purpose Mouse)
1539 #---------------------------------------------------------------------
1540
1541 echo $ac_n "checking GPM library""... $ac_c" 1>&6
1542 echo "configure:1543: checking GPM library" >&5
1543 tk_oldLibs=$LIBS
1544 LIBS="-lgpm"
1545 cat > conftest.$ac_ext <<EOF
1546 #line 1547 "configure"
1547 #include "confdefs.h"
1548 #include <gpm.h>
1549 int main() {
1550 Gpm_Connect conn; Gpm_Open(&conn, 0);
1551 ; return 0; }
1552 EOF
1553 if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1554   rm -rf conftest*
1555   echo "$ac_t""yes" 1>&6
1556      cat >> confdefs.h <<\EOF
1557 #define HAVE_GPM 1
1558 EOF
1559
1560      CURSESLIBSW="$CURSESLIBSW -lgpm"
1561 else
1562   echo "configure: failed program was:" >&5
1563   cat conftest.$ac_ext >&5
1564   rm -rf conftest*
1565   echo "$ac_t""no" 1>&6
1566 fi
1567 rm -f conftest*
1568 LIBS=$tk_oldLibs
1569
1570 #--------------------------------------------------------------------
1571 #       Check for the existence of various libraries.  The order here
1572 #       is important, so that then end up in the right order in the
1573 #       command line generated by make.  The -lsocket and -lnsl libraries
1574 #       require a couple of special tricks:
1575 #       1. Use "connect" and "accept" to check for -lsocket, and
1576 #          "gethostbyname" to check for -lnsl.
1577 #       2. Use each function name only once:  can't redo a check because
1578 #          autoconf caches the results of the last check and won't redo it.
1579 #       3. Use -lnsl and -lsocket only if they supply procedures that
1580 #          aren't already present in the normal libraries.  This is because
1581 #          IRIX 5.2 has libraries, but they aren't needed and they're
1582 #          bogus:  they goof up name resolution if used.
1583 #       4. On some SVR4 systems, can't use -lsocket without -lnsl too.
1584 #          To get around this problem, check for both libraries together
1585 #          if -lsocket doesn't work by itself.
1586 #--------------------------------------------------------------------
1587
1588 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
1589 echo "configure:1590: checking for main in -lXbsd" >&5
1590 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
1591 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1592   echo $ac_n "(cached) $ac_c" 1>&6
1593 else
1594   ac_save_LIBS="$LIBS"
1595 LIBS="-lXbsd  $LIBS"
1596 cat > conftest.$ac_ext <<EOF
1597 #line 1598 "configure"
1598 #include "confdefs.h"
1599
1600 int main() {
1601 main()
1602 ; return 0; }
1603 EOF
1604 if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1605   rm -rf conftest*
1606   eval "ac_cv_lib_$ac_lib_var=yes"
1607 else
1608   echo "configure: failed program was:" >&5
1609   cat conftest.$ac_ext >&5
1610   rm -rf conftest*
1611   eval "ac_cv_lib_$ac_lib_var=no"
1612 fi
1613 rm -f conftest*
1614 LIBS="$ac_save_LIBS"
1615
1616 fi
1617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1618   echo "$ac_t""yes" 1>&6
1619   LIBS="$LIBS -lXbsd"
1620 else
1621   echo "$ac_t""no" 1>&6
1622 fi
1623
1624
1625 tk_checkBoth=0
1626 echo $ac_n "checking for connect""... $ac_c" 1>&6
1627 echo "configure:1628: checking for connect" >&5
1628 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
1629   echo $ac_n "(cached) $ac_c" 1>&6
1630 else
1631   cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 /* System header to define __stub macros and hopefully few prototypes,
1635     which can conflict with char connect(); below.  */
1636 #include <assert.h>
1637 /* Override any gcc2 internal prototype to avoid an error.  */
1638 /* We use char because int might match the return type of a gcc2
1639     builtin and then its argument prototype would still apply.  */
1640 char connect();
1641
1642 int main() {
1643
1644 /* The GNU C library defines this for functions which it implements
1645     to always fail with ENOSYS.  Some functions are actually named
1646     something starting with __ and the normal name is an alias.  */
1647 #if defined (__stub_connect) || defined (__stub___connect)
1648 choke me
1649 #else
1650 connect();
1651 #endif
1652
1653 ; return 0; }
1654 EOF
1655 if { (eval echo configure:1656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1656   rm -rf conftest*
1657   eval "ac_cv_func_connect=yes"
1658 else
1659   echo "configure: failed program was:" >&5
1660   cat conftest.$ac_ext >&5
1661   rm -rf conftest*
1662   eval "ac_cv_func_connect=no"
1663 fi
1664 rm -f conftest*
1665 fi
1666
1667 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
1668   echo "$ac_t""yes" 1>&6
1669   tk_checkSocket=0
1670 else
1671   echo "$ac_t""no" 1>&6
1672 tk_checkSocket=1
1673 fi
1674
1675 if test "$tk_checkSocket" = 1; then
1676     echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
1677 echo "configure:1678: checking for main in -lsocket" >&5
1678 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
1679 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1680   echo $ac_n "(cached) $ac_c" 1>&6
1681 else
1682   ac_save_LIBS="$LIBS"
1683 LIBS="-lsocket  $LIBS"
1684 cat > conftest.$ac_ext <<EOF
1685 #line 1686 "configure"
1686 #include "confdefs.h"
1687
1688 int main() {
1689 main()
1690 ; return 0; }
1691 EOF
1692 if { (eval echo configure:1693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1693   rm -rf conftest*
1694   eval "ac_cv_lib_$ac_lib_var=yes"
1695 else
1696   echo "configure: failed program was:" >&5
1697   cat conftest.$ac_ext >&5
1698   rm -rf conftest*
1699   eval "ac_cv_lib_$ac_lib_var=no"
1700 fi
1701 rm -f conftest*
1702 LIBS="$ac_save_LIBS"
1703
1704 fi
1705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1706   echo "$ac_t""yes" 1>&6
1707   LIBS="$LIBS -lsocket"
1708 else
1709   echo "$ac_t""no" 1>&6
1710 tk_checkBoth=1
1711 fi
1712
1713 fi
1714 if test "$tk_checkBoth" = 1; then
1715     tk_oldLibs=$LIBS
1716     LIBS="$LIBS -lsocket -lnsl"
1717     echo $ac_n "checking for accept""... $ac_c" 1>&6
1718 echo "configure:1719: checking for accept" >&5
1719 if eval "test \"`echo '$''{'ac_cv_func_accept'+set}'`\" = set"; then
1720   echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722   cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725 /* System header to define __stub macros and hopefully few prototypes,
1726     which can conflict with char accept(); below.  */
1727 #include <assert.h>
1728 /* Override any gcc2 internal prototype to avoid an error.  */
1729 /* We use char because int might match the return type of a gcc2
1730     builtin and then its argument prototype would still apply.  */
1731 char accept();
1732
1733 int main() {
1734
1735 /* The GNU C library defines this for functions which it implements
1736     to always fail with ENOSYS.  Some functions are actually named
1737     something starting with __ and the normal name is an alias.  */
1738 #if defined (__stub_accept) || defined (__stub___accept)
1739 choke me
1740 #else
1741 accept();
1742 #endif
1743
1744 ; return 0; }
1745 EOF
1746 if { (eval echo configure:1747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1747   rm -rf conftest*
1748   eval "ac_cv_func_accept=yes"
1749 else
1750   echo "configure: failed program was:" >&5
1751   cat conftest.$ac_ext >&5
1752   rm -rf conftest*
1753   eval "ac_cv_func_accept=no"
1754 fi
1755 rm -f conftest*
1756 fi
1757
1758 if eval "test \"`echo '$ac_cv_func_'accept`\" = yes"; then
1759   echo "$ac_t""yes" 1>&6
1760   tk_checkNsl=0
1761 else
1762   echo "$ac_t""no" 1>&6
1763 LIBS=$tk_oldLibs
1764 fi
1765
1766 fi
1767 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
1768 echo "configure:1769: checking for gethostbyname" >&5
1769 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
1770   echo $ac_n "(cached) $ac_c" 1>&6
1771 else
1772   cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775 /* System header to define __stub macros and hopefully few prototypes,
1776     which can conflict with char gethostbyname(); below.  */
1777 #include <assert.h>
1778 /* Override any gcc2 internal prototype to avoid an error.  */
1779 /* We use char because int might match the return type of a gcc2
1780     builtin and then its argument prototype would still apply.  */
1781 char gethostbyname();
1782
1783 int main() {
1784
1785 /* The GNU C library defines this for functions which it implements
1786     to always fail with ENOSYS.  Some functions are actually named
1787     something starting with __ and the normal name is an alias.  */
1788 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
1789 choke me
1790 #else
1791 gethostbyname();
1792 #endif
1793
1794 ; return 0; }
1795 EOF
1796 if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1797   rm -rf conftest*
1798   eval "ac_cv_func_gethostbyname=yes"
1799 else
1800   echo "configure: failed program was:" >&5
1801   cat conftest.$ac_ext >&5
1802   rm -rf conftest*
1803   eval "ac_cv_func_gethostbyname=no"
1804 fi
1805 rm -f conftest*
1806 fi
1807
1808 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
1809   echo "$ac_t""yes" 1>&6
1810   :
1811 else
1812   echo "$ac_t""no" 1>&6
1813 echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
1814 echo "configure:1815: checking for main in -lnsl" >&5
1815 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
1816 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1817   echo $ac_n "(cached) $ac_c" 1>&6
1818 else
1819   ac_save_LIBS="$LIBS"
1820 LIBS="-lnsl  $LIBS"
1821 cat > conftest.$ac_ext <<EOF
1822 #line 1823 "configure"
1823 #include "confdefs.h"
1824
1825 int main() {
1826 main()
1827 ; return 0; }
1828 EOF
1829 if { (eval echo configure:1830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1830   rm -rf conftest*
1831   eval "ac_cv_lib_$ac_lib_var=yes"
1832 else
1833   echo "configure: failed program was:" >&5
1834   cat conftest.$ac_ext >&5
1835   rm -rf conftest*
1836   eval "ac_cv_lib_$ac_lib_var=no"
1837 fi
1838 rm -f conftest*
1839 LIBS="$ac_save_LIBS"
1840
1841 fi
1842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1843   echo "$ac_t""yes" 1>&6
1844   LIBS="$LIBS -lnsl"
1845 else
1846   echo "$ac_t""no" 1>&6
1847 fi
1848
1849 fi
1850
1851
1852 #--------------------------------------------------------------------
1853 #       On Interactive the str(n)casecmp is burried in libinet.a
1854 #--------------------------------------------------------------------
1855
1856 echo $ac_n "checking for strncasecmp""... $ac_c" 1>&6
1857 echo "configure:1858: checking for strncasecmp" >&5
1858 if eval "test \"`echo '$''{'ac_cv_func_strncasecmp'+set}'`\" = set"; then
1859   echo $ac_n "(cached) $ac_c" 1>&6
1860 else
1861   cat > conftest.$ac_ext <<EOF
1862 #line 1863 "configure"
1863 #include "confdefs.h"
1864 /* System header to define __stub macros and hopefully few prototypes,
1865     which can conflict with char strncasecmp(); below.  */
1866 #include <assert.h>
1867 /* Override any gcc2 internal prototype to avoid an error.  */
1868 /* We use char because int might match the return type of a gcc2
1869     builtin and then its argument prototype would still apply.  */
1870 char strncasecmp();
1871
1872 int main() {
1873
1874 /* The GNU C library defines this for functions which it implements
1875     to always fail with ENOSYS.  Some functions are actually named
1876     something starting with __ and the normal name is an alias.  */
1877 #if defined (__stub_strncasecmp) || defined (__stub___strncasecmp)
1878 choke me
1879 #else
1880 strncasecmp();
1881 #endif
1882
1883 ; return 0; }
1884 EOF
1885 if { (eval echo configure:1886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1886   rm -rf conftest*
1887   eval "ac_cv_func_strncasecmp=yes"
1888 else
1889   echo "configure: failed program was:" >&5
1890   cat conftest.$ac_ext >&5
1891   rm -rf conftest*
1892   eval "ac_cv_func_strncasecmp=no"
1893 fi
1894 rm -f conftest*
1895 fi
1896
1897 if eval "test \"`echo '$ac_cv_func_'strncasecmp`\" = yes"; then
1898   echo "$ac_t""yes" 1>&6
1899   :
1900 else
1901   echo "$ac_t""no" 1>&6
1902 echo $ac_n "checking for main in -linet""... $ac_c" 1>&6
1903 echo "configure:1904: checking for main in -linet" >&5
1904 ac_lib_var=`echo inet'_'main | sed 'y%./+-%__p_%'`
1905 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1906   echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908   ac_save_LIBS="$LIBS"
1909 LIBS="-linet  $LIBS"
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913
1914 int main() {
1915 main()
1916 ; return 0; }
1917 EOF
1918 if { (eval echo configure:1919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1919   rm -rf conftest*
1920   eval "ac_cv_lib_$ac_lib_var=yes"
1921 else
1922   echo "configure: failed program was:" >&5
1923   cat conftest.$ac_ext >&5
1924   rm -rf conftest*
1925   eval "ac_cv_lib_$ac_lib_var=no"
1926 fi
1927 rm -f conftest*
1928 LIBS="$ac_save_LIBS"
1929
1930 fi
1931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1932   echo "$ac_t""yes" 1>&6
1933   LIBS="$LIBS -linet"
1934 else
1935   echo "$ac_t""no" 1>&6
1936 fi
1937
1938 fi
1939
1940
1941 #--------------------------------------------------------------------
1942 #       Figure out how to find out whether a FILE structure contains
1943 #       buffered readable data.  Some known names for the count field:
1944 #               _cnt:           Most UNIX systems
1945 #               __cnt:          HPUX
1946 #               _r:             BSD
1947 #               readCount:      Sprite
1948 #       Or, in GNU libc there are two fields, _gptr and _egptr, which
1949 #       have to be compared.
1950 #--------------------------------------------------------------------
1951
1952 echo $ac_n "checking count field in FILE structures""... $ac_c" 1>&6
1953 echo "configure:1954: checking count field in FILE structures" >&5
1954 cat > conftest.$ac_ext <<EOF
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957 #include <stdio.h>
1958 int main() {
1959 FILE *f = stdin; f->_cnt = 0;
1960 ; return 0; }
1961 EOF
1962 if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963   rm -rf conftest*
1964   fcnt="_cnt"
1965 else
1966   echo "configure: failed program was:" >&5
1967   cat conftest.$ac_ext >&5
1968 fi
1969 rm -f conftest*
1970 if test "$fcnt" = ""; then
1971     cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <stdio.h>
1975 int main() {
1976 FILE *f = stdin; f->__cnt = 0;
1977 ; return 0; }
1978 EOF
1979 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1980   rm -rf conftest*
1981   fcnt="__cnt"
1982 else
1983   echo "configure: failed program was:" >&5
1984   cat conftest.$ac_ext >&5
1985 fi
1986 rm -f conftest*
1987 fi
1988 if test "$fcnt" = ""; then
1989     cat > conftest.$ac_ext <<EOF
1990 #line 1991 "configure"
1991 #include "confdefs.h"
1992 #include <stdio.h>
1993 int main() {
1994 FILE *f = stdin; f->_r = 0;
1995 ; return 0; }
1996 EOF
1997 if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1998   rm -rf conftest*
1999   fcnt="_r"
2000 else
2001   echo "configure: failed program was:" >&5
2002   cat conftest.$ac_ext >&5
2003 fi
2004 rm -f conftest*
2005 fi
2006 if test "$fcnt" = ""; then
2007     cat > conftest.$ac_ext <<EOF
2008 #line 2009 "configure"
2009 #include "confdefs.h"
2010 #include <stdio.h>
2011 int main() {
2012 FILE *f = stdin; f->readCount = 0;
2013 ; return 0; }
2014 EOF
2015 if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2016   rm -rf conftest*
2017   fcnt="readCount"
2018 else
2019   echo "configure: failed program was:" >&5
2020   cat conftest.$ac_ext >&5
2021 fi
2022 rm -f conftest*
2023 fi
2024 if test "$fcnt" != ""; then
2025     cat >> confdefs.h <<EOF
2026 #define TK_FILE_COUNT $fcnt
2027 EOF
2028
2029 fi
2030 if test "$fcnt" = ""; then
2031     cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <stdio.h>
2035 int main() {
2036 FILE *f = stdin; f->_gptr = f->_egptr;
2037 ; return 0; }
2038 EOF
2039 if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2040   rm -rf conftest*
2041   tk_ok=yes
2042 else
2043   echo "configure: failed program was:" >&5
2044   cat conftest.$ac_ext >&5
2045   rm -rf conftest*
2046   tk_ok=no
2047 fi
2048 rm -f conftest*
2049     if test $tk_ok = yes; then
2050         cat >> confdefs.h <<\EOF
2051 #define TK_FILE_GPTR 1
2052 EOF
2053
2054         fcnt="_gptr/_egptr"
2055     fi
2056 fi
2057 if test "$fcnt" = ""; then
2058     cat > conftest.$ac_ext <<EOF
2059 #line 2060 "configure"
2060 #include "confdefs.h"
2061 #include <stdio.h>
2062 int main() {
2063 FILE *f = stdin; f->_IO_read_ptr = f->_IO_read_end;
2064 ; return 0; }
2065 EOF
2066 if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2067   rm -rf conftest*
2068   tk_ok=yes
2069 else
2070   echo "configure: failed program was:" >&5
2071   cat conftest.$ac_ext >&5
2072   rm -rf conftest*
2073   tk_ok=no
2074 fi
2075 rm -f conftest*
2076     if test $tk_ok = yes; then
2077         cat >> confdefs.h <<\EOF
2078 #define TK_FILE_READ_PTR 1
2079 EOF
2080
2081         fcnt="_IO_read_ptr/_IO_read_end"
2082     fi
2083 fi
2084 if test "$fcnt" = ""; then
2085     echo "$ac_t""not found; must supply TkReadDataPending procedure" 1>&6
2086 else
2087     echo "$ac_t"""$fcnt"" 1>&6
2088 fi
2089
2090 #--------------------------------------------------------------------
2091 #       On a few very rare systems, all of the libm.a stuff is
2092 #       already in libc.a.  Set compiler flags accordingly.
2093 #       Also, Linux requires the "ieee" library for math to
2094 #       work right (and it must appear before "-lm").
2095 #--------------------------------------------------------------------
2096
2097 MATH_LIBS=""
2098 echo $ac_n "checking for sin""... $ac_c" 1>&6
2099 echo "configure:2100: checking for sin" >&5
2100 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
2101   echo $ac_n "(cached) $ac_c" 1>&6
2102 else
2103   cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2106 /* System header to define __stub macros and hopefully few prototypes,
2107     which can conflict with char sin(); below.  */
2108 #include <assert.h>
2109 /* Override any gcc2 internal prototype to avoid an error.  */
2110 /* We use char because int might match the return type of a gcc2
2111     builtin and then its argument prototype would still apply.  */
2112 char sin();
2113
2114 int main() {
2115
2116 /* The GNU C library defines this for functions which it implements
2117     to always fail with ENOSYS.  Some functions are actually named
2118     something starting with __ and the normal name is an alias.  */
2119 #if defined (__stub_sin) || defined (__stub___sin)
2120 choke me
2121 #else
2122 sin();
2123 #endif
2124
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128   rm -rf conftest*
2129   eval "ac_cv_func_sin=yes"
2130 else
2131   echo "configure: failed program was:" >&5
2132   cat conftest.$ac_ext >&5
2133   rm -rf conftest*
2134   eval "ac_cv_func_sin=no"
2135 fi
2136 rm -f conftest*
2137 fi
2138
2139 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
2140   echo "$ac_t""yes" 1>&6
2141   :
2142 else
2143   echo "$ac_t""no" 1>&6
2144 MATH_LIBS="-lm"
2145 fi
2146
2147 echo $ac_n "checking for main in -lieee""... $ac_c" 1>&6
2148 echo "configure:2149: checking for main in -lieee" >&5
2149 ac_lib_var=`echo ieee'_'main | sed 'y%./+-%__p_%'`
2150 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2151   echo $ac_n "(cached) $ac_c" 1>&6
2152 else
2153   ac_save_LIBS="$LIBS"
2154 LIBS="-lieee  $LIBS"
2155 cat > conftest.$ac_ext <<EOF
2156 #line 2157 "configure"
2157 #include "confdefs.h"
2158
2159 int main() {
2160 main()
2161 ; return 0; }
2162 EOF
2163 if { (eval echo configure:2164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2164   rm -rf conftest*
2165   eval "ac_cv_lib_$ac_lib_var=yes"
2166 else
2167   echo "configure: failed program was:" >&5
2168   cat conftest.$ac_ext >&5
2169   rm -rf conftest*
2170   eval "ac_cv_lib_$ac_lib_var=no"
2171 fi
2172 rm -f conftest*
2173 LIBS="$ac_save_LIBS"
2174
2175 fi
2176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2177   echo "$ac_t""yes" 1>&6
2178   MATH_LIBS="-lieee $MATH_LIBS"
2179 else
2180   echo "$ac_t""no" 1>&6
2181 fi
2182
2183
2184 #--------------------------------------------------------------------
2185 #       If this system doesn't have a memmove procedure, use memcpy
2186 #       instead.
2187 #--------------------------------------------------------------------
2188
2189 echo $ac_n "checking for memmove""... $ac_c" 1>&6
2190 echo "configure:2191: checking for memmove" >&5
2191 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
2192   echo $ac_n "(cached) $ac_c" 1>&6
2193 else
2194   cat > conftest.$ac_ext <<EOF
2195 #line 2196 "configure"
2196 #include "confdefs.h"
2197 /* System header to define __stub macros and hopefully few prototypes,
2198     which can conflict with char memmove(); below.  */
2199 #include <assert.h>
2200 /* Override any gcc2 internal prototype to avoid an error.  */
2201 /* We use char because int might match the return type of a gcc2
2202     builtin and then its argument prototype would still apply.  */
2203 char memmove();
2204
2205 int main() {
2206
2207 /* The GNU C library defines this for functions which it implements
2208     to always fail with ENOSYS.  Some functions are actually named
2209     something starting with __ and the normal name is an alias.  */
2210 #if defined (__stub_memmove) || defined (__stub___memmove)
2211 choke me
2212 #else
2213 memmove();
2214 #endif
2215
2216 ; return 0; }
2217 EOF
2218 if { (eval echo configure:2219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2219   rm -rf conftest*
2220   eval "ac_cv_func_memmove=yes"
2221 else
2222   echo "configure: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   rm -rf conftest*
2225   eval "ac_cv_func_memmove=no"
2226 fi
2227 rm -f conftest*
2228 fi
2229
2230 if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
2231   echo "$ac_t""yes" 1>&6
2232   :
2233 else
2234   echo "$ac_t""no" 1>&6
2235 cat >> confdefs.h <<\EOF
2236 #define memmove memcpy
2237 EOF
2238
2239 fi
2240
2241
2242 #--------------------------------------------------------------------
2243 #       SGI systems don't use the BSD form of the gettimeofday function,
2244 #       but they have a BSDgettimeofday function that can be used instead.
2245 #
2246 #       Also, check for the existence of a gettimeofday declaration,
2247 #       to tkPort.h can declare it if it isn't already declared.
2248 #--------------------------------------------------------------------
2249
2250 echo $ac_n "checking for BSDgettimeofday""... $ac_c" 1>&6
2251 echo "configure:2252: checking for BSDgettimeofday" >&5
2252 if eval "test \"`echo '$''{'ac_cv_func_BSDgettimeofday'+set}'`\" = set"; then
2253   echo $ac_n "(cached) $ac_c" 1>&6
2254 else
2255   cat > conftest.$ac_ext <<EOF
2256 #line 2257 "configure"
2257 #include "confdefs.h"
2258 /* System header to define __stub macros and hopefully few prototypes,
2259     which can conflict with char BSDgettimeofday(); below.  */
2260 #include <assert.h>
2261 /* Override any gcc2 internal prototype to avoid an error.  */
2262 /* We use char because int might match the return type of a gcc2
2263     builtin and then its argument prototype would still apply.  */
2264 char BSDgettimeofday();
2265
2266 int main() {
2267
2268 /* The GNU C library defines this for functions which it implements
2269     to always fail with ENOSYS.  Some functions are actually named
2270     something starting with __ and the normal name is an alias.  */
2271 #if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
2272 choke me
2273 #else
2274 BSDgettimeofday();
2275 #endif
2276
2277 ; return 0; }
2278 EOF
2279 if { (eval echo configure:2280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2280   rm -rf conftest*
2281   eval "ac_cv_func_BSDgettimeofday=yes"
2282 else
2283   echo "configure: failed program was:" >&5
2284   cat conftest.$ac_ext >&5
2285   rm -rf conftest*
2286   eval "ac_cv_func_BSDgettimeofday=no"
2287 fi
2288 rm -f conftest*
2289 fi
2290
2291 if eval "test \"`echo '$ac_cv_func_'BSDgettimeofday`\" = yes"; then
2292   echo "$ac_t""yes" 1>&6
2293   cat >> confdefs.h <<\EOF
2294 #define HAVE_BSDGETTIMEOFDAY 1
2295 EOF
2296
2297 else
2298   echo "$ac_t""no" 1>&6
2299 fi
2300
2301 echo $ac_n "checking for gettimeofday declaration""... $ac_c" 1>&6
2302 echo "configure:2303: checking for gettimeofday declaration" >&5
2303 cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #include <sys/time.h>
2307 EOF
2308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2309   egrep "gettimeofday" >/dev/null 2>&1; then
2310   rm -rf conftest*
2311   echo "$ac_t""present" 1>&6
2312 else
2313   rm -rf conftest*
2314   
2315     echo "$ac_t""missing" 1>&6
2316     cat >> confdefs.h <<\EOF
2317 #define GETTOD_NOT_DECLARED 1
2318 EOF
2319
2320
2321 fi
2322 rm -f conftest*
2323
2324
2325 #--------------------------------------------------------------------
2326 #       Under Solaris 2.4, strtod returns the wrong value for the
2327 #       terminating character under some conditions.  Check for this
2328 #       and if the problem exists use a substitute procedure
2329 #       "fixstrtod" (provided by Tcl) that corrects the error.
2330 #--------------------------------------------------------------------
2331
2332 echo $ac_n "checking for strtod""... $ac_c" 1>&6
2333 echo "configure:2334: checking for strtod" >&5
2334 if eval "test \"`echo '$''{'ac_cv_func_strtod'+set}'`\" = set"; then
2335   echo $ac_n "(cached) $ac_c" 1>&6
2336 else
2337   cat > conftest.$ac_ext <<EOF
2338 #line 2339 "configure"
2339 #include "confdefs.h"
2340 /* System header to define __stub macros and hopefully few prototypes,
2341     which can conflict with char strtod(); below.  */
2342 #include <assert.h>
2343 /* Override any gcc2 internal prototype to avoid an error.  */
2344 /* We use char because int might match the return type of a gcc2
2345     builtin and then its argument prototype would still apply.  */
2346 char strtod();
2347
2348 int main() {
2349
2350 /* The GNU C library defines this for functions which it implements
2351     to always fail with ENOSYS.  Some functions are actually named
2352     something starting with __ and the normal name is an alias.  */
2353 #if defined (__stub_strtod) || defined (__stub___strtod)
2354 choke me
2355 #else
2356 strtod();
2357 #endif
2358
2359 ; return 0; }
2360 EOF
2361 if { (eval echo configure:2362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2362   rm -rf conftest*
2363   eval "ac_cv_func_strtod=yes"
2364 else
2365   echo "configure: failed program was:" >&5
2366   cat conftest.$ac_ext >&5
2367   rm -rf conftest*
2368   eval "ac_cv_func_strtod=no"
2369 fi
2370 rm -f conftest*
2371 fi
2372
2373 if eval "test \"`echo '$ac_cv_func_'strtod`\" = yes"; then
2374   echo "$ac_t""yes" 1>&6
2375   tk_strtod=1
2376 else
2377   echo "$ac_t""no" 1>&6
2378 tk_strtod=0
2379 fi
2380
2381 if test "$tk_strtod" = 1; then
2382     echo $ac_n "checking for Solaris 2.4 strtod bug""... $ac_c" 1>&6
2383 echo "configure:2384: checking for Solaris 2.4 strtod bug" >&5
2384     if test "$cross_compiling" = yes; then
2385   tk_ok=0
2386 else
2387   cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390
2391         extern double strtod();
2392         int main()
2393         {
2394             char *string = "NaN";
2395             char *term;
2396             strtod(string, &term);
2397             if ((term != string) && (term[-1] == 0)) {
2398                 exit(1);
2399             }
2400             exit(0);
2401         }
2402 EOF
2403 if { (eval echo configure:2404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2404 then
2405   tk_ok=1
2406 else
2407   echo "configure: failed program was:" >&5
2408   cat conftest.$ac_ext >&5
2409   rm -fr conftest*
2410   tk_ok=0
2411 fi
2412 rm -fr conftest*
2413 fi
2414
2415     if test "$tk_ok" = 1; then
2416         echo "$ac_t""ok" 1>&6
2417     else
2418         echo "$ac_t""buggy" 1>&6
2419         cat >> confdefs.h <<\EOF
2420 #define strtod fixstrtod
2421 EOF
2422
2423     fi
2424 fi
2425
2426 #--------------------------------------------------------------------
2427 #       The statements below define a collection of symbols related to
2428 #       building libck as a shared library instead of a static library.
2429 #--------------------------------------------------------------------
2430
2431 # Check whether --enable-shared or --disable-shared was given.
2432 if test "${enable_shared+set}" = set; then
2433   enableval="$enable_shared"
2434   ok=$enableval
2435 else
2436   ok=no
2437 fi
2438
2439 if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
2440     CK_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
2441     eval "CK_LIB_FILE=libck${TCL_SHARED_LIB_SUFFIX}"
2442     MAKE_LIB="\${SHLIB_LD} -o ${CK_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
2443     RANLIB=":"
2444 else
2445     CK_SHLIB_CFLAGS=""
2446     eval "CK_LIB_FILE=libck${TCL_UNSHARED_LIB_SUFFIX}"
2447     # Fixup if suffix missing
2448     if test "$CK_LIB_FILE" = "libck" ; then
2449         CK_LIB_FILE=libck.a
2450     fi
2451     MAKE_LIB="ar cr ${CK_LIB_FILE} \${OBJS}"
2452 fi
2453
2454 # Note:  in the following variable, it's important to use the absolute
2455 # path name of the Tcl directory rather than "..":  this is because
2456 # AIX remembers this path and will attempt to use it at run-time to look
2457 # up the Tcl library.
2458
2459 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
2460     CK_BUILD_LIB_SPEC="-L`pwd` -lck${VERSION}"
2461     CK_LIB_SPEC="-L${exec_prefix}/lib -lck${VERSION}"
2462 else
2463     CK_BUILD_LIB_SPEC="-L`pwd` -lck`echo ${VERSION} | tr -d .`"
2464     CK_LIB_SPEC="-L${exec_prefix}/lib -lck`echo ${VERSION} | tr -d .`"
2465 fi
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496 trap '' 1 2 15
2497 cat > confcache <<\EOF
2498 # This file is a shell script that caches the results of configure
2499 # tests run on this system so they can be shared between configure
2500 # scripts and configure runs.  It is not useful on other systems.
2501 # If it contains results you don't want to keep, you may remove or edit it.
2502 #
2503 # By default, configure uses ./config.cache as the cache file,
2504 # creating it if it does not exist already.  You can give configure
2505 # the --cache-file=FILE option to use a different cache file; that is
2506 # what configure does when it calls configure scripts in
2507 # subdirectories, so they share the cache.
2508 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2509 # config.status only pays attention to the cache file if you give it the
2510 # --recheck option to rerun configure.
2511 #
2512 EOF
2513 # The following way of writing the cache mishandles newlines in values,
2514 # but we know of no workaround that is simple, portable, and efficient.
2515 # So, don't put newlines in cache variables' values.
2516 # Ultrix sh set writes to stderr and can't be redirected directly,
2517 # and sets the high bit in the cache file unless we assign to the vars.
2518 (set) 2>&1 |
2519   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2520   *ac_space=\ *)
2521     # `set' does not quote correctly, so add quotes (double-quote substitution
2522     # turns \\\\ into \\, and sed turns \\ into \).
2523     sed -n \
2524       -e "s/'/'\\\\''/g" \
2525       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2526     ;;
2527   *)
2528     # `set' quotes correctly as required by POSIX, so do not add quotes.
2529     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2530     ;;
2531   esac >> confcache
2532 if cmp -s $cache_file confcache; then
2533   :
2534 else
2535   if test -w $cache_file; then
2536     echo "updating cache $cache_file"
2537     cat confcache > $cache_file
2538   else
2539     echo "not updating unwritable cache $cache_file"
2540   fi
2541 fi
2542 rm -f confcache
2543
2544 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2545
2546 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2547 # Let make expand exec_prefix.
2548 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2549
2550 # Any assignment to VPATH causes Sun make to only execute
2551 # the first set of double-colon rules, so remove it if not needed.
2552 # If there is a colon in the path, we need to keep it.
2553 if test "x$srcdir" = x.; then
2554   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2555 fi
2556
2557 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2558
2559 # Transform confdefs.h into DEFS.
2560 # Protect against shell expansion while executing Makefile rules.
2561 # Protect against Makefile macro expansion.
2562 cat > conftest.defs <<\EOF
2563 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
2564 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
2565 s%\[%\\&%g
2566 s%\]%\\&%g
2567 s%\$%$$%g
2568 EOF
2569 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2570 rm -f conftest.defs
2571
2572
2573 # Without the "./", some shells look in PATH for config.status.
2574 : ${CONFIG_STATUS=./config.status}
2575
2576 echo creating $CONFIG_STATUS
2577 rm -f $CONFIG_STATUS
2578 cat > $CONFIG_STATUS <<EOF
2579 #! /bin/sh
2580 # Generated automatically by configure.
2581 # Run this file to recreate the current configuration.
2582 # This directory was configured as follows,
2583 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2584 #
2585 # $0 $ac_configure_args
2586 #
2587 # Compiler output produced by configure, useful for debugging
2588 # configure, is in ./config.log if it exists.
2589
2590 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2591 for ac_option
2592 do
2593   case "\$ac_option" in
2594   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2595     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2596     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2597   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2598     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2599     exit 0 ;;
2600   -help | --help | --hel | --he | --h)
2601     echo "\$ac_cs_usage"; exit 0 ;;
2602   *) echo "\$ac_cs_usage"; exit 1 ;;
2603   esac
2604 done
2605
2606 ac_given_srcdir=$srcdir
2607 ac_given_INSTALL="$INSTALL"
2608
2609 trap 'rm -fr `echo "Makefile ckConfig.sh pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2610 EOF
2611 cat >> $CONFIG_STATUS <<EOF
2612
2613 # Protect against being on the right side of a sed subst in config.status.
2614 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2615  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2616 $ac_vpsub
2617 $extrasub
2618 s%@SHELL@%$SHELL%g
2619 s%@CFLAGS@%$CFLAGS%g
2620 s%@CPPFLAGS@%$CPPFLAGS%g
2621 s%@CXXFLAGS@%$CXXFLAGS%g
2622 s%@FFLAGS@%$FFLAGS%g
2623 s%@DEFS@%$DEFS%g
2624 s%@LDFLAGS@%$LDFLAGS%g
2625 s%@LIBS@%$LIBS%g
2626 s%@exec_prefix@%$exec_prefix%g
2627 s%@prefix@%$prefix%g
2628 s%@program_transform_name@%$program_transform_name%g
2629 s%@bindir@%$bindir%g
2630 s%@sbindir@%$sbindir%g
2631 s%@libexecdir@%$libexecdir%g
2632 s%@datadir@%$datadir%g
2633 s%@sysconfdir@%$sysconfdir%g
2634 s%@sharedstatedir@%$sharedstatedir%g
2635 s%@localstatedir@%$localstatedir%g
2636 s%@libdir@%$libdir%g
2637 s%@includedir@%$includedir%g
2638 s%@oldincludedir@%$oldincludedir%g
2639 s%@infodir@%$infodir%g
2640 s%@mandir@%$mandir%g
2641 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2642 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2643 s%@INSTALL_DATA@%$INSTALL_DATA%g
2644 s%@RANLIB@%$RANLIB%g
2645 s%@CPP@%$CPP%g
2646 s%@CC@%$CC%g
2647 s%@DL_LIBS@%$DL_LIBS%g
2648 s%@LD_FLAGS@%$LD_FLAGS%g
2649 s%@MATH_LIBS@%$MATH_LIBS%g
2650 s%@MAKE_LIB@%$MAKE_LIB%g
2651 s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
2652 s%@SHLIB_LD@%$SHLIB_LD%g
2653 s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
2654 s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
2655 s%@SHLIB_VERSION@%$SHLIB_VERSION%g
2656 s%@TCL_DIR@%$TCL_DIR%g
2657 s%@TCL_BIN_DIR@%$TCL_BIN_DIR%g
2658 s%@TCL_LIB@%$TCL_LIB%g
2659 s%@TCL_INCLUDE_SPEC@%$TCL_INCLUDE_SPEC%g
2660 s%@TCL_VERSION@%$TCL_VERSION%g
2661 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
2662 s%@CK_LD_SEARCH_FLAGS@%$CK_LD_SEARCH_FLAGS%g
2663 s%@CK_LIB_FILE@%$CK_LIB_FILE%g
2664 s%@CK_LIB_SPEC@%$CK_LIB_SPEC%g
2665 s%@CK_MAJOR_VERSION@%$CK_MAJOR_VERSION%g
2666 s%@CK_MINOR_VERSION@%$CK_MINOR_VERSION%g
2667 s%@CK_SHLIB_CFLAGS@%$CK_SHLIB_CFLAGS%g
2668 s%@CK_VERSION@%$CK_VERSION%g
2669 s%@CK_BUILD_LIB_SPEC@%$CK_BUILD_LIB_SPEC%g
2670 s%@USE_NCURSES@%$USE_NCURSES%g
2671 s%@CURSESINCLUDES@%$CURSESINCLUDES%g
2672 s%@CURSESLIBSW@%$CURSESLIBSW%g
2673
2674 CEOF
2675 EOF
2676
2677 cat >> $CONFIG_STATUS <<\EOF
2678
2679 # Split the substitutions into bite-sized pieces for seds with
2680 # small command number limits, like on Digital OSF/1 and HP-UX.
2681 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2682 ac_file=1 # Number of current file.
2683 ac_beg=1 # First line for current file.
2684 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2685 ac_more_lines=:
2686 ac_sed_cmds=""
2687 while $ac_more_lines; do
2688   if test $ac_beg -gt 1; then
2689     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2690   else
2691     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2692   fi
2693   if test ! -s conftest.s$ac_file; then
2694     ac_more_lines=false
2695     rm -f conftest.s$ac_file
2696   else
2697     if test -z "$ac_sed_cmds"; then
2698       ac_sed_cmds="sed -f conftest.s$ac_file"
2699     else
2700       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2701     fi
2702     ac_file=`expr $ac_file + 1`
2703     ac_beg=$ac_end
2704     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2705   fi
2706 done
2707 if test -z "$ac_sed_cmds"; then
2708   ac_sed_cmds=cat
2709 fi
2710 EOF
2711
2712 cat >> $CONFIG_STATUS <<EOF
2713
2714 CONFIG_FILES=\${CONFIG_FILES-"Makefile ckConfig.sh pkgIndex.tcl"}
2715 EOF
2716 cat >> $CONFIG_STATUS <<\EOF
2717 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2718   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2719   case "$ac_file" in
2720   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2721        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2722   *) ac_file_in="${ac_file}.in" ;;
2723   esac
2724
2725   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2726
2727   # Remove last slash and all that follows it.  Not all systems have dirname.
2728   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2729   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2730     # The file is in a subdirectory.
2731     test ! -d "$ac_dir" && mkdir "$ac_dir"
2732     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2733     # A "../" for each directory in $ac_dir_suffix.
2734     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2735   else
2736     ac_dir_suffix= ac_dots=
2737   fi
2738
2739   case "$ac_given_srcdir" in
2740   .)  srcdir=.
2741       if test -z "$ac_dots"; then top_srcdir=.
2742       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2743   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2744   *) # Relative path.
2745     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2746     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2747   esac
2748
2749   case "$ac_given_INSTALL" in
2750   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2751   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2752   esac
2753
2754   echo creating "$ac_file"
2755   rm -f "$ac_file"
2756   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2757   case "$ac_file" in
2758   *Makefile*) ac_comsub="1i\\
2759 # $configure_input" ;;
2760   *) ac_comsub= ;;
2761   esac
2762
2763   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2764   sed -e "$ac_comsub
2765 s%@configure_input@%$configure_input%g
2766 s%@srcdir@%$srcdir%g
2767 s%@top_srcdir@%$top_srcdir%g
2768 s%@INSTALL@%$INSTALL%g
2769 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2770 fi; done
2771 rm -f conftest.s*
2772
2773 EOF
2774 cat >> $CONFIG_STATUS <<EOF
2775
2776 EOF
2777 cat >> $CONFIG_STATUS <<\EOF
2778
2779 exit 0
2780 EOF
2781 chmod +x $CONFIG_STATUS
2782 rm -fr confdefs* $ac_clean_files
2783 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2784