resetting manifest requested domain to floor
[platform/upstream/expect.git] / configure
1 #! /bin/sh
2 # From configure.in Id: configure.in.
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59 for expect 5.45.
5 #
6 # Copyright (C) 2003 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21   set -o posix
22 fi
23 DUALCASE=1; export DUALCASE # for MKS sh
24
25 # Support unset when possible.
26 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27   as_unset=unset
28 else
29   as_unset=false
30 fi
31
32
33 # Work around bugs in pre-3.0 UWIN ksh.
34 $as_unset ENV MAIL MAILPATH
35 PS1='$ '
36 PS2='> '
37 PS4='+ '
38
39 # NLS nuisances.
40 for as_var in \
41   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43   LC_TELEPHONE LC_TIME
44 do
45   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
46     eval $as_var=C; export $as_var
47   else
48     $as_unset $as_var
49   fi
50 done
51
52 # Required to use basename.
53 if expr a : '\(a\)' >/dev/null 2>&1; then
54   as_expr=expr
55 else
56   as_expr=false
57 fi
58
59 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60   as_basename=basename
61 else
62   as_basename=false
63 fi
64
65
66 # Name of the executable.
67 as_me=`$as_basename "$0" ||
68 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69          X"$0" : 'X\(//\)$' \| \
70          X"$0" : 'X\(/\)$' \| \
71          .     : '\(.\)' 2>/dev/null ||
72 echo X/"$0" |
73     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74           /^X\/\(\/\/\)$/{ s//\1/; q; }
75           /^X\/\(\/\).*/{ s//\1/; q; }
76           s/.*/./; q'`
77
78
79 # PATH needs CR, and LINENO needs CR and PATH.
80 # Avoid depending upon Character Ranges.
81 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84 as_cr_digits='0123456789'
85 as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87 # The user is always right.
88 if test "${PATH_SEPARATOR+set}" != set; then
89   echo "#! /bin/sh" >conf$$.sh
90   echo  "exit 0"   >>conf$$.sh
91   chmod +x conf$$.sh
92   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
93     PATH_SEPARATOR=';'
94   else
95     PATH_SEPARATOR=:
96   fi
97   rm -f conf$$.sh
98 fi
99
100
101   as_lineno_1=$LINENO
102   as_lineno_2=$LINENO
103   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104   test "x$as_lineno_1" != "x$as_lineno_2" &&
105   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
106   # Find who we are.  Look in the path if we contain no path at all
107   # relative or not.
108   case $0 in
109     *[\\/]* ) as_myself=$0 ;;
110     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111 for as_dir in $PATH
112 do
113   IFS=$as_save_IFS
114   test -z "$as_dir" && as_dir=.
115   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116 done
117
118        ;;
119   esac
120   # We did not find ourselves, most probably we were run as `sh COMMAND'
121   # in which case we are not to be found in the path.
122   if test "x$as_myself" = x; then
123     as_myself=$0
124   fi
125   if test ! -f "$as_myself"; then
126     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127    { (exit 1); exit 1; }; }
128   fi
129   case $CONFIG_SHELL in
130   '')
131     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133 do
134   IFS=$as_save_IFS
135   test -z "$as_dir" && as_dir=.
136   for as_base in sh bash ksh sh5; do
137          case $as_dir in
138          /*)
139            if ("$as_dir/$as_base" -c '
140   as_lineno_1=$LINENO
141   as_lineno_2=$LINENO
142   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143   test "x$as_lineno_1" != "x$as_lineno_2" &&
144   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
145              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
147              CONFIG_SHELL=$as_dir/$as_base
148              export CONFIG_SHELL
149              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150            fi;;
151          esac
152        done
153 done
154 ;;
155   esac
156
157   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158   # uniformly replaced by the line number.  The first 'sed' inserts a
159   # line-number line before each line; the second 'sed' does the real
160   # work.  The second script uses 'N' to pair each line-number line
161   # with the numbered line, and appends trailing '-' during
162   # substitution so that $LINENO is not a special case at line end.
163   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
165   sed '=' <$as_myself |
166     sed '
167       N
168       s,$,-,
169       : loop
170       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171       t loop
172       s,-$,,
173       s,^['$as_cr_digits']*\n,,
174     ' >$as_me.lineno &&
175   chmod +x $as_me.lineno ||
176     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177    { (exit 1); exit 1; }; }
178
179   # Don't try to exec as it changes $[0], causing all sort of problems
180   # (the dirname of $[0] is not the place where we might find the
181   # original and so on.  Autoconf is especially sensible to this).
182   . ./$as_me.lineno
183   # Exit status is that of the last command.
184   exit
185 }
186
187
188 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189   *c*,-n*) ECHO_N= ECHO_C='
190 ' ECHO_T='      ' ;;
191   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
193 esac
194
195 if expr a : '\(a\)' >/dev/null 2>&1; then
196   as_expr=expr
197 else
198   as_expr=false
199 fi
200
201 rm -f conf$$ conf$$.exe conf$$.file
202 echo >conf$$.file
203 if ln -s conf$$.file conf$$ 2>/dev/null; then
204   # We could just check for DJGPP; but this test a) works b) is more generic
205   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206   if test -f conf$$.exe; then
207     # Don't use ln at all; we don't have any links
208     as_ln_s='cp -p'
209   else
210     as_ln_s='ln -s'
211   fi
212 elif ln conf$$.file conf$$ 2>/dev/null; then
213   as_ln_s=ln
214 else
215   as_ln_s='cp -p'
216 fi
217 rm -f conf$$ conf$$.exe conf$$.file
218
219 if mkdir -p . 2>/dev/null; then
220   as_mkdir_p=:
221 else
222   test -d ./-p && rmdir ./-p
223   as_mkdir_p=false
224 fi
225
226 as_executable_p="test -f"
227
228 # Sed expression to map a string onto a valid CPP name.
229 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
230
231 # Sed expression to map a string onto a valid variable name.
232 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
233
234
235 # IFS
236 # We need space, tab and new line, in precisely that order.
237 as_nl='
238 '
239 IFS="   $as_nl"
240
241 # CDPATH.
242 $as_unset CDPATH
243
244
245 # Name of the host.
246 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247 # so uname gets run too.
248 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250 exec 6>&1
251
252 #
253 # Initializations.
254 #
255 ac_default_prefix=/usr/local
256 ac_config_libobj_dir=.
257 cross_compiling=no
258 subdirs=
259 MFLAGS=
260 MAKEFLAGS=
261 SHELL=${CONFIG_SHELL-/bin/sh}
262
263 # Maximum number of lines to put in a shell here document.
264 # This variable seems obsolete.  It should probably be removed, and
265 # only ac_max_sed_lines should be used.
266 : ${ac_max_here_lines=38}
267
268 # Identity of this package.
269 PACKAGE_NAME='expect'
270 PACKAGE_TARNAME='expect'
271 PACKAGE_VERSION='5.45'
272 PACKAGE_STRING='expect 5.45'
273 PACKAGE_BUGREPORT=''
274
275 # Factoring default headers for most tests.
276 ac_includes_default="\
277 #include <stdio.h>
278 #if HAVE_SYS_TYPES_H
279 # include <sys/types.h>
280 #endif
281 #if HAVE_SYS_STAT_H
282 # include <sys/stat.h>
283 #endif
284 #if STDC_HEADERS
285 # include <stdlib.h>
286 # include <stddef.h>
287 #else
288 # if HAVE_STDLIB_H
289 #  include <stdlib.h>
290 # endif
291 #endif
292 #if HAVE_STRING_H
293 # if !STDC_HEADERS && HAVE_MEMORY_H
294 #  include <memory.h>
295 # endif
296 # include <string.h>
297 #endif
298 #if HAVE_STRINGS_H
299 # include <strings.h>
300 #endif
301 #if HAVE_INTTYPES_H
302 # include <inttypes.h>
303 #else
304 # if HAVE_STDINT_H
305 #  include <stdint.h>
306 # endif
307 #endif
308 #if HAVE_UNISTD_H
309 # include <unistd.h>
310 #endif"
311
312 ac_subdirs_all="$ac_subdirs_all testsuite"
313 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_PATCH_LEVEL TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC CLEANFILES TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS TCL_INCLUDES TCL_TOP_DIR_NATIVE TCL_THREADS SHARED_BUILD AR CELIB_DIR CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR CFLAGS_DEFAULT LDFLAGS_DEFAULT TCL_DBGX build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os subdirs EXP_BUILD_LIB_SPEC EXP_CC_SEARCH_FLAGS SETUID SETPGRP_VOID DEFAULT_STTY_ARGS TCL_DL_LIBS TCL_CC_SEARCH_FLAGS PKG_SOURCES PKG_OBJECTS MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB VC_MANIFEST_EMBED_DLL VC_MANIFEST_EMBED_EXE TCLSH_PROG LIBOBJS LTLIBOBJS'
314 ac_subst_files=''
315
316 # Initialize some variables set by options.
317 ac_init_help=
318 ac_init_version=false
319 # The variables have the same names as the options, with
320 # dashes changed to underlines.
321 cache_file=/dev/null
322 exec_prefix=NONE
323 no_create=
324 no_recursion=
325 prefix=NONE
326 program_prefix=NONE
327 program_suffix=NONE
328 program_transform_name=s,x,x,
329 silent=
330 site=
331 srcdir=
332 verbose=
333 x_includes=NONE
334 x_libraries=NONE
335
336 # Installation directory options.
337 # These are left unexpanded so users can "make install exec_prefix=/foo"
338 # and all the variables that are supposed to be based on exec_prefix
339 # by default will actually change.
340 # Use braces instead of parens because sh, perl, etc. also accept them.
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 ac_prev=
355 for ac_option
356 do
357   # If the previous option needs an argument, assign it.
358   if test -n "$ac_prev"; then
359     eval "$ac_prev=\$ac_option"
360     ac_prev=
361     continue
362   fi
363
364   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
365
366   # Accept the important Cygnus configure options, so we can diagnose typos.
367
368   case $ac_option in
369
370   -bindir | --bindir | --bindi | --bind | --bin | --bi)
371     ac_prev=bindir ;;
372   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
373     bindir=$ac_optarg ;;
374
375   -build | --build | --buil | --bui | --bu)
376     ac_prev=build_alias ;;
377   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
378     build_alias=$ac_optarg ;;
379
380   -cache-file | --cache-file | --cache-fil | --cache-fi \
381   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382     ac_prev=cache_file ;;
383   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
385     cache_file=$ac_optarg ;;
386
387   --config-cache | -C)
388     cache_file=config.cache ;;
389
390   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391     ac_prev=datadir ;;
392   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393   | --da=*)
394     datadir=$ac_optarg ;;
395
396   -disable-* | --disable-*)
397     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
398     # Reject names that are not valid shell variable names.
399     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401    { (exit 1); exit 1; }; }
402     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403     eval "enable_$ac_feature=no" ;;
404
405   -enable-* | --enable-*)
406     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
407     # Reject names that are not valid shell variable names.
408     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410    { (exit 1); exit 1; }; }
411     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412     case $ac_option in
413       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
414       *) ac_optarg=yes ;;
415     esac
416     eval "enable_$ac_feature='$ac_optarg'" ;;
417
418   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420   | --exec | --exe | --ex)
421     ac_prev=exec_prefix ;;
422   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424   | --exec=* | --exe=* | --ex=*)
425     exec_prefix=$ac_optarg ;;
426
427   -gas | --gas | --ga | --g)
428     # Obsolete; use --with-gas.
429     with_gas=yes ;;
430
431   -help | --help | --hel | --he | -h)
432     ac_init_help=long ;;
433   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434     ac_init_help=recursive ;;
435   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436     ac_init_help=short ;;
437
438   -host | --host | --hos | --ho)
439     ac_prev=host_alias ;;
440   -host=* | --host=* | --hos=* | --ho=*)
441     host_alias=$ac_optarg ;;
442
443   -includedir | --includedir | --includedi | --included | --include \
444   | --includ | --inclu | --incl | --inc)
445     ac_prev=includedir ;;
446   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447   | --includ=* | --inclu=* | --incl=* | --inc=*)
448     includedir=$ac_optarg ;;
449
450   -infodir | --infodir | --infodi | --infod | --info | --inf)
451     ac_prev=infodir ;;
452   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
453     infodir=$ac_optarg ;;
454
455   -libdir | --libdir | --libdi | --libd)
456     ac_prev=libdir ;;
457   -libdir=* | --libdir=* | --libdi=* | --libd=*)
458     libdir=$ac_optarg ;;
459
460   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461   | --libexe | --libex | --libe)
462     ac_prev=libexecdir ;;
463   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464   | --libexe=* | --libex=* | --libe=*)
465     libexecdir=$ac_optarg ;;
466
467   -localstatedir | --localstatedir | --localstatedi | --localstated \
468   | --localstate | --localstat | --localsta | --localst \
469   | --locals | --local | --loca | --loc | --lo)
470     ac_prev=localstatedir ;;
471   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
474     localstatedir=$ac_optarg ;;
475
476   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477     ac_prev=mandir ;;
478   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
479     mandir=$ac_optarg ;;
480
481   -nfp | --nfp | --nf)
482     # Obsolete; use --without-fp.
483     with_fp=no ;;
484
485   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486   | --no-cr | --no-c | -n)
487     no_create=yes ;;
488
489   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491     no_recursion=yes ;;
492
493   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495   | --oldin | --oldi | --old | --ol | --o)
496     ac_prev=oldincludedir ;;
497   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
500     oldincludedir=$ac_optarg ;;
501
502   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503     ac_prev=prefix ;;
504   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
505     prefix=$ac_optarg ;;
506
507   -program-prefix | --program-prefix | --program-prefi | --program-pref \
508   | --program-pre | --program-pr | --program-p)
509     ac_prev=program_prefix ;;
510   -program-prefix=* | --program-prefix=* | --program-prefi=* \
511   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
512     program_prefix=$ac_optarg ;;
513
514   -program-suffix | --program-suffix | --program-suffi | --program-suff \
515   | --program-suf | --program-su | --program-s)
516     ac_prev=program_suffix ;;
517   -program-suffix=* | --program-suffix=* | --program-suffi=* \
518   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
519     program_suffix=$ac_optarg ;;
520
521   -program-transform-name | --program-transform-name \
522   | --program-transform-nam | --program-transform-na \
523   | --program-transform-n | --program-transform- \
524   | --program-transform | --program-transfor \
525   | --program-transfo | --program-transf \
526   | --program-trans | --program-tran \
527   | --progr-tra | --program-tr | --program-t)
528     ac_prev=program_transform_name ;;
529   -program-transform-name=* | --program-transform-name=* \
530   | --program-transform-nam=* | --program-transform-na=* \
531   | --program-transform-n=* | --program-transform-=* \
532   | --program-transform=* | --program-transfor=* \
533   | --program-transfo=* | --program-transf=* \
534   | --program-trans=* | --program-tran=* \
535   | --progr-tra=* | --program-tr=* | --program-t=*)
536     program_transform_name=$ac_optarg ;;
537
538   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539   | -silent | --silent | --silen | --sile | --sil)
540     silent=yes ;;
541
542   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543     ac_prev=sbindir ;;
544   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545   | --sbi=* | --sb=*)
546     sbindir=$ac_optarg ;;
547
548   -sharedstatedir | --sharedstatedir | --sharedstatedi \
549   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550   | --sharedst | --shareds | --shared | --share | --shar \
551   | --sha | --sh)
552     ac_prev=sharedstatedir ;;
553   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556   | --sha=* | --sh=*)
557     sharedstatedir=$ac_optarg ;;
558
559   -site | --site | --sit)
560     ac_prev=site ;;
561   -site=* | --site=* | --sit=*)
562     site=$ac_optarg ;;
563
564   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565     ac_prev=srcdir ;;
566   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
567     srcdir=$ac_optarg ;;
568
569   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570   | --syscon | --sysco | --sysc | --sys | --sy)
571     ac_prev=sysconfdir ;;
572   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
574     sysconfdir=$ac_optarg ;;
575
576   -target | --target | --targe | --targ | --tar | --ta | --t)
577     ac_prev=target_alias ;;
578   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
579     target_alias=$ac_optarg ;;
580
581   -v | -verbose | --verbose | --verbos | --verbo | --verb)
582     verbose=yes ;;
583
584   -version | --version | --versio | --versi | --vers | -V)
585     ac_init_version=: ;;
586
587   -with-* | --with-*)
588     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
589     # Reject names that are not valid shell variable names.
590     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591       { echo "$as_me: error: invalid package name: $ac_package" >&2
592    { (exit 1); exit 1; }; }
593     ac_package=`echo $ac_package| sed 's/-/_/g'`
594     case $ac_option in
595       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
596       *) ac_optarg=yes ;;
597     esac
598     eval "with_$ac_package='$ac_optarg'" ;;
599
600   -without-* | --without-*)
601     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
602     # Reject names that are not valid shell variable names.
603     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604       { echo "$as_me: error: invalid package name: $ac_package" >&2
605    { (exit 1); exit 1; }; }
606     ac_package=`echo $ac_package | sed 's/-/_/g'`
607     eval "with_$ac_package=no" ;;
608
609   --x)
610     # Obsolete; use --with-x.
611     with_x=yes ;;
612
613   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614   | --x-incl | --x-inc | --x-in | --x-i)
615     ac_prev=x_includes ;;
616   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
618     x_includes=$ac_optarg ;;
619
620   -x-libraries | --x-libraries | --x-librarie | --x-librari \
621   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622     ac_prev=x_libraries ;;
623   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
625     x_libraries=$ac_optarg ;;
626
627   -*) { echo "$as_me: error: unrecognized option: $ac_option
628 Try \`$0 --help' for more information." >&2
629    { (exit 1); exit 1; }; }
630     ;;
631
632   *=*)
633     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634     # Reject names that are not valid shell variable names.
635     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637    { (exit 1); exit 1; }; }
638     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639     eval "$ac_envvar='$ac_optarg'"
640     export $ac_envvar ;;
641
642   *)
643     # FIXME: should be removed in autoconf 3.0.
644     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
648     ;;
649
650   esac
651 done
652
653 if test -n "$ac_prev"; then
654   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655   { echo "$as_me: error: missing argument to $ac_option" >&2
656    { (exit 1); exit 1; }; }
657 fi
658
659 # Be sure to have absolute paths.
660 for ac_var in exec_prefix prefix
661 do
662   eval ac_val=$`echo $ac_var`
663   case $ac_val in
664     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666    { (exit 1); exit 1; }; };;
667   esac
668 done
669
670 # Be sure to have absolute paths.
671 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
672               localstatedir libdir includedir oldincludedir infodir mandir
673 do
674   eval ac_val=$`echo $ac_var`
675   case $ac_val in
676     [\\/$]* | ?:[\\/]* ) ;;
677     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678    { (exit 1); exit 1; }; };;
679   esac
680 done
681
682 # There might be people who depend on the old broken behavior: `$host'
683 # used to hold the argument of --host etc.
684 # FIXME: To remove some day.
685 build=$build_alias
686 host=$host_alias
687 target=$target_alias
688
689 # FIXME: To remove some day.
690 if test "x$host_alias" != x; then
691   if test "x$build_alias" = x; then
692     cross_compiling=maybe
693     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694     If a cross compiler is detected then cross compile mode will be used." >&2
695   elif test "x$build_alias" != "x$host_alias"; then
696     cross_compiling=yes
697   fi
698 fi
699
700 ac_tool_prefix=
701 test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703 test "$silent" = yes && exec 6>/dev/null
704
705
706 # Find the source files, if location was not specified.
707 if test -z "$srcdir"; then
708   ac_srcdir_defaulted=yes
709   # Try the directory containing this script, then its parent.
710   ac_confdir=`(dirname "$0") 2>/dev/null ||
711 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
712          X"$0" : 'X\(//\)[^/]' \| \
713          X"$0" : 'X\(//\)$' \| \
714          X"$0" : 'X\(/\)' \| \
715          .     : '\(.\)' 2>/dev/null ||
716 echo X"$0" |
717     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719           /^X\(\/\/\)$/{ s//\1/; q; }
720           /^X\(\/\).*/{ s//\1/; q; }
721           s/.*/./; q'`
722   srcdir=$ac_confdir
723   if test ! -r $srcdir/$ac_unique_file; then
724     srcdir=..
725   fi
726 else
727   ac_srcdir_defaulted=no
728 fi
729 if test ! -r $srcdir/$ac_unique_file; then
730   if test "$ac_srcdir_defaulted" = yes; then
731     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732    { (exit 1); exit 1; }; }
733   else
734     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735    { (exit 1); exit 1; }; }
736   fi
737 fi
738 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740    { (exit 1); exit 1; }; }
741 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742 ac_env_build_alias_set=${build_alias+set}
743 ac_env_build_alias_value=$build_alias
744 ac_cv_env_build_alias_set=${build_alias+set}
745 ac_cv_env_build_alias_value=$build_alias
746 ac_env_host_alias_set=${host_alias+set}
747 ac_env_host_alias_value=$host_alias
748 ac_cv_env_host_alias_set=${host_alias+set}
749 ac_cv_env_host_alias_value=$host_alias
750 ac_env_target_alias_set=${target_alias+set}
751 ac_env_target_alias_value=$target_alias
752 ac_cv_env_target_alias_set=${target_alias+set}
753 ac_cv_env_target_alias_value=$target_alias
754 ac_env_CC_set=${CC+set}
755 ac_env_CC_value=$CC
756 ac_cv_env_CC_set=${CC+set}
757 ac_cv_env_CC_value=$CC
758 ac_env_CFLAGS_set=${CFLAGS+set}
759 ac_env_CFLAGS_value=$CFLAGS
760 ac_cv_env_CFLAGS_set=${CFLAGS+set}
761 ac_cv_env_CFLAGS_value=$CFLAGS
762 ac_env_LDFLAGS_set=${LDFLAGS+set}
763 ac_env_LDFLAGS_value=$LDFLAGS
764 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765 ac_cv_env_LDFLAGS_value=$LDFLAGS
766 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767 ac_env_CPPFLAGS_value=$CPPFLAGS
768 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770 ac_env_CPP_set=${CPP+set}
771 ac_env_CPP_value=$CPP
772 ac_cv_env_CPP_set=${CPP+set}
773 ac_cv_env_CPP_value=$CPP
774
775 #
776 # Report the --help message.
777 #
778 if test "$ac_init_help" = "long"; then
779   # Omit some internal or obsolete options to make the list less imposing.
780   # This message is too long to be a string in the A/UX 3.1 sh.
781   cat <<_ACEOF
782 \`configure' configures expect 5.45 to adapt to many kinds of systems.
783
784 Usage: $0 [OPTION]... [VAR=VALUE]...
785
786 To assign environment variables (e.g., CC, CFLAGS...), specify them as
787 VAR=VALUE.  See below for descriptions of some of the useful variables.
788
789 Defaults for the options are specified in brackets.
790
791 Configuration:
792   -h, --help              display this help and exit
793       --help=short        display options specific to this package
794       --help=recursive    display the short help of all the included packages
795   -V, --version           display version information and exit
796   -q, --quiet, --silent   do not print \`checking...' messages
797       --cache-file=FILE   cache test results in FILE [disabled]
798   -C, --config-cache      alias for \`--cache-file=config.cache'
799   -n, --no-create         do not create output files
800       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
801
802 _ACEOF
803
804   cat <<_ACEOF
805 Installation directories:
806   --prefix=PREFIX         install architecture-independent files in PREFIX
807                           [$ac_default_prefix]
808   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
809                           [PREFIX]
810
811 By default, \`make install' will install all the files in
812 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
813 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814 for instance \`--prefix=\$HOME'.
815
816 For better control, use the options below.
817
818 Fine tuning of the installation directories:
819   --bindir=DIR           user executables [EPREFIX/bin]
820   --sbindir=DIR          system admin executables [EPREFIX/sbin]
821   --libexecdir=DIR       program executables [EPREFIX/libexec]
822   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
823   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
824   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
825   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
826   --libdir=DIR           object code libraries [EPREFIX/lib]
827   --includedir=DIR       C header files [PREFIX/include]
828   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
829   --infodir=DIR          info documentation [PREFIX/info]
830   --mandir=DIR           man documentation [PREFIX/man]
831 _ACEOF
832
833   cat <<\_ACEOF
834
835 System types:
836   --build=BUILD     configure for building on BUILD [guessed]
837   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
838   --target=TARGET   configure for building compilers for TARGET [HOST]
839 _ACEOF
840 fi
841
842 if test -n "$ac_init_help"; then
843   case $ac_init_help in
844      short | recursive ) echo "Configuration of expect 5.45:";;
845    esac
846   cat <<\_ACEOF
847
848 Optional Features:
849   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
850   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
851   --enable-threads        build with threads
852   --enable-shared         build and link with shared libraries (default: on)
853   --enable-64bit          enable 64bit support (default: off)
854   --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
855   --disable-rpath         disable rpath support (default: on)
856   --enable-wince          enable Win/CE support (where applicable)
857   --enable-symbols        build with debugging symbols (default: off)
858
859 Optional Packages:
860   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
861   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
862   --with-tcl              directory containing tcl configuration
863                           (tclConfig.sh)
864   --with-tclinclude       directory containing the public Tcl header files
865   --with-celib=DIR        use Windows/CE support library from DIR
866
867 Some influential environment variables:
868   CC          C compiler command
869   CFLAGS      C compiler flags
870   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
871               nonstandard directory <lib dir>
872   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
873               headers in a nonstandard directory <include dir>
874   CPP         C preprocessor
875
876 Use these variables to override the choices made by `configure' or to help
877 it to find libraries and programs with nonstandard names/locations.
878
879 _ACEOF
880 fi
881
882 if test "$ac_init_help" = "recursive"; then
883   # If there are subdirs, report their specific --help.
884   ac_popdir=`pwd`
885   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
886     test -d $ac_dir || continue
887     ac_builddir=.
888
889 if test "$ac_dir" != .; then
890   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
891   # A "../" for each directory in $ac_dir_suffix.
892   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
893 else
894   ac_dir_suffix= ac_top_builddir=
895 fi
896
897 case $srcdir in
898   .)  # No --srcdir option.  We are building in place.
899     ac_srcdir=.
900     if test -z "$ac_top_builddir"; then
901        ac_top_srcdir=.
902     else
903        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
904     fi ;;
905   [\\/]* | ?:[\\/]* )  # Absolute path.
906     ac_srcdir=$srcdir$ac_dir_suffix;
907     ac_top_srcdir=$srcdir ;;
908   *) # Relative path.
909     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
910     ac_top_srcdir=$ac_top_builddir$srcdir ;;
911 esac
912
913 # Do not use `cd foo && pwd` to compute absolute paths, because
914 # the directories may not exist.
915 case `pwd` in
916 .) ac_abs_builddir="$ac_dir";;
917 *)
918   case "$ac_dir" in
919   .) ac_abs_builddir=`pwd`;;
920   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
921   *) ac_abs_builddir=`pwd`/"$ac_dir";;
922   esac;;
923 esac
924 case $ac_abs_builddir in
925 .) ac_abs_top_builddir=${ac_top_builddir}.;;
926 *)
927   case ${ac_top_builddir}. in
928   .) ac_abs_top_builddir=$ac_abs_builddir;;
929   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
930   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
931   esac;;
932 esac
933 case $ac_abs_builddir in
934 .) ac_abs_srcdir=$ac_srcdir;;
935 *)
936   case $ac_srcdir in
937   .) ac_abs_srcdir=$ac_abs_builddir;;
938   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
939   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
940   esac;;
941 esac
942 case $ac_abs_builddir in
943 .) ac_abs_top_srcdir=$ac_top_srcdir;;
944 *)
945   case $ac_top_srcdir in
946   .) ac_abs_top_srcdir=$ac_abs_builddir;;
947   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
948   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
949   esac;;
950 esac
951
952     cd $ac_dir
953     # Check for guested configure; otherwise get Cygnus style configure.
954     if test -f $ac_srcdir/configure.gnu; then
955       echo
956       $SHELL $ac_srcdir/configure.gnu  --help=recursive
957     elif test -f $ac_srcdir/configure; then
958       echo
959       $SHELL $ac_srcdir/configure  --help=recursive
960     elif test -f $ac_srcdir/configure.ac ||
961            test -f $ac_srcdir/configure.in; then
962       echo
963       $ac_configure --help
964     else
965       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
966     fi
967     cd $ac_popdir
968   done
969 fi
970
971 test -n "$ac_init_help" && exit 0
972 if $ac_init_version; then
973   cat <<\_ACEOF
974 expect configure 5.45
975 generated by GNU Autoconf 2.59
976
977 Copyright (C) 2003 Free Software Foundation, Inc.
978 This configure script is free software; the Free Software Foundation
979 gives unlimited permission to copy, distribute and modify it.
980 _ACEOF
981   exit 0
982 fi
983 exec 5>config.log
984 cat >&5 <<_ACEOF
985 This file contains any messages produced by compilers while
986 running configure, to aid debugging if configure makes a mistake.
987
988 It was created by expect $as_me 5.45, which was
989 generated by GNU Autoconf 2.59.  Invocation command line was
990
991   $ $0 $@
992
993 _ACEOF
994 {
995 cat <<_ASUNAME
996 ## --------- ##
997 ## Platform. ##
998 ## --------- ##
999
1000 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1001 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1002 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1003 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1004 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1005
1006 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1007 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1008
1009 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1010 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1011 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1012 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
1013 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1014 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1015 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1016
1017 _ASUNAME
1018
1019 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1020 for as_dir in $PATH
1021 do
1022   IFS=$as_save_IFS
1023   test -z "$as_dir" && as_dir=.
1024   echo "PATH: $as_dir"
1025 done
1026
1027 } >&5
1028
1029 cat >&5 <<_ACEOF
1030
1031
1032 ## ----------- ##
1033 ## Core tests. ##
1034 ## ----------- ##
1035
1036 _ACEOF
1037
1038
1039 # Keep a trace of the command line.
1040 # Strip out --no-create and --no-recursion so they do not pile up.
1041 # Strip out --silent because we don't want to record it for future runs.
1042 # Also quote any args containing shell meta-characters.
1043 # Make two passes to allow for proper duplicate-argument suppression.
1044 ac_configure_args=
1045 ac_configure_args0=
1046 ac_configure_args1=
1047 ac_sep=
1048 ac_must_keep_next=false
1049 for ac_pass in 1 2
1050 do
1051   for ac_arg
1052   do
1053     case $ac_arg in
1054     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1055     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1056     | -silent | --silent | --silen | --sile | --sil)
1057       continue ;;
1058     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1059       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1060     esac
1061     case $ac_pass in
1062     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1063     2)
1064       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1065       if test $ac_must_keep_next = true; then
1066         ac_must_keep_next=false # Got value, back to normal.
1067       else
1068         case $ac_arg in
1069           *=* | --config-cache | -C | -disable-* | --disable-* \
1070           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1071           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1072           | -with-* | --with-* | -without-* | --without-* | --x)
1073             case "$ac_configure_args0 " in
1074               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1075             esac
1076             ;;
1077           -* ) ac_must_keep_next=true ;;
1078         esac
1079       fi
1080       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1081       # Get rid of the leading space.
1082       ac_sep=" "
1083       ;;
1084     esac
1085   done
1086 done
1087 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1088 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1089
1090 # When interrupted or exit'd, cleanup temporary files, and complete
1091 # config.log.  We remove comments because anyway the quotes in there
1092 # would cause problems or look ugly.
1093 # WARNING: Be sure not to use single quotes in there, as some shells,
1094 # such as our DU 5.0 friend, will then `close' the trap.
1095 trap 'exit_status=$?
1096   # Save into config.log some information that might help in debugging.
1097   {
1098     echo
1099
1100     cat <<\_ASBOX
1101 ## ---------------- ##
1102 ## Cache variables. ##
1103 ## ---------------- ##
1104 _ASBOX
1105     echo
1106     # The following way of writing the cache mishandles newlines in values,
1107 {
1108   (set) 2>&1 |
1109     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1110     *ac_space=\ *)
1111       sed -n \
1112         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1113           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1114       ;;
1115     *)
1116       sed -n \
1117         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1118       ;;
1119     esac;
1120 }
1121     echo
1122
1123     cat <<\_ASBOX
1124 ## ----------------- ##
1125 ## Output variables. ##
1126 ## ----------------- ##
1127 _ASBOX
1128     echo
1129     for ac_var in $ac_subst_vars
1130     do
1131       eval ac_val=$`echo $ac_var`
1132       echo "$ac_var='"'"'$ac_val'"'"'"
1133     done | sort
1134     echo
1135
1136     if test -n "$ac_subst_files"; then
1137       cat <<\_ASBOX
1138 ## ------------- ##
1139 ## Output files. ##
1140 ## ------------- ##
1141 _ASBOX
1142       echo
1143       for ac_var in $ac_subst_files
1144       do
1145         eval ac_val=$`echo $ac_var`
1146         echo "$ac_var='"'"'$ac_val'"'"'"
1147       done | sort
1148       echo
1149     fi
1150
1151     if test -s confdefs.h; then
1152       cat <<\_ASBOX
1153 ## ----------- ##
1154 ## confdefs.h. ##
1155 ## ----------- ##
1156 _ASBOX
1157       echo
1158       sed "/^$/d" confdefs.h | sort
1159       echo
1160     fi
1161     test "$ac_signal" != 0 &&
1162       echo "$as_me: caught signal $ac_signal"
1163     echo "$as_me: exit $exit_status"
1164   } >&5
1165   rm -f core *.core &&
1166   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1167     exit $exit_status
1168      ' 0
1169 for ac_signal in 1 2 13 15; do
1170   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1171 done
1172 ac_signal=0
1173
1174 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1175 rm -rf conftest* confdefs.h
1176 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1177 echo >confdefs.h
1178
1179 # Predefined preprocessor variables.
1180
1181 cat >>confdefs.h <<_ACEOF
1182 #define PACKAGE_NAME "$PACKAGE_NAME"
1183 _ACEOF
1184
1185
1186 cat >>confdefs.h <<_ACEOF
1187 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1188 _ACEOF
1189
1190
1191 cat >>confdefs.h <<_ACEOF
1192 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1193 _ACEOF
1194
1195
1196 cat >>confdefs.h <<_ACEOF
1197 #define PACKAGE_STRING "$PACKAGE_STRING"
1198 _ACEOF
1199
1200
1201 cat >>confdefs.h <<_ACEOF
1202 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1203 _ACEOF
1204
1205
1206 # Let the site file select an alternate cache file if it wants to.
1207 # Prefer explicitly selected file to automatically selected ones.
1208 if test -z "$CONFIG_SITE"; then
1209   if test "x$prefix" != xNONE; then
1210     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1211   else
1212     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1213   fi
1214 fi
1215 for ac_site_file in $CONFIG_SITE; do
1216   if test -r "$ac_site_file"; then
1217     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1218 echo "$as_me: loading site script $ac_site_file" >&6;}
1219     sed 's/^/| /' "$ac_site_file" >&5
1220     . "$ac_site_file"
1221   fi
1222 done
1223
1224 if test -r "$cache_file"; then
1225   # Some versions of bash will fail to source /dev/null (special
1226   # files actually), so we avoid doing that.
1227   if test -f "$cache_file"; then
1228     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1229 echo "$as_me: loading cache $cache_file" >&6;}
1230     case $cache_file in
1231       [\\/]* | ?:[\\/]* ) . $cache_file;;
1232       *)                      . ./$cache_file;;
1233     esac
1234   fi
1235 else
1236   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1237 echo "$as_me: creating cache $cache_file" >&6;}
1238   >$cache_file
1239 fi
1240
1241 # Check that the precious variables saved in the cache have kept the same
1242 # value.
1243 ac_cache_corrupted=false
1244 for ac_var in `(set) 2>&1 |
1245                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1246   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1247   eval ac_new_set=\$ac_env_${ac_var}_set
1248   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1249   eval ac_new_val="\$ac_env_${ac_var}_value"
1250   case $ac_old_set,$ac_new_set in
1251     set,)
1252       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1253 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1254       ac_cache_corrupted=: ;;
1255     ,set)
1256       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1257 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1258       ac_cache_corrupted=: ;;
1259     ,);;
1260     *)
1261       if test "x$ac_old_val" != "x$ac_new_val"; then
1262         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1263 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1264         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1265 echo "$as_me:   former value:  $ac_old_val" >&2;}
1266         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1267 echo "$as_me:   current value: $ac_new_val" >&2;}
1268         ac_cache_corrupted=:
1269       fi;;
1270   esac
1271   # Pass precious variables to config.status.
1272   if test "$ac_new_set" = set; then
1273     case $ac_new_val in
1274     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1275       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1276     *) ac_arg=$ac_var=$ac_new_val ;;
1277     esac
1278     case " $ac_configure_args " in
1279       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1280       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1281     esac
1282   fi
1283 done
1284 if $ac_cache_corrupted; then
1285   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1286 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1287   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1288 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1289    { (exit 1); exit 1; }; }
1290 fi
1291
1292 ac_ext=c
1293 ac_cpp='$CPP $CPPFLAGS'
1294 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1295 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1296 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326     # TEA extensions pass this us the version of TEA they think they
1327     # are compatible with.
1328     TEA_VERSION="3.9"
1329
1330     echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1331 echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
1332     if test x"${PACKAGE_NAME}" = x ; then
1333         { { echo "$as_me:$LINENO: error:
1334 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1335 echo "$as_me: error:
1336 The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1337    { (exit 1); exit 1; }; }
1338     fi
1339     if test x"3.9" = x ; then
1340         { { echo "$as_me:$LINENO: error:
1341 TEA version not specified." >&5
1342 echo "$as_me: error:
1343 TEA version not specified." >&2;}
1344    { (exit 1); exit 1; }; }
1345     elif test "3.9" != "${TEA_VERSION}" ; then
1346         echo "$as_me:$LINENO: result: warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&5
1347 echo "${ECHO_T}warning: requested TEA version \"3.9\", have \"${TEA_VERSION}\"" >&6
1348     else
1349         echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1350 echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
1351     fi
1352     case "`uname -s`" in
1353         *win32*|*WIN32*|*MINGW32_*)
1354             # Extract the first word of "cygpath", so it can be a program name with args.
1355 set dummy cygpath; ac_word=$2
1356 echo "$as_me:$LINENO: checking for $ac_word" >&5
1357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1358 if test "${ac_cv_prog_CYGPATH+set}" = set; then
1359   echo $ECHO_N "(cached) $ECHO_C" >&6
1360 else
1361   if test -n "$CYGPATH"; then
1362   ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1363 else
1364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1365 for as_dir in $PATH
1366 do
1367   IFS=$as_save_IFS
1368   test -z "$as_dir" && as_dir=.
1369   for ac_exec_ext in '' $ac_executable_extensions; do
1370   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1371     ac_cv_prog_CYGPATH="cygpath -w"
1372     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1373     break 2
1374   fi
1375 done
1376 done
1377
1378   test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1379 fi
1380 fi
1381 CYGPATH=$ac_cv_prog_CYGPATH
1382 if test -n "$CYGPATH"; then
1383   echo "$as_me:$LINENO: result: $CYGPATH" >&5
1384 echo "${ECHO_T}$CYGPATH" >&6
1385 else
1386   echo "$as_me:$LINENO: result: no" >&5
1387 echo "${ECHO_T}no" >&6
1388 fi
1389
1390             EXEEXT=".exe"
1391             TEA_PLATFORM="windows"
1392             ;;
1393         *CYGWIN_*)
1394             CYGPATH=echo
1395             EXEEXT=".exe"
1396             # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1397             ;;
1398         *)
1399             CYGPATH=echo
1400             EXEEXT=""
1401             TEA_PLATFORM="unix"
1402             ;;
1403     esac
1404
1405     # Check if exec_prefix is set. If not use fall back to prefix.
1406     # Note when adjusted, so that TEA_PREFIX can correct for this.
1407     # This is needed for recursive configures, since autoconf propagates
1408     # $prefix, but not $exec_prefix (doh!).
1409     if test x$exec_prefix = xNONE ; then
1410         exec_prefix_default=yes
1411         exec_prefix=$prefix
1412     fi
1413
1414     { echo "$as_me:$LINENO: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&5
1415 echo "$as_me: configuring ${PACKAGE_NAME} ${PACKAGE_VERSION}" >&6;}
1416
1417
1418
1419
1420     # This package name must be replaced statically for AC_SUBST to work
1421
1422     # Substitute STUB_LIB_FILE in case package creates a stub library too.
1423
1424
1425     # We AC_SUBST these here to ensure they are subst'ed,
1426     # in case the user doesn't call TEA_ADD_...
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436 ac_aux_dir=
1437 for ac_dir in tclconfig $srcdir/tclconfig; do
1438   if test -f $ac_dir/install-sh; then
1439     ac_aux_dir=$ac_dir
1440     ac_install_sh="$ac_aux_dir/install-sh -c"
1441     break
1442   elif test -f $ac_dir/install.sh; then
1443     ac_aux_dir=$ac_dir
1444     ac_install_sh="$ac_aux_dir/install.sh -c"
1445     break
1446   elif test -f $ac_dir/shtool; then
1447     ac_aux_dir=$ac_dir
1448     ac_install_sh="$ac_aux_dir/shtool install -c"
1449     break
1450   fi
1451 done
1452 if test -z "$ac_aux_dir"; then
1453   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
1454 echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1458 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1459 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1460
1461
1462 #--------------------------------------------------------------------
1463 # Configure script for package 'Expect'.
1464 # TEA compliant.
1465 #--------------------------------------------------------------------
1466
1467 #--------------------------------------------------------------------
1468 # Load the tclConfig.sh file
1469 #--------------------------------------------------------------------
1470
1471
1472
1473     #
1474     # Ok, lets find the tcl configuration
1475     # First, look for one uninstalled.
1476     # the alternative search directory is invoked by --with-tcl
1477     #
1478
1479     if test x"${no_tcl}" = x ; then
1480         # we reset no_tcl in case something fails here
1481         no_tcl=true
1482
1483 # Check whether --with-tcl or --without-tcl was given.
1484 if test "${with_tcl+set}" = set; then
1485   withval="$with_tcl"
1486   with_tclconfig="${withval}"
1487 fi;
1488         echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1489 echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
1490         if test "${ac_cv_c_tclconfig+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493
1494
1495             # First check to see if --with-tcl was specified.
1496             if test x"${with_tclconfig}" != x ; then
1497                 case "${with_tclconfig}" in
1498                     */tclConfig.sh )
1499                         if test -f "${with_tclconfig}"; then
1500                             { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1501 echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1502                             with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1503                         fi ;;
1504                 esac
1505                 if test -f "${with_tclconfig}/tclConfig.sh" ; then
1506                     ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1507                 else
1508                     { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1509 echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1510    { (exit 1); exit 1; }; }
1511                 fi
1512             fi
1513
1514             # then check for a private Tcl installation
1515             if test x"${ac_cv_c_tclconfig}" = x ; then
1516                 for i in \
1517                         ../tcl \
1518                         `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1519                         `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1520                         `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1521                         ../../tcl \
1522                         `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1523                         `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1524                         `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1525                         ../../../tcl \
1526                         `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1527                         `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
1528                         `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
1529                     if test "${TEA_PLATFORM}" = "windows" \
1530                             -a -f "$i/win/tclConfig.sh" ; then
1531                         ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1532                         break
1533                     fi
1534                     if test -f "$i/unix/tclConfig.sh" ; then
1535                         ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1536                         break
1537                     fi
1538                 done
1539             fi
1540
1541             # on Darwin, check in Framework installation locations
1542             if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
1543                 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
1544                         `ls -d /Library/Frameworks 2>/dev/null` \
1545                         `ls -d /Network/Library/Frameworks 2>/dev/null` \
1546                         `ls -d /System/Library/Frameworks 2>/dev/null` \
1547                         ; do
1548                     if test -f "$i/Tcl.framework/tclConfig.sh" ; then
1549                         ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
1550                         break
1551                     fi
1552                 done
1553             fi
1554
1555             # TEA specific: on Windows, check in common installation locations
1556             if test "${TEA_PLATFORM}" = "windows" \
1557                 -a x"${ac_cv_c_tclconfig}" = x ; then
1558                 for i in `ls -d C:/Tcl/lib 2>/dev/null` \
1559                         `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
1560                         ; do
1561                     if test -f "$i/tclConfig.sh" ; then
1562                         ac_cv_c_tclconfig="`(cd $i; pwd)`"
1563                         break
1564                     fi
1565                 done
1566             fi
1567
1568             # check in a few common install locations
1569             if test x"${ac_cv_c_tclconfig}" = x ; then
1570                 for i in `ls -d ${libdir} 2>/dev/null` \
1571                         `ls -d ${exec_prefix}/lib 2>/dev/null` \
1572                         `ls -d ${prefix}/lib 2>/dev/null` \
1573                         `ls -d /usr/local/lib 2>/dev/null` \
1574                         `ls -d /usr/contrib/lib 2>/dev/null` \
1575                         `ls -d /usr/lib 2>/dev/null` \
1576                         `ls -d /usr/lib64 2>/dev/null` \
1577                         ; do
1578                     if test -f "$i/tclConfig.sh" ; then
1579                         ac_cv_c_tclconfig="`(cd $i; pwd)`"
1580                         break
1581                     fi
1582                 done
1583             fi
1584
1585             # check in a few other private locations
1586             if test x"${ac_cv_c_tclconfig}" = x ; then
1587                 for i in \
1588                         ${srcdir}/../tcl \
1589                         `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1590                         `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
1591                         `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
1592                     if test "${TEA_PLATFORM}" = "windows" \
1593                             -a -f "$i/win/tclConfig.sh" ; then
1594                         ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
1595                         break
1596                     fi
1597                     if test -f "$i/unix/tclConfig.sh" ; then
1598                         ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
1599                         break
1600                     fi
1601                 done
1602             fi
1603
1604 fi
1605
1606
1607         if test x"${ac_cv_c_tclconfig}" = x ; then
1608             TCL_BIN_DIR="# no Tcl configs found"
1609             { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
1610 echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
1611    { (exit 1); exit 1; }; }
1612         else
1613             no_tcl=
1614             TCL_BIN_DIR="${ac_cv_c_tclconfig}"
1615             echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
1616 echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
1617         fi
1618     fi
1619
1620
1621     echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
1622 echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
1623
1624     if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
1625         echo "$as_me:$LINENO: result: loading" >&5
1626 echo "${ECHO_T}loading" >&6
1627         . "${TCL_BIN_DIR}/tclConfig.sh"
1628     else
1629         echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
1630 echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
1631     fi
1632
1633     # eval is required to do the TCL_DBGX substitution
1634     eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
1635     eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
1636
1637     # If the TCL_BIN_DIR is the build directory (not the install directory),
1638     # then set the common variable name to the value of the build variables.
1639     # For example, the variable TCL_LIB_SPEC will be set to the value
1640     # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
1641     # instead of TCL_BUILD_LIB_SPEC since it will work with both an
1642     # installed and uninstalled version of Tcl.
1643     if test -f "${TCL_BIN_DIR}/Makefile" ; then
1644         TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
1645         TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
1646         TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
1647     elif test "`uname -s`" = "Darwin"; then
1648         # If Tcl was built as a framework, attempt to use the libraries
1649         # from the framework at the given location so that linking works
1650         # against Tcl.framework installed in an arbitrary location.
1651         case ${TCL_DEFS} in
1652             *TCL_FRAMEWORK*)
1653                 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
1654                     for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
1655                              "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
1656                         if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
1657                             TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
1658                             break
1659                         fi
1660                     done
1661                 fi
1662                 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
1663                     TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
1664                     TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
1665                 fi
1666                 ;;
1667         esac
1668     fi
1669
1670     # eval is required to do the TCL_DBGX substitution
1671     eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
1672     eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
1673     eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
1674     eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689     case "`uname -s`" in
1690         *CYGWIN_*)
1691             echo "$as_me:$LINENO: checking for cygwin variant" >&5
1692 echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6
1693             case ${TCL_EXTRA_CFLAGS} in
1694                 *-mwin32*|*-mno-cygwin*)
1695                     TEA_PLATFORM="windows"
1696                     CFLAGS="$CFLAGS -mwin32"
1697                     echo "$as_me:$LINENO: result: win32" >&5
1698 echo "${ECHO_T}win32" >&6
1699                     ;;
1700                 *)
1701                     TEA_PLATFORM="unix"
1702                     echo "$as_me:$LINENO: result: unix" >&5
1703 echo "${ECHO_T}unix" >&6
1704                     ;;
1705             esac
1706             EXEEXT=".exe"
1707             ;;
1708         *)
1709             ;;
1710     esac
1711
1712     # The BUILD_$pkg is to define the correct extern storage class
1713     # handling when making this package
1714
1715 cat >>confdefs.h <<_ACEOF
1716 #define BUILD_${PACKAGE_NAME}
1717 _ACEOF
1718
1719     # Do this here as we have fully defined TEA_PLATFORM now
1720     if test "${TEA_PLATFORM}" = "windows" ; then
1721         CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
1722     fi
1723
1724     # TEA specific:
1725
1726
1727
1728
1729
1730
1731
1732
1733 # expectk has been removed from the distribution as Tcl has supported
1734 # dynamic extensions everywhere for a while.  We still allow 'expect'
1735 # to be built for the die-hard users, but expectk is just wish with
1736 # package require Expect
1737 if test "${with_tk+set}" = set ; then
1738     { echo "$as_me:$LINENO: WARNING: With Tk request ignored - use package require Tk & Expect" >&5
1739 echo "$as_me: WARNING: With Tk request ignored - use package require Tk & Expect" >&2;}
1740 fi
1741
1742 #-----------------------------------------------------------------------
1743 # Handle the --prefix=... option by defaulting to what Tcl gave.
1744 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
1745 #-----------------------------------------------------------------------
1746
1747
1748     if test "${prefix}" = "NONE"; then
1749         prefix_default=yes
1750         if test x"${TCL_PREFIX}" != x; then
1751             { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
1752 echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
1753             prefix=${TCL_PREFIX}
1754         else
1755             { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
1756 echo "$as_me: --prefix defaulting to /usr/local" >&6;}
1757             prefix=/usr/local
1758         fi
1759     fi
1760     if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
1761         -o x"${exec_prefix_default}" = x"yes" ; then
1762         if test x"${TCL_EXEC_PREFIX}" != x; then
1763             { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
1764 echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
1765             exec_prefix=${TCL_EXEC_PREFIX}
1766         else
1767             { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
1768 echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
1769             exec_prefix=$prefix
1770         fi
1771     fi
1772
1773
1774 #-----------------------------------------------------------------------
1775 # Standard compiler checks.
1776 # This sets up CC by using the CC env var, or looks for gcc otherwise.
1777 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
1778 # the basic setup necessary to compile executables.
1779 #-----------------------------------------------------------------------
1780
1781
1782     # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
1783     # in this macro, they need to go into TEA_SETUP_COMPILER instead.
1784
1785     # If the user did not set CFLAGS, set it now to keep
1786     # the AC_PROG_CC macro from adding "-g -O2".
1787     if test "${CFLAGS+set}" != "set" ; then
1788         CFLAGS=""
1789     fi
1790
1791     ac_ext=c
1792 ac_cpp='$CPP $CPPFLAGS'
1793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1796 if test -n "$ac_tool_prefix"; then
1797   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1798 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1799 echo "$as_me:$LINENO: checking for $ac_word" >&5
1800 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1801 if test "${ac_cv_prog_CC+set}" = set; then
1802   echo $ECHO_N "(cached) $ECHO_C" >&6
1803 else
1804   if test -n "$CC"; then
1805   ac_cv_prog_CC="$CC" # Let the user override the test.
1806 else
1807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1808 for as_dir in $PATH
1809 do
1810   IFS=$as_save_IFS
1811   test -z "$as_dir" && as_dir=.
1812   for ac_exec_ext in '' $ac_executable_extensions; do
1813   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1814     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1815     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1816     break 2
1817   fi
1818 done
1819 done
1820
1821 fi
1822 fi
1823 CC=$ac_cv_prog_CC
1824 if test -n "$CC"; then
1825   echo "$as_me:$LINENO: result: $CC" >&5
1826 echo "${ECHO_T}$CC" >&6
1827 else
1828   echo "$as_me:$LINENO: result: no" >&5
1829 echo "${ECHO_T}no" >&6
1830 fi
1831
1832 fi
1833 if test -z "$ac_cv_prog_CC"; then
1834   ac_ct_CC=$CC
1835   # Extract the first word of "gcc", so it can be a program name with args.
1836 set dummy gcc; ac_word=$2
1837 echo "$as_me:$LINENO: checking for $ac_word" >&5
1838 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1839 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1840   echo $ECHO_N "(cached) $ECHO_C" >&6
1841 else
1842   if test -n "$ac_ct_CC"; then
1843   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1844 else
1845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1846 for as_dir in $PATH
1847 do
1848   IFS=$as_save_IFS
1849   test -z "$as_dir" && as_dir=.
1850   for ac_exec_ext in '' $ac_executable_extensions; do
1851   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1852     ac_cv_prog_ac_ct_CC="gcc"
1853     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1854     break 2
1855   fi
1856 done
1857 done
1858
1859 fi
1860 fi
1861 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1862 if test -n "$ac_ct_CC"; then
1863   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1864 echo "${ECHO_T}$ac_ct_CC" >&6
1865 else
1866   echo "$as_me:$LINENO: result: no" >&5
1867 echo "${ECHO_T}no" >&6
1868 fi
1869
1870   CC=$ac_ct_CC
1871 else
1872   CC="$ac_cv_prog_CC"
1873 fi
1874
1875 if test -z "$CC"; then
1876   if test -n "$ac_tool_prefix"; then
1877   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1878 set dummy ${ac_tool_prefix}cc; ac_word=$2
1879 echo "$as_me:$LINENO: checking for $ac_word" >&5
1880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1881 if test "${ac_cv_prog_CC+set}" = set; then
1882   echo $ECHO_N "(cached) $ECHO_C" >&6
1883 else
1884   if test -n "$CC"; then
1885   ac_cv_prog_CC="$CC" # Let the user override the test.
1886 else
1887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1888 for as_dir in $PATH
1889 do
1890   IFS=$as_save_IFS
1891   test -z "$as_dir" && as_dir=.
1892   for ac_exec_ext in '' $ac_executable_extensions; do
1893   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1894     ac_cv_prog_CC="${ac_tool_prefix}cc"
1895     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1896     break 2
1897   fi
1898 done
1899 done
1900
1901 fi
1902 fi
1903 CC=$ac_cv_prog_CC
1904 if test -n "$CC"; then
1905   echo "$as_me:$LINENO: result: $CC" >&5
1906 echo "${ECHO_T}$CC" >&6
1907 else
1908   echo "$as_me:$LINENO: result: no" >&5
1909 echo "${ECHO_T}no" >&6
1910 fi
1911
1912 fi
1913 if test -z "$ac_cv_prog_CC"; then
1914   ac_ct_CC=$CC
1915   # Extract the first word of "cc", so it can be a program name with args.
1916 set dummy cc; ac_word=$2
1917 echo "$as_me:$LINENO: checking for $ac_word" >&5
1918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1919 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1920   echo $ECHO_N "(cached) $ECHO_C" >&6
1921 else
1922   if test -n "$ac_ct_CC"; then
1923   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1924 else
1925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1926 for as_dir in $PATH
1927 do
1928   IFS=$as_save_IFS
1929   test -z "$as_dir" && as_dir=.
1930   for ac_exec_ext in '' $ac_executable_extensions; do
1931   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1932     ac_cv_prog_ac_ct_CC="cc"
1933     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1934     break 2
1935   fi
1936 done
1937 done
1938
1939 fi
1940 fi
1941 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1942 if test -n "$ac_ct_CC"; then
1943   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1944 echo "${ECHO_T}$ac_ct_CC" >&6
1945 else
1946   echo "$as_me:$LINENO: result: no" >&5
1947 echo "${ECHO_T}no" >&6
1948 fi
1949
1950   CC=$ac_ct_CC
1951 else
1952   CC="$ac_cv_prog_CC"
1953 fi
1954
1955 fi
1956 if test -z "$CC"; then
1957   # Extract the first word of "cc", so it can be a program name with args.
1958 set dummy cc; ac_word=$2
1959 echo "$as_me:$LINENO: checking for $ac_word" >&5
1960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1961 if test "${ac_cv_prog_CC+set}" = set; then
1962   echo $ECHO_N "(cached) $ECHO_C" >&6
1963 else
1964   if test -n "$CC"; then
1965   ac_cv_prog_CC="$CC" # Let the user override the test.
1966 else
1967   ac_prog_rejected=no
1968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1969 for as_dir in $PATH
1970 do
1971   IFS=$as_save_IFS
1972   test -z "$as_dir" && as_dir=.
1973   for ac_exec_ext in '' $ac_executable_extensions; do
1974   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1975     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1976        ac_prog_rejected=yes
1977        continue
1978      fi
1979     ac_cv_prog_CC="cc"
1980     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1981     break 2
1982   fi
1983 done
1984 done
1985
1986 if test $ac_prog_rejected = yes; then
1987   # We found a bogon in the path, so make sure we never use it.
1988   set dummy $ac_cv_prog_CC
1989   shift
1990   if test $# != 0; then
1991     # We chose a different compiler from the bogus one.
1992     # However, it has the same basename, so the bogon will be chosen
1993     # first if we set CC to just the basename; use the full file name.
1994     shift
1995     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1996   fi
1997 fi
1998 fi
1999 fi
2000 CC=$ac_cv_prog_CC
2001 if test -n "$CC"; then
2002   echo "$as_me:$LINENO: result: $CC" >&5
2003 echo "${ECHO_T}$CC" >&6
2004 else
2005   echo "$as_me:$LINENO: result: no" >&5
2006 echo "${ECHO_T}no" >&6
2007 fi
2008
2009 fi
2010 if test -z "$CC"; then
2011   if test -n "$ac_tool_prefix"; then
2012   for ac_prog in cl
2013   do
2014     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2015 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2016 echo "$as_me:$LINENO: checking for $ac_word" >&5
2017 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2018 if test "${ac_cv_prog_CC+set}" = set; then
2019   echo $ECHO_N "(cached) $ECHO_C" >&6
2020 else
2021   if test -n "$CC"; then
2022   ac_cv_prog_CC="$CC" # Let the user override the test.
2023 else
2024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2025 for as_dir in $PATH
2026 do
2027   IFS=$as_save_IFS
2028   test -z "$as_dir" && as_dir=.
2029   for ac_exec_ext in '' $ac_executable_extensions; do
2030   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2031     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2032     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2033     break 2
2034   fi
2035 done
2036 done
2037
2038 fi
2039 fi
2040 CC=$ac_cv_prog_CC
2041 if test -n "$CC"; then
2042   echo "$as_me:$LINENO: result: $CC" >&5
2043 echo "${ECHO_T}$CC" >&6
2044 else
2045   echo "$as_me:$LINENO: result: no" >&5
2046 echo "${ECHO_T}no" >&6
2047 fi
2048
2049     test -n "$CC" && break
2050   done
2051 fi
2052 if test -z "$CC"; then
2053   ac_ct_CC=$CC
2054   for ac_prog in cl
2055 do
2056   # Extract the first word of "$ac_prog", so it can be a program name with args.
2057 set dummy $ac_prog; ac_word=$2
2058 echo "$as_me:$LINENO: checking for $ac_word" >&5
2059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2060 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2061   echo $ECHO_N "(cached) $ECHO_C" >&6
2062 else
2063   if test -n "$ac_ct_CC"; then
2064   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2065 else
2066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2067 for as_dir in $PATH
2068 do
2069   IFS=$as_save_IFS
2070   test -z "$as_dir" && as_dir=.
2071   for ac_exec_ext in '' $ac_executable_extensions; do
2072   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2073     ac_cv_prog_ac_ct_CC="$ac_prog"
2074     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2075     break 2
2076   fi
2077 done
2078 done
2079
2080 fi
2081 fi
2082 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2083 if test -n "$ac_ct_CC"; then
2084   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2085 echo "${ECHO_T}$ac_ct_CC" >&6
2086 else
2087   echo "$as_me:$LINENO: result: no" >&5
2088 echo "${ECHO_T}no" >&6
2089 fi
2090
2091   test -n "$ac_ct_CC" && break
2092 done
2093
2094   CC=$ac_ct_CC
2095 fi
2096
2097 fi
2098
2099
2100 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2101 See \`config.log' for more details." >&5
2102 echo "$as_me: error: no acceptable C compiler found in \$PATH
2103 See \`config.log' for more details." >&2;}
2104    { (exit 1); exit 1; }; }
2105
2106 # Provide some information about the compiler.
2107 echo "$as_me:$LINENO:" \
2108      "checking for C compiler version" >&5
2109 ac_compiler=`set X $ac_compile; echo $2`
2110 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2111   (eval $ac_compiler --version </dev/null >&5) 2>&5
2112   ac_status=$?
2113   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2114   (exit $ac_status); }
2115 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2116   (eval $ac_compiler -v </dev/null >&5) 2>&5
2117   ac_status=$?
2118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2119   (exit $ac_status); }
2120 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2121   (eval $ac_compiler -V </dev/null >&5) 2>&5
2122   ac_status=$?
2123   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2124   (exit $ac_status); }
2125
2126 cat >conftest.$ac_ext <<_ACEOF
2127 /* confdefs.h.  */
2128 _ACEOF
2129 cat confdefs.h >>conftest.$ac_ext
2130 cat >>conftest.$ac_ext <<_ACEOF
2131 /* end confdefs.h.  */
2132
2133 int
2134 main ()
2135 {
2136
2137   ;
2138   return 0;
2139 }
2140 _ACEOF
2141 ac_clean_files_save=$ac_clean_files
2142 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2143 # Try to create an executable without -o first, disregard a.out.
2144 # It will help us diagnose broken compilers, and finding out an intuition
2145 # of exeext.
2146 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2147 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
2148 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2149 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2150   (eval $ac_link_default) 2>&5
2151   ac_status=$?
2152   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2153   (exit $ac_status); }; then
2154   # Find the output, starting from the most likely.  This scheme is
2155 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2156 # resort.
2157
2158 # Be careful to initialize this variable, since it used to be cached.
2159 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2160 ac_cv_exeext=
2161 # b.out is created by i960 compilers.
2162 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2163 do
2164   test -f "$ac_file" || continue
2165   case $ac_file in
2166     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2167         ;;
2168     conftest.$ac_ext )
2169         # This is the source file.
2170         ;;
2171     [ab].out )
2172         # We found the default executable, but exeext='' is most
2173         # certainly right.
2174         break;;
2175     *.* )
2176         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2177         # FIXME: I believe we export ac_cv_exeext for Libtool,
2178         # but it would be cool to find out if it's true.  Does anybody
2179         # maintain Libtool? --akim.
2180         export ac_cv_exeext
2181         break;;
2182     * )
2183         break;;
2184   esac
2185 done
2186 else
2187   echo "$as_me: failed program was:" >&5
2188 sed 's/^/| /' conftest.$ac_ext >&5
2189
2190 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2191 See \`config.log' for more details." >&5
2192 echo "$as_me: error: C compiler cannot create executables
2193 See \`config.log' for more details." >&2;}
2194    { (exit 77); exit 77; }; }
2195 fi
2196
2197 ac_exeext=$ac_cv_exeext
2198 echo "$as_me:$LINENO: result: $ac_file" >&5
2199 echo "${ECHO_T}$ac_file" >&6
2200
2201 # Check the compiler produces executables we can run.  If not, either
2202 # the compiler is broken, or we cross compile.
2203 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2204 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2205 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2206 # If not cross compiling, check that we can run a simple program.
2207 if test "$cross_compiling" != yes; then
2208   if { ac_try='./$ac_file'
2209   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2210   (eval $ac_try) 2>&5
2211   ac_status=$?
2212   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2213   (exit $ac_status); }; }; then
2214     cross_compiling=no
2215   else
2216     if test "$cross_compiling" = maybe; then
2217         cross_compiling=yes
2218     else
2219         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2220 If you meant to cross compile, use \`--host'.
2221 See \`config.log' for more details." >&5
2222 echo "$as_me: error: cannot run C compiled programs.
2223 If you meant to cross compile, use \`--host'.
2224 See \`config.log' for more details." >&2;}
2225    { (exit 1); exit 1; }; }
2226     fi
2227   fi
2228 fi
2229 echo "$as_me:$LINENO: result: yes" >&5
2230 echo "${ECHO_T}yes" >&6
2231
2232 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2233 ac_clean_files=$ac_clean_files_save
2234 # Check the compiler produces executables we can run.  If not, either
2235 # the compiler is broken, or we cross compile.
2236 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2237 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2238 echo "$as_me:$LINENO: result: $cross_compiling" >&5
2239 echo "${ECHO_T}$cross_compiling" >&6
2240
2241 echo "$as_me:$LINENO: checking for suffix of executables" >&5
2242 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2243 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2244   (eval $ac_link) 2>&5
2245   ac_status=$?
2246   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2247   (exit $ac_status); }; then
2248   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2249 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2250 # work properly (i.e., refer to `conftest.exe'), while it won't with
2251 # `rm'.
2252 for ac_file in conftest.exe conftest conftest.*; do
2253   test -f "$ac_file" || continue
2254   case $ac_file in
2255     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
2256     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2257           export ac_cv_exeext
2258           break;;
2259     * ) break;;
2260   esac
2261 done
2262 else
2263   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2264 See \`config.log' for more details." >&5
2265 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2266 See \`config.log' for more details." >&2;}
2267    { (exit 1); exit 1; }; }
2268 fi
2269
2270 rm -f conftest$ac_cv_exeext
2271 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2272 echo "${ECHO_T}$ac_cv_exeext" >&6
2273
2274 rm -f conftest.$ac_ext
2275 EXEEXT=$ac_cv_exeext
2276 ac_exeext=$EXEEXT
2277 echo "$as_me:$LINENO: checking for suffix of object files" >&5
2278 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2279 if test "${ac_cv_objext+set}" = set; then
2280   echo $ECHO_N "(cached) $ECHO_C" >&6
2281 else
2282   cat >conftest.$ac_ext <<_ACEOF
2283 /* confdefs.h.  */
2284 _ACEOF
2285 cat confdefs.h >>conftest.$ac_ext
2286 cat >>conftest.$ac_ext <<_ACEOF
2287 /* end confdefs.h.  */
2288
2289 int
2290 main ()
2291 {
2292
2293   ;
2294   return 0;
2295 }
2296 _ACEOF
2297 rm -f conftest.o conftest.obj
2298 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2299   (eval $ac_compile) 2>&5
2300   ac_status=$?
2301   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2302   (exit $ac_status); }; then
2303   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2304   case $ac_file in
2305     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
2306     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2307        break;;
2308   esac
2309 done
2310 else
2311   echo "$as_me: failed program was:" >&5
2312 sed 's/^/| /' conftest.$ac_ext >&5
2313
2314 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2315 See \`config.log' for more details." >&5
2316 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2317 See \`config.log' for more details." >&2;}
2318    { (exit 1); exit 1; }; }
2319 fi
2320
2321 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2322 fi
2323 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2324 echo "${ECHO_T}$ac_cv_objext" >&6
2325 OBJEXT=$ac_cv_objext
2326 ac_objext=$OBJEXT
2327 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2328 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2329 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2330   echo $ECHO_N "(cached) $ECHO_C" >&6
2331 else
2332   cat >conftest.$ac_ext <<_ACEOF
2333 /* confdefs.h.  */
2334 _ACEOF
2335 cat confdefs.h >>conftest.$ac_ext
2336 cat >>conftest.$ac_ext <<_ACEOF
2337 /* end confdefs.h.  */
2338
2339 int
2340 main ()
2341 {
2342 #ifndef __GNUC__
2343        choke me
2344 #endif
2345
2346   ;
2347   return 0;
2348 }
2349 _ACEOF
2350 rm -f conftest.$ac_objext
2351 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2352   (eval $ac_compile) 2>conftest.er1
2353   ac_status=$?
2354   grep -v '^ *+' conftest.er1 >conftest.err
2355   rm -f conftest.er1
2356   cat conftest.err >&5
2357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2358   (exit $ac_status); } &&
2359          { ac_try='test -z "$ac_c_werror_flag"
2360                          || test ! -s conftest.err'
2361   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2365   (exit $ac_status); }; } &&
2366          { ac_try='test -s conftest.$ac_objext'
2367   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2368   (eval $ac_try) 2>&5
2369   ac_status=$?
2370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2371   (exit $ac_status); }; }; then
2372   ac_compiler_gnu=yes
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 sed 's/^/| /' conftest.$ac_ext >&5
2376
2377 ac_compiler_gnu=no
2378 fi
2379 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2380 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2381
2382 fi
2383 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2384 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2385 GCC=`test $ac_compiler_gnu = yes && echo yes`
2386 ac_test_CFLAGS=${CFLAGS+set}
2387 ac_save_CFLAGS=$CFLAGS
2388 CFLAGS="-g"
2389 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2390 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2391 if test "${ac_cv_prog_cc_g+set}" = set; then
2392   echo $ECHO_N "(cached) $ECHO_C" >&6
2393 else
2394   cat >conftest.$ac_ext <<_ACEOF
2395 /* confdefs.h.  */
2396 _ACEOF
2397 cat confdefs.h >>conftest.$ac_ext
2398 cat >>conftest.$ac_ext <<_ACEOF
2399 /* end confdefs.h.  */
2400
2401 int
2402 main ()
2403 {
2404
2405   ;
2406   return 0;
2407 }
2408 _ACEOF
2409 rm -f conftest.$ac_objext
2410 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2411   (eval $ac_compile) 2>conftest.er1
2412   ac_status=$?
2413   grep -v '^ *+' conftest.er1 >conftest.err
2414   rm -f conftest.er1
2415   cat conftest.err >&5
2416   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2417   (exit $ac_status); } &&
2418          { ac_try='test -z "$ac_c_werror_flag"
2419                          || test ! -s conftest.err'
2420   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2421   (eval $ac_try) 2>&5
2422   ac_status=$?
2423   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2424   (exit $ac_status); }; } &&
2425          { ac_try='test -s conftest.$ac_objext'
2426   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2427   (eval $ac_try) 2>&5
2428   ac_status=$?
2429   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2430   (exit $ac_status); }; }; then
2431   ac_cv_prog_cc_g=yes
2432 else
2433   echo "$as_me: failed program was:" >&5
2434 sed 's/^/| /' conftest.$ac_ext >&5
2435
2436 ac_cv_prog_cc_g=no
2437 fi
2438 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2439 fi
2440 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2441 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2442 if test "$ac_test_CFLAGS" = set; then
2443   CFLAGS=$ac_save_CFLAGS
2444 elif test $ac_cv_prog_cc_g = yes; then
2445   if test "$GCC" = yes; then
2446     CFLAGS="-g -O2"
2447   else
2448     CFLAGS="-g"
2449   fi
2450 else
2451   if test "$GCC" = yes; then
2452     CFLAGS="-O2"
2453   else
2454     CFLAGS=
2455   fi
2456 fi
2457 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2458 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2459 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462   ac_cv_prog_cc_stdc=no
2463 ac_save_CC=$CC
2464 cat >conftest.$ac_ext <<_ACEOF
2465 /* confdefs.h.  */
2466 _ACEOF
2467 cat confdefs.h >>conftest.$ac_ext
2468 cat >>conftest.$ac_ext <<_ACEOF
2469 /* end confdefs.h.  */
2470 #include <stdarg.h>
2471 #include <stdio.h>
2472 #include <sys/types.h>
2473 #include <sys/stat.h>
2474 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2475 struct buf { int x; };
2476 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2477 static char *e (p, i)
2478      char **p;
2479      int i;
2480 {
2481   return p[i];
2482 }
2483 static char *f (char * (*g) (char **, int), char **p, ...)
2484 {
2485   char *s;
2486   va_list v;
2487   va_start (v,p);
2488   s = g (p, va_arg (v,int));
2489   va_end (v);
2490   return s;
2491 }
2492
2493 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2494    function prototypes and stuff, but not '\xHH' hex character constants.
2495    These don't provoke an error unfortunately, instead are silently treated
2496    as 'x'.  The following induces an error, until -std1 is added to get
2497    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
2498    array size at least.  It's necessary to write '\x00'==0 to get something
2499    that's true only with -std1.  */
2500 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2501
2502 int test (int i, double x);
2503 struct s1 {int (*f) (int a);};
2504 struct s2 {int (*f) (double a);};
2505 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2506 int argc;
2507 char **argv;
2508 int
2509 main ()
2510 {
2511 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2512   ;
2513   return 0;
2514 }
2515 _ACEOF
2516 # Don't try gcc -ansi; that turns off useful extensions and
2517 # breaks some systems' header files.
2518 # AIX                   -qlanglvl=ansi
2519 # Ultrix and OSF/1      -std1
2520 # HP-UX 10.20 and later -Ae
2521 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2522 # SVR4                  -Xc -D__EXTENSIONS__
2523 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2524 do
2525   CC="$ac_save_CC $ac_arg"
2526   rm -f conftest.$ac_objext
2527 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2528   (eval $ac_compile) 2>conftest.er1
2529   ac_status=$?
2530   grep -v '^ *+' conftest.er1 >conftest.err
2531   rm -f conftest.er1
2532   cat conftest.err >&5
2533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2534   (exit $ac_status); } &&
2535          { ac_try='test -z "$ac_c_werror_flag"
2536                          || test ! -s conftest.err'
2537   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2538   (eval $ac_try) 2>&5
2539   ac_status=$?
2540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541   (exit $ac_status); }; } &&
2542          { ac_try='test -s conftest.$ac_objext'
2543   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2544   (eval $ac_try) 2>&5
2545   ac_status=$?
2546   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2547   (exit $ac_status); }; }; then
2548   ac_cv_prog_cc_stdc=$ac_arg
2549 break
2550 else
2551   echo "$as_me: failed program was:" >&5
2552 sed 's/^/| /' conftest.$ac_ext >&5
2553
2554 fi
2555 rm -f conftest.err conftest.$ac_objext
2556 done
2557 rm -f conftest.$ac_ext conftest.$ac_objext
2558 CC=$ac_save_CC
2559
2560 fi
2561
2562 case "x$ac_cv_prog_cc_stdc" in
2563   x|xno)
2564     echo "$as_me:$LINENO: result: none needed" >&5
2565 echo "${ECHO_T}none needed" >&6 ;;
2566   *)
2567     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2568 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2569     CC="$CC $ac_cv_prog_cc_stdc" ;;
2570 esac
2571
2572 # Some people use a C++ compiler to compile C.  Since we use `exit',
2573 # in C++ we need to declare it.  In case someone uses the same compiler
2574 # for both compiling C and C++ we need to have the C++ compiler decide
2575 # the declaration of exit, since it's the most demanding environment.
2576 cat >conftest.$ac_ext <<_ACEOF
2577 #ifndef __cplusplus
2578   choke me
2579 #endif
2580 _ACEOF
2581 rm -f conftest.$ac_objext
2582 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2583   (eval $ac_compile) 2>conftest.er1
2584   ac_status=$?
2585   grep -v '^ *+' conftest.er1 >conftest.err
2586   rm -f conftest.er1
2587   cat conftest.err >&5
2588   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2589   (exit $ac_status); } &&
2590          { ac_try='test -z "$ac_c_werror_flag"
2591                          || test ! -s conftest.err'
2592   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2593   (eval $ac_try) 2>&5
2594   ac_status=$?
2595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2596   (exit $ac_status); }; } &&
2597          { ac_try='test -s conftest.$ac_objext'
2598   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2599   (eval $ac_try) 2>&5
2600   ac_status=$?
2601   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2602   (exit $ac_status); }; }; then
2603   for ac_declaration in \
2604    '' \
2605    'extern "C" void std::exit (int) throw (); using std::exit;' \
2606    'extern "C" void std::exit (int); using std::exit;' \
2607    'extern "C" void exit (int) throw ();' \
2608    'extern "C" void exit (int);' \
2609    'void exit (int);'
2610 do
2611   cat >conftest.$ac_ext <<_ACEOF
2612 /* confdefs.h.  */
2613 _ACEOF
2614 cat confdefs.h >>conftest.$ac_ext
2615 cat >>conftest.$ac_ext <<_ACEOF
2616 /* end confdefs.h.  */
2617 $ac_declaration
2618 #include <stdlib.h>
2619 int
2620 main ()
2621 {
2622 exit (42);
2623   ;
2624   return 0;
2625 }
2626 _ACEOF
2627 rm -f conftest.$ac_objext
2628 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2629   (eval $ac_compile) 2>conftest.er1
2630   ac_status=$?
2631   grep -v '^ *+' conftest.er1 >conftest.err
2632   rm -f conftest.er1
2633   cat conftest.err >&5
2634   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2635   (exit $ac_status); } &&
2636          { ac_try='test -z "$ac_c_werror_flag"
2637                          || test ! -s conftest.err'
2638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639   (eval $ac_try) 2>&5
2640   ac_status=$?
2641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642   (exit $ac_status); }; } &&
2643          { ac_try='test -s conftest.$ac_objext'
2644   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2645   (eval $ac_try) 2>&5
2646   ac_status=$?
2647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2648   (exit $ac_status); }; }; then
2649   :
2650 else
2651   echo "$as_me: failed program was:" >&5
2652 sed 's/^/| /' conftest.$ac_ext >&5
2653
2654 continue
2655 fi
2656 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2657   cat >conftest.$ac_ext <<_ACEOF
2658 /* confdefs.h.  */
2659 _ACEOF
2660 cat confdefs.h >>conftest.$ac_ext
2661 cat >>conftest.$ac_ext <<_ACEOF
2662 /* end confdefs.h.  */
2663 $ac_declaration
2664 int
2665 main ()
2666 {
2667 exit (42);
2668   ;
2669   return 0;
2670 }
2671 _ACEOF
2672 rm -f conftest.$ac_objext
2673 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2674   (eval $ac_compile) 2>conftest.er1
2675   ac_status=$?
2676   grep -v '^ *+' conftest.er1 >conftest.err
2677   rm -f conftest.er1
2678   cat conftest.err >&5
2679   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2680   (exit $ac_status); } &&
2681          { ac_try='test -z "$ac_c_werror_flag"
2682                          || test ! -s conftest.err'
2683   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684   (eval $ac_try) 2>&5
2685   ac_status=$?
2686   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2687   (exit $ac_status); }; } &&
2688          { ac_try='test -s conftest.$ac_objext'
2689   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2690   (eval $ac_try) 2>&5
2691   ac_status=$?
2692   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2693   (exit $ac_status); }; }; then
2694   break
2695 else
2696   echo "$as_me: failed program was:" >&5
2697 sed 's/^/| /' conftest.$ac_ext >&5
2698
2699 fi
2700 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2701 done
2702 rm -f conftest*
2703 if test -n "$ac_declaration"; then
2704   echo '#ifdef __cplusplus' >>confdefs.h
2705   echo $ac_declaration      >>confdefs.h
2706   echo '#endif'             >>confdefs.h
2707 fi
2708
2709 else
2710   echo "$as_me: failed program was:" >&5
2711 sed 's/^/| /' conftest.$ac_ext >&5
2712
2713 fi
2714 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2715 ac_ext=c
2716 ac_cpp='$CPP $CPPFLAGS'
2717 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2718 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2719 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2720
2721     ac_ext=c
2722 ac_cpp='$CPP $CPPFLAGS'
2723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2726 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2727 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2728 # On Suns, sometimes $CPP names a directory.
2729 if test -n "$CPP" && test -d "$CPP"; then
2730   CPP=
2731 fi
2732 if test -z "$CPP"; then
2733   if test "${ac_cv_prog_CPP+set}" = set; then
2734   echo $ECHO_N "(cached) $ECHO_C" >&6
2735 else
2736       # Double quotes because CPP needs to be expanded
2737     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2738     do
2739       ac_preproc_ok=false
2740 for ac_c_preproc_warn_flag in '' yes
2741 do
2742   # Use a header file that comes with gcc, so configuring glibc
2743   # with a fresh cross-compiler works.
2744   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2745   # <limits.h> exists even on freestanding compilers.
2746   # On the NeXT, cc -E runs the code through the compiler's parser,
2747   # not just through cpp. "Syntax error" is here to catch this case.
2748   cat >conftest.$ac_ext <<_ACEOF
2749 /* confdefs.h.  */
2750 _ACEOF
2751 cat confdefs.h >>conftest.$ac_ext
2752 cat >>conftest.$ac_ext <<_ACEOF
2753 /* end confdefs.h.  */
2754 #ifdef __STDC__
2755 # include <limits.h>
2756 #else
2757 # include <assert.h>
2758 #endif
2759                      Syntax error
2760 _ACEOF
2761 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2763   ac_status=$?
2764   grep -v '^ *+' conftest.er1 >conftest.err
2765   rm -f conftest.er1
2766   cat conftest.err >&5
2767   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2768   (exit $ac_status); } >/dev/null; then
2769   if test -s conftest.err; then
2770     ac_cpp_err=$ac_c_preproc_warn_flag
2771     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2772   else
2773     ac_cpp_err=
2774   fi
2775 else
2776   ac_cpp_err=yes
2777 fi
2778 if test -z "$ac_cpp_err"; then
2779   :
2780 else
2781   echo "$as_me: failed program was:" >&5
2782 sed 's/^/| /' conftest.$ac_ext >&5
2783
2784   # Broken: fails on valid input.
2785 continue
2786 fi
2787 rm -f conftest.err conftest.$ac_ext
2788
2789   # OK, works on sane cases.  Now check whether non-existent headers
2790   # can be detected and how.
2791   cat >conftest.$ac_ext <<_ACEOF
2792 /* confdefs.h.  */
2793 _ACEOF
2794 cat confdefs.h >>conftest.$ac_ext
2795 cat >>conftest.$ac_ext <<_ACEOF
2796 /* end confdefs.h.  */
2797 #include <ac_nonexistent.h>
2798 _ACEOF
2799 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2801   ac_status=$?
2802   grep -v '^ *+' conftest.er1 >conftest.err
2803   rm -f conftest.er1
2804   cat conftest.err >&5
2805   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2806   (exit $ac_status); } >/dev/null; then
2807   if test -s conftest.err; then
2808     ac_cpp_err=$ac_c_preproc_warn_flag
2809     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2810   else
2811     ac_cpp_err=
2812   fi
2813 else
2814   ac_cpp_err=yes
2815 fi
2816 if test -z "$ac_cpp_err"; then
2817   # Broken: success on invalid input.
2818 continue
2819 else
2820   echo "$as_me: failed program was:" >&5
2821 sed 's/^/| /' conftest.$ac_ext >&5
2822
2823   # Passes both tests.
2824 ac_preproc_ok=:
2825 break
2826 fi
2827 rm -f conftest.err conftest.$ac_ext
2828
2829 done
2830 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2831 rm -f conftest.err conftest.$ac_ext
2832 if $ac_preproc_ok; then
2833   break
2834 fi
2835
2836     done
2837     ac_cv_prog_CPP=$CPP
2838
2839 fi
2840   CPP=$ac_cv_prog_CPP
2841 else
2842   ac_cv_prog_CPP=$CPP
2843 fi
2844 echo "$as_me:$LINENO: result: $CPP" >&5
2845 echo "${ECHO_T}$CPP" >&6
2846 ac_preproc_ok=false
2847 for ac_c_preproc_warn_flag in '' yes
2848 do
2849   # Use a header file that comes with gcc, so configuring glibc
2850   # with a fresh cross-compiler works.
2851   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2852   # <limits.h> exists even on freestanding compilers.
2853   # On the NeXT, cc -E runs the code through the compiler's parser,
2854   # not just through cpp. "Syntax error" is here to catch this case.
2855   cat >conftest.$ac_ext <<_ACEOF
2856 /* confdefs.h.  */
2857 _ACEOF
2858 cat confdefs.h >>conftest.$ac_ext
2859 cat >>conftest.$ac_ext <<_ACEOF
2860 /* end confdefs.h.  */
2861 #ifdef __STDC__
2862 # include <limits.h>
2863 #else
2864 # include <assert.h>
2865 #endif
2866                      Syntax error
2867 _ACEOF
2868 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2870   ac_status=$?
2871   grep -v '^ *+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2875   (exit $ac_status); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2879   else
2880     ac_cpp_err=
2881   fi
2882 else
2883   ac_cpp_err=yes
2884 fi
2885 if test -z "$ac_cpp_err"; then
2886   :
2887 else
2888   echo "$as_me: failed program was:" >&5
2889 sed 's/^/| /' conftest.$ac_ext >&5
2890
2891   # Broken: fails on valid input.
2892 continue
2893 fi
2894 rm -f conftest.err conftest.$ac_ext
2895
2896   # OK, works on sane cases.  Now check whether non-existent headers
2897   # can be detected and how.
2898   cat >conftest.$ac_ext <<_ACEOF
2899 /* confdefs.h.  */
2900 _ACEOF
2901 cat confdefs.h >>conftest.$ac_ext
2902 cat >>conftest.$ac_ext <<_ACEOF
2903 /* end confdefs.h.  */
2904 #include <ac_nonexistent.h>
2905 _ACEOF
2906 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2907   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2908   ac_status=$?
2909   grep -v '^ *+' conftest.er1 >conftest.err
2910   rm -f conftest.er1
2911   cat conftest.err >&5
2912   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2913   (exit $ac_status); } >/dev/null; then
2914   if test -s conftest.err; then
2915     ac_cpp_err=$ac_c_preproc_warn_flag
2916     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2917   else
2918     ac_cpp_err=
2919   fi
2920 else
2921   ac_cpp_err=yes
2922 fi
2923 if test -z "$ac_cpp_err"; then
2924   # Broken: success on invalid input.
2925 continue
2926 else
2927   echo "$as_me: failed program was:" >&5
2928 sed 's/^/| /' conftest.$ac_ext >&5
2929
2930   # Passes both tests.
2931 ac_preproc_ok=:
2932 break
2933 fi
2934 rm -f conftest.err conftest.$ac_ext
2935
2936 done
2937 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2938 rm -f conftest.err conftest.$ac_ext
2939 if $ac_preproc_ok; then
2940   :
2941 else
2942   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2943 See \`config.log' for more details." >&5
2944 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2945 See \`config.log' for more details." >&2;}
2946    { (exit 1); exit 1; }; }
2947 fi
2948
2949 ac_ext=c
2950 ac_cpp='$CPP $CPPFLAGS'
2951 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2952 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2953 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2954
2955
2956     # Find a good install program.  We prefer a C program (faster),
2957 # so one script is as good as another.  But avoid the broken or
2958 # incompatible versions:
2959 # SysV /etc/install, /usr/sbin/install
2960 # SunOS /usr/etc/install
2961 # IRIX /sbin/install
2962 # AIX /bin/install
2963 # AmigaOS /C/install, which installs bootblocks on floppy discs
2964 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2965 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2966 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2967 # OS/2's system install, which has a completely different semantic
2968 # ./install, which can be erroneously created by make from ./install.sh.
2969 echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
2970 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
2971 if test -z "$INSTALL"; then
2972 if test "${ac_cv_path_install+set}" = set; then
2973   echo $ECHO_N "(cached) $ECHO_C" >&6
2974 else
2975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2976 for as_dir in $PATH
2977 do
2978   IFS=$as_save_IFS
2979   test -z "$as_dir" && as_dir=.
2980   # Account for people who put trailing slashes in PATH elements.
2981 case $as_dir/ in
2982   ./ | .// | /cC/* | \
2983   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2984   ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
2985   /usr/ucb/* ) ;;
2986   *)
2987     # OSF1 and SCO ODT 3.0 have their own names for install.
2988     # Don't use installbsd from OSF since it installs stuff as root
2989     # by default.
2990     for ac_prog in ginstall scoinst install; do
2991       for ac_exec_ext in '' $ac_executable_extensions; do
2992         if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2993           if test $ac_prog = install &&
2994             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2995             # AIX install.  It has an incompatible calling convention.
2996             :
2997           elif test $ac_prog = install &&
2998             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2999             # program-specific install script used by HP pwplus--don't use.
3000             :
3001           else
3002             ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3003             break 3
3004           fi
3005         fi
3006       done
3007     done
3008     ;;
3009 esac
3010 done
3011
3012
3013 fi
3014   if test "${ac_cv_path_install+set}" = set; then
3015     INSTALL=$ac_cv_path_install
3016   else
3017     # As a last resort, use the slow shell script.  We don't cache a
3018     # path for INSTALL within a source directory, because that will
3019     # break other packages using the cache if that directory is
3020     # removed, or if the path is relative.
3021     INSTALL=$ac_install_sh
3022   fi
3023 fi
3024 echo "$as_me:$LINENO: result: $INSTALL" >&5
3025 echo "${ECHO_T}$INSTALL" >&6
3026
3027 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3028 # It thinks the first close brace ends the variable substitution.
3029 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3030
3031 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3032
3033 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3034
3035
3036     #--------------------------------------------------------------------
3037     # Checks to see if the make program sets the $MAKE variable.
3038     #--------------------------------------------------------------------
3039
3040     echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3041 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
3042 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
3043 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3044   echo $ECHO_N "(cached) $ECHO_C" >&6
3045 else
3046   cat >conftest.make <<\_ACEOF
3047 all:
3048         @echo 'ac_maketemp="$(MAKE)"'
3049 _ACEOF
3050 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3051 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3052 if test -n "$ac_maketemp"; then
3053   eval ac_cv_prog_make_${ac_make}_set=yes
3054 else
3055   eval ac_cv_prog_make_${ac_make}_set=no
3056 fi
3057 rm -f conftest.make
3058 fi
3059 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3060   echo "$as_me:$LINENO: result: yes" >&5
3061 echo "${ECHO_T}yes" >&6
3062   SET_MAKE=
3063 else
3064   echo "$as_me:$LINENO: result: no" >&5
3065 echo "${ECHO_T}no" >&6
3066   SET_MAKE="MAKE=${MAKE-make}"
3067 fi
3068
3069
3070     #--------------------------------------------------------------------
3071     # Find ranlib
3072     #--------------------------------------------------------------------
3073
3074     if test -n "$ac_tool_prefix"; then
3075   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3076 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3077 echo "$as_me:$LINENO: checking for $ac_word" >&5
3078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3079 if test "${ac_cv_prog_RANLIB+set}" = set; then
3080   echo $ECHO_N "(cached) $ECHO_C" >&6
3081 else
3082   if test -n "$RANLIB"; then
3083   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3084 else
3085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3086 for as_dir in $PATH
3087 do
3088   IFS=$as_save_IFS
3089   test -z "$as_dir" && as_dir=.
3090   for ac_exec_ext in '' $ac_executable_extensions; do
3091   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3092     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3093     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3094     break 2
3095   fi
3096 done
3097 done
3098
3099 fi
3100 fi
3101 RANLIB=$ac_cv_prog_RANLIB
3102 if test -n "$RANLIB"; then
3103   echo "$as_me:$LINENO: result: $RANLIB" >&5
3104 echo "${ECHO_T}$RANLIB" >&6
3105 else
3106   echo "$as_me:$LINENO: result: no" >&5
3107 echo "${ECHO_T}no" >&6
3108 fi
3109
3110 fi
3111 if test -z "$ac_cv_prog_RANLIB"; then
3112   ac_ct_RANLIB=$RANLIB
3113   # Extract the first word of "ranlib", so it can be a program name with args.
3114 set dummy ranlib; ac_word=$2
3115 echo "$as_me:$LINENO: checking for $ac_word" >&5
3116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3117 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3118   echo $ECHO_N "(cached) $ECHO_C" >&6
3119 else
3120   if test -n "$ac_ct_RANLIB"; then
3121   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3122 else
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126   IFS=$as_save_IFS
3127   test -z "$as_dir" && as_dir=.
3128   for ac_exec_ext in '' $ac_executable_extensions; do
3129   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3130     ac_cv_prog_ac_ct_RANLIB="ranlib"
3131     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3132     break 2
3133   fi
3134 done
3135 done
3136
3137   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3138 fi
3139 fi
3140 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3141 if test -n "$ac_ct_RANLIB"; then
3142   echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3143 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3144 else
3145   echo "$as_me:$LINENO: result: no" >&5
3146 echo "${ECHO_T}no" >&6
3147 fi
3148
3149   RANLIB=$ac_ct_RANLIB
3150 else
3151   RANLIB="$ac_cv_prog_RANLIB"
3152 fi
3153
3154
3155     #--------------------------------------------------------------------
3156     # Determines the correct binary file extension (.o, .obj, .exe etc.)
3157     #--------------------------------------------------------------------
3158
3159
3160
3161
3162
3163
3164 echo "$as_me:$LINENO: checking for egrep" >&5
3165 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3166 if test "${ac_cv_prog_egrep+set}" = set; then
3167   echo $ECHO_N "(cached) $ECHO_C" >&6
3168 else
3169   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3170     then ac_cv_prog_egrep='grep -E'
3171     else ac_cv_prog_egrep='egrep'
3172     fi
3173 fi
3174 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3175 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3176  EGREP=$ac_cv_prog_egrep
3177
3178
3179 echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3180 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
3181 if test "${ac_cv_header_stdc+set}" = set; then
3182   echo $ECHO_N "(cached) $ECHO_C" >&6
3183 else
3184   cat >conftest.$ac_ext <<_ACEOF
3185 /* confdefs.h.  */
3186 _ACEOF
3187 cat confdefs.h >>conftest.$ac_ext
3188 cat >>conftest.$ac_ext <<_ACEOF
3189 /* end confdefs.h.  */
3190 #include <stdlib.h>
3191 #include <stdarg.h>
3192 #include <string.h>
3193 #include <float.h>
3194
3195 int
3196 main ()
3197 {
3198
3199   ;
3200   return 0;
3201 }
3202 _ACEOF
3203 rm -f conftest.$ac_objext
3204 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3205   (eval $ac_compile) 2>conftest.er1
3206   ac_status=$?
3207   grep -v '^ *+' conftest.er1 >conftest.err
3208   rm -f conftest.er1
3209   cat conftest.err >&5
3210   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3211   (exit $ac_status); } &&
3212          { ac_try='test -z "$ac_c_werror_flag"
3213                          || test ! -s conftest.err'
3214   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3215   (eval $ac_try) 2>&5
3216   ac_status=$?
3217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3218   (exit $ac_status); }; } &&
3219          { ac_try='test -s conftest.$ac_objext'
3220   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3221   (eval $ac_try) 2>&5
3222   ac_status=$?
3223   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3224   (exit $ac_status); }; }; then
3225   ac_cv_header_stdc=yes
3226 else
3227   echo "$as_me: failed program was:" >&5
3228 sed 's/^/| /' conftest.$ac_ext >&5
3229
3230 ac_cv_header_stdc=no
3231 fi
3232 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3233
3234 if test $ac_cv_header_stdc = yes; then
3235   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3236   cat >conftest.$ac_ext <<_ACEOF
3237 /* confdefs.h.  */
3238 _ACEOF
3239 cat confdefs.h >>conftest.$ac_ext
3240 cat >>conftest.$ac_ext <<_ACEOF
3241 /* end confdefs.h.  */
3242 #include <string.h>
3243
3244 _ACEOF
3245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3246   $EGREP "memchr" >/dev/null 2>&1; then
3247   :
3248 else
3249   ac_cv_header_stdc=no
3250 fi
3251 rm -f conftest*
3252
3253 fi
3254
3255 if test $ac_cv_header_stdc = yes; then
3256   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3257   cat >conftest.$ac_ext <<_ACEOF
3258 /* confdefs.h.  */
3259 _ACEOF
3260 cat confdefs.h >>conftest.$ac_ext
3261 cat >>conftest.$ac_ext <<_ACEOF
3262 /* end confdefs.h.  */
3263 #include <stdlib.h>
3264
3265 _ACEOF
3266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3267   $EGREP "free" >/dev/null 2>&1; then
3268   :
3269 else
3270   ac_cv_header_stdc=no
3271 fi
3272 rm -f conftest*
3273
3274 fi
3275
3276 if test $ac_cv_header_stdc = yes; then
3277   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3278   if test "$cross_compiling" = yes; then
3279   :
3280 else
3281   cat >conftest.$ac_ext <<_ACEOF
3282 /* confdefs.h.  */
3283 _ACEOF
3284 cat confdefs.h >>conftest.$ac_ext
3285 cat >>conftest.$ac_ext <<_ACEOF
3286 /* end confdefs.h.  */
3287 #include <ctype.h>
3288 #if ((' ' & 0x0FF) == 0x020)
3289 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3290 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3291 #else
3292 # define ISLOWER(c) \
3293                    (('a' <= (c) && (c) <= 'i') \
3294                      || ('j' <= (c) && (c) <= 'r') \
3295                      || ('s' <= (c) && (c) <= 'z'))
3296 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3297 #endif
3298
3299 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3300 int
3301 main ()
3302 {
3303   int i;
3304   for (i = 0; i < 256; i++)
3305     if (XOR (islower (i), ISLOWER (i))
3306         || toupper (i) != TOUPPER (i))
3307       exit(2);
3308   exit (0);
3309 }
3310 _ACEOF
3311 rm -f conftest$ac_exeext
3312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3313   (eval $ac_link) 2>&5
3314   ac_status=$?
3315   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3316   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3318   (eval $ac_try) 2>&5
3319   ac_status=$?
3320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3321   (exit $ac_status); }; }; then
3322   :
3323 else
3324   echo "$as_me: program exited with status $ac_status" >&5
3325 echo "$as_me: failed program was:" >&5
3326 sed 's/^/| /' conftest.$ac_ext >&5
3327
3328 ( exit $ac_status )
3329 ac_cv_header_stdc=no
3330 fi
3331 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3332 fi
3333 fi
3334 fi
3335 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3336 echo "${ECHO_T}$ac_cv_header_stdc" >&6
3337 if test $ac_cv_header_stdc = yes; then
3338
3339 cat >>confdefs.h <<\_ACEOF
3340 #define STDC_HEADERS 1
3341 _ACEOF
3342
3343 fi
3344
3345 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3356                   inttypes.h stdint.h unistd.h
3357 do
3358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3359 echo "$as_me:$LINENO: checking for $ac_header" >&5
3360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3362   echo $ECHO_N "(cached) $ECHO_C" >&6
3363 else
3364   cat >conftest.$ac_ext <<_ACEOF
3365 /* confdefs.h.  */
3366 _ACEOF
3367 cat confdefs.h >>conftest.$ac_ext
3368 cat >>conftest.$ac_ext <<_ACEOF
3369 /* end confdefs.h.  */
3370 $ac_includes_default
3371
3372 #include <$ac_header>
3373 _ACEOF
3374 rm -f conftest.$ac_objext
3375 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3376   (eval $ac_compile) 2>conftest.er1
3377   ac_status=$?
3378   grep -v '^ *+' conftest.er1 >conftest.err
3379   rm -f conftest.er1
3380   cat conftest.err >&5
3381   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3382   (exit $ac_status); } &&
3383          { ac_try='test -z "$ac_c_werror_flag"
3384                          || test ! -s conftest.err'
3385   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3386   (eval $ac_try) 2>&5
3387   ac_status=$?
3388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3389   (exit $ac_status); }; } &&
3390          { ac_try='test -s conftest.$ac_objext'
3391   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3395   (exit $ac_status); }; }; then
3396   eval "$as_ac_Header=yes"
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 sed 's/^/| /' conftest.$ac_ext >&5
3400
3401 eval "$as_ac_Header=no"
3402 fi
3403 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3404 fi
3405 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
3406 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3407 if test `eval echo '${'$as_ac_Header'}'` = yes; then
3408   cat >>confdefs.h <<_ACEOF
3409 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3410 _ACEOF
3411
3412 fi
3413
3414 done
3415
3416
3417
3418     # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
3419
3420
3421     #------------------------------------------------------------------------
3422     # If we're using GCC, see if the compiler understands -pipe. If so, use it.
3423     # It makes compiling go faster.  (This is only a performance feature.)
3424     #------------------------------------------------------------------------
3425
3426     if test -z "$no_pipe" -a -n "$GCC"; then
3427         echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
3428 echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
3429 if test "${tcl_cv_cc_pipe+set}" = set; then
3430   echo $ECHO_N "(cached) $ECHO_C" >&6
3431 else
3432
3433             hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
3434             cat >conftest.$ac_ext <<_ACEOF
3435 /* confdefs.h.  */
3436 _ACEOF
3437 cat confdefs.h >>conftest.$ac_ext
3438 cat >>conftest.$ac_ext <<_ACEOF
3439 /* end confdefs.h.  */
3440
3441 int
3442 main ()
3443 {
3444
3445   ;
3446   return 0;
3447 }
3448 _ACEOF
3449 rm -f conftest.$ac_objext
3450 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3451   (eval $ac_compile) 2>conftest.er1
3452   ac_status=$?
3453   grep -v '^ *+' conftest.er1 >conftest.err
3454   rm -f conftest.er1
3455   cat conftest.err >&5
3456   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3457   (exit $ac_status); } &&
3458          { ac_try='test -z "$ac_c_werror_flag"
3459                          || test ! -s conftest.err'
3460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3461   (eval $ac_try) 2>&5
3462   ac_status=$?
3463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3464   (exit $ac_status); }; } &&
3465          { ac_try='test -s conftest.$ac_objext'
3466   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3467   (eval $ac_try) 2>&5
3468   ac_status=$?
3469   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3470   (exit $ac_status); }; }; then
3471   tcl_cv_cc_pipe=yes
3472 else
3473   echo "$as_me: failed program was:" >&5
3474 sed 's/^/| /' conftest.$ac_ext >&5
3475
3476 tcl_cv_cc_pipe=no
3477 fi
3478 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3479             CFLAGS=$hold_cflags
3480 fi
3481 echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
3482 echo "${ECHO_T}$tcl_cv_cc_pipe" >&6
3483         if test $tcl_cv_cc_pipe = yes; then
3484             CFLAGS="$CFLAGS -pipe"
3485         fi
3486     fi
3487
3488     #--------------------------------------------------------------------
3489     # Common compiler flag setup
3490     #--------------------------------------------------------------------
3491
3492     echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
3493 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
3494 if test "${ac_cv_c_bigendian+set}" = set; then
3495   echo $ECHO_N "(cached) $ECHO_C" >&6
3496 else
3497   # See if sys/param.h defines the BYTE_ORDER macro.
3498 cat >conftest.$ac_ext <<_ACEOF
3499 /* confdefs.h.  */
3500 _ACEOF
3501 cat confdefs.h >>conftest.$ac_ext
3502 cat >>conftest.$ac_ext <<_ACEOF
3503 /* end confdefs.h.  */
3504 #include <sys/types.h>
3505 #include <sys/param.h>
3506
3507 int
3508 main ()
3509 {
3510 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3511  bogus endian macros
3512 #endif
3513
3514   ;
3515   return 0;
3516 }
3517 _ACEOF
3518 rm -f conftest.$ac_objext
3519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3520   (eval $ac_compile) 2>conftest.er1
3521   ac_status=$?
3522   grep -v '^ *+' conftest.er1 >conftest.err
3523   rm -f conftest.er1
3524   cat conftest.err >&5
3525   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526   (exit $ac_status); } &&
3527          { ac_try='test -z "$ac_c_werror_flag"
3528                          || test ! -s conftest.err'
3529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3530   (eval $ac_try) 2>&5
3531   ac_status=$?
3532   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3533   (exit $ac_status); }; } &&
3534          { ac_try='test -s conftest.$ac_objext'
3535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3536   (eval $ac_try) 2>&5
3537   ac_status=$?
3538   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3539   (exit $ac_status); }; }; then
3540   # It does; now see whether it defined to BIG_ENDIAN or not.
3541 cat >conftest.$ac_ext <<_ACEOF
3542 /* confdefs.h.  */
3543 _ACEOF
3544 cat confdefs.h >>conftest.$ac_ext
3545 cat >>conftest.$ac_ext <<_ACEOF
3546 /* end confdefs.h.  */
3547 #include <sys/types.h>
3548 #include <sys/param.h>
3549
3550 int
3551 main ()
3552 {
3553 #if BYTE_ORDER != BIG_ENDIAN
3554  not big endian
3555 #endif
3556
3557   ;
3558   return 0;
3559 }
3560 _ACEOF
3561 rm -f conftest.$ac_objext
3562 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3563   (eval $ac_compile) 2>conftest.er1
3564   ac_status=$?
3565   grep -v '^ *+' conftest.er1 >conftest.err
3566   rm -f conftest.er1
3567   cat conftest.err >&5
3568   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3569   (exit $ac_status); } &&
3570          { ac_try='test -z "$ac_c_werror_flag"
3571                          || test ! -s conftest.err'
3572   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3573   (eval $ac_try) 2>&5
3574   ac_status=$?
3575   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3576   (exit $ac_status); }; } &&
3577          { ac_try='test -s conftest.$ac_objext'
3578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3579   (eval $ac_try) 2>&5
3580   ac_status=$?
3581   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3582   (exit $ac_status); }; }; then
3583   ac_cv_c_bigendian=yes
3584 else
3585   echo "$as_me: failed program was:" >&5
3586 sed 's/^/| /' conftest.$ac_ext >&5
3587
3588 ac_cv_c_bigendian=no
3589 fi
3590 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3591 else
3592   echo "$as_me: failed program was:" >&5
3593 sed 's/^/| /' conftest.$ac_ext >&5
3594
3595 # It does not; compile a test program.
3596 if test "$cross_compiling" = yes; then
3597   # try to guess the endianness by grepping values into an object file
3598   ac_cv_c_bigendian=unknown
3599   cat >conftest.$ac_ext <<_ACEOF
3600 /* confdefs.h.  */
3601 _ACEOF
3602 cat confdefs.h >>conftest.$ac_ext
3603 cat >>conftest.$ac_ext <<_ACEOF
3604 /* end confdefs.h.  */
3605 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3606 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3607 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
3608 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3609 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3610 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
3611 int
3612 main ()
3613 {
3614  _ascii (); _ebcdic ();
3615   ;
3616   return 0;
3617 }
3618 _ACEOF
3619 rm -f conftest.$ac_objext
3620 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3621   (eval $ac_compile) 2>conftest.er1
3622   ac_status=$?
3623   grep -v '^ *+' conftest.er1 >conftest.err
3624   rm -f conftest.er1
3625   cat conftest.err >&5
3626   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627   (exit $ac_status); } &&
3628          { ac_try='test -z "$ac_c_werror_flag"
3629                          || test ! -s conftest.err'
3630   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3631   (eval $ac_try) 2>&5
3632   ac_status=$?
3633   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3634   (exit $ac_status); }; } &&
3635          { ac_try='test -s conftest.$ac_objext'
3636   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3637   (eval $ac_try) 2>&5
3638   ac_status=$?
3639   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3640   (exit $ac_status); }; }; then
3641   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
3642   ac_cv_c_bigendian=yes
3643 fi
3644 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3645   if test "$ac_cv_c_bigendian" = unknown; then
3646     ac_cv_c_bigendian=no
3647   else
3648     # finding both strings is unlikely to happen, but who knows?
3649     ac_cv_c_bigendian=unknown
3650   fi
3651 fi
3652 else
3653   echo "$as_me: failed program was:" >&5
3654 sed 's/^/| /' conftest.$ac_ext >&5
3655
3656 fi
3657 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3658 else
3659   cat >conftest.$ac_ext <<_ACEOF
3660 /* confdefs.h.  */
3661 _ACEOF
3662 cat confdefs.h >>conftest.$ac_ext
3663 cat >>conftest.$ac_ext <<_ACEOF
3664 /* end confdefs.h.  */
3665 int
3666 main ()
3667 {
3668   /* Are we little or big endian?  From Harbison&Steele.  */
3669   union
3670   {
3671     long l;
3672     char c[sizeof (long)];
3673   } u;
3674   u.l = 1;
3675   exit (u.c[sizeof (long) - 1] == 1);
3676 }
3677 _ACEOF
3678 rm -f conftest$ac_exeext
3679 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3680   (eval $ac_link) 2>&5
3681   ac_status=$?
3682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3683   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3685   (eval $ac_try) 2>&5
3686   ac_status=$?
3687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688   (exit $ac_status); }; }; then
3689   ac_cv_c_bigendian=no
3690 else
3691   echo "$as_me: program exited with status $ac_status" >&5
3692 echo "$as_me: failed program was:" >&5
3693 sed 's/^/| /' conftest.$ac_ext >&5
3694
3695 ( exit $ac_status )
3696 ac_cv_c_bigendian=yes
3697 fi
3698 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3699 fi
3700 fi
3701 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3702 fi
3703 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3704 echo "${ECHO_T}$ac_cv_c_bigendian" >&6
3705 case $ac_cv_c_bigendian in
3706   yes)
3707
3708 cat >>confdefs.h <<\_ACEOF
3709 #define WORDS_BIGENDIAN 1
3710 _ACEOF
3711  ;;
3712   no)
3713      ;;
3714   *)
3715     { { echo "$as_me:$LINENO: error: unknown endianness
3716 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
3717 echo "$as_me: error: unknown endianness
3718 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
3719    { (exit 1); exit 1; }; } ;;
3720 esac
3721
3722     if test "${TEA_PLATFORM}" = "unix" ; then
3723
3724     #--------------------------------------------------------------------
3725     # On a few very rare systems, all of the libm.a stuff is
3726     # already in libc.a.  Set compiler flags accordingly.
3727     # Also, Linux requires the "ieee" library for math to work
3728     # right (and it must appear before "-lm").
3729     #--------------------------------------------------------------------
3730
3731     echo "$as_me:$LINENO: checking for sin" >&5
3732 echo $ECHO_N "checking for sin... $ECHO_C" >&6
3733 if test "${ac_cv_func_sin+set}" = set; then
3734   echo $ECHO_N "(cached) $ECHO_C" >&6
3735 else
3736   cat >conftest.$ac_ext <<_ACEOF
3737 /* confdefs.h.  */
3738 _ACEOF
3739 cat confdefs.h >>conftest.$ac_ext
3740 cat >>conftest.$ac_ext <<_ACEOF
3741 /* end confdefs.h.  */
3742 /* Define sin to an innocuous variant, in case <limits.h> declares sin.
3743    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3744 #define sin innocuous_sin
3745
3746 /* System header to define __stub macros and hopefully few prototypes,
3747     which can conflict with char sin (); below.
3748     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3749     <limits.h> exists even on freestanding compilers.  */
3750
3751 #ifdef __STDC__
3752 # include <limits.h>
3753 #else
3754 # include <assert.h>
3755 #endif
3756
3757 #undef sin
3758
3759 /* Override any gcc2 internal prototype to avoid an error.  */
3760 #ifdef __cplusplus
3761 extern "C"
3762 {
3763 #endif
3764 /* We use char because int might match the return type of a gcc2
3765    builtin and then its argument prototype would still apply.  */
3766 char sin ();
3767 /* The GNU C library defines this for functions which it implements
3768     to always fail with ENOSYS.  Some functions are actually named
3769     something starting with __ and the normal name is an alias.  */
3770 #if defined (__stub_sin) || defined (__stub___sin)
3771 choke me
3772 #else
3773 char (*f) () = sin;
3774 #endif
3775 #ifdef __cplusplus
3776 }
3777 #endif
3778
3779 int
3780 main ()
3781 {
3782 return f != sin;
3783   ;
3784   return 0;
3785 }
3786 _ACEOF
3787 rm -f conftest.$ac_objext conftest$ac_exeext
3788 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3789   (eval $ac_link) 2>conftest.er1
3790   ac_status=$?
3791   grep -v '^ *+' conftest.er1 >conftest.err
3792   rm -f conftest.er1
3793   cat conftest.err >&5
3794   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3795   (exit $ac_status); } &&
3796          { ac_try='test -z "$ac_c_werror_flag"
3797                          || test ! -s conftest.err'
3798   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3799   (eval $ac_try) 2>&5
3800   ac_status=$?
3801   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3802   (exit $ac_status); }; } &&
3803          { ac_try='test -s conftest$ac_exeext'
3804   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3805   (eval $ac_try) 2>&5
3806   ac_status=$?
3807   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808   (exit $ac_status); }; }; then
3809   ac_cv_func_sin=yes
3810 else
3811   echo "$as_me: failed program was:" >&5
3812 sed 's/^/| /' conftest.$ac_ext >&5
3813
3814 ac_cv_func_sin=no
3815 fi
3816 rm -f conftest.err conftest.$ac_objext \
3817       conftest$ac_exeext conftest.$ac_ext
3818 fi
3819 echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
3820 echo "${ECHO_T}$ac_cv_func_sin" >&6
3821 if test $ac_cv_func_sin = yes; then
3822   MATH_LIBS=""
3823 else
3824   MATH_LIBS="-lm"
3825 fi
3826
3827     echo "$as_me:$LINENO: checking for main in -lieee" >&5
3828 echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
3829 if test "${ac_cv_lib_ieee_main+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   ac_check_lib_save_LIBS=$LIBS
3833 LIBS="-lieee  $LIBS"
3834 cat >conftest.$ac_ext <<_ACEOF
3835 /* confdefs.h.  */
3836 _ACEOF
3837 cat confdefs.h >>conftest.$ac_ext
3838 cat >>conftest.$ac_ext <<_ACEOF
3839 /* end confdefs.h.  */
3840
3841
3842 int
3843 main ()
3844 {
3845 main ();
3846   ;
3847   return 0;
3848 }
3849 _ACEOF
3850 rm -f conftest.$ac_objext conftest$ac_exeext
3851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3852   (eval $ac_link) 2>conftest.er1
3853   ac_status=$?
3854   grep -v '^ *+' conftest.er1 >conftest.err
3855   rm -f conftest.er1
3856   cat conftest.err >&5
3857   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3858   (exit $ac_status); } &&
3859          { ac_try='test -z "$ac_c_werror_flag"
3860                          || test ! -s conftest.err'
3861   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3862   (eval $ac_try) 2>&5
3863   ac_status=$?
3864   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3865   (exit $ac_status); }; } &&
3866          { ac_try='test -s conftest$ac_exeext'
3867   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3868   (eval $ac_try) 2>&5
3869   ac_status=$?
3870   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871   (exit $ac_status); }; }; then
3872   ac_cv_lib_ieee_main=yes
3873 else
3874   echo "$as_me: failed program was:" >&5
3875 sed 's/^/| /' conftest.$ac_ext >&5
3876
3877 ac_cv_lib_ieee_main=no
3878 fi
3879 rm -f conftest.err conftest.$ac_objext \
3880       conftest$ac_exeext conftest.$ac_ext
3881 LIBS=$ac_check_lib_save_LIBS
3882 fi
3883 echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
3884 echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
3885 if test $ac_cv_lib_ieee_main = yes; then
3886   MATH_LIBS="-lieee $MATH_LIBS"
3887 fi
3888
3889
3890     #--------------------------------------------------------------------
3891     # Interactive UNIX requires -linet instead of -lsocket, plus it
3892     # needs net/errno.h to define the socket-related error codes.
3893     #--------------------------------------------------------------------
3894
3895     echo "$as_me:$LINENO: checking for main in -linet" >&5
3896 echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
3897 if test "${ac_cv_lib_inet_main+set}" = set; then
3898   echo $ECHO_N "(cached) $ECHO_C" >&6
3899 else
3900   ac_check_lib_save_LIBS=$LIBS
3901 LIBS="-linet  $LIBS"
3902 cat >conftest.$ac_ext <<_ACEOF
3903 /* confdefs.h.  */
3904 _ACEOF
3905 cat confdefs.h >>conftest.$ac_ext
3906 cat >>conftest.$ac_ext <<_ACEOF
3907 /* end confdefs.h.  */
3908
3909
3910 int
3911 main ()
3912 {
3913 main ();
3914   ;
3915   return 0;
3916 }
3917 _ACEOF
3918 rm -f conftest.$ac_objext conftest$ac_exeext
3919 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3920   (eval $ac_link) 2>conftest.er1
3921   ac_status=$?
3922   grep -v '^ *+' conftest.er1 >conftest.err
3923   rm -f conftest.er1
3924   cat conftest.err >&5
3925   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3926   (exit $ac_status); } &&
3927          { ac_try='test -z "$ac_c_werror_flag"
3928                          || test ! -s conftest.err'
3929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3930   (eval $ac_try) 2>&5
3931   ac_status=$?
3932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3933   (exit $ac_status); }; } &&
3934          { ac_try='test -s conftest$ac_exeext'
3935   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3936   (eval $ac_try) 2>&5
3937   ac_status=$?
3938   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3939   (exit $ac_status); }; }; then
3940   ac_cv_lib_inet_main=yes
3941 else
3942   echo "$as_me: failed program was:" >&5
3943 sed 's/^/| /' conftest.$ac_ext >&5
3944
3945 ac_cv_lib_inet_main=no
3946 fi
3947 rm -f conftest.err conftest.$ac_objext \
3948       conftest$ac_exeext conftest.$ac_ext
3949 LIBS=$ac_check_lib_save_LIBS
3950 fi
3951 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
3952 echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
3953 if test $ac_cv_lib_inet_main = yes; then
3954   LIBS="$LIBS -linet"
3955 fi
3956
3957     if test "${ac_cv_header_net_errno_h+set}" = set; then
3958   echo "$as_me:$LINENO: checking for net/errno.h" >&5
3959 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
3960 if test "${ac_cv_header_net_errno_h+set}" = set; then
3961   echo $ECHO_N "(cached) $ECHO_C" >&6
3962 fi
3963 echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
3964 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
3965 else
3966   # Is the header compilable?
3967 echo "$as_me:$LINENO: checking net/errno.h usability" >&5
3968 echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
3969 cat >conftest.$ac_ext <<_ACEOF
3970 /* confdefs.h.  */
3971 _ACEOF
3972 cat confdefs.h >>conftest.$ac_ext
3973 cat >>conftest.$ac_ext <<_ACEOF
3974 /* end confdefs.h.  */
3975 $ac_includes_default
3976 #include <net/errno.h>
3977 _ACEOF
3978 rm -f conftest.$ac_objext
3979 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3980   (eval $ac_compile) 2>conftest.er1
3981   ac_status=$?
3982   grep -v '^ *+' conftest.er1 >conftest.err
3983   rm -f conftest.er1
3984   cat conftest.err >&5
3985   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3986   (exit $ac_status); } &&
3987          { ac_try='test -z "$ac_c_werror_flag"
3988                          || test ! -s conftest.err'
3989   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3990   (eval $ac_try) 2>&5
3991   ac_status=$?
3992   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3993   (exit $ac_status); }; } &&
3994          { ac_try='test -s conftest.$ac_objext'
3995   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3996   (eval $ac_try) 2>&5
3997   ac_status=$?
3998   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3999   (exit $ac_status); }; }; then
4000   ac_header_compiler=yes
4001 else
4002   echo "$as_me: failed program was:" >&5
4003 sed 's/^/| /' conftest.$ac_ext >&5
4004
4005 ac_header_compiler=no
4006 fi
4007 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4008 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4009 echo "${ECHO_T}$ac_header_compiler" >&6
4010
4011 # Is the header present?
4012 echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4013 echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
4014 cat >conftest.$ac_ext <<_ACEOF
4015 /* confdefs.h.  */
4016 _ACEOF
4017 cat confdefs.h >>conftest.$ac_ext
4018 cat >>conftest.$ac_ext <<_ACEOF
4019 /* end confdefs.h.  */
4020 #include <net/errno.h>
4021 _ACEOF
4022 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4023   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4024   ac_status=$?
4025   grep -v '^ *+' conftest.er1 >conftest.err
4026   rm -f conftest.er1
4027   cat conftest.err >&5
4028   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4029   (exit $ac_status); } >/dev/null; then
4030   if test -s conftest.err; then
4031     ac_cpp_err=$ac_c_preproc_warn_flag
4032     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4033   else
4034     ac_cpp_err=
4035   fi
4036 else
4037   ac_cpp_err=yes
4038 fi
4039 if test -z "$ac_cpp_err"; then
4040   ac_header_preproc=yes
4041 else
4042   echo "$as_me: failed program was:" >&5
4043 sed 's/^/| /' conftest.$ac_ext >&5
4044
4045   ac_header_preproc=no
4046 fi
4047 rm -f conftest.err conftest.$ac_ext
4048 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4049 echo "${ECHO_T}$ac_header_preproc" >&6
4050
4051 # So?  What about this header?
4052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4053   yes:no: )
4054     { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4055 echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4056     { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4057 echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4058     ac_header_preproc=yes
4059     ;;
4060   no:yes:* )
4061     { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4062 echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4063     { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4064 echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4065     { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4066 echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4067     { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4068 echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4069     { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4070 echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4071     { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4072 echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4073     (
4074       cat <<\_ASBOX
4075 ## --------------------------------- ##
4076 ## Report this to the expect lists.  ##
4077 ## --------------------------------- ##
4078 _ASBOX
4079     ) |
4080       sed "s/^/$as_me: WARNING:     /" >&2
4081     ;;
4082 esac
4083 echo "$as_me:$LINENO: checking for net/errno.h" >&5
4084 echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
4085 if test "${ac_cv_header_net_errno_h+set}" = set; then
4086   echo $ECHO_N "(cached) $ECHO_C" >&6
4087 else
4088   ac_cv_header_net_errno_h=$ac_header_preproc
4089 fi
4090 echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4091 echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
4092
4093 fi
4094 if test $ac_cv_header_net_errno_h = yes; then
4095
4096
4097 cat >>confdefs.h <<\_ACEOF
4098 #define HAVE_NET_ERRNO_H 1
4099 _ACEOF
4100
4101 fi
4102
4103
4104
4105     #--------------------------------------------------------------------
4106     #   Check for the existence of the -lsocket and -lnsl libraries.
4107     #   The order here is important, so that they end up in the right
4108     #   order in the command line generated by make.  Here are some
4109     #   special considerations:
4110     #   1. Use "connect" and "accept" to check for -lsocket, and
4111     #      "gethostbyname" to check for -lnsl.
4112     #   2. Use each function name only once:  can't redo a check because
4113     #      autoconf caches the results of the last check and won't redo it.
4114     #   3. Use -lnsl and -lsocket only if they supply procedures that
4115     #      aren't already present in the normal libraries.  This is because
4116     #      IRIX 5.2 has libraries, but they aren't needed and they're
4117     #      bogus:  they goof up name resolution if used.
4118     #   4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4119     #      To get around this problem, check for both libraries together
4120     #      if -lsocket doesn't work by itself.
4121     #--------------------------------------------------------------------
4122
4123     tcl_checkBoth=0
4124     echo "$as_me:$LINENO: checking for connect" >&5
4125 echo $ECHO_N "checking for connect... $ECHO_C" >&6
4126 if test "${ac_cv_func_connect+set}" = set; then
4127   echo $ECHO_N "(cached) $ECHO_C" >&6
4128 else
4129   cat >conftest.$ac_ext <<_ACEOF
4130 /* confdefs.h.  */
4131 _ACEOF
4132 cat confdefs.h >>conftest.$ac_ext
4133 cat >>conftest.$ac_ext <<_ACEOF
4134 /* end confdefs.h.  */
4135 /* Define connect to an innocuous variant, in case <limits.h> declares connect.
4136    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4137 #define connect innocuous_connect
4138
4139 /* System header to define __stub macros and hopefully few prototypes,
4140     which can conflict with char connect (); below.
4141     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4142     <limits.h> exists even on freestanding compilers.  */
4143
4144 #ifdef __STDC__
4145 # include <limits.h>
4146 #else
4147 # include <assert.h>
4148 #endif
4149
4150 #undef connect
4151
4152 /* Override any gcc2 internal prototype to avoid an error.  */
4153 #ifdef __cplusplus
4154 extern "C"
4155 {
4156 #endif
4157 /* We use char because int might match the return type of a gcc2
4158    builtin and then its argument prototype would still apply.  */
4159 char connect ();
4160 /* The GNU C library defines this for functions which it implements
4161     to always fail with ENOSYS.  Some functions are actually named
4162     something starting with __ and the normal name is an alias.  */
4163 #if defined (__stub_connect) || defined (__stub___connect)
4164 choke me
4165 #else
4166 char (*f) () = connect;
4167 #endif
4168 #ifdef __cplusplus
4169 }
4170 #endif
4171
4172 int
4173 main ()
4174 {
4175 return f != connect;
4176   ;
4177   return 0;
4178 }
4179 _ACEOF
4180 rm -f conftest.$ac_objext conftest$ac_exeext
4181 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4182   (eval $ac_link) 2>conftest.er1
4183   ac_status=$?
4184   grep -v '^ *+' conftest.er1 >conftest.err
4185   rm -f conftest.er1
4186   cat conftest.err >&5
4187   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188   (exit $ac_status); } &&
4189          { ac_try='test -z "$ac_c_werror_flag"
4190                          || test ! -s conftest.err'
4191   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4192   (eval $ac_try) 2>&5
4193   ac_status=$?
4194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195   (exit $ac_status); }; } &&
4196          { ac_try='test -s conftest$ac_exeext'
4197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4198   (eval $ac_try) 2>&5
4199   ac_status=$?
4200   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4201   (exit $ac_status); }; }; then
4202   ac_cv_func_connect=yes
4203 else
4204   echo "$as_me: failed program was:" >&5
4205 sed 's/^/| /' conftest.$ac_ext >&5
4206
4207 ac_cv_func_connect=no
4208 fi
4209 rm -f conftest.err conftest.$ac_objext \
4210       conftest$ac_exeext conftest.$ac_ext
4211 fi
4212 echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4213 echo "${ECHO_T}$ac_cv_func_connect" >&6
4214 if test $ac_cv_func_connect = yes; then
4215   tcl_checkSocket=0
4216 else
4217   tcl_checkSocket=1
4218 fi
4219
4220     if test "$tcl_checkSocket" = 1; then
4221         echo "$as_me:$LINENO: checking for setsockopt" >&5
4222 echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
4223 if test "${ac_cv_func_setsockopt+set}" = set; then
4224   echo $ECHO_N "(cached) $ECHO_C" >&6
4225 else
4226   cat >conftest.$ac_ext <<_ACEOF
4227 /* confdefs.h.  */
4228 _ACEOF
4229 cat confdefs.h >>conftest.$ac_ext
4230 cat >>conftest.$ac_ext <<_ACEOF
4231 /* end confdefs.h.  */
4232 /* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4233    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4234 #define setsockopt innocuous_setsockopt
4235
4236 /* System header to define __stub macros and hopefully few prototypes,
4237     which can conflict with char setsockopt (); below.
4238     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4239     <limits.h> exists even on freestanding compilers.  */
4240
4241 #ifdef __STDC__
4242 # include <limits.h>
4243 #else
4244 # include <assert.h>
4245 #endif
4246
4247 #undef setsockopt
4248
4249 /* Override any gcc2 internal prototype to avoid an error.  */
4250 #ifdef __cplusplus
4251 extern "C"
4252 {
4253 #endif
4254 /* We use char because int might match the return type of a gcc2
4255    builtin and then its argument prototype would still apply.  */
4256 char setsockopt ();
4257 /* The GNU C library defines this for functions which it implements
4258     to always fail with ENOSYS.  Some functions are actually named
4259     something starting with __ and the normal name is an alias.  */
4260 #if defined (__stub_setsockopt) || defined (__stub___setsockopt)
4261 choke me
4262 #else
4263 char (*f) () = setsockopt;
4264 #endif
4265 #ifdef __cplusplus
4266 }
4267 #endif
4268
4269 int
4270 main ()
4271 {
4272 return f != setsockopt;
4273   ;
4274   return 0;
4275 }
4276 _ACEOF
4277 rm -f conftest.$ac_objext conftest$ac_exeext
4278 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4279   (eval $ac_link) 2>conftest.er1
4280   ac_status=$?
4281   grep -v '^ *+' conftest.er1 >conftest.err
4282   rm -f conftest.er1
4283   cat conftest.err >&5
4284   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4285   (exit $ac_status); } &&
4286          { ac_try='test -z "$ac_c_werror_flag"
4287                          || test ! -s conftest.err'
4288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289   (eval $ac_try) 2>&5
4290   ac_status=$?
4291   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292   (exit $ac_status); }; } &&
4293          { ac_try='test -s conftest$ac_exeext'
4294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295   (eval $ac_try) 2>&5
4296   ac_status=$?
4297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298   (exit $ac_status); }; }; then
4299   ac_cv_func_setsockopt=yes
4300 else
4301   echo "$as_me: failed program was:" >&5
4302 sed 's/^/| /' conftest.$ac_ext >&5
4303
4304 ac_cv_func_setsockopt=no
4305 fi
4306 rm -f conftest.err conftest.$ac_objext \
4307       conftest$ac_exeext conftest.$ac_ext
4308 fi
4309 echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4310 echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
4311 if test $ac_cv_func_setsockopt = yes; then
4312   :
4313 else
4314   echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4315 echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
4316 if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4317   echo $ECHO_N "(cached) $ECHO_C" >&6
4318 else
4319   ac_check_lib_save_LIBS=$LIBS
4320 LIBS="-lsocket  $LIBS"
4321 cat >conftest.$ac_ext <<_ACEOF
4322 /* confdefs.h.  */
4323 _ACEOF
4324 cat confdefs.h >>conftest.$ac_ext
4325 cat >>conftest.$ac_ext <<_ACEOF
4326 /* end confdefs.h.  */
4327
4328 /* Override any gcc2 internal prototype to avoid an error.  */
4329 #ifdef __cplusplus
4330 extern "C"
4331 #endif
4332 /* We use char because int might match the return type of a gcc2
4333    builtin and then its argument prototype would still apply.  */
4334 char setsockopt ();
4335 int
4336 main ()
4337 {
4338 setsockopt ();
4339   ;
4340   return 0;
4341 }
4342 _ACEOF
4343 rm -f conftest.$ac_objext conftest$ac_exeext
4344 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4345   (eval $ac_link) 2>conftest.er1
4346   ac_status=$?
4347   grep -v '^ *+' conftest.er1 >conftest.err
4348   rm -f conftest.er1
4349   cat conftest.err >&5
4350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351   (exit $ac_status); } &&
4352          { ac_try='test -z "$ac_c_werror_flag"
4353                          || test ! -s conftest.err'
4354   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4355   (eval $ac_try) 2>&5
4356   ac_status=$?
4357   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4358   (exit $ac_status); }; } &&
4359          { ac_try='test -s conftest$ac_exeext'
4360   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4361   (eval $ac_try) 2>&5
4362   ac_status=$?
4363   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364   (exit $ac_status); }; }; then
4365   ac_cv_lib_socket_setsockopt=yes
4366 else
4367   echo "$as_me: failed program was:" >&5
4368 sed 's/^/| /' conftest.$ac_ext >&5
4369
4370 ac_cv_lib_socket_setsockopt=no
4371 fi
4372 rm -f conftest.err conftest.$ac_objext \
4373       conftest$ac_exeext conftest.$ac_ext
4374 LIBS=$ac_check_lib_save_LIBS
4375 fi
4376 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4377 echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
4378 if test $ac_cv_lib_socket_setsockopt = yes; then
4379   LIBS="$LIBS -lsocket"
4380 else
4381   tcl_checkBoth=1
4382 fi
4383
4384 fi
4385
4386     fi
4387     if test "$tcl_checkBoth" = 1; then
4388         tk_oldLibs=$LIBS
4389         LIBS="$LIBS -lsocket -lnsl"
4390         echo "$as_me:$LINENO: checking for accept" >&5
4391 echo $ECHO_N "checking for accept... $ECHO_C" >&6
4392 if test "${ac_cv_func_accept+set}" = set; then
4393   echo $ECHO_N "(cached) $ECHO_C" >&6
4394 else
4395   cat >conftest.$ac_ext <<_ACEOF
4396 /* confdefs.h.  */
4397 _ACEOF
4398 cat confdefs.h >>conftest.$ac_ext
4399 cat >>conftest.$ac_ext <<_ACEOF
4400 /* end confdefs.h.  */
4401 /* Define accept to an innocuous variant, in case <limits.h> declares accept.
4402    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4403 #define accept innocuous_accept
4404
4405 /* System header to define __stub macros and hopefully few prototypes,
4406     which can conflict with char accept (); below.
4407     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408     <limits.h> exists even on freestanding compilers.  */
4409
4410 #ifdef __STDC__
4411 # include <limits.h>
4412 #else
4413 # include <assert.h>
4414 #endif
4415
4416 #undef accept
4417
4418 /* Override any gcc2 internal prototype to avoid an error.  */
4419 #ifdef __cplusplus
4420 extern "C"
4421 {
4422 #endif
4423 /* We use char because int might match the return type of a gcc2
4424    builtin and then its argument prototype would still apply.  */
4425 char accept ();
4426 /* The GNU C library defines this for functions which it implements
4427     to always fail with ENOSYS.  Some functions are actually named
4428     something starting with __ and the normal name is an alias.  */
4429 #if defined (__stub_accept) || defined (__stub___accept)
4430 choke me
4431 #else
4432 char (*f) () = accept;
4433 #endif
4434 #ifdef __cplusplus
4435 }
4436 #endif
4437
4438 int
4439 main ()
4440 {
4441 return f != accept;
4442   ;
4443   return 0;
4444 }
4445 _ACEOF
4446 rm -f conftest.$ac_objext conftest$ac_exeext
4447 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4448   (eval $ac_link) 2>conftest.er1
4449   ac_status=$?
4450   grep -v '^ *+' conftest.er1 >conftest.err
4451   rm -f conftest.er1
4452   cat conftest.err >&5
4453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4454   (exit $ac_status); } &&
4455          { ac_try='test -z "$ac_c_werror_flag"
4456                          || test ! -s conftest.err'
4457   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4458   (eval $ac_try) 2>&5
4459   ac_status=$?
4460   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4461   (exit $ac_status); }; } &&
4462          { ac_try='test -s conftest$ac_exeext'
4463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4464   (eval $ac_try) 2>&5
4465   ac_status=$?
4466   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4467   (exit $ac_status); }; }; then
4468   ac_cv_func_accept=yes
4469 else
4470   echo "$as_me: failed program was:" >&5
4471 sed 's/^/| /' conftest.$ac_ext >&5
4472
4473 ac_cv_func_accept=no
4474 fi
4475 rm -f conftest.err conftest.$ac_objext \
4476       conftest$ac_exeext conftest.$ac_ext
4477 fi
4478 echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
4479 echo "${ECHO_T}$ac_cv_func_accept" >&6
4480 if test $ac_cv_func_accept = yes; then
4481   tcl_checkNsl=0
4482 else
4483   LIBS=$tk_oldLibs
4484 fi
4485
4486     fi
4487     echo "$as_me:$LINENO: checking for gethostbyname" >&5
4488 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
4489 if test "${ac_cv_func_gethostbyname+set}" = set; then
4490   echo $ECHO_N "(cached) $ECHO_C" >&6
4491 else
4492   cat >conftest.$ac_ext <<_ACEOF
4493 /* confdefs.h.  */
4494 _ACEOF
4495 cat confdefs.h >>conftest.$ac_ext
4496 cat >>conftest.$ac_ext <<_ACEOF
4497 /* end confdefs.h.  */
4498 /* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
4499    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4500 #define gethostbyname innocuous_gethostbyname
4501
4502 /* System header to define __stub macros and hopefully few prototypes,
4503     which can conflict with char gethostbyname (); below.
4504     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4505     <limits.h> exists even on freestanding compilers.  */
4506
4507 #ifdef __STDC__
4508 # include <limits.h>
4509 #else
4510 # include <assert.h>
4511 #endif
4512
4513 #undef gethostbyname
4514
4515 /* Override any gcc2 internal prototype to avoid an error.  */
4516 #ifdef __cplusplus
4517 extern "C"
4518 {
4519 #endif
4520 /* We use char because int might match the return type of a gcc2
4521    builtin and then its argument prototype would still apply.  */
4522 char gethostbyname ();
4523 /* The GNU C library defines this for functions which it implements
4524     to always fail with ENOSYS.  Some functions are actually named
4525     something starting with __ and the normal name is an alias.  */
4526 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4527 choke me
4528 #else
4529 char (*f) () = gethostbyname;
4530 #endif
4531 #ifdef __cplusplus
4532 }
4533 #endif
4534
4535 int
4536 main ()
4537 {
4538 return f != gethostbyname;
4539   ;
4540   return 0;
4541 }
4542 _ACEOF
4543 rm -f conftest.$ac_objext conftest$ac_exeext
4544 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4545   (eval $ac_link) 2>conftest.er1
4546   ac_status=$?
4547   grep -v '^ *+' conftest.er1 >conftest.err
4548   rm -f conftest.er1
4549   cat conftest.err >&5
4550   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4551   (exit $ac_status); } &&
4552          { ac_try='test -z "$ac_c_werror_flag"
4553                          || test ! -s conftest.err'
4554   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4555   (eval $ac_try) 2>&5
4556   ac_status=$?
4557   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4558   (exit $ac_status); }; } &&
4559          { ac_try='test -s conftest$ac_exeext'
4560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4561   (eval $ac_try) 2>&5
4562   ac_status=$?
4563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4564   (exit $ac_status); }; }; then
4565   ac_cv_func_gethostbyname=yes
4566 else
4567   echo "$as_me: failed program was:" >&5
4568 sed 's/^/| /' conftest.$ac_ext >&5
4569
4570 ac_cv_func_gethostbyname=no
4571 fi
4572 rm -f conftest.err conftest.$ac_objext \
4573       conftest$ac_exeext conftest.$ac_ext
4574 fi
4575 echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
4576 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
4577 if test $ac_cv_func_gethostbyname = yes; then
4578   :
4579 else
4580   echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
4581 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
4582 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585   ac_check_lib_save_LIBS=$LIBS
4586 LIBS="-lnsl  $LIBS"
4587 cat >conftest.$ac_ext <<_ACEOF
4588 /* confdefs.h.  */
4589 _ACEOF
4590 cat confdefs.h >>conftest.$ac_ext
4591 cat >>conftest.$ac_ext <<_ACEOF
4592 /* end confdefs.h.  */
4593
4594 /* Override any gcc2 internal prototype to avoid an error.  */
4595 #ifdef __cplusplus
4596 extern "C"
4597 #endif
4598 /* We use char because int might match the return type of a gcc2
4599    builtin and then its argument prototype would still apply.  */
4600 char gethostbyname ();
4601 int
4602 main ()
4603 {
4604 gethostbyname ();
4605   ;
4606   return 0;
4607 }
4608 _ACEOF
4609 rm -f conftest.$ac_objext conftest$ac_exeext
4610 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4611   (eval $ac_link) 2>conftest.er1
4612   ac_status=$?
4613   grep -v '^ *+' conftest.er1 >conftest.err
4614   rm -f conftest.er1
4615   cat conftest.err >&5
4616   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4617   (exit $ac_status); } &&
4618          { ac_try='test -z "$ac_c_werror_flag"
4619                          || test ! -s conftest.err'
4620   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4621   (eval $ac_try) 2>&5
4622   ac_status=$?
4623   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4624   (exit $ac_status); }; } &&
4625          { ac_try='test -s conftest$ac_exeext'
4626   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4627   (eval $ac_try) 2>&5
4628   ac_status=$?
4629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630   (exit $ac_status); }; }; then
4631   ac_cv_lib_nsl_gethostbyname=yes
4632 else
4633   echo "$as_me: failed program was:" >&5
4634 sed 's/^/| /' conftest.$ac_ext >&5
4635
4636 ac_cv_lib_nsl_gethostbyname=no
4637 fi
4638 rm -f conftest.err conftest.$ac_objext \
4639       conftest$ac_exeext conftest.$ac_ext
4640 LIBS=$ac_check_lib_save_LIBS
4641 fi
4642 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
4643 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
4644 if test $ac_cv_lib_nsl_gethostbyname = yes; then
4645   LIBS="$LIBS -lnsl"
4646 fi
4647
4648 fi
4649
4650
4651     # TEA specific: Don't perform the eval of the libraries here because
4652     # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
4653
4654     TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
4655
4656
4657
4658
4659     echo "$as_me:$LINENO: checking dirent.h" >&5
4660 echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
4661 if test "${tcl_cv_dirent_h+set}" = set; then
4662   echo $ECHO_N "(cached) $ECHO_C" >&6
4663 else
4664
4665     cat >conftest.$ac_ext <<_ACEOF
4666 /* confdefs.h.  */
4667 _ACEOF
4668 cat confdefs.h >>conftest.$ac_ext
4669 cat >>conftest.$ac_ext <<_ACEOF
4670 /* end confdefs.h.  */
4671 #include <sys/types.h>
4672 #include <dirent.h>
4673 int
4674 main ()
4675 {
4676
4677 #ifndef _POSIX_SOURCE
4678 #   ifdef __Lynx__
4679         /*
4680          * Generate compilation error to make the test fail:  Lynx headers
4681          * are only valid if really in the POSIX environment.
4682          */
4683
4684         missing_procedure();
4685 #   endif
4686 #endif
4687 DIR *d;
4688 struct dirent *entryPtr;
4689 char *p;
4690 d = opendir("foobar");
4691 entryPtr = readdir(d);
4692 p = entryPtr->d_name;
4693 closedir(d);
4694
4695   ;
4696   return 0;
4697 }
4698 _ACEOF
4699 rm -f conftest.$ac_objext conftest$ac_exeext
4700 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4701   (eval $ac_link) 2>conftest.er1
4702   ac_status=$?
4703   grep -v '^ *+' conftest.er1 >conftest.err
4704   rm -f conftest.er1
4705   cat conftest.err >&5
4706   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4707   (exit $ac_status); } &&
4708          { ac_try='test -z "$ac_c_werror_flag"
4709                          || test ! -s conftest.err'
4710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4711   (eval $ac_try) 2>&5
4712   ac_status=$?
4713   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4714   (exit $ac_status); }; } &&
4715          { ac_try='test -s conftest$ac_exeext'
4716   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4717   (eval $ac_try) 2>&5
4718   ac_status=$?
4719   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4720   (exit $ac_status); }; }; then
4721   tcl_cv_dirent_h=yes
4722 else
4723   echo "$as_me: failed program was:" >&5
4724 sed 's/^/| /' conftest.$ac_ext >&5
4725
4726 tcl_cv_dirent_h=no
4727 fi
4728 rm -f conftest.err conftest.$ac_objext \
4729       conftest$ac_exeext conftest.$ac_ext
4730 fi
4731 echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
4732 echo "${ECHO_T}$tcl_cv_dirent_h" >&6
4733
4734     if test $tcl_cv_dirent_h = no; then
4735
4736 cat >>confdefs.h <<\_ACEOF
4737 #define NO_DIRENT_H 1
4738 _ACEOF
4739
4740     fi
4741
4742     # TEA specific:
4743     if test "${ac_cv_header_errno_h+set}" = set; then
4744   echo "$as_me:$LINENO: checking for errno.h" >&5
4745 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
4746 if test "${ac_cv_header_errno_h+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 fi
4749 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
4750 echo "${ECHO_T}$ac_cv_header_errno_h" >&6
4751 else
4752   # Is the header compilable?
4753 echo "$as_me:$LINENO: checking errno.h usability" >&5
4754 echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
4755 cat >conftest.$ac_ext <<_ACEOF
4756 /* confdefs.h.  */
4757 _ACEOF
4758 cat confdefs.h >>conftest.$ac_ext
4759 cat >>conftest.$ac_ext <<_ACEOF
4760 /* end confdefs.h.  */
4761 $ac_includes_default
4762 #include <errno.h>
4763 _ACEOF
4764 rm -f conftest.$ac_objext
4765 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4766   (eval $ac_compile) 2>conftest.er1
4767   ac_status=$?
4768   grep -v '^ *+' conftest.er1 >conftest.err
4769   rm -f conftest.er1
4770   cat conftest.err >&5
4771   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -z "$ac_c_werror_flag"
4774                          || test ! -s conftest.err'
4775   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4776   (eval $ac_try) 2>&5
4777   ac_status=$?
4778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4779   (exit $ac_status); }; } &&
4780          { ac_try='test -s conftest.$ac_objext'
4781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4782   (eval $ac_try) 2>&5
4783   ac_status=$?
4784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4785   (exit $ac_status); }; }; then
4786   ac_header_compiler=yes
4787 else
4788   echo "$as_me: failed program was:" >&5
4789 sed 's/^/| /' conftest.$ac_ext >&5
4790
4791 ac_header_compiler=no
4792 fi
4793 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4794 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4795 echo "${ECHO_T}$ac_header_compiler" >&6
4796
4797 # Is the header present?
4798 echo "$as_me:$LINENO: checking errno.h presence" >&5
4799 echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
4800 cat >conftest.$ac_ext <<_ACEOF
4801 /* confdefs.h.  */
4802 _ACEOF
4803 cat confdefs.h >>conftest.$ac_ext
4804 cat >>conftest.$ac_ext <<_ACEOF
4805 /* end confdefs.h.  */
4806 #include <errno.h>
4807 _ACEOF
4808 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4810   ac_status=$?
4811   grep -v '^ *+' conftest.er1 >conftest.err
4812   rm -f conftest.er1
4813   cat conftest.err >&5
4814   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815   (exit $ac_status); } >/dev/null; then
4816   if test -s conftest.err; then
4817     ac_cpp_err=$ac_c_preproc_warn_flag
4818     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4819   else
4820     ac_cpp_err=
4821   fi
4822 else
4823   ac_cpp_err=yes
4824 fi
4825 if test -z "$ac_cpp_err"; then
4826   ac_header_preproc=yes
4827 else
4828   echo "$as_me: failed program was:" >&5
4829 sed 's/^/| /' conftest.$ac_ext >&5
4830
4831   ac_header_preproc=no
4832 fi
4833 rm -f conftest.err conftest.$ac_ext
4834 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4835 echo "${ECHO_T}$ac_header_preproc" >&6
4836
4837 # So?  What about this header?
4838 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4839   yes:no: )
4840     { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4841 echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4842     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
4843 echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
4844     ac_header_preproc=yes
4845     ;;
4846   no:yes:* )
4847     { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
4848 echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
4849     { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
4850 echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
4851     { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
4852 echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
4853     { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4854 echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4855     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
4856 echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
4857     { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
4858 echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
4859     (
4860       cat <<\_ASBOX
4861 ## --------------------------------- ##
4862 ## Report this to the expect lists.  ##
4863 ## --------------------------------- ##
4864 _ASBOX
4865     ) |
4866       sed "s/^/$as_me: WARNING:     /" >&2
4867     ;;
4868 esac
4869 echo "$as_me:$LINENO: checking for errno.h" >&5
4870 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
4871 if test "${ac_cv_header_errno_h+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   ac_cv_header_errno_h=$ac_header_preproc
4875 fi
4876 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
4877 echo "${ECHO_T}$ac_cv_header_errno_h" >&6
4878
4879 fi
4880 if test $ac_cv_header_errno_h = yes; then
4881   :
4882 else
4883
4884 cat >>confdefs.h <<\_ACEOF
4885 #define NO_ERRNO_H 1
4886 _ACEOF
4887
4888 fi
4889
4890
4891     if test "${ac_cv_header_float_h+set}" = set; then
4892   echo "$as_me:$LINENO: checking for float.h" >&5
4893 echo $ECHO_N "checking for float.h... $ECHO_C" >&6
4894 if test "${ac_cv_header_float_h+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 fi
4897 echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
4898 echo "${ECHO_T}$ac_cv_header_float_h" >&6
4899 else
4900   # Is the header compilable?
4901 echo "$as_me:$LINENO: checking float.h usability" >&5
4902 echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
4903 cat >conftest.$ac_ext <<_ACEOF
4904 /* confdefs.h.  */
4905 _ACEOF
4906 cat confdefs.h >>conftest.$ac_ext
4907 cat >>conftest.$ac_ext <<_ACEOF
4908 /* end confdefs.h.  */
4909 $ac_includes_default
4910 #include <float.h>
4911 _ACEOF
4912 rm -f conftest.$ac_objext
4913 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4914   (eval $ac_compile) 2>conftest.er1
4915   ac_status=$?
4916   grep -v '^ *+' conftest.er1 >conftest.err
4917   rm -f conftest.er1
4918   cat conftest.err >&5
4919   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4920   (exit $ac_status); } &&
4921          { ac_try='test -z "$ac_c_werror_flag"
4922                          || test ! -s conftest.err'
4923   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4924   (eval $ac_try) 2>&5
4925   ac_status=$?
4926   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4927   (exit $ac_status); }; } &&
4928          { ac_try='test -s conftest.$ac_objext'
4929   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4930   (eval $ac_try) 2>&5
4931   ac_status=$?
4932   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4933   (exit $ac_status); }; }; then
4934   ac_header_compiler=yes
4935 else
4936   echo "$as_me: failed program was:" >&5
4937 sed 's/^/| /' conftest.$ac_ext >&5
4938
4939 ac_header_compiler=no
4940 fi
4941 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4942 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4943 echo "${ECHO_T}$ac_header_compiler" >&6
4944
4945 # Is the header present?
4946 echo "$as_me:$LINENO: checking float.h presence" >&5
4947 echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
4948 cat >conftest.$ac_ext <<_ACEOF
4949 /* confdefs.h.  */
4950 _ACEOF
4951 cat confdefs.h >>conftest.$ac_ext
4952 cat >>conftest.$ac_ext <<_ACEOF
4953 /* end confdefs.h.  */
4954 #include <float.h>
4955 _ACEOF
4956 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4958   ac_status=$?
4959   grep -v '^ *+' conftest.er1 >conftest.err
4960   rm -f conftest.er1
4961   cat conftest.err >&5
4962   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4963   (exit $ac_status); } >/dev/null; then
4964   if test -s conftest.err; then
4965     ac_cpp_err=$ac_c_preproc_warn_flag
4966     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4967   else
4968     ac_cpp_err=
4969   fi
4970 else
4971   ac_cpp_err=yes
4972 fi
4973 if test -z "$ac_cpp_err"; then
4974   ac_header_preproc=yes
4975 else
4976   echo "$as_me: failed program was:" >&5
4977 sed 's/^/| /' conftest.$ac_ext >&5
4978
4979   ac_header_preproc=no
4980 fi
4981 rm -f conftest.err conftest.$ac_ext
4982 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4983 echo "${ECHO_T}$ac_header_preproc" >&6
4984
4985 # So?  What about this header?
4986 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4987   yes:no: )
4988     { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
4989 echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4990     { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
4991 echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
4992     ac_header_preproc=yes
4993     ;;
4994   no:yes:* )
4995     { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
4996 echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
4997     { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
4998 echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
4999     { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5000 echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5001     { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5002 echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5003     { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5004 echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5005     { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5006 echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5007     (
5008       cat <<\_ASBOX
5009 ## --------------------------------- ##
5010 ## Report this to the expect lists.  ##
5011 ## --------------------------------- ##
5012 _ASBOX
5013     ) |
5014       sed "s/^/$as_me: WARNING:     /" >&2
5015     ;;
5016 esac
5017 echo "$as_me:$LINENO: checking for float.h" >&5
5018 echo $ECHO_N "checking for float.h... $ECHO_C" >&6
5019 if test "${ac_cv_header_float_h+set}" = set; then
5020   echo $ECHO_N "(cached) $ECHO_C" >&6
5021 else
5022   ac_cv_header_float_h=$ac_header_preproc
5023 fi
5024 echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5025 echo "${ECHO_T}$ac_cv_header_float_h" >&6
5026
5027 fi
5028 if test $ac_cv_header_float_h = yes; then
5029   :
5030 else
5031
5032 cat >>confdefs.h <<\_ACEOF
5033 #define NO_FLOAT_H 1
5034 _ACEOF
5035
5036 fi
5037
5038
5039     if test "${ac_cv_header_values_h+set}" = set; then
5040   echo "$as_me:$LINENO: checking for values.h" >&5
5041 echo $ECHO_N "checking for values.h... $ECHO_C" >&6
5042 if test "${ac_cv_header_values_h+set}" = set; then
5043   echo $ECHO_N "(cached) $ECHO_C" >&6
5044 fi
5045 echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5046 echo "${ECHO_T}$ac_cv_header_values_h" >&6
5047 else
5048   # Is the header compilable?
5049 echo "$as_me:$LINENO: checking values.h usability" >&5
5050 echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
5051 cat >conftest.$ac_ext <<_ACEOF
5052 /* confdefs.h.  */
5053 _ACEOF
5054 cat confdefs.h >>conftest.$ac_ext
5055 cat >>conftest.$ac_ext <<_ACEOF
5056 /* end confdefs.h.  */
5057 $ac_includes_default
5058 #include <values.h>
5059 _ACEOF
5060 rm -f conftest.$ac_objext
5061 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5062   (eval $ac_compile) 2>conftest.er1
5063   ac_status=$?
5064   grep -v '^ *+' conftest.er1 >conftest.err
5065   rm -f conftest.er1
5066   cat conftest.err >&5
5067   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5068   (exit $ac_status); } &&
5069          { ac_try='test -z "$ac_c_werror_flag"
5070                          || test ! -s conftest.err'
5071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5072   (eval $ac_try) 2>&5
5073   ac_status=$?
5074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5075   (exit $ac_status); }; } &&
5076          { ac_try='test -s conftest.$ac_objext'
5077   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5078   (eval $ac_try) 2>&5
5079   ac_status=$?
5080   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5081   (exit $ac_status); }; }; then
5082   ac_header_compiler=yes
5083 else
5084   echo "$as_me: failed program was:" >&5
5085 sed 's/^/| /' conftest.$ac_ext >&5
5086
5087 ac_header_compiler=no
5088 fi
5089 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5090 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5091 echo "${ECHO_T}$ac_header_compiler" >&6
5092
5093 # Is the header present?
5094 echo "$as_me:$LINENO: checking values.h presence" >&5
5095 echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
5096 cat >conftest.$ac_ext <<_ACEOF
5097 /* confdefs.h.  */
5098 _ACEOF
5099 cat confdefs.h >>conftest.$ac_ext
5100 cat >>conftest.$ac_ext <<_ACEOF
5101 /* end confdefs.h.  */
5102 #include <values.h>
5103 _ACEOF
5104 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5106   ac_status=$?
5107   grep -v '^ *+' conftest.er1 >conftest.err
5108   rm -f conftest.er1
5109   cat conftest.err >&5
5110   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5111   (exit $ac_status); } >/dev/null; then
5112   if test -s conftest.err; then
5113     ac_cpp_err=$ac_c_preproc_warn_flag
5114     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5115   else
5116     ac_cpp_err=
5117   fi
5118 else
5119   ac_cpp_err=yes
5120 fi
5121 if test -z "$ac_cpp_err"; then
5122   ac_header_preproc=yes
5123 else
5124   echo "$as_me: failed program was:" >&5
5125 sed 's/^/| /' conftest.$ac_ext >&5
5126
5127   ac_header_preproc=no
5128 fi
5129 rm -f conftest.err conftest.$ac_ext
5130 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5131 echo "${ECHO_T}$ac_header_preproc" >&6
5132
5133 # So?  What about this header?
5134 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5135   yes:no: )
5136     { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5137 echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5138     { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5139 echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5140     ac_header_preproc=yes
5141     ;;
5142   no:yes:* )
5143     { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5144 echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5145     { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5146 echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5147     { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5148 echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5149     { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5150 echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5151     { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5152 echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5153     { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5154 echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5155     (
5156       cat <<\_ASBOX
5157 ## --------------------------------- ##
5158 ## Report this to the expect lists.  ##
5159 ## --------------------------------- ##
5160 _ASBOX
5161     ) |
5162       sed "s/^/$as_me: WARNING:     /" >&2
5163     ;;
5164 esac
5165 echo "$as_me:$LINENO: checking for values.h" >&5
5166 echo $ECHO_N "checking for values.h... $ECHO_C" >&6
5167 if test "${ac_cv_header_values_h+set}" = set; then
5168   echo $ECHO_N "(cached) $ECHO_C" >&6
5169 else
5170   ac_cv_header_values_h=$ac_header_preproc
5171 fi
5172 echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5173 echo "${ECHO_T}$ac_cv_header_values_h" >&6
5174
5175 fi
5176 if test $ac_cv_header_values_h = yes; then
5177   :
5178 else
5179
5180 cat >>confdefs.h <<\_ACEOF
5181 #define NO_VALUES_H 1
5182 _ACEOF
5183
5184 fi
5185
5186
5187     if test "${ac_cv_header_limits_h+set}" = set; then
5188   echo "$as_me:$LINENO: checking for limits.h" >&5
5189 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
5190 if test "${ac_cv_header_limits_h+set}" = set; then
5191   echo $ECHO_N "(cached) $ECHO_C" >&6
5192 fi
5193 echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5194 echo "${ECHO_T}$ac_cv_header_limits_h" >&6
5195 else
5196   # Is the header compilable?
5197 echo "$as_me:$LINENO: checking limits.h usability" >&5
5198 echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
5199 cat >conftest.$ac_ext <<_ACEOF
5200 /* confdefs.h.  */
5201 _ACEOF
5202 cat confdefs.h >>conftest.$ac_ext
5203 cat >>conftest.$ac_ext <<_ACEOF
5204 /* end confdefs.h.  */
5205 $ac_includes_default
5206 #include <limits.h>
5207 _ACEOF
5208 rm -f conftest.$ac_objext
5209 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5210   (eval $ac_compile) 2>conftest.er1
5211   ac_status=$?
5212   grep -v '^ *+' conftest.er1 >conftest.err
5213   rm -f conftest.er1
5214   cat conftest.err >&5
5215   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5216   (exit $ac_status); } &&
5217          { ac_try='test -z "$ac_c_werror_flag"
5218                          || test ! -s conftest.err'
5219   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5220   (eval $ac_try) 2>&5
5221   ac_status=$?
5222   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5223   (exit $ac_status); }; } &&
5224          { ac_try='test -s conftest.$ac_objext'
5225   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5226   (eval $ac_try) 2>&5
5227   ac_status=$?
5228   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229   (exit $ac_status); }; }; then
5230   ac_header_compiler=yes
5231 else
5232   echo "$as_me: failed program was:" >&5
5233 sed 's/^/| /' conftest.$ac_ext >&5
5234
5235 ac_header_compiler=no
5236 fi
5237 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5238 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5239 echo "${ECHO_T}$ac_header_compiler" >&6
5240
5241 # Is the header present?
5242 echo "$as_me:$LINENO: checking limits.h presence" >&5
5243 echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
5244 cat >conftest.$ac_ext <<_ACEOF
5245 /* confdefs.h.  */
5246 _ACEOF
5247 cat confdefs.h >>conftest.$ac_ext
5248 cat >>conftest.$ac_ext <<_ACEOF
5249 /* end confdefs.h.  */
5250 #include <limits.h>
5251 _ACEOF
5252 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5253   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5254   ac_status=$?
5255   grep -v '^ *+' conftest.er1 >conftest.err
5256   rm -f conftest.er1
5257   cat conftest.err >&5
5258   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5259   (exit $ac_status); } >/dev/null; then
5260   if test -s conftest.err; then
5261     ac_cpp_err=$ac_c_preproc_warn_flag
5262     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5263   else
5264     ac_cpp_err=
5265   fi
5266 else
5267   ac_cpp_err=yes
5268 fi
5269 if test -z "$ac_cpp_err"; then
5270   ac_header_preproc=yes
5271 else
5272   echo "$as_me: failed program was:" >&5
5273 sed 's/^/| /' conftest.$ac_ext >&5
5274
5275   ac_header_preproc=no
5276 fi
5277 rm -f conftest.err conftest.$ac_ext
5278 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5279 echo "${ECHO_T}$ac_header_preproc" >&6
5280
5281 # So?  What about this header?
5282 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5283   yes:no: )
5284     { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5285 echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5286     { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5287 echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5288     ac_header_preproc=yes
5289     ;;
5290   no:yes:* )
5291     { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5292 echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5293     { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5294 echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5295     { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5296 echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5297     { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5298 echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5299     { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5300 echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5301     { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5302 echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5303     (
5304       cat <<\_ASBOX
5305 ## --------------------------------- ##
5306 ## Report this to the expect lists.  ##
5307 ## --------------------------------- ##
5308 _ASBOX
5309     ) |
5310       sed "s/^/$as_me: WARNING:     /" >&2
5311     ;;
5312 esac
5313 echo "$as_me:$LINENO: checking for limits.h" >&5
5314 echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
5315 if test "${ac_cv_header_limits_h+set}" = set; then
5316   echo $ECHO_N "(cached) $ECHO_C" >&6
5317 else
5318   ac_cv_header_limits_h=$ac_header_preproc
5319 fi
5320 echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5321 echo "${ECHO_T}$ac_cv_header_limits_h" >&6
5322
5323 fi
5324 if test $ac_cv_header_limits_h = yes; then
5325
5326 cat >>confdefs.h <<\_ACEOF
5327 #define HAVE_LIMITS_H 1
5328 _ACEOF
5329
5330 else
5331
5332 cat >>confdefs.h <<\_ACEOF
5333 #define NO_LIMITS_H 1
5334 _ACEOF
5335
5336 fi
5337
5338
5339     if test "${ac_cv_header_stdlib_h+set}" = set; then
5340   echo "$as_me:$LINENO: checking for stdlib.h" >&5
5341 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
5342 if test "${ac_cv_header_stdlib_h+set}" = set; then
5343   echo $ECHO_N "(cached) $ECHO_C" >&6
5344 fi
5345 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5346 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
5347 else
5348   # Is the header compilable?
5349 echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5350 echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
5351 cat >conftest.$ac_ext <<_ACEOF
5352 /* confdefs.h.  */
5353 _ACEOF
5354 cat confdefs.h >>conftest.$ac_ext
5355 cat >>conftest.$ac_ext <<_ACEOF
5356 /* end confdefs.h.  */
5357 $ac_includes_default
5358 #include <stdlib.h>
5359 _ACEOF
5360 rm -f conftest.$ac_objext
5361 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5362   (eval $ac_compile) 2>conftest.er1
5363   ac_status=$?
5364   grep -v '^ *+' conftest.er1 >conftest.err
5365   rm -f conftest.er1
5366   cat conftest.err >&5
5367   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5368   (exit $ac_status); } &&
5369          { ac_try='test -z "$ac_c_werror_flag"
5370                          || test ! -s conftest.err'
5371   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5372   (eval $ac_try) 2>&5
5373   ac_status=$?
5374   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5375   (exit $ac_status); }; } &&
5376          { ac_try='test -s conftest.$ac_objext'
5377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5378   (eval $ac_try) 2>&5
5379   ac_status=$?
5380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5381   (exit $ac_status); }; }; then
5382   ac_header_compiler=yes
5383 else
5384   echo "$as_me: failed program was:" >&5
5385 sed 's/^/| /' conftest.$ac_ext >&5
5386
5387 ac_header_compiler=no
5388 fi
5389 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5390 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5391 echo "${ECHO_T}$ac_header_compiler" >&6
5392
5393 # Is the header present?
5394 echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5395 echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
5396 cat >conftest.$ac_ext <<_ACEOF
5397 /* confdefs.h.  */
5398 _ACEOF
5399 cat confdefs.h >>conftest.$ac_ext
5400 cat >>conftest.$ac_ext <<_ACEOF
5401 /* end confdefs.h.  */
5402 #include <stdlib.h>
5403 _ACEOF
5404 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5406   ac_status=$?
5407   grep -v '^ *+' conftest.er1 >conftest.err
5408   rm -f conftest.er1
5409   cat conftest.err >&5
5410   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411   (exit $ac_status); } >/dev/null; then
5412   if test -s conftest.err; then
5413     ac_cpp_err=$ac_c_preproc_warn_flag
5414     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5415   else
5416     ac_cpp_err=
5417   fi
5418 else
5419   ac_cpp_err=yes
5420 fi
5421 if test -z "$ac_cpp_err"; then
5422   ac_header_preproc=yes
5423 else
5424   echo "$as_me: failed program was:" >&5
5425 sed 's/^/| /' conftest.$ac_ext >&5
5426
5427   ac_header_preproc=no
5428 fi
5429 rm -f conftest.err conftest.$ac_ext
5430 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5431 echo "${ECHO_T}$ac_header_preproc" >&6
5432
5433 # So?  What about this header?
5434 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5435   yes:no: )
5436     { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5437 echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5438     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5439 echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5440     ac_header_preproc=yes
5441     ;;
5442   no:yes:* )
5443     { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5444 echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5445     { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5446 echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5447     { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5448 echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5449     { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5450 echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5451     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5452 echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5453     { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5454 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5455     (
5456       cat <<\_ASBOX
5457 ## --------------------------------- ##
5458 ## Report this to the expect lists.  ##
5459 ## --------------------------------- ##
5460 _ASBOX
5461     ) |
5462       sed "s/^/$as_me: WARNING:     /" >&2
5463     ;;
5464 esac
5465 echo "$as_me:$LINENO: checking for stdlib.h" >&5
5466 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
5467 if test "${ac_cv_header_stdlib_h+set}" = set; then
5468   echo $ECHO_N "(cached) $ECHO_C" >&6
5469 else
5470   ac_cv_header_stdlib_h=$ac_header_preproc
5471 fi
5472 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5473 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
5474
5475 fi
5476 if test $ac_cv_header_stdlib_h = yes; then
5477   tcl_ok=1
5478 else
5479   tcl_ok=0
5480 fi
5481
5482
5483     cat >conftest.$ac_ext <<_ACEOF
5484 /* confdefs.h.  */
5485 _ACEOF
5486 cat confdefs.h >>conftest.$ac_ext
5487 cat >>conftest.$ac_ext <<_ACEOF
5488 /* end confdefs.h.  */
5489 #include <stdlib.h>
5490
5491 _ACEOF
5492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5493   $EGREP "strtol" >/dev/null 2>&1; then
5494   :
5495 else
5496   tcl_ok=0
5497 fi
5498 rm -f conftest*
5499
5500     cat >conftest.$ac_ext <<_ACEOF
5501 /* confdefs.h.  */
5502 _ACEOF
5503 cat confdefs.h >>conftest.$ac_ext
5504 cat >>conftest.$ac_ext <<_ACEOF
5505 /* end confdefs.h.  */
5506 #include <stdlib.h>
5507
5508 _ACEOF
5509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5510   $EGREP "strtoul" >/dev/null 2>&1; then
5511   :
5512 else
5513   tcl_ok=0
5514 fi
5515 rm -f conftest*
5516
5517     cat >conftest.$ac_ext <<_ACEOF
5518 /* confdefs.h.  */
5519 _ACEOF
5520 cat confdefs.h >>conftest.$ac_ext
5521 cat >>conftest.$ac_ext <<_ACEOF
5522 /* end confdefs.h.  */
5523 #include <stdlib.h>
5524
5525 _ACEOF
5526 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5527   $EGREP "strtod" >/dev/null 2>&1; then
5528   :
5529 else
5530   tcl_ok=0
5531 fi
5532 rm -f conftest*
5533
5534     if test $tcl_ok = 0; then
5535
5536 cat >>confdefs.h <<\_ACEOF
5537 #define NO_STDLIB_H 1
5538 _ACEOF
5539
5540     fi
5541     if test "${ac_cv_header_string_h+set}" = set; then
5542   echo "$as_me:$LINENO: checking for string.h" >&5
5543 echo $ECHO_N "checking for string.h... $ECHO_C" >&6
5544 if test "${ac_cv_header_string_h+set}" = set; then
5545   echo $ECHO_N "(cached) $ECHO_C" >&6
5546 fi
5547 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
5548 echo "${ECHO_T}$ac_cv_header_string_h" >&6
5549 else
5550   # Is the header compilable?
5551 echo "$as_me:$LINENO: checking string.h usability" >&5
5552 echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
5553 cat >conftest.$ac_ext <<_ACEOF
5554 /* confdefs.h.  */
5555 _ACEOF
5556 cat confdefs.h >>conftest.$ac_ext
5557 cat >>conftest.$ac_ext <<_ACEOF
5558 /* end confdefs.h.  */
5559 $ac_includes_default
5560 #include <string.h>
5561 _ACEOF
5562 rm -f conftest.$ac_objext
5563 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5564   (eval $ac_compile) 2>conftest.er1
5565   ac_status=$?
5566   grep -v '^ *+' conftest.er1 >conftest.err
5567   rm -f conftest.er1
5568   cat conftest.err >&5
5569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5570   (exit $ac_status); } &&
5571          { ac_try='test -z "$ac_c_werror_flag"
5572                          || test ! -s conftest.err'
5573   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5574   (eval $ac_try) 2>&5
5575   ac_status=$?
5576   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5577   (exit $ac_status); }; } &&
5578          { ac_try='test -s conftest.$ac_objext'
5579   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5580   (eval $ac_try) 2>&5
5581   ac_status=$?
5582   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5583   (exit $ac_status); }; }; then
5584   ac_header_compiler=yes
5585 else
5586   echo "$as_me: failed program was:" >&5
5587 sed 's/^/| /' conftest.$ac_ext >&5
5588
5589 ac_header_compiler=no
5590 fi
5591 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5592 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5593 echo "${ECHO_T}$ac_header_compiler" >&6
5594
5595 # Is the header present?
5596 echo "$as_me:$LINENO: checking string.h presence" >&5
5597 echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
5598 cat >conftest.$ac_ext <<_ACEOF
5599 /* confdefs.h.  */
5600 _ACEOF
5601 cat confdefs.h >>conftest.$ac_ext
5602 cat >>conftest.$ac_ext <<_ACEOF
5603 /* end confdefs.h.  */
5604 #include <string.h>
5605 _ACEOF
5606 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5607   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5608   ac_status=$?
5609   grep -v '^ *+' conftest.er1 >conftest.err
5610   rm -f conftest.er1
5611   cat conftest.err >&5
5612   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5613   (exit $ac_status); } >/dev/null; then
5614   if test -s conftest.err; then
5615     ac_cpp_err=$ac_c_preproc_warn_flag
5616     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5617   else
5618     ac_cpp_err=
5619   fi
5620 else
5621   ac_cpp_err=yes
5622 fi
5623 if test -z "$ac_cpp_err"; then
5624   ac_header_preproc=yes
5625 else
5626   echo "$as_me: failed program was:" >&5
5627 sed 's/^/| /' conftest.$ac_ext >&5
5628
5629   ac_header_preproc=no
5630 fi
5631 rm -f conftest.err conftest.$ac_ext
5632 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5633 echo "${ECHO_T}$ac_header_preproc" >&6
5634
5635 # So?  What about this header?
5636 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5637   yes:no: )
5638     { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
5639 echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5640     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
5641 echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
5642     ac_header_preproc=yes
5643     ;;
5644   no:yes:* )
5645     { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
5646 echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
5647     { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
5648 echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
5649     { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
5650 echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
5651     { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
5652 echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5653     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
5654 echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
5655     { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
5656 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
5657     (
5658       cat <<\_ASBOX
5659 ## --------------------------------- ##
5660 ## Report this to the expect lists.  ##
5661 ## --------------------------------- ##
5662 _ASBOX
5663     ) |
5664       sed "s/^/$as_me: WARNING:     /" >&2
5665     ;;
5666 esac
5667 echo "$as_me:$LINENO: checking for string.h" >&5
5668 echo $ECHO_N "checking for string.h... $ECHO_C" >&6
5669 if test "${ac_cv_header_string_h+set}" = set; then
5670   echo $ECHO_N "(cached) $ECHO_C" >&6
5671 else
5672   ac_cv_header_string_h=$ac_header_preproc
5673 fi
5674 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
5675 echo "${ECHO_T}$ac_cv_header_string_h" >&6
5676
5677 fi
5678 if test $ac_cv_header_string_h = yes; then
5679   tcl_ok=1
5680 else
5681   tcl_ok=0
5682 fi
5683
5684
5685     cat >conftest.$ac_ext <<_ACEOF
5686 /* confdefs.h.  */
5687 _ACEOF
5688 cat confdefs.h >>conftest.$ac_ext
5689 cat >>conftest.$ac_ext <<_ACEOF
5690 /* end confdefs.h.  */
5691 #include <string.h>
5692
5693 _ACEOF
5694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5695   $EGREP "strstr" >/dev/null 2>&1; then
5696   :
5697 else
5698   tcl_ok=0
5699 fi
5700 rm -f conftest*
5701
5702     cat >conftest.$ac_ext <<_ACEOF
5703 /* confdefs.h.  */
5704 _ACEOF
5705 cat confdefs.h >>conftest.$ac_ext
5706 cat >>conftest.$ac_ext <<_ACEOF
5707 /* end confdefs.h.  */
5708 #include <string.h>
5709
5710 _ACEOF
5711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5712   $EGREP "strerror" >/dev/null 2>&1; then
5713   :
5714 else
5715   tcl_ok=0
5716 fi
5717 rm -f conftest*
5718
5719
5720     # See also memmove check below for a place where NO_STRING_H can be
5721     # set and why.
5722
5723     if test $tcl_ok = 0; then
5724
5725 cat >>confdefs.h <<\_ACEOF
5726 #define NO_STRING_H 1
5727 _ACEOF
5728
5729     fi
5730
5731     if test "${ac_cv_header_sys_wait_h+set}" = set; then
5732   echo "$as_me:$LINENO: checking for sys/wait.h" >&5
5733 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
5734 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5735   echo $ECHO_N "(cached) $ECHO_C" >&6
5736 fi
5737 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5738 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5739 else
5740   # Is the header compilable?
5741 echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
5742 echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
5743 cat >conftest.$ac_ext <<_ACEOF
5744 /* confdefs.h.  */
5745 _ACEOF
5746 cat confdefs.h >>conftest.$ac_ext
5747 cat >>conftest.$ac_ext <<_ACEOF
5748 /* end confdefs.h.  */
5749 $ac_includes_default
5750 #include <sys/wait.h>
5751 _ACEOF
5752 rm -f conftest.$ac_objext
5753 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5754   (eval $ac_compile) 2>conftest.er1
5755   ac_status=$?
5756   grep -v '^ *+' conftest.er1 >conftest.err
5757   rm -f conftest.er1
5758   cat conftest.err >&5
5759   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760   (exit $ac_status); } &&
5761          { ac_try='test -z "$ac_c_werror_flag"
5762                          || test ! -s conftest.err'
5763   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5764   (eval $ac_try) 2>&5
5765   ac_status=$?
5766   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767   (exit $ac_status); }; } &&
5768          { ac_try='test -s conftest.$ac_objext'
5769   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770   (eval $ac_try) 2>&5
5771   ac_status=$?
5772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5773   (exit $ac_status); }; }; then
5774   ac_header_compiler=yes
5775 else
5776   echo "$as_me: failed program was:" >&5
5777 sed 's/^/| /' conftest.$ac_ext >&5
5778
5779 ac_header_compiler=no
5780 fi
5781 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5782 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5783 echo "${ECHO_T}$ac_header_compiler" >&6
5784
5785 # Is the header present?
5786 echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
5787 echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
5788 cat >conftest.$ac_ext <<_ACEOF
5789 /* confdefs.h.  */
5790 _ACEOF
5791 cat confdefs.h >>conftest.$ac_ext
5792 cat >>conftest.$ac_ext <<_ACEOF
5793 /* end confdefs.h.  */
5794 #include <sys/wait.h>
5795 _ACEOF
5796 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5797   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5798   ac_status=$?
5799   grep -v '^ *+' conftest.er1 >conftest.err
5800   rm -f conftest.er1
5801   cat conftest.err >&5
5802   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5803   (exit $ac_status); } >/dev/null; then
5804   if test -s conftest.err; then
5805     ac_cpp_err=$ac_c_preproc_warn_flag
5806     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5807   else
5808     ac_cpp_err=
5809   fi
5810 else
5811   ac_cpp_err=yes
5812 fi
5813 if test -z "$ac_cpp_err"; then
5814   ac_header_preproc=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 sed 's/^/| /' conftest.$ac_ext >&5
5818
5819   ac_header_preproc=no
5820 fi
5821 rm -f conftest.err conftest.$ac_ext
5822 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5823 echo "${ECHO_T}$ac_header_preproc" >&6
5824
5825 # So?  What about this header?
5826 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5827   yes:no: )
5828     { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
5829 echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5830     { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
5831 echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
5832     ac_header_preproc=yes
5833     ;;
5834   no:yes:* )
5835     { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
5836 echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
5837     { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
5838 echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
5839     { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
5840 echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
5841     { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
5842 echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5843     { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
5844 echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
5845     { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
5846 echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
5847     (
5848       cat <<\_ASBOX
5849 ## --------------------------------- ##
5850 ## Report this to the expect lists.  ##
5851 ## --------------------------------- ##
5852 _ASBOX
5853     ) |
5854       sed "s/^/$as_me: WARNING:     /" >&2
5855     ;;
5856 esac
5857 echo "$as_me:$LINENO: checking for sys/wait.h" >&5
5858 echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
5859 if test "${ac_cv_header_sys_wait_h+set}" = set; then
5860   echo $ECHO_N "(cached) $ECHO_C" >&6
5861 else
5862   ac_cv_header_sys_wait_h=$ac_header_preproc
5863 fi
5864 echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
5865 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
5866
5867 fi
5868 if test $ac_cv_header_sys_wait_h = yes; then
5869   :
5870 else
5871
5872 cat >>confdefs.h <<\_ACEOF
5873 #define NO_SYS_WAIT_H 1
5874 _ACEOF
5875
5876 fi
5877
5878
5879     if test "${ac_cv_header_dlfcn_h+set}" = set; then
5880   echo "$as_me:$LINENO: checking for dlfcn.h" >&5
5881 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
5882 if test "${ac_cv_header_dlfcn_h+set}" = set; then
5883   echo $ECHO_N "(cached) $ECHO_C" >&6
5884 fi
5885 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
5886 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
5887 else
5888   # Is the header compilable?
5889 echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
5890 echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
5891 cat >conftest.$ac_ext <<_ACEOF
5892 /* confdefs.h.  */
5893 _ACEOF
5894 cat confdefs.h >>conftest.$ac_ext
5895 cat >>conftest.$ac_ext <<_ACEOF
5896 /* end confdefs.h.  */
5897 $ac_includes_default
5898 #include <dlfcn.h>
5899 _ACEOF
5900 rm -f conftest.$ac_objext
5901 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5902   (eval $ac_compile) 2>conftest.er1
5903   ac_status=$?
5904   grep -v '^ *+' conftest.er1 >conftest.err
5905   rm -f conftest.er1
5906   cat conftest.err >&5
5907   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5908   (exit $ac_status); } &&
5909          { ac_try='test -z "$ac_c_werror_flag"
5910                          || test ! -s conftest.err'
5911   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5912   (eval $ac_try) 2>&5
5913   ac_status=$?
5914   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5915   (exit $ac_status); }; } &&
5916          { ac_try='test -s conftest.$ac_objext'
5917   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5918   (eval $ac_try) 2>&5
5919   ac_status=$?
5920   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921   (exit $ac_status); }; }; then
5922   ac_header_compiler=yes
5923 else
5924   echo "$as_me: failed program was:" >&5
5925 sed 's/^/| /' conftest.$ac_ext >&5
5926
5927 ac_header_compiler=no
5928 fi
5929 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5930 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5931 echo "${ECHO_T}$ac_header_compiler" >&6
5932
5933 # Is the header present?
5934 echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
5935 echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
5936 cat >conftest.$ac_ext <<_ACEOF
5937 /* confdefs.h.  */
5938 _ACEOF
5939 cat confdefs.h >>conftest.$ac_ext
5940 cat >>conftest.$ac_ext <<_ACEOF
5941 /* end confdefs.h.  */
5942 #include <dlfcn.h>
5943 _ACEOF
5944 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5945   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5946   ac_status=$?
5947   grep -v '^ *+' conftest.er1 >conftest.err
5948   rm -f conftest.er1
5949   cat conftest.err >&5
5950   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5951   (exit $ac_status); } >/dev/null; then
5952   if test -s conftest.err; then
5953     ac_cpp_err=$ac_c_preproc_warn_flag
5954     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5955   else
5956     ac_cpp_err=
5957   fi
5958 else
5959   ac_cpp_err=yes
5960 fi
5961 if test -z "$ac_cpp_err"; then
5962   ac_header_preproc=yes
5963 else
5964   echo "$as_me: failed program was:" >&5
5965 sed 's/^/| /' conftest.$ac_ext >&5
5966
5967   ac_header_preproc=no
5968 fi
5969 rm -f conftest.err conftest.$ac_ext
5970 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5971 echo "${ECHO_T}$ac_header_preproc" >&6
5972
5973 # So?  What about this header?
5974 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5975   yes:no: )
5976     { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
5977 echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5978     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
5979 echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
5980     ac_header_preproc=yes
5981     ;;
5982   no:yes:* )
5983     { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
5984 echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
5985     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
5986 echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
5987     { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
5988 echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
5989     { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
5990 echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5991     { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
5992 echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
5993     { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
5994 echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
5995     (
5996       cat <<\_ASBOX
5997 ## --------------------------------- ##
5998 ## Report this to the expect lists.  ##
5999 ## --------------------------------- ##
6000 _ASBOX
6001     ) |
6002       sed "s/^/$as_me: WARNING:     /" >&2
6003     ;;
6004 esac
6005 echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6006 echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
6007 if test "${ac_cv_header_dlfcn_h+set}" = set; then
6008   echo $ECHO_N "(cached) $ECHO_C" >&6
6009 else
6010   ac_cv_header_dlfcn_h=$ac_header_preproc
6011 fi
6012 echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6013 echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
6014
6015 fi
6016 if test $ac_cv_header_dlfcn_h = yes; then
6017   :
6018 else
6019
6020 cat >>confdefs.h <<\_ACEOF
6021 #define NO_DLFCN_H 1
6022 _ACEOF
6023
6024 fi
6025
6026
6027
6028     # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6029
6030 for ac_header in sys/param.h
6031 do
6032 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6033 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6034   echo "$as_me:$LINENO: checking for $ac_header" >&5
6035 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6036 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6037   echo $ECHO_N "(cached) $ECHO_C" >&6
6038 fi
6039 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6040 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6041 else
6042   # Is the header compilable?
6043 echo "$as_me:$LINENO: checking $ac_header usability" >&5
6044 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
6045 cat >conftest.$ac_ext <<_ACEOF
6046 /* confdefs.h.  */
6047 _ACEOF
6048 cat confdefs.h >>conftest.$ac_ext
6049 cat >>conftest.$ac_ext <<_ACEOF
6050 /* end confdefs.h.  */
6051 $ac_includes_default
6052 #include <$ac_header>
6053 _ACEOF
6054 rm -f conftest.$ac_objext
6055 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6056   (eval $ac_compile) 2>conftest.er1
6057   ac_status=$?
6058   grep -v '^ *+' conftest.er1 >conftest.err
6059   rm -f conftest.er1
6060   cat conftest.err >&5
6061   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6062   (exit $ac_status); } &&
6063          { ac_try='test -z "$ac_c_werror_flag"
6064                          || test ! -s conftest.err'
6065   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6066   (eval $ac_try) 2>&5
6067   ac_status=$?
6068   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6069   (exit $ac_status); }; } &&
6070          { ac_try='test -s conftest.$ac_objext'
6071   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6072   (eval $ac_try) 2>&5
6073   ac_status=$?
6074   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6075   (exit $ac_status); }; }; then
6076   ac_header_compiler=yes
6077 else
6078   echo "$as_me: failed program was:" >&5
6079 sed 's/^/| /' conftest.$ac_ext >&5
6080
6081 ac_header_compiler=no
6082 fi
6083 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
6084 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6085 echo "${ECHO_T}$ac_header_compiler" >&6
6086
6087 # Is the header present?
6088 echo "$as_me:$LINENO: checking $ac_header presence" >&5
6089 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
6090 cat >conftest.$ac_ext <<_ACEOF
6091 /* confdefs.h.  */
6092 _ACEOF
6093 cat confdefs.h >>conftest.$ac_ext
6094 cat >>conftest.$ac_ext <<_ACEOF
6095 /* end confdefs.h.  */
6096 #include <$ac_header>
6097 _ACEOF
6098 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
6099   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6100   ac_status=$?
6101   grep -v '^ *+' conftest.er1 >conftest.err
6102   rm -f conftest.er1
6103   cat conftest.err >&5
6104   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6105   (exit $ac_status); } >/dev/null; then
6106   if test -s conftest.err; then
6107     ac_cpp_err=$ac_c_preproc_warn_flag
6108     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
6109   else
6110     ac_cpp_err=
6111   fi
6112 else
6113   ac_cpp_err=yes
6114 fi
6115 if test -z "$ac_cpp_err"; then
6116   ac_header_preproc=yes
6117 else
6118   echo "$as_me: failed program was:" >&5
6119 sed 's/^/| /' conftest.$ac_ext >&5
6120
6121   ac_header_preproc=no
6122 fi
6123 rm -f conftest.err conftest.$ac_ext
6124 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6125 echo "${ECHO_T}$ac_header_preproc" >&6
6126
6127 # So?  What about this header?
6128 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6129   yes:no: )
6130     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6131 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6132     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6133 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6134     ac_header_preproc=yes
6135     ;;
6136   no:yes:* )
6137     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6138 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6139     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6140 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6141     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6142 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6143     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6144 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6145     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6146 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6147     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6148 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6149     (
6150       cat <<\_ASBOX
6151 ## --------------------------------- ##
6152 ## Report this to the expect lists.  ##
6153 ## --------------------------------- ##
6154 _ASBOX
6155     ) |
6156       sed "s/^/$as_me: WARNING:     /" >&2
6157     ;;
6158 esac
6159 echo "$as_me:$LINENO: checking for $ac_header" >&5
6160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6162   echo $ECHO_N "(cached) $ECHO_C" >&6
6163 else
6164   eval "$as_ac_Header=\$ac_header_preproc"
6165 fi
6166 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
6167 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6168
6169 fi
6170 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6171   cat >>confdefs.h <<_ACEOF
6172 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6173 _ACEOF
6174
6175 fi
6176
6177 done
6178
6179
6180         # Let the user call this, because if it triggers, they will
6181         # need a compat/strtod.c that is correct.  Users can also
6182         # use Tcl_GetDouble(FromObj) instead.
6183         #TEA_BUGGY_STRTOD
6184     fi
6185
6186
6187 #--------------------------------------------------------------------
6188 # __CHANGE__
6189 # Choose which headers you need.  Extension authors should try very
6190 # hard to only rely on the Tcl public header files.  Internal headers
6191 # contain private data structures and are subject to change without
6192 # notice.
6193 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6194 #--------------------------------------------------------------------
6195
6196 #TEA_PUBLIC_TCL_HEADERS
6197
6198     echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6199 echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6
6200
6201
6202 # Check whether --with-tclinclude or --without-tclinclude was given.
6203 if test "${with_tclinclude+set}" = set; then
6204   withval="$with_tclinclude"
6205   with_tclinclude=${withval}
6206 fi;
6207
6208     if test "${ac_cv_c_tclh+set}" = set; then
6209   echo $ECHO_N "(cached) $ECHO_C" >&6
6210 else
6211
6212         # Use the value from --with-tclinclude, if it was given
6213
6214         if test x"${with_tclinclude}" != x ; then
6215             if test -f "${with_tclinclude}/tcl.h" ; then
6216                 ac_cv_c_tclh=${with_tclinclude}
6217             else
6218                 { { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6219 echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6220    { (exit 1); exit 1; }; }
6221             fi
6222         else
6223             list=""
6224             if test "`uname -s`" = "Darwin"; then
6225                 # If Tcl was built as a framework, attempt to use
6226                 # the framework's Headers directory
6227                 case ${TCL_DEFS} in
6228                     *TCL_FRAMEWORK*)
6229                         list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6230                         ;;
6231                 esac
6232             fi
6233
6234             # Look in the source dir only if Tcl is not installed,
6235             # and in that situation, look there before installed locations.
6236             if test -f "${TCL_BIN_DIR}/Makefile" ; then
6237                 list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6238             fi
6239
6240             # Check order: pkg --prefix location, Tcl's --prefix location,
6241             # relative to directory of tclConfig.sh.
6242
6243             eval "temp_includedir=${includedir}"
6244             list="$list \
6245                 `ls -d ${temp_includedir}        2>/dev/null` \
6246                 `ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6247                 `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6248             if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6249                 list="$list /usr/local/include /usr/include"
6250                 if test x"${TCL_INCLUDE_SPEC}" != x ; then
6251                     d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6252                     list="$list `ls -d ${d} 2>/dev/null`"
6253                 fi
6254             fi
6255             for i in $list ; do
6256                 if test -f "$i/tcl.h" ; then
6257                     ac_cv_c_tclh=$i
6258                     break
6259                 fi
6260             done
6261         fi
6262
6263 fi
6264
6265
6266     # Print a message based on how we determined the include path
6267
6268     if test x"${ac_cv_c_tclh}" = x ; then
6269         { { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6270 echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6271    { (exit 1); exit 1; }; }
6272     else
6273         echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6274 echo "${ECHO_T}${ac_cv_c_tclh}" >&6
6275     fi
6276
6277     # Convert to a native path and substitute into the output files.
6278
6279     INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6280
6281     TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6282
6283
6284
6285
6286     # Allow for --with-tclinclude to take effect and define ${ac_cv_c_tclh}
6287
6288     echo "$as_me:$LINENO: checking for Tcl private include files" >&5
6289 echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
6290
6291     TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
6292     TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
6293
6294     # Check to see if tcl<Plat>Port.h isn't already with the public headers
6295     # Don't look for tclInt.h because that resides with tcl.h in the core
6296     # sources, but the <plat>Port headers are in a different directory
6297     if test "${TEA_PLATFORM}" = "windows" -a \
6298         -f "${ac_cv_c_tclh}/tclWinPort.h"; then
6299         result="private headers found with public headers"
6300     elif test "${TEA_PLATFORM}" = "unix" -a \
6301         -f "${ac_cv_c_tclh}/tclUnixPort.h"; then
6302         result="private headers found with public headers"
6303     else
6304         TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
6305         if test "${TEA_PLATFORM}" = "windows"; then
6306             TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
6307         else
6308             TCL_PLATFORM_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
6309         fi
6310         # Overwrite the previous TCL_INCLUDES as this should capture both
6311         # public and private headers in the same set.
6312         # We want to ensure these are substituted so as not to require
6313         # any *_NATIVE vars be defined in the Makefile
6314         TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
6315         if test "`uname -s`" = "Darwin"; then
6316             # If Tcl was built as a framework, attempt to use
6317             # the framework's Headers and PrivateHeaders directories
6318             case ${TCL_DEFS} in
6319                 *TCL_FRAMEWORK*)
6320                     if test -d "${TCL_BIN_DIR}/Headers" -a \
6321                             -d "${TCL_BIN_DIR}/PrivateHeaders"; then
6322                         TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"
6323                     else
6324                         TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"
6325                     fi
6326                     ;;
6327             esac
6328             result="Using ${TCL_INCLUDES}"
6329         else
6330             if test ! -f "${TCL_SRC_DIR}/generic/tclInt.h" ; then
6331                 { { echo "$as_me:$LINENO: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&5
6332 echo "$as_me: error: Cannot find private header tclInt.h in ${TCL_SRC_DIR}" >&2;}
6333    { (exit 1); exit 1; }; }
6334             fi
6335             result="Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}"
6336         fi
6337     fi
6338
6339
6340
6341
6342     echo "$as_me:$LINENO: result: ${result}" >&5
6343 echo "${ECHO_T}${result}" >&6
6344
6345
6346 #--------------------------------------------------------------------
6347 # You can add more files to clean if your extension creates any extra
6348 # files by extending CLEANFILES.
6349 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
6350 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
6351 #
6352 # A few miscellaneous platform-specific items:
6353 # TEA_ADD_* any platform specific compiler/build info here.
6354 #--------------------------------------------------------------------
6355
6356
6357     CLEANFILES="$CLEANFILES pkgIndex.tcl"
6358
6359
6360 #--------------------------------------------------------------------
6361 # Check whether --enable-threads or --disable-threads was given.
6362 # So far only Tcl responds to this one.
6363 #
6364 # Hook for when threading is supported in Expect.  The --enable-threads
6365 # flag currently has no effect.
6366 #------------------------------------------------------------------------
6367
6368
6369     # Check whether --enable-threads or --disable-threads was given.
6370 if test "${enable_threads+set}" = set; then
6371   enableval="$enable_threads"
6372   tcl_ok=$enableval
6373 else
6374   tcl_ok=yes
6375 fi;
6376
6377     if test "${enable_threads+set}" = set; then
6378         enableval="$enable_threads"
6379         tcl_ok=$enableval
6380     else
6381         tcl_ok=yes
6382     fi
6383
6384     if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6385         TCL_THREADS=1
6386
6387         if test "${TEA_PLATFORM}" != "windows" ; then
6388             # We are always OK on Windows, so check what this platform wants:
6389
6390             # USE_THREAD_ALLOC tells us to try the special thread-based
6391             # allocator that significantly reduces lock contention
6392
6393 cat >>confdefs.h <<\_ACEOF
6394 #define USE_THREAD_ALLOC 1
6395 _ACEOF
6396
6397
6398 cat >>confdefs.h <<\_ACEOF
6399 #define _REENTRANT 1
6400 _ACEOF
6401
6402             if test "`uname -s`" = "SunOS" ; then
6403
6404 cat >>confdefs.h <<\_ACEOF
6405 #define _POSIX_PTHREAD_SEMANTICS 1
6406 _ACEOF
6407
6408             fi
6409
6410 cat >>confdefs.h <<\_ACEOF
6411 #define _THREAD_SAFE 1
6412 _ACEOF
6413
6414             echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
6415 echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
6416 if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
6417   echo $ECHO_N "(cached) $ECHO_C" >&6
6418 else
6419   ac_check_lib_save_LIBS=$LIBS
6420 LIBS="-lpthread  $LIBS"
6421 cat >conftest.$ac_ext <<_ACEOF
6422 /* confdefs.h.  */
6423 _ACEOF
6424 cat confdefs.h >>conftest.$ac_ext
6425 cat >>conftest.$ac_ext <<_ACEOF
6426 /* end confdefs.h.  */
6427
6428 /* Override any gcc2 internal prototype to avoid an error.  */
6429 #ifdef __cplusplus
6430 extern "C"
6431 #endif
6432 /* We use char because int might match the return type of a gcc2
6433    builtin and then its argument prototype would still apply.  */
6434 char pthread_mutex_init ();
6435 int
6436 main ()
6437 {
6438 pthread_mutex_init ();
6439   ;
6440   return 0;
6441 }
6442 _ACEOF
6443 rm -f conftest.$ac_objext conftest$ac_exeext
6444 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6445   (eval $ac_link) 2>conftest.er1
6446   ac_status=$?
6447   grep -v '^ *+' conftest.er1 >conftest.err
6448   rm -f conftest.er1
6449   cat conftest.err >&5
6450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6451   (exit $ac_status); } &&
6452          { ac_try='test -z "$ac_c_werror_flag"
6453                          || test ! -s conftest.err'
6454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6455   (eval $ac_try) 2>&5
6456   ac_status=$?
6457   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6458   (exit $ac_status); }; } &&
6459          { ac_try='test -s conftest$ac_exeext'
6460   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6461   (eval $ac_try) 2>&5
6462   ac_status=$?
6463   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6464   (exit $ac_status); }; }; then
6465   ac_cv_lib_pthread_pthread_mutex_init=yes
6466 else
6467   echo "$as_me: failed program was:" >&5
6468 sed 's/^/| /' conftest.$ac_ext >&5
6469
6470 ac_cv_lib_pthread_pthread_mutex_init=no
6471 fi
6472 rm -f conftest.err conftest.$ac_objext \
6473       conftest$ac_exeext conftest.$ac_ext
6474 LIBS=$ac_check_lib_save_LIBS
6475 fi
6476 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6477 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
6478 if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
6479   tcl_ok=yes
6480 else
6481   tcl_ok=no
6482 fi
6483
6484             if test "$tcl_ok" = "no"; then
6485                 # Check a little harder for __pthread_mutex_init in the same
6486                 # library, as some systems hide it there until pthread.h is
6487                 # defined.  We could alternatively do an AC_TRY_COMPILE with
6488                 # pthread.h, but that will work with libpthread really doesn't
6489                 # exist, like AIX 4.2.  [Bug: 4359]
6490                 echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
6491 echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
6492 if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
6493   echo $ECHO_N "(cached) $ECHO_C" >&6
6494 else
6495   ac_check_lib_save_LIBS=$LIBS
6496 LIBS="-lpthread  $LIBS"
6497 cat >conftest.$ac_ext <<_ACEOF
6498 /* confdefs.h.  */
6499 _ACEOF
6500 cat confdefs.h >>conftest.$ac_ext
6501 cat >>conftest.$ac_ext <<_ACEOF
6502 /* end confdefs.h.  */
6503
6504 /* Override any gcc2 internal prototype to avoid an error.  */
6505 #ifdef __cplusplus
6506 extern "C"
6507 #endif
6508 /* We use char because int might match the return type of a gcc2
6509    builtin and then its argument prototype would still apply.  */
6510 char __pthread_mutex_init ();
6511 int
6512 main ()
6513 {
6514 __pthread_mutex_init ();
6515   ;
6516   return 0;
6517 }
6518 _ACEOF
6519 rm -f conftest.$ac_objext conftest$ac_exeext
6520 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6521   (eval $ac_link) 2>conftest.er1
6522   ac_status=$?
6523   grep -v '^ *+' conftest.er1 >conftest.err
6524   rm -f conftest.er1
6525   cat conftest.err >&5
6526   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6527   (exit $ac_status); } &&
6528          { ac_try='test -z "$ac_c_werror_flag"
6529                          || test ! -s conftest.err'
6530   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6531   (eval $ac_try) 2>&5
6532   ac_status=$?
6533   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6534   (exit $ac_status); }; } &&
6535          { ac_try='test -s conftest$ac_exeext'
6536   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6537   (eval $ac_try) 2>&5
6538   ac_status=$?
6539   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6540   (exit $ac_status); }; }; then
6541   ac_cv_lib_pthread___pthread_mutex_init=yes
6542 else
6543   echo "$as_me: failed program was:" >&5
6544 sed 's/^/| /' conftest.$ac_ext >&5
6545
6546 ac_cv_lib_pthread___pthread_mutex_init=no
6547 fi
6548 rm -f conftest.err conftest.$ac_objext \
6549       conftest$ac_exeext conftest.$ac_ext
6550 LIBS=$ac_check_lib_save_LIBS
6551 fi
6552 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
6553 echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
6554 if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
6555   tcl_ok=yes
6556 else
6557   tcl_ok=no
6558 fi
6559
6560             fi
6561
6562             if test "$tcl_ok" = "yes"; then
6563                 # The space is needed
6564                 THREADS_LIBS=" -lpthread"
6565             else
6566                 echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
6567 echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
6568 if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
6569   echo $ECHO_N "(cached) $ECHO_C" >&6
6570 else
6571   ac_check_lib_save_LIBS=$LIBS
6572 LIBS="-lpthreads  $LIBS"
6573 cat >conftest.$ac_ext <<_ACEOF
6574 /* confdefs.h.  */
6575 _ACEOF
6576 cat confdefs.h >>conftest.$ac_ext
6577 cat >>conftest.$ac_ext <<_ACEOF
6578 /* end confdefs.h.  */
6579
6580 /* Override any gcc2 internal prototype to avoid an error.  */
6581 #ifdef __cplusplus
6582 extern "C"
6583 #endif
6584 /* We use char because int might match the return type of a gcc2
6585    builtin and then its argument prototype would still apply.  */
6586 char pthread_mutex_init ();
6587 int
6588 main ()
6589 {
6590 pthread_mutex_init ();
6591   ;
6592   return 0;
6593 }
6594 _ACEOF
6595 rm -f conftest.$ac_objext conftest$ac_exeext
6596 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6597   (eval $ac_link) 2>conftest.er1
6598   ac_status=$?
6599   grep -v '^ *+' conftest.er1 >conftest.err
6600   rm -f conftest.er1
6601   cat conftest.err >&5
6602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603   (exit $ac_status); } &&
6604          { ac_try='test -z "$ac_c_werror_flag"
6605                          || test ! -s conftest.err'
6606   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6607   (eval $ac_try) 2>&5
6608   ac_status=$?
6609   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6610   (exit $ac_status); }; } &&
6611          { ac_try='test -s conftest$ac_exeext'
6612   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6613   (eval $ac_try) 2>&5
6614   ac_status=$?
6615   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6616   (exit $ac_status); }; }; then
6617   ac_cv_lib_pthreads_pthread_mutex_init=yes
6618 else
6619   echo "$as_me: failed program was:" >&5
6620 sed 's/^/| /' conftest.$ac_ext >&5
6621
6622 ac_cv_lib_pthreads_pthread_mutex_init=no
6623 fi
6624 rm -f conftest.err conftest.$ac_objext \
6625       conftest$ac_exeext conftest.$ac_ext
6626 LIBS=$ac_check_lib_save_LIBS
6627 fi
6628 echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
6629 echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
6630 if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
6631   tcl_ok=yes
6632 else
6633   tcl_ok=no
6634 fi
6635
6636                 if test "$tcl_ok" = "yes"; then
6637                     # The space is needed
6638                     THREADS_LIBS=" -lpthreads"
6639                 else
6640                     echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
6641 echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
6642 if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
6643   echo $ECHO_N "(cached) $ECHO_C" >&6
6644 else
6645   ac_check_lib_save_LIBS=$LIBS
6646 LIBS="-lc  $LIBS"
6647 cat >conftest.$ac_ext <<_ACEOF
6648 /* confdefs.h.  */
6649 _ACEOF
6650 cat confdefs.h >>conftest.$ac_ext
6651 cat >>conftest.$ac_ext <<_ACEOF
6652 /* end confdefs.h.  */
6653
6654 /* Override any gcc2 internal prototype to avoid an error.  */
6655 #ifdef __cplusplus
6656 extern "C"
6657 #endif
6658 /* We use char because int might match the return type of a gcc2
6659    builtin and then its argument prototype would still apply.  */
6660 char pthread_mutex_init ();
6661 int
6662 main ()
6663 {
6664 pthread_mutex_init ();
6665   ;
6666   return 0;
6667 }
6668 _ACEOF
6669 rm -f conftest.$ac_objext conftest$ac_exeext
6670 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6671   (eval $ac_link) 2>conftest.er1
6672   ac_status=$?
6673   grep -v '^ *+' conftest.er1 >conftest.err
6674   rm -f conftest.er1
6675   cat conftest.err >&5
6676   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6677   (exit $ac_status); } &&
6678          { ac_try='test -z "$ac_c_werror_flag"
6679                          || test ! -s conftest.err'
6680   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6681   (eval $ac_try) 2>&5
6682   ac_status=$?
6683   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6684   (exit $ac_status); }; } &&
6685          { ac_try='test -s conftest$ac_exeext'
6686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6687   (eval $ac_try) 2>&5
6688   ac_status=$?
6689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6690   (exit $ac_status); }; }; then
6691   ac_cv_lib_c_pthread_mutex_init=yes
6692 else
6693   echo "$as_me: failed program was:" >&5
6694 sed 's/^/| /' conftest.$ac_ext >&5
6695
6696 ac_cv_lib_c_pthread_mutex_init=no
6697 fi
6698 rm -f conftest.err conftest.$ac_objext \
6699       conftest$ac_exeext conftest.$ac_ext
6700 LIBS=$ac_check_lib_save_LIBS
6701 fi
6702 echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
6703 echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
6704 if test $ac_cv_lib_c_pthread_mutex_init = yes; then
6705   tcl_ok=yes
6706 else
6707   tcl_ok=no
6708 fi
6709
6710                     if test "$tcl_ok" = "no"; then
6711                         echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
6712 echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
6713 if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
6714   echo $ECHO_N "(cached) $ECHO_C" >&6
6715 else
6716   ac_check_lib_save_LIBS=$LIBS
6717 LIBS="-lc_r  $LIBS"
6718 cat >conftest.$ac_ext <<_ACEOF
6719 /* confdefs.h.  */
6720 _ACEOF
6721 cat confdefs.h >>conftest.$ac_ext
6722 cat >>conftest.$ac_ext <<_ACEOF
6723 /* end confdefs.h.  */
6724
6725 /* Override any gcc2 internal prototype to avoid an error.  */
6726 #ifdef __cplusplus
6727 extern "C"
6728 #endif
6729 /* We use char because int might match the return type of a gcc2
6730    builtin and then its argument prototype would still apply.  */
6731 char pthread_mutex_init ();
6732 int
6733 main ()
6734 {
6735 pthread_mutex_init ();
6736   ;
6737   return 0;
6738 }
6739 _ACEOF
6740 rm -f conftest.$ac_objext conftest$ac_exeext
6741 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6742   (eval $ac_link) 2>conftest.er1
6743   ac_status=$?
6744   grep -v '^ *+' conftest.er1 >conftest.err
6745   rm -f conftest.er1
6746   cat conftest.err >&5
6747   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6748   (exit $ac_status); } &&
6749          { ac_try='test -z "$ac_c_werror_flag"
6750                          || test ! -s conftest.err'
6751   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6755   (exit $ac_status); }; } &&
6756          { ac_try='test -s conftest$ac_exeext'
6757   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6758   (eval $ac_try) 2>&5
6759   ac_status=$?
6760   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761   (exit $ac_status); }; }; then
6762   ac_cv_lib_c_r_pthread_mutex_init=yes
6763 else
6764   echo "$as_me: failed program was:" >&5
6765 sed 's/^/| /' conftest.$ac_ext >&5
6766
6767 ac_cv_lib_c_r_pthread_mutex_init=no
6768 fi
6769 rm -f conftest.err conftest.$ac_objext \
6770       conftest$ac_exeext conftest.$ac_ext
6771 LIBS=$ac_check_lib_save_LIBS
6772 fi
6773 echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
6774 echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
6775 if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
6776   tcl_ok=yes
6777 else
6778   tcl_ok=no
6779 fi
6780
6781                         if test "$tcl_ok" = "yes"; then
6782                             # The space is needed
6783                             THREADS_LIBS=" -pthread"
6784                         else
6785                             TCL_THREADS=0
6786                             { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
6787 echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
6788                         fi
6789                     fi
6790                 fi
6791             fi
6792         fi
6793     else
6794         TCL_THREADS=0
6795     fi
6796     # Do checking message here to not mess up interleaved configure output
6797     echo "$as_me:$LINENO: checking for building with threads" >&5
6798 echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
6799     if test "${TCL_THREADS}" = 1; then
6800
6801 cat >>confdefs.h <<\_ACEOF
6802 #define TCL_THREADS 1
6803 _ACEOF
6804
6805         echo "$as_me:$LINENO: result: yes (default)" >&5
6806 echo "${ECHO_T}yes (default)" >&6
6807     else
6808         echo "$as_me:$LINENO: result: no" >&5
6809 echo "${ECHO_T}no" >&6
6810     fi
6811     # TCL_THREADS sanity checking.  See if our request for building with
6812     # threads is the same as the way Tcl was built.  If not, warn the user.
6813     case ${TCL_DEFS} in
6814         *THREADS=1*)
6815             if test "${TCL_THREADS}" = "0"; then
6816                 { echo "$as_me:$LINENO: WARNING:
6817     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6818     that IS thread-enabled.  It is recommended to use --enable-threads." >&5
6819 echo "$as_me: WARNING:
6820     Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
6821     that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
6822             fi
6823             ;;
6824         *)
6825             if test "${TCL_THREADS}" = "1"; then
6826                 { echo "$as_me:$LINENO: WARNING:
6827     --enable-threads requested, but building against a Tcl that is NOT
6828     thread-enabled.  This is an OK configuration that will also run in
6829     a thread-enabled core." >&5
6830 echo "$as_me: WARNING:
6831     --enable-threads requested, but building against a Tcl that is NOT
6832     thread-enabled.  This is an OK configuration that will also run in
6833     a thread-enabled core." >&2;}
6834             fi
6835             ;;
6836     esac
6837
6838
6839
6840 #--------------------------------------------------------------------
6841 # The statement below defines a collection of symbols related to
6842 # building as a shared library instead of a static library.
6843 #--------------------------------------------------------------------
6844
6845
6846     echo "$as_me:$LINENO: checking how to build libraries" >&5
6847 echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
6848     # Check whether --enable-shared or --disable-shared was given.
6849 if test "${enable_shared+set}" = set; then
6850   enableval="$enable_shared"
6851   tcl_ok=$enableval
6852 else
6853   tcl_ok=yes
6854 fi;
6855
6856     if test "${enable_shared+set}" = set; then
6857         enableval="$enable_shared"
6858         tcl_ok=$enableval
6859     else
6860         tcl_ok=yes
6861     fi
6862
6863     if test "$tcl_ok" = "yes" ; then
6864         echo "$as_me:$LINENO: result: shared" >&5
6865 echo "${ECHO_T}shared" >&6
6866         SHARED_BUILD=1
6867     else
6868         echo "$as_me:$LINENO: result: static" >&5
6869 echo "${ECHO_T}static" >&6
6870         SHARED_BUILD=0
6871
6872 cat >>confdefs.h <<\_ACEOF
6873 #define STATIC_BUILD 1
6874 _ACEOF
6875
6876     fi
6877
6878
6879
6880 #--------------------------------------------------------------------
6881 # This macro figures out what flags to use with the compiler/linker
6882 # when building shared/static debug/optimized objects.  This information
6883 # can be taken from the tclConfig.sh file, but this figures it all out.
6884 #--------------------------------------------------------------------
6885
6886
6887
6888
6889     # Step 0.a: Enable 64 bit support?
6890
6891     echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
6892 echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
6893     # Check whether --enable-64bit or --disable-64bit was given.
6894 if test "${enable_64bit+set}" = set; then
6895   enableval="$enable_64bit"
6896   do64bit=$enableval
6897 else
6898   do64bit=no
6899 fi;
6900     echo "$as_me:$LINENO: result: $do64bit" >&5
6901 echo "${ECHO_T}$do64bit" >&6
6902
6903     # Step 0.b: Enable Solaris 64 bit VIS support?
6904
6905     echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
6906 echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
6907     # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
6908 if test "${enable_64bit_vis+set}" = set; then
6909   enableval="$enable_64bit_vis"
6910   do64bitVIS=$enableval
6911 else
6912   do64bitVIS=no
6913 fi;
6914     echo "$as_me:$LINENO: result: $do64bitVIS" >&5
6915 echo "${ECHO_T}$do64bitVIS" >&6
6916     # Force 64bit on with VIS
6917     if test "$do64bitVIS" = "yes"; then
6918   do64bit=yes
6919 fi
6920
6921
6922     # Step 0.c: Check if visibility support is available. Do this here so
6923     # that platform specific alternatives can be used below if this fails.
6924
6925     echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
6926 echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6
6927 if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
6928   echo $ECHO_N "(cached) $ECHO_C" >&6
6929 else
6930
6931         hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
6932         cat >conftest.$ac_ext <<_ACEOF
6933 /* confdefs.h.  */
6934 _ACEOF
6935 cat confdefs.h >>conftest.$ac_ext
6936 cat >>conftest.$ac_ext <<_ACEOF
6937 /* end confdefs.h.  */
6938
6939             extern __attribute__((__visibility__("hidden"))) void f(void);
6940             void f(void) {}
6941 int
6942 main ()
6943 {
6944 f();
6945   ;
6946   return 0;
6947 }
6948 _ACEOF
6949 rm -f conftest.$ac_objext conftest$ac_exeext
6950 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6951   (eval $ac_link) 2>conftest.er1
6952   ac_status=$?
6953   grep -v '^ *+' conftest.er1 >conftest.err
6954   rm -f conftest.er1
6955   cat conftest.err >&5
6956   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957   (exit $ac_status); } &&
6958          { ac_try='test -z "$ac_c_werror_flag"
6959                          || test ! -s conftest.err'
6960   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6961   (eval $ac_try) 2>&5
6962   ac_status=$?
6963   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964   (exit $ac_status); }; } &&
6965          { ac_try='test -s conftest$ac_exeext'
6966   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6967   (eval $ac_try) 2>&5
6968   ac_status=$?
6969   echo "$as_me:$LINENO: \$? = $ac_status" >&5
6970   (exit $ac_status); }; }; then
6971   tcl_cv_cc_visibility_hidden=yes
6972 else
6973   echo "$as_me: failed program was:" >&5
6974 sed 's/^/| /' conftest.$ac_ext >&5
6975
6976 tcl_cv_cc_visibility_hidden=no
6977 fi
6978 rm -f conftest.err conftest.$ac_objext \
6979       conftest$ac_exeext conftest.$ac_ext
6980         CFLAGS=$hold_cflags
6981 fi
6982 echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
6983 echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6
6984     if test $tcl_cv_cc_visibility_hidden = yes; then
6985
6986
6987 cat >>confdefs.h <<\_ACEOF
6988 #define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
6989 _ACEOF
6990
6991
6992 fi
6993
6994
6995     # Step 0.d: Disable -rpath support?
6996
6997     echo "$as_me:$LINENO: checking if rpath support is requested" >&5
6998 echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6
6999     # Check whether --enable-rpath or --disable-rpath was given.
7000 if test "${enable_rpath+set}" = set; then
7001   enableval="$enable_rpath"
7002   doRpath=$enableval
7003 else
7004   doRpath=yes
7005 fi;
7006     echo "$as_me:$LINENO: result: $doRpath" >&5
7007 echo "${ECHO_T}$doRpath" >&6
7008
7009     # TEA specific: Cross-compiling options for Windows/CE builds?
7010
7011     if test "${TEA_PLATFORM}" = windows; then
7012
7013         echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7014 echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
7015         # Check whether --enable-wince or --disable-wince was given.
7016 if test "${enable_wince+set}" = set; then
7017   enableval="$enable_wince"
7018   doWince=$enableval
7019 else
7020   doWince=no
7021 fi;
7022         echo "$as_me:$LINENO: result: $doWince" >&5
7023 echo "${ECHO_T}$doWince" >&6
7024
7025 fi
7026
7027
7028     # Set the variable "system" to hold the name and version number
7029     # for the system.
7030
7031
7032     echo "$as_me:$LINENO: checking system version" >&5
7033 echo $ECHO_N "checking system version... $ECHO_C" >&6
7034 if test "${tcl_cv_sys_version+set}" = set; then
7035   echo $ECHO_N "(cached) $ECHO_C" >&6
7036 else
7037
7038         # TEA specific:
7039         if test "${TEA_PLATFORM}" = "windows" ; then
7040             tcl_cv_sys_version=windows
7041         else
7042             tcl_cv_sys_version=`uname -s`-`uname -r`
7043             if test "$?" -ne 0 ; then
7044                 { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7045 echo "$as_me: WARNING: can't find uname command" >&2;}
7046                 tcl_cv_sys_version=unknown
7047             else
7048                 if test "`uname -s`" = "AIX" ; then
7049                     tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7050                 fi
7051             fi
7052         fi
7053
7054 fi
7055 echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7056 echo "${ECHO_T}$tcl_cv_sys_version" >&6
7057     system=$tcl_cv_sys_version
7058
7059
7060     # Require ranlib early so we can override it in special cases below.
7061
7062
7063
7064     # Set configuration options based on system name and version.
7065     # This is similar to Tcl's unix/tcl.m4 except that we've added a
7066     # "windows" case and removed some core-only vars.
7067
7068     do64bit_ok=no
7069     # default to '{$LIBS}' and set to "" on per-platform necessary basis
7070     SHLIB_LD_LIBS='${LIBS}'
7071     # When ld needs options to work in 64-bit mode, put them in
7072     # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7073     # is disabled by the user. [Bug 1016796]
7074     LDFLAGS_ARCH=""
7075     UNSHARED_LIB_SUFFIX=""
7076     # TEA specific: use PACKAGE_VERSION instead of VERSION
7077     TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7078     ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7079     TCL_LIB_VERSIONS_OK=ok
7080     CFLAGS_DEBUG=-g
7081     CFLAGS_OPTIMIZE=-O
7082     if test "$GCC" = yes; then
7083
7084         # TEA specific:
7085         CFLAGS_OPTIMIZE=-O2
7086         CFLAGS_WARNING="-Wall"
7087
7088 else
7089   CFLAGS_WARNING=""
7090 fi
7091
7092     # Extract the first word of "ar", so it can be a program name with args.
7093 set dummy ar; ac_word=$2
7094 echo "$as_me:$LINENO: checking for $ac_word" >&5
7095 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7096 if test "${ac_cv_prog_AR+set}" = set; then
7097   echo $ECHO_N "(cached) $ECHO_C" >&6
7098 else
7099   if test -n "$AR"; then
7100   ac_cv_prog_AR="$AR" # Let the user override the test.
7101 else
7102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7103 for as_dir in $PATH
7104 do
7105   IFS=$as_save_IFS
7106   test -z "$as_dir" && as_dir=.
7107   for ac_exec_ext in '' $ac_executable_extensions; do
7108   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7109     ac_cv_prog_AR="ar"
7110     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7111     break 2
7112   fi
7113 done
7114 done
7115
7116 fi
7117 fi
7118 AR=$ac_cv_prog_AR
7119 if test -n "$AR"; then
7120   echo "$as_me:$LINENO: result: $AR" >&5
7121 echo "${ECHO_T}$AR" >&6
7122 else
7123   echo "$as_me:$LINENO: result: no" >&5
7124 echo "${ECHO_T}no" >&6
7125 fi
7126
7127     STLIB_LD='${AR} cr'
7128     LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7129     if test "x$SHLIB_VERSION" = x; then
7130   SHLIB_VERSION="1.0"
7131 fi
7132
7133     case $system in
7134         # TEA specific:
7135         windows)
7136             # This is a 2-stage check to make sure we have the 64-bit SDK
7137             # We have to know where the SDK is installed.
7138             # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7139             # MACHINE is IX86 for LINK, but this is used by the manifest,
7140             # which requires x86|amd64|ia64.
7141             MACHINE="X86"
7142             if test "$do64bit" != "no" ; then
7143                 if test "x${MSSDK}x" = "xx" ; then
7144                     MSSDK="C:/Progra~1/Microsoft Platform SDK"
7145                 fi
7146                 MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7147                 PATH64=""
7148                 case "$do64bit" in
7149                     amd64|x64|yes)
7150                         MACHINE="AMD64" ; # default to AMD64 64-bit build
7151                         PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7152                         ;;
7153                     ia64)
7154                         MACHINE="IA64"
7155                         PATH64="${MSSDK}/Bin/Win64"
7156                         ;;
7157                 esac
7158                 if test ! -d "${PATH64}" ; then
7159                     { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7160 echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7161                     { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7162 echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7163                     do64bit="no"
7164                 else
7165                     echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7166 echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6
7167                     do64bit_ok="yes"
7168                 fi
7169             fi
7170
7171             if test "$doWince" != "no" ; then
7172                 if test "$do64bit" != "no" ; then
7173                     { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7174 echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7175    { (exit 1); exit 1; }; }
7176                 fi
7177                 if test "$GCC" = "yes" ; then
7178                     { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7179 echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7180    { (exit 1); exit 1; }; }
7181                 fi
7182
7183     # First, look for one uninstalled.
7184     # the alternative search directory is invoked by --with-celib
7185
7186     if test x"${no_celib}" = x ; then
7187         # we reset no_celib in case something fails here
7188         no_celib=true
7189
7190 # Check whether --with-celib or --without-celib was given.
7191 if test "${with_celib+set}" = set; then
7192   withval="$with_celib"
7193   with_celibconfig=${withval}
7194 fi;
7195         echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7196 echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
7197         if test "${ac_cv_c_celibconfig+set}" = set; then
7198   echo $ECHO_N "(cached) $ECHO_C" >&6
7199 else
7200
7201             # First check to see if --with-celibconfig was specified.
7202             if test x"${with_celibconfig}" != x ; then
7203                 if test -d "${with_celibconfig}/inc" ; then
7204                     ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7205                 else
7206                     { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7207 echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7208    { (exit 1); exit 1; }; }
7209                 fi
7210             fi
7211
7212             # then check for a celib library
7213             if test x"${ac_cv_c_celibconfig}" = x ; then
7214                 for i in \
7215                         ../celib-palm-3.0 \
7216                         ../celib \
7217                         ../../celib-palm-3.0 \
7218                         ../../celib \
7219                         `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7220                         ${srcdir}/../celib-palm-3.0 \
7221                         ${srcdir}/../celib \
7222                         `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7223                         ; do
7224                     if test -d "$i/inc" ; then
7225                         ac_cv_c_celibconfig=`(cd $i; pwd)`
7226                         break
7227                     fi
7228                 done
7229             fi
7230
7231 fi
7232
7233         if test x"${ac_cv_c_celibconfig}" = x ; then
7234             { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7235 echo "$as_me: error: Cannot find celib support library directory" >&2;}
7236    { (exit 1); exit 1; }; }
7237         else
7238             no_celib=
7239             CELIB_DIR=${ac_cv_c_celibconfig}
7240             CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7241             echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7242 echo "${ECHO_T}found $CELIB_DIR" >&6
7243         fi
7244     fi
7245
7246                 # Set defaults for common evc4/PPC2003 setup
7247                 # Currently Tcl requires 300+, possibly 420+ for sockets
7248                 CEVERSION=420;          # could be 211 300 301 400 420 ...
7249                 TARGETCPU=ARMV4;        # could be ARMV4 ARM MIPS SH3 X86 ...
7250                 ARCH=ARM;               # could be ARM MIPS X86EM ...
7251                 PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7252                 if test "$doWince" != "yes"; then
7253                     # If !yes then the user specified something
7254                     # Reset ARCH to allow user to skip specifying it
7255                     ARCH=
7256                     eval `echo $doWince | awk -F, '{ \
7257             if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7258             if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7259             if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7260             if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7261             if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7262                     }'`
7263                     if test "x${ARCH}" = "x" ; then
7264                         ARCH=$TARGETCPU;
7265                     fi
7266                 fi
7267                 OSVERSION=WCE$CEVERSION;
7268                 if test "x${WCEROOT}" = "x" ; then
7269                         WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7270                     if test ! -d "${WCEROOT}" ; then
7271                         WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7272                     fi
7273                 fi
7274                 if test "x${SDKROOT}" = "x" ; then
7275                     SDKROOT="C:/Program Files/Windows CE Tools"
7276                     if test ! -d "${SDKROOT}" ; then
7277                         SDKROOT="C:/Windows CE Tools"
7278                     fi
7279                 fi
7280                 WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7281                 SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7282                 if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7283                     -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7284                     { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7285 echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7286    { (exit 1); exit 1; }; }
7287                     doWince="no"
7288                 else
7289                     # We could PATH_NOSPACE these, but that's not important,
7290                     # as long as we quote them when used.
7291                     CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7292                     if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7293                         CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7294                     fi
7295                     CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7296                 fi
7297             fi
7298
7299             if test "$GCC" != "yes" ; then
7300                 if test "${SHARED_BUILD}" = "0" ; then
7301                     runtime=-MT
7302                 else
7303                     runtime=-MD
7304                 fi
7305
7306                 if test "$do64bit" != "no" ; then
7307                     # All this magic is necessary for the Win64 SDK RC1 - hobbs
7308                     CC="\"${PATH64}/cl.exe\""
7309                     CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7310                     RC="\"${MSSDK}/bin/rc.exe\""
7311                     lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7312                     LINKBIN="\"${PATH64}/link.exe\""
7313                     CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7314                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7315                     # Avoid 'unresolved external symbol __security_cookie'
7316                     # errors, c.f. http://support.microsoft.com/?id=894573
7317
7318     vars="bufferoverflowU.lib"
7319     for i in $vars; do
7320         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7321             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7322             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7323         fi
7324         PKG_LIBS="$PKG_LIBS $i"
7325     done
7326
7327
7328                 elif test "$doWince" != "no" ; then
7329                     CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7330                     if test "${TARGETCPU}" = "X86"; then
7331                         CC="\"${CEBINROOT}/cl.exe\""
7332                     else
7333                         CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7334                     fi
7335                     CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7336                     RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7337                     arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7338                     defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7339                     if test "${SHARED_BUILD}" = "1" ; then
7340                         # Static CE builds require static celib as well
7341                         defs="${defs} _DLL"
7342                     fi
7343                     for i in $defs ; do
7344
7345 cat >>confdefs.h <<_ACEOF
7346 #define $i 1
7347 _ACEOF
7348
7349                     done
7350
7351 cat >>confdefs.h <<_ACEOF
7352 #define _WIN32_WCE $CEVERSION
7353 _ACEOF
7354
7355
7356 cat >>confdefs.h <<_ACEOF
7357 #define UNDER_CE $CEVERSION
7358 _ACEOF
7359
7360                     CFLAGS_DEBUG="-nologo -Zi -Od"
7361                     CFLAGS_OPTIMIZE="-nologo -Ox"
7362                     lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7363                     lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7364                     LINKBIN="\"${CEBINROOT}/link.exe\""
7365
7366                 else
7367                     RC="rc"
7368                     lflags="-nologo"
7369                     LINKBIN="link"
7370                     CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7371                     CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7372                 fi
7373             fi
7374
7375             if test "$GCC" = "yes"; then
7376                 # mingw gcc mode
7377                 RC="windres"
7378                 CFLAGS_DEBUG="-g"
7379                 CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7380                 SHLIB_LD="$CC -shared"
7381                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7382                 LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7383                 LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7384             else
7385                 SHLIB_LD="${LINKBIN} -dll ${lflags}"
7386                 # link -lib only works when -lib is the first arg
7387                 STLIB_LD="${LINKBIN} -lib ${lflags}"
7388                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7389                 PATHTYPE=-w
7390                 # For information on what debugtype is most useful, see:
7391                 # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7392                 # and also
7393                 # http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
7394                 # This essentially turns it all on.
7395                 LDFLAGS_DEBUG="-debug -debugtype:cv"
7396                 LDFLAGS_OPTIMIZE="-release"
7397                 if test "$doWince" != "no" ; then
7398                     LDFLAGS_CONSOLE="-link ${lflags}"
7399                     LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7400                 else
7401                     LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7402                     LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7403                 fi
7404             fi
7405
7406             SHLIB_SUFFIX=".dll"
7407             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7408
7409             TCL_LIB_VERSIONS_OK=nodots
7410             ;;
7411         AIX-*)
7412             if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
7413
7414                 # AIX requires the _r compiler when gcc isn't being used
7415                 case "${CC}" in
7416                     *_r|*_r\ *)
7417                         # ok ...
7418                         ;;
7419                     *)
7420                         # Make sure only first arg gets _r
7421                         CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
7422                         ;;
7423                 esac
7424                 echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
7425 echo "${ECHO_T}Using $CC for compiling with threads" >&6
7426
7427 fi
7428
7429             LIBS="$LIBS -lc"
7430             SHLIB_CFLAGS=""
7431             SHLIB_SUFFIX=".so"
7432
7433             LD_LIBRARY_PATH_VAR="LIBPATH"
7434
7435             # Check to enable 64-bit flags for compiler/linker
7436             if test "$do64bit" = yes; then
7437
7438                 if test "$GCC" = yes; then
7439
7440                     { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7441 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7442
7443 else
7444
7445                     do64bit_ok=yes
7446                     CFLAGS="$CFLAGS -q64"
7447                     LDFLAGS_ARCH="-q64"
7448                     RANLIB="${RANLIB} -X64"
7449                     AR="${AR} -X64"
7450                     SHLIB_LD_FLAGS="-b64"
7451
7452 fi
7453
7454
7455 fi
7456
7457
7458             if test "`uname -m`" = ia64; then
7459
7460                 # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7461                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7462                 if test "$GCC" = yes; then
7463
7464                     CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7465
7466 else
7467
7468                     CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
7469
7470 fi
7471
7472                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7473
7474 else
7475
7476                 if test "$GCC" = yes; then
7477
7478                     SHLIB_LD='${CC} -shared -Wl,-bexpall'
7479
7480 else
7481
7482                     SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
7483                     LDFLAGS="$LDFLAGS -brtl"
7484
7485 fi
7486
7487                 SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7488                 CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7489                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7490
7491 fi
7492
7493             ;;
7494         BeOS*)
7495             SHLIB_CFLAGS="-fPIC"
7496             SHLIB_LD='${CC} -nostart'
7497             SHLIB_SUFFIX=".so"
7498
7499             #-----------------------------------------------------------
7500             # Check for inet_ntoa in -lbind, for BeOS (which also needs
7501             # -lsocket, even if the network functions are in -lnet which
7502             # is always linked to, for compatibility.
7503             #-----------------------------------------------------------
7504             echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
7505 echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
7506 if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
7507   echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509   ac_check_lib_save_LIBS=$LIBS
7510 LIBS="-lbind  $LIBS"
7511 cat >conftest.$ac_ext <<_ACEOF
7512 /* confdefs.h.  */
7513 _ACEOF
7514 cat confdefs.h >>conftest.$ac_ext
7515 cat >>conftest.$ac_ext <<_ACEOF
7516 /* end confdefs.h.  */
7517
7518 /* Override any gcc2 internal prototype to avoid an error.  */
7519 #ifdef __cplusplus
7520 extern "C"
7521 #endif
7522 /* We use char because int might match the return type of a gcc2
7523    builtin and then its argument prototype would still apply.  */
7524 char inet_ntoa ();
7525 int
7526 main ()
7527 {
7528 inet_ntoa ();
7529   ;
7530   return 0;
7531 }
7532 _ACEOF
7533 rm -f conftest.$ac_objext conftest$ac_exeext
7534 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7535   (eval $ac_link) 2>conftest.er1
7536   ac_status=$?
7537   grep -v '^ *+' conftest.er1 >conftest.err
7538   rm -f conftest.er1
7539   cat conftest.err >&5
7540   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7541   (exit $ac_status); } &&
7542          { ac_try='test -z "$ac_c_werror_flag"
7543                          || test ! -s conftest.err'
7544   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7545   (eval $ac_try) 2>&5
7546   ac_status=$?
7547   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7548   (exit $ac_status); }; } &&
7549          { ac_try='test -s conftest$ac_exeext'
7550   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7551   (eval $ac_try) 2>&5
7552   ac_status=$?
7553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7554   (exit $ac_status); }; }; then
7555   ac_cv_lib_bind_inet_ntoa=yes
7556 else
7557   echo "$as_me: failed program was:" >&5
7558 sed 's/^/| /' conftest.$ac_ext >&5
7559
7560 ac_cv_lib_bind_inet_ntoa=no
7561 fi
7562 rm -f conftest.err conftest.$ac_objext \
7563       conftest$ac_exeext conftest.$ac_ext
7564 LIBS=$ac_check_lib_save_LIBS
7565 fi
7566 echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
7567 echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
7568 if test $ac_cv_lib_bind_inet_ntoa = yes; then
7569   LIBS="$LIBS -lbind -lsocket"
7570 fi
7571
7572             ;;
7573         BSD/OS-4.*)
7574             SHLIB_CFLAGS="-export-dynamic -fPIC"
7575             SHLIB_LD='${CC} -shared'
7576             SHLIB_SUFFIX=".so"
7577             LDFLAGS="$LDFLAGS -export-dynamic"
7578             CC_SEARCH_FLAGS=""
7579             LD_SEARCH_FLAGS=""
7580             ;;
7581         CYGWIN_*)
7582             SHLIB_CFLAGS=""
7583             SHLIB_LD='${CC} -shared'
7584             SHLIB_SUFFIX=".dll"
7585             EXE_SUFFIX=".exe"
7586             CC_SEARCH_FLAGS=""
7587             LD_SEARCH_FLAGS=""
7588             ;;
7589         Haiku*)
7590             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7591             SHLIB_CFLAGS="-fPIC"
7592             SHLIB_SUFFIX=".so"
7593             SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
7594             echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
7595 echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6
7596 if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
7597   echo $ECHO_N "(cached) $ECHO_C" >&6
7598 else
7599   ac_check_lib_save_LIBS=$LIBS
7600 LIBS="-lnetwork  $LIBS"
7601 cat >conftest.$ac_ext <<_ACEOF
7602 /* confdefs.h.  */
7603 _ACEOF
7604 cat confdefs.h >>conftest.$ac_ext
7605 cat >>conftest.$ac_ext <<_ACEOF
7606 /* end confdefs.h.  */
7607
7608 /* Override any gcc2 internal prototype to avoid an error.  */
7609 #ifdef __cplusplus
7610 extern "C"
7611 #endif
7612 /* We use char because int might match the return type of a gcc2
7613    builtin and then its argument prototype would still apply.  */
7614 char inet_ntoa ();
7615 int
7616 main ()
7617 {
7618 inet_ntoa ();
7619   ;
7620   return 0;
7621 }
7622 _ACEOF
7623 rm -f conftest.$ac_objext conftest$ac_exeext
7624 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7625   (eval $ac_link) 2>conftest.er1
7626   ac_status=$?
7627   grep -v '^ *+' conftest.er1 >conftest.err
7628   rm -f conftest.er1
7629   cat conftest.err >&5
7630   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7631   (exit $ac_status); } &&
7632          { ac_try='test -z "$ac_c_werror_flag"
7633                          || test ! -s conftest.err'
7634   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635   (eval $ac_try) 2>&5
7636   ac_status=$?
7637   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638   (exit $ac_status); }; } &&
7639          { ac_try='test -s conftest$ac_exeext'
7640   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   ac_cv_lib_network_inet_ntoa=yes
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 sed 's/^/| /' conftest.$ac_ext >&5
7649
7650 ac_cv_lib_network_inet_ntoa=no
7651 fi
7652 rm -f conftest.err conftest.$ac_objext \
7653       conftest$ac_exeext conftest.$ac_ext
7654 LIBS=$ac_check_lib_save_LIBS
7655 fi
7656 echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
7657 echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6
7658 if test $ac_cv_lib_network_inet_ntoa = yes; then
7659   LIBS="$LIBS -lnetwork"
7660 fi
7661
7662             ;;
7663         HP-UX-*.11.*)
7664             # Use updated header definitions where possible
7665
7666 cat >>confdefs.h <<\_ACEOF
7667 #define _XOPEN_SOURCE_EXTENDED 1
7668 _ACEOF
7669
7670             # TEA specific: Needed by Tcl, but not most extensions
7671             #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
7672             #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
7673
7674             if test "`uname -m`" = ia64; then
7675
7676                 SHLIB_SUFFIX=".so"
7677                 # Use newer C++ library for C++ extensions
7678                 #if test "$GCC" != "yes" ; then
7679                 #   CPPFLAGS="-AA"
7680                 #fi
7681
7682 else
7683
7684                 SHLIB_SUFFIX=".sl"
7685
7686 fi
7687
7688             echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
7689 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
7690 if test "${ac_cv_lib_dld_shl_load+set}" = set; then
7691   echo $ECHO_N "(cached) $ECHO_C" >&6
7692 else
7693   ac_check_lib_save_LIBS=$LIBS
7694 LIBS="-ldld  $LIBS"
7695 cat >conftest.$ac_ext <<_ACEOF
7696 /* confdefs.h.  */
7697 _ACEOF
7698 cat confdefs.h >>conftest.$ac_ext
7699 cat >>conftest.$ac_ext <<_ACEOF
7700 /* end confdefs.h.  */
7701
7702 /* Override any gcc2 internal prototype to avoid an error.  */
7703 #ifdef __cplusplus
7704 extern "C"
7705 #endif
7706 /* We use char because int might match the return type of a gcc2
7707    builtin and then its argument prototype would still apply.  */
7708 char shl_load ();
7709 int
7710 main ()
7711 {
7712 shl_load ();
7713   ;
7714   return 0;
7715 }
7716 _ACEOF
7717 rm -f conftest.$ac_objext conftest$ac_exeext
7718 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7719   (eval $ac_link) 2>conftest.er1
7720   ac_status=$?
7721   grep -v '^ *+' conftest.er1 >conftest.err
7722   rm -f conftest.er1
7723   cat conftest.err >&5
7724   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7725   (exit $ac_status); } &&
7726          { ac_try='test -z "$ac_c_werror_flag"
7727                          || test ! -s conftest.err'
7728   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7729   (eval $ac_try) 2>&5
7730   ac_status=$?
7731   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7732   (exit $ac_status); }; } &&
7733          { ac_try='test -s conftest$ac_exeext'
7734   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7735   (eval $ac_try) 2>&5
7736   ac_status=$?
7737   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7738   (exit $ac_status); }; }; then
7739   ac_cv_lib_dld_shl_load=yes
7740 else
7741   echo "$as_me: failed program was:" >&5
7742 sed 's/^/| /' conftest.$ac_ext >&5
7743
7744 ac_cv_lib_dld_shl_load=no
7745 fi
7746 rm -f conftest.err conftest.$ac_objext \
7747       conftest$ac_exeext conftest.$ac_ext
7748 LIBS=$ac_check_lib_save_LIBS
7749 fi
7750 echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
7751 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
7752 if test $ac_cv_lib_dld_shl_load = yes; then
7753   tcl_ok=yes
7754 else
7755   tcl_ok=no
7756 fi
7757
7758             if test "$tcl_ok" = yes; then
7759
7760                 LDFLAGS="$LDFLAGS -Wl,-E"
7761                 CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
7762                 LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
7763                 LD_LIBRARY_PATH_VAR="SHLIB_PATH"
7764
7765 fi
7766
7767             if test "$GCC" = yes; then
7768
7769                 SHLIB_LD='${CC} -shared'
7770                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7771
7772 else
7773
7774                 CFLAGS="$CFLAGS -z"
7775                 # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
7776                 #CFLAGS="$CFLAGS +DAportable"
7777                 SHLIB_CFLAGS="+z"
7778                 SHLIB_LD="ld -b"
7779
7780 fi
7781
7782
7783             # Check to enable 64-bit flags for compiler/linker
7784             if test "$do64bit" = "yes"; then
7785
7786                 if test "$GCC" = yes; then
7787
7788                     case `${CC} -dumpmachine` in
7789                         hppa64*)
7790                             # 64-bit gcc in use.  Fix flags for GNU ld.
7791                             do64bit_ok=yes
7792                             SHLIB_LD='${CC} -shared'
7793                             if test $doRpath = yes; then
7794
7795                                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7796 fi
7797
7798                             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7799                             ;;
7800                         *)
7801                             { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7802 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7803                             ;;
7804                     esac
7805
7806 else
7807
7808                     do64bit_ok=yes
7809                     CFLAGS="$CFLAGS +DD64"
7810                     LDFLAGS_ARCH="+DD64"
7811
7812 fi
7813
7814
7815 fi
7816  ;;
7817         IRIX-6.*)
7818             SHLIB_CFLAGS=""
7819             SHLIB_LD="ld -n32 -shared -rdata_shared"
7820             SHLIB_SUFFIX=".so"
7821             if test $doRpath = yes; then
7822
7823                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7824                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7825 fi
7826
7827             if test "$GCC" = yes; then
7828
7829                 CFLAGS="$CFLAGS -mabi=n32"
7830                 LDFLAGS="$LDFLAGS -mabi=n32"
7831
7832 else
7833
7834                 case $system in
7835                     IRIX-6.3)
7836                         # Use to build 6.2 compatible binaries on 6.3.
7837                         CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
7838                         ;;
7839                     *)
7840                         CFLAGS="$CFLAGS -n32"
7841                         ;;
7842                 esac
7843                 LDFLAGS="$LDFLAGS -n32"
7844
7845 fi
7846
7847             ;;
7848         IRIX64-6.*)
7849             SHLIB_CFLAGS=""
7850             SHLIB_LD="ld -n32 -shared -rdata_shared"
7851             SHLIB_SUFFIX=".so"
7852             if test $doRpath = yes; then
7853
7854                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7855                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
7856 fi
7857
7858
7859             # Check to enable 64-bit flags for compiler/linker
7860
7861             if test "$do64bit" = yes; then
7862
7863                 if test "$GCC" = yes; then
7864
7865                     { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
7866 echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
7867
7868 else
7869
7870                     do64bit_ok=yes
7871                     SHLIB_LD="ld -64 -shared -rdata_shared"
7872                     CFLAGS="$CFLAGS -64"
7873                     LDFLAGS_ARCH="-64"
7874
7875 fi
7876
7877
7878 fi
7879
7880             ;;
7881         Linux*)
7882             SHLIB_CFLAGS="-fPIC"
7883             SHLIB_SUFFIX=".so"
7884
7885             # TEA specific:
7886             CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7887
7888             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
7889             SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
7890             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7891             if test $doRpath = yes; then
7892
7893                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
7894 fi
7895
7896             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7897             if test "`uname -m`" = "alpha"; then
7898   CFLAGS="$CFLAGS -mieee"
7899 fi
7900
7901             if test $do64bit = yes; then
7902
7903                 echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
7904 echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6
7905 if test "${tcl_cv_cc_m64+set}" = set; then
7906   echo $ECHO_N "(cached) $ECHO_C" >&6
7907 else
7908
7909                     hold_cflags=$CFLAGS
7910                     CFLAGS="$CFLAGS -m64"
7911                     cat >conftest.$ac_ext <<_ACEOF
7912 /* confdefs.h.  */
7913 _ACEOF
7914 cat confdefs.h >>conftest.$ac_ext
7915 cat >>conftest.$ac_ext <<_ACEOF
7916 /* end confdefs.h.  */
7917
7918 int
7919 main ()
7920 {
7921
7922   ;
7923   return 0;
7924 }
7925 _ACEOF
7926 rm -f conftest.$ac_objext conftest$ac_exeext
7927 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7928   (eval $ac_link) 2>conftest.er1
7929   ac_status=$?
7930   grep -v '^ *+' conftest.er1 >conftest.err
7931   rm -f conftest.er1
7932   cat conftest.err >&5
7933   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7934   (exit $ac_status); } &&
7935          { ac_try='test -z "$ac_c_werror_flag"
7936                          || test ! -s conftest.err'
7937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7938   (eval $ac_try) 2>&5
7939   ac_status=$?
7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941   (exit $ac_status); }; } &&
7942          { ac_try='test -s conftest$ac_exeext'
7943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7944   (eval $ac_try) 2>&5
7945   ac_status=$?
7946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947   (exit $ac_status); }; }; then
7948   tcl_cv_cc_m64=yes
7949 else
7950   echo "$as_me: failed program was:" >&5
7951 sed 's/^/| /' conftest.$ac_ext >&5
7952
7953 tcl_cv_cc_m64=no
7954 fi
7955 rm -f conftest.err conftest.$ac_objext \
7956       conftest$ac_exeext conftest.$ac_ext
7957                     CFLAGS=$hold_cflags
7958 fi
7959 echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
7960 echo "${ECHO_T}$tcl_cv_cc_m64" >&6
7961                 if test $tcl_cv_cc_m64 = yes; then
7962
7963                     CFLAGS="$CFLAGS -m64"
7964                     do64bit_ok=yes
7965
7966 fi
7967
7968
7969 fi
7970
7971
7972             # The combo of gcc + glibc has a bug related to inlining of
7973             # functions like strtod(). The -fno-builtin flag should address
7974             # this problem but it does not work. The -fno-inline flag is kind
7975             # of overkill but it works. Disable inlining only when one of the
7976             # files in compat/*.c is being linked in.
7977
7978             if test x"${USE_COMPAT}" != x; then
7979   CFLAGS="$CFLAGS -fno-inline"
7980 fi
7981
7982
7983             ;;
7984         GNU*)
7985             SHLIB_CFLAGS="-fPIC"
7986             SHLIB_SUFFIX=".so"
7987
7988             SHLIB_LD='${CC} -shared'
7989             LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
7990             CC_SEARCH_FLAGS=""
7991             LD_SEARCH_FLAGS=""
7992             if test "`uname -m`" = "alpha"; then
7993   CFLAGS="$CFLAGS -mieee"
7994 fi
7995
7996             ;;
7997         Lynx*)
7998             SHLIB_CFLAGS="-fPIC"
7999             SHLIB_SUFFIX=".so"
8000             CFLAGS_OPTIMIZE=-02
8001             SHLIB_LD='${CC} -shared'
8002             LD_FLAGS="-Wl,--export-dynamic"
8003             if test $doRpath = yes; then
8004
8005                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8006                 LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8007 fi
8008
8009             ;;
8010         OpenBSD-*)
8011             SHLIB_CFLAGS="-fPIC"
8012             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8013             SHLIB_SUFFIX=".so"
8014             if test $doRpath = yes; then
8015
8016                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8017 fi
8018
8019             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8020             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8021             echo "$as_me:$LINENO: checking for ELF" >&5
8022 echo $ECHO_N "checking for ELF... $ECHO_C" >&6
8023 if test "${tcl_cv_ld_elf+set}" = set; then
8024   echo $ECHO_N "(cached) $ECHO_C" >&6
8025 else
8026
8027                 cat >conftest.$ac_ext <<_ACEOF
8028 /* confdefs.h.  */
8029 _ACEOF
8030 cat confdefs.h >>conftest.$ac_ext
8031 cat >>conftest.$ac_ext <<_ACEOF
8032 /* end confdefs.h.  */
8033
8034 #ifdef __ELF__
8035         yes
8036 #endif
8037
8038 _ACEOF
8039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8040   $EGREP "yes" >/dev/null 2>&1; then
8041   tcl_cv_ld_elf=yes
8042 else
8043   tcl_cv_ld_elf=no
8044 fi
8045 rm -f conftest*
8046
8047 fi
8048 echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8049 echo "${ECHO_T}$tcl_cv_ld_elf" >&6
8050             if test $tcl_cv_ld_elf = yes; then
8051
8052                 LDFLAGS=-Wl,-export-dynamic
8053
8054 else
8055   LDFLAGS=""
8056 fi
8057
8058             if test "${TCL_THREADS}" = "1"; then
8059
8060                 # OpenBSD builds and links with -pthread, never -lpthread.
8061                 LIBS=`echo $LIBS | sed s/-lpthread//`
8062                 CFLAGS="$CFLAGS -pthread"
8063                 SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8064
8065 fi
8066
8067             # OpenBSD doesn't do version numbers with dots.
8068             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8069             TCL_LIB_VERSIONS_OK=nodots
8070             ;;
8071         NetBSD-*|FreeBSD-[3-4].*)
8072             # FreeBSD 3.* and greater have ELF.
8073             # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8074             SHLIB_CFLAGS="-fPIC"
8075             SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8076             SHLIB_SUFFIX=".so"
8077             LDFLAGS="$LDFLAGS -export-dynamic"
8078             if test $doRpath = yes; then
8079
8080                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8081 fi
8082
8083             LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8084             if test "${TCL_THREADS}" = "1"; then
8085
8086                 # The -pthread needs to go in the CFLAGS, not LIBS
8087                 LIBS=`echo $LIBS | sed s/-pthread//`
8088                 CFLAGS="$CFLAGS -pthread"
8089                 LDFLAGS="$LDFLAGS -pthread"
8090
8091 fi
8092
8093             case $system in
8094             FreeBSD-3.*)
8095                 # FreeBSD-3 doesn't handle version numbers with dots.
8096                 UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8097                 SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8098                 TCL_LIB_VERSIONS_OK=nodots
8099                 ;;
8100             esac
8101             ;;
8102         FreeBSD-*)
8103             # This configuration from FreeBSD Ports.
8104             SHLIB_CFLAGS="-fPIC"
8105             SHLIB_LD="${CC} -shared"
8106             TCL_SHLIB_LD_EXTRAS="-soname \$@"
8107             SHLIB_SUFFIX=".so"
8108             LDFLAGS=""
8109             if test $doRpath = yes; then
8110
8111                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8112                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8113 fi
8114
8115             if test "${TCL_THREADS}" = "1"; then
8116
8117                 # The -pthread needs to go in the LDFLAGS, not LIBS
8118                 LIBS=`echo $LIBS | sed s/-pthread//`
8119                 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8120                 LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8121 fi
8122
8123             # Version numbers are dot-stripped by system policy.
8124             TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8125             UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8126             SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8127             TCL_LIB_VERSIONS_OK=nodots
8128             ;;
8129         Darwin-*)
8130             CFLAGS_OPTIMIZE="-Os"
8131             SHLIB_CFLAGS="-fno-common"
8132             # To avoid discrepancies between what headers configure sees during
8133             # preprocessing tests and compiling tests, move any -isysroot and
8134             # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8135             CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8136                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8137                 if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8138             CFLAGS="`echo " ${CFLAGS}" | \
8139                 awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8140                 if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8141             if test $do64bit = yes; then
8142
8143                 case `arch` in
8144                     ppc)
8145                         echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8146 echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6
8147 if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8148   echo $ECHO_N "(cached) $ECHO_C" >&6
8149 else
8150
8151                             hold_cflags=$CFLAGS
8152                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8153                             cat >conftest.$ac_ext <<_ACEOF
8154 /* confdefs.h.  */
8155 _ACEOF
8156 cat confdefs.h >>conftest.$ac_ext
8157 cat >>conftest.$ac_ext <<_ACEOF
8158 /* end confdefs.h.  */
8159
8160 int
8161 main ()
8162 {
8163
8164   ;
8165   return 0;
8166 }
8167 _ACEOF
8168 rm -f conftest.$ac_objext conftest$ac_exeext
8169 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8170   (eval $ac_link) 2>conftest.er1
8171   ac_status=$?
8172   grep -v '^ *+' conftest.er1 >conftest.err
8173   rm -f conftest.er1
8174   cat conftest.err >&5
8175   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176   (exit $ac_status); } &&
8177          { ac_try='test -z "$ac_c_werror_flag"
8178                          || test ! -s conftest.err'
8179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8180   (eval $ac_try) 2>&5
8181   ac_status=$?
8182   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8183   (exit $ac_status); }; } &&
8184          { ac_try='test -s conftest$ac_exeext'
8185   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8186   (eval $ac_try) 2>&5
8187   ac_status=$?
8188   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8189   (exit $ac_status); }; }; then
8190   tcl_cv_cc_arch_ppc64=yes
8191 else
8192   echo "$as_me: failed program was:" >&5
8193 sed 's/^/| /' conftest.$ac_ext >&5
8194
8195 tcl_cv_cc_arch_ppc64=no
8196 fi
8197 rm -f conftest.err conftest.$ac_objext \
8198       conftest$ac_exeext conftest.$ac_ext
8199                             CFLAGS=$hold_cflags
8200 fi
8201 echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8202 echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6
8203                         if test $tcl_cv_cc_arch_ppc64 = yes; then
8204
8205                             CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8206                             do64bit_ok=yes
8207
8208 fi
8209 ;;
8210                     i386)
8211                         echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8212 echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6
8213 if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8214   echo $ECHO_N "(cached) $ECHO_C" >&6
8215 else
8216
8217                             hold_cflags=$CFLAGS
8218                             CFLAGS="$CFLAGS -arch x86_64"
8219                             cat >conftest.$ac_ext <<_ACEOF
8220 /* confdefs.h.  */
8221 _ACEOF
8222 cat confdefs.h >>conftest.$ac_ext
8223 cat >>conftest.$ac_ext <<_ACEOF
8224 /* end confdefs.h.  */
8225
8226 int
8227 main ()
8228 {
8229
8230   ;
8231   return 0;
8232 }
8233 _ACEOF
8234 rm -f conftest.$ac_objext conftest$ac_exeext
8235 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8236   (eval $ac_link) 2>conftest.er1
8237   ac_status=$?
8238   grep -v '^ *+' conftest.er1 >conftest.err
8239   rm -f conftest.er1
8240   cat conftest.err >&5
8241   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8242   (exit $ac_status); } &&
8243          { ac_try='test -z "$ac_c_werror_flag"
8244                          || test ! -s conftest.err'
8245   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8246   (eval $ac_try) 2>&5
8247   ac_status=$?
8248   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8249   (exit $ac_status); }; } &&
8250          { ac_try='test -s conftest$ac_exeext'
8251   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8252   (eval $ac_try) 2>&5
8253   ac_status=$?
8254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8255   (exit $ac_status); }; }; then
8256   tcl_cv_cc_arch_x86_64=yes
8257 else
8258   echo "$as_me: failed program was:" >&5
8259 sed 's/^/| /' conftest.$ac_ext >&5
8260
8261 tcl_cv_cc_arch_x86_64=no
8262 fi
8263 rm -f conftest.err conftest.$ac_objext \
8264       conftest$ac_exeext conftest.$ac_ext
8265                             CFLAGS=$hold_cflags
8266 fi
8267 echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8268 echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6
8269                         if test $tcl_cv_cc_arch_x86_64 = yes; then
8270
8271                             CFLAGS="$CFLAGS -arch x86_64"
8272                             do64bit_ok=yes
8273
8274 fi
8275 ;;
8276                     *)
8277                         { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8278 echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8279                 esac
8280
8281 else
8282
8283                 # Check for combined 32-bit and 64-bit fat build
8284                 if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8285                     && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
8286
8287                     fat_32_64=yes
8288 fi
8289
8290
8291 fi
8292
8293             # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8294             SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8295             echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
8296 echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
8297 if test "${tcl_cv_ld_single_module+set}" = set; then
8298   echo $ECHO_N "(cached) $ECHO_C" >&6
8299 else
8300
8301                 hold_ldflags=$LDFLAGS
8302                 LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8303                 cat >conftest.$ac_ext <<_ACEOF
8304 /* confdefs.h.  */
8305 _ACEOF
8306 cat confdefs.h >>conftest.$ac_ext
8307 cat >>conftest.$ac_ext <<_ACEOF
8308 /* end confdefs.h.  */
8309
8310 int
8311 main ()
8312 {
8313 int i;
8314   ;
8315   return 0;
8316 }
8317 _ACEOF
8318 rm -f conftest.$ac_objext conftest$ac_exeext
8319 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8320   (eval $ac_link) 2>conftest.er1
8321   ac_status=$?
8322   grep -v '^ *+' conftest.er1 >conftest.err
8323   rm -f conftest.er1
8324   cat conftest.err >&5
8325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8326   (exit $ac_status); } &&
8327          { ac_try='test -z "$ac_c_werror_flag"
8328                          || test ! -s conftest.err'
8329   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8330   (eval $ac_try) 2>&5
8331   ac_status=$?
8332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8333   (exit $ac_status); }; } &&
8334          { ac_try='test -s conftest$ac_exeext'
8335   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8336   (eval $ac_try) 2>&5
8337   ac_status=$?
8338   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8339   (exit $ac_status); }; }; then
8340   tcl_cv_ld_single_module=yes
8341 else
8342   echo "$as_me: failed program was:" >&5
8343 sed 's/^/| /' conftest.$ac_ext >&5
8344
8345 tcl_cv_ld_single_module=no
8346 fi
8347 rm -f conftest.err conftest.$ac_objext \
8348       conftest$ac_exeext conftest.$ac_ext
8349                 LDFLAGS=$hold_ldflags
8350 fi
8351 echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
8352 echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
8353             if test $tcl_cv_ld_single_module = yes; then
8354
8355                 SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8356
8357 fi
8358
8359             # TEA specific: link shlib with current and compatiblity version flags
8360             vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
8361             SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
8362             SHLIB_SUFFIX=".dylib"
8363             # Don't use -prebind when building for Mac OS X 10.4 or later only:
8364             if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
8365                 "`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
8366
8367                 LDFLAGS="$LDFLAGS -prebind"
8368 fi
8369
8370             LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8371             echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
8372 echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
8373 if test "${tcl_cv_ld_search_paths_first+set}" = set; then
8374   echo $ECHO_N "(cached) $ECHO_C" >&6
8375 else
8376
8377                 hold_ldflags=$LDFLAGS
8378                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8379                 cat >conftest.$ac_ext <<_ACEOF
8380 /* confdefs.h.  */
8381 _ACEOF
8382 cat confdefs.h >>conftest.$ac_ext
8383 cat >>conftest.$ac_ext <<_ACEOF
8384 /* end confdefs.h.  */
8385
8386 int
8387 main ()
8388 {
8389 int i;
8390   ;
8391   return 0;
8392 }
8393 _ACEOF
8394 rm -f conftest.$ac_objext conftest$ac_exeext
8395 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8396   (eval $ac_link) 2>conftest.er1
8397   ac_status=$?
8398   grep -v '^ *+' conftest.er1 >conftest.err
8399   rm -f conftest.er1
8400   cat conftest.err >&5
8401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8402   (exit $ac_status); } &&
8403          { ac_try='test -z "$ac_c_werror_flag"
8404                          || test ! -s conftest.err'
8405   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8406   (eval $ac_try) 2>&5
8407   ac_status=$?
8408   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409   (exit $ac_status); }; } &&
8410          { ac_try='test -s conftest$ac_exeext'
8411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8412   (eval $ac_try) 2>&5
8413   ac_status=$?
8414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8415   (exit $ac_status); }; }; then
8416   tcl_cv_ld_search_paths_first=yes
8417 else
8418   echo "$as_me: failed program was:" >&5
8419 sed 's/^/| /' conftest.$ac_ext >&5
8420
8421 tcl_cv_ld_search_paths_first=no
8422 fi
8423 rm -f conftest.err conftest.$ac_objext \
8424       conftest$ac_exeext conftest.$ac_ext
8425                 LDFLAGS=$hold_ldflags
8426 fi
8427 echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
8428 echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
8429             if test $tcl_cv_ld_search_paths_first = yes; then
8430
8431                 LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8432
8433 fi
8434
8435             if test "$tcl_cv_cc_visibility_hidden" != yes; then
8436
8437
8438 cat >>confdefs.h <<\_ACEOF
8439 #define MODULE_SCOPE __private_extern__
8440 _ACEOF
8441
8442                 tcl_cv_cc_visibility_hidden=yes
8443
8444 fi
8445
8446             CC_SEARCH_FLAGS=""
8447             LD_SEARCH_FLAGS=""
8448             LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8449             # TEA specific: for combined 32 & 64 bit fat builds of Tk
8450             # extensions, verify that 64-bit build is possible.
8451             if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
8452
8453                 if test "${TEA_WINDOWINGSYSTEM}" = x11; then
8454
8455                     echo "$as_me:$LINENO: checking for 64-bit X11" >&5
8456 echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6
8457 if test "${tcl_cv_lib_x11_64+set}" = set; then
8458   echo $ECHO_N "(cached) $ECHO_C" >&6
8459 else
8460
8461                         for v in CFLAGS CPPFLAGS LDFLAGS; do
8462                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8463                         done
8464                         CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
8465                         LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
8466                         cat >conftest.$ac_ext <<_ACEOF
8467 /* confdefs.h.  */
8468 _ACEOF
8469 cat confdefs.h >>conftest.$ac_ext
8470 cat >>conftest.$ac_ext <<_ACEOF
8471 /* end confdefs.h.  */
8472 #include <X11/Xlib.h>
8473 int
8474 main ()
8475 {
8476 XrmInitialize();
8477   ;
8478   return 0;
8479 }
8480 _ACEOF
8481 rm -f conftest.$ac_objext conftest$ac_exeext
8482 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8483   (eval $ac_link) 2>conftest.er1
8484   ac_status=$?
8485   grep -v '^ *+' conftest.er1 >conftest.err
8486   rm -f conftest.er1
8487   cat conftest.err >&5
8488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8489   (exit $ac_status); } &&
8490          { ac_try='test -z "$ac_c_werror_flag"
8491                          || test ! -s conftest.err'
8492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8493   (eval $ac_try) 2>&5
8494   ac_status=$?
8495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8496   (exit $ac_status); }; } &&
8497          { ac_try='test -s conftest$ac_exeext'
8498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8499   (eval $ac_try) 2>&5
8500   ac_status=$?
8501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502   (exit $ac_status); }; }; then
8503   tcl_cv_lib_x11_64=yes
8504 else
8505   echo "$as_me: failed program was:" >&5
8506 sed 's/^/| /' conftest.$ac_ext >&5
8507
8508 tcl_cv_lib_x11_64=no
8509 fi
8510 rm -f conftest.err conftest.$ac_objext \
8511       conftest$ac_exeext conftest.$ac_ext
8512                         for v in CFLAGS CPPFLAGS LDFLAGS; do
8513                             eval $v'="$hold_'$v'"'
8514                         done
8515 fi
8516 echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
8517 echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6
8518
8519 fi
8520
8521                 if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
8522
8523                     echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
8524 echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6
8525 if test "${tcl_cv_lib_tk_64+set}" = set; then
8526   echo $ECHO_N "(cached) $ECHO_C" >&6
8527 else
8528
8529                         for v in CFLAGS CPPFLAGS LDFLAGS; do
8530                             eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8531                         done
8532                         CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 ${TCL_INCLUDES} ${TK_INCLUDES}"
8533                         LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
8534                         cat >conftest.$ac_ext <<_ACEOF
8535 /* confdefs.h.  */
8536 _ACEOF
8537 cat confdefs.h >>conftest.$ac_ext
8538 cat >>conftest.$ac_ext <<_ACEOF
8539 /* end confdefs.h.  */
8540 #include <tk.h>
8541 int
8542 main ()
8543 {
8544 Tk_InitStubs(NULL, "", 0);
8545   ;
8546   return 0;
8547 }
8548 _ACEOF
8549 rm -f conftest.$ac_objext conftest$ac_exeext
8550 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8551   (eval $ac_link) 2>conftest.er1
8552   ac_status=$?
8553   grep -v '^ *+' conftest.er1 >conftest.err
8554   rm -f conftest.er1
8555   cat conftest.err >&5
8556   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8557   (exit $ac_status); } &&
8558          { ac_try='test -z "$ac_c_werror_flag"
8559                          || test ! -s conftest.err'
8560   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8561   (eval $ac_try) 2>&5
8562   ac_status=$?
8563   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8564   (exit $ac_status); }; } &&
8565          { ac_try='test -s conftest$ac_exeext'
8566   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8567   (eval $ac_try) 2>&5
8568   ac_status=$?
8569   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8570   (exit $ac_status); }; }; then
8571   tcl_cv_lib_tk_64=yes
8572 else
8573   echo "$as_me: failed program was:" >&5
8574 sed 's/^/| /' conftest.$ac_ext >&5
8575
8576 tcl_cv_lib_tk_64=no
8577 fi
8578 rm -f conftest.err conftest.$ac_objext \
8579       conftest$ac_exeext conftest.$ac_ext
8580                         for v in CFLAGS CPPFLAGS LDFLAGS; do
8581                             eval $v'="$hold_'$v'"'
8582                         done
8583 fi
8584 echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
8585 echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6
8586
8587 fi
8588
8589                 # remove 64-bit arch flags from CFLAGS et al. if configuration
8590                 # does not support 64-bit.
8591                 if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
8592
8593                     { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
8594 echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
8595                     for v in CFLAGS CPPFLAGS LDFLAGS; do
8596                         eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8597                     done
8598 fi
8599
8600
8601 fi
8602
8603             ;;
8604         OS/390-*)
8605             CFLAGS_OPTIMIZE=""          # Optimizer is buggy
8606
8607 cat >>confdefs.h <<\_ACEOF
8608 #define _OE_SOCKETS 1
8609 _ACEOF
8610
8611             ;;
8612         OSF1-V*)
8613             # Digital OSF/1
8614             SHLIB_CFLAGS=""
8615             if test "$SHARED_BUILD" = 1; then
8616
8617                 SHLIB_LD='ld -shared -expect_unresolved "*"'
8618
8619 else
8620
8621                 SHLIB_LD='ld -non_shared -expect_unresolved "*"'
8622
8623 fi
8624
8625             SHLIB_SUFFIX=".so"
8626             if test $doRpath = yes; then
8627
8628                 CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8629                 LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8630 fi
8631
8632             if test "$GCC" = yes; then
8633   CFLAGS="$CFLAGS -mieee"
8634 else
8635
8636                 CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
8637 fi
8638
8639             # see pthread_intro(3) for pthread support on osf1, k.furukawa
8640             if test "${TCL_THREADS}" = 1; then
8641
8642                 CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
8643                 CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
8644                 LIBS=`echo $LIBS | sed s/-lpthreads//`
8645                 if test "$GCC" = yes; then
8646
8647                     LIBS="$LIBS -lpthread -lmach -lexc"
8648
8649 else
8650
8651                     CFLAGS="$CFLAGS -pthread"
8652                     LDFLAGS="$LDFLAGS -pthread"
8653
8654 fi
8655
8656
8657 fi
8658
8659             ;;
8660         QNX-6*)
8661             # QNX RTP
8662             # This may work for all QNX, but it was only reported for v6.
8663             SHLIB_CFLAGS="-fPIC"
8664             SHLIB_LD="ld -Bshareable -x"
8665             SHLIB_LD_LIBS=""
8666             SHLIB_SUFFIX=".so"
8667             CC_SEARCH_FLAGS=""
8668             LD_SEARCH_FLAGS=""
8669             ;;
8670         SCO_SV-3.2*)
8671             if test "$GCC" = yes; then
8672
8673                 SHLIB_CFLAGS="-fPIC -melf"
8674                 LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
8675
8676 else
8677
8678                SHLIB_CFLAGS="-Kpic -belf"
8679                LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
8680
8681 fi
8682
8683             SHLIB_LD="ld -G"
8684             SHLIB_LD_LIBS=""
8685             SHLIB_SUFFIX=".so"
8686             CC_SEARCH_FLAGS=""
8687             LD_SEARCH_FLAGS=""
8688             ;;
8689         SunOS-5.[0-6])
8690             # Careful to not let 5.10+ fall into this case
8691
8692             # Note: If _REENTRANT isn't defined, then Solaris
8693             # won't define thread-safe library routines.
8694
8695
8696 cat >>confdefs.h <<\_ACEOF
8697 #define _REENTRANT 1
8698 _ACEOF
8699
8700
8701 cat >>confdefs.h <<\_ACEOF
8702 #define _POSIX_PTHREAD_SEMANTICS 1
8703 _ACEOF
8704
8705
8706             SHLIB_CFLAGS="-KPIC"
8707             SHLIB_SUFFIX=".so"
8708             if test "$GCC" = yes; then
8709
8710                 SHLIB_LD='${CC} -shared'
8711                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8712                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8713
8714 else
8715
8716                 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
8717                 CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8718                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8719
8720 fi
8721
8722             ;;
8723         SunOS-5*)
8724             # Note: If _REENTRANT isn't defined, then Solaris
8725             # won't define thread-safe library routines.
8726
8727
8728 cat >>confdefs.h <<\_ACEOF
8729 #define _REENTRANT 1
8730 _ACEOF
8731
8732
8733 cat >>confdefs.h <<\_ACEOF
8734 #define _POSIX_PTHREAD_SEMANTICS 1
8735 _ACEOF
8736
8737
8738             SHLIB_CFLAGS="-KPIC"
8739
8740             # Check to enable 64-bit flags for compiler/linker
8741             if test "$do64bit" = yes; then
8742
8743                 arch=`isainfo`
8744                 if test "$arch" = "sparcv9 sparc"; then
8745
8746                     if test "$GCC" = yes; then
8747
8748                         if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
8749
8750                             { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
8751 echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
8752
8753 else
8754
8755                             do64bit_ok=yes
8756                             CFLAGS="$CFLAGS -m64 -mcpu=v9"
8757                             LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
8758                             SHLIB_CFLAGS="-fPIC"
8759
8760 fi
8761
8762
8763 else
8764
8765                         do64bit_ok=yes
8766                         if test "$do64bitVIS" = yes; then
8767
8768                             CFLAGS="$CFLAGS -xarch=v9a"
8769                             LDFLAGS_ARCH="-xarch=v9a"
8770
8771 else
8772
8773                             CFLAGS="$CFLAGS -xarch=v9"
8774                             LDFLAGS_ARCH="-xarch=v9"
8775
8776 fi
8777
8778                         # Solaris 64 uses this as well
8779                         #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
8780
8781 fi
8782
8783
8784 else
8785   if test "$arch" = "amd64 i386"; then
8786
8787                     if test "$GCC" = yes; then
8788
8789                         case $system in
8790                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8791                                 do64bit_ok=yes
8792                                 CFLAGS="$CFLAGS -m64"
8793                                 LDFLAGS="$LDFLAGS -m64";;
8794                             *)
8795                                 { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8796 echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
8797                         esac
8798
8799 else
8800
8801                         do64bit_ok=yes
8802                         case $system in
8803                             SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
8804                                 CFLAGS="$CFLAGS -m64"
8805                                 LDFLAGS="$LDFLAGS -m64";;
8806                             *)
8807                                 CFLAGS="$CFLAGS -xarch=amd64"
8808                                 LDFLAGS="$LDFLAGS -xarch=amd64";;
8809                         esac
8810
8811 fi
8812
8813
8814 else
8815   { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
8816 echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
8817 fi
8818
8819 fi
8820
8821
8822 fi
8823
8824
8825             SHLIB_SUFFIX=".so"
8826             if test "$GCC" = yes; then
8827
8828                 SHLIB_LD='${CC} -shared'
8829                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8830                 LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8831                 if test "$do64bit_ok" = yes; then
8832
8833                     if test "$arch" = "sparcv9 sparc"; then
8834
8835                         # We need to specify -static-libgcc or we need to
8836                         # add the path to the sparv9 libgcc.
8837                         # JH: static-libgcc is necessary for core Tcl, but may
8838                         # not be necessary for extensions.
8839                         SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
8840                         # for finding sparcv9 libgcc, get the regular libgcc
8841                         # path, remove so name and append 'sparcv9'
8842                         #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
8843                         #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
8844
8845 else
8846   if test "$arch" = "amd64 i386"; then
8847
8848                         # JH: static-libgcc is necessary for core Tcl, but may
8849                         # not be necessary for extensions.
8850                         SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
8851
8852 fi
8853
8854 fi
8855
8856
8857 fi
8858
8859
8860 else
8861
8862                 case $system in
8863                     SunOS-5.[1-9][0-9]*)
8864                         # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8865                         SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
8866                     *)
8867                         SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
8868                 esac
8869                 CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
8870                 LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
8871
8872 fi
8873
8874             ;;
8875     esac
8876
8877     if test "$do64bit" = yes -a "$do64bit_ok" = no; then
8878
8879         { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
8880 echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
8881
8882 fi
8883
8884
8885
8886
8887     # Add in the arch flags late to ensure it wasn't removed.
8888     # Not necessary in TEA, but this is aligned with core
8889     LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
8890
8891     # If we're running gcc, then change the C flags for compiling shared
8892     # libraries to the right flags for gcc, instead of those for the
8893     # standard manufacturer compiler.
8894
8895     if test "$GCC" = yes; then
8896
8897         case $system in
8898             AIX-*) ;;
8899             BSD/OS*) ;;
8900             CYGWIN_*) ;;
8901             IRIX*) ;;
8902             NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
8903             Darwin-*) ;;
8904             SCO_SV-3.2*) ;;
8905             windows) ;;
8906             *) SHLIB_CFLAGS="-fPIC" ;;
8907         esac
8908 fi
8909
8910
8911     if test "$tcl_cv_cc_visibility_hidden" != yes; then
8912
8913
8914 cat >>confdefs.h <<\_ACEOF
8915 #define MODULE_SCOPE extern
8916 _ACEOF
8917
8918
8919 cat >>confdefs.h <<\_ACEOF
8920 #define NO_VIZ
8921 _ACEOF
8922
8923
8924 fi
8925
8926
8927     if test "$SHARED_LIB_SUFFIX" = ""; then
8928
8929         # TEA specific: use PACKAGE_VERSION instead of VERSION
8930         SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
8931 fi
8932
8933     if test "$UNSHARED_LIB_SUFFIX" = ""; then
8934
8935         # TEA specific: use PACKAGE_VERSION instead of VERSION
8936         UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
8937 fi
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952     # These must be called after we do the basic CFLAGS checks and
8953     # verify any possible 64-bit or similar switches are necessary
8954
8955     echo "$as_me:$LINENO: checking for required early compiler flags" >&5
8956 echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
8957     tcl_flags=""
8958
8959     if test "${tcl_cv_flag__isoc99_source+set}" = set; then
8960   echo $ECHO_N "(cached) $ECHO_C" >&6
8961 else
8962   cat >conftest.$ac_ext <<_ACEOF
8963 /* confdefs.h.  */
8964 _ACEOF
8965 cat confdefs.h >>conftest.$ac_ext
8966 cat >>conftest.$ac_ext <<_ACEOF
8967 /* end confdefs.h.  */
8968 #include <stdlib.h>
8969 int
8970 main ()
8971 {
8972 char *p = (char *)strtoll; char *q = (char *)strtoull;
8973   ;
8974   return 0;
8975 }
8976 _ACEOF
8977 rm -f conftest.$ac_objext
8978 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8979   (eval $ac_compile) 2>conftest.er1
8980   ac_status=$?
8981   grep -v '^ *+' conftest.er1 >conftest.err
8982   rm -f conftest.er1
8983   cat conftest.err >&5
8984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8985   (exit $ac_status); } &&
8986          { ac_try='test -z "$ac_c_werror_flag"
8987                          || test ! -s conftest.err'
8988   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8989   (eval $ac_try) 2>&5
8990   ac_status=$?
8991   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8992   (exit $ac_status); }; } &&
8993          { ac_try='test -s conftest.$ac_objext'
8994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8995   (eval $ac_try) 2>&5
8996   ac_status=$?
8997   echo "$as_me:$LINENO: \$? = $ac_status" >&5
8998   (exit $ac_status); }; }; then
8999   tcl_cv_flag__isoc99_source=no
9000 else
9001   echo "$as_me: failed program was:" >&5
9002 sed 's/^/| /' conftest.$ac_ext >&5
9003
9004 cat >conftest.$ac_ext <<_ACEOF
9005 /* confdefs.h.  */
9006 _ACEOF
9007 cat confdefs.h >>conftest.$ac_ext
9008 cat >>conftest.$ac_ext <<_ACEOF
9009 /* end confdefs.h.  */
9010 #define _ISOC99_SOURCE 1
9011 #include <stdlib.h>
9012 int
9013 main ()
9014 {
9015 char *p = (char *)strtoll; char *q = (char *)strtoull;
9016   ;
9017   return 0;
9018 }
9019 _ACEOF
9020 rm -f conftest.$ac_objext
9021 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9022   (eval $ac_compile) 2>conftest.er1
9023   ac_status=$?
9024   grep -v '^ *+' conftest.er1 >conftest.err
9025   rm -f conftest.er1
9026   cat conftest.err >&5
9027   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9028   (exit $ac_status); } &&
9029          { ac_try='test -z "$ac_c_werror_flag"
9030                          || test ! -s conftest.err'
9031   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9032   (eval $ac_try) 2>&5
9033   ac_status=$?
9034   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9035   (exit $ac_status); }; } &&
9036          { ac_try='test -s conftest.$ac_objext'
9037   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9038   (eval $ac_try) 2>&5
9039   ac_status=$?
9040   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9041   (exit $ac_status); }; }; then
9042   tcl_cv_flag__isoc99_source=yes
9043 else
9044   echo "$as_me: failed program was:" >&5
9045 sed 's/^/| /' conftest.$ac_ext >&5
9046
9047 tcl_cv_flag__isoc99_source=no
9048 fi
9049 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9050 fi
9051 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9052 fi
9053
9054     if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9055
9056 cat >>confdefs.h <<\_ACEOF
9057 #define _ISOC99_SOURCE 1
9058 _ACEOF
9059
9060         tcl_flags="$tcl_flags _ISOC99_SOURCE"
9061     fi
9062
9063
9064     if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9065   echo $ECHO_N "(cached) $ECHO_C" >&6
9066 else
9067   cat >conftest.$ac_ext <<_ACEOF
9068 /* confdefs.h.  */
9069 _ACEOF
9070 cat confdefs.h >>conftest.$ac_ext
9071 cat >>conftest.$ac_ext <<_ACEOF
9072 /* end confdefs.h.  */
9073 #include <sys/stat.h>
9074 int
9075 main ()
9076 {
9077 struct stat64 buf; int i = stat64("/", &buf);
9078   ;
9079   return 0;
9080 }
9081 _ACEOF
9082 rm -f conftest.$ac_objext
9083 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9084   (eval $ac_compile) 2>conftest.er1
9085   ac_status=$?
9086   grep -v '^ *+' conftest.er1 >conftest.err
9087   rm -f conftest.er1
9088   cat conftest.err >&5
9089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090   (exit $ac_status); } &&
9091          { ac_try='test -z "$ac_c_werror_flag"
9092                          || test ! -s conftest.err'
9093   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9094   (eval $ac_try) 2>&5
9095   ac_status=$?
9096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9097   (exit $ac_status); }; } &&
9098          { ac_try='test -s conftest.$ac_objext'
9099   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9100   (eval $ac_try) 2>&5
9101   ac_status=$?
9102   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103   (exit $ac_status); }; }; then
9104   tcl_cv_flag__largefile64_source=no
9105 else
9106   echo "$as_me: failed program was:" >&5
9107 sed 's/^/| /' conftest.$ac_ext >&5
9108
9109 cat >conftest.$ac_ext <<_ACEOF
9110 /* confdefs.h.  */
9111 _ACEOF
9112 cat confdefs.h >>conftest.$ac_ext
9113 cat >>conftest.$ac_ext <<_ACEOF
9114 /* end confdefs.h.  */
9115 #define _LARGEFILE64_SOURCE 1
9116 #include <sys/stat.h>
9117 int
9118 main ()
9119 {
9120 struct stat64 buf; int i = stat64("/", &buf);
9121   ;
9122   return 0;
9123 }
9124 _ACEOF
9125 rm -f conftest.$ac_objext
9126 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9127   (eval $ac_compile) 2>conftest.er1
9128   ac_status=$?
9129   grep -v '^ *+' conftest.er1 >conftest.err
9130   rm -f conftest.er1
9131   cat conftest.err >&5
9132   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9133   (exit $ac_status); } &&
9134          { ac_try='test -z "$ac_c_werror_flag"
9135                          || test ! -s conftest.err'
9136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9137   (eval $ac_try) 2>&5
9138   ac_status=$?
9139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9140   (exit $ac_status); }; } &&
9141          { ac_try='test -s conftest.$ac_objext'
9142   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9143   (eval $ac_try) 2>&5
9144   ac_status=$?
9145   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9146   (exit $ac_status); }; }; then
9147   tcl_cv_flag__largefile64_source=yes
9148 else
9149   echo "$as_me: failed program was:" >&5
9150 sed 's/^/| /' conftest.$ac_ext >&5
9151
9152 tcl_cv_flag__largefile64_source=no
9153 fi
9154 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9155 fi
9156 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9157 fi
9158
9159     if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9160
9161 cat >>confdefs.h <<\_ACEOF
9162 #define _LARGEFILE64_SOURCE 1
9163 _ACEOF
9164
9165         tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9166     fi
9167
9168
9169     if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9170   echo $ECHO_N "(cached) $ECHO_C" >&6
9171 else
9172   cat >conftest.$ac_ext <<_ACEOF
9173 /* confdefs.h.  */
9174 _ACEOF
9175 cat confdefs.h >>conftest.$ac_ext
9176 cat >>conftest.$ac_ext <<_ACEOF
9177 /* end confdefs.h.  */
9178 #include <sys/stat.h>
9179 int
9180 main ()
9181 {
9182 char *p = (char *)open64;
9183   ;
9184   return 0;
9185 }
9186 _ACEOF
9187 rm -f conftest.$ac_objext
9188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9189   (eval $ac_compile) 2>conftest.er1
9190   ac_status=$?
9191   grep -v '^ *+' conftest.er1 >conftest.err
9192   rm -f conftest.er1
9193   cat conftest.err >&5
9194   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9195   (exit $ac_status); } &&
9196          { ac_try='test -z "$ac_c_werror_flag"
9197                          || test ! -s conftest.err'
9198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9199   (eval $ac_try) 2>&5
9200   ac_status=$?
9201   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9202   (exit $ac_status); }; } &&
9203          { ac_try='test -s conftest.$ac_objext'
9204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9205   (eval $ac_try) 2>&5
9206   ac_status=$?
9207   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9208   (exit $ac_status); }; }; then
9209   tcl_cv_flag__largefile_source64=no
9210 else
9211   echo "$as_me: failed program was:" >&5
9212 sed 's/^/| /' conftest.$ac_ext >&5
9213
9214 cat >conftest.$ac_ext <<_ACEOF
9215 /* confdefs.h.  */
9216 _ACEOF
9217 cat confdefs.h >>conftest.$ac_ext
9218 cat >>conftest.$ac_ext <<_ACEOF
9219 /* end confdefs.h.  */
9220 #define _LARGEFILE_SOURCE64 1
9221 #include <sys/stat.h>
9222 int
9223 main ()
9224 {
9225 char *p = (char *)open64;
9226   ;
9227   return 0;
9228 }
9229 _ACEOF
9230 rm -f conftest.$ac_objext
9231 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9232   (eval $ac_compile) 2>conftest.er1
9233   ac_status=$?
9234   grep -v '^ *+' conftest.er1 >conftest.err
9235   rm -f conftest.er1
9236   cat conftest.err >&5
9237   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238   (exit $ac_status); } &&
9239          { ac_try='test -z "$ac_c_werror_flag"
9240                          || test ! -s conftest.err'
9241   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9242   (eval $ac_try) 2>&5
9243   ac_status=$?
9244   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9245   (exit $ac_status); }; } &&
9246          { ac_try='test -s conftest.$ac_objext'
9247   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9248   (eval $ac_try) 2>&5
9249   ac_status=$?
9250   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251   (exit $ac_status); }; }; then
9252   tcl_cv_flag__largefile_source64=yes
9253 else
9254   echo "$as_me: failed program was:" >&5
9255 sed 's/^/| /' conftest.$ac_ext >&5
9256
9257 tcl_cv_flag__largefile_source64=no
9258 fi
9259 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9260 fi
9261 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9262 fi
9263
9264     if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9265
9266 cat >>confdefs.h <<\_ACEOF
9267 #define _LARGEFILE_SOURCE64 1
9268 _ACEOF
9269
9270         tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9271     fi
9272
9273     if test "x${tcl_flags}" = "x" ; then
9274         echo "$as_me:$LINENO: result: none" >&5
9275 echo "${ECHO_T}none" >&6
9276     else
9277         echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9278 echo "${ECHO_T}${tcl_flags}" >&6
9279     fi
9280
9281
9282     echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9283 echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
9284     if test "${tcl_cv_type_64bit+set}" = set; then
9285   echo $ECHO_N "(cached) $ECHO_C" >&6
9286 else
9287
9288         tcl_cv_type_64bit=none
9289         # See if the compiler knows natively about __int64
9290         cat >conftest.$ac_ext <<_ACEOF
9291 /* confdefs.h.  */
9292 _ACEOF
9293 cat confdefs.h >>conftest.$ac_ext
9294 cat >>conftest.$ac_ext <<_ACEOF
9295 /* end confdefs.h.  */
9296
9297 int
9298 main ()
9299 {
9300 __int64 value = (__int64) 0;
9301   ;
9302   return 0;
9303 }
9304 _ACEOF
9305 rm -f conftest.$ac_objext
9306 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9307   (eval $ac_compile) 2>conftest.er1
9308   ac_status=$?
9309   grep -v '^ *+' conftest.er1 >conftest.err
9310   rm -f conftest.er1
9311   cat conftest.err >&5
9312   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9313   (exit $ac_status); } &&
9314          { ac_try='test -z "$ac_c_werror_flag"
9315                          || test ! -s conftest.err'
9316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9317   (eval $ac_try) 2>&5
9318   ac_status=$?
9319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9320   (exit $ac_status); }; } &&
9321          { ac_try='test -s conftest.$ac_objext'
9322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9323   (eval $ac_try) 2>&5
9324   ac_status=$?
9325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9326   (exit $ac_status); }; }; then
9327   tcl_type_64bit=__int64
9328 else
9329   echo "$as_me: failed program was:" >&5
9330 sed 's/^/| /' conftest.$ac_ext >&5
9331
9332 tcl_type_64bit="long long"
9333 fi
9334 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9335         # See if we should use long anyway  Note that we substitute in the
9336         # type that is our current guess for a 64-bit type inside this check
9337         # program, so it should be modified only carefully...
9338         cat >conftest.$ac_ext <<_ACEOF
9339 /* confdefs.h.  */
9340 _ACEOF
9341 cat confdefs.h >>conftest.$ac_ext
9342 cat >>conftest.$ac_ext <<_ACEOF
9343 /* end confdefs.h.  */
9344
9345 int
9346 main ()
9347 {
9348 switch (0) {
9349             case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9350         }
9351   ;
9352   return 0;
9353 }
9354 _ACEOF
9355 rm -f conftest.$ac_objext
9356 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9357   (eval $ac_compile) 2>conftest.er1
9358   ac_status=$?
9359   grep -v '^ *+' conftest.er1 >conftest.err
9360   rm -f conftest.er1
9361   cat conftest.err >&5
9362   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9363   (exit $ac_status); } &&
9364          { ac_try='test -z "$ac_c_werror_flag"
9365                          || test ! -s conftest.err'
9366   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9367   (eval $ac_try) 2>&5
9368   ac_status=$?
9369   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9370   (exit $ac_status); }; } &&
9371          { ac_try='test -s conftest.$ac_objext'
9372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9373   (eval $ac_try) 2>&5
9374   ac_status=$?
9375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376   (exit $ac_status); }; }; then
9377   tcl_cv_type_64bit=${tcl_type_64bit}
9378 else
9379   echo "$as_me: failed program was:" >&5
9380 sed 's/^/| /' conftest.$ac_ext >&5
9381
9382 fi
9383 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9384 fi
9385
9386     if test "${tcl_cv_type_64bit}" = none ; then
9387
9388 cat >>confdefs.h <<\_ACEOF
9389 #define TCL_WIDE_INT_IS_LONG 1
9390 _ACEOF
9391
9392         echo "$as_me:$LINENO: result: using long" >&5
9393 echo "${ECHO_T}using long" >&6
9394     elif test "${tcl_cv_type_64bit}" = "__int64" \
9395                 -a "${TEA_PLATFORM}" = "windows" ; then
9396         # TEA specific: We actually want to use the default tcl.h checks in
9397         # this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9398         echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
9399 echo "${ECHO_T}using Tcl header defaults" >&6
9400     else
9401
9402 cat >>confdefs.h <<_ACEOF
9403 #define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9404 _ACEOF
9405
9406         echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9407 echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
9408
9409         # Now check for auxiliary declarations
9410         echo "$as_me:$LINENO: checking for struct dirent64" >&5
9411 echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
9412 if test "${tcl_cv_struct_dirent64+set}" = set; then
9413   echo $ECHO_N "(cached) $ECHO_C" >&6
9414 else
9415
9416             cat >conftest.$ac_ext <<_ACEOF
9417 /* confdefs.h.  */
9418 _ACEOF
9419 cat confdefs.h >>conftest.$ac_ext
9420 cat >>conftest.$ac_ext <<_ACEOF
9421 /* end confdefs.h.  */
9422 #include <sys/types.h>
9423 #include <sys/dirent.h>
9424 int
9425 main ()
9426 {
9427 struct dirent64 p;
9428   ;
9429   return 0;
9430 }
9431 _ACEOF
9432 rm -f conftest.$ac_objext
9433 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9434   (eval $ac_compile) 2>conftest.er1
9435   ac_status=$?
9436   grep -v '^ *+' conftest.er1 >conftest.err
9437   rm -f conftest.er1
9438   cat conftest.err >&5
9439   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9440   (exit $ac_status); } &&
9441          { ac_try='test -z "$ac_c_werror_flag"
9442                          || test ! -s conftest.err'
9443   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9444   (eval $ac_try) 2>&5
9445   ac_status=$?
9446   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447   (exit $ac_status); }; } &&
9448          { ac_try='test -s conftest.$ac_objext'
9449   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   tcl_cv_struct_dirent64=yes
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 sed 's/^/| /' conftest.$ac_ext >&5
9458
9459 tcl_cv_struct_dirent64=no
9460 fi
9461 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9462 fi
9463 echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9464 echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
9465         if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9466
9467 cat >>confdefs.h <<\_ACEOF
9468 #define HAVE_STRUCT_DIRENT64 1
9469 _ACEOF
9470
9471         fi
9472
9473         echo "$as_me:$LINENO: checking for struct stat64" >&5
9474 echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
9475 if test "${tcl_cv_struct_stat64+set}" = set; then
9476   echo $ECHO_N "(cached) $ECHO_C" >&6
9477 else
9478
9479             cat >conftest.$ac_ext <<_ACEOF
9480 /* confdefs.h.  */
9481 _ACEOF
9482 cat confdefs.h >>conftest.$ac_ext
9483 cat >>conftest.$ac_ext <<_ACEOF
9484 /* end confdefs.h.  */
9485 #include <sys/stat.h>
9486 int
9487 main ()
9488 {
9489 struct stat64 p;
9490
9491   ;
9492   return 0;
9493 }
9494 _ACEOF
9495 rm -f conftest.$ac_objext
9496 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9497   (eval $ac_compile) 2>conftest.er1
9498   ac_status=$?
9499   grep -v '^ *+' conftest.er1 >conftest.err
9500   rm -f conftest.er1
9501   cat conftest.err >&5
9502   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9503   (exit $ac_status); } &&
9504          { ac_try='test -z "$ac_c_werror_flag"
9505                          || test ! -s conftest.err'
9506   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9507   (eval $ac_try) 2>&5
9508   ac_status=$?
9509   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510   (exit $ac_status); }; } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   tcl_cv_struct_stat64=yes
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 sed 's/^/| /' conftest.$ac_ext >&5
9521
9522 tcl_cv_struct_stat64=no
9523 fi
9524 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9525 fi
9526 echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9527 echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
9528         if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9529
9530 cat >>confdefs.h <<\_ACEOF
9531 #define HAVE_STRUCT_STAT64 1
9532 _ACEOF
9533
9534         fi
9535
9536
9537
9538 for ac_func in open64 lseek64
9539 do
9540 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9541 echo "$as_me:$LINENO: checking for $ac_func" >&5
9542 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9543 if eval "test \"\${$as_ac_var+set}\" = set"; then
9544   echo $ECHO_N "(cached) $ECHO_C" >&6
9545 else
9546   cat >conftest.$ac_ext <<_ACEOF
9547 /* confdefs.h.  */
9548 _ACEOF
9549 cat confdefs.h >>conftest.$ac_ext
9550 cat >>conftest.$ac_ext <<_ACEOF
9551 /* end confdefs.h.  */
9552 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9553    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9554 #define $ac_func innocuous_$ac_func
9555
9556 /* System header to define __stub macros and hopefully few prototypes,
9557     which can conflict with char $ac_func (); below.
9558     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9559     <limits.h> exists even on freestanding compilers.  */
9560
9561 #ifdef __STDC__
9562 # include <limits.h>
9563 #else
9564 # include <assert.h>
9565 #endif
9566
9567 #undef $ac_func
9568
9569 /* Override any gcc2 internal prototype to avoid an error.  */
9570 #ifdef __cplusplus
9571 extern "C"
9572 {
9573 #endif
9574 /* We use char because int might match the return type of a gcc2
9575    builtin and then its argument prototype would still apply.  */
9576 char $ac_func ();
9577 /* The GNU C library defines this for functions which it implements
9578     to always fail with ENOSYS.  Some functions are actually named
9579     something starting with __ and the normal name is an alias.  */
9580 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9581 choke me
9582 #else
9583 char (*f) () = $ac_func;
9584 #endif
9585 #ifdef __cplusplus
9586 }
9587 #endif
9588
9589 int
9590 main ()
9591 {
9592 return f != $ac_func;
9593   ;
9594   return 0;
9595 }
9596 _ACEOF
9597 rm -f conftest.$ac_objext conftest$ac_exeext
9598 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9599   (eval $ac_link) 2>conftest.er1
9600   ac_status=$?
9601   grep -v '^ *+' conftest.er1 >conftest.err
9602   rm -f conftest.er1
9603   cat conftest.err >&5
9604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9605   (exit $ac_status); } &&
9606          { ac_try='test -z "$ac_c_werror_flag"
9607                          || test ! -s conftest.err'
9608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9612   (exit $ac_status); }; } &&
9613          { ac_try='test -s conftest$ac_exeext'
9614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9615   (eval $ac_try) 2>&5
9616   ac_status=$?
9617   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9618   (exit $ac_status); }; }; then
9619   eval "$as_ac_var=yes"
9620 else
9621   echo "$as_me: failed program was:" >&5
9622 sed 's/^/| /' conftest.$ac_ext >&5
9623
9624 eval "$as_ac_var=no"
9625 fi
9626 rm -f conftest.err conftest.$ac_objext \
9627       conftest$ac_exeext conftest.$ac_ext
9628 fi
9629 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
9630 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9631 if test `eval echo '${'$as_ac_var'}'` = yes; then
9632   cat >>confdefs.h <<_ACEOF
9633 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9634 _ACEOF
9635
9636 fi
9637 done
9638
9639         echo "$as_me:$LINENO: checking for off64_t" >&5
9640 echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
9641         if test "${tcl_cv_type_off64_t+set}" = set; then
9642   echo $ECHO_N "(cached) $ECHO_C" >&6
9643 else
9644
9645             cat >conftest.$ac_ext <<_ACEOF
9646 /* confdefs.h.  */
9647 _ACEOF
9648 cat confdefs.h >>conftest.$ac_ext
9649 cat >>conftest.$ac_ext <<_ACEOF
9650 /* end confdefs.h.  */
9651 #include <sys/types.h>
9652 int
9653 main ()
9654 {
9655 off64_t offset;
9656
9657   ;
9658   return 0;
9659 }
9660 _ACEOF
9661 rm -f conftest.$ac_objext
9662 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9663   (eval $ac_compile) 2>conftest.er1
9664   ac_status=$?
9665   grep -v '^ *+' conftest.er1 >conftest.err
9666   rm -f conftest.er1
9667   cat conftest.err >&5
9668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9669   (exit $ac_status); } &&
9670          { ac_try='test -z "$ac_c_werror_flag"
9671                          || test ! -s conftest.err'
9672   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9673   (eval $ac_try) 2>&5
9674   ac_status=$?
9675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9676   (exit $ac_status); }; } &&
9677          { ac_try='test -s conftest.$ac_objext'
9678   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9679   (eval $ac_try) 2>&5
9680   ac_status=$?
9681   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9682   (exit $ac_status); }; }; then
9683   tcl_cv_type_off64_t=yes
9684 else
9685   echo "$as_me: failed program was:" >&5
9686 sed 's/^/| /' conftest.$ac_ext >&5
9687
9688 tcl_cv_type_off64_t=no
9689 fi
9690 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9691 fi
9692
9693                         if test "x${tcl_cv_type_off64_t}" = "xyes" && \
9694                 test "x${ac_cv_func_lseek64}" = "xyes" && \
9695                 test "x${ac_cv_func_open64}" = "xyes" ; then
9696
9697 cat >>confdefs.h <<\_ACEOF
9698 #define HAVE_TYPE_OFF64_T 1
9699 _ACEOF
9700
9701             echo "$as_me:$LINENO: result: yes" >&5
9702 echo "${ECHO_T}yes" >&6
9703         else
9704             echo "$as_me:$LINENO: result: no" >&5
9705 echo "${ECHO_T}no" >&6
9706         fi
9707     fi
9708
9709
9710
9711 #--------------------------------------------------------------------
9712 # Set the default compiler switches based on the --enable-symbols option.
9713 #--------------------------------------------------------------------
9714
9715
9716
9717     echo "$as_me:$LINENO: checking for build with symbols" >&5
9718 echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
9719     # Check whether --enable-symbols or --disable-symbols was given.
9720 if test "${enable_symbols+set}" = set; then
9721   enableval="$enable_symbols"
9722   tcl_ok=$enableval
9723 else
9724   tcl_ok=no
9725 fi;
9726     DBGX=""
9727     if test "$tcl_ok" = "no"; then
9728         CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
9729         LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
9730         echo "$as_me:$LINENO: result: no" >&5
9731 echo "${ECHO_T}no" >&6
9732     else
9733         CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
9734         LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
9735         if test "$tcl_ok" = "yes"; then
9736             echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
9737 echo "${ECHO_T}yes (standard debugging)" >&6
9738         fi
9739     fi
9740     # TEA specific:
9741     if test "${TEA_PLATFORM}" != "windows" ; then
9742         LDFLAGS_DEFAULT="${LDFLAGS}"
9743     fi
9744
9745
9746
9747
9748     if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
9749
9750 cat >>confdefs.h <<\_ACEOF
9751 #define TCL_MEM_DEBUG 1
9752 _ACEOF
9753
9754     fi
9755
9756     if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
9757         if test "$tcl_ok" = "all"; then
9758             echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
9759 echo "${ECHO_T}enabled symbols mem debugging" >&6
9760         else
9761             echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
9762 echo "${ECHO_T}enabled $tcl_ok debugging" >&6
9763         fi
9764     fi
9765
9766
9767 #--------------------------------------------------------------------
9768 # Everyone should be linking against the Tcl stub library.  If you
9769 # can't for some reason, remove this definition.  If you aren't using
9770 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
9771 # link against the non-stubbed Tcl library.
9772 #--------------------------------------------------------------------
9773
9774 cat >>confdefs.h <<\_ACEOF
9775 #define USE_TCL_STUBS 1
9776 _ACEOF
9777
9778
9779 cat >>confdefs.h <<\_ACEOF
9780 #define USE_TCL_STUBS 1
9781 _ACEOF
9782
9783
9784 #-------------------------------------------------------------------------
9785 # Check for system header files.
9786 #-------------------------------------------------------------------------
9787
9788 if test "${ac_cv_header_sys_select_h+set}" = set; then
9789   echo "$as_me:$LINENO: checking for sys/select.h" >&5
9790 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6
9791 if test "${ac_cv_header_sys_select_h+set}" = set; then
9792   echo $ECHO_N "(cached) $ECHO_C" >&6
9793 fi
9794 echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5
9795 echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6
9796 else
9797   # Is the header compilable?
9798 echo "$as_me:$LINENO: checking sys/select.h usability" >&5
9799 echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6
9800 cat >conftest.$ac_ext <<_ACEOF
9801 /* confdefs.h.  */
9802 _ACEOF
9803 cat confdefs.h >>conftest.$ac_ext
9804 cat >>conftest.$ac_ext <<_ACEOF
9805 /* end confdefs.h.  */
9806 $ac_includes_default
9807 #include <sys/select.h>
9808 _ACEOF
9809 rm -f conftest.$ac_objext
9810 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9811   (eval $ac_compile) 2>conftest.er1
9812   ac_status=$?
9813   grep -v '^ *+' conftest.er1 >conftest.err
9814   rm -f conftest.er1
9815   cat conftest.err >&5
9816   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817   (exit $ac_status); } &&
9818          { ac_try='test -z "$ac_c_werror_flag"
9819                          || test ! -s conftest.err'
9820   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9821   (eval $ac_try) 2>&5
9822   ac_status=$?
9823   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9824   (exit $ac_status); }; } &&
9825          { ac_try='test -s conftest.$ac_objext'
9826   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9827   (eval $ac_try) 2>&5
9828   ac_status=$?
9829   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9830   (exit $ac_status); }; }; then
9831   ac_header_compiler=yes
9832 else
9833   echo "$as_me: failed program was:" >&5
9834 sed 's/^/| /' conftest.$ac_ext >&5
9835
9836 ac_header_compiler=no
9837 fi
9838 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9839 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9840 echo "${ECHO_T}$ac_header_compiler" >&6
9841
9842 # Is the header present?
9843 echo "$as_me:$LINENO: checking sys/select.h presence" >&5
9844 echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6
9845 cat >conftest.$ac_ext <<_ACEOF
9846 /* confdefs.h.  */
9847 _ACEOF
9848 cat confdefs.h >>conftest.$ac_ext
9849 cat >>conftest.$ac_ext <<_ACEOF
9850 /* end confdefs.h.  */
9851 #include <sys/select.h>
9852 _ACEOF
9853 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9855   ac_status=$?
9856   grep -v '^ *+' conftest.er1 >conftest.err
9857   rm -f conftest.er1
9858   cat conftest.err >&5
9859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860   (exit $ac_status); } >/dev/null; then
9861   if test -s conftest.err; then
9862     ac_cpp_err=$ac_c_preproc_warn_flag
9863     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
9864   else
9865     ac_cpp_err=
9866   fi
9867 else
9868   ac_cpp_err=yes
9869 fi
9870 if test -z "$ac_cpp_err"; then
9871   ac_header_preproc=yes
9872 else
9873   echo "$as_me: failed program was:" >&5
9874 sed 's/^/| /' conftest.$ac_ext >&5
9875
9876   ac_header_preproc=no
9877 fi
9878 rm -f conftest.err conftest.$ac_ext
9879 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9880 echo "${ECHO_T}$ac_header_preproc" >&6
9881
9882 # So?  What about this header?
9883 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9884   yes:no: )
9885     { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5
9886 echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9887     { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the compiler's result" >&5
9888 echo "$as_me: WARNING: sys/select.h: proceeding with the compiler's result" >&2;}
9889     ac_header_preproc=yes
9890     ;;
9891   no:yes:* )
9892     { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5
9893 echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;}
9894     { echo "$as_me:$LINENO: WARNING: sys/select.h:     check for missing prerequisite headers?" >&5
9895 echo "$as_me: WARNING: sys/select.h:     check for missing prerequisite headers?" >&2;}
9896     { echo "$as_me:$LINENO: WARNING: sys/select.h: see the Autoconf documentation" >&5
9897 echo "$as_me: WARNING: sys/select.h: see the Autoconf documentation" >&2;}
9898     { echo "$as_me:$LINENO: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&5
9899 echo "$as_me: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&2;}
9900     { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5
9901 echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;}
9902     { echo "$as_me:$LINENO: WARNING: sys/select.h: in the future, the compiler will take precedence" >&5
9903 echo "$as_me: WARNING: sys/select.h: in the future, the compiler will take precedence" >&2;}
9904     (
9905       cat <<\_ASBOX
9906 ## --------------------------------- ##
9907 ## Report this to the expect lists.  ##
9908 ## --------------------------------- ##
9909 _ASBOX
9910     ) |
9911       sed "s/^/$as_me: WARNING:     /" >&2
9912     ;;
9913 esac
9914 echo "$as_me:$LINENO: checking for sys/select.h" >&5
9915 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6
9916 if test "${ac_cv_header_sys_select_h+set}" = set; then
9917   echo $ECHO_N "(cached) $ECHO_C" >&6
9918 else
9919   ac_cv_header_sys_select_h=$ac_header_preproc
9920 fi
9921 echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5
9922 echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6
9923
9924 fi
9925 if test $ac_cv_header_sys_select_h = yes; then
9926   cat >>confdefs.h <<\_ACEOF
9927 #define HAVE_SYS_SELECT_H 1
9928 _ACEOF
9929
9930 fi
9931
9932
9933 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
9934   echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
9935 echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
9936 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
9937   echo $ECHO_N "(cached) $ECHO_C" >&6
9938 fi
9939 echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
9940 echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
9941 else
9942   # Is the header compilable?
9943 echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
9944 echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
9945 cat >conftest.$ac_ext <<_ACEOF
9946 /* confdefs.h.  */
9947 _ACEOF
9948 cat confdefs.h >>conftest.$ac_ext
9949 cat >>conftest.$ac_ext <<_ACEOF
9950 /* end confdefs.h.  */
9951 $ac_includes_default
9952 #include <sys/sysmacros.h>
9953 _ACEOF
9954 rm -f conftest.$ac_objext
9955 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9956   (eval $ac_compile) 2>conftest.er1
9957   ac_status=$?
9958   grep -v '^ *+' conftest.er1 >conftest.err
9959   rm -f conftest.er1
9960   cat conftest.err >&5
9961   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9962   (exit $ac_status); } &&
9963          { ac_try='test -z "$ac_c_werror_flag"
9964                          || test ! -s conftest.err'
9965   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9966   (eval $ac_try) 2>&5
9967   ac_status=$?
9968   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9969   (exit $ac_status); }; } &&
9970          { ac_try='test -s conftest.$ac_objext'
9971   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9972   (eval $ac_try) 2>&5
9973   ac_status=$?
9974   echo "$as_me:$LINENO: \$? = $ac_status" >&5
9975   (exit $ac_status); }; }; then
9976   ac_header_compiler=yes
9977 else
9978   echo "$as_me: failed program was:" >&5
9979 sed 's/^/| /' conftest.$ac_ext >&5
9980
9981 ac_header_compiler=no
9982 fi
9983 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9984 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9985 echo "${ECHO_T}$ac_header_compiler" >&6
9986
9987 # Is the header present?
9988 echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
9989 echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
9990 cat >conftest.$ac_ext <<_ACEOF
9991 /* confdefs.h.  */
9992 _ACEOF
9993 cat confdefs.h >>conftest.$ac_ext
9994 cat >>conftest.$ac_ext <<_ACEOF
9995 /* end confdefs.h.  */
9996 #include <sys/sysmacros.h>
9997 _ACEOF
9998 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
9999   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10000   ac_status=$?
10001   grep -v '^ *+' conftest.er1 >conftest.err
10002   rm -f conftest.er1
10003   cat conftest.err >&5
10004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10005   (exit $ac_status); } >/dev/null; then
10006   if test -s conftest.err; then
10007     ac_cpp_err=$ac_c_preproc_warn_flag
10008     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10009   else
10010     ac_cpp_err=
10011   fi
10012 else
10013   ac_cpp_err=yes
10014 fi
10015 if test -z "$ac_cpp_err"; then
10016   ac_header_preproc=yes
10017 else
10018   echo "$as_me: failed program was:" >&5
10019 sed 's/^/| /' conftest.$ac_ext >&5
10020
10021   ac_header_preproc=no
10022 fi
10023 rm -f conftest.err conftest.$ac_ext
10024 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10025 echo "${ECHO_T}$ac_header_preproc" >&6
10026
10027 # So?  What about this header?
10028 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10029   yes:no: )
10030     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
10031 echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10032     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
10033 echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
10034     ac_header_preproc=yes
10035     ;;
10036   no:yes:* )
10037     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
10038 echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
10039     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&5
10040 echo "$as_me: WARNING: sys/sysmacros.h:     check for missing prerequisite headers?" >&2;}
10041     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
10042 echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
10043     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&5
10044 echo "$as_me: WARNING: sys/sysmacros.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10045     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
10046 echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
10047     { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
10048 echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
10049     (
10050       cat <<\_ASBOX
10051 ## --------------------------------- ##
10052 ## Report this to the expect lists.  ##
10053 ## --------------------------------- ##
10054 _ASBOX
10055     ) |
10056       sed "s/^/$as_me: WARNING:     /" >&2
10057     ;;
10058 esac
10059 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
10060 echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
10061 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
10062   echo $ECHO_N "(cached) $ECHO_C" >&6
10063 else
10064   ac_cv_header_sys_sysmacros_h=$ac_header_preproc
10065 fi
10066 echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
10067 echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
10068
10069 fi
10070 if test $ac_cv_header_sys_sysmacros_h = yes; then
10071   cat >>confdefs.h <<\_ACEOF
10072 #define HAVE_SYSMACROS_H 1
10073 _ACEOF
10074
10075 fi
10076
10077
10078
10079 # Oddly, some systems have stdarg but don't support prototypes
10080 # Tcl avoids the whole issue by not using stdarg on UNIX at all!
10081
10082
10083 if test "${ac_cv_header_varargs_h+set}" = set; then
10084   echo "$as_me:$LINENO: checking for varargs.h" >&5
10085 echo $ECHO_N "checking for varargs.h... $ECHO_C" >&6
10086 if test "${ac_cv_header_varargs_h+set}" = set; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 fi
10089 echo "$as_me:$LINENO: result: $ac_cv_header_varargs_h" >&5
10090 echo "${ECHO_T}$ac_cv_header_varargs_h" >&6
10091 else
10092   # Is the header compilable?
10093 echo "$as_me:$LINENO: checking varargs.h usability" >&5
10094 echo $ECHO_N "checking varargs.h usability... $ECHO_C" >&6
10095 cat >conftest.$ac_ext <<_ACEOF
10096 /* confdefs.h.  */
10097 _ACEOF
10098 cat confdefs.h >>conftest.$ac_ext
10099 cat >>conftest.$ac_ext <<_ACEOF
10100 /* end confdefs.h.  */
10101 $ac_includes_default
10102 #include <varargs.h>
10103 _ACEOF
10104 rm -f conftest.$ac_objext
10105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10106   (eval $ac_compile) 2>conftest.er1
10107   ac_status=$?
10108   grep -v '^ *+' conftest.er1 >conftest.err
10109   rm -f conftest.er1
10110   cat conftest.err >&5
10111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10112   (exit $ac_status); } &&
10113          { ac_try='test -z "$ac_c_werror_flag"
10114                          || test ! -s conftest.err'
10115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10116   (eval $ac_try) 2>&5
10117   ac_status=$?
10118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119   (exit $ac_status); }; } &&
10120          { ac_try='test -s conftest.$ac_objext'
10121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10122   (eval $ac_try) 2>&5
10123   ac_status=$?
10124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10125   (exit $ac_status); }; }; then
10126   ac_header_compiler=yes
10127 else
10128   echo "$as_me: failed program was:" >&5
10129 sed 's/^/| /' conftest.$ac_ext >&5
10130
10131 ac_header_compiler=no
10132 fi
10133 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10134 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10135 echo "${ECHO_T}$ac_header_compiler" >&6
10136
10137 # Is the header present?
10138 echo "$as_me:$LINENO: checking varargs.h presence" >&5
10139 echo $ECHO_N "checking varargs.h presence... $ECHO_C" >&6
10140 cat >conftest.$ac_ext <<_ACEOF
10141 /* confdefs.h.  */
10142 _ACEOF
10143 cat confdefs.h >>conftest.$ac_ext
10144 cat >>conftest.$ac_ext <<_ACEOF
10145 /* end confdefs.h.  */
10146 #include <varargs.h>
10147 _ACEOF
10148 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10149   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10150   ac_status=$?
10151   grep -v '^ *+' conftest.er1 >conftest.err
10152   rm -f conftest.er1
10153   cat conftest.err >&5
10154   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10155   (exit $ac_status); } >/dev/null; then
10156   if test -s conftest.err; then
10157     ac_cpp_err=$ac_c_preproc_warn_flag
10158     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10159   else
10160     ac_cpp_err=
10161   fi
10162 else
10163   ac_cpp_err=yes
10164 fi
10165 if test -z "$ac_cpp_err"; then
10166   ac_header_preproc=yes
10167 else
10168   echo "$as_me: failed program was:" >&5
10169 sed 's/^/| /' conftest.$ac_ext >&5
10170
10171   ac_header_preproc=no
10172 fi
10173 rm -f conftest.err conftest.$ac_ext
10174 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10175 echo "${ECHO_T}$ac_header_preproc" >&6
10176
10177 # So?  What about this header?
10178 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10179   yes:no: )
10180     { echo "$as_me:$LINENO: WARNING: varargs.h: accepted by the compiler, rejected by the preprocessor!" >&5
10181 echo "$as_me: WARNING: varargs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10182     { echo "$as_me:$LINENO: WARNING: varargs.h: proceeding with the compiler's result" >&5
10183 echo "$as_me: WARNING: varargs.h: proceeding with the compiler's result" >&2;}
10184     ac_header_preproc=yes
10185     ;;
10186   no:yes:* )
10187     { echo "$as_me:$LINENO: WARNING: varargs.h: present but cannot be compiled" >&5
10188 echo "$as_me: WARNING: varargs.h: present but cannot be compiled" >&2;}
10189     { echo "$as_me:$LINENO: WARNING: varargs.h:     check for missing prerequisite headers?" >&5
10190 echo "$as_me: WARNING: varargs.h:     check for missing prerequisite headers?" >&2;}
10191     { echo "$as_me:$LINENO: WARNING: varargs.h: see the Autoconf documentation" >&5
10192 echo "$as_me: WARNING: varargs.h: see the Autoconf documentation" >&2;}
10193     { echo "$as_me:$LINENO: WARNING: varargs.h:     section \"Present But Cannot Be Compiled\"" >&5
10194 echo "$as_me: WARNING: varargs.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10195     { echo "$as_me:$LINENO: WARNING: varargs.h: proceeding with the preprocessor's result" >&5
10196 echo "$as_me: WARNING: varargs.h: proceeding with the preprocessor's result" >&2;}
10197     { echo "$as_me:$LINENO: WARNING: varargs.h: in the future, the compiler will take precedence" >&5
10198 echo "$as_me: WARNING: varargs.h: in the future, the compiler will take precedence" >&2;}
10199     (
10200       cat <<\_ASBOX
10201 ## --------------------------------- ##
10202 ## Report this to the expect lists.  ##
10203 ## --------------------------------- ##
10204 _ASBOX
10205     ) |
10206       sed "s/^/$as_me: WARNING:     /" >&2
10207     ;;
10208 esac
10209 echo "$as_me:$LINENO: checking for varargs.h" >&5
10210 echo $ECHO_N "checking for varargs.h... $ECHO_C" >&6
10211 if test "${ac_cv_header_varargs_h+set}" = set; then
10212   echo $ECHO_N "(cached) $ECHO_C" >&6
10213 else
10214   ac_cv_header_varargs_h=$ac_header_preproc
10215 fi
10216 echo "$as_me:$LINENO: result: $ac_cv_header_varargs_h" >&5
10217 echo "${ECHO_T}$ac_cv_header_varargs_h" >&6
10218
10219 fi
10220 if test $ac_cv_header_varargs_h = yes; then
10221   cat >>confdefs.h <<\_ACEOF
10222 #define HAVE_VARARGS_H 1
10223 _ACEOF
10224
10225 fi
10226
10227
10228
10229 # If no stropts.h, then the svr4 implementation is broken.
10230 # At least it is on my Debian "potato" system. - Rob Savoye
10231
10232 if test "${ac_cv_header_sys_stropts_h+set}" = set; then
10233   echo "$as_me:$LINENO: checking for sys/stropts.h" >&5
10234 echo $ECHO_N "checking for sys/stropts.h... $ECHO_C" >&6
10235 if test "${ac_cv_header_sys_stropts_h+set}" = set; then
10236   echo $ECHO_N "(cached) $ECHO_C" >&6
10237 fi
10238 echo "$as_me:$LINENO: result: $ac_cv_header_sys_stropts_h" >&5
10239 echo "${ECHO_T}$ac_cv_header_sys_stropts_h" >&6
10240 else
10241   # Is the header compilable?
10242 echo "$as_me:$LINENO: checking sys/stropts.h usability" >&5
10243 echo $ECHO_N "checking sys/stropts.h usability... $ECHO_C" >&6
10244 cat >conftest.$ac_ext <<_ACEOF
10245 /* confdefs.h.  */
10246 _ACEOF
10247 cat confdefs.h >>conftest.$ac_ext
10248 cat >>conftest.$ac_ext <<_ACEOF
10249 /* end confdefs.h.  */
10250 $ac_includes_default
10251 #include <sys/stropts.h>
10252 _ACEOF
10253 rm -f conftest.$ac_objext
10254 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10255   (eval $ac_compile) 2>conftest.er1
10256   ac_status=$?
10257   grep -v '^ *+' conftest.er1 >conftest.err
10258   rm -f conftest.er1
10259   cat conftest.err >&5
10260   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10261   (exit $ac_status); } &&
10262          { ac_try='test -z "$ac_c_werror_flag"
10263                          || test ! -s conftest.err'
10264   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10265   (eval $ac_try) 2>&5
10266   ac_status=$?
10267   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10268   (exit $ac_status); }; } &&
10269          { ac_try='test -s conftest.$ac_objext'
10270   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10271   (eval $ac_try) 2>&5
10272   ac_status=$?
10273   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10274   (exit $ac_status); }; }; then
10275   ac_header_compiler=yes
10276 else
10277   echo "$as_me: failed program was:" >&5
10278 sed 's/^/| /' conftest.$ac_ext >&5
10279
10280 ac_header_compiler=no
10281 fi
10282 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10283 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10284 echo "${ECHO_T}$ac_header_compiler" >&6
10285
10286 # Is the header present?
10287 echo "$as_me:$LINENO: checking sys/stropts.h presence" >&5
10288 echo $ECHO_N "checking sys/stropts.h presence... $ECHO_C" >&6
10289 cat >conftest.$ac_ext <<_ACEOF
10290 /* confdefs.h.  */
10291 _ACEOF
10292 cat confdefs.h >>conftest.$ac_ext
10293 cat >>conftest.$ac_ext <<_ACEOF
10294 /* end confdefs.h.  */
10295 #include <sys/stropts.h>
10296 _ACEOF
10297 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10298   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10299   ac_status=$?
10300   grep -v '^ *+' conftest.er1 >conftest.err
10301   rm -f conftest.er1
10302   cat conftest.err >&5
10303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10304   (exit $ac_status); } >/dev/null; then
10305   if test -s conftest.err; then
10306     ac_cpp_err=$ac_c_preproc_warn_flag
10307     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10308   else
10309     ac_cpp_err=
10310   fi
10311 else
10312   ac_cpp_err=yes
10313 fi
10314 if test -z "$ac_cpp_err"; then
10315   ac_header_preproc=yes
10316 else
10317   echo "$as_me: failed program was:" >&5
10318 sed 's/^/| /' conftest.$ac_ext >&5
10319
10320   ac_header_preproc=no
10321 fi
10322 rm -f conftest.err conftest.$ac_ext
10323 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10324 echo "${ECHO_T}$ac_header_preproc" >&6
10325
10326 # So?  What about this header?
10327 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10328   yes:no: )
10329     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: accepted by the compiler, rejected by the preprocessor!" >&5
10330 echo "$as_me: WARNING: sys/stropts.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10331     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: proceeding with the compiler's result" >&5
10332 echo "$as_me: WARNING: sys/stropts.h: proceeding with the compiler's result" >&2;}
10333     ac_header_preproc=yes
10334     ;;
10335   no:yes:* )
10336     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: present but cannot be compiled" >&5
10337 echo "$as_me: WARNING: sys/stropts.h: present but cannot be compiled" >&2;}
10338     { echo "$as_me:$LINENO: WARNING: sys/stropts.h:     check for missing prerequisite headers?" >&5
10339 echo "$as_me: WARNING: sys/stropts.h:     check for missing prerequisite headers?" >&2;}
10340     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: see the Autoconf documentation" >&5
10341 echo "$as_me: WARNING: sys/stropts.h: see the Autoconf documentation" >&2;}
10342     { echo "$as_me:$LINENO: WARNING: sys/stropts.h:     section \"Present But Cannot Be Compiled\"" >&5
10343 echo "$as_me: WARNING: sys/stropts.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10344     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: proceeding with the preprocessor's result" >&5
10345 echo "$as_me: WARNING: sys/stropts.h: proceeding with the preprocessor's result" >&2;}
10346     { echo "$as_me:$LINENO: WARNING: sys/stropts.h: in the future, the compiler will take precedence" >&5
10347 echo "$as_me: WARNING: sys/stropts.h: in the future, the compiler will take precedence" >&2;}
10348     (
10349       cat <<\_ASBOX
10350 ## --------------------------------- ##
10351 ## Report this to the expect lists.  ##
10352 ## --------------------------------- ##
10353 _ASBOX
10354     ) |
10355       sed "s/^/$as_me: WARNING:     /" >&2
10356     ;;
10357 esac
10358 echo "$as_me:$LINENO: checking for sys/stropts.h" >&5
10359 echo $ECHO_N "checking for sys/stropts.h... $ECHO_C" >&6
10360 if test "${ac_cv_header_sys_stropts_h+set}" = set; then
10361   echo $ECHO_N "(cached) $ECHO_C" >&6
10362 else
10363   ac_cv_header_sys_stropts_h=$ac_header_preproc
10364 fi
10365 echo "$as_me:$LINENO: result: $ac_cv_header_sys_stropts_h" >&5
10366 echo "${ECHO_T}$ac_cv_header_sys_stropts_h" >&6
10367
10368 fi
10369 if test $ac_cv_header_sys_stropts_h = yes; then
10370   cat >>confdefs.h <<\_ACEOF
10371 #define HAVE_STROPTS_H 1
10372 _ACEOF
10373
10374 else
10375   svr4_ptys_broken=1
10376 fi
10377
10378
10379 if test "${ac_cv_header_sys_sysconfig_h+set}" = set; then
10380   echo "$as_me:$LINENO: checking for sys/sysconfig.h" >&5
10381 echo $ECHO_N "checking for sys/sysconfig.h... $ECHO_C" >&6
10382 if test "${ac_cv_header_sys_sysconfig_h+set}" = set; then
10383   echo $ECHO_N "(cached) $ECHO_C" >&6
10384 fi
10385 echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysconfig_h" >&5
10386 echo "${ECHO_T}$ac_cv_header_sys_sysconfig_h" >&6
10387 else
10388   # Is the header compilable?
10389 echo "$as_me:$LINENO: checking sys/sysconfig.h usability" >&5
10390 echo $ECHO_N "checking sys/sysconfig.h usability... $ECHO_C" >&6
10391 cat >conftest.$ac_ext <<_ACEOF
10392 /* confdefs.h.  */
10393 _ACEOF
10394 cat confdefs.h >>conftest.$ac_ext
10395 cat >>conftest.$ac_ext <<_ACEOF
10396 /* end confdefs.h.  */
10397 $ac_includes_default
10398 #include <sys/sysconfig.h>
10399 _ACEOF
10400 rm -f conftest.$ac_objext
10401 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10402   (eval $ac_compile) 2>conftest.er1
10403   ac_status=$?
10404   grep -v '^ *+' conftest.er1 >conftest.err
10405   rm -f conftest.er1
10406   cat conftest.err >&5
10407   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10408   (exit $ac_status); } &&
10409          { ac_try='test -z "$ac_c_werror_flag"
10410                          || test ! -s conftest.err'
10411   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10412   (eval $ac_try) 2>&5
10413   ac_status=$?
10414   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10415   (exit $ac_status); }; } &&
10416          { ac_try='test -s conftest.$ac_objext'
10417   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10418   (eval $ac_try) 2>&5
10419   ac_status=$?
10420   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10421   (exit $ac_status); }; }; then
10422   ac_header_compiler=yes
10423 else
10424   echo "$as_me: failed program was:" >&5
10425 sed 's/^/| /' conftest.$ac_ext >&5
10426
10427 ac_header_compiler=no
10428 fi
10429 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10430 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10431 echo "${ECHO_T}$ac_header_compiler" >&6
10432
10433 # Is the header present?
10434 echo "$as_me:$LINENO: checking sys/sysconfig.h presence" >&5
10435 echo $ECHO_N "checking sys/sysconfig.h presence... $ECHO_C" >&6
10436 cat >conftest.$ac_ext <<_ACEOF
10437 /* confdefs.h.  */
10438 _ACEOF
10439 cat confdefs.h >>conftest.$ac_ext
10440 cat >>conftest.$ac_ext <<_ACEOF
10441 /* end confdefs.h.  */
10442 #include <sys/sysconfig.h>
10443 _ACEOF
10444 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10445   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10446   ac_status=$?
10447   grep -v '^ *+' conftest.er1 >conftest.err
10448   rm -f conftest.er1
10449   cat conftest.err >&5
10450   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10451   (exit $ac_status); } >/dev/null; then
10452   if test -s conftest.err; then
10453     ac_cpp_err=$ac_c_preproc_warn_flag
10454     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10455   else
10456     ac_cpp_err=
10457   fi
10458 else
10459   ac_cpp_err=yes
10460 fi
10461 if test -z "$ac_cpp_err"; then
10462   ac_header_preproc=yes
10463 else
10464   echo "$as_me: failed program was:" >&5
10465 sed 's/^/| /' conftest.$ac_ext >&5
10466
10467   ac_header_preproc=no
10468 fi
10469 rm -f conftest.err conftest.$ac_ext
10470 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10471 echo "${ECHO_T}$ac_header_preproc" >&6
10472
10473 # So?  What about this header?
10474 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10475   yes:no: )
10476     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: accepted by the compiler, rejected by the preprocessor!" >&5
10477 echo "$as_me: WARNING: sys/sysconfig.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10478     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: proceeding with the compiler's result" >&5
10479 echo "$as_me: WARNING: sys/sysconfig.h: proceeding with the compiler's result" >&2;}
10480     ac_header_preproc=yes
10481     ;;
10482   no:yes:* )
10483     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: present but cannot be compiled" >&5
10484 echo "$as_me: WARNING: sys/sysconfig.h: present but cannot be compiled" >&2;}
10485     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h:     check for missing prerequisite headers?" >&5
10486 echo "$as_me: WARNING: sys/sysconfig.h:     check for missing prerequisite headers?" >&2;}
10487     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: see the Autoconf documentation" >&5
10488 echo "$as_me: WARNING: sys/sysconfig.h: see the Autoconf documentation" >&2;}
10489     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h:     section \"Present But Cannot Be Compiled\"" >&5
10490 echo "$as_me: WARNING: sys/sysconfig.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10491     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: proceeding with the preprocessor's result" >&5
10492 echo "$as_me: WARNING: sys/sysconfig.h: proceeding with the preprocessor's result" >&2;}
10493     { echo "$as_me:$LINENO: WARNING: sys/sysconfig.h: in the future, the compiler will take precedence" >&5
10494 echo "$as_me: WARNING: sys/sysconfig.h: in the future, the compiler will take precedence" >&2;}
10495     (
10496       cat <<\_ASBOX
10497 ## --------------------------------- ##
10498 ## Report this to the expect lists.  ##
10499 ## --------------------------------- ##
10500 _ASBOX
10501     ) |
10502       sed "s/^/$as_me: WARNING:     /" >&2
10503     ;;
10504 esac
10505 echo "$as_me:$LINENO: checking for sys/sysconfig.h" >&5
10506 echo $ECHO_N "checking for sys/sysconfig.h... $ECHO_C" >&6
10507 if test "${ac_cv_header_sys_sysconfig_h+set}" = set; then
10508   echo $ECHO_N "(cached) $ECHO_C" >&6
10509 else
10510   ac_cv_header_sys_sysconfig_h=$ac_header_preproc
10511 fi
10512 echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysconfig_h" >&5
10513 echo "${ECHO_T}$ac_cv_header_sys_sysconfig_h" >&6
10514
10515 fi
10516 if test $ac_cv_header_sys_sysconfig_h = yes; then
10517   cat >>confdefs.h <<\_ACEOF
10518 #define HAVE_SYSCONF_H 1
10519 _ACEOF
10520
10521 fi
10522
10523
10524 if test "${ac_cv_header_sys_fcntl_h+set}" = set; then
10525   echo "$as_me:$LINENO: checking for sys/fcntl.h" >&5
10526 echo $ECHO_N "checking for sys/fcntl.h... $ECHO_C" >&6
10527 if test "${ac_cv_header_sys_fcntl_h+set}" = set; then
10528   echo $ECHO_N "(cached) $ECHO_C" >&6
10529 fi
10530 echo "$as_me:$LINENO: result: $ac_cv_header_sys_fcntl_h" >&5
10531 echo "${ECHO_T}$ac_cv_header_sys_fcntl_h" >&6
10532 else
10533   # Is the header compilable?
10534 echo "$as_me:$LINENO: checking sys/fcntl.h usability" >&5
10535 echo $ECHO_N "checking sys/fcntl.h usability... $ECHO_C" >&6
10536 cat >conftest.$ac_ext <<_ACEOF
10537 /* confdefs.h.  */
10538 _ACEOF
10539 cat confdefs.h >>conftest.$ac_ext
10540 cat >>conftest.$ac_ext <<_ACEOF
10541 /* end confdefs.h.  */
10542 $ac_includes_default
10543 #include <sys/fcntl.h>
10544 _ACEOF
10545 rm -f conftest.$ac_objext
10546 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10547   (eval $ac_compile) 2>conftest.er1
10548   ac_status=$?
10549   grep -v '^ *+' conftest.er1 >conftest.err
10550   rm -f conftest.er1
10551   cat conftest.err >&5
10552   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10553   (exit $ac_status); } &&
10554          { ac_try='test -z "$ac_c_werror_flag"
10555                          || test ! -s conftest.err'
10556   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10557   (eval $ac_try) 2>&5
10558   ac_status=$?
10559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10560   (exit $ac_status); }; } &&
10561          { ac_try='test -s conftest.$ac_objext'
10562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10566   (exit $ac_status); }; }; then
10567   ac_header_compiler=yes
10568 else
10569   echo "$as_me: failed program was:" >&5
10570 sed 's/^/| /' conftest.$ac_ext >&5
10571
10572 ac_header_compiler=no
10573 fi
10574 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10575 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10576 echo "${ECHO_T}$ac_header_compiler" >&6
10577
10578 # Is the header present?
10579 echo "$as_me:$LINENO: checking sys/fcntl.h presence" >&5
10580 echo $ECHO_N "checking sys/fcntl.h presence... $ECHO_C" >&6
10581 cat >conftest.$ac_ext <<_ACEOF
10582 /* confdefs.h.  */
10583 _ACEOF
10584 cat confdefs.h >>conftest.$ac_ext
10585 cat >>conftest.$ac_ext <<_ACEOF
10586 /* end confdefs.h.  */
10587 #include <sys/fcntl.h>
10588 _ACEOF
10589 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10590   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10591   ac_status=$?
10592   grep -v '^ *+' conftest.er1 >conftest.err
10593   rm -f conftest.er1
10594   cat conftest.err >&5
10595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10596   (exit $ac_status); } >/dev/null; then
10597   if test -s conftest.err; then
10598     ac_cpp_err=$ac_c_preproc_warn_flag
10599     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10600   else
10601     ac_cpp_err=
10602   fi
10603 else
10604   ac_cpp_err=yes
10605 fi
10606 if test -z "$ac_cpp_err"; then
10607   ac_header_preproc=yes
10608 else
10609   echo "$as_me: failed program was:" >&5
10610 sed 's/^/| /' conftest.$ac_ext >&5
10611
10612   ac_header_preproc=no
10613 fi
10614 rm -f conftest.err conftest.$ac_ext
10615 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10616 echo "${ECHO_T}$ac_header_preproc" >&6
10617
10618 # So?  What about this header?
10619 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10620   yes:no: )
10621     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&5
10622 echo "$as_me: WARNING: sys/fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10623     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: proceeding with the compiler's result" >&5
10624 echo "$as_me: WARNING: sys/fcntl.h: proceeding with the compiler's result" >&2;}
10625     ac_header_preproc=yes
10626     ;;
10627   no:yes:* )
10628     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: present but cannot be compiled" >&5
10629 echo "$as_me: WARNING: sys/fcntl.h: present but cannot be compiled" >&2;}
10630     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h:     check for missing prerequisite headers?" >&5
10631 echo "$as_me: WARNING: sys/fcntl.h:     check for missing prerequisite headers?" >&2;}
10632     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: see the Autoconf documentation" >&5
10633 echo "$as_me: WARNING: sys/fcntl.h: see the Autoconf documentation" >&2;}
10634     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h:     section \"Present But Cannot Be Compiled\"" >&5
10635 echo "$as_me: WARNING: sys/fcntl.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10636     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: proceeding with the preprocessor's result" >&5
10637 echo "$as_me: WARNING: sys/fcntl.h: proceeding with the preprocessor's result" >&2;}
10638     { echo "$as_me:$LINENO: WARNING: sys/fcntl.h: in the future, the compiler will take precedence" >&5
10639 echo "$as_me: WARNING: sys/fcntl.h: in the future, the compiler will take precedence" >&2;}
10640     (
10641       cat <<\_ASBOX
10642 ## --------------------------------- ##
10643 ## Report this to the expect lists.  ##
10644 ## --------------------------------- ##
10645 _ASBOX
10646     ) |
10647       sed "s/^/$as_me: WARNING:     /" >&2
10648     ;;
10649 esac
10650 echo "$as_me:$LINENO: checking for sys/fcntl.h" >&5
10651 echo $ECHO_N "checking for sys/fcntl.h... $ECHO_C" >&6
10652 if test "${ac_cv_header_sys_fcntl_h+set}" = set; then
10653   echo $ECHO_N "(cached) $ECHO_C" >&6
10654 else
10655   ac_cv_header_sys_fcntl_h=$ac_header_preproc
10656 fi
10657 echo "$as_me:$LINENO: result: $ac_cv_header_sys_fcntl_h" >&5
10658 echo "${ECHO_T}$ac_cv_header_sys_fcntl_h" >&6
10659
10660 fi
10661 if test $ac_cv_header_sys_fcntl_h = yes; then
10662   cat >>confdefs.h <<\_ACEOF
10663 #define HAVE_SYS_FCNTL_H 1
10664 _ACEOF
10665
10666 fi
10667
10668
10669 if test "${ac_cv_header_sys_ptem_h+set}" = set; then
10670   echo "$as_me:$LINENO: checking for sys/ptem.h" >&5
10671 echo $ECHO_N "checking for sys/ptem.h... $ECHO_C" >&6
10672 if test "${ac_cv_header_sys_ptem_h+set}" = set; then
10673   echo $ECHO_N "(cached) $ECHO_C" >&6
10674 fi
10675 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ptem_h" >&5
10676 echo "${ECHO_T}$ac_cv_header_sys_ptem_h" >&6
10677 else
10678   # Is the header compilable?
10679 echo "$as_me:$LINENO: checking sys/ptem.h usability" >&5
10680 echo $ECHO_N "checking sys/ptem.h usability... $ECHO_C" >&6
10681 cat >conftest.$ac_ext <<_ACEOF
10682 /* confdefs.h.  */
10683 _ACEOF
10684 cat confdefs.h >>conftest.$ac_ext
10685 cat >>conftest.$ac_ext <<_ACEOF
10686 /* end confdefs.h.  */
10687 $ac_includes_default
10688 #include <sys/ptem.h>
10689 _ACEOF
10690 rm -f conftest.$ac_objext
10691 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10692   (eval $ac_compile) 2>conftest.er1
10693   ac_status=$?
10694   grep -v '^ *+' conftest.er1 >conftest.err
10695   rm -f conftest.er1
10696   cat conftest.err >&5
10697   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10698   (exit $ac_status); } &&
10699          { ac_try='test -z "$ac_c_werror_flag"
10700                          || test ! -s conftest.err'
10701   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10702   (eval $ac_try) 2>&5
10703   ac_status=$?
10704   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10705   (exit $ac_status); }; } &&
10706          { ac_try='test -s conftest.$ac_objext'
10707   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10708   (eval $ac_try) 2>&5
10709   ac_status=$?
10710   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10711   (exit $ac_status); }; }; then
10712   ac_header_compiler=yes
10713 else
10714   echo "$as_me: failed program was:" >&5
10715 sed 's/^/| /' conftest.$ac_ext >&5
10716
10717 ac_header_compiler=no
10718 fi
10719 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10720 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10721 echo "${ECHO_T}$ac_header_compiler" >&6
10722
10723 # Is the header present?
10724 echo "$as_me:$LINENO: checking sys/ptem.h presence" >&5
10725 echo $ECHO_N "checking sys/ptem.h presence... $ECHO_C" >&6
10726 cat >conftest.$ac_ext <<_ACEOF
10727 /* confdefs.h.  */
10728 _ACEOF
10729 cat confdefs.h >>conftest.$ac_ext
10730 cat >>conftest.$ac_ext <<_ACEOF
10731 /* end confdefs.h.  */
10732 #include <sys/ptem.h>
10733 _ACEOF
10734 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10735   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10736   ac_status=$?
10737   grep -v '^ *+' conftest.er1 >conftest.err
10738   rm -f conftest.er1
10739   cat conftest.err >&5
10740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741   (exit $ac_status); } >/dev/null; then
10742   if test -s conftest.err; then
10743     ac_cpp_err=$ac_c_preproc_warn_flag
10744     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10745   else
10746     ac_cpp_err=
10747   fi
10748 else
10749   ac_cpp_err=yes
10750 fi
10751 if test -z "$ac_cpp_err"; then
10752   ac_header_preproc=yes
10753 else
10754   echo "$as_me: failed program was:" >&5
10755 sed 's/^/| /' conftest.$ac_ext >&5
10756
10757   ac_header_preproc=no
10758 fi
10759 rm -f conftest.err conftest.$ac_ext
10760 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10761 echo "${ECHO_T}$ac_header_preproc" >&6
10762
10763 # So?  What about this header?
10764 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10765   yes:no: )
10766     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: accepted by the compiler, rejected by the preprocessor!" >&5
10767 echo "$as_me: WARNING: sys/ptem.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10768     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: proceeding with the compiler's result" >&5
10769 echo "$as_me: WARNING: sys/ptem.h: proceeding with the compiler's result" >&2;}
10770     ac_header_preproc=yes
10771     ;;
10772   no:yes:* )
10773     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: present but cannot be compiled" >&5
10774 echo "$as_me: WARNING: sys/ptem.h: present but cannot be compiled" >&2;}
10775     { echo "$as_me:$LINENO: WARNING: sys/ptem.h:     check for missing prerequisite headers?" >&5
10776 echo "$as_me: WARNING: sys/ptem.h:     check for missing prerequisite headers?" >&2;}
10777     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: see the Autoconf documentation" >&5
10778 echo "$as_me: WARNING: sys/ptem.h: see the Autoconf documentation" >&2;}
10779     { echo "$as_me:$LINENO: WARNING: sys/ptem.h:     section \"Present But Cannot Be Compiled\"" >&5
10780 echo "$as_me: WARNING: sys/ptem.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10781     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: proceeding with the preprocessor's result" >&5
10782 echo "$as_me: WARNING: sys/ptem.h: proceeding with the preprocessor's result" >&2;}
10783     { echo "$as_me:$LINENO: WARNING: sys/ptem.h: in the future, the compiler will take precedence" >&5
10784 echo "$as_me: WARNING: sys/ptem.h: in the future, the compiler will take precedence" >&2;}
10785     (
10786       cat <<\_ASBOX
10787 ## --------------------------------- ##
10788 ## Report this to the expect lists.  ##
10789 ## --------------------------------- ##
10790 _ASBOX
10791     ) |
10792       sed "s/^/$as_me: WARNING:     /" >&2
10793     ;;
10794 esac
10795 echo "$as_me:$LINENO: checking for sys/ptem.h" >&5
10796 echo $ECHO_N "checking for sys/ptem.h... $ECHO_C" >&6
10797 if test "${ac_cv_header_sys_ptem_h+set}" = set; then
10798   echo $ECHO_N "(cached) $ECHO_C" >&6
10799 else
10800   ac_cv_header_sys_ptem_h=$ac_header_preproc
10801 fi
10802 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ptem_h" >&5
10803 echo "${ECHO_T}$ac_cv_header_sys_ptem_h" >&6
10804
10805 fi
10806 if test $ac_cv_header_sys_ptem_h = yes; then
10807   cat >>confdefs.h <<\_ACEOF
10808 #define HAVE_SYS_PTEM_H 1
10809 _ACEOF
10810
10811 fi
10812
10813
10814 if test "${ac_cv_header_sys_strredir_h+set}" = set; then
10815   echo "$as_me:$LINENO: checking for sys/strredir.h" >&5
10816 echo $ECHO_N "checking for sys/strredir.h... $ECHO_C" >&6
10817 if test "${ac_cv_header_sys_strredir_h+set}" = set; then
10818   echo $ECHO_N "(cached) $ECHO_C" >&6
10819 fi
10820 echo "$as_me:$LINENO: result: $ac_cv_header_sys_strredir_h" >&5
10821 echo "${ECHO_T}$ac_cv_header_sys_strredir_h" >&6
10822 else
10823   # Is the header compilable?
10824 echo "$as_me:$LINENO: checking sys/strredir.h usability" >&5
10825 echo $ECHO_N "checking sys/strredir.h usability... $ECHO_C" >&6
10826 cat >conftest.$ac_ext <<_ACEOF
10827 /* confdefs.h.  */
10828 _ACEOF
10829 cat confdefs.h >>conftest.$ac_ext
10830 cat >>conftest.$ac_ext <<_ACEOF
10831 /* end confdefs.h.  */
10832 $ac_includes_default
10833 #include <sys/strredir.h>
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>conftest.er1
10838   ac_status=$?
10839   grep -v '^ *+' conftest.er1 >conftest.err
10840   rm -f conftest.er1
10841   cat conftest.err >&5
10842   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10843   (exit $ac_status); } &&
10844          { ac_try='test -z "$ac_c_werror_flag"
10845                          || test ! -s conftest.err'
10846   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850   (exit $ac_status); }; } &&
10851          { ac_try='test -s conftest.$ac_objext'
10852   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856   (exit $ac_status); }; }; then
10857   ac_header_compiler=yes
10858 else
10859   echo "$as_me: failed program was:" >&5
10860 sed 's/^/| /' conftest.$ac_ext >&5
10861
10862 ac_header_compiler=no
10863 fi
10864 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10865 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10866 echo "${ECHO_T}$ac_header_compiler" >&6
10867
10868 # Is the header present?
10869 echo "$as_me:$LINENO: checking sys/strredir.h presence" >&5
10870 echo $ECHO_N "checking sys/strredir.h presence... $ECHO_C" >&6
10871 cat >conftest.$ac_ext <<_ACEOF
10872 /* confdefs.h.  */
10873 _ACEOF
10874 cat confdefs.h >>conftest.$ac_ext
10875 cat >>conftest.$ac_ext <<_ACEOF
10876 /* end confdefs.h.  */
10877 #include <sys/strredir.h>
10878 _ACEOF
10879 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10881   ac_status=$?
10882   grep -v '^ *+' conftest.er1 >conftest.err
10883   rm -f conftest.er1
10884   cat conftest.err >&5
10885   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10886   (exit $ac_status); } >/dev/null; then
10887   if test -s conftest.err; then
10888     ac_cpp_err=$ac_c_preproc_warn_flag
10889     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
10890   else
10891     ac_cpp_err=
10892   fi
10893 else
10894   ac_cpp_err=yes
10895 fi
10896 if test -z "$ac_cpp_err"; then
10897   ac_header_preproc=yes
10898 else
10899   echo "$as_me: failed program was:" >&5
10900 sed 's/^/| /' conftest.$ac_ext >&5
10901
10902   ac_header_preproc=no
10903 fi
10904 rm -f conftest.err conftest.$ac_ext
10905 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10906 echo "${ECHO_T}$ac_header_preproc" >&6
10907
10908 # So?  What about this header?
10909 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10910   yes:no: )
10911     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: accepted by the compiler, rejected by the preprocessor!" >&5
10912 echo "$as_me: WARNING: sys/strredir.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
10913     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: proceeding with the compiler's result" >&5
10914 echo "$as_me: WARNING: sys/strredir.h: proceeding with the compiler's result" >&2;}
10915     ac_header_preproc=yes
10916     ;;
10917   no:yes:* )
10918     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: present but cannot be compiled" >&5
10919 echo "$as_me: WARNING: sys/strredir.h: present but cannot be compiled" >&2;}
10920     { echo "$as_me:$LINENO: WARNING: sys/strredir.h:     check for missing prerequisite headers?" >&5
10921 echo "$as_me: WARNING: sys/strredir.h:     check for missing prerequisite headers?" >&2;}
10922     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: see the Autoconf documentation" >&5
10923 echo "$as_me: WARNING: sys/strredir.h: see the Autoconf documentation" >&2;}
10924     { echo "$as_me:$LINENO: WARNING: sys/strredir.h:     section \"Present But Cannot Be Compiled\"" >&5
10925 echo "$as_me: WARNING: sys/strredir.h:     section \"Present But Cannot Be Compiled\"" >&2;}
10926     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: proceeding with the preprocessor's result" >&5
10927 echo "$as_me: WARNING: sys/strredir.h: proceeding with the preprocessor's result" >&2;}
10928     { echo "$as_me:$LINENO: WARNING: sys/strredir.h: in the future, the compiler will take precedence" >&5
10929 echo "$as_me: WARNING: sys/strredir.h: in the future, the compiler will take precedence" >&2;}
10930     (
10931       cat <<\_ASBOX
10932 ## --------------------------------- ##
10933 ## Report this to the expect lists.  ##
10934 ## --------------------------------- ##
10935 _ASBOX
10936     ) |
10937       sed "s/^/$as_me: WARNING:     /" >&2
10938     ;;
10939 esac
10940 echo "$as_me:$LINENO: checking for sys/strredir.h" >&5
10941 echo $ECHO_N "checking for sys/strredir.h... $ECHO_C" >&6
10942 if test "${ac_cv_header_sys_strredir_h+set}" = set; then
10943   echo $ECHO_N "(cached) $ECHO_C" >&6
10944 else
10945   ac_cv_header_sys_strredir_h=$ac_header_preproc
10946 fi
10947 echo "$as_me:$LINENO: result: $ac_cv_header_sys_strredir_h" >&5
10948 echo "${ECHO_T}$ac_cv_header_sys_strredir_h" >&6
10949
10950 fi
10951 if test $ac_cv_header_sys_strredir_h = yes; then
10952   cat >>confdefs.h <<\_ACEOF
10953 #define HAVE_STRREDIR_H 1
10954 _ACEOF
10955
10956 fi
10957
10958
10959 if test "${ac_cv_header_sys_strpty_h+set}" = set; then
10960   echo "$as_me:$LINENO: checking for sys/strpty.h" >&5
10961 echo $ECHO_N "checking for sys/strpty.h... $ECHO_C" >&6
10962 if test "${ac_cv_header_sys_strpty_h+set}" = set; then
10963   echo $ECHO_N "(cached) $ECHO_C" >&6
10964 fi
10965 echo "$as_me:$LINENO: result: $ac_cv_header_sys_strpty_h" >&5
10966 echo "${ECHO_T}$ac_cv_header_sys_strpty_h" >&6
10967 else
10968   # Is the header compilable?
10969 echo "$as_me:$LINENO: checking sys/strpty.h usability" >&5
10970 echo $ECHO_N "checking sys/strpty.h usability... $ECHO_C" >&6
10971 cat >conftest.$ac_ext <<_ACEOF
10972 /* confdefs.h.  */
10973 _ACEOF
10974 cat confdefs.h >>conftest.$ac_ext
10975 cat >>conftest.$ac_ext <<_ACEOF
10976 /* end confdefs.h.  */
10977 $ac_includes_default
10978 #include <sys/strpty.h>
10979 _ACEOF
10980 rm -f conftest.$ac_objext
10981 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10982   (eval $ac_compile) 2>conftest.er1
10983   ac_status=$?
10984   grep -v '^ *+' conftest.er1 >conftest.err
10985   rm -f conftest.er1
10986   cat conftest.err >&5
10987   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10988   (exit $ac_status); } &&
10989          { ac_try='test -z "$ac_c_werror_flag"
10990                          || test ! -s conftest.err'
10991   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10992   (eval $ac_try) 2>&5
10993   ac_status=$?
10994   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10995   (exit $ac_status); }; } &&
10996          { ac_try='test -s conftest.$ac_objext'
10997   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10998   (eval $ac_try) 2>&5
10999   ac_status=$?
11000   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11001   (exit $ac_status); }; }; then
11002   ac_header_compiler=yes
11003 else
11004   echo "$as_me: failed program was:" >&5
11005 sed 's/^/| /' conftest.$ac_ext >&5
11006
11007 ac_header_compiler=no
11008 fi
11009 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11010 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11011 echo "${ECHO_T}$ac_header_compiler" >&6
11012
11013 # Is the header present?
11014 echo "$as_me:$LINENO: checking sys/strpty.h presence" >&5
11015 echo $ECHO_N "checking sys/strpty.h presence... $ECHO_C" >&6
11016 cat >conftest.$ac_ext <<_ACEOF
11017 /* confdefs.h.  */
11018 _ACEOF
11019 cat confdefs.h >>conftest.$ac_ext
11020 cat >>conftest.$ac_ext <<_ACEOF
11021 /* end confdefs.h.  */
11022 #include <sys/strpty.h>
11023 _ACEOF
11024 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11025   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11026   ac_status=$?
11027   grep -v '^ *+' conftest.er1 >conftest.err
11028   rm -f conftest.er1
11029   cat conftest.err >&5
11030   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11031   (exit $ac_status); } >/dev/null; then
11032   if test -s conftest.err; then
11033     ac_cpp_err=$ac_c_preproc_warn_flag
11034     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11035   else
11036     ac_cpp_err=
11037   fi
11038 else
11039   ac_cpp_err=yes
11040 fi
11041 if test -z "$ac_cpp_err"; then
11042   ac_header_preproc=yes
11043 else
11044   echo "$as_me: failed program was:" >&5
11045 sed 's/^/| /' conftest.$ac_ext >&5
11046
11047   ac_header_preproc=no
11048 fi
11049 rm -f conftest.err conftest.$ac_ext
11050 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11051 echo "${ECHO_T}$ac_header_preproc" >&6
11052
11053 # So?  What about this header?
11054 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11055   yes:no: )
11056     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: accepted by the compiler, rejected by the preprocessor!" >&5
11057 echo "$as_me: WARNING: sys/strpty.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11058     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: proceeding with the compiler's result" >&5
11059 echo "$as_me: WARNING: sys/strpty.h: proceeding with the compiler's result" >&2;}
11060     ac_header_preproc=yes
11061     ;;
11062   no:yes:* )
11063     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: present but cannot be compiled" >&5
11064 echo "$as_me: WARNING: sys/strpty.h: present but cannot be compiled" >&2;}
11065     { echo "$as_me:$LINENO: WARNING: sys/strpty.h:     check for missing prerequisite headers?" >&5
11066 echo "$as_me: WARNING: sys/strpty.h:     check for missing prerequisite headers?" >&2;}
11067     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: see the Autoconf documentation" >&5
11068 echo "$as_me: WARNING: sys/strpty.h: see the Autoconf documentation" >&2;}
11069     { echo "$as_me:$LINENO: WARNING: sys/strpty.h:     section \"Present But Cannot Be Compiled\"" >&5
11070 echo "$as_me: WARNING: sys/strpty.h:     section \"Present But Cannot Be Compiled\"" >&2;}
11071     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: proceeding with the preprocessor's result" >&5
11072 echo "$as_me: WARNING: sys/strpty.h: proceeding with the preprocessor's result" >&2;}
11073     { echo "$as_me:$LINENO: WARNING: sys/strpty.h: in the future, the compiler will take precedence" >&5
11074 echo "$as_me: WARNING: sys/strpty.h: in the future, the compiler will take precedence" >&2;}
11075     (
11076       cat <<\_ASBOX
11077 ## --------------------------------- ##
11078 ## Report this to the expect lists.  ##
11079 ## --------------------------------- ##
11080 _ASBOX
11081     ) |
11082       sed "s/^/$as_me: WARNING:     /" >&2
11083     ;;
11084 esac
11085 echo "$as_me:$LINENO: checking for sys/strpty.h" >&5
11086 echo $ECHO_N "checking for sys/strpty.h... $ECHO_C" >&6
11087 if test "${ac_cv_header_sys_strpty_h+set}" = set; then
11088   echo $ECHO_N "(cached) $ECHO_C" >&6
11089 else
11090   ac_cv_header_sys_strpty_h=$ac_header_preproc
11091 fi
11092 echo "$as_me:$LINENO: result: $ac_cv_header_sys_strpty_h" >&5
11093 echo "${ECHO_T}$ac_cv_header_sys_strpty_h" >&6
11094
11095 fi
11096 if test $ac_cv_header_sys_strpty_h = yes; then
11097   cat >>confdefs.h <<\_ACEOF
11098 #define HAVE_STRPTY_H 1
11099 _ACEOF
11100
11101 fi
11102
11103
11104
11105 echo "$as_me:$LINENO: checking for sys/bsdtypes.h" >&5
11106 echo $ECHO_N "checking for sys/bsdtypes.h... $ECHO_C" >&6
11107 if test "ISC_${ISC}" = "ISC_1"   ;    then
11108    echo "$as_me:$LINENO: result: yes" >&5
11109 echo "${ECHO_T}yes" >&6
11110    # if on ISC 1, we need <sys/bsdtypes.h> to get FD_SET macros
11111
11112 for ac_header in sys/bsdtypes.h
11113 do
11114 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11115 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11116   echo "$as_me:$LINENO: checking for $ac_header" >&5
11117 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11118 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11119   echo $ECHO_N "(cached) $ECHO_C" >&6
11120 fi
11121 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11122 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11123 else
11124   # Is the header compilable?
11125 echo "$as_me:$LINENO: checking $ac_header usability" >&5
11126 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11127 cat >conftest.$ac_ext <<_ACEOF
11128 /* confdefs.h.  */
11129 _ACEOF
11130 cat confdefs.h >>conftest.$ac_ext
11131 cat >>conftest.$ac_ext <<_ACEOF
11132 /* end confdefs.h.  */
11133 $ac_includes_default
11134 #include <$ac_header>
11135 _ACEOF
11136 rm -f conftest.$ac_objext
11137 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11138   (eval $ac_compile) 2>conftest.er1
11139   ac_status=$?
11140   grep -v '^ *+' conftest.er1 >conftest.err
11141   rm -f conftest.er1
11142   cat conftest.err >&5
11143   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11144   (exit $ac_status); } &&
11145          { ac_try='test -z "$ac_c_werror_flag"
11146                          || test ! -s conftest.err'
11147   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11148   (eval $ac_try) 2>&5
11149   ac_status=$?
11150   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11151   (exit $ac_status); }; } &&
11152          { ac_try='test -s conftest.$ac_objext'
11153   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11154   (eval $ac_try) 2>&5
11155   ac_status=$?
11156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11157   (exit $ac_status); }; }; then
11158   ac_header_compiler=yes
11159 else
11160   echo "$as_me: failed program was:" >&5
11161 sed 's/^/| /' conftest.$ac_ext >&5
11162
11163 ac_header_compiler=no
11164 fi
11165 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11166 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11167 echo "${ECHO_T}$ac_header_compiler" >&6
11168
11169 # Is the header present?
11170 echo "$as_me:$LINENO: checking $ac_header presence" >&5
11171 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11172 cat >conftest.$ac_ext <<_ACEOF
11173 /* confdefs.h.  */
11174 _ACEOF
11175 cat confdefs.h >>conftest.$ac_ext
11176 cat >>conftest.$ac_ext <<_ACEOF
11177 /* end confdefs.h.  */
11178 #include <$ac_header>
11179 _ACEOF
11180 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11181   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11182   ac_status=$?
11183   grep -v '^ *+' conftest.er1 >conftest.err
11184   rm -f conftest.er1
11185   cat conftest.err >&5
11186   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11187   (exit $ac_status); } >/dev/null; then
11188   if test -s conftest.err; then
11189     ac_cpp_err=$ac_c_preproc_warn_flag
11190     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11191   else
11192     ac_cpp_err=
11193   fi
11194 else
11195   ac_cpp_err=yes
11196 fi
11197 if test -z "$ac_cpp_err"; then
11198   ac_header_preproc=yes
11199 else
11200   echo "$as_me: failed program was:" >&5
11201 sed 's/^/| /' conftest.$ac_ext >&5
11202
11203   ac_header_preproc=no
11204 fi
11205 rm -f conftest.err conftest.$ac_ext
11206 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11207 echo "${ECHO_T}$ac_header_preproc" >&6
11208
11209 # So?  What about this header?
11210 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11211   yes:no: )
11212     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11213 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11214     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11215 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11216     ac_header_preproc=yes
11217     ;;
11218   no:yes:* )
11219     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11220 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11221     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11222 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11223     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11224 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11225     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11226 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11227     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11228 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11229     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11230 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11231     (
11232       cat <<\_ASBOX
11233 ## --------------------------------- ##
11234 ## Report this to the expect lists.  ##
11235 ## --------------------------------- ##
11236 _ASBOX
11237     ) |
11238       sed "s/^/$as_me: WARNING:     /" >&2
11239     ;;
11240 esac
11241 echo "$as_me:$LINENO: checking for $ac_header" >&5
11242 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11243 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11244   echo $ECHO_N "(cached) $ECHO_C" >&6
11245 else
11246   eval "$as_ac_Header=\$ac_header_preproc"
11247 fi
11248 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11249 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11250
11251 fi
11252 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11253   cat >>confdefs.h <<_ACEOF
11254 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11255 _ACEOF
11256
11257 fi
11258
11259 done
11260
11261 else
11262    echo "$as_me:$LINENO: result: no" >&5
11263 echo "${ECHO_T}no" >&6
11264 fi
11265
11266 #-------------------------------------------------------------------------
11267 # What type do signals return?
11268 #-------------------------------------------------------------------------
11269
11270 echo "$as_me:$LINENO: checking return type of signal handlers" >&5
11271 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11272 if test "${ac_cv_type_signal+set}" = set; then
11273   echo $ECHO_N "(cached) $ECHO_C" >&6
11274 else
11275   cat >conftest.$ac_ext <<_ACEOF
11276 /* confdefs.h.  */
11277 _ACEOF
11278 cat confdefs.h >>conftest.$ac_ext
11279 cat >>conftest.$ac_ext <<_ACEOF
11280 /* end confdefs.h.  */
11281 #include <sys/types.h>
11282 #include <signal.h>
11283 #ifdef signal
11284 # undef signal
11285 #endif
11286 #ifdef __cplusplus
11287 extern "C" void (*signal (int, void (*)(int)))(int);
11288 #else
11289 void (*signal ()) ();
11290 #endif
11291
11292 int
11293 main ()
11294 {
11295 int i;
11296   ;
11297   return 0;
11298 }
11299 _ACEOF
11300 rm -f conftest.$ac_objext
11301 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11302   (eval $ac_compile) 2>conftest.er1
11303   ac_status=$?
11304   grep -v '^ *+' conftest.er1 >conftest.err
11305   rm -f conftest.er1
11306   cat conftest.err >&5
11307   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11308   (exit $ac_status); } &&
11309          { ac_try='test -z "$ac_c_werror_flag"
11310                          || test ! -s conftest.err'
11311   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11312   (eval $ac_try) 2>&5
11313   ac_status=$?
11314   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11315   (exit $ac_status); }; } &&
11316          { ac_try='test -s conftest.$ac_objext'
11317   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11318   (eval $ac_try) 2>&5
11319   ac_status=$?
11320   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11321   (exit $ac_status); }; }; then
11322   ac_cv_type_signal=void
11323 else
11324   echo "$as_me: failed program was:" >&5
11325 sed 's/^/| /' conftest.$ac_ext >&5
11326
11327 ac_cv_type_signal=int
11328 fi
11329 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11330 fi
11331 echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
11332 echo "${ECHO_T}$ac_cv_type_signal" >&6
11333
11334 cat >>confdefs.h <<_ACEOF
11335 #define RETSIGTYPE $ac_cv_type_signal
11336 _ACEOF
11337
11338
11339
11340 #-------------------------------------------------------------------------
11341 #       Find out all about time handling differences.
11342 #-------------------------------------------------------------------------
11343
11344 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
11345 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
11346 if test "${ac_cv_struct_tm+set}" = set; then
11347   echo $ECHO_N "(cached) $ECHO_C" >&6
11348 else
11349   cat >conftest.$ac_ext <<_ACEOF
11350 /* confdefs.h.  */
11351 _ACEOF
11352 cat confdefs.h >>conftest.$ac_ext
11353 cat >>conftest.$ac_ext <<_ACEOF
11354 /* end confdefs.h.  */
11355 #include <sys/types.h>
11356 #include <time.h>
11357
11358 int
11359 main ()
11360 {
11361 struct tm *tp; tp->tm_sec;
11362   ;
11363   return 0;
11364 }
11365 _ACEOF
11366 rm -f conftest.$ac_objext
11367 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11368   (eval $ac_compile) 2>conftest.er1
11369   ac_status=$?
11370   grep -v '^ *+' conftest.er1 >conftest.err
11371   rm -f conftest.er1
11372   cat conftest.err >&5
11373   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11374   (exit $ac_status); } &&
11375          { ac_try='test -z "$ac_c_werror_flag"
11376                          || test ! -s conftest.err'
11377   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11378   (eval $ac_try) 2>&5
11379   ac_status=$?
11380   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11381   (exit $ac_status); }; } &&
11382          { ac_try='test -s conftest.$ac_objext'
11383   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11384   (eval $ac_try) 2>&5
11385   ac_status=$?
11386   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11387   (exit $ac_status); }; }; then
11388   ac_cv_struct_tm=time.h
11389 else
11390   echo "$as_me: failed program was:" >&5
11391 sed 's/^/| /' conftest.$ac_ext >&5
11392
11393 ac_cv_struct_tm=sys/time.h
11394 fi
11395 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11396 fi
11397 echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
11398 echo "${ECHO_T}$ac_cv_struct_tm" >&6
11399 if test $ac_cv_struct_tm = sys/time.h; then
11400
11401 cat >>confdefs.h <<\_ACEOF
11402 #define TM_IN_SYS_TIME 1
11403 _ACEOF
11404
11405 fi
11406
11407
11408
11409 for ac_header in sys/time.h
11410 do
11411 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11413   echo "$as_me:$LINENO: checking for $ac_header" >&5
11414 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11415 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11416   echo $ECHO_N "(cached) $ECHO_C" >&6
11417 fi
11418 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11419 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11420 else
11421   # Is the header compilable?
11422 echo "$as_me:$LINENO: checking $ac_header usability" >&5
11423 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
11424 cat >conftest.$ac_ext <<_ACEOF
11425 /* confdefs.h.  */
11426 _ACEOF
11427 cat confdefs.h >>conftest.$ac_ext
11428 cat >>conftest.$ac_ext <<_ACEOF
11429 /* end confdefs.h.  */
11430 $ac_includes_default
11431 #include <$ac_header>
11432 _ACEOF
11433 rm -f conftest.$ac_objext
11434 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11435   (eval $ac_compile) 2>conftest.er1
11436   ac_status=$?
11437   grep -v '^ *+' conftest.er1 >conftest.err
11438   rm -f conftest.er1
11439   cat conftest.err >&5
11440   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11441   (exit $ac_status); } &&
11442          { ac_try='test -z "$ac_c_werror_flag"
11443                          || test ! -s conftest.err'
11444   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11445   (eval $ac_try) 2>&5
11446   ac_status=$?
11447   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11448   (exit $ac_status); }; } &&
11449          { ac_try='test -s conftest.$ac_objext'
11450   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11451   (eval $ac_try) 2>&5
11452   ac_status=$?
11453   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11454   (exit $ac_status); }; }; then
11455   ac_header_compiler=yes
11456 else
11457   echo "$as_me: failed program was:" >&5
11458 sed 's/^/| /' conftest.$ac_ext >&5
11459
11460 ac_header_compiler=no
11461 fi
11462 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11463 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11464 echo "${ECHO_T}$ac_header_compiler" >&6
11465
11466 # Is the header present?
11467 echo "$as_me:$LINENO: checking $ac_header presence" >&5
11468 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
11469 cat >conftest.$ac_ext <<_ACEOF
11470 /* confdefs.h.  */
11471 _ACEOF
11472 cat confdefs.h >>conftest.$ac_ext
11473 cat >>conftest.$ac_ext <<_ACEOF
11474 /* end confdefs.h.  */
11475 #include <$ac_header>
11476 _ACEOF
11477 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11478   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11479   ac_status=$?
11480   grep -v '^ *+' conftest.er1 >conftest.err
11481   rm -f conftest.er1
11482   cat conftest.err >&5
11483   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11484   (exit $ac_status); } >/dev/null; then
11485   if test -s conftest.err; then
11486     ac_cpp_err=$ac_c_preproc_warn_flag
11487     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
11488   else
11489     ac_cpp_err=
11490   fi
11491 else
11492   ac_cpp_err=yes
11493 fi
11494 if test -z "$ac_cpp_err"; then
11495   ac_header_preproc=yes
11496 else
11497   echo "$as_me: failed program was:" >&5
11498 sed 's/^/| /' conftest.$ac_ext >&5
11499
11500   ac_header_preproc=no
11501 fi
11502 rm -f conftest.err conftest.$ac_ext
11503 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11504 echo "${ECHO_T}$ac_header_preproc" >&6
11505
11506 # So?  What about this header?
11507 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11508   yes:no: )
11509     { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11510 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
11511     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11512 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11513     ac_header_preproc=yes
11514     ;;
11515   no:yes:* )
11516     { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11517 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
11518     { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
11519 echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
11520     { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11521 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11522     { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
11523 echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
11524     { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11525 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
11526     { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11527 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
11528     (
11529       cat <<\_ASBOX
11530 ## --------------------------------- ##
11531 ## Report this to the expect lists.  ##
11532 ## --------------------------------- ##
11533 _ASBOX
11534     ) |
11535       sed "s/^/$as_me: WARNING:     /" >&2
11536     ;;
11537 esac
11538 echo "$as_me:$LINENO: checking for $ac_header" >&5
11539 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11540 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11541   echo $ECHO_N "(cached) $ECHO_C" >&6
11542 else
11543   eval "$as_ac_Header=\$ac_header_preproc"
11544 fi
11545 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
11546 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11547
11548 fi
11549 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11550   cat >>confdefs.h <<_ACEOF
11551 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11552 _ACEOF
11553
11554 fi
11555
11556 done
11557
11558     echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
11559 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11560 if test "${ac_cv_header_time+set}" = set; then
11561   echo $ECHO_N "(cached) $ECHO_C" >&6
11562 else
11563   cat >conftest.$ac_ext <<_ACEOF
11564 /* confdefs.h.  */
11565 _ACEOF
11566 cat confdefs.h >>conftest.$ac_ext
11567 cat >>conftest.$ac_ext <<_ACEOF
11568 /* end confdefs.h.  */
11569 #include <sys/types.h>
11570 #include <sys/time.h>
11571 #include <time.h>
11572
11573 int
11574 main ()
11575 {
11576 if ((struct tm *) 0)
11577 return 0;
11578   ;
11579   return 0;
11580 }
11581 _ACEOF
11582 rm -f conftest.$ac_objext
11583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11584   (eval $ac_compile) 2>conftest.er1
11585   ac_status=$?
11586   grep -v '^ *+' conftest.er1 >conftest.err
11587   rm -f conftest.er1
11588   cat conftest.err >&5
11589   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11590   (exit $ac_status); } &&
11591          { ac_try='test -z "$ac_c_werror_flag"
11592                          || test ! -s conftest.err'
11593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11594   (eval $ac_try) 2>&5
11595   ac_status=$?
11596   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11597   (exit $ac_status); }; } &&
11598          { ac_try='test -s conftest.$ac_objext'
11599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11600   (eval $ac_try) 2>&5
11601   ac_status=$?
11602   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11603   (exit $ac_status); }; }; then
11604   ac_cv_header_time=yes
11605 else
11606   echo "$as_me: failed program was:" >&5
11607 sed 's/^/| /' conftest.$ac_ext >&5
11608
11609 ac_cv_header_time=no
11610 fi
11611 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11612 fi
11613 echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
11614 echo "${ECHO_T}$ac_cv_header_time" >&6
11615 if test $ac_cv_header_time = yes; then
11616
11617 cat >>confdefs.h <<\_ACEOF
11618 #define TIME_WITH_SYS_TIME 1
11619 _ACEOF
11620
11621 fi
11622
11623     echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
11624 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
11625 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
11626   echo $ECHO_N "(cached) $ECHO_C" >&6
11627 else
11628   cat >conftest.$ac_ext <<_ACEOF
11629 /* confdefs.h.  */
11630 _ACEOF
11631 cat confdefs.h >>conftest.$ac_ext
11632 cat >>conftest.$ac_ext <<_ACEOF
11633 /* end confdefs.h.  */
11634 #include <sys/types.h>
11635 #include <$ac_cv_struct_tm>
11636
11637
11638 int
11639 main ()
11640 {
11641 static struct tm ac_aggr;
11642 if (ac_aggr.tm_zone)
11643 return 0;
11644   ;
11645   return 0;
11646 }
11647 _ACEOF
11648 rm -f conftest.$ac_objext
11649 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11650   (eval $ac_compile) 2>conftest.er1
11651   ac_status=$?
11652   grep -v '^ *+' conftest.er1 >conftest.err
11653   rm -f conftest.er1
11654   cat conftest.err >&5
11655   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11656   (exit $ac_status); } &&
11657          { ac_try='test -z "$ac_c_werror_flag"
11658                          || test ! -s conftest.err'
11659   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11660   (eval $ac_try) 2>&5
11661   ac_status=$?
11662   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11663   (exit $ac_status); }; } &&
11664          { ac_try='test -s conftest.$ac_objext'
11665   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11666   (eval $ac_try) 2>&5
11667   ac_status=$?
11668   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11669   (exit $ac_status); }; }; then
11670   ac_cv_member_struct_tm_tm_zone=yes
11671 else
11672   echo "$as_me: failed program was:" >&5
11673 sed 's/^/| /' conftest.$ac_ext >&5
11674
11675 cat >conftest.$ac_ext <<_ACEOF
11676 /* confdefs.h.  */
11677 _ACEOF
11678 cat confdefs.h >>conftest.$ac_ext
11679 cat >>conftest.$ac_ext <<_ACEOF
11680 /* end confdefs.h.  */
11681 #include <sys/types.h>
11682 #include <$ac_cv_struct_tm>
11683
11684
11685 int
11686 main ()
11687 {
11688 static struct tm ac_aggr;
11689 if (sizeof ac_aggr.tm_zone)
11690 return 0;
11691   ;
11692   return 0;
11693 }
11694 _ACEOF
11695 rm -f conftest.$ac_objext
11696 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11697   (eval $ac_compile) 2>conftest.er1
11698   ac_status=$?
11699   grep -v '^ *+' conftest.er1 >conftest.err
11700   rm -f conftest.er1
11701   cat conftest.err >&5
11702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11703   (exit $ac_status); } &&
11704          { ac_try='test -z "$ac_c_werror_flag"
11705                          || test ! -s conftest.err'
11706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11707   (eval $ac_try) 2>&5
11708   ac_status=$?
11709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710   (exit $ac_status); }; } &&
11711          { ac_try='test -s conftest.$ac_objext'
11712   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11713   (eval $ac_try) 2>&5
11714   ac_status=$?
11715   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11716   (exit $ac_status); }; }; then
11717   ac_cv_member_struct_tm_tm_zone=yes
11718 else
11719   echo "$as_me: failed program was:" >&5
11720 sed 's/^/| /' conftest.$ac_ext >&5
11721
11722 ac_cv_member_struct_tm_tm_zone=no
11723 fi
11724 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11725 fi
11726 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11727 fi
11728 echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
11729 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
11730 if test $ac_cv_member_struct_tm_tm_zone = yes; then
11731
11732 cat >>confdefs.h <<_ACEOF
11733 #define HAVE_STRUCT_TM_TM_ZONE 1
11734 _ACEOF
11735
11736
11737 fi
11738
11739 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11740
11741 cat >>confdefs.h <<\_ACEOF
11742 #define HAVE_TM_ZONE 1
11743 _ACEOF
11744
11745 else
11746   echo "$as_me:$LINENO: checking for tzname" >&5
11747 echo $ECHO_N "checking for tzname... $ECHO_C" >&6
11748 if test "${ac_cv_var_tzname+set}" = set; then
11749   echo $ECHO_N "(cached) $ECHO_C" >&6
11750 else
11751   cat >conftest.$ac_ext <<_ACEOF
11752 /* confdefs.h.  */
11753 _ACEOF
11754 cat confdefs.h >>conftest.$ac_ext
11755 cat >>conftest.$ac_ext <<_ACEOF
11756 /* end confdefs.h.  */
11757 #include <time.h>
11758 #ifndef tzname /* For SGI.  */
11759 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
11760 #endif
11761
11762 int
11763 main ()
11764 {
11765 atoi(*tzname);
11766   ;
11767   return 0;
11768 }
11769 _ACEOF
11770 rm -f conftest.$ac_objext conftest$ac_exeext
11771 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11772   (eval $ac_link) 2>conftest.er1
11773   ac_status=$?
11774   grep -v '^ *+' conftest.er1 >conftest.err
11775   rm -f conftest.er1
11776   cat conftest.err >&5
11777   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11778   (exit $ac_status); } &&
11779          { ac_try='test -z "$ac_c_werror_flag"
11780                          || test ! -s conftest.err'
11781   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11782   (eval $ac_try) 2>&5
11783   ac_status=$?
11784   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785   (exit $ac_status); }; } &&
11786          { ac_try='test -s conftest$ac_exeext'
11787   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11788   (eval $ac_try) 2>&5
11789   ac_status=$?
11790   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11791   (exit $ac_status); }; }; then
11792   ac_cv_var_tzname=yes
11793 else
11794   echo "$as_me: failed program was:" >&5
11795 sed 's/^/| /' conftest.$ac_ext >&5
11796
11797 ac_cv_var_tzname=no
11798 fi
11799 rm -f conftest.err conftest.$ac_objext \
11800       conftest$ac_exeext conftest.$ac_ext
11801 fi
11802 echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
11803 echo "${ECHO_T}$ac_cv_var_tzname" >&6
11804   if test $ac_cv_var_tzname = yes; then
11805
11806 cat >>confdefs.h <<\_ACEOF
11807 #define HAVE_TZNAME 1
11808 _ACEOF
11809
11810   fi
11811 fi
11812
11813
11814
11815
11816 for ac_func in gmtime_r localtime_r
11817 do
11818 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11819 echo "$as_me:$LINENO: checking for $ac_func" >&5
11820 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11821 if eval "test \"\${$as_ac_var+set}\" = set"; then
11822   echo $ECHO_N "(cached) $ECHO_C" >&6
11823 else
11824   cat >conftest.$ac_ext <<_ACEOF
11825 /* confdefs.h.  */
11826 _ACEOF
11827 cat confdefs.h >>conftest.$ac_ext
11828 cat >>conftest.$ac_ext <<_ACEOF
11829 /* end confdefs.h.  */
11830 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11831    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
11832 #define $ac_func innocuous_$ac_func
11833
11834 /* System header to define __stub macros and hopefully few prototypes,
11835     which can conflict with char $ac_func (); below.
11836     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11837     <limits.h> exists even on freestanding compilers.  */
11838
11839 #ifdef __STDC__
11840 # include <limits.h>
11841 #else
11842 # include <assert.h>
11843 #endif
11844
11845 #undef $ac_func
11846
11847 /* Override any gcc2 internal prototype to avoid an error.  */
11848 #ifdef __cplusplus
11849 extern "C"
11850 {
11851 #endif
11852 /* We use char because int might match the return type of a gcc2
11853    builtin and then its argument prototype would still apply.  */
11854 char $ac_func ();
11855 /* The GNU C library defines this for functions which it implements
11856     to always fail with ENOSYS.  Some functions are actually named
11857     something starting with __ and the normal name is an alias.  */
11858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11859 choke me
11860 #else
11861 char (*f) () = $ac_func;
11862 #endif
11863 #ifdef __cplusplus
11864 }
11865 #endif
11866
11867 int
11868 main ()
11869 {
11870 return f != $ac_func;
11871   ;
11872   return 0;
11873 }
11874 _ACEOF
11875 rm -f conftest.$ac_objext conftest$ac_exeext
11876 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11877   (eval $ac_link) 2>conftest.er1
11878   ac_status=$?
11879   grep -v '^ *+' conftest.er1 >conftest.err
11880   rm -f conftest.er1
11881   cat conftest.err >&5
11882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11883   (exit $ac_status); } &&
11884          { ac_try='test -z "$ac_c_werror_flag"
11885                          || test ! -s conftest.err'
11886   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11887   (eval $ac_try) 2>&5
11888   ac_status=$?
11889   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11890   (exit $ac_status); }; } &&
11891          { ac_try='test -s conftest$ac_exeext'
11892   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11893   (eval $ac_try) 2>&5
11894   ac_status=$?
11895   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11896   (exit $ac_status); }; }; then
11897   eval "$as_ac_var=yes"
11898 else
11899   echo "$as_me: failed program was:" >&5
11900 sed 's/^/| /' conftest.$ac_ext >&5
11901
11902 eval "$as_ac_var=no"
11903 fi
11904 rm -f conftest.err conftest.$ac_objext \
11905       conftest$ac_exeext conftest.$ac_ext
11906 fi
11907 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11908 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11909 if test `eval echo '${'$as_ac_var'}'` = yes; then
11910   cat >>confdefs.h <<_ACEOF
11911 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11912 _ACEOF
11913
11914 fi
11915 done
11916
11917
11918     echo "$as_me:$LINENO: checking tm_tzadj in struct tm" >&5
11919 echo $ECHO_N "checking tm_tzadj in struct tm... $ECHO_C" >&6
11920 if test "${tcl_cv_member_tm_tzadj+set}" = set; then
11921   echo $ECHO_N "(cached) $ECHO_C" >&6
11922 else
11923
11924         cat >conftest.$ac_ext <<_ACEOF
11925 /* confdefs.h.  */
11926 _ACEOF
11927 cat confdefs.h >>conftest.$ac_ext
11928 cat >>conftest.$ac_ext <<_ACEOF
11929 /* end confdefs.h.  */
11930 #include <time.h>
11931 int
11932 main ()
11933 {
11934 struct tm tm; tm.tm_tzadj;
11935   ;
11936   return 0;
11937 }
11938 _ACEOF
11939 rm -f conftest.$ac_objext
11940 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11941   (eval $ac_compile) 2>conftest.er1
11942   ac_status=$?
11943   grep -v '^ *+' conftest.er1 >conftest.err
11944   rm -f conftest.er1
11945   cat conftest.err >&5
11946   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -z "$ac_c_werror_flag"
11949                          || test ! -s conftest.err'
11950   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11951   (eval $ac_try) 2>&5
11952   ac_status=$?
11953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954   (exit $ac_status); }; } &&
11955          { ac_try='test -s conftest.$ac_objext'
11956   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11957   (eval $ac_try) 2>&5
11958   ac_status=$?
11959   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11960   (exit $ac_status); }; }; then
11961   tcl_cv_member_tm_tzadj=yes
11962 else
11963   echo "$as_me: failed program was:" >&5
11964 sed 's/^/| /' conftest.$ac_ext >&5
11965
11966 tcl_cv_member_tm_tzadj=no
11967 fi
11968 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11969 fi
11970 echo "$as_me:$LINENO: result: $tcl_cv_member_tm_tzadj" >&5
11971 echo "${ECHO_T}$tcl_cv_member_tm_tzadj" >&6
11972     if test $tcl_cv_member_tm_tzadj = yes ; then
11973
11974 cat >>confdefs.h <<\_ACEOF
11975 #define HAVE_TM_TZADJ 1
11976 _ACEOF
11977
11978     fi
11979
11980     echo "$as_me:$LINENO: checking tm_gmtoff in struct tm" >&5
11981 echo $ECHO_N "checking tm_gmtoff in struct tm... $ECHO_C" >&6
11982 if test "${tcl_cv_member_tm_gmtoff+set}" = set; then
11983   echo $ECHO_N "(cached) $ECHO_C" >&6
11984 else
11985
11986         cat >conftest.$ac_ext <<_ACEOF
11987 /* confdefs.h.  */
11988 _ACEOF
11989 cat confdefs.h >>conftest.$ac_ext
11990 cat >>conftest.$ac_ext <<_ACEOF
11991 /* end confdefs.h.  */
11992 #include <time.h>
11993 int
11994 main ()
11995 {
11996 struct tm tm; tm.tm_gmtoff;
11997   ;
11998   return 0;
11999 }
12000 _ACEOF
12001 rm -f conftest.$ac_objext
12002 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12003   (eval $ac_compile) 2>conftest.er1
12004   ac_status=$?
12005   grep -v '^ *+' conftest.er1 >conftest.err
12006   rm -f conftest.er1
12007   cat conftest.err >&5
12008   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009   (exit $ac_status); } &&
12010          { ac_try='test -z "$ac_c_werror_flag"
12011                          || test ! -s conftest.err'
12012   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12013   (eval $ac_try) 2>&5
12014   ac_status=$?
12015   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12016   (exit $ac_status); }; } &&
12017          { ac_try='test -s conftest.$ac_objext'
12018   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12019   (eval $ac_try) 2>&5
12020   ac_status=$?
12021   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12022   (exit $ac_status); }; }; then
12023   tcl_cv_member_tm_gmtoff=yes
12024 else
12025   echo "$as_me: failed program was:" >&5
12026 sed 's/^/| /' conftest.$ac_ext >&5
12027
12028 tcl_cv_member_tm_gmtoff=no
12029 fi
12030 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12031 fi
12032 echo "$as_me:$LINENO: result: $tcl_cv_member_tm_gmtoff" >&5
12033 echo "${ECHO_T}$tcl_cv_member_tm_gmtoff" >&6
12034     if test $tcl_cv_member_tm_gmtoff = yes ; then
12035
12036 cat >>confdefs.h <<\_ACEOF
12037 #define HAVE_TM_GMTOFF 1
12038 _ACEOF
12039
12040     fi
12041
12042     #
12043     # Its important to include time.h in this check, as some systems
12044     # (like convex) have timezone functions, etc.
12045     #
12046     echo "$as_me:$LINENO: checking long timezone variable" >&5
12047 echo $ECHO_N "checking long timezone variable... $ECHO_C" >&6
12048 if test "${tcl_cv_timezone_long+set}" = set; then
12049   echo $ECHO_N "(cached) $ECHO_C" >&6
12050 else
12051
12052         cat >conftest.$ac_ext <<_ACEOF
12053 /* confdefs.h.  */
12054 _ACEOF
12055 cat confdefs.h >>conftest.$ac_ext
12056 cat >>conftest.$ac_ext <<_ACEOF
12057 /* end confdefs.h.  */
12058 #include <time.h>
12059 int
12060 main ()
12061 {
12062 extern long timezone;
12063             timezone += 1;
12064             exit (0);
12065   ;
12066   return 0;
12067 }
12068 _ACEOF
12069 rm -f conftest.$ac_objext
12070 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12071   (eval $ac_compile) 2>conftest.er1
12072   ac_status=$?
12073   grep -v '^ *+' conftest.er1 >conftest.err
12074   rm -f conftest.er1
12075   cat conftest.err >&5
12076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12077   (exit $ac_status); } &&
12078          { ac_try='test -z "$ac_c_werror_flag"
12079                          || test ! -s conftest.err'
12080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12081   (eval $ac_try) 2>&5
12082   ac_status=$?
12083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12084   (exit $ac_status); }; } &&
12085          { ac_try='test -s conftest.$ac_objext'
12086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12087   (eval $ac_try) 2>&5
12088   ac_status=$?
12089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12090   (exit $ac_status); }; }; then
12091   tcl_cv_timezone_long=yes
12092 else
12093   echo "$as_me: failed program was:" >&5
12094 sed 's/^/| /' conftest.$ac_ext >&5
12095
12096 tcl_cv_timezone_long=no
12097 fi
12098 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12099 fi
12100 echo "$as_me:$LINENO: result: $tcl_cv_timezone_long" >&5
12101 echo "${ECHO_T}$tcl_cv_timezone_long" >&6
12102     if test $tcl_cv_timezone_long = yes ; then
12103
12104 cat >>confdefs.h <<\_ACEOF
12105 #define HAVE_TIMEZONE_VAR 1
12106 _ACEOF
12107
12108     else
12109         #
12110         # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
12111         #
12112         echo "$as_me:$LINENO: checking time_t timezone variable" >&5
12113 echo $ECHO_N "checking time_t timezone variable... $ECHO_C" >&6
12114 if test "${tcl_cv_timezone_time+set}" = set; then
12115   echo $ECHO_N "(cached) $ECHO_C" >&6
12116 else
12117
12118             cat >conftest.$ac_ext <<_ACEOF
12119 /* confdefs.h.  */
12120 _ACEOF
12121 cat confdefs.h >>conftest.$ac_ext
12122 cat >>conftest.$ac_ext <<_ACEOF
12123 /* end confdefs.h.  */
12124 #include <time.h>
12125 int
12126 main ()
12127 {
12128 extern time_t timezone;
12129                 timezone += 1;
12130                 exit (0);
12131   ;
12132   return 0;
12133 }
12134 _ACEOF
12135 rm -f conftest.$ac_objext
12136 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12137   (eval $ac_compile) 2>conftest.er1
12138   ac_status=$?
12139   grep -v '^ *+' conftest.er1 >conftest.err
12140   rm -f conftest.er1
12141   cat conftest.err >&5
12142   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143   (exit $ac_status); } &&
12144          { ac_try='test -z "$ac_c_werror_flag"
12145                          || test ! -s conftest.err'
12146   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147   (eval $ac_try) 2>&5
12148   ac_status=$?
12149   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150   (exit $ac_status); }; } &&
12151          { ac_try='test -s conftest.$ac_objext'
12152   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12153   (eval $ac_try) 2>&5
12154   ac_status=$?
12155   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156   (exit $ac_status); }; }; then
12157   tcl_cv_timezone_time=yes
12158 else
12159   echo "$as_me: failed program was:" >&5
12160 sed 's/^/| /' conftest.$ac_ext >&5
12161
12162 tcl_cv_timezone_time=no
12163 fi
12164 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12165 fi
12166 echo "$as_me:$LINENO: result: $tcl_cv_timezone_time" >&5
12167 echo "${ECHO_T}$tcl_cv_timezone_time" >&6
12168         if test $tcl_cv_timezone_time = yes ; then
12169
12170 cat >>confdefs.h <<\_ACEOF
12171 #define HAVE_TIMEZONE_VAR 1
12172 _ACEOF
12173
12174         fi
12175     fi
12176
12177
12178 #--------------------------------------------------------------------
12179 #       The check below checks whether <sys/wait.h> defines the type
12180 #       "union wait" correctly.  It's needed because of weirdness in
12181 #       HP-UX where "union wait" is defined in both the BSD and SYS-V
12182 #       environments.  Checking the usability of WIFEXITED seems to do
12183 #       the trick.
12184 #--------------------------------------------------------------------
12185
12186 echo "$as_me:$LINENO: checking union wait" >&5
12187 echo $ECHO_N "checking union wait... $ECHO_C" >&6
12188 if test "${tcl_cv_union_wait+set}" = set; then
12189   echo $ECHO_N "(cached) $ECHO_C" >&6
12190 else
12191   cat >conftest.$ac_ext <<_ACEOF
12192 /* confdefs.h.  */
12193 _ACEOF
12194 cat confdefs.h >>conftest.$ac_ext
12195 cat >>conftest.$ac_ext <<_ACEOF
12196 /* end confdefs.h.  */
12197 #include <sys/types.h>
12198 #include <sys/wait.h>
12199 int
12200 main ()
12201 {
12202
12203 union wait x;
12204 WIFEXITED(x);   /* Generates compiler error if WIFEXITED uses an int. */
12205
12206   ;
12207   return 0;
12208 }
12209 _ACEOF
12210 rm -f conftest.$ac_objext conftest$ac_exeext
12211 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12212   (eval $ac_link) 2>conftest.er1
12213   ac_status=$?
12214   grep -v '^ *+' conftest.er1 >conftest.err
12215   rm -f conftest.er1
12216   cat conftest.err >&5
12217   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12218   (exit $ac_status); } &&
12219          { ac_try='test -z "$ac_c_werror_flag"
12220                          || test ! -s conftest.err'
12221   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12222   (eval $ac_try) 2>&5
12223   ac_status=$?
12224   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12225   (exit $ac_status); }; } &&
12226          { ac_try='test -s conftest$ac_exeext'
12227   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12228   (eval $ac_try) 2>&5
12229   ac_status=$?
12230   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12231   (exit $ac_status); }; }; then
12232   tcl_cv_union_wait=yes
12233 else
12234   echo "$as_me: failed program was:" >&5
12235 sed 's/^/| /' conftest.$ac_ext >&5
12236
12237 tcl_cv_union_wait=no
12238 fi
12239 rm -f conftest.err conftest.$ac_objext \
12240       conftest$ac_exeext conftest.$ac_ext
12241 fi
12242
12243 echo "$as_me:$LINENO: result: $tcl_cv_union_wait" >&5
12244 echo "${ECHO_T}$tcl_cv_union_wait" >&6
12245 if test $tcl_cv_union_wait = no; then
12246     cat >>confdefs.h <<\_ACEOF
12247 #define NO_UNION_WAIT 1
12248 _ACEOF
12249
12250 fi
12251
12252 ######################################################################
12253 # required by Sequent ptx2
12254
12255 echo "$as_me:$LINENO: checking for gethostname" >&5
12256 echo $ECHO_N "checking for gethostname... $ECHO_C" >&6
12257 if test "${ac_cv_func_gethostname+set}" = set; then
12258   echo $ECHO_N "(cached) $ECHO_C" >&6
12259 else
12260   cat >conftest.$ac_ext <<_ACEOF
12261 /* confdefs.h.  */
12262 _ACEOF
12263 cat confdefs.h >>conftest.$ac_ext
12264 cat >>conftest.$ac_ext <<_ACEOF
12265 /* end confdefs.h.  */
12266 /* Define gethostname to an innocuous variant, in case <limits.h> declares gethostname.
12267    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12268 #define gethostname innocuous_gethostname
12269
12270 /* System header to define __stub macros and hopefully few prototypes,
12271     which can conflict with char gethostname (); below.
12272     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12273     <limits.h> exists even on freestanding compilers.  */
12274
12275 #ifdef __STDC__
12276 # include <limits.h>
12277 #else
12278 # include <assert.h>
12279 #endif
12280
12281 #undef gethostname
12282
12283 /* Override any gcc2 internal prototype to avoid an error.  */
12284 #ifdef __cplusplus
12285 extern "C"
12286 {
12287 #endif
12288 /* We use char because int might match the return type of a gcc2
12289    builtin and then its argument prototype would still apply.  */
12290 char gethostname ();
12291 /* The GNU C library defines this for functions which it implements
12292     to always fail with ENOSYS.  Some functions are actually named
12293     something starting with __ and the normal name is an alias.  */
12294 #if defined (__stub_gethostname) || defined (__stub___gethostname)
12295 choke me
12296 #else
12297 char (*f) () = gethostname;
12298 #endif
12299 #ifdef __cplusplus
12300 }
12301 #endif
12302
12303 int
12304 main ()
12305 {
12306 return f != gethostname;
12307   ;
12308   return 0;
12309 }
12310 _ACEOF
12311 rm -f conftest.$ac_objext conftest$ac_exeext
12312 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12313   (eval $ac_link) 2>conftest.er1
12314   ac_status=$?
12315   grep -v '^ *+' conftest.er1 >conftest.err
12316   rm -f conftest.er1
12317   cat conftest.err >&5
12318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12319   (exit $ac_status); } &&
12320          { ac_try='test -z "$ac_c_werror_flag"
12321                          || test ! -s conftest.err'
12322   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12323   (eval $ac_try) 2>&5
12324   ac_status=$?
12325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12326   (exit $ac_status); }; } &&
12327          { ac_try='test -s conftest$ac_exeext'
12328   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12329   (eval $ac_try) 2>&5
12330   ac_status=$?
12331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12332   (exit $ac_status); }; }; then
12333   ac_cv_func_gethostname=yes
12334 else
12335   echo "$as_me: failed program was:" >&5
12336 sed 's/^/| /' conftest.$ac_ext >&5
12337
12338 ac_cv_func_gethostname=no
12339 fi
12340 rm -f conftest.err conftest.$ac_objext \
12341       conftest$ac_exeext conftest.$ac_ext
12342 fi
12343 echo "$as_me:$LINENO: result: $ac_cv_func_gethostname" >&5
12344 echo "${ECHO_T}$ac_cv_func_gethostname" >&6
12345 if test $ac_cv_func_gethostname = yes; then
12346   gethostname=1
12347 else
12348   gethostname=0
12349 fi
12350
12351 if test $gethostname -eq 0 ; then
12352   echo "$as_me:$LINENO: checking for gethostname in -linet" >&5
12353 echo $ECHO_N "checking for gethostname in -linet... $ECHO_C" >&6
12354 if test "${ac_cv_lib_inet_gethostname+set}" = set; then
12355   echo $ECHO_N "(cached) $ECHO_C" >&6
12356 else
12357   ac_check_lib_save_LIBS=$LIBS
12358 LIBS="-linet  $LIBS"
12359 cat >conftest.$ac_ext <<_ACEOF
12360 /* confdefs.h.  */
12361 _ACEOF
12362 cat confdefs.h >>conftest.$ac_ext
12363 cat >>conftest.$ac_ext <<_ACEOF
12364 /* end confdefs.h.  */
12365
12366 /* Override any gcc2 internal prototype to avoid an error.  */
12367 #ifdef __cplusplus
12368 extern "C"
12369 #endif
12370 /* We use char because int might match the return type of a gcc2
12371    builtin and then its argument prototype would still apply.  */
12372 char gethostname ();
12373 int
12374 main ()
12375 {
12376 gethostname ();
12377   ;
12378   return 0;
12379 }
12380 _ACEOF
12381 rm -f conftest.$ac_objext conftest$ac_exeext
12382 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12383   (eval $ac_link) 2>conftest.er1
12384   ac_status=$?
12385   grep -v '^ *+' conftest.er1 >conftest.err
12386   rm -f conftest.er1
12387   cat conftest.err >&5
12388   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -z "$ac_c_werror_flag"
12391                          || test ! -s conftest.err'
12392   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12393   (eval $ac_try) 2>&5
12394   ac_status=$?
12395   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12396   (exit $ac_status); }; } &&
12397          { ac_try='test -s conftest$ac_exeext'
12398   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12399   (eval $ac_try) 2>&5
12400   ac_status=$?
12401   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12402   (exit $ac_status); }; }; then
12403   ac_cv_lib_inet_gethostname=yes
12404 else
12405   echo "$as_me: failed program was:" >&5
12406 sed 's/^/| /' conftest.$ac_ext >&5
12407
12408 ac_cv_lib_inet_gethostname=no
12409 fi
12410 rm -f conftest.err conftest.$ac_objext \
12411       conftest$ac_exeext conftest.$ac_ext
12412 LIBS=$ac_check_lib_save_LIBS
12413 fi
12414 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_gethostname" >&5
12415 echo "${ECHO_T}$ac_cv_lib_inet_gethostname" >&6
12416 if test $ac_cv_lib_inet_gethostname = yes; then
12417   LIBS="$LIBS -linet"
12418 fi
12419
12420 fi
12421
12422 ######################################################################
12423 # required by Fischman's ISC 4.0
12424
12425 echo "$as_me:$LINENO: checking for socket" >&5
12426 echo $ECHO_N "checking for socket... $ECHO_C" >&6
12427 if test "${ac_cv_func_socket+set}" = set; then
12428   echo $ECHO_N "(cached) $ECHO_C" >&6
12429 else
12430   cat >conftest.$ac_ext <<_ACEOF
12431 /* confdefs.h.  */
12432 _ACEOF
12433 cat confdefs.h >>conftest.$ac_ext
12434 cat >>conftest.$ac_ext <<_ACEOF
12435 /* end confdefs.h.  */
12436 /* Define socket to an innocuous variant, in case <limits.h> declares socket.
12437    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12438 #define socket innocuous_socket
12439
12440 /* System header to define __stub macros and hopefully few prototypes,
12441     which can conflict with char socket (); below.
12442     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12443     <limits.h> exists even on freestanding compilers.  */
12444
12445 #ifdef __STDC__
12446 # include <limits.h>
12447 #else
12448 # include <assert.h>
12449 #endif
12450
12451 #undef socket
12452
12453 /* Override any gcc2 internal prototype to avoid an error.  */
12454 #ifdef __cplusplus
12455 extern "C"
12456 {
12457 #endif
12458 /* We use char because int might match the return type of a gcc2
12459    builtin and then its argument prototype would still apply.  */
12460 char socket ();
12461 /* The GNU C library defines this for functions which it implements
12462     to always fail with ENOSYS.  Some functions are actually named
12463     something starting with __ and the normal name is an alias.  */
12464 #if defined (__stub_socket) || defined (__stub___socket)
12465 choke me
12466 #else
12467 char (*f) () = socket;
12468 #endif
12469 #ifdef __cplusplus
12470 }
12471 #endif
12472
12473 int
12474 main ()
12475 {
12476 return f != socket;
12477   ;
12478   return 0;
12479 }
12480 _ACEOF
12481 rm -f conftest.$ac_objext conftest$ac_exeext
12482 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12483   (eval $ac_link) 2>conftest.er1
12484   ac_status=$?
12485   grep -v '^ *+' conftest.er1 >conftest.err
12486   rm -f conftest.er1
12487   cat conftest.err >&5
12488   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12489   (exit $ac_status); } &&
12490          { ac_try='test -z "$ac_c_werror_flag"
12491                          || test ! -s conftest.err'
12492   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12493   (eval $ac_try) 2>&5
12494   ac_status=$?
12495   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12496   (exit $ac_status); }; } &&
12497          { ac_try='test -s conftest$ac_exeext'
12498   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12499   (eval $ac_try) 2>&5
12500   ac_status=$?
12501   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12502   (exit $ac_status); }; }; then
12503   ac_cv_func_socket=yes
12504 else
12505   echo "$as_me: failed program was:" >&5
12506 sed 's/^/| /' conftest.$ac_ext >&5
12507
12508 ac_cv_func_socket=no
12509 fi
12510 rm -f conftest.err conftest.$ac_objext \
12511       conftest$ac_exeext conftest.$ac_ext
12512 fi
12513 echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
12514 echo "${ECHO_T}$ac_cv_func_socket" >&6
12515 if test $ac_cv_func_socket = yes; then
12516   socket=1
12517 else
12518   socket=0
12519 fi
12520
12521 if test $socket -eq 0 ; then
12522   echo "$as_me:$LINENO: checking for socket in -linet" >&5
12523 echo $ECHO_N "checking for socket in -linet... $ECHO_C" >&6
12524 if test "${ac_cv_lib_inet_socket+set}" = set; then
12525   echo $ECHO_N "(cached) $ECHO_C" >&6
12526 else
12527   ac_check_lib_save_LIBS=$LIBS
12528 LIBS="-linet  $LIBS"
12529 cat >conftest.$ac_ext <<_ACEOF
12530 /* confdefs.h.  */
12531 _ACEOF
12532 cat confdefs.h >>conftest.$ac_ext
12533 cat >>conftest.$ac_ext <<_ACEOF
12534 /* end confdefs.h.  */
12535
12536 /* Override any gcc2 internal prototype to avoid an error.  */
12537 #ifdef __cplusplus
12538 extern "C"
12539 #endif
12540 /* We use char because int might match the return type of a gcc2
12541    builtin and then its argument prototype would still apply.  */
12542 char socket ();
12543 int
12544 main ()
12545 {
12546 socket ();
12547   ;
12548   return 0;
12549 }
12550 _ACEOF
12551 rm -f conftest.$ac_objext conftest$ac_exeext
12552 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12553   (eval $ac_link) 2>conftest.er1
12554   ac_status=$?
12555   grep -v '^ *+' conftest.er1 >conftest.err
12556   rm -f conftest.er1
12557   cat conftest.err >&5
12558   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12559   (exit $ac_status); } &&
12560          { ac_try='test -z "$ac_c_werror_flag"
12561                          || test ! -s conftest.err'
12562   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12563   (eval $ac_try) 2>&5
12564   ac_status=$?
12565   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12566   (exit $ac_status); }; } &&
12567          { ac_try='test -s conftest$ac_exeext'
12568   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12569   (eval $ac_try) 2>&5
12570   ac_status=$?
12571   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12572   (exit $ac_status); }; }; then
12573   ac_cv_lib_inet_socket=yes
12574 else
12575   echo "$as_me: failed program was:" >&5
12576 sed 's/^/| /' conftest.$ac_ext >&5
12577
12578 ac_cv_lib_inet_socket=no
12579 fi
12580 rm -f conftest.err conftest.$ac_objext \
12581       conftest$ac_exeext conftest.$ac_ext
12582 LIBS=$ac_check_lib_save_LIBS
12583 fi
12584 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_socket" >&5
12585 echo "${ECHO_T}$ac_cv_lib_inet_socket" >&6
12586 if test $ac_cv_lib_inet_socket = yes; then
12587   LIBS="$LIBS -linet"
12588 fi
12589
12590 fi
12591
12592 ######################################################################
12593
12594 echo "$as_me:$LINENO: checking for select" >&5
12595 echo $ECHO_N "checking for select... $ECHO_C" >&6
12596 if test "${ac_cv_func_select+set}" = set; then
12597   echo $ECHO_N "(cached) $ECHO_C" >&6
12598 else
12599   cat >conftest.$ac_ext <<_ACEOF
12600 /* confdefs.h.  */
12601 _ACEOF
12602 cat confdefs.h >>conftest.$ac_ext
12603 cat >>conftest.$ac_ext <<_ACEOF
12604 /* end confdefs.h.  */
12605 /* Define select to an innocuous variant, in case <limits.h> declares select.
12606    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12607 #define select innocuous_select
12608
12609 /* System header to define __stub macros and hopefully few prototypes,
12610     which can conflict with char select (); below.
12611     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12612     <limits.h> exists even on freestanding compilers.  */
12613
12614 #ifdef __STDC__
12615 # include <limits.h>
12616 #else
12617 # include <assert.h>
12618 #endif
12619
12620 #undef select
12621
12622 /* Override any gcc2 internal prototype to avoid an error.  */
12623 #ifdef __cplusplus
12624 extern "C"
12625 {
12626 #endif
12627 /* We use char because int might match the return type of a gcc2
12628    builtin and then its argument prototype would still apply.  */
12629 char select ();
12630 /* The GNU C library defines this for functions which it implements
12631     to always fail with ENOSYS.  Some functions are actually named
12632     something starting with __ and the normal name is an alias.  */
12633 #if defined (__stub_select) || defined (__stub___select)
12634 choke me
12635 #else
12636 char (*f) () = select;
12637 #endif
12638 #ifdef __cplusplus
12639 }
12640 #endif
12641
12642 int
12643 main ()
12644 {
12645 return f != select;
12646   ;
12647   return 0;
12648 }
12649 _ACEOF
12650 rm -f conftest.$ac_objext conftest$ac_exeext
12651 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12652   (eval $ac_link) 2>conftest.er1
12653   ac_status=$?
12654   grep -v '^ *+' conftest.er1 >conftest.err
12655   rm -f conftest.er1
12656   cat conftest.err >&5
12657   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658   (exit $ac_status); } &&
12659          { ac_try='test -z "$ac_c_werror_flag"
12660                          || test ! -s conftest.err'
12661   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12662   (eval $ac_try) 2>&5
12663   ac_status=$?
12664   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12665   (exit $ac_status); }; } &&
12666          { ac_try='test -s conftest$ac_exeext'
12667   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   ac_cv_func_select=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 sed 's/^/| /' conftest.$ac_ext >&5
12676
12677 ac_cv_func_select=no
12678 fi
12679 rm -f conftest.err conftest.$ac_objext \
12680       conftest$ac_exeext conftest.$ac_ext
12681 fi
12682 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
12683 echo "${ECHO_T}$ac_cv_func_select" >&6
12684 if test $ac_cv_func_select = yes; then
12685   select=1
12686 else
12687   select=0
12688 fi
12689
12690 if test $select -eq 0 ; then
12691   echo "$as_me:$LINENO: checking for select in -linet" >&5
12692 echo $ECHO_N "checking for select in -linet... $ECHO_C" >&6
12693 if test "${ac_cv_lib_inet_select+set}" = set; then
12694   echo $ECHO_N "(cached) $ECHO_C" >&6
12695 else
12696   ac_check_lib_save_LIBS=$LIBS
12697 LIBS="-linet  $LIBS"
12698 cat >conftest.$ac_ext <<_ACEOF
12699 /* confdefs.h.  */
12700 _ACEOF
12701 cat confdefs.h >>conftest.$ac_ext
12702 cat >>conftest.$ac_ext <<_ACEOF
12703 /* end confdefs.h.  */
12704
12705 /* Override any gcc2 internal prototype to avoid an error.  */
12706 #ifdef __cplusplus
12707 extern "C"
12708 #endif
12709 /* We use char because int might match the return type of a gcc2
12710    builtin and then its argument prototype would still apply.  */
12711 char select ();
12712 int
12713 main ()
12714 {
12715 select ();
12716   ;
12717   return 0;
12718 }
12719 _ACEOF
12720 rm -f conftest.$ac_objext conftest$ac_exeext
12721 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12722   (eval $ac_link) 2>conftest.er1
12723   ac_status=$?
12724   grep -v '^ *+' conftest.er1 >conftest.err
12725   rm -f conftest.er1
12726   cat conftest.err >&5
12727   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12728   (exit $ac_status); } &&
12729          { ac_try='test -z "$ac_c_werror_flag"
12730                          || test ! -s conftest.err'
12731   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12732   (eval $ac_try) 2>&5
12733   ac_status=$?
12734   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735   (exit $ac_status); }; } &&
12736          { ac_try='test -s conftest$ac_exeext'
12737   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12738   (eval $ac_try) 2>&5
12739   ac_status=$?
12740   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12741   (exit $ac_status); }; }; then
12742   ac_cv_lib_inet_select=yes
12743 else
12744   echo "$as_me: failed program was:" >&5
12745 sed 's/^/| /' conftest.$ac_ext >&5
12746
12747 ac_cv_lib_inet_select=no
12748 fi
12749 rm -f conftest.err conftest.$ac_objext \
12750       conftest$ac_exeext conftest.$ac_ext
12751 LIBS=$ac_check_lib_save_LIBS
12752 fi
12753 echo "$as_me:$LINENO: result: $ac_cv_lib_inet_select" >&5
12754 echo "${ECHO_T}$ac_cv_lib_inet_select" >&6
12755 if test $ac_cv_lib_inet_select = yes; then
12756   LIBS="$LIBS -linet"
12757 fi
12758
12759 fi
12760
12761 ######################################################################
12762
12763 echo "$as_me:$LINENO: checking for getpseudotty" >&5
12764 echo $ECHO_N "checking for getpseudotty... $ECHO_C" >&6
12765 if test "${ac_cv_func_getpseudotty+set}" = set; then
12766   echo $ECHO_N "(cached) $ECHO_C" >&6
12767 else
12768   cat >conftest.$ac_ext <<_ACEOF
12769 /* confdefs.h.  */
12770 _ACEOF
12771 cat confdefs.h >>conftest.$ac_ext
12772 cat >>conftest.$ac_ext <<_ACEOF
12773 /* end confdefs.h.  */
12774 /* Define getpseudotty to an innocuous variant, in case <limits.h> declares getpseudotty.
12775    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12776 #define getpseudotty innocuous_getpseudotty
12777
12778 /* System header to define __stub macros and hopefully few prototypes,
12779     which can conflict with char getpseudotty (); below.
12780     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12781     <limits.h> exists even on freestanding compilers.  */
12782
12783 #ifdef __STDC__
12784 # include <limits.h>
12785 #else
12786 # include <assert.h>
12787 #endif
12788
12789 #undef getpseudotty
12790
12791 /* Override any gcc2 internal prototype to avoid an error.  */
12792 #ifdef __cplusplus
12793 extern "C"
12794 {
12795 #endif
12796 /* We use char because int might match the return type of a gcc2
12797    builtin and then its argument prototype would still apply.  */
12798 char getpseudotty ();
12799 /* The GNU C library defines this for functions which it implements
12800     to always fail with ENOSYS.  Some functions are actually named
12801     something starting with __ and the normal name is an alias.  */
12802 #if defined (__stub_getpseudotty) || defined (__stub___getpseudotty)
12803 choke me
12804 #else
12805 char (*f) () = getpseudotty;
12806 #endif
12807 #ifdef __cplusplus
12808 }
12809 #endif
12810
12811 int
12812 main ()
12813 {
12814 return f != getpseudotty;
12815   ;
12816   return 0;
12817 }
12818 _ACEOF
12819 rm -f conftest.$ac_objext conftest$ac_exeext
12820 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12821   (eval $ac_link) 2>conftest.er1
12822   ac_status=$?
12823   grep -v '^ *+' conftest.er1 >conftest.err
12824   rm -f conftest.er1
12825   cat conftest.err >&5
12826   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827   (exit $ac_status); } &&
12828          { ac_try='test -z "$ac_c_werror_flag"
12829                          || test ! -s conftest.err'
12830   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12831   (eval $ac_try) 2>&5
12832   ac_status=$?
12833   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12834   (exit $ac_status); }; } &&
12835          { ac_try='test -s conftest$ac_exeext'
12836   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12837   (eval $ac_try) 2>&5
12838   ac_status=$?
12839   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12840   (exit $ac_status); }; }; then
12841   ac_cv_func_getpseudotty=yes
12842 else
12843   echo "$as_me: failed program was:" >&5
12844 sed 's/^/| /' conftest.$ac_ext >&5
12845
12846 ac_cv_func_getpseudotty=no
12847 fi
12848 rm -f conftest.err conftest.$ac_objext \
12849       conftest$ac_exeext conftest.$ac_ext
12850 fi
12851 echo "$as_me:$LINENO: result: $ac_cv_func_getpseudotty" >&5
12852 echo "${ECHO_T}$ac_cv_func_getpseudotty" >&6
12853 if test $ac_cv_func_getpseudotty = yes; then
12854   getpseudotty=1
12855 else
12856   getpseudotty=0
12857 fi
12858
12859 if test $getpseudotty -eq 0 ; then
12860
12861 echo "$as_me:$LINENO: checking for getpseudotty in -lseq" >&5
12862 echo $ECHO_N "checking for getpseudotty in -lseq... $ECHO_C" >&6
12863 if test "${ac_cv_lib_seq_getpseudotty+set}" = set; then
12864   echo $ECHO_N "(cached) $ECHO_C" >&6
12865 else
12866   ac_check_lib_save_LIBS=$LIBS
12867 LIBS="-lseq  $LIBS"
12868 cat >conftest.$ac_ext <<_ACEOF
12869 /* confdefs.h.  */
12870 _ACEOF
12871 cat confdefs.h >>conftest.$ac_ext
12872 cat >>conftest.$ac_ext <<_ACEOF
12873 /* end confdefs.h.  */
12874
12875 /* Override any gcc2 internal prototype to avoid an error.  */
12876 #ifdef __cplusplus
12877 extern "C"
12878 #endif
12879 /* We use char because int might match the return type of a gcc2
12880    builtin and then its argument prototype would still apply.  */
12881 char getpseudotty ();
12882 int
12883 main ()
12884 {
12885 getpseudotty ();
12886   ;
12887   return 0;
12888 }
12889 _ACEOF
12890 rm -f conftest.$ac_objext conftest$ac_exeext
12891 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12892   (eval $ac_link) 2>conftest.er1
12893   ac_status=$?
12894   grep -v '^ *+' conftest.er1 >conftest.err
12895   rm -f conftest.er1
12896   cat conftest.err >&5
12897   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12898   (exit $ac_status); } &&
12899          { ac_try='test -z "$ac_c_werror_flag"
12900                          || test ! -s conftest.err'
12901   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12905   (exit $ac_status); }; } &&
12906          { ac_try='test -s conftest$ac_exeext'
12907   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12908   (eval $ac_try) 2>&5
12909   ac_status=$?
12910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
12911   (exit $ac_status); }; }; then
12912   ac_cv_lib_seq_getpseudotty=yes
12913 else
12914   echo "$as_me: failed program was:" >&5
12915 sed 's/^/| /' conftest.$ac_ext >&5
12916
12917 ac_cv_lib_seq_getpseudotty=no
12918 fi
12919 rm -f conftest.err conftest.$ac_objext \
12920       conftest$ac_exeext conftest.$ac_ext
12921 LIBS=$ac_check_lib_save_LIBS
12922 fi
12923 echo "$as_me:$LINENO: result: $ac_cv_lib_seq_getpseudotty" >&5
12924 echo "${ECHO_T}$ac_cv_lib_seq_getpseudotty" >&6
12925 if test $ac_cv_lib_seq_getpseudotty = yes; then
12926   cat >>confdefs.h <<_ACEOF
12927 #define HAVE_LIBSEQ 1
12928 _ACEOF
12929
12930   LIBS="-lseq $LIBS"
12931
12932 fi
12933
12934 fi
12935
12936 ######################################################################
12937 # Check for FreeBSD/NetBSD openpty()
12938 unset ac_cv_func_openpty
12939
12940 echo "$as_me:$LINENO: checking for openpty" >&5
12941 echo $ECHO_N "checking for openpty... $ECHO_C" >&6
12942 if test "${ac_cv_func_openpty+set}" = set; then
12943   echo $ECHO_N "(cached) $ECHO_C" >&6
12944 else
12945   cat >conftest.$ac_ext <<_ACEOF
12946 /* confdefs.h.  */
12947 _ACEOF
12948 cat confdefs.h >>conftest.$ac_ext
12949 cat >>conftest.$ac_ext <<_ACEOF
12950 /* end confdefs.h.  */
12951 /* Define openpty to an innocuous variant, in case <limits.h> declares openpty.
12952    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
12953 #define openpty innocuous_openpty
12954
12955 /* System header to define __stub macros and hopefully few prototypes,
12956     which can conflict with char openpty (); below.
12957     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12958     <limits.h> exists even on freestanding compilers.  */
12959
12960 #ifdef __STDC__
12961 # include <limits.h>
12962 #else
12963 # include <assert.h>
12964 #endif
12965
12966 #undef openpty
12967
12968 /* Override any gcc2 internal prototype to avoid an error.  */
12969 #ifdef __cplusplus
12970 extern "C"
12971 {
12972 #endif
12973 /* We use char because int might match the return type of a gcc2
12974    builtin and then its argument prototype would still apply.  */
12975 char openpty ();
12976 /* The GNU C library defines this for functions which it implements
12977     to always fail with ENOSYS.  Some functions are actually named
12978     something starting with __ and the normal name is an alias.  */
12979 #if defined (__stub_openpty) || defined (__stub___openpty)
12980 choke me
12981 #else
12982 char (*f) () = openpty;
12983 #endif
12984 #ifdef __cplusplus
12985 }
12986 #endif
12987
12988 int
12989 main ()
12990 {
12991 return f != openpty;
12992   ;
12993   return 0;
12994 }
12995 _ACEOF
12996 rm -f conftest.$ac_objext conftest$ac_exeext
12997 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12998   (eval $ac_link) 2>conftest.er1
12999   ac_status=$?
13000   grep -v '^ *+' conftest.er1 >conftest.err
13001   rm -f conftest.er1
13002   cat conftest.err >&5
13003   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004   (exit $ac_status); } &&
13005          { ac_try='test -z "$ac_c_werror_flag"
13006                          || test ! -s conftest.err'
13007   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13008   (eval $ac_try) 2>&5
13009   ac_status=$?
13010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13011   (exit $ac_status); }; } &&
13012          { ac_try='test -s conftest$ac_exeext'
13013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13014   (eval $ac_try) 2>&5
13015   ac_status=$?
13016   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13017   (exit $ac_status); }; }; then
13018   ac_cv_func_openpty=yes
13019 else
13020   echo "$as_me: failed program was:" >&5
13021 sed 's/^/| /' conftest.$ac_ext >&5
13022
13023 ac_cv_func_openpty=no
13024 fi
13025 rm -f conftest.err conftest.$ac_objext \
13026       conftest$ac_exeext conftest.$ac_ext
13027 fi
13028 echo "$as_me:$LINENO: result: $ac_cv_func_openpty" >&5
13029 echo "${ECHO_T}$ac_cv_func_openpty" >&6
13030 if test $ac_cv_func_openpty = yes; then
13031   cat >>confdefs.h <<\_ACEOF
13032 #define HAVE_OPENPTY 1
13033 _ACEOF
13034  openpty=1
13035 else
13036   openpty=0
13037 fi
13038
13039 if test $openpty -eq 0 ; then
13040   echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13041 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13042 if test "${ac_cv_lib_util_openpty+set}" = set; then
13043   echo $ECHO_N "(cached) $ECHO_C" >&6
13044 else
13045   ac_check_lib_save_LIBS=$LIBS
13046 LIBS="-lutil  $LIBS"
13047 cat >conftest.$ac_ext <<_ACEOF
13048 /* confdefs.h.  */
13049 _ACEOF
13050 cat confdefs.h >>conftest.$ac_ext
13051 cat >>conftest.$ac_ext <<_ACEOF
13052 /* end confdefs.h.  */
13053
13054 /* Override any gcc2 internal prototype to avoid an error.  */
13055 #ifdef __cplusplus
13056 extern "C"
13057 #endif
13058 /* We use char because int might match the return type of a gcc2
13059    builtin and then its argument prototype would still apply.  */
13060 char openpty ();
13061 int
13062 main ()
13063 {
13064 openpty ();
13065   ;
13066   return 0;
13067 }
13068 _ACEOF
13069 rm -f conftest.$ac_objext conftest$ac_exeext
13070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13071   (eval $ac_link) 2>conftest.er1
13072   ac_status=$?
13073   grep -v '^ *+' conftest.er1 >conftest.err
13074   rm -f conftest.er1
13075   cat conftest.err >&5
13076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13077   (exit $ac_status); } &&
13078          { ac_try='test -z "$ac_c_werror_flag"
13079                          || test ! -s conftest.err'
13080   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13081   (eval $ac_try) 2>&5
13082   ac_status=$?
13083   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13084   (exit $ac_status); }; } &&
13085          { ac_try='test -s conftest$ac_exeext'
13086   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091   ac_cv_lib_util_openpty=yes
13092 else
13093   echo "$as_me: failed program was:" >&5
13094 sed 's/^/| /' conftest.$ac_ext >&5
13095
13096 ac_cv_lib_util_openpty=no
13097 fi
13098 rm -f conftest.err conftest.$ac_objext \
13099       conftest$ac_exeext conftest.$ac_ext
13100 LIBS=$ac_check_lib_save_LIBS
13101 fi
13102 echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13103 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13104 if test $ac_cv_lib_util_openpty = yes; then
13105
13106         # we only need to define OPENPTY once, but since we are overriding
13107         # the default behavior, we must also handle augment LIBS too.
13108         # This needn't be done in the 2nd and 3rd tests.
13109         cat >>confdefs.h <<\_ACEOF
13110 #define HAVE_OPENPTY 1
13111 _ACEOF
13112
13113         LIBS="$LIBS -lutil"
13114
13115 fi
13116
13117 fi
13118
13119 ######################################################################
13120 # End of library/func checking
13121 ######################################################################
13122
13123 # Hand patches to library/func checking.
13124
13125 echo "$as_me:$LINENO: checking if running Sequent running SVR4" >&5
13126 echo $ECHO_N "checking if running Sequent running SVR4... $ECHO_C" >&6
13127 if test "$host_alias" = "i386-sequent-sysv4" ; then
13128  LIBS="-lnsl -lsocket -lm"
13129  echo "$as_me:$LINENO: result: yes" >&5
13130 echo "${ECHO_T}yes" >&6
13131 else
13132  echo "$as_me:$LINENO: result: no" >&5
13133 echo "${ECHO_T}no" >&6
13134 fi
13135
13136 #--------------------------------------------------------------------
13137 #--------------------------------------------------------------------
13138 #--------------------------------------------------------------------
13139 #--------------------------------------------------------------------
13140 # From here on comes original expect configure code.
13141 # At the end we will have another section of TEA 3.2 code.
13142 #
13143 # Note specialities
13144 #
13145 # - Runs a sub configure (Dbgconfigure) for the expect tcl debugger
13146 #
13147 #--------------------------------------------------------------------
13148 #--------------------------------------------------------------------
13149
13150 # Make sure we can run config.sub.
13151 $ac_config_sub sun4 >/dev/null 2>&1 ||
13152   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
13153 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
13154    { (exit 1); exit 1; }; }
13155
13156 echo "$as_me:$LINENO: checking build system type" >&5
13157 echo $ECHO_N "checking build system type... $ECHO_C" >&6
13158 if test "${ac_cv_build+set}" = set; then
13159   echo $ECHO_N "(cached) $ECHO_C" >&6
13160 else
13161   ac_cv_build_alias=$build_alias
13162 test -z "$ac_cv_build_alias" &&
13163   ac_cv_build_alias=`$ac_config_guess`
13164 test -z "$ac_cv_build_alias" &&
13165   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
13166 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
13167    { (exit 1); exit 1; }; }
13168 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
13169   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
13170 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
13171    { (exit 1); exit 1; }; }
13172
13173 fi
13174 echo "$as_me:$LINENO: result: $ac_cv_build" >&5
13175 echo "${ECHO_T}$ac_cv_build" >&6
13176 build=$ac_cv_build
13177 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13178 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13179 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13180
13181
13182 echo "$as_me:$LINENO: checking host system type" >&5
13183 echo $ECHO_N "checking host system type... $ECHO_C" >&6
13184 if test "${ac_cv_host+set}" = set; then
13185   echo $ECHO_N "(cached) $ECHO_C" >&6
13186 else
13187   ac_cv_host_alias=$host_alias
13188 test -z "$ac_cv_host_alias" &&
13189   ac_cv_host_alias=$ac_cv_build_alias
13190 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
13191   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
13192 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
13193    { (exit 1); exit 1; }; }
13194
13195 fi
13196 echo "$as_me:$LINENO: result: $ac_cv_host" >&5
13197 echo "${ECHO_T}$ac_cv_host" >&6
13198 host=$ac_cv_host
13199 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13200 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13201 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13202
13203
13204 echo "$as_me:$LINENO: checking target system type" >&5
13205 echo $ECHO_N "checking target system type... $ECHO_C" >&6
13206 if test "${ac_cv_target+set}" = set; then
13207   echo $ECHO_N "(cached) $ECHO_C" >&6
13208 else
13209   ac_cv_target_alias=$target_alias
13210 test "x$ac_cv_target_alias" = "x" &&
13211   ac_cv_target_alias=$ac_cv_host_alias
13212 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
13213   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
13214 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
13215    { (exit 1); exit 1; }; }
13216
13217 fi
13218 echo "$as_me:$LINENO: result: $ac_cv_target" >&5
13219 echo "${ECHO_T}$ac_cv_target" >&6
13220 target=$ac_cv_target
13221 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13222 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13223 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13224
13225
13226 # The aliases save the names the user supplied, while $host etc.
13227 # will get canonicalized.
13228 test -n "$target_alias" &&
13229   test "$program_prefix$program_suffix$program_transform_name" = \
13230     NONENONEs,x,x, &&
13231   program_prefix=${target_alias}-
13232
13233 # If `configure' is invoked (in)directly via `make', ensure that it
13234 # encounters no `make' conflicts.
13235 #
13236
13237 MFLAGS=
13238 MAKEFLAGS=
13239
13240 # An explanation is in order for the strange things going on with the
13241 # various LIBS.  There are three separate definitions for LIBS.  The
13242 # reason is that some systems require shared libraries include
13243 # references to their dependent libraries, i.e., any additional
13244 # libraries that must be linked to.  And some systems get upset if the
13245 # references are repeated on the link line.  So therefore, we create
13246 # one for Expect, one for Expect and Tcl, and one for building Expect's own
13247 # shared library.  Tcl's tclConfig.sh insists that any shared libs
13248 # that it "helps" build must pass the libraries as LIBS (see comment
13249 # near end of this configure file).  I would do but since we're close
13250 # to hitting config's max symbols, we take one short cut and pack the
13251 # LIBS into EXP_SHLIB_LD_LIBS (which is basically what Tcl wants to do
13252 # for us).  The point, however, is that there's no separate LIBS or
13253 # EXP_LIBS symbol passed out of configure.  One additional point for
13254 # confusion is that LIBS is what configure uses to do all library
13255 # tests, so we have to swap definitions of LIBS periodically.  When we
13256 # are swapping out the one for Expect's shared library, we save it in
13257 # EXP_LIBS.  Sigh.
13258
13259 eval "LIBS=\"$TCL_LIBS\""
13260
13261 if test "${with_tcl+set}" = set ; then
13262     case "${with_tcl}" in
13263         ..*)
13264             { echo "$as_me:$LINENO: WARNING: Specify absolute path to --with-tcl for subdir configuration" >&5
13265 echo "$as_me: WARNING: Specify absolute path to --with-tcl for subdir configuration" >&2;}
13266             ;;
13267     esac
13268 fi
13269
13270 # these are the other subdirectories we need to configure
13271
13272
13273 subdirs="$subdirs testsuite"
13274
13275
13276 echo "$as_me:$LINENO: checking for pid_t" >&5
13277 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
13278 if test "${ac_cv_type_pid_t+set}" = set; then
13279   echo $ECHO_N "(cached) $ECHO_C" >&6
13280 else
13281   cat >conftest.$ac_ext <<_ACEOF
13282 /* confdefs.h.  */
13283 _ACEOF
13284 cat confdefs.h >>conftest.$ac_ext
13285 cat >>conftest.$ac_ext <<_ACEOF
13286 /* end confdefs.h.  */
13287 $ac_includes_default
13288 int
13289 main ()
13290 {
13291 if ((pid_t *) 0)
13292   return 0;
13293 if (sizeof (pid_t))
13294   return 0;
13295   ;
13296   return 0;
13297 }
13298 _ACEOF
13299 rm -f conftest.$ac_objext
13300 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13301   (eval $ac_compile) 2>conftest.er1
13302   ac_status=$?
13303   grep -v '^ *+' conftest.er1 >conftest.err
13304   rm -f conftest.er1
13305   cat conftest.err >&5
13306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13307   (exit $ac_status); } &&
13308          { ac_try='test -z "$ac_c_werror_flag"
13309                          || test ! -s conftest.err'
13310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13311   (eval $ac_try) 2>&5
13312   ac_status=$?
13313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13314   (exit $ac_status); }; } &&
13315          { ac_try='test -s conftest.$ac_objext'
13316   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13317   (eval $ac_try) 2>&5
13318   ac_status=$?
13319   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13320   (exit $ac_status); }; }; then
13321   ac_cv_type_pid_t=yes
13322 else
13323   echo "$as_me: failed program was:" >&5
13324 sed 's/^/| /' conftest.$ac_ext >&5
13325
13326 ac_cv_type_pid_t=no
13327 fi
13328 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13329 fi
13330 echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
13331 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
13332 if test $ac_cv_type_pid_t = yes; then
13333   :
13334 else
13335
13336 cat >>confdefs.h <<_ACEOF
13337 #define pid_t int
13338 _ACEOF
13339
13340 fi
13341
13342
13343 echo "$as_me:$LINENO: checking if running Mach" >&5
13344 echo $ECHO_N "checking if running Mach... $ECHO_C" >&6
13345 mach=0
13346 case "${host}" in
13347   # Both Next and pure Mach behave identically with respect
13348   # to a few things, so just lump them together as "mach"
13349   *-*-mach*)            mach=1 ;;
13350   *-*-next*)            mach=1 ; next=1 ;;
13351 esac
13352
13353 if test $mach -eq 1 ; then
13354   echo "$as_me:$LINENO: result: yes" >&5
13355 echo "${ECHO_T}yes" >&6
13356 else
13357   echo "$as_me:$LINENO: result: no" >&5
13358 echo "${ECHO_T}no" >&6
13359 fi
13360
13361 echo "$as_me:$LINENO: checking if running MachTen" >&5
13362 echo $ECHO_N "checking if running MachTen... $ECHO_C" >&6
13363 # yet another Mach clone
13364 if test -r /MachTen ; then
13365   echo "$as_me:$LINENO: result: yes" >&5
13366 echo "${ECHO_T}yes" >&6
13367   mach=1
13368 else
13369   echo "$as_me:$LINENO: result: no" >&5
13370 echo "${ECHO_T}no" >&6
13371 fi
13372
13373 echo "$as_me:$LINENO: checking if on Pyramid" >&5
13374 echo $ECHO_N "checking if on Pyramid... $ECHO_C" >&6
13375 if test -r /bin/pyr ; then
13376   echo "$as_me:$LINENO: result: yes" >&5
13377 echo "${ECHO_T}yes" >&6
13378   pyr=1
13379 else
13380   echo "$as_me:$LINENO: result: no" >&5
13381 echo "${ECHO_T}no" >&6
13382   pyr=0
13383 fi
13384
13385 echo "$as_me:$LINENO: checking if on Apollo" >&5
13386 echo $ECHO_N "checking if on Apollo... $ECHO_C" >&6
13387 if test -r /usr/apollo/bin ; then
13388   echo "$as_me:$LINENO: result: yes" >&5
13389 echo "${ECHO_T}yes" >&6
13390   apollo=1
13391 else
13392   echo "$as_me:$LINENO: result: no" >&5
13393 echo "${ECHO_T}no" >&6
13394   apollo=0
13395 fi
13396
13397 echo "$as_me:$LINENO: checking if on Interactive" >&5
13398 echo $ECHO_N "checking if on Interactive... $ECHO_C" >&6
13399 if test "x`(uname -s) 2>/dev/null`" = xIUNIX; then
13400   echo "$as_me:$LINENO: result: yes" >&5
13401 echo "${ECHO_T}yes" >&6
13402   iunix=1
13403 else
13404   echo "$as_me:$LINENO: result: no" >&5
13405 echo "${ECHO_T}no" >&6
13406   iunix=0
13407 fi
13408
13409 echo "$as_me:$LINENO: checking stty to use" >&5
13410 echo $ECHO_N "checking stty to use... $ECHO_C" >&6
13411 if test -r /usr/local/bin/stty ; then
13412   STTY_BIN=/usr/local/bin/stty
13413 else
13414   STTY_BIN=/bin/stty
13415 fi
13416 echo "$as_me:$LINENO: result: $STTY_BIN" >&5
13417 echo "${ECHO_T}$STTY_BIN" >&6
13418
13419 echo "$as_me:$LINENO: checking if stty reads stdout" >&5
13420 echo $ECHO_N "checking if stty reads stdout... $ECHO_C" >&6
13421
13422 # On some systems stty can't be run in the background (svr4) or get it
13423 # wrong because they fail to complain (next, mach), so don't attempt
13424 # the test on some systems.
13425
13426 stty_reads_stdout=""
13427 case "${host}" in
13428   *-*-solaris*)         stty_reads_stdout=0 ;;
13429   *-*-irix*)            stty_reads_stdout=0 ;;
13430   *-*-sco3.2v[45]*)     stty_reads_stdout=1 ;;
13431   i[3456]86-*-sysv4.2MP)        stty_reads_stdout=0 ;;
13432   *-*-linux*)           stty_reads_stdout=0 ;;
13433   # Not sure about old convex but 5.2 definitely reads from stdout
13434   c[12]-*-*)            stty_reads_stdout=1 ;;
13435   *-*-aix[34]*) stty_reads_stdout=0 ;;
13436   *-*-hpux9*)           stty_reads_stdout=0 ;;
13437   *-*-hpux10*)          stty_reads_stdout=0 ;;
13438   *-*-osf[234]*)        stty_reads_stdout=0 ;;
13439   *-*-ultrix4.4)        stty_reads_stdout=0 ;;
13440   *-*-dgux*)            stty_reads_stdout=0 ;;
13441 esac
13442
13443 if test $mach -eq 1 ; then
13444   stty_reads_stdout=1
13445 fi
13446 if test $apollo -eq 1 ; then
13447   stty_reads_stdout=1
13448 fi
13449 if test $pyr -eq 1 ; then
13450   stty_reads_stdout=1
13451 fi
13452
13453 # if we still don't know, test
13454 if test x"${stty_reads_stdout}" = x"" ; then
13455   $STTY_BIN > /dev/null             2> /dev/null ; a=$?
13456   $STTY_BIN < /dev/tty  > /dev/null 2> /dev/null ; b=$?
13457   if test $a -ne 0 -a $b -ne 0; then
13458     stty_reads_stdout=1
13459   else
13460     stty_reads_stdout=0
13461   fi
13462 fi
13463
13464 if test ${stty_reads_stdout} -eq 1 ; then
13465   echo "$as_me:$LINENO: result: yes" >&5
13466 echo "${ECHO_T}yes" >&6
13467   cat >>confdefs.h <<\_ACEOF
13468 #define STTY_READS_STDOUT 1
13469 _ACEOF
13470
13471 else
13472   echo "$as_me:$LINENO: result: no" >&5
13473 echo "${ECHO_T}no" >&6
13474 fi
13475
13476 # Solaris 2.4 and later requires __EXTENSIONS__ in order to see all sorts
13477 # of traditional but nonstandard stuff in header files.
13478 echo "$as_me:$LINENO: checking if running Solaris" >&5
13479 echo $ECHO_N "checking if running Solaris... $ECHO_C" >&6
13480 solaris=0
13481 case "${host}" in
13482   *-*-solaris*)         solaris=1;;
13483 esac
13484
13485 if test $solaris -eq 1 ; then
13486   echo "$as_me:$LINENO: result: yes" >&5
13487 echo "${ECHO_T}yes" >&6
13488   cat >>confdefs.h <<\_ACEOF
13489 #define SOLARIS 1
13490 _ACEOF
13491
13492 else
13493   echo "$as_me:$LINENO: result: no" >&5
13494 echo "${ECHO_T}no" >&6
13495 fi
13496
13497 # On Interactive UNIX, -Xp must be added to LIBS in order to find strftime.
13498 # This test should really be done by Tcl.  So just check Tcl's definition.
13499 # If defective, add to all three LIBS.  (It's not actually necessary for
13500 # EXP_LIBS since -Xp will just be ignored the way that EXP_LIBS is used in
13501 # the Makefile, but we include it for consistency.)
13502
13503 if test $iunix -eq 1 ; then
13504   echo "$as_me:$LINENO: checking for strftime" >&5
13505 echo $ECHO_N "checking for strftime... $ECHO_C" >&6
13506 if test "${ac_cv_func_strftime+set}" = set; then
13507   echo $ECHO_N "(cached) $ECHO_C" >&6
13508 else
13509   cat >conftest.$ac_ext <<_ACEOF
13510 /* confdefs.h.  */
13511 _ACEOF
13512 cat confdefs.h >>conftest.$ac_ext
13513 cat >>conftest.$ac_ext <<_ACEOF
13514 /* end confdefs.h.  */
13515 /* Define strftime to an innocuous variant, in case <limits.h> declares strftime.
13516    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13517 #define strftime innocuous_strftime
13518
13519 /* System header to define __stub macros and hopefully few prototypes,
13520     which can conflict with char strftime (); below.
13521     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13522     <limits.h> exists even on freestanding compilers.  */
13523
13524 #ifdef __STDC__
13525 # include <limits.h>
13526 #else
13527 # include <assert.h>
13528 #endif
13529
13530 #undef strftime
13531
13532 /* Override any gcc2 internal prototype to avoid an error.  */
13533 #ifdef __cplusplus
13534 extern "C"
13535 {
13536 #endif
13537 /* We use char because int might match the return type of a gcc2
13538    builtin and then its argument prototype would still apply.  */
13539 char strftime ();
13540 /* The GNU C library defines this for functions which it implements
13541     to always fail with ENOSYS.  Some functions are actually named
13542     something starting with __ and the normal name is an alias.  */
13543 #if defined (__stub_strftime) || defined (__stub___strftime)
13544 choke me
13545 #else
13546 char (*f) () = strftime;
13547 #endif
13548 #ifdef __cplusplus
13549 }
13550 #endif
13551
13552 int
13553 main ()
13554 {
13555 return f != strftime;
13556   ;
13557   return 0;
13558 }
13559 _ACEOF
13560 rm -f conftest.$ac_objext conftest$ac_exeext
13561 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13562   (eval $ac_link) 2>conftest.er1
13563   ac_status=$?
13564   grep -v '^ *+' conftest.er1 >conftest.err
13565   rm -f conftest.er1
13566   cat conftest.err >&5
13567   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13568   (exit $ac_status); } &&
13569          { ac_try='test -z "$ac_c_werror_flag"
13570                          || test ! -s conftest.err'
13571   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13572   (eval $ac_try) 2>&5
13573   ac_status=$?
13574   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13575   (exit $ac_status); }; } &&
13576          { ac_try='test -s conftest$ac_exeext'
13577   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13578   (eval $ac_try) 2>&5
13579   ac_status=$?
13580   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13581   (exit $ac_status); }; }; then
13582   ac_cv_func_strftime=yes
13583 else
13584   echo "$as_me: failed program was:" >&5
13585 sed 's/^/| /' conftest.$ac_ext >&5
13586
13587 ac_cv_func_strftime=no
13588 fi
13589 rm -f conftest.err conftest.$ac_objext \
13590       conftest$ac_exeext conftest.$ac_ext
13591 fi
13592 echo "$as_me:$LINENO: result: $ac_cv_func_strftime" >&5
13593 echo "${ECHO_T}$ac_cv_func_strftime" >&6
13594 if test $ac_cv_func_strftime = yes; then
13595   :
13596 else
13597
13598         LIBS="${LIBS} -Xp"
13599
13600 fi
13601
13602 fi
13603
13604 ######################################################################
13605 #
13606 # Look for various header files
13607 #
13608
13609 #
13610 # Look for functions that may be missing
13611 #
13612 echo "$as_me:$LINENO: checking for memmove" >&5
13613 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
13614 if test "${ac_cv_func_memmove+set}" = set; then
13615   echo $ECHO_N "(cached) $ECHO_C" >&6
13616 else
13617   cat >conftest.$ac_ext <<_ACEOF
13618 /* confdefs.h.  */
13619 _ACEOF
13620 cat confdefs.h >>conftest.$ac_ext
13621 cat >>conftest.$ac_ext <<_ACEOF
13622 /* end confdefs.h.  */
13623 /* Define memmove to an innocuous variant, in case <limits.h> declares memmove.
13624    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13625 #define memmove innocuous_memmove
13626
13627 /* System header to define __stub macros and hopefully few prototypes,
13628     which can conflict with char memmove (); below.
13629     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13630     <limits.h> exists even on freestanding compilers.  */
13631
13632 #ifdef __STDC__
13633 # include <limits.h>
13634 #else
13635 # include <assert.h>
13636 #endif
13637
13638 #undef memmove
13639
13640 /* Override any gcc2 internal prototype to avoid an error.  */
13641 #ifdef __cplusplus
13642 extern "C"
13643 {
13644 #endif
13645 /* We use char because int might match the return type of a gcc2
13646    builtin and then its argument prototype would still apply.  */
13647 char memmove ();
13648 /* The GNU C library defines this for functions which it implements
13649     to always fail with ENOSYS.  Some functions are actually named
13650     something starting with __ and the normal name is an alias.  */
13651 #if defined (__stub_memmove) || defined (__stub___memmove)
13652 choke me
13653 #else
13654 char (*f) () = memmove;
13655 #endif
13656 #ifdef __cplusplus
13657 }
13658 #endif
13659
13660 int
13661 main ()
13662 {
13663 return f != memmove;
13664   ;
13665   return 0;
13666 }
13667 _ACEOF
13668 rm -f conftest.$ac_objext conftest$ac_exeext
13669 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13670   (eval $ac_link) 2>conftest.er1
13671   ac_status=$?
13672   grep -v '^ *+' conftest.er1 >conftest.err
13673   rm -f conftest.er1
13674   cat conftest.err >&5
13675   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13676   (exit $ac_status); } &&
13677          { ac_try='test -z "$ac_c_werror_flag"
13678                          || test ! -s conftest.err'
13679   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13683   (exit $ac_status); }; } &&
13684          { ac_try='test -s conftest$ac_exeext'
13685   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689   (exit $ac_status); }; }; then
13690   ac_cv_func_memmove=yes
13691 else
13692   echo "$as_me: failed program was:" >&5
13693 sed 's/^/| /' conftest.$ac_ext >&5
13694
13695 ac_cv_func_memmove=no
13696 fi
13697 rm -f conftest.err conftest.$ac_objext \
13698       conftest$ac_exeext conftest.$ac_ext
13699 fi
13700 echo "$as_me:$LINENO: result: $ac_cv_func_memmove" >&5
13701 echo "${ECHO_T}$ac_cv_func_memmove" >&6
13702 if test $ac_cv_func_memmove = yes; then
13703   cat >>confdefs.h <<\_ACEOF
13704 #define HAVE_MEMMOVE 1
13705 _ACEOF
13706
13707 fi
13708
13709 echo "$as_me:$LINENO: checking for sysconf" >&5
13710 echo $ECHO_N "checking for sysconf... $ECHO_C" >&6
13711 if test "${ac_cv_func_sysconf+set}" = set; then
13712   echo $ECHO_N "(cached) $ECHO_C" >&6
13713 else
13714   cat >conftest.$ac_ext <<_ACEOF
13715 /* confdefs.h.  */
13716 _ACEOF
13717 cat confdefs.h >>conftest.$ac_ext
13718 cat >>conftest.$ac_ext <<_ACEOF
13719 /* end confdefs.h.  */
13720 /* Define sysconf to an innocuous variant, in case <limits.h> declares sysconf.
13721    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13722 #define sysconf innocuous_sysconf
13723
13724 /* System header to define __stub macros and hopefully few prototypes,
13725     which can conflict with char sysconf (); below.
13726     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13727     <limits.h> exists even on freestanding compilers.  */
13728
13729 #ifdef __STDC__
13730 # include <limits.h>
13731 #else
13732 # include <assert.h>
13733 #endif
13734
13735 #undef sysconf
13736
13737 /* Override any gcc2 internal prototype to avoid an error.  */
13738 #ifdef __cplusplus
13739 extern "C"
13740 {
13741 #endif
13742 /* We use char because int might match the return type of a gcc2
13743    builtin and then its argument prototype would still apply.  */
13744 char sysconf ();
13745 /* The GNU C library defines this for functions which it implements
13746     to always fail with ENOSYS.  Some functions are actually named
13747     something starting with __ and the normal name is an alias.  */
13748 #if defined (__stub_sysconf) || defined (__stub___sysconf)
13749 choke me
13750 #else
13751 char (*f) () = sysconf;
13752 #endif
13753 #ifdef __cplusplus
13754 }
13755 #endif
13756
13757 int
13758 main ()
13759 {
13760 return f != sysconf;
13761   ;
13762   return 0;
13763 }
13764 _ACEOF
13765 rm -f conftest.$ac_objext conftest$ac_exeext
13766 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13767   (eval $ac_link) 2>conftest.er1
13768   ac_status=$?
13769   grep -v '^ *+' conftest.er1 >conftest.err
13770   rm -f conftest.er1
13771   cat conftest.err >&5
13772   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13773   (exit $ac_status); } &&
13774          { ac_try='test -z "$ac_c_werror_flag"
13775                          || test ! -s conftest.err'
13776   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13777   (eval $ac_try) 2>&5
13778   ac_status=$?
13779   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13780   (exit $ac_status); }; } &&
13781          { ac_try='test -s conftest$ac_exeext'
13782   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13783   (eval $ac_try) 2>&5
13784   ac_status=$?
13785   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13786   (exit $ac_status); }; }; then
13787   ac_cv_func_sysconf=yes
13788 else
13789   echo "$as_me: failed program was:" >&5
13790 sed 's/^/| /' conftest.$ac_ext >&5
13791
13792 ac_cv_func_sysconf=no
13793 fi
13794 rm -f conftest.err conftest.$ac_objext \
13795       conftest$ac_exeext conftest.$ac_ext
13796 fi
13797 echo "$as_me:$LINENO: result: $ac_cv_func_sysconf" >&5
13798 echo "${ECHO_T}$ac_cv_func_sysconf" >&6
13799 if test $ac_cv_func_sysconf = yes; then
13800   cat >>confdefs.h <<\_ACEOF
13801 #define HAVE_SYSCONF 1
13802 _ACEOF
13803
13804 fi
13805
13806 echo "$as_me:$LINENO: checking for strftime" >&5
13807 echo $ECHO_N "checking for strftime... $ECHO_C" >&6
13808 if test "${ac_cv_func_strftime+set}" = set; then
13809   echo $ECHO_N "(cached) $ECHO_C" >&6
13810 else
13811   cat >conftest.$ac_ext <<_ACEOF
13812 /* confdefs.h.  */
13813 _ACEOF
13814 cat confdefs.h >>conftest.$ac_ext
13815 cat >>conftest.$ac_ext <<_ACEOF
13816 /* end confdefs.h.  */
13817 /* Define strftime to an innocuous variant, in case <limits.h> declares strftime.
13818    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13819 #define strftime innocuous_strftime
13820
13821 /* System header to define __stub macros and hopefully few prototypes,
13822     which can conflict with char strftime (); below.
13823     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13824     <limits.h> exists even on freestanding compilers.  */
13825
13826 #ifdef __STDC__
13827 # include <limits.h>
13828 #else
13829 # include <assert.h>
13830 #endif
13831
13832 #undef strftime
13833
13834 /* Override any gcc2 internal prototype to avoid an error.  */
13835 #ifdef __cplusplus
13836 extern "C"
13837 {
13838 #endif
13839 /* We use char because int might match the return type of a gcc2
13840    builtin and then its argument prototype would still apply.  */
13841 char strftime ();
13842 /* The GNU C library defines this for functions which it implements
13843     to always fail with ENOSYS.  Some functions are actually named
13844     something starting with __ and the normal name is an alias.  */
13845 #if defined (__stub_strftime) || defined (__stub___strftime)
13846 choke me
13847 #else
13848 char (*f) () = strftime;
13849 #endif
13850 #ifdef __cplusplus
13851 }
13852 #endif
13853
13854 int
13855 main ()
13856 {
13857 return f != strftime;
13858   ;
13859   return 0;
13860 }
13861 _ACEOF
13862 rm -f conftest.$ac_objext conftest$ac_exeext
13863 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13864   (eval $ac_link) 2>conftest.er1
13865   ac_status=$?
13866   grep -v '^ *+' conftest.er1 >conftest.err
13867   rm -f conftest.er1
13868   cat conftest.err >&5
13869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13870   (exit $ac_status); } &&
13871          { ac_try='test -z "$ac_c_werror_flag"
13872                          || test ! -s conftest.err'
13873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13874   (eval $ac_try) 2>&5
13875   ac_status=$?
13876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13877   (exit $ac_status); }; } &&
13878          { ac_try='test -s conftest$ac_exeext'
13879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13880   (eval $ac_try) 2>&5
13881   ac_status=$?
13882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13883   (exit $ac_status); }; }; then
13884   ac_cv_func_strftime=yes
13885 else
13886   echo "$as_me: failed program was:" >&5
13887 sed 's/^/| /' conftest.$ac_ext >&5
13888
13889 ac_cv_func_strftime=no
13890 fi
13891 rm -f conftest.err conftest.$ac_objext \
13892       conftest$ac_exeext conftest.$ac_ext
13893 fi
13894 echo "$as_me:$LINENO: result: $ac_cv_func_strftime" >&5
13895 echo "${ECHO_T}$ac_cv_func_strftime" >&6
13896 if test $ac_cv_func_strftime = yes; then
13897   cat >>confdefs.h <<\_ACEOF
13898 #define HAVE_STRFTIME 1
13899 _ACEOF
13900
13901 fi
13902
13903 echo "$as_me:$LINENO: checking for strchr" >&5
13904 echo $ECHO_N "checking for strchr... $ECHO_C" >&6
13905 if test "${ac_cv_func_strchr+set}" = set; then
13906   echo $ECHO_N "(cached) $ECHO_C" >&6
13907 else
13908   cat >conftest.$ac_ext <<_ACEOF
13909 /* confdefs.h.  */
13910 _ACEOF
13911 cat confdefs.h >>conftest.$ac_ext
13912 cat >>conftest.$ac_ext <<_ACEOF
13913 /* end confdefs.h.  */
13914 /* Define strchr to an innocuous variant, in case <limits.h> declares strchr.
13915    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
13916 #define strchr innocuous_strchr
13917
13918 /* System header to define __stub macros and hopefully few prototypes,
13919     which can conflict with char strchr (); below.
13920     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13921     <limits.h> exists even on freestanding compilers.  */
13922
13923 #ifdef __STDC__
13924 # include <limits.h>
13925 #else
13926 # include <assert.h>
13927 #endif
13928
13929 #undef strchr
13930
13931 /* Override any gcc2 internal prototype to avoid an error.  */
13932 #ifdef __cplusplus
13933 extern "C"
13934 {
13935 #endif
13936 /* We use char because int might match the return type of a gcc2
13937    builtin and then its argument prototype would still apply.  */
13938 char strchr ();
13939 /* The GNU C library defines this for functions which it implements
13940     to always fail with ENOSYS.  Some functions are actually named
13941     something starting with __ and the normal name is an alias.  */
13942 #if defined (__stub_strchr) || defined (__stub___strchr)
13943 choke me
13944 #else
13945 char (*f) () = strchr;
13946 #endif
13947 #ifdef __cplusplus
13948 }
13949 #endif
13950
13951 int
13952 main ()
13953 {
13954 return f != strchr;
13955   ;
13956   return 0;
13957 }
13958 _ACEOF
13959 rm -f conftest.$ac_objext conftest$ac_exeext
13960 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13961   (eval $ac_link) 2>conftest.er1
13962   ac_status=$?
13963   grep -v '^ *+' conftest.er1 >conftest.err
13964   rm -f conftest.er1
13965   cat conftest.err >&5
13966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13967   (exit $ac_status); } &&
13968          { ac_try='test -z "$ac_c_werror_flag"
13969                          || test ! -s conftest.err'
13970   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13971   (eval $ac_try) 2>&5
13972   ac_status=$?
13973   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13974   (exit $ac_status); }; } &&
13975          { ac_try='test -s conftest$ac_exeext'
13976   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13977   (eval $ac_try) 2>&5
13978   ac_status=$?
13979   echo "$as_me:$LINENO: \$? = $ac_status" >&5
13980   (exit $ac_status); }; }; then
13981   ac_cv_func_strchr=yes
13982 else
13983   echo "$as_me: failed program was:" >&5
13984 sed 's/^/| /' conftest.$ac_ext >&5
13985
13986 ac_cv_func_strchr=no
13987 fi
13988 rm -f conftest.err conftest.$ac_objext \
13989       conftest$ac_exeext conftest.$ac_ext
13990 fi
13991 echo "$as_me:$LINENO: result: $ac_cv_func_strchr" >&5
13992 echo "${ECHO_T}$ac_cv_func_strchr" >&6
13993 if test $ac_cv_func_strchr = yes; then
13994   cat >>confdefs.h <<\_ACEOF
13995 #define HAVE_STRCHR 1
13996 _ACEOF
13997
13998 fi
13999
14000 echo "$as_me:$LINENO: checking for timezone" >&5
14001 echo $ECHO_N "checking for timezone... $ECHO_C" >&6
14002 if test "${ac_cv_func_timezone+set}" = set; then
14003   echo $ECHO_N "(cached) $ECHO_C" >&6
14004 else
14005   cat >conftest.$ac_ext <<_ACEOF
14006 /* confdefs.h.  */
14007 _ACEOF
14008 cat confdefs.h >>conftest.$ac_ext
14009 cat >>conftest.$ac_ext <<_ACEOF
14010 /* end confdefs.h.  */
14011 /* Define timezone to an innocuous variant, in case <limits.h> declares timezone.
14012    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14013 #define timezone innocuous_timezone
14014
14015 /* System header to define __stub macros and hopefully few prototypes,
14016     which can conflict with char timezone (); below.
14017     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14018     <limits.h> exists even on freestanding compilers.  */
14019
14020 #ifdef __STDC__
14021 # include <limits.h>
14022 #else
14023 # include <assert.h>
14024 #endif
14025
14026 #undef timezone
14027
14028 /* Override any gcc2 internal prototype to avoid an error.  */
14029 #ifdef __cplusplus
14030 extern "C"
14031 {
14032 #endif
14033 /* We use char because int might match the return type of a gcc2
14034    builtin and then its argument prototype would still apply.  */
14035 char timezone ();
14036 /* The GNU C library defines this for functions which it implements
14037     to always fail with ENOSYS.  Some functions are actually named
14038     something starting with __ and the normal name is an alias.  */
14039 #if defined (__stub_timezone) || defined (__stub___timezone)
14040 choke me
14041 #else
14042 char (*f) () = timezone;
14043 #endif
14044 #ifdef __cplusplus
14045 }
14046 #endif
14047
14048 int
14049 main ()
14050 {
14051 return f != timezone;
14052   ;
14053   return 0;
14054 }
14055 _ACEOF
14056 rm -f conftest.$ac_objext conftest$ac_exeext
14057 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14058   (eval $ac_link) 2>conftest.er1
14059   ac_status=$?
14060   grep -v '^ *+' conftest.er1 >conftest.err
14061   rm -f conftest.er1
14062   cat conftest.err >&5
14063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064   (exit $ac_status); } &&
14065          { ac_try='test -z "$ac_c_werror_flag"
14066                          || test ! -s conftest.err'
14067   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14068   (eval $ac_try) 2>&5
14069   ac_status=$?
14070   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14071   (exit $ac_status); }; } &&
14072          { ac_try='test -s conftest$ac_exeext'
14073   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14074   (eval $ac_try) 2>&5
14075   ac_status=$?
14076   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14077   (exit $ac_status); }; }; then
14078   ac_cv_func_timezone=yes
14079 else
14080   echo "$as_me: failed program was:" >&5
14081 sed 's/^/| /' conftest.$ac_ext >&5
14082
14083 ac_cv_func_timezone=no
14084 fi
14085 rm -f conftest.err conftest.$ac_objext \
14086       conftest$ac_exeext conftest.$ac_ext
14087 fi
14088 echo "$as_me:$LINENO: result: $ac_cv_func_timezone" >&5
14089 echo "${ECHO_T}$ac_cv_func_timezone" >&6
14090 if test $ac_cv_func_timezone = yes; then
14091   cat >>confdefs.h <<\_ACEOF
14092 #define HAVE_TIMEZONE 1
14093 _ACEOF
14094
14095 fi
14096
14097 echo "$as_me:$LINENO: checking for siglongjmp" >&5
14098 echo $ECHO_N "checking for siglongjmp... $ECHO_C" >&6
14099 if test "${ac_cv_func_siglongjmp+set}" = set; then
14100   echo $ECHO_N "(cached) $ECHO_C" >&6
14101 else
14102   cat >conftest.$ac_ext <<_ACEOF
14103 /* confdefs.h.  */
14104 _ACEOF
14105 cat confdefs.h >>conftest.$ac_ext
14106 cat >>conftest.$ac_ext <<_ACEOF
14107 /* end confdefs.h.  */
14108 /* Define siglongjmp to an innocuous variant, in case <limits.h> declares siglongjmp.
14109    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14110 #define siglongjmp innocuous_siglongjmp
14111
14112 /* System header to define __stub macros and hopefully few prototypes,
14113     which can conflict with char siglongjmp (); below.
14114     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14115     <limits.h> exists even on freestanding compilers.  */
14116
14117 #ifdef __STDC__
14118 # include <limits.h>
14119 #else
14120 # include <assert.h>
14121 #endif
14122
14123 #undef siglongjmp
14124
14125 /* Override any gcc2 internal prototype to avoid an error.  */
14126 #ifdef __cplusplus
14127 extern "C"
14128 {
14129 #endif
14130 /* We use char because int might match the return type of a gcc2
14131    builtin and then its argument prototype would still apply.  */
14132 char siglongjmp ();
14133 /* The GNU C library defines this for functions which it implements
14134     to always fail with ENOSYS.  Some functions are actually named
14135     something starting with __ and the normal name is an alias.  */
14136 #if defined (__stub_siglongjmp) || defined (__stub___siglongjmp)
14137 choke me
14138 #else
14139 char (*f) () = siglongjmp;
14140 #endif
14141 #ifdef __cplusplus
14142 }
14143 #endif
14144
14145 int
14146 main ()
14147 {
14148 return f != siglongjmp;
14149   ;
14150   return 0;
14151 }
14152 _ACEOF
14153 rm -f conftest.$ac_objext conftest$ac_exeext
14154 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14155   (eval $ac_link) 2>conftest.er1
14156   ac_status=$?
14157   grep -v '^ *+' conftest.er1 >conftest.err
14158   rm -f conftest.er1
14159   cat conftest.err >&5
14160   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14161   (exit $ac_status); } &&
14162          { ac_try='test -z "$ac_c_werror_flag"
14163                          || test ! -s conftest.err'
14164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14168   (exit $ac_status); }; } &&
14169          { ac_try='test -s conftest$ac_exeext'
14170   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14171   (eval $ac_try) 2>&5
14172   ac_status=$?
14173   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14174   (exit $ac_status); }; }; then
14175   ac_cv_func_siglongjmp=yes
14176 else
14177   echo "$as_me: failed program was:" >&5
14178 sed 's/^/| /' conftest.$ac_ext >&5
14179
14180 ac_cv_func_siglongjmp=no
14181 fi
14182 rm -f conftest.err conftest.$ac_objext \
14183       conftest$ac_exeext conftest.$ac_ext
14184 fi
14185 echo "$as_me:$LINENO: result: $ac_cv_func_siglongjmp" >&5
14186 echo "${ECHO_T}$ac_cv_func_siglongjmp" >&6
14187 if test $ac_cv_func_siglongjmp = yes; then
14188   cat >>confdefs.h <<\_ACEOF
14189 #define HAVE_SIGLONGJMP 1
14190 _ACEOF
14191
14192 fi
14193
14194
14195 # dnl check for memcpy by hand
14196 # because Unixware 2.0 handles it specially and refuses to compile
14197 # autoconf's automatic test that is a call with no arguments
14198 echo "$as_me:$LINENO: checking for memcpy" >&5
14199 echo $ECHO_N "checking for memcpy... $ECHO_C" >&6
14200 cat >conftest.$ac_ext <<_ACEOF
14201 /* confdefs.h.  */
14202 _ACEOF
14203 cat confdefs.h >>conftest.$ac_ext
14204 cat >>conftest.$ac_ext <<_ACEOF
14205 /* end confdefs.h.  */
14206
14207 int
14208 main ()
14209 {
14210
14211 char *s1, *s2;
14212 memcpy(s1,s2,0);
14213
14214   ;
14215   return 0;
14216 }
14217 _ACEOF
14218 rm -f conftest.$ac_objext conftest$ac_exeext
14219 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14220   (eval $ac_link) 2>conftest.er1
14221   ac_status=$?
14222   grep -v '^ *+' conftest.er1 >conftest.err
14223   rm -f conftest.er1
14224   cat conftest.err >&5
14225   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14226   (exit $ac_status); } &&
14227          { ac_try='test -z "$ac_c_werror_flag"
14228                          || test ! -s conftest.err'
14229   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14230   (eval $ac_try) 2>&5
14231   ac_status=$?
14232   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233   (exit $ac_status); }; } &&
14234          { ac_try='test -s conftest$ac_exeext'
14235   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14236   (eval $ac_try) 2>&5
14237   ac_status=$?
14238   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14239   (exit $ac_status); }; }; then
14240   echo "$as_me:$LINENO: result: yes" >&5
14241 echo "${ECHO_T}yes" >&6
14242         cat >>confdefs.h <<\_ACEOF
14243 #define HAVE_MEMCPY 1
14244 _ACEOF
14245
14246
14247 else
14248   echo "$as_me: failed program was:" >&5
14249 sed 's/^/| /' conftest.$ac_ext >&5
14250
14251 echo "$as_me:$LINENO: result: no" >&5
14252 echo "${ECHO_T}no" >&6
14253
14254 fi
14255 rm -f conftest.err conftest.$ac_objext \
14256       conftest$ac_exeext conftest.$ac_ext
14257
14258 # Some systems only define WNOHANG if _POSIX_SOURCE is defined
14259 # The following merely tests that sys/wait.h can be included
14260 # and if so that WNOHANG is not defined.  The only place I've
14261 # seen this is ISC.
14262 echo "$as_me:$LINENO: checking if WNOHANG requires _POSIX_SOURCE" >&5
14263 echo $ECHO_N "checking if WNOHANG requires _POSIX_SOURCE... $ECHO_C" >&6
14264 if test "$cross_compiling" = yes; then
14265   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
14266 echo "$as_me: error: Expect can't be cross compiled" >&2;}
14267    { (exit 1); exit 1; }; }
14268
14269 else
14270   cat >conftest.$ac_ext <<_ACEOF
14271 /* confdefs.h.  */
14272 _ACEOF
14273 cat confdefs.h >>conftest.$ac_ext
14274 cat >>conftest.$ac_ext <<_ACEOF
14275 /* end confdefs.h.  */
14276
14277 #include <sys/wait.h>
14278 main() {
14279 #ifndef WNOHANG
14280         return 0;
14281 #else
14282         return 1;
14283 #endif
14284 }
14285 _ACEOF
14286 rm -f conftest$ac_exeext
14287 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14288   (eval $ac_link) 2>&5
14289   ac_status=$?
14290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14291   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14292   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   echo "$as_me:$LINENO: result: yes" >&5
14298 echo "${ECHO_T}yes" >&6
14299         cat >>confdefs.h <<\_ACEOF
14300 #define WNOHANG_REQUIRES_POSIX_SOURCE 1
14301 _ACEOF
14302
14303
14304 else
14305   echo "$as_me: program exited with status $ac_status" >&5
14306 echo "$as_me: failed program was:" >&5
14307 sed 's/^/| /' conftest.$ac_ext >&5
14308
14309 ( exit $ac_status )
14310 echo "$as_me:$LINENO: result: no" >&5
14311 echo "${ECHO_T}no" >&6
14312
14313 fi
14314 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14315 fi
14316
14317 echo "$as_me:$LINENO: checking if any value exists for WNOHANG" >&5
14318 echo $ECHO_N "checking if any value exists for WNOHANG... $ECHO_C" >&6
14319 rm -rf wnohang
14320 if test "$cross_compiling" = yes; then
14321   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
14322 echo "$as_me: error: Expect can't be cross compiled" >&2;}
14323    { (exit 1); exit 1; }; }
14324
14325 else
14326   cat >conftest.$ac_ext <<_ACEOF
14327 /* confdefs.h.  */
14328 _ACEOF
14329 cat confdefs.h >>conftest.$ac_ext
14330 cat >>conftest.$ac_ext <<_ACEOF
14331 /* end confdefs.h.  */
14332
14333 #include <stdio.h>
14334 #include <sys/wait.h>
14335 main() {
14336 #ifdef WNOHANG
14337         FILE *fp = fopen("wnohang","w");
14338         fprintf(fp,"%d",WNOHANG);
14339         fclose(fp);
14340         return 0;
14341 #else
14342         return 1;
14343 #endif
14344 }
14345 _ACEOF
14346 rm -f conftest$ac_exeext
14347 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14348   (eval $ac_link) 2>&5
14349   ac_status=$?
14350   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14351   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14352   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14353   (eval $ac_try) 2>&5
14354   ac_status=$?
14355   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14356   (exit $ac_status); }; }; then
14357   echo "$as_me:$LINENO: result: yes" >&5
14358 echo "${ECHO_T}yes" >&6
14359         cat >>confdefs.h <<_ACEOF
14360 #define WNOHANG_BACKUP_VALUE `cat wnohang`
14361 _ACEOF
14362
14363         rm -f wnohang
14364
14365 else
14366   echo "$as_me: program exited with status $ac_status" >&5
14367 echo "$as_me: failed program was:" >&5
14368 sed 's/^/| /' conftest.$ac_ext >&5
14369
14370 ( exit $ac_status )
14371 echo "$as_me:$LINENO: result: no" >&5
14372 echo "${ECHO_T}no" >&6
14373         cat >>confdefs.h <<\_ACEOF
14374 #define WNOHANG_BACKUP_VALUE 1
14375 _ACEOF
14376
14377
14378 fi
14379 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14380 fi
14381
14382 #
14383 # check how signals work
14384 #
14385
14386 # Check for the data type of the mask used in select().
14387 # This picks up HP braindamage which defines fd_set and then
14388 # proceeds to ignore it and use int.
14389 # Pattern matching on int could be loosened.
14390 # Can't use ac_header_egrep since that doesn't see prototypes with K&R cpp.
14391 echo "$as_me:$LINENO: checking mask type of select" >&5
14392 echo $ECHO_N "checking mask type of select... $ECHO_C" >&6
14393 if egrep "select\(size_t, int" /usr/include/sys/time.h >/dev/null 2>&1; then
14394   echo "$as_me:$LINENO: result: int" >&5
14395 echo "${ECHO_T}int" >&6
14396   cat >>confdefs.h <<\_ACEOF
14397 #define SELECT_MASK_TYPE int
14398 _ACEOF
14399
14400 else
14401   echo "$as_me:$LINENO: result: none" >&5
14402 echo "${ECHO_T}none" >&6
14403   cat >>confdefs.h <<\_ACEOF
14404 #define SELECT_MASK_TYPE fd_set
14405 _ACEOF
14406
14407 fi
14408
14409
14410 # FIXME: check if alarm exists
14411 echo "$as_me:$LINENO: checking if signals need to be re-armed" >&5
14412 echo $ECHO_N "checking if signals need to be re-armed... $ECHO_C" >&6
14413 if test "$cross_compiling" = yes; then
14414   { echo "$as_me:$LINENO: WARNING: Expect can't be cross compiled" >&5
14415 echo "$as_me: WARNING: Expect can't be cross compiled" >&2;}
14416
14417 else
14418   cat >conftest.$ac_ext <<_ACEOF
14419 /* confdefs.h.  */
14420 _ACEOF
14421 cat confdefs.h >>conftest.$ac_ext
14422 cat >>conftest.$ac_ext <<_ACEOF
14423 /* end confdefs.h.  */
14424
14425 #include <signal.h>
14426 #define RETSIGTYPE $retsigtype
14427
14428 int signal_rearms = 0;
14429
14430 RETSIGTYPE
14431 child_sigint_handler(n)
14432 int n;
14433 {
14434 }
14435
14436 RETSIGTYPE
14437 parent_sigint_handler(n)
14438 int n;
14439 {
14440 signal_rearms++;
14441 }
14442
14443 main()
14444 {
14445         signal(SIGINT,parent_sigint_handler);
14446
14447         if (0 == fork()) {
14448                 signal(SIGINT,child_sigint_handler);
14449                 kill(getpid(),SIGINT);
14450                 kill(getpid(),SIGINT);
14451                 kill(getppid(),SIGINT);
14452         } else {
14453                 int status;
14454
14455                 wait(&status);
14456                 unlink("core");
14457                 exit(signal_rearms);
14458         }
14459 }
14460 _ACEOF
14461 rm -f conftest$ac_exeext
14462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14463   (eval $ac_link) 2>&5
14464   ac_status=$?
14465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14466   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14467   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14468   (eval $ac_try) 2>&5
14469   ac_status=$?
14470   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14471   (exit $ac_status); }; }; then
14472   echo "$as_me:$LINENO: result: yes" >&5
14473 echo "${ECHO_T}yes" >&6
14474         cat >>confdefs.h <<\_ACEOF
14475 #define REARM_SIG 1
14476 _ACEOF
14477
14478
14479 else
14480   echo "$as_me: program exited with status $ac_status" >&5
14481 echo "$as_me: failed program was:" >&5
14482 sed 's/^/| /' conftest.$ac_ext >&5
14483
14484 ( exit $ac_status )
14485 echo "$as_me:$LINENO: result: no" >&5
14486 echo "${ECHO_T}no" >&6
14487
14488 fi
14489 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14490 fi
14491
14492 # HPUX7 has trouble with the big cat so split it
14493 # Owen Rees <rtor@ansa.co.uk> 29Mar93
14494 SEDDEFS="${SEDDEFS}CONFEOF
14495 cat >> conftest.sed <<CONFEOF
14496 "
14497 #
14498
14499 # There are multiple versions of getpty, alas.
14500 # I don't remember who has the first one, but Convex just added one
14501 # so check for it.  Unfortunately, there is no header so the only
14502 # reasonable way to make sure is to look it we are on a Convex.
14503 echo "$as_me:$LINENO: checking if on Convex" >&5
14504 echo $ECHO_N "checking if on Convex... $ECHO_C" >&6
14505 convex=0
14506 case "${host}" in
14507   c[12]-*-*)            convex=1;;
14508 esac
14509
14510 if test $convex -eq 1 ; then
14511   echo "$as_me:$LINENO: result: yes" >&5
14512 echo "${ECHO_T}yes" >&6
14513   cat >>confdefs.h <<\_ACEOF
14514 #define CONVEX 1
14515 _ACEOF
14516
14517 else
14518   echo "$as_me:$LINENO: result: no" >&5
14519 echo "${ECHO_T}no" >&6
14520 fi
14521
14522
14523 echo "$as_me:$LINENO: checking if on HP" >&5
14524 echo $ECHO_N "checking if on HP... $ECHO_C" >&6
14525 if test "x`(uname) 2>/dev/null`" = xHP-UX; then
14526   echo "$as_me:$LINENO: result: yes" >&5
14527 echo "${ECHO_T}yes" >&6
14528   hp=1
14529 else
14530   echo "$as_me:$LINENO: result: no" >&5
14531 echo "${ECHO_T}no" >&6
14532   hp=0
14533 fi
14534
14535 echo "$as_me:$LINENO: checking sane default stty arguments" >&5
14536 echo $ECHO_N "checking sane default stty arguments... $ECHO_C" >&6
14537 DEFAULT_STTY_ARGS="sane"
14538
14539 if test $mach -eq 1 ; then
14540         DEFAULT_STTY_ARGS="cooked"
14541 fi
14542
14543 if test $hp -eq 1 ; then
14544         DEFAULT_STTY_ARGS="sane kill \15"
14545 fi
14546
14547 echo "$as_me:$LINENO: result: $DEFAULT_STTY_ARG" >&5
14548 echo "${ECHO_T}$DEFAULT_STTY_ARG" >&6
14549
14550 # Look for various features to determine what kind of pty
14551 # we have. For some weird reason, ac_compile_check would not
14552 # work, but ac_test_program does.
14553 #
14554 echo "$as_me:$LINENO: checking for HP style pty allocation" >&5
14555 echo $ECHO_N "checking for HP style pty allocation... $ECHO_C" >&6
14556 # following test fails on DECstations and other things that don't grok -c
14557 # but that's ok, since they don't have PTYMs anyway
14558 if test -r /dev/ptym/ptyp0 2>/dev/null ; then
14559     echo "$as_me:$LINENO: result: yes" >&5
14560 echo "${ECHO_T}yes" >&6
14561     cat >>confdefs.h <<\_ACEOF
14562 #define HAVE_PTYM 1
14563 _ACEOF
14564
14565 else
14566     echo "$as_me:$LINENO: result: no" >&5
14567 echo "${ECHO_T}no" >&6
14568 fi
14569
14570 echo "$as_me:$LINENO: checking for HP style pty trapping" >&5
14571 echo $ECHO_N "checking for HP style pty trapping... $ECHO_C" >&6
14572 cat >conftest.$ac_ext <<_ACEOF
14573 /* confdefs.h.  */
14574 _ACEOF
14575 cat confdefs.h >>conftest.$ac_ext
14576 cat >>conftest.$ac_ext <<_ACEOF
14577 /* end confdefs.h.  */
14578 #include <sys/ptyio.h>
14579
14580 _ACEOF
14581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14582   $EGREP "struct.*request_info" >/dev/null 2>&1; then
14583   echo "$as_me:$LINENO: result: yes" >&5
14584 echo "${ECHO_T}yes" >&6
14585         cat >>confdefs.h <<\_ACEOF
14586 #define HAVE_PTYTRAP 1
14587 _ACEOF
14588
14589
14590 else
14591   echo "$as_me:$LINENO: result: no" >&5
14592 echo "${ECHO_T}no" >&6
14593
14594 fi
14595 rm -f conftest*
14596
14597
14598 echo "$as_me:$LINENO: checking for AIX new-style pty allocation" >&5
14599 echo $ECHO_N "checking for AIX new-style pty allocation... $ECHO_C" >&6
14600 if test -r /dev/ptc -a -r /dev/pts ; then
14601     echo "$as_me:$LINENO: result: yes" >&5
14602 echo "${ECHO_T}yes" >&6
14603     cat >>confdefs.h <<\_ACEOF
14604 #define HAVE_PTC_PTS 1
14605 _ACEOF
14606
14607 else
14608     echo "$as_me:$LINENO: result: no" >&5
14609 echo "${ECHO_T}no" >&6
14610 fi
14611
14612 echo "$as_me:$LINENO: checking for SGI old-style pty allocation" >&5
14613 echo $ECHO_N "checking for SGI old-style pty allocation... $ECHO_C" >&6
14614 if test -r /dev/ptc -a ! -r /dev/pts ; then
14615     echo "$as_me:$LINENO: result: yes" >&5
14616 echo "${ECHO_T}yes" >&6
14617     cat >>confdefs.h <<\_ACEOF
14618 #define HAVE_PTC 1
14619 _ACEOF
14620
14621 else
14622     echo "$as_me:$LINENO: result: no" >&5
14623 echo "${ECHO_T}no" >&6
14624 fi
14625
14626 # On SCO OpenServer, two types of ptys are available: SVR4 streams and c-list.
14627 # The library routines to open the SVR4 ptys are broken on certain systems and
14628 # the SCO command to increase the number of ptys only configure c-list ones
14629 # anyway.  So we chose these, which have a special numbering scheme.
14630 #
14631 echo "$as_me:$LINENO: checking for SCO style pty allocation" >&5
14632 echo $ECHO_N "checking for SCO style pty allocation... $ECHO_C" >&6
14633 sco_ptys=""
14634 case "${host}" in
14635   *-sco3.2v[45]*)       sco_clist_ptys=1 svr4_ptys_broken=1;;
14636 esac
14637
14638 if test x"${sco_clist_ptys}" != x"" ; then
14639   echo "$as_me:$LINENO: result: yes" >&5
14640 echo "${ECHO_T}yes" >&6
14641   cat >>confdefs.h <<\_ACEOF
14642 #define HAVE_SCO_CLIST_PTYS 1
14643 _ACEOF
14644
14645 else
14646   echo "$as_me:$LINENO: result: no" >&5
14647 echo "${ECHO_T}no" >&6
14648 fi
14649
14650 echo "$as_me:$LINENO: checking for SVR4 style pty allocation" >&5
14651 echo $ECHO_N "checking for SVR4 style pty allocation... $ECHO_C" >&6
14652 if test -r /dev/ptmx -a "x$svr4_ptys_broken" = x ; then
14653   echo "$as_me:$LINENO: result: yes" >&5
14654 echo "${ECHO_T}yes" >&6
14655   cat >>confdefs.h <<\_ACEOF
14656 #define HAVE_PTMX 1
14657 _ACEOF
14658
14659   # aargg. Some systems need libpt.a to use /dev/ptmx
14660   echo "$as_me:$LINENO: checking for libpts=\"-lpt\" in -lpt" >&5
14661 echo $ECHO_N "checking for libpts=\"-lpt\" in -lpt... $ECHO_C" >&6
14662 if test "${ac_cv_lib_pt_libpts___lpt_+set}" = set; then
14663   echo $ECHO_N "(cached) $ECHO_C" >&6
14664 else
14665   ac_check_lib_save_LIBS=$LIBS
14666 LIBS="-lpt  $LIBS"
14667 cat >conftest.$ac_ext <<_ACEOF
14668 /* confdefs.h.  */
14669 _ACEOF
14670 cat confdefs.h >>conftest.$ac_ext
14671 cat >>conftest.$ac_ext <<_ACEOF
14672 /* end confdefs.h.  */
14673
14674 /* Override any gcc2 internal prototype to avoid an error.  */
14675 #ifdef __cplusplus
14676 extern "C"
14677 #endif
14678 /* We use char because int might match the return type of a gcc2
14679    builtin and then its argument prototype would still apply.  */
14680 char libpts="-lpt" ();
14681 int
14682 main ()
14683 {
14684 libpts="-lpt" ();
14685   ;
14686   return 0;
14687 }
14688 _ACEOF
14689 rm -f conftest.$ac_objext conftest$ac_exeext
14690 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14691   (eval $ac_link) 2>conftest.er1
14692   ac_status=$?
14693   grep -v '^ *+' conftest.er1 >conftest.err
14694   rm -f conftest.er1
14695   cat conftest.err >&5
14696   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14697   (exit $ac_status); } &&
14698          { ac_try='test -z "$ac_c_werror_flag"
14699                          || test ! -s conftest.err'
14700   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14701   (eval $ac_try) 2>&5
14702   ac_status=$?
14703   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14704   (exit $ac_status); }; } &&
14705          { ac_try='test -s conftest$ac_exeext'
14706   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14707   (eval $ac_try) 2>&5
14708   ac_status=$?
14709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14710   (exit $ac_status); }; }; then
14711   ac_cv_lib_pt_libpts___lpt_=yes
14712 else
14713   echo "$as_me: failed program was:" >&5
14714 sed 's/^/| /' conftest.$ac_ext >&5
14715
14716 ac_cv_lib_pt_libpts___lpt_=no
14717 fi
14718 rm -f conftest.err conftest.$ac_objext \
14719       conftest$ac_exeext conftest.$ac_ext
14720 LIBS=$ac_check_lib_save_LIBS
14721 fi
14722 echo "$as_me:$LINENO: result: $ac_cv_lib_pt_libpts___lpt_" >&5
14723 echo "${ECHO_T}$ac_cv_lib_pt_libpts___lpt_" >&6
14724 if test $ac_cv_lib_pt_libpts___lpt_ = yes; then
14725   libpts=""
14726 fi
14727
14728   echo "$as_me:$LINENO: checking for ptsname" >&5
14729 echo $ECHO_N "checking for ptsname... $ECHO_C" >&6
14730 if test "${ac_cv_func_ptsname+set}" = set; then
14731   echo $ECHO_N "(cached) $ECHO_C" >&6
14732 else
14733   cat >conftest.$ac_ext <<_ACEOF
14734 /* confdefs.h.  */
14735 _ACEOF
14736 cat confdefs.h >>conftest.$ac_ext
14737 cat >>conftest.$ac_ext <<_ACEOF
14738 /* end confdefs.h.  */
14739 /* Define ptsname to an innocuous variant, in case <limits.h> declares ptsname.
14740    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14741 #define ptsname innocuous_ptsname
14742
14743 /* System header to define __stub macros and hopefully few prototypes,
14744     which can conflict with char ptsname (); below.
14745     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14746     <limits.h> exists even on freestanding compilers.  */
14747
14748 #ifdef __STDC__
14749 # include <limits.h>
14750 #else
14751 # include <assert.h>
14752 #endif
14753
14754 #undef ptsname
14755
14756 /* Override any gcc2 internal prototype to avoid an error.  */
14757 #ifdef __cplusplus
14758 extern "C"
14759 {
14760 #endif
14761 /* We use char because int might match the return type of a gcc2
14762    builtin and then its argument prototype would still apply.  */
14763 char ptsname ();
14764 /* The GNU C library defines this for functions which it implements
14765     to always fail with ENOSYS.  Some functions are actually named
14766     something starting with __ and the normal name is an alias.  */
14767 #if defined (__stub_ptsname) || defined (__stub___ptsname)
14768 choke me
14769 #else
14770 char (*f) () = ptsname;
14771 #endif
14772 #ifdef __cplusplus
14773 }
14774 #endif
14775
14776 int
14777 main ()
14778 {
14779 return f != ptsname;
14780   ;
14781   return 0;
14782 }
14783 _ACEOF
14784 rm -f conftest.$ac_objext conftest$ac_exeext
14785 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14786   (eval $ac_link) 2>conftest.er1
14787   ac_status=$?
14788   grep -v '^ *+' conftest.er1 >conftest.err
14789   rm -f conftest.er1
14790   cat conftest.err >&5
14791   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14792   (exit $ac_status); } &&
14793          { ac_try='test -z "$ac_c_werror_flag"
14794                          || test ! -s conftest.err'
14795   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14796   (eval $ac_try) 2>&5
14797   ac_status=$?
14798   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14799   (exit $ac_status); }; } &&
14800          { ac_try='test -s conftest$ac_exeext'
14801   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14802   (eval $ac_try) 2>&5
14803   ac_status=$?
14804   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805   (exit $ac_status); }; }; then
14806   ac_cv_func_ptsname=yes
14807 else
14808   echo "$as_me: failed program was:" >&5
14809 sed 's/^/| /' conftest.$ac_ext >&5
14810
14811 ac_cv_func_ptsname=no
14812 fi
14813 rm -f conftest.err conftest.$ac_objext \
14814       conftest$ac_exeext conftest.$ac_ext
14815 fi
14816 echo "$as_me:$LINENO: result: $ac_cv_func_ptsname" >&5
14817 echo "${ECHO_T}$ac_cv_func_ptsname" >&6
14818 if test $ac_cv_func_ptsname = yes; then
14819   :
14820 else
14821   LIBS="${LIBS} $libpts"
14822 fi
14823
14824 else
14825   echo "$as_me:$LINENO: result: no" >&5
14826 echo "${ECHO_T}no" >&6
14827 fi
14828
14829 # In OSF/1 case, SVR4 are somewhat different.
14830 # Gregory Depp <depp@osf.org> 17Aug93
14831 echo "$as_me:$LINENO: checking for OSF/1 style pty allocation" >&5
14832 echo $ECHO_N "checking for OSF/1 style pty allocation... $ECHO_C" >&6
14833 if test -r /dev/ptmx_bsd ; then
14834     cat >>confdefs.h <<\_ACEOF
14835 #define HAVE_PTMX_BSD 1
14836 _ACEOF
14837
14838     echo "$as_me:$LINENO: result: yes" >&5
14839 echo "${ECHO_T}yes" >&6
14840 else
14841     echo "$as_me:$LINENO: result: no" >&5
14842 echo "${ECHO_T}no" >&6
14843 fi
14844
14845 tcgetattr=0
14846 tcsetattr=0
14847 echo "$as_me:$LINENO: checking for tcgetattr" >&5
14848 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14849 if test "${ac_cv_func_tcgetattr+set}" = set; then
14850   echo $ECHO_N "(cached) $ECHO_C" >&6
14851 else
14852   cat >conftest.$ac_ext <<_ACEOF
14853 /* confdefs.h.  */
14854 _ACEOF
14855 cat confdefs.h >>conftest.$ac_ext
14856 cat >>conftest.$ac_ext <<_ACEOF
14857 /* end confdefs.h.  */
14858 /* Define tcgetattr to an innocuous variant, in case <limits.h> declares tcgetattr.
14859    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14860 #define tcgetattr innocuous_tcgetattr
14861
14862 /* System header to define __stub macros and hopefully few prototypes,
14863     which can conflict with char tcgetattr (); below.
14864     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14865     <limits.h> exists even on freestanding compilers.  */
14866
14867 #ifdef __STDC__
14868 # include <limits.h>
14869 #else
14870 # include <assert.h>
14871 #endif
14872
14873 #undef tcgetattr
14874
14875 /* Override any gcc2 internal prototype to avoid an error.  */
14876 #ifdef __cplusplus
14877 extern "C"
14878 {
14879 #endif
14880 /* We use char because int might match the return type of a gcc2
14881    builtin and then its argument prototype would still apply.  */
14882 char tcgetattr ();
14883 /* The GNU C library defines this for functions which it implements
14884     to always fail with ENOSYS.  Some functions are actually named
14885     something starting with __ and the normal name is an alias.  */
14886 #if defined (__stub_tcgetattr) || defined (__stub___tcgetattr)
14887 choke me
14888 #else
14889 char (*f) () = tcgetattr;
14890 #endif
14891 #ifdef __cplusplus
14892 }
14893 #endif
14894
14895 int
14896 main ()
14897 {
14898 return f != tcgetattr;
14899   ;
14900   return 0;
14901 }
14902 _ACEOF
14903 rm -f conftest.$ac_objext conftest$ac_exeext
14904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14905   (eval $ac_link) 2>conftest.er1
14906   ac_status=$?
14907   grep -v '^ *+' conftest.er1 >conftest.err
14908   rm -f conftest.er1
14909   cat conftest.err >&5
14910   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14911   (exit $ac_status); } &&
14912          { ac_try='test -z "$ac_c_werror_flag"
14913                          || test ! -s conftest.err'
14914   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14915   (eval $ac_try) 2>&5
14916   ac_status=$?
14917   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14918   (exit $ac_status); }; } &&
14919          { ac_try='test -s conftest$ac_exeext'
14920   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14921   (eval $ac_try) 2>&5
14922   ac_status=$?
14923   echo "$as_me:$LINENO: \$? = $ac_status" >&5
14924   (exit $ac_status); }; }; then
14925   ac_cv_func_tcgetattr=yes
14926 else
14927   echo "$as_me: failed program was:" >&5
14928 sed 's/^/| /' conftest.$ac_ext >&5
14929
14930 ac_cv_func_tcgetattr=no
14931 fi
14932 rm -f conftest.err conftest.$ac_objext \
14933       conftest$ac_exeext conftest.$ac_ext
14934 fi
14935 echo "$as_me:$LINENO: result: $ac_cv_func_tcgetattr" >&5
14936 echo "${ECHO_T}$ac_cv_func_tcgetattr" >&6
14937 if test $ac_cv_func_tcgetattr = yes; then
14938   tcgetattr=1
14939 fi
14940
14941 echo "$as_me:$LINENO: checking for tcsetattr" >&5
14942 echo $ECHO_N "checking for tcsetattr... $ECHO_C" >&6
14943 if test "${ac_cv_func_tcsetattr+set}" = set; then
14944   echo $ECHO_N "(cached) $ECHO_C" >&6
14945 else
14946   cat >conftest.$ac_ext <<_ACEOF
14947 /* confdefs.h.  */
14948 _ACEOF
14949 cat confdefs.h >>conftest.$ac_ext
14950 cat >>conftest.$ac_ext <<_ACEOF
14951 /* end confdefs.h.  */
14952 /* Define tcsetattr to an innocuous variant, in case <limits.h> declares tcsetattr.
14953    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
14954 #define tcsetattr innocuous_tcsetattr
14955
14956 /* System header to define __stub macros and hopefully few prototypes,
14957     which can conflict with char tcsetattr (); below.
14958     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14959     <limits.h> exists even on freestanding compilers.  */
14960
14961 #ifdef __STDC__
14962 # include <limits.h>
14963 #else
14964 # include <assert.h>
14965 #endif
14966
14967 #undef tcsetattr
14968
14969 /* Override any gcc2 internal prototype to avoid an error.  */
14970 #ifdef __cplusplus
14971 extern "C"
14972 {
14973 #endif
14974 /* We use char because int might match the return type of a gcc2
14975    builtin and then its argument prototype would still apply.  */
14976 char tcsetattr ();
14977 /* The GNU C library defines this for functions which it implements
14978     to always fail with ENOSYS.  Some functions are actually named
14979     something starting with __ and the normal name is an alias.  */
14980 #if defined (__stub_tcsetattr) || defined (__stub___tcsetattr)
14981 choke me
14982 #else
14983 char (*f) () = tcsetattr;
14984 #endif
14985 #ifdef __cplusplus
14986 }
14987 #endif
14988
14989 int
14990 main ()
14991 {
14992 return f != tcsetattr;
14993   ;
14994   return 0;
14995 }
14996 _ACEOF
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14999   (eval $ac_link) 2>conftest.er1
15000   ac_status=$?
15001   grep -v '^ *+' conftest.er1 >conftest.err
15002   rm -f conftest.er1
15003   cat conftest.err >&5
15004   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15005   (exit $ac_status); } &&
15006          { ac_try='test -z "$ac_c_werror_flag"
15007                          || test ! -s conftest.err'
15008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15009   (eval $ac_try) 2>&5
15010   ac_status=$?
15011   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15012   (exit $ac_status); }; } &&
15013          { ac_try='test -s conftest$ac_exeext'
15014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15015   (eval $ac_try) 2>&5
15016   ac_status=$?
15017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15018   (exit $ac_status); }; }; then
15019   ac_cv_func_tcsetattr=yes
15020 else
15021   echo "$as_me: failed program was:" >&5
15022 sed 's/^/| /' conftest.$ac_ext >&5
15023
15024 ac_cv_func_tcsetattr=no
15025 fi
15026 rm -f conftest.err conftest.$ac_objext \
15027       conftest$ac_exeext conftest.$ac_ext
15028 fi
15029 echo "$as_me:$LINENO: result: $ac_cv_func_tcsetattr" >&5
15030 echo "${ECHO_T}$ac_cv_func_tcsetattr" >&6
15031 if test $ac_cv_func_tcsetattr = yes; then
15032   tcsetattr=1
15033 fi
15034
15035 if test $tcgetattr -eq 1 -a $tcsetattr -eq 1 ; then
15036     cat >>confdefs.h <<\_ACEOF
15037 #define HAVE_TCSETATTR 1
15038 _ACEOF
15039
15040     cat >>confdefs.h <<\_ACEOF
15041 #define POSIX 1
15042 _ACEOF
15043
15044 fi
15045
15046 # first check for the pure bsd
15047 echo "$as_me:$LINENO: checking for struct sgttyb" >&5
15048 echo $ECHO_N "checking for struct sgttyb... $ECHO_C" >&6
15049 if test "$cross_compiling" = yes; then
15050   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15051 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15052    { (exit 1); exit 1; }; }
15053
15054 else
15055   cat >conftest.$ac_ext <<_ACEOF
15056 /* confdefs.h.  */
15057 _ACEOF
15058 cat confdefs.h >>conftest.$ac_ext
15059 cat >>conftest.$ac_ext <<_ACEOF
15060 /* end confdefs.h.  */
15061
15062 #include <sgtty.h>
15063 main()
15064 {
15065   struct sgttyb tmp;
15066   exit(0);
15067 }
15068 _ACEOF
15069 rm -f conftest$ac_exeext
15070 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15071   (eval $ac_link) 2>&5
15072   ac_status=$?
15073   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15074   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15076   (eval $ac_try) 2>&5
15077   ac_status=$?
15078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079   (exit $ac_status); }; }; then
15080   echo "$as_me:$LINENO: result: yes" >&5
15081 echo "${ECHO_T}yes" >&6
15082         cat >>confdefs.h <<\_ACEOF
15083 #define HAVE_SGTTYB 1
15084 _ACEOF
15085
15086         PTY_TYPE=sgttyb
15087
15088 else
15089   echo "$as_me: program exited with status $ac_status" >&5
15090 echo "$as_me: failed program was:" >&5
15091 sed 's/^/| /' conftest.$ac_ext >&5
15092
15093 ( exit $ac_status )
15094 echo "$as_me:$LINENO: result: no" >&5
15095 echo "${ECHO_T}no" >&6
15096
15097 fi
15098 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15099 fi
15100
15101 # mach systems have include files for unimplemented features
15102 # so avoid doing following test on those systems
15103 if test $mach -eq 0 ; then
15104
15105   # next check for the older style ttys
15106   # note that if we detect termio.h (only), we still set PTY_TYPE=termios
15107   # since that just controls which of pty_XXXX.c file is use and
15108   # pty_termios.c is set up to handle pty_termio.
15109   echo "$as_me:$LINENO: checking for struct termio" >&5
15110 echo $ECHO_N "checking for struct termio... $ECHO_C" >&6
15111   if test "$cross_compiling" = yes; then
15112   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15113 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15114    { (exit 1); exit 1; }; }
15115
15116 else
15117   cat >conftest.$ac_ext <<_ACEOF
15118 /* confdefs.h.  */
15119 _ACEOF
15120 cat confdefs.h >>conftest.$ac_ext
15121 cat >>conftest.$ac_ext <<_ACEOF
15122 /* end confdefs.h.  */
15123 #include <termio.h>
15124   main()
15125   {
15126     struct termio tmp;
15127     exit(0);
15128   }
15129 _ACEOF
15130 rm -f conftest$ac_exeext
15131 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15132   (eval $ac_link) 2>&5
15133   ac_status=$?
15134   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15135   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15136   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15137   (eval $ac_try) 2>&5
15138   ac_status=$?
15139   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15140   (exit $ac_status); }; }; then
15141   cat >>confdefs.h <<\_ACEOF
15142 #define HAVE_TERMIO 1
15143 _ACEOF
15144
15145         PTY_TYPE=termios
15146         echo "$as_me:$LINENO: result: yes" >&5
15147 echo "${ECHO_T}yes" >&6
15148
15149 else
15150   echo "$as_me: program exited with status $ac_status" >&5
15151 echo "$as_me: failed program was:" >&5
15152 sed 's/^/| /' conftest.$ac_ext >&5
15153
15154 ( exit $ac_status )
15155 echo "$as_me:$LINENO: result: no" >&5
15156 echo "${ECHO_T}no" >&6
15157
15158 fi
15159 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15160 fi
15161
15162   # now check for the new style ttys (not yet posix)
15163   echo "$as_me:$LINENO: checking for struct termios" >&5
15164 echo $ECHO_N "checking for struct termios... $ECHO_C" >&6
15165   if test "$cross_compiling" = yes; then
15166   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15167 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15168    { (exit 1); exit 1; }; }
15169
15170 else
15171   cat >conftest.$ac_ext <<_ACEOF
15172 /* confdefs.h.  */
15173 _ACEOF
15174 cat confdefs.h >>conftest.$ac_ext
15175 cat >>conftest.$ac_ext <<_ACEOF
15176 /* end confdefs.h.  */
15177
15178   /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
15179 #  ifdef HAVE_INTTYPES_H
15180 #  include <inttypes.h>
15181 #  endif
15182 #  include <termios.h>
15183   main()
15184   {
15185     struct termios tmp;
15186     exit(0);
15187   }
15188 _ACEOF
15189 rm -f conftest$ac_exeext
15190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15191   (eval $ac_link) 2>&5
15192   ac_status=$?
15193   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15194   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15195   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15196   (eval $ac_try) 2>&5
15197   ac_status=$?
15198   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15199   (exit $ac_status); }; }; then
15200   cat >>confdefs.h <<\_ACEOF
15201 #define HAVE_TERMIOS 1
15202 _ACEOF
15203
15204         PTY_TYPE=termios
15205         echo "$as_me:$LINENO: result: yes" >&5
15206 echo "${ECHO_T}yes" >&6
15207
15208 else
15209   echo "$as_me: program exited with status $ac_status" >&5
15210 echo "$as_me: failed program was:" >&5
15211 sed 's/^/| /' conftest.$ac_ext >&5
15212
15213 ( exit $ac_status )
15214 echo "$as_me:$LINENO: result: no" >&5
15215 echo "${ECHO_T}no" >&6
15216
15217 fi
15218 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15219 fi
15220 fi
15221
15222 echo "$as_me:$LINENO: checking if TCGETS or TCGETA in termios.h" >&5
15223 echo $ECHO_N "checking if TCGETS or TCGETA in termios.h... $ECHO_C" >&6
15224 if test "$cross_compiling" = yes; then
15225   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15226 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15227    { (exit 1); exit 1; }; }
15228
15229 else
15230   cat >conftest.$ac_ext <<_ACEOF
15231 /* confdefs.h.  */
15232 _ACEOF
15233 cat confdefs.h >>conftest.$ac_ext
15234 cat >>conftest.$ac_ext <<_ACEOF
15235 /* end confdefs.h.  */
15236
15237 /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
15238 #ifdef HAVE_INTTYPES_H
15239 #include <inttypes.h>
15240 #endif
15241 #include <termios.h>
15242 main() {
15243 #if defined(TCGETS) || defined(TCGETA)
15244         return 0;
15245 #else
15246         return 1;
15247 #endif
15248 }
15249 _ACEOF
15250 rm -f conftest$ac_exeext
15251 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15252   (eval $ac_link) 2>&5
15253   ac_status=$?
15254   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15255   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15256   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15257   (eval $ac_try) 2>&5
15258   ac_status=$?
15259   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15260   (exit $ac_status); }; }; then
15261   cat >>confdefs.h <<\_ACEOF
15262 #define HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H 1
15263 _ACEOF
15264
15265         echo "$as_me:$LINENO: result: yes" >&5
15266 echo "${ECHO_T}yes" >&6
15267
15268 else
15269   echo "$as_me: program exited with status $ac_status" >&5
15270 echo "$as_me: failed program was:" >&5
15271 sed 's/^/| /' conftest.$ac_ext >&5
15272
15273 ( exit $ac_status )
15274 echo "$as_me:$LINENO: result: no" >&5
15275 echo "${ECHO_T}no" >&6
15276
15277 fi
15278 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15279 fi
15280
15281 echo "$as_me:$LINENO: checking if TIOCGWINSZ in termios.h" >&5
15282 echo $ECHO_N "checking if TIOCGWINSZ in termios.h... $ECHO_C" >&6
15283 if test "$cross_compiling" = yes; then
15284   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15285 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15286    { (exit 1); exit 1; }; }
15287
15288 else
15289   cat >conftest.$ac_ext <<_ACEOF
15290 /* confdefs.h.  */
15291 _ACEOF
15292 cat confdefs.h >>conftest.$ac_ext
15293 cat >>conftest.$ac_ext <<_ACEOF
15294 /* end confdefs.h.  */
15295
15296 /* including termios.h on Solaris 5.6 fails unless inttypes.h included */
15297 #ifdef HAVE_INTTYPES_H
15298 #include <inttypes.h>
15299 #endif
15300 #include <termios.h>
15301 main() {
15302 #ifdef TIOCGWINSZ
15303         return 0;
15304 #else
15305         return 1;
15306 #endif
15307 }
15308 _ACEOF
15309 rm -f conftest$ac_exeext
15310 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15311   (eval $ac_link) 2>&5
15312   ac_status=$?
15313   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15314   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15315   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15316   (eval $ac_try) 2>&5
15317   ac_status=$?
15318   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15319   (exit $ac_status); }; }; then
15320   cat >>confdefs.h <<\_ACEOF
15321 #define HAVE_TIOCGWINSZ_IN_TERMIOS_H 1
15322 _ACEOF
15323
15324         echo "$as_me:$LINENO: result: yes" >&5
15325 echo "${ECHO_T}yes" >&6
15326
15327 else
15328   echo "$as_me: program exited with status $ac_status" >&5
15329 echo "$as_me: failed program was:" >&5
15330 sed 's/^/| /' conftest.$ac_ext >&5
15331
15332 ( exit $ac_status )
15333 echo "$as_me:$LINENO: result: no" >&5
15334 echo "${ECHO_T}no" >&6
15335
15336 fi
15337 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15338 fi
15339
15340 # finally check for Cray style ttys
15341 echo "$as_me:$LINENO: checking for Cray-style ptys" >&5
15342 echo $ECHO_N "checking for Cray-style ptys... $ECHO_C" >&6
15343 SETUID=":"
15344 if test "$cross_compiling" = yes; then
15345   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15346 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15347    { (exit 1); exit 1; }; }
15348
15349 else
15350   cat >conftest.$ac_ext <<_ACEOF
15351 /* confdefs.h.  */
15352 _ACEOF
15353 cat confdefs.h >>conftest.$ac_ext
15354 cat >>conftest.$ac_ext <<_ACEOF
15355 /* end confdefs.h.  */
15356
15357 main(){
15358 #ifdef CRAY
15359         return 0;
15360 #else
15361         return 1;
15362 #endif
15363 }
15364
15365 _ACEOF
15366 rm -f conftest$ac_exeext
15367 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15368   (eval $ac_link) 2>&5
15369   ac_status=$?
15370   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15372   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15373   (eval $ac_try) 2>&5
15374   ac_status=$?
15375   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376   (exit $ac_status); }; }; then
15377   PTY_TYPE=unicos
15378         SETUID="chmod u+s"
15379         echo "$as_me:$LINENO: result: yes" >&5
15380 echo "${ECHO_T}yes" >&6
15381
15382 else
15383   echo "$as_me: program exited with status $ac_status" >&5
15384 echo "$as_me: failed program was:" >&5
15385 sed 's/^/| /' conftest.$ac_ext >&5
15386
15387 ( exit $ac_status )
15388 echo "$as_me:$LINENO: result: no" >&5
15389 echo "${ECHO_T}no" >&6
15390
15391 fi
15392 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15393 fi
15394
15395 #
15396 # Check for select and/or poll. If both exist, we prefer select.
15397 # if neither exists, define SIMPLE_EVENT.
15398 #
15399 select=0
15400 poll=0
15401 unset ac_cv_func_select
15402 echo "$as_me:$LINENO: checking for select" >&5
15403 echo $ECHO_N "checking for select... $ECHO_C" >&6
15404 if test "${ac_cv_func_select+set}" = set; then
15405   echo $ECHO_N "(cached) $ECHO_C" >&6
15406 else
15407   cat >conftest.$ac_ext <<_ACEOF
15408 /* confdefs.h.  */
15409 _ACEOF
15410 cat confdefs.h >>conftest.$ac_ext
15411 cat >>conftest.$ac_ext <<_ACEOF
15412 /* end confdefs.h.  */
15413 /* Define select to an innocuous variant, in case <limits.h> declares select.
15414    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15415 #define select innocuous_select
15416
15417 /* System header to define __stub macros and hopefully few prototypes,
15418     which can conflict with char select (); below.
15419     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15420     <limits.h> exists even on freestanding compilers.  */
15421
15422 #ifdef __STDC__
15423 # include <limits.h>
15424 #else
15425 # include <assert.h>
15426 #endif
15427
15428 #undef select
15429
15430 /* Override any gcc2 internal prototype to avoid an error.  */
15431 #ifdef __cplusplus
15432 extern "C"
15433 {
15434 #endif
15435 /* We use char because int might match the return type of a gcc2
15436    builtin and then its argument prototype would still apply.  */
15437 char select ();
15438 /* The GNU C library defines this for functions which it implements
15439     to always fail with ENOSYS.  Some functions are actually named
15440     something starting with __ and the normal name is an alias.  */
15441 #if defined (__stub_select) || defined (__stub___select)
15442 choke me
15443 #else
15444 char (*f) () = select;
15445 #endif
15446 #ifdef __cplusplus
15447 }
15448 #endif
15449
15450 int
15451 main ()
15452 {
15453 return f != select;
15454   ;
15455   return 0;
15456 }
15457 _ACEOF
15458 rm -f conftest.$ac_objext conftest$ac_exeext
15459 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15460   (eval $ac_link) 2>conftest.er1
15461   ac_status=$?
15462   grep -v '^ *+' conftest.er1 >conftest.err
15463   rm -f conftest.er1
15464   cat conftest.err >&5
15465   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466   (exit $ac_status); } &&
15467          { ac_try='test -z "$ac_c_werror_flag"
15468                          || test ! -s conftest.err'
15469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15470   (eval $ac_try) 2>&5
15471   ac_status=$?
15472   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15473   (exit $ac_status); }; } &&
15474          { ac_try='test -s conftest$ac_exeext'
15475   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15476   (eval $ac_try) 2>&5
15477   ac_status=$?
15478   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15479   (exit $ac_status); }; }; then
15480   ac_cv_func_select=yes
15481 else
15482   echo "$as_me: failed program was:" >&5
15483 sed 's/^/| /' conftest.$ac_ext >&5
15484
15485 ac_cv_func_select=no
15486 fi
15487 rm -f conftest.err conftest.$ac_objext \
15488       conftest$ac_exeext conftest.$ac_ext
15489 fi
15490 echo "$as_me:$LINENO: result: $ac_cv_func_select" >&5
15491 echo "${ECHO_T}$ac_cv_func_select" >&6
15492 if test $ac_cv_func_select = yes; then
15493   select=1
15494 fi
15495
15496 echo "$as_me:$LINENO: checking for poll" >&5
15497 echo $ECHO_N "checking for poll... $ECHO_C" >&6
15498 if test "${ac_cv_func_poll+set}" = set; then
15499   echo $ECHO_N "(cached) $ECHO_C" >&6
15500 else
15501   cat >conftest.$ac_ext <<_ACEOF
15502 /* confdefs.h.  */
15503 _ACEOF
15504 cat confdefs.h >>conftest.$ac_ext
15505 cat >>conftest.$ac_ext <<_ACEOF
15506 /* end confdefs.h.  */
15507 /* Define poll to an innocuous variant, in case <limits.h> declares poll.
15508    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15509 #define poll innocuous_poll
15510
15511 /* System header to define __stub macros and hopefully few prototypes,
15512     which can conflict with char poll (); below.
15513     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15514     <limits.h> exists even on freestanding compilers.  */
15515
15516 #ifdef __STDC__
15517 # include <limits.h>
15518 #else
15519 # include <assert.h>
15520 #endif
15521
15522 #undef poll
15523
15524 /* Override any gcc2 internal prototype to avoid an error.  */
15525 #ifdef __cplusplus
15526 extern "C"
15527 {
15528 #endif
15529 /* We use char because int might match the return type of a gcc2
15530    builtin and then its argument prototype would still apply.  */
15531 char poll ();
15532 /* The GNU C library defines this for functions which it implements
15533     to always fail with ENOSYS.  Some functions are actually named
15534     something starting with __ and the normal name is an alias.  */
15535 #if defined (__stub_poll) || defined (__stub___poll)
15536 choke me
15537 #else
15538 char (*f) () = poll;
15539 #endif
15540 #ifdef __cplusplus
15541 }
15542 #endif
15543
15544 int
15545 main ()
15546 {
15547 return f != poll;
15548   ;
15549   return 0;
15550 }
15551 _ACEOF
15552 rm -f conftest.$ac_objext conftest$ac_exeext
15553 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15554   (eval $ac_link) 2>conftest.er1
15555   ac_status=$?
15556   grep -v '^ *+' conftest.er1 >conftest.err
15557   rm -f conftest.er1
15558   cat conftest.err >&5
15559   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15560   (exit $ac_status); } &&
15561          { ac_try='test -z "$ac_c_werror_flag"
15562                          || test ! -s conftest.err'
15563   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15564   (eval $ac_try) 2>&5
15565   ac_status=$?
15566   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15567   (exit $ac_status); }; } &&
15568          { ac_try='test -s conftest$ac_exeext'
15569   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15570   (eval $ac_try) 2>&5
15571   ac_status=$?
15572   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15573   (exit $ac_status); }; }; then
15574   ac_cv_func_poll=yes
15575 else
15576   echo "$as_me: failed program was:" >&5
15577 sed 's/^/| /' conftest.$ac_ext >&5
15578
15579 ac_cv_func_poll=no
15580 fi
15581 rm -f conftest.err conftest.$ac_objext \
15582       conftest$ac_exeext conftest.$ac_ext
15583 fi
15584 echo "$as_me:$LINENO: result: $ac_cv_func_poll" >&5
15585 echo "${ECHO_T}$ac_cv_func_poll" >&6
15586 if test $ac_cv_func_poll = yes; then
15587   poll=1
15588 fi
15589
15590 echo "$as_me:$LINENO: checking event handling" >&5
15591 echo $ECHO_N "checking event handling... $ECHO_C" >&6
15592 if test $select -eq 1 ; then
15593   EVENT_TYPE=select
15594   EVENT_ABLE=event
15595   echo "$as_me:$LINENO: result: via select" >&5
15596 echo "${ECHO_T}via select" >&6
15597 elif test $poll -eq 1 ; then
15598   EVENT_TYPE=poll
15599   EVENT_ABLE=event
15600   echo "$as_me:$LINENO: result: via poll" >&5
15601 echo "${ECHO_T}via poll" >&6
15602 else
15603   EVENT_TYPE=simple
15604   EVENT_ABLE=noevent
15605   echo "$as_me:$LINENO: result: none" >&5
15606 echo "${ECHO_T}none" >&6
15607   cat >>confdefs.h <<\_ACEOF
15608 #define SIMPLE_EVENT 1
15609 _ACEOF
15610
15611 fi
15612
15613
15614 for ac_func in _getpty
15615 do
15616 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15617 echo "$as_me:$LINENO: checking for $ac_func" >&5
15618 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15619 if eval "test \"\${$as_ac_var+set}\" = set"; then
15620   echo $ECHO_N "(cached) $ECHO_C" >&6
15621 else
15622   cat >conftest.$ac_ext <<_ACEOF
15623 /* confdefs.h.  */
15624 _ACEOF
15625 cat confdefs.h >>conftest.$ac_ext
15626 cat >>conftest.$ac_ext <<_ACEOF
15627 /* end confdefs.h.  */
15628 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15629    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15630 #define $ac_func innocuous_$ac_func
15631
15632 /* System header to define __stub macros and hopefully few prototypes,
15633     which can conflict with char $ac_func (); below.
15634     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15635     <limits.h> exists even on freestanding compilers.  */
15636
15637 #ifdef __STDC__
15638 # include <limits.h>
15639 #else
15640 # include <assert.h>
15641 #endif
15642
15643 #undef $ac_func
15644
15645 /* Override any gcc2 internal prototype to avoid an error.  */
15646 #ifdef __cplusplus
15647 extern "C"
15648 {
15649 #endif
15650 /* We use char because int might match the return type of a gcc2
15651    builtin and then its argument prototype would still apply.  */
15652 char $ac_func ();
15653 /* The GNU C library defines this for functions which it implements
15654     to always fail with ENOSYS.  Some functions are actually named
15655     something starting with __ and the normal name is an alias.  */
15656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15657 choke me
15658 #else
15659 char (*f) () = $ac_func;
15660 #endif
15661 #ifdef __cplusplus
15662 }
15663 #endif
15664
15665 int
15666 main ()
15667 {
15668 return f != $ac_func;
15669   ;
15670   return 0;
15671 }
15672 _ACEOF
15673 rm -f conftest.$ac_objext conftest$ac_exeext
15674 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15675   (eval $ac_link) 2>conftest.er1
15676   ac_status=$?
15677   grep -v '^ *+' conftest.er1 >conftest.err
15678   rm -f conftest.er1
15679   cat conftest.err >&5
15680   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681   (exit $ac_status); } &&
15682          { ac_try='test -z "$ac_c_werror_flag"
15683                          || test ! -s conftest.err'
15684   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15685   (eval $ac_try) 2>&5
15686   ac_status=$?
15687   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15688   (exit $ac_status); }; } &&
15689          { ac_try='test -s conftest$ac_exeext'
15690   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15691   (eval $ac_try) 2>&5
15692   ac_status=$?
15693   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15694   (exit $ac_status); }; }; then
15695   eval "$as_ac_var=yes"
15696 else
15697   echo "$as_me: failed program was:" >&5
15698 sed 's/^/| /' conftest.$ac_ext >&5
15699
15700 eval "$as_ac_var=no"
15701 fi
15702 rm -f conftest.err conftest.$ac_objext \
15703       conftest$ac_exeext conftest.$ac_ext
15704 fi
15705 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15706 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15707 if test `eval echo '${'$as_ac_var'}'` = yes; then
15708   cat >>confdefs.h <<_ACEOF
15709 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15710 _ACEOF
15711
15712 fi
15713 done
15714
15715
15716 for ac_func in getpty
15717 do
15718 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15719 echo "$as_me:$LINENO: checking for $ac_func" >&5
15720 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15721 if eval "test \"\${$as_ac_var+set}\" = set"; then
15722   echo $ECHO_N "(cached) $ECHO_C" >&6
15723 else
15724   cat >conftest.$ac_ext <<_ACEOF
15725 /* confdefs.h.  */
15726 _ACEOF
15727 cat confdefs.h >>conftest.$ac_ext
15728 cat >>conftest.$ac_ext <<_ACEOF
15729 /* end confdefs.h.  */
15730 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15731    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
15732 #define $ac_func innocuous_$ac_func
15733
15734 /* System header to define __stub macros and hopefully few prototypes,
15735     which can conflict with char $ac_func (); below.
15736     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15737     <limits.h> exists even on freestanding compilers.  */
15738
15739 #ifdef __STDC__
15740 # include <limits.h>
15741 #else
15742 # include <assert.h>
15743 #endif
15744
15745 #undef $ac_func
15746
15747 /* Override any gcc2 internal prototype to avoid an error.  */
15748 #ifdef __cplusplus
15749 extern "C"
15750 {
15751 #endif
15752 /* We use char because int might match the return type of a gcc2
15753    builtin and then its argument prototype would still apply.  */
15754 char $ac_func ();
15755 /* The GNU C library defines this for functions which it implements
15756     to always fail with ENOSYS.  Some functions are actually named
15757     something starting with __ and the normal name is an alias.  */
15758 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15759 choke me
15760 #else
15761 char (*f) () = $ac_func;
15762 #endif
15763 #ifdef __cplusplus
15764 }
15765 #endif
15766
15767 int
15768 main ()
15769 {
15770 return f != $ac_func;
15771   ;
15772   return 0;
15773 }
15774 _ACEOF
15775 rm -f conftest.$ac_objext conftest$ac_exeext
15776 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15777   (eval $ac_link) 2>conftest.er1
15778   ac_status=$?
15779   grep -v '^ *+' conftest.er1 >conftest.err
15780   rm -f conftest.er1
15781   cat conftest.err >&5
15782   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15783   (exit $ac_status); } &&
15784          { ac_try='test -z "$ac_c_werror_flag"
15785                          || test ! -s conftest.err'
15786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15787   (eval $ac_try) 2>&5
15788   ac_status=$?
15789   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15790   (exit $ac_status); }; } &&
15791          { ac_try='test -s conftest$ac_exeext'
15792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15793   (eval $ac_try) 2>&5
15794   ac_status=$?
15795   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15796   (exit $ac_status); }; }; then
15797   eval "$as_ac_var=yes"
15798 else
15799   echo "$as_me: failed program was:" >&5
15800 sed 's/^/| /' conftest.$ac_ext >&5
15801
15802 eval "$as_ac_var=no"
15803 fi
15804 rm -f conftest.err conftest.$ac_objext \
15805       conftest$ac_exeext conftest.$ac_ext
15806 fi
15807 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15808 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15809 if test `eval echo '${'$as_ac_var'}'` = yes; then
15810   cat >>confdefs.h <<_ACEOF
15811 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15812 _ACEOF
15813
15814 fi
15815 done
15816
15817
15818 # following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2
15819 echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5
15820 echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6
15821 if test "${ac_cv_func_setpgrp_void+set}" = set; then
15822   echo $ECHO_N "(cached) $ECHO_C" >&6
15823 else
15824   if test "$cross_compiling" = yes; then
15825   { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5
15826 echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;}
15827    { (exit 1); exit 1; }; }
15828 else
15829   cat >conftest.$ac_ext <<_ACEOF
15830 /* confdefs.h.  */
15831 _ACEOF
15832 cat confdefs.h >>conftest.$ac_ext
15833 cat >>conftest.$ac_ext <<_ACEOF
15834 /* end confdefs.h.  */
15835 #if HAVE_UNISTD_H
15836 # include <unistd.h>
15837 #endif
15838
15839 int
15840 main ()
15841 {
15842 /* If this system has a BSD-style setpgrp which takes arguments,
15843   setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15844   exit successfully. */
15845   exit (setpgrp (1,1) == -1 ? 0 : 1);
15846   ;
15847   return 0;
15848 }
15849 _ACEOF
15850 rm -f conftest$ac_exeext
15851 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15852   (eval $ac_link) 2>&5
15853   ac_status=$?
15854   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15855   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15856   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15857   (eval $ac_try) 2>&5
15858   ac_status=$?
15859   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15860   (exit $ac_status); }; }; then
15861   ac_cv_func_setpgrp_void=no
15862 else
15863   echo "$as_me: program exited with status $ac_status" >&5
15864 echo "$as_me: failed program was:" >&5
15865 sed 's/^/| /' conftest.$ac_ext >&5
15866
15867 ( exit $ac_status )
15868 ac_cv_func_setpgrp_void=yes
15869 fi
15870 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15871 fi
15872 fi
15873 echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5
15874 echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6
15875 if test $ac_cv_func_setpgrp_void = yes; then
15876
15877 cat >>confdefs.h <<\_ACEOF
15878 #define SETPGRP_VOID 1
15879 _ACEOF
15880
15881 fi
15882
15883
15884 #
15885 # check for timezones
15886 #
15887 echo "$as_me:$LINENO: checking for SV-style timezone" >&5
15888 echo $ECHO_N "checking for SV-style timezone... $ECHO_C" >&6
15889 if test "$cross_compiling" = yes; then
15890   { { echo "$as_me:$LINENO: error: Expect can't be cross compiled" >&5
15891 echo "$as_me: error: Expect can't be cross compiled" >&2;}
15892    { (exit 1); exit 1; }; }
15893
15894 else
15895   cat >conftest.$ac_ext <<_ACEOF
15896 /* confdefs.h.  */
15897 _ACEOF
15898 cat confdefs.h >>conftest.$ac_ext
15899 cat >>conftest.$ac_ext <<_ACEOF
15900 /* end confdefs.h.  */
15901
15902 extern char *tzname[2];
15903 extern int daylight;
15904 main()
15905 {
15906   int *x = &daylight;
15907   char **y = tzname;
15908
15909   exit(0);
15910 }
15911 _ACEOF
15912 rm -f conftest$ac_exeext
15913 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15914   (eval $ac_link) 2>&5
15915   ac_status=$?
15916   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15917   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15918   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15919   (eval $ac_try) 2>&5
15920   ac_status=$?
15921   echo "$as_me:$LINENO: \$? = $ac_status" >&5
15922   (exit $ac_status); }; }; then
15923   cat >>confdefs.h <<\_ACEOF
15924 #define HAVE_SV_TIMEZONE 1
15925 _ACEOF
15926
15927         echo "$as_me:$LINENO: result: yes" >&5
15928 echo "${ECHO_T}yes" >&6
15929 else
15930   echo "$as_me: program exited with status $ac_status" >&5
15931 echo "$as_me: failed program was:" >&5
15932 sed 's/^/| /' conftest.$ac_ext >&5
15933
15934 ( exit $ac_status )
15935 echo "$as_me:$LINENO: result: no" >&5
15936 echo "${ECHO_T}no" >&6
15937
15938 fi
15939 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15940 fi
15941
15942
15943 # Following comment stolen from Tcl's configure.in:
15944 #   Note:  in the following variable, it's important to use the absolute
15945 #   path name of the Tcl directory rather than "..":  this is because
15946 #   AIX remembers this path and will attempt to use it at run-time to look
15947 #   up the Tcl library.
15948
15949 PACKAGE_VERSION_NODOTS="`echo $PACKAGE_VERSION | sed -e 's/\.//g'`"
15950
15951 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
15952     EXP_LIB_VERSION=$PACKAGE_VERSION
15953 else
15954     EXP_LIB_VERSION=$PACKAGE_VERSION_NODOTS
15955 fi
15956 if test $iunix -eq 1 ; then
15957     EXP_LIB_VERSION=$PACKAGE_VERSION_NODOTS
15958 fi
15959
15960 # also remove dots on systems that don't support filenames > 14
15961 # (are there systems which support shared libs and restrict filename lengths!?)
15962 echo "$as_me:$LINENO: checking for long file names" >&5
15963 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
15964 if test "${ac_cv_sys_long_file_names+set}" = set; then
15965   echo $ECHO_N "(cached) $ECHO_C" >&6
15966 else
15967   ac_cv_sys_long_file_names=yes
15968 # Test for long file names in all the places we know might matter:
15969 #      .                the current directory, where building will happen
15970 #      $prefix/lib      where we will be installing things
15971 #      $exec_prefix/lib likewise
15972 # eval it to expand exec_prefix.
15973 #      $TMPDIR          if set, where it might want to write temporary files
15974 # if $TMPDIR is not set:
15975 #      /tmp             where it might want to write temporary files
15976 #      /var/tmp         likewise
15977 #      /usr/tmp         likewise
15978 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
15979   ac_tmpdirs=$TMPDIR
15980 else
15981   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
15982 fi
15983 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
15984   test -d $ac_dir || continue
15985   test -w $ac_dir || continue # It is less confusing to not echo anything here.
15986   ac_xdir=$ac_dir/cf$$
15987   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
15988   ac_tf1=$ac_xdir/conftest9012345
15989   ac_tf2=$ac_xdir/conftest9012346
15990   (echo 1 >$ac_tf1) 2>/dev/null
15991   (echo 2 >$ac_tf2) 2>/dev/null
15992   ac_val=`cat $ac_tf1 2>/dev/null`
15993   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
15994     ac_cv_sys_long_file_names=no
15995     rm -rf $ac_xdir 2>/dev/null
15996     break
15997   fi
15998   rm -rf $ac_xdir 2>/dev/null
15999 done
16000 fi
16001 echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
16002 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
16003 if test $ac_cv_sys_long_file_names = yes; then
16004
16005 cat >>confdefs.h <<\_ACEOF
16006 #define HAVE_LONG_FILE_NAMES 1
16007 _ACEOF
16008
16009 fi
16010
16011 if test $ac_cv_sys_long_file_names = no; then
16012     EXP_LIB_VERSION=$PACKAGE_VERSION_NODOTS
16013 fi
16014
16015 if test "$FRAMEWORK_BUILD" = "1" ; then
16016     EXP_BUILD_LIB_SPEC="-F`pwd` -framework Expect"
16017     EXP_LIB_SPEC="-framework Expect"
16018     EXP_LIB_FILE="Expect"
16019     cat >>confdefs.h <<\_ACEOF
16020 #define EXP_FRAMEWORK 1
16021 _ACEOF
16022
16023 else
16024     if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
16025         EXP_LIB_FLAG="-lexpect${EXP_LIB_VERSION}"
16026     else
16027         EXP_LIB_FLAG="-lexpect`echo ${EXP_LIB_VERSION} | tr -d .`"
16028     fi
16029     EXP_BUILD_LIB_SPEC="-L`pwd` ${EXP_LIB_FLAG}"
16030     EXP_LIB_SPEC="-L${libdir} ${EXP_LIB_FLAG}"
16031 fi
16032
16033 #--------------------------------------------------------------------
16034 # This section is based on analogous thing in Tk installation. - DEL
16035 #       Various manipulations on the search path used at runtime to
16036 #       find shared libraries:
16037 #       2. On systems such as AIX and Ultrix that use "-L" as the
16038 #          search path option, colons cannot be used to separate
16039 #          directories from each other. Change colons to " -L".
16040 #       3. Create two sets of search flags, one for use in cc lines
16041 #          and the other for when the linker is invoked directly.  In
16042 #          the second case, '-Wl,' must be stripped off and commas must
16043 #          be replaced by spaces.
16044 #--------------------------------------------------------------------
16045
16046 LIB_RUNTIME_DIR='${LIB_RUNTIME_DIR}/${PACKAGE_NAME}${PACKAGE_VERSION}'
16047
16048 # If Tcl and Expect are installed in different places, adjust the library
16049 # search path to reflect this.
16050
16051 if test "$TCL_EXEC_PREFIX" != "$exec_prefix"; then
16052     LIB_RUNTIME_DIR="${LIB_RUNTIME_DIR}:${TCL_EXEC_PREFIX}/lib"
16053 fi
16054
16055 if test "${TCL_LD_SEARCH_FLAGS}" = '-L${LIB_RUNTIME_DIR}'; then
16056     LIB_RUNTIME_DIR=`echo ${LIB_RUNTIME_DIR} |sed -e 's/:/ -L/g'`
16057 fi
16058
16059 # The eval below is tricky!  It *evaluates* the string in
16060 # ..._CC_SEARCH_FLAGS, which causes a substitution of the
16061 # variable LIB_RUNTIME_DIR.
16062
16063 eval "EXP_CC_SEARCH_FLAGS=\"$TCL_CC_SEARCH_FLAGS\""
16064
16065 # now broken out into EXP_AND_TCL_LIBS.  Had to do this
16066 # in order to avoid repeating lib specs to which some systems object.
16067
16068 LIBS="$LIBS $LD_SEARCH_FLAGS"
16069
16070 #
16071 # Set up makefile substitutions
16072 #
16073
16074
16075
16076
16077
16078 # Expect uses these from tclConfig.sh to make the main executable
16079
16080
16081
16082 #--------------------------------------------------------------------
16083 # More TEA code based on data we got from the original expect
16084 # configure code.
16085 #--------------------------------------------------------------------
16086
16087 #-----------------------------------------------------------------------
16088 # Specify the C source files to compile in TEA_ADD_SOURCES,
16089 # public headers that need to be installed in TEA_ADD_HEADERS,
16090 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
16091 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
16092 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
16093 # and PKG_TCL_SOURCES.
16094 #-----------------------------------------------------------------------
16095
16096
16097     vars="
16098         exp_command.c expect.c exp_inter.c exp_regexp.c exp_tty.c
16099         exp_log.c exp_main_sub.c exp_pty.c exp_trap.c exp_strf.c
16100         exp_console.c exp_glob.c exp_win.c exp_clib.c exp_closetcl.c
16101         exp_memmove.c exp_tty_comm.c exp_chan.c Dbg.c
16102 "
16103     for i in $vars; do
16104         case $i in
16105             \$*)
16106                 # allow $-var names
16107                 PKG_SOURCES="$PKG_SOURCES $i"
16108                 PKG_OBJECTS="$PKG_OBJECTS $i"
16109                 ;;
16110             *)
16111                 # check for existence - allows for generic/win/unix VPATH
16112                 # To add more dirs here (like 'src'), you have to update VPATH
16113                 # in Makefile.in as well
16114                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
16115                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
16116                     -a ! -f "${srcdir}/macosx/$i" \
16117                     ; then
16118                     { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
16119 echo "$as_me: error: could not find source file '$i'" >&2;}
16120    { (exit 1); exit 1; }; }
16121                 fi
16122                 PKG_SOURCES="$PKG_SOURCES $i"
16123                 # this assumes it is in a VPATH dir
16124                 i=`basename $i`
16125                 # handle user calling this before or after TEA_SETUP_COMPILER
16126                 if test x"${OBJEXT}" != x ; then
16127                     j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
16128                 else
16129                     j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
16130                 fi
16131                 PKG_OBJECTS="$PKG_OBJECTS $j"
16132                 ;;
16133         esac
16134     done
16135
16136
16137
16138
16139 # Variant sources. Comments in the Makefile indicate that the
16140 # event_type/able stuff can be overidden in the Makefile, and should
16141 # be for particular systems. IMHO this requires a configure option.
16142 #
16143 # See at the end, where we select the sources based on the collect
16144 # information.
16145
16146
16147     vars="
16148         pty_${PTY_TYPE}.c
16149         exp_${EVENT_TYPE}.c
16150         exp_${EVENT_ABLE}.c
16151 "
16152     for i in $vars; do
16153         case $i in
16154             \$*)
16155                 # allow $-var names
16156                 PKG_SOURCES="$PKG_SOURCES $i"
16157                 PKG_OBJECTS="$PKG_OBJECTS $i"
16158                 ;;
16159             *)
16160                 # check for existence - allows for generic/win/unix VPATH
16161                 # To add more dirs here (like 'src'), you have to update VPATH
16162                 # in Makefile.in as well
16163                 if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
16164                     -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
16165                     -a ! -f "${srcdir}/macosx/$i" \
16166                     ; then
16167                     { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
16168 echo "$as_me: error: could not find source file '$i'" >&2;}
16169    { (exit 1); exit 1; }; }
16170                 fi
16171                 PKG_SOURCES="$PKG_SOURCES $i"
16172                 # this assumes it is in a VPATH dir
16173                 i=`basename $i`
16174                 # handle user calling this before or after TEA_SETUP_COMPILER
16175                 if test x"${OBJEXT}" != x ; then
16176                     j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
16177                 else
16178                     j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
16179                 fi
16180                 PKG_OBJECTS="$PKG_OBJECTS $j"
16181                 ;;
16182         esac
16183     done
16184
16185
16186
16187
16188
16189     vars="expect.h expect_tcl.h expect_comm.h tcldbg.h"
16190     for i in $vars; do
16191         # check for existence, be strict because it is installed
16192         if test ! -f "${srcdir}/$i" ; then
16193             { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
16194 echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
16195    { (exit 1); exit 1; }; }
16196         fi
16197         PKG_HEADERS="$PKG_HEADERS $i"
16198     done
16199
16200
16201
16202
16203     vars="-I."
16204     for i in $vars; do
16205         PKG_INCLUDES="$PKG_INCLUDES $i"
16206     done
16207
16208
16209
16210     vars="-I\"`\${CYGPATH} \${srcdir}`\""
16211     for i in $vars; do
16212         PKG_INCLUDES="$PKG_INCLUDES $i"
16213     done
16214
16215
16216
16217
16218     vars=""
16219     for i in $vars; do
16220         if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
16221             # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
16222             i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
16223         fi
16224         PKG_LIBS="$PKG_LIBS $i"
16225     done
16226
16227
16228
16229     PKG_CFLAGS="$PKG_CFLAGS -DTCL_DEBUGGER -DUSE_NON_CONST"
16230
16231
16232
16233     PKG_CFLAGS="$PKG_CFLAGS -DSCRIPTDIR=\\\"\${DESTDIR}\${prefix}/lib/\${PKG_DIR}\\\""
16234
16235
16236
16237     PKG_CFLAGS="$PKG_CFLAGS -DEXECSCRIPTDIR=\\\"\${DESTDIR}\${pkglibdir}\\\""
16238
16239
16240
16241     PKG_CFLAGS="$PKG_CFLAGS -DSTTY_BIN=\\\"${STTY_BIN}\\\""
16242
16243
16244
16245     PKG_CFLAGS="$PKG_CFLAGS -DDFLT_STTY=\"\\\"$DEFAULT_STTY_ARGS\\\"\""
16246
16247
16248
16249
16250     vars=""
16251     for i in $vars; do
16252         # check for existence - allows for generic/win/unix VPATH
16253         if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
16254             -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
16255             -a ! -f "${srcdir}/macosx/$i" \
16256             ; then
16257             { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
16258 echo "$as_me: error: could not find stub source file '$i'" >&2;}
16259    { (exit 1); exit 1; }; }
16260         fi
16261         PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
16262         # this assumes it is in a VPATH dir
16263         i=`basename $i`
16264         # handle user calling this before or after TEA_SETUP_COMPILER
16265         if test x"${OBJEXT}" != x ; then
16266             j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
16267         else
16268             j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
16269         fi
16270         PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
16271     done
16272
16273
16274
16275
16276     vars=""
16277     for i in $vars; do
16278         # check for existence, be strict because it is installed
16279         if test ! -f "${srcdir}/$i" ; then
16280             { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
16281 echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
16282    { (exit 1); exit 1; }; }
16283         fi
16284         PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
16285     done
16286
16287
16288
16289 #--------------------------------------------------------------------
16290 # This macro generates a line to use when building a library.  It
16291 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
16292 # and TEA_LOAD_TCLCONFIG macros above.
16293 #--------------------------------------------------------------------
16294
16295
16296     if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
16297         MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
16298         MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
16299         cat >conftest.$ac_ext <<_ACEOF
16300 /* confdefs.h.  */
16301 _ACEOF
16302 cat confdefs.h >>conftest.$ac_ext
16303 cat >>conftest.$ac_ext <<_ACEOF
16304 /* end confdefs.h.  */
16305
16306 #if defined(_MSC_VER) && _MSC_VER >= 1400
16307 print("manifest needed")
16308 #endif
16309
16310 _ACEOF
16311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16312   $EGREP "manifest needed" >/dev/null 2>&1; then
16313
16314         # Could do a CHECK_PROG for mt, but should always be with MSVC8+
16315         VC_MANIFEST_EMBED_DLL="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2 ; fi"
16316         VC_MANIFEST_EMBED_EXE="if test -f \$@.manifest ; then mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1 ; fi"
16317         MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
16318
16319     CLEANFILES="$CLEANFILES *.manifest"
16320
16321
16322 fi
16323 rm -f conftest*
16324
16325         MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
16326     else
16327         MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
16328         MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
16329         MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
16330     fi
16331
16332     if test "${SHARED_BUILD}" = "1" ; then
16333         MAKE_LIB="${MAKE_SHARED_LIB} "
16334     else
16335         MAKE_LIB="${MAKE_STATIC_LIB} "
16336     fi
16337
16338     #--------------------------------------------------------------------
16339     # Shared libraries and static libraries have different names.
16340     # Use the double eval to make sure any variables in the suffix is
16341     # substituted. (@@@ Might not be necessary anymore)
16342     #--------------------------------------------------------------------
16343
16344     if test "${TEA_PLATFORM}" = "windows" ; then
16345         if test "${SHARED_BUILD}" = "1" ; then
16346             # We force the unresolved linking of symbols that are really in
16347             # the private libraries of Tcl and Tk.
16348             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
16349             if test x"${TK_BIN_DIR}" != x ; then
16350                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
16351             fi
16352             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
16353         else
16354             eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
16355         fi
16356         # Some packages build their own stubs libraries
16357         eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
16358         if test "$GCC" = "yes"; then
16359             PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
16360         fi
16361         # These aren't needed on Windows (either MSVC or gcc)
16362         RANLIB=:
16363         RANLIB_STUB=:
16364     else
16365         RANLIB_STUB="${RANLIB}"
16366         if test "${SHARED_BUILD}" = "1" ; then
16367             SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
16368             if test x"${TK_BIN_DIR}" != x ; then
16369                 SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
16370             fi
16371             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
16372             RANLIB=:
16373         else
16374             eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
16375         fi
16376         # Some packages build their own stubs libraries
16377         eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
16378     fi
16379
16380     # These are escaped so that only CFLAGS is picked up at configure time.
16381     # The other values will be substituted at make time.
16382     CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
16383     if test "${SHARED_BUILD}" = "1" ; then
16384         CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
16385     fi
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396 #--------------------------------------------------------------------
16397 # Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
16398 # file during the install process.  Don't run the TCLSH_PROG through
16399 # ${CYGPATH} because it's being used directly by make.
16400 # Require that we use a tclsh shell version 8.2 or later since earlier
16401 # versions have bugs in the pkg_mkIndex routine.
16402 # Add WISH as well if this is a Tk extension.
16403 #--------------------------------------------------------------------
16404
16405
16406     echo "$as_me:$LINENO: checking for tclsh" >&5
16407 echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
16408     if test -f "${TCL_BIN_DIR}/Makefile" ; then
16409         # tclConfig.sh is in Tcl build directory
16410         if test "${TEA_PLATFORM}" = "windows"; then
16411             TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
16412         else
16413             TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
16414         fi
16415     else
16416         # tclConfig.sh is in install location
16417         if test "${TEA_PLATFORM}" = "windows"; then
16418             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
16419         else
16420             TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
16421         fi
16422         list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
16423               `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
16424               `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
16425         for i in $list ; do
16426             if test -f "$i/${TCLSH_PROG}" ; then
16427                 REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
16428                 break
16429             fi
16430         done
16431         TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
16432     fi
16433     echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
16434 echo "${ECHO_T}${TCLSH_PROG}" >&6
16435
16436
16437
16438 #--------------------------------------------------------------------
16439 # Finally, substitute all of the various values into the Makefile.
16440 # You may alternatively have a special pkgIndex.tcl.in or other files
16441 # which require substituting th AC variables in.  Include these here.
16442 #--------------------------------------------------------------------
16443
16444 touch expect_cf.h
16445           ac_config_files="$ac_config_files Makefile"
16446           ac_config_commands="$ac_config_commands default"
16447 cat >confcache <<\_ACEOF
16448 # This file is a shell script that caches the results of configure
16449 # tests run on this system so they can be shared between configure
16450 # scripts and configure runs, see configure's option --config-cache.
16451 # It is not useful on other systems.  If it contains results you don't
16452 # want to keep, you may remove or edit it.
16453 #
16454 # config.status only pays attention to the cache file if you give it
16455 # the --recheck option to rerun configure.
16456 #
16457 # `ac_cv_env_foo' variables (set or unset) will be overridden when
16458 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16459 # following values.
16460
16461 _ACEOF
16462
16463 # The following way of writing the cache mishandles newlines in values,
16464 # but we know of no workaround that is simple, portable, and efficient.
16465 # So, don't put newlines in cache variables' values.
16466 # Ultrix sh set writes to stderr and can't be redirected directly,
16467 # and sets the high bit in the cache file unless we assign to the vars.
16468 {
16469   (set) 2>&1 |
16470     case `(ac_space=' '; set | grep ac_space) 2>&1` in
16471     *ac_space=\ *)
16472       # `set' does not quote correctly, so add quotes (double-quote
16473       # substitution turns \\\\ into \\, and sed turns \\ into \).
16474       sed -n \
16475         "s/'/'\\\\''/g;
16476           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16477       ;;
16478     *)
16479       # `set' quotes correctly as required by POSIX, so do not add quotes.
16480       sed -n \
16481         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16482       ;;
16483     esac;
16484 } |
16485   sed '
16486      t clear
16487      : clear
16488      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16489      t end
16490      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16491      : end' >>confcache
16492 if diff $cache_file confcache >/dev/null 2>&1; then :; else
16493   if test -w $cache_file; then
16494     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16495     cat confcache >$cache_file
16496   else
16497     echo "not updating unwritable cache $cache_file"
16498   fi
16499 fi
16500 rm -f confcache
16501
16502 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16503 # Let make expand exec_prefix.
16504 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16505
16506 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16507 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16508 # trailing colons and then remove the whole line if VPATH becomes empty
16509 # (actually we leave an empty line to preserve line numbers).
16510 if test "x$srcdir" = x.; then
16511   ac_vpsub='/^[  ]*VPATH[        ]*=/{
16512 s/:*\$(srcdir):*/:/;
16513 s/:*\${srcdir}:*/:/;
16514 s/:*@srcdir@:*/:/;
16515 s/^\([^=]*=[     ]*\):*/\1/;
16516 s/:*$//;
16517 s/^[^=]*=[       ]*$//;
16518 }'
16519 fi
16520
16521 # Transform confdefs.h into DEFS.
16522 # Protect against shell expansion while executing Makefile rules.
16523 # Protect against Makefile macro expansion.
16524 #
16525 # If the first sed substitution is executed (which looks for macros that
16526 # take arguments), then we branch to the quote section.  Otherwise,
16527 # look for a macro that doesn't take arguments.
16528 cat >confdef2opt.sed <<\_ACEOF
16529 t clear
16530 : clear
16531 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
16532 t quote
16533 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
16534 t quote
16535 d
16536 : quote
16537 s,[      `~#$^&*(){}\\|;'"<>?],\\&,g
16538 s,\[,\\&,g
16539 s,\],\\&,g
16540 s,\$,$$,g
16541 p
16542 _ACEOF
16543 # We use echo to avoid assuming a particular line-breaking character.
16544 # The extra dot is to prevent the shell from consuming trailing
16545 # line-breaks from the sub-command output.  A line-break within
16546 # single-quotes doesn't work because, if this script is created in a
16547 # platform that uses two characters for line-breaks (e.g., DOS), tr
16548 # would break.
16549 ac_LF_and_DOT=`echo; echo .`
16550 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
16551 rm -f confdef2opt.sed
16552
16553
16554 ac_libobjs=
16555 ac_ltlibobjs=
16556 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16557   # 1. Remove the extension, and $U if already installed.
16558   ac_i=`echo "$ac_i" |
16559          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
16560   # 2. Add them.
16561   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
16562   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
16563 done
16564 LIBOBJS=$ac_libobjs
16565
16566 LTLIBOBJS=$ac_ltlibobjs
16567
16568
16569 CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
16570
16571 : ${CONFIG_STATUS=./config.status}
16572 ac_clean_files_save=$ac_clean_files
16573 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16574 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
16575 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16576 cat >$CONFIG_STATUS <<_ACEOF
16577 #! $SHELL
16578 # Generated by $as_me.
16579 # Run this file to recreate the current configuration.
16580 # Compiler output produced by configure, useful for debugging
16581 # configure, is in config.log if it exists.
16582
16583 debug=false
16584 ac_cs_recheck=false
16585 ac_cs_silent=false
16586 SHELL=\${CONFIG_SHELL-$SHELL}
16587 _ACEOF
16588
16589 cat >>$CONFIG_STATUS <<\_ACEOF
16590 ## --------------------- ##
16591 ## M4sh Initialization.  ##
16592 ## --------------------- ##
16593
16594 # Be Bourne compatible
16595 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16596   emulate sh
16597   NULLCMD=:
16598   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
16599   # is contrary to our usage.  Disable this feature.
16600   alias -g '${1+"$@"}'='"$@"'
16601 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16602   set -o posix
16603 fi
16604 DUALCASE=1; export DUALCASE # for MKS sh
16605
16606 # Support unset when possible.
16607 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16608   as_unset=unset
16609 else
16610   as_unset=false
16611 fi
16612
16613
16614 # Work around bugs in pre-3.0 UWIN ksh.
16615 $as_unset ENV MAIL MAILPATH
16616 PS1='$ '
16617 PS2='> '
16618 PS4='+ '
16619
16620 # NLS nuisances.
16621 for as_var in \
16622   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
16623   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
16624   LC_TELEPHONE LC_TIME
16625 do
16626   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
16627     eval $as_var=C; export $as_var
16628   else
16629     $as_unset $as_var
16630   fi
16631 done
16632
16633 # Required to use basename.
16634 if expr a : '\(a\)' >/dev/null 2>&1; then
16635   as_expr=expr
16636 else
16637   as_expr=false
16638 fi
16639
16640 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
16641   as_basename=basename
16642 else
16643   as_basename=false
16644 fi
16645
16646
16647 # Name of the executable.
16648 as_me=`$as_basename "$0" ||
16649 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16650          X"$0" : 'X\(//\)$' \| \
16651          X"$0" : 'X\(/\)$' \| \
16652          .     : '\(.\)' 2>/dev/null ||
16653 echo X/"$0" |
16654     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
16655           /^X\/\(\/\/\)$/{ s//\1/; q; }
16656           /^X\/\(\/\).*/{ s//\1/; q; }
16657           s/.*/./; q'`
16658
16659
16660 # PATH needs CR, and LINENO needs CR and PATH.
16661 # Avoid depending upon Character Ranges.
16662 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16663 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16664 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16665 as_cr_digits='0123456789'
16666 as_cr_alnum=$as_cr_Letters$as_cr_digits
16667
16668 # The user is always right.
16669 if test "${PATH_SEPARATOR+set}" != set; then
16670   echo "#! /bin/sh" >conf$$.sh
16671   echo  "exit 0"   >>conf$$.sh
16672   chmod +x conf$$.sh
16673   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
16674     PATH_SEPARATOR=';'
16675   else
16676     PATH_SEPARATOR=:
16677   fi
16678   rm -f conf$$.sh
16679 fi
16680
16681
16682   as_lineno_1=$LINENO
16683   as_lineno_2=$LINENO
16684   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16685   test "x$as_lineno_1" != "x$as_lineno_2" &&
16686   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
16687   # Find who we are.  Look in the path if we contain no path at all
16688   # relative or not.
16689   case $0 in
16690     *[\\/]* ) as_myself=$0 ;;
16691     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16692 for as_dir in $PATH
16693 do
16694   IFS=$as_save_IFS
16695   test -z "$as_dir" && as_dir=.
16696   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16697 done
16698
16699        ;;
16700   esac
16701   # We did not find ourselves, most probably we were run as `sh COMMAND'
16702   # in which case we are not to be found in the path.
16703   if test "x$as_myself" = x; then
16704     as_myself=$0
16705   fi
16706   if test ! -f "$as_myself"; then
16707     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
16708 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
16709    { (exit 1); exit 1; }; }
16710   fi
16711   case $CONFIG_SHELL in
16712   '')
16713     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16714 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
16715 do
16716   IFS=$as_save_IFS
16717   test -z "$as_dir" && as_dir=.
16718   for as_base in sh bash ksh sh5; do
16719          case $as_dir in
16720          /*)
16721            if ("$as_dir/$as_base" -c '
16722   as_lineno_1=$LINENO
16723   as_lineno_2=$LINENO
16724   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
16725   test "x$as_lineno_1" != "x$as_lineno_2" &&
16726   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
16727              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
16728              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
16729              CONFIG_SHELL=$as_dir/$as_base
16730              export CONFIG_SHELL
16731              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
16732            fi;;
16733          esac
16734        done
16735 done
16736 ;;
16737   esac
16738
16739   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
16740   # uniformly replaced by the line number.  The first 'sed' inserts a
16741   # line-number line before each line; the second 'sed' does the real
16742   # work.  The second script uses 'N' to pair each line-number line
16743   # with the numbered line, and appends trailing '-' during
16744   # substitution so that $LINENO is not a special case at line end.
16745   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
16746   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
16747   sed '=' <$as_myself |
16748     sed '
16749       N
16750       s,$,-,
16751       : loop
16752       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
16753       t loop
16754       s,-$,,
16755       s,^['$as_cr_digits']*\n,,
16756     ' >$as_me.lineno &&
16757   chmod +x $as_me.lineno ||
16758     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
16759 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
16760    { (exit 1); exit 1; }; }
16761
16762   # Don't try to exec as it changes $[0], causing all sort of problems
16763   # (the dirname of $[0] is not the place where we might find the
16764   # original and so on.  Autoconf is especially sensible to this).
16765   . ./$as_me.lineno
16766   # Exit status is that of the last command.
16767   exit
16768 }
16769
16770
16771 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
16772   *c*,-n*) ECHO_N= ECHO_C='
16773 ' ECHO_T='      ' ;;
16774   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
16775   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
16776 esac
16777
16778 if expr a : '\(a\)' >/dev/null 2>&1; then
16779   as_expr=expr
16780 else
16781   as_expr=false
16782 fi
16783
16784 rm -f conf$$ conf$$.exe conf$$.file
16785 echo >conf$$.file
16786 if ln -s conf$$.file conf$$ 2>/dev/null; then
16787   # We could just check for DJGPP; but this test a) works b) is more generic
16788   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16789   if test -f conf$$.exe; then
16790     # Don't use ln at all; we don't have any links
16791     as_ln_s='cp -p'
16792   else
16793     as_ln_s='ln -s'
16794   fi
16795 elif ln conf$$.file conf$$ 2>/dev/null; then
16796   as_ln_s=ln
16797 else
16798   as_ln_s='cp -p'
16799 fi
16800 rm -f conf$$ conf$$.exe conf$$.file
16801
16802 if mkdir -p . 2>/dev/null; then
16803   as_mkdir_p=:
16804 else
16805   test -d ./-p && rmdir ./-p
16806   as_mkdir_p=false
16807 fi
16808
16809 as_executable_p="test -f"
16810
16811 # Sed expression to map a string onto a valid CPP name.
16812 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
16813
16814 # Sed expression to map a string onto a valid variable name.
16815 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
16816
16817
16818 # IFS
16819 # We need space, tab and new line, in precisely that order.
16820 as_nl='
16821 '
16822 IFS="   $as_nl"
16823
16824 # CDPATH.
16825 $as_unset CDPATH
16826
16827 exec 6>&1
16828
16829 # Open the log real soon, to keep \$[0] and so on meaningful, and to
16830 # report actual input values of CONFIG_FILES etc. instead of their
16831 # values after options handling.  Logging --version etc. is OK.
16832 exec 5>>config.log
16833 {
16834   echo
16835   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16836 ## Running $as_me. ##
16837 _ASBOX
16838 } >&5
16839 cat >&5 <<_CSEOF
16840
16841 This file was extended by expect $as_me 5.45, which was
16842 generated by GNU Autoconf 2.59.  Invocation command line was
16843
16844   CONFIG_FILES    = $CONFIG_FILES
16845   CONFIG_HEADERS  = $CONFIG_HEADERS
16846   CONFIG_LINKS    = $CONFIG_LINKS
16847   CONFIG_COMMANDS = $CONFIG_COMMANDS
16848   $ $0 $@
16849
16850 _CSEOF
16851 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
16852 echo >&5
16853 _ACEOF
16854
16855 # Files that config.status was made for.
16856 if test -n "$ac_config_files"; then
16857   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16858 fi
16859
16860 if test -n "$ac_config_headers"; then
16861   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16862 fi
16863
16864 if test -n "$ac_config_links"; then
16865   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16866 fi
16867
16868 if test -n "$ac_config_commands"; then
16869   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16870 fi
16871
16872 cat >>$CONFIG_STATUS <<\_ACEOF
16873
16874 ac_cs_usage="\
16875 \`$as_me' instantiates files from templates according to the
16876 current configuration.
16877
16878 Usage: $0 [OPTIONS] [FILE]...
16879
16880   -h, --help       print this help, then exit
16881   -V, --version    print version number, then exit
16882   -q, --quiet      do not print progress messages
16883   -d, --debug      don't remove temporary files
16884       --recheck    update $as_me by reconfiguring in the same conditions
16885   --file=FILE[:TEMPLATE]
16886                    instantiate the configuration file FILE
16887
16888 Configuration files:
16889 $config_files
16890
16891 Configuration commands:
16892 $config_commands
16893
16894 Report bugs to <bug-autoconf@gnu.org>."
16895 _ACEOF
16896
16897 cat >>$CONFIG_STATUS <<_ACEOF
16898 ac_cs_version="\\
16899 expect config.status 5.45
16900 configured by $0, generated by GNU Autoconf 2.59,
16901   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16902
16903 Copyright (C) 2003 Free Software Foundation, Inc.
16904 This config.status script is free software; the Free Software Foundation
16905 gives unlimited permission to copy, distribute and modify it."
16906 srcdir=$srcdir
16907 INSTALL="$INSTALL"
16908 _ACEOF
16909
16910 cat >>$CONFIG_STATUS <<\_ACEOF
16911 # If no file are specified by the user, then we need to provide default
16912 # value.  By we need to know if files were specified by the user.
16913 ac_need_defaults=:
16914 while test $# != 0
16915 do
16916   case $1 in
16917   --*=*)
16918     ac_option=`expr "x$1" : 'x\([^=]*\)='`
16919     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16920     ac_shift=:
16921     ;;
16922   -*)
16923     ac_option=$1
16924     ac_optarg=$2
16925     ac_shift=shift
16926     ;;
16927   *) # This is not an option, so the user has probably given explicit
16928      # arguments.
16929      ac_option=$1
16930      ac_need_defaults=false;;
16931   esac
16932
16933   case $ac_option in
16934   # Handling of the options.
16935 _ACEOF
16936 cat >>$CONFIG_STATUS <<\_ACEOF
16937   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16938     ac_cs_recheck=: ;;
16939   --version | --vers* | -V )
16940     echo "$ac_cs_version"; exit 0 ;;
16941   --he | --h)
16942     # Conflict between --help and --header
16943     { { echo "$as_me:$LINENO: error: ambiguous option: $1
16944 Try \`$0 --help' for more information." >&5
16945 echo "$as_me: error: ambiguous option: $1
16946 Try \`$0 --help' for more information." >&2;}
16947    { (exit 1); exit 1; }; };;
16948   --help | --hel | -h )
16949     echo "$ac_cs_usage"; exit 0 ;;
16950   --debug | --d* | -d )
16951     debug=: ;;
16952   --file | --fil | --fi | --f )
16953     $ac_shift
16954     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
16955     ac_need_defaults=false;;
16956   --header | --heade | --head | --hea )
16957     $ac_shift
16958     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
16959     ac_need_defaults=false;;
16960   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16961   | -silent | --silent | --silen | --sile | --sil | --si | --s)
16962     ac_cs_silent=: ;;
16963
16964   # This is an error.
16965   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
16966 Try \`$0 --help' for more information." >&5
16967 echo "$as_me: error: unrecognized option: $1
16968 Try \`$0 --help' for more information." >&2;}
16969    { (exit 1); exit 1; }; } ;;
16970
16971   *) ac_config_targets="$ac_config_targets $1" ;;
16972
16973   esac
16974   shift
16975 done
16976
16977 ac_configure_extra_args=
16978
16979 if $ac_cs_silent; then
16980   exec 6>/dev/null
16981   ac_configure_extra_args="$ac_configure_extra_args --silent"
16982 fi
16983
16984 _ACEOF
16985 cat >>$CONFIG_STATUS <<_ACEOF
16986 if \$ac_cs_recheck; then
16987   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
16988   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
16989 fi
16990
16991 _ACEOF
16992
16993
16994
16995
16996
16997 cat >>$CONFIG_STATUS <<\_ACEOF
16998 for ac_config_target in $ac_config_targets
16999 do
17000   case "$ac_config_target" in
17001   # Handling of arguments.
17002   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17003   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17004   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
17005 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17006    { (exit 1); exit 1; }; };;
17007   esac
17008 done
17009
17010 # If the user did not use the arguments to specify the items to instantiate,
17011 # then the envvar interface is used.  Set only those that are not.
17012 # We use the long form for the default assignment because of an extremely
17013 # bizarre bug on SunOS 4.1.3.
17014 if $ac_need_defaults; then
17015   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17016   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17017 fi
17018
17019 # Have a temporary directory for convenience.  Make it in the build tree
17020 # simply because there is no reason to put it here, and in addition,
17021 # creating and moving files from /tmp can sometimes cause problems.
17022 # Create a temporary directory, and hook for its removal unless debugging.
17023 $debug ||
17024 {
17025   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17026   trap '{ (exit 1); exit 1; }' 1 2 13 15
17027 }
17028
17029 # Create a (secure) tmp directory for tmp files.
17030
17031 {
17032   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
17033   test -n "$tmp" && test -d "$tmp"
17034 }  ||
17035 {
17036   tmp=./confstat$$-$RANDOM
17037   (umask 077 && mkdir $tmp)
17038 } ||
17039 {
17040    echo "$me: cannot create a temporary directory in ." >&2
17041    { (exit 1); exit 1; }
17042 }
17043
17044 _ACEOF
17045
17046 cat >>$CONFIG_STATUS <<_ACEOF
17047
17048 #
17049 # CONFIG_FILES section.
17050 #
17051
17052 # No need to generate the scripts if there are no CONFIG_FILES.
17053 # This happens for instance when ./config.status config.h
17054 if test -n "\$CONFIG_FILES"; then
17055   # Protect against being on the right side of a sed subst in config.status.
17056   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17057    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17058 s,@SHELL@,$SHELL,;t t
17059 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17060 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17061 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17062 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17063 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17064 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17065 s,@exec_prefix@,$exec_prefix,;t t
17066 s,@prefix@,$prefix,;t t
17067 s,@program_transform_name@,$program_transform_name,;t t
17068 s,@bindir@,$bindir,;t t
17069 s,@sbindir@,$sbindir,;t t
17070 s,@libexecdir@,$libexecdir,;t t
17071 s,@datadir@,$datadir,;t t
17072 s,@sysconfdir@,$sysconfdir,;t t
17073 s,@sharedstatedir@,$sharedstatedir,;t t
17074 s,@localstatedir@,$localstatedir,;t t
17075 s,@libdir@,$libdir,;t t
17076 s,@includedir@,$includedir,;t t
17077 s,@oldincludedir@,$oldincludedir,;t t
17078 s,@infodir@,$infodir,;t t
17079 s,@mandir@,$mandir,;t t
17080 s,@build_alias@,$build_alias,;t t
17081 s,@host_alias@,$host_alias,;t t
17082 s,@target_alias@,$target_alias,;t t
17083 s,@DEFS@,$DEFS,;t t
17084 s,@ECHO_C@,$ECHO_C,;t t
17085 s,@ECHO_N@,$ECHO_N,;t t
17086 s,@ECHO_T@,$ECHO_T,;t t
17087 s,@LIBS@,$LIBS,;t t
17088 s,@CYGPATH@,$CYGPATH,;t t
17089 s,@EXEEXT@,$EXEEXT,;t t
17090 s,@PKG_LIB_FILE@,$PKG_LIB_FILE,;t t
17091 s,@PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t
17092 s,@PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t
17093 s,@PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t
17094 s,@PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t
17095 s,@PKG_HEADERS@,$PKG_HEADERS,;t t
17096 s,@PKG_INCLUDES@,$PKG_INCLUDES,;t t
17097 s,@PKG_LIBS@,$PKG_LIBS,;t t
17098 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
17099 s,@TCL_VERSION@,$TCL_VERSION,;t t
17100 s,@TCL_PATCH_LEVEL@,$TCL_PATCH_LEVEL,;t t
17101 s,@TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
17102 s,@TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
17103 s,@TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
17104 s,@TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
17105 s,@TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
17106 s,@TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
17107 s,@TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
17108 s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
17109 s,@CLEANFILES@,$CLEANFILES,;t t
17110 s,@TCL_LIBS@,$TCL_LIBS,;t t
17111 s,@TCL_DEFS@,$TCL_DEFS,;t t
17112 s,@TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
17113 s,@TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
17114 s,@TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
17115 s,@CC@,$CC,;t t
17116 s,@CFLAGS@,$CFLAGS,;t t
17117 s,@LDFLAGS@,$LDFLAGS,;t t
17118 s,@CPPFLAGS@,$CPPFLAGS,;t t
17119 s,@ac_ct_CC@,$ac_ct_CC,;t t
17120 s,@OBJEXT@,$OBJEXT,;t t
17121 s,@CPP@,$CPP,;t t
17122 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17123 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17124 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17125 s,@SET_MAKE@,$SET_MAKE,;t t
17126 s,@RANLIB@,$RANLIB,;t t
17127 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17128 s,@EGREP@,$EGREP,;t t
17129 s,@MATH_LIBS@,$MATH_LIBS,;t t
17130 s,@TCL_INCLUDES@,$TCL_INCLUDES,;t t
17131 s,@TCL_TOP_DIR_NATIVE@,$TCL_TOP_DIR_NATIVE,;t t
17132 s,@TCL_THREADS@,$TCL_THREADS,;t t
17133 s,@SHARED_BUILD@,$SHARED_BUILD,;t t
17134 s,@AR@,$AR,;t t
17135 s,@CELIB_DIR@,$CELIB_DIR,;t t
17136 s,@CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
17137 s,@CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
17138 s,@CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
17139 s,@STLIB_LD@,$STLIB_LD,;t t
17140 s,@SHLIB_LD@,$SHLIB_LD,;t t
17141 s,@SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
17142 s,@SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
17143 s,@LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
17144 s,@CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
17145 s,@LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
17146 s,@TCL_DBGX@,$TCL_DBGX,;t t
17147 s,@build@,$build,;t t
17148 s,@build_cpu@,$build_cpu,;t t
17149 s,@build_vendor@,$build_vendor,;t t
17150 s,@build_os@,$build_os,;t t
17151 s,@host@,$host,;t t
17152 s,@host_cpu@,$host_cpu,;t t
17153 s,@host_vendor@,$host_vendor,;t t
17154 s,@host_os@,$host_os,;t t
17155 s,@target@,$target,;t t
17156 s,@target_cpu@,$target_cpu,;t t
17157 s,@target_vendor@,$target_vendor,;t t
17158 s,@target_os@,$target_os,;t t
17159 s,@subdirs@,$subdirs,;t t
17160 s,@EXP_BUILD_LIB_SPEC@,$EXP_BUILD_LIB_SPEC,;t t
17161 s,@EXP_CC_SEARCH_FLAGS@,$EXP_CC_SEARCH_FLAGS,;t t
17162 s,@SETUID@,$SETUID,;t t
17163 s,@SETPGRP_VOID@,$SETPGRP_VOID,;t t
17164 s,@DEFAULT_STTY_ARGS@,$DEFAULT_STTY_ARGS,;t t
17165 s,@TCL_DL_LIBS@,$TCL_DL_LIBS,;t t
17166 s,@TCL_CC_SEARCH_FLAGS@,$TCL_CC_SEARCH_FLAGS,;t t
17167 s,@PKG_SOURCES@,$PKG_SOURCES,;t t
17168 s,@PKG_OBJECTS@,$PKG_OBJECTS,;t t
17169 s,@MAKE_LIB@,$MAKE_LIB,;t t
17170 s,@MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t
17171 s,@MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
17172 s,@MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
17173 s,@RANLIB_STUB@,$RANLIB_STUB,;t t
17174 s,@VC_MANIFEST_EMBED_DLL@,$VC_MANIFEST_EMBED_DLL,;t t
17175 s,@VC_MANIFEST_EMBED_EXE@,$VC_MANIFEST_EMBED_EXE,;t t
17176 s,@TCLSH_PROG@,$TCLSH_PROG,;t t
17177 s,@LIBOBJS@,$LIBOBJS,;t t
17178 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
17179 CEOF
17180
17181 _ACEOF
17182
17183   cat >>$CONFIG_STATUS <<\_ACEOF
17184   # Split the substitutions into bite-sized pieces for seds with
17185   # small command number limits, like on Digital OSF/1 and HP-UX.
17186   ac_max_sed_lines=48
17187   ac_sed_frag=1 # Number of current file.
17188   ac_beg=1 # First line for current file.
17189   ac_end=$ac_max_sed_lines # Line after last line for current file.
17190   ac_more_lines=:
17191   ac_sed_cmds=
17192   while $ac_more_lines; do
17193     if test $ac_beg -gt 1; then
17194       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17195     else
17196       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17197     fi
17198     if test ! -s $tmp/subs.frag; then
17199       ac_more_lines=false
17200     else
17201       # The purpose of the label and of the branching condition is to
17202       # speed up the sed processing (if there are no `@' at all, there
17203       # is no need to browse any of the substitutions).
17204       # These are the two extra sed commands mentioned above.
17205       (echo ':t
17206   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17207       if test -z "$ac_sed_cmds"; then
17208         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17209       else
17210         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17211       fi
17212       ac_sed_frag=`expr $ac_sed_frag + 1`
17213       ac_beg=$ac_end
17214       ac_end=`expr $ac_end + $ac_max_sed_lines`
17215     fi
17216   done
17217   if test -z "$ac_sed_cmds"; then
17218     ac_sed_cmds=cat
17219   fi
17220 fi # test -n "$CONFIG_FILES"
17221
17222 _ACEOF
17223 cat >>$CONFIG_STATUS <<\_ACEOF
17224 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17225   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17226   case $ac_file in
17227   - | *:- | *:-:* ) # input from stdin
17228         cat >$tmp/stdin
17229         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17230         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17231   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17232         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17233   * )   ac_file_in=$ac_file.in ;;
17234   esac
17235
17236   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17237   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
17238 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17239          X"$ac_file" : 'X\(//\)[^/]' \| \
17240          X"$ac_file" : 'X\(//\)$' \| \
17241          X"$ac_file" : 'X\(/\)' \| \
17242          .     : '\(.\)' 2>/dev/null ||
17243 echo X"$ac_file" |
17244     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17245           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17246           /^X\(\/\/\)$/{ s//\1/; q; }
17247           /^X\(\/\).*/{ s//\1/; q; }
17248           s/.*/./; q'`
17249   { if $as_mkdir_p; then
17250     mkdir -p "$ac_dir"
17251   else
17252     as_dir="$ac_dir"
17253     as_dirs=
17254     while test ! -d "$as_dir"; do
17255       as_dirs="$as_dir $as_dirs"
17256       as_dir=`(dirname "$as_dir") 2>/dev/null ||
17257 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17258          X"$as_dir" : 'X\(//\)[^/]' \| \
17259          X"$as_dir" : 'X\(//\)$' \| \
17260          X"$as_dir" : 'X\(/\)' \| \
17261          .     : '\(.\)' 2>/dev/null ||
17262 echo X"$as_dir" |
17263     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17264           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17265           /^X\(\/\/\)$/{ s//\1/; q; }
17266           /^X\(\/\).*/{ s//\1/; q; }
17267           s/.*/./; q'`
17268     done
17269     test ! -n "$as_dirs" || mkdir $as_dirs
17270   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17271 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17272    { (exit 1); exit 1; }; }; }
17273
17274   ac_builddir=.
17275
17276 if test "$ac_dir" != .; then
17277   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17278   # A "../" for each directory in $ac_dir_suffix.
17279   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17280 else
17281   ac_dir_suffix= ac_top_builddir=
17282 fi
17283
17284 case $srcdir in
17285   .)  # No --srcdir option.  We are building in place.
17286     ac_srcdir=.
17287     if test -z "$ac_top_builddir"; then
17288        ac_top_srcdir=.
17289     else
17290        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17291     fi ;;
17292   [\\/]* | ?:[\\/]* )  # Absolute path.
17293     ac_srcdir=$srcdir$ac_dir_suffix;
17294     ac_top_srcdir=$srcdir ;;
17295   *) # Relative path.
17296     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17297     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17298 esac
17299
17300 # Do not use `cd foo && pwd` to compute absolute paths, because
17301 # the directories may not exist.
17302 case `pwd` in
17303 .) ac_abs_builddir="$ac_dir";;
17304 *)
17305   case "$ac_dir" in
17306   .) ac_abs_builddir=`pwd`;;
17307   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17308   *) ac_abs_builddir=`pwd`/"$ac_dir";;
17309   esac;;
17310 esac
17311 case $ac_abs_builddir in
17312 .) ac_abs_top_builddir=${ac_top_builddir}.;;
17313 *)
17314   case ${ac_top_builddir}. in
17315   .) ac_abs_top_builddir=$ac_abs_builddir;;
17316   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17317   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17318   esac;;
17319 esac
17320 case $ac_abs_builddir in
17321 .) ac_abs_srcdir=$ac_srcdir;;
17322 *)
17323   case $ac_srcdir in
17324   .) ac_abs_srcdir=$ac_abs_builddir;;
17325   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17326   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17327   esac;;
17328 esac
17329 case $ac_abs_builddir in
17330 .) ac_abs_top_srcdir=$ac_top_srcdir;;
17331 *)
17332   case $ac_top_srcdir in
17333   .) ac_abs_top_srcdir=$ac_abs_builddir;;
17334   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17335   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17336   esac;;
17337 esac
17338
17339
17340   case $INSTALL in
17341   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17342   *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
17343   esac
17344
17345   if test x"$ac_file" != x-; then
17346     { echo "$as_me:$LINENO: creating $ac_file" >&5
17347 echo "$as_me: creating $ac_file" >&6;}
17348     rm -f "$ac_file"
17349   fi
17350   # Let's still pretend it is `configure' which instantiates (i.e., don't
17351   # use $as_me), people would be surprised to read:
17352   #    /* config.h.  Generated by config.status.  */
17353   if test x"$ac_file" = x-; then
17354     configure_input=
17355   else
17356     configure_input="$ac_file.  "
17357   fi
17358   configure_input=$configure_input"Generated from `echo $ac_file_in |
17359                                      sed 's,.*/,,'` by configure."
17360
17361   # First look for the input files in the build tree, otherwise in the
17362   # src tree.
17363   ac_file_inputs=`IFS=:
17364     for f in $ac_file_in; do
17365       case $f in
17366       -) echo $tmp/stdin ;;
17367       [\\/$]*)
17368          # Absolute (can't be DOS-style, as IFS=:)
17369          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17370 echo "$as_me: error: cannot find input file: $f" >&2;}
17371    { (exit 1); exit 1; }; }
17372          echo "$f";;
17373       *) # Relative
17374          if test -f "$f"; then
17375            # Build tree
17376            echo "$f"
17377          elif test -f "$srcdir/$f"; then
17378            # Source tree
17379            echo "$srcdir/$f"
17380          else
17381            # /dev/null tree
17382            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
17383 echo "$as_me: error: cannot find input file: $f" >&2;}
17384    { (exit 1); exit 1; }; }
17385          fi;;
17386       esac
17387     done` || { (exit 1); exit 1; }
17388 _ACEOF
17389 cat >>$CONFIG_STATUS <<_ACEOF
17390   sed "$ac_vpsub
17391 $extrasub
17392 _ACEOF
17393 cat >>$CONFIG_STATUS <<\_ACEOF
17394 :t
17395 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17396 s,@configure_input@,$configure_input,;t t
17397 s,@srcdir@,$ac_srcdir,;t t
17398 s,@abs_srcdir@,$ac_abs_srcdir,;t t
17399 s,@top_srcdir@,$ac_top_srcdir,;t t
17400 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
17401 s,@builddir@,$ac_builddir,;t t
17402 s,@abs_builddir@,$ac_abs_builddir,;t t
17403 s,@top_builddir@,$ac_top_builddir,;t t
17404 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
17405 s,@INSTALL@,$ac_INSTALL,;t t
17406 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17407   rm -f $tmp/stdin
17408   if test x"$ac_file" != x-; then
17409     mv $tmp/out $ac_file
17410   else
17411     cat $tmp/out
17412     rm -f $tmp/out
17413   fi
17414
17415 done
17416 _ACEOF
17417 cat >>$CONFIG_STATUS <<\_ACEOF
17418
17419 #
17420 # CONFIG_COMMANDS section.
17421 #
17422 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17423   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17424   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17425   ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
17426 $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17427          X"$ac_dest" : 'X\(//\)[^/]' \| \
17428          X"$ac_dest" : 'X\(//\)$' \| \
17429          X"$ac_dest" : 'X\(/\)' \| \
17430          .     : '\(.\)' 2>/dev/null ||
17431 echo X"$ac_dest" |
17432     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17433           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17434           /^X\(\/\/\)$/{ s//\1/; q; }
17435           /^X\(\/\).*/{ s//\1/; q; }
17436           s/.*/./; q'`
17437   { if $as_mkdir_p; then
17438     mkdir -p "$ac_dir"
17439   else
17440     as_dir="$ac_dir"
17441     as_dirs=
17442     while test ! -d "$as_dir"; do
17443       as_dirs="$as_dir $as_dirs"
17444       as_dir=`(dirname "$as_dir") 2>/dev/null ||
17445 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17446          X"$as_dir" : 'X\(//\)[^/]' \| \
17447          X"$as_dir" : 'X\(//\)$' \| \
17448          X"$as_dir" : 'X\(/\)' \| \
17449          .     : '\(.\)' 2>/dev/null ||
17450 echo X"$as_dir" |
17451     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17452           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17453           /^X\(\/\/\)$/{ s//\1/; q; }
17454           /^X\(\/\).*/{ s//\1/; q; }
17455           s/.*/./; q'`
17456     done
17457     test ! -n "$as_dirs" || mkdir $as_dirs
17458   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17459 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17460    { (exit 1); exit 1; }; }; }
17461
17462   ac_builddir=.
17463
17464 if test "$ac_dir" != .; then
17465   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17466   # A "../" for each directory in $ac_dir_suffix.
17467   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17468 else
17469   ac_dir_suffix= ac_top_builddir=
17470 fi
17471
17472 case $srcdir in
17473   .)  # No --srcdir option.  We are building in place.
17474     ac_srcdir=.
17475     if test -z "$ac_top_builddir"; then
17476        ac_top_srcdir=.
17477     else
17478        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17479     fi ;;
17480   [\\/]* | ?:[\\/]* )  # Absolute path.
17481     ac_srcdir=$srcdir$ac_dir_suffix;
17482     ac_top_srcdir=$srcdir ;;
17483   *) # Relative path.
17484     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17485     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17486 esac
17487
17488 # Do not use `cd foo && pwd` to compute absolute paths, because
17489 # the directories may not exist.
17490 case `pwd` in
17491 .) ac_abs_builddir="$ac_dir";;
17492 *)
17493   case "$ac_dir" in
17494   .) ac_abs_builddir=`pwd`;;
17495   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17496   *) ac_abs_builddir=`pwd`/"$ac_dir";;
17497   esac;;
17498 esac
17499 case $ac_abs_builddir in
17500 .) ac_abs_top_builddir=${ac_top_builddir}.;;
17501 *)
17502   case ${ac_top_builddir}. in
17503   .) ac_abs_top_builddir=$ac_abs_builddir;;
17504   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17505   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17506   esac;;
17507 esac
17508 case $ac_abs_builddir in
17509 .) ac_abs_srcdir=$ac_srcdir;;
17510 *)
17511   case $ac_srcdir in
17512   .) ac_abs_srcdir=$ac_abs_builddir;;
17513   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17514   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17515   esac;;
17516 esac
17517 case $ac_abs_builddir in
17518 .) ac_abs_top_srcdir=$ac_top_srcdir;;
17519 *)
17520   case $ac_top_srcdir in
17521   .) ac_abs_top_srcdir=$ac_abs_builddir;;
17522   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17523   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17524   esac;;
17525 esac
17526
17527
17528   { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
17529 echo "$as_me: executing $ac_dest commands" >&6;}
17530   case $ac_dest in
17531     default ) chmod +x ${srcdir}/install-sh ;;
17532   esac
17533 done
17534 _ACEOF
17535
17536 cat >>$CONFIG_STATUS <<\_ACEOF
17537
17538 { (exit 0); exit 0; }
17539 _ACEOF
17540 chmod +x $CONFIG_STATUS
17541 ac_clean_files=$ac_clean_files_save
17542
17543
17544 # configure is writing to config.log, and then calls config.status.
17545 # config.status does its own redirection, appending to config.log.
17546 # Unfortunately, on DOS this fails, as config.log is still kept open
17547 # by configure, so config.status won't be able to write to it; its
17548 # output is simply discarded.  So we exec the FD to /dev/null,
17549 # effectively closing config.log, so it can be properly (re)opened and
17550 # appended to by config.status.  When coming back to configure, we
17551 # need to make the FD available again.
17552 if test "$no_create" != yes; then
17553   ac_cs_success=:
17554   ac_config_status_args=
17555   test "$silent" = yes &&
17556     ac_config_status_args="$ac_config_status_args --quiet"
17557   exec 5>/dev/null
17558   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
17559   exec 5>>config.log
17560   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17561   # would make configure fail if this is the last instruction.
17562   $ac_cs_success || { (exit 1); exit 1; }
17563 fi
17564
17565 #
17566 # CONFIG_SUBDIRS section.
17567 #
17568 if test "$no_recursion" != yes; then
17569
17570   # Remove --cache-file and --srcdir arguments so they do not pile up.
17571   ac_sub_configure_args=
17572   ac_prev=
17573   for ac_arg in $ac_configure_args; do
17574     if test -n "$ac_prev"; then
17575       ac_prev=
17576       continue
17577     fi
17578     case $ac_arg in
17579     -cache-file | --cache-file | --cache-fil | --cache-fi \
17580     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
17581       ac_prev=cache_file ;;
17582     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
17583     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
17584     | --c=*)
17585       ;;
17586     --config-cache | -C)
17587       ;;
17588     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
17589       ac_prev=srcdir ;;
17590     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
17591       ;;
17592     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
17593       ac_prev=prefix ;;
17594     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
17595       ;;
17596     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
17597     esac
17598   done
17599
17600   # Always prepend --prefix to ensure using the same prefix
17601   # in subdir configurations.
17602   ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
17603
17604   ac_popdir=`pwd`
17605   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
17606
17607     # Do not complain, so a configure script can configure whichever
17608     # parts of a large source tree are present.
17609     test -d $srcdir/$ac_dir || continue
17610
17611     { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
17612 echo "$as_me: configuring in $ac_dir" >&6;}
17613     { if $as_mkdir_p; then
17614     mkdir -p "$ac_dir"
17615   else
17616     as_dir="$ac_dir"
17617     as_dirs=
17618     while test ! -d "$as_dir"; do
17619       as_dirs="$as_dir $as_dirs"
17620       as_dir=`(dirname "$as_dir") 2>/dev/null ||
17621 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17622          X"$as_dir" : 'X\(//\)[^/]' \| \
17623          X"$as_dir" : 'X\(//\)$' \| \
17624          X"$as_dir" : 'X\(/\)' \| \
17625          .     : '\(.\)' 2>/dev/null ||
17626 echo X"$as_dir" |
17627     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17628           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17629           /^X\(\/\/\)$/{ s//\1/; q; }
17630           /^X\(\/\).*/{ s//\1/; q; }
17631           s/.*/./; q'`
17632     done
17633     test ! -n "$as_dirs" || mkdir $as_dirs
17634   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
17635 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
17636    { (exit 1); exit 1; }; }; }
17637
17638     ac_builddir=.
17639
17640 if test "$ac_dir" != .; then
17641   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
17642   # A "../" for each directory in $ac_dir_suffix.
17643   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
17644 else
17645   ac_dir_suffix= ac_top_builddir=
17646 fi
17647
17648 case $srcdir in
17649   .)  # No --srcdir option.  We are building in place.
17650     ac_srcdir=.
17651     if test -z "$ac_top_builddir"; then
17652        ac_top_srcdir=.
17653     else
17654        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
17655     fi ;;
17656   [\\/]* | ?:[\\/]* )  # Absolute path.
17657     ac_srcdir=$srcdir$ac_dir_suffix;
17658     ac_top_srcdir=$srcdir ;;
17659   *) # Relative path.
17660     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
17661     ac_top_srcdir=$ac_top_builddir$srcdir ;;
17662 esac
17663
17664 # Do not use `cd foo && pwd` to compute absolute paths, because
17665 # the directories may not exist.
17666 case `pwd` in
17667 .) ac_abs_builddir="$ac_dir";;
17668 *)
17669   case "$ac_dir" in
17670   .) ac_abs_builddir=`pwd`;;
17671   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
17672   *) ac_abs_builddir=`pwd`/"$ac_dir";;
17673   esac;;
17674 esac
17675 case $ac_abs_builddir in
17676 .) ac_abs_top_builddir=${ac_top_builddir}.;;
17677 *)
17678   case ${ac_top_builddir}. in
17679   .) ac_abs_top_builddir=$ac_abs_builddir;;
17680   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
17681   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
17682   esac;;
17683 esac
17684 case $ac_abs_builddir in
17685 .) ac_abs_srcdir=$ac_srcdir;;
17686 *)
17687   case $ac_srcdir in
17688   .) ac_abs_srcdir=$ac_abs_builddir;;
17689   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
17690   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
17691   esac;;
17692 esac
17693 case $ac_abs_builddir in
17694 .) ac_abs_top_srcdir=$ac_top_srcdir;;
17695 *)
17696   case $ac_top_srcdir in
17697   .) ac_abs_top_srcdir=$ac_abs_builddir;;
17698   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
17699   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
17700   esac;;
17701 esac
17702
17703
17704     cd $ac_dir
17705
17706     # Check for guested configure; otherwise get Cygnus style configure.
17707     if test -f $ac_srcdir/configure.gnu; then
17708       ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
17709     elif test -f $ac_srcdir/configure; then
17710       ac_sub_configure="$SHELL '$ac_srcdir/configure'"
17711     elif test -f $ac_srcdir/configure.in; then
17712       ac_sub_configure=$ac_configure
17713     else
17714       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
17715 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
17716       ac_sub_configure=
17717     fi
17718
17719     # The recursion is here.
17720     if test -n "$ac_sub_configure"; then
17721       # Make the cache file name correct relative to the subdirectory.
17722       case $cache_file in
17723       [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
17724       *) # Relative path.
17725         ac_sub_cache_file=$ac_top_builddir$cache_file ;;
17726       esac
17727
17728       { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
17729 echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
17730       # The eval makes quoting arguments work.
17731       eval $ac_sub_configure $ac_sub_configure_args \
17732            --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
17733         { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
17734 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
17735    { (exit 1); exit 1; }; }
17736     fi
17737
17738     cd $ac_popdir
17739   done
17740 fi
17741