1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.61.
4#
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 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 more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16  emulate sh
17  NULLCMD=:
18  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19  # is contrary to our usage.  Disable this feature.
20  alias -g '${1+"$@"}'='"$@"'
21  setopt NO_GLOB_SUBST
22else
23  case `(set -o) 2>/dev/null` in
24  *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42  echo "#! /bin/sh" >conf$$.sh
43  echo  "exit 0"   >>conf$$.sh
44  chmod +x conf$$.sh
45  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46    PATH_SEPARATOR=';'
47  else
48    PATH_SEPARATOR=:
49  fi
50  rm -f conf$$.sh
51fi
52
53# Support unset when possible.
54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
55  as_unset=unset
56else
57  as_unset=false
58fi
59
60
61# IFS
62# We need space, tab and new line, in precisely that order.  Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" ""	$as_nl"
69
70# Find who we are.  Look in the path if we contain no directory separator.
71case $0 in
72  *[\\/]* ) as_myself=$0 ;;
73  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76  IFS=$as_save_IFS
77  test -z "$as_dir" && as_dir=.
78  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82     ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87  as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91  { (exit 1); exit 1; }
92fi
93
94# Work around bugs in pre-3.0 UWIN ksh.
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
103for as_var in \
104  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106  LC_TELEPHONE LC_TIME
107do
108  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
109    eval $as_var=C; export $as_var
110  else
111    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
112  fi
113done
114
115# Required to use basename.
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117   test "X`expr 00001 : '.*\(...\)'`" = X001; then
118  as_expr=expr
119else
120  as_expr=false
121fi
122
123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
124  as_basename=basename
125else
126  as_basename=false
127fi
128
129
130# Name of the executable.
131as_me=`$as_basename -- "$0" ||
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133	 X"$0" : 'X\(//\)$' \| \
134	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
135echo X/"$0" |
136    sed '/^.*\/\([^/][^/]*\)\/*$/{
137	    s//\1/
138	    q
139	  }
140	  /^X\/\(\/\/\)$/{
141	    s//\1/
142	    q
143	  }
144	  /^X\/\(\/\).*/{
145	    s//\1/
146	    q
147	  }
148	  s/.*/./; q'`
149
150# CDPATH.
151$as_unset CDPATH
152
153
154if test "x$CONFIG_SHELL" = x; then
155  if (eval ":") 2>/dev/null; then
156  as_have_required=yes
157else
158  as_have_required=no
159fi
160
161  if test $as_have_required = yes && 	 (eval ":
162(as_func_return () {
163  (exit \$1)
164}
165as_func_success () {
166  as_func_return 0
167}
168as_func_failure () {
169  as_func_return 1
170}
171as_func_ret_success () {
172  return 0
173}
174as_func_ret_failure () {
175  return 1
176}
177
178exitcode=0
179if as_func_success; then
180  :
181else
182  exitcode=1
183  echo as_func_success failed.
184fi
185
186if as_func_failure; then
187  exitcode=1
188  echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192  :
193else
194  exitcode=1
195  echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199  exitcode=1
200  echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204  :
205else
206  exitcode=1
207  echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213  as_lineno_1=\$LINENO
214  as_lineno_2=\$LINENO
215  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218  :
219else
220  as_candidate_shells=
221    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224  IFS=$as_save_IFS
225  test -z "$as_dir" && as_dir=.
226  case $as_dir in
227	 /*)
228	   for as_base in sh bash ksh sh5; do
229	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230	   done;;
231       esac
232done
233IFS=$as_save_IFS
234
235
236      for as_shell in $as_candidate_shells $SHELL; do
237	 # Try only shells that exist, to save several forks.
238	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239		{ ("$as_shell") 2> /dev/null <<\_ASEOF
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241  emulate sh
242  NULLCMD=:
243  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244  # is contrary to our usage.  Disable this feature.
245  alias -g '${1+"$@"}'='"$@"'
246  setopt NO_GLOB_SUBST
247else
248  case `(set -o) 2>/dev/null` in
249  *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258  CONFIG_SHELL=$as_shell
259	       as_have_required=yes
260	       if { "$as_shell" 2> /dev/null <<\_ASEOF
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262  emulate sh
263  NULLCMD=:
264  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265  # is contrary to our usage.  Disable this feature.
266  alias -g '${1+"$@"}'='"$@"'
267  setopt NO_GLOB_SUBST
268else
269  case `(set -o) 2>/dev/null` in
270  *posix*) set -o posix ;;
271esac
272
273fi
274
275
276:
277(as_func_return () {
278  (exit $1)
279}
280as_func_success () {
281  as_func_return 0
282}
283as_func_failure () {
284  as_func_return 1
285}
286as_func_ret_success () {
287  return 0
288}
289as_func_ret_failure () {
290  return 1
291}
292
293exitcode=0
294if as_func_success; then
295  :
296else
297  exitcode=1
298  echo as_func_success failed.
299fi
300
301if as_func_failure; then
302  exitcode=1
303  echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307  :
308else
309  exitcode=1
310  echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314  exitcode=1
315  echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319  :
320else
321  exitcode=1
322  echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
328  as_lineno_1=$LINENO
329  as_lineno_2=$LINENO
330  test "x$as_lineno_1" != "x$as_lineno_2" &&
331  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335  break
336fi
337
338fi
339
340      done
341
342      if test "x$CONFIG_SHELL" != x; then
343  for as_var in BASH_ENV ENV
344        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345        done
346        export CONFIG_SHELL
347        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351    if test $as_have_required = no; then
352  echo This script requires a shell more modern than all the
353      echo shells that I found on your system.  Please install a
354      echo modern shell, or manually run the script under such a
355      echo shell if you do have one.
356      { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367  (exit \$1)
368}
369as_func_success () {
370  as_func_return 0
371}
372as_func_failure () {
373  as_func_return 1
374}
375as_func_ret_success () {
376  return 0
377}
378as_func_ret_failure () {
379  return 1
380}
381
382exitcode=0
383if as_func_success; then
384  :
385else
386  exitcode=1
387  echo as_func_success failed.
388fi
389
390if as_func_failure; then
391  exitcode=1
392  echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396  :
397else
398  exitcode=1
399  echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403  exitcode=1
404  echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408  :
409else
410  exitcode=1
411  echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
415  echo No shell found that supports shell functions.
416  echo Please tell autoconf@gnu.org about your system,
417  echo including any error possibly output before this
418  echo message
419}
420
421
422
423  as_lineno_1=$LINENO
424  as_lineno_2=$LINENO
425  test "x$as_lineno_1" != "x$as_lineno_2" &&
426  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
427
428  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429  # uniformly replaced by the line number.  The first 'sed' inserts a
430  # line-number line after each line using $LINENO; the second 'sed'
431  # does the real work.  The second script uses 'N' to pair each
432  # line-number line with the line containing $LINENO, and appends
433  # trailing '-' during substitution so that $LINENO is not a special
434  # case at line end.
435  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
436  # scripts with optimization help from Paolo Bonzini.  Blame Lee
437  # E. McMahon (1931-1989) for sed's syntax.  :-)
438  sed -n '
439    p
440    /[$]LINENO/=
441  ' <$as_myself |
442    sed '
443      s/[$]LINENO.*/&-/
444      t lineno
445      b
446      :lineno
447      N
448      :loop
449      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450      t loop
451      s/-\n.*//
452    ' >$as_me.lineno &&
453  chmod +x "$as_me.lineno" ||
454    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455   { (exit 1); exit 1; }; }
456
457  # Don't try to exec as it changes $[0], causing all sort of problems
458  # (the dirname of $[0] is not the place where we might find the
459  # original and so on.  Autoconf is especially sensitive to this).
460  . "./$as_me.lineno"
461  # Exit status is that of the last command.
462  exit
463}
464
465
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467  as_dirname=dirname
468else
469  as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475  case `echo 'x\c'` in
476  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
477  *)   ECHO_C='\c';;
478  esac;;
479*)
480  ECHO_N='-n';;
481esac
482
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484   test "X`expr 00001 : '.*\(...\)'`" = X001; then
485  as_expr=expr
486else
487  as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
491if test -d conf$$.dir; then
492  rm -f conf$$.dir/conf$$.file
493else
494  rm -f conf$$.dir
495  mkdir conf$$.dir
496fi
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
499  as_ln_s='ln -s'
500  # ... but there are two gotchas:
501  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503  # In both cases, we have to default to `cp -p'.
504  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
505    as_ln_s='cp -p'
506elif ln conf$$.file conf$$ 2>/dev/null; then
507  as_ln_s=ln
508else
509  as_ln_s='cp -p'
510fi
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
513
514if mkdir -p . 2>/dev/null; then
515  as_mkdir_p=:
516else
517  test -d ./-p && rmdir ./-p
518  as_mkdir_p=false
519fi
520
521if test -x / >/dev/null 2>&1; then
522  as_test_x='test -x'
523else
524  if ls -dL / >/dev/null 2>&1; then
525    as_ls_L_option=L
526  else
527    as_ls_L_option=
528  fi
529  as_test_x='
530    eval sh -c '\''
531      if test -d "$1"; then
532        test -d "$1/.";
533      else
534	case $1 in
535        -*)set "./$1";;
536	esac;
537	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538	???[sx]*):;;*)false;;esac;fi
539    '\'' sh
540  '
541fi
542as_executable_p=$as_test_x
543
544# Sed expression to map a string onto a valid CPP name.
545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
546
547# Sed expression to map a string onto a valid variable name.
548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
549
550
551
552exec 7<&0 </dev/null 6>&1
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
559#
560# Initializations.
561#
562ac_default_prefix=/usr/local
563ac_clean_files=
564ac_config_libobj_dir=.
565LIBOBJS=
566cross_compiling=no
567subdirs=
568MFLAGS=
569MAKEFLAGS=
570SHELL=${CONFIG_SHELL-/bin/sh}
571
572# Identity of this package.
573PACKAGE_NAME=
574PACKAGE_TARNAME=
575PACKAGE_VERSION=
576PACKAGE_STRING=
577PACKAGE_BUGREPORT=
578
579ac_unique_file="example.c"
580# Factoring default headers for most tests.
581ac_includes_default="\
582#include <stdio.h>
583#ifdef HAVE_SYS_TYPES_H
584# include <sys/types.h>
585#endif
586#ifdef HAVE_SYS_STAT_H
587# include <sys/stat.h>
588#endif
589#ifdef STDC_HEADERS
590# include <stdlib.h>
591# include <stddef.h>
592#else
593# ifdef HAVE_STDLIB_H
594#  include <stdlib.h>
595# endif
596#endif
597#ifdef HAVE_STRING_H
598# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599#  include <memory.h>
600# endif
601# include <string.h>
602#endif
603#ifdef HAVE_STRINGS_H
604# include <strings.h>
605#endif
606#ifdef HAVE_INTTYPES_H
607# include <inttypes.h>
608#endif
609#ifdef HAVE_STDINT_H
610# include <stdint.h>
611#endif
612#ifdef HAVE_UNISTD_H
613# include <unistd.h>
614#endif"
615
616ac_subst_vars='SHELL
617PATH_SEPARATOR
618PACKAGE_NAME
619PACKAGE_TARNAME
620PACKAGE_VERSION
621PACKAGE_STRING
622PACKAGE_BUGREPORT
623exec_prefix
624prefix
625program_transform_name
626bindir
627sbindir
628libexecdir
629datarootdir
630datadir
631sysconfdir
632sharedstatedir
633localstatedir
634includedir
635oldincludedir
636docdir
637infodir
638htmldir
639dvidir
640pdfdir
641psdir
642libdir
643localedir
644mandir
645DEFS
646ECHO_C
647ECHO_N
648ECHO_T
649LIBS
650build_alias
651host_alias
652target_alias
653CONFIGDIR
654PACKAGE
655VERSION
656example_LIB_FILE
657CYGPATH
658EXEEXT
659PKG_LIB_FILE
660PKG_STUB_LIB_FILE
661PKG_STUB_SOURCES
662PKG_STUB_OBJECTS
663PKG_TCL_SOURCES
664PKG_HEADERS
665PKG_INCLUDES
666PKG_LIBS
667PKG_CFLAGS
668TCL_VERSION
669TCL_PATCH_LEVEL
670TCL_BIN_DIR
671TCL_SRC_DIR
672TCL_LIB_FILE
673TCL_LIB_FLAG
674TCL_LIB_SPEC
675TCL_STUB_LIB_FILE
676TCL_STUB_LIB_FLAG
677TCL_STUB_LIB_SPEC
678CLEANFILES
679TCL_LIBS
680TCL_DEFS
681TCL_EXTRA_CFLAGS
682TCL_LD_FLAGS
683TCL_SHLIB_LD_LIBS
684TDOM_VERSION
685TDOM_STUB_LIB_SPEC
686TDOM_SRC_DIR
687CC
688CFLAGS
689LDFLAGS
690CPPFLAGS
691ac_ct_CC
692OBJEXT
693CPP
694INSTALL_PROGRAM
695INSTALL_SCRIPT
696INSTALL_DATA
697SET_MAKE
698RANLIB
699GREP
700EGREP
701MATH_LIBS
702TCL_INCLUDES
703EXTRA_SOURCES
704TCL_THREADS
705SHARED_BUILD
706AR
707CELIB_DIR
708CFLAGS_DEBUG
709CFLAGS_OPTIMIZE
710CFLAGS_WARNING
711STLIB_LD
712SHLIB_LD
713SHLIB_LD_LIBS
714SHLIB_CFLAGS
715LD_LIBRARY_PATH_VAR
716CFLAGS_DEFAULT
717LDFLAGS_DEFAULT
718TCL_DBGX
719MAKE_LIB
720MAKE_SHARED_LIB
721MAKE_STATIC_LIB
722MAKE_STUB_LIB
723RANLIB_STUB
724VC_MANIFEST_EMBED_DLL
725VC_MANIFEST_EMBED_EXE
726TCLSH_PROG
727EXAMPLE_INCLUDES
728LIBOBJS
729LTLIBOBJS'
730ac_subst_files=''
731      ac_precious_vars='build_alias
732host_alias
733target_alias
734CC
735CFLAGS
736LDFLAGS
737LIBS
738CPPFLAGS
739CPP'
740
741
742# Initialize some variables set by options.
743ac_init_help=
744ac_init_version=false
745# The variables have the same names as the options, with
746# dashes changed to underlines.
747cache_file=/dev/null
748exec_prefix=NONE
749no_create=
750no_recursion=
751prefix=NONE
752program_prefix=NONE
753program_suffix=NONE
754program_transform_name=s,x,x,
755silent=
756site=
757srcdir=
758verbose=
759x_includes=NONE
760x_libraries=NONE
761
762# Installation directory options.
763# These are left unexpanded so users can "make install exec_prefix=/foo"
764# and all the variables that are supposed to be based on exec_prefix
765# by default will actually change.
766# Use braces instead of parens because sh, perl, etc. also accept them.
767# (The list follows the same order as the GNU Coding Standards.)
768bindir='${exec_prefix}/bin'
769sbindir='${exec_prefix}/sbin'
770libexecdir='${exec_prefix}/libexec'
771datarootdir='${prefix}/share'
772datadir='${datarootdir}'
773sysconfdir='${prefix}/etc'
774sharedstatedir='${prefix}/com'
775localstatedir='${prefix}/var'
776includedir='${prefix}/include'
777oldincludedir='/usr/include'
778docdir='${datarootdir}/doc/${PACKAGE}'
779infodir='${datarootdir}/info'
780htmldir='${docdir}'
781dvidir='${docdir}'
782pdfdir='${docdir}'
783psdir='${docdir}'
784libdir='${exec_prefix}/lib'
785localedir='${datarootdir}/locale'
786mandir='${datarootdir}/man'
787
788ac_prev=
789ac_dashdash=
790for ac_option
791do
792  # If the previous option needs an argument, assign it.
793  if test -n "$ac_prev"; then
794    eval $ac_prev=\$ac_option
795    ac_prev=
796    continue
797  fi
798
799  case $ac_option in
800  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
801  *)	ac_optarg=yes ;;
802  esac
803
804  # Accept the important Cygnus configure options, so we can diagnose typos.
805
806  case $ac_dashdash$ac_option in
807  --)
808    ac_dashdash=yes ;;
809
810  -bindir | --bindir | --bindi | --bind | --bin | --bi)
811    ac_prev=bindir ;;
812  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
813    bindir=$ac_optarg ;;
814
815  -build | --build | --buil | --bui | --bu)
816    ac_prev=build_alias ;;
817  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
818    build_alias=$ac_optarg ;;
819
820  -cache-file | --cache-file | --cache-fil | --cache-fi \
821  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
822    ac_prev=cache_file ;;
823  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
824  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
825    cache_file=$ac_optarg ;;
826
827  --config-cache | -C)
828    cache_file=config.cache ;;
829
830  -datadir | --datadir | --datadi | --datad)
831    ac_prev=datadir ;;
832  -datadir=* | --datadir=* | --datadi=* | --datad=*)
833    datadir=$ac_optarg ;;
834
835  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
836  | --dataroo | --dataro | --datar)
837    ac_prev=datarootdir ;;
838  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
839  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
840    datarootdir=$ac_optarg ;;
841
842  -disable-* | --disable-*)
843    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
844    # Reject names that are not valid shell variable names.
845    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
846      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
847   { (exit 1); exit 1; }; }
848    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
849    eval enable_$ac_feature=no ;;
850
851  -docdir | --docdir | --docdi | --doc | --do)
852    ac_prev=docdir ;;
853  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
854    docdir=$ac_optarg ;;
855
856  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
857    ac_prev=dvidir ;;
858  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
859    dvidir=$ac_optarg ;;
860
861  -enable-* | --enable-*)
862    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
863    # Reject names that are not valid shell variable names.
864    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
865      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
866   { (exit 1); exit 1; }; }
867    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
868    eval enable_$ac_feature=\$ac_optarg ;;
869
870  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
871  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
872  | --exec | --exe | --ex)
873    ac_prev=exec_prefix ;;
874  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
875  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
876  | --exec=* | --exe=* | --ex=*)
877    exec_prefix=$ac_optarg ;;
878
879  -gas | --gas | --ga | --g)
880    # Obsolete; use --with-gas.
881    with_gas=yes ;;
882
883  -help | --help | --hel | --he | -h)
884    ac_init_help=long ;;
885  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
886    ac_init_help=recursive ;;
887  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
888    ac_init_help=short ;;
889
890  -host | --host | --hos | --ho)
891    ac_prev=host_alias ;;
892  -host=* | --host=* | --hos=* | --ho=*)
893    host_alias=$ac_optarg ;;
894
895  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
896    ac_prev=htmldir ;;
897  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
898  | --ht=*)
899    htmldir=$ac_optarg ;;
900
901  -includedir | --includedir | --includedi | --included | --include \
902  | --includ | --inclu | --incl | --inc)
903    ac_prev=includedir ;;
904  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
905  | --includ=* | --inclu=* | --incl=* | --inc=*)
906    includedir=$ac_optarg ;;
907
908  -infodir | --infodir | --infodi | --infod | --info | --inf)
909    ac_prev=infodir ;;
910  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
911    infodir=$ac_optarg ;;
912
913  -libdir | --libdir | --libdi | --libd)
914    ac_prev=libdir ;;
915  -libdir=* | --libdir=* | --libdi=* | --libd=*)
916    libdir=$ac_optarg ;;
917
918  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
919  | --libexe | --libex | --libe)
920    ac_prev=libexecdir ;;
921  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
922  | --libexe=* | --libex=* | --libe=*)
923    libexecdir=$ac_optarg ;;
924
925  -localedir | --localedir | --localedi | --localed | --locale)
926    ac_prev=localedir ;;
927  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
928    localedir=$ac_optarg ;;
929
930  -localstatedir | --localstatedir | --localstatedi | --localstated \
931  | --localstate | --localstat | --localsta | --localst | --locals)
932    ac_prev=localstatedir ;;
933  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
934  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
935    localstatedir=$ac_optarg ;;
936
937  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
938    ac_prev=mandir ;;
939  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
940    mandir=$ac_optarg ;;
941
942  -nfp | --nfp | --nf)
943    # Obsolete; use --without-fp.
944    with_fp=no ;;
945
946  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
947  | --no-cr | --no-c | -n)
948    no_create=yes ;;
949
950  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
952    no_recursion=yes ;;
953
954  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
955  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
956  | --oldin | --oldi | --old | --ol | --o)
957    ac_prev=oldincludedir ;;
958  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
959  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
960  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
961    oldincludedir=$ac_optarg ;;
962
963  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
964    ac_prev=prefix ;;
965  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
966    prefix=$ac_optarg ;;
967
968  -program-prefix | --program-prefix | --program-prefi | --program-pref \
969  | --program-pre | --program-pr | --program-p)
970    ac_prev=program_prefix ;;
971  -program-prefix=* | --program-prefix=* | --program-prefi=* \
972  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
973    program_prefix=$ac_optarg ;;
974
975  -program-suffix | --program-suffix | --program-suffi | --program-suff \
976  | --program-suf | --program-su | --program-s)
977    ac_prev=program_suffix ;;
978  -program-suffix=* | --program-suffix=* | --program-suffi=* \
979  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
980    program_suffix=$ac_optarg ;;
981
982  -program-transform-name | --program-transform-name \
983  | --program-transform-nam | --program-transform-na \
984  | --program-transform-n | --program-transform- \
985  | --program-transform | --program-transfor \
986  | --program-transfo | --program-transf \
987  | --program-trans | --program-tran \
988  | --progr-tra | --program-tr | --program-t)
989    ac_prev=program_transform_name ;;
990  -program-transform-name=* | --program-transform-name=* \
991  | --program-transform-nam=* | --program-transform-na=* \
992  | --program-transform-n=* | --program-transform-=* \
993  | --program-transform=* | --program-transfor=* \
994  | --program-transfo=* | --program-transf=* \
995  | --program-trans=* | --program-tran=* \
996  | --progr-tra=* | --program-tr=* | --program-t=*)
997    program_transform_name=$ac_optarg ;;
998
999  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1000    ac_prev=pdfdir ;;
1001  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1002    pdfdir=$ac_optarg ;;
1003
1004  -psdir | --psdir | --psdi | --psd | --ps)
1005    ac_prev=psdir ;;
1006  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1007    psdir=$ac_optarg ;;
1008
1009  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1010  | -silent | --silent | --silen | --sile | --sil)
1011    silent=yes ;;
1012
1013  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1014    ac_prev=sbindir ;;
1015  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1016  | --sbi=* | --sb=*)
1017    sbindir=$ac_optarg ;;
1018
1019  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1020  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1021  | --sharedst | --shareds | --shared | --share | --shar \
1022  | --sha | --sh)
1023    ac_prev=sharedstatedir ;;
1024  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1025  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1026  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1027  | --sha=* | --sh=*)
1028    sharedstatedir=$ac_optarg ;;
1029
1030  -site | --site | --sit)
1031    ac_prev=site ;;
1032  -site=* | --site=* | --sit=*)
1033    site=$ac_optarg ;;
1034
1035  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1036    ac_prev=srcdir ;;
1037  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1038    srcdir=$ac_optarg ;;
1039
1040  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1041  | --syscon | --sysco | --sysc | --sys | --sy)
1042    ac_prev=sysconfdir ;;
1043  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1044  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1045    sysconfdir=$ac_optarg ;;
1046
1047  -target | --target | --targe | --targ | --tar | --ta | --t)
1048    ac_prev=target_alias ;;
1049  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1050    target_alias=$ac_optarg ;;
1051
1052  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1053    verbose=yes ;;
1054
1055  -version | --version | --versio | --versi | --vers | -V)
1056    ac_init_version=: ;;
1057
1058  -with-* | --with-*)
1059    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1060    # Reject names that are not valid shell variable names.
1061    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1062      { echo "$as_me: error: invalid package name: $ac_package" >&2
1063   { (exit 1); exit 1; }; }
1064    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1065    eval with_$ac_package=\$ac_optarg ;;
1066
1067  -without-* | --without-*)
1068    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1069    # Reject names that are not valid shell variable names.
1070    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1071      { echo "$as_me: error: invalid package name: $ac_package" >&2
1072   { (exit 1); exit 1; }; }
1073    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1074    eval with_$ac_package=no ;;
1075
1076  --x)
1077    # Obsolete; use --with-x.
1078    with_x=yes ;;
1079
1080  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1081  | --x-incl | --x-inc | --x-in | --x-i)
1082    ac_prev=x_includes ;;
1083  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1084  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1085    x_includes=$ac_optarg ;;
1086
1087  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1088  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1089    ac_prev=x_libraries ;;
1090  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1091  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1092    x_libraries=$ac_optarg ;;
1093
1094  -*) { echo "$as_me: error: unrecognized option: $ac_option
1095Try \`$0 --help' for more information." >&2
1096   { (exit 1); exit 1; }; }
1097    ;;
1098
1099  *=*)
1100    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1101    # Reject names that are not valid shell variable names.
1102    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1103      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1104   { (exit 1); exit 1; }; }
1105    eval $ac_envvar=\$ac_optarg
1106    export $ac_envvar ;;
1107
1108  *)
1109    # FIXME: should be removed in autoconf 3.0.
1110    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1111    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1112      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1113    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1114    ;;
1115
1116  esac
1117done
1118
1119if test -n "$ac_prev"; then
1120  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1121  { echo "$as_me: error: missing argument to $ac_option" >&2
1122   { (exit 1); exit 1; }; }
1123fi
1124
1125# Be sure to have absolute directory names.
1126for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1127		datadir sysconfdir sharedstatedir localstatedir includedir \
1128		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1129		libdir localedir mandir
1130do
1131  eval ac_val=\$$ac_var
1132  case $ac_val in
1133    [\\/$]* | ?:[\\/]* )  continue;;
1134    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1135  esac
1136  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1137   { (exit 1); exit 1; }; }
1138done
1139
1140# There might be people who depend on the old broken behavior: `$host'
1141# used to hold the argument of --host etc.
1142# FIXME: To remove some day.
1143build=$build_alias
1144host=$host_alias
1145target=$target_alias
1146
1147# FIXME: To remove some day.
1148if test "x$host_alias" != x; then
1149  if test "x$build_alias" = x; then
1150    cross_compiling=maybe
1151    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1152    If a cross compiler is detected then cross compile mode will be used." >&2
1153  elif test "x$build_alias" != "x$host_alias"; then
1154    cross_compiling=yes
1155  fi
1156fi
1157
1158ac_tool_prefix=
1159test -n "$host_alias" && ac_tool_prefix=$host_alias-
1160
1161test "$silent" = yes && exec 6>/dev/null
1162
1163
1164ac_pwd=`pwd` && test -n "$ac_pwd" &&
1165ac_ls_di=`ls -di .` &&
1166ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1167  { echo "$as_me: error: Working directory cannot be determined" >&2
1168   { (exit 1); exit 1; }; }
1169test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1170  { echo "$as_me: error: pwd does not report name of working directory" >&2
1171   { (exit 1); exit 1; }; }
1172
1173
1174# Find the source files, if location was not specified.
1175if test -z "$srcdir"; then
1176  ac_srcdir_defaulted=yes
1177  # Try the directory containing this script, then the parent directory.
1178  ac_confdir=`$as_dirname -- "$0" ||
1179$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1180	 X"$0" : 'X\(//\)[^/]' \| \
1181	 X"$0" : 'X\(//\)$' \| \
1182	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1183echo X"$0" |
1184    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1185	    s//\1/
1186	    q
1187	  }
1188	  /^X\(\/\/\)[^/].*/{
1189	    s//\1/
1190	    q
1191	  }
1192	  /^X\(\/\/\)$/{
1193	    s//\1/
1194	    q
1195	  }
1196	  /^X\(\/\).*/{
1197	    s//\1/
1198	    q
1199	  }
1200	  s/.*/./; q'`
1201  srcdir=$ac_confdir
1202  if test ! -r "$srcdir/$ac_unique_file"; then
1203    srcdir=..
1204  fi
1205else
1206  ac_srcdir_defaulted=no
1207fi
1208if test ! -r "$srcdir/$ac_unique_file"; then
1209  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1210  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1211   { (exit 1); exit 1; }; }
1212fi
1213ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1214ac_abs_confdir=`(
1215	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1216   { (exit 1); exit 1; }; }
1217	pwd)`
1218# When building in place, set srcdir=.
1219if test "$ac_abs_confdir" = "$ac_pwd"; then
1220  srcdir=.
1221fi
1222# Remove unnecessary trailing slashes from srcdir.
1223# Double slashes in file names in object file debugging info
1224# mess up M-x gdb in Emacs.
1225case $srcdir in
1226*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1227esac
1228for ac_var in $ac_precious_vars; do
1229  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1230  eval ac_env_${ac_var}_value=\$${ac_var}
1231  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1232  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1233done
1234
1235#
1236# Report the --help message.
1237#
1238if test "$ac_init_help" = "long"; then
1239  # Omit some internal or obsolete options to make the list less imposing.
1240  # This message is too long to be a string in the A/UX 3.1 sh.
1241  cat <<_ACEOF
1242\`configure' configures this package to adapt to many kinds of systems.
1243
1244Usage: $0 [OPTION]... [VAR=VALUE]...
1245
1246To assign environment variables (e.g., CC, CFLAGS...), specify them as
1247VAR=VALUE.  See below for descriptions of some of the useful variables.
1248
1249Defaults for the options are specified in brackets.
1250
1251Configuration:
1252  -h, --help              display this help and exit
1253      --help=short        display options specific to this package
1254      --help=recursive    display the short help of all the included packages
1255  -V, --version           display version information and exit
1256  -q, --quiet, --silent   do not print \`checking...' messages
1257      --cache-file=FILE   cache test results in FILE [disabled]
1258  -C, --config-cache      alias for \`--cache-file=config.cache'
1259  -n, --no-create         do not create output files
1260      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1261
1262Installation directories:
1263  --prefix=PREFIX         install architecture-independent files in PREFIX
1264			  [$ac_default_prefix]
1265  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1266			  [PREFIX]
1267
1268By default, \`make install' will install all the files in
1269\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1270an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1271for instance \`--prefix=\$HOME'.
1272
1273For better control, use the options below.
1274
1275Fine tuning of the installation directories:
1276  --bindir=DIR           user executables [EPREFIX/bin]
1277  --sbindir=DIR          system admin executables [EPREFIX/sbin]
1278  --libexecdir=DIR       program executables [EPREFIX/libexec]
1279  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
1280  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
1281  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
1282  --libdir=DIR           object code libraries [EPREFIX/lib]
1283  --includedir=DIR       C header files [PREFIX/include]
1284  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
1285  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
1286  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
1287  --infodir=DIR          info documentation [DATAROOTDIR/info]
1288  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
1289  --mandir=DIR           man documentation [DATAROOTDIR/man]
1290  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
1291  --htmldir=DIR          html documentation [DOCDIR]
1292  --dvidir=DIR           dvi documentation [DOCDIR]
1293  --pdfdir=DIR           pdf documentation [DOCDIR]
1294  --psdir=DIR            ps documentation [DOCDIR]
1295_ACEOF
1296
1297  cat <<\_ACEOF
1298_ACEOF
1299fi
1300
1301if test -n "$ac_init_help"; then
1302
1303  cat <<\_ACEOF
1304
1305Optional Features:
1306  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1307  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1308  --enable-threads        build with threads
1309  --enable-shared         build and link with shared libraries (default: on)
1310  --enable-64bit          enable 64bit support (default: off)
1311  --enable-64bit-vis      enable 64bit Sparc VIS support (default: off)
1312  --disable-rpath         disable rpath support (default: on)
1313  --enable-wince          enable Win/CE support (where applicable)
1314  --enable-symbols        build with debugging symbols (default: off)
1315
1316Optional Packages:
1317  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1318  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1319  --with-tcl              directory containing tcl configuration
1320                          (tclConfig.sh)
1321  --with-tclinclude       directory containing the public Tcl header files
1322  --with-celib=DIR        use Windows/CE support library from DIR
1323
1324Some influential environment variables:
1325  CC          C compiler command
1326  CFLAGS      C compiler flags
1327  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1328              nonstandard directory <lib dir>
1329  LIBS        libraries to pass to the linker, e.g. -l<library>
1330  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1331              you have headers in a nonstandard directory <include dir>
1332  CPP         C preprocessor
1333
1334Use these variables to override the choices made by `configure' or to help
1335it to find libraries and programs with nonstandard names/locations.
1336
1337_ACEOF
1338ac_status=$?
1339fi
1340
1341if test "$ac_init_help" = "recursive"; then
1342  # If there are subdirs, report their specific --help.
1343  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1344    test -d "$ac_dir" || continue
1345    ac_builddir=.
1346
1347case "$ac_dir" in
1348.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1349*)
1350  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1351  # A ".." for each directory in $ac_dir_suffix.
1352  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1353  case $ac_top_builddir_sub in
1354  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1355  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1356  esac ;;
1357esac
1358ac_abs_top_builddir=$ac_pwd
1359ac_abs_builddir=$ac_pwd$ac_dir_suffix
1360# for backward compatibility:
1361ac_top_builddir=$ac_top_build_prefix
1362
1363case $srcdir in
1364  .)  # We are building in place.
1365    ac_srcdir=.
1366    ac_top_srcdir=$ac_top_builddir_sub
1367    ac_abs_top_srcdir=$ac_pwd ;;
1368  [\\/]* | ?:[\\/]* )  # Absolute name.
1369    ac_srcdir=$srcdir$ac_dir_suffix;
1370    ac_top_srcdir=$srcdir
1371    ac_abs_top_srcdir=$srcdir ;;
1372  *) # Relative name.
1373    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1374    ac_top_srcdir=$ac_top_build_prefix$srcdir
1375    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1376esac
1377ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1378
1379    cd "$ac_dir" || { ac_status=$?; continue; }
1380    # Check for guested configure.
1381    if test -f "$ac_srcdir/configure.gnu"; then
1382      echo &&
1383      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1384    elif test -f "$ac_srcdir/configure"; then
1385      echo &&
1386      $SHELL "$ac_srcdir/configure" --help=recursive
1387    else
1388      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1389    fi || ac_status=$?
1390    cd "$ac_pwd" || { ac_status=$?; break; }
1391  done
1392fi
1393
1394test -n "$ac_init_help" && exit $ac_status
1395if $ac_init_version; then
1396  cat <<\_ACEOF
1397configure
1398generated by GNU Autoconf 2.61
1399
1400Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14012002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1402This configure script is free software; the Free Software Foundation
1403gives unlimited permission to copy, distribute and modify it.
1404_ACEOF
1405  exit
1406fi
1407cat >config.log <<_ACEOF
1408This file contains any messages produced by compilers while
1409running configure, to aid debugging if configure makes a mistake.
1410
1411It was created by $as_me, which was
1412generated by GNU Autoconf 2.61.  Invocation command line was
1413
1414  $ $0 $@
1415
1416_ACEOF
1417exec 5>>config.log
1418{
1419cat <<_ASUNAME
1420## --------- ##
1421## Platform. ##
1422## --------- ##
1423
1424hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1425uname -m = `(uname -m) 2>/dev/null || echo unknown`
1426uname -r = `(uname -r) 2>/dev/null || echo unknown`
1427uname -s = `(uname -s) 2>/dev/null || echo unknown`
1428uname -v = `(uname -v) 2>/dev/null || echo unknown`
1429
1430/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1431/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
1432
1433/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
1434/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
1435/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1436/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
1437/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
1438/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
1439/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
1440
1441_ASUNAME
1442
1443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1444for as_dir in $PATH
1445do
1446  IFS=$as_save_IFS
1447  test -z "$as_dir" && as_dir=.
1448  echo "PATH: $as_dir"
1449done
1450IFS=$as_save_IFS
1451
1452} >&5
1453
1454cat >&5 <<_ACEOF
1455
1456
1457## ----------- ##
1458## Core tests. ##
1459## ----------- ##
1460
1461_ACEOF
1462
1463
1464# Keep a trace of the command line.
1465# Strip out --no-create and --no-recursion so they do not pile up.
1466# Strip out --silent because we don't want to record it for future runs.
1467# Also quote any args containing shell meta-characters.
1468# Make two passes to allow for proper duplicate-argument suppression.
1469ac_configure_args=
1470ac_configure_args0=
1471ac_configure_args1=
1472ac_must_keep_next=false
1473for ac_pass in 1 2
1474do
1475  for ac_arg
1476  do
1477    case $ac_arg in
1478    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1479    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1480    | -silent | --silent | --silen | --sile | --sil)
1481      continue ;;
1482    *\'*)
1483      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1484    esac
1485    case $ac_pass in
1486    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1487    2)
1488      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1489      if test $ac_must_keep_next = true; then
1490	ac_must_keep_next=false # Got value, back to normal.
1491      else
1492	case $ac_arg in
1493	  *=* | --config-cache | -C | -disable-* | --disable-* \
1494	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1495	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1496	  | -with-* | --with-* | -without-* | --without-* | --x)
1497	    case "$ac_configure_args0 " in
1498	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1499	    esac
1500	    ;;
1501	  -* ) ac_must_keep_next=true ;;
1502	esac
1503      fi
1504      ac_configure_args="$ac_configure_args '$ac_arg'"
1505      ;;
1506    esac
1507  done
1508done
1509$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1510$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1511
1512# When interrupted or exit'd, cleanup temporary files, and complete
1513# config.log.  We remove comments because anyway the quotes in there
1514# would cause problems or look ugly.
1515# WARNING: Use '\'' to represent an apostrophe within the trap.
1516# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1517trap 'exit_status=$?
1518  # Save into config.log some information that might help in debugging.
1519  {
1520    echo
1521
1522    cat <<\_ASBOX
1523## ---------------- ##
1524## Cache variables. ##
1525## ---------------- ##
1526_ASBOX
1527    echo
1528    # The following way of writing the cache mishandles newlines in values,
1529(
1530  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1531    eval ac_val=\$$ac_var
1532    case $ac_val in #(
1533    *${as_nl}*)
1534      case $ac_var in #(
1535      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1536echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1537      esac
1538      case $ac_var in #(
1539      _ | IFS | as_nl) ;; #(
1540      *) $as_unset $ac_var ;;
1541      esac ;;
1542    esac
1543  done
1544  (set) 2>&1 |
1545    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1546    *${as_nl}ac_space=\ *)
1547      sed -n \
1548	"s/'\''/'\''\\\\'\'''\''/g;
1549	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1550      ;; #(
1551    *)
1552      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1553      ;;
1554    esac |
1555    sort
1556)
1557    echo
1558
1559    cat <<\_ASBOX
1560## ----------------- ##
1561## Output variables. ##
1562## ----------------- ##
1563_ASBOX
1564    echo
1565    for ac_var in $ac_subst_vars
1566    do
1567      eval ac_val=\$$ac_var
1568      case $ac_val in
1569      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1570      esac
1571      echo "$ac_var='\''$ac_val'\''"
1572    done | sort
1573    echo
1574
1575    if test -n "$ac_subst_files"; then
1576      cat <<\_ASBOX
1577## ------------------- ##
1578## File substitutions. ##
1579## ------------------- ##
1580_ASBOX
1581      echo
1582      for ac_var in $ac_subst_files
1583      do
1584	eval ac_val=\$$ac_var
1585	case $ac_val in
1586	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1587	esac
1588	echo "$ac_var='\''$ac_val'\''"
1589      done | sort
1590      echo
1591    fi
1592
1593    if test -s confdefs.h; then
1594      cat <<\_ASBOX
1595## ----------- ##
1596## confdefs.h. ##
1597## ----------- ##
1598_ASBOX
1599      echo
1600      cat confdefs.h
1601      echo
1602    fi
1603    test "$ac_signal" != 0 &&
1604      echo "$as_me: caught signal $ac_signal"
1605    echo "$as_me: exit $exit_status"
1606  } >&5
1607  rm -f core *.core core.conftest.* &&
1608    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1609    exit $exit_status
1610' 0
1611for ac_signal in 1 2 13 15; do
1612  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1613done
1614ac_signal=0
1615
1616# confdefs.h avoids OS command line length limits that DEFS can exceed.
1617rm -f -r conftest* confdefs.h
1618
1619# Predefined preprocessor variables.
1620
1621cat >>confdefs.h <<_ACEOF
1622#define PACKAGE_NAME "$PACKAGE_NAME"
1623_ACEOF
1624
1625
1626cat >>confdefs.h <<_ACEOF
1627#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1628_ACEOF
1629
1630
1631cat >>confdefs.h <<_ACEOF
1632#define PACKAGE_VERSION "$PACKAGE_VERSION"
1633_ACEOF
1634
1635
1636cat >>confdefs.h <<_ACEOF
1637#define PACKAGE_STRING "$PACKAGE_STRING"
1638_ACEOF
1639
1640
1641cat >>confdefs.h <<_ACEOF
1642#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1643_ACEOF
1644
1645
1646# Let the site file select an alternate cache file if it wants to.
1647# Prefer explicitly selected file to automatically selected ones.
1648if test -n "$CONFIG_SITE"; then
1649  set x "$CONFIG_SITE"
1650elif test "x$prefix" != xNONE; then
1651  set x "$prefix/share/config.site" "$prefix/etc/config.site"
1652else
1653  set x "$ac_default_prefix/share/config.site" \
1654	"$ac_default_prefix/etc/config.site"
1655fi
1656shift
1657for ac_site_file
1658do
1659  if test -r "$ac_site_file"; then
1660    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1661echo "$as_me: loading site script $ac_site_file" >&6;}
1662    sed 's/^/| /' "$ac_site_file" >&5
1663    . "$ac_site_file"
1664  fi
1665done
1666
1667if test -r "$cache_file"; then
1668  # Some versions of bash will fail to source /dev/null (special
1669  # files actually), so we avoid doing that.
1670  if test -f "$cache_file"; then
1671    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1672echo "$as_me: loading cache $cache_file" >&6;}
1673    case $cache_file in
1674      [\\/]* | ?:[\\/]* ) . "$cache_file";;
1675      *)                      . "./$cache_file";;
1676    esac
1677  fi
1678else
1679  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1680echo "$as_me: creating cache $cache_file" >&6;}
1681  >$cache_file
1682fi
1683
1684# Check that the precious variables saved in the cache have kept the same
1685# value.
1686ac_cache_corrupted=false
1687for ac_var in $ac_precious_vars; do
1688  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1689  eval ac_new_set=\$ac_env_${ac_var}_set
1690  eval ac_old_val=\$ac_cv_env_${ac_var}_value
1691  eval ac_new_val=\$ac_env_${ac_var}_value
1692  case $ac_old_set,$ac_new_set in
1693    set,)
1694      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1695echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1696      ac_cache_corrupted=: ;;
1697    ,set)
1698      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1699echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1700      ac_cache_corrupted=: ;;
1701    ,);;
1702    *)
1703      if test "x$ac_old_val" != "x$ac_new_val"; then
1704	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1705echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1706	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1707echo "$as_me:   former value:  $ac_old_val" >&2;}
1708	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1709echo "$as_me:   current value: $ac_new_val" >&2;}
1710	ac_cache_corrupted=:
1711      fi;;
1712  esac
1713  # Pass precious variables to config.status.
1714  if test "$ac_new_set" = set; then
1715    case $ac_new_val in
1716    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1717    *) ac_arg=$ac_var=$ac_new_val ;;
1718    esac
1719    case " $ac_configure_args " in
1720      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1721      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1722    esac
1723  fi
1724done
1725if $ac_cache_corrupted; then
1726  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1727echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1728  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1729echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1730   { (exit 1); exit 1; }; }
1731fi
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749ac_ext=c
1750ac_cpp='$CPP $CPPFLAGS'
1751ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1752ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1753ac_compiler_gnu=$ac_cv_c_compiler_gnu
1754
1755
1756
1757ac_aux_dir=
1758for ac_dir in ../../tclconfig "$srcdir"/../../tclconfig; do
1759  if test -f "$ac_dir/install-sh"; then
1760    ac_aux_dir=$ac_dir
1761    ac_install_sh="$ac_aux_dir/install-sh -c"
1762    break
1763  elif test -f "$ac_dir/install.sh"; then
1764    ac_aux_dir=$ac_dir
1765    ac_install_sh="$ac_aux_dir/install.sh -c"
1766    break
1767  elif test -f "$ac_dir/shtool"; then
1768    ac_aux_dir=$ac_dir
1769    ac_install_sh="$ac_aux_dir/shtool install -c"
1770    break
1771  fi
1772done
1773if test -z "$ac_aux_dir"; then
1774  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ../../tclconfig \"$srcdir\"/../../tclconfig" >&5
1775echo "$as_me: error: cannot find install-sh or install.sh in ../../tclconfig \"$srcdir\"/../../tclconfig" >&2;}
1776   { (exit 1); exit 1; }; }
1777fi
1778
1779# These three variables are undocumented and unsupported,
1780# and are intended to be withdrawn in a future Autoconf release.
1781# They can cause serious problems if a builder's source tree is in a directory
1782# whose full name contains unusual characters.
1783ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
1784ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
1785ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
1786
1787
1788CONFIGDIR=${srcdir}/../../tclconfig
1789
1790
1791#----------------------------------------------------------------------
1792# __CHANGE__
1793# Set your package name and version numbers here.  The NODOT_VERSION is
1794# required for constructing the library name on systems that don't like
1795# dots in library names (Windows).  The VERSION variable is used on the
1796# other systems.
1797#----------------------------------------------------------------------
1798
1799PACKAGE=example
1800
1801MAJOR_VERSION=1
1802MINOR_VERSION=0
1803PATCHLEVEL=0
1804
1805VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${PATCHLEVEL}
1806NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}${PATCHLEVEL}
1807
1808
1809
1810
1811# This package name must be replaced statically for AC_SUBST to work
1812
1813
1814#--------------------------------------------------------------------
1815# We put this here so that you can compile with -DVERSION="1.2" to
1816# encode the package version directly into the source files.
1817#--------------------------------------------------------------------
1818
1819eval cat >>confdefs.h <<_ACEOF
1820#define VERSION "${VERSION}"
1821_ACEOF
1822
1823
1824#--------------------------------------------------------------------
1825# Call TEA_INIT as the first TEA_ macro to set up initial vars.
1826# This will define a ${TEA_PLATFORM} variable == "unix" or "windows".
1827#--------------------------------------------------------------------
1828
1829
1830    # TEA extensions pass this us the version of TEA they think they
1831    # are compatible with.
1832    TEA_VERSION="3.9"
1833
1834    { echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
1835echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6; }
1836    if test x"${PACKAGE_NAME}" = x ; then
1837	{ { echo "$as_me:$LINENO: error:
1838The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
1839echo "$as_me: error:
1840The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
1841   { (exit 1); exit 1; }; }
1842    fi
1843    if test x"" = x ; then
1844	{ { echo "$as_me:$LINENO: error:
1845TEA version not specified." >&5
1846echo "$as_me: error:
1847TEA version not specified." >&2;}
1848   { (exit 1); exit 1; }; }
1849    elif test "" != "${TEA_VERSION}" ; then
1850	{ echo "$as_me:$LINENO: result: warning: requested TEA version \"\", have \"${TEA_VERSION}\"" >&5
1851echo "${ECHO_T}warning: requested TEA version \"\", have \"${TEA_VERSION}\"" >&6; }
1852    else
1853	{ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
1854echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6; }
1855    fi
1856    case "`uname -s`" in
1857	*win32*|*WIN32*|*MINGW32_*)
1858	    # Extract the first word of "cygpath", so it can be a program name with args.
1859set dummy cygpath; ac_word=$2
1860{ echo "$as_me:$LINENO: checking for $ac_word" >&5
1861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1862if test "${ac_cv_prog_CYGPATH+set}" = set; then
1863  echo $ECHO_N "(cached) $ECHO_C" >&6
1864else
1865  if test -n "$CYGPATH"; then
1866  ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
1867else
1868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1869for as_dir in $PATH
1870do
1871  IFS=$as_save_IFS
1872  test -z "$as_dir" && as_dir=.
1873  for ac_exec_ext in '' $ac_executable_extensions; do
1874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1875    ac_cv_prog_CYGPATH="cygpath -w"
1876    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1877    break 2
1878  fi
1879done
1880done
1881IFS=$as_save_IFS
1882
1883  test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
1884fi
1885fi
1886CYGPATH=$ac_cv_prog_CYGPATH
1887if test -n "$CYGPATH"; then
1888  { echo "$as_me:$LINENO: result: $CYGPATH" >&5
1889echo "${ECHO_T}$CYGPATH" >&6; }
1890else
1891  { echo "$as_me:$LINENO: result: no" >&5
1892echo "${ECHO_T}no" >&6; }
1893fi
1894
1895
1896	    EXEEXT=".exe"
1897	    TEA_PLATFORM="windows"
1898	    ;;
1899	*CYGWIN_*)
1900	    CYGPATH=echo
1901	    EXEEXT=".exe"
1902	    # TEA_PLATFORM is determined later in LOAD_TCLCONFIG
1903	    ;;
1904	*)
1905	    CYGPATH=echo
1906	    EXEEXT=""
1907	    TEA_PLATFORM="unix"
1908	    ;;
1909    esac
1910
1911    # Check if exec_prefix is set. If not use fall back to prefix.
1912    # Note when adjusted, so that TEA_PREFIX can correct for this.
1913    # This is needed for recursive configures, since autoconf propagates
1914    # $prefix, but not $exec_prefix (doh!).
1915    if test x$exec_prefix = xNONE ; then
1916	exec_prefix_default=yes
1917	exec_prefix=$prefix
1918    fi
1919
1920
1921
1922
1923    # This package name must be replaced statically for AC_SUBST to work
1924
1925    # Substitute STUB_LIB_FILE in case package creates a stub library too.
1926
1927
1928    # We AC_SUBST these here to ensure they are subst'ed,
1929    # in case the user doesn't call TEA_ADD_...
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939#--------------------------------------------------------------------
1940# Load the tclConfig.sh file
1941#--------------------------------------------------------------------
1942
1943
1944
1945    #
1946    # Ok, lets find the tcl configuration
1947    # First, look for one uninstalled.
1948    # the alternative search directory is invoked by --with-tcl
1949    #
1950
1951    if test x"${no_tcl}" = x ; then
1952	# we reset no_tcl in case something fails here
1953	no_tcl=true
1954
1955# Check whether --with-tcl was given.
1956if test "${with_tcl+set}" = set; then
1957  withval=$with_tcl; with_tclconfig="${withval}"
1958fi
1959
1960	{ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
1961echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6; }
1962	if test "${ac_cv_c_tclconfig+set}" = set; then
1963  echo $ECHO_N "(cached) $ECHO_C" >&6
1964else
1965
1966
1967	    # First check to see if --with-tcl was specified.
1968	    if test x"${with_tclconfig}" != x ; then
1969		case "${with_tclconfig}" in
1970		    */tclConfig.sh )
1971			if test -f "${with_tclconfig}"; then
1972			    { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
1973echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
1974			    with_tclconfig="`echo "${with_tclconfig}" | sed 's!/tclConfig\.sh$!!'`"
1975			fi ;;
1976		esac
1977		if test -f "${with_tclconfig}/tclConfig.sh" ; then
1978		    ac_cv_c_tclconfig="`(cd "${with_tclconfig}"; pwd)`"
1979		else
1980		    { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
1981echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
1982   { (exit 1); exit 1; }; }
1983		fi
1984	    fi
1985
1986	    # then check for a private Tcl installation
1987	    if test x"${ac_cv_c_tclconfig}" = x ; then
1988		for i in \
1989			../tcl \
1990			`ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1991			`ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
1992			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
1993			../../tcl \
1994			`ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1995			`ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
1996			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
1997			../../../tcl \
1998			`ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
1999			`ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
2000			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
2001		    if test "${TEA_PLATFORM}" = "windows" \
2002			    -a -f "$i/win/tclConfig.sh" ; then
2003			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2004			break
2005		    fi
2006		    if test -f "$i/unix/tclConfig.sh" ; then
2007			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2008			break
2009		    fi
2010		done
2011	    fi
2012
2013	    # on Darwin, check in Framework installation locations
2014	    if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
2015		for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
2016			`ls -d /Library/Frameworks 2>/dev/null` \
2017			`ls -d /Network/Library/Frameworks 2>/dev/null` \
2018			`ls -d /System/Library/Frameworks 2>/dev/null` \
2019			; do
2020		    if test -f "$i/Tcl.framework/tclConfig.sh" ; then
2021			ac_cv_c_tclconfig="`(cd $i/Tcl.framework; pwd)`"
2022			break
2023		    fi
2024		done
2025	    fi
2026
2027	    # TEA specific: on Windows, check in common installation locations
2028	    if test "${TEA_PLATFORM}" = "windows" \
2029		-a x"${ac_cv_c_tclconfig}" = x ; then
2030		for i in `ls -d C:/Tcl/lib 2>/dev/null` \
2031			`ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
2032			; do
2033		    if test -f "$i/tclConfig.sh" ; then
2034			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2035			break
2036		    fi
2037		done
2038	    fi
2039
2040	    # check in a few common install locations
2041	    if test x"${ac_cv_c_tclconfig}" = x ; then
2042		for i in `ls -d ${libdir} 2>/dev/null` \
2043			`ls -d ${exec_prefix}/lib 2>/dev/null` \
2044			`ls -d ${prefix}/lib 2>/dev/null` \
2045			`ls -d /usr/local/lib 2>/dev/null` \
2046			`ls -d /usr/contrib/lib 2>/dev/null` \
2047			`ls -d /usr/lib 2>/dev/null` \
2048			`ls -d /usr/lib64 2>/dev/null` \
2049			; do
2050		    if test -f "$i/tclConfig.sh" ; then
2051			ac_cv_c_tclconfig="`(cd $i; pwd)`"
2052			break
2053		    fi
2054		done
2055	    fi
2056
2057	    # check in a few other private locations
2058	    if test x"${ac_cv_c_tclconfig}" = x ; then
2059		for i in \
2060			${srcdir}/../tcl \
2061			`ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
2062			`ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
2063			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
2064		    if test "${TEA_PLATFORM}" = "windows" \
2065			    -a -f "$i/win/tclConfig.sh" ; then
2066			ac_cv_c_tclconfig="`(cd $i/win; pwd)`"
2067			break
2068		    fi
2069		    if test -f "$i/unix/tclConfig.sh" ; then
2070			ac_cv_c_tclconfig="`(cd $i/unix; pwd)`"
2071			break
2072		    fi
2073		done
2074	    fi
2075
2076fi
2077
2078
2079	if test x"${ac_cv_c_tclconfig}" = x ; then
2080	    TCL_BIN_DIR="# no Tcl configs found"
2081	    { { echo "$as_me:$LINENO: error: Can't find Tcl configuration definitions" >&5
2082echo "$as_me: error: Can't find Tcl configuration definitions" >&2;}
2083   { (exit 1); exit 1; }; }
2084	else
2085	    no_tcl=
2086	    TCL_BIN_DIR="${ac_cv_c_tclconfig}"
2087	    { echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
2088echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2089	fi
2090    fi
2091
2092
2093    { echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
2094echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6; }
2095
2096    if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
2097        { echo "$as_me:$LINENO: result: loading" >&5
2098echo "${ECHO_T}loading" >&6; }
2099	. "${TCL_BIN_DIR}/tclConfig.sh"
2100    else
2101        { echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
2102echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
2103    fi
2104
2105    # eval is required to do the TCL_DBGX substitution
2106    eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
2107    eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
2108
2109    # If the TCL_BIN_DIR is the build directory (not the install directory),
2110    # then set the common variable name to the value of the build variables.
2111    # For example, the variable TCL_LIB_SPEC will be set to the value
2112    # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
2113    # instead of TCL_BUILD_LIB_SPEC since it will work with both an
2114    # installed and uninstalled version of Tcl.
2115    if test -f "${TCL_BIN_DIR}/Makefile" ; then
2116        TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}"
2117        TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}"
2118        TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}"
2119    elif test "`uname -s`" = "Darwin"; then
2120	# If Tcl was built as a framework, attempt to use the libraries
2121	# from the framework at the given location so that linking works
2122	# against Tcl.framework installed in an arbitrary location.
2123	case ${TCL_DEFS} in
2124	    *TCL_FRAMEWORK*)
2125		if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
2126		    for i in "`cd "${TCL_BIN_DIR}"; pwd`" \
2127			     "`cd "${TCL_BIN_DIR}"/../..; pwd`"; do
2128			if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
2129			    TCL_LIB_SPEC="-F`dirname "$i" | sed -e 's/ /\\\\ /g'` -framework ${TCL_LIB_FILE}"
2130			    break
2131			fi
2132		    done
2133		fi
2134		if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
2135		    TCL_STUB_LIB_SPEC="-L`echo "${TCL_BIN_DIR}"  | sed -e 's/ /\\\\ /g'` ${TCL_STUB_LIB_FLAG}"
2136		    TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
2137		fi
2138		;;
2139	esac
2140    fi
2141
2142    # eval is required to do the TCL_DBGX substitution
2143    eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
2144    eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
2145    eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
2146    eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161    case "`uname -s`" in
2162	*CYGWIN_*)
2163	    { echo "$as_me:$LINENO: checking for cygwin variant" >&5
2164echo $ECHO_N "checking for cygwin variant... $ECHO_C" >&6; }
2165	    case ${TCL_EXTRA_CFLAGS} in
2166		*-mwin32*|*-mno-cygwin*)
2167		    TEA_PLATFORM="windows"
2168		    CFLAGS="$CFLAGS -mwin32"
2169		    { echo "$as_me:$LINENO: result: win32" >&5
2170echo "${ECHO_T}win32" >&6; }
2171		    ;;
2172		*)
2173		    TEA_PLATFORM="unix"
2174		    { echo "$as_me:$LINENO: result: unix" >&5
2175echo "${ECHO_T}unix" >&6; }
2176		    ;;
2177	    esac
2178	    EXEEXT=".exe"
2179	    ;;
2180	*)
2181	    ;;
2182    esac
2183
2184    # Do this here as we have fully defined TEA_PLATFORM now
2185    if test "${TEA_PLATFORM}" = "windows" ; then
2186	# The BUILD_$pkg is to define the correct extern storage class
2187	# handling when making this package
2188
2189cat >>confdefs.h <<_ACEOF
2190#define BUILD_${PACKAGE_NAME}
2191_ACEOF
2192
2193	CLEANFILES="$CLEANFILES *.lib *.dll *.pdb *.exp"
2194    fi
2195
2196    # TEA specific:
2197
2198
2199
2200
2201
2202
2203
2204
2205#--------------------------------------------------------------------
2206# Load the tdomConfig.sh file
2207#--------------------------------------------------------------------
2208if test "${TEA_PLATFORM}" = "windows" ; then
2209    TDOM_BIN_DIR=../../win
2210else
2211    TDOM_BIN_DIR=../../unix
2212fi
2213
2214    { echo "$as_me:$LINENO: checking for existence of $TDOM_BIN_DIR/tdomConfig.sh" >&5
2215echo $ECHO_N "checking for existence of $TDOM_BIN_DIR/tdomConfig.sh... $ECHO_C" >&6; }
2216    if test -f "$TDOM_BIN_DIR/tdomConfig.sh" ; then
2217        { echo "$as_me:$LINENO: result: loading" >&5
2218echo "${ECHO_T}loading" >&6; }
2219	    . $TDOM_BIN_DIR/tdomConfig.sh
2220    else
2221        { echo "$as_me:$LINENO: result: file not found" >&5
2222echo "${ECHO_T}file not found" >&6; }
2223    fi
2224    if test -f "${TDOM_BIN_DIR}/Makefile" ; then
2225        TDOM_STUB_LIB_SPEC=${TDOM_BUILD_STUB_LIB_SPEC}
2226    fi
2227
2228
2229
2230
2231
2232#--------------------------------------------------------------------
2233# Load the tkConfig.sh file if necessary (Tk extension)
2234#--------------------------------------------------------------------
2235
2236#TEA_PATH_TKCONFIG
2237#TEA_LOAD_TKCONFIG
2238
2239#-----------------------------------------------------------------------
2240# Handle the --prefix=... option by defaulting to what Tcl gave.
2241# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
2242#-----------------------------------------------------------------------
2243
2244
2245    if test "${prefix}" = "NONE"; then
2246	prefix_default=yes
2247	if test x"${TCL_PREFIX}" != x; then
2248	    { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
2249echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
2250	    prefix=${TCL_PREFIX}
2251	else
2252	    { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
2253echo "$as_me: --prefix defaulting to /usr/local" >&6;}
2254	    prefix=/usr/local
2255	fi
2256    fi
2257    if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
2258	-o x"${exec_prefix_default}" = x"yes" ; then
2259	if test x"${TCL_EXEC_PREFIX}" != x; then
2260	    { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
2261echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
2262	    exec_prefix=${TCL_EXEC_PREFIX}
2263	else
2264	    { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
2265echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
2266	    exec_prefix=$prefix
2267	fi
2268    fi
2269
2270
2271#-----------------------------------------------------------------------
2272# Standard compiler checks.
2273# This sets up CC by using the CC env var, or looks for gcc otherwise.
2274# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
2275# the basic setup necessary to compile executables.
2276#-----------------------------------------------------------------------
2277
2278
2279    # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
2280    # in this macro, they need to go into TEA_SETUP_COMPILER instead.
2281
2282    # If the user did not set CFLAGS, set it now to keep
2283    # the AC_PROG_CC macro from adding "-g -O2".
2284    if test "${CFLAGS+set}" != "set" ; then
2285	CFLAGS=""
2286    fi
2287
2288    ac_ext=c
2289ac_cpp='$CPP $CPPFLAGS'
2290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2292ac_compiler_gnu=$ac_cv_c_compiler_gnu
2293if test -n "$ac_tool_prefix"; then
2294  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2295set dummy ${ac_tool_prefix}gcc; ac_word=$2
2296{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2297echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2298if test "${ac_cv_prog_CC+set}" = set; then
2299  echo $ECHO_N "(cached) $ECHO_C" >&6
2300else
2301  if test -n "$CC"; then
2302  ac_cv_prog_CC="$CC" # Let the user override the test.
2303else
2304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2305for as_dir in $PATH
2306do
2307  IFS=$as_save_IFS
2308  test -z "$as_dir" && as_dir=.
2309  for ac_exec_ext in '' $ac_executable_extensions; do
2310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2311    ac_cv_prog_CC="${ac_tool_prefix}gcc"
2312    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2313    break 2
2314  fi
2315done
2316done
2317IFS=$as_save_IFS
2318
2319fi
2320fi
2321CC=$ac_cv_prog_CC
2322if test -n "$CC"; then
2323  { echo "$as_me:$LINENO: result: $CC" >&5
2324echo "${ECHO_T}$CC" >&6; }
2325else
2326  { echo "$as_me:$LINENO: result: no" >&5
2327echo "${ECHO_T}no" >&6; }
2328fi
2329
2330
2331fi
2332if test -z "$ac_cv_prog_CC"; then
2333  ac_ct_CC=$CC
2334  # Extract the first word of "gcc", so it can be a program name with args.
2335set dummy gcc; ac_word=$2
2336{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2337echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2338if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2339  echo $ECHO_N "(cached) $ECHO_C" >&6
2340else
2341  if test -n "$ac_ct_CC"; then
2342  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2343else
2344as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2345for as_dir in $PATH
2346do
2347  IFS=$as_save_IFS
2348  test -z "$as_dir" && as_dir=.
2349  for ac_exec_ext in '' $ac_executable_extensions; do
2350  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2351    ac_cv_prog_ac_ct_CC="gcc"
2352    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2353    break 2
2354  fi
2355done
2356done
2357IFS=$as_save_IFS
2358
2359fi
2360fi
2361ac_ct_CC=$ac_cv_prog_ac_ct_CC
2362if test -n "$ac_ct_CC"; then
2363  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2364echo "${ECHO_T}$ac_ct_CC" >&6; }
2365else
2366  { echo "$as_me:$LINENO: result: no" >&5
2367echo "${ECHO_T}no" >&6; }
2368fi
2369
2370  if test "x$ac_ct_CC" = x; then
2371    CC=""
2372  else
2373    case $cross_compiling:$ac_tool_warned in
2374yes:)
2375{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2376whose name does not start with the host triplet.  If you think this
2377configuration is useful to you, please write to autoconf@gnu.org." >&5
2378echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2379whose name does not start with the host triplet.  If you think this
2380configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2381ac_tool_warned=yes ;;
2382esac
2383    CC=$ac_ct_CC
2384  fi
2385else
2386  CC="$ac_cv_prog_CC"
2387fi
2388
2389if test -z "$CC"; then
2390          if test -n "$ac_tool_prefix"; then
2391    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2392set dummy ${ac_tool_prefix}cc; ac_word=$2
2393{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2394echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2395if test "${ac_cv_prog_CC+set}" = set; then
2396  echo $ECHO_N "(cached) $ECHO_C" >&6
2397else
2398  if test -n "$CC"; then
2399  ac_cv_prog_CC="$CC" # Let the user override the test.
2400else
2401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2402for as_dir in $PATH
2403do
2404  IFS=$as_save_IFS
2405  test -z "$as_dir" && as_dir=.
2406  for ac_exec_ext in '' $ac_executable_extensions; do
2407  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2408    ac_cv_prog_CC="${ac_tool_prefix}cc"
2409    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2410    break 2
2411  fi
2412done
2413done
2414IFS=$as_save_IFS
2415
2416fi
2417fi
2418CC=$ac_cv_prog_CC
2419if test -n "$CC"; then
2420  { echo "$as_me:$LINENO: result: $CC" >&5
2421echo "${ECHO_T}$CC" >&6; }
2422else
2423  { echo "$as_me:$LINENO: result: no" >&5
2424echo "${ECHO_T}no" >&6; }
2425fi
2426
2427
2428  fi
2429fi
2430if test -z "$CC"; then
2431  # Extract the first word of "cc", so it can be a program name with args.
2432set dummy cc; ac_word=$2
2433{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2435if test "${ac_cv_prog_CC+set}" = set; then
2436  echo $ECHO_N "(cached) $ECHO_C" >&6
2437else
2438  if test -n "$CC"; then
2439  ac_cv_prog_CC="$CC" # Let the user override the test.
2440else
2441  ac_prog_rejected=no
2442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445  IFS=$as_save_IFS
2446  test -z "$as_dir" && as_dir=.
2447  for ac_exec_ext in '' $ac_executable_extensions; do
2448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2449    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2450       ac_prog_rejected=yes
2451       continue
2452     fi
2453    ac_cv_prog_CC="cc"
2454    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2455    break 2
2456  fi
2457done
2458done
2459IFS=$as_save_IFS
2460
2461if test $ac_prog_rejected = yes; then
2462  # We found a bogon in the path, so make sure we never use it.
2463  set dummy $ac_cv_prog_CC
2464  shift
2465  if test $# != 0; then
2466    # We chose a different compiler from the bogus one.
2467    # However, it has the same basename, so the bogon will be chosen
2468    # first if we set CC to just the basename; use the full file name.
2469    shift
2470    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2471  fi
2472fi
2473fi
2474fi
2475CC=$ac_cv_prog_CC
2476if test -n "$CC"; then
2477  { echo "$as_me:$LINENO: result: $CC" >&5
2478echo "${ECHO_T}$CC" >&6; }
2479else
2480  { echo "$as_me:$LINENO: result: no" >&5
2481echo "${ECHO_T}no" >&6; }
2482fi
2483
2484
2485fi
2486if test -z "$CC"; then
2487  if test -n "$ac_tool_prefix"; then
2488  for ac_prog in cl.exe
2489  do
2490    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2491set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2492{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2494if test "${ac_cv_prog_CC+set}" = set; then
2495  echo $ECHO_N "(cached) $ECHO_C" >&6
2496else
2497  if test -n "$CC"; then
2498  ac_cv_prog_CC="$CC" # Let the user override the test.
2499else
2500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2501for as_dir in $PATH
2502do
2503  IFS=$as_save_IFS
2504  test -z "$as_dir" && as_dir=.
2505  for ac_exec_ext in '' $ac_executable_extensions; do
2506  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2507    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2508    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2509    break 2
2510  fi
2511done
2512done
2513IFS=$as_save_IFS
2514
2515fi
2516fi
2517CC=$ac_cv_prog_CC
2518if test -n "$CC"; then
2519  { echo "$as_me:$LINENO: result: $CC" >&5
2520echo "${ECHO_T}$CC" >&6; }
2521else
2522  { echo "$as_me:$LINENO: result: no" >&5
2523echo "${ECHO_T}no" >&6; }
2524fi
2525
2526
2527    test -n "$CC" && break
2528  done
2529fi
2530if test -z "$CC"; then
2531  ac_ct_CC=$CC
2532  for ac_prog in cl.exe
2533do
2534  # Extract the first word of "$ac_prog", so it can be a program name with args.
2535set dummy $ac_prog; ac_word=$2
2536{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2537echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2538if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2539  echo $ECHO_N "(cached) $ECHO_C" >&6
2540else
2541  if test -n "$ac_ct_CC"; then
2542  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2543else
2544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2545for as_dir in $PATH
2546do
2547  IFS=$as_save_IFS
2548  test -z "$as_dir" && as_dir=.
2549  for ac_exec_ext in '' $ac_executable_extensions; do
2550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2551    ac_cv_prog_ac_ct_CC="$ac_prog"
2552    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2553    break 2
2554  fi
2555done
2556done
2557IFS=$as_save_IFS
2558
2559fi
2560fi
2561ac_ct_CC=$ac_cv_prog_ac_ct_CC
2562if test -n "$ac_ct_CC"; then
2563  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2564echo "${ECHO_T}$ac_ct_CC" >&6; }
2565else
2566  { echo "$as_me:$LINENO: result: no" >&5
2567echo "${ECHO_T}no" >&6; }
2568fi
2569
2570
2571  test -n "$ac_ct_CC" && break
2572done
2573
2574  if test "x$ac_ct_CC" = x; then
2575    CC=""
2576  else
2577    case $cross_compiling:$ac_tool_warned in
2578yes:)
2579{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2580whose name does not start with the host triplet.  If you think this
2581configuration is useful to you, please write to autoconf@gnu.org." >&5
2582echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2583whose name does not start with the host triplet.  If you think this
2584configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2585ac_tool_warned=yes ;;
2586esac
2587    CC=$ac_ct_CC
2588  fi
2589fi
2590
2591fi
2592
2593
2594test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2595See \`config.log' for more details." >&5
2596echo "$as_me: error: no acceptable C compiler found in \$PATH
2597See \`config.log' for more details." >&2;}
2598   { (exit 1); exit 1; }; }
2599
2600# Provide some information about the compiler.
2601echo "$as_me:$LINENO: checking for C compiler version" >&5
2602ac_compiler=`set X $ac_compile; echo $2`
2603{ (ac_try="$ac_compiler --version >&5"
2604case "(($ac_try" in
2605  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2606  *) ac_try_echo=$ac_try;;
2607esac
2608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2609  (eval "$ac_compiler --version >&5") 2>&5
2610  ac_status=$?
2611  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2612  (exit $ac_status); }
2613{ (ac_try="$ac_compiler -v >&5"
2614case "(($ac_try" in
2615  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2616  *) ac_try_echo=$ac_try;;
2617esac
2618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2619  (eval "$ac_compiler -v >&5") 2>&5
2620  ac_status=$?
2621  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2622  (exit $ac_status); }
2623{ (ac_try="$ac_compiler -V >&5"
2624case "(($ac_try" in
2625  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2626  *) ac_try_echo=$ac_try;;
2627esac
2628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2629  (eval "$ac_compiler -V >&5") 2>&5
2630  ac_status=$?
2631  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632  (exit $ac_status); }
2633
2634cat >conftest.$ac_ext <<_ACEOF
2635/* confdefs.h.  */
2636_ACEOF
2637cat confdefs.h >>conftest.$ac_ext
2638cat >>conftest.$ac_ext <<_ACEOF
2639/* end confdefs.h.  */
2640
2641int
2642main ()
2643{
2644
2645  ;
2646  return 0;
2647}
2648_ACEOF
2649ac_clean_files_save=$ac_clean_files
2650ac_clean_files="$ac_clean_files a.out a.exe b.out"
2651# Try to create an executable without -o first, disregard a.out.
2652# It will help us diagnose broken compilers, and finding out an intuition
2653# of exeext.
2654{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2655echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2656ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2657#
2658# List of possible output files, starting from the most likely.
2659# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2660# only as a last resort.  b.out is created by i960 compilers.
2661ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2662#
2663# The IRIX 6 linker writes into existing files which may not be
2664# executable, retaining their permissions.  Remove them first so a
2665# subsequent execution test works.
2666ac_rmfiles=
2667for ac_file in $ac_files
2668do
2669  case $ac_file in
2670    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2671    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2672  esac
2673done
2674rm -f $ac_rmfiles
2675
2676if { (ac_try="$ac_link_default"
2677case "(($ac_try" in
2678  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2679  *) ac_try_echo=$ac_try;;
2680esac
2681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2682  (eval "$ac_link_default") 2>&5
2683  ac_status=$?
2684  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685  (exit $ac_status); }; then
2686  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2687# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2688# in a Makefile.  We should not override ac_cv_exeext if it was cached,
2689# so that the user can short-circuit this test for compilers unknown to
2690# Autoconf.
2691for ac_file in $ac_files ''
2692do
2693  test -f "$ac_file" || continue
2694  case $ac_file in
2695    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2696	;;
2697    [ab].out )
2698	# We found the default executable, but exeext='' is most
2699	# certainly right.
2700	break;;
2701    *.* )
2702        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2703	then :; else
2704	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2705	fi
2706	# We set ac_cv_exeext here because the later test for it is not
2707	# safe: cross compilers may not add the suffix if given an `-o'
2708	# argument, so we may need to know it at that point already.
2709	# Even if this section looks crufty: it has the advantage of
2710	# actually working.
2711	break;;
2712    * )
2713	break;;
2714  esac
2715done
2716test "$ac_cv_exeext" = no && ac_cv_exeext=
2717
2718else
2719  ac_file=''
2720fi
2721
2722{ echo "$as_me:$LINENO: result: $ac_file" >&5
2723echo "${ECHO_T}$ac_file" >&6; }
2724if test -z "$ac_file"; then
2725  echo "$as_me: failed program was:" >&5
2726sed 's/^/| /' conftest.$ac_ext >&5
2727
2728{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2729See \`config.log' for more details." >&5
2730echo "$as_me: error: C compiler cannot create executables
2731See \`config.log' for more details." >&2;}
2732   { (exit 77); exit 77; }; }
2733fi
2734
2735ac_exeext=$ac_cv_exeext
2736
2737# Check that the compiler produces executables we can run.  If not, either
2738# the compiler is broken, or we cross compile.
2739{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2740echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2741# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2742# If not cross compiling, check that we can run a simple program.
2743if test "$cross_compiling" != yes; then
2744  if { ac_try='./$ac_file'
2745  { (case "(($ac_try" in
2746  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2747  *) ac_try_echo=$ac_try;;
2748esac
2749eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2750  (eval "$ac_try") 2>&5
2751  ac_status=$?
2752  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2753  (exit $ac_status); }; }; then
2754    cross_compiling=no
2755  else
2756    if test "$cross_compiling" = maybe; then
2757	cross_compiling=yes
2758    else
2759	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2760If you meant to cross compile, use \`--host'.
2761See \`config.log' for more details." >&5
2762echo "$as_me: error: cannot run C compiled programs.
2763If you meant to cross compile, use \`--host'.
2764See \`config.log' for more details." >&2;}
2765   { (exit 1); exit 1; }; }
2766    fi
2767  fi
2768fi
2769{ echo "$as_me:$LINENO: result: yes" >&5
2770echo "${ECHO_T}yes" >&6; }
2771
2772rm -f a.out a.exe conftest$ac_cv_exeext b.out
2773ac_clean_files=$ac_clean_files_save
2774# Check that the compiler produces executables we can run.  If not, either
2775# the compiler is broken, or we cross compile.
2776{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2777echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2778{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2779echo "${ECHO_T}$cross_compiling" >&6; }
2780
2781{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2782echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2783if { (ac_try="$ac_link"
2784case "(($ac_try" in
2785  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2786  *) ac_try_echo=$ac_try;;
2787esac
2788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2789  (eval "$ac_link") 2>&5
2790  ac_status=$?
2791  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2792  (exit $ac_status); }; then
2793  # If both `conftest.exe' and `conftest' are `present' (well, observable)
2794# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2795# work properly (i.e., refer to `conftest.exe'), while it won't with
2796# `rm'.
2797for ac_file in conftest.exe conftest conftest.*; do
2798  test -f "$ac_file" || continue
2799  case $ac_file in
2800    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2801    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2802	  break;;
2803    * ) break;;
2804  esac
2805done
2806else
2807  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2808See \`config.log' for more details." >&5
2809echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2810See \`config.log' for more details." >&2;}
2811   { (exit 1); exit 1; }; }
2812fi
2813
2814rm -f conftest$ac_cv_exeext
2815{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2816echo "${ECHO_T}$ac_cv_exeext" >&6; }
2817
2818rm -f conftest.$ac_ext
2819EXEEXT=$ac_cv_exeext
2820ac_exeext=$EXEEXT
2821{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2822echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2823if test "${ac_cv_objext+set}" = set; then
2824  echo $ECHO_N "(cached) $ECHO_C" >&6
2825else
2826  cat >conftest.$ac_ext <<_ACEOF
2827/* confdefs.h.  */
2828_ACEOF
2829cat confdefs.h >>conftest.$ac_ext
2830cat >>conftest.$ac_ext <<_ACEOF
2831/* end confdefs.h.  */
2832
2833int
2834main ()
2835{
2836
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841rm -f conftest.o conftest.obj
2842if { (ac_try="$ac_compile"
2843case "(($ac_try" in
2844  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2845  *) ac_try_echo=$ac_try;;
2846esac
2847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2848  (eval "$ac_compile") 2>&5
2849  ac_status=$?
2850  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2851  (exit $ac_status); }; then
2852  for ac_file in conftest.o conftest.obj conftest.*; do
2853  test -f "$ac_file" || continue;
2854  case $ac_file in
2855    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2856    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2857       break;;
2858  esac
2859done
2860else
2861  echo "$as_me: failed program was:" >&5
2862sed 's/^/| /' conftest.$ac_ext >&5
2863
2864{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2865See \`config.log' for more details." >&5
2866echo "$as_me: error: cannot compute suffix of object files: cannot compile
2867See \`config.log' for more details." >&2;}
2868   { (exit 1); exit 1; }; }
2869fi
2870
2871rm -f conftest.$ac_cv_objext conftest.$ac_ext
2872fi
2873{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2874echo "${ECHO_T}$ac_cv_objext" >&6; }
2875OBJEXT=$ac_cv_objext
2876ac_objext=$OBJEXT
2877{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2878echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2879if test "${ac_cv_c_compiler_gnu+set}" = set; then
2880  echo $ECHO_N "(cached) $ECHO_C" >&6
2881else
2882  cat >conftest.$ac_ext <<_ACEOF
2883/* confdefs.h.  */
2884_ACEOF
2885cat confdefs.h >>conftest.$ac_ext
2886cat >>conftest.$ac_ext <<_ACEOF
2887/* end confdefs.h.  */
2888
2889int
2890main ()
2891{
2892#ifndef __GNUC__
2893       choke me
2894#endif
2895
2896  ;
2897  return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
2901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904  *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907  (eval "$ac_compile") 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); } && {
2914	 test -z "$ac_c_werror_flag" ||
2915	 test ! -s conftest.err
2916       } && test -s conftest.$ac_objext; then
2917  ac_compiler_gnu=yes
2918else
2919  echo "$as_me: failed program was:" >&5
2920sed 's/^/| /' conftest.$ac_ext >&5
2921
2922	ac_compiler_gnu=no
2923fi
2924
2925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2926ac_cv_c_compiler_gnu=$ac_compiler_gnu
2927
2928fi
2929{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2930echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2931GCC=`test $ac_compiler_gnu = yes && echo yes`
2932ac_test_CFLAGS=${CFLAGS+set}
2933ac_save_CFLAGS=$CFLAGS
2934{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2935echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2936if test "${ac_cv_prog_cc_g+set}" = set; then
2937  echo $ECHO_N "(cached) $ECHO_C" >&6
2938else
2939  ac_save_c_werror_flag=$ac_c_werror_flag
2940   ac_c_werror_flag=yes
2941   ac_cv_prog_cc_g=no
2942   CFLAGS="-g"
2943   cat >conftest.$ac_ext <<_ACEOF
2944/* confdefs.h.  */
2945_ACEOF
2946cat confdefs.h >>conftest.$ac_ext
2947cat >>conftest.$ac_ext <<_ACEOF
2948/* end confdefs.h.  */
2949
2950int
2951main ()
2952{
2953
2954  ;
2955  return 0;
2956}
2957_ACEOF
2958rm -f conftest.$ac_objext
2959if { (ac_try="$ac_compile"
2960case "(($ac_try" in
2961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2962  *) ac_try_echo=$ac_try;;
2963esac
2964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2965  (eval "$ac_compile") 2>conftest.er1
2966  ac_status=$?
2967  grep -v '^ *+' conftest.er1 >conftest.err
2968  rm -f conftest.er1
2969  cat conftest.err >&5
2970  echo "$as_me:$LINENO: \$? = $ac_status" >&5
2971  (exit $ac_status); } && {
2972	 test -z "$ac_c_werror_flag" ||
2973	 test ! -s conftest.err
2974       } && test -s conftest.$ac_objext; then
2975  ac_cv_prog_cc_g=yes
2976else
2977  echo "$as_me: failed program was:" >&5
2978sed 's/^/| /' conftest.$ac_ext >&5
2979
2980	CFLAGS=""
2981      cat >conftest.$ac_ext <<_ACEOF
2982/* confdefs.h.  */
2983_ACEOF
2984cat confdefs.h >>conftest.$ac_ext
2985cat >>conftest.$ac_ext <<_ACEOF
2986/* end confdefs.h.  */
2987
2988int
2989main ()
2990{
2991
2992  ;
2993  return 0;
2994}
2995_ACEOF
2996rm -f conftest.$ac_objext
2997if { (ac_try="$ac_compile"
2998case "(($ac_try" in
2999  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3000  *) ac_try_echo=$ac_try;;
3001esac
3002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3003  (eval "$ac_compile") 2>conftest.er1
3004  ac_status=$?
3005  grep -v '^ *+' conftest.er1 >conftest.err
3006  rm -f conftest.er1
3007  cat conftest.err >&5
3008  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3009  (exit $ac_status); } && {
3010	 test -z "$ac_c_werror_flag" ||
3011	 test ! -s conftest.err
3012       } && test -s conftest.$ac_objext; then
3013  :
3014else
3015  echo "$as_me: failed program was:" >&5
3016sed 's/^/| /' conftest.$ac_ext >&5
3017
3018	ac_c_werror_flag=$ac_save_c_werror_flag
3019	 CFLAGS="-g"
3020	 cat >conftest.$ac_ext <<_ACEOF
3021/* confdefs.h.  */
3022_ACEOF
3023cat confdefs.h >>conftest.$ac_ext
3024cat >>conftest.$ac_ext <<_ACEOF
3025/* end confdefs.h.  */
3026
3027int
3028main ()
3029{
3030
3031  ;
3032  return 0;
3033}
3034_ACEOF
3035rm -f conftest.$ac_objext
3036if { (ac_try="$ac_compile"
3037case "(($ac_try" in
3038  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3039  *) ac_try_echo=$ac_try;;
3040esac
3041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3042  (eval "$ac_compile") 2>conftest.er1
3043  ac_status=$?
3044  grep -v '^ *+' conftest.er1 >conftest.err
3045  rm -f conftest.er1
3046  cat conftest.err >&5
3047  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3048  (exit $ac_status); } && {
3049	 test -z "$ac_c_werror_flag" ||
3050	 test ! -s conftest.err
3051       } && test -s conftest.$ac_objext; then
3052  ac_cv_prog_cc_g=yes
3053else
3054  echo "$as_me: failed program was:" >&5
3055sed 's/^/| /' conftest.$ac_ext >&5
3056
3057
3058fi
3059
3060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3061fi
3062
3063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3064fi
3065
3066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3067   ac_c_werror_flag=$ac_save_c_werror_flag
3068fi
3069{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3070echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3071if test "$ac_test_CFLAGS" = set; then
3072  CFLAGS=$ac_save_CFLAGS
3073elif test $ac_cv_prog_cc_g = yes; then
3074  if test "$GCC" = yes; then
3075    CFLAGS="-g -O2"
3076  else
3077    CFLAGS="-g"
3078  fi
3079else
3080  if test "$GCC" = yes; then
3081    CFLAGS="-O2"
3082  else
3083    CFLAGS=
3084  fi
3085fi
3086{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3087echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3088if test "${ac_cv_prog_cc_c89+set}" = set; then
3089  echo $ECHO_N "(cached) $ECHO_C" >&6
3090else
3091  ac_cv_prog_cc_c89=no
3092ac_save_CC=$CC
3093cat >conftest.$ac_ext <<_ACEOF
3094/* confdefs.h.  */
3095_ACEOF
3096cat confdefs.h >>conftest.$ac_ext
3097cat >>conftest.$ac_ext <<_ACEOF
3098/* end confdefs.h.  */
3099#include <stdarg.h>
3100#include <stdio.h>
3101#include <sys/types.h>
3102#include <sys/stat.h>
3103/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3104struct buf { int x; };
3105FILE * (*rcsopen) (struct buf *, struct stat *, int);
3106static char *e (p, i)
3107     char **p;
3108     int i;
3109{
3110  return p[i];
3111}
3112static char *f (char * (*g) (char **, int), char **p, ...)
3113{
3114  char *s;
3115  va_list v;
3116  va_start (v,p);
3117  s = g (p, va_arg (v,int));
3118  va_end (v);
3119  return s;
3120}
3121
3122/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3123   function prototypes and stuff, but not '\xHH' hex character constants.
3124   These don't provoke an error unfortunately, instead are silently treated
3125   as 'x'.  The following induces an error, until -std is added to get
3126   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3127   array size at least.  It's necessary to write '\x00'==0 to get something
3128   that's true only with -std.  */
3129int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3130
3131/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3132   inside strings and character constants.  */
3133#define FOO(x) 'x'
3134int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3135
3136int test (int i, double x);
3137struct s1 {int (*f) (int a);};
3138struct s2 {int (*f) (double a);};
3139int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3140int argc;
3141char **argv;
3142int
3143main ()
3144{
3145return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3146  ;
3147  return 0;
3148}
3149_ACEOF
3150for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3151	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3152do
3153  CC="$ac_save_CC $ac_arg"
3154  rm -f conftest.$ac_objext
3155if { (ac_try="$ac_compile"
3156case "(($ac_try" in
3157  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3158  *) ac_try_echo=$ac_try;;
3159esac
3160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3161  (eval "$ac_compile") 2>conftest.er1
3162  ac_status=$?
3163  grep -v '^ *+' conftest.er1 >conftest.err
3164  rm -f conftest.er1
3165  cat conftest.err >&5
3166  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3167  (exit $ac_status); } && {
3168	 test -z "$ac_c_werror_flag" ||
3169	 test ! -s conftest.err
3170       } && test -s conftest.$ac_objext; then
3171  ac_cv_prog_cc_c89=$ac_arg
3172else
3173  echo "$as_me: failed program was:" >&5
3174sed 's/^/| /' conftest.$ac_ext >&5
3175
3176
3177fi
3178
3179rm -f core conftest.err conftest.$ac_objext
3180  test "x$ac_cv_prog_cc_c89" != "xno" && break
3181done
3182rm -f conftest.$ac_ext
3183CC=$ac_save_CC
3184
3185fi
3186# AC_CACHE_VAL
3187case "x$ac_cv_prog_cc_c89" in
3188  x)
3189    { echo "$as_me:$LINENO: result: none needed" >&5
3190echo "${ECHO_T}none needed" >&6; } ;;
3191  xno)
3192    { echo "$as_me:$LINENO: result: unsupported" >&5
3193echo "${ECHO_T}unsupported" >&6; } ;;
3194  *)
3195    CC="$CC $ac_cv_prog_cc_c89"
3196    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3197echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3198esac
3199
3200
3201ac_ext=c
3202ac_cpp='$CPP $CPPFLAGS'
3203ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3204ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3205ac_compiler_gnu=$ac_cv_c_compiler_gnu
3206
3207    ac_ext=c
3208ac_cpp='$CPP $CPPFLAGS'
3209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3211ac_compiler_gnu=$ac_cv_c_compiler_gnu
3212{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3213echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3214# On Suns, sometimes $CPP names a directory.
3215if test -n "$CPP" && test -d "$CPP"; then
3216  CPP=
3217fi
3218if test -z "$CPP"; then
3219  if test "${ac_cv_prog_CPP+set}" = set; then
3220  echo $ECHO_N "(cached) $ECHO_C" >&6
3221else
3222      # Double quotes because CPP needs to be expanded
3223    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3224    do
3225      ac_preproc_ok=false
3226for ac_c_preproc_warn_flag in '' yes
3227do
3228  # Use a header file that comes with gcc, so configuring glibc
3229  # with a fresh cross-compiler works.
3230  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3231  # <limits.h> exists even on freestanding compilers.
3232  # On the NeXT, cc -E runs the code through the compiler's parser,
3233  # not just through cpp. "Syntax error" is here to catch this case.
3234  cat >conftest.$ac_ext <<_ACEOF
3235/* confdefs.h.  */
3236_ACEOF
3237cat confdefs.h >>conftest.$ac_ext
3238cat >>conftest.$ac_ext <<_ACEOF
3239/* end confdefs.h.  */
3240#ifdef __STDC__
3241# include <limits.h>
3242#else
3243# include <assert.h>
3244#endif
3245		     Syntax error
3246_ACEOF
3247if { (ac_try="$ac_cpp conftest.$ac_ext"
3248case "(($ac_try" in
3249  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3250  *) ac_try_echo=$ac_try;;
3251esac
3252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3253  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3254  ac_status=$?
3255  grep -v '^ *+' conftest.er1 >conftest.err
3256  rm -f conftest.er1
3257  cat conftest.err >&5
3258  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3259  (exit $ac_status); } >/dev/null && {
3260	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3261	 test ! -s conftest.err
3262       }; then
3263  :
3264else
3265  echo "$as_me: failed program was:" >&5
3266sed 's/^/| /' conftest.$ac_ext >&5
3267
3268  # Broken: fails on valid input.
3269continue
3270fi
3271
3272rm -f conftest.err conftest.$ac_ext
3273
3274  # OK, works on sane cases.  Now check whether nonexistent headers
3275  # can be detected and how.
3276  cat >conftest.$ac_ext <<_ACEOF
3277/* confdefs.h.  */
3278_ACEOF
3279cat confdefs.h >>conftest.$ac_ext
3280cat >>conftest.$ac_ext <<_ACEOF
3281/* end confdefs.h.  */
3282#include <ac_nonexistent.h>
3283_ACEOF
3284if { (ac_try="$ac_cpp conftest.$ac_ext"
3285case "(($ac_try" in
3286  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3287  *) ac_try_echo=$ac_try;;
3288esac
3289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3290  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3291  ac_status=$?
3292  grep -v '^ *+' conftest.er1 >conftest.err
3293  rm -f conftest.er1
3294  cat conftest.err >&5
3295  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3296  (exit $ac_status); } >/dev/null && {
3297	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3298	 test ! -s conftest.err
3299       }; then
3300  # Broken: success on invalid input.
3301continue
3302else
3303  echo "$as_me: failed program was:" >&5
3304sed 's/^/| /' conftest.$ac_ext >&5
3305
3306  # Passes both tests.
3307ac_preproc_ok=:
3308break
3309fi
3310
3311rm -f conftest.err conftest.$ac_ext
3312
3313done
3314# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3315rm -f conftest.err conftest.$ac_ext
3316if $ac_preproc_ok; then
3317  break
3318fi
3319
3320    done
3321    ac_cv_prog_CPP=$CPP
3322
3323fi
3324  CPP=$ac_cv_prog_CPP
3325else
3326  ac_cv_prog_CPP=$CPP
3327fi
3328{ echo "$as_me:$LINENO: result: $CPP" >&5
3329echo "${ECHO_T}$CPP" >&6; }
3330ac_preproc_ok=false
3331for ac_c_preproc_warn_flag in '' yes
3332do
3333  # Use a header file that comes with gcc, so configuring glibc
3334  # with a fresh cross-compiler works.
3335  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3336  # <limits.h> exists even on freestanding compilers.
3337  # On the NeXT, cc -E runs the code through the compiler's parser,
3338  # not just through cpp. "Syntax error" is here to catch this case.
3339  cat >conftest.$ac_ext <<_ACEOF
3340/* confdefs.h.  */
3341_ACEOF
3342cat confdefs.h >>conftest.$ac_ext
3343cat >>conftest.$ac_ext <<_ACEOF
3344/* end confdefs.h.  */
3345#ifdef __STDC__
3346# include <limits.h>
3347#else
3348# include <assert.h>
3349#endif
3350		     Syntax error
3351_ACEOF
3352if { (ac_try="$ac_cpp conftest.$ac_ext"
3353case "(($ac_try" in
3354  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3355  *) ac_try_echo=$ac_try;;
3356esac
3357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3358  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3359  ac_status=$?
3360  grep -v '^ *+' conftest.er1 >conftest.err
3361  rm -f conftest.er1
3362  cat conftest.err >&5
3363  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3364  (exit $ac_status); } >/dev/null && {
3365	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3366	 test ! -s conftest.err
3367       }; then
3368  :
3369else
3370  echo "$as_me: failed program was:" >&5
3371sed 's/^/| /' conftest.$ac_ext >&5
3372
3373  # Broken: fails on valid input.
3374continue
3375fi
3376
3377rm -f conftest.err conftest.$ac_ext
3378
3379  # OK, works on sane cases.  Now check whether nonexistent headers
3380  # can be detected and how.
3381  cat >conftest.$ac_ext <<_ACEOF
3382/* confdefs.h.  */
3383_ACEOF
3384cat confdefs.h >>conftest.$ac_ext
3385cat >>conftest.$ac_ext <<_ACEOF
3386/* end confdefs.h.  */
3387#include <ac_nonexistent.h>
3388_ACEOF
3389if { (ac_try="$ac_cpp conftest.$ac_ext"
3390case "(($ac_try" in
3391  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392  *) ac_try_echo=$ac_try;;
3393esac
3394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3395  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3396  ac_status=$?
3397  grep -v '^ *+' conftest.er1 >conftest.err
3398  rm -f conftest.er1
3399  cat conftest.err >&5
3400  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3401  (exit $ac_status); } >/dev/null && {
3402	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3403	 test ! -s conftest.err
3404       }; then
3405  # Broken: success on invalid input.
3406continue
3407else
3408  echo "$as_me: failed program was:" >&5
3409sed 's/^/| /' conftest.$ac_ext >&5
3410
3411  # Passes both tests.
3412ac_preproc_ok=:
3413break
3414fi
3415
3416rm -f conftest.err conftest.$ac_ext
3417
3418done
3419# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3420rm -f conftest.err conftest.$ac_ext
3421if $ac_preproc_ok; then
3422  :
3423else
3424  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3425See \`config.log' for more details." >&5
3426echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3427See \`config.log' for more details." >&2;}
3428   { (exit 1); exit 1; }; }
3429fi
3430
3431ac_ext=c
3432ac_cpp='$CPP $CPPFLAGS'
3433ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3434ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3435ac_compiler_gnu=$ac_cv_c_compiler_gnu
3436
3437
3438    # Find a good install program.  We prefer a C program (faster),
3439# so one script is as good as another.  But avoid the broken or
3440# incompatible versions:
3441# SysV /etc/install, /usr/sbin/install
3442# SunOS /usr/etc/install
3443# IRIX /sbin/install
3444# AIX /bin/install
3445# AmigaOS /C/install, which installs bootblocks on floppy discs
3446# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3447# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3448# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3449# OS/2's system install, which has a completely different semantic
3450# ./install, which can be erroneously created by make from ./install.sh.
3451{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3452echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
3453if test -z "$INSTALL"; then
3454if test "${ac_cv_path_install+set}" = set; then
3455  echo $ECHO_N "(cached) $ECHO_C" >&6
3456else
3457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3458for as_dir in $PATH
3459do
3460  IFS=$as_save_IFS
3461  test -z "$as_dir" && as_dir=.
3462  # Account for people who put trailing slashes in PATH elements.
3463case $as_dir/ in
3464  ./ | .// | /cC/* | \
3465  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3466  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
3467  /usr/ucb/* ) ;;
3468  *)
3469    # OSF1 and SCO ODT 3.0 have their own names for install.
3470    # Don't use installbsd from OSF since it installs stuff as root
3471    # by default.
3472    for ac_prog in ginstall scoinst install; do
3473      for ac_exec_ext in '' $ac_executable_extensions; do
3474	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3475	  if test $ac_prog = install &&
3476	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3477	    # AIX install.  It has an incompatible calling convention.
3478	    :
3479	  elif test $ac_prog = install &&
3480	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3481	    # program-specific install script used by HP pwplus--don't use.
3482	    :
3483	  else
3484	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3485	    break 3
3486	  fi
3487	fi
3488      done
3489    done
3490    ;;
3491esac
3492done
3493IFS=$as_save_IFS
3494
3495
3496fi
3497  if test "${ac_cv_path_install+set}" = set; then
3498    INSTALL=$ac_cv_path_install
3499  else
3500    # As a last resort, use the slow shell script.  Don't cache a
3501    # value for INSTALL within a source directory, because that will
3502    # break other packages using the cache if that directory is
3503    # removed, or if the value is a relative name.
3504    INSTALL=$ac_install_sh
3505  fi
3506fi
3507{ echo "$as_me:$LINENO: result: $INSTALL" >&5
3508echo "${ECHO_T}$INSTALL" >&6; }
3509
3510# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3511# It thinks the first close brace ends the variable substitution.
3512test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3513
3514test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3515
3516test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3517
3518
3519    #--------------------------------------------------------------------
3520    # Checks to see if the make program sets the $MAKE variable.
3521    #--------------------------------------------------------------------
3522
3523    { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3524echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
3525set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3526if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
3527  echo $ECHO_N "(cached) $ECHO_C" >&6
3528else
3529  cat >conftest.make <<\_ACEOF
3530SHELL = /bin/sh
3531all:
3532	@echo '@@@%%%=$(MAKE)=@@@%%%'
3533_ACEOF
3534# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3535case `${MAKE-make} -f conftest.make 2>/dev/null` in
3536  *@@@%%%=?*=@@@%%%*)
3537    eval ac_cv_prog_make_${ac_make}_set=yes;;
3538  *)
3539    eval ac_cv_prog_make_${ac_make}_set=no;;
3540esac
3541rm -f conftest.make
3542fi
3543if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3544  { echo "$as_me:$LINENO: result: yes" >&5
3545echo "${ECHO_T}yes" >&6; }
3546  SET_MAKE=
3547else
3548  { echo "$as_me:$LINENO: result: no" >&5
3549echo "${ECHO_T}no" >&6; }
3550  SET_MAKE="MAKE=${MAKE-make}"
3551fi
3552
3553
3554    #--------------------------------------------------------------------
3555    # Find ranlib
3556    #--------------------------------------------------------------------
3557
3558    if test -n "$ac_tool_prefix"; then
3559  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3560set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3561{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3562echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3563if test "${ac_cv_prog_RANLIB+set}" = set; then
3564  echo $ECHO_N "(cached) $ECHO_C" >&6
3565else
3566  if test -n "$RANLIB"; then
3567  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3568else
3569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3570for as_dir in $PATH
3571do
3572  IFS=$as_save_IFS
3573  test -z "$as_dir" && as_dir=.
3574  for ac_exec_ext in '' $ac_executable_extensions; do
3575  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3576    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3577    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3578    break 2
3579  fi
3580done
3581done
3582IFS=$as_save_IFS
3583
3584fi
3585fi
3586RANLIB=$ac_cv_prog_RANLIB
3587if test -n "$RANLIB"; then
3588  { echo "$as_me:$LINENO: result: $RANLIB" >&5
3589echo "${ECHO_T}$RANLIB" >&6; }
3590else
3591  { echo "$as_me:$LINENO: result: no" >&5
3592echo "${ECHO_T}no" >&6; }
3593fi
3594
3595
3596fi
3597if test -z "$ac_cv_prog_RANLIB"; then
3598  ac_ct_RANLIB=$RANLIB
3599  # Extract the first word of "ranlib", so it can be a program name with args.
3600set dummy ranlib; ac_word=$2
3601{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3602echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3603if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3604  echo $ECHO_N "(cached) $ECHO_C" >&6
3605else
3606  if test -n "$ac_ct_RANLIB"; then
3607  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3608else
3609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3610for as_dir in $PATH
3611do
3612  IFS=$as_save_IFS
3613  test -z "$as_dir" && as_dir=.
3614  for ac_exec_ext in '' $ac_executable_extensions; do
3615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3616    ac_cv_prog_ac_ct_RANLIB="ranlib"
3617    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3618    break 2
3619  fi
3620done
3621done
3622IFS=$as_save_IFS
3623
3624fi
3625fi
3626ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3627if test -n "$ac_ct_RANLIB"; then
3628  { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3629echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
3630else
3631  { echo "$as_me:$LINENO: result: no" >&5
3632echo "${ECHO_T}no" >&6; }
3633fi
3634
3635  if test "x$ac_ct_RANLIB" = x; then
3636    RANLIB=":"
3637  else
3638    case $cross_compiling:$ac_tool_warned in
3639yes:)
3640{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3641whose name does not start with the host triplet.  If you think this
3642configuration is useful to you, please write to autoconf@gnu.org." >&5
3643echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3644whose name does not start with the host triplet.  If you think this
3645configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3646ac_tool_warned=yes ;;
3647esac
3648    RANLIB=$ac_ct_RANLIB
3649  fi
3650else
3651  RANLIB="$ac_cv_prog_RANLIB"
3652fi
3653
3654
3655    #--------------------------------------------------------------------
3656    # Determines the correct binary file extension (.o, .obj, .exe etc.)
3657    #--------------------------------------------------------------------
3658
3659
3660
3661
3662
3663
3664{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3665echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3666if test "${ac_cv_path_GREP+set}" = set; then
3667  echo $ECHO_N "(cached) $ECHO_C" >&6
3668else
3669  # Extract the first word of "grep ggrep" to use in msg output
3670if test -z "$GREP"; then
3671set dummy grep ggrep; ac_prog_name=$2
3672if test "${ac_cv_path_GREP+set}" = set; then
3673  echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
3675  ac_path_GREP_found=false
3676# Loop through the user's path and test for each of PROGNAME-LIST
3677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3678for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3679do
3680  IFS=$as_save_IFS
3681  test -z "$as_dir" && as_dir=.
3682  for ac_prog in grep ggrep; do
3683  for ac_exec_ext in '' $ac_executable_extensions; do
3684    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3685    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3686    # Check for GNU ac_path_GREP and select it if it is found.
3687  # Check for GNU $ac_path_GREP
3688case `"$ac_path_GREP" --version 2>&1` in
3689*GNU*)
3690  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3691*)
3692  ac_count=0
3693  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3694  while :
3695  do
3696    cat "conftest.in" "conftest.in" >"conftest.tmp"
3697    mv "conftest.tmp" "conftest.in"
3698    cp "conftest.in" "conftest.nl"
3699    echo 'GREP' >> "conftest.nl"
3700    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3701    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3702    ac_count=`expr $ac_count + 1`
3703    if test $ac_count -gt ${ac_path_GREP_max-0}; then
3704      # Best one so far, save it but keep looking for a better one
3705      ac_cv_path_GREP="$ac_path_GREP"
3706      ac_path_GREP_max=$ac_count
3707    fi
3708    # 10*(2^10) chars as input seems more than enough
3709    test $ac_count -gt 10 && break
3710  done
3711  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3712esac
3713
3714
3715    $ac_path_GREP_found && break 3
3716  done
3717done
3718
3719done
3720IFS=$as_save_IFS
3721
3722
3723fi
3724
3725GREP="$ac_cv_path_GREP"
3726if test -z "$GREP"; then
3727  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3728echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3729   { (exit 1); exit 1; }; }
3730fi
3731
3732else
3733  ac_cv_path_GREP=$GREP
3734fi
3735
3736
3737fi
3738{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3739echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3740 GREP="$ac_cv_path_GREP"
3741
3742
3743{ echo "$as_me:$LINENO: checking for egrep" >&5
3744echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3745if test "${ac_cv_path_EGREP+set}" = set; then
3746  echo $ECHO_N "(cached) $ECHO_C" >&6
3747else
3748  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3749   then ac_cv_path_EGREP="$GREP -E"
3750   else
3751     # Extract the first word of "egrep" to use in msg output
3752if test -z "$EGREP"; then
3753set dummy egrep; ac_prog_name=$2
3754if test "${ac_cv_path_EGREP+set}" = set; then
3755  echo $ECHO_N "(cached) $ECHO_C" >&6
3756else
3757  ac_path_EGREP_found=false
3758# Loop through the user's path and test for each of PROGNAME-LIST
3759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3760for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3761do
3762  IFS=$as_save_IFS
3763  test -z "$as_dir" && as_dir=.
3764  for ac_prog in egrep; do
3765  for ac_exec_ext in '' $ac_executable_extensions; do
3766    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3767    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3768    # Check for GNU ac_path_EGREP and select it if it is found.
3769  # Check for GNU $ac_path_EGREP
3770case `"$ac_path_EGREP" --version 2>&1` in
3771*GNU*)
3772  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3773*)
3774  ac_count=0
3775  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3776  while :
3777  do
3778    cat "conftest.in" "conftest.in" >"conftest.tmp"
3779    mv "conftest.tmp" "conftest.in"
3780    cp "conftest.in" "conftest.nl"
3781    echo 'EGREP' >> "conftest.nl"
3782    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3783    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3784    ac_count=`expr $ac_count + 1`
3785    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3786      # Best one so far, save it but keep looking for a better one
3787      ac_cv_path_EGREP="$ac_path_EGREP"
3788      ac_path_EGREP_max=$ac_count
3789    fi
3790    # 10*(2^10) chars as input seems more than enough
3791    test $ac_count -gt 10 && break
3792  done
3793  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3794esac
3795
3796
3797    $ac_path_EGREP_found && break 3
3798  done
3799done
3800
3801done
3802IFS=$as_save_IFS
3803
3804
3805fi
3806
3807EGREP="$ac_cv_path_EGREP"
3808if test -z "$EGREP"; then
3809  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3810echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3811   { (exit 1); exit 1; }; }
3812fi
3813
3814else
3815  ac_cv_path_EGREP=$EGREP
3816fi
3817
3818
3819   fi
3820fi
3821{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3822echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3823 EGREP="$ac_cv_path_EGREP"
3824
3825
3826{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3827echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3828if test "${ac_cv_header_stdc+set}" = set; then
3829  echo $ECHO_N "(cached) $ECHO_C" >&6
3830else
3831  cat >conftest.$ac_ext <<_ACEOF
3832/* confdefs.h.  */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h.  */
3837#include <stdlib.h>
3838#include <stdarg.h>
3839#include <string.h>
3840#include <float.h>
3841
3842int
3843main ()
3844{
3845
3846  ;
3847  return 0;
3848}
3849_ACEOF
3850rm -f conftest.$ac_objext
3851if { (ac_try="$ac_compile"
3852case "(($ac_try" in
3853  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3854  *) ac_try_echo=$ac_try;;
3855esac
3856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3857  (eval "$ac_compile") 2>conftest.er1
3858  ac_status=$?
3859  grep -v '^ *+' conftest.er1 >conftest.err
3860  rm -f conftest.er1
3861  cat conftest.err >&5
3862  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3863  (exit $ac_status); } && {
3864	 test -z "$ac_c_werror_flag" ||
3865	 test ! -s conftest.err
3866       } && test -s conftest.$ac_objext; then
3867  ac_cv_header_stdc=yes
3868else
3869  echo "$as_me: failed program was:" >&5
3870sed 's/^/| /' conftest.$ac_ext >&5
3871
3872	ac_cv_header_stdc=no
3873fi
3874
3875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3876
3877if test $ac_cv_header_stdc = yes; then
3878  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3879  cat >conftest.$ac_ext <<_ACEOF
3880/* confdefs.h.  */
3881_ACEOF
3882cat confdefs.h >>conftest.$ac_ext
3883cat >>conftest.$ac_ext <<_ACEOF
3884/* end confdefs.h.  */
3885#include <string.h>
3886
3887_ACEOF
3888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3889  $EGREP "memchr" >/dev/null 2>&1; then
3890  :
3891else
3892  ac_cv_header_stdc=no
3893fi
3894rm -f -r conftest*
3895
3896fi
3897
3898if test $ac_cv_header_stdc = yes; then
3899  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3900  cat >conftest.$ac_ext <<_ACEOF
3901/* confdefs.h.  */
3902_ACEOF
3903cat confdefs.h >>conftest.$ac_ext
3904cat >>conftest.$ac_ext <<_ACEOF
3905/* end confdefs.h.  */
3906#include <stdlib.h>
3907
3908_ACEOF
3909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3910  $EGREP "free" >/dev/null 2>&1; then
3911  :
3912else
3913  ac_cv_header_stdc=no
3914fi
3915rm -f -r conftest*
3916
3917fi
3918
3919if test $ac_cv_header_stdc = yes; then
3920  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3921  if test "$cross_compiling" = yes; then
3922  :
3923else
3924  cat >conftest.$ac_ext <<_ACEOF
3925/* confdefs.h.  */
3926_ACEOF
3927cat confdefs.h >>conftest.$ac_ext
3928cat >>conftest.$ac_ext <<_ACEOF
3929/* end confdefs.h.  */
3930#include <ctype.h>
3931#include <stdlib.h>
3932#if ((' ' & 0x0FF) == 0x020)
3933# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3934# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3935#else
3936# define ISLOWER(c) \
3937		   (('a' <= (c) && (c) <= 'i') \
3938		     || ('j' <= (c) && (c) <= 'r') \
3939		     || ('s' <= (c) && (c) <= 'z'))
3940# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3941#endif
3942
3943#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3944int
3945main ()
3946{
3947  int i;
3948  for (i = 0; i < 256; i++)
3949    if (XOR (islower (i), ISLOWER (i))
3950	|| toupper (i) != TOUPPER (i))
3951      return 2;
3952  return 0;
3953}
3954_ACEOF
3955rm -f conftest$ac_exeext
3956if { (ac_try="$ac_link"
3957case "(($ac_try" in
3958  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959  *) ac_try_echo=$ac_try;;
3960esac
3961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3962  (eval "$ac_link") 2>&5
3963  ac_status=$?
3964  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3965  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3966  { (case "(($ac_try" in
3967  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968  *) ac_try_echo=$ac_try;;
3969esac
3970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3971  (eval "$ac_try") 2>&5
3972  ac_status=$?
3973  echo "$as_me:$LINENO: \$? = $ac_status" >&5
3974  (exit $ac_status); }; }; then
3975  :
3976else
3977  echo "$as_me: program exited with status $ac_status" >&5
3978echo "$as_me: failed program was:" >&5
3979sed 's/^/| /' conftest.$ac_ext >&5
3980
3981( exit $ac_status )
3982ac_cv_header_stdc=no
3983fi
3984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
3985fi
3986
3987
3988fi
3989fi
3990{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
3991echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
3992if test $ac_cv_header_stdc = yes; then
3993
3994cat >>confdefs.h <<\_ACEOF
3995#define STDC_HEADERS 1
3996_ACEOF
3997
3998fi
3999
4000# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4011		  inttypes.h stdint.h unistd.h
4012do
4013as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4014{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4015echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4016if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4017  echo $ECHO_N "(cached) $ECHO_C" >&6
4018else
4019  cat >conftest.$ac_ext <<_ACEOF
4020/* confdefs.h.  */
4021_ACEOF
4022cat confdefs.h >>conftest.$ac_ext
4023cat >>conftest.$ac_ext <<_ACEOF
4024/* end confdefs.h.  */
4025$ac_includes_default
4026
4027#include <$ac_header>
4028_ACEOF
4029rm -f conftest.$ac_objext
4030if { (ac_try="$ac_compile"
4031case "(($ac_try" in
4032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033  *) ac_try_echo=$ac_try;;
4034esac
4035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4036  (eval "$ac_compile") 2>conftest.er1
4037  ac_status=$?
4038  grep -v '^ *+' conftest.er1 >conftest.err
4039  rm -f conftest.er1
4040  cat conftest.err >&5
4041  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4042  (exit $ac_status); } && {
4043	 test -z "$ac_c_werror_flag" ||
4044	 test ! -s conftest.err
4045       } && test -s conftest.$ac_objext; then
4046  eval "$as_ac_Header=yes"
4047else
4048  echo "$as_me: failed program was:" >&5
4049sed 's/^/| /' conftest.$ac_ext >&5
4050
4051	eval "$as_ac_Header=no"
4052fi
4053
4054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4055fi
4056ac_res=`eval echo '${'$as_ac_Header'}'`
4057	       { echo "$as_me:$LINENO: result: $ac_res" >&5
4058echo "${ECHO_T}$ac_res" >&6; }
4059if test `eval echo '${'$as_ac_Header'}'` = yes; then
4060  cat >>confdefs.h <<_ACEOF
4061#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4062_ACEOF
4063
4064fi
4065
4066done
4067
4068
4069
4070    # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
4071
4072
4073    #------------------------------------------------------------------------
4074    # If we're using GCC, see if the compiler understands -pipe. If so, use it.
4075    # It makes compiling go faster.  (This is only a performance feature.)
4076    #------------------------------------------------------------------------
4077
4078    if test -z "$no_pipe" -a -n "$GCC"; then
4079	{ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
4080echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6; }
4081if test "${tcl_cv_cc_pipe+set}" = set; then
4082  echo $ECHO_N "(cached) $ECHO_C" >&6
4083else
4084
4085	    hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -pipe"
4086	    cat >conftest.$ac_ext <<_ACEOF
4087/* confdefs.h.  */
4088_ACEOF
4089cat confdefs.h >>conftest.$ac_ext
4090cat >>conftest.$ac_ext <<_ACEOF
4091/* end confdefs.h.  */
4092
4093int
4094main ()
4095{
4096
4097  ;
4098  return 0;
4099}
4100_ACEOF
4101rm -f conftest.$ac_objext
4102if { (ac_try="$ac_compile"
4103case "(($ac_try" in
4104  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4105  *) ac_try_echo=$ac_try;;
4106esac
4107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4108  (eval "$ac_compile") 2>conftest.er1
4109  ac_status=$?
4110  grep -v '^ *+' conftest.er1 >conftest.err
4111  rm -f conftest.er1
4112  cat conftest.err >&5
4113  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114  (exit $ac_status); } && {
4115	 test -z "$ac_c_werror_flag" ||
4116	 test ! -s conftest.err
4117       } && test -s conftest.$ac_objext; then
4118  tcl_cv_cc_pipe=yes
4119else
4120  echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123	tcl_cv_cc_pipe=no
4124fi
4125
4126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4127	    CFLAGS=$hold_cflags
4128fi
4129{ echo "$as_me:$LINENO: result: $tcl_cv_cc_pipe" >&5
4130echo "${ECHO_T}$tcl_cv_cc_pipe" >&6; }
4131	if test $tcl_cv_cc_pipe = yes; then
4132	    CFLAGS="$CFLAGS -pipe"
4133	fi
4134    fi
4135
4136    #--------------------------------------------------------------------
4137    # Common compiler flag setup
4138    #--------------------------------------------------------------------
4139
4140    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
4141echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
4142if test "${ac_cv_c_bigendian+set}" = set; then
4143  echo $ECHO_N "(cached) $ECHO_C" >&6
4144else
4145  # See if sys/param.h defines the BYTE_ORDER macro.
4146cat >conftest.$ac_ext <<_ACEOF
4147/* confdefs.h.  */
4148_ACEOF
4149cat confdefs.h >>conftest.$ac_ext
4150cat >>conftest.$ac_ext <<_ACEOF
4151/* end confdefs.h.  */
4152#include <sys/types.h>
4153#include <sys/param.h>
4154
4155int
4156main ()
4157{
4158#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
4159	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
4160 bogus endian macros
4161#endif
4162
4163  ;
4164  return 0;
4165}
4166_ACEOF
4167rm -f conftest.$ac_objext
4168if { (ac_try="$ac_compile"
4169case "(($ac_try" in
4170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4171  *) ac_try_echo=$ac_try;;
4172esac
4173eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4174  (eval "$ac_compile") 2>conftest.er1
4175  ac_status=$?
4176  grep -v '^ *+' conftest.er1 >conftest.err
4177  rm -f conftest.er1
4178  cat conftest.err >&5
4179  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4180  (exit $ac_status); } && {
4181	 test -z "$ac_c_werror_flag" ||
4182	 test ! -s conftest.err
4183       } && test -s conftest.$ac_objext; then
4184  # It does; now see whether it defined to BIG_ENDIAN or not.
4185cat >conftest.$ac_ext <<_ACEOF
4186/* confdefs.h.  */
4187_ACEOF
4188cat confdefs.h >>conftest.$ac_ext
4189cat >>conftest.$ac_ext <<_ACEOF
4190/* end confdefs.h.  */
4191#include <sys/types.h>
4192#include <sys/param.h>
4193
4194int
4195main ()
4196{
4197#if BYTE_ORDER != BIG_ENDIAN
4198 not big endian
4199#endif
4200
4201  ;
4202  return 0;
4203}
4204_ACEOF
4205rm -f conftest.$ac_objext
4206if { (ac_try="$ac_compile"
4207case "(($ac_try" in
4208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4209  *) ac_try_echo=$ac_try;;
4210esac
4211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4212  (eval "$ac_compile") 2>conftest.er1
4213  ac_status=$?
4214  grep -v '^ *+' conftest.er1 >conftest.err
4215  rm -f conftest.er1
4216  cat conftest.err >&5
4217  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4218  (exit $ac_status); } && {
4219	 test -z "$ac_c_werror_flag" ||
4220	 test ! -s conftest.err
4221       } && test -s conftest.$ac_objext; then
4222  ac_cv_c_bigendian=yes
4223else
4224  echo "$as_me: failed program was:" >&5
4225sed 's/^/| /' conftest.$ac_ext >&5
4226
4227	ac_cv_c_bigendian=no
4228fi
4229
4230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231else
4232  echo "$as_me: failed program was:" >&5
4233sed 's/^/| /' conftest.$ac_ext >&5
4234
4235	# It does not; compile a test program.
4236if test "$cross_compiling" = yes; then
4237  # try to guess the endianness by grepping values into an object file
4238  ac_cv_c_bigendian=unknown
4239  cat >conftest.$ac_ext <<_ACEOF
4240/* confdefs.h.  */
4241_ACEOF
4242cat confdefs.h >>conftest.$ac_ext
4243cat >>conftest.$ac_ext <<_ACEOF
4244/* end confdefs.h.  */
4245short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4246short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4247void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
4248short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4249short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4250void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
4251int
4252main ()
4253{
4254 _ascii (); _ebcdic ();
4255  ;
4256  return 0;
4257}
4258_ACEOF
4259rm -f conftest.$ac_objext
4260if { (ac_try="$ac_compile"
4261case "(($ac_try" in
4262  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4263  *) ac_try_echo=$ac_try;;
4264esac
4265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4266  (eval "$ac_compile") 2>conftest.er1
4267  ac_status=$?
4268  grep -v '^ *+' conftest.er1 >conftest.err
4269  rm -f conftest.er1
4270  cat conftest.err >&5
4271  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272  (exit $ac_status); } && {
4273	 test -z "$ac_c_werror_flag" ||
4274	 test ! -s conftest.err
4275       } && test -s conftest.$ac_objext; then
4276  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
4277  ac_cv_c_bigendian=yes
4278fi
4279if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4280  if test "$ac_cv_c_bigendian" = unknown; then
4281    ac_cv_c_bigendian=no
4282  else
4283    # finding both strings is unlikely to happen, but who knows?
4284    ac_cv_c_bigendian=unknown
4285  fi
4286fi
4287else
4288  echo "$as_me: failed program was:" >&5
4289sed 's/^/| /' conftest.$ac_ext >&5
4290
4291
4292fi
4293
4294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4295else
4296  cat >conftest.$ac_ext <<_ACEOF
4297/* confdefs.h.  */
4298_ACEOF
4299cat confdefs.h >>conftest.$ac_ext
4300cat >>conftest.$ac_ext <<_ACEOF
4301/* end confdefs.h.  */
4302$ac_includes_default
4303int
4304main ()
4305{
4306
4307  /* Are we little or big endian?  From Harbison&Steele.  */
4308  union
4309  {
4310    long int l;
4311    char c[sizeof (long int)];
4312  } u;
4313  u.l = 1;
4314  return u.c[sizeof (long int) - 1] == 1;
4315
4316  ;
4317  return 0;
4318}
4319_ACEOF
4320rm -f conftest$ac_exeext
4321if { (ac_try="$ac_link"
4322case "(($ac_try" in
4323  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4324  *) ac_try_echo=$ac_try;;
4325esac
4326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4327  (eval "$ac_link") 2>&5
4328  ac_status=$?
4329  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4330  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4331  { (case "(($ac_try" in
4332  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4333  *) ac_try_echo=$ac_try;;
4334esac
4335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4336  (eval "$ac_try") 2>&5
4337  ac_status=$?
4338  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4339  (exit $ac_status); }; }; then
4340  ac_cv_c_bigendian=no
4341else
4342  echo "$as_me: program exited with status $ac_status" >&5
4343echo "$as_me: failed program was:" >&5
4344sed 's/^/| /' conftest.$ac_ext >&5
4345
4346( exit $ac_status )
4347ac_cv_c_bigendian=yes
4348fi
4349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4350fi
4351
4352
4353fi
4354
4355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4356fi
4357{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
4358echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
4359case $ac_cv_c_bigendian in
4360  yes)
4361
4362cat >>confdefs.h <<\_ACEOF
4363#define WORDS_BIGENDIAN 1
4364_ACEOF
4365 ;;
4366  no)
4367     ;;
4368  *)
4369    { { echo "$as_me:$LINENO: error: unknown endianness
4370presetting ac_cv_c_bigendian=no (or yes) will help" >&5
4371echo "$as_me: error: unknown endianness
4372presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
4373   { (exit 1); exit 1; }; } ;;
4374esac
4375
4376    if test "${TEA_PLATFORM}" = "unix" ; then
4377
4378    #--------------------------------------------------------------------
4379    # On a few very rare systems, all of the libm.a stuff is
4380    # already in libc.a.  Set compiler flags accordingly.
4381    # Also, Linux requires the "ieee" library for math to work
4382    # right (and it must appear before "-lm").
4383    #--------------------------------------------------------------------
4384
4385    { echo "$as_me:$LINENO: checking for sin" >&5
4386echo $ECHO_N "checking for sin... $ECHO_C" >&6; }
4387if test "${ac_cv_func_sin+set}" = set; then
4388  echo $ECHO_N "(cached) $ECHO_C" >&6
4389else
4390  cat >conftest.$ac_ext <<_ACEOF
4391/* confdefs.h.  */
4392_ACEOF
4393cat confdefs.h >>conftest.$ac_ext
4394cat >>conftest.$ac_ext <<_ACEOF
4395/* end confdefs.h.  */
4396/* Define sin to an innocuous variant, in case <limits.h> declares sin.
4397   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4398#define sin innocuous_sin
4399
4400/* System header to define __stub macros and hopefully few prototypes,
4401    which can conflict with char sin (); below.
4402    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403    <limits.h> exists even on freestanding compilers.  */
4404
4405#ifdef __STDC__
4406# include <limits.h>
4407#else
4408# include <assert.h>
4409#endif
4410
4411#undef sin
4412
4413/* Override any GCC internal prototype to avoid an error.
4414   Use char because int might match the return type of a GCC
4415   builtin and then its argument prototype would still apply.  */
4416#ifdef __cplusplus
4417extern "C"
4418#endif
4419char sin ();
4420/* The GNU C library defines this for functions which it implements
4421    to always fail with ENOSYS.  Some functions are actually named
4422    something starting with __ and the normal name is an alias.  */
4423#if defined __stub_sin || defined __stub___sin
4424choke me
4425#endif
4426
4427int
4428main ()
4429{
4430return sin ();
4431  ;
4432  return 0;
4433}
4434_ACEOF
4435rm -f conftest.$ac_objext conftest$ac_exeext
4436if { (ac_try="$ac_link"
4437case "(($ac_try" in
4438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4439  *) ac_try_echo=$ac_try;;
4440esac
4441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4442  (eval "$ac_link") 2>conftest.er1
4443  ac_status=$?
4444  grep -v '^ *+' conftest.er1 >conftest.err
4445  rm -f conftest.er1
4446  cat conftest.err >&5
4447  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4448  (exit $ac_status); } && {
4449	 test -z "$ac_c_werror_flag" ||
4450	 test ! -s conftest.err
4451       } && test -s conftest$ac_exeext &&
4452       $as_test_x conftest$ac_exeext; then
4453  ac_cv_func_sin=yes
4454else
4455  echo "$as_me: failed program was:" >&5
4456sed 's/^/| /' conftest.$ac_ext >&5
4457
4458	ac_cv_func_sin=no
4459fi
4460
4461rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4462      conftest$ac_exeext conftest.$ac_ext
4463fi
4464{ echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
4465echo "${ECHO_T}$ac_cv_func_sin" >&6; }
4466if test $ac_cv_func_sin = yes; then
4467  MATH_LIBS=""
4468else
4469  MATH_LIBS="-lm"
4470fi
4471
4472    { echo "$as_me:$LINENO: checking for main in -lieee" >&5
4473echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6; }
4474if test "${ac_cv_lib_ieee_main+set}" = set; then
4475  echo $ECHO_N "(cached) $ECHO_C" >&6
4476else
4477  ac_check_lib_save_LIBS=$LIBS
4478LIBS="-lieee  $LIBS"
4479cat >conftest.$ac_ext <<_ACEOF
4480/* confdefs.h.  */
4481_ACEOF
4482cat confdefs.h >>conftest.$ac_ext
4483cat >>conftest.$ac_ext <<_ACEOF
4484/* end confdefs.h.  */
4485
4486
4487int
4488main ()
4489{
4490return main ();
4491  ;
4492  return 0;
4493}
4494_ACEOF
4495rm -f conftest.$ac_objext conftest$ac_exeext
4496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499  *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502  (eval "$ac_link") 2>conftest.er1
4503  ac_status=$?
4504  grep -v '^ *+' conftest.er1 >conftest.err
4505  rm -f conftest.er1
4506  cat conftest.err >&5
4507  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4508  (exit $ac_status); } && {
4509	 test -z "$ac_c_werror_flag" ||
4510	 test ! -s conftest.err
4511       } && test -s conftest$ac_exeext &&
4512       $as_test_x conftest$ac_exeext; then
4513  ac_cv_lib_ieee_main=yes
4514else
4515  echo "$as_me: failed program was:" >&5
4516sed 's/^/| /' conftest.$ac_ext >&5
4517
4518	ac_cv_lib_ieee_main=no
4519fi
4520
4521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4522      conftest$ac_exeext conftest.$ac_ext
4523LIBS=$ac_check_lib_save_LIBS
4524fi
4525{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
4526echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6; }
4527if test $ac_cv_lib_ieee_main = yes; then
4528  MATH_LIBS="-lieee $MATH_LIBS"
4529fi
4530
4531
4532    #--------------------------------------------------------------------
4533    # Interactive UNIX requires -linet instead of -lsocket, plus it
4534    # needs net/errno.h to define the socket-related error codes.
4535    #--------------------------------------------------------------------
4536
4537    { echo "$as_me:$LINENO: checking for main in -linet" >&5
4538echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6; }
4539if test "${ac_cv_lib_inet_main+set}" = set; then
4540  echo $ECHO_N "(cached) $ECHO_C" >&6
4541else
4542  ac_check_lib_save_LIBS=$LIBS
4543LIBS="-linet  $LIBS"
4544cat >conftest.$ac_ext <<_ACEOF
4545/* confdefs.h.  */
4546_ACEOF
4547cat confdefs.h >>conftest.$ac_ext
4548cat >>conftest.$ac_ext <<_ACEOF
4549/* end confdefs.h.  */
4550
4551
4552int
4553main ()
4554{
4555return main ();
4556  ;
4557  return 0;
4558}
4559_ACEOF
4560rm -f conftest.$ac_objext conftest$ac_exeext
4561if { (ac_try="$ac_link"
4562case "(($ac_try" in
4563  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4564  *) ac_try_echo=$ac_try;;
4565esac
4566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4567  (eval "$ac_link") 2>conftest.er1
4568  ac_status=$?
4569  grep -v '^ *+' conftest.er1 >conftest.err
4570  rm -f conftest.er1
4571  cat conftest.err >&5
4572  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4573  (exit $ac_status); } && {
4574	 test -z "$ac_c_werror_flag" ||
4575	 test ! -s conftest.err
4576       } && test -s conftest$ac_exeext &&
4577       $as_test_x conftest$ac_exeext; then
4578  ac_cv_lib_inet_main=yes
4579else
4580  echo "$as_me: failed program was:" >&5
4581sed 's/^/| /' conftest.$ac_ext >&5
4582
4583	ac_cv_lib_inet_main=no
4584fi
4585
4586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4587      conftest$ac_exeext conftest.$ac_ext
4588LIBS=$ac_check_lib_save_LIBS
4589fi
4590{ echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
4591echo "${ECHO_T}$ac_cv_lib_inet_main" >&6; }
4592if test $ac_cv_lib_inet_main = yes; then
4593  LIBS="$LIBS -linet"
4594fi
4595
4596    if test "${ac_cv_header_net_errno_h+set}" = set; then
4597  { echo "$as_me:$LINENO: checking for net/errno.h" >&5
4598echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4599if test "${ac_cv_header_net_errno_h+set}" = set; then
4600  echo $ECHO_N "(cached) $ECHO_C" >&6
4601fi
4602{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4603echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4604else
4605  # Is the header compilable?
4606{ echo "$as_me:$LINENO: checking net/errno.h usability" >&5
4607echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6; }
4608cat >conftest.$ac_ext <<_ACEOF
4609/* confdefs.h.  */
4610_ACEOF
4611cat confdefs.h >>conftest.$ac_ext
4612cat >>conftest.$ac_ext <<_ACEOF
4613/* end confdefs.h.  */
4614$ac_includes_default
4615#include <net/errno.h>
4616_ACEOF
4617rm -f conftest.$ac_objext
4618if { (ac_try="$ac_compile"
4619case "(($ac_try" in
4620  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4621  *) ac_try_echo=$ac_try;;
4622esac
4623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4624  (eval "$ac_compile") 2>conftest.er1
4625  ac_status=$?
4626  grep -v '^ *+' conftest.er1 >conftest.err
4627  rm -f conftest.er1
4628  cat conftest.err >&5
4629  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4630  (exit $ac_status); } && {
4631	 test -z "$ac_c_werror_flag" ||
4632	 test ! -s conftest.err
4633       } && test -s conftest.$ac_objext; then
4634  ac_header_compiler=yes
4635else
4636  echo "$as_me: failed program was:" >&5
4637sed 's/^/| /' conftest.$ac_ext >&5
4638
4639	ac_header_compiler=no
4640fi
4641
4642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4643{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4644echo "${ECHO_T}$ac_header_compiler" >&6; }
4645
4646# Is the header present?
4647{ echo "$as_me:$LINENO: checking net/errno.h presence" >&5
4648echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6; }
4649cat >conftest.$ac_ext <<_ACEOF
4650/* confdefs.h.  */
4651_ACEOF
4652cat confdefs.h >>conftest.$ac_ext
4653cat >>conftest.$ac_ext <<_ACEOF
4654/* end confdefs.h.  */
4655#include <net/errno.h>
4656_ACEOF
4657if { (ac_try="$ac_cpp conftest.$ac_ext"
4658case "(($ac_try" in
4659  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4660  *) ac_try_echo=$ac_try;;
4661esac
4662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4663  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4664  ac_status=$?
4665  grep -v '^ *+' conftest.er1 >conftest.err
4666  rm -f conftest.er1
4667  cat conftest.err >&5
4668  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4669  (exit $ac_status); } >/dev/null && {
4670	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4671	 test ! -s conftest.err
4672       }; then
4673  ac_header_preproc=yes
4674else
4675  echo "$as_me: failed program was:" >&5
4676sed 's/^/| /' conftest.$ac_ext >&5
4677
4678  ac_header_preproc=no
4679fi
4680
4681rm -f conftest.err conftest.$ac_ext
4682{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4683echo "${ECHO_T}$ac_header_preproc" >&6; }
4684
4685# So?  What about this header?
4686case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4687  yes:no: )
4688    { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
4689echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4690    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
4691echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
4692    ac_header_preproc=yes
4693    ;;
4694  no:yes:* )
4695    { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
4696echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
4697    { echo "$as_me:$LINENO: WARNING: net/errno.h:     check for missing prerequisite headers?" >&5
4698echo "$as_me: WARNING: net/errno.h:     check for missing prerequisite headers?" >&2;}
4699    { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
4700echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
4701    { echo "$as_me:$LINENO: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&5
4702echo "$as_me: WARNING: net/errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
4703    { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
4704echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
4705    { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
4706echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
4707
4708    ;;
4709esac
4710{ echo "$as_me:$LINENO: checking for net/errno.h" >&5
4711echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6; }
4712if test "${ac_cv_header_net_errno_h+set}" = set; then
4713  echo $ECHO_N "(cached) $ECHO_C" >&6
4714else
4715  ac_cv_header_net_errno_h=$ac_header_preproc
4716fi
4717{ echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
4718echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6; }
4719
4720fi
4721if test $ac_cv_header_net_errno_h = yes; then
4722
4723
4724cat >>confdefs.h <<\_ACEOF
4725#define HAVE_NET_ERRNO_H 1
4726_ACEOF
4727
4728fi
4729
4730
4731
4732    #--------------------------------------------------------------------
4733    #	Check for the existence of the -lsocket and -lnsl libraries.
4734    #	The order here is important, so that they end up in the right
4735    #	order in the command line generated by make.  Here are some
4736    #	special considerations:
4737    #	1. Use "connect" and "accept" to check for -lsocket, and
4738    #	   "gethostbyname" to check for -lnsl.
4739    #	2. Use each function name only once:  can't redo a check because
4740    #	   autoconf caches the results of the last check and won't redo it.
4741    #	3. Use -lnsl and -lsocket only if they supply procedures that
4742    #	   aren't already present in the normal libraries.  This is because
4743    #	   IRIX 5.2 has libraries, but they aren't needed and they're
4744    #	   bogus:  they goof up name resolution if used.
4745    #	4. On some SVR4 systems, can't use -lsocket without -lnsl too.
4746    #	   To get around this problem, check for both libraries together
4747    #	   if -lsocket doesn't work by itself.
4748    #--------------------------------------------------------------------
4749
4750    tcl_checkBoth=0
4751    { echo "$as_me:$LINENO: checking for connect" >&5
4752echo $ECHO_N "checking for connect... $ECHO_C" >&6; }
4753if test "${ac_cv_func_connect+set}" = set; then
4754  echo $ECHO_N "(cached) $ECHO_C" >&6
4755else
4756  cat >conftest.$ac_ext <<_ACEOF
4757/* confdefs.h.  */
4758_ACEOF
4759cat confdefs.h >>conftest.$ac_ext
4760cat >>conftest.$ac_ext <<_ACEOF
4761/* end confdefs.h.  */
4762/* Define connect to an innocuous variant, in case <limits.h> declares connect.
4763   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4764#define connect innocuous_connect
4765
4766/* System header to define __stub macros and hopefully few prototypes,
4767    which can conflict with char connect (); below.
4768    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4769    <limits.h> exists even on freestanding compilers.  */
4770
4771#ifdef __STDC__
4772# include <limits.h>
4773#else
4774# include <assert.h>
4775#endif
4776
4777#undef connect
4778
4779/* Override any GCC internal prototype to avoid an error.
4780   Use char because int might match the return type of a GCC
4781   builtin and then its argument prototype would still apply.  */
4782#ifdef __cplusplus
4783extern "C"
4784#endif
4785char connect ();
4786/* The GNU C library defines this for functions which it implements
4787    to always fail with ENOSYS.  Some functions are actually named
4788    something starting with __ and the normal name is an alias.  */
4789#if defined __stub_connect || defined __stub___connect
4790choke me
4791#endif
4792
4793int
4794main ()
4795{
4796return connect ();
4797  ;
4798  return 0;
4799}
4800_ACEOF
4801rm -f conftest.$ac_objext conftest$ac_exeext
4802if { (ac_try="$ac_link"
4803case "(($ac_try" in
4804  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4805  *) ac_try_echo=$ac_try;;
4806esac
4807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4808  (eval "$ac_link") 2>conftest.er1
4809  ac_status=$?
4810  grep -v '^ *+' conftest.er1 >conftest.err
4811  rm -f conftest.er1
4812  cat conftest.err >&5
4813  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4814  (exit $ac_status); } && {
4815	 test -z "$ac_c_werror_flag" ||
4816	 test ! -s conftest.err
4817       } && test -s conftest$ac_exeext &&
4818       $as_test_x conftest$ac_exeext; then
4819  ac_cv_func_connect=yes
4820else
4821  echo "$as_me: failed program was:" >&5
4822sed 's/^/| /' conftest.$ac_ext >&5
4823
4824	ac_cv_func_connect=no
4825fi
4826
4827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4828      conftest$ac_exeext conftest.$ac_ext
4829fi
4830{ echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
4831echo "${ECHO_T}$ac_cv_func_connect" >&6; }
4832if test $ac_cv_func_connect = yes; then
4833  tcl_checkSocket=0
4834else
4835  tcl_checkSocket=1
4836fi
4837
4838    if test "$tcl_checkSocket" = 1; then
4839	{ echo "$as_me:$LINENO: checking for setsockopt" >&5
4840echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; }
4841if test "${ac_cv_func_setsockopt+set}" = set; then
4842  echo $ECHO_N "(cached) $ECHO_C" >&6
4843else
4844  cat >conftest.$ac_ext <<_ACEOF
4845/* confdefs.h.  */
4846_ACEOF
4847cat confdefs.h >>conftest.$ac_ext
4848cat >>conftest.$ac_ext <<_ACEOF
4849/* end confdefs.h.  */
4850/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
4851   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
4852#define setsockopt innocuous_setsockopt
4853
4854/* System header to define __stub macros and hopefully few prototypes,
4855    which can conflict with char setsockopt (); below.
4856    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4857    <limits.h> exists even on freestanding compilers.  */
4858
4859#ifdef __STDC__
4860# include <limits.h>
4861#else
4862# include <assert.h>
4863#endif
4864
4865#undef setsockopt
4866
4867/* Override any GCC internal prototype to avoid an error.
4868   Use char because int might match the return type of a GCC
4869   builtin and then its argument prototype would still apply.  */
4870#ifdef __cplusplus
4871extern "C"
4872#endif
4873char setsockopt ();
4874/* The GNU C library defines this for functions which it implements
4875    to always fail with ENOSYS.  Some functions are actually named
4876    something starting with __ and the normal name is an alias.  */
4877#if defined __stub_setsockopt || defined __stub___setsockopt
4878choke me
4879#endif
4880
4881int
4882main ()
4883{
4884return setsockopt ();
4885  ;
4886  return 0;
4887}
4888_ACEOF
4889rm -f conftest.$ac_objext conftest$ac_exeext
4890if { (ac_try="$ac_link"
4891case "(($ac_try" in
4892  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4893  *) ac_try_echo=$ac_try;;
4894esac
4895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4896  (eval "$ac_link") 2>conftest.er1
4897  ac_status=$?
4898  grep -v '^ *+' conftest.er1 >conftest.err
4899  rm -f conftest.er1
4900  cat conftest.err >&5
4901  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902  (exit $ac_status); } && {
4903	 test -z "$ac_c_werror_flag" ||
4904	 test ! -s conftest.err
4905       } && test -s conftest$ac_exeext &&
4906       $as_test_x conftest$ac_exeext; then
4907  ac_cv_func_setsockopt=yes
4908else
4909  echo "$as_me: failed program was:" >&5
4910sed 's/^/| /' conftest.$ac_ext >&5
4911
4912	ac_cv_func_setsockopt=no
4913fi
4914
4915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4916      conftest$ac_exeext conftest.$ac_ext
4917fi
4918{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
4919echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
4920if test $ac_cv_func_setsockopt = yes; then
4921  :
4922else
4923  { echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
4924echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
4925if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
4926  echo $ECHO_N "(cached) $ECHO_C" >&6
4927else
4928  ac_check_lib_save_LIBS=$LIBS
4929LIBS="-lsocket  $LIBS"
4930cat >conftest.$ac_ext <<_ACEOF
4931/* confdefs.h.  */
4932_ACEOF
4933cat confdefs.h >>conftest.$ac_ext
4934cat >>conftest.$ac_ext <<_ACEOF
4935/* end confdefs.h.  */
4936
4937/* Override any GCC internal prototype to avoid an error.
4938   Use char because int might match the return type of a GCC
4939   builtin and then its argument prototype would still apply.  */
4940#ifdef __cplusplus
4941extern "C"
4942#endif
4943char setsockopt ();
4944int
4945main ()
4946{
4947return setsockopt ();
4948  ;
4949  return 0;
4950}
4951_ACEOF
4952rm -f conftest.$ac_objext conftest$ac_exeext
4953if { (ac_try="$ac_link"
4954case "(($ac_try" in
4955  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4956  *) ac_try_echo=$ac_try;;
4957esac
4958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4959  (eval "$ac_link") 2>conftest.er1
4960  ac_status=$?
4961  grep -v '^ *+' conftest.er1 >conftest.err
4962  rm -f conftest.er1
4963  cat conftest.err >&5
4964  echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965  (exit $ac_status); } && {
4966	 test -z "$ac_c_werror_flag" ||
4967	 test ! -s conftest.err
4968       } && test -s conftest$ac_exeext &&
4969       $as_test_x conftest$ac_exeext; then
4970  ac_cv_lib_socket_setsockopt=yes
4971else
4972  echo "$as_me: failed program was:" >&5
4973sed 's/^/| /' conftest.$ac_ext >&5
4974
4975	ac_cv_lib_socket_setsockopt=no
4976fi
4977
4978rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4979      conftest$ac_exeext conftest.$ac_ext
4980LIBS=$ac_check_lib_save_LIBS
4981fi
4982{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
4983echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; }
4984if test $ac_cv_lib_socket_setsockopt = yes; then
4985  LIBS="$LIBS -lsocket"
4986else
4987  tcl_checkBoth=1
4988fi
4989
4990fi
4991
4992    fi
4993    if test "$tcl_checkBoth" = 1; then
4994	tk_oldLibs=$LIBS
4995	LIBS="$LIBS -lsocket -lnsl"
4996	{ echo "$as_me:$LINENO: checking for accept" >&5
4997echo $ECHO_N "checking for accept... $ECHO_C" >&6; }
4998if test "${ac_cv_func_accept+set}" = set; then
4999  echo $ECHO_N "(cached) $ECHO_C" >&6
5000else
5001  cat >conftest.$ac_ext <<_ACEOF
5002/* confdefs.h.  */
5003_ACEOF
5004cat confdefs.h >>conftest.$ac_ext
5005cat >>conftest.$ac_ext <<_ACEOF
5006/* end confdefs.h.  */
5007/* Define accept to an innocuous variant, in case <limits.h> declares accept.
5008   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5009#define accept innocuous_accept
5010
5011/* System header to define __stub macros and hopefully few prototypes,
5012    which can conflict with char accept (); below.
5013    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5014    <limits.h> exists even on freestanding compilers.  */
5015
5016#ifdef __STDC__
5017# include <limits.h>
5018#else
5019# include <assert.h>
5020#endif
5021
5022#undef accept
5023
5024/* Override any GCC internal prototype to avoid an error.
5025   Use char because int might match the return type of a GCC
5026   builtin and then its argument prototype would still apply.  */
5027#ifdef __cplusplus
5028extern "C"
5029#endif
5030char accept ();
5031/* The GNU C library defines this for functions which it implements
5032    to always fail with ENOSYS.  Some functions are actually named
5033    something starting with __ and the normal name is an alias.  */
5034#if defined __stub_accept || defined __stub___accept
5035choke me
5036#endif
5037
5038int
5039main ()
5040{
5041return accept ();
5042  ;
5043  return 0;
5044}
5045_ACEOF
5046rm -f conftest.$ac_objext conftest$ac_exeext
5047if { (ac_try="$ac_link"
5048case "(($ac_try" in
5049  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050  *) ac_try_echo=$ac_try;;
5051esac
5052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5053  (eval "$ac_link") 2>conftest.er1
5054  ac_status=$?
5055  grep -v '^ *+' conftest.er1 >conftest.err
5056  rm -f conftest.er1
5057  cat conftest.err >&5
5058  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059  (exit $ac_status); } && {
5060	 test -z "$ac_c_werror_flag" ||
5061	 test ! -s conftest.err
5062       } && test -s conftest$ac_exeext &&
5063       $as_test_x conftest$ac_exeext; then
5064  ac_cv_func_accept=yes
5065else
5066  echo "$as_me: failed program was:" >&5
5067sed 's/^/| /' conftest.$ac_ext >&5
5068
5069	ac_cv_func_accept=no
5070fi
5071
5072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5073      conftest$ac_exeext conftest.$ac_ext
5074fi
5075{ echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
5076echo "${ECHO_T}$ac_cv_func_accept" >&6; }
5077if test $ac_cv_func_accept = yes; then
5078  tcl_checkNsl=0
5079else
5080  LIBS=$tk_oldLibs
5081fi
5082
5083    fi
5084    { echo "$as_me:$LINENO: checking for gethostbyname" >&5
5085echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6; }
5086if test "${ac_cv_func_gethostbyname+set}" = set; then
5087  echo $ECHO_N "(cached) $ECHO_C" >&6
5088else
5089  cat >conftest.$ac_ext <<_ACEOF
5090/* confdefs.h.  */
5091_ACEOF
5092cat confdefs.h >>conftest.$ac_ext
5093cat >>conftest.$ac_ext <<_ACEOF
5094/* end confdefs.h.  */
5095/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
5096   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
5097#define gethostbyname innocuous_gethostbyname
5098
5099/* System header to define __stub macros and hopefully few prototypes,
5100    which can conflict with char gethostbyname (); below.
5101    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5102    <limits.h> exists even on freestanding compilers.  */
5103
5104#ifdef __STDC__
5105# include <limits.h>
5106#else
5107# include <assert.h>
5108#endif
5109
5110#undef gethostbyname
5111
5112/* Override any GCC internal prototype to avoid an error.
5113   Use char because int might match the return type of a GCC
5114   builtin and then its argument prototype would still apply.  */
5115#ifdef __cplusplus
5116extern "C"
5117#endif
5118char gethostbyname ();
5119/* The GNU C library defines this for functions which it implements
5120    to always fail with ENOSYS.  Some functions are actually named
5121    something starting with __ and the normal name is an alias.  */
5122#if defined __stub_gethostbyname || defined __stub___gethostbyname
5123choke me
5124#endif
5125
5126int
5127main ()
5128{
5129return gethostbyname ();
5130  ;
5131  return 0;
5132}
5133_ACEOF
5134rm -f conftest.$ac_objext conftest$ac_exeext
5135if { (ac_try="$ac_link"
5136case "(($ac_try" in
5137  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5138  *) ac_try_echo=$ac_try;;
5139esac
5140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5141  (eval "$ac_link") 2>conftest.er1
5142  ac_status=$?
5143  grep -v '^ *+' conftest.er1 >conftest.err
5144  rm -f conftest.er1
5145  cat conftest.err >&5
5146  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147  (exit $ac_status); } && {
5148	 test -z "$ac_c_werror_flag" ||
5149	 test ! -s conftest.err
5150       } && test -s conftest$ac_exeext &&
5151       $as_test_x conftest$ac_exeext; then
5152  ac_cv_func_gethostbyname=yes
5153else
5154  echo "$as_me: failed program was:" >&5
5155sed 's/^/| /' conftest.$ac_ext >&5
5156
5157	ac_cv_func_gethostbyname=no
5158fi
5159
5160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5161      conftest$ac_exeext conftest.$ac_ext
5162fi
5163{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
5164echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6; }
5165if test $ac_cv_func_gethostbyname = yes; then
5166  :
5167else
5168  { echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
5169echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6; }
5170if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
5171  echo $ECHO_N "(cached) $ECHO_C" >&6
5172else
5173  ac_check_lib_save_LIBS=$LIBS
5174LIBS="-lnsl  $LIBS"
5175cat >conftest.$ac_ext <<_ACEOF
5176/* confdefs.h.  */
5177_ACEOF
5178cat confdefs.h >>conftest.$ac_ext
5179cat >>conftest.$ac_ext <<_ACEOF
5180/* end confdefs.h.  */
5181
5182/* Override any GCC internal prototype to avoid an error.
5183   Use char because int might match the return type of a GCC
5184   builtin and then its argument prototype would still apply.  */
5185#ifdef __cplusplus
5186extern "C"
5187#endif
5188char gethostbyname ();
5189int
5190main ()
5191{
5192return gethostbyname ();
5193  ;
5194  return 0;
5195}
5196_ACEOF
5197rm -f conftest.$ac_objext conftest$ac_exeext
5198if { (ac_try="$ac_link"
5199case "(($ac_try" in
5200  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5201  *) ac_try_echo=$ac_try;;
5202esac
5203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5204  (eval "$ac_link") 2>conftest.er1
5205  ac_status=$?
5206  grep -v '^ *+' conftest.er1 >conftest.err
5207  rm -f conftest.er1
5208  cat conftest.err >&5
5209  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5210  (exit $ac_status); } && {
5211	 test -z "$ac_c_werror_flag" ||
5212	 test ! -s conftest.err
5213       } && test -s conftest$ac_exeext &&
5214       $as_test_x conftest$ac_exeext; then
5215  ac_cv_lib_nsl_gethostbyname=yes
5216else
5217  echo "$as_me: failed program was:" >&5
5218sed 's/^/| /' conftest.$ac_ext >&5
5219
5220	ac_cv_lib_nsl_gethostbyname=no
5221fi
5222
5223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5224      conftest$ac_exeext conftest.$ac_ext
5225LIBS=$ac_check_lib_save_LIBS
5226fi
5227{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
5228echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6; }
5229if test $ac_cv_lib_nsl_gethostbyname = yes; then
5230  LIBS="$LIBS -lnsl"
5231fi
5232
5233fi
5234
5235
5236    # TEA specific: Don't perform the eval of the libraries here because
5237    # DL_LIBS won't be set until we call TEA_CONFIG_CFLAGS
5238
5239    TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
5240
5241
5242
5243
5244    { echo "$as_me:$LINENO: checking dirent.h" >&5
5245echo $ECHO_N "checking dirent.h... $ECHO_C" >&6; }
5246if test "${tcl_cv_dirent_h+set}" = set; then
5247  echo $ECHO_N "(cached) $ECHO_C" >&6
5248else
5249
5250    cat >conftest.$ac_ext <<_ACEOF
5251/* confdefs.h.  */
5252_ACEOF
5253cat confdefs.h >>conftest.$ac_ext
5254cat >>conftest.$ac_ext <<_ACEOF
5255/* end confdefs.h.  */
5256#include <sys/types.h>
5257#include <dirent.h>
5258int
5259main ()
5260{
5261
5262#ifndef _POSIX_SOURCE
5263#   ifdef __Lynx__
5264	/*
5265	 * Generate compilation error to make the test fail:  Lynx headers
5266	 * are only valid if really in the POSIX environment.
5267	 */
5268
5269	missing_procedure();
5270#   endif
5271#endif
5272DIR *d;
5273struct dirent *entryPtr;
5274char *p;
5275d = opendir("foobar");
5276entryPtr = readdir(d);
5277p = entryPtr->d_name;
5278closedir(d);
5279
5280  ;
5281  return 0;
5282}
5283_ACEOF
5284rm -f conftest.$ac_objext conftest$ac_exeext
5285if { (ac_try="$ac_link"
5286case "(($ac_try" in
5287  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5288  *) ac_try_echo=$ac_try;;
5289esac
5290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5291  (eval "$ac_link") 2>conftest.er1
5292  ac_status=$?
5293  grep -v '^ *+' conftest.er1 >conftest.err
5294  rm -f conftest.er1
5295  cat conftest.err >&5
5296  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5297  (exit $ac_status); } && {
5298	 test -z "$ac_c_werror_flag" ||
5299	 test ! -s conftest.err
5300       } && test -s conftest$ac_exeext &&
5301       $as_test_x conftest$ac_exeext; then
5302  tcl_cv_dirent_h=yes
5303else
5304  echo "$as_me: failed program was:" >&5
5305sed 's/^/| /' conftest.$ac_ext >&5
5306
5307	tcl_cv_dirent_h=no
5308fi
5309
5310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5311      conftest$ac_exeext conftest.$ac_ext
5312fi
5313{ echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
5314echo "${ECHO_T}$tcl_cv_dirent_h" >&6; }
5315
5316    if test $tcl_cv_dirent_h = no; then
5317
5318cat >>confdefs.h <<\_ACEOF
5319#define NO_DIRENT_H 1
5320_ACEOF
5321
5322    fi
5323
5324    # TEA specific:
5325    if test "${ac_cv_header_errno_h+set}" = set; then
5326  { echo "$as_me:$LINENO: checking for errno.h" >&5
5327echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5328if test "${ac_cv_header_errno_h+set}" = set; then
5329  echo $ECHO_N "(cached) $ECHO_C" >&6
5330fi
5331{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5332echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5333else
5334  # Is the header compilable?
5335{ echo "$as_me:$LINENO: checking errno.h usability" >&5
5336echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6; }
5337cat >conftest.$ac_ext <<_ACEOF
5338/* confdefs.h.  */
5339_ACEOF
5340cat confdefs.h >>conftest.$ac_ext
5341cat >>conftest.$ac_ext <<_ACEOF
5342/* end confdefs.h.  */
5343$ac_includes_default
5344#include <errno.h>
5345_ACEOF
5346rm -f conftest.$ac_objext
5347if { (ac_try="$ac_compile"
5348case "(($ac_try" in
5349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5350  *) ac_try_echo=$ac_try;;
5351esac
5352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5353  (eval "$ac_compile") 2>conftest.er1
5354  ac_status=$?
5355  grep -v '^ *+' conftest.er1 >conftest.err
5356  rm -f conftest.er1
5357  cat conftest.err >&5
5358  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5359  (exit $ac_status); } && {
5360	 test -z "$ac_c_werror_flag" ||
5361	 test ! -s conftest.err
5362       } && test -s conftest.$ac_objext; then
5363  ac_header_compiler=yes
5364else
5365  echo "$as_me: failed program was:" >&5
5366sed 's/^/| /' conftest.$ac_ext >&5
5367
5368	ac_header_compiler=no
5369fi
5370
5371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5372{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5373echo "${ECHO_T}$ac_header_compiler" >&6; }
5374
5375# Is the header present?
5376{ echo "$as_me:$LINENO: checking errno.h presence" >&5
5377echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6; }
5378cat >conftest.$ac_ext <<_ACEOF
5379/* confdefs.h.  */
5380_ACEOF
5381cat confdefs.h >>conftest.$ac_ext
5382cat >>conftest.$ac_ext <<_ACEOF
5383/* end confdefs.h.  */
5384#include <errno.h>
5385_ACEOF
5386if { (ac_try="$ac_cpp conftest.$ac_ext"
5387case "(($ac_try" in
5388  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5389  *) ac_try_echo=$ac_try;;
5390esac
5391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5392  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5393  ac_status=$?
5394  grep -v '^ *+' conftest.er1 >conftest.err
5395  rm -f conftest.er1
5396  cat conftest.err >&5
5397  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5398  (exit $ac_status); } >/dev/null && {
5399	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5400	 test ! -s conftest.err
5401       }; then
5402  ac_header_preproc=yes
5403else
5404  echo "$as_me: failed program was:" >&5
5405sed 's/^/| /' conftest.$ac_ext >&5
5406
5407  ac_header_preproc=no
5408fi
5409
5410rm -f conftest.err conftest.$ac_ext
5411{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5412echo "${ECHO_T}$ac_header_preproc" >&6; }
5413
5414# So?  What about this header?
5415case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5416  yes:no: )
5417    { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
5418echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5419    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
5420echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
5421    ac_header_preproc=yes
5422    ;;
5423  no:yes:* )
5424    { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
5425echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
5426    { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5
5427echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;}
5428    { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
5429echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
5430    { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5
5431echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5432    { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
5433echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
5434    { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
5435echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
5436
5437    ;;
5438esac
5439{ echo "$as_me:$LINENO: checking for errno.h" >&5
5440echo $ECHO_N "checking for errno.h... $ECHO_C" >&6; }
5441if test "${ac_cv_header_errno_h+set}" = set; then
5442  echo $ECHO_N "(cached) $ECHO_C" >&6
5443else
5444  ac_cv_header_errno_h=$ac_header_preproc
5445fi
5446{ echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
5447echo "${ECHO_T}$ac_cv_header_errno_h" >&6; }
5448
5449fi
5450if test $ac_cv_header_errno_h = yes; then
5451  :
5452else
5453
5454cat >>confdefs.h <<\_ACEOF
5455#define NO_ERRNO_H 1
5456_ACEOF
5457
5458fi
5459
5460
5461    if test "${ac_cv_header_float_h+set}" = set; then
5462  { echo "$as_me:$LINENO: checking for float.h" >&5
5463echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5464if test "${ac_cv_header_float_h+set}" = set; then
5465  echo $ECHO_N "(cached) $ECHO_C" >&6
5466fi
5467{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5468echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5469else
5470  # Is the header compilable?
5471{ echo "$as_me:$LINENO: checking float.h usability" >&5
5472echo $ECHO_N "checking float.h usability... $ECHO_C" >&6; }
5473cat >conftest.$ac_ext <<_ACEOF
5474/* confdefs.h.  */
5475_ACEOF
5476cat confdefs.h >>conftest.$ac_ext
5477cat >>conftest.$ac_ext <<_ACEOF
5478/* end confdefs.h.  */
5479$ac_includes_default
5480#include <float.h>
5481_ACEOF
5482rm -f conftest.$ac_objext
5483if { (ac_try="$ac_compile"
5484case "(($ac_try" in
5485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5486  *) ac_try_echo=$ac_try;;
5487esac
5488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5489  (eval "$ac_compile") 2>conftest.er1
5490  ac_status=$?
5491  grep -v '^ *+' conftest.er1 >conftest.err
5492  rm -f conftest.er1
5493  cat conftest.err >&5
5494  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5495  (exit $ac_status); } && {
5496	 test -z "$ac_c_werror_flag" ||
5497	 test ! -s conftest.err
5498       } && test -s conftest.$ac_objext; then
5499  ac_header_compiler=yes
5500else
5501  echo "$as_me: failed program was:" >&5
5502sed 's/^/| /' conftest.$ac_ext >&5
5503
5504	ac_header_compiler=no
5505fi
5506
5507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5508{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5509echo "${ECHO_T}$ac_header_compiler" >&6; }
5510
5511# Is the header present?
5512{ echo "$as_me:$LINENO: checking float.h presence" >&5
5513echo $ECHO_N "checking float.h presence... $ECHO_C" >&6; }
5514cat >conftest.$ac_ext <<_ACEOF
5515/* confdefs.h.  */
5516_ACEOF
5517cat confdefs.h >>conftest.$ac_ext
5518cat >>conftest.$ac_ext <<_ACEOF
5519/* end confdefs.h.  */
5520#include <float.h>
5521_ACEOF
5522if { (ac_try="$ac_cpp conftest.$ac_ext"
5523case "(($ac_try" in
5524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5525  *) ac_try_echo=$ac_try;;
5526esac
5527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5528  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5529  ac_status=$?
5530  grep -v '^ *+' conftest.er1 >conftest.err
5531  rm -f conftest.er1
5532  cat conftest.err >&5
5533  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5534  (exit $ac_status); } >/dev/null && {
5535	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5536	 test ! -s conftest.err
5537       }; then
5538  ac_header_preproc=yes
5539else
5540  echo "$as_me: failed program was:" >&5
5541sed 's/^/| /' conftest.$ac_ext >&5
5542
5543  ac_header_preproc=no
5544fi
5545
5546rm -f conftest.err conftest.$ac_ext
5547{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5548echo "${ECHO_T}$ac_header_preproc" >&6; }
5549
5550# So?  What about this header?
5551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5552  yes:no: )
5553    { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
5554echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5555    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
5556echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
5557    ac_header_preproc=yes
5558    ;;
5559  no:yes:* )
5560    { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
5561echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
5562    { echo "$as_me:$LINENO: WARNING: float.h:     check for missing prerequisite headers?" >&5
5563echo "$as_me: WARNING: float.h:     check for missing prerequisite headers?" >&2;}
5564    { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
5565echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
5566    { echo "$as_me:$LINENO: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&5
5567echo "$as_me: WARNING: float.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5568    { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
5569echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
5570    { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
5571echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
5572
5573    ;;
5574esac
5575{ echo "$as_me:$LINENO: checking for float.h" >&5
5576echo $ECHO_N "checking for float.h... $ECHO_C" >&6; }
5577if test "${ac_cv_header_float_h+set}" = set; then
5578  echo $ECHO_N "(cached) $ECHO_C" >&6
5579else
5580  ac_cv_header_float_h=$ac_header_preproc
5581fi
5582{ echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
5583echo "${ECHO_T}$ac_cv_header_float_h" >&6; }
5584
5585fi
5586if test $ac_cv_header_float_h = yes; then
5587  :
5588else
5589
5590cat >>confdefs.h <<\_ACEOF
5591#define NO_FLOAT_H 1
5592_ACEOF
5593
5594fi
5595
5596
5597    if test "${ac_cv_header_values_h+set}" = set; then
5598  { echo "$as_me:$LINENO: checking for values.h" >&5
5599echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5600if test "${ac_cv_header_values_h+set}" = set; then
5601  echo $ECHO_N "(cached) $ECHO_C" >&6
5602fi
5603{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5604echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5605else
5606  # Is the header compilable?
5607{ echo "$as_me:$LINENO: checking values.h usability" >&5
5608echo $ECHO_N "checking values.h usability... $ECHO_C" >&6; }
5609cat >conftest.$ac_ext <<_ACEOF
5610/* confdefs.h.  */
5611_ACEOF
5612cat confdefs.h >>conftest.$ac_ext
5613cat >>conftest.$ac_ext <<_ACEOF
5614/* end confdefs.h.  */
5615$ac_includes_default
5616#include <values.h>
5617_ACEOF
5618rm -f conftest.$ac_objext
5619if { (ac_try="$ac_compile"
5620case "(($ac_try" in
5621  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5622  *) ac_try_echo=$ac_try;;
5623esac
5624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5625  (eval "$ac_compile") 2>conftest.er1
5626  ac_status=$?
5627  grep -v '^ *+' conftest.er1 >conftest.err
5628  rm -f conftest.er1
5629  cat conftest.err >&5
5630  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5631  (exit $ac_status); } && {
5632	 test -z "$ac_c_werror_flag" ||
5633	 test ! -s conftest.err
5634       } && test -s conftest.$ac_objext; then
5635  ac_header_compiler=yes
5636else
5637  echo "$as_me: failed program was:" >&5
5638sed 's/^/| /' conftest.$ac_ext >&5
5639
5640	ac_header_compiler=no
5641fi
5642
5643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5644{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5645echo "${ECHO_T}$ac_header_compiler" >&6; }
5646
5647# Is the header present?
5648{ echo "$as_me:$LINENO: checking values.h presence" >&5
5649echo $ECHO_N "checking values.h presence... $ECHO_C" >&6; }
5650cat >conftest.$ac_ext <<_ACEOF
5651/* confdefs.h.  */
5652_ACEOF
5653cat confdefs.h >>conftest.$ac_ext
5654cat >>conftest.$ac_ext <<_ACEOF
5655/* end confdefs.h.  */
5656#include <values.h>
5657_ACEOF
5658if { (ac_try="$ac_cpp conftest.$ac_ext"
5659case "(($ac_try" in
5660  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5661  *) ac_try_echo=$ac_try;;
5662esac
5663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5664  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5665  ac_status=$?
5666  grep -v '^ *+' conftest.er1 >conftest.err
5667  rm -f conftest.er1
5668  cat conftest.err >&5
5669  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670  (exit $ac_status); } >/dev/null && {
5671	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5672	 test ! -s conftest.err
5673       }; then
5674  ac_header_preproc=yes
5675else
5676  echo "$as_me: failed program was:" >&5
5677sed 's/^/| /' conftest.$ac_ext >&5
5678
5679  ac_header_preproc=no
5680fi
5681
5682rm -f conftest.err conftest.$ac_ext
5683{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5684echo "${ECHO_T}$ac_header_preproc" >&6; }
5685
5686# So?  What about this header?
5687case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5688  yes:no: )
5689    { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
5690echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5691    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
5692echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
5693    ac_header_preproc=yes
5694    ;;
5695  no:yes:* )
5696    { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
5697echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
5698    { echo "$as_me:$LINENO: WARNING: values.h:     check for missing prerequisite headers?" >&5
5699echo "$as_me: WARNING: values.h:     check for missing prerequisite headers?" >&2;}
5700    { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
5701echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
5702    { echo "$as_me:$LINENO: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&5
5703echo "$as_me: WARNING: values.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5704    { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
5705echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
5706    { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
5707echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
5708
5709    ;;
5710esac
5711{ echo "$as_me:$LINENO: checking for values.h" >&5
5712echo $ECHO_N "checking for values.h... $ECHO_C" >&6; }
5713if test "${ac_cv_header_values_h+set}" = set; then
5714  echo $ECHO_N "(cached) $ECHO_C" >&6
5715else
5716  ac_cv_header_values_h=$ac_header_preproc
5717fi
5718{ echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
5719echo "${ECHO_T}$ac_cv_header_values_h" >&6; }
5720
5721fi
5722if test $ac_cv_header_values_h = yes; then
5723  :
5724else
5725
5726cat >>confdefs.h <<\_ACEOF
5727#define NO_VALUES_H 1
5728_ACEOF
5729
5730fi
5731
5732
5733    if test "${ac_cv_header_limits_h+set}" = set; then
5734  { echo "$as_me:$LINENO: checking for limits.h" >&5
5735echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5736if test "${ac_cv_header_limits_h+set}" = set; then
5737  echo $ECHO_N "(cached) $ECHO_C" >&6
5738fi
5739{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5740echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5741else
5742  # Is the header compilable?
5743{ echo "$as_me:$LINENO: checking limits.h usability" >&5
5744echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6; }
5745cat >conftest.$ac_ext <<_ACEOF
5746/* confdefs.h.  */
5747_ACEOF
5748cat confdefs.h >>conftest.$ac_ext
5749cat >>conftest.$ac_ext <<_ACEOF
5750/* end confdefs.h.  */
5751$ac_includes_default
5752#include <limits.h>
5753_ACEOF
5754rm -f conftest.$ac_objext
5755if { (ac_try="$ac_compile"
5756case "(($ac_try" in
5757  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5758  *) ac_try_echo=$ac_try;;
5759esac
5760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5761  (eval "$ac_compile") 2>conftest.er1
5762  ac_status=$?
5763  grep -v '^ *+' conftest.er1 >conftest.err
5764  rm -f conftest.er1
5765  cat conftest.err >&5
5766  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5767  (exit $ac_status); } && {
5768	 test -z "$ac_c_werror_flag" ||
5769	 test ! -s conftest.err
5770       } && test -s conftest.$ac_objext; then
5771  ac_header_compiler=yes
5772else
5773  echo "$as_me: failed program was:" >&5
5774sed 's/^/| /' conftest.$ac_ext >&5
5775
5776	ac_header_compiler=no
5777fi
5778
5779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5780{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5781echo "${ECHO_T}$ac_header_compiler" >&6; }
5782
5783# Is the header present?
5784{ echo "$as_me:$LINENO: checking limits.h presence" >&5
5785echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6; }
5786cat >conftest.$ac_ext <<_ACEOF
5787/* confdefs.h.  */
5788_ACEOF
5789cat confdefs.h >>conftest.$ac_ext
5790cat >>conftest.$ac_ext <<_ACEOF
5791/* end confdefs.h.  */
5792#include <limits.h>
5793_ACEOF
5794if { (ac_try="$ac_cpp conftest.$ac_ext"
5795case "(($ac_try" in
5796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5797  *) ac_try_echo=$ac_try;;
5798esac
5799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5800  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5801  ac_status=$?
5802  grep -v '^ *+' conftest.er1 >conftest.err
5803  rm -f conftest.er1
5804  cat conftest.err >&5
5805  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5806  (exit $ac_status); } >/dev/null && {
5807	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5808	 test ! -s conftest.err
5809       }; then
5810  ac_header_preproc=yes
5811else
5812  echo "$as_me: failed program was:" >&5
5813sed 's/^/| /' conftest.$ac_ext >&5
5814
5815  ac_header_preproc=no
5816fi
5817
5818rm -f conftest.err conftest.$ac_ext
5819{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5820echo "${ECHO_T}$ac_header_preproc" >&6; }
5821
5822# So?  What about this header?
5823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5824  yes:no: )
5825    { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
5826echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5827    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
5828echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
5829    ac_header_preproc=yes
5830    ;;
5831  no:yes:* )
5832    { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
5833echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
5834    { echo "$as_me:$LINENO: WARNING: limits.h:     check for missing prerequisite headers?" >&5
5835echo "$as_me: WARNING: limits.h:     check for missing prerequisite headers?" >&2;}
5836    { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
5837echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
5838    { echo "$as_me:$LINENO: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&5
5839echo "$as_me: WARNING: limits.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5840    { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
5841echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
5842    { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
5843echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
5844
5845    ;;
5846esac
5847{ echo "$as_me:$LINENO: checking for limits.h" >&5
5848echo $ECHO_N "checking for limits.h... $ECHO_C" >&6; }
5849if test "${ac_cv_header_limits_h+set}" = set; then
5850  echo $ECHO_N "(cached) $ECHO_C" >&6
5851else
5852  ac_cv_header_limits_h=$ac_header_preproc
5853fi
5854{ echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
5855echo "${ECHO_T}$ac_cv_header_limits_h" >&6; }
5856
5857fi
5858if test $ac_cv_header_limits_h = yes; then
5859
5860cat >>confdefs.h <<\_ACEOF
5861#define HAVE_LIMITS_H 1
5862_ACEOF
5863
5864else
5865
5866cat >>confdefs.h <<\_ACEOF
5867#define NO_LIMITS_H 1
5868_ACEOF
5869
5870fi
5871
5872
5873    if test "${ac_cv_header_stdlib_h+set}" = set; then
5874  { echo "$as_me:$LINENO: checking for stdlib.h" >&5
5875echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5876if test "${ac_cv_header_stdlib_h+set}" = set; then
5877  echo $ECHO_N "(cached) $ECHO_C" >&6
5878fi
5879{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5880echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5881else
5882  # Is the header compilable?
5883{ echo "$as_me:$LINENO: checking stdlib.h usability" >&5
5884echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6; }
5885cat >conftest.$ac_ext <<_ACEOF
5886/* confdefs.h.  */
5887_ACEOF
5888cat confdefs.h >>conftest.$ac_ext
5889cat >>conftest.$ac_ext <<_ACEOF
5890/* end confdefs.h.  */
5891$ac_includes_default
5892#include <stdlib.h>
5893_ACEOF
5894rm -f conftest.$ac_objext
5895if { (ac_try="$ac_compile"
5896case "(($ac_try" in
5897  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5898  *) ac_try_echo=$ac_try;;
5899esac
5900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5901  (eval "$ac_compile") 2>conftest.er1
5902  ac_status=$?
5903  grep -v '^ *+' conftest.er1 >conftest.err
5904  rm -f conftest.er1
5905  cat conftest.err >&5
5906  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907  (exit $ac_status); } && {
5908	 test -z "$ac_c_werror_flag" ||
5909	 test ! -s conftest.err
5910       } && test -s conftest.$ac_objext; then
5911  ac_header_compiler=yes
5912else
5913  echo "$as_me: failed program was:" >&5
5914sed 's/^/| /' conftest.$ac_ext >&5
5915
5916	ac_header_compiler=no
5917fi
5918
5919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5920{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5921echo "${ECHO_T}$ac_header_compiler" >&6; }
5922
5923# Is the header present?
5924{ echo "$as_me:$LINENO: checking stdlib.h presence" >&5
5925echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6; }
5926cat >conftest.$ac_ext <<_ACEOF
5927/* confdefs.h.  */
5928_ACEOF
5929cat confdefs.h >>conftest.$ac_ext
5930cat >>conftest.$ac_ext <<_ACEOF
5931/* end confdefs.h.  */
5932#include <stdlib.h>
5933_ACEOF
5934if { (ac_try="$ac_cpp conftest.$ac_ext"
5935case "(($ac_try" in
5936  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937  *) ac_try_echo=$ac_try;;
5938esac
5939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5940  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5941  ac_status=$?
5942  grep -v '^ *+' conftest.er1 >conftest.err
5943  rm -f conftest.er1
5944  cat conftest.err >&5
5945  echo "$as_me:$LINENO: \$? = $ac_status" >&5
5946  (exit $ac_status); } >/dev/null && {
5947	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5948	 test ! -s conftest.err
5949       }; then
5950  ac_header_preproc=yes
5951else
5952  echo "$as_me: failed program was:" >&5
5953sed 's/^/| /' conftest.$ac_ext >&5
5954
5955  ac_header_preproc=no
5956fi
5957
5958rm -f conftest.err conftest.$ac_ext
5959{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5960echo "${ECHO_T}$ac_header_preproc" >&6; }
5961
5962# So?  What about this header?
5963case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5964  yes:no: )
5965    { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
5966echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
5967    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
5968echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
5969    ac_header_preproc=yes
5970    ;;
5971  no:yes:* )
5972    { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
5973echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
5974    { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5
5975echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;}
5976    { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
5977echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
5978    { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5
5979echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
5980    { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
5981echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
5982    { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
5983echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
5984
5985    ;;
5986esac
5987{ echo "$as_me:$LINENO: checking for stdlib.h" >&5
5988echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6; }
5989if test "${ac_cv_header_stdlib_h+set}" = set; then
5990  echo $ECHO_N "(cached) $ECHO_C" >&6
5991else
5992  ac_cv_header_stdlib_h=$ac_header_preproc
5993fi
5994{ echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
5995echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6; }
5996
5997fi
5998if test $ac_cv_header_stdlib_h = yes; then
5999  tcl_ok=1
6000else
6001  tcl_ok=0
6002fi
6003
6004
6005    cat >conftest.$ac_ext <<_ACEOF
6006/* confdefs.h.  */
6007_ACEOF
6008cat confdefs.h >>conftest.$ac_ext
6009cat >>conftest.$ac_ext <<_ACEOF
6010/* end confdefs.h.  */
6011#include <stdlib.h>
6012
6013_ACEOF
6014if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6015  $EGREP "strtol" >/dev/null 2>&1; then
6016  :
6017else
6018  tcl_ok=0
6019fi
6020rm -f -r conftest*
6021
6022    cat >conftest.$ac_ext <<_ACEOF
6023/* confdefs.h.  */
6024_ACEOF
6025cat confdefs.h >>conftest.$ac_ext
6026cat >>conftest.$ac_ext <<_ACEOF
6027/* end confdefs.h.  */
6028#include <stdlib.h>
6029
6030_ACEOF
6031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6032  $EGREP "strtoul" >/dev/null 2>&1; then
6033  :
6034else
6035  tcl_ok=0
6036fi
6037rm -f -r conftest*
6038
6039    cat >conftest.$ac_ext <<_ACEOF
6040/* confdefs.h.  */
6041_ACEOF
6042cat confdefs.h >>conftest.$ac_ext
6043cat >>conftest.$ac_ext <<_ACEOF
6044/* end confdefs.h.  */
6045#include <stdlib.h>
6046
6047_ACEOF
6048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6049  $EGREP "strtod" >/dev/null 2>&1; then
6050  :
6051else
6052  tcl_ok=0
6053fi
6054rm -f -r conftest*
6055
6056    if test $tcl_ok = 0; then
6057
6058cat >>confdefs.h <<\_ACEOF
6059#define NO_STDLIB_H 1
6060_ACEOF
6061
6062    fi
6063    if test "${ac_cv_header_string_h+set}" = set; then
6064  { echo "$as_me:$LINENO: checking for string.h" >&5
6065echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6066if test "${ac_cv_header_string_h+set}" = set; then
6067  echo $ECHO_N "(cached) $ECHO_C" >&6
6068fi
6069{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6070echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6071else
6072  # Is the header compilable?
6073{ echo "$as_me:$LINENO: checking string.h usability" >&5
6074echo $ECHO_N "checking string.h usability... $ECHO_C" >&6; }
6075cat >conftest.$ac_ext <<_ACEOF
6076/* confdefs.h.  */
6077_ACEOF
6078cat confdefs.h >>conftest.$ac_ext
6079cat >>conftest.$ac_ext <<_ACEOF
6080/* end confdefs.h.  */
6081$ac_includes_default
6082#include <string.h>
6083_ACEOF
6084rm -f conftest.$ac_objext
6085if { (ac_try="$ac_compile"
6086case "(($ac_try" in
6087  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088  *) ac_try_echo=$ac_try;;
6089esac
6090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6091  (eval "$ac_compile") 2>conftest.er1
6092  ac_status=$?
6093  grep -v '^ *+' conftest.er1 >conftest.err
6094  rm -f conftest.er1
6095  cat conftest.err >&5
6096  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6097  (exit $ac_status); } && {
6098	 test -z "$ac_c_werror_flag" ||
6099	 test ! -s conftest.err
6100       } && test -s conftest.$ac_objext; then
6101  ac_header_compiler=yes
6102else
6103  echo "$as_me: failed program was:" >&5
6104sed 's/^/| /' conftest.$ac_ext >&5
6105
6106	ac_header_compiler=no
6107fi
6108
6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6110{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6111echo "${ECHO_T}$ac_header_compiler" >&6; }
6112
6113# Is the header present?
6114{ echo "$as_me:$LINENO: checking string.h presence" >&5
6115echo $ECHO_N "checking string.h presence... $ECHO_C" >&6; }
6116cat >conftest.$ac_ext <<_ACEOF
6117/* confdefs.h.  */
6118_ACEOF
6119cat confdefs.h >>conftest.$ac_ext
6120cat >>conftest.$ac_ext <<_ACEOF
6121/* end confdefs.h.  */
6122#include <string.h>
6123_ACEOF
6124if { (ac_try="$ac_cpp conftest.$ac_ext"
6125case "(($ac_try" in
6126  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6127  *) ac_try_echo=$ac_try;;
6128esac
6129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6130  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6131  ac_status=$?
6132  grep -v '^ *+' conftest.er1 >conftest.err
6133  rm -f conftest.er1
6134  cat conftest.err >&5
6135  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6136  (exit $ac_status); } >/dev/null && {
6137	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6138	 test ! -s conftest.err
6139       }; then
6140  ac_header_preproc=yes
6141else
6142  echo "$as_me: failed program was:" >&5
6143sed 's/^/| /' conftest.$ac_ext >&5
6144
6145  ac_header_preproc=no
6146fi
6147
6148rm -f conftest.err conftest.$ac_ext
6149{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6150echo "${ECHO_T}$ac_header_preproc" >&6; }
6151
6152# So?  What about this header?
6153case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6154  yes:no: )
6155    { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
6156echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6157    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
6158echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
6159    ac_header_preproc=yes
6160    ;;
6161  no:yes:* )
6162    { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
6163echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
6164    { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5
6165echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;}
6166    { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
6167echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
6168    { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5
6169echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6170    { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
6171echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
6172    { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
6173echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
6174
6175    ;;
6176esac
6177{ echo "$as_me:$LINENO: checking for string.h" >&5
6178echo $ECHO_N "checking for string.h... $ECHO_C" >&6; }
6179if test "${ac_cv_header_string_h+set}" = set; then
6180  echo $ECHO_N "(cached) $ECHO_C" >&6
6181else
6182  ac_cv_header_string_h=$ac_header_preproc
6183fi
6184{ echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
6185echo "${ECHO_T}$ac_cv_header_string_h" >&6; }
6186
6187fi
6188if test $ac_cv_header_string_h = yes; then
6189  tcl_ok=1
6190else
6191  tcl_ok=0
6192fi
6193
6194
6195    cat >conftest.$ac_ext <<_ACEOF
6196/* confdefs.h.  */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h.  */
6201#include <string.h>
6202
6203_ACEOF
6204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6205  $EGREP "strstr" >/dev/null 2>&1; then
6206  :
6207else
6208  tcl_ok=0
6209fi
6210rm -f -r conftest*
6211
6212    cat >conftest.$ac_ext <<_ACEOF
6213/* confdefs.h.  */
6214_ACEOF
6215cat confdefs.h >>conftest.$ac_ext
6216cat >>conftest.$ac_ext <<_ACEOF
6217/* end confdefs.h.  */
6218#include <string.h>
6219
6220_ACEOF
6221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6222  $EGREP "strerror" >/dev/null 2>&1; then
6223  :
6224else
6225  tcl_ok=0
6226fi
6227rm -f -r conftest*
6228
6229
6230    # See also memmove check below for a place where NO_STRING_H can be
6231    # set and why.
6232
6233    if test $tcl_ok = 0; then
6234
6235cat >>confdefs.h <<\_ACEOF
6236#define NO_STRING_H 1
6237_ACEOF
6238
6239    fi
6240
6241    if test "${ac_cv_header_sys_wait_h+set}" = set; then
6242  { echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6243echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6244if test "${ac_cv_header_sys_wait_h+set}" = set; then
6245  echo $ECHO_N "(cached) $ECHO_C" >&6
6246fi
6247{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6248echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6249else
6250  # Is the header compilable?
6251{ echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
6252echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6; }
6253cat >conftest.$ac_ext <<_ACEOF
6254/* confdefs.h.  */
6255_ACEOF
6256cat confdefs.h >>conftest.$ac_ext
6257cat >>conftest.$ac_ext <<_ACEOF
6258/* end confdefs.h.  */
6259$ac_includes_default
6260#include <sys/wait.h>
6261_ACEOF
6262rm -f conftest.$ac_objext
6263if { (ac_try="$ac_compile"
6264case "(($ac_try" in
6265  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6266  *) ac_try_echo=$ac_try;;
6267esac
6268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6269  (eval "$ac_compile") 2>conftest.er1
6270  ac_status=$?
6271  grep -v '^ *+' conftest.er1 >conftest.err
6272  rm -f conftest.er1
6273  cat conftest.err >&5
6274  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6275  (exit $ac_status); } && {
6276	 test -z "$ac_c_werror_flag" ||
6277	 test ! -s conftest.err
6278       } && test -s conftest.$ac_objext; then
6279  ac_header_compiler=yes
6280else
6281  echo "$as_me: failed program was:" >&5
6282sed 's/^/| /' conftest.$ac_ext >&5
6283
6284	ac_header_compiler=no
6285fi
6286
6287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6288{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6289echo "${ECHO_T}$ac_header_compiler" >&6; }
6290
6291# Is the header present?
6292{ echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
6293echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6; }
6294cat >conftest.$ac_ext <<_ACEOF
6295/* confdefs.h.  */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h.  */
6300#include <sys/wait.h>
6301_ACEOF
6302if { (ac_try="$ac_cpp conftest.$ac_ext"
6303case "(($ac_try" in
6304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6305  *) ac_try_echo=$ac_try;;
6306esac
6307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6308  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6309  ac_status=$?
6310  grep -v '^ *+' conftest.er1 >conftest.err
6311  rm -f conftest.er1
6312  cat conftest.err >&5
6313  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6314  (exit $ac_status); } >/dev/null && {
6315	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6316	 test ! -s conftest.err
6317       }; then
6318  ac_header_preproc=yes
6319else
6320  echo "$as_me: failed program was:" >&5
6321sed 's/^/| /' conftest.$ac_ext >&5
6322
6323  ac_header_preproc=no
6324fi
6325
6326rm -f conftest.err conftest.$ac_ext
6327{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6328echo "${ECHO_T}$ac_header_preproc" >&6; }
6329
6330# So?  What about this header?
6331case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6332  yes:no: )
6333    { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
6334echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6335    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
6336echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
6337    ac_header_preproc=yes
6338    ;;
6339  no:yes:* )
6340    { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
6341echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
6342    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&5
6343echo "$as_me: WARNING: sys/wait.h:     check for missing prerequisite headers?" >&2;}
6344    { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
6345echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
6346    { echo "$as_me:$LINENO: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&5
6347echo "$as_me: WARNING: sys/wait.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6348    { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
6349echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
6350    { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
6351echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
6352
6353    ;;
6354esac
6355{ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
6356echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6; }
6357if test "${ac_cv_header_sys_wait_h+set}" = set; then
6358  echo $ECHO_N "(cached) $ECHO_C" >&6
6359else
6360  ac_cv_header_sys_wait_h=$ac_header_preproc
6361fi
6362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6363echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
6364
6365fi
6366if test $ac_cv_header_sys_wait_h = yes; then
6367  :
6368else
6369
6370cat >>confdefs.h <<\_ACEOF
6371#define NO_SYS_WAIT_H 1
6372_ACEOF
6373
6374fi
6375
6376
6377    if test "${ac_cv_header_dlfcn_h+set}" = set; then
6378  { echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6379echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6380if test "${ac_cv_header_dlfcn_h+set}" = set; then
6381  echo $ECHO_N "(cached) $ECHO_C" >&6
6382fi
6383{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6384echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6385else
6386  # Is the header compilable?
6387{ echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
6388echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6; }
6389cat >conftest.$ac_ext <<_ACEOF
6390/* confdefs.h.  */
6391_ACEOF
6392cat confdefs.h >>conftest.$ac_ext
6393cat >>conftest.$ac_ext <<_ACEOF
6394/* end confdefs.h.  */
6395$ac_includes_default
6396#include <dlfcn.h>
6397_ACEOF
6398rm -f conftest.$ac_objext
6399if { (ac_try="$ac_compile"
6400case "(($ac_try" in
6401  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402  *) ac_try_echo=$ac_try;;
6403esac
6404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6405  (eval "$ac_compile") 2>conftest.er1
6406  ac_status=$?
6407  grep -v '^ *+' conftest.er1 >conftest.err
6408  rm -f conftest.er1
6409  cat conftest.err >&5
6410  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6411  (exit $ac_status); } && {
6412	 test -z "$ac_c_werror_flag" ||
6413	 test ! -s conftest.err
6414       } && test -s conftest.$ac_objext; then
6415  ac_header_compiler=yes
6416else
6417  echo "$as_me: failed program was:" >&5
6418sed 's/^/| /' conftest.$ac_ext >&5
6419
6420	ac_header_compiler=no
6421fi
6422
6423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6424{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6425echo "${ECHO_T}$ac_header_compiler" >&6; }
6426
6427# Is the header present?
6428{ echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
6429echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6; }
6430cat >conftest.$ac_ext <<_ACEOF
6431/* confdefs.h.  */
6432_ACEOF
6433cat confdefs.h >>conftest.$ac_ext
6434cat >>conftest.$ac_ext <<_ACEOF
6435/* end confdefs.h.  */
6436#include <dlfcn.h>
6437_ACEOF
6438if { (ac_try="$ac_cpp conftest.$ac_ext"
6439case "(($ac_try" in
6440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6441  *) ac_try_echo=$ac_try;;
6442esac
6443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6444  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6445  ac_status=$?
6446  grep -v '^ *+' conftest.er1 >conftest.err
6447  rm -f conftest.er1
6448  cat conftest.err >&5
6449  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6450  (exit $ac_status); } >/dev/null && {
6451	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6452	 test ! -s conftest.err
6453       }; then
6454  ac_header_preproc=yes
6455else
6456  echo "$as_me: failed program was:" >&5
6457sed 's/^/| /' conftest.$ac_ext >&5
6458
6459  ac_header_preproc=no
6460fi
6461
6462rm -f conftest.err conftest.$ac_ext
6463{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6464echo "${ECHO_T}$ac_header_preproc" >&6; }
6465
6466# So?  What about this header?
6467case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6468  yes:no: )
6469    { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
6470echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6471    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
6472echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
6473    ac_header_preproc=yes
6474    ;;
6475  no:yes:* )
6476    { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
6477echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
6478    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&5
6479echo "$as_me: WARNING: dlfcn.h:     check for missing prerequisite headers?" >&2;}
6480    { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
6481echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
6482    { echo "$as_me:$LINENO: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&5
6483echo "$as_me: WARNING: dlfcn.h:     section \"Present But Cannot Be Compiled\"" >&2;}
6484    { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
6485echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
6486    { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
6487echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
6488
6489    ;;
6490esac
6491{ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
6492echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6; }
6493if test "${ac_cv_header_dlfcn_h+set}" = set; then
6494  echo $ECHO_N "(cached) $ECHO_C" >&6
6495else
6496  ac_cv_header_dlfcn_h=$ac_header_preproc
6497fi
6498{ echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
6499echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6; }
6500
6501fi
6502if test $ac_cv_header_dlfcn_h = yes; then
6503  :
6504else
6505
6506cat >>confdefs.h <<\_ACEOF
6507#define NO_DLFCN_H 1
6508_ACEOF
6509
6510fi
6511
6512
6513
6514    # OS/390 lacks sys/param.h (and doesn't need it, by chance).
6515
6516for ac_header in sys/param.h
6517do
6518as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6519if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6520  { echo "$as_me:$LINENO: checking for $ac_header" >&5
6521echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6522if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6523  echo $ECHO_N "(cached) $ECHO_C" >&6
6524fi
6525ac_res=`eval echo '${'$as_ac_Header'}'`
6526	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6527echo "${ECHO_T}$ac_res" >&6; }
6528else
6529  # Is the header compilable?
6530{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6531echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6532cat >conftest.$ac_ext <<_ACEOF
6533/* confdefs.h.  */
6534_ACEOF
6535cat confdefs.h >>conftest.$ac_ext
6536cat >>conftest.$ac_ext <<_ACEOF
6537/* end confdefs.h.  */
6538$ac_includes_default
6539#include <$ac_header>
6540_ACEOF
6541rm -f conftest.$ac_objext
6542if { (ac_try="$ac_compile"
6543case "(($ac_try" in
6544  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6545  *) ac_try_echo=$ac_try;;
6546esac
6547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6548  (eval "$ac_compile") 2>conftest.er1
6549  ac_status=$?
6550  grep -v '^ *+' conftest.er1 >conftest.err
6551  rm -f conftest.er1
6552  cat conftest.err >&5
6553  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6554  (exit $ac_status); } && {
6555	 test -z "$ac_c_werror_flag" ||
6556	 test ! -s conftest.err
6557       } && test -s conftest.$ac_objext; then
6558  ac_header_compiler=yes
6559else
6560  echo "$as_me: failed program was:" >&5
6561sed 's/^/| /' conftest.$ac_ext >&5
6562
6563	ac_header_compiler=no
6564fi
6565
6566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6567{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6568echo "${ECHO_T}$ac_header_compiler" >&6; }
6569
6570# Is the header present?
6571{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6572echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6573cat >conftest.$ac_ext <<_ACEOF
6574/* confdefs.h.  */
6575_ACEOF
6576cat confdefs.h >>conftest.$ac_ext
6577cat >>conftest.$ac_ext <<_ACEOF
6578/* end confdefs.h.  */
6579#include <$ac_header>
6580_ACEOF
6581if { (ac_try="$ac_cpp conftest.$ac_ext"
6582case "(($ac_try" in
6583  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6584  *) ac_try_echo=$ac_try;;
6585esac
6586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6587  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6588  ac_status=$?
6589  grep -v '^ *+' conftest.er1 >conftest.err
6590  rm -f conftest.er1
6591  cat conftest.err >&5
6592  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593  (exit $ac_status); } >/dev/null && {
6594	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6595	 test ! -s conftest.err
6596       }; then
6597  ac_header_preproc=yes
6598else
6599  echo "$as_me: failed program was:" >&5
6600sed 's/^/| /' conftest.$ac_ext >&5
6601
6602  ac_header_preproc=no
6603fi
6604
6605rm -f conftest.err conftest.$ac_ext
6606{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6607echo "${ECHO_T}$ac_header_preproc" >&6; }
6608
6609# So?  What about this header?
6610case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6611  yes:no: )
6612    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6613echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6614    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6615echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6616    ac_header_preproc=yes
6617    ;;
6618  no:yes:* )
6619    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6620echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6621    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
6622echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
6623    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6624echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6625    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
6626echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
6627    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6628echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6629    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6630echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6631
6632    ;;
6633esac
6634{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6635echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6636if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6637  echo $ECHO_N "(cached) $ECHO_C" >&6
6638else
6639  eval "$as_ac_Header=\$ac_header_preproc"
6640fi
6641ac_res=`eval echo '${'$as_ac_Header'}'`
6642	       { echo "$as_me:$LINENO: result: $ac_res" >&5
6643echo "${ECHO_T}$ac_res" >&6; }
6644
6645fi
6646if test `eval echo '${'$as_ac_Header'}'` = yes; then
6647  cat >>confdefs.h <<_ACEOF
6648#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6649_ACEOF
6650
6651fi
6652
6653done
6654
6655
6656	# Let the user call this, because if it triggers, they will
6657	# need a compat/strtod.c that is correct.  Users can also
6658	# use Tcl_GetDouble(FromObj) instead.
6659	#TEA_BUGGY_STRTOD
6660    fi
6661
6662
6663#--------------------------------------------------------------------
6664# __CHANGE__
6665# Choose which headers you need.  Extension authors should try very
6666# hard to only rely on the Tcl public header files.  Internal headers
6667# contain private data structures and are subject to change without
6668# notice.
6669# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
6670#--------------------------------------------------------------------
6671
6672
6673    { echo "$as_me:$LINENO: checking for Tcl public headers" >&5
6674echo $ECHO_N "checking for Tcl public headers... $ECHO_C" >&6; }
6675
6676
6677# Check whether --with-tclinclude was given.
6678if test "${with_tclinclude+set}" = set; then
6679  withval=$with_tclinclude; with_tclinclude=${withval}
6680fi
6681
6682
6683    if test "${ac_cv_c_tclh+set}" = set; then
6684  echo $ECHO_N "(cached) $ECHO_C" >&6
6685else
6686
6687	# Use the value from --with-tclinclude, if it was given
6688
6689	if test x"${with_tclinclude}" != x ; then
6690	    if test -f "${with_tclinclude}/tcl.h" ; then
6691		ac_cv_c_tclh=${with_tclinclude}
6692	    else
6693		{ { echo "$as_me:$LINENO: error: ${with_tclinclude} directory does not contain tcl.h" >&5
6694echo "$as_me: error: ${with_tclinclude} directory does not contain tcl.h" >&2;}
6695   { (exit 1); exit 1; }; }
6696	    fi
6697	else
6698	    list=""
6699	    if test "`uname -s`" = "Darwin"; then
6700		# If Tcl was built as a framework, attempt to use
6701		# the framework's Headers directory
6702		case ${TCL_DEFS} in
6703		    *TCL_FRAMEWORK*)
6704			list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
6705			;;
6706		esac
6707	    fi
6708
6709	    # Look in the source dir only if Tcl is not installed,
6710	    # and in that situation, look there before installed locations.
6711	    if test -f "${TCL_BIN_DIR}/Makefile" ; then
6712		list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
6713	    fi
6714
6715	    # Check order: pkg --prefix location, Tcl's --prefix location,
6716	    # relative to directory of tclConfig.sh.
6717
6718	    eval "temp_includedir=${includedir}"
6719	    list="$list \
6720		`ls -d ${temp_includedir}        2>/dev/null` \
6721		`ls -d ${TCL_PREFIX}/include     2>/dev/null` \
6722		`ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
6723	    if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
6724		list="$list /usr/local/include /usr/include"
6725		if test x"${TCL_INCLUDE_SPEC}" != x ; then
6726		    d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
6727		    list="$list `ls -d ${d} 2>/dev/null`"
6728		fi
6729	    fi
6730	    for i in $list ; do
6731		if test -f "$i/tcl.h" ; then
6732		    ac_cv_c_tclh=$i
6733		    break
6734		fi
6735	    done
6736	fi
6737
6738fi
6739
6740
6741    # Print a message based on how we determined the include path
6742
6743    if test x"${ac_cv_c_tclh}" = x ; then
6744	{ { echo "$as_me:$LINENO: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&5
6745echo "$as_me: error: tcl.h not found.  Please specify its location with --with-tclinclude" >&2;}
6746   { (exit 1); exit 1; }; }
6747    else
6748	{ echo "$as_me:$LINENO: result: ${ac_cv_c_tclh}" >&5
6749echo "${ECHO_T}${ac_cv_c_tclh}" >&6; }
6750    fi
6751
6752    # Convert to a native path and substitute into the output files.
6753
6754    INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
6755
6756    TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
6757
6758
6759
6760#TEA_PRIVATE_TCL_HEADERS
6761
6762#TEA_PUBLIC_TK_HEADERS
6763#TEA_PRIVATE_TK_HEADERS
6764
6765#--------------------------------------------------------------------
6766# __CHANGE__
6767# A few miscellaneous platform-specific items:
6768#
6769# Define a special symbol for Windows (BUILD_sample in this case) so
6770# that we create the export library with the dll.  See sha1.h on how
6771# to use this.
6772#
6773# Windows creates a few extra files that need to be cleaned up.
6774# You can add more files to clean if your extension creates any extra
6775# files.
6776#
6777# Define any extra compiler flags in the PACKAGE_CFLAGS variable.
6778# These will be appended to the current set of compiler flags for
6779# your system.
6780#--------------------------------------------------------------------
6781
6782if test "${TEA_PLATFORM}" = "windows" ; then
6783    cat >>confdefs.h <<\_ACEOF
6784#define BUILD_example 1
6785_ACEOF
6786
6787    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
6788    EXTRA_SOURCES='$(WIN_SOURCES)'
6789else
6790    CLEANFILES="pkgIndex.tcl"
6791    EXTRA_SOURCES='$(UNIX_SOURCES)'
6792fi
6793
6794
6795
6796#--------------------------------------------------------------------
6797# Check whether --enable-threads or --disable-threads was given.
6798#--------------------------------------------------------------------
6799
6800
6801    # Check whether --enable-threads was given.
6802if test "${enable_threads+set}" = set; then
6803  enableval=$enable_threads; tcl_ok=$enableval
6804else
6805  tcl_ok=yes
6806fi
6807
6808
6809    if test "${enable_threads+set}" = set; then
6810	enableval="$enable_threads"
6811	tcl_ok=$enableval
6812    else
6813	tcl_ok=yes
6814    fi
6815
6816    if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
6817	TCL_THREADS=1
6818
6819	if test "${TEA_PLATFORM}" != "windows" ; then
6820	    # We are always OK on Windows, so check what this platform wants:
6821
6822	    # USE_THREAD_ALLOC tells us to try the special thread-based
6823	    # allocator that significantly reduces lock contention
6824
6825cat >>confdefs.h <<\_ACEOF
6826#define USE_THREAD_ALLOC 1
6827_ACEOF
6828
6829
6830cat >>confdefs.h <<\_ACEOF
6831#define _REENTRANT 1
6832_ACEOF
6833
6834	    if test "`uname -s`" = "SunOS" ; then
6835
6836cat >>confdefs.h <<\_ACEOF
6837#define _POSIX_PTHREAD_SEMANTICS 1
6838_ACEOF
6839
6840	    fi
6841
6842cat >>confdefs.h <<\_ACEOF
6843#define _THREAD_SAFE 1
6844_ACEOF
6845
6846	    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
6847echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6848if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
6849  echo $ECHO_N "(cached) $ECHO_C" >&6
6850else
6851  ac_check_lib_save_LIBS=$LIBS
6852LIBS="-lpthread  $LIBS"
6853cat >conftest.$ac_ext <<_ACEOF
6854/* confdefs.h.  */
6855_ACEOF
6856cat confdefs.h >>conftest.$ac_ext
6857cat >>conftest.$ac_ext <<_ACEOF
6858/* end confdefs.h.  */
6859
6860/* Override any GCC internal prototype to avoid an error.
6861   Use char because int might match the return type of a GCC
6862   builtin and then its argument prototype would still apply.  */
6863#ifdef __cplusplus
6864extern "C"
6865#endif
6866char pthread_mutex_init ();
6867int
6868main ()
6869{
6870return pthread_mutex_init ();
6871  ;
6872  return 0;
6873}
6874_ACEOF
6875rm -f conftest.$ac_objext conftest$ac_exeext
6876if { (ac_try="$ac_link"
6877case "(($ac_try" in
6878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6879  *) ac_try_echo=$ac_try;;
6880esac
6881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6882  (eval "$ac_link") 2>conftest.er1
6883  ac_status=$?
6884  grep -v '^ *+' conftest.er1 >conftest.err
6885  rm -f conftest.er1
6886  cat conftest.err >&5
6887  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6888  (exit $ac_status); } && {
6889	 test -z "$ac_c_werror_flag" ||
6890	 test ! -s conftest.err
6891       } && test -s conftest$ac_exeext &&
6892       $as_test_x conftest$ac_exeext; then
6893  ac_cv_lib_pthread_pthread_mutex_init=yes
6894else
6895  echo "$as_me: failed program was:" >&5
6896sed 's/^/| /' conftest.$ac_ext >&5
6897
6898	ac_cv_lib_pthread_pthread_mutex_init=no
6899fi
6900
6901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6902      conftest$ac_exeext conftest.$ac_ext
6903LIBS=$ac_check_lib_save_LIBS
6904fi
6905{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
6906echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6; }
6907if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
6908  tcl_ok=yes
6909else
6910  tcl_ok=no
6911fi
6912
6913	    if test "$tcl_ok" = "no"; then
6914		# Check a little harder for __pthread_mutex_init in the same
6915		# library, as some systems hide it there until pthread.h is
6916		# defined.  We could alternatively do an AC_TRY_COMPILE with
6917		# pthread.h, but that will work with libpthread really doesn't
6918		# exist, like AIX 4.2.  [Bug: 4359]
6919		{ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
6920echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6; }
6921if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
6922  echo $ECHO_N "(cached) $ECHO_C" >&6
6923else
6924  ac_check_lib_save_LIBS=$LIBS
6925LIBS="-lpthread  $LIBS"
6926cat >conftest.$ac_ext <<_ACEOF
6927/* confdefs.h.  */
6928_ACEOF
6929cat confdefs.h >>conftest.$ac_ext
6930cat >>conftest.$ac_ext <<_ACEOF
6931/* end confdefs.h.  */
6932
6933/* Override any GCC internal prototype to avoid an error.
6934   Use char because int might match the return type of a GCC
6935   builtin and then its argument prototype would still apply.  */
6936#ifdef __cplusplus
6937extern "C"
6938#endif
6939char __pthread_mutex_init ();
6940int
6941main ()
6942{
6943return __pthread_mutex_init ();
6944  ;
6945  return 0;
6946}
6947_ACEOF
6948rm -f conftest.$ac_objext conftest$ac_exeext
6949if { (ac_try="$ac_link"
6950case "(($ac_try" in
6951  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952  *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955  (eval "$ac_link") 2>conftest.er1
6956  ac_status=$?
6957  grep -v '^ *+' conftest.er1 >conftest.err
6958  rm -f conftest.er1
6959  cat conftest.err >&5
6960  echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961  (exit $ac_status); } && {
6962	 test -z "$ac_c_werror_flag" ||
6963	 test ! -s conftest.err
6964       } && test -s conftest$ac_exeext &&
6965       $as_test_x conftest$ac_exeext; then
6966  ac_cv_lib_pthread___pthread_mutex_init=yes
6967else
6968  echo "$as_me: failed program was:" >&5
6969sed 's/^/| /' conftest.$ac_ext >&5
6970
6971	ac_cv_lib_pthread___pthread_mutex_init=no
6972fi
6973
6974rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6975      conftest$ac_exeext conftest.$ac_ext
6976LIBS=$ac_check_lib_save_LIBS
6977fi
6978{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
6979echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6; }
6980if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
6981  tcl_ok=yes
6982else
6983  tcl_ok=no
6984fi
6985
6986	    fi
6987
6988	    if test "$tcl_ok" = "yes"; then
6989		# The space is needed
6990		THREADS_LIBS=" -lpthread"
6991	    else
6992		{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
6993echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6; }
6994if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
6995  echo $ECHO_N "(cached) $ECHO_C" >&6
6996else
6997  ac_check_lib_save_LIBS=$LIBS
6998LIBS="-lpthreads  $LIBS"
6999cat >conftest.$ac_ext <<_ACEOF
7000/* confdefs.h.  */
7001_ACEOF
7002cat confdefs.h >>conftest.$ac_ext
7003cat >>conftest.$ac_ext <<_ACEOF
7004/* end confdefs.h.  */
7005
7006/* Override any GCC internal prototype to avoid an error.
7007   Use char because int might match the return type of a GCC
7008   builtin and then its argument prototype would still apply.  */
7009#ifdef __cplusplus
7010extern "C"
7011#endif
7012char pthread_mutex_init ();
7013int
7014main ()
7015{
7016return pthread_mutex_init ();
7017  ;
7018  return 0;
7019}
7020_ACEOF
7021rm -f conftest.$ac_objext conftest$ac_exeext
7022if { (ac_try="$ac_link"
7023case "(($ac_try" in
7024  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7025  *) ac_try_echo=$ac_try;;
7026esac
7027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7028  (eval "$ac_link") 2>conftest.er1
7029  ac_status=$?
7030  grep -v '^ *+' conftest.er1 >conftest.err
7031  rm -f conftest.er1
7032  cat conftest.err >&5
7033  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7034  (exit $ac_status); } && {
7035	 test -z "$ac_c_werror_flag" ||
7036	 test ! -s conftest.err
7037       } && test -s conftest$ac_exeext &&
7038       $as_test_x conftest$ac_exeext; then
7039  ac_cv_lib_pthreads_pthread_mutex_init=yes
7040else
7041  echo "$as_me: failed program was:" >&5
7042sed 's/^/| /' conftest.$ac_ext >&5
7043
7044	ac_cv_lib_pthreads_pthread_mutex_init=no
7045fi
7046
7047rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7048      conftest$ac_exeext conftest.$ac_ext
7049LIBS=$ac_check_lib_save_LIBS
7050fi
7051{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
7052echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6; }
7053if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
7054  tcl_ok=yes
7055else
7056  tcl_ok=no
7057fi
7058
7059		if test "$tcl_ok" = "yes"; then
7060		    # The space is needed
7061		    THREADS_LIBS=" -lpthreads"
7062		else
7063		    { echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
7064echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6; }
7065if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
7066  echo $ECHO_N "(cached) $ECHO_C" >&6
7067else
7068  ac_check_lib_save_LIBS=$LIBS
7069LIBS="-lc  $LIBS"
7070cat >conftest.$ac_ext <<_ACEOF
7071/* confdefs.h.  */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h.  */
7076
7077/* Override any GCC internal prototype to avoid an error.
7078   Use char because int might match the return type of a GCC
7079   builtin and then its argument prototype would still apply.  */
7080#ifdef __cplusplus
7081extern "C"
7082#endif
7083char pthread_mutex_init ();
7084int
7085main ()
7086{
7087return pthread_mutex_init ();
7088  ;
7089  return 0;
7090}
7091_ACEOF
7092rm -f conftest.$ac_objext conftest$ac_exeext
7093if { (ac_try="$ac_link"
7094case "(($ac_try" in
7095  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7096  *) ac_try_echo=$ac_try;;
7097esac
7098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7099  (eval "$ac_link") 2>conftest.er1
7100  ac_status=$?
7101  grep -v '^ *+' conftest.er1 >conftest.err
7102  rm -f conftest.er1
7103  cat conftest.err >&5
7104  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7105  (exit $ac_status); } && {
7106	 test -z "$ac_c_werror_flag" ||
7107	 test ! -s conftest.err
7108       } && test -s conftest$ac_exeext &&
7109       $as_test_x conftest$ac_exeext; then
7110  ac_cv_lib_c_pthread_mutex_init=yes
7111else
7112  echo "$as_me: failed program was:" >&5
7113sed 's/^/| /' conftest.$ac_ext >&5
7114
7115	ac_cv_lib_c_pthread_mutex_init=no
7116fi
7117
7118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7119      conftest$ac_exeext conftest.$ac_ext
7120LIBS=$ac_check_lib_save_LIBS
7121fi
7122{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
7123echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6; }
7124if test $ac_cv_lib_c_pthread_mutex_init = yes; then
7125  tcl_ok=yes
7126else
7127  tcl_ok=no
7128fi
7129
7130		    if test "$tcl_ok" = "no"; then
7131			{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
7132echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6; }
7133if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
7134  echo $ECHO_N "(cached) $ECHO_C" >&6
7135else
7136  ac_check_lib_save_LIBS=$LIBS
7137LIBS="-lc_r  $LIBS"
7138cat >conftest.$ac_ext <<_ACEOF
7139/* confdefs.h.  */
7140_ACEOF
7141cat confdefs.h >>conftest.$ac_ext
7142cat >>conftest.$ac_ext <<_ACEOF
7143/* end confdefs.h.  */
7144
7145/* Override any GCC internal prototype to avoid an error.
7146   Use char because int might match the return type of a GCC
7147   builtin and then its argument prototype would still apply.  */
7148#ifdef __cplusplus
7149extern "C"
7150#endif
7151char pthread_mutex_init ();
7152int
7153main ()
7154{
7155return pthread_mutex_init ();
7156  ;
7157  return 0;
7158}
7159_ACEOF
7160rm -f conftest.$ac_objext conftest$ac_exeext
7161if { (ac_try="$ac_link"
7162case "(($ac_try" in
7163  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7164  *) ac_try_echo=$ac_try;;
7165esac
7166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7167  (eval "$ac_link") 2>conftest.er1
7168  ac_status=$?
7169  grep -v '^ *+' conftest.er1 >conftest.err
7170  rm -f conftest.er1
7171  cat conftest.err >&5
7172  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7173  (exit $ac_status); } && {
7174	 test -z "$ac_c_werror_flag" ||
7175	 test ! -s conftest.err
7176       } && test -s conftest$ac_exeext &&
7177       $as_test_x conftest$ac_exeext; then
7178  ac_cv_lib_c_r_pthread_mutex_init=yes
7179else
7180  echo "$as_me: failed program was:" >&5
7181sed 's/^/| /' conftest.$ac_ext >&5
7182
7183	ac_cv_lib_c_r_pthread_mutex_init=no
7184fi
7185
7186rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7187      conftest$ac_exeext conftest.$ac_ext
7188LIBS=$ac_check_lib_save_LIBS
7189fi
7190{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
7191echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6; }
7192if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
7193  tcl_ok=yes
7194else
7195  tcl_ok=no
7196fi
7197
7198			if test "$tcl_ok" = "yes"; then
7199			    # The space is needed
7200			    THREADS_LIBS=" -pthread"
7201			else
7202			    TCL_THREADS=0
7203			    { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
7204echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
7205			fi
7206		    fi
7207		fi
7208	    fi
7209	fi
7210    else
7211	TCL_THREADS=0
7212    fi
7213    # Do checking message here to not mess up interleaved configure output
7214    { echo "$as_me:$LINENO: checking for building with threads" >&5
7215echo $ECHO_N "checking for building with threads... $ECHO_C" >&6; }
7216    if test "${TCL_THREADS}" = 1; then
7217
7218cat >>confdefs.h <<\_ACEOF
7219#define TCL_THREADS 1
7220_ACEOF
7221
7222	{ echo "$as_me:$LINENO: result: yes (default)" >&5
7223echo "${ECHO_T}yes (default)" >&6; }
7224    else
7225	{ echo "$as_me:$LINENO: result: no" >&5
7226echo "${ECHO_T}no" >&6; }
7227    fi
7228    # TCL_THREADS sanity checking.  See if our request for building with
7229    # threads is the same as the way Tcl was built.  If not, warn the user.
7230    case ${TCL_DEFS} in
7231	*THREADS=1*)
7232	    if test "${TCL_THREADS}" = "0"; then
7233		{ echo "$as_me:$LINENO: WARNING:
7234    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7235    that IS thread-enabled.  It is recommended to use --enable-threads." >&5
7236echo "$as_me: WARNING:
7237    Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
7238    that IS thread-enabled.  It is recommended to use --enable-threads." >&2;}
7239	    fi
7240	    ;;
7241	*)
7242	    if test "${TCL_THREADS}" = "1"; then
7243		{ echo "$as_me:$LINENO: WARNING:
7244    --enable-threads requested, but building against a Tcl that is NOT
7245    thread-enabled.  This is an OK configuration that will also run in
7246    a thread-enabled core." >&5
7247echo "$as_me: WARNING:
7248    --enable-threads requested, but building against a Tcl that is NOT
7249    thread-enabled.  This is an OK configuration that will also run in
7250    a thread-enabled core." >&2;}
7251	    fi
7252	    ;;
7253    esac
7254
7255
7256
7257#--------------------------------------------------------------------
7258# The statement below defines a collection of symbols related to
7259# building as a shared library instead of a static library.
7260#--------------------------------------------------------------------
7261
7262
7263    { echo "$as_me:$LINENO: checking how to build libraries" >&5
7264echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6; }
7265    # Check whether --enable-shared was given.
7266if test "${enable_shared+set}" = set; then
7267  enableval=$enable_shared; tcl_ok=$enableval
7268else
7269  tcl_ok=yes
7270fi
7271
7272
7273    if test "${enable_shared+set}" = set; then
7274	enableval="$enable_shared"
7275	tcl_ok=$enableval
7276    else
7277	tcl_ok=yes
7278    fi
7279
7280    if test "$tcl_ok" = "yes" ; then
7281	{ echo "$as_me:$LINENO: result: shared" >&5
7282echo "${ECHO_T}shared" >&6; }
7283	SHARED_BUILD=1
7284    else
7285	{ echo "$as_me:$LINENO: result: static" >&5
7286echo "${ECHO_T}static" >&6; }
7287	SHARED_BUILD=0
7288
7289cat >>confdefs.h <<\_ACEOF
7290#define STATIC_BUILD 1
7291_ACEOF
7292
7293    fi
7294
7295
7296
7297#--------------------------------------------------------------------
7298# This macro figures out what flags to use with the compiler/linker
7299# when building shared/static debug/optimized objects.  This information
7300# can be taken from the tclConfig.sh file, but this figures it all out.
7301#--------------------------------------------------------------------
7302
7303
7304
7305
7306    # Step 0.a: Enable 64 bit support?
7307
7308    { echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
7309echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6; }
7310    # Check whether --enable-64bit was given.
7311if test "${enable_64bit+set}" = set; then
7312  enableval=$enable_64bit; do64bit=$enableval
7313else
7314  do64bit=no
7315fi
7316
7317    { echo "$as_me:$LINENO: result: $do64bit" >&5
7318echo "${ECHO_T}$do64bit" >&6; }
7319
7320    # Step 0.b: Enable Solaris 64 bit VIS support?
7321
7322    { echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
7323echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6; }
7324    # Check whether --enable-64bit-vis was given.
7325if test "${enable_64bit_vis+set}" = set; then
7326  enableval=$enable_64bit_vis; do64bitVIS=$enableval
7327else
7328  do64bitVIS=no
7329fi
7330
7331    { echo "$as_me:$LINENO: result: $do64bitVIS" >&5
7332echo "${ECHO_T}$do64bitVIS" >&6; }
7333    # Force 64bit on with VIS
7334    if test "$do64bitVIS" = "yes"; then
7335  do64bit=yes
7336fi
7337
7338
7339    # Step 0.c: Check if visibility support is available. Do this here so
7340    # that platform specific alternatives can be used below if this fails.
7341
7342    { echo "$as_me:$LINENO: checking if compiler supports visibility \"hidden\"" >&5
7343echo $ECHO_N "checking if compiler supports visibility \"hidden\"... $ECHO_C" >&6; }
7344if test "${tcl_cv_cc_visibility_hidden+set}" = set; then
7345  echo $ECHO_N "(cached) $ECHO_C" >&6
7346else
7347
7348	hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Werror"
7349	cat >conftest.$ac_ext <<_ACEOF
7350/* confdefs.h.  */
7351_ACEOF
7352cat confdefs.h >>conftest.$ac_ext
7353cat >>conftest.$ac_ext <<_ACEOF
7354/* end confdefs.h.  */
7355
7356	    extern __attribute__((__visibility__("hidden"))) void f(void);
7357	    void f(void) {}
7358int
7359main ()
7360{
7361f();
7362  ;
7363  return 0;
7364}
7365_ACEOF
7366rm -f conftest.$ac_objext conftest$ac_exeext
7367if { (ac_try="$ac_link"
7368case "(($ac_try" in
7369  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7370  *) ac_try_echo=$ac_try;;
7371esac
7372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7373  (eval "$ac_link") 2>conftest.er1
7374  ac_status=$?
7375  grep -v '^ *+' conftest.er1 >conftest.err
7376  rm -f conftest.er1
7377  cat conftest.err >&5
7378  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7379  (exit $ac_status); } && {
7380	 test -z "$ac_c_werror_flag" ||
7381	 test ! -s conftest.err
7382       } && test -s conftest$ac_exeext &&
7383       $as_test_x conftest$ac_exeext; then
7384  tcl_cv_cc_visibility_hidden=yes
7385else
7386  echo "$as_me: failed program was:" >&5
7387sed 's/^/| /' conftest.$ac_ext >&5
7388
7389	tcl_cv_cc_visibility_hidden=no
7390fi
7391
7392rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7393      conftest$ac_exeext conftest.$ac_ext
7394	CFLAGS=$hold_cflags
7395fi
7396{ echo "$as_me:$LINENO: result: $tcl_cv_cc_visibility_hidden" >&5
7397echo "${ECHO_T}$tcl_cv_cc_visibility_hidden" >&6; }
7398    if test $tcl_cv_cc_visibility_hidden = yes; then
7399
7400
7401cat >>confdefs.h <<\_ACEOF
7402#define MODULE_SCOPE extern __attribute__((__visibility__("hidden")))
7403_ACEOF
7404
7405
7406fi
7407
7408
7409    # Step 0.d: Disable -rpath support?
7410
7411    { echo "$as_me:$LINENO: checking if rpath support is requested" >&5
7412echo $ECHO_N "checking if rpath support is requested... $ECHO_C" >&6; }
7413    # Check whether --enable-rpath was given.
7414if test "${enable_rpath+set}" = set; then
7415  enableval=$enable_rpath; doRpath=$enableval
7416else
7417  doRpath=yes
7418fi
7419
7420    { echo "$as_me:$LINENO: result: $doRpath" >&5
7421echo "${ECHO_T}$doRpath" >&6; }
7422
7423    # TEA specific: Cross-compiling options for Windows/CE builds?
7424
7425    if test "${TEA_PLATFORM}" = windows; then
7426
7427	{ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
7428echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6; }
7429	# Check whether --enable-wince was given.
7430if test "${enable_wince+set}" = set; then
7431  enableval=$enable_wince; doWince=$enableval
7432else
7433  doWince=no
7434fi
7435
7436	{ echo "$as_me:$LINENO: result: $doWince" >&5
7437echo "${ECHO_T}$doWince" >&6; }
7438
7439fi
7440
7441
7442    # Set the variable "system" to hold the name and version number
7443    # for the system.
7444
7445
7446    { echo "$as_me:$LINENO: checking system version" >&5
7447echo $ECHO_N "checking system version... $ECHO_C" >&6; }
7448if test "${tcl_cv_sys_version+set}" = set; then
7449  echo $ECHO_N "(cached) $ECHO_C" >&6
7450else
7451
7452	# TEA specific:
7453	if test "${TEA_PLATFORM}" = "windows" ; then
7454	    tcl_cv_sys_version=windows
7455	else
7456	    tcl_cv_sys_version=`uname -s`-`uname -r`
7457	    if test "$?" -ne 0 ; then
7458		{ echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
7459echo "$as_me: WARNING: can't find uname command" >&2;}
7460		tcl_cv_sys_version=unknown
7461	    else
7462		if test "`uname -s`" = "AIX" ; then
7463		    tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
7464		fi
7465	    fi
7466	fi
7467
7468fi
7469{ echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
7470echo "${ECHO_T}$tcl_cv_sys_version" >&6; }
7471    system=$tcl_cv_sys_version
7472
7473
7474    # Require ranlib early so we can override it in special cases below.
7475
7476
7477
7478    # Set configuration options based on system name and version.
7479    # This is similar to Tcl's unix/tcl.m4 except that we've added a
7480    # "windows" case and removed some core-only vars.
7481
7482    do64bit_ok=no
7483    # default to '{$LIBS}' and set to "" on per-platform necessary basis
7484    SHLIB_LD_LIBS='${LIBS}'
7485    # When ld needs options to work in 64-bit mode, put them in
7486    # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
7487    # is disabled by the user. [Bug 1016796]
7488    LDFLAGS_ARCH=""
7489    UNSHARED_LIB_SUFFIX=""
7490    # TEA specific: use PACKAGE_VERSION instead of VERSION
7491    TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
7492    ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
7493    TCL_LIB_VERSIONS_OK=ok
7494    CFLAGS_DEBUG=-g
7495    CFLAGS_OPTIMIZE=-O
7496    if test "$GCC" = yes; then
7497
7498	# TEA specific:
7499	CFLAGS_OPTIMIZE=-O2
7500	CFLAGS_WARNING="-Wall"
7501
7502else
7503  CFLAGS_WARNING=""
7504fi
7505
7506    # Extract the first word of "ar", so it can be a program name with args.
7507set dummy ar; ac_word=$2
7508{ echo "$as_me:$LINENO: checking for $ac_word" >&5
7509echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
7510if test "${ac_cv_prog_AR+set}" = set; then
7511  echo $ECHO_N "(cached) $ECHO_C" >&6
7512else
7513  if test -n "$AR"; then
7514  ac_cv_prog_AR="$AR" # Let the user override the test.
7515else
7516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7517for as_dir in $PATH
7518do
7519  IFS=$as_save_IFS
7520  test -z "$as_dir" && as_dir=.
7521  for ac_exec_ext in '' $ac_executable_extensions; do
7522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7523    ac_cv_prog_AR="ar"
7524    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
7525    break 2
7526  fi
7527done
7528done
7529IFS=$as_save_IFS
7530
7531fi
7532fi
7533AR=$ac_cv_prog_AR
7534if test -n "$AR"; then
7535  { echo "$as_me:$LINENO: result: $AR" >&5
7536echo "${ECHO_T}$AR" >&6; }
7537else
7538  { echo "$as_me:$LINENO: result: no" >&5
7539echo "${ECHO_T}no" >&6; }
7540fi
7541
7542
7543    STLIB_LD='${AR} cr'
7544    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
7545    if test "x$SHLIB_VERSION" = x; then
7546  SHLIB_VERSION="1.0"
7547fi
7548
7549    case $system in
7550	# TEA specific:
7551	windows)
7552	    # This is a 2-stage check to make sure we have the 64-bit SDK
7553	    # We have to know where the SDK is installed.
7554	    # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
7555	    # MACHINE is IX86 for LINK, but this is used by the manifest,
7556	    # which requires x86|amd64|ia64.
7557	    MACHINE="X86"
7558	    if test "$do64bit" != "no" ; then
7559		if test "x${MSSDK}x" = "xx" ; then
7560		    MSSDK="C:/Progra~1/Microsoft Platform SDK"
7561		fi
7562		MSSDK=`echo "$MSSDK" | sed -e  's!\\\!/!g'`
7563		PATH64=""
7564		case "$do64bit" in
7565		    amd64|x64|yes)
7566			MACHINE="AMD64" ; # default to AMD64 64-bit build
7567			PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
7568			;;
7569		    ia64)
7570			MACHINE="IA64"
7571			PATH64="${MSSDK}/Bin/Win64"
7572			;;
7573		esac
7574		if test ! -d "${PATH64}" ; then
7575		    { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
7576echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
7577		    { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
7578echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
7579		    do64bit="no"
7580		else
7581		    { echo "$as_me:$LINENO: result:    Using 64-bit $MACHINE mode" >&5
7582echo "${ECHO_T}   Using 64-bit $MACHINE mode" >&6; }
7583		    do64bit_ok="yes"
7584		fi
7585	    fi
7586
7587	    if test "$doWince" != "no" ; then
7588		if test "$do64bit" != "no" ; then
7589		    { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
7590echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
7591   { (exit 1); exit 1; }; }
7592		fi
7593		if test "$GCC" = "yes" ; then
7594		    { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
7595echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
7596   { (exit 1); exit 1; }; }
7597		fi
7598
7599    # First, look for one uninstalled.
7600    # the alternative search directory is invoked by --with-celib
7601
7602    if test x"${no_celib}" = x ; then
7603	# we reset no_celib in case something fails here
7604	no_celib=true
7605
7606# Check whether --with-celib was given.
7607if test "${with_celib+set}" = set; then
7608  withval=$with_celib; with_celibconfig=${withval}
7609fi
7610
7611	{ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
7612echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6; }
7613	if test "${ac_cv_c_celibconfig+set}" = set; then
7614  echo $ECHO_N "(cached) $ECHO_C" >&6
7615else
7616
7617	    # First check to see if --with-celibconfig was specified.
7618	    if test x"${with_celibconfig}" != x ; then
7619		if test -d "${with_celibconfig}/inc" ; then
7620		    ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
7621		else
7622		    { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
7623echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
7624   { (exit 1); exit 1; }; }
7625		fi
7626	    fi
7627
7628	    # then check for a celib library
7629	    if test x"${ac_cv_c_celibconfig}" = x ; then
7630		for i in \
7631			../celib-palm-3.0 \
7632			../celib \
7633			../../celib-palm-3.0 \
7634			../../celib \
7635			`ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
7636			${srcdir}/../celib-palm-3.0 \
7637			${srcdir}/../celib \
7638			`ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
7639			; do
7640		    if test -d "$i/inc" ; then
7641			ac_cv_c_celibconfig=`(cd $i; pwd)`
7642			break
7643		    fi
7644		done
7645	    fi
7646
7647fi
7648
7649	if test x"${ac_cv_c_celibconfig}" = x ; then
7650	    { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
7651echo "$as_me: error: Cannot find celib support library directory" >&2;}
7652   { (exit 1); exit 1; }; }
7653	else
7654	    no_celib=
7655	    CELIB_DIR=${ac_cv_c_celibconfig}
7656	    CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
7657	    { echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
7658echo "${ECHO_T}found $CELIB_DIR" >&6; }
7659	fi
7660    fi
7661
7662		# Set defaults for common evc4/PPC2003 setup
7663		# Currently Tcl requires 300+, possibly 420+ for sockets
7664		CEVERSION=420; 		# could be 211 300 301 400 420 ...
7665		TARGETCPU=ARMV4;	# could be ARMV4 ARM MIPS SH3 X86 ...
7666		ARCH=ARM;		# could be ARM MIPS X86EM ...
7667		PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
7668		if test "$doWince" != "yes"; then
7669		    # If !yes then the user specified something
7670		    # Reset ARCH to allow user to skip specifying it
7671		    ARCH=
7672		    eval `echo $doWince | awk -F, '{ \
7673	    if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
7674	    if ($1 < 400)   { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
7675	    if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
7676	    if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
7677	    if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
7678		    }'`
7679		    if test "x${ARCH}" = "x" ; then
7680			ARCH=$TARGETCPU;
7681		    fi
7682		fi
7683		OSVERSION=WCE$CEVERSION;
7684	    	if test "x${WCEROOT}" = "x" ; then
7685			WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
7686		    if test ! -d "${WCEROOT}" ; then
7687			WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
7688		    fi
7689		fi
7690		if test "x${SDKROOT}" = "x" ; then
7691		    SDKROOT="C:/Program Files/Windows CE Tools"
7692		    if test ! -d "${SDKROOT}" ; then
7693			SDKROOT="C:/Windows CE Tools"
7694		    fi
7695		fi
7696		WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
7697		SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
7698		if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
7699		    -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
7700		    { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
7701echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
7702   { (exit 1); exit 1; }; }
7703		    doWince="no"
7704		else
7705		    # We could PATH_NOSPACE these, but that's not important,
7706		    # as long as we quote them when used.
7707		    CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
7708		    if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
7709			CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
7710		    fi
7711		    CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
7712    		fi
7713	    fi
7714
7715	    if test "$GCC" != "yes" ; then
7716	        if test "${SHARED_BUILD}" = "0" ; then
7717		    runtime=-MT
7718	        else
7719		    runtime=-MD
7720	        fi
7721
7722                if test "$do64bit" != "no" ; then
7723		    # All this magic is necessary for the Win64 SDK RC1 - hobbs
7724		    CC="\"${PATH64}/cl.exe\""
7725		    CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
7726		    RC="\"${MSSDK}/bin/rc.exe\""
7727		    lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
7728		    LINKBIN="\"${PATH64}/link.exe\""
7729		    CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
7730		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7731		    # Avoid 'unresolved external symbol __security_cookie'
7732		    # errors, c.f. http://support.microsoft.com/?id=894573
7733
7734    vars="bufferoverflowU.lib"
7735    for i in $vars; do
7736	if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
7737	    # Convert foo.lib to -lfoo for GCC.  No-op if not *.lib
7738	    i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
7739	fi
7740	PKG_LIBS="$PKG_LIBS $i"
7741    done
7742
7743
7744		elif test "$doWince" != "no" ; then
7745		    CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
7746		    if test "${TARGETCPU}" = "X86"; then
7747			CC="\"${CEBINROOT}/cl.exe\""
7748		    else
7749			CC="\"${CEBINROOT}/cl${ARCH}.exe\""
7750		    fi
7751		    CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
7752		    RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
7753		    arch=`echo ${ARCH} | awk '{print tolower($0)}'`
7754		    defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
7755		    if test "${SHARED_BUILD}" = "1" ; then
7756			# Static CE builds require static celib as well
7757		    	defs="${defs} _DLL"
7758		    fi
7759		    for i in $defs ; do
7760
7761cat >>confdefs.h <<_ACEOF
7762#define $i 1
7763_ACEOF
7764
7765		    done
7766
7767cat >>confdefs.h <<_ACEOF
7768#define _WIN32_WCE $CEVERSION
7769_ACEOF
7770
7771
7772cat >>confdefs.h <<_ACEOF
7773#define UNDER_CE $CEVERSION
7774_ACEOF
7775
7776		    CFLAGS_DEBUG="-nologo -Zi -Od"
7777		    CFLAGS_OPTIMIZE="-nologo -Ox"
7778		    lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
7779		    lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
7780		    LINKBIN="\"${CEBINROOT}/link.exe\""
7781
7782		else
7783		    RC="rc"
7784		    lflags="-nologo"
7785    		    LINKBIN="link"
7786		    CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
7787		    CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
7788		fi
7789	    fi
7790
7791	    if test "$GCC" = "yes"; then
7792		# mingw gcc mode
7793		RC="windres"
7794		CFLAGS_DEBUG="-g"
7795		CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
7796		SHLIB_LD="$CC -shared"
7797		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
7798		LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
7799		LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
7800	    else
7801		SHLIB_LD="${LINKBIN} -dll ${lflags}"
7802		# link -lib only works when -lib is the first arg
7803		STLIB_LD="${LINKBIN} -lib ${lflags}"
7804		UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
7805		PATHTYPE=-w
7806		# For information on what debugtype is most useful, see:
7807		# http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
7808		# and also
7809		# http://msdn2.microsoft.com/en-us/library/y0zzbyt4%28VS.80%29.aspx
7810		# This essentially turns it all on.
7811		LDFLAGS_DEBUG="-debug -debugtype:cv"
7812		LDFLAGS_OPTIMIZE="-release"
7813		if test "$doWince" != "no" ; then
7814		    LDFLAGS_CONSOLE="-link ${lflags}"
7815		    LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
7816		else
7817		    LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
7818		    LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
7819		fi
7820	    fi
7821
7822	    SHLIB_SUFFIX=".dll"
7823	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
7824
7825	    TCL_LIB_VERSIONS_OK=nodots
7826    	    ;;
7827	AIX-*)
7828	    if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"; then
7829
7830		# AIX requires the _r compiler when gcc isn't being used
7831		case "${CC}" in
7832		    *_r|*_r\ *)
7833			# ok ...
7834			;;
7835		    *)
7836			# Make sure only first arg gets _r
7837		    	CC=`echo "$CC" | sed -e 's/^\([^ ]*\)/\1_r/'`
7838			;;
7839		esac
7840		{ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
7841echo "${ECHO_T}Using $CC for compiling with threads" >&6; }
7842
7843fi
7844
7845	    LIBS="$LIBS -lc"
7846	    SHLIB_CFLAGS=""
7847	    SHLIB_SUFFIX=".so"
7848
7849	    LD_LIBRARY_PATH_VAR="LIBPATH"
7850
7851	    # Check to enable 64-bit flags for compiler/linker
7852	    if test "$do64bit" = yes; then
7853
7854		if test "$GCC" = yes; then
7855
7856		    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
7857echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
7858
7859else
7860
7861		    do64bit_ok=yes
7862		    CFLAGS="$CFLAGS -q64"
7863		    LDFLAGS_ARCH="-q64"
7864		    RANLIB="${RANLIB} -X64"
7865		    AR="${AR} -X64"
7866		    SHLIB_LD_FLAGS="-b64"
7867
7868fi
7869
7870
7871fi
7872
7873
7874	    if test "`uname -m`" = ia64; then
7875
7876		# AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
7877		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
7878		if test "$GCC" = yes; then
7879
7880		    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
7881
7882else
7883
7884		    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
7885
7886fi
7887
7888		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
7889
7890else
7891
7892		if test "$GCC" = yes; then
7893
7894		    SHLIB_LD='${CC} -shared -Wl,-bexpall'
7895
7896else
7897
7898		    SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bexpall -H512 -T512 -bnoentry"
7899		    LDFLAGS="$LDFLAGS -brtl"
7900
7901fi
7902
7903		SHLIB_LD="${SHLIB_LD} ${SHLIB_LD_FLAGS}"
7904		CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
7905		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
7906
7907fi
7908
7909	    ;;
7910	BeOS*)
7911	    SHLIB_CFLAGS="-fPIC"
7912	    SHLIB_LD='${CC} -nostart'
7913	    SHLIB_SUFFIX=".so"
7914
7915	    #-----------------------------------------------------------
7916	    # Check for inet_ntoa in -lbind, for BeOS (which also needs
7917	    # -lsocket, even if the network functions are in -lnet which
7918	    # is always linked to, for compatibility.
7919	    #-----------------------------------------------------------
7920	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
7921echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6; }
7922if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
7923  echo $ECHO_N "(cached) $ECHO_C" >&6
7924else
7925  ac_check_lib_save_LIBS=$LIBS
7926LIBS="-lbind  $LIBS"
7927cat >conftest.$ac_ext <<_ACEOF
7928/* confdefs.h.  */
7929_ACEOF
7930cat confdefs.h >>conftest.$ac_ext
7931cat >>conftest.$ac_ext <<_ACEOF
7932/* end confdefs.h.  */
7933
7934/* Override any GCC internal prototype to avoid an error.
7935   Use char because int might match the return type of a GCC
7936   builtin and then its argument prototype would still apply.  */
7937#ifdef __cplusplus
7938extern "C"
7939#endif
7940char inet_ntoa ();
7941int
7942main ()
7943{
7944return inet_ntoa ();
7945  ;
7946  return 0;
7947}
7948_ACEOF
7949rm -f conftest.$ac_objext conftest$ac_exeext
7950if { (ac_try="$ac_link"
7951case "(($ac_try" in
7952  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7953  *) ac_try_echo=$ac_try;;
7954esac
7955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7956  (eval "$ac_link") 2>conftest.er1
7957  ac_status=$?
7958  grep -v '^ *+' conftest.er1 >conftest.err
7959  rm -f conftest.er1
7960  cat conftest.err >&5
7961  echo "$as_me:$LINENO: \$? = $ac_status" >&5
7962  (exit $ac_status); } && {
7963	 test -z "$ac_c_werror_flag" ||
7964	 test ! -s conftest.err
7965       } && test -s conftest$ac_exeext &&
7966       $as_test_x conftest$ac_exeext; then
7967  ac_cv_lib_bind_inet_ntoa=yes
7968else
7969  echo "$as_me: failed program was:" >&5
7970sed 's/^/| /' conftest.$ac_ext >&5
7971
7972	ac_cv_lib_bind_inet_ntoa=no
7973fi
7974
7975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7976      conftest$ac_exeext conftest.$ac_ext
7977LIBS=$ac_check_lib_save_LIBS
7978fi
7979{ echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
7980echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6; }
7981if test $ac_cv_lib_bind_inet_ntoa = yes; then
7982  LIBS="$LIBS -lbind -lsocket"
7983fi
7984
7985	    ;;
7986	BSD/OS-4.*)
7987	    SHLIB_CFLAGS="-export-dynamic -fPIC"
7988	    SHLIB_LD='${CC} -shared'
7989	    SHLIB_SUFFIX=".so"
7990	    LDFLAGS="$LDFLAGS -export-dynamic"
7991	    CC_SEARCH_FLAGS=""
7992	    LD_SEARCH_FLAGS=""
7993	    ;;
7994	CYGWIN_*)
7995	    SHLIB_CFLAGS=""
7996	    SHLIB_LD='${CC} -shared'
7997	    SHLIB_SUFFIX=".dll"
7998	    EXE_SUFFIX=".exe"
7999	    CC_SEARCH_FLAGS=""
8000	    LD_SEARCH_FLAGS=""
8001	    ;;
8002	Haiku*)
8003	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8004	    SHLIB_CFLAGS="-fPIC"
8005	    SHLIB_SUFFIX=".so"
8006	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
8007	    { echo "$as_me:$LINENO: checking for inet_ntoa in -lnetwork" >&5
8008echo $ECHO_N "checking for inet_ntoa in -lnetwork... $ECHO_C" >&6; }
8009if test "${ac_cv_lib_network_inet_ntoa+set}" = set; then
8010  echo $ECHO_N "(cached) $ECHO_C" >&6
8011else
8012  ac_check_lib_save_LIBS=$LIBS
8013LIBS="-lnetwork  $LIBS"
8014cat >conftest.$ac_ext <<_ACEOF
8015/* confdefs.h.  */
8016_ACEOF
8017cat confdefs.h >>conftest.$ac_ext
8018cat >>conftest.$ac_ext <<_ACEOF
8019/* end confdefs.h.  */
8020
8021/* Override any GCC internal prototype to avoid an error.
8022   Use char because int might match the return type of a GCC
8023   builtin and then its argument prototype would still apply.  */
8024#ifdef __cplusplus
8025extern "C"
8026#endif
8027char inet_ntoa ();
8028int
8029main ()
8030{
8031return inet_ntoa ();
8032  ;
8033  return 0;
8034}
8035_ACEOF
8036rm -f conftest.$ac_objext conftest$ac_exeext
8037if { (ac_try="$ac_link"
8038case "(($ac_try" in
8039  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8040  *) ac_try_echo=$ac_try;;
8041esac
8042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8043  (eval "$ac_link") 2>conftest.er1
8044  ac_status=$?
8045  grep -v '^ *+' conftest.er1 >conftest.err
8046  rm -f conftest.er1
8047  cat conftest.err >&5
8048  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8049  (exit $ac_status); } && {
8050	 test -z "$ac_c_werror_flag" ||
8051	 test ! -s conftest.err
8052       } && test -s conftest$ac_exeext &&
8053       $as_test_x conftest$ac_exeext; then
8054  ac_cv_lib_network_inet_ntoa=yes
8055else
8056  echo "$as_me: failed program was:" >&5
8057sed 's/^/| /' conftest.$ac_ext >&5
8058
8059	ac_cv_lib_network_inet_ntoa=no
8060fi
8061
8062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8063      conftest$ac_exeext conftest.$ac_ext
8064LIBS=$ac_check_lib_save_LIBS
8065fi
8066{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_inet_ntoa" >&5
8067echo "${ECHO_T}$ac_cv_lib_network_inet_ntoa" >&6; }
8068if test $ac_cv_lib_network_inet_ntoa = yes; then
8069  LIBS="$LIBS -lnetwork"
8070fi
8071
8072	    ;;
8073	HP-UX-*.11.*)
8074	    # Use updated header definitions where possible
8075
8076cat >>confdefs.h <<\_ACEOF
8077#define _XOPEN_SOURCE_EXTENDED 1
8078_ACEOF
8079
8080	    # TEA specific: Needed by Tcl, but not most extensions
8081	    #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
8082	    #LIBS="$LIBS -lxnet"               # Use the XOPEN network library
8083
8084	    if test "`uname -m`" = ia64; then
8085
8086		SHLIB_SUFFIX=".so"
8087		# Use newer C++ library for C++ extensions
8088		#if test "$GCC" != "yes" ; then
8089		#   CPPFLAGS="-AA"
8090		#fi
8091
8092else
8093
8094		SHLIB_SUFFIX=".sl"
8095
8096fi
8097
8098	    { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
8099echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
8100if test "${ac_cv_lib_dld_shl_load+set}" = set; then
8101  echo $ECHO_N "(cached) $ECHO_C" >&6
8102else
8103  ac_check_lib_save_LIBS=$LIBS
8104LIBS="-ldld  $LIBS"
8105cat >conftest.$ac_ext <<_ACEOF
8106/* confdefs.h.  */
8107_ACEOF
8108cat confdefs.h >>conftest.$ac_ext
8109cat >>conftest.$ac_ext <<_ACEOF
8110/* end confdefs.h.  */
8111
8112/* Override any GCC internal prototype to avoid an error.
8113   Use char because int might match the return type of a GCC
8114   builtin and then its argument prototype would still apply.  */
8115#ifdef __cplusplus
8116extern "C"
8117#endif
8118char shl_load ();
8119int
8120main ()
8121{
8122return shl_load ();
8123  ;
8124  return 0;
8125}
8126_ACEOF
8127rm -f conftest.$ac_objext conftest$ac_exeext
8128if { (ac_try="$ac_link"
8129case "(($ac_try" in
8130  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8131  *) ac_try_echo=$ac_try;;
8132esac
8133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8134  (eval "$ac_link") 2>conftest.er1
8135  ac_status=$?
8136  grep -v '^ *+' conftest.er1 >conftest.err
8137  rm -f conftest.er1
8138  cat conftest.err >&5
8139  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140  (exit $ac_status); } && {
8141	 test -z "$ac_c_werror_flag" ||
8142	 test ! -s conftest.err
8143       } && test -s conftest$ac_exeext &&
8144       $as_test_x conftest$ac_exeext; then
8145  ac_cv_lib_dld_shl_load=yes
8146else
8147  echo "$as_me: failed program was:" >&5
8148sed 's/^/| /' conftest.$ac_ext >&5
8149
8150	ac_cv_lib_dld_shl_load=no
8151fi
8152
8153rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8154      conftest$ac_exeext conftest.$ac_ext
8155LIBS=$ac_check_lib_save_LIBS
8156fi
8157{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
8158echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
8159if test $ac_cv_lib_dld_shl_load = yes; then
8160  tcl_ok=yes
8161else
8162  tcl_ok=no
8163fi
8164
8165	    if test "$tcl_ok" = yes; then
8166
8167		LDFLAGS="$LDFLAGS -E"
8168		CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
8169		LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
8170		LD_LIBRARY_PATH_VAR="SHLIB_PATH"
8171
8172fi
8173
8174	    if test "$GCC" = yes; then
8175
8176		SHLIB_LD='${CC} -shared'
8177		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8178
8179else
8180
8181		CFLAGS="$CFLAGS -z"
8182		# Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
8183		#CFLAGS="$CFLAGS +DAportable"
8184		SHLIB_CFLAGS="+z"
8185		SHLIB_LD="ld -b"
8186
8187fi
8188
8189
8190	    # Check to enable 64-bit flags for compiler/linker
8191	    if test "$do64bit" = "yes"; then
8192
8193		if test "$GCC" = yes; then
8194
8195		    case `${CC} -dumpmachine` in
8196			hppa64*)
8197			    # 64-bit gcc in use.  Fix flags for GNU ld.
8198			    do64bit_ok=yes
8199			    SHLIB_LD='${CC} -shared'
8200			    if test $doRpath = yes; then
8201
8202				CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8203fi
8204
8205			    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8206			    ;;
8207			*)
8208			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
8209echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
8210			    ;;
8211		    esac
8212
8213else
8214
8215		    do64bit_ok=yes
8216		    CFLAGS="$CFLAGS +DD64"
8217		    LDFLAGS_ARCH="+DD64"
8218
8219fi
8220
8221
8222fi
8223 ;;
8224	IRIX-6.*)
8225	    SHLIB_CFLAGS=""
8226	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8227	    SHLIB_SUFFIX=".so"
8228	    if test $doRpath = yes; then
8229
8230		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8231		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8232fi
8233
8234	    if test "$GCC" = yes; then
8235
8236		CFLAGS="$CFLAGS -mabi=n32"
8237		LDFLAGS="$LDFLAGS -mabi=n32"
8238
8239else
8240
8241		case $system in
8242		    IRIX-6.3)
8243			# Use to build 6.2 compatible binaries on 6.3.
8244			CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
8245			;;
8246		    *)
8247			CFLAGS="$CFLAGS -n32"
8248			;;
8249		esac
8250		LDFLAGS="$LDFLAGS -n32"
8251
8252fi
8253
8254	    ;;
8255	IRIX64-6.*)
8256	    SHLIB_CFLAGS=""
8257	    SHLIB_LD="ld -n32 -shared -rdata_shared"
8258	    SHLIB_SUFFIX=".so"
8259	    if test $doRpath = yes; then
8260
8261		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8262		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8263fi
8264
8265
8266	    # Check to enable 64-bit flags for compiler/linker
8267
8268	    if test "$do64bit" = yes; then
8269
8270	        if test "$GCC" = yes; then
8271
8272	            { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
8273echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
8274
8275else
8276
8277	            do64bit_ok=yes
8278	            SHLIB_LD="ld -64 -shared -rdata_shared"
8279	            CFLAGS="$CFLAGS -64"
8280	            LDFLAGS_ARCH="-64"
8281
8282fi
8283
8284
8285fi
8286
8287	    ;;
8288	Linux*)
8289	    SHLIB_CFLAGS="-fPIC"
8290	    SHLIB_SUFFIX=".so"
8291
8292	    # TEA specific:
8293	    CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
8294
8295	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8296	    SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS_DEFAULT}'
8297	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8298	    if test $doRpath = yes; then
8299
8300		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8301fi
8302
8303	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8304	    if test "`uname -m`" = "alpha"; then
8305  CFLAGS="$CFLAGS -mieee"
8306fi
8307
8308	    if test $do64bit = yes; then
8309
8310		{ echo "$as_me:$LINENO: checking if compiler accepts -m64 flag" >&5
8311echo $ECHO_N "checking if compiler accepts -m64 flag... $ECHO_C" >&6; }
8312if test "${tcl_cv_cc_m64+set}" = set; then
8313  echo $ECHO_N "(cached) $ECHO_C" >&6
8314else
8315
8316		    hold_cflags=$CFLAGS
8317		    CFLAGS="$CFLAGS -m64"
8318		    cat >conftest.$ac_ext <<_ACEOF
8319/* confdefs.h.  */
8320_ACEOF
8321cat confdefs.h >>conftest.$ac_ext
8322cat >>conftest.$ac_ext <<_ACEOF
8323/* end confdefs.h.  */
8324
8325int
8326main ()
8327{
8328
8329  ;
8330  return 0;
8331}
8332_ACEOF
8333rm -f conftest.$ac_objext conftest$ac_exeext
8334if { (ac_try="$ac_link"
8335case "(($ac_try" in
8336  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8337  *) ac_try_echo=$ac_try;;
8338esac
8339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8340  (eval "$ac_link") 2>conftest.er1
8341  ac_status=$?
8342  grep -v '^ *+' conftest.er1 >conftest.err
8343  rm -f conftest.er1
8344  cat conftest.err >&5
8345  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8346  (exit $ac_status); } && {
8347	 test -z "$ac_c_werror_flag" ||
8348	 test ! -s conftest.err
8349       } && test -s conftest$ac_exeext &&
8350       $as_test_x conftest$ac_exeext; then
8351  tcl_cv_cc_m64=yes
8352else
8353  echo "$as_me: failed program was:" >&5
8354sed 's/^/| /' conftest.$ac_ext >&5
8355
8356	tcl_cv_cc_m64=no
8357fi
8358
8359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8360      conftest$ac_exeext conftest.$ac_ext
8361		    CFLAGS=$hold_cflags
8362fi
8363{ echo "$as_me:$LINENO: result: $tcl_cv_cc_m64" >&5
8364echo "${ECHO_T}$tcl_cv_cc_m64" >&6; }
8365		if test $tcl_cv_cc_m64 = yes; then
8366
8367		    CFLAGS="$CFLAGS -m64"
8368		    do64bit_ok=yes
8369
8370fi
8371
8372
8373fi
8374
8375
8376	    # The combo of gcc + glibc has a bug related to inlining of
8377	    # functions like strtod(). The -fno-builtin flag should address
8378	    # this problem but it does not work. The -fno-inline flag is kind
8379	    # of overkill but it works. Disable inlining only when one of the
8380	    # files in compat/*.c is being linked in.
8381
8382	    if test x"${USE_COMPAT}" != x; then
8383  CFLAGS="$CFLAGS -fno-inline"
8384fi
8385
8386
8387	    ;;
8388	GNU*)
8389	    SHLIB_CFLAGS="-fPIC"
8390	    SHLIB_SUFFIX=".so"
8391
8392	    SHLIB_LD='${CC} -shared'
8393	    LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
8394	    CC_SEARCH_FLAGS=""
8395	    LD_SEARCH_FLAGS=""
8396	    if test "`uname -m`" = "alpha"; then
8397  CFLAGS="$CFLAGS -mieee"
8398fi
8399
8400	    ;;
8401	Lynx*)
8402	    SHLIB_CFLAGS="-fPIC"
8403	    SHLIB_SUFFIX=".so"
8404	    CFLAGS_OPTIMIZE=-02
8405	    SHLIB_LD='${CC} -shared'
8406	    LD_FLAGS="-Wl,--export-dynamic"
8407	    if test $doRpath = yes; then
8408
8409		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8410		LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8411fi
8412
8413	    ;;
8414	OpenBSD-*)
8415	    SHLIB_CFLAGS="-fPIC"
8416	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8417	    SHLIB_SUFFIX=".so"
8418	    if test $doRpath = yes; then
8419
8420		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8421fi
8422
8423	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8424	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}'
8425	    { echo "$as_me:$LINENO: checking for ELF" >&5
8426echo $ECHO_N "checking for ELF... $ECHO_C" >&6; }
8427if test "${tcl_cv_ld_elf+set}" = set; then
8428  echo $ECHO_N "(cached) $ECHO_C" >&6
8429else
8430
8431		cat >conftest.$ac_ext <<_ACEOF
8432/* confdefs.h.  */
8433_ACEOF
8434cat confdefs.h >>conftest.$ac_ext
8435cat >>conftest.$ac_ext <<_ACEOF
8436/* end confdefs.h.  */
8437
8438#ifdef __ELF__
8439	yes
8440#endif
8441
8442_ACEOF
8443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8444  $EGREP "yes" >/dev/null 2>&1; then
8445  tcl_cv_ld_elf=yes
8446else
8447  tcl_cv_ld_elf=no
8448fi
8449rm -f -r conftest*
8450
8451fi
8452{ echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
8453echo "${ECHO_T}$tcl_cv_ld_elf" >&6; }
8454	    if test $tcl_cv_ld_elf = yes; then
8455
8456		LDFLAGS=-Wl,-export-dynamic
8457
8458else
8459  LDFLAGS=""
8460fi
8461
8462	    if test "${TCL_THREADS}" = "1"; then
8463
8464		# OpenBSD builds and links with -pthread, never -lpthread.
8465		LIBS=`echo $LIBS | sed s/-lpthread//`
8466		CFLAGS="$CFLAGS -pthread"
8467		SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread"
8468
8469fi
8470
8471	    # OpenBSD doesn't do version numbers with dots.
8472	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8473	    TCL_LIB_VERSIONS_OK=nodots
8474	    ;;
8475	NetBSD-*|FreeBSD-[3-4].*)
8476	    # FreeBSD 3.* and greater have ELF.
8477	    # NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
8478	    SHLIB_CFLAGS="-fPIC"
8479	    SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}'
8480	    SHLIB_SUFFIX=".so"
8481	    LDFLAGS="$LDFLAGS -export-dynamic"
8482	    if test $doRpath = yes; then
8483
8484		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8485fi
8486
8487	    LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
8488	    if test "${TCL_THREADS}" = "1"; then
8489
8490		# The -pthread needs to go in the CFLAGS, not LIBS
8491		LIBS=`echo $LIBS | sed s/-pthread//`
8492		CFLAGS="$CFLAGS -pthread"
8493	    	LDFLAGS="$LDFLAGS -pthread"
8494
8495fi
8496
8497	    case $system in
8498	    FreeBSD-3.*)
8499	    	# FreeBSD-3 doesn't handle version numbers with dots.
8500	    	UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8501	    	SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
8502	    	TCL_LIB_VERSIONS_OK=nodots
8503		;;
8504	    esac
8505	    ;;
8506	FreeBSD-*)
8507	    # This configuration from FreeBSD Ports.
8508	    SHLIB_CFLAGS="-fPIC"
8509	    SHLIB_LD="${CC} -shared"
8510	    TCL_SHLIB_LD_EXTRAS="-soname \$@"
8511	    SHLIB_SUFFIX=".so"
8512	    LDFLAGS=""
8513	    if test $doRpath = yes; then
8514
8515		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
8516		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
8517fi
8518
8519	    if test "${TCL_THREADS}" = "1"; then
8520
8521		# The -pthread needs to go in the LDFLAGS, not LIBS
8522		LIBS=`echo $LIBS | sed s/-pthread//`
8523		CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
8524		LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
8525fi
8526
8527	    # Version numbers are dot-stripped by system policy.
8528	    TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
8529	    UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
8530	    SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
8531	    TCL_LIB_VERSIONS_OK=nodots
8532	    ;;
8533	Darwin-*)
8534	    CFLAGS_OPTIMIZE="-Os"
8535	    SHLIB_CFLAGS="-fno-common"
8536	    # To avoid discrepancies between what headers configure sees during
8537	    # preprocessing tests and compiling tests, move any -isysroot and
8538	    # -mmacosx-version-min flags from CFLAGS to CPPFLAGS:
8539	    CPPFLAGS="${CPPFLAGS} `echo " ${CFLAGS}" | \
8540		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8541		if ($i~/^(isysroot|mmacosx-version-min)/) print "-"$i}'`"
8542	    CFLAGS="`echo " ${CFLAGS}" | \
8543		awk 'BEGIN {FS=" +-";ORS=" "}; {for (i=2;i<=NF;i++) \
8544		if (!($i~/^(isysroot|mmacosx-version-min)/)) print "-"$i}'`"
8545	    if test $do64bit = yes; then
8546
8547		case `arch` in
8548		    ppc)
8549			{ echo "$as_me:$LINENO: checking if compiler accepts -arch ppc64 flag" >&5
8550echo $ECHO_N "checking if compiler accepts -arch ppc64 flag... $ECHO_C" >&6; }
8551if test "${tcl_cv_cc_arch_ppc64+set}" = set; then
8552  echo $ECHO_N "(cached) $ECHO_C" >&6
8553else
8554
8555			    hold_cflags=$CFLAGS
8556			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8557			    cat >conftest.$ac_ext <<_ACEOF
8558/* confdefs.h.  */
8559_ACEOF
8560cat confdefs.h >>conftest.$ac_ext
8561cat >>conftest.$ac_ext <<_ACEOF
8562/* end confdefs.h.  */
8563
8564int
8565main ()
8566{
8567
8568  ;
8569  return 0;
8570}
8571_ACEOF
8572rm -f conftest.$ac_objext conftest$ac_exeext
8573if { (ac_try="$ac_link"
8574case "(($ac_try" in
8575  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8576  *) ac_try_echo=$ac_try;;
8577esac
8578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8579  (eval "$ac_link") 2>conftest.er1
8580  ac_status=$?
8581  grep -v '^ *+' conftest.er1 >conftest.err
8582  rm -f conftest.er1
8583  cat conftest.err >&5
8584  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8585  (exit $ac_status); } && {
8586	 test -z "$ac_c_werror_flag" ||
8587	 test ! -s conftest.err
8588       } && test -s conftest$ac_exeext &&
8589       $as_test_x conftest$ac_exeext; then
8590  tcl_cv_cc_arch_ppc64=yes
8591else
8592  echo "$as_me: failed program was:" >&5
8593sed 's/^/| /' conftest.$ac_ext >&5
8594
8595	tcl_cv_cc_arch_ppc64=no
8596fi
8597
8598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8599      conftest$ac_exeext conftest.$ac_ext
8600			    CFLAGS=$hold_cflags
8601fi
8602{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_ppc64" >&5
8603echo "${ECHO_T}$tcl_cv_cc_arch_ppc64" >&6; }
8604			if test $tcl_cv_cc_arch_ppc64 = yes; then
8605
8606			    CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5"
8607			    do64bit_ok=yes
8608
8609fi
8610;;
8611		    i386)
8612			{ echo "$as_me:$LINENO: checking if compiler accepts -arch x86_64 flag" >&5
8613echo $ECHO_N "checking if compiler accepts -arch x86_64 flag... $ECHO_C" >&6; }
8614if test "${tcl_cv_cc_arch_x86_64+set}" = set; then
8615  echo $ECHO_N "(cached) $ECHO_C" >&6
8616else
8617
8618			    hold_cflags=$CFLAGS
8619			    CFLAGS="$CFLAGS -arch x86_64"
8620			    cat >conftest.$ac_ext <<_ACEOF
8621/* confdefs.h.  */
8622_ACEOF
8623cat confdefs.h >>conftest.$ac_ext
8624cat >>conftest.$ac_ext <<_ACEOF
8625/* end confdefs.h.  */
8626
8627int
8628main ()
8629{
8630
8631  ;
8632  return 0;
8633}
8634_ACEOF
8635rm -f conftest.$ac_objext conftest$ac_exeext
8636if { (ac_try="$ac_link"
8637case "(($ac_try" in
8638  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8639  *) ac_try_echo=$ac_try;;
8640esac
8641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8642  (eval "$ac_link") 2>conftest.er1
8643  ac_status=$?
8644  grep -v '^ *+' conftest.er1 >conftest.err
8645  rm -f conftest.er1
8646  cat conftest.err >&5
8647  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8648  (exit $ac_status); } && {
8649	 test -z "$ac_c_werror_flag" ||
8650	 test ! -s conftest.err
8651       } && test -s conftest$ac_exeext &&
8652       $as_test_x conftest$ac_exeext; then
8653  tcl_cv_cc_arch_x86_64=yes
8654else
8655  echo "$as_me: failed program was:" >&5
8656sed 's/^/| /' conftest.$ac_ext >&5
8657
8658	tcl_cv_cc_arch_x86_64=no
8659fi
8660
8661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8662      conftest$ac_exeext conftest.$ac_ext
8663			    CFLAGS=$hold_cflags
8664fi
8665{ echo "$as_me:$LINENO: result: $tcl_cv_cc_arch_x86_64" >&5
8666echo "${ECHO_T}$tcl_cv_cc_arch_x86_64" >&6; }
8667			if test $tcl_cv_cc_arch_x86_64 = yes; then
8668
8669			    CFLAGS="$CFLAGS -arch x86_64"
8670			    do64bit_ok=yes
8671
8672fi
8673;;
8674		    *)
8675			{ echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
8676echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;};;
8677		esac
8678
8679else
8680
8681		# Check for combined 32-bit and 64-bit fat build
8682		if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64) ' \
8683		    && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '; then
8684
8685		    fat_32_64=yes
8686fi
8687
8688
8689fi
8690
8691	    # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
8692	    SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
8693	    { echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
8694echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6; }
8695if test "${tcl_cv_ld_single_module+set}" = set; then
8696  echo $ECHO_N "(cached) $ECHO_C" >&6
8697else
8698
8699		hold_ldflags=$LDFLAGS
8700		LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
8701		cat >conftest.$ac_ext <<_ACEOF
8702/* confdefs.h.  */
8703_ACEOF
8704cat confdefs.h >>conftest.$ac_ext
8705cat >>conftest.$ac_ext <<_ACEOF
8706/* end confdefs.h.  */
8707
8708int
8709main ()
8710{
8711int i;
8712  ;
8713  return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext conftest$ac_exeext
8717if { (ac_try="$ac_link"
8718case "(($ac_try" in
8719  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8720  *) ac_try_echo=$ac_try;;
8721esac
8722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8723  (eval "$ac_link") 2>conftest.er1
8724  ac_status=$?
8725  grep -v '^ *+' conftest.er1 >conftest.err
8726  rm -f conftest.er1
8727  cat conftest.err >&5
8728  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8729  (exit $ac_status); } && {
8730	 test -z "$ac_c_werror_flag" ||
8731	 test ! -s conftest.err
8732       } && test -s conftest$ac_exeext &&
8733       $as_test_x conftest$ac_exeext; then
8734  tcl_cv_ld_single_module=yes
8735else
8736  echo "$as_me: failed program was:" >&5
8737sed 's/^/| /' conftest.$ac_ext >&5
8738
8739	tcl_cv_ld_single_module=no
8740fi
8741
8742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8743      conftest$ac_exeext conftest.$ac_ext
8744		LDFLAGS=$hold_ldflags
8745fi
8746{ echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
8747echo "${ECHO_T}$tcl_cv_ld_single_module" >&6; }
8748	    if test $tcl_cv_ld_single_module = yes; then
8749
8750		SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
8751
8752fi
8753
8754	    # TEA specific: link shlib with current and compatiblity version flags
8755	    vers=`echo ${PACKAGE_VERSION} | sed -e 's/^\([0-9]\{1,5\}\)\(\(\.[0-9]\{1,3\}\)\{0,2\}\).*$/\1\2/p' -e d`
8756	    SHLIB_LD="${SHLIB_LD} -current_version ${vers:-0} -compatibility_version ${vers:-0}"
8757	    SHLIB_SUFFIX=".dylib"
8758	    # Don't use -prebind when building for Mac OS X 10.4 or later only:
8759	    if test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
8760		"`echo "${CPPFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4; then
8761
8762		LDFLAGS="$LDFLAGS -prebind"
8763fi
8764
8765	    LDFLAGS="$LDFLAGS -headerpad_max_install_names"
8766	    { echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
8767echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6; }
8768if test "${tcl_cv_ld_search_paths_first+set}" = set; then
8769  echo $ECHO_N "(cached) $ECHO_C" >&6
8770else
8771
8772		hold_ldflags=$LDFLAGS
8773		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8774		cat >conftest.$ac_ext <<_ACEOF
8775/* confdefs.h.  */
8776_ACEOF
8777cat confdefs.h >>conftest.$ac_ext
8778cat >>conftest.$ac_ext <<_ACEOF
8779/* end confdefs.h.  */
8780
8781int
8782main ()
8783{
8784int i;
8785  ;
8786  return 0;
8787}
8788_ACEOF
8789rm -f conftest.$ac_objext conftest$ac_exeext
8790if { (ac_try="$ac_link"
8791case "(($ac_try" in
8792  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8793  *) ac_try_echo=$ac_try;;
8794esac
8795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8796  (eval "$ac_link") 2>conftest.er1
8797  ac_status=$?
8798  grep -v '^ *+' conftest.er1 >conftest.err
8799  rm -f conftest.er1
8800  cat conftest.err >&5
8801  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8802  (exit $ac_status); } && {
8803	 test -z "$ac_c_werror_flag" ||
8804	 test ! -s conftest.err
8805       } && test -s conftest$ac_exeext &&
8806       $as_test_x conftest$ac_exeext; then
8807  tcl_cv_ld_search_paths_first=yes
8808else
8809  echo "$as_me: failed program was:" >&5
8810sed 's/^/| /' conftest.$ac_ext >&5
8811
8812	tcl_cv_ld_search_paths_first=no
8813fi
8814
8815rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8816      conftest$ac_exeext conftest.$ac_ext
8817		LDFLAGS=$hold_ldflags
8818fi
8819{ echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
8820echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6; }
8821	    if test $tcl_cv_ld_search_paths_first = yes; then
8822
8823		LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
8824
8825fi
8826
8827	    if test "$tcl_cv_cc_visibility_hidden" != yes; then
8828
8829
8830cat >>confdefs.h <<\_ACEOF
8831#define MODULE_SCOPE __private_extern__
8832_ACEOF
8833
8834		tcl_cv_cc_visibility_hidden=yes
8835
8836fi
8837
8838	    CC_SEARCH_FLAGS=""
8839	    LD_SEARCH_FLAGS=""
8840	    LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
8841	    # TEA specific: for combined 32 & 64 bit fat builds of Tk
8842	    # extensions, verify that 64-bit build is possible.
8843	    if test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}"; then
8844
8845		if test "${TEA_WINDOWINGSYSTEM}" = x11; then
8846
8847		    { echo "$as_me:$LINENO: checking for 64-bit X11" >&5
8848echo $ECHO_N "checking for 64-bit X11... $ECHO_C" >&6; }
8849if test "${tcl_cv_lib_x11_64+set}" = set; then
8850  echo $ECHO_N "(cached) $ECHO_C" >&6
8851else
8852
8853			for v in CFLAGS CPPFLAGS LDFLAGS; do
8854			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8855			done
8856			CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
8857			LDFLAGS="$LDFLAGS -L/usr/X11R6/lib -lX11"
8858			cat >conftest.$ac_ext <<_ACEOF
8859/* confdefs.h.  */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h.  */
8864#include <X11/Xlib.h>
8865int
8866main ()
8867{
8868XrmInitialize();
8869  ;
8870  return 0;
8871}
8872_ACEOF
8873rm -f conftest.$ac_objext conftest$ac_exeext
8874if { (ac_try="$ac_link"
8875case "(($ac_try" in
8876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8877  *) ac_try_echo=$ac_try;;
8878esac
8879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8880  (eval "$ac_link") 2>conftest.er1
8881  ac_status=$?
8882  grep -v '^ *+' conftest.er1 >conftest.err
8883  rm -f conftest.er1
8884  cat conftest.err >&5
8885  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886  (exit $ac_status); } && {
8887	 test -z "$ac_c_werror_flag" ||
8888	 test ! -s conftest.err
8889       } && test -s conftest$ac_exeext &&
8890       $as_test_x conftest$ac_exeext; then
8891  tcl_cv_lib_x11_64=yes
8892else
8893  echo "$as_me: failed program was:" >&5
8894sed 's/^/| /' conftest.$ac_ext >&5
8895
8896	tcl_cv_lib_x11_64=no
8897fi
8898
8899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8900      conftest$ac_exeext conftest.$ac_ext
8901			for v in CFLAGS CPPFLAGS LDFLAGS; do
8902			    eval $v'="$hold_'$v'"'
8903			done
8904fi
8905{ echo "$as_me:$LINENO: result: $tcl_cv_lib_x11_64" >&5
8906echo "${ECHO_T}$tcl_cv_lib_x11_64" >&6; }
8907
8908fi
8909
8910		if test "${TEA_WINDOWINGSYSTEM}" = aqua; then
8911
8912		    { echo "$as_me:$LINENO: checking for 64-bit Tk" >&5
8913echo $ECHO_N "checking for 64-bit Tk... $ECHO_C" >&6; }
8914if test "${tcl_cv_lib_tk_64+set}" = set; then
8915  echo $ECHO_N "(cached) $ECHO_C" >&6
8916else
8917
8918			for v in CFLAGS CPPFLAGS LDFLAGS; do
8919			    eval 'hold_'$v'="$'$v'";'$v'="`echo "$'$v' "|sed -e "s/-arch ppc / /g" -e "s/-arch i386 / /g"`"'
8920			done
8921			CPPFLAGS="$CPPFLAGS -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 `eval "echo ${TCL_INCLUDES} ${TK_INCLUDES}"`"
8922			LDFLAGS="$LDFLAGS ${TCL_STUB_LIB_SPEC} ${TK_STUB_LIB_SPEC}"
8923			cat >conftest.$ac_ext <<_ACEOF
8924/* confdefs.h.  */
8925_ACEOF
8926cat confdefs.h >>conftest.$ac_ext
8927cat >>conftest.$ac_ext <<_ACEOF
8928/* end confdefs.h.  */
8929#include <tk.h>
8930int
8931main ()
8932{
8933Tk_InitStubs(NULL, "", 0);
8934  ;
8935  return 0;
8936}
8937_ACEOF
8938rm -f conftest.$ac_objext conftest$ac_exeext
8939if { (ac_try="$ac_link"
8940case "(($ac_try" in
8941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8942  *) ac_try_echo=$ac_try;;
8943esac
8944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8945  (eval "$ac_link") 2>conftest.er1
8946  ac_status=$?
8947  grep -v '^ *+' conftest.er1 >conftest.err
8948  rm -f conftest.er1
8949  cat conftest.err >&5
8950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
8951  (exit $ac_status); } && {
8952	 test -z "$ac_c_werror_flag" ||
8953	 test ! -s conftest.err
8954       } && test -s conftest$ac_exeext &&
8955       $as_test_x conftest$ac_exeext; then
8956  tcl_cv_lib_tk_64=yes
8957else
8958  echo "$as_me: failed program was:" >&5
8959sed 's/^/| /' conftest.$ac_ext >&5
8960
8961	tcl_cv_lib_tk_64=no
8962fi
8963
8964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8965      conftest$ac_exeext conftest.$ac_ext
8966			for v in CFLAGS CPPFLAGS LDFLAGS; do
8967			    eval $v'="$hold_'$v'"'
8968			done
8969fi
8970{ echo "$as_me:$LINENO: result: $tcl_cv_lib_tk_64" >&5
8971echo "${ECHO_T}$tcl_cv_lib_tk_64" >&6; }
8972
8973fi
8974
8975		# remove 64-bit arch flags from CFLAGS et al. if configuration
8976		# does not support 64-bit.
8977		if test "$tcl_cv_lib_tk_64" = no -o "$tcl_cv_lib_x11_64" = no; then
8978
8979		    { echo "$as_me:$LINENO: Removing 64-bit architectures from compiler & linker flags" >&5
8980echo "$as_me: Removing 64-bit architectures from compiler & linker flags" >&6;}
8981		    for v in CFLAGS CPPFLAGS LDFLAGS; do
8982			eval $v'="`echo "$'$v' "|sed -e "s/-arch ppc64 / /g" -e "s/-arch x86_64 / /g"`"'
8983		    done
8984fi
8985
8986
8987fi
8988
8989	    ;;
8990	OS/390-*)
8991	    CFLAGS_OPTIMIZE=""		# Optimizer is buggy
8992
8993cat >>confdefs.h <<\_ACEOF
8994#define _OE_SOCKETS 1
8995_ACEOF
8996
8997	    ;;
8998	OSF1-V*)
8999	    # Digital OSF/1
9000	    SHLIB_CFLAGS=""
9001	    if test "$SHARED_BUILD" = 1; then
9002
9003	        SHLIB_LD='ld -shared -expect_unresolved "*"'
9004
9005else
9006
9007	        SHLIB_LD='ld -non_shared -expect_unresolved "*"'
9008
9009fi
9010
9011	    SHLIB_SUFFIX=".so"
9012	    if test $doRpath = yes; then
9013
9014		CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
9015		LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
9016fi
9017
9018	    if test "$GCC" = yes; then
9019  CFLAGS="$CFLAGS -mieee"
9020else
9021
9022		CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
9023fi
9024
9025	    # see pthread_intro(3) for pthread support on osf1, k.furukawa
9026	    if test "${TCL_THREADS}" = 1; then
9027
9028		CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
9029		CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
9030		LIBS=`echo $LIBS | sed s/-lpthreads//`
9031		if test "$GCC" = yes; then
9032
9033		    LIBS="$LIBS -lpthread -lmach -lexc"
9034
9035else
9036
9037		    CFLAGS="$CFLAGS -pthread"
9038		    LDFLAGS="$LDFLAGS -pthread"
9039
9040fi
9041
9042
9043fi
9044
9045	    ;;
9046	QNX-6*)
9047	    # QNX RTP
9048	    # This may work for all QNX, but it was only reported for v6.
9049	    SHLIB_CFLAGS="-fPIC"
9050	    SHLIB_LD="ld -Bshareable -x"
9051	    SHLIB_LD_LIBS=""
9052	    SHLIB_SUFFIX=".so"
9053	    CC_SEARCH_FLAGS=""
9054	    LD_SEARCH_FLAGS=""
9055	    ;;
9056	SCO_SV-3.2*)
9057	    if test "$GCC" = yes; then
9058
9059		SHLIB_CFLAGS="-fPIC -melf"
9060		LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
9061
9062else
9063
9064	       SHLIB_CFLAGS="-Kpic -belf"
9065	       LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
9066
9067fi
9068
9069	    SHLIB_LD="ld -G"
9070	    SHLIB_LD_LIBS=""
9071	    SHLIB_SUFFIX=".so"
9072	    CC_SEARCH_FLAGS=""
9073	    LD_SEARCH_FLAGS=""
9074	    ;;
9075	SunOS-5.[0-6])
9076	    # Careful to not let 5.10+ fall into this case
9077
9078	    # Note: If _REENTRANT isn't defined, then Solaris
9079	    # won't define thread-safe library routines.
9080
9081
9082cat >>confdefs.h <<\_ACEOF
9083#define _REENTRANT 1
9084_ACEOF
9085
9086
9087cat >>confdefs.h <<\_ACEOF
9088#define _POSIX_PTHREAD_SEMANTICS 1
9089_ACEOF
9090
9091
9092	    SHLIB_CFLAGS="-KPIC"
9093	    SHLIB_SUFFIX=".so"
9094	    if test "$GCC" = yes; then
9095
9096		SHLIB_LD='${CC} -shared'
9097		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9098		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9099
9100else
9101
9102		SHLIB_LD="/usr/ccs/bin/ld -G -z text"
9103		CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9104		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9105
9106fi
9107
9108	    ;;
9109	SunOS-5*)
9110	    # Note: If _REENTRANT isn't defined, then Solaris
9111	    # won't define thread-safe library routines.
9112
9113
9114cat >>confdefs.h <<\_ACEOF
9115#define _REENTRANT 1
9116_ACEOF
9117
9118
9119cat >>confdefs.h <<\_ACEOF
9120#define _POSIX_PTHREAD_SEMANTICS 1
9121_ACEOF
9122
9123
9124	    SHLIB_CFLAGS="-KPIC"
9125
9126	    # Check to enable 64-bit flags for compiler/linker
9127	    if test "$do64bit" = yes; then
9128
9129		arch=`isainfo`
9130		if test "$arch" = "sparcv9 sparc"; then
9131
9132		    if test "$GCC" = yes; then
9133
9134			if test "`${CC} -dumpversion | awk -F. '{print $1}'`" -lt 3; then
9135
9136			    { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
9137echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
9138
9139else
9140
9141			    do64bit_ok=yes
9142			    CFLAGS="$CFLAGS -m64 -mcpu=v9"
9143			    LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
9144			    SHLIB_CFLAGS="-fPIC"
9145
9146fi
9147
9148
9149else
9150
9151			do64bit_ok=yes
9152			if test "$do64bitVIS" = yes; then
9153
9154			    CFLAGS="$CFLAGS -xarch=v9a"
9155			    LDFLAGS_ARCH="-xarch=v9a"
9156
9157else
9158
9159			    CFLAGS="$CFLAGS -xarch=v9"
9160			    LDFLAGS_ARCH="-xarch=v9"
9161
9162fi
9163
9164			# Solaris 64 uses this as well
9165			#LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
9166
9167fi
9168
9169
9170else
9171  if test "$arch" = "amd64 i386"; then
9172
9173		    if test "$GCC" = yes; then
9174
9175			case $system in
9176			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9177				do64bit_ok=yes
9178				CFLAGS="$CFLAGS -m64"
9179				LDFLAGS="$LDFLAGS -m64";;
9180			    *)
9181				{ echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
9182echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;};;
9183			esac
9184
9185else
9186
9187			do64bit_ok=yes
9188			case $system in
9189			    SunOS-5.1[1-9]*|SunOS-5.[2-9][0-9]*)
9190				CFLAGS="$CFLAGS -m64"
9191				LDFLAGS="$LDFLAGS -m64";;
9192			    *)
9193				CFLAGS="$CFLAGS -xarch=amd64"
9194				LDFLAGS="$LDFLAGS -xarch=amd64";;
9195			esac
9196
9197fi
9198
9199
9200else
9201  { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
9202echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
9203fi
9204
9205fi
9206
9207
9208fi
9209
9210
9211	    SHLIB_SUFFIX=".so"
9212	    if test "$GCC" = yes; then
9213
9214		SHLIB_LD='${CC} -shared'
9215		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9216		LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
9217		if test "$do64bit_ok" = yes; then
9218
9219		    if test "$arch" = "sparcv9 sparc"; then
9220
9221			# We need to specify -static-libgcc or we need to
9222			# add the path to the sparv9 libgcc.
9223			# JH: static-libgcc is necessary for core Tcl, but may
9224			# not be necessary for extensions.
9225			SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
9226			# for finding sparcv9 libgcc, get the regular libgcc
9227			# path, remove so name and append 'sparcv9'
9228			#v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
9229			#CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
9230
9231else
9232  if test "$arch" = "amd64 i386"; then
9233
9234			# JH: static-libgcc is necessary for core Tcl, but may
9235			# not be necessary for extensions.
9236			SHLIB_LD="$SHLIB_LD -m64 -static-libgcc"
9237
9238fi
9239
9240fi
9241
9242
9243fi
9244
9245
9246else
9247
9248		case $system in
9249		    SunOS-5.[1-9][0-9]*)
9250			# TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS
9251			SHLIB_LD='${CC} -G -z text ${LDFLAGS_DEFAULT}';;
9252		    *)
9253			SHLIB_LD='/usr/ccs/bin/ld -G -z text';;
9254		esac
9255		CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
9256		LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
9257
9258fi
9259
9260	    ;;
9261    esac
9262
9263    if test "$do64bit" = yes -a "$do64bit_ok" = no; then
9264
9265	{ echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
9266echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
9267
9268fi
9269
9270
9271
9272
9273    # Add in the arch flags late to ensure it wasn't removed.
9274    # Not necessary in TEA, but this is aligned with core
9275    LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
9276
9277    # If we're running gcc, then change the C flags for compiling shared
9278    # libraries to the right flags for gcc, instead of those for the
9279    # standard manufacturer compiler.
9280
9281    if test "$GCC" = yes; then
9282
9283	case $system in
9284	    AIX-*) ;;
9285	    BSD/OS*) ;;
9286	    CYGWIN_*) ;;
9287	    IRIX*) ;;
9288	    NetBSD-*|FreeBSD-*|OpenBSD-*) ;;
9289	    Darwin-*) ;;
9290	    SCO_SV-3.2*) ;;
9291	    windows) ;;
9292	    *) SHLIB_CFLAGS="-fPIC" ;;
9293	esac
9294fi
9295
9296
9297    if test "$tcl_cv_cc_visibility_hidden" != yes; then
9298
9299
9300cat >>confdefs.h <<\_ACEOF
9301#define MODULE_SCOPE extern
9302_ACEOF
9303
9304
9305cat >>confdefs.h <<\_ACEOF
9306#define NO_VIZ
9307_ACEOF
9308
9309
9310fi
9311
9312
9313    if test "$SHARED_LIB_SUFFIX" = ""; then
9314
9315	# TEA specific: use PACKAGE_VERSION instead of VERSION
9316	SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
9317fi
9318
9319    if test "$UNSHARED_LIB_SUFFIX" = ""; then
9320
9321	# TEA specific: use PACKAGE_VERSION instead of VERSION
9322	UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
9323fi
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338    # These must be called after we do the basic CFLAGS checks and
9339    # verify any possible 64-bit or similar switches are necessary
9340
9341    { echo "$as_me:$LINENO: checking for required early compiler flags" >&5
9342echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6; }
9343    tcl_flags=""
9344
9345    if test "${tcl_cv_flag__isoc99_source+set}" = set; then
9346  echo $ECHO_N "(cached) $ECHO_C" >&6
9347else
9348  cat >conftest.$ac_ext <<_ACEOF
9349/* confdefs.h.  */
9350_ACEOF
9351cat confdefs.h >>conftest.$ac_ext
9352cat >>conftest.$ac_ext <<_ACEOF
9353/* end confdefs.h.  */
9354#include <stdlib.h>
9355int
9356main ()
9357{
9358char *p = (char *)strtoll; char *q = (char *)strtoull;
9359  ;
9360  return 0;
9361}
9362_ACEOF
9363rm -f conftest.$ac_objext
9364if { (ac_try="$ac_compile"
9365case "(($ac_try" in
9366  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9367  *) ac_try_echo=$ac_try;;
9368esac
9369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9370  (eval "$ac_compile") 2>conftest.er1
9371  ac_status=$?
9372  grep -v '^ *+' conftest.er1 >conftest.err
9373  rm -f conftest.er1
9374  cat conftest.err >&5
9375  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9376  (exit $ac_status); } && {
9377	 test -z "$ac_c_werror_flag" ||
9378	 test ! -s conftest.err
9379       } && test -s conftest.$ac_objext; then
9380  tcl_cv_flag__isoc99_source=no
9381else
9382  echo "$as_me: failed program was:" >&5
9383sed 's/^/| /' conftest.$ac_ext >&5
9384
9385	cat >conftest.$ac_ext <<_ACEOF
9386/* confdefs.h.  */
9387_ACEOF
9388cat confdefs.h >>conftest.$ac_ext
9389cat >>conftest.$ac_ext <<_ACEOF
9390/* end confdefs.h.  */
9391#define _ISOC99_SOURCE 1
9392#include <stdlib.h>
9393int
9394main ()
9395{
9396char *p = (char *)strtoll; char *q = (char *)strtoull;
9397  ;
9398  return 0;
9399}
9400_ACEOF
9401rm -f conftest.$ac_objext
9402if { (ac_try="$ac_compile"
9403case "(($ac_try" in
9404  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9405  *) ac_try_echo=$ac_try;;
9406esac
9407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9408  (eval "$ac_compile") 2>conftest.er1
9409  ac_status=$?
9410  grep -v '^ *+' conftest.er1 >conftest.err
9411  rm -f conftest.er1
9412  cat conftest.err >&5
9413  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9414  (exit $ac_status); } && {
9415	 test -z "$ac_c_werror_flag" ||
9416	 test ! -s conftest.err
9417       } && test -s conftest.$ac_objext; then
9418  tcl_cv_flag__isoc99_source=yes
9419else
9420  echo "$as_me: failed program was:" >&5
9421sed 's/^/| /' conftest.$ac_ext >&5
9422
9423	tcl_cv_flag__isoc99_source=no
9424fi
9425
9426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9427fi
9428
9429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9430fi
9431
9432    if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
9433
9434cat >>confdefs.h <<\_ACEOF
9435#define _ISOC99_SOURCE 1
9436_ACEOF
9437
9438	tcl_flags="$tcl_flags _ISOC99_SOURCE"
9439    fi
9440
9441
9442    if test "${tcl_cv_flag__largefile64_source+set}" = set; then
9443  echo $ECHO_N "(cached) $ECHO_C" >&6
9444else
9445  cat >conftest.$ac_ext <<_ACEOF
9446/* confdefs.h.  */
9447_ACEOF
9448cat confdefs.h >>conftest.$ac_ext
9449cat >>conftest.$ac_ext <<_ACEOF
9450/* end confdefs.h.  */
9451#include <sys/stat.h>
9452int
9453main ()
9454{
9455struct stat64 buf; int i = stat64("/", &buf);
9456  ;
9457  return 0;
9458}
9459_ACEOF
9460rm -f conftest.$ac_objext
9461if { (ac_try="$ac_compile"
9462case "(($ac_try" in
9463  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9464  *) ac_try_echo=$ac_try;;
9465esac
9466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9467  (eval "$ac_compile") 2>conftest.er1
9468  ac_status=$?
9469  grep -v '^ *+' conftest.er1 >conftest.err
9470  rm -f conftest.er1
9471  cat conftest.err >&5
9472  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473  (exit $ac_status); } && {
9474	 test -z "$ac_c_werror_flag" ||
9475	 test ! -s conftest.err
9476       } && test -s conftest.$ac_objext; then
9477  tcl_cv_flag__largefile64_source=no
9478else
9479  echo "$as_me: failed program was:" >&5
9480sed 's/^/| /' conftest.$ac_ext >&5
9481
9482	cat >conftest.$ac_ext <<_ACEOF
9483/* confdefs.h.  */
9484_ACEOF
9485cat confdefs.h >>conftest.$ac_ext
9486cat >>conftest.$ac_ext <<_ACEOF
9487/* end confdefs.h.  */
9488#define _LARGEFILE64_SOURCE 1
9489#include <sys/stat.h>
9490int
9491main ()
9492{
9493struct stat64 buf; int i = stat64("/", &buf);
9494  ;
9495  return 0;
9496}
9497_ACEOF
9498rm -f conftest.$ac_objext
9499if { (ac_try="$ac_compile"
9500case "(($ac_try" in
9501  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9502  *) ac_try_echo=$ac_try;;
9503esac
9504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9505  (eval "$ac_compile") 2>conftest.er1
9506  ac_status=$?
9507  grep -v '^ *+' conftest.er1 >conftest.err
9508  rm -f conftest.er1
9509  cat conftest.err >&5
9510  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9511  (exit $ac_status); } && {
9512	 test -z "$ac_c_werror_flag" ||
9513	 test ! -s conftest.err
9514       } && test -s conftest.$ac_objext; then
9515  tcl_cv_flag__largefile64_source=yes
9516else
9517  echo "$as_me: failed program was:" >&5
9518sed 's/^/| /' conftest.$ac_ext >&5
9519
9520	tcl_cv_flag__largefile64_source=no
9521fi
9522
9523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9524fi
9525
9526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9527fi
9528
9529    if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
9530
9531cat >>confdefs.h <<\_ACEOF
9532#define _LARGEFILE64_SOURCE 1
9533_ACEOF
9534
9535	tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
9536    fi
9537
9538
9539    if test "${tcl_cv_flag__largefile_source64+set}" = set; then
9540  echo $ECHO_N "(cached) $ECHO_C" >&6
9541else
9542  cat >conftest.$ac_ext <<_ACEOF
9543/* confdefs.h.  */
9544_ACEOF
9545cat confdefs.h >>conftest.$ac_ext
9546cat >>conftest.$ac_ext <<_ACEOF
9547/* end confdefs.h.  */
9548#include <sys/stat.h>
9549int
9550main ()
9551{
9552char *p = (char *)open64;
9553  ;
9554  return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
9558if { (ac_try="$ac_compile"
9559case "(($ac_try" in
9560  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9561  *) ac_try_echo=$ac_try;;
9562esac
9563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9564  (eval "$ac_compile") 2>conftest.er1
9565  ac_status=$?
9566  grep -v '^ *+' conftest.er1 >conftest.err
9567  rm -f conftest.er1
9568  cat conftest.err >&5
9569  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9570  (exit $ac_status); } && {
9571	 test -z "$ac_c_werror_flag" ||
9572	 test ! -s conftest.err
9573       } && test -s conftest.$ac_objext; then
9574  tcl_cv_flag__largefile_source64=no
9575else
9576  echo "$as_me: failed program was:" >&5
9577sed 's/^/| /' conftest.$ac_ext >&5
9578
9579	cat >conftest.$ac_ext <<_ACEOF
9580/* confdefs.h.  */
9581_ACEOF
9582cat confdefs.h >>conftest.$ac_ext
9583cat >>conftest.$ac_ext <<_ACEOF
9584/* end confdefs.h.  */
9585#define _LARGEFILE_SOURCE64 1
9586#include <sys/stat.h>
9587int
9588main ()
9589{
9590char *p = (char *)open64;
9591  ;
9592  return 0;
9593}
9594_ACEOF
9595rm -f conftest.$ac_objext
9596if { (ac_try="$ac_compile"
9597case "(($ac_try" in
9598  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9599  *) ac_try_echo=$ac_try;;
9600esac
9601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9602  (eval "$ac_compile") 2>conftest.er1
9603  ac_status=$?
9604  grep -v '^ *+' conftest.er1 >conftest.err
9605  rm -f conftest.er1
9606  cat conftest.err >&5
9607  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608  (exit $ac_status); } && {
9609	 test -z "$ac_c_werror_flag" ||
9610	 test ! -s conftest.err
9611       } && test -s conftest.$ac_objext; then
9612  tcl_cv_flag__largefile_source64=yes
9613else
9614  echo "$as_me: failed program was:" >&5
9615sed 's/^/| /' conftest.$ac_ext >&5
9616
9617	tcl_cv_flag__largefile_source64=no
9618fi
9619
9620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9621fi
9622
9623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9624fi
9625
9626    if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
9627
9628cat >>confdefs.h <<\_ACEOF
9629#define _LARGEFILE_SOURCE64 1
9630_ACEOF
9631
9632	tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
9633    fi
9634
9635    if test "x${tcl_flags}" = "x" ; then
9636	{ echo "$as_me:$LINENO: result: none" >&5
9637echo "${ECHO_T}none" >&6; }
9638    else
9639	{ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
9640echo "${ECHO_T}${tcl_flags}" >&6; }
9641    fi
9642
9643
9644    { echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
9645echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6; }
9646    if test "${tcl_cv_type_64bit+set}" = set; then
9647  echo $ECHO_N "(cached) $ECHO_C" >&6
9648else
9649
9650	tcl_cv_type_64bit=none
9651	# See if the compiler knows natively about __int64
9652	cat >conftest.$ac_ext <<_ACEOF
9653/* confdefs.h.  */
9654_ACEOF
9655cat confdefs.h >>conftest.$ac_ext
9656cat >>conftest.$ac_ext <<_ACEOF
9657/* end confdefs.h.  */
9658
9659int
9660main ()
9661{
9662__int64 value = (__int64) 0;
9663  ;
9664  return 0;
9665}
9666_ACEOF
9667rm -f conftest.$ac_objext
9668if { (ac_try="$ac_compile"
9669case "(($ac_try" in
9670  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671  *) ac_try_echo=$ac_try;;
9672esac
9673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9674  (eval "$ac_compile") 2>conftest.er1
9675  ac_status=$?
9676  grep -v '^ *+' conftest.er1 >conftest.err
9677  rm -f conftest.er1
9678  cat conftest.err >&5
9679  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9680  (exit $ac_status); } && {
9681	 test -z "$ac_c_werror_flag" ||
9682	 test ! -s conftest.err
9683       } && test -s conftest.$ac_objext; then
9684  tcl_type_64bit=__int64
9685else
9686  echo "$as_me: failed program was:" >&5
9687sed 's/^/| /' conftest.$ac_ext >&5
9688
9689	tcl_type_64bit="long long"
9690fi
9691
9692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9693	# See if we should use long anyway  Note that we substitute in the
9694	# type that is our current guess for a 64-bit type inside this check
9695	# program, so it should be modified only carefully...
9696        cat >conftest.$ac_ext <<_ACEOF
9697/* confdefs.h.  */
9698_ACEOF
9699cat confdefs.h >>conftest.$ac_ext
9700cat >>conftest.$ac_ext <<_ACEOF
9701/* end confdefs.h.  */
9702
9703int
9704main ()
9705{
9706switch (0) {
9707            case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
9708        }
9709  ;
9710  return 0;
9711}
9712_ACEOF
9713rm -f conftest.$ac_objext
9714if { (ac_try="$ac_compile"
9715case "(($ac_try" in
9716  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9717  *) ac_try_echo=$ac_try;;
9718esac
9719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9720  (eval "$ac_compile") 2>conftest.er1
9721  ac_status=$?
9722  grep -v '^ *+' conftest.er1 >conftest.err
9723  rm -f conftest.er1
9724  cat conftest.err >&5
9725  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9726  (exit $ac_status); } && {
9727	 test -z "$ac_c_werror_flag" ||
9728	 test ! -s conftest.err
9729       } && test -s conftest.$ac_objext; then
9730  tcl_cv_type_64bit=${tcl_type_64bit}
9731else
9732  echo "$as_me: failed program was:" >&5
9733sed 's/^/| /' conftest.$ac_ext >&5
9734
9735
9736fi
9737
9738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9739fi
9740
9741    if test "${tcl_cv_type_64bit}" = none ; then
9742
9743cat >>confdefs.h <<\_ACEOF
9744#define TCL_WIDE_INT_IS_LONG 1
9745_ACEOF
9746
9747	{ echo "$as_me:$LINENO: result: using long" >&5
9748echo "${ECHO_T}using long" >&6; }
9749    elif test "${tcl_cv_type_64bit}" = "__int64" \
9750		-a "${TEA_PLATFORM}" = "windows" ; then
9751	# TEA specific: We actually want to use the default tcl.h checks in
9752	# this case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
9753	{ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
9754echo "${ECHO_T}using Tcl header defaults" >&6; }
9755    else
9756
9757cat >>confdefs.h <<_ACEOF
9758#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
9759_ACEOF
9760
9761	{ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
9762echo "${ECHO_T}${tcl_cv_type_64bit}" >&6; }
9763
9764	# Now check for auxiliary declarations
9765	{ echo "$as_me:$LINENO: checking for struct dirent64" >&5
9766echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6; }
9767if test "${tcl_cv_struct_dirent64+set}" = set; then
9768  echo $ECHO_N "(cached) $ECHO_C" >&6
9769else
9770
9771	    cat >conftest.$ac_ext <<_ACEOF
9772/* confdefs.h.  */
9773_ACEOF
9774cat confdefs.h >>conftest.$ac_ext
9775cat >>conftest.$ac_ext <<_ACEOF
9776/* end confdefs.h.  */
9777#include <sys/types.h>
9778#include <sys/dirent.h>
9779int
9780main ()
9781{
9782struct dirent64 p;
9783  ;
9784  return 0;
9785}
9786_ACEOF
9787rm -f conftest.$ac_objext
9788if { (ac_try="$ac_compile"
9789case "(($ac_try" in
9790  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9791  *) ac_try_echo=$ac_try;;
9792esac
9793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9794  (eval "$ac_compile") 2>conftest.er1
9795  ac_status=$?
9796  grep -v '^ *+' conftest.er1 >conftest.err
9797  rm -f conftest.er1
9798  cat conftest.err >&5
9799  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9800  (exit $ac_status); } && {
9801	 test -z "$ac_c_werror_flag" ||
9802	 test ! -s conftest.err
9803       } && test -s conftest.$ac_objext; then
9804  tcl_cv_struct_dirent64=yes
9805else
9806  echo "$as_me: failed program was:" >&5
9807sed 's/^/| /' conftest.$ac_ext >&5
9808
9809	tcl_cv_struct_dirent64=no
9810fi
9811
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9813fi
9814{ echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
9815echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6; }
9816	if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
9817
9818cat >>confdefs.h <<\_ACEOF
9819#define HAVE_STRUCT_DIRENT64 1
9820_ACEOF
9821
9822	fi
9823
9824	{ echo "$as_me:$LINENO: checking for struct stat64" >&5
9825echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6; }
9826if test "${tcl_cv_struct_stat64+set}" = set; then
9827  echo $ECHO_N "(cached) $ECHO_C" >&6
9828else
9829
9830	    cat >conftest.$ac_ext <<_ACEOF
9831/* confdefs.h.  */
9832_ACEOF
9833cat confdefs.h >>conftest.$ac_ext
9834cat >>conftest.$ac_ext <<_ACEOF
9835/* end confdefs.h.  */
9836#include <sys/stat.h>
9837int
9838main ()
9839{
9840struct stat64 p;
9841
9842  ;
9843  return 0;
9844}
9845_ACEOF
9846rm -f conftest.$ac_objext
9847if { (ac_try="$ac_compile"
9848case "(($ac_try" in
9849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9850  *) ac_try_echo=$ac_try;;
9851esac
9852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9853  (eval "$ac_compile") 2>conftest.er1
9854  ac_status=$?
9855  grep -v '^ *+' conftest.er1 >conftest.err
9856  rm -f conftest.er1
9857  cat conftest.err >&5
9858  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9859  (exit $ac_status); } && {
9860	 test -z "$ac_c_werror_flag" ||
9861	 test ! -s conftest.err
9862       } && test -s conftest.$ac_objext; then
9863  tcl_cv_struct_stat64=yes
9864else
9865  echo "$as_me: failed program was:" >&5
9866sed 's/^/| /' conftest.$ac_ext >&5
9867
9868	tcl_cv_struct_stat64=no
9869fi
9870
9871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9872fi
9873{ echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
9874echo "${ECHO_T}$tcl_cv_struct_stat64" >&6; }
9875	if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
9876
9877cat >>confdefs.h <<\_ACEOF
9878#define HAVE_STRUCT_STAT64 1
9879_ACEOF
9880
9881	fi
9882
9883
9884
9885for ac_func in open64 lseek64
9886do
9887as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9888{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9889echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9890if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9891  echo $ECHO_N "(cached) $ECHO_C" >&6
9892else
9893  cat >conftest.$ac_ext <<_ACEOF
9894/* confdefs.h.  */
9895_ACEOF
9896cat confdefs.h >>conftest.$ac_ext
9897cat >>conftest.$ac_ext <<_ACEOF
9898/* end confdefs.h.  */
9899/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9900   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
9901#define $ac_func innocuous_$ac_func
9902
9903/* System header to define __stub macros and hopefully few prototypes,
9904    which can conflict with char $ac_func (); below.
9905    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9906    <limits.h> exists even on freestanding compilers.  */
9907
9908#ifdef __STDC__
9909# include <limits.h>
9910#else
9911# include <assert.h>
9912#endif
9913
9914#undef $ac_func
9915
9916/* Override any GCC internal prototype to avoid an error.
9917   Use char because int might match the return type of a GCC
9918   builtin and then its argument prototype would still apply.  */
9919#ifdef __cplusplus
9920extern "C"
9921#endif
9922char $ac_func ();
9923/* The GNU C library defines this for functions which it implements
9924    to always fail with ENOSYS.  Some functions are actually named
9925    something starting with __ and the normal name is an alias.  */
9926#if defined __stub_$ac_func || defined __stub___$ac_func
9927choke me
9928#endif
9929
9930int
9931main ()
9932{
9933return $ac_func ();
9934  ;
9935  return 0;
9936}
9937_ACEOF
9938rm -f conftest.$ac_objext conftest$ac_exeext
9939if { (ac_try="$ac_link"
9940case "(($ac_try" in
9941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9942  *) ac_try_echo=$ac_try;;
9943esac
9944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9945  (eval "$ac_link") 2>conftest.er1
9946  ac_status=$?
9947  grep -v '^ *+' conftest.er1 >conftest.err
9948  rm -f conftest.er1
9949  cat conftest.err >&5
9950  echo "$as_me:$LINENO: \$? = $ac_status" >&5
9951  (exit $ac_status); } && {
9952	 test -z "$ac_c_werror_flag" ||
9953	 test ! -s conftest.err
9954       } && test -s conftest$ac_exeext &&
9955       $as_test_x conftest$ac_exeext; then
9956  eval "$as_ac_var=yes"
9957else
9958  echo "$as_me: failed program was:" >&5
9959sed 's/^/| /' conftest.$ac_ext >&5
9960
9961	eval "$as_ac_var=no"
9962fi
9963
9964rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9965      conftest$ac_exeext conftest.$ac_ext
9966fi
9967ac_res=`eval echo '${'$as_ac_var'}'`
9968	       { echo "$as_me:$LINENO: result: $ac_res" >&5
9969echo "${ECHO_T}$ac_res" >&6; }
9970if test `eval echo '${'$as_ac_var'}'` = yes; then
9971  cat >>confdefs.h <<_ACEOF
9972#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9973_ACEOF
9974
9975fi
9976done
9977
9978	{ echo "$as_me:$LINENO: checking for off64_t" >&5
9979echo $ECHO_N "checking for off64_t... $ECHO_C" >&6; }
9980	if test "${tcl_cv_type_off64_t+set}" = set; then
9981  echo $ECHO_N "(cached) $ECHO_C" >&6
9982else
9983
9984	    cat >conftest.$ac_ext <<_ACEOF
9985/* confdefs.h.  */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h.  */
9990#include <sys/types.h>
9991int
9992main ()
9993{
9994off64_t offset;
9995
9996  ;
9997  return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext
10001if { (ac_try="$ac_compile"
10002case "(($ac_try" in
10003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10004  *) ac_try_echo=$ac_try;;
10005esac
10006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10007  (eval "$ac_compile") 2>conftest.er1
10008  ac_status=$?
10009  grep -v '^ *+' conftest.er1 >conftest.err
10010  rm -f conftest.er1
10011  cat conftest.err >&5
10012  echo "$as_me:$LINENO: \$? = $ac_status" >&5
10013  (exit $ac_status); } && {
10014	 test -z "$ac_c_werror_flag" ||
10015	 test ! -s conftest.err
10016       } && test -s conftest.$ac_objext; then
10017  tcl_cv_type_off64_t=yes
10018else
10019  echo "$as_me: failed program was:" >&5
10020sed 's/^/| /' conftest.$ac_ext >&5
10021
10022	tcl_cv_type_off64_t=no
10023fi
10024
10025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10026fi
10027
10028			if test "x${tcl_cv_type_off64_t}" = "xyes" && \
10029	        test "x${ac_cv_func_lseek64}" = "xyes" && \
10030	        test "x${ac_cv_func_open64}" = "xyes" ; then
10031
10032cat >>confdefs.h <<\_ACEOF
10033#define HAVE_TYPE_OFF64_T 1
10034_ACEOF
10035
10036	    { echo "$as_me:$LINENO: result: yes" >&5
10037echo "${ECHO_T}yes" >&6; }
10038	else
10039	    { echo "$as_me:$LINENO: result: no" >&5
10040echo "${ECHO_T}no" >&6; }
10041	fi
10042    fi
10043
10044
10045
10046#--------------------------------------------------------------------
10047# Set the default compiler switches based on the --enable-symbols option.
10048#--------------------------------------------------------------------
10049
10050
10051
10052    { echo "$as_me:$LINENO: checking for build with symbols" >&5
10053echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6; }
10054    # Check whether --enable-symbols was given.
10055if test "${enable_symbols+set}" = set; then
10056  enableval=$enable_symbols; tcl_ok=$enableval
10057else
10058  tcl_ok=no
10059fi
10060
10061    DBGX=""
10062    if test "$tcl_ok" = "no"; then
10063	CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
10064	LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
10065	{ echo "$as_me:$LINENO: result: no" >&5
10066echo "${ECHO_T}no" >&6; }
10067    else
10068	CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
10069	LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
10070	if test "$tcl_ok" = "yes"; then
10071	    { echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
10072echo "${ECHO_T}yes (standard debugging)" >&6; }
10073	fi
10074    fi
10075    # TEA specific:
10076    if test "${TEA_PLATFORM}" != "windows" ; then
10077	LDFLAGS_DEFAULT="${LDFLAGS}"
10078    fi
10079
10080
10081
10082
10083    if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
10084
10085cat >>confdefs.h <<\_ACEOF
10086#define TCL_MEM_DEBUG 1
10087_ACEOF
10088
10089    fi
10090
10091    if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
10092	if test "$tcl_ok" = "all"; then
10093	    { echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
10094echo "${ECHO_T}enabled symbols mem debugging" >&6; }
10095	else
10096	    { echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
10097echo "${ECHO_T}enabled $tcl_ok debugging" >&6; }
10098	fi
10099    fi
10100
10101
10102if test "${SHARED_BUILD}" = "1" ; then
10103    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}'
10104else
10105    CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}'
10106fi
10107
10108
10109#--------------------------------------------------------------------
10110# Everyone should be linking against the Tcl stub library.  If you
10111# can't for some reason, remove this definition.  If you aren't using
10112# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
10113# link against the non-stubbed Tcl library.  Add Tk too if necessary.
10114#--------------------------------------------------------------------
10115
10116cat >>confdefs.h <<\_ACEOF
10117#define USE_TCL_STUBS 1
10118_ACEOF
10119
10120#AC_DEFINE(USE_TK_STUBS)
10121
10122#--------------------------------------------------------------------
10123# This macro generates a line to use when building a library.  It
10124# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
10125# and TEA_LOAD_TCLCONFIG macros above.
10126# For tDOM we always build both, static and shared libraries
10127#--------------------------------------------------------------------
10128
10129
10130    if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
10131	MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
10132	MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
10133	cat >conftest.$ac_ext <<_ACEOF
10134/* confdefs.h.  */
10135_ACEOF
10136cat confdefs.h >>conftest.$ac_ext
10137cat >>conftest.$ac_ext <<_ACEOF
10138/* end confdefs.h.  */
10139
10140#if defined(_MSC_VER) && _MSC_VER >= 1400
10141print("manifest needed")
10142#endif
10143
10144_ACEOF
10145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10146  $EGREP "manifest needed" >/dev/null 2>&1; then
10147
10148	# Could do a CHECK_PROG for mt, but should always be with MSVC8+
10149	VC_MANIFEST_EMBED_DLL="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;2"
10150	VC_MANIFEST_EMBED_EXE="mt.exe -nologo -manifest \$@.manifest -outputresource:\$@\;1"
10151	MAKE_SHARED_LIB="${MAKE_SHARED_LIB} ; ${VC_MANIFEST_EMBED_DLL}"
10152
10153    CLEANFILES="$CLEANFILES *.manifest"
10154
10155
10156fi
10157rm -f -r conftest*
10158
10159	MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
10160    else
10161	MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
10162	MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
10163	MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
10164    fi
10165
10166    if test "${SHARED_BUILD}" = "1" ; then
10167	MAKE_LIB="${MAKE_SHARED_LIB} "
10168    else
10169	MAKE_LIB="${MAKE_STATIC_LIB} "
10170    fi
10171
10172    #--------------------------------------------------------------------
10173    # Shared libraries and static libraries have different names.
10174    # Use the double eval to make sure any variables in the suffix is
10175    # substituted. (@@@ Might not be necessary anymore)
10176    #--------------------------------------------------------------------
10177
10178    if test "${TEA_PLATFORM}" = "windows" ; then
10179	if test "${SHARED_BUILD}" = "1" ; then
10180	    # We force the unresolved linking of symbols that are really in
10181	    # the private libraries of Tcl and Tk.
10182	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
10183	    if test x"${TK_BIN_DIR}" != x ; then
10184		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
10185	    fi
10186	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10187	else
10188	    eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10189	fi
10190	# Some packages build their own stubs libraries
10191	eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10192	if test "$GCC" = "yes"; then
10193	    PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
10194	fi
10195	# These aren't needed on Windows (either MSVC or gcc)
10196	RANLIB=:
10197	RANLIB_STUB=:
10198    else
10199	RANLIB_STUB="${RANLIB}"
10200	if test "${SHARED_BUILD}" = "1" ; then
10201	    SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
10202	    if test x"${TK_BIN_DIR}" != x ; then
10203		SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
10204	    fi
10205	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
10206	    RANLIB=:
10207	else
10208	    eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
10209	fi
10210	# Some packages build their own stubs libraries
10211	eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
10212    fi
10213
10214    # These are escaped so that only CFLAGS is picked up at configure time.
10215    # The other values will be substituted at make time.
10216    CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
10217    if test "${SHARED_BUILD}" = "1" ; then
10218	CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
10219    fi
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230#--------------------------------------------------------------------
10231# __CHANGE__
10232# Add platform libs to LIBS or SHLIB_LD_LIBS as necessary.
10233#--------------------------------------------------------------------
10234
10235#LIBS="${LIBS} --lsuperfly"
10236
10237#--------------------------------------------------------------------
10238# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
10239# file during the install process.  Don't run the TCLSH_PROG through
10240# ${CYGPATH} because it's being used directly by make.
10241# Require that we use a tclsh shell version 8.2 or later since earlier
10242# versions have bugs in the pkg_mkIndex routine.
10243# Add WISH as well if this is a Tk extension.
10244#--------------------------------------------------------------------
10245
10246
10247    { echo "$as_me:$LINENO: checking for tclsh" >&5
10248echo $ECHO_N "checking for tclsh... $ECHO_C" >&6; }
10249    if test -f "${TCL_BIN_DIR}/Makefile" ; then
10250        # tclConfig.sh is in Tcl build directory
10251        if test "${TEA_PLATFORM}" = "windows"; then
10252            TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10253        else
10254            TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
10255        fi
10256    else
10257        # tclConfig.sh is in install location
10258        if test "${TEA_PLATFORM}" = "windows"; then
10259            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
10260        else
10261            TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
10262        fi
10263        list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
10264              `ls -d ${TCL_BIN_DIR}/..     2>/dev/null` \
10265              `ls -d ${TCL_PREFIX}/bin     2>/dev/null`"
10266        for i in $list ; do
10267            if test -f "$i/${TCLSH_PROG}" ; then
10268                REAL_TCL_BIN_DIR="`cd "$i"; pwd`/"
10269                break
10270            fi
10271        done
10272        TCLSH_PROG="${REAL_TCL_BIN_DIR}${TCLSH_PROG}"
10273    fi
10274    { echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
10275echo "${ECHO_T}${TCLSH_PROG}" >&6; }
10276
10277
10278#TEA_PROG_WISH
10279
10280#--------------------------------------------------------------------
10281# Add some private include directories
10282#--------------------------------------------------------------------
10283
10284EXAMPLE_INCLUDES="-I${srcdir}/../../generic -I${srcdir}/../../expat"
10285
10286
10287#--------------------------------------------------------------------
10288# Finally, substitute all of the various values into the Makefile.
10289# You may alternatively have a special pkgIndex.tcl.in or other files
10290# which require substituting th AC variables in.  Include these here.
10291#--------------------------------------------------------------------
10292
10293ac_config_files="$ac_config_files Makefile"
10294
10295cat >confcache <<\_ACEOF
10296# This file is a shell script that caches the results of configure
10297# tests run on this system so they can be shared between configure
10298# scripts and configure runs, see configure's option --config-cache.
10299# It is not useful on other systems.  If it contains results you don't
10300# want to keep, you may remove or edit it.
10301#
10302# config.status only pays attention to the cache file if you give it
10303# the --recheck option to rerun configure.
10304#
10305# `ac_cv_env_foo' variables (set or unset) will be overridden when
10306# loading this file, other *unset* `ac_cv_foo' will be assigned the
10307# following values.
10308
10309_ACEOF
10310
10311# The following way of writing the cache mishandles newlines in values,
10312# but we know of no workaround that is simple, portable, and efficient.
10313# So, we kill variables containing newlines.
10314# Ultrix sh set writes to stderr and can't be redirected directly,
10315# and sets the high bit in the cache file unless we assign to the vars.
10316(
10317  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10318    eval ac_val=\$$ac_var
10319    case $ac_val in #(
10320    *${as_nl}*)
10321      case $ac_var in #(
10322      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
10323echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
10324      esac
10325      case $ac_var in #(
10326      _ | IFS | as_nl) ;; #(
10327      *) $as_unset $ac_var ;;
10328      esac ;;
10329    esac
10330  done
10331
10332  (set) 2>&1 |
10333    case $as_nl`(ac_space=' '; set) 2>&1` in #(
10334    *${as_nl}ac_space=\ *)
10335      # `set' does not quote correctly, so add quotes (double-quote
10336      # substitution turns \\\\ into \\, and sed turns \\ into \).
10337      sed -n \
10338	"s/'/'\\\\''/g;
10339	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10340      ;; #(
10341    *)
10342      # `set' quotes correctly as required by POSIX, so do not add quotes.
10343      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10344      ;;
10345    esac |
10346    sort
10347) |
10348  sed '
10349     /^ac_cv_env_/b end
10350     t clear
10351     :clear
10352     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10353     t end
10354     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10355     :end' >>confcache
10356if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10357  if test -w "$cache_file"; then
10358    test "x$cache_file" != "x/dev/null" &&
10359      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
10360echo "$as_me: updating cache $cache_file" >&6;}
10361    cat confcache >$cache_file
10362  else
10363    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
10364echo "$as_me: not updating unwritable cache $cache_file" >&6;}
10365  fi
10366fi
10367rm -f confcache
10368
10369test "x$prefix" = xNONE && prefix=$ac_default_prefix
10370# Let make expand exec_prefix.
10371test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10372
10373# Transform confdefs.h into DEFS.
10374# Protect against shell expansion while executing Makefile rules.
10375# Protect against Makefile macro expansion.
10376#
10377# If the first sed substitution is executed (which looks for macros that
10378# take arguments), then branch to the quote section.  Otherwise,
10379# look for a macro that doesn't take arguments.
10380ac_script='
10381t clear
10382:clear
10383s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
10384t quote
10385s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
10386t quote
10387b any
10388:quote
10389s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
10390s/\[/\\&/g
10391s/\]/\\&/g
10392s/\$/$$/g
10393H
10394:any
10395${
10396	g
10397	s/^\n//
10398	s/\n/ /g
10399	p
10400}
10401'
10402DEFS=`sed -n "$ac_script" confdefs.h`
10403
10404
10405ac_libobjs=
10406ac_ltlibobjs=
10407for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10408  # 1. Remove the extension, and $U if already installed.
10409  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10410  ac_i=`echo "$ac_i" | sed "$ac_script"`
10411  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
10412  #    will be set to the directory where LIBOBJS objects are built.
10413  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10414  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
10415done
10416LIBOBJS=$ac_libobjs
10417
10418LTLIBOBJS=$ac_ltlibobjs
10419
10420
10421CFLAGS="${CFLAGS} ${CPPFLAGS}"; CPPFLAGS=""
10422
10423: ${CONFIG_STATUS=./config.status}
10424ac_clean_files_save=$ac_clean_files
10425ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10426{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
10427echo "$as_me: creating $CONFIG_STATUS" >&6;}
10428cat >$CONFIG_STATUS <<_ACEOF
10429#! $SHELL
10430# Generated by $as_me.
10431# Run this file to recreate the current configuration.
10432# Compiler output produced by configure, useful for debugging
10433# configure, is in config.log if it exists.
10434
10435debug=false
10436ac_cs_recheck=false
10437ac_cs_silent=false
10438SHELL=\${CONFIG_SHELL-$SHELL}
10439_ACEOF
10440
10441cat >>$CONFIG_STATUS <<\_ACEOF
10442## --------------------- ##
10443## M4sh Initialization.  ##
10444## --------------------- ##
10445
10446# Be more Bourne compatible
10447DUALCASE=1; export DUALCASE # for MKS sh
10448if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
10449  emulate sh
10450  NULLCMD=:
10451  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
10452  # is contrary to our usage.  Disable this feature.
10453  alias -g '${1+"$@"}'='"$@"'
10454  setopt NO_GLOB_SUBST
10455else
10456  case `(set -o) 2>/dev/null` in
10457  *posix*) set -o posix ;;
10458esac
10459
10460fi
10461
10462
10463
10464
10465# PATH needs CR
10466# Avoid depending upon Character Ranges.
10467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10470as_cr_digits='0123456789'
10471as_cr_alnum=$as_cr_Letters$as_cr_digits
10472
10473# The user is always right.
10474if test "${PATH_SEPARATOR+set}" != set; then
10475  echo "#! /bin/sh" >conf$$.sh
10476  echo  "exit 0"   >>conf$$.sh
10477  chmod +x conf$$.sh
10478  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10479    PATH_SEPARATOR=';'
10480  else
10481    PATH_SEPARATOR=:
10482  fi
10483  rm -f conf$$.sh
10484fi
10485
10486# Support unset when possible.
10487if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
10488  as_unset=unset
10489else
10490  as_unset=false
10491fi
10492
10493
10494# IFS
10495# We need space, tab and new line, in precisely that order.  Quoting is
10496# there to prevent editors from complaining about space-tab.
10497# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10498# splitting by setting IFS to empty value.)
10499as_nl='
10500'
10501IFS=" ""	$as_nl"
10502
10503# Find who we are.  Look in the path if we contain no directory separator.
10504case $0 in
10505  *[\\/]* ) as_myself=$0 ;;
10506  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10507for as_dir in $PATH
10508do
10509  IFS=$as_save_IFS
10510  test -z "$as_dir" && as_dir=.
10511  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10512done
10513IFS=$as_save_IFS
10514
10515     ;;
10516esac
10517# We did not find ourselves, most probably we were run as `sh COMMAND'
10518# in which case we are not to be found in the path.
10519if test "x$as_myself" = x; then
10520  as_myself=$0
10521fi
10522if test ! -f "$as_myself"; then
10523  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10524  { (exit 1); exit 1; }
10525fi
10526
10527# Work around bugs in pre-3.0 UWIN ksh.
10528for as_var in ENV MAIL MAILPATH
10529do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10530done
10531PS1='$ '
10532PS2='> '
10533PS4='+ '
10534
10535# NLS nuisances.
10536for as_var in \
10537  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
10538  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
10539  LC_TELEPHONE LC_TIME
10540do
10541  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
10542    eval $as_var=C; export $as_var
10543  else
10544    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
10545  fi
10546done
10547
10548# Required to use basename.
10549if expr a : '\(a\)' >/dev/null 2>&1 &&
10550   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10551  as_expr=expr
10552else
10553  as_expr=false
10554fi
10555
10556if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10557  as_basename=basename
10558else
10559  as_basename=false
10560fi
10561
10562
10563# Name of the executable.
10564as_me=`$as_basename -- "$0" ||
10565$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10566	 X"$0" : 'X\(//\)$' \| \
10567	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10568echo X/"$0" |
10569    sed '/^.*\/\([^/][^/]*\)\/*$/{
10570	    s//\1/
10571	    q
10572	  }
10573	  /^X\/\(\/\/\)$/{
10574	    s//\1/
10575	    q
10576	  }
10577	  /^X\/\(\/\).*/{
10578	    s//\1/
10579	    q
10580	  }
10581	  s/.*/./; q'`
10582
10583# CDPATH.
10584$as_unset CDPATH
10585
10586
10587
10588  as_lineno_1=$LINENO
10589  as_lineno_2=$LINENO
10590  test "x$as_lineno_1" != "x$as_lineno_2" &&
10591  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
10592
10593  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
10594  # uniformly replaced by the line number.  The first 'sed' inserts a
10595  # line-number line after each line using $LINENO; the second 'sed'
10596  # does the real work.  The second script uses 'N' to pair each
10597  # line-number line with the line containing $LINENO, and appends
10598  # trailing '-' during substitution so that $LINENO is not a special
10599  # case at line end.
10600  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
10601  # scripts with optimization help from Paolo Bonzini.  Blame Lee
10602  # E. McMahon (1931-1989) for sed's syntax.  :-)
10603  sed -n '
10604    p
10605    /[$]LINENO/=
10606  ' <$as_myself |
10607    sed '
10608      s/[$]LINENO.*/&-/
10609      t lineno
10610      b
10611      :lineno
10612      N
10613      :loop
10614      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
10615      t loop
10616      s/-\n.*//
10617    ' >$as_me.lineno &&
10618  chmod +x "$as_me.lineno" ||
10619    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
10620   { (exit 1); exit 1; }; }
10621
10622  # Don't try to exec as it changes $[0], causing all sort of problems
10623  # (the dirname of $[0] is not the place where we might find the
10624  # original and so on.  Autoconf is especially sensitive to this).
10625  . "./$as_me.lineno"
10626  # Exit status is that of the last command.
10627  exit
10628}
10629
10630
10631if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10632  as_dirname=dirname
10633else
10634  as_dirname=false
10635fi
10636
10637ECHO_C= ECHO_N= ECHO_T=
10638case `echo -n x` in
10639-n*)
10640  case `echo 'x\c'` in
10641  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
10642  *)   ECHO_C='\c';;
10643  esac;;
10644*)
10645  ECHO_N='-n';;
10646esac
10647
10648if expr a : '\(a\)' >/dev/null 2>&1 &&
10649   test "X`expr 00001 : '.*\(...\)'`" = X001; then
10650  as_expr=expr
10651else
10652  as_expr=false
10653fi
10654
10655rm -f conf$$ conf$$.exe conf$$.file
10656if test -d conf$$.dir; then
10657  rm -f conf$$.dir/conf$$.file
10658else
10659  rm -f conf$$.dir
10660  mkdir conf$$.dir
10661fi
10662echo >conf$$.file
10663if ln -s conf$$.file conf$$ 2>/dev/null; then
10664  as_ln_s='ln -s'
10665  # ... but there are two gotchas:
10666  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10667  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
10668  # In both cases, we have to default to `cp -p'.
10669  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
10670    as_ln_s='cp -p'
10671elif ln conf$$.file conf$$ 2>/dev/null; then
10672  as_ln_s=ln
10673else
10674  as_ln_s='cp -p'
10675fi
10676rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10677rmdir conf$$.dir 2>/dev/null
10678
10679if mkdir -p . 2>/dev/null; then
10680  as_mkdir_p=:
10681else
10682  test -d ./-p && rmdir ./-p
10683  as_mkdir_p=false
10684fi
10685
10686if test -x / >/dev/null 2>&1; then
10687  as_test_x='test -x'
10688else
10689  if ls -dL / >/dev/null 2>&1; then
10690    as_ls_L_option=L
10691  else
10692    as_ls_L_option=
10693  fi
10694  as_test_x='
10695    eval sh -c '\''
10696      if test -d "$1"; then
10697        test -d "$1/.";
10698      else
10699	case $1 in
10700        -*)set "./$1";;
10701	esac;
10702	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
10703	???[sx]*):;;*)false;;esac;fi
10704    '\'' sh
10705  '
10706fi
10707as_executable_p=$as_test_x
10708
10709# Sed expression to map a string onto a valid CPP name.
10710as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10711
10712# Sed expression to map a string onto a valid variable name.
10713as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10714
10715
10716exec 6>&1
10717
10718# Save the log message, to keep $[0] and so on meaningful, and to
10719# report actual input values of CONFIG_FILES etc. instead of their
10720# values after options handling.
10721ac_log="
10722This file was extended by $as_me, which was
10723generated by GNU Autoconf 2.61.  Invocation command line was
10724
10725  CONFIG_FILES    = $CONFIG_FILES
10726  CONFIG_HEADERS  = $CONFIG_HEADERS
10727  CONFIG_LINKS    = $CONFIG_LINKS
10728  CONFIG_COMMANDS = $CONFIG_COMMANDS
10729  $ $0 $@
10730
10731on `(hostname || uname -n) 2>/dev/null | sed 1q`
10732"
10733
10734_ACEOF
10735
10736cat >>$CONFIG_STATUS <<_ACEOF
10737# Files that config.status was made for.
10738config_files="$ac_config_files"
10739
10740_ACEOF
10741
10742cat >>$CONFIG_STATUS <<\_ACEOF
10743ac_cs_usage="\
10744\`$as_me' instantiates files from templates according to the
10745current configuration.
10746
10747Usage: $0 [OPTIONS] [FILE]...
10748
10749  -h, --help       print this help, then exit
10750  -V, --version    print version number and configuration settings, then exit
10751  -q, --quiet      do not print progress messages
10752  -d, --debug      don't remove temporary files
10753      --recheck    update $as_me by reconfiguring in the same conditions
10754  --file=FILE[:TEMPLATE]
10755		   instantiate the configuration file FILE
10756
10757Configuration files:
10758$config_files
10759
10760Report bugs to <bug-autoconf@gnu.org>."
10761
10762_ACEOF
10763cat >>$CONFIG_STATUS <<_ACEOF
10764ac_cs_version="\\
10765config.status
10766configured by $0, generated by GNU Autoconf 2.61,
10767  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
10768
10769Copyright (C) 2006 Free Software Foundation, Inc.
10770This config.status script is free software; the Free Software Foundation
10771gives unlimited permission to copy, distribute and modify it."
10772
10773ac_pwd='$ac_pwd'
10774srcdir='$srcdir'
10775INSTALL='$INSTALL'
10776_ACEOF
10777
10778cat >>$CONFIG_STATUS <<\_ACEOF
10779# If no file are specified by the user, then we need to provide default
10780# value.  By we need to know if files were specified by the user.
10781ac_need_defaults=:
10782while test $# != 0
10783do
10784  case $1 in
10785  --*=*)
10786    ac_option=`expr "X$1" : 'X\([^=]*\)='`
10787    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
10788    ac_shift=:
10789    ;;
10790  *)
10791    ac_option=$1
10792    ac_optarg=$2
10793    ac_shift=shift
10794    ;;
10795  esac
10796
10797  case $ac_option in
10798  # Handling of the options.
10799  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10800    ac_cs_recheck=: ;;
10801  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
10802    echo "$ac_cs_version"; exit ;;
10803  --debug | --debu | --deb | --de | --d | -d )
10804    debug=: ;;
10805  --file | --fil | --fi | --f )
10806    $ac_shift
10807    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
10808    ac_need_defaults=false;;
10809  --he | --h |  --help | --hel | -h )
10810    echo "$ac_cs_usage"; exit ;;
10811  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
10812  | -silent | --silent | --silen | --sile | --sil | --si | --s)
10813    ac_cs_silent=: ;;
10814
10815  # This is an error.
10816  -*) { echo "$as_me: error: unrecognized option: $1
10817Try \`$0 --help' for more information." >&2
10818   { (exit 1); exit 1; }; } ;;
10819
10820  *) ac_config_targets="$ac_config_targets $1"
10821     ac_need_defaults=false ;;
10822
10823  esac
10824  shift
10825done
10826
10827ac_configure_extra_args=
10828
10829if $ac_cs_silent; then
10830  exec 6>/dev/null
10831  ac_configure_extra_args="$ac_configure_extra_args --silent"
10832fi
10833
10834_ACEOF
10835cat >>$CONFIG_STATUS <<_ACEOF
10836if \$ac_cs_recheck; then
10837  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
10838  CONFIG_SHELL=$SHELL
10839  export CONFIG_SHELL
10840  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
10841fi
10842
10843_ACEOF
10844cat >>$CONFIG_STATUS <<\_ACEOF
10845exec 5>>config.log
10846{
10847  echo
10848  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
10849## Running $as_me. ##
10850_ASBOX
10851  echo "$ac_log"
10852} >&5
10853
10854_ACEOF
10855cat >>$CONFIG_STATUS <<_ACEOF
10856_ACEOF
10857
10858cat >>$CONFIG_STATUS <<\_ACEOF
10859
10860# Handling of arguments.
10861for ac_config_target in $ac_config_targets
10862do
10863  case $ac_config_target in
10864    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
10865
10866  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
10867echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
10868   { (exit 1); exit 1; }; };;
10869  esac
10870done
10871
10872
10873# If the user did not use the arguments to specify the items to instantiate,
10874# then the envvar interface is used.  Set only those that are not.
10875# We use the long form for the default assignment because of an extremely
10876# bizarre bug on SunOS 4.1.3.
10877if $ac_need_defaults; then
10878  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
10879fi
10880
10881# Have a temporary directory for convenience.  Make it in the build tree
10882# simply because there is no reason against having it here, and in addition,
10883# creating and moving files from /tmp can sometimes cause problems.
10884# Hook for its removal unless debugging.
10885# Note that there is a small window in which the directory will not be cleaned:
10886# after its creation but before its name has been assigned to `$tmp'.
10887$debug ||
10888{
10889  tmp=
10890  trap 'exit_status=$?
10891  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
10892' 0
10893  trap '{ (exit 1); exit 1; }' 1 2 13 15
10894}
10895# Create a (secure) tmp directory for tmp files.
10896
10897{
10898  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
10899  test -n "$tmp" && test -d "$tmp"
10900}  ||
10901{
10902  tmp=./conf$$-$RANDOM
10903  (umask 077 && mkdir "$tmp")
10904} ||
10905{
10906   echo "$me: cannot create a temporary directory in ." >&2
10907   { (exit 1); exit 1; }
10908}
10909
10910#
10911# Set up the sed scripts for CONFIG_FILES section.
10912#
10913
10914# No need to generate the scripts if there are no CONFIG_FILES.
10915# This happens for instance when ./config.status config.h
10916if test -n "$CONFIG_FILES"; then
10917
10918_ACEOF
10919
10920
10921
10922ac_delim='%!_!# '
10923for ac_last_try in false false false false false :; do
10924  cat >conf$$subs.sed <<_ACEOF
10925SHELL!$SHELL$ac_delim
10926PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
10927PACKAGE_NAME!$PACKAGE_NAME$ac_delim
10928PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
10929PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
10930PACKAGE_STRING!$PACKAGE_STRING$ac_delim
10931PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
10932exec_prefix!$exec_prefix$ac_delim
10933prefix!$prefix$ac_delim
10934program_transform_name!$program_transform_name$ac_delim
10935bindir!$bindir$ac_delim
10936sbindir!$sbindir$ac_delim
10937libexecdir!$libexecdir$ac_delim
10938datarootdir!$datarootdir$ac_delim
10939datadir!$datadir$ac_delim
10940sysconfdir!$sysconfdir$ac_delim
10941sharedstatedir!$sharedstatedir$ac_delim
10942localstatedir!$localstatedir$ac_delim
10943includedir!$includedir$ac_delim
10944oldincludedir!$oldincludedir$ac_delim
10945docdir!$docdir$ac_delim
10946infodir!$infodir$ac_delim
10947htmldir!$htmldir$ac_delim
10948dvidir!$dvidir$ac_delim
10949pdfdir!$pdfdir$ac_delim
10950psdir!$psdir$ac_delim
10951libdir!$libdir$ac_delim
10952localedir!$localedir$ac_delim
10953mandir!$mandir$ac_delim
10954DEFS!$DEFS$ac_delim
10955ECHO_C!$ECHO_C$ac_delim
10956ECHO_N!$ECHO_N$ac_delim
10957ECHO_T!$ECHO_T$ac_delim
10958LIBS!$LIBS$ac_delim
10959build_alias!$build_alias$ac_delim
10960host_alias!$host_alias$ac_delim
10961target_alias!$target_alias$ac_delim
10962CONFIGDIR!$CONFIGDIR$ac_delim
10963PACKAGE!$PACKAGE$ac_delim
10964VERSION!$VERSION$ac_delim
10965example_LIB_FILE!$example_LIB_FILE$ac_delim
10966CYGPATH!$CYGPATH$ac_delim
10967EXEEXT!$EXEEXT$ac_delim
10968PKG_LIB_FILE!$PKG_LIB_FILE$ac_delim
10969PKG_STUB_LIB_FILE!$PKG_STUB_LIB_FILE$ac_delim
10970PKG_STUB_SOURCES!$PKG_STUB_SOURCES$ac_delim
10971PKG_STUB_OBJECTS!$PKG_STUB_OBJECTS$ac_delim
10972PKG_TCL_SOURCES!$PKG_TCL_SOURCES$ac_delim
10973PKG_HEADERS!$PKG_HEADERS$ac_delim
10974PKG_INCLUDES!$PKG_INCLUDES$ac_delim
10975PKG_LIBS!$PKG_LIBS$ac_delim
10976PKG_CFLAGS!$PKG_CFLAGS$ac_delim
10977TCL_VERSION!$TCL_VERSION$ac_delim
10978TCL_PATCH_LEVEL!$TCL_PATCH_LEVEL$ac_delim
10979TCL_BIN_DIR!$TCL_BIN_DIR$ac_delim
10980TCL_SRC_DIR!$TCL_SRC_DIR$ac_delim
10981TCL_LIB_FILE!$TCL_LIB_FILE$ac_delim
10982TCL_LIB_FLAG!$TCL_LIB_FLAG$ac_delim
10983TCL_LIB_SPEC!$TCL_LIB_SPEC$ac_delim
10984TCL_STUB_LIB_FILE!$TCL_STUB_LIB_FILE$ac_delim
10985TCL_STUB_LIB_FLAG!$TCL_STUB_LIB_FLAG$ac_delim
10986TCL_STUB_LIB_SPEC!$TCL_STUB_LIB_SPEC$ac_delim
10987CLEANFILES!$CLEANFILES$ac_delim
10988TCL_LIBS!$TCL_LIBS$ac_delim
10989TCL_DEFS!$TCL_DEFS$ac_delim
10990TCL_EXTRA_CFLAGS!$TCL_EXTRA_CFLAGS$ac_delim
10991TCL_LD_FLAGS!$TCL_LD_FLAGS$ac_delim
10992TCL_SHLIB_LD_LIBS!$TCL_SHLIB_LD_LIBS$ac_delim
10993TDOM_VERSION!$TDOM_VERSION$ac_delim
10994TDOM_STUB_LIB_SPEC!$TDOM_STUB_LIB_SPEC$ac_delim
10995TDOM_SRC_DIR!$TDOM_SRC_DIR$ac_delim
10996CC!$CC$ac_delim
10997CFLAGS!$CFLAGS$ac_delim
10998LDFLAGS!$LDFLAGS$ac_delim
10999CPPFLAGS!$CPPFLAGS$ac_delim
11000ac_ct_CC!$ac_ct_CC$ac_delim
11001OBJEXT!$OBJEXT$ac_delim
11002CPP!$CPP$ac_delim
11003INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
11004INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
11005INSTALL_DATA!$INSTALL_DATA$ac_delim
11006SET_MAKE!$SET_MAKE$ac_delim
11007RANLIB!$RANLIB$ac_delim
11008GREP!$GREP$ac_delim
11009EGREP!$EGREP$ac_delim
11010MATH_LIBS!$MATH_LIBS$ac_delim
11011TCL_INCLUDES!$TCL_INCLUDES$ac_delim
11012EXTRA_SOURCES!$EXTRA_SOURCES$ac_delim
11013TCL_THREADS!$TCL_THREADS$ac_delim
11014SHARED_BUILD!$SHARED_BUILD$ac_delim
11015AR!$AR$ac_delim
11016CELIB_DIR!$CELIB_DIR$ac_delim
11017CFLAGS_DEBUG!$CFLAGS_DEBUG$ac_delim
11018CFLAGS_OPTIMIZE!$CFLAGS_OPTIMIZE$ac_delim
11019CFLAGS_WARNING!$CFLAGS_WARNING$ac_delim
11020STLIB_LD!$STLIB_LD$ac_delim
11021SHLIB_LD!$SHLIB_LD$ac_delim
11022_ACEOF
11023
11024  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
11025    break
11026  elif $ac_last_try; then
11027    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11028echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11029   { (exit 1); exit 1; }; }
11030  else
11031    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11032  fi
11033done
11034
11035ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11036if test -n "$ac_eof"; then
11037  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11038  ac_eof=`expr $ac_eof + 1`
11039fi
11040
11041cat >>$CONFIG_STATUS <<_ACEOF
11042cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
11043/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11044_ACEOF
11045sed '
11046s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11047s/^/s,@/; s/!/@,|#_!!_#|/
11048:n
11049t n
11050s/'"$ac_delim"'$/,g/; t
11051s/$/\\/; p
11052N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11053' >>$CONFIG_STATUS <conf$$subs.sed
11054rm -f conf$$subs.sed
11055cat >>$CONFIG_STATUS <<_ACEOF
11056CEOF$ac_eof
11057_ACEOF
11058
11059
11060ac_delim='%!_!# '
11061for ac_last_try in false false false false false :; do
11062  cat >conf$$subs.sed <<_ACEOF
11063SHLIB_LD_LIBS!$SHLIB_LD_LIBS$ac_delim
11064SHLIB_CFLAGS!$SHLIB_CFLAGS$ac_delim
11065LD_LIBRARY_PATH_VAR!$LD_LIBRARY_PATH_VAR$ac_delim
11066CFLAGS_DEFAULT!$CFLAGS_DEFAULT$ac_delim
11067LDFLAGS_DEFAULT!$LDFLAGS_DEFAULT$ac_delim
11068TCL_DBGX!$TCL_DBGX$ac_delim
11069MAKE_LIB!$MAKE_LIB$ac_delim
11070MAKE_SHARED_LIB!$MAKE_SHARED_LIB$ac_delim
11071MAKE_STATIC_LIB!$MAKE_STATIC_LIB$ac_delim
11072MAKE_STUB_LIB!$MAKE_STUB_LIB$ac_delim
11073RANLIB_STUB!$RANLIB_STUB$ac_delim
11074VC_MANIFEST_EMBED_DLL!$VC_MANIFEST_EMBED_DLL$ac_delim
11075VC_MANIFEST_EMBED_EXE!$VC_MANIFEST_EMBED_EXE$ac_delim
11076TCLSH_PROG!$TCLSH_PROG$ac_delim
11077EXAMPLE_INCLUDES!$EXAMPLE_INCLUDES$ac_delim
11078LIBOBJS!$LIBOBJS$ac_delim
11079LTLIBOBJS!$LTLIBOBJS$ac_delim
11080_ACEOF
11081
11082  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then
11083    break
11084  elif $ac_last_try; then
11085    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
11086echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
11087   { (exit 1); exit 1; }; }
11088  else
11089    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11090  fi
11091done
11092
11093ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
11094if test -n "$ac_eof"; then
11095  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
11096  ac_eof=`expr $ac_eof + 1`
11097fi
11098
11099cat >>$CONFIG_STATUS <<_ACEOF
11100cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
11101/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
11102_ACEOF
11103sed '
11104s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
11105s/^/s,@/; s/!/@,|#_!!_#|/
11106:n
11107t n
11108s/'"$ac_delim"'$/,g/; t
11109s/$/\\/; p
11110N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
11111' >>$CONFIG_STATUS <conf$$subs.sed
11112rm -f conf$$subs.sed
11113cat >>$CONFIG_STATUS <<_ACEOF
11114:end
11115s/|#_!!_#|//g
11116CEOF$ac_eof
11117_ACEOF
11118
11119
11120# VPATH may cause trouble with some makes, so we remove $(srcdir),
11121# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
11122# trailing colons and then remove the whole line if VPATH becomes empty
11123# (actually we leave an empty line to preserve line numbers).
11124if test "x$srcdir" = x.; then
11125  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
11126s/:*\$(srcdir):*/:/
11127s/:*\${srcdir}:*/:/
11128s/:*@srcdir@:*/:/
11129s/^\([^=]*=[	 ]*\):*/\1/
11130s/:*$//
11131s/^[^=]*=[	 ]*$//
11132}'
11133fi
11134
11135cat >>$CONFIG_STATUS <<\_ACEOF
11136fi # test -n "$CONFIG_FILES"
11137
11138
11139for ac_tag in  :F $CONFIG_FILES
11140do
11141  case $ac_tag in
11142  :[FHLC]) ac_mode=$ac_tag; continue;;
11143  esac
11144  case $ac_mode$ac_tag in
11145  :[FHL]*:*);;
11146  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
11147echo "$as_me: error: Invalid tag $ac_tag." >&2;}
11148   { (exit 1); exit 1; }; };;
11149  :[FH]-) ac_tag=-:-;;
11150  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11151  esac
11152  ac_save_IFS=$IFS
11153  IFS=:
11154  set x $ac_tag
11155  IFS=$ac_save_IFS
11156  shift
11157  ac_file=$1
11158  shift
11159
11160  case $ac_mode in
11161  :L) ac_source=$1;;
11162  :[FH])
11163    ac_file_inputs=
11164    for ac_f
11165    do
11166      case $ac_f in
11167      -) ac_f="$tmp/stdin";;
11168      *) # Look for the file first in the build tree, then in the source tree
11169	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
11170	 # because $ac_f cannot contain `:'.
11171	 test -f "$ac_f" ||
11172	   case $ac_f in
11173	   [\\/$]*) false;;
11174	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11175	   esac ||
11176	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
11177echo "$as_me: error: cannot find input file: $ac_f" >&2;}
11178   { (exit 1); exit 1; }; };;
11179      esac
11180      ac_file_inputs="$ac_file_inputs $ac_f"
11181    done
11182
11183    # Let's still pretend it is `configure' which instantiates (i.e., don't
11184    # use $as_me), people would be surprised to read:
11185    #    /* config.h.  Generated by config.status.  */
11186    configure_input="Generated from "`IFS=:
11187	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
11188    if test x"$ac_file" != x-; then
11189      configure_input="$ac_file.  $configure_input"
11190      { echo "$as_me:$LINENO: creating $ac_file" >&5
11191echo "$as_me: creating $ac_file" >&6;}
11192    fi
11193
11194    case $ac_tag in
11195    *:-:* | *:-) cat >"$tmp/stdin";;
11196    esac
11197    ;;
11198  esac
11199
11200  ac_dir=`$as_dirname -- "$ac_file" ||
11201$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11202	 X"$ac_file" : 'X\(//\)[^/]' \| \
11203	 X"$ac_file" : 'X\(//\)$' \| \
11204	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11205echo X"$ac_file" |
11206    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11207	    s//\1/
11208	    q
11209	  }
11210	  /^X\(\/\/\)[^/].*/{
11211	    s//\1/
11212	    q
11213	  }
11214	  /^X\(\/\/\)$/{
11215	    s//\1/
11216	    q
11217	  }
11218	  /^X\(\/\).*/{
11219	    s//\1/
11220	    q
11221	  }
11222	  s/.*/./; q'`
11223  { as_dir="$ac_dir"
11224  case $as_dir in #(
11225  -*) as_dir=./$as_dir;;
11226  esac
11227  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
11228    as_dirs=
11229    while :; do
11230      case $as_dir in #(
11231      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
11232      *) as_qdir=$as_dir;;
11233      esac
11234      as_dirs="'$as_qdir' $as_dirs"
11235      as_dir=`$as_dirname -- "$as_dir" ||
11236$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11237	 X"$as_dir" : 'X\(//\)[^/]' \| \
11238	 X"$as_dir" : 'X\(//\)$' \| \
11239	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11240echo X"$as_dir" |
11241    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11242	    s//\1/
11243	    q
11244	  }
11245	  /^X\(\/\/\)[^/].*/{
11246	    s//\1/
11247	    q
11248	  }
11249	  /^X\(\/\/\)$/{
11250	    s//\1/
11251	    q
11252	  }
11253	  /^X\(\/\).*/{
11254	    s//\1/
11255	    q
11256	  }
11257	  s/.*/./; q'`
11258      test -d "$as_dir" && break
11259    done
11260    test -z "$as_dirs" || eval "mkdir $as_dirs"
11261  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
11262echo "$as_me: error: cannot create directory $as_dir" >&2;}
11263   { (exit 1); exit 1; }; }; }
11264  ac_builddir=.
11265
11266case "$ac_dir" in
11267.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11268*)
11269  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
11270  # A ".." for each directory in $ac_dir_suffix.
11271  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
11272  case $ac_top_builddir_sub in
11273  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11274  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11275  esac ;;
11276esac
11277ac_abs_top_builddir=$ac_pwd
11278ac_abs_builddir=$ac_pwd$ac_dir_suffix
11279# for backward compatibility:
11280ac_top_builddir=$ac_top_build_prefix
11281
11282case $srcdir in
11283  .)  # We are building in place.
11284    ac_srcdir=.
11285    ac_top_srcdir=$ac_top_builddir_sub
11286    ac_abs_top_srcdir=$ac_pwd ;;
11287  [\\/]* | ?:[\\/]* )  # Absolute name.
11288    ac_srcdir=$srcdir$ac_dir_suffix;
11289    ac_top_srcdir=$srcdir
11290    ac_abs_top_srcdir=$srcdir ;;
11291  *) # Relative name.
11292    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11293    ac_top_srcdir=$ac_top_build_prefix$srcdir
11294    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11295esac
11296ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11297
11298
11299  case $ac_mode in
11300  :F)
11301  #
11302  # CONFIG_FILE
11303  #
11304
11305  case $INSTALL in
11306  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11307  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11308  esac
11309_ACEOF
11310
11311cat >>$CONFIG_STATUS <<\_ACEOF
11312# If the template does not know about datarootdir, expand it.
11313# FIXME: This hack should be removed a few years after 2.60.
11314ac_datarootdir_hack=; ac_datarootdir_seen=
11315
11316case `sed -n '/datarootdir/ {
11317  p
11318  q
11319}
11320/@datadir@/p
11321/@docdir@/p
11322/@infodir@/p
11323/@localedir@/p
11324/@mandir@/p
11325' $ac_file_inputs` in
11326*datarootdir*) ac_datarootdir_seen=yes;;
11327*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11328  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11329echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11330_ACEOF
11331cat >>$CONFIG_STATUS <<_ACEOF
11332  ac_datarootdir_hack='
11333  s&@datadir@&$datadir&g
11334  s&@docdir@&$docdir&g
11335  s&@infodir@&$infodir&g
11336  s&@localedir@&$localedir&g
11337  s&@mandir@&$mandir&g
11338    s&\\\${datarootdir}&$datarootdir&g' ;;
11339esac
11340_ACEOF
11341
11342# Neutralize VPATH when `$srcdir' = `.'.
11343# Shell code in configure.ac might set extrasub.
11344# FIXME: do we really want to maintain this feature?
11345cat >>$CONFIG_STATUS <<_ACEOF
11346  sed "$ac_vpsub
11347$extrasub
11348_ACEOF
11349cat >>$CONFIG_STATUS <<\_ACEOF
11350:t
11351/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11352s&@configure_input@&$configure_input&;t t
11353s&@top_builddir@&$ac_top_builddir_sub&;t t
11354s&@srcdir@&$ac_srcdir&;t t
11355s&@abs_srcdir@&$ac_abs_srcdir&;t t
11356s&@top_srcdir@&$ac_top_srcdir&;t t
11357s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11358s&@builddir@&$ac_builddir&;t t
11359s&@abs_builddir@&$ac_abs_builddir&;t t
11360s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11361s&@INSTALL@&$ac_INSTALL&;t t
11362$ac_datarootdir_hack
11363" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
11364
11365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11366  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
11367  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
11368  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11369which seems to be undefined.  Please make sure it is defined." >&5
11370echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11371which seems to be undefined.  Please make sure it is defined." >&2;}
11372
11373  rm -f "$tmp/stdin"
11374  case $ac_file in
11375  -) cat "$tmp/out"; rm -f "$tmp/out";;
11376  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
11377  esac
11378 ;;
11379
11380
11381
11382  esac
11383
11384done # for ac_tag
11385
11386
11387{ (exit 0); exit 0; }
11388_ACEOF
11389chmod +x $CONFIG_STATUS
11390ac_clean_files=$ac_clean_files_save
11391
11392
11393# configure is writing to config.log, and then calls config.status.
11394# config.status does its own redirection, appending to config.log.
11395# Unfortunately, on DOS this fails, as config.log is still kept open
11396# by configure, so config.status won't be able to write to it; its
11397# output is simply discarded.  So we exec the FD to /dev/null,
11398# effectively closing config.log, so it can be properly (re)opened and
11399# appended to by config.status.  When coming back to configure, we
11400# need to make the FD available again.
11401if test "$no_create" != yes; then
11402  ac_cs_success=:
11403  ac_config_status_args=
11404  test "$silent" = yes &&
11405    ac_config_status_args="$ac_config_status_args --quiet"
11406  exec 5>/dev/null
11407  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11408  exec 5>>config.log
11409  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11410  # would make configure fail if this is the last instruction.
11411  $ac_cs_success || { (exit 1); exit 1; }
11412fi
11413
11414